vault backup: 2025-07-05 20:48:33

This commit is contained in:
CrazyJasonwell committed 2025-07-05 20:48:33 +08:00
1 parent f6590fea22
commit 716b67ee5a
36 files changed
+14936 -25

No files matched your search

+3 -1
View File
@@ -17,5 +17,7 @@
"fuzzy-chinese-pinyin",
"obsidian-raindrop-highlights",
"rss-reader",
"obsidian-full-calendar"
"obsidian-full-calendar",
"obsidian-importer",
"copilot"
]
+323
View File
@@ -0,0 +1,323 @@
{
"userId": "46358cc9-6654-46fa-8ff1-5ad21a4a185c",
"isPlusUser": false,
"plusLicenseKey": "",
"openAIApiKey": "",
"openAIOrgId": "",
"huggingfaceApiKey": "",
"cohereApiKey": "",
"anthropicApiKey": "",
"azureOpenAIApiKey": "",
"azureOpenAIApiInstanceName": "",
"azureOpenAIApiDeploymentName": "",
"azureOpenAIApiVersion": "",
"azureOpenAIApiEmbeddingDeploymentName": "",
"googleApiKey": "",
"openRouterAiApiKey": "",
"xaiApiKey": "",
"mistralApiKey": "",
"deepseekApiKey": "",
"defaultChainType": "llm_chain",
"defaultModelKey": "gpt-4.1|openai",
"embeddingModelKey": "text-embedding-3-small|openai",
"temperature": 0.1,
"maxTokens": 6000,
"contextTurns": 15,
"userSystemPrompt": "",
"openAIProxyBaseUrl": "",
"openAIEmbeddingProxyBaseUrl": "",
"stream": true,
"defaultSaveFolder": "copilot-conversations",
"defaultConversationTag": "copilot-conversation",
"autosaveChat": false,
"includeActiveNoteAsContext": true,
"defaultOpenArea": "view",
"customPromptsFolder": "copilot-custom-prompts",
"indexVaultToVectorStore": "ON MODE SWITCH",
"qaExclusions": "",
"qaInclusions": "",
"chatNoteContextPath": "",
"chatNoteContextTags": [],
"enableIndexSync": true,
"debug": false,
"enableEncryption": false,
"maxSourceChunks": 3,
"groqApiKey": "",
"activeModels": [
{
"name": "copilot-plus-flash",
"provider": "copilot-plus",
"enabled": true,
"isBuiltIn": true,
"core": true,
"plusExclusive": true,
"projectEnabled": false,
"capabilities": [
"vision"
]
},
{
"name": "google/gemini-2.5-flash-lite-preview-06-17",
"provider": "openrouterai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "google/gemini-2.5-flash",
"provider": "openrouterai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "google/gemini-2.5-pro",
"provider": "openrouterai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "gpt-4.1",
"provider": "openai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "gpt-4.1-mini",
"provider": "openai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "gpt-4.1-nano",
"provider": "openai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"capabilities": [
"vision"
]
},
{
"name": "o4-mini",
"provider": "openai",
"enabled": true,
"isBuiltIn": true,
"core": true,
"capabilities": [
"reasoning"
]
},
{
"name": "claude-3-5-sonnet-latest",
"provider": "anthropic",
"enabled": true,
"isBuiltIn": true,
"core": true,
"capabilities": [
"vision"
]
},
{
"name": "claude-sonnet-4-20250514",
"provider": "anthropic",
"enabled": true,
"isBuiltIn": true,
"capabilities": [
"vision",
"reasoning"
]
},
{
"name": "claude-3-7-sonnet-latest",
"provider": "anthropic",
"enabled": true,
"isBuiltIn": true,
"capabilities": [
"vision",
"reasoning"
]
},
{
"name": "claude-3-5-haiku-latest",
"provider": "anthropic",
"enabled": true,
"isBuiltIn": true
},
{
"name": "grok-3-beta",
"provider": "xai",
"enabled": true,
"isBuiltIn": true
},
{
"name": "grok-3-mini-beta",
"provider": "xai",
"enabled": true,
"isBuiltIn": true
},
{
"name": "gemini-2.5-flash",
"provider": "google",
"enabled": true,
"isBuiltIn": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "gemini-2.5-pro",
"provider": "google",
"enabled": true,
"isBuiltIn": true,
"projectEnabled": true,
"capabilities": [
"vision"
]
},
{
"name": "command-r",
"provider": "cohereai",
"enabled": true,
"isBuiltIn": true
},
{
"name": "command-r-plus",
"provider": "cohereai",
"enabled": true,
"isBuiltIn": true
},
{
"name": "azure-openai",
"provider": "azure openai",
"enabled": true,
"isBuiltIn": true
},
{
"name": "deepseek-chat",
"provider": "deepseek",
"enabled": true,
"isBuiltIn": true
},
{
"name": "deepseek-reasoner",
"provider": "deepseek",
"enabled": true,
"isBuiltIn": true,
"capabilities": [
"reasoning"
]
}
],
"activeEmbeddingModels": [
{
"name": "copilot-plus-small",
"provider": "copilot-plus",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true,
"core": true,
"plusExclusive": true
},
{
"name": "copilot-plus-large",
"provider": "copilot-plus-jina",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true,
"core": true,
"plusExclusive": true,
"believerExclusive": true,
"dimensions": 1024
},
{
"name": "copilot-plus-multilingual",
"provider": "copilot-plus-jina",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true,
"core": true,
"plusExclusive": true,
"dimensions": 512
},
{
"name": "text-embedding-3-small",
"provider": "openai",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true,
"core": true
},
{
"name": "text-embedding-3-large",
"provider": "openai",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true
},
{
"name": "embed-multilingual-light-v3.0",
"provider": "cohereai",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true
},
{
"name": "text-embedding-004",
"provider": "google",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true
},
{
"name": "azure-openai",
"provider": "azure openai",
"enabled": true,
"isBuiltIn": true,
"isEmbeddingModel": true
}
],
"embeddingRequestsPerMin": 90,
"embeddingBatchSize": 16,
"disableIndexOnMobile": true,
"showSuggestedPrompts": true,
"showRelevantNotes": true,
"numPartitions": 1,
"promptUsageTimestamps": {},
"promptSortStrategy": "timestamp",
"defaultConversationNoteName": "{$topic}@{$date}_{$time}",
"inlineEditCommands": [],
"projectList": [],
"enableAutocomplete": false,
"autocompleteAcceptKey": "Tab",
"allowAdditionalContext": true,
"enableWordCompletion": false,
"lastDismissedVersion": null,
"passMarkdownImages": true,
"enableCustomPromptTemplating": true,
"suggestedDefaultCommands": true
}
+1738
View File
File diff suppressed because it is too large. Load diff
+13
View File
@@ -0,0 +1,13 @@
{
"id": "copilot",
"name": "Copilot",
"version": "2.9.3",
"minAppVersion": "0.15.0",
"description": "Your AI Copilot: Chat with Your Second Brain, Learn Faster, Work Smarter.",
"author": "Logan Yang",
"authorUrl": "https://twitter.com/logancyang",
"fundingUrl": {
"Buy Me a Coffee": "https://www.buymeacoffee.com/logancyang",
"GitHub Sponsor": "https://github.com/sponsors/logancyang"
}
}
+1
View File
@@ -0,0 +1 @@
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.tw-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.tw-pointer-events-none{pointer-events:none}.tw-fixed{position:fixed}.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-inset-0{inset:0}.tw-inset-x-0{left:0;right:0}.tw-inset-y-0{top:0;bottom:0}.tw-bottom-0{bottom:0}.tw-bottom-2{bottom:var(--size-4-2)}.tw-left-1\/2{left:50%}.tw-left-2{left:var(--size-4-2)}.tw-right-0{right:0}.tw-right-2{right:var(--size-4-2)}.tw-right-3{right:var(--size-4-3)}.tw-right-4{right:var(--size-4-4)}.tw-right-8{right:2rem}.tw-top-1\/2{top:50%}.tw-top-2{top:var(--size-4-2)}.tw-top-4{top:var(--size-4-4)}.tw-z-\[100\]{z-index:100}.tw-z-\[1\]{z-index:1}.tw-z-\[50\]{z-index:50}.tw-z-\[9999\]{z-index:9999}.tw-z-modal{z-index:var(--layer-modal)}.tw-z-popover{z-index:var(--layer-popover)}.tw-z-sidedock{z-index:var(--layer-sidedock)}.tw-col-span-3{grid-column:span 3/span 3}.tw-m-0{margin:0}.-tw-mx-1{margin-left:calc(var(--size-4-1)*-1);margin-right:calc(var(--size-4-1)*-1)}.tw-mx-2{margin-left:var(--size-4-2);margin-right:var(--size-4-2)}.tw-mx-auto{margin-left:auto;margin-right:auto}.tw-my-1{margin-top:var(--size-4-1);margin-bottom:var(--size-4-1)}.tw-my-2{margin-top:var(--size-4-2);margin-bottom:var(--size-4-2)}.tw-mb-1{margin-bottom:var(--size-4-1)}.tw-mb-2{margin-bottom:var(--size-4-2)}.tw-mb-3{margin-bottom:var(--size-4-3)}.tw-mb-4{margin-bottom:var(--size-4-4)}.tw-ml-1{margin-left:var(--size-4-1)}.tw-ml-2{margin-left:var(--size-4-2)}.tw-ml-auto{margin-left:auto}.tw-mr-1{margin-right:var(--size-4-1)}.tw-mr-2{margin-right:var(--size-4-2)}.tw-mt-0{margin-top:0}.tw-mt-0\.5{margin-top:.125rem}.tw-mt-1{margin-top:var(--size-4-1)}.tw-mt-10{margin-top:2.5rem}.tw-mt-2{margin-top:var(--size-4-2)}.tw-mt-4{margin-top:var(--size-4-4)}.tw-mt-auto{margin-top:auto}.tw-box-border{box-sizing:border-box}.tw-line-clamp-2{-webkit-line-clamp:2}.tw-line-clamp-2,.tw-line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.tw-line-clamp-3{-webkit-line-clamp:3}.tw-block{display:block}.tw-inline-block{display:inline-block}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-grid{display:grid}.tw-hidden{display:none}.\!tw-size-3{width:var(--size-4-3)!important;height:var(--size-4-3)!important}.tw-size-12{width:3rem;height:3rem}.tw-size-2{width:var(--size-4-2);height:var(--size-4-2)}.tw-size-2\.5{width:.625rem;height:.625rem}.tw-size-3{width:var(--size-4-3);height:var(--size-4-3)}.tw-size-3\.5{width:.875rem;height:.875rem}.tw-size-4{width:var(--size-4-4);height:var(--size-4-4)}.tw-size-5{width:var(--size-4-5);height:var(--size-4-5)}.tw-size-6{width:var(--size-4-6);height:var(--size-4-6)}.tw-size-7{width:1.75rem;height:1.75rem}.tw-size-8{widthLine truncated
+12
View File
@@ -0,0 +1,12 @@
"use strict";var t=require("obsidian");function e(t,e,i,n){return new(i||(i=Promise))((function(o,s){function r(t){try{a(n.next(t))}catch(t){s(t)}}function l(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,l)}a((n=n.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const i=["Custom","editingToolbar","editingToolbarSub","editingToolbarAdd","editingToolbarDelete","editingToolbarReload","codeblock-glyph","underline-glyph","superscript-glyph","subscript-glyph","bot-glyph","header-1","header-2","header-3","header-4","header-5","header-6","header-n","obsidian","obsidian-new","accessibility","activity","air-vent","airplay","alarm-check","alarm-clock-off","alarm-clock","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center-horizontal","align-center-vertical","align-center","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","anchor","angry","annoyed","aperture","apple","archive-restore","archive","armchair","arrow-big-down","arrow-big-left","arrow-big-right","arrow-big-up","arrow-down-circle","arrow-down-left","arrow-down-right","arrow-down","arrow-left-circle","arrow-left-right","arrow-left","arrow-right-circle","arrow-right","arrow-up-circle","arrow-up-left","arrow-up-right","arrow-up","asterisk","at-sign","award","axe","axis-3d","baby","backpack","baggage-claim","banana","banknote","bar-chart-2","bar-chart-3","bar-chart-4","bar-chart-horizontal","bar-chart","baseline","bath","battery-charging","battery-full","battery-low","battery-medium","battery","beaker","bed-double","bed-single","bed","beer","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bitcoin","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","bomb","bone","book-open","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","boxes","briefcase","brush","bug","building-2","building","bus","cake","calculator","calendar-check-2","calendar-check","calendar-clock","calendar-days","calendar-heart","calendar-minus","calendar-off","calendar-plus","calendar-range","calendar-search","calendar-x2","calendar-x","calendar","camera-off","camera","car","carrot","cast","check-circle-2","check-circle","check-square","check","chef-hat","cherry","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down-up","chevrons-down","chevrons-left-right","chevrons-left","chevrons-right-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","cigarette-off","cigarette","circle-dot","circle-ellipsis","circle-slashed","circle","citrus","clapperboard","clipboard-check","clipboard-copy","clipboard-edit","clipboard-list","clipboard-signature","clipboard-type","clipboard-x","clipboard","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","clock","cloud-cog","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon-rain","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun-rain","cloud-sun","cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","cog","coins","columns","command","compass","component","contact","contrast","cookie","copy","copyleft","copyright","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","cpu","credit-card","croissant","crop","cross","crosshair","crown","cup-soda","curly-braces","currency","database","delete","diamond","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","dices","diff","disc","divide-circle","divide-square","divide","dollar-sign","download-cloud","download","dribbble","droplet","droplets","drumstick","edit-2","edit-3","edit","egg-fried","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","factory","fast-forward","feather","figma","file-archive","file-audio-2","file-audio","file-axis-3d","file-badge-2","file-badge","file-bar-chart-2","file-bar-chart","file-box","file-check-2","file-check","file-clock","file-code","file-cog-2","file-cog","file-diff","file-digit","file-down","file-edit","file-heart","file-image","file-input","file-json-2","file-json","file-key-2","file-key","file-line-chart","file-lock-2","file-locLine truncated
/**!
* Sortable 1.15.6
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/(n.cMenuFontColor,n.cMenuBackgroundColor)))}()}function gl(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function fl(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?gl(Object(i),!0).forEach((function(e){vl(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):gl(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function bl(t){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(t)}function vl(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function yl(){return yl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yl.apply(this,arguments)}function wl(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function Cl(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var xl=Cl(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),kl=Cl(/Edge/i),Sl=Cl(/firefox/i),Tl=Cl(/safari/i)&&!Cl(/chrome/i)&&!Cl(/android/i),El=Cl(/iP(ad|od|hone)/i),Ml=Cl(/chrome/i)&&Cl(/android/i),Al={capture:!1,passive:!1};function Dl(t,e,i){t.addEventListener(e,i,!xl&&Al)}function Il(t,e,i){t.removeEventListener(e,i,!xl&&Al)}function Ol(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Bl(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ql(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&Ol(t,e):Ol(t,e))||n&&t===i)return t;if(t===i)break}while(t=Bl(t))}return null}var Nl,Ll=/\s+/g;function Rl(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(Ll," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(Ll," ")}}function Pl(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function _l(t,e){var i="";if("string"==typeof t)i=t;else do{var n=Pl(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function Fl(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o<s;o++)i(n[o],o);return n}return[]}function Vl(){var t=document.scrollingElement;return t||document.documentElement}function Hl(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var s,r,l,a,c,h,d;if(t!==window&&t.parentNode&&t!==Vl()?(r=(s=t.getBoundingClientRect()).top,l=s.left,a=s.bottom,c=s.right,h=s.height,d=s.width):(r=0,l=0,a=window.innerHeight,c=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!xl))do{if(o&&o.getBoundingClientRect&&("none"!==Pl(o,"transform")||i&&"static"!==Pl(o,"position"))){var u=o.getBoundingClientRect();r-=u.top+parseInt(Pl(o,"border-top-width")),l-=u.left+parseInt(Pl(o,"border-left-width")),a=r+s.height,c=l+s.width;break}}while(o=o.parentNode);if(n&&t!==window){var p=_l(o||t),m=p&&p.a,g=p&&p.d;p&&(a=(r/=g)+(h/=g),c=(l/=m)+(d/=m))}return{top:r,left:l,bottom:a,right:c,width:d,height:h}}}function zl(t,e,i){for(var n=Yl(t,!0),o=Hl(t)[e];n;){var s=Hl(n)[i];if(!("top"===i||"left"===i?o>=s:o<=s))return n;if(n===Vl())break;n=Yl(n,!1)}return!1}function $l(t,e,i,n){for(var o=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==Xa.ghost&&(n||r[s]!==Xa.dragged)&&ql(r[s],i.draggable,t,!1)){if(o===e)return r[s];o++}s++}return null}function Wl(t,e){for(var i=t.lastElementChild;i&&(i===Xa.ghost||"none"===Pl(i,"display")||e&&!Ol(i,e));)i=i.previousElementSibling;return i||null}function Ul(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Xa.clone||e&&!Ol(t,e)||i++;return i}function jl(t){var e=0,i=0,n=Vl();if(t)do{var o=_l(t),s=o.a,r=o.d;e+=t.scrollLeft*s,i+=t.scrollTop*r}while(t!==n&&(t=Line truncated
/*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr */
var Cc=function(t){var e={exports:{}};return t(e,e.exports),e.exports}((function(t,e){self,t.exports=(()=>{var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{default:()=>O});var i={};function n(t,e,i,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);for(const s of e)for(const e of i)s[t](e,n,{capture:!1,...o});return Array.prototype.slice.call(arguments,1)}t.r(i),t.d(i,{adjustableInputNumbers:()=>h,createElementFromString:()=>r,createFromTemplate:()=>l,eventPath:()=>a,off:()=>s,on:()=>o,resolveElement:()=>c});const o=n.bind(null,"addEventListener"),s=n.bind(null,"removeEventListener");function r(t){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function l(t){const e=(t,e)=>{const i=t.getAttribute(e);return t.removeAttribute(e),i},i=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e(t,":obj"),s=e(t,":ref"),r=o?n[o]={}:n;s&&(n[s]=t);for(const n of Array.from(t.children)){const t=e(n,":arr"),o=i(n,t?{}:r);t&&(r[t]||(r[t]=[])).push(Object.keys(o).length?o:n)}return n};return i(r(t))}function a(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let i=t.target.parentElement;for(e=[t.target,i];i=i.parentElement;)e.push(i);return e.push(document,window),e}function c(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce(((t,e,i,n)=>(t=t.querySelector(e),i<n.length-1?t.shadowRoot:t)),document):null}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t=>t;function i(i){const n=[.001,.01,.1][Number(i.shiftKey||2*i.ctrlKey)]*(i.deltaY<0?1:-1);let o=0,s=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,((t,i)=>i<=s&&i+t.length>=s?(s=i,e(Number(t),n,o)):(o++,t))),t.focus(),t.setSelectionRange(s,s),i.preventDefault(),t.dispatchEvent(new Event("input"))}o(t,"focus",(()=>o(window,"wheel",i,{passive:!1}))),o(t,"blur",(()=>s(window,"wheel",i)))}const{min:d,max:u,floor:p,round:m}=Math;function g(t,e,i){e/=100,i/=100;const n=p(t=t/360*6),o=t-n,s=i*(1-e),r=i*(1-o*e),l=i*(1-(1-o)*e),a=n%6;return[255*[i,r,s,s,l,i][a],255*[l,i,i,r,s,s][a],255*[s,s,l,i,i,r][a]]}function f(t,e,i){return g(t,e,i).map((t=>m(t).toString(16).padStart(2,"0")))}function b(t,e,i){const n=g(t,e,i),o=n[0]/255,s=n[1]/255,r=n[2]/255,l=d(1-o,1-s,1-r);return[100*(1===l?0:(1-o-l)/(1-l)),100*(1===l?0:(1-s-l)/(1-l)),100*(1===l?0:(1-r-l)/(1-l)),100*l]}function v(t,e,i){const n=(2-(e/=100))*(i/=100)/2;return 0!==n&&(e=1===n?0:n<.5?e*i/(2*n):e*i/(2-2*n)),[t,100*e,100*n]}function y(t,e,i){const n=d(t/=255,e/=255,i/=255),o=u(t,e,i),s=o-n;let r,l;if(0===s)r=l=0;else{l=s/o;const n=((o-t)/6+s/2)/s,a=((o-e)/6+s/2)/s,c=((o-i)/6+s/2)/s;t===o?r=c-a:e===o?r=1/3+n-c:i===o&&(r=2/3+a-n),r<0?r+=1:r>1&&(r-=1)}return[360*r,100*l,100*o]}function w(t,e,i,n){return e/=100,i/=100,[...y(255*(1-d(1,(t/=100)*(1-(n/=100))+n)),255*(1-d(1,e*(1-n)+n)),255*(1-d(1,i*(1-n)+n)))]}function C(t,e,i){e/=100;const n=2*(e*=(i/=100)<.5?i:1-i)/(i+e)*100,o=100*(i+e);return[t,isNaN(n)?0:n,o]}function x(t){return y(...t.match(/.{2}/g).map((t=>parseInt(t,16))))}function k(t){t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";const e=document.createElement("canvas").getContext("2d");return e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle}(t):t;const e={cmyk:/^cmyk[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)/i,rgba:/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsla:/^((hsla)|hsl)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsva:/^((hsva)|hsv)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},i=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));let n;t:for(const o in e){if(!(n=e[o].exec(t)))continue;const s=t=>!!n[2]==("number"==typeof t);switch(o){case"cmyk":{const[,t,e,s,r]=i(n);if(t>100||e>100||s>100||r>100)break t;return{values:w(t,e,s,r),type:o}}case"rgba":{const[,,,t,e,r,l]=i(n);if(t>255||e>255||r>255||l<0||l>1||!s(l))break t;return{values:[...y(t,e,r),l],a:l,type:o}}case"hexa":{let[,t]=n;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let i=t.substring(6);return i=i?parseInt(i,16)/255:void 0,{values:[...x(e),i],a:i,type:o}}case"hsla":{const[,,,t,e,r,l]=i(n);if(t>360||e>100||r>100||l<0||l>1||!s(l))break t;return{values:[...C(t,e,r),l],a:l,type:o}}case"hsva":{const[,,,t,e,r,l]=i(n);if(t>360||e>100||r>100||l<0||l>1||!s(l))break t;return{values:[t,e,r,l],a:l,type:o}}}}return{values:null,type:null}}function S(){const t=(t,e)=>function(){let i=arguments.length>0&&void 0!==Line truncated
/* nosourcemap */
+10
View File
@@ -0,0 +1,10 @@
{
"id": "editing-toolbar",
"name": "Editing Toolbar",
"version": "3.1.16",
"minAppVersion": "0.14.0",
"description": "The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.",
"author": "Cuman",
"authorUrl": "https://github.com/cumany/obsidian-editing-toolbar",
"isDesktopOnly": false
}
File diff suppressed because it is too large. Load diff
+175
View File
@@ -0,0 +1,175 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var xz=Object.create;var Gv=Object.defineProperty;var Sz=Object.getOwnPropertyDescriptor;var Ez=Object.getOwnPropertyNames;var Fz=Object.getPrototypeOf,Uz=Object.prototype.hasOwnProperty;var tf=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bE=(e,t)=>{for(var r in t)Gv(e,r,{get:t[r],enumerable:!0})},CE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ez(t))!Uz.call(e,i)&&i!==r&&Gv(e,i,{get:()=>t[i],enumerable:!(n=Sz(t,i))||n.enumerable});return e};var yr=(e,t,r)=>(r=e!=null?xz(Fz(e)):{},CE(t||!e||!e.__esModule?Gv(r,"default",{value:e,enumerable:!0}):r,e)),_z=e=>CE(Gv({},"__esModule",{value:!0}),e);var x3=Ce(Hr=>{"use strict";var VB=Symbol.for("react.transitional.element"),w9=Symbol.for("react.portal"),y9=Symbol.for("react.fragment"),B9=Symbol.for("react.strict_mode"),b9=Symbol.for("react.profiler"),C9=Symbol.for("react.consumer"),x9=Symbol.for("react.context"),S9=Symbol.for("react.forward_ref"),E9=Symbol.for("react.suspense"),F9=Symbol.for("react.memo"),v3=Symbol.for("react.lazy"),h3=Symbol.iterator;function U9(e){return e===null||typeof e!="object"?null:(e=h3&&e[h3]||e["@@iterator"],typeof e=="function"?e:null)}var w3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y3=Object.assign,B3={};function zd(e,t,r){this.props=e,this.context=t,this.refs=B3,this.updater=r||w3}zd.prototype.isReactComponent={};zd.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};zd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function b3(){}b3.prototype=zd.prototype;function GB(e,t,r){this.props=e,this.context=t,this.refs=B3,this.updater=r||w3}var WB=GB.prototype=new b3;WB.constructor=GB;y3(WB,zd.prototype);WB.isPureReactComponent=!0;var d3=Array.isArray,Ei={H:null,A:null,T:null,S:null},C3=Object.prototype.hasOwnProperty;function YB(e,t,r,n,i,A){return r=A.ref,{$$typeof:VB,type:e,key:t,ref:r!==void 0?r:null,props:A}}function _9(e,t){return YB(e.type,t,void 0,void 0,void 0,e.props)}function XB(e){return typeof e=="object"&&e!==null&&e.$$typeof===VB}function Q9(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var p3=/\/+/g;function KB(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q9(""+e.key):t.toString(36)}function g3(){}function T9(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(g3,g3):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Pd(e,t,r,n,i){var A=typeof e;(A==="undefined"||A==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(A){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case VB:case w9:a=!0;break;case v3:return a=e._init,Pd(a(e._payload),t,r,n,i)}}if(a)return i=i(e),a=n===""?"."+KB(e,0):n,d3(i)?(r="",a!=null&&(r=a.replace(p3,"$&/")+"/"),Pd(i,t,r,"",function(c){return c})):i!=null&&(XB(i)&&(i=_9(i,r+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(p3,"$&/")+"/")+a)),t.push(i)),1;a=0;var s=n===""?".":n+":";if(d3(e))for(var l=0;l<e.length;l++)n=e[l],A=s+KB(n,l),a+=Pd(n,t,r,A,i);else if(l=U9(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,A=s+KB(n,l++),a+=Pd(n,t,r,A,i);else if(A==="object"){if(typeof e.then=="function")return Pd(T9(e),t,r,n,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function Zv(e,t,r){if(e==null)return e;var n=[],i=0;return Pd(e,n,"","",function(A){return t.call(r,A,i++)}),n}function L9(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var m3=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function k9(){}Hr.Children={map:Zv,forEach:function(e,t,r){Zv(e,function(){t.apply(this,arguments)},r)},count:fuLine truncated
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ib+e+j3}var Ab=!1;function ab(e,t){if(!e||Ab)return"";Ab=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(f){var v=f}Reflect.construct(e,[],g)}else{try{g.call()}catch(f){v=f}e.call(g.prototype)}}else{try{throw Error()}catch(f){v=f}(g=e())&&typeof g.catch=="function"&&g.catch(function(){})}}catch(f){if(f&&v&&typeof f.stack=="string")return[f.stack,v.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=n.DetermineComponentFrameRoot(),a=A[0],s=A[1];if(a&&s){var l=a.split(`
`),c=s.split(`
`);for(i=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(n===l.length||i===c.length)for(n=l.length-1,i=c.length-1;1<=n&&0<=i&&l[n]!==c[i];)i--;for(;1<=n&&0<=i;n--,i--)if(l[n]!==c[i]){if(n!==1||i!==1)do if(n--,i--,0>i||l[n]!==c[i]){var d=`
`+l[n].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=n&&0<=i);break}}}finally{Ab=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?w0(r):""}function q9(e){switch(e.tag){case 26:case 27:case 5:return w0(e.type);case 16:return w0("Lazy");case 13:return w0("Suspense");case 19:return w0("SuspenseList");case 0:case 15:return e=ab(e.type,!1),e;case 11:return e=ab(e.type.render,!1),e;case 1:return e=ab(e.type,!0),e;default:return""}}function K3(e){try{var t="";do t+=q9(e),e=e.return;while(e);return t}catch(r){return`
Error generating stack: `+r.message+`
`+r.stack}}function Cp(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function fU(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function V3(e){if(Cp(e)!==e)throw Error(pt(188))}function j9(e){var t=e.alternate;if(!t){if(t=Cp(e),t===null)throw Error(pt(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var A=i.alternate;if(A===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===A.child){for(A=i.child;A;){if(A===r)return V3(i),e;if(A===n)return V3(i),t;A=A.sibling}throw Error(pt(188))}if(r.return!==n.return)r=i,n=A;else{for(var a=!1,s=i.child;s;){if(s===r){a=!0,r=i,n=A;break}if(s===n){a=!0,n=i,r=A;break}s=s.sibling}if(!a){for(s=A.child;s;){if(s===r){a=!0,r=A,n=i;break}if(s===n){a=!0,n=A,r=i;break}s=s.sibling}if(!a)throw Error(pt(189))}}if(r.alternate!==n)throw Error(pt(190))}if(r.tag!==3)throw Error(pt(188));return r.stateNode.current===r?e:t}function hU(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=hU(e),t!==null)return t;e=e.sibling}return null}var y0=Array.isArray,ci=H9.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_h={pending:!1,data:null,method:null,action:null},Mb=[],Xd=-1;function du(e){return{current:e}}function XA(e){0>Xd||(e.current=Mb[Xd],Mb[Xd]=null,Xd--)}function gi(e,t){Xd++,Mb[Xd]=e.current,e.current=t}var uu=du(null),H0=du(null),mf=du(null),N1=du(null);function O1(e,t){switch(gi(mf,t),gi(H0,e),gi(uu,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?WF(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=WF(e),t=SQ(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}XA(uu),gi(uu,t)}function dp(){XA(uu),XA(H0),XA(mf)}function Rb(e){e.memoizedState!==null&&gi(N1,e);var t=uu.current,r=SQ(t,e.type);t!==r&&(gi(H0,e),gi(uu,r))}function I1(e){H0.current===e&&(XA(uu),XA(H0)),N1.current===e&&(XA(N1),Y0._currentValue=_h)}var Pb=Object.prototype.hasOwnProperty,Q5=OA.unstable_scheduleCallback,sb=OA.unstable_cancelCallback,K9=OA.unstable_shouldYield,V9=OA.unstable_requestPaint,cu=OA.unstable_now,G9=OA.unstable_getCurrentPriorityLevel,dU=OA.unstable_ImmediatePriority,pU=OA.unstable_UserBlockingPriority,D1=OA.unstable_NormalPriority,W9=OA.unstable_LowPriority,gU=OA.unstable_IdlePriority,Y9=OA.log,X9=OA.unstable_setDisableYieldValue,$0=null,eo=null;function Z9(e){if(eo&&typeof eo.onCommitFiberRoot=="function")try{eo.onCommitFiberRoot($0,e,void 0,(e.current.flags&128)===128)}catch{}}function pf(e){if(typeof Y9=="function"&&X9(e),eo&&typeof eo.setStrictMode=="function")try{eo.setStrictMode($0,e)}catch{}}var to=Math.clz32?Math.clz32:eq,J9=Math.log,$9=Math.LN2;function eq(e){return e>>>=0,e===0?32:31-(J9(e)/$9|0)|0}var A1=128,a1=4194304;function xh(e){var t=e&42;if(t!==0)return t;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:return 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 e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function o2(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,A=e.pingedLanes,a=e.warmLanes;e=e.finishedLanes!==0;var s=r&134217727;return s!==0?(r=s&~i,r!==0?n=xh(r):(A&=s,A!==0?n=xh(A):e||(a=s&~a,a!==0&&(n=xh(a))))):(s=r&~i,s!==0?n=xh(s):A!==0?n=xh(A):e||(a=r&~a,a!==0&&(n=xh(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194176)!==0)?t:n}function em(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tq(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mU(){var e=A1;return A1<<=1,(A1&4194176)===0&&(A1=128),e}function vU(){var e=a1;return a1<<=1,(a1&62914560)===0&&(a1=4194304),e}function ob(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function tm(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rq(e,t,r,n,i,A){var a=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates Line truncated
`).replace(Nj,"")}function xQ(e,t){return t=GF(t),GF(e)===t}function y2(){}function Dn(e,t,r,n,i,A){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||gp(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&gp(e,""+n);break;case"className":s1(e,"class",n);break;case"tabIndex":s1(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":s1(e,r,n);break;case"style":QU(e,n,A);break;case"data":if(t!=="object"){s1(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=C1(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof A=="function"&&(r==="formAction"?(t!=="input"&&Dn(e,t,"name",i.name,i,null),Dn(e,t,"formEncType",i.formEncType,i,null),Dn(e,t,"formMethod",i.formMethod,i,null),Dn(e,t,"formTarget",i.formTarget,i,null)):(Dn(e,t,"encType",i.encType,i,null),Dn(e,t,"method",i.method,i,null),Dn(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=C1(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=y2);break;case"onScroll":n!=null&&an("scroll",e);break;case"onScrollEnd":n!=null&&an("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(pt(61));if(r=n.__html,r!=null){if(i.children!=null)throw Error(pt(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=C1(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":an("beforetoggle",e),an("toggle",e),b1(e,"popover",n);break;case"xlinkActuate":lc(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":lc(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":lc(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":lc(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":lc(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":lc(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":lc(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":lc(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":lc(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":b1(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=cq.get(r)||r,b1(e,r,n))}}function y5(e,t,r,n,i,A){switch(r){case"style":QU(e,n,A);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(pt(61));if(r=n.__html,r!=null){if(i.children!=null)throw Error(pt(60));e.innerHTML=r}}break;case"children":typeof n=="string"?gp(e,n):(typeof n=="number"||typeof n=="bigint")&&gp(e,""+n);break;case"onScroll":n!=null&&an("scroll",e);break;case"onScrollEnd":n!=null&&an("scrollend",e);break;case"onClick":n!=null&&(e.onclick=y2);break;case"suppressContentEditableWarning":case"suppressHydratio Line truncated
content: "" !important;
display: none !important;
}`,Xy=function(m){Fv(m,"."+Wg+xv+Ev+`
.`+Yg+Sv+Ev)},Fv=function(m,p){var y=m.ownerDocument;if(y){var w=y.createElement("style");w.textContent=p,m.appendChild(w)}},Xg=function(){function m(){}return m.getOrigin=function(p){var y=m._link;return y?(y.href=p,y.href=y.href,y.protocol+y.hostname+y.port):"about:blank"},m.isSameOrigin=function(p){return m.getOrigin(p)===m._origin},m.setContext=function(p){m._link=p.document.createElement("a"),m._origin=m.getOrigin(p.location.href)},m._origin="about:blank",m}(),Zy=function(){function m(p,y){this.context=p,this._options=y,this._cache={}}return m.prototype.addImage=function(p){var y=Promise.resolve();return this.has(p)||(Zc(p)||Jg(p))&&(this._cache[p]=this.loadImage(p)).catch(function(){}),y},m.prototype.match=function(p){return this._cache[p]},m.prototype.loadImage=function(p){return n(this,void 0,void 0,function(){var y,w,L,H,$=this;return i(this,function(ue){switch(ue.label){case 0:return y=Xg.isSameOrigin(p),w=!Ud(p)&&this._options.useCORS===!0&&hn.SUPPORT_CORS_IMAGES&&!y,L=!Ud(p)&&!y&&!Zc(p)&&typeof this._options.proxy=="string"&&hn.SUPPORT_CORS_XHR&&!w,!y&&this._options.allowTaint===!1&&!Ud(p)&&!Zc(p)&&!L&&!w?[2]:(H=p,L?[4,this.proxy(H)]:[3,2]);case 1:H=ue.sent(),ue.label=2;case 2:return this.context.logger.debug("Added image "+p.substring(0,256)),[4,new Promise(function(le,De){var qe=new Image;qe.onload=function(){return le(qe)},qe.onerror=De,(_v(H)||w)&&(qe.crossOrigin="anonymous"),qe.src=H,qe.complete===!0&&setTimeout(function(){return le(qe)},500),$._options.imageTimeout>0&&setTimeout(function(){return De("Timed out ("+$._options.imageTimeout+"ms) loading image")},$._options.imageTimeout)})];case 3:return[2,ue.sent()]}})})},m.prototype.has=function(p){return typeof this._cache[p]<"u"},m.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},m.prototype.proxy=function(p){var y=this,w=this._options.proxy;if(!w)throw new Error("No proxy defined");var L=p.substring(0,256);return new Promise(function(H,$){var ue=hn.SUPPORT_RESPONSE_TYPE?"blob":"text",le=new XMLHttpRequest;le.onload=function(){if(le.status===200)if(ue==="text")H(le.response);else{var Ge=new FileReader;Ge.addEventListener("load",function(){return H(Ge.result)},!1),Ge.addEventListener("error",function(at){return $(at)},!1),Ge.readAsDataURL(le.response)}else $("Failed to proxy resource "+L+" with status code "+le.status)},le.onerror=$;var De=w.indexOf("?")>-1?"&":"?";if(le.open("GET",""+w+De+"url="+encodeURIComponent(p)+"&responseType="+ue),ue!=="text"&&le instanceof XMLHttpRequest&&(le.responseType=ue),y._options.imageTimeout){var qe=y._options.imageTimeout;le.timeout=qe,le.ontimeout=function(){return $("Timed out ("+qe+"ms) proxying "+L)}}le.send()})},m}(),Zg=/^data:image\/svg\+xml/i,Uv=/^data:image\/.*;base64,/i,vh=/^data:image\/.*/i,Jg=function(m){return hn.SUPPORT_SVG_DRAWING||!Qv(m)},Ud=function(m){return vh.test(m)},_v=function(m){return Uv.test(m)},Zc=function(m){return m.substr(0,4)==="blob"},Qv=function(m){return m.substr(-3).toLowerCase()==="svg"||Zg.test(m)},Qt=function(){function m(p,y){this.type=0,this.x=p,this.y=y}return m.prototype.add=function(p,y){return new m(this.x+p,this.y+y)},m}(),ys=function(m,p,y){return new Qt(m.x+(p.x-m.x)*y,m.y+(p.y-m.y)*y)},_d=function(){function m(p,y,w,L){this.type=1,this.start=p,this.startControl=y,this.endControl=w,this.end=L}return m.prototype.subdivide=function(p,y){var w=ys(this.start,this.startControl,p),L=ys(this.startControl,this.endControl,p),H=ys(this.endControl,this.end,p),$=ys(w,L,p),ue=ys(L,H,p),le=ys($,ue,p);return y?new m(this.start,w,$,le):new m(le,ue,H,this.end)},m.prototype.add=function(p,y){return new m(this.start.add(p,y),this.startControl.add(p,y),this.endControl.add(p,y),this.end.add(p,y))},m.prototype.reverse=function(){return new m(this.end,this.endControl,this.startControl,this.start)},m}(),$a=function(m){return m.type===1},Jy=function(){function m(p){var y=p.styles,w=p.bounds,L=Is(y.borderTopLeftRadius,w.width,w.height),H=L[0],$=L[1],ue=Is(y.borderTopRightRadius,w.width,w.height),le=ue[0],De=ue[1],qe=Is(y.borderBottomRightRadius,w.width,w.height),Ge=qe[0],at=qe[1],Ot=Is(y.borderBottomLeftRadius,w.width,w.height),St=Ot[0],Nt=Ot[1],Sr=[];Sr.push((H+le)/w.width),Sr.push((St+Ge)/w.width),Sr.push(($+Nt)/w.height),Sr.push((De+at)/w.height);var Kt=Math.max.apply(Math,Sr);Kt>1&&(H/=Kt,$/=Kt,le/=Kt,De/=Kt,Ge/=Kt,at/=Kt,St/=Kt,Nt/=Kt);var qt=w.width-le,ln=w.height-at,_r=w.width-Ge,fr=w.height-Nt,Ht=y.borderTopWidth,Zr=y.borderRightWidth,Jr=y.borderBottomWidth,pr=y.borderLeftWidth,Hi=Nr(y.paddingTop,p.bounds.width),Ea=Nr(y.paddingRight,p.bounds.width),es=Nr(y.paddingBottom,p.bounds.width),Un=Nr(y.paddingLeft,p.bounds.width);this.topLeftBorderDoubleOuterBox=H>0||$>0?Jn(w.left+pr/3,w.top+Ht/3,H-pr/3,$-Ht/3,mn.TOP_LEFT):new Qt(w.left+pr/3,w.top+Ht/3),this.topRightBorderDoubleOuterBox=H>0||$>0?Jn(w.left+qt,w.top+Ht/3,le-Zr/3,De-Ht/3,mn.TOP_RIGHT):new Qt(w.left+w.width-Zr/3,w.top+Ht/3),this.bottomRightBorderDoubleOuterBox=Ge>0||at>0?Jn(w.left+_r,w.top Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var d=Object.hasOwnProperty,g=Object.setPrototypeOf,v=Object.isFrozen,f=Object.getPrototypeOf,S=Object.getOwnPropertyDescriptor,C=Object.freeze,Q=Object.seal,x=Object.create,F=typeof Reflect<"u"&&Reflect,T=F.apply,R=F.construct;T||(T=function(At,Bt,ct){return At.apply(Bt,ct)}),C||(C=function(At){return At}),Q||(Q=function(At){return At}),R||(R=function(At,Bt){return n(At,i(Bt))});var Y=Fe(Array.prototype.forEach),ae=Fe(Array.prototype.pop),P=Fe(Array.prototype.push),W=Fe(String.prototype.toLowerCase),he=Fe(String.prototype.toString),V=Fe(String.prototype.match),M=Fe(String.prototype.replace),_=Fe(String.prototype.indexOf),ie=Fe(String.prototype.trim),oe=Fe(RegExp.prototype.test),ge=Be(TypeError);function Fe(Je){return function(At){for(var Bt=arguments.length,ct=new Array(Bt>1?Bt-1:0),Ct=1;Ct<Bt;Ct++)ct[Ct-1]=arguments[Ct];return T(Je,At,ct)}}function Be(Je){return function(){for(var At=arguments.length,Bt=new Array(At),ct=0;ct<At;ct++)Bt[ct]=arguments[ct];return R(Je,Bt)}}function de(Je,At,Bt){var ct;Bt=(ct=Bt)!==null&&ct!==void 0?ct:W,g&&g(Je,null);for(var Ct=At.length;Ct--;){var xe=At[Ct];if(typeof xe=="string"){var Ut=Bt(xe);Ut!==xe&&(v(At)||(At[Ct]=Ut),xe=Ut)}Je[xe]=!0}return Je}function X(Je){var At=x(null),Bt;for(Bt in Je)T(d,Je,[Bt])===!0&&(At[Bt]=Je[Bt]);return At}function Z(Je,At){for(;Je!==null;){var Bt=S(Je,At);if(Bt){if(Bt.get)return Fe(Bt.get);if(typeof Bt.value=="function")return Fe(Bt.value)}Je=f(Je)}function ct(Ct){return console.warn("fallback value for",Ct),null}return ct}var ke=C(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=C(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),K=C(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ne=C(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ce=C(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),pe=C(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Se=C(["#text"]),ye=C(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate"," Line truncated
`+Bn),ha&&(Bn=M(Bn,wi," "),Bn=M(Bn,Ra," "),Bn=M(Bn,DA," ")),Vn&&MA?Vn.createHTML(Bn):Bn},At.setConfig=function(zt){Jo(zt),qa=!0},At.clearConfig=function(){CA=null,qa=!1},At.isValidAttribute=function(zt,Le,gt){CA||Jo({});var xt=Mr(zt),er=Mr(Le);return ho(xt,er,gt)},At.addHook=function(zt,Le){typeof Le=="function"&&(br[zt]=br[zt]||[],P(br[zt],Le))},At.removeHook=function(zt){if(br[zt])return ae(br[zt])},At.removeHooks=function(zt){br[zt]&&(br[zt]=[])},At.removeAllHooks=function(){br={}},At}var Et=ot();return Et})});var _i=Ce((OC,rT)=>{"use strict";var dm=function(e){return e&&e.Math===Math&&e};rT.exports=dm(typeof globalThis=="object"&&globalThis)||dm(typeof window=="object"&&window)||dm(typeof self=="object"&&self)||dm(typeof global=="object"&&global)||dm(typeof OC=="object"&&OC)||function(){return this}()||Function("return this")()});var zi=Ce((wue,nT)=>{"use strict";nT.exports=function(e){try{return!!e()}catch{return!0}}});var zo=Ce((yue,iT)=>{"use strict";var xK=zi();iT.exports=!xK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var pm=Ce((Bue,AT)=>{"use strict";var SK=zi();AT.exports=!SK(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var ZA=Ce((bue,aT)=>{"use strict";var EK=pm(),F2=Function.prototype.call;aT.exports=EK?F2.bind(F2):function(){return F2.apply(F2,arguments)}});var uT=Ce(lT=>{"use strict";var sT={}.propertyIsEnumerable,oT=Object.getOwnPropertyDescriptor,FK=oT&&!sT.call({1:2},1);lT.f=FK?function(t){var r=oT(this,t);return!!r&&r.enumerable}:sT});var U2=Ce((xue,cT)=>{"use strict";cT.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var qi=Ce((Sue,dT)=>{"use strict";var fT=pm(),hT=Function.prototype,IC=hT.call,UK=fT&&hT.bind.bind(IC,IC);dT.exports=fT?UK:function(e){return function(){return IC.apply(e,arguments)}}});var Lf=Ce((Eue,gT)=>{"use strict";var pT=qi(),_K=pT({}.toString),QK=pT("".slice);gT.exports=function(e){return QK(_K(e),8,-1)}});var HC=Ce((Fue,mT)=>{"use strict";var TK=qi(),LK=zi(),kK=Lf(),DC=Object,NK=TK("".split);mT.exports=LK(function(){return!DC("z").propertyIsEnumerable(0)})?function(e){return kK(e)==="String"?NK(e,""):DC(e)}:DC});var kf=Ce((Uue,vT)=>{"use strict";vT.exports=function(e){return e==null}});var qo=Ce((_ue,wT)=>{"use strict";var OK=kf(),IK=TypeError;wT.exports=function(e){if(OK(e))throw new IK("Can't call method on "+e);return e}});var Qp=Ce((Que,yT)=>{"use strict";var DK=HC(),HK=qo();yT.exports=function(e){return DK(HK(e))}});var ji=Ce((Tue,BT)=>{"use strict";var MC=typeof document=="object"&&document.all;BT.exports=typeof MC>"u"&&MC!==void 0?function(e){return typeof e=="function"||e===MC}:function(e){return typeof e=="function"}});var jo=Ce((Lue,bT)=>{"use strict";var MK=ji();bT.exports=function(e){return typeof e=="object"?e!==null:MK(e)}});var Nf=Ce((kue,CT)=>{"use strict";var RC=_i(),RK=ji(),PK=function(e){return RK(e)?e:void 0};CT.exports=function(e,t){return arguments.length<2?PK(RC[e]):RC[e]&&RC[e][t]}});var gm=Ce((Nue,xT)=>{"use strict";var zK=qi();xT.exports=zK({}.isPrototypeOf)});var Tp=Ce((Oue,FT)=>{"use strict";var qK=_i(),ST=qK.navigator,ET=ST&&ST.userAgent;FT.exports=ET?String(ET):""});var Q2=Ce((Iue,kT)=>{"use strict";var LT=_i(),PC=Tp(),UT=LT.process,_T=LT.Deno,QT=UT&&UT.versions||_T&&_T.version,TT=QT&&QT.v8,_l,_2;TT&&(_l=TT.split("."),_2=_l[0]>0&&_l[0]<4?1:+(_l[0]+_l[1]));!_2&&PC&&(_l=PC.match(/Edge\/(\d+)/),(!_l||_l[1]>=74)&&(_l=PC.match(/Chrome\/(\d+)/),_l&&(_2=+_l[1])));kT.exports=_2});var zC=Ce((Due,OT)=>{"use strict";var NT=Q2(),jK=zi(),KK=_i(),VK=KK.String;OT.exports=!!Object.getOwnPropertySymbols&&!jK(function(){var e=Symbol("symbol detection");return!VK(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&NT&&NT<41})});var qC=Ce((Hue,IT)=>{"use strict";var GK=zC();IT.exports=GK&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var jC=Ce((Mue,DT)=>{"use strict";var WK=Nf(),YK=ji(),XK=gm(),ZK=qC(),JK=Object;DT.exports=ZK?function(e){return typeof e=="symbol"}:function(e){var t=WK("Symbol");return YK(t)&&XK(t.prototype,JK(e))}});var mm=Ce((Rue,HT)=>{"use strict";var $K=String;HT.exports=function(e){try{return $K(e)}catch{return"Object"}}});var mu=Ce((Pue,MT)=>{"use strict";var eV=ji(),tV=mm(),rV=TypeError;MT.exports=function(e){if(eV(e))return e;throw new rV(tV(e)+" is not a function")}});var Vh=Ce((zue,RT)=>{"use strict";var nV=mu(),iV=kf();RT.exports=function(e,t){var r=e[t];return iV(r)?void 0:nV(r)}});var zT=Ce((que,PT)=>{"use strict";var KC=ZA(),VC=ji(),GC=jo(),AV=TypeError;PT.exports=function(e,t){var r,n;if(t==="string"&&VC(r=e.toString)&&!GC(n=KC(r,e))||VC(r=e.valueOf)&&!GC(n=KC(r,e))||t!=="string"&&VC(r=e.toString)&&!GC(n=KC(r,e)))return n;throw new AV("Can't convert object to primitive value")}});var Ql=Ce((jue,qT)=>{"use strict";qT.exports=!1});var T2=Ce((Kue,KT)=>{"use strict";var jT=_i(),aV=Object.defineProperty;KT.exports=function(e,t){try{aV(jT,e,{value:t,configurable:!0,writable:!0})}catch{jT[e]=t Line truncated
`)&&e.flags==="s")})});var jN=Ce((Mfe,qN)=>{"use strict";var iJ=zi(),AJ=_i(),aJ=AJ.RegExp;qN.exports=iJ(function(){var e=aJ("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"})});var lw=Ce((Rfe,VN)=>{"use strict";var jp=ZA(),ow=qi(),sJ=Ll(),oJ=t4(),lJ=A4(),uJ=k2(),cJ=Im(),fJ=Cm().get,hJ=zN(),dJ=jN(),pJ=uJ("native-string-replace",String.prototype.replace),sw=RegExp.prototype.exec,u4=sw,gJ=ow("".charAt),mJ=ow("".indexOf),vJ=ow("".replace),l4=ow("".slice),c4=function(){var e=/a/,t=/b*/g;return jp(sw,e,"a"),jp(sw,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),KN=lJ.BROKEN_CARET,f4=/()??/.exec("")[1]!==void 0,wJ=c4||f4||KN||hJ||dJ;wJ&&(u4=function(t){var r=this,n=fJ(r),i=sJ(t),A=n.raw,a,s,l,c,d,g,v;if(A)return A.lastIndex=r.lastIndex,a=jp(u4,A,i),r.lastIndex=A.lastIndex,a;var f=n.groups,S=KN&&r.sticky,C=jp(oJ,r),Q=r.source,x=0,F=i;if(S&&(C=vJ(C,"y",""),mJ(C,"g")===-1&&(C+="g"),F=l4(i,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&gJ(i,r.lastIndex-1)!==`
`)&&(Q="(?: "+Q+")",F=" "+F,x++),s=new RegExp("^(?:"+Q+")",C)),f4&&(s=new RegExp("^"+Q+"$(?!\\s)",C)),c4&&(l=r.lastIndex),c=jp(sw,S?s:r,F),S?c?(c.input=l4(c.input,x),c[0]=l4(c[0],x),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:c4&&c&&(r.lastIndex=r.global?c.index+c[0].length:l),f4&&c&&c.length>1&&jp(pJ,c[0],s,function(){for(d=1;d<arguments.length-2;d++)arguments[d]===void 0&&(c[d]=void 0)}),c&&f)for(c.groups=g=cJ(null),d=0;d<f.length;d++)v=f[d],g[v[0]]=c[v[1]];return c});VN.exports=u4});var WN=Ce(()=>{"use strict";var yJ=Oa(),GN=lw();yJ({target:"RegExp",proto:!0,forced:/./.exec!==GN},{exec:GN})});var uw=Ce((qfe,$N)=>{"use strict";WN();var YN=ZA(),XN=Of(),BJ=lw(),ZN=zi(),JN=IA(),bJ=kp(),CJ=JN("species"),h4=RegExp.prototype;$N.exports=function(e,t,r,n){var i=JN(e),A=!ZN(function(){var c={};return c[i]=function(){return 7},""[e](c)!==7}),a=A&&!ZN(function(){var c=!1,d=/a/;return e==="split"&&(d={},d.constructor={},d.constructor[CJ]=function(){return d},d.flags="",d[i]=/./[i]),d.exec=function(){return c=!0,null},d[i](""),!c});if(!A||!a||r){var s=/./[i],l=t(i,""[e],function(c,d,g,v,f){var S=d.exec;return S===BJ||S===h4.exec?A&&!f?{done:!0,value:YN(s,d,g,v)}:{done:!0,value:YN(c,g,d,v)}:{done:!1}});XN(String.prototype,e,l[0]),XN(h4,i,l[1])}n&&bJ(h4[i],"sham",!0)}});var nO=Ce((jfe,rO)=>{"use strict";var d4=qi(),xJ=xm(),SJ=Ll(),EJ=qo(),FJ=d4("".charAt),eO=d4("".charCodeAt),UJ=d4("".slice),tO=function(e){return function(t,r){var n=SJ(EJ(t)),i=xJ(r),A=n.length,a,s;return i<0||i>=A?e?"":void 0:(a=eO(n,i),a<55296||a>56319||i+1===A||(s=eO(n,i+1))<56320||s>57343?e?FJ(n,i):a:e?UJ(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}};rO.exports={codeAt:tO(!1),charAt:tO(!0)}});var cw=Ce((Kfe,iO)=>{"use strict";var _J=nO().charAt;iO.exports=function(e,t,r){return t+(r?_J(e,t).length:1)}});var fw=Ce((Vfe,aO)=>{"use strict";var AO=ZA(),QJ=Na(),TJ=ji(),LJ=Lf(),kJ=lw(),NJ=TypeError;aO.exports=function(e,t){var r=e.exec;if(TJ(r)){var n=AO(r,e,t);return n!==null&&QJ(n),n}if(LJ(e)==="RegExp")return AO(kJ,e,t);throw new NJ("RegExp#exec called on incompatible receiver")}});var oO=Ce(()=>{"use strict";var OJ=ZA(),IJ=uw(),DJ=Na(),HJ=kf(),MJ=Wh(),p4=Ll(),RJ=qo(),PJ=Vh(),zJ=cw(),sO=fw();IJ("match",function(e,t,r){return[function(i){var A=RJ(this),a=HJ(i)?void 0:PJ(i,e);return a?OJ(a,i,A):new RegExp(i)[e](p4(A))},function(n){var i=DJ(this),A=p4(n),a=r(t,i,A);if(a.done)return a.value;if(!i.global)return sO(i,A);var s=i.unicode;i.lastIndex=0;for(var l=[],c=0,d;(d=sO(i,A))!==null;){var g=p4(d[0]);l[c]=g,g===""&&(i.lastIndex=zJ(A,MJ(i.lastIndex),s)),c++}return c===0?null:l}]})});var uO=Ce((Yfe,lO)=>{"use strict";var v4=qi(),qJ=vm(),jJ=Math.floor,g4=v4("".charAt),KJ=v4("".replace),m4=v4("".slice),VJ=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,GJ=/\$([$&'`]|\d{1,2})/g;lO.exports=function(e,t,r,n,i,A){var a=r+e.length,s=n.length,l=GJ;return i!==void 0&&(i=qJ(i),l=VJ),KJ(A,l,function(c,d){var g;switch(g4(d,0)){case"$":return"$";case"&":return e;case"`":return m4(t,0,r);case"'":return m4(t,a);case"<":g=i[m4(d,1,-1)];break;default:var v=+d;if(v===0)return c;if(v>s){var f=jJ(v/10);return f===0?c:f<=s?n[f-1]===void 0?g4(d,1):n[f-1]+g4(d,1):c}g=n[v-1]}return g===void 0?"":g})}});var pO=Ce(()=>{"use strict";var WJ=Bx(),cO=ZA(),hw=qi(),YJ=uw(),XJ=zi(),ZJ=Na(),JJ=ji(),$J=kf(),e$=xm(),t$=Wh(),Kp=Ll(),r$=qo(),n$=cw(),i$=Vh(),A$=uO(),a$=fw(),s$=IA(),y4=s$("replace"),o$=Math.max,l$=Math.min,u$=hw([].concat),w4=hw([].push),fO=hw("".indexOf),hO=hw("".slice),c$=function(e){return e===void 0?e:String(e)},f$=function(){return"a".replace(/./,"$0")==="$0"}(),dO=function(){return/./[y4]?/./[y4]("a","$0")==="":!1}(),h$=!XJ(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});YJ("replace",function(e,t,r){var n=dO?"$":"$0";return[function(A,a){var s=r$(this),l=$J(A)?void 0:i$(A,y4);return l?cO(l,A,s,a):cO(t,Kp(s),A,a)},function(i,A){var a=ZJ(this),s=Kp(i);if(typeof A=="string"&&fO(A,n)===-1&&fO(A,"$<")===-1){var l=r(t,a,s,A);if(l.done)return l.value}var c=JJ(A);c||(A=Kp(A));var d=a.global,g;d&&(g=a.unicode,a.lastIndex=0);for(var v=[],f;f=a$(a,s),!(f===null||(w4(v,f),!d));){var S=Kp(f[0]);S===""&&(a.lastIndex=n$(s,t$(a.lastIndex),g))}for(var C="",Q=0,x=0;x<v.length;x++){f=v[x];for(var F=Kp(f[0]),T=o$(l$(e$(f.index),s.length),0),R=[],Y,ae=1;ae<f.length;ae++)w4(R,c$(f[ae]));var P=f.groups;if(c){var W=u$([F],R,T,s);P!==void 0&&w4(W,P),Y=Kp(WJ(A,void 0,W))}else Y=A$(F,s,T,R,P,A);T>=Q&&(C+=hO(s,Q,T)+Y,Q=T+F.length)}return C+hO(s,Q)}]},!h$||!f$||dO)});var mO=Ce((Jfe,gO)=>{"use strict";var d$=jo(),p$=Lf(),g$=IA(),m$=g$("match");gO.exports=function(e){var t;return d$(e)&&((t=e[m$])!==void 0?!!t:p$(e)==="RegExp")}});var dw=Ce(($fe,vO)=>{"use strict";var v$=mO(),w$=TypeError;vO.exports=function(e){if(v$(e))throw new w$("The method doesn't accept regular expressions");return e}});var pw=Ce((ehe,wO)=>{"use strict";var y$=IA(),B$=y$("match");wO.exports=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[B$]=!1,"/./"[e](t)}catch{}}rLine truncated
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var I8=Ce((Lhe,O8)=>{"use strict";var Ate=qi(),ate=qo(),ste=Ll(),z4=R4(),N8=Ate("".replace),ote=RegExp("^["+z4+"]+"),lte=RegExp("(^|[^"+z4+"])["+z4+"]+$"),P4=function(e){return function(t){var r=ste(ate(t));return e&1&&(r=N8(r,ote,"")),e&2&&(r=N8(r,lte,"$1")),r}};O8.exports={start:P4(1),end:P4(2),trim:P4(3)}});var R8=Ce((khe,M8)=>{"use strict";var ute=Bm().PROPER,cte=zi(),D8=R4(),H8="\u200B\x85\u180E";M8.exports=function(e){return cte(function(){return!!D8[e]()||H8[e]()!==H8||ute&&D8[e].name!==e})}});var P8=Ce(()=>{"use strict";var fte=Oa(),hte=I8().trim,dte=R8();fte({target:"String",proto:!0,forced:dte("trim")},{trim:function(){return hte(this)}})});var q8=Ce((Ihe,z8)=>{z8.exports=function(e){this.ok=!1,this.alpha=1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e=e.replace(/ /g,""),e=e.toLowerCase();var t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};e=t[e]||e;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3]),parseFloat(l[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,A=r[n].process,a=i.exec(e);if(a){var s=A(a);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=functi Line truncated
`},nI=function(e){return 48<=e.charCodeAt(0)&&e.charCodeAt(0)<=57},kte=function(e){function t(){var r=e.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return AI(t,e),t.prototype.finish=function(r){if(r===void 0&&(r=[]),this.parse(" ",r),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return r},t.prototype.parse=function(r,n){var i=this;n===void 0&&(n=[]);for(var A=function(g){n.push(g),i.curArgs.length=0,i.canParseCommandOrComma=!0},a=0;a<r.length;a++){var s=r[a],l=!(this.curCommandType!==yt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),c=nI(s)&&(this.curNumber==="0"&&s==="0"||l);if(!nI(s)||c)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||l){if(this.curNumber&&this.curCommandType!==-1){var d=Number(this.curNumber);if(isNaN(d))throw new SyntaxError("Invalid number ending at "+a);if(this.curCommandType===yt.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>d)throw new SyntaxError('Expected positive number, got "'+d+'" at index "'+a+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+a+'"')}this.curArgs.push(d),this.curArgs.length===Nte[this.curCommandType]&&(yt.HORIZ_LINE_TO===this.curCommandType?A({type:yt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:d}):yt.VERT_LINE_TO===this.curCommandType?A({type:yt.VERT_LINE_TO,relative:this.curCommandRelative,y:d}):this.curCommandType===yt.MOVE_TO||this.curCommandType===yt.LINE_TO||this.curCommandType===yt.SMOOTH_QUAD_TO?(A({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),yt.MOVE_TO===this.curCommandType&&(this.curCommandType=yt.LINE_TO)):this.curCommandType===yt.CURVE_TO?A({type:yt.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===yt.SMOOTH_CURVE_TO?A({type:yt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===yt.QUAD_TO?A({type:yt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===yt.ARC&&A({type:yt.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!Lte(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(c)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+a+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+a+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=yt.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=yt.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=yt.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=yt.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=yt.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=yt.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=yt.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=yt.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+a+".");this.curCommandType=yt.ARC,this.curCommandRelative=s==="a"}else n.push({type:yt.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return n},t.prototype.transform=function(r){return Object.create(this,{parse:{value:function(n,i){i===void 0&&(i=[]);for(var A=0,a=Object.getPrototypeOf(this).parse.call(this,n);A<a.length;A++){var s=a[A],l=r(s);Array.isArray(l)?i.push.apply(i,l):i.push(l)}return i}}})},t}(aI),yt=function(e){function t(r){var n=e.call(this)||this;return n.c Line truncated
\0`,D+=n(X,2),D+=R.magic,D+=n(x,2),D+=n(F,2),D+=n(de.crc32,4),D+=n(de.compressedSize,4),D+=n(de.uncompressedSize,4),D+=n(ae.length,2),D+=n(ie.length,2),{fileRecord:c.LOCAL_FILE_HEADER+D+ae+ie,dirRecord:c.CENTRAL_FILE_HEADER+n(ke,2)+D+n(he.length,2)+"\0\0\0\0"+n(Z,4)+n(S,4)+ae+ie+he}}var A=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),c=e("../signature");function d(g,v,f,S){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=f,this.encodeFileName=S,this.streamFiles=g,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}A.inherits(d,a),d.prototype.push=function(g){var v=g.meta.percent||0,f=this.entriesCount,S=this._sources.length;this.accumulate?this.contentBuffer.push(g):(this.bytesWritten+=g.data.length,a.prototype.push.call(this,{data:g.data,meta:{currentFile:this.currentFile,percent:f?(v+100*(f-S-1))/f:100}}))},d.prototype.openedSource=function(g){this.currentSourceOffset=this.bytesWritten,this.currentFile=g.file.name;var v=this.streamFiles&&!g.file.dir;if(v){var f=i(g,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(g){this.accumulate=!1;var v=this.streamFiles&&!g.file.dir,f=i(g,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),v)this.push({data:function(S){return c.DATA_DESCRIPTOR+n(S.crc32,4)+n(S.compressedSize,4)+n(S.uncompressedSize,4)}(g),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var g=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var f=this.bytesWritten-g,S=function(C,Q,x,F,T){var R=A.transformTo("string",T(F));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(C,2)+n(C,2)+n(Q,4)+n(x,4)+n(R.length,2)+R}(this.dirRecords.length,f,g,this.zipComment,this.encodeFileName);this.push({data:S,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(g){this._sources.push(g);var v=this;return g.on("data",function(f){v.processChunk(f)}),g.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),g.on("error",function(f){v.error(f)}),this},d.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(g){var v=this._sources;if(!a.prototype.error.call(this,g))return!1;for(var f=0;f<v.length;f++)try{v[f].error(g)}catch{}return!0},d.prototype.lock=function(){a.prototype.lock.call(this);for(var g=this._sources,v=0;v<g.length;v++)g[v].lock()},t.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(A,a,s){var l=new i(a.streamFiles,s,a.platform,a.encodeFileName),c=0;try{A.forEach(function(d,g){c++;var v=function(Q,x){var F=Q||x,T=n[F];if(!T)throw new Error(F+" is not a valid compression method !");return T}(g.options.compression,a.compression),f=g.options.compressionOptions||a.compressionOptions||{},S=g.dir,C=g.date;g._compressWorker(v,f).withStreamInfo("file",{name:d,dir:S,date:C,comment:g.comment||"",unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions}).pipe(l)}),l.entriesCount=c}catch(d){l.error(d)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new n;for(var A in this)typeof this[A]!="function"&&(i[A]=this[A]);return i}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(i,A){return new n().loadAsync(i,A)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./external"),A=e("./utf8"),a=e("./zipEntries"),s=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(d){return new i.Promise(function(g,v){var f=d.decompressed.getContentWorker().pipe(new s);f.on("error",function(S){v(S)}).on("end",function(){f.streamInfo.crc32!==d.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):g( Line truncated
`,"%0A").replaceAll(/[\u0000-\u001F\u007F]/g,"")}function Bt(xe){let Ut=Ct(xe,"width");if(!isNaN(Ut))return Ut;let bt=Ct(xe,"border-left-width"),Rt=Ct(xe,"border-right-width");return xe.scrollWidth+bt+Rt}function ct(xe){let Ut=Ct(xe,"height");if(!isNaN(Ut))return Ut;let bt=Ct(xe,"border-top-width"),Rt=Ct(xe,"border-bottom-width");return xe.scrollHeight+bt+Rt}function Ct(xe,Ut){if(xe.nodeType===s){let bt=l(xe).getPropertyValue(Ut);if(bt.slice(-2)==="px")return bt=bt.slice(0,-2),Number.parseFloat(bt)}return Number.NaN}}function W(){let X=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:K,shouldProcess:Z,impl:{readUrls:ke,inline:D}};function Z(ne){return ne.search(X)!==-1}function ke(ne){let ce=[],pe;for(;(pe=X.exec(ne))!==null;)ce.push(pe[1]);return ce.filter(Se=>!t.isDataUrl(Se))}function D(ne,ce,pe,Se){return Promise.resolve(ce).then(Ee=>pe?t.resolveUrl(Ee,pe):Ee).then(Se||t.getAndEncode).then(Ee=>ne.replace(ye(ce),`$1${Ee}$3`));function ye(Ee){return new RegExp(`(url\\(['"]?)(${t.escape(Ee)})(['"]?\\))`,"g")}}function K(ne,ce,pe){if(Se())return Promise.resolve(ne);return Promise.resolve(ne).then(ke).then(ye=>{let Ee=Promise.resolve(ne);for(let tt of ye)Ee=Ee.then(Xe=>D(Xe,tt,ce,pe));return Ee});function Se(){return!Z(ne)}}}function he(){return{resolveAll:X,impl:{readAll:Z}};function X(){return Z().then(ke=>Promise.all(ke.map(D=>D.resolve()))).then(ke=>ke.join(`
`))}function Z(){return Promise.resolve(t.asArray(document.styleSheets)).then(D).then(ke).then(ne=>ne.map(K));function ke(ne){return ne.filter(ce=>ce.type===CSSRule.FONT_FACE_RULE).filter(ce=>r.shouldProcess(ce.style.getPropertyValue("src")))}function D(ne){let ce=[];for(let pe of ne)if(Object.hasOwn(Object.getPrototypeOf(pe),"cssRules"))try{t.asArray(pe.cssRules||[]).forEach(ce.push.bind(ce))}catch(Se){console.error(`domtoimage: Error while reading CSS rules from ${pe.href}`,Se.toString())}return ce}function K(ne){return{resolve:function(){let pe=(ne.parentStyleSheet||{}).href;return r.inlineAll(ne.cssText,pe)},src(){return ne.style.getPropertyValue("src")}}}}}function V(){return{inlineAll:Z,impl:{newImage:X}};function X(ke){return{inline:D};function D(K){return t.isDataUrl(ke.src)?Promise.resolve():Promise.resolve(ke.src).then(K||t.getAndEncode).then(ne=>new Promise(ce=>{ke.addEventListener("load",ce),ke.onerror=ce,ke.src=ne}))}}function Z(ke){if(!t.isElement(ke))return Promise.resolve(ke);return D(ke).then(()=>t.isHTMLImageElement(ke)?X(ke).inline():Promise.all(t.asArray(ke.childNodes).map(K=>Z(K))));function D(K){let ce=["background","background-image"].map(pe=>{let Se=K.style.getPropertyValue(pe),ye=K.style.getPropertyPriority(pe);return Se?r.inlineAll(Se).then(Ee=>{K.style.setProperty(pe,Ee,ye)}):Promise.resolve()});return Promise.all(ce).then(()=>K)}}}function M(X,Z,ke,D){let K=["background-clip"].includes(Z);D?(X.setProperty(Z,ke,D),K&&X.setProperty(`-webkit-${Z}`,ke,D)):(X.setProperty(Z,ke),K&&X.setProperty(`-webkit-${Z}`,ke))}function _(X,Z,ke,D,K){let ne=a.impl.options.copyDefaultStyles?Fe(X,Z):{},ce=K.style;for(let Se of pe(t.asArray(ke))){let ye=ke.getPropertyValue(Se),Ee=ne[Se],tt=D?D.getPropertyValue(Se):void 0;if(ye!==Ee||D&&ye!==tt||/border/.test(Se)){let Xe=ke.getPropertyPriority(Se);M(ce,Se,ye,Xe)}}function pe(Se){for(let ye of["counter-reset","counter-increment","counter-set"])Se.indexOf(ye)<0&&!d(ke.getPropertyValue(ye))&&Se.push(ye);return Se}}let ie=null,oe={},ge=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]);function Fe(X,Z){let ke=pe(Z),D=Se(ke);if(oe[D])return oe[D];let K=Be(),ne=ye(K.document,ke),ce=Ee(K,ne);return tt(ne),oe[D]=ce,ce;function pe(Xe){let N=[];do{if(Xe.nodeType===s){let Ue=Xe.tagName;if(N.push(Ue),ge.has(Ue))break}Xe=Xe.parentNode}while(Xe);return N}function Se(Xe){return X.styleCaching==="relaxed"?Xe.filter((N,Ue,_e)=>Ue===0||Ue===_e.length-1).join(">"):Xe.join(">")}function ye(Xe,N){let Ue=Xe.body;do{let _e=N.pop(),G=Xe.createElement(_e);Ue.append(G),Ue=G}while(N.length>0);return Ue.textContent="\u200B",Ue}function Ee(Xe,N){let Ue={},_e=Xe.getComputedStyle(N);for(let G of t.asArray(_e))Ue[G]=G==="width"||G==="height"?"auto":_e.getPropertyValue(G);return Ue}function tt(Xe){do{let N=Xe.parentElement;N!==null&&Xe.remove(),Xe=N}while(Xe&&Xe.tagName!=="BODY")}}function Be(){if(T)return T.contentWindow;let X=document.characterSet||"UTF-8",Z=document.doctype,ke=Z?`<!DOCTYPE ${D(Z.name)} ${D(Z.publicId)} ${D(Z.systemId)}`.trim()+">":"";return T=document.createElement("iframe"),T.id="domtoimage-sandbox-"+t.uid(),T.style.visibility="hidden",T.style.position="fixed",document.body.append(T),K(T,ke,X,"domtoimage-sandbox");function D(ne){if(ne){let ce=document.createElement("div");return ce.innerText=ne,ce.innerHTML}return""}function K(ne,ce,pe,Se){try{return ne.contentWindow.document.write(`${ce}<html><head><meta charset='${pe}'><title>${Se}</title></head><body></body></html>`),ne.contentWindow}catch{}let ye=document.createElement("meta");ye.setAttribute("charset",pe);try{let Ee=document.implementation.createHTMLDocument(Se);Ee.head.append(ye);let tt=ce+Ee.documentElement.outerHTML;return ne.setAttribute("srcdoc",tt),ne.contentWindow}catch{}return ne.contentDocument.head.append(ye),ne.contentDocument.title=Se,ne.contentWindow}}function de(){T&&(T.remove(),T=null),ie&&clearTimeout(ie),ie=setTimeout(()=>{ie=null,oe={}},20*1e3)}})(BS)});var BD=Ce((lg,tv)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",A="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",s=500,l="__lodash_placeholder__",c=1,d=2,g=4,v=1,f=2,S=1,C=2,Q=4,x=8,F=16,T=32,R=64,Y=128,ae=256,P=512,W=30,he="...",V=800,M=16,_=1,ie=2,oe=3,ge=1/0,Fe=9007199254740991,Be=17976931348623157e292,de=NaN,X=4294967295,Z=X-1,ke=X>>>1,D=[["ary",Y],["bind",S],["bindKey",C],["curry",x],["curryRight",F],["flip",P],["partial",T],["partialRight",R],["rearg",ae]],K="[object Arguments]",ne="[object Array]",ce="[object AsyncFunction]",pe="[object Boolean]",Se="[object Date]",ye="[object DOMException]",Ee="[object Error]",tt="[object Function]",Xe="[object GeneratorFunction]",N="[object Map]",ULine truncated
/* [wrapped with `+u+`] */
`)}function Vy(o){return Er(o)||yh(o)||!!(KA&&o&&o[KA])}function gl(o,u){var b=typeof o;return u=u??Fe,!!u&&(b=="number"||b!="symbol"&&xn.test(o))&&o>-1&&o%1==0&&o<u}function la(o,u,b){if(!Si(b))return!1;var k=typeof u;return(k=="number"?Bs(b)&&gl(u,b.length):k=="string"&&u in b)?yl(b[u],o):!1}function Gg(o,u){if(Er(o))return!1;var b=typeof o;return b=="number"||b=="symbol"||b=="boolean"||o==null||Gs(o)?!0:Mn.test(o)||!Vn.test(o)||u!=null&&o in ir(u)}function Gy(o){var u=typeof o;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?o!=="__proto__":o===null}function gh(o){var u=pl(o),b=te[u];if(typeof b!="function"||!(u in Tr.prototype))return!1;if(o===b)return!0;var k=Kg(b);return!!k&&o===k[0]}function Wy(o){return!!nl&&nl in o}var Yy=Wa?Ac:HB;function mh(o){var u=o&&o.constructor,b=typeof u=="function"&&u.prototype||qA;return o===b}function xv(o){return o===o&&!Si(o)}function Sv(o,u){return function(b){return b==null?!1:b[o]===u&&(u!==e||o in ir(b))}}function Wg(o){var u=zv(o,function(k){return b.size===s&&b.clear(),k}),b=u.cache;return u}function Yg(o,u){var b=o[1],k=u[1],j=b|k,se=j<(S|C|Y),be=k==Y&&b==x||k==Y&&b==ae&&o[7].length<=u[8]||k==(Y|ae)&&u[7].length<=u[8]&&b==x;if(!(se||be))return o;k&S&&(o[2]=u[2],j|=b&S?0:Q);var Ne=u[3];if(Ne){var Ve=o[3];o[3]=Ve?gv(Ve,Ne,u[4]):Ne,o[4]=Ve?EA(o[3],l):u[4]}return Ne=u[5],Ne&&(Ve=o[5],o[5]=Ve?lh(Ve,Ne,u[6]):Ne,o[6]=Ve?EA(o[5],l):u[6]),Ne=u[7],Ne&&(o[7]=Ne),k&Y&&(o[8]=o[8]==null?u[8]:pi(o[8],u[8])),o[9]==null&&(o[9]=u[9]),o[0]=u[0],o[1]=j,o}function Ev(o){var u=[];if(o!=null)for(var b in ir(o))u.push(b);return u}function Xy(o){return cA.call(o)}function Fv(o,u,b){return u=Bi(u===e?o.length-1:u,0),function(){for(var k=arguments,j=-1,se=Bi(k.length-u,0),be=$e(se);++j<se;)be[j]=k[u+j];j=-1;for(var Ne=$e(u+1);++j<u;)Ne[j]=k[j];return Ne[u]=b(be),Ti(o,this,Ne)}}function Xg(o,u){return u.length<2?o:oi(o,xi(u,0,-1))}function Zy(o,u){for(var b=o.length,k=pi(u.length,b),j=TA(o);k--;){var se=u[k];o[k]=gl(se,b)?j[se]:e}return o}function Zg(o,u){if(!(u==="constructor"&&typeof o[u]=="function")&&u!="__proto__")return o[u]}var Uv=_v(Ku),vh=Rc||function(o,u){return pn.setTimeout(o,u)},Jg=_v(wd);function Ud(o,u,b){var k=u+"";return Jg(o,ph(k,_d(bv(k),b)))}function _v(o){var u=0,b=0;return function(){var k=yg(),j=M-(k-b);if(b=k,j>0){if(++u>=V)return arguments[0]}else u=0;return o.apply(e,arguments)}}function Zc(o,u){var b=-1,k=o.length,j=k-1;for(u=u===e?k:u;++b<u;){var se=Vc(b,j),be=o[se];o[se]=o[b],o[b]=be}return o.length=u,o}var Qv=Wg(function(o){var u=[];return o.charCodeAt(0)===46&&u.push(""),o.replace(iA,function(b,k,j,se){u.push(j?se.replace(DA,"$1"):k||b)}),u});function Qt(o){if(typeof o=="string"||Gs(o))return o;var u=o+"";return u=="0"&&1/o==-ge?"-0":u}function ys(o){if(o!=null){try{return hs.call(o)}catch{}try{return o+""}catch{}}return""}function _d(o,u){return oA(D,function(b){var k="_."+b[0];u&b[1]&&!po(o,k)&&o.push(k)}),o.sort()}function $a(o){if(o instanceof Tr)return o.clone();var u=new ya(o.__wrapped__,o.__chain__);return u.__actions__=TA(o.__actions__),u.__index__=o.__index__,u.__values__=o.__values__,u}function Jy(o,u,b){(b?la(o,u,b):u===e)?u=1:u=Bi(Lr(u),0);var k=o==null?0:o.length;if(!k||u<1)return[];for(var j=0,se=0,be=$e(Wl(k/u));j<k;)be[se++]=xi(o,j,j+=u);return be}function mn(o){for(var u=-1,b=o==null?0:o.length,k=0,j=[];++u<b;){var se=o[u];se&&(j[k++]=se)}return j}function Jn(){var o=arguments.length;if(!o)return[];for(var u=$e(o-1),b=arguments[0],k=o;k--;)u[k-1]=arguments[k];return na(Er(b)?TA(b):[b],wr(u,1))}var Qd=mr(function(o,u){return Zi(o)?mt(o,wr(u,1,Zi,!0)):[]}),$y=mr(function(o,u){var b=ui(u);return Zi(b)&&(b=e),Zi(o)?mt(o,wr(u,1,Zi,!0),Dt(b,2)):[]}),Td=mr(function(o,u){var b=ui(u);return Zi(b)&&(b=e),Zi(o)?mt(o,wr(u,1,Zi,!0),e,b):[]});function eB(o,u,b){var k=o==null?0:o.length;return k?(u=b||u===e?1:Lr(u),xi(o,u<0?0:u,k)):[]}function Ld(o,u,b){var k=o==null?0:o.length;return k?(u=b||u===e?1:Lr(u),u=k-u,xi(o,0,u<0?0:u)):[]}function tB(o,u){return o&&o.length?Gu(o,Dt(u,3),!0,!0):[]}function rB(o,u){return o&&o.length?Gu(o,Dt(u,3),!0):[]}function Tv(o,u,b,k){var j=o==null?0:o.length;return j?(b&&typeof b!="number"&&la(o,u,b)&&(b=0,k=j),gn(o,u,b,k)):[]}function Lv(o,u,b){var k=o==null?0:o.length;if(!k)return-1;var j=b==null?0:Lr(b);return j<0&&(j=Bi(k+j,0)),Te(o,Dt(u,3),j)}function $g(o,u,b){var k=o==null?0:o.length;if(!k)return-1;var j=k-1;return b!==e&&(j=Lr(b),j=b<0?Bi(k+j,0):pi(j,k-1)),Te(o,Dt(u,3),j,!0)}function kv(o){var u=o==null?0:o.length;return u?wr(o,1):[]}function Nv(o){var u=o==null?0:o.length;return u?wr(o,ge):[]}function Ov(o,u){var b=o==null?0:o.length;return b?(u=u===e?1:Lr(u),wr(o,u)):[]}function e0(o){for(var u=-1,b=o==null?0:o.length,k={};++u<b;){var j=o[u];k[j[0]]=j[1]}return k}function t0(o){return o&&o.length?o[0]:e}function nB(o,u,b){var k=o==null?0:o.length;if(!k)return-1;var j=b==null?0:Lr(b);return j<0&&(j=Bi(k+j,0)),Ke(o,u,j)}function Iv(o){var u=o==null?0:o.length;return u?xi(o,0,-1):[]}var iB=mr(function(o){var Line truncated
`;o.replace(It,function(lr,Vr,An,Ws,ts,Ys){return An||(An=Ws),wt+=o.slice(ft,Ys).replace(Ts,ma),Vr&&(Ne=!0,wt+=`' +
__e(`+Vr+`) +
'`),ts&&(Ve=!0,wt+=`';
`+ts+`;
__p += '`),An&&(wt+=`' +
((__t = (`+An+`)) == null ? '' : __t) +
'`),ft=Ys+lr.length,lr}),wt+=`';
`;var or=Or.call(u,"variable")&&u.variable;if(!or)wt=`with (obj) {
`+wt+`
}
`;else if(Ra.test(or))throw new Pt(A);wt=(Ve?wt.replace(Jt,""):wt).replace(di,"$1").replace(gr,"$1;"),wt="function("+(or||"obj")+`) {
`+(or?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Ne?", __e = _.escape":"")+(Ve?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+wt+`return __p
}`;var Dr=wE(function(){return Pr(se,Wt+"return "+wt).apply(e,be)});if(Dr.source=wt,UB(Dr))throw Dr;return Dr}function TP(o){return _n(o).toLowerCase()}function LP(o){return _n(o).toUpperCase()}function kP(o,u,b){if(o=_n(o),o&&(b||u===e))return Li(o);if(!o||!(u=hn(u)))return o;var k=jr(o),j=jr(u),se=ki(k,j),be=Nn(k,j)+1;return ws(k,se,be).join("")}function NP(o,u,b){if(o=_n(o),o&&(b||u===e))return o.slice(0,va(o)+1);if(!o||!(u=hn(u)))return o;var k=jr(o),j=Nn(k,jr(u))+1;return ws(k,0,j).join("")}function OP(o,u,b){if(o=_n(o),o&&(b||u===e))return o.replace(aA,"");if(!o||!(u=hn(u)))return o;var k=jr(o),j=ki(k,jr(u));return ws(k,j).join("")}function IP(o,u){var b=W,k=he;if(Si(u)){var j="separator"in u?u.separator:j;b="length"in u?Lr(u.length):b,k="omission"in u?hn(u.omission):k}o=_n(o);var se=o.length;if(Nr(o)){var be=jr(o);se=be.length}if(b>=se)return o;var Ne=b-On(k);if(Ne<1)return k;var Ve=be?ws(be,0,Ne).join(""):o.slice(0,Ne);if(j===e)return Ve+k;if(be&&(Ne+=Ve.length-Ne),_B(j)){if(o.slice(Ne).search(j)){var ft,ht=Ve;for(j.global||(j=Rs(j.source,_n(yA.exec(j))+"g")),j.lastIndex=0;ft=j.exec(ht);)var wt=ft.index;Ve=Ve.slice(0,wt===e?Ne:wt)}}else if(o.indexOf(hn(j),Ne)!=Ne){var It=Ve.lastIndexOf(j);It>-1&&(Ve=Ve.slice(0,It))}return Ve+k}function DP(o){return o=_n(o),o&&Fr.test(o)?o.replace(Cn,Uu):o}var HP=Zu(function(o,u,b){return o+(b?" ":"")+u.toUpperCase()}),LB=Ig("toUpperCase");function vE(o,u,b){return o=_n(o),u=b?e:u,u===e?Ni(o)?FA(o):q(o):o.match(u)||[]}var wE=mr(function(o,u){try{return Ti(o,e,u)}catch(b){return UB(b)?b:new Pt(b)}}),MP=xo(function(o,u){return oA(u,function(b){b=Qt(b),st(o,b,EB(o[b],o))}),o});function RP(o){var u=o==null?0:o.length,b=Dt();return o=u?Sn(o,function(k){if(typeof k[1]!="function")throw new uA(i);return[b(k[0]),k[1]]}):[],mr(function(k){for(var j=-1;++j<u;){var se=o[j];if(Ti(se[0],this,k))return Ti(se[1],this,k)}})}function PP(o){return _t(Ft(o,c))}function kB(o){return function(){return o}}function zP(o,u){return o==null||o!==o?u:o}var qP=Ju(),jP=Ju(!0);function Cs(o){return o}function NB(o){return $f(typeof o=="function"?o:Ft(o,c))}function KP(o){return Ru(Ft(o,c))}function VP(o,u){return dl(o,Ft(u,c))}var GP=mr(function(o,u){return function(b){return gs(b,o,u)}}),WP=mr(function(o,u){return function(b){return gs(o,b,u)}});function OB(o,u,b){var k=VA(u),j=Xn(u,k);b==null&&!(Si(u)&&(j.length||!k.length))&&(b=u,u=o,o=this,j=Xn(u,VA(u)));var se=!(Si(b)&&"chain"in b)||!!b.chain,be=Ac(o);return oA(j,function(Ne){var Ve=u[Ne];o[Ne]=Ve,be&&(o.prototype[Ne]=function(){var ft=this.__chain__;if(se||ft){var ht=o(this.__wrapped__),wt=ht.__actions__=TA(this.__actions__);return wt.push({func:Ve,args:arguments,thisArg:o}),ht.__chain__=ft,ht}return Ve.apply(o,na([this.value()],arguments))})}),o}function YP(){return pn._===this&&(pn._=En),this}function IB(){}function XP(o){return o=Lr(o),mr(function(u){return Pu(u,o)})}var ZP=Hg(Sn),JP=Hg(el),$P=Hg(ia);function yE(o){return Gg(o)?Vt(Qt(o)):rh(o)}function ez(o){return function(u){return o==null?e:oi(o,u)}}var tz=Mg(),rz=Mg(!0);function DB(){return[]}function HB(){return!1}function nz(){return{}}function iz(){return""}function Az(){return!0}function az(o,u){if(o=Lr(o),o<1||o>Fe)return[];var b=X,k=pi(o,X);u=Dt(u),o-=X;for(var j=kn(k,u);++b<o;)u(b);return j}function sz(o){return Er(o)?Sn(o,Qt):Gs(o)?[o]:TA(Qv(_n(o)))}function oz(o){var u=++Ps;return _n(o)+u}var lz=bd(function(o,u){return o+u},0),uz=xd("ceil"),cz=bd(function(o,u){return o/u},1),fz=xd("floor");function hz(o){return o&&o.length?xr(o,Cs,Ii):e}function dz(o,u){return o&&o.length?xr(o,Dt(u,2),Ii):e}function pz(o){return kt(o,Cs)}function gz(o,u){return kt(o,Dt(u,2))}function mz(o){return o&&o.length?xr(o,Cs,hl):e}function vz(o,u){return o&&o.length?xr(o,Dt(u,2),hl):e}var wz=bd(function(o,u){return o*u},1),yz=xd("round"),Bz=bd(function(o,u){return o-u},0);function bz(o){return o&&o.length?Zt(o,Cs):0}function Cz(o,u){return o&&o.length?Zt(o,Dt(u,2)):0}return te.after=KR,te.ary=ZS,te.assign=L7,te.assignIn=cE,te.assignInWith=Vv,te.assignWith=k7,te.at=N7,te.before=JS,te.bind=EB,te.bindAll=MP,te.bindKey=$S,te.castArray=n7,te.chain=Ge,te.chunk=Jy,te.compact=mn,te.concat=Jn,te.cond=RP,te.conforms=PP,te.constant=kB,te.countBy=Ht,te.create=O7,te.curry=eE,te.curryRight=tE,te.debounce=rE,te.defaults=I7,te.defaultsDeep=D7,te.defer=VR,te.delay=GR,te.difference=Qd,te.differenceBy=$y,te.differenceWith=Td,te.drop=eB,te.dropRight=Ld,te.dropRightWhile=tB,te.dropWhile=rB,te.fill=Tv,te.filter=Jr,te.flatMap=Ea,te.flatMapDeep=es,te.flatMapDepth=Un,te.flatten=kv,te.flattenDeep=Nv,te.flattenDepth=Ov,te.flip=WR,te.flow=qP,te.flowRight=jP,te.fromPairs=e0,te.functions=j7,te.functionsIn=K7,te.groupBy=Fa,te.initial=Iv,te.intersection=iB,te.intersectionBy=AB,te.intersectionWith=aB,te.invert=G7,te.invertBy=W7,te.invokeMap=tc,te.iteratee=NB,te.keyBy=Fo,te.keys=VA,te.keysIn=bs,te.map=Vs,te.mapKeys=X7,te.mapValues=Z7,te.matches=KP,te.matchesProperty=VP,te.memoize=zv,te.merge=J7,te.mergeWith=fE,te.method=GP,te.method Line truncated
`),vi(E,q),ar.publish("endTilingPattern",q),AA.pop().restore()};var Tn=f.__private__.newObject=function(){var E=br();return wi(E,!0),E},br=f.__private__.newObjectDeferred=function(){return pe++,Se[pe]=function(){return Ee},pe},wi=function(E,q){return q=typeof q=="boolean"&&q,Se[E]=Ee,q&&I(E+" 0 obj"),E},Ra=f.__private__.newAdditionalObject=function(){var E={objId:br(),content:""};return tt.push(E),E},DA=br(),$A=br(),yA=f.__private__.decodeColorString=function(E){var q=E.split(" ");if(q.length!==2||q[1]!=="g"&&q[1]!=="G")q.length===5&&(q[4]==="k"||q[4]==="K")&&(q=[(1-q[0])*(1-q[3]),(1-q[1])*(1-q[3]),(1-q[2])*(1-q[3]),"r"]);else{var me=parseFloat(q[0]);q=[me,me,me,"r"]}for(var Te="#",Ke=0;Ke<3;Ke++)Te+=("0"+Math.floor(255*parseFloat(q[Ke])).toString(16)).slice(-2);return Te},ea=f.__private__.encodeColorString=function(E){var q;typeof E=="string"&&(E={ch1:E});var me=E.ch1,Te=E.ch2,Ke=E.ch3,it=E.ch4,vt=E.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof me=="string"&&me.charAt(0)!=="#"){var kt=new WI(me);if(kt.ok)me=kt.toHex();else if(!/^\d*\.?\d*$/.test(me))throw new Error('Invalid color "'+me+'" passed to jsPDF.encodeColorString.')}if(typeof me=="string"&&/^#[0-9A-Fa-f]{3}$/.test(me)&&(me="#"+me[1]+me[1]+me[2]+me[2]+me[3]+me[3]),typeof me=="string"&&/^#[0-9A-Fa-f]{6}$/.test(me)){var Vt=parseInt(me.substr(1),16);me=Vt>>16&255,Te=Vt>>8&255,Ke=255&Vt}if(Te===void 0||it===void 0&&me===Te&&Te===Ke)if(typeof me=="string")q=me+" "+vt[0];else switch(E.precision){case 2:q=V(me/255)+" "+vt[0];break;case 3:default:q=M(me/255)+" "+vt[0]}else if(it===void 0||sn(it)==="object"){if(it&&!isNaN(it.a)&&it.a===0)return q=["1.","1.","1.",vt[1]].join(" ");if(typeof me=="string")q=[me,Te,Ke,vt[1]].join(" ");else switch(E.precision){case 2:q=[V(me/255),V(Te/255),V(Ke/255),vt[1]].join(" ");break;default:case 3:q=[M(me/255),M(Te/255),M(Ke/255),vt[1]].join(" ")}}else if(typeof me=="string")q=[me,Te,Ke,it,vt[2]].join(" ");else switch(E.precision){case 2:q=[V(me),V(Te),V(Ke),V(it),vt[2]].join(" ");break;case 3:default:q=[M(me),M(Te),M(Ke),M(it),vt[2]].join(" ")}return q},ta=f.__private__.getFilters=function(){return a},sA=f.__private__.putStream=function(E){var q=(E=E||{}).data||"",me=E.filters||ta(),Te=E.alreadyAppliedFilters||[],Ke=E.addLength1||!1,it=q.length,vt=E.objectId,kt=function(Li){return Li};if(d!==null&&vt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");d!==null&&(kt=Mr.encryptor(vt,0));var Vt={};me===!0&&(me=["FlateEncode"]);var sr=E.additionalKeyValues||[],tr=(Vt=ur.API.processDataByFilters!==void 0?ur.API.processDataByFilters(q,me):{data:q,reverseChain:[]}).reverseChain+(Array.isArray(Te)?Te.join(" "):Te.toString());if(Vt.data.length!==0&&(sr.push({key:"Length",value:Vt.data.length}),Ke===!0&&sr.push({key:"Length1",value:it})),tr.length!=0)if(tr.split("/").length-1==1)sr.push({key:"Filter",value:tr});else{sr.push({key:"Filter",value:"["+tr+"]"});for(var Cr=0;Cr<sr.length;Cr+=1)if(sr[Cr].key==="DecodeParms"){for(var Zt=[],kn=0;kn<Vt.reverseChain.split("/").length-1;kn+=1)Zt.push("null");Zt.push(sr[Cr].value),sr[Cr].value="["+Zt.join(" ")+"]"}}I("<<");for(var Wn=0;Wn<sr.length;Wn++)I("/"+sr[Wn].key+" "+sr[Wn].value);I(">>"),Vt.data.length!==0&&(I("stream"),I(kt(Vt.data)),I("endstream"))},BA=f.__private__.putPage=function(E){var q=E.number,me=E.data,Te=E.objId,Ke=E.contentsObjId;wi(Te,!0),I("<</Type /Page"),I("/Parent "+E.rootDictionaryObjId+" 0 R"),I("/Resources "+E.resourceDictionaryObjId+" 0 R"),I("/MediaBox ["+parseFloat(P(E.mediaBox.bottomLeftX))+" "+parseFloat(P(E.mediaBox.bottomLeftY))+" "+P(E.mediaBox.topRightX)+" "+P(E.mediaBox.topRightY)+"]"),E.cropBox!==null&&I("/CropBox ["+P(E.cropBox.bottomLeftX)+" "+P(E.cropBox.bottomLeftY)+" "+P(E.cropBox.topRightX)+" "+P(E.cropBox.topRightY)+"]"),E.bleedBox!==null&&I("/BleedBox ["+P(E.bleedBox.bottomLeftX)+" "+P(E.bleedBox.bottomLeftY)+" "+P(E.bleedBox.topRightX)+" "+P(E.bleedBox.topRightY)+"]"),E.trimBox!==null&&I("/TrimBox ["+P(E.trimBox.bottomLeftX)+" "+P(E.trimBox.bottomLeftY)+" "+P(E.trimBox.topRightX)+" "+P(E.trimBox.topRightY)+"]"),E.artBox!==null&&I("/ArtBox ["+P(E.artBox.bottomLeftX)+" "+P(E.artBox.bottomLeftY)+" "+P(E.artBox.topRightX)+" "+P(E.artBox.topRightY)+"]"),typeof E.userUnit=="number"&&E.userUnit!==1&&I("/UserUnit "+E.userUnit),ar.publish("putPage",{objId:Te,pageContext:Gt[q],pageNumber:q,page:me}),I("/Contents "+Ke+" 0 R"),I(">>"),I("endobj");var it=me.join(`
`);return T===F.ADVANCED&&(it+=`
Q`),wi(Ke,!0),sA({data:it,filters:ta(),objectId:Ke}),I("endobj"),Te},xn=f.__private__.putPages=function(){var E,q,me=[];for(E=1;E<=Yr;E++)Gt[E].objId=br(),Gt[E].contentsObjId=br();for(E=1;E<=Yr;E++)me.push(BA({number:E,data:Xe[E],objId:Gt[E].objId,contentsObjId:Gt[E].contentsObjId,mediaBox:Gt[E].mediaBox,cropBox:Gt[E].cropBox,bleedBox:Gt[E].bleedBox,trimBox:Gt[E].trimBox,artBox:Gt[E].artBox,userUnit:Gt[E].userUnit,rootDictionaryObjId:DA,resourceDictionaryObjId:$A}));wi(DA,!0),I("<</Type /Pages");var Te="/Kids [";for(q=0;q<Yr;q++)Te+=me[q]+" 0 R ";I(Te+"]"),I("/Count "+Yr),I(">>"),I("endobj"),ar.publish("postPutPages")},Qs=function(E){ar.publish("putFont",{font:E,out:I,newObject:Tn,putStream:sA}),E.isAlreadyPutted!==!0&&(E.objectNumber=Tn(),I("<<"),I("/Type /Font"),I("/BaseFont /"+rg(E.postScriptName)),I("/Subtype /Type1"),typeof E.encoding=="string"&&I("/Encoding /"+E.encoding),I("/FirstChar 32"),I("/LastChar 255"),I(">>"),I("endobj"))},dn=function(){for(var E in Mt)Mt.hasOwnProperty(E)&&(g===!1||g===!0&&v.hasOwnProperty(E))&&Qs(Mt[E])},Ts=function(E){E.objectNumber=Tn();var q=[];q.push({key:"Type",value:"/XObject"}),q.push({key:"Subtype",value:"/Form"}),q.push({key:"BBox",value:"["+[P(E.x),P(E.y),P(E.x+E.width),P(E.y+E.height)].join(" ")+"]"}),q.push({key:"Matrix",value:"["+E.matrix.toString()+"]"});var me=E.pages[1].join(`
`);sA({data:me,additionalKeyValues:q,objectId:E.objectNumber}),I("endobj")},en=function(){for(var E in Mn)Mn.hasOwnProperty(E)&&Ts(Mn[E])},as=function(E,q){var me,Te=[],Ke=1/(q-1);for(me=0;me<1;me+=Ke)Te.push(me);if(Te.push(1),E[0].offset!=0){var it={offset:0,color:E[0].color};E.unshift(it)}if(E[E.length-1].offset!=1){var vt={offset:1,color:E[E.length-1].color};E.push(vt)}for(var kt="",Vt=0,sr=0;sr<Te.length;sr++){for(me=Te[sr];me>E[Vt+1].offset;)Vt++;var tr=E[Vt].offset,Cr=(me-tr)/(E[Vt+1].offset-tr),Zt=E[Vt].color,kn=E[Vt+1].color;kt+=ce(Math.round((1-Cr)*Zt[0]+Cr*kn[0]).toString(16))+ce(Math.round((1-Cr)*Zt[1]+Cr*kn[1]).toString(16))+ce(Math.round((1-Cr)*Zt[2]+Cr*kn[2]).toString(16))}return kt.trim()},Pa=function(E,q){q||(q=21);var me=Tn(),Te=as(E.colors,q),Ke=[];Ke.push({key:"FunctionType",value:"0"}),Ke.push({key:"Domain",value:"[0.0 1.0]"}),Ke.push({key:"Size",value:"["+q+"]"}),Ke.push({key:"BitsPerSample",value:"8"}),Ke.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ke.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),sA({data:Te,additionalKeyValues:Ke,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:me}),I("endobj"),E.objectNumber=Tn(),I("<< /ShadingType "+E.type),I("/ColorSpace /DeviceRGB");var it="/Coords ["+P(parseFloat(E.coords[0]))+" "+P(parseFloat(E.coords[1]))+" ";E.type===2?it+=P(parseFloat(E.coords[2]))+" "+P(parseFloat(E.coords[3])):it+=P(parseFloat(E.coords[2]))+" "+P(parseFloat(E.coords[3]))+" "+P(parseFloat(E.coords[4]))+" "+P(parseFloat(E.coords[5])),I(it+="]"),E.matrix&&I("/Matrix ["+E.matrix.toString()+"]"),I("/Function "+me+" 0 R"),I("/Extend [true true]"),I(">>"),I("endobj")},Wo=function(E,q){var me=br(),Te=Tn();q.push({resourcesOid:me,objectOid:Te}),E.objectNumber=Te;var Ke=[];Ke.push({key:"Type",value:"/Pattern"}),Ke.push({key:"PatternType",value:"1"}),Ke.push({key:"PaintType",value:"1"}),Ke.push({key:"TilingType",value:"1"}),Ke.push({key:"BBox",value:"["+E.boundingBox.map(P).join(" ")+"]"}),Ke.push({key:"XStep",value:P(E.xStep)}),Ke.push({key:"YStep",value:P(E.yStep)}),Ke.push({key:"Resources",value:me+" 0 R"}),E.matrix&&Ke.push({key:"Matrix",value:"["+E.matrix.toString()+"]"}),sA({data:E.stream,additionalKeyValues:Ke,objectId:E.objectNumber}),I("endobj")},HA=function(E){var q;for(q in gr)gr.hasOwnProperty(q)&&(gr[q]instanceof Ad?Pa(gr[q]):gr[q]instanceof ng&&Wo(gr[q],E))},Ls=function(E){for(var q in E.objectNumber=Tn(),I("<<"),E)switch(q){case"opacity":I("/ca "+V(E[q]));break;case"stroke-opacity":I("/CA "+V(E[q]))}I(">>"),I("endobj")},za=function(){var E;for(E in cr)cr.hasOwnProperty(E)&&Ls(cr[E])},ha=function(){for(var E in I("/XObject <<"),Mn)Mn.hasOwnProperty(E)&&Mn[E].objectNumber>=0&&I("/"+E+" "+Mn[E].objectNumber+" 0 R");ar.publish("putXobjectDict"),I(">>")},Yo=function(){Mr.oid=Tn(),I("<<"),I("/Filter /Standard"),I("/V "+Mr.v),I("/R "+Mr.r),I("/U <"+Mr.toHexString(Mr.U)+">"),I("/O <"+Mr.toHexString(Mr.O)+">"),I("/P "+Mr.P),I(">>"),I("endobj")},bA=function(){for(var E in I("/Font <<"),Mt)Mt.hasOwnProperty(E)&&(g===!1||g===!0&&v.hasOwnProperty(E))&&I("/"+E+" "+Mt[E].objectNumber+" 0 R");I(">>")},qa=function(){if(Object.keys(gr).length>0){for(var E in I("/Shading <<"),gr)gr.hasOwnProperty(E)&&gr[E]instanceof Ad&&gr[E].objectNumber>=0&&I("/"+E+" "+gr[E].objectNumber+" 0 R");ar.publish("putShadingPatternDict"),I(">>")}},ja=function(E){if(Object.keys(gr).length>0){for(var q in I("/Pattern <<"),gr)gr.hasOwnProperty(q)&&gr[q]instanceof f.TilingPattern&&gr[q].objectNumber>=0&&gr[q].objectNumber<E&&I("/"+q+" "+gr[q].objectNumber+" 0 R");ar.publish("putTilingPatternDict"),I(">>")}},Ka=function(){if(Object.keys(cr).length>0){var E;for(E in I("/ExtGState <<"),cr)cr.hasOwnProperty(E)&&cr[E].objectNumber>=0&&I("/"+E+" "+cr[E].objectNumber+" 0 R");ar.publish("putGStateDict"),I(">>")}},wn=function(E){wi(E.resourcesOid,!0),I("<<"),I("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),bA(),qa(),ja(E.objectOid),Ka(),ha(),I(">>"),I("endobj")},MA=function(){var E=[];dn(),za(),en(),HA(E),ar.publish("putResources"),E.forEach(wn),wn({resourcesOid:$A,objectOid:Number.MAX_SAFE_INTEGER}),ar.publish("postPutResources")},ss=function(){ar.publish("putAdditionalObjects");for(var E=0;E<tt.length;E++){var q=tt[E];wi(q.objId,!0),I(q.content),I("endobj")}ar.publish("postPutAdditionalObjects")},da=function(E){Jt[E.fontName]=Jt[E.fontName]||{},Jt[E.fontName][E.fontStyle]=E.id},os=function(E,q,me,Te,Ke){var it={id:"F"+(Object.keys(Mt).length+1).toString(10),postScriptName:E,fontName:q,fontStyle:me,encoding:Te,isStandardFont:Ke||!1,metadata:{}};return ar.publish("addFont",{font:it,instance:this}),Mt[it.id]=it,da(it),it.id},ii=function(E){for(var q=0,me=Qe.length;q<me;q++){var Te=os.call(this,E[q][0],E[q][1],E[q][2],Qe[q][3],!0);g===!1&&(v[Te]=!0);var Ke=E[q][0].split("-");da({id:Te,fontName:Ke[0],fontStyle:Ke[1]||""})}ar.publish("addFonts",{fonts:Mt,dictionary:Jt})},Vi=function(E){return E.foo=function(){try{return E.apply(this,arguments)}catch(Te){var q=Te.stack||"";~q.indexOf(" at ")&&(q=q.split( Line truncated
`)[0].split("<")[0]+": "+Te.message;if(!hr.console)throw new Error(me);hr.console.error(me,Te),hr.alert&&alert(me)}},E.foo.bar=E,E.foo},RA=function(E,q){var me,Te,Ke,it,vt,kt,Vt,sr,tr;if(Ke=(q=q||{}).sourceEncoding||"Unicode",vt=q.outputEncoding,(q.autoencode||vt)&&Mt[Ct].metadata&&Mt[Ct].metadata[Ke]&&Mt[Ct].metadata[Ke].encoding&&(it=Mt[Ct].metadata[Ke].encoding,!vt&&Mt[Ct].encoding&&(vt=Mt[Ct].encoding),!vt&&it.codePages&&(vt=it.codePages[0]),typeof vt=="string"&&(vt=it[vt]),vt)){for(Vt=!1,kt=[],me=0,Te=E.length;me<Te;me++)(sr=vt[E.charCodeAt(me)])?kt.push(String.fromCharCode(sr)):kt.push(E[me]),kt[me].charCodeAt(0)>>8&&(Vt=!0);E=kt.join("")}for(me=E.length;Vt===void 0&&me!==0;)E.charCodeAt(me-1)>>8&&(Vt=!0),me--;if(!Vt)return E;for(kt=q.noBOM?[]:[254,255],me=0,Te=E.length;me<Te;me++){if((tr=(sr=E.charCodeAt(me))>>8)>>8)throw new Error("Character at position "+me+" of string '"+E+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");kt.push(tr),kt.push(sr-(tr<<8))}return String.fromCharCode.apply(void 0,kt)},Gn=f.__private__.pdfEscape=f.pdfEscape=function(E,q){return RA(E,q).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ls=f.__private__.beginPage=function(E){Xe[++Yr]=[],Gt[Yr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(E[0]),topRightY:Number(E[1])}},us(Yr),G(Xe[K])},Xo=function(E,q){var me,Te,Ke;switch(r=q||r,typeof E=="string"&&(me=x(E.toLowerCase()),Array.isArray(me)&&(Te=me[0],Ke=me[1])),Array.isArray(E)&&(Te=E[0]*xe,Ke=E[1]*xe),isNaN(Te)&&(Te=i[0],Ke=i[1]),(Te>14400||Ke>14400)&&(jn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Te=Math.min(14400,Te),Ke=Math.min(14400,Ke)),i=[Te,Ke],r.substr(0,1)){case"l":Ke>Te&&(i=[Ke,Te]);break;case"p":Te>Ke&&(i=[Ke,Te])}ls(i),$o(ho),I(on),jl!==0&&I(jl+" J"),oA!==0&&I(oA+" j"),ar.publish("addPage",{pageNumber:Yr})},Zo=function(E){E>0&&E<=Yr&&(Xe.splice(E,1),Gt.splice(E,1),Yr--,K>Yr&&(K=Yr),this.setPage(K))},us=function(E){E>0&&E<=Yr&&(K=E)},oo=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return Xe.length-1},Gi=function(E,q,me){var Te,Ke=void 0;return me=me||{},E=E!==void 0?E:Mt[Ct].fontName,q=q!==void 0?q:Mt[Ct].fontStyle,Te=E.toLowerCase(),Jt[Te]!==void 0&&Jt[Te][q]!==void 0?Ke=Jt[Te][q]:Jt[E]!==void 0&&Jt[E][q]!==void 0?Ke=Jt[E][q]:me.disableWarning===!1&&jn.warn("Unable to look up font label for font '"+E+"', '"+q+"'. Refer to getFontList() for available fonts."),Ke||me.noFallback||(Ke=Jt.times[q])==null&&(Ke=Jt.times.normal),Ke},ks=f.__private__.putInfo=function(){var E=Tn(),q=function(Te){return Te};for(var me in d!==null&&(q=Mr.encryptor(E,0)),I("<<"),I("/Producer ("+Gn(q("jsPDF "+ur.version))+")"),ct)ct.hasOwnProperty(me)&&ct[me]&&I("/"+me.substr(0,1).toUpperCase()+me.substr(1)+" ("+Gn(q(ct[me]))+")");I("/CreationDate ("+Gn(q(ge))+")"),I(">>"),I("endobj")},Wi=f.__private__.putCatalog=function(E){var q=(E=E||{}).rootDictionaryObjId||DA;switch(Tn(),I("<<"),I("/Type /Catalog"),I("/Pages "+q+" 0 R"),Re||(Re="fullwidth"),Re){case"fullwidth":I("/OpenAction [3 0 R /FitH null]");break;case"fullheight":I("/OpenAction [3 0 R /FitV null]");break;case"fullpage":I("/OpenAction [3 0 R /Fit]");break;case"original":I("/OpenAction [3 0 R /XYZ null null 1]");break;default:var me=""+Re;me.substr(me.length-1)==="%"&&(Re=parseInt(Re)/100),typeof Re=="number"&&I("/OpenAction [3 0 R /XYZ null null "+V(Re)+"]")}switch(Je||(Je="continuous"),Je){case"continuous":I("/PageLayout /OneColumn");break;case"single":I("/PageLayout /SinglePage");break;case"two":case"twoleft":I("/PageLayout /TwoColumnLeft");break;case"tworight":I("/PageLayout /TwoColumnRight")}ot&&I("/PageMode /"+ot),ar.publish("putCatalog"),I(">>"),I("endobj")},cs=f.__private__.putTrailer=function(){I("trailer"),I("<<"),I("/Size "+(pe+1)),I("/Root "+pe+" 0 R"),I("/Info "+(pe-1)+" 0 R"),d!==null&&I("/Encrypt "+Mr.oid+" 0 R"),I("/ID [ <"+Fe+"> <"+Fe+"> ]"),I(">>")},lo=f.__private__.putHeader=function(){I("%PDF-"+S),I("%\xBA\xDF\xAC\xE0")},Ns=f.__private__.putXRef=function(){var E="0000000000";I("xref"),I("0 "+(pe+1)),I("0000000000 65535 f ");for(var q=1;q<=pe;q++)typeof Se[q]=="function"?I((E+Se[q]()).slice(-10)+" 00000 n "):Se[q]!==void 0?I((E+Se[q]).slice(-10)+" 00000 n "):I("0000000000 00000 n ")},PA=f.__private__.buildDocument=function(){_e(),G(ye),ar.publish("buildDocument"),lo(),xn(),ss(),MA(),d!==null&&Yo(),ks(),Wi();var E=Ee;return Ns(),cs(),I("startxref"),I(""+E),I("%%EOF"),G(Xe[K]),ye.join(`
`)},Ai=f.__private__.getBlob=function(E){return new Blob([Pe(E)],{type:"application/pdf"})},uo=f.output=f.__private__.output=Vi(function(E,q){switch(typeof(q=q||{})=="string"?q={filename:q}:q.filename=q.filename||"generated.pdf",E){case void 0:return PA();case"save":f.save(q.filename);break;case"arraybuffer":return Pe(PA());case"blob":return Ai(PA());case"bloburi":case"bloburl":if(hr.URL!==void 0&&typeof hr.URL.createObjectURL=="function")return hr.URL&&hr.URL.createObjectURL(Ai(PA()))||void 0;jn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var me="",Te=PA();try{me=fS(Te)}catch{me=fS(unescape(encodeURIComponent(Te)))}return"data:application/pdf;filename="+q.filename+";base64,"+me;case"pdfobjectnewwindow":if(Object.prototype.toString.call(hr)==="[object Window]"){var Ke="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",it=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';q.pdfObjectUrl&&(Ke=q.pdfObjectUrl,it="");var vt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+Ke+'"'+it+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(q)+");<\/script></body></html>",kt=hr.open();return kt!==null&&kt.document.write(vt),kt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(hr)==="[object Window]"){var Vt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(q.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+q.filename+'" width="500px" height="400px" /></body></html>',sr=hr.open();if(sr!==null){sr.document.write(Vt);var tr=this;sr.document.documentElement.querySelector("#pdfViewer").onload=function(){sr.document.title=q.filename,sr.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(tr.output("bloburl"))}}return sr}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(hr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Cr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",q)+'"></iframe></body></html>',Zt=hr.open();if(Zt!==null&&(Zt.document.write(Cr),Zt.document.title=q.filename),Zt||typeof safari>"u")return Zt;break;case"datauri":case"dataurl":return hr.document.location.href=this.output("datauristring",q);default:return null}}),Rl=function(E){return Array.isArray(Vn)===!0&&Vn.indexOf(E)>-1};switch(n){case"pt":xe=1;break;case"mm":xe=72/25.4;break;case"cm":xe=72/2.54;break;case"in":xe=72;break;case"px":xe=Rl("px_scaling")==1?.75:96/72;break;case"pc":case"em":xe=12;break;case"ex":xe=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);xe=n}var Mr=null;ke(),de();var CA=function(E){return d!==null?Mr.encryptor(E,0):function(q){return q}},Pl=f.__private__.getPageInfo=f.getPageInfo=function(E){if(isNaN(E)||E%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Gt[E].objId,pageNumber:E,pageContext:Gt[E]}},nr=f.__private__.getPageInfoByObjId=function(E){if(isNaN(E)||E%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var q in Gt)if(Gt[q].objId===E)break;return Pl(q)},Jo=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:Gt[K].objId,pageNumber:K,pageContext:Gt[K]}};f.addPage=function(){return Xo.apply(this,arguments),this},f.setPage=function(){return us.apply(this,arguments),G.call(this,Xe[K]),this},f.insertPage=function(E){return this.addPage(),this.movePage(K,E),this},f.movePage=function(E,q){var me,Te;if(E>q){me=Xe[E],Te=Gt[E];for(var Ke=E;Ke>q;Ke--)Xe[Ke]=Xe[Ke-1],Gt[Ke]=Gt[Ke-1];Xe[q]=me,Gt[q]=Te,this.setPage(q)}else if(E<q){me=Xe[E],Te=Gt[E];for(var it=E;it<q;it++)Xe[it]=Xe[it+1],Gt[it]=Gt[it+1];Xe[q]=me,Gt[q]=Te,this.setPage(q)}return this},f.deletePage=function(){return Zo.apply(this,arguments),this},f.__private__.text=f.text=function(E,q,me,Te,Ke){var it,vt,kt,Vt,sr,tr,Cr,Zt,kn,Wn=(Te=Te||{}).scope||this;if(typeof E=="number"&&typeof q=="number"&&(typeof me=="string"||Array.isArray(me))){var Li=me;me=q,q=E,E=Li}if(arguments[3]instanceof Xt?(W("The transform parameter of text() with a Matrix value"),kn=Ke):(kt=arguments[4],Vt=arguments[5],sn(Cr=arguments[3])==="object"&&Cr!==null||(typeof kt=="string"&&(Vt=kt,kt=null),typeof Cr=="string"&&(Vt=Cr,Cr=null),typeof Cr=="number"&&(kt=Cr,Cr=null),Te={flags:Cr,angle:kt,align:Vt})),isNaN(q)||isNaN(me)||E==null)throw new Error("Invalid arguments passed Line truncated
`,this.setCharSpace(this.getCharSpace()||0)),(Zt=Te.horizontalScale)!==void 0&&(Rr+=P(100*Zt)+` Tz
`),Te.lang;var Oi=-1,Dc=Te.renderingMode!==void 0?Te.renderingMode:Te.stroke,lA=Wn.internal.getCurrentPageInfo().pageContext;switch(Dc){case 0:case!1:case"fill":Oi=0;break;case 1:case!0:case"stroke":Oi=1;break;case 2:case"fillThenStroke":Oi=2;break;case 3:case"invisible":Oi=3;break;case 4:case"fillAndAddForClipping":Oi=4;break;case 5:case"strokeAndAddPathForClipping":Oi=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Oi=6;break;case 7:case"addToPathForClipping":Oi=7}var Ga=lA.usedRenderingMode!==void 0?lA.usedRenderingMode:-1;Oi!==-1?Rr+=Oi+` Tr
`:Ga!==-1&&(Rr+=`0 Tr
`),Oi!==-1&&(lA.usedRenderingMode=Oi),Vt=Te.align||"left";var On,jr=we*Xi,va=Wn.internal.pageSize.getWidth(),Uu=Mt[Ct];sr=Te.charSpace||ra,tr=Te.maxWidth||0,Cr=Object.assign({autoencode:!0,noBOM:!0},Te.flags);var Hs=[],Ms=function(En){return Wn.getStringUnitWidth(En,{font:Uu,charSpace:sr,fontSize:we,doKerning:!1})*we/ki};if(Object.prototype.toString.call(E)==="[object Array]"){var FA;vt=Vl(E),Vt!=="left"&&(On=vt.map(Ms));var UA,yi=0;if(Vt==="right"){q-=On[0],E=[],Ni=vt.length;for(var He=0;He<Ni;He++)He===0?(UA=gt(q),FA=xt(me)):(UA=_(yi-On[He]),FA=-jr),E.push([vt[He],UA,FA]),yi=On[He]}else if(Vt==="center"){q-=On[0]/2,E=[],Ni=vt.length;for(var nt=0;nt<Ni;nt++)nt===0?(UA=gt(q),FA=xt(me)):(UA=_((yi-On[nt])/2),FA=-jr),E.push([vt[nt],UA,FA]),yi=On[nt]}else if(Vt==="left"){E=[],Ni=vt.length;for(var $e=0;$e<Ni;$e++)E.push(vt[$e])}else if(Vt==="justify"&&Uu.encoding==="Identity-H"){E=[],Ni=vt.length,tr=tr!==0?tr:va;for(var Tt=0,Pt=0;Pt<Ni;Pt++)if(FA=Pt===0?xt(me):-jr,UA=Pt===0?gt(q):Tt,Pt<Ni-1){var Pr=_((tr-On[Pt])/(vt[Pt].split(" ").length-1)),Kr=vt[Pt].split(" ");E.push([Kr[0]+" ",UA,FA]),Tt=0;for(var ir=1;ir<Kr.length;ir++){var Rs=(Ms(Kr[ir-1]+" "+Kr[ir])-Ms(Kr[ir]))*ki+Pr;ir==Kr.length-1?E.push([Kr[ir],Rs,0]):E.push([Kr[ir]+" ",Rs,0]),Tt-=Rs}}else E.push([vt[Pt],UA,FA]);E.push(["",Tt,0])}else{if(Vt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(E=[],Ni=vt.length,tr=tr!==0?tr:va,Pt=0;Pt<Ni;Pt++)FA=Pt===0?xt(me):-jr,UA=Pt===0?gt(q):0,Pt<Ni-1?Hs.push(P(_((tr-On[Pt])/(vt[Pt].split(" ").length-1)))):Hs.push(0),E.push([vt[Pt],UA,FA])}}var Hc=typeof Te.R2L=="boolean"?Te.R2L:We;Hc===!0&&(E=ai(E,function(En,fn,In){return[En.split("").reverse().join(""),fn,In]})),it={text:E,x:q,y:me,options:Te,mutex:{pdfEscape:Gn,activeFontKey:Ct,fonts:Mt,activeFontSize:we}},ar.publish("postProcessText",it),E=it.text,Yn=it.mutex.isHex||!1;var uA=Mt[Ct].encoding;uA!=="WinAnsiEncoding"&&uA!=="StandardEncoding"||(E=ai(E,function(En,fn,In){return[Nn(En),fn,In]})),vt=Vl(E),E=[];for(var Aa,rl,qA,Wa=0,hs=1,Or=Array.isArray(vt[0])?hs:Wa,Ps="",nl=function(En,fn,In){var Fn="";return In instanceof Xt?(In=typeof Te.angle=="number"?aA(In,new Xt(1,0,0,1,En,fn)):aA(new Xt(1,0,0,1,En,fn),In),T===F.ADVANCED&&(In=aA(new Xt(1,0,0,-1,0,0),In)),Fn=In.join(" ")+` Tm
`):Fn=P(En)+" "+P(fn)+` Td
`,Fn},cA=0;cA<vt.length;cA++){switch(Ps="",Or){case hs:qA=(Yn?"<":"(")+vt[cA][0]+(Yn?">":")"),Aa=parseFloat(vt[cA][1]),rl=parseFloat(vt[cA][2]);break;case Wa:qA=(Yn?"<":"(")+vt[cA]+(Yn?">":")"),Aa=gt(q),rl=xt(me)}Hs!==void 0&&Hs[cA]!==void 0&&(Ps=Hs[cA]+` Tw
`),cA===0?E.push(Ps+nl(Aa,rl,kn)+qA):Or===Wa?E.push(Ps+qA):Or===hs&&E.push(Ps+nl(Aa,rl,kn)+qA)}E=Or===Wa?E.join(` Tj
T* `):E.join(` Tj
`),E+=` Tj
`;var aa=`BT
/`;return aa+=Ct+" "+we+` Tf
`,aa+=P(we*Xi)+` TL
`,aa+=Rn+`
`,aa+=Rr,aa+=E,I(aa+="ET"),v[Ct]=!0,Wn};var zl=f.__private__.clip=f.clip=function(E){return I(E==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return zl("evenodd")},f.__private__.discardPath=f.discardPath=function(){return I("n"),this};var xA=f.__private__.isValidStyle=function(E){var q=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(E)!==-1&&(q=!0),q};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(E){return xA(E)&&(c=E),this};var ql=f.__private__.getStyle=f.getStyle=function(E){var q=c;switch(E){case"D":case"S":q="S";break;case"F":q="f";break;case"FD":case"DF":q="B";break;case"f":case"f*":case"B":case"B*":q=E}return q},Qi=f.close=function(){return I("h"),this};f.stroke=function(){return I("S"),this},f.fill=function(E){return Va("f",E),this},f.fillEvenOdd=function(E){return Va("f*",E),this},f.fillStroke=function(E){return Va("B",E),this},f.fillStrokeEvenOdd=function(E){return Va("B*",E),this};var Va=function(E,q){sn(q)==="object"?Xr(q,E):I(E)},co=function(E){E===null||T===F.ADVANCED&&E===void 0||(E=ql(E),I(E))};function Yi(E,q,me,Te,Ke){var it=new ng(q||this.boundingBox,me||this.xStep,Te||this.yStep,this.gState,Ke||this.matrix);it.stream=this.stream;var vt=E+"$$"+this.cloneIndex+++"$$";return vi(vt,it),it}var Xr=function(E,q){var me=Cn[E.key],Te=gr[me];if(Te instanceof Ad)I("q"),I(tn(q)),Te.gState&&f.setGState(Te.gState),I(E.matrix.toString()+" cm"),I("/"+me+" sh"),I("Q");else if(Te instanceof ng){var Ke=new Xt(1,0,0,-1,0,ia());E.matrix&&(Ke=Ke.multiply(E.matrix||Ar),me=Yi.call(Te,E.key,E.boundingBox,E.xStep,E.yStep,Ke).id),I("q"),I("/Pattern cs"),I("/"+me+" scn"),Te.gState&&f.setGState(Te.gState),I(q),I("Q")}},tn=function(E){switch(E){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},fo=f.moveTo=function(E,q){return I(P(_(E))+" "+P(oe(q))+" m"),this},pa=f.lineTo=function(E,q){return I(P(_(E))+" "+P(oe(q))+" l"),this},SA=f.curveTo=function(E,q,me,Te,Ke,it){return I([P(_(E)),P(oe(q)),P(_(me)),P(oe(Te)),P(_(Ke)),P(oe(it)),"c"].join(" ")),this};f.__private__.line=f.line=function(E,q,me,Te,Ke){if(isNaN(E)||isNaN(q)||isNaN(me)||isNaN(Te)||!xA(Ke))throw new Error("Invalid arguments passed to jsPDF.line");return T===F.COMPAT?this.lines([[me-E,Te-q]],E,q,[1,1],Ke||"S"):this.lines([[me-E,Te-q]],E,q,[1,1]).stroke()},f.__private__.lines=f.lines=function(E,q,me,Te,Ke,it){var vt,kt,Vt,sr,tr,Cr,Zt,kn,Wn,Li,Rr,Yn;if(typeof E=="number"&&(Yn=me,me=q,q=E,E=Yn),Te=Te||[1,1],it=it||!1,isNaN(q)||isNaN(me)||!Array.isArray(E)||!Array.isArray(Te)||!xA(Ke)||typeof it!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(fo(q,me),vt=Te[0],kt=Te[1],sr=E.length,Li=q,Rr=me,Vt=0;Vt<sr;Vt++)(tr=E[Vt]).length===2?(Li=tr[0]*vt+Li,Rr=tr[1]*kt+Rr,pa(Li,Rr)):(Cr=tr[0]*vt+Li,Zt=tr[1]*kt+Rr,kn=tr[2]*vt+Li,Wn=tr[3]*kt+Rr,Li=tr[4]*vt+Li,Rr=tr[5]*kt+Rr,SA(Cr,Zt,kn,Wn,Li,Rr));return it&&Qi(),co(Ke),this},f.path=function(E){for(var q=0;q<E.length;q++){var me=E[q],Te=me.c;switch(me.op){case"m":fo(Te[0],Te[1]);break;case"l":pa(Te[0],Te[1]);break;case"c":SA.apply(this,Te);break;case"h":Qi()}}return this},f.__private__.rect=f.rect=function(E,q,me,Te,Ke){if(isNaN(E)||isNaN(q)||isNaN(me)||isNaN(Te)||!xA(Ke))throw new Error("Invalid arguments passed to jsPDF.rect");return T===F.COMPAT&&(Te=-Te),I([P(_(E)),P(oe(q)),P(_(me)),P(_(Te)),"re"].join(" ")),co(Ke),this},f.__private__.triangle=f.triangle=function(E,q,me,Te,Ke,it,vt){if(isNaN(E)||isNaN(q)||isNaN(me)||isNaN(Te)||isNaN(Ke)||isNaN(it)||!xA(vt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[me-E,Te-q],[Ke-me,it-Te],[E-Ke,q-it]],E,q,[1,1],vt,!0),this},f.__private__.roundedRect=f.roundedRect=function(E,q,me,Te,Ke,it,vt){if(isNaN(E)||isNaN(q)||isNaN(me)||isNaN(Te)||isNaN(Ke)||isNaN(it)||!xA(vt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var kt=4/3*(Math.SQRT2-1);return Ke=Math.min(Ke,.5*me),it=Math.min(it,.5*Te),this.lines([[me-2*Ke,0],[Ke*kt,0,Ke,it-it*kt,Ke,it],[0,Te-2*it],[0,it*kt,-Ke*kt,it,-Ke,it],[2*Ke-me,0],[-Ke*kt,0,-Ke,-it*kt,-Ke,-it],[0,2*it-Te],[0,-it*kt,Ke*kt,-it,Ke,-it]],E+Ke,q,[1,1],vt,!0),this},f.__private__.ellipse=f.ellipse=function(E,q,me,Te,Ke){if(isNaN(E)||isNaN(q)||isNaN(me)||isNaN(Te)||!xA(Ke))throw new Error("Invalid arguments passed to jsPDF.ellipse");var it=4/3*(Math.SQRT2-1)*me,vt=4/3*(Math.SQRT2-1)*Te;return fo(E+me,q),SA(E+me,q-vt,E+it,q-Te,E,q-Te),SA(E-it,q-Te,E-me,q-vt,E-me,q),SA(E-me,q+vt,E-it,q+Te,E,q+Te),SA(E+it,q+Te,E+me,q+vt,E+me,q),co(Ke),this},f.__private__.circle=f.circle=function(E,q,me,Te){if(isNaN(E)||isNaN(q)||isNaN(me)||!xA(Te))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(E,q,me,me,Te)},f.setFont=function(E,q,me){return me&&(q=ae(q,me)),Ct=Gi(E,q,{disableWarning:!1}),this};var zA=f.__private__.getFont=f.getFont=function(){return Mt[Gi.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var E,q,m Line truncated
`),A}},pS=function(e,t){var r=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(M){return M.split(`
`)}):i.map(function(M){return[M]});var A=r,a=jt.internal.getHeight(e)||0;a=a<0?-a:a;var s=jt.internal.getWidth(e)||0;s=s<0?-s:s;var l=function(M,_,ie){if(M+1<i.length){var oe=_+" "+i[M+1][0];return py(oe,e,ie).width<=s-4}return!1};A++;e:for(;A>0;){t="",A--;var c,d,g=py("3",e,A).height,v=e.multiline?a-A:(a-g)/2,f=v+=2,S=0,C=0,Q=0;if(A<=0){t=`(...) Tj
`,t+="% Width of Text: "+py(t,e,A=12).width+", FieldWidth:"+s+`
`;break}for(var x="",F=0,T=0;T<i.length;T++)if(i.hasOwnProperty(T)){var R=!1;if(i[T].length!==1&&Q!==i[T].length-1){if((g+2)*(F+2)+2>a)continue e;x+=i[T][Q],R=!0,C=T,T--}else{x=(x+=i[T][Q]+" ").substr(x.length-1)==" "?x.substr(0,x.length-1):x;var Y=parseInt(T),ae=l(Y,x,A),P=T>=i.length-1;if(ae&&!P){x+=" ",Q=0;continue}if(ae||P){if(P)C=Y;else if(e.multiline&&(g+2)*(F+2)+2>a)continue e}else{if(!e.multiline||(g+2)*(F+2)+2>a)continue e;C=Y}}for(var W="",he=S;he<=C;he++){var V=i[he];if(e.multiline){if(he===C){W+=V[Q]+" ",Q=(Q+1)%V.length;continue}if(he===S){W+=V[V.length-1]+" ";continue}}W+=V[0]+" "}switch(W=W.substr(W.length-1)==" "?W.substr(0,W.length-1):W,d=py(W,e,A).width,e.textAlign){case"right":c=s-d-2;break;case"center":c=(s-d)/2;break;case"left":default:c=2}t+=Br(c)+" "+Br(f)+` Td
`,t+="("+sd(W)+`) Tj
`,t+=-Br(c)+` 0 Td
`,f=-(A+2),d=0,S=R?C:C+1,F++,x=""}break}return n.text=t,n.fontSize=A,n},py=function(e,t,r){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},Qre={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Tre=function(e,t){var r={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===r.type&&n.object===r.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},Lre=function(e,t){for(var r in e)if(e.hasOwnProperty(r)){var n=r,i=e[r];t.internal.newObjectDeferredBegin(i.objId,!0),sn(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete e[n]}},kre=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(Il.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(Qre)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");vS=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new $I,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in n)if(n.hasOwnProperty(i)){var A=n[i];A.objId=void 0,A.hasAnnotation&&Tre(A,r)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(r){(function(n,i){var A=!n;for(var a in n||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(a)){var s=n[a],l=[],c=s.Rect;if(s.Rect&&(s.Rect=Ure(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=jt.createDefaultAppearanceStream(s),sn(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(l=s.getKeyValueListForStream()),s.Rect=c,s.hasAppearanceStream&&!s.appearanceStreamContent){var d=_re(s);l.push({key:"AP",value:"<</N "+d+">>"}),i.internal.acroformPlugin.xForms.push(d)}if(s.appearanceStreamContent){var g="";for(var v in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(v)){var f=s.appearanceStreamContent[v];if(g+="/"+v+" ",g+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var a in f)if(f.hasOwnProperty(a)){var S=f[a];typeof S=="function"&&(S=S.call(i,s)),g+="/"+a+" "+S+" ",i.internal.acroformPlugin.xForms.indexOf(S)>=0||i.internal.acroformPlugin.xForms.push(S)}}else typeof(S=f)=="function"&&(S=S.call(i,s)),g+="/"+a+" "+S,i.internal.acroformPlugin.xForms.indexOf(S)>=0||i.internal.acroformPlugin.xForms.push(S);g+=">>"}l.push({key:"AP",value:`<<
`+g+">>"})}i.internal.putStream({additionalKeyValues:l,objectId:s.objId}),i.internal.out("endobj")}A&&Lre(i.internal.acroformPlugin.xForms,i)})(r,e)}),e.internal.acroformPlugin.isInitialized=!0}},ZI=Ki.__acroform__.arrayToPdfArray=function(e,t,r){var n=function(a){return a};if(Array.isArray(e)){for(var i="[",A=0;A<e.length;A++)switch(A!==0&&(i+=" "),sn(e[A])){case"boolean":case"number":case"object":i+=e[A].toString();break;case"string":e[A].substr(0,1)!=="/"?(t!==void 0&&r&&(n=r.internal.getEncryptor(t)),i+="("+sd(n(e[A].toString()))+")"):i+=e[A].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},lS=function(e,t,r){var n=function(i){return i};return t!==void 0&&r&&(n=r.internal.getEncryptor(t)),(e=e||"").toString(),e="("+sd(n(e))+")"},Bu=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Bu.prototype.toString=function(){return this.objId+" 0 R"},Bu.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Bu.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(A){return A!="content"&&A!="appearanceStreamContent"&&A!="scope"&&A!="objId"&&A.substring(0,1)!="_"});for(var r in t)if(Object.getOwnPropertyDescriptor(this,t[r]).configurable===!1){var n=t[r],i=this[n];i&&(Array.isArray(i)?e.push({key:n,value:ZI(i,this.objId,this.scope)}):i instanceof Bu?(i.scope=this.scope,e.push({key:n,value:i.objId+" 0 R"})):typeof i!="function"&&e.push({key:n,value:i}))}return e};var JI=function(){Bu.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){e=r.trim()},get:function(){return e||null}})};_s(JI,Bu);var $I=function(){Bu.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var r=function(n){return n};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+sd(r(e))+")"}},set:function(r){e=r}})};_s($I,Bu);var Il=function e(){Bu.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(x){if(isNaN(x))throw new Error('Invalid value "'+x+'" for attribute F supplied.');t=x}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!tA(t,3)},set:function(x){x?this.F=rA(t,3):this.F=nA(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(x){if(isNaN(x))throw new Error('Invalid value "'+x+'" for attribute Ff supplied.');r=x}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(x){n=x!==void 0?x:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(x){n[0]=x}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(x){n[1]=x}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(x){n[2]=x}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(x){n[3]=x}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(x){switch(x){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=x;break;default:throw new Error('Invalid value "'+x+'" for attribute FT supplied.')}}});var A=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!A||A.length<1){if(this instanceof Cy)return;A="FieldObject"+e.FieldNum++}var x=function(F){return F};return this.scope&&(x=this.scope.internal.getEncryptor(this.objId)),"("+sd(x(A))+")"},set:function(x){A=x.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return A},set:function(x){A=x}});var a="helvetica";Object.defineProperty( Line truncated
`)}},set:function(r){sn(r)==="object"&&(t=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(r){typeof r=="string"&&(t.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(r){e="/"+r}})};_s(JA,Il);var wy=function(){JA.call(this),this.pushButton=!0};_s(wy,JA);var sg=function(){JA.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};_s(sg,JA);var Cy=function(){var e,t;Il.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){e=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(s){return s};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var A,a=[];for(A in a.push("<<"),n)a.push("/"+A+" ("+sd(i(n[A]))+")");return a.push(">>"),a.join(`
`)},set:function(i){sn(i)==="object"&&(n=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(i){typeof i=="string"&&(n.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(i){r="/"+i}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=jt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};_s(Cy,Il),sg.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},sg.prototype.createOption=function(e){var t=new Cy;return t.Parent=this,t.optionName=e,this.Kids.push(t),Nre.call(this.scope,t),t};var yy=function(){JA.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=jt.CheckBox.createAppearanceStream()};_s(yy,JA);var ad=function(){Il.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,13)},set:function(t){t?this.Ff=rA(this.Ff,13):this.Ff=nA(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,21)},set:function(t){t?this.Ff=rA(this.Ff,21):this.Ff=nA(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,23)},set:function(t){t?this.Ff=rA(this.Ff,23):this.Ff=nA(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,24)},set:function(t){t?this.Ff=rA(this.Ff,24):this.Ff=nA(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,25)},set:function(t){t?this.Ff=rA(this.Ff,25):this.Ff=nA(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,26)},set:function(t){t?this.Ff=rA(this.Ff,26):this.Ff=nA(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};_s(ad,Il);var By=function(){ad.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!tA(this.Ff,14)},set:function(e){e?this.Ff=rA(this.Ff,14):this.Ff=nA(this.Ff,14)}}),this.password=!0};_s(By,ad);var jt={CheckBox:{createAppearanceStream:function(){return{N:{On:jt.CheckBox.YesNormal},D:{On:jt.CheckBox.YesPushDown,Off:jt.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=yu(e);t.scope=e.scope;var r=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),A=pS(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+Br(jt.internal.getWidth(e))+" "+Br(jt.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+Br(A.fontSize)+" Tf "+i),r.push("BT"),r.push(A.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join(`
`),t},YesNormal:function(e){var t=yu(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),i=[],A=jt.internal.getHeight(e),a=jt.internal.getWidth(e),s=pS(e,e.caption);return i.push("1 g"),i.push("0 0 "+Br(a)+" "+Br(A)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Br(a-1)+" "+Br(A-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+Br(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=yu(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Br(jt.internal.getWidth(e))+" "+Br(jt.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:jt.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=jt.RadioButton.Circle.YesNormal,t.D[e]=jt.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=yu(e);t.scope=e.scope;var r=[],n=jt.internal.getWidth(e)<=jt.internal.getHeight(e)?jt.internal.getWidth(e)/4:jt.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=jt.internal.Bezier_C,A=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+Pf(jt.internal.getWidth(e)/2)+" "+Pf(jt.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+A+" "+A+" "+n+" 0 "+n+" c"),r.push("-"+A+" "+n+" -"+n+" "+A+" -"+n+" 0 c"),r.push("-"+n+" -"+A+" -"+A+" -"+n+" 0 -"+n+" c"),r.push(A+" -"+n+" "+n+" -"+A+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
`),t},YesPushDown:function(e){var t=yu(e);t.scope=e.scope;var r=[],n=jt.internal.getWidth(e)<=jt.internal.getHeight(e)?jt.internal.getWidth(e)/4:jt.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),A=Number((i*jt.internal.Bezier_C).toFixed(5)),a=Number((n*jt.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Pf(jt.internal.getWidth(e)/2)+" "+Pf(jt.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+A+" "+A+" "+i+" 0 "+i+" c"),r.push("-"+A+" "+i+" -"+i+" "+A+" -"+i+" 0 c"),r.push("-"+i+" -"+A+" -"+A+" -"+i+" 0 -"+i+" c"),r.push(A+" -"+i+" "+i+" -"+A+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+Pf(jt.internal.getWidth(e)/2)+" "+Pf(jt.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=yu(e);t.scope=e.scope;var r=[],n=jt.internal.getWidth(e)<=jt.internal.getHeight(e)?jt.internal.getWidth(e)/4:jt.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),A=Number((i*jt.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Pf(jt.internal.getWidth(e)/2)+" "+Pf(jt.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+A+" "+A+" "+i+" 0 "+i+" c"),r.push("-"+A+" "+i+" -"+i+" "+A+" -"+i+" 0 c"),r.push("-"+i+" -"+A+" -"+A+" -"+i+" 0 -"+i+" c"),r.push(A+" -"+i+" "+i+" -"+A+" "+i+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:jt.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=jt.RadioButton.Cross.YesNormal,t.D[e]=jt.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=yu(e);t.scope=e.scope;var r=[],n=jt.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+Br(jt.internal.getWidth(e)-2)+" "+Br(jt.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(Br(n.x1.x)+" "+Br(n.x1.y)+" m"),r.push(Br(n.x2.x)+" "+Br(n.x2.y)+" l"),r.push(Br(n.x4.x)+" "+Br(n.x4.y)+" m"),r.push(Br(n.x3.x)+" "+Br(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
`),t},YesPushDown:function(e){var t=yu(e);t.scope=e.scope;var r=jt.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+Br(jt.internal.getWidth(e))+" "+Br(jt.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Br(jt.internal.getWidth(e)-2)+" "+Br(jt.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Br(r.x1.x)+" "+Br(r.x1.y)+" m"),n.push(Br(r.x2.x)+" "+Br(r.x2.y)+" l"),n.push(Br(r.x4.x)+" "+Br(r.x4.y)+" m"),n.push(Br(r.x3.x)+" "+Br(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=yu(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Br(jt.internal.getWidth(e))+" "+Br(jt.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};jt.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=jt.internal.getWidth(e),r=jt.internal.getHeight(e),n=Math.min(t,r);return{x1:{x:(t-n)/2,y:(r-n)/2+n},x2:{x:(t-n)/2+n,y:(r-n)/2},x3:{x:(t-n)/2,y:(r-n)/2},x4:{x:(t-n)/2+n,y:(r-n)/2+n}}}},jt.internal.getWidth=function(e){var t=0;return sn(e)==="object"&&(t=OI(e.Rect[2])),t},jt.internal.getHeight=function(e){var t=0;return sn(e)==="object"&&(t=OI(e.Rect[3])),t};var Nre=Ki.addField=function(e){if(kre(this,e),!(e instanceof Il))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Ki.AcroFormChoiceField=ig,Ki.AcroFormListBox=Ag,Ki.AcroFormComboBox=ag,Ki.AcroFormEditBox=vy,Ki.AcroFormButton=JA,Ki.AcroFormPushButton=wy,Ki.AcroFormRadioButton=sg,Ki.AcroFormCheckBox=yy,Ki.AcroFormTextField=ad,Ki.AcroFormPasswordField=By,Ki.AcroFormAppearance=jt,Ki.AcroForm={ChoiceField:ig,ListBox:Ag,ComboBox:ag,EditBox:vy,Button:JA,PushButton:wy,RadioButton:sg,CheckBox:yy,TextField:ad,PasswordField:By,Appearance:jt},ur.AcroForm={ChoiceField:ig,ListBox:Ag,ComboBox:ag,EditBox:vy,Button:JA,PushButton:wy,RadioButton:sg,CheckBox:yy,TextField:ad,PasswordField:By,Appearance:jt};var pde=ur.AcroForm;function eD(e){return e.reduce(function(t,r,n){return t[r]=n,t},{})}(function(e){e.__addimage__={};var t="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=e.__addimage__.getImageFileTypeByImageData=function(M,_){var ie,oe,ge,Fe,Be,de=t;if((_=_||t)==="RGBA"||M.data!==void 0&&M.data instanceof Uint8ClampedArray&&"height"in M&&"width"in M)return"RGBA";if(ae(M))for(Be in r)for(ge=r[Be],ie=0;ie<ge.length;ie+=1){for(Fe=!0,oe=0;oe<ge[ie].length;oe+=1)if(ge[ie][oe]!==void 0&&ge[ie][oe]!==M[oe]){Fe=!1;break}if(Fe===!0){de=Be;break}}else for(Be in r)for(ge=r[Be],ie=0;ie<ge.length;ie+=1){for(Fe=!0,oe=0;oe<ge[ie].length;oe+=1)if(ge[ie][oe]!==void 0&&ge[ie][oe]!==M.charCodeAt(oe)){Fe=!1;break}if(Fe===!0){de=Be;break}}return de===t&&_!==t&&(de=_),de},i=function M(_){for(var ie=this.internal.write,oe=this.internal.putStream,ge=(0,this.internal.getFilters)();ge.indexOf("FlateEncode")!==-1;)ge.splice(ge.indexOf("FlateEncode"),1);_.objectId=this.internal.newObject();var Fe=[];if(Fe.push({key:"Type",value:"/XObject"}),Fe.push({key:"Subtype",value:"/Image"}),Fe.push({key:"Width",value:_.width}),Fe.push({key:"Height",value:_.height}),_.colorSpace===Q.INDEXED?Fe.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(_.palette.length/3-1)+" "+("sMask"in _&&_.sMask!==void 0?_.objectId+2:_.objectId+1)+" 0 R]"}):(Fe.push({key:"ColorSpace",value:"/"+_.colorSpace}),_.colorSpace===Q.DEVICE_CMYK&&Fe.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),Fe.push({key:"BitsPerComponent",value:_.bitsPerComponent}),"decodeParameters"in _&&_.decodeParameters!==void 0&&Fe.push({key:"DecodeParms",value:"<<"+_.decodeParameters+">>"}),"transparency"in _&&Array.isArray(_.transparency)){for(var Be="",de=0,X=_.transparency.length;de<X;de++)Be+=_.transparency[de]+" "+_.transparency[de]+" ";Fe.push({key:"Mask",value:"["+Be+"]"})}_.sMask!==void 0&&Fe.push({key:"SMask",value:_.objectId+1+" 0 R"});var Z=_.filter!==void 0?["/"+_.filter]:void 0;if(oe({data:_.data,additionalKeyValues:Fe,alreadyAppliedFilters:Z,objectId:_.objectId}),ie("endobj"),"sMask"in _&&_.sMask!==void 0){var ke="/Predictor "+_.predictor+" /Colors 1 /BitsPerComponent "+_.bitsPerComponent+" /Columns "+_.width,D={width:_.width,height:_.height,colorSpace:"DeviceGray",bitsPerComponent:_.bitsPerComponent,decodeParameters:ke,data:_.sMask};"filter"in _&&(D.filter=_.filter),M.call(this,D)}if(_.colorSpace===Q.INDEXED){var K=this.internal.newObject();oe({data:W(new Uint8Array(_.palette)),objectId:K}),ie("endobj")}},A=function(){var M=this.internal.collections.addImage_images;for(var _ in M)i.call(this,M[_])},a=function(){var M,_=this.internal.collections.addImage_images,ie=this.internal.write;for(var oe in _)ie("/I"+(M=_[oe]).index,M.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",A),this.internal.events.subscribe("putXobjectDict",a))},l=function(){var M=this.internal.collections.addImage_images;return s. Line truncated
`},r.outline.makeRef=function(n){return n.id+" 0 R"},r.outline.makeString=function(n){return"("+r.internal.pdfEscape(n)+")"},r.outline.objStart=function(n){this.ctx.val+=`\r
`+n.id+` 0 obj\r
<<\r
`},r.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},r.outline.count_r=function(n,i){for(var A=0;A<i.children.length;A++)n.count++,this.count_r(n,i.children[A]);return n.count}}])}(ur.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(r,n,i,A,a,s){var l,c=this.decode.DCT_DECODE,d=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=a||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,(l=function(g){for(var v,f=256*g.charCodeAt(4)+g.charCodeAt(5),S=g.length,C={width:0,height:0,numcomponents:1},Q=4;Q<S;Q+=2){if(Q+=f,t.indexOf(g.charCodeAt(Q+1))!==-1){v=256*g.charCodeAt(Q+5)+g.charCodeAt(Q+6),C={width:256*g.charCodeAt(Q+7)+g.charCodeAt(Q+8),height:v,numcomponents:g.charCodeAt(Q+9)};break}f=256*g.charCodeAt(Q+2)+g.charCodeAt(Q+3)}return C}(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r)).numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}d={data:r,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:c,index:n,alias:i}}return d}}(ur.API);var eg,my,zI,qI,jI,Rre=function(){var e,t,r;function n(A){var a,s,l,c,d,g,v,f,S,C,Q,x,F,T;for(this.data=A,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},g=null;;){switch(a=this.readUInt32(),S=function(){var R,Y;for(Y=[],R=0;R<4;++R)Y.push(String.fromCharCode(this.data[this.pos++]));return Y}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(a);break;case"fcTL":g&&this.animation.frames.push(g),this.pos+=4,g={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},d=this.readUInt16(),c=this.readUInt16()||100,g.delay=1e3*d/c,g.disposeOp=this.data[this.pos++],g.blendOp=this.data[this.pos++],g.data=[];break;case"IDAT":case"fdAT":for(S==="fdAT"&&(this.pos+=4,a-=4),A=g?.data||this.imgData,x=0;0<=a?x<a:x>a;0<=a?++x:--x)A.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(l=this.palette.length/3,this.transparency.indexed=this.read(a),this.transparency.indexed.length>l)throw new Error("More transparent colors than palette size");if((C=l-this.transparency.indexed.length)>0)for(F=0;0<=C?F<C:F>C;0<=C?++F:--F)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(a)[0];break;case 2:this.transparency.rgb=this.read(a)}break;case"tEXt":v=(Q=this.read(a)).indexOf(0),f=String.fromCharCode.apply(String,Q.slice(0,v)),this.text[f]=String.fromCharCode.apply(String,Q.slice(v+1));break;case"IEND":return g&&this.animation.frames.push(g),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=(T=this.colorType)===4||T===6,s=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*s,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=a}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(A){var a,s;for(s=[],a=0;0<=A?a<A:a>A;0<=A?++a:--a)s.push(this.data[this.pos++]);return s},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(A){var a=this.pixelBitlength/8,s=new Uint8Array(this.width*this.height*a),l=0,c=this;if(A==null&&(A=this.imgData),A.length===0)return new Uint8Array(0);function d(g,v,f,S){var C,Q,x,F,T,R,Y,ae,P,W,he,V,M,_,ie,oe,ge,Fe,Be,de,X,Z=Math.ceil((c.width-g)/f),ke=Math.ceil((c.height-v)/S),D=c.width==Z&&c.height==ke;for(_=a*Z,V=D?s:new Uint8Array(_*ke),R=A.length,M=0,Q=0;M<ke&&l<R;){switch(A[l++]){case 0:for(F=ge=0;ge<_;F=ge+=1)V[Q++]=A[l++];break;case 1:for(F=Fe=0;Fe<_;F=Fe+=1)C=A[l++],T=F<a?0:V[Q-a],V[Q++]=(C+T)%256;break;case 2:for(F=Be=0;Be<_;F=Be+=1)C=A[l++],x=(F-F%a)/a,ie=M&&V[(M-1)*_+x*a+F%a],V[Q++]=(ie+C)%256;break;case 3:for(F=de=0;de<_;F=de+=1)C=A[l++],x=(F-F%a)/a,T=F<a?0:V[Q-a],ie=M&&V[(M-1)*_+x*a+F%a],V[Q++]=(C+Math.floor((T+ie)/2))%256;break;case 4:for(F=X=0;X<_;F=X+=1)C=A[l++],x=(F-F%a)/a,T=F<a?0:V[Q-a],M===0?ie=oe=0:(ie=V[(M-1)*_+x*a+F%a],oe=x&&V[(M-1)*_+(x-1)*a+F%a]),Y=T+ie-oe,ae=Math.abs(Y-T),W=Math.abs(Y-ie),he=Math.abs(Y-oe),P=ae<=W&&ae<=he?T:W<=he?ie:oe,V[Q++]=(C+P)%256;break;default:throw new Error("Invalid filter algorithm: "+A[l-1])}if(!D){var K Line truncated
`:"")+Y})):F.push(R[0])}),C=F,l=zI.apply(this,[x,r])}for(A=0,a=C.length;A<a;A++){var T=0;if(n=C[A],l&&n[0]==`
`&&(n=n.substr(1),T=1),v+f+(S=(i=my.apply(this,[n,r])).reduce(function(R,Y){return R+Y},0))>t||T){if(S>t){for(s=qI.apply(this,[n,i,t-(v+f),t]),d.push(s.shift()),d=[s.pop()];s.length;)g.push([s.shift()]);S=i.slice(n.length-(d[0]?d[0].length:0)).reduce(function(R,Y){return R+Y},0)}else d=[n];g.push(d),v=S+l,f=Q}else d.push(n),v+=f+S,f=Q}return c=l?function(R,Y){return(Y?x:"")+R.join(" ")}:function(R){return R.join(" ")},g.map(c)},eg.splitTextToSize=function(e,t,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),A=function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var g=this.internal.getFont(d.fontName,d.fontStyle);return g.metadata.Unicode?{widths:g.metadata.Unicode.widths||{0:1},kerning:g.metadata.Unicode.kerning||{}}:{font:g.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var a=1*this.internal.scaleFactor*t/i;A.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,A.lineIndent=r.lineIndent;var s,l,c=[];for(s=0,l=n.length;s<l;s++)c=c.concat(jI.apply(this,[n[s],a,A]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",r={},n={},i=0;i<t.length;i++)r[t[i]]="0123456789abcdef"[i],n["0123456789abcdef"[i]]=t[i];var A=function(g){return"0x"+parseInt(g,10).toString(16)},a=e.__fontmetrics__.compress=function(g){var v,f,S,C,Q=["{"];for(var x in g){if(v=g[x],isNaN(parseInt(x,10))?f="'"+x+"'":(x=parseInt(x,10),f=(f=A(x).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof v=="number")v<0?(S=A(v).slice(3),C="-"):(S=A(v).slice(2),C=""),S=C+S.slice(0,-1)+n[S.slice(-1)];else{if(sn(v)!=="object")throw new Error("Don't know what to do with value type "+sn(v)+".");S=a(v)}Q.push(f+S)}return Q.push("}"),Q.join("")},s=e.__fontmetrics__.uncompress=function(g){if(typeof g!="string")throw new Error("Invalid argument passed to uncompress.");for(var v,f,S,C,Q={},x=1,F=Q,T=[],R="",Y="",ae=g.length-1,P=1;P<ae;P+=1)(C=g[P])=="'"?v?(S=v.join(""),v=void 0):v=[]:v?v.push(C):C=="{"?(T.push([F,S]),F={},S=void 0):C=="}"?((f=T.pop())[0][f[1]]=F,S=void 0,F=f[0]):C=="-"?x=-1:S===void 0?r.hasOwnProperty(C)?(R+=r[C],S=parseInt(R,16)*x,x=1,R=""):R+=C:r.hasOwnProperty(C)?(Y+=r[C],F[S]=parseInt(Y,16)*x,x=1,S=void 0,Y=""):Y+=C;return Q},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},d={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w Line truncated
<<
`+C.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},function(e){var t=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',i=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),A=unescape(encodeURIComponent(n)),a=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),s=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),l=unescape(encodeURIComponent("</x:xmpmeta>")),c=A.length+a.length+s.length+i.length+l.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+c+" >>"),this.internal.write("stream"),this.internal.write(i+A+a+s+l),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(n,i){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:i||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",t)),this}}(ur.API),function(e){var t=e.API,r=t.pdfEscape16=function(A,a){for(var s,l=a.metadata.Unicode.widths,c=["","0","00","000","0000"],d=[""],g=0,v=A.length;g<v;++g){if(s=a.metadata.characterToGlyph(A.charCodeAt(g)),a.metadata.glyIdsUsed.push(s),a.metadata.toUnicode[s]=A.charCodeAt(g),l.indexOf(s)==-1&&(l.push(s),l.push([parseInt(a.metadata.widthOfGlyph(s),10)])),s=="0")return d.join("");s=s.toString(16),d.push(c[4-s.length],s)}return d.join("")},n=function(A){var a,s,l,c,d,g,v;for(d=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,l=[],g=0,v=(s=Object.keys(A).sort(function(f,S){return f-S})).length;g<v;g++)a=s[g],l.length>=100&&(d+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar`,l=[]),A[a]!==void 0&&A[a]!==null&&typeof A[a].toString=="function"&&(c=("0000"+A[a].toString(16)).slice(-4),a=("0000"+(+a).toString(16)).slice(-4),l.push("<"+a+"><"+c+">"));return l.length&&(d+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar
`),d+=`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(A){(function(a){var s=a.font,l=a.out,c=a.newObject,d=a.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="Identity-H"){for(var g=s.metadata.Unicode.widths,v=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),f="",S=0;S<v.length;S++)f+=String.fromCharCode(v[S]);var C=c();d({data:f,addLength1:!0,objectId:C}),l("endobj");var Q=c();d({data:n(s.metadata.toUnicode),addLength1:!0,objectId:Q}),l("endobj");var x=c();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+rg(s.fontName)),l("/FontFile2 "+C+" 0 R"),l("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),l("/Flags "+s.metadata.flags),l("/StemV "+s.metadata.stemV),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l(">>"),l("endobj");var F=c();l("<<"),l("/Type /Font"),l("/BaseFont /"+rg(s.fontName)),l("/FontDescriptor "+x+" 0 R"),l("/W "+e.API.PDFObject.convert(g)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+s.encoding+")"),l(">>"),l(">>"),l("endobj"),s.objectNumber=c(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+Q+" 0 R"),l("/BaseFont /"+rg(s.fontName)),l("/Encoding /"+s.encoding),l("/DescendantFonts ["+F+" 0 R]"),l(">>"),l("endobj"),s.isAlreadyPutted=!0}})(A)}]),t.events.push(["putFont",function(A){(function(a){var s=a.font,l=a.out,c=a.newObject,d=a.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var g=s.metadata.rawData,v="",f=0;f<g.length;f++)v+=String.fromCharCode(g[f]);var S=c();d({data:v,addLength1:!0,objectId:S}),l("endobj");var C=c();d({data:n(s.metadata.toUnicode),addLength1:!0,objectId:C}),l("endobj");var Q=c();l("<<"),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l("/StemV "+s.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+S+" 0 R"),l("/Flags 96"),l("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),l("/FontName /"+rg(s.fontName)),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l(">>"),l("endobj"),s.objectNumber=c();for(var x=0;x<s.metadata.hmtx.widths.length;x++)s.metadata.hmtx.widths[x]=parseInt(s.metadata.hmtx.widths[x]*(1e3/s.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+C+" 0 R/BaseFont/"+rg(s.fontName)+"/FontDescriptor "+Q+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),l("endobj"),s.isAlreadyPutted=!0}})(A)}]);var i=function(A){var a,s=A.text||"",l=A.x,c=A.y,d=A.options||{},g=A.mutex||{},v=g.pdfEscape,f=g.activeFontKey,S=g.fonts,C=f,Q="",x=0,F="",T=S[C].encoding;if(S[C].encoding!=="Identity-H")return{text:s,x:l,y:c,options:d,mutex:g};for(F=s,C=f,Array.isArray(s)&&(F=s[0]),x=0;x<F.length;x+=1)S[C].metadata.hasOwnProperty("cmap")&&(a=S[C].metadata.cmap.unicode.codeMap[F[x].charCodeAt(0)]),a||F[x].charCodeAt(0)<256&&S[C].metadata.hasOwnProperty("Unicode")?Q+=F[x]:Q+="";var R="";return parseInt(C.slice(1))<14||T==="WinAnsiEncoding"?R=v(Q,C).split("").map(function(Y){return Y.charCodeAt(0).toString(16)}).join(""):T==="Identity-H"&&(R=r(Q,S[C])),g.isHex=!0,{text:R,x:l,y:c,options:d,mutex:g}};t.events.push(["postProcessText",function(A){var a=A.text||"",s=[],l={text:a,x:A.x,y:A.y,options:A.options,mutex:A.mutex};if(Array.isArray(a)){var c=0;for(c=0;c<a.length;c+=1)Array.isArray(a[c])&&a[c].length===3?s.push([i(Object.assign({},l,{text:a[c][0]})).text,a[c][1],a[c][2]]):s.push(i(Object.assign({},l,{text:a[c]})).text);A.text=s}else A.text=i(Object.assign({},l,{text:a})).text}])}(ur),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0},e.addFileToVFS=function(r,n){return t.call(this),this.internal.vFS[r]=n,this},e.getFileFromVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}}(ur.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(n){var i,A,a,s,l,c,d,g=t,v=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],S={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},C={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},Q=["(",")","(","<",">","<","[","]","[","{","}","{","\xAB","\xBB","\xAB","\u2039","\u203A","\u2039","\u2045","\u2046","\u2045","\u207D","\u207E","\u207D","\u208D","\u208E","\u208D","\u2264","\u2265","\u2264","\u2329","\u232A","\u2329","\uFE59","\uFE5A","\uFE59","\uFE5B","\uFE5C","\uFE5B","\uFE5D","\uFE5E","\uFE5D","\uFE64","\uFE65","\uFE64"],x=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),F=!1,T=0;this.__bidiEngine__={};var R=function(M){var _=M.charCodeAt(),ie=_>>8,oe=C[ie];return oe!==void 0?g[256*oe+(255&_)]:ie===252||ie===253?"AL":x Line truncated
`)}return""+r},t}();var wS=ur;var _D=yr(sD()),QD=yr(oD());var fg=require("obsidian"),ED=yr(_a()),FD=yr(_p());var cn=yr(_a());var Nc=yr(_a());var nne=Object.defineProperty,lD=Object.getOwnPropertySymbols,ine=Object.prototype.hasOwnProperty,Ane=Object.prototype.propertyIsEnumerable,CS=(e,t,r)=>t in e?nne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xS=(e,t)=>{for(var r in t||(t={}))ine.call(t,r)&&CS(e,r,t[r]);if(lD)for(var r of lD(t))Ane.call(t,r)&&CS(e,r,t[r]);return e},ao=(e,t,r)=>(CS(e,typeof t!="symbol"?t+"":t,r),r),uD=(e,t,r)=>new Promise((n,i)=>{var A=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(A,a);s((r=r.apply(e,t)).next())}),ane={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},og="data-watermark-tag",cD={childList:!0,subtree:!0,attributeFilter:["style","class",og]};function sne(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function one(e){return e.split("-").slice(1).reduce((t,r,n)=>n===0?r:`${t}${r[0].toUpperCase()+r.slice(1)}`)}var ev=e=>{let t="";return Object.keys(e).forEach(r=>{let n=r.replace(/([A-Z])/g,"-$1").toLowerCase();t+=`${n}:${e[r]};`}),t},lne=e=>window.btoa(decodeURI(encodeURIComponent(e))),une=(e="")=>`${lne(e)}-${new Date().getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`,cne=(e,t,r={},n)=>{let i;if(typeof e=="string"){if(i=document.getElementById(e),!i)throw new Error(`\u6C34\u5370\u6302\u8F7D\u8282\u70B9\u672A\u627E\u5230\uFF0C\u8BF7\u68C0\u67E5#${e}\u662F\u5426\u5B58\u5728`)}else i=e??document.body;i.setAttribute(og,t);let A=xS({position:"relative"},r);return n||delete A.position,i.setAttribute("style",ev(A)),i};var fne=e=>{let t=document.createElement("div");return t.setAttribute("style",ev({pointerEvents:"none"})),t.setAttribute(og,e),t};function hne(e){let{text:t,gapX:r,gapY:n,offsetTop:i,offsetLeft:A,width:a,height:s,rotate:l,opacity:c,fontSize:d,fontStyle:g,fontVariant:v,fontWeight:f,fontFamily:S,fontColor:C,textAlign:Q,textBaseline:x,image:F,blindText:T,blindFontSize:R,blindOpacity:Y}=e;return new Promise((ae,P)=>{let W=document.createElement("canvas"),he=W.getContext("2d"),V=1,M=(Number(r)+Number(a))*V,_=(Number(n)+Number(s))*V,ie=Number(A)||Number(r)/2,oe=Number(i)||Number(n)/2;if(W.setAttribute("width",`${M}px`),W.setAttribute("height",`${_}px`),he){let Fe=a*V,Be=s*V;if(he.translate(ie*V,oe*V),he.rotate(Math.PI/180*Number(l)),T&&(he.globalAlpha=Y,he.font=`${R}px normal`,he.fillText(T,0,0)),he.globalAlpha=c,F){let ne=new Image;ne.crossOrigin="anonymous",ne.referrerPolicy="no-referrer",ne.src=F,ne.onload=()=>{he.drawImage(ne,0,0,Fe,Be),ae({url:he.canvas.toDataURL(),width:M,height:_})};return}let de=Array.isArray(t)?t:[t],X=de.map(ne=>he.measureText(ne).width),Z=Math.max(...X),ke=Number(d)*V;he.textAlign=Q,he.textBaseline=x,he.fillStyle=C,he.font=ge(`${ke}px`),Z>a&&(he.font=ge(`${ke/2}px`));let D=ke+5,K=(Be-(d*de.length+(de.length-1)*5))/2;K=K<0?0:K;for(let ne=0;ne<de.length;ne++)he.fillText(de[ne]||"",Fe/2,K+D*ne);ae({url:he.canvas.toDataURL(),width:M,height:_})}function ge(Fe){return`${g} ${v} ${f} ${Fe} ${S}`}return P()})}var fD=sne(),hD=class{constructor(e={}){ao(this,"options"),ao(this,"container"),ao(this,"watermarkContent"),ao(this,"watermarkDom"),ao(this,"style"),ao(this,"watermarkTag"),ao(this,"shadowRoot"),ao(this,"mutationObserver"),ao(this,"_isAgainRender",t=>!!(t.type==="attributes"&&(t.attributeName===og||this.watermarkTag===this._getNodeRandomId(t.target))||t.removedNodes.length&&this.watermarkTag===this._getNodeRandomId(t.removedNodes[0]))),ao(this,"_getNodeRandomId",t=>{var r;return(r=t?.dataset)==null?void 0:r[one(og)]}),ao(this,"_destroyMutationObserver",()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)}),ao(this,"_getWatermarkDom",t=>uD(this,null,function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),typeof t=="number"&&t&&(this.style.height=`${t}px`);let r=yield hne(this.options);if(r?.url){let n=r.url;this.options.mode==="repeat"?this.style.backgroundImage=`url(${n})`:(this.style.backgroundImage=`url(${n}), url(${n})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${r.width/2}px ${r.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",ev(this.style))}return this.watermarkDom.setAttribute(og,this.watermarkTag),this.watermarkDom})),ao(this,"_getWatermarkHeight",()=>{if(!this.container)return 0;let t=0,{scrollHeight:r=0,clientHeight:n=0}=this.options.container?this.container.parentNode:this.container;return r>n&&(t=M Line truncated
`,`some content...
`,`some content...
`,`some content...
`].join(`
`),r,"/",new Iy.MarkdownRenderChild(r));let n=(0,hR.createRoot)(e);return i=>{n.render(Hl.default.createElement(Zae,{setting:i,el:r}))}};var Dy=class{app;plugin;containerEl;settingItems;constructor(t,r,n){this.app=t,this.plugin=r,this.containerEl=n}getSettingValue(t){return t.split(".").reduce((r,n)=>r&&typeof r=="object"?r[n]:void 0,this.plugin.settings)}async updateSetting(t,r){let n=t.split("."),i=n.pop(),A=n.reduce((a,s)=>(s in a||(a[s]={}),a[s]),this.plugin.settings);A[i]=r,await this.plugin.saveSettings(),await this.render(void 0)}async render(t){t&&t.length>0&&(this.settingItems=t),this.containerEl.empty(),this.containerEl.createEl("h3",{text:et.setting.title()}),this.containerEl.createEl("p",{text:"Github: "}).createEl("a",{text:"zhouhua/obsidian-export-image",attr:{href:"https://github.com/zhouhua/obsidian-export-image",target:"_blank"}}),this.settingItems.forEach(i=>{if(i.show&&!i.show(this.plugin.settings))return;let A=new mg.Setting(this.containerEl).setName(i.label);switch(i.description&&A.setDesc(i.description),i.type){case"text":A.addText(a=>{a.setValue(this.getSettingValue(i.id)??"").onChange(async s=>{await this.updateSetting(i.id,s)})});break;case"number":A.addText(a=>{a.inputEl.type="number",a.setValue(String(this.getSettingValue(i.id)??"")).setPlaceholder(i.placeholder??"").onChange(async s=>{await this.updateSetting(i.id,s?Number(s):void 0)})});break;case"toggle":A.addToggle(a=>{a.setValue(this.getSettingValue(i.id)??!1).onChange(async s=>{await this.updateSetting(i.id,s)})});break;case"dropdown":i.options&&A.addDropdown(a=>{a.addOptions(Object.fromEntries(i.options.map(s=>[s.value,s.text]))).setValue(this.getSettingValue(i.id)).onChange(async s=>{await this.updateSetting(i.id,s)})});break;case"color":A.addColorPicker(a=>{a.setValue(this.getSettingValue(i.id)??i.defaultValue).onChange(async s=>{await this.updateSetting(i.id,s)})});break;case"file":{let a=createDiv({cls:"setting-item-control",attr:{style:"display: flex; flex-direction: column; align-items: flex-end; gap: 8px"}}),s=a.createDiv({attr:{style:"display: flex; gap: 8px"}}),l=s.createDiv({cls:"user-info-avatar",attr:{style:`position: relative; display: ${this.getSettingValue(i.id)?"block":"none"}`}});this.getSettingValue(i.id)&&l.createEl("img",{attr:{src:this.getSettingValue(i.id),alt:"preview",style:"width: 100%; height: 100%; object-fit: cover"}});let c=l.createDiv({attr:{style:`
position: absolute;
top: -10px;
right: -10px;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
background-color: black;
border-radius: 50%;
cursor: pointer;
--icon-size: 12px;
--icon-color: var(--color-red);
color: white;
`}});(0,mg.setIcon)(c,"x"),c.onclick=async()=>{await this.updateSetting(i.id,void 0)};let d=createEl("input",{attr:{type:"file",style:"display: none"}}),g=s.createEl("button",{text:et.setting.watermark.image.src.upload()});g.onclick=()=>d.click(),d.onchange=async()=>{let S=d.files?.[0];if(S){let C=await oc(S);await this.updateSetting(i.id,C),d.value=""}};let v=s.createEl("button",{text:et.setting.watermark.image.src.select()});v.onclick=()=>{let S=new od(this.app,async C=>{await this.updateSetting(i.id,C),S.close()});S.open()};let f=s.createEl("button",{text:et.imageUrl()});f.onclick=async()=>{let S=this.getSettingValue(i.id)||"",C=new mg.Modal(this.app);C.titleEl.setText(et.imageUrl());let x=C.contentEl.createDiv({attr:{style:"margin: 1em 0;"}}).createEl("input",{attr:{type:"text",placeholder:et.imageUrl(),style:"width: 100%"}});x.onkeydown=async R=>{R.key==="Enter"?(await this.updateSetting(i.id,x.value),C.close()):R.key==="Escape"&&C.close()};let F=C.contentEl.createDiv({cls:"modal-button-container",attr:{style:"display: flex; justify-content: flex-end; gap: 8px; margin-top: 1em;"}}),T=F.createEl("button",{text:et.confirm(),cls:"mod-cta"});T.onclick=async()=>{await this.updateSetting(i.id,x.value),C.close()},F.createEl("button",{text:et.cancel()}).onclick=()=>{C.close()},C.open(),setTimeout(()=>x.focus(),0)},A.settingEl.appendChild(a);break}}});let r=this.containerEl.createDiv();(await dR(r,this.app))(this.plugin.settings)}};var WS=yr(_a()),xu=require("obsidian"),YS=yr(_p());var Cu=require("obsidian"),kr=yr(_a());var ni=yr(_a()),Go=function(e,t){return Number(e.toFixed(t))},Jae=function(e,t){return typeof e=="number"?e:t},mi=function(e,t,r){r&&typeof r=="function"&&r(e,t)},$ae=function(e){return-Math.cos(e*Math.PI)/2+.5},ese=function(e){return e},tse=function(e){return e*e},rse=function(e){return e*(2-e)},nse=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},ise=function(e){return e*e*e},Ase=function(e){return--e*e*e+1},ase=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},sse=function(e){return e*e*e*e},ose=function(e){return 1- --e*e*e*e},lse=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},use=function(e){return e*e*e*e*e},cse=function(e){return 1+--e*e*e*e*e},fse=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},CR={easeOut:$ae,linear:ese,easeInQuad:tse,easeOutQuad:rse,easeInOutQuad:nse,easeInCubic:ise,easeOutCubic:Ase,easeInOutCubic:ase,easeInQuart:sse,easeOutQuart:ose,easeInOutQuart:lse,easeInQuint:use,easeOutQuint:cse,easeInOutQuint:fse},xR=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Ml=function(e){e.mounted&&(xR(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function SR(e,t,r,n){if(e.mounted){var i=new Date().getTime(),A=1;Ml(e),e.animation=function(){if(!e.mounted)return xR(e.animation);var a=new Date().getTime()-i,s=a/r,l=CR[t],c=l(s);a>=r?(n(A),e.animation=null):e.animation&&(n(c),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function hse(e){var t=e.scale,r=e.positionX,n=e.positionY;return!(Number.isNaN(t)||Number.isNaN(r)||Number.isNaN(n))}function Vf(e,t,r,n){var i=hse(t);if(!(!e.mounted||!i)){var A=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,c=a.positionY,d=t.scale-s,g=t.positionX-l,v=t.positionY-c;r===0?A(t.scale,t.positionX,t.positionY):SR(e,n,r,function(f){var S=s+d*f,C=l+g*f,Q=c+v*f;A(S,C,Q)})}}function dse(e,t,r){var n=e.offsetWidth,i=e.offsetHeight,A=t.offsetWidth,a=t.offsetHeight,s=A*r,l=a*r,c=n-s,d=i-l;return{wrapperWidth:n,wrapperHeight:i,newContentWidth:s,newDiffWidth:c,newContentHeight:l,newDiffHeight:d}}var pse=function(e,t,r,n,i,A,a){var s=e>t?r*(a?1:.5):0,l=n>i?A*(a?1:.5):0,c=e-t-s,d=s,g=n-i-l,v=l;return{minPositionX:c,maxPositionX:d,minPositionY:g,maxPositionY:v}},jS=function(e,t){var r=e.wrapperComponent,n=e.contentComponent,i=e.setup.centerZoomedOut;if(!r||!n)throw new Error("Components are not mounted");var A=dse(r,n,t),a=A.wrapperWidth,s=A.wrapperHeight,l=A.newContentWidth,c=A.newDiffWidth,d=A.newContentHeight,g=A.newDiffHeight,v=pse(a,l,c,s,d,g,!!i);return v},RS=function(e,t,r,n){return n?e<t?Go(t,2):e>r?Go(r,2):Go(e,2):Go(e,2)},ld=function(e,t){var r=jS(e,t);return e.bounds=r,r};function uv(e,t,r,n,i,A,a){var s=r.minPositionX,l=r.minPositionY,c=r.maxPositionX,d=r.maxPositionY,g=0,v=0;a&&(g=i,v=A);var f=RS(e,s-g,c+g,n),S=RS(t,l-v,d+v,n);return{x:f,y:S}}function Ry(e,t,r,n,i,A){var a=e.transformState,s=a.scale,l=a.positionX,c=a.positionY,d=n-s;if(typeof t!="number"||typeof r!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:c};var g=l-t*d,v=c-r*d,f=uv(g,v,i,A,0,0,null);return f}function cv(e,t,r,n,i){var A=i?n:0,a=t-A;return!Number.isNaN(r)&&e>=r?r:!Number.isNaN(t)&&e<=a?a:e}var pR=function(e,t){var r=e.setup.panning.excluded,n=e.isInitialized,i=e.wrapperComponent,A=t.target,a="shadowRoot"in A&&"composedPath"in t,s=a?t.composedPath().some(function(d){return d instanceof Element?i?.contains(d):!1}):i?.contains(A),l=n&&A&&s;if(!l)return!1;var c=Py(A Line truncated
position: relative;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
overflow: hidden;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
margin: 0;
padding: 0;
transform: translate3d(0, 0, 0);
}
.transform-component-module_content__FBWxo {
display: flex;
flex-wrap: wrap;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
margin: 0;
padding: 0;
transform-origin: 0% 0%;
}
.transform-component-module_content__FBWxo img {
pointer-events: none;
}
`,bR={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};soe(ooe);var HR=function(e){var t=e.children,r=e.wrapperClass,n=r===void 0?"":r,i=e.contentClass,A=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=e.wrapperProps,c=l===void 0?{}:l,d=e.contentProps,g=d===void 0?{}:d,v=(0,ni.useContext)(GS),f=v.init,S=v.cleanupWindowEvents,C=(0,ni.useRef)(null),Q=(0,ni.useRef)(null);return(0,ni.useEffect)(function(){var x=C.current,F=Q.current;return x!==null&&F!==null&&f&&f?.(x,F),function(){S?.()}},[]),ni.default.createElement("div",jf({},c,{ref:C,className:"".concat(PS.wrapperClass," ").concat(bR.wrapper," ").concat(n),style:a}),ni.default.createElement("div",jf({},g,{ref:Q,className:"".concat(PS.contentClass," ").concat(bR.content," ").concat(A),style:s}),t))};var loe=[{label:et.includingFilename(),path:"showFilename",type:"boolean"},{label:et.imageWidth(),path:"width",type:"number"},{path:"split.mode",label:et.setting.split.mode.label(),desc:et.setting.split.mode.description(),type:"select",options:[{text:et.setting.split.mode.none(),value:"none"},{text:et.setting.split.mode.fixed(),value:"fixed"},{text:et.setting.split.mode.hr(),value:"hr"},{text:et.setting.split.mode.auto(),value:"auto"}]},{path:"split.height",desc:et.setting.split.height.description(),label:et.setting.split.height.label(),type:"number",when:e=>e.split.mode!=="none"&&e.split.mode!=="hr"},{path:"split.overlap",desc:et.setting.split.overlap.description(),label:et.setting.split.overlap.label(),type:"number",when:e=>e.split.mode==="fixed"},{label:et.setting.userInfo.show(),path:"authorInfo.show",type:"boolean"},{label:et.setting.userInfo.name(),path:"authorInfo.name",type:"string",when:{flag:!0,path:"authorInfo.show"}},{label:et.setting.userInfo.remark(),path:"authorInfo.remark",type:"string",when:{flag:!0,path:"authorInfo.show"}},{label:et.setting.userInfo.avatar.title(),desc:et.setting.userInfo.avatar.description(),path:"authorInfo.avatar",type:"file",when:{flag:!0,path:"authorInfo.show"}},{label:et.setting.userInfo.align(),path:"authorInfo.align",type:"select",options:[{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}],when:{flag:!0,path:"authorInfo.show"}},{label:et.setting.userInfo.position(),path:"authorInfo.position",type:"select",options:[{text:"Top",value:"top"},{text:"Bottom",value:"bottom"}],when:{flag:!0,path:"authorInfo.show"}},{label:et.setting.watermark.enable.label(),path:"watermark.enable",type:"boolean"},{label:et.setting.watermark.type.label(),path:"watermark.type",type:"select",options:[{text:et.setting.watermark.type.text(),value:"text"},{text:et.setting.watermark.type.image(),value:"image"}],when:{flag:!0,path:"watermark.enable"}},{label:et.setting.watermark.text.content(),path:"watermark.text.content",type:"string",when:e=>e.watermark.enable&&e.watermark.type==="text"},{label:et.setting.watermark.image.src.label(),path:"watermark.image.src",type:"file",when:e=>e.watermark.enable&&e.watermark.type==="image"},{label:et.setting.watermark.opacity(),path:"watermark.opacity",type:"number",when:{flag:!0,path:"watermark.enable"}},{label:et.setting.watermark.rotate(),path:"watermark.rotate",type:"number",when:{flag:!0,path:"watermark.enable"}},{label:et.setting.watermark.width(),path:"watermark.width",type:"number",when:{flag:!0,path:"watermark.enable"}},{label:et.setting.watermark.height(),path:"watermark.height",type:"number",when:{flag:!0,path:"watermark.enable"}}],uoe=({markdownEl:e,settings:t,app:r,frontmatter:n,title:i,metadataMap:A})=>{let[a,s]=(0,kr.useState)(t),[l,c]=(0,kr.useState)(!1),d=(0,kr.useRef)(null),g=Math.min(764,window.innerHeight*.85-225),v=(0,kr.useRef)(null);(0,kr.useEffect)(()=>{s(t)},[t]);let[f,S]=(0,kr.useState)(!1),[C,Q]=(0,kr.useState)(!0),[x,F]=(0,kr.useState)(0),[T,R]=(0,kr.useState)(1),[Y,ae]=(0,kr.useState)(1),P=(0,kr.useCallback)(()=>{if(!v.current?.element||!d.current)return 1;let _=v.current.element.clientHeight,ie=v.current.element.clientWidth,oe=d.current.clientWidth;return Math.min(1,g/(_||100),oe/((ie||0)+2))/2},[g]);(0,kr.useEffect)(()=>{if(!v.current?.element||f)return;let _=new ResizeObserver(()=>{v.current?.element&&(f||F(v.current.element.clientHeight))});return _.observe(v.current.element),()=>{_.disconnect()}},[v.current?.element,f]);let W=(0,kr.useCallback)(_=>{R(_.length+1)},[]);(0,kr.useEffect)(()=>{a.split.mode==="none"&&R(1)},[a.split.mode]),(0,kr.useEffect)(()=>{u3(a.format).then(_=>{Q(!!_)})},[a.format]);let he=(0,kr.useCallback)(async()=>{if((a.width||640)<=20){new Cu.Notice(et.invalidWidth());return}if(v.current){S(!0);try{await TD(r,v.current.contentElement,i,a["2x"],a.format,Cu.Platform.isMobile)}catch{new Cu.Notice(et.saveFail())}S(!1)}},[v,a["2x"],a.format,i,a.width]),V=(0,kr.useCallback)(async()=>{if((a.width||640)<=20){new Cu.Notice(et.invalidWidth());return}if(v.current){S(!0);try{await Qy(v.current.contentElement,a["2x"],a.format)}catch{new Cu.Notice(et.copyFail())}S(!1)}},[v,a["2 Line truncated
/* nosourcemap */
+11
View File
@@ -0,0 +1,11 @@
{
"id": "obsidian-export-image",
"name": "Export Image plugin",
"version": "2.4.4",
"minAppVersion": "1.4.0",
"description": "Easily convert your article to image.",
"author": "Zhou Hua",
"authorUrl": "",
"isDesktopOnly": false,
"sponsor": "https://ko-fi.com/zhouhua"
}
+249
View File
@@ -0,0 +1,249 @@
/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
.export-image-preview-container {
pointer-events: none;
}
.export-image-root .obsidian-banner-wrapper {
margin-top: 0 !important;
padding-top: 0;
}
.export-image-root .markdown-preview-view:has(.obsidian-banner-wrapper) {
padding-top: calc(var(--banner-height) + var(--size-4-6));
}
.export-image-root.markdown-reading-view {
container-type: normal !important;
}
.export-image-root pre {
overflow: hidden;
}
.export-image-preview-main {
display: flex;
margin: 20px 0;
flex-wrap: nowrap;
--line-height-tight: 20px;
}
.export-image-preview-left {
width: 50%;
padding: 20px;
overflow-y: auto;
font-size: 14px;
line-height: 28px;
box-sizing: border-box;
}
.export-image-preview-right {
width: 50%;
padding: 20px;
box-sizing: border-box;
}
@media (max-width: 1000px) {
.export-image-preview-main {
flex-wrap: wrap;
}
.export-image-preview-left {
width: 100%;
}
.export-image-preview-right {
width: 100%;
}
}
.export-image-preview-out {
width: 100%;
transition: width 0.25s;
background-size: 20px 20px;
background-position: 0 0, 10px 10px;
background-image: linear-gradient(
45deg,
var(--background-modifier-border) 25%,
transparent 25%,
transparent 75%,
var(--background-modifier-border) 75%
),
linear-gradient(
45deg,
var(--background-modifier-border) 25%,
transparent 25%,
transparent 75%,
var(--background-modifier-border) 75%
);
}
.export-image-preview-root .info-text {
line-height: 20px;
opacity: 0.6;
font-size: 12px;
margin-top: 16px;
}
.export-image-root .user-info-container {
display: flex;
padding: 16px 32px;
alignitems: center;
}
.user-info-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
border: 1px solid var(--background-modifier-border);
background-size: cover;
margin: 0 20px;
}
.export-image-root .user-info-name {
font-size: 16px;
padding-bottom: 6px;
}
.export-image-root .user-info-remark {
opacity: 0.5;
font-size: 12px;
white-space: nowrap;
}
.export-image-preview-actions {
display: flex;
align-items: start;
justify-content: center;
}
.export-image-preview-actions button {
margin: 0 32px;
}
.export-image-preview-actions p {
margin: 5px 0 0 0;
font-size: 12px;
color: var(--color-red);
text-align: center;
}
.export-image-root .multi-select-pill-content {
margin: 0 6px;
}
.export-image-root .metadata-property-name {
padding: var(--size-4-1) var(--size-4-2);
text-overflow: ellipsis;
overflow: hidden;
height: var(--input-height);
}
.export-image-select-photo {
padding: 20px;
display: flex;
flex-direction: column;
}
.export-image-select-photo-main {
margin-top: 20px;
border-radius: 8px;
border: 1px solid var(--background-modifier-border);
display: flex;
}
.export-image-select-photo-left {
border-right: 1px solid var(--background-modifier-border);
height: 300px;
overflow-y: auto;
flex: 1;
font-size: 14px;
line-height: 28px;
padding: 8px;
word-break: keep-all;
overflow-x: hidden;
}
.export-image-select-item {
cursor: pointer;
text-overflow: ellipsis;
white-space: nowrap;
overflow-x: hidden;
}
.export-image-select-empty {
text-align: center;
font-size: 16px;
margin-top: 50px;
opacity: 0.8;
}
.export-image-select-preview {
padding: 20px;
height: 300px;
width: 200px;
display: flex;
justify-content: center;
align-items: center;
}
.export-image-select-selected {
font-size: 12px;
margin-top: 8px;
opacity: 0.7;
}
.export-image-select-actions {
margin-top: 40px;
display: flex;
justify-content: center;
}
.export-image-setting-preview-mock {
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
}
.export-image-progress-bar {
max-width: 320px;
width: 100%;
height: var(--size-4-2);
border-radius: var(--radius-s);
background-color: var(--background-secondary);
box-shadow: inset 0 0 0 1px var(--background-modifier-border);
}
.export-image-progress-bar-inner {
width: 0;
height: 100%;
border-radius: var(--radius-s);
background-color: var(--interactive-accent);
transition: width 0.6s;
}
.export-image-preview-file-item {
display: flex;
align-items: center;
padding-top: 10px;
}
.export-image-select-all {
font-weight: bolder;
padding-bottom: 10px;
border-bottom: 1px solid var(--background-modifier-border);
}
.export-image-filename {
padding-left: 10px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.export-image-select-number {
flex-grow: 1;
text-align: right;
}
.export-image-hidden {
position: fixed;
top: 9999px;
width: auto;
height: auto;
}
.export-image-split-hr hr {
opacity: 0;
height: 0;
}
@@ -402,6 +402,21 @@
"id": "d269fae7-4936-4664-811c-bc6583185ffb",
"createdAt": 1751625572933,
"updatedAt": 1751625572933
},
{
"isEncrypted": 1,
"EncryptedData": "e05eb4ba4a7ac5c44a8740f974728a25:4e73c21d8f1bf647d788f4dcbfe9afbe4a6e37b293d8687c53c583f772ab249634863d80fa13b71d29fea8700fbc424fd987770aaafd5c778c8dc36ca7cf40ec867f5d7f10eaa8b1ec0091731637bc2fd591f39ca2b565592f181977685602d424175eae8f344c2bdd9ba99ae5dbe75122ccb3c51e22a4457d81a61f7b6020259f540ce57dd13de4f680f00bbda9a0cab5b7d2ee7806966522b424358c0c9643dd3fb3872fc01f8bff4382f3c8d137a00147a2331a46982d2f4a5f8aea7379ffabf1f870e13f8a0cec016a5e46e430608c2c47000b61d2b7af631299fecfa3a967ad689ac67895e41005bad8506140b7d71303be468ebef4b028be43a173419765d40e1f7fd34d5aadf5ad55e46627329dc81e36f0f54a5e2c10cd8dd3cb67f6104e82ef0e79094f604c7a075df7cc28634556aa76135bb5e4d640d6aec37748521ab79f33720dda7776463f2e8fdc4b13a05fc343c38f365c0e4bae952d4175778e627c27850ffce752229ae9ac6308857687296f93a1c784e37c99e77e607298cac490339a447cdf54a874845d48a854b05927df80e41b7a6a16dbdb1fee6a017b63fd2fc3cab5f871dfbc39b76ebcc4245f8b124aed72f551c7ca420102fb24d0a0f7d3fecfaa2a9236c3d42dadded2ce1de68f87e3fefe96b484a9d46ce652646c3d73ed4017947d0a3d34d61d6fa8d0e8b647a5f2665fa3c129b9d0afd3e53893bd2f6c507763feda48ee3a4651a6d8ff8fe3ef43197356b77eea29f3fd05644203a350f3748cd989847ae6538c1dae19e6655aa9abf46654bf19bd634c3ec5e155786cacc77e881a3f52f60ea1e0010b7a4db01d926bb128c4b430a3a7a3643813523dc492a7655e7e4f1ef91578eb9b62d49021a258528aed48df45b7f69a82362684cd687eb8e7b1583d022f",
"fileName": "image.png",
"width": 1958,
"height": 718,
"extname": ".png",
"imgUrl": "https://joyimg.cpolar.top/i/2025/07/05/68691ee74ca1b.png",
"hash": "YRySHB",
"type": "lskyplist",
"shortUrl": "https://joyimg.cpolar.top/i/2025/07/05/68691ee74ca1b.png",
"id": "a3a9fb7a-74a0-49ae-8f68-311aefc5c8b9",
"createdAt": 1751719655573,
"updatedAt": 1751719655573
}
]
}
+234
View File
@@ -0,0 +1,234 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var Dd=Object.create;var Ai=Object.defineProperty;var Id=Object.getOwnPropertyDescriptor;var Fd=Object.getOwnPropertyNames;var Ld=Object.getPrototypeOf,Pd=Object.prototype.hasOwnProperty;var z=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Oe=(n,e)=>{for(var t in e)Ai(n,t,{get:e[t],enumerable:!0})},cs=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Fd(e))!Pd.call(n,r)&&r!==t&&Ai(n,r,{get:()=>e[r],enumerable:!(i=Id(e,r))||i.enumerable});return n};var Jr=(n,e,t)=>(t=n!=null?Dd(Ld(n)):{},cs(e||!n||!n.__esModule?Ai(t,"default",{value:n,enumerable:!0}):t,n)),Md=n=>cs(Ai({},"__esModule",{value:!0}),n);var Po=z((fw,ql)=>{"use strict";ql.exports=Ch;function Ch(n,e){for(var t=new Array(arguments.length-1),i=0,r=2,o=!0;r<arguments.length;)t[i++]=arguments[r++];return new Promise(function(s,l){t[i]=function(p){if(o)if(o=!1,p)l(p);else{for(var m=new Array(arguments.length-1),g=0;g<m.length;)m[g++]=arguments[g];s.apply(null,m)}};try{n.apply(e||null,t)}catch(c){o&&(o=!1,l(c))}})}});var Zl=z(zl=>{"use strict";var Ji=zl;Ji.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&e.charAt(t)==="=";)++i;return Math.ceil(e.length*3)/4-i};var Tn=new Array(64),Yl=new Array(123);for(Ze=0;Ze<64;)Yl[Tn[Ze]=Ze<26?Ze+65:Ze<52?Ze+71:Ze<62?Ze-4:Ze-59|43]=Ze++;var Ze;Ji.encode=function(e,t,i){for(var r=null,o=[],a=0,s=0,l;t<i;){var c=e[t++];switch(s){case 0:o[a++]=Tn[c>>2],l=(c&3)<<4,s=1;break;case 1:o[a++]=Tn[l|c>>4],l=(c&15)<<2,s=2;break;case 2:o[a++]=Tn[l|c>>6],o[a++]=Tn[c&63],s=0;break}a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0)}return s&&(o[a++]=Tn[l],o[a++]=61,s===1&&(o[a++]=61)),r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var Wl="invalid encoding";Ji.decode=function(e,t,i){for(var r=i,o=0,a,s=0;s<e.length;){var l=e.charCodeAt(s++);if(l===61&&o>1)break;if((l=Yl[l])===void 0)throw Error(Wl);switch(o){case 0:a=l,o=1;break;case 1:t[i++]=a<<2|(l&48)>>4,a=l,o=2;break;case 2:t[i++]=(a&15)<<4|(l&60)>>2,a=l,o=3;break;case 3:t[i++]=(a&3)<<6|l,o=0;break}}if(o===1)throw Error(Wl);return i-r};Ji.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var Vl=z((mw,Gl)=>{"use strict";Gl.exports=Qi;function Qi(){this._listeners={}}Qi.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this};Qi.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var i=this._listeners[e],r=0;r<i.length;)i[r].fn===t?i.splice(r,1):++r;return this};Qi.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],r=1;r<arguments.length;)i.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,i)}return this}});var nc=z((hw,tc)=>{"use strict";tc.exports=Kl(Kl);function Kl(n){return typeof Float32Array!="undefined"?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),i=t[3]===128;function r(l,c,p){e[0]=l,c[p]=t[0],c[p+1]=t[1],c[p+2]=t[2],c[p+3]=t[3]}function o(l,c,p){e[0]=l,c[p]=t[3],c[p+1]=t[2],c[p+2]=t[1],c[p+3]=t[0]}n.writeFloatLE=i?r:o,n.writeFloatBE=i?o:r;function a(l,c){return t[0]=l[c],t[1]=l[c+1],t[2]=l[c+2],t[3]=l[c+3],e[0]}function s(l,c){return t[3]=l[c],t[2]=l[c+1],t[1]=l[c+2],t[0]=l[c+3],e[0]}n.readFloatLE=i?a:s,n.readFloatBE=i?s:a}():function(){function e(i,r,o,a){var s=r<0?1:0;if(s&&(r=-r),r===0)i(1/r>0?0:2147483648,o,a);else if(isNaN(r))i(2143289344,o,a);else if(r>34028234663852886e22)i((s<<31|2139095040)>>>0,o,a);else if(r<11754943508222875e-54)i((s<<31|Math.round(r/1401298464324817e-60))>>>0,o,a);else{var l=Math.floor(Math.log(r)/Math.LN2),c=Math.round(r*Math.pow(2,-l)*8388608)&8388607;i((s<<31|l+127<<23|c)>>>0,o,a)}}n.writeFloatLE=e.bind(null,Xl),n.writeFloatBE=e.bind(null,Jl);function t(i,r,o){var a=i(r,o),s=(a>>31)*2+1,l=a>>>23&255,c=a&8388607;return l===255?c?NaN:s*(1/0):l===0?s*1401298464324817e-60*c:s*Math.pow(2,l-150)*(c+8388608)}n.readFloatLE=t.bind(null,Ql),n.readFloatBE=t.bind(null,ec)}(),typeof Float64Array!="undefined"?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),i=t[7]===128;function r(l,c,p){e[0]=l,c[p]=t[0],c[p+1]=t[1],c[p+2]=t[2],c[p+3]=t[3],c[p+4]=t[4],c[p+5]=t[5],c[p+6]=t[6],c[p+7]=t[7]}function o(l,c,p){e[0]=l,c[p]=t[7],c[p+1]=t[6],c[p+2]=t[5],c[p+3]=t[4],c[p+4]=t[3],c[p+5]=t[2],c[p+6]=t[1],c[p+7]=t[0]}n.writeDoubleLE=i?r:o,n.writeDoubleBE=i?o:r;function a(l,c){return t[0]=l[c],t[1]=l[c+1],t[2]=l[c+2],t[3]=l[c+3],t[4]=l[c+4],t[5]=l[c+5],t[6]=l[c+6],t[7]=l[c+7],e[0]}function s(l,c){return t[7]=l[c],t[6]=l[c+1],t[5]=l[c+2],t[4]=l[c+3],t[3]=l[c+4],t[2]=l[c+5],t[1]=l[c+6],t[0]=l[c+7],e[0]}n.readDoubleLE=i?a:s,n.readDoubleBE=i?s:a}():function(){function e(i,r,o,a,s,l){var c=a<0?1:0;if(c&&(a=-a),a===0)i(0,s,l+r),i(1/a>0?0:2147483648,s,l+o);else if(isNaN(a))i(0,s,l+r),i(2146959360,s,l+o);else if(a>17976931348623157e292)i(0,s,l+r),i((c<<31|2146435072)>>>0,s,l+o);else{var p;if(a<2225073Line truncated
`+t.join(`
`)+`
}`}return i.toString=r,i}Xo.verbose=!1});var Mc=z((Rw,Pc)=>{"use strict";Pc.exports=si;var Uh=Po(),jh=Mo(),Jo=jh("fs");function si(n,e,t){return typeof e=="function"?(t=e,e={}):e||(e={}),t?!e.xhr&&Jo&&Jo.readFile?Jo.readFile(n,function(r,o){return r&&typeof XMLHttpRequest!="undefined"?si.xhr(n,e,t):r?t(r):t(null,e.binary?o:o.toString("utf8"))}):si.xhr(n,e,t):Uh(si,this,n,e)}si.xhr=function(e,t,i){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState===4){if(r.status!==0&&r.status!==200)return i(Error("status "+r.status));if(t.binary){var a=r.response;if(!a){a=[];for(var s=0;s<r.responseText.length;++s)a.push(r.responseText.charCodeAt(s)&255)}return i(null,typeof Uint8Array!="undefined"?new Uint8Array(a):a)}return i(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}});var Uc=z(Bc=>{"use strict";var ea=Bc,$c=ea.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},Qo=ea.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),i=$c(e),r="";i&&(r=t.shift()+"/");for(var o=0;o<t.length;)t[o]===".."?o>0&&t[o-1]!==".."?t.splice(--o,2):i?t.splice(o,1):++o:t[o]==="."?t.splice(o,1):++o;return r+t.join("/")};ea.resolve=function(e,t,i){return i||(t=Qo(t)),$c(t)?t:(i||(e=Qo(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?Qo(e+"/"+t):t)}});var an=z(jc=>{"use strict";var li=jc,Hh=be(),qh=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function ci(n,e){var t=0,i={};for(e|=0;t<n.length;)i[qh[t+e]]=n[t++];return i}li.basic=ci([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);li.defaults=ci([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",Hh.emptyArray,null]);li.long=ci([0,0,0,1,1],7);li.mapKey=ci([0,0,0,5,5,0,0,0,1,1,0,2],2);li.packed=ci([1,5,0,0,0,5,5,0,0,0,1,1,0])});var It=z((Dw,Wc)=>{"use strict";Wc.exports=je;var rr=sn();((je.prototype=Object.create(rr.prototype)).constructor=je).className="Field";var Hc=Ke(),qc=an(),fe=be(),ta,Wh=/^required|optional|repeated$/;je.fromJSON=function(e,t){return new je(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)};function je(n,e,t,i,r,o,a){if(fe.isObject(i)?(a=r,o=i,i=r=void 0):fe.isObject(r)&&(a=o,o=r,r=void 0),rr.call(this,n,o),!fe.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!fe.isString(t))throw TypeError("type must be a string");if(i!==void 0&&!Wh.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(r!==void 0&&!fe.isString(r))throw TypeError("extend must be a string");i==="proto3_optional"&&(i="optional"),this.rule=i&&i!=="optional"?i:void 0,this.type=t,this.id=e,this.extend=r||void 0,this.required=i==="required",this.optional=!this.required,this.repeated=i==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=fe.Long?qc.long[t]!==void 0:!1,this.bytes=t==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=a}Object.defineProperty(je.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}});je.prototype.setOption=function(e,t,i){return e==="packed"&&(this._packed=null),rr.prototype.setOption.call(this,e,t,i)};je.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return fe.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])};je.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=qc.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof ta?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof Hc&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof Hc))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=fe.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var e;fe.base64.test(this.typeDefault)?fe.base64.decode(this.typeDefault,e=fe.newBuffer(fe.base64.length(this.typeDefault)),0):fe.utf8.write(this.typeDefault,e=fe.newBuffer(fe.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=fe.emptyObject:this.repeated?this.defaultValue=fe.emptyArray:this.defaultValue=this.typeDefault Line truncated
`,t:" "};function kp(n){return n.replace(kg,function(e,t){switch(t){case"\\":case"":return t;default:return Ng[t]||""}})}Np.unescape=kp;function Np(n,e){n=n.toString();var t=0,i=n.length,r=1,o=0,a={},s=[],l=null;function c(A){return Error("illegal "+A+" (line "+r+")")}function p(){var A=l==="'"?vg:wg;A.lastIndex=t-1;var O=A.exec(n);if(!O)throw c("string");return t=A.lastIndex,d(l),l=null,kp(O[1])}function m(A){return n.charAt(A)}function g(A,O,T){var k={type:n.charAt(A++),lineEmpty:!1,leading:T},w;e?w=2:w=3;var D=A-w,C;do if(--D<0||(C=n.charAt(D))===`
`){k.lineEmpty=!0;break}while(C===" "||C===" ");for(var N=n.substring(A,O).split(Tg),P=0;P<N.length;++P)N[P]=N[P].replace(e?_g:Eg,"").trim();k.text=N.join(`
`).trim(),a[r]=k,o=r}function b(A){var O=E(A),T=n.substring(A,O),k=/^\s*\/\//.test(T);return k}function E(A){for(var O=A;O<i&&m(O)!==`
`;)O++;return O}function f(){if(s.length>0)return s.shift();if(l)return p();var A,O,T,k,w,D=t===0;do{if(t===i)return null;for(A=!1;Ag.test(T=m(t));)if(T===`
`&&(D=!0,++r),++t===i)return null;if(m(t)==="/"){if(++t===i)throw c("comment");if(m(t)==="/")if(e){if(k=t,w=!1,b(t-1)){w=!0;do if(t=E(t),t===i||(t++,!D))break;while(b(t))}else t=Math.min(i,E(t)+1);w&&(g(k,t,D),D=!0),r++,A=!0}else{for(w=m(k=t+1)==="/";m(++t)!==`
`;)if(t===i)return null;++t,w&&(g(k,t-1,D),D=!0),++r,A=!0}else if((T=m(t))==="*"){k=t+1,w=e||m(k)==="*";do{if(T===`
`&&++r,++t===i)throw c("comment");O=T,T=m(t)}while(O!=="*"||T!=="/");++t,w&&(g(k,t-2,D),D=!0),A=!0}else return"/"}}while(A);var C=t;Ta.lastIndex=0;var N=Ta.test(m(C++));if(!N)for(;C<i&&!Ta.test(m(C));)++C;var P=n.substring(t,t=C);return(P==='"'||P==="'")&&(l=P),P}function d(A){s.push(A)}function h(){if(!s.length){var A=f();if(A===null)return null;d(A)}return s[0]}function v(A,O){var T=h(),k=T===A;if(k)return f(),!0;if(!O)throw c("token '"+T+"', '"+A+"' expected");return!1}function _(A){var O=null,T;return A===void 0?(T=a[r-1],delete a[r-1],T&&(e||T.type==="*"||T.lineEmpty)&&(O=T.leading?T.text:null)):(o<A&&h(),T=a[A],delete a[A],T&&!T.lineEmpty&&(e||T.type==="/")&&(O=T.leading?null:T.text)),O}return Object.defineProperty({next:f,peek:h,push:d,skip:v,cmnt:_},"line",{get:function(){return r}})}});var Fp=z((Xw,Ip)=>{"use strict";Ip.exports=gt;gt.filename=null;gt.defaults={keepCase:!1};var Sg=Aa(),Rp=yr(),Op=mr(),Cp=It(),Rg=lr(),Dp=An(),Og=Ke(),Cg=pr(),Dg=cr(),ka=an(),Na=be(),Ig=/^[1-9][0-9]*$/,Fg=/^-?[1-9][0-9]*$/,Lg=/^0[x][0-9a-fA-F]+$/,Pg=/^-?0[x][0-9a-fA-F]+$/,Mg=/^0[0-7]+$/,$g=/^-?0[0-7]+$/,Bg=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,at=/^[a-zA-Z_][a-zA-Z_0-9]*$/,st=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,Ug=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function gt(n,e,t){e instanceof Rp||(t=e,e=new Rp),t||(t=gt.defaults);var i=t.preferTrailingComment||!1,r=Sg(n,t.alternateCommentMode||!1),o=r.next,a=r.push,s=r.peek,l=r.skip,c=r.cmnt,p=!0,m,g,b,E,f=!1,d=e,h=t.keepCase?function(x){return x}:Na.camelCase;function v(x,S,I){var F=gt.filename;return I||(gt.filename=null),Error("illegal "+(S||"token")+" '"+x+"' ("+(F?F+", ":"")+"line "+r.line+")")}function _(){var x=[],S;do{if((S=o())!=='"'&&S!=="'")throw v(S);x.push(o()),l(S),S=s()}while(S==='"'||S==="'");return x.join("")}function A(x){var S=o();switch(S){case"'":case'"':return a(S),_();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return T(S,!0)}catch(I){if(x&&st.test(S))return S;throw v(S,"value")}}function O(x,S){var I,F;do S&&((I=s())==='"'||I==="'")?x.push(_()):x.push([F=k(o()),l("to",!0)?k(o()):F]);while(l(",",!0));l(";")}function T(x,S){var I=1;switch(x.charAt(0)==="-"&&(I=-1,x=x.substring(1)),x){case"inf":case"INF":case"Inf":return I*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(Ig.test(x))return I*parseInt(x,10);if(Lg.test(x))return I*parseInt(x,16);if(Mg.test(x))return I*parseInt(x,8);if(Bg.test(x))return I*parseFloat(x);throw v(x,"number",S)}function k(x,S){switch(x){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!S&&x.charAt(0)==="-")throw v(x,"id");if(Fg.test(x))return parseInt(x,10);if(Pg.test(x))return parseInt(x,16);if($g.test(x))return parseInt(x,8);throw v(x,"id")}function w(){if(m!==void 0)throw v("package");if(m=o(),!st.test(m))throw v(m,"name");d=d.define(m),l(";")}function D(){var x=s(),S;switch(x){case"weak":S=b||(b=[]),o();break;case"public":o();default:S=g||(g=[]);break}x=_(),l(";"),S.push(x)}function C(){if(l("="),E=_(),f=E==="proto3",!f&&E!=="proto2")throw v(E,"syntax");l(";")}function N(x,S){switch(S){case"option":return U(x,S),l(";"),!0;case"message":return L(x,S),!0;case"enum":return Z(x,S),!0;case"service":return Yt(x,S),!0;case"extend":return u(x,S),!0}return!1}function P(x,S,I){var F=r.line;if(x&&(typeof x.comment!="string"&&(x.comment=c()),x.filename=gt.filename),l("{",!0)){for(var $;($=o())!=="}";)S($);l(";",!0)}else I&&I(),l(";"),x&&(typeof x.comment!="string"||i)&&(x.comment=c(F)||x.comment)}function L(x,S){if(!at.test(S=o()))throw v(S,"type name");var I=new Op(S);P(I,function($){if(!N(I,$))switch($){case"map":M(I,$);break;case"required":case"repeated":j(I,$);break;case"optional":f?j(I,"proto3_optional"):j(I,"optional");break;case"oneof":ne(I,$);break;case"extensions":O(I.extensions||(I.extensions=[]));break;case"reserved":O(I.reserved||(I.reserved=[]),!0);break;default:if(!f||!st.test($))throw v($);a($),j(I,"optional");break}}),x.add(I)}function j(x,S,I){var F=o();if(F==="group"){Y(x,S);return}for(;F.endsWith(".")||s().startsWith(".");)F+=o();if(!st.test(F))throw v(F,"type");var $=o();if(!at.test($))throw v($,"name");$=h($),l("=");var W=new Cp($,k(o()),F,S,I);if(P(W,function(re){if(re==="option")U(W,re),l(";");else throw v(re)},function(){ct(W)}),S==="proto3_optional"){var te=new Dp("_"+$);W.setOption("proto3_optional",!0),te.add(W),x.add(te)}else x.add(W);!f&&W.repeated&&(ka.packed[F]!==void 0||ka.basic[F]===void 0)&&W.setOption("packed",!1,!0)}function Y(x,S){var I=o();if(!at.test(I))throw v(I,"name");var F=Na.lcFirst(I);I===F&&(I=Na.ucFirst(I)),l("=");var $=k(o()),W=new Op(I);W.group=!0;var te=new Cp(F,$,I,S);te.filename=gt.filename,P(W,function(re){switch(re){case"option":U(W,re),l(";");break;case"required":case"repeated":j(W,re);break;case"optional":f?j(W,"proto3_optional"):j(W,"optional");break;case"message":L(W,re);break;case"enum":Z(W,re);break;default:throw v(re)}}),x.add(W).add(te)}function M(x){l("<");var S=o();if(ka. Line truncated
`+i.fence+o+`
`+t.firstChild.textContent+`
`+i.fence+`
`}})}function iu(n){n.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}})}var n0=Array.prototype.indexOf,i0=Array.prototype.every,Mt={},r0={left:":---",right:"---:",center:":---:"},La=null,ru=null,tu=new WeakMap;function o0(n){return n?(n.getAttribute("align")||n.style.textAlign||"").toLowerCase():""}function ou(n){return n?r0[n]:"---"}function au(n,e){for(var t={left:0,right:0,center:0,"":0},i="",r=0;r<n.rows.length;++r){var o=n.rows[r];if(e<o.childNodes.length){var a=o0(o.childNodes[e]);++t[a],t[a]>t[i]&&(i=a)}}return i}Mt.tableCell={filter:["th","td"],replacement:function(n,e){return Ma(pu(e))?n:su(n,e)}};Mt.tableRow={filter:"tr",replacement:function(n,e){let t=pu(e);if(Ma(t))return n;var i="";if(a0(e)){let a=uu(t);for(var r=0;r<a;r++){let s=r<e.childNodes.length?e.childNodes[r]:null;var o=ou(au(t,r));i+=su(o,s,r)}}return`
`+n+(i?`
`+i:"")}};Mt.table={filter:function(n,e){return n.nodeName==="TABLE"},replacement:function(n,e){if(cu(e,ru)){let s=e.outerHTML,l=c0(e);return l===null||!l.classList.contains("joplin-table-wrapper")?`
<div class="joplin-table-wrapper">${s}</div>
`:s}else{if(Ma(e))return n;n=n.replace(/\n+/g,`
`);var t=n.trim().split(`
`);t.length>=2&&(t=t[1]);var i=/\| :?---/.test(t),r=uu(e),o="";if(r&&!i){o="|"+" |".repeat(r)+`
|`;for(var a=0;a<r;++a)o+=" "+ou(au(e,a))+" |"}let s=e.caption&&e.caption.textContent||"",l=s?`${s}
`:"",c=`${o}${n}`.trimStart();return`
${l}${c}
`}}};Mt.tableCaption={filter:["caption"],replacement:()=>""};Mt.tableColgroup={filter:["colgroup","col"],replacement:()=>""};Mt.tableSection={filter:["thead","tbody","tfoot"],replacement:function(n){return n}};function a0(n){var e=n.parentNode;return e.nodeName==="THEAD"||e.firstChild===n&&(e.nodeName==="TABLE"||s0(e))&&i0.call(n.childNodes,function(t){return t.nodeName==="TH"})}function s0(n){var e=n.previousSibling;return n.nodeName==="TBODY"&&(!e||e.nodeName==="THEAD"&&/^\s*$/i.test(e.textContent))}function su(n,e=null,t=null){t===null&&(t=n0.call(e.parentNode.childNodes,e));var i=" ";t===0&&(i="| ");let r=n.trim().replace(/\n\r/g,"<br>").replace(/\n/g,"<br>");for(r=r.replace(/\|+/g,"\\|");r.length<3;)r+=" ";return e&&(r=p0(r,e," ")),i+r+" |"}function lu(n){if(!n.childNodes)return!1;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(t.nodeName==="TABLE"||lu(t))return!0}return!1}var Pa=(n,e)=>{if(!n.childNodes)return!1;for(let t=0;t<n.childNodes.length;t++){let i=n.childNodes[t];if(e==="code"&&La&&La(i)||e.includes(i.nodeName)||Pa(i,e))return!0}return!1},cu=(n,e)=>{let t=["UL","OL","H1","H2","H3","H4","H5","H6","HR","BLOCKQUOTE"];return e.preserveNestedTables&&t.push("TABLE"),Pa(n,"code")||Pa(n,t)};function Ma(n){let e=tu.get(n);if(e!==void 0)return e;let t=l0(n);return tu.set(n,t),t}function l0(n){return!!(!n||!n.rows||n.rows.length===1&&n.rows[0].childNodes.length<=1||lu(n))}function c0(n){let e=n.parentNode;for(;e.nodeName!=="DIV";)if(e=e.parentNode,!e)return null;return e}function pu(n){let e=n.parentNode;for(;e.nodeName!=="TABLE";)if(e=e.parentNode,!e)return null;return e}function p0(n,e,t){let i=e.getAttribute("colspan")||1;for(let r=1;r<i;r++)n+=" | "+t.repeat(3);return n}function uu(n){let e=0;for(let t=0;t<n.rows.length;t++){let r=n.rows[t].childNodes.length;r>e&&(e=r)}return e}function fu(n){La=n.isCodeBlock,ru=n.options,n.keep(function(t){return!!(t.nodeName==="TABLE"&&cu(t,n.options))});for(var e in Mt)n.addRule(e,Mt[e])}function du(n){n.addRule("taskListItems",{filter:function(e){return e.type==="checkbox"&&e.parentNode.nodeName==="LI"},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}})}function u0(n){n.use([nu,iu,fu,du])}cn.gfm=u0;cn.highlightedCodeBlock=nu;cn.strikethrough=iu;cn.tables=fu;cn.taskListItems=du});var Gf=z(Fr=>{(function(n){n.parser=function(y,u){return new t(y,u)},n.SAXParser=t,n.SAXStream=c,n.createStream=l,n.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function t(y,u){if(!(this instanceof t))return new t(y,u);var R=this;r(R),R.q=R.c="",R.bufferCheckPosition=n.MAX_BUFFER_LENGTH,R.opt=u||{},R.opt.lowercase=R.opt.lowercase||R.opt.lowercasetags,R.looseCase=R.opt.lowercase?"toLowerCase":"toUpperCase",R.tags=[],R.closed=R.closedRoot=R.sawRoot=!1,R.tag=R.error=null,R.strict=!!y,R.noscript=!!(y||R.opt.noscript),R.state=w.BEGIN,R.strictEntities=R.opt.strictEntities,R.ENTITIES=R.strictEntities?Object.create(n.XML_ENTITIES):Object.create(n.ENTITIES),R.attribList=[],R.opt.xmlns&&(R.ns=Object.create(E)),R.trackPosition=R.opt.position!==!1,R.trackPosition&&(R.position=R.line=R.column=0),C(R,"onready")}Object.create||(Object.create=function(y){function u(){}u.prototype=y;var R=new u;return R}),Object.keys||(Object.keys=function(y){var u=[];for(var R in y)y.hasOwnProperty(R)&&u.push(R);return u});function i(y){for(var u=Math.max(n.MAX_BUFFER_LENGTH,10),R=0,x=0,S=e.length;x<S;x++){var I=y[e[x]].length;if(I>u)switch(e[x]){case"textNode":P(y);break;case"cdata":N(y,"oncdata",y.cdata),y.cdata="";break;case"script":N(y,"onscript",y.script),y.script="";break;default:j(y,"Max buffer length exceeded: "+e[x])}R=Math.max(R,I)}var F=n.MAX_BUFFER_LENGTH-R;y.bufferCheckPosition=F+y.position}function r(y){for(var u=0,R=e.length;u<R;u++)y[e[u]]=""}function o(y){P(y),y.cdata!==""&&(N(y,"oncdata",y.cdata),y.cdata=""),y.script!==""&&(N(y,"onscript",y.script),y.script="")}t.prototype={end:function(){Y(this)},write:Yt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var a;try{a=require("stream").Stream}catch(y){a=function(){}}a||(a=function(){});var s=n.EVENTS.filter(function(y){return y!=="error"&&y!=="end"});function l(y,u){return new c(y,u)}function c(y,u){if(!(this instanceof c))return new c(y,u);a.apply(this),this._parser=new t(y,u),this.writable=!0,this.readable=!0;var R=this;this._parser.onend=function(){R.emit("end")},this._parser.onerror=function(x){R.emit("error",x),R._parser.error=null},this._decoder=null,s.forEach(function(x){Object.defineProperty(R,"on"+x,{get:function(){return R._parser["on"+x]},set:function(S){if(!S)return R.removeAllListeners(x),R._parser["on"+x Line truncated
`||y==="\r"||y===" "}function A(y){return y==='"'||y==="'"}function O(y){return y===">"||_(y)}function T(y,u){return y.test(u)}function k(y,u){return!T(y,u)}var w=0;n.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(n.ENTITIES).forEach(function(y){var u=n.ENTITIES[y],R=typeof u=="number"?String.fromCharCode(u):u;n.ENTITIES[y]=R});for(var D in n.STATE)n.STATE[n.STATE[D]]=D;w=n.STATE;function C(y,u,R){y[u]&&y[u](R)}function N(y,u,R){y.textNode&&P(y),C(y,u,R)}function P(y){y.textNode=L(y.opt,y.textNode),y.textNode&&C(y,"ontext",y.textNode),y.textNode=""}function L(y,u){return y.trim&&(u=u.trim()),y.normalize&&(u=u.replace(/\s+/g," ")),u}function j(y,u){return P(y),y.trackPosition&&(u+=`
Line: `+y.line+`
Column: `+y.column+`
Char: `+y.c),u=new Error(u),y.error=u,C(y,"onerror",u),y}function Y(y){return y.sawRoot&&!y.closedRoot&&M(y,"Unclosed root tag"),y.state!==w.BEGIN&&y.state!==w.BEGIN_WHITESPACE&&y.state!==w.TEXT&&j(y,"Unexpected end"),P(y),y.c="",y.closed=!0,C(y,"onend"),t.call(y,y.strict,y.opt),y}function M(y,u){if(typeof y!="object"||!(y instanceof t))throw new Error("bad call to strictFail");y.strict&&j(y,u)}function ne(y){y.strict||(y.tagName=y.tagName[y.looseCase]());var u=y.tags[y.tags.length-1]||y,R=y.tag={name:y.tagName,attributes:{}};y.opt.xmlns&&(R.ns=u.ns),y.attribList.length=0,N(y,"onopentagstart",R)}function Z(y,u){var R=y.indexOf(":"),x=R<0?["",y]:y.split(":"),S=x[0],I=x[1];return u&&y==="xmlns"&&(S="xmlns",I=""),{prefix:S,local:I}}function pe(y){if(y.strict||(y.attribName=y.attribName[y.looseCase]()),y.attribList.indexOf(y.attribName)!==-1||y.tag.attributes.hasOwnProperty(y.attribName)){y.attribName=y.attribValue="";return}if(y.opt.xmlns){var u=Z(y.attribName,!0),R=u.prefix,x=u.local;if(R==="xmlns")if(x==="xml"&&y.attribValue!==g)M(y,"xml: prefix must be bound to "+g+`
Actual: `+y.attribValue);else if(x==="xmlns"&&y.attribValue!==b)M(y,"xmlns: prefix must be bound to "+b+`
Actual: `+y.attribValue);else{var S=y.tag,I=y.tags[y.tags.length-1]||y;S.ns===I.ns&&(S.ns=Object.create(I.ns)),S.ns[x]=y.attribValue}y.attribList.push([y.attribName,y.attribValue])}else y.tag.attributes[y.attribName]=y.attribValue,N(y,"onattribute",{name:y.attribName,value:y.attribValue});y.attribName=y.attribValue=""}function U(y,u){if(y.opt.xmlns){var R=y.tag,x=Z(y.tagName);R.prefix=x.prefix,R.local=x.local,R.uri=R.ns[x.prefix]||"",R.prefix&&!R.uri&&(M(y,"Unbound namespace prefix: "+JSON.stringify(y.tagName)),R.uri=x.prefix);var S=y.tags[y.tags.length-1]||y;R.ns&&S.ns!==R.ns&&Object.keys(R.ns).forEach(function(ls){N(y,"onopennamespace",{prefix:ls,uri:R.ns[ls]})});for(var I=0,F=y.attribList.length;I<F;I++){var $=y.attribList[I],W=$[0],te=$[1],ee=Z(W,!0),re=ee.prefix,gn=ee.local,Xr=re===""?"":R.ns[re]||"",zt={name:W,value:te,prefix:re,local:gn,uri:Xr};re&&re!=="xmlns"&&!Xr&&(M(y,"Unbound namespace prefix: "+JSON.stringify(re)),zt.uri=re),y.tag.attributes[W]=zt,N(y,"onattribute",zt)}y.attribList.length=0}y.tag.isSelfClosing=!!u,y.sawRoot=!0,y.tags.push(y.tag),N(y,"onopentag",y.tag),u||(!y.noscript&&y.tagName.toLowerCase()==="script"?y.state=w.SCRIPT:y.state=w.TEXT,y.tag=null,y.tagName=""),y.attribName=y.attribValue="",y.attribList.length=0}function Re(y){if(!y.tagName){M(y,"Weird empty close tag."),y.textNode+="</>",y.state=w.TEXT;return}if(y.script){if(y.tagName!=="script"){y.script+="</"+y.tagName+">",y.tagName="",y.state=w.SCRIPT;return}N(y,"onscript",y.script),y.script=""}var u=y.tags.length,R=y.tagName;y.strict||(R=R[y.looseCase]());for(var x=R;u--;){var S=y.tags[u];if(S.name!==x)M(y,"Unexpected close tag");else break}if(u<0){M(y,"Unmatched closing tag: "+y.tagName),y.textNode+="</"+y.tagName+">",y.state=w.TEXT;return}y.tagName=R;for(var I=y.tags.length;I-- >u;){var F=y.tag=y.tags.pop();y.tagName=y.tag.name,N(y,"onclosetag",y.tagName);var $={};for(var W in F.ns)$[W]=F.ns[W];var te=y.tags[y.tags.length-1]||y;y.opt.xmlns&&F.ns!==te.ns&&Object.keys(F.ns).forEach(function(ee){var re=F.ns[ee];N(y,"onclosenamespace",{prefix:ee,uri:re})})}u===0&&(y.closedRoot=!0),y.tagName=y.attribValue=y.attribName="",y.attribList.length=0,y.state=w.TEXT}function G(y){var u=y.entity,R=u.toLowerCase(),x,S="";return y.ENTITIES[u]?y.ENTITIES[u]:y.ENTITIES[R]?y.ENTITIES[R]:(u=R,u.charAt(0)==="#"&&(u.charAt(1)==="x"?(u=u.slice(2),x=parseInt(u,16),S=x.toString(16)):(u=u.slice(1),x=parseInt(u,10),S=x.toString(10))),u=u.replace(/^0+/,""),isNaN(x)||S.toLowerCase()!==u?(M(y,"Invalid character entity"),"&"+y.entity+";"):String.fromCodePoint(x))}function Q(y,u){u==="<"?(y.state=w.OPEN_WAKA,y.startTagPosition=y.position):_(u)||(M(y,"Non-whitespace before first tag."),y.textNode=u,y.state=w.TEXT)}function ct(y,u){var R="";return u<y.length&&(R=y.charAt(u)),R}function Yt(y){var u=this;if(this.error)throw this.error;if(u.closed)return j(u,"Cannot write after close. Assign an onready handler.");if(y===null)return Y(u);typeof y=="object"&&(y=y.toString());for(var R=0,x="";x=ct(y,R++),u.c=x,!!x;)switch(u.trackPosition&&(u.position++,x===`
`?(u.line++,u.column=0):u.column++),u.state){case w.BEGIN:if(u.state=w.BEGIN_WHITESPACE,x==="\uFEFF")continue;Q(u,x);continue;case w.BEGIN_WHITESPACE:Q(u,x);continue;case w.TEXT:if(u.sawRoot&&!u.closedRoot){for(var S=R-1;x&&x!=="<"&&x!=="&";)x=ct(y,R++),x&&u.trackPosition&&(u.position++,x===`
`?(u.line++,u.column=0):u.column++);u.textNode+=y.substring(S,R-1)}x==="<"&&!(u.sawRoot&&u.closedRoot&&!u.strict)?(u.state=w.OPEN_WAKA,u.startTagPosition=u.position):(!_(x)&&(!u.sawRoot||u.closedRoot)&&M(u,"Text data outside of root node."),x==="&"?u.state=w.TEXT_ENTITY:u.textNode+=x);continue;case w.SCRIPT:x==="<"?u.state=w.SCRIPT_ENDING:u.script+=x;continue;case w.SCRIPT_ENDING:x==="/"?u.state=w.CLOSE_TAG:(u.script+="<"+x,u.state=w.SCRIPT);continue;case w.OPEN_WAKA:if(x==="!")u.state=w.SGML_DECL,u.sgmlDecl="";else if(!_(x))if(T(f,x))u.state=w.OPEN_TAG,u.tagName=x;else if(x==="/")u.state=w.CLOSE_TAG,u.tagName="";else if(x==="?")u.state=w.PROC_INST,u.procInstName=u.procInstBody="";else{if(M(u,"Unencoded <"),u.startTagPosition+1<u.position){var I=u.position-u.startTagPosition;x=new Array(I).join(" ")+x}u.textNode+="<"+x,u.state=w.TEXT}continue;case w.SGML_DECL:(u.sgmlDecl+x).toUpperCase()===p?(N(u,"onopencdata"),u.state=w.CDATA,u.sgmlDecl="",u.cdata=""):u.sgmlDecl+x==="--"?(u.state=w.COMMENT,u.comment="",u.sgmlDecl=""):(u.sgmlDecl+x).toUpperCase()===m?(u.state=w.DOCTYPE,(u.doctype||u.sawRoot)&&M(u,"Inappropriately located doctype declaration"),u.doctype="",u.sgmlDecl=""):x===">"?(N(u,"onsgmldeclaration",u.sgmlDecl),u.sgmlDecl="",u.state=w.TEXT):(A(x)&&(u.state=w.SGML_DECL_QUOTED),u.sgmlDecl+=x);continue;case w.SGML_DECL_QUOTED:x===u.q&&(u.state=w.SGML_DECL,u.q=""),u.sgmlDecl+=x;continue;case w.DOCTYPE:x===">"?(u.state=w.TEXT,N(u,"ondoctype",u.doctype),u.doctype=!0):(u.doctype+=x,x==="["?u.state=w.DOCTYPE_DTD:A(x)&&(u.state=w.DOCTYPE_QUOTED,u.q=x));continue;case w.DOCTYPE_QUOTED:u.doctype+=x,x===u.q&&(u.q="",u.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:u.doctype+=x,x==="]"?u.state=w.DOCTYPE:A(x)&&(u.state=w.DOCTYPE_DTD_QUOTED,u.q=x);continue;case w.DOCTYPE_DTD_QUOTED:u.doctype+=x,x===u.q&&(u.state=w.DOCTYPE_DTD,u.q="");continue;case w.COMMENT:x==="-"?u.state=w.COMMENT_ENDING:u.comment+=x;continue;case w.COMMENT_ENDING:x==="-"?(u.state=w.COMMENT_ENDED,u.comment=L(u.opt,u.comment),u.comment&&N(u,"oncomment",u.comment),u.comment=""):(u.comment+="-"+x,u.state=w.COMMENT);continue;case w.COMMENT_ENDED:x!==">"?(M(u,"Malformed comment"),u.comment+="--"+x,u.state=w.COMMENT):u.state=w.TEXT;continue;case w.CDATA:x==="]"?u.state=w.CDATA_ENDING:u.cdata+=x;continue;case w.CDATA_ENDING:x==="]"?u.state=w.CDATA_ENDING_2:(u.cdata+="]"+x,u.state=w.CDATA);continue;case w.CDATA_ENDING_2:x===">"?(u.cdata&&N(u,"oncdata",u.cdata),N(u,"onclosecdata"),u.cdata="",u.state=w.TEXT):x==="]"?u.cdata+="]":(u.cdata+="]]"+x,u.state=w.CDATA);continue;case w.PROC_INST:x==="?"?u.state=w.PROC_INST_ENDING:_(x)?u.state=w.PROC_INST_BODY:u.procInstName+=x;continue;case w.PROC_INST_BODY:if(!u.procInstBody&&_(x))continue;x==="?"?u.state=w.PROC_INST_ENDING:u.procInstBody+=x;continue;case w.PROC_INST_ENDING:x===">"?(N(u,"onprocessinginstruction",{name:u.procInstName,body:u.procInstBody}),u.procInstName=u.procInstBody="",u.state=w.TEXT):(u.procInstBody+="?"+x,u.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:T(d,x)?u.tagName+=x:(ne(u),x===">"?U(u):x==="/"?u.state=w.OPEN_TAG_SLASH:(_(x)||M(u,"Invalid character in tag name"),u.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:x===">"?(U(u,!0),Re(u)):(M(u,"Forward-slash in opening tag not followed by >"),u.state=w.ATTRIB);continue;case w.ATTRIB:if(_(x))continue;x===">"?U(u):x==="/"?u.state=w.OPEN_TAG_SLASH:T(f,x)?(u.attribName=x,u.attribValue="",u.state=w.ATTRIB_NAME):M(u,"Invalid attribute name");continue;case w.ATTRIB_NAME:x==="="?u.state=w.ATTRIB_VALUE:x===">"?(M(u,"Attribute without value"),u.attribValue=u.attribName,pe(u),U(u)):_(x)?u.state=w.ATTRIB_NAME_SAW_WHITE:T(d,x)?u.attribName+=x:M(u,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(x==="=")u.state=w.ATTRIB_VALUE;else{if(_(x))continue;M(u,"Attribute without value"),u.tag.attributes[u.attribName]="",u.attribValue="",N(u,"onattribute",{name:u.attribName,value:""}),u.attribName="",x===">"?U(u):T(f,x)?(u.attribName=x,u.state=w.ATTRIB_NAME):(M(u,"Invalid attribute name"),u.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(_(x))continue;A(x)?(u.q=x,u.state=w.ATTRIB_VALUE_QUOTED):(M(u,"Unquoted attribute value"),u.state=w.ATTRIB_VALUE_UNQUOTED,u.attribValue=x);continue;case w.ATTRIB_VALUE_QUOTED:if(x!==u.q){x==="&"?u.state=w.ATTRIB_VALUE_ENTITY_Q:u.attribValue+=x;continue}pe(u),u.q="",u.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:_(x)?u.state=w.ATTRIB:x===">"?U(u):x==="/"?u.state=w.OPEN_TAG_SLASH:T(f,x)?(M(u,"No whitespace between attributes"),u.attribName=x,u.attribValue="",u.state=w.ATTRIB_NAME):M(u,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!O(x)){x==="&"?u.state=w.ATTRIB_VALUE_ENTITY_U:u.attribValue+=x;continue}pe(u),x===">"?U(u):u.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(u.tagName)x===">"?Re(u):T(d,x)?u.tagName+=x:u.script?(u.script+="</"+u.tagName,u.tagName="",u.state=w.SCRIPT):(_(x)||M(u,"Invalid tagname in closing tag"),u.state=w.CLOSE_TAG_SAW_WHITE);else{if(_(x))continue;k(f,x)?u.sc Line truncated
`:"";function s(l,c,p){let m="",g,b=c,E=p?a+p:"",f=p+t,d="";return l=l||"",l.constructor===Array?(l.forEach(h=>{m+=s(h,b,p)}),m):(!b&&l.$name&&(b=l.$name),b&&(m=`${E}<${b}`,l.$attrs&&typeof l.$attrs=="object"&&(g=Object.keys(l.$attrs),g.forEach(h=>{m+=` ${h}=${JSON.stringify(String(l.$attrs[h]))}`}))),l==null||l===""||(typeof l=="object"?(g=Object.keys(l),g.forEach(h=>{let v=l[h];switch(h){case"$name":case"$attrs":break;case"$text":case"$markup":d+=s(v,null,f);break;case"$script":d+=s(v,"script",f);break;case"$cdata":d+=`${E}<![CDATA[${v}]]>`;break;default:d+=s(v,h,f)}})):d+=E+r(l)),b?d?m+=`>${d}${a}${p}</${b}>`:i?m+="/>":m+=`></${b}>`:m+=d,m)}return s(e,o,"")};ed.exports=Ei});var ob={};Oe(ob,{ATTACHMENT_EXTS:()=>$n,AUTH_REDIRECT_URI:()=>qr,ImportContext:()=>Vr,ImporterModal:()=>Ti,default:()=>Kr});module.exports=Md(ob);var Wt=require("obsidian");var lt=require("obsidian");var vt=class{constructor(e){this.importer=e,this.app=e.app}};var Un=class extends vt{constructor(e,t){super(e),this.scan=t.mergableDataObject,this.objects=this.scan.mergeableDataObjectData.mergeableDataObjectEntry}async format(){let e=[];for(let t of this.objects){if(!t.customMap)continue;let i=t.customMap.mapEntry[0].value.stringValue,r=await this.importer.database.get`
SELECT z_pk, zmedia, ztypeuti FROM ziccloudsyncingobject
WHERE zidentifier = ${i}`,o=await this.importer.resolveAttachment(r.Z_PK,"com.apple.notes.gallery");if(o||(o=await this.importer.resolveAttachment(r.ZMEDIA,r.ZTYPEUTI)),o)e.push(this.importer.app.fileManager.generateMarkdownLink(o,"/"));else return"**Cannot decode scan**"}return`
${e.join(`
`)}
`}};Un.protobufType="ciofecaforensics.MergableDataProto";var jn=class extends vt{constructor(t,i){super(t);this.rowLocations={};this.columnLocations={};this.table=i.mergableDataObject;let r=this.table.mergeableDataObjectData;this.keys=r.mergeableDataObjectKeyItem,this.types=r.mergeableDataObjectTypeItem,this.uuids=r.mergeableDataObjectUuidItem.map(this.uuidToString),this.objects=r.mergeableDataObjectEntry}async parse(){let t=this.objects.find(r=>r.customMap&&this.types[r.customMap.type]=="com.apple.notes.ICTable");if(!t)return null;let i=null;for(let r of t.customMap.mapEntry){let o=this.objects[r.value.objectIndex];switch(this.keys[r.key]){case"crRows":[this.rowLocations,this.rowCount]=this.findLocations(o);break;case"crColumns":[this.columnLocations,this.columnCount]=this.findLocations(o);break;case"cellColumns":i=o;break}}return i?await this.computeCells(i):null}findLocations(t){let i=[],r={};for(let o of t.orderedSet.ordering.array.attachment)i.push(this.uuidToString(o.uuid));for(let o of t.orderedSet.ordering.contents.element){let a=this.getTargetUuid(o.key),s=this.getTargetUuid(o.value);r[s]=i.indexOf(a)}return[r,i.length]}async computeCells(t){let i=Array(this.rowCount).fill(0).map(()=>Array(this.columnCount));for(let r of t.dictionary.element){let o=this.columnLocations[this.getTargetUuid(r.key)],a=this.objects[r.value.objectIndex];for(let s of a.dictionary.element){let l=this.rowLocations[this.getTargetUuid(s.key)],c=this.objects[s.value.objectIndex];if(!(l in i)||!c)continue;let p=new Zt(this.importer,c);i[l][o]=await p.format(!0)}}return i}async format(){let t=await this.parse();if(!t)return"";let i=`
`;for(let r=0;r<t.length;r++)i+=`| ${t[r].join(" | ")} |
`,r==0&&(i+=`|${" -- |".repeat(t[0].length)}
`);return i+`
`}getTargetUuid(t){let r=this.objects[t.objectIndex].customMap.mapEntry[0].value.unsignedIntegerValue;return this.uuids[r]}uuidToString(t){return Buffer.from(t).toString("hex")}};jn.protobufType="ciofecaforensics.MergableDataProto";var $d=/(^\s+|(?:\s+)?\n(?:\s+)?|\s+$)/,Qr=/applenotes:note\/([-0-9a-f]+)(?:\?ownerIdentifier=.*)?/,Bd=".AppleColorEmojiUI",us=[100,101,102,103],Zt=class extends vt{constructor(t,i){super(t);this.listNumber=0;this.listIndent=0;this.multiRun=0;this.note=i.note}parseTokens(){let t=0,i=0,r=0,o=[];for(;t<this.note.attributeRun.length;){let a,s="",l=!0;do a=this.note.attributeRun[t],r=r+a.length,s+=this.note.noteText.substring(i,r),i=r,l=t==this.note.attributeRun.length-1?!1:fs(a,this.note.attributeRun[t+1]),t++;while(l);for(let c of s.split($d))c&&o.push({attr:a,fragment:c})}return o}async format(t=!1){var a;let i=this.parseTokens(),r=!t&&this.importer.omitFirstLine&&this.note.noteText.contains(`
`),o="";for(let s=0;s<i.length;s++){let{attr:l,fragment:c}=i[s];if(r)if(c.contains(`
`)||l.attachmentInfo)r=!1;else continue;l.fragment=c,l.atLineStart=s==0?!0:(a=i[s-1])==null?void 0:a.fragment.contains(`
`),o+=this.formatMultiRun(l),!/\S/.test(l.fragment)||this.multiRun==1?o+=l.fragment:l.attachmentInfo?o+=await this.formatAttachment(l):l.superscript||l.underlined||l.color||l.font||this.multiRun==2?o+=await this.formatHtmlAttr(l):o+=await this.formatAttr(l)}return this.multiRun!=0&&(o+=this.formatMultiRun({})),t&&o.replace(`
`,"<br>").replace("|","&#124;"),o.trim()}formatMultiRun(t){var o,a,s,l,c,p;let i=(o=t.paragraphStyle)==null?void 0:o.styleType,r="";switch(this.multiRun){case 3:(((a=t.paragraphStyle)==null?void 0:a.indentAmount)==0&&!us.includes(i)||Ud(t))&&(this.multiRun=0);break;case 1:i!=4&&(this.multiRun=0,r+="```\n");break;case 2:(s=t.paragraphStyle)!=null&&s.alignment||(this.multiRun=0,r+=`</p>
`);break}if(this.multiRun==0){if(i==4)this.multiRun=1,r+="\n```\n";else if(us.includes(i))this.multiRun=3,(l=t.paragraphStyle)!=null&&l.indentAmount&&(r+=`
- &nbsp;
`);else if((c=t.paragraphStyle)!=null&&c.alignment){this.multiRun=2;let m=this.convertAlign((p=t==null?void 0:t.paragraphStyle)==null?void 0:p.alignment);r+=`
<p style="text-align:${m};margin:0">`}}return r}async formatHtmlAttr(t){var r,o;t.strikethrough&&(t.fragment=`<s>${t.fragment}</s>`),t.underlined&&(t.fragment=`<u>${t.fragment}</u>`),t.superscript==1&&(t.fragment=`<sup>${t.fragment}</sup>`),t.superscript==-1&&(t.fragment=`<sub>${t.fragment}</sub>`);let i="";switch(t.fontWeight){case 1:t.fragment=`<b>${t.fragment}</b>`;break;case 2:t.fragment=`<i>${t.fragment}</i>`;break;case 3:t.fragment=`<b><i>${t.fragment}</i></b>`;break}return(r=t.font)!=null&&r.fontName&&t.font.fontName!==Bd&&(i+=`font-family:${t.font.fontName};`),(o=t.font)!=null&&o.pointSize&&(i+=`font-size:${t.font.pointSize}pt;`),t.color&&(i+=`color:${this.convertColor(t.color)};`),t.link&&!Qr.test(t.link)?(i&&(i=` style="${i}"`),t.fragment=`<a href="${t.link}" rel="noopener" class="external-link" target="_blank"${i}>${t.fragment}</a>`):i&&(t.link&&(t.fragment=await this.getInternalLink(t.link,t.fragment)),t.fragment=`<span style="${i}">${t.fragment}</span>`),t.atLineStart?this.formatParagraph(t):t.fragment}async formatAttr(t){switch(t.fontWeight){case 1:t.fragment=`**${t.fragment}**`;break;case 2:t.fragment=`*${t.fragment}*`;break;case 3:t.fragment=`***${t.fragment}***`;break}return t.strikethrough&&(t.fragment=`~~${t.fragment}~~`),t.link&&t.link!=t.fragment&&(Qr.test(t.link)?t.fragment=await this.getInternalLink(t.link,t.fragment):t.fragment=`[${t.fragment}](${t.link})`),t.atLineStart?this.formatParagraph(t):t.fragment}formatParagraph(t){var a,s,l,c,p,m;let i=" ".repeat(((a=t.paragraphStyle)==null?void 0:a.indentAmount)||0),r=(s=t.paragraphStyle)==null?void 0:s.styleType,o=(l=t.paragraphStyle)!=null&&l.blockquote?"> ":"";switch(this.listNumber!=0&&(r!==102||this.listIndent!==((c=t.paragraphStyle)==null?void 0:c.indentAmount))&&(this.listIndent=((p=t.paragraphStyle)==null?void 0:p.indentAmount)||0,this.listNumber=0),r){case 0:return`${o}# ${t.fragment}`;case 1:return`${o}## ${t.fragment}`;case 2:return`${o}### ${t.fragment}`;case 101:case 100:return`${o}${i}- ${t.fragment}`;case 102:return this.listNumber++,`${o}${i}${this.listNumber}. ${t.fragment}`;case 103:let g=(m=t.paragraphStyle.checklist)!=null&&m.done?"[x]":"[ ]";return`${o}${i}- ${g} ${t.fragment}`}return this.multiRun==3&&(o+=i),`${o}${t.fragment}`}async formatAttachment(t){var l,c,p;let i,r,o;switch((l=t.attachmentInfo)==null?void 0:l.typeUti){case"com.apple.notes.inlinetextattachment.hashtag":case"com.apple.notes.inlinetextattachment.mention":return i=await this.importer.database.get`
SELECT zalttext FROM ziccloudsyncingobject
WHERE zidentifier = ${t.attachmentInfo.attachmentIdentifier}`,i.ZALTTEXT;case"com.apple.notes.inlinetextattachment.link":return i=await this.importer.database.get`
SELECT ztokencontentidentifier FROM ziccloudsyncingobject
WHERE zidentifier = ${t.attachmentInfo.attachmentIdentifier}`,await this.getInternalLink(i.ZTOKENCONTENTIDENTIFIER);case"com.apple.notes.table":return i=await this.importer.database.get`
SELECT hex(zmergeabledata1) as zhexdata FROM ziccloudsyncingobject
WHERE zidentifier = ${t.attachmentInfo.attachmentIdentifier}`,o=this.importer.decodeData(i.zhexdata,jn),await o.format();case"public.url":return i=await this.importer.database.get`
SELECT ztitle, zurlstring FROM ziccloudsyncingobject
WHERE zidentifier = ${t.attachmentInfo.attachmentIdentifier}`,`[**${i.ZTITLE}**](${i.ZURLSTRING})`;case"com.apple.notes.gallery":return i=await this.importer.database.get`
SELECT hex(zmergeabledata1) as zhexdata FROM ziccloudsyncingobject
WHERE zidentifier = ${t.attachmentInfo.attachmentIdentifier}`,o=this.importer.decodeData(i.zhexdata,Un),await o.format();case"com.apple.paper.doc.scan":case"com.apple.drawing":case"com.apple.drawing.2":case"com.apple.paper":i=await this.importer.database.get`
SELECT z_pk, zhandwritingsummary
FROM (SELECT *, NULL AS zhandwritingsummary FROM ziccloudsyncingobject)
WHERE zidentifier = ${t.attachmentInfo.attachmentIdentifier}`,r=i==null?void 0:i.Z_PK;break;default:i=await this.importer.database.get`
SELECT zmedia FROM ziccloudsyncingobject
WHERE zidentifier = ${(c=t.attachmentInfo)==null?void 0:c.attachmentIdentifier}`,r=i==null?void 0:i.ZMEDIA;break}if(!r)return` **(unknown attachment: ${(p=t.attachmentInfo)==null?void 0:p.typeUti})** `;let a=await this.importer.resolveAttachment(r,t.attachmentInfo.typeUti),s=a?`
${this.app.fileManager.generateMarkdownLink(a,"/")}
`:" **(error reading attachment)**";return this.importer.includeHandwriting&&i.ZHANDWRITINGSUMMARY&&(s=`
> [!Handwriting]-
> ${i.ZHANDWRITINGSUMMARY.replace(`
`,`
> `)}${s}`),s}async getInternalLink(t,i=void 0){let r=t.match(Qr)[1],o=await this.importer.database.get`
SELECT z_pk FROM ziccloudsyncingobject
WHERE zidentifier = ${r.toUpperCase()}`,a=await this.importer.resolveNote(o.Z_PK);return a?this.app.fileManager.generateMarkdownLink(a,this.importer.rootFolder.path,void 0,i):"(unknown file link)"}convertColor(t){let i="#";for(let r of Object.values(t))i+=Math.floor(r*255).toString(16);return i}convertAlign(t){switch(t){default:return"left";case 1:return"center";case 2:return"right";case 3:return"justify"}}};Zt.protobufType="ciofecaforensics.Document";function Ud(n){return n.attachmentInfo?!n.attachmentInfo.typeUti.includes("com.apple.notes.inlinetextattachment"):!1}function fs(n,e){var t,i;if(!e||n.$type!=e.$type)return!1;for(let r of n.$type.fieldsArray)if(r.name!="length"){if((t=n[r.name])!=null&&t.$type&&((i=e[r.name])!=null&&i.$type)){if(!fs(n[r.name],e[r.name]))return!1}else if(n[r.name]!=e[r.name])return!1}return!0}var ds={nested:{ciofecaforensics:{nested:{Color:{fields:{red:{type:"float",id:1},green:{type:"float",id:2},blue:{type:"float",id:3},alpha:{type:"float",id:4}}},AttachmentInfo:{fields:{attachmentIdentifier:{type:"string",id:1},typeUti:{type:"string",id:2}}},Font:{fields:{fontName:{type:"string",id:1},pointSize:{type:"float",id:2},fontHints:{type:"int32",id:3}}},ParagraphStyle:{fields:{styleType:{type:"int32",id:1,options:{default:-1}},alignment:{type:"int32",id:2},indentAmount:{type:"int32",id:4},checklist:{type:"Checklist",id:5},blockquote:{type:"int32",id:8}}},Checklist:{fields:{uuid:{type:"bytes",id:1},done:{type:"int32",id:2}}},DictionaryElement:{fields:{key:{type:"ObjectID",id:1},value:{type:"ObjectID",id:2}}},Dictionary:{fields:{element:{rule:"repeated",type:"DictionaryElement",id:1,options:{packed:!1}}}},ObjectID:{fields:{unsignedIntegerValue:{type:"uint64",id:2},stringValue:{type:"string",id:4},objectIndex:{type:"int32",id:6}}},RegisterLatest:{fields:{contents:{type:"ObjectID",id:2}}},MapEntry:{fields:{key:{type:"int32",id:1},value:{type:"ObjectID",id:2}}},AttributeRun:{fields:{length:{type:"int32",id:1},paragraphStyle:{type:"ParagraphStyle",id:2},font:{type:"Font",id:3},fontWeight:{type:"int32",id:5},underlined:{type:"int32",id:6},strikethrough:{type:"int32",id:7},superscript:{type:"int32",id:8},link:{type:"string",id:9},color:{type:"Color",id:10},attachmentInfo:{type:"AttachmentInfo",id:12}}},NoteStoreProto:{fields:{document:{type:"Document",id:2}}},Document:{fields:{version:{type:"int32",id:2},note:{type:"Note",id:3}}},Note:{fields:{noteText:{type:"string",id:2},attributeRun:{rule:"repeated",type:"AttributeRun",id:5,options:{packed:!1}}}},MergableDataProto:{fields:{mergableDataObject:{type:"MergableDataObject",id:2}}},MergableDataObject:{fields:{version:{type:"int32",id:2},mergeableDataObjectData:{type:"MergeableDataObjectData",id:3}}},MergeableDataObjectData:{fields:{mergeableDataObjectEntry:{rule:"repeated",type:"MergeableDataObjectEntry",id:3,options:{packed:!1}},mergeableDataObjectKeyItem:{rule:"repeated",type:"string",id:4},mergeableDataObjectTypeItem:{rule:"repeated",type:"string",id:5},mergeableDataObjectUuidItem:{rule:"repeated",type:"bytes",id:6}}},MergeableDataObjectEntry:{fields:{registerLatest:{type:"RegisterLatest",id:1},list:{type:"List",id:5},dictionary:{type:"Dictionary",id:6},unknownMessage:{type:"UnknownMergeableDataObjectEntryMessage",id:9},note:{type:"Note",id:10},customMap:{type:"MergeableDataObjectMap",id:13},orderedSet:{type:"OrderedSet",id:16}}},UnknownMergeableDataObjectEntryMessage:{fields:{unknownEntry:{type:"UnknownMergeableDataObjectEntryMessageEntry",id:1}}},UnknownMergeableDataObjectEntryMessageEntry:{fields:{unknownInt1:{type:"int32",id:1},unknownInt2:{type:"int64",id:2}}},MergeableDataObjectMap:{fields:{type:{type:"int32",id:1},mapEntry:{rule:"repeated",type:"MapEntry",id:3,options:{packed:!1}}}},OrderedSet:{fields:{ordering:{type:"OrderedSetOrdering",id:1},elements:{type:"Dictionary",id:2}}},OrderedSetOrdering:{fields:{array:{type:"OrderedSetOrderingArray",id:1},contents:{type:"Dictionary",id:2}}},OrderedSetOrderingArray:{fields:{contents:{type:"Note",id:1},attachment:{rule:"repeated",type:"OrderedSetOrderingArrayAttachment",id:2,options:{packed:!1}}}},OrderedSetOrderingArrayAttachment:{fields:{index:{type:"int32",id:1},uuid:{type:"bytes",id:2}}},List:{fields:{listEntry:{rule:"repeated",type:"ListEntry",id:1,options:{packed:!1}}}},ListEntry:{fields:{id:{type:"ObjectID",id:2},details:{type:"ListEntryDetails",id:3},additionalDetails:{type:"ListEntryDetails",id:4}}},ListEntryDetails:{fields:{listEntryDetailsKey:{type:"ListEntryDetailsKey",id:1},id:{type:"ObjectID",id:2}}},ListEntryDetailsKey:{fields:{listEntryDetailsTypeIndex:{type:"int32",id:1},listEntryDetailsKey:{type:"int32",id:2}}}}}}};var Ie=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Is=1440,jd=0,Hd=4,qd=9,Wd=5,Yd=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8, Line truncated
`],{type:"text/javascript"}));n({workerScripts:{inflate:[e],deflate:[e]}})}Bl(Oi);var K=tn.Platform.isDesktopApp?window.require("node:original-fs"):null,$e=tn.Platform.isDesktopApp?K.promises:null,nn=tn.Platform.isDesktopApp?window.require("node:os"):null,q=tn.Platform.isDesktopApp?window.require("node:path"):null,ni=tn.Platform.isDesktopApp?window.require("node:url"):null,Ul=tn.Platform.isDesktopApp?window.require("node:zlib"):null;function Ki(n,e=0,t=n.byteLength){return n.buffer.slice(n.byteOffset+e,n.byteOffset+e+t)}var Be=class{constructor(e){this.type="file";this.filepath=e;let t=this.name=q.basename(e);this.fullpath=t;let i=q.extname(t);this.extension=i.substring(1).toLowerCase(),this.basename=q.basename(t,i)}async readText(){return $e.readFile(this.filepath,"utf8")}async read(){let e=await $e.readFile(this.filepath);return Ki(e)}async readZip(e){let t=null;try{t=await $e.open(this.filepath,"r");let i=await t.stat();return await e(new Qt(new Do(t,i.size)))}finally{await(t==null?void 0:t.close())}}createReadStream(){return K.createReadStream(this.filepath)}toString(){return this.filepath}},en=class n{constructor(e){this.type="folder";this.filepath=e,this.name=q.basename(e)}async list(){let{filepath:e}=this,t=await $e.readdir(e,{withFileTypes:!0}),i=[];for(let r of t)r.isFile()?i.push(new Be(q.join(e,r.name))):r.isDirectory()&&i.push(new n(q.join(e,r.name)));return i}toString(){return this.filepath}},Vi=class{constructor(e){this.type="file";this.file=e;let t=this.name=e.name;this.fullpath=t;let{basename:i,extension:r}=oe(t);this.basename=i,this.extension=r}readText(){let{file:e}=this;return e.text?e.text():new Promise((t,i)=>{let r=new FileReader;r.addEventListener("load",()=>t(r.result)),r.addEventListener("error",i),r.readAsText(this.file)})}async read(){let{file:e}=this;return e.arrayBuffer?e.arrayBuffer():new Promise((t,i)=>{let r=new FileReader;r.addEventListener("load",()=>t(r.result)),r.addEventListener("error",i),r.readAsArrayBuffer(this.file)})}async readZip(e){return e(new Qt(new Rt(this.file)))}toString(){return this.file.toString()}};async function Io(n,e){let t=[];for(let i of n)try{i.type==="folder"?t.push(...await Io(await i.list(),e)):i.type==="file"&&(!e||e(i))&&t.push(i)}catch(r){console.log("Skipping path: ",i.name,r)}return t}function oe(n){let e=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),t=n,i="";e>=0&&(t=n.substring(e+1),i=n.substring(0,e));let[r,o]=Fo(t);return{parent:i,name:t,basename:r,extension:o}}function Fo(n){let e=n.lastIndexOf("."),t=n,i="";return e>0&&(t=n.substring(0,e),i=n.substring(e+1).toLowerCase()),[t,i]}var Do=class extends vn{constructor(e,t){super(e),this.fd=e,this.size=t}async readUint8Array(e,t){let i=Buffer.alloc(t),r=await this.fd.read(i,0,t,e);return new Uint8Array(Ki(i,0,r.bytesRead))}};var jl=require("obsidian"),_h=/[\/\?<>\\:\*\|"]/g,Th=/[\x00-\x1f\x80-\x9f]/g,Ah=/^\.+$/,kh=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Nh=/[\. ]+$/,Sh=/^\./,Rh=/[\[\]#|^]/g;function ze(n){return n.replace(_h,"").replace(Th,"").replace(Ah,"").replace(kh,"").replace(Nh,"").replace(Sh,"").replace(Rh,"")}function _n(n){let e=[];for(let t=0;t<n;t++)e.push((Math.random()*16|0).toString(16));return e.join("")}function dt(n){return new DOMParser().parseFromString(n,"text/html").documentElement}function Oh(n){return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}function Lo(n){return Oh(new TextEncoder().encode(n))}function Xi(n){return Object.isEmpty(n)?"":`---
`+(0,jl.stringifyYaml)(n)+`---
`}function ii(n,e,t="..."){return n.length<e?n:n.substring(0,e)+t}var Ce=require("obsidian");var Hl=300,ue=class{constructor(e,t){this.files=[];this.outputLocation="";this.notAvailable=!1;this.outputFolder=null;this.app=e,this.vault=e.vault,this.modal=t,this.init()}registerAuthCallback(e){this.modal.plugin.registerAuthCallback(e)}addFileChooserSetting(e,t,i=!1){let r=new Ce.Setting(this.modal.contentEl).setName("Files to import").setDesc("Pick the files that you want to import.").addButton(a=>a.setButtonText(i?"Choose files":"Choose file").onClick(async()=>{if(Ce.Platform.isDesktopApp){let s=["openFile","dontAddToRecent"];i&&s.push("multiSelections");let l=window.electron.remote.dialog.showOpenDialogSync({title:"Pick files to import",properties:s,filters:[{name:e,extensions:t}]});l&&l.length>0&&(this.files=l.map(c=>new Be(c)),o())}else{let s=createEl("input");s.type="file",s.accept=t.map(l=>"."+l.toLowerCase()).join(","),s.addEventListener("change",()=>{if(!s.files)return;let l=Array.from(s.files);l.length>0&&(this.files=l.map(c=>new Vi(c)).filter(c=>t.contains(c.extension)),o())}),s.click()}}));i&&Ce.Platform.isDesktopApp&&r.addButton(a=>a.setButtonText("Choose folders").onClick(async()=>{if(Ce.Platform.isDesktopApp){let s=window.electron.remote.dialog.showOpenDialogSync({title:"Pick folders to import",properties:["openDirectory","multiSelections","dontAddToRecent"]});if(s&&s.length>0){r.setDesc("Reading folders...");let l=s.map(c=>new en(c));this.files=await Io(l,c=>t.contains(c.extension)),o()}}}));let o=()=>{let a=document.createDocumentFragment(),s=this.files.length,l=this.files.map(c=>c.name).join(", ");l.length>Hl&&(l=l.substring(0,Hl)+"..."),a.createEl("span",{text:`These ${s} files will be imported: `}),a.createEl("br"),a.createEl("span",{cls:"u-pop",text:l}),r.setDesc(a)}}addOutputLocationSetting(e){this.outputLocation=e,new Ce.Setting(this.modal.contentEl).setName("Output folder").setDesc("Choose a folder in the vault to put the imported files. Leave empty to output to vault root.").addText(t=>t.setValue(e).onChange(i=>{this.outputLocation=i,this.outputFolder=null}))}async getOutputFolder(){if(this.outputFolder)return this.outputFolder;let{vault:e}=this.app,t=this.outputLocation;t===""&&(t="/");let i=e.getAbstractFileByPath(t);return(i===null||!(i instanceof Ce.TFolder))&&(await e.createFolder(t),i=e.getAbstractFileByPath(t)),i instanceof Ce.TFolder?(this.outputFolder=i,i):null}async getAvailablePathForAttachment(e,t){let i=await this.getOutputFolder(),r=i?{parent:i}:null,{basename:o,extension:a}=oe(e),s=await this.vault.getAvailablePathForAttachments(o,a,r),l=oe(s),c=l.extension?"."+l.extension:"."+a,p=1,m=s;for(;t.includes(m)||this.vault.getAbstractFileByPath(m);)m=q.join(l.parent,`${l.name} ${p}${c}`),p++;return m}sanitizeFilePath(e){return e.replace(/[:|?<>*\\]/g,"")}async createFolders(e){let t=e.split("/").map(o=>o.replace(/^\.+/,"")).join("/"),i=(0,Ce.normalizePath)(t),r=this.vault.getAbstractFileByPathInsensitive(i);if(r&&r instanceof Ce.TFolder)return r;if(await this.vault.createFolder(i),r=this.vault.getAbstractFileByPathInsensitive(i),!(r instanceof Ce.TFolder))throw new Error(`Failed to create folder at "${e}"`);return r}async saveAsMarkdownFile(e,t,i){let r=ze(t);return await this.app.fileManager.createNewMarkdownFile(e,r,i)}};var Xp=Jr(jp());var Ca=require("obsidian");var Hp=n=>{let t=vr.execSync(`${n} --version`).toString().toString().match(/(\d+)\.(\d+).(\d+)/);return(t==null?void 0:t[1])>3||(t==null?void 0:t[2])>32},qp=n=>{let e=[];if(!n)return e;let t=[],i=0,r=-1,o={};for(;i<n.length;){let a="";if(n[i]==="'")for(i++;i<n.length;)if(n[i]!=="'"){let s=n.indexOf("'",i);a+=n.substring(i,s),i=s}else if(n[i+1]==="'")a+=n[i],i+=2;else{i++;break}else if(n[i]==="N")a=null,i+=4;else{let s=Math.min(...[n.indexOf(",",i),n.indexOf(`
`,i)].filter(l=>l>0),n.length-1);a=parseFloat(n.substring(i,s)),i=s}r==-1?t.push(a):(o[t[r]]=a,r++),(n[i]==`
`||t.length<r)&&(r!==-1&&e.push(o),r=0,o={}),i++}return e};function Wp(n){for(var e=n[0],t=1,i=arguments.length;t<i;t++)e+=arguments[t]+n[t];return e}var{isArray:Hg}=Array,Er=class extends String{},Yp=(n,...e)=>{let t=[n[0]],i=[t];for(let r=0;r<e.length;r++)e[r]instanceof Er?t[t.length-1]+=e[r]+n[r+1]:(Hg(e[r])?(t.push(...e[r].slice(1).map(o=>",")),i.push(...e[r].length?e[r]:[""])):i.push(e[r]),t.push(n[r+1]));return i},zp=n=>new Er(n);var hi=(n,e)=>{let t="SQLITE_ERROR",i=new Error(t+": "+e);return i.code=t,n(i),""},Zp=(...n)=>zp(Wp(...n)),{from:qg}=Array,Wg=/'/g,Yg=n=>n.toString(16).padStart(2,"0"),zg=n=>`x'${qg(n,Yg).join("")}'`,Zg=n=>{switch(typeof n){case"string":return"'"+n.replace(Wg,"''")+"'";case"number":if(!isFinite(n))return;case"boolean":return+n;case"object":case"undefined":switch(!0){case!n:return"NULL";case n instanceof Date:return"'"+n.toISOString()+"'";case n instanceof Buffer:case n instanceof ArrayBuffer:n=new Uint8Array(n);case n instanceof Uint8Array:case n instanceof Uint8ClampedArray:return zg(n)}}},Sa=(n,e)=>{let[t,...i]=Yp(...e),r=[t[0]];for(let a=0;a<i.length;a++){let s=Zg(i[a]);if(s===void 0)return hi(n,"incompatible "+typeof s+"value");r.push(s,t[a+1])}let o=r.join("").trim();return o.length?o:hi(n,"empty query")};var Ra=Ca.Platform.isDesktopApp?window.require("node:crypto"):null,vr=Ca.Platform.isDesktopApp?window.require("node:child_process"):null,Da=Ra==null?void 0:Ra.randomUUID(),Gg=`[{"_":"${Da}"}]
`,Vg=`'_'
'${Da}'
`,{isArray:Kg}=Array,{parse:Vp}=JSON,{defineProperty:Xg}=Object,Jg=()=>{},Qg=(n,e,t,i,r,o)=>{let a=[],{stdout:s,stderr:l}=vr.spawn(i,r,o).on("close",p=>{if(c||p!==0){p!==0&&hi(e,"busy DB or query too slow");return}let m=a.join("").trim();if(t==="query")n(m);else{let g=Vp(m||"[]");n(t==="get"&&Kg(g)?g.shift():g)}});s.on("data",p=>{a.push(p)});let c=!1;l.on("data",p=>{c=!0,hi(e,"".trim.call(p))})},e0=(n,e,t)=>{let i=Hp(n),r=i?Gg:Vg,{stdin:o,stdout:a,stderr:s}=vr.spawn(n,e);i?o.write(`.mode json
`):o.write(`.mode quote
.headers on
`),t&&o.write(`.timeout ${t}
`);let l=Promise.resolve();return(c,p,m,g,b)=>{m==="close"?(o.write(`.quit
`),l=null):l&&(l=l.then(()=>new Promise(E=>{let f="",d=_=>{f+=_;let A=!1;for(;f.endsWith(r);)A=!0,f=f.slice(0,-r.length);if(A){for(v();f.startsWith(r);)f=f.slice(r.length);if(m==="query")c(f);else{let O=i?Vp(f||"[]"):qp(f);c(m==="get"?O.shift():O)}}},h=_=>{v(),p(new Error(_))},v=()=>{E(),a.removeListener("data",d),s.removeListener("data",h)};a.on("data",d),s.once("data",h),o.write(`${b[b.length-1]};
`),o.write(`SELECT '${Da}' as _;
`)})))}},Oa=(n,e,t,i,r)=>(...o)=>new Promise((a,s)=>{let l=Sa(s,o);l.length&&(n==="get"&&/^SELECT\s+/i.test(l)&&!/\s+LIMIT\s+\d+$/i.test(l)&&(l+=" LIMIT 1"),t(a,s,n,e,i.concat(l),r))}),Gp="";function Ia(n,e={}){n===":memory:"&&(n=Gp||(Gp=q.join(nn.tmpdir(),randomUUID())));let t=e.timeout||0,i=e.bin||"sqlite3",r=[n,"-bail"],o={timeout:t};e.readonly&&r.push("-readonly"),t&&r.push("-cmd",".timeout "+t);let a=r.concat("-json"),s=e.exec||(e.persistent?e0(i,r,t):Qg);return{transaction(){let l=[];return Xg((...c)=>{l.push(c)},"commit",{value(){return new Promise((c,p)=>{let m=["BEGIN TRANSACTION"];for(let g of l){let b=Sa(p,g);if(!b.length)return;m.push(b)}m.push("COMMIT"),s(c,p,"query",i,r.concat(m.join(";")),o)})}})},query:Oa("query",i,s,r,o),get:Oa("get",i,s,a,o),all:Oa("all",i,s,a,o),close:e.persistent?()=>s(null,null,"close"):Jg,raw:Zp}}var Fa="Library/Group Containers/group.com.apple.notes",Kp="NoteStore.sqlite",t0=978307200,_r=class extends ue{constructor(){super(...arguments);this.owners={};this.resolvedAccounts={};this.resolvedFiles={};this.resolvedFolders={};this.multiAccount=!1;this.noteCount=0;this.parsedNotes=0;this.omitFirstLine=!0;this.importTrashed=!1;this.includeHandwriting=!1;this.trashFolders=[]}init(){if(!lt.Platform.isMacOS||!lt.Platform.isDesktop){this.modal.contentEl.createEl("p",{text:"Due to platform limitations, Apple Notes cannot be exported from this device. Open your vault on a Mac to export from Apple Notes."}),this.notAvailable=!0;return}this.addOutputLocationSetting("Apple Notes"),new lt.Setting(this.modal.contentEl).setName("Import recently deleted notes").setDesc('Import notes in the "Recently Deleted" folder. Unlike in Apple Notes, they will not be automatically removed after a set amount of time.').addToggle(t=>t.setValue(!1).onChange(async i=>this.importTrashed=i)),new lt.Setting(this.modal.contentEl).setName("Omit first line").setDesc("Don't include the first line in the text, since Apple Notes uses it as the title. It will still be used as the note name.").addToggle(t=>t.setValue(!0).onChange(async i=>this.omitFirstLine=i)),new lt.Setting(this.modal.contentEl).setName("Include handwriting text").setDesc("When Apple Notes has detected handwriting in drawings, include it as text before the drawing.").addToggle(t=>t.setValue(!1).onChange(async i=>this.includeHandwriting=i))}async getNotesDatabase(){let t=q.join(nn.homedir(),Fa),i=window.electron.remote.dialog.showOpenDialogSync({defaultPath:t,properties:["openDirectory"],message:'Select the "group.com.apple.notes" folder to allow Obsidian to read Apple Notes data.'});if(!(i!=null&&i.includes(t)))return new lt.Notice("Data import failed. Ensure you have selected the correct Apple Notes data folder."),null;let r=q.join(t,Kp),o=q.join(nn.tmpdir(),Kp);return await $e.copyFile(r,o),await $e.copyFile(r+"-shm",o+"-shm"),await $e.copyFile(r+"-wal",o+"-wal"),new Ia(o,{readonly:!0,persistent:!0})}async import(t){if(this.ctx=t,this.protobufRoot=Xp.Root.fromJSON(ds),this.rootFolder=await this.getOutputFolder(),!this.rootFolder){new lt.Notice("Please select a location to export to.");return}if(this.database=await this.getNotesDatabase(),!this.database)return;this.keys=Object.fromEntries((await this.database.all`SELECT z_ent, z_name FROM z_primarykey`).map(a=>[a.Z_NAME,a.Z_ENT]));let i=await this.database.all`
SELECT z_pk FROM ziccloudsyncingobject WHERE z_ent = ${this.keys.ICAccount}
`,r=await this.database.all`
SELECT z_pk, ztitle2 FROM ziccloudsyncingobject WHERE z_ent = ${this.keys.ICFolder}
`;for(let a of i)await this.resolveAccount(a.Z_PK);for(let a of r)try{await this.resolveFolder(a.Z_PK)}catch(s){this.ctx.reportFailed(a.ZTITLE2,s==null?void 0:s.message),console.error(s)}let o=await this.database.all`
SELECT
z_pk, zfolder, ztitle1 FROM ziccloudsyncingobject
WHERE
z_ent = ${this.keys.ICNote}
AND ztitle1 IS NOT NULL
AND zfolder NOT IN (${this.trashFolders})
`;this.noteCount=o.length;for(let a of o)try{await this.resolveNote(a.Z_PK)}catch(s){this.ctx.reportFailed(a.ZTITLE1,s==null?void 0:s.message),console.error(s)}this.database.close()}async resolveAccount(t){!this.multiAccount&&Object.keys(this.resolvedAccounts).length&&(this.multiAccount=!0);let i=await this.database.get`
SELECT zname, zidentifier FROM ziccloudsyncingobject
WHERE z_ent = ${this.keys.ICAccount} AND z_pk = ${t}
`;this.resolvedAccounts[t]={name:i.ZNAME,uuid:i.ZIDENTIFIER,path:q.join(nn.homedir(),Fa,"Accounts",i.ZIDENTIFIER)}}async resolveFolder(t){var a;if(t in this.resolvedFiles)return this.resolvedFolders[t];let i=await this.database.get`
SELECT ztitle2, zparent, zidentifier, zfoldertype, zowner
FROM ziccloudsyncingobject
WHERE z_ent = ${this.keys.ICFolder} AND z_pk = ${t}
`,r;if(i.ZFOLDERTYPE==3)return null;if(!this.importTrashed&&i.ZFOLDERTYPE==1)return this.trashFolders.push(t),null;if(i.ZPARENT!==null)r=((a=await this.resolveFolder(i.ZPARENT))==null?void 0:a.path)+"/";else if(this.multiAccount){let s=this.resolvedAccounts[i.ZOWNER].name;r=`${this.rootFolder.path}/${s}/`}else r=`${this.rootFolder.path}/`;i.ZIDENTIFIER.startsWith("DefaultFolder")||(r+=ze(i.ZTITLE2));let o=await this.createFolders(r);return this.resolvedFolders[t]=o,this.owners[t]=i.ZOWNER,o}async resolveNote(t){if(t in this.resolvedFiles)return this.resolvedFiles[t];let i=await this.database.get`
SELECT
nd.z_pk, hex(nd.zdata) as zhexdata, zcso.ztitle1, zfolder,
zcreationdate1, zcreationdate2, zcreationdate3, zmodificationdate1, zispasswordprotected
FROM
zicnotedata AS nd,
(SELECT
*, NULL AS zcreationdate3, NULL AS zcreationdate2,
NULL AS zispasswordprotected FROM ziccloudsyncingobject
) AS zcso
WHERE
zcso.z_pk = nd.znote
AND zcso.z_pk = ${t}
`;if(i.ZISPASSWORDPROTECTED)return this.ctx.reportSkipped(i.ZTITLE1,"note is password protected"),null;let r=this.resolvedFolders[i.ZFOLDER]||this.rootFolder,o=`${i.ZTITLE1}.md`,a=await this.saveAsMarkdownFile(r,o,"");this.ctx.status(`Importing note ${o}`),this.resolvedFiles[t]=a,this.owners[t]=this.owners[i.ZFOLDER];let s=this.decodeData(i.zhexdata,Zt);return this.vault.modify(a,await s.format(),{ctime:this.decodeTime(i.ZCREATIONDATE3||i.ZCREATIONDATE2||i.ZCREATIONDATE1),mtime:this.decodeTime(i.ZMODIFICATIONDATE1)}),this.parsedNotes++,this.ctx.reportProgress(this.parsedNotes,this.noteCount),a}async resolveAttachment(t,i){if(t in this.resolvedFiles)return this.resolvedFiles[t];let r,o,a,s,l;switch(i){case"com.apple.paper.doc.scan":s=await this.database.get`
SELECT
zidentifier, zfallbackpdfgeneration, zcreationdate, zmodificationdate, znote
FROM
(SELECT *, NULL AS zfallbackpdfgeneration FROM ziccloudsyncingobject)
WHERE
z_ent = ${this.keys.ICAttachment}
AND z_pk = ${t}
`,r=q.join("FallbackPDFs",s.ZIDENTIFIER,s.ZFALLBACKPDFGENERATION||"","FallbackPDF.pdf"),o="Scan",a="pdf";break;case"com.apple.notes.gallery":s=await this.database.get`
SELECT
zidentifier, zsizeheight, zsizewidth, zcreationdate, zmodificationdate, znote
FROM ziccloudsyncingobject
WHERE
z_ent = ${this.keys.ICAttachment}
AND z_pk = ${t}
`,r=q.join("Previews",`${s.ZIDENTIFIER}-1-${s.ZSIZEWIDTH}x${s.ZSIZEHEIGHT}-0.jpeg`),o="Scan Page",a="jpg";break;case"com.apple.paper":s=await this.database.get`
SELECT
zidentifier, zfallbackimagegeneration, zcreationdate, zmodificationdate,
znote, zhandwritingsummary
FROM
(SELECT *, NULL AS zfallbackimagegeneration FROM ziccloudsyncingobject)
WHERE
z_ent = ${this.keys.ICAttachment}
AND z_pk = ${t}
`,s.ZFALLBACKIMAGEGENERATION?r=q.join("FallbackImages",s.ZIDENTIFIER,s.ZFALLBACKIMAGEGENERATION,"FallbackImage.png"):r=q.join("FallbackImages",`${s.ZIDENTIFIER}.jpg`),o="Drawing",a="png";break;default:s=await this.database.get`
SELECT
a.zidentifier, a.zfilename,
a.zgeneration1, b.zcreationdate, b.zmodificationdate, b.znote
FROM
(SELECT *, NULL AS zgeneration1 FROM ziccloudsyncingobject) AS a,
ziccloudsyncingobject AS b
WHERE
a.z_ent = ${this.keys.ICMedia}
AND a.z_pk = ${t}
AND a.z_pk = b.zmedia
`,r=q.join("Media",s.ZIDENTIFIER,s.ZGENERATION1||"",s.ZFILENAME),[o,a]=Fo(s.ZFILENAME);break}try{let c=await this.getAttachmentSource(this.resolvedAccounts[this.owners[s.ZNOTE]],r),p=await this.getAvailablePathForAttachment(`${o}.${a}`,[]);l=await this.vault.createBinary(p,c,{ctime:this.decodeTime(s.ZCREATIONDATE),mtime:this.decodeTime(s.ZMODIFICATIONDATE)})}catch(c){return this.ctx.reportFailed(r),console.error(c),null}return this.resolvedFiles[t]=l,this.ctx.reportAttachmentSuccess(this.resolvedFiles[t].path),l}decodeData(t,i){let r=Ul.gunzipSync(Buffer.from(t,"hex")),o=this.protobufRoot.lookupType(i.protobufType).decode(r);return new i(this,o)}decodeTime(t){return!t||t<1?new Date().getTime():Math.floor((t+t0)*1e3)}async getAttachmentSource(t,i){try{return await $e.readFile(q.join(t.path,i))}catch(r){return await $e.readFile(q.join(nn.homedir(),Fa,i))}}};var On=require("obsidian");var gi=class{constructor(e,t){this.type="file";this.entry=t,this.fullpath=e.fullpath+"/"+t.filename;let{parent:i,name:r,basename:o,extension:a}=oe(t.filename);this.parent=i,this.name=r,this.basename=o,this.extension=a}async readText(){return this.entry.getData(new qi)}async read(){return(await this.entry.getData(new Jn)).arrayBuffer()}get filepath(){return this.entry.filename}get size(){return this.entry.uncompressedSize}get ctime(){return this.entry.creationDate}get mtime(){return this.entry.lastModDate}async readZip(e){return e(new Qt(new Rt(new Blob([await this.read()]))))}};async function yt(n,e){await n.readZip(async t=>{let r=(await t.getEntries()).filter(o=>!o.directory&&!!o.getData).map(o=>new gi(n,o));return e(t,r)})}var Tr=class extends ue{constructor(){super(...arguments);this.attachmentMap={}}init(){this.addFileChooserSetting("Bear2bk",["bear2bk"]),this.addOutputLocationSetting("Bear")}async import(t){let{files:i}=this;if(i.length===0){new On.Notice("Please pick at least one file to import.");return}let r=await this.getOutputFolder();if(!r){new On.Notice("Please select a location to export to.");return}let o=r,a=new RegExp("\\[[^\\]]*\\]\\((assets/[^\\)]+)\\)","gm"),s=await this.createFolders(`${r.path}/archive`),l=await this.createFolders(`${r.path}/trash`);for(let c of i){if(t.isCancelled())return;t.status("Processing "+c.name),await yt(c,async(p,m)=>{let g=await this.collectMetadata(t,m);for(let b of m){if(t.isCancelled())return;let{fullpath:E,filepath:f,parent:d,name:h,extension:v}=b;if(!(h==="info.json"||h==="tags.json")){t.status("Processing "+h);try{if(v==="md"||v==="markdown"){let _=oe(d).basename;t.status("Importing note "+_);let A=await b.readText();A=this.removeMarkdownHeader(_,A);let O=[...A.matchAll(a)];if(O.length>0)for(let C of O){let[N,P]=C,L=q.join(d,decodeURI(P)),j=await this.getAttachmentStoragePath(L);j=encodeURI(j);let Y=N.replace(P,j);A=A.replace(N,Y)}let T=(0,On.normalizePath)(_),k=g[d],w=o;k!=null&&k.archived?w=s:k!=null&&k.trashed&&(w=l);let D=await this.saveAsMarkdownFile(w,T,A);k!=null&&k.ctime&&(k!=null&&k.mtime)&&await this.modifFileTimestamps(k,D),t.reportNoteSuccess(_)}else if(f.match(/\/assets\//g)){t.status("Importing asset "+b.name);let _=await this.getAttachmentStoragePath(b.filepath),A=await b.read();await this.vault.createBinary(_,A),t.reportAttachmentSuccess(b.fullpath)}else t.reportSkipped(E,"unknown type of file")}catch(_){t.reportFailed(E,_)}}}})}}async modifFileTimestamps(t,i){let r={ctime:t.ctime,mtime:t.mtime};await this.vault.append(i,"",r)}async collectMetadata(t,i){let r={};for(let o of i){if(t.isCancelled())return r;if(o.name!=="info.json")continue;let a=await o.readText(),l=JSON.parse(a)["net.shinyfrog.bear"],c=Date.parse(l.creationDate),p=Date.parse(l.modificationDate);r[o.parent]={ctime:isNaN(c)?void 0:c,mtime:isNaN(p)?void 0:p,archived:l.archived===1,trashed:l.trashed===1}}return r}async getAttachmentStoragePath(t){let i=(0,On.normalizePath)(t);if(this.attachmentMap[i])return this.attachmentMap[i];let r=Object.values(this.attachmentMap),o=await this.getAvailablePathForAttachment(i,r);return o=o.replace(/:/g,""),this.attachmentMap[i]=o,o}removeMarkdownHeader(t,i){if(!i.startsWith("# "))return i;let r=i.indexOf(`
`),o=r>0?i.substring(2,r):i.substring(2);return o=o.trim(),o!==t.trim()&&o!==""?i:r>0?i.substring(r+1):""}};var _i=require("obsidian");var nd=require("obsidian");var Jp=require("obsidian");var Qp=n=>({...n,created:yi(n.created),statusupdated:yi(n.statusupdated),updated:yi(n.updated),duedate:yi(n.duedate),taskflag:n.taskflag==="true",reminderdate:n.reminder?yi(n.reminder.reminderdate):void 0,sortweight:n.sortweight}),yi=n=>n?(0,Jp.moment)(n,"YYYYMMDDThhmmssZ").toDate():void 0;var Lu=Jr(mu());var de=n=>{let e={get(t,i){return t[i]}};return new Proxy(n.attributes,e)};var hu="\n```\n",$a=n=>{let e=de(n);return e.style&&e.style.value.indexOf("-en-codeblock:true")>=0},f0=n=>{let e=de(n),t="padding-left:",i=0;return e.style&&e.style.value.indexOf(t)>=0&&(i=Math.floor(e.style.value.split(t)[1].split("px")[0]/20)),i},Ba=n=>n.replace(/\\(.)/g,"$1"),gu=(n,e)=>{let t=f0(e);return n=`${" ".repeat(t)}${n}`,$a(e)?(n=Ba(n),`${hu}${n}${hu}`):e.parentElement&&$a(e.parentElement)&&e.parentElement.firstElementChild===e?`${n}`:e.parentElement&&$a(e.parentElement)?`
${n}`:e.isBlock?`
${n}
`:n};var Ar="\n```\n",d0="-en-codeblock:true",m0=/\b(Courier|Mono|Consolas|Console|Inconsolata|Pitch|Monaco|monospace)\b/,yu=n=>{var o,a;if(n.nodeType!==1)return null;let e=n.childNodes,t=e.length;if(t>1)return"mixed";if(t===1){let s=yu(e[0]);if(s)return s}let i=de(n);if(n.tagName==="FONT")return(o=i.face)==null?void 0:o.value;let r=(a=i.style)==null?void 0:a.value;if(r){let s=r.match(/font-family:([^;]+)/);if(s)return s[1]}return null},bi=n=>{var r;let t=(r=de(n).style)==null?void 0:r.value;if(t&&t.includes(d0))return!0;let i=yu(n);return!!i&&m0.test(i)},bu=(n,e)=>{if(bi(e)){let t=e.previousSibling,i=t&&t.tagName===e.tagName&&bi(t),r=e.nextSibling,o=r&&r.tagName===e.tagName&&bi(r);return i||o?(n=i?`
${n}`:`${Ar}${n}`,n=o?`${n}
`:`${n}${Ar}`,n):(n=Ba(n),n.trim()?`${Ar}${n}${Ar}`:n)}return e.parentElement&&bi(e.parentElement)&&e.parentElement.firstElementChild===e?n:e.parentElement&&bi(e.parentElement)?`
${n}`:e.isBlock?`
${n}
`:n};var Ye=n=>e=>e.nodeName===n||e.nodeName.toLowerCase()===n;var xu={filter:Ye("IMG"),replacement:(n,e)=>{let t=de(e);if(!t.src)return"";let i=t.src.value,r=e.width||"",o=e.height||"",a=i;B.sanitizeResourceNameSpaces?a=a.replace(/ /g,B.replacementChar):B.urlEncodeFileNamesAndLinks&&(a=encodeURI(a));let s=r||o?` =${r}x${o}`:"";if(B.keepImageSize)return s=r||o?`|${r||0}x${o||0}`:"",a.startsWith("./")?`![[${a}${s}]]`:`![${s}](${a})`;if(!i.match(/^[a-z]+:/))return`![[${a}]]`;let l=t.src.value.split("/");return`![${l[l.length-1]}](${a})`}};var ke=class n{constructor(){this.noteIdNameMap={},this.noteIdNameTOCMap={}}static getInstance(){return n.instance||(n.instance=new n),n.instance}addItemToMap(e){this.noteIdNameMap[e.url]={...this.noteIdNameMap[e.url],title:e.title,noteName:this.currentNoteName,notebookName:this.currentNotebookName,uniqueEnd:e.uniqueEnd}}addItemToTOCMap(e){this.noteIdNameTOCMap[e.url]={...this.noteIdNameMap[e.url],title:e.title,noteName:this.currentNoteName,notebookName:this.currentNotebookName,uniqueEnd:e.uniqueEnd}}getNoteIdNameMap(){return this.noteIdNameMap}getNoteIdNameTOCMap(){return this.noteIdNameTOCMap}getAllNoteIdNameMap(){return{...this.noteIdNameMap,...this.noteIdNameTOCMap}}getNoteIdNameMapByNoteTitle(e){return Object.values(this.getAllNoteIdNameMap()).filter(t=>t.title===e)}setCurrentNotebookName(e){this.currentNotebookName=e}getCurrentNotebookName(){return this.currentNotebookName}setCurrentNotebookFullpath(e){this.currentNotebookFullpath=e}setCurrentNoteName(e){this.currentNoteName=e}getCurrentNoteName(){return this.currentNoteName}getCurrentNotePath(){return this.currentNotePath}setCurrentNotePath(e){this.currentNotePath=e}getCurrentNotebookFullpath(){return this.currentNotebookFullpath}};var wu=require("obsidian");var Cn=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var h0={"application/andrew-inset":"ez","application/applixware":"aw","application/atom+xml":"atom","application/atomcat+xml":"atomcat","application/atomdeleted+xml":"atomdeleted","application/atomsvc+xml":"atomsvc","application/atsc-dwd+xml":"dwd","application/atsc-held+xml":"held","application/atsc-rsat+xml":"rsat","application/bdoc":"bdoc","application/calendar+xml":"xcs","application/ccxml+xml":"ccxml","application/cdfx+xml":"cdfx","application/cdmi-capability":"cdmia","application/cdmi-container":"cdmic","application/cdmi-domain":"cdmid","application/cdmi-object":"cdmio","application/cdmi-queue":"cdmiq","application/cpl+xml":"cpl","application/cu-seeme":"cu","application/dash+xml":"mpd","application/dash-patch+xml":"mpp","application/davmount+xml":"davmount","application/docbook+xml":"dbk","application/dssc+der":"dssc","application/dssc+xml":"xdssc","application/ecmascript":"es","application/emma+xml":"emma","application/emotionml+xml":"emotionml","application/epub+zip":"epub","application/exi":"exi","application/express":"exp","application/fdt+xml":"fdt","application/font-tdpfr":"pfr","application/geo+json":"geojson","application/gml+xml":"gml","application/gpx+xml":"gpx","application/gxf":"gxf","application/gzip":"gz","application/hjson":"hjson","application/hyperstudio":"stk","application/inkml+xml":"ink","application/ipfix":"ipfix","application/its+xml":"its","application/java-archive":"jar","application/java-serialized-object":"ser","application/java-vm":"class","application/javascript":"js","application/json":"json","application/json5":"json5","application/jsonml+json":"jsonml","application/ld+json":"jsonld","application/lgr+xml":"lgr","application/lost+xml":"lostxml","application/mac-binhex40":"hqx","application/mac-compactpro":"cpt","application/mads+xml":"mads","application/manifest+json":"webmanifest","application/marc":"mrc","application/marcxml+xml":"mrcx","application/mathematica":"ma","application/mathml+xml":"mathml","application/mbox":"mbox","application/media-policy-dataset+xml":"mpf","application/mediaservercontrol+xml":"mscml","application/metalink+xml":"metalink","application/metalink4+xml":"meta4","application/mets+xml":"mets","application/mmt-aei+xml":"maei","application/mmt-usd+xml":"musd","application/mods+xml":"mods","application/mp21":"m21","application/mp4":"mp4s","application/msword":"doc","application/mxf":"mxf","application/n-quads":"nq","application/n-triples":"nt","application/node":"cjs","application/octet-stream":"bin","application/oda":"oda","application/oebps-package+xml":"opf","application/ogg":"ogx","application/omdoc+xml":"omdoc","application/onenote":"onetoc","application/oxps":"oxps","application/p2p-overlay+xml":"relo","application/patch-ops-error+xml":"xer","application/pdf":"pdf","application/pgp-encrypted":"pgp","application/pgp-keys":"asc","application/pgp-signature":"asc","application/pics-rules":"prf","application/pkcs10":"p10","application/pkcs7-mime":"p7m","application/pkcs7-signature":"p7s","application/pkcs8":"p8","application/pkix-attr-cert":"ac","application/pkix-cert":"cer","application/pkix-crl":"crl","application/pkix-pkipath":"pkipath","applicatio Line truncated
`).replace(/\n/gm,`
${Iu}`),l=o>0?a:i(e)?`${Rr} `:r(e)?`${Sr} `:"* ",c=e.parentNode;if(c.nodeName==="OL"){let m=c.getAttribute("start"),g=Array.prototype.indexOf.call(c.children,e);l=`${m?Number(m)+g:g+1}. `}let p;return p=l+s+(e.nextSibling&&!/\n$/.test(s)?`
`:""),p}};var Nr=n=>{let e=new window.TurndownService({br:"",...n.turndownOptions,blankReplacement:(t,i)=>i.isBlock?`
`:"",keepReplacement:(t,i)=>i.isBlock?`
${i.outerHTML}
`:i.outerHTML,defaultReplacement:(t,i)=>i.isBlock?`
${t}
`:t});return e.use(Lu.gfm),e.addRule("span",Nu),e.addRule("strikethrough",Su),e.addRule("evernote task items",Ru),e.addRule("wikistyle links",Au),e.addRule("images",xu),e.addRule("list",Fu),e.addRule("italic",Du),n.keepMDCharactersOfENNotes&&(e.escape=t=>t),e.addRule("divBlock",Cu),n.keepOriginalAmountOfNewlines&&e.addRule("newline",Ou),e};var Pu=n=>{n.replaceWith(...Array.from(n.children))},Mu=n=>{let e=n.parentElement;e.replaceWith(...Array.from(e.childNodes)),e.append(...Array.from(n.childNodes)),n.appendChild(e)},D0=n=>(Array.from(n.querySelectorAll("span>en-todo")).forEach(Mu),Array.from(n.querySelectorAll("a>en-todo")).forEach(Mu),n),I0=n=>{let e=n.replace(/<li>/g,"<li><div>");return e=e.replace(/<\/li>/g,"</div></li>"),e=e.replace(/<li><div>(\s)*<div>/g,"<li><div>"),e=e.replace(/<\/div>(\s)*<\/div><\/li>/g,"</div></li>"),e},F0=n=>{var o;let e=Array.from(n.getElementsByTagName("ul")),t=Array.from(n.getElementsByTagName("ol")),i=e.concat(t);i.forEach(a=>{a.parentElement.tagName==="LI"&&a.parentElement.replaceWith(a),a.previousElementSibling&&a.previousElementSibling.tagName==="LI"&&a.previousElementSibling.appendChild(a)});for(let a of i){let s=a.parentElement;(s==null?void 0:s.tagName)==="DIV"&&((o=s==null?void 0:s.parentElement)==null?void 0:o.tagName)==="UL"&&Pu(s),((s==null?void 0:s.tagName)==="UL"||(s==null?void 0:s.tagName)==="OL")&&(s==null?void 0:s.childNodes.length)===1&&Pu(s)}let r=Array.from(n.getElementsByTagName("li"));for(let a of r){let s=a.firstElementChild;if(s&&s.tagName==="DIV"){let l=Array.from(s.childNodes);s.replaceWith(...l)}}return n},$u=(n,{htmlContent:e})=>{let t=e.replace(/<!DOCTYPE en-note [^>]*>/,"<!DOCTYPE html>").replace(/(<a [^>]*)\/>/,"$1></a>").replace(/<div[^\/\<]*\/>/g,""),i=new DOMParser().parseFromString(I0(t),"text/html").getElementsByTagName("en-note").item(0),r=Nr(n).turndown(D0(F0(i))),o=new RegExp("<YARLE_NEWLINE_PLACEHOLDER>","g");return r=r.replace(o,""),r&&r!=="undefined"?{content:r}:{content:""}};var Of=Jr(require("crypto"));var bt=require("obsidian");var Bu=(n,e)=>({createdAt:L0(n),updatedAt:P0(n),sourceUrl:M0(n),location:$0(n),reminderTime:B0(n),reminderOrder:U0(n),reminderDoneTime:j0(n),notebookName:e});var L0=n=>!B.skipCreationTime&&n.created?(0,bt.moment)(n.created).format(B.dateFormat):"",P0=n=>!B.skipUpdateTime&&n.updated?(0,bt.moment)(n.updated).format(B.dateFormat):"",M0=n=>!B.skipSourceUrl&&n["note-attributes"]?n["note-attributes"]["source-url"]:"",$0=n=>!B.skipLocation&&n["note-attributes"]&&n["note-attributes"].longitude?`${n["note-attributes"].latitude},${n["note-attributes"].longitude}`:"",B0=n=>!B.skipReminderTime&&n["note-attributes"]&&n["note-attributes"]["reminder-time"]?(0,bt.moment)(n["note-attributes"]["reminder-time"]).format(B.dateFormat):"",U0=n=>!B.skipReminderOrder&&n["note-attributes"]&&n["note-attributes"]["reminder-order"]?n["note-attributes"]["reminder-order"]:"",j0=n=>!B.skipReminderDoneTime&&n["note-attributes"]&&n["note-attributes"]["reminder-done-time"]?(0,bt.moment)(n["note-attributes"]["reminder-done-time"]).format(B.dateFormat):"",Uu=n=>({tags:H0(n)}),H0=n=>{if(!B.skipTags&&n.tag){let e=Array.isArray(n.tag)?n.tag:[n.tag],t=B.nestedTags;return e.map(r=>{let o=r.toString().replace(/^#/,"");t&&(o=o.replace(new RegExp(Cn(t.separatorInEN),"g"),t.replaceSeparatorWith));let a=t&&t.replaceSpaceWith||"-";return o=o.replace(/ /g,a),`${B.useHashTags?"#":""}${o}`}).join(" ")}return""},Ha;try{Ha=window.require("btime")}catch(n){}var Or=(n,e)=>{let t=(0,bt.moment)(e.created).valueOf();t>0&&Ha&&Ha.btime(n,t);let r=(0,bt.moment)(e.updated).valueOf()/1e3;try{K.utimesSync(n,r,r)}catch(o){}},ju=n=>n["resource-attributes"]&&n["resource-attributes"].timestamp?(0,bt.moment)(n["resource-attributes"].timestamp):(0,bt.moment)();var Hu=(n,e,t)=>{let i=n.lastIndexOf(e);return i<0?n:n.substring(0,i)+t+n.substring(i+e.length)};var Ne={mdPath:"",resourcePath:""},Dr=249,qu=(n,e)=>ja(n,e).replace(/\s/g,"_"),Wu=(n,e)=>{if(n.length<=11)throw Error("FATAL: note folder directory path exceeds the OS limitation. Please pick a destination closer to the root folder.");return`${Wa()}${q.sep}${n}`.length<Dr?n:`${n.slice(0,Dr-11)}_${e}.md`},q0=(n,e,t)=>{let r=ke.getInstance().getNoteIdNameMapByNoteTitle(Dn(n.title))[0]||{uniqueEnd:_n(6)};if(e.length<=11)throw Error("FATAL: note folder directory path exceeds the OS limitation. Please pick a destination closer to the root folder.");return`${t.slice(0,Dr-11)}_${r.uniqueEnd}.md`},W0=(n,e,t)=>{let i=Eu(n,e,t),r=`${n}${q.sep}${Dn(i)}`;return r.length<Dr?r:q0(e,i,r)},Yu=n=>W0(Ne.mdPath,n,"md");var Y0=n=>{K.existsSync(n)&&(K.rmSync?K.rmSync(n,{recursive:!0,force:!0}):K.rmdirSync(n,{recursive:!0})),K.mkdirSync(n)},zu=n=>{let e=`${q.sep}${B.resourcesDir}`;return B.haveGlobalResources?`..${e}`:B.haveEnexLevelResources?`.${e}`:`.${e}${q.sep}${qu(Ne.mdPath,n)}.resources`},qa=n=>B.haveGlobalResources?q.resolve(Ne.resourcePath,"..","..",B.resourcesDir):B.haveEnexLevelResources?Ne.resourcePath:`${Ne.resourcePath}${q.sep}${qu(NLine truncated
|\r|
))*?(?=${i})${i}`;return n.replace(new RegExp(a,"g"),"")};var Bt=(n,e,t,i)=>({template:n,check:e,startBlockPlaceholder:t.START_BLOCK,endBlockPlaceholder:t.END_BLOCK,valuePlaceholder:t.CONTENT_PLACEHOLDER,value:i});var nf=(n,e,t)=>{let i=Bt(e,t,Ya,n.content);return $t(i)};var wi={};Oe(wi,{CONTENT_PLACEHOLDER:()=>V0,END_BLOCK:()=>X0,START_BLOCK:()=>K0});var V0="{tags}",K0="{tags-block}",X0="{end-tags-block}";var rf=(n,e,t)=>{let i=Bt(e,t,wi,n.tags);return $t(i)};var za={};Oe(za,{CONTENT_PLACEHOLDER:()=>J0,END_BLOCK:()=>ey,START_BLOCK:()=>Q0});var J0="{title}",Q0="{title-block}",ey="{end-title-block}";var of=(n,e,t)=>{let i=Bt(e,t,za,n.title);return $t(i)};var pn={};Oe(pn,{CONTENT_PLACEHOLDER:()=>ty,END_BLOCK:()=>iy,START_BLOCK:()=>ny});var ty="{created-at}",ny="{created-at-block}",iy="{end-created-at-block}";var _e=(n,e,t)=>n.replace(new RegExp(`${e.CONTENT_PLACEHOLDER}`,"g"),t||"").replace(new RegExp(`${e.START_BLOCK}`,"g"),"").replace(new RegExp(`${e.END_BLOCK}`,"g"),"");var af=(n,e)=>_e(e,pn,n.createdAt);var un={};Oe(un,{CONTENT_PLACEHOLDER:()=>ry,END_BLOCK:()=>ay,START_BLOCK:()=>oy});var ry="{updated-at}",oy="{updated-at-block}",ay="{end-updated-at-block}";var sf=(n,e)=>_e(e,un,n.updatedAt);var fn={};Oe(fn,{CONTENT_PLACEHOLDER:()=>sy,END_BLOCK:()=>cy,START_BLOCK:()=>ly});var sy="{source-url}",ly="{source-url-block}",cy="{end-source-url-block}";var lf=(n,e)=>_e(e,fn,n.sourceUrl);var dn={};Oe(dn,{CONTENT_PLACEHOLDER:()=>py,END_BLOCK:()=>fy,START_BLOCK:()=>uy});var py="{location}",uy="{location-block}",fy="{end-location-block}";var cf=(n,e)=>_e(e,dn,n.location);var mn={};Oe(mn,{CONTENT_PLACEHOLDER:()=>dy,END_BLOCK:()=>hy,START_BLOCK:()=>my});var dy="{notebook}",my="{notebook-block}",hy="{end-notebook-block}";var pf=(n,e)=>_e(e,mn,n.notebookName);var In={};Oe(In,{CONTENT_PLACEHOLDER:()=>gy,END_BLOCK:()=>by,START_BLOCK:()=>yy});var gy="{reminder-time}",yy="{reminder-time-block}",by="{end-reminder-time-block}";var uf=(n,e)=>_e(e,In,n.reminderTime);var Fn={};Oe(Fn,{CONTENT_PLACEHOLDER:()=>xy,END_BLOCK:()=>vy,START_BLOCK:()=>wy});var xy="{reminder-order}",wy="{reminder-order-block}",vy="{end-reminder-order-block}";var ff=(n,e)=>_e(e,Fn,n.reminderOrder);var Ln={};Oe(Ln,{CONTENT_PLACEHOLDER:()=>Ey,END_BLOCK:()=>Ty,START_BLOCK:()=>_y});var Ey="{reminder-done-time}",_y="{reminder-done-time-block}",Ty="{end-reminder-done-time-block}";var df=(n,e)=>_e(e,Ln,n.reminderDoneTime);var vi={};Oe(vi,{CONTENT_PLACEHOLDER:()=>Ay,END_BLOCK:()=>Ny,START_BLOCK:()=>ky});var Ay="{tags-yaml-list}",ky="{tags-yaml-list-block}",Ny="{end-tags-yaml-list-block}";var mf=(n,e,t)=>{let i;n.tags&&(i=`
`+n.tags.split(" ").map(o=>` - ${o.replace(/^#/,"")}`).join(`
`));let r=Bt(e,t,vi,i);return $t(r)};var Za="{metadata-block}",Ga="{end-metadata-block}";var hf=`\r?
?`;var me=(n,e)=>n.replace(new RegExp(`${e.START_BLOCK}(?<=${e.START_BLOCK})(.*)(?=${e.END_BLOCK})${e.END_BLOCK}${hf}`,"g"),"");var gf=n=>me(n,pn);var yf=n=>me(n,un);var bf=n=>me(n,fn);var xf=n=>me(n,mn);var wf=n=>me(n,dn);var Ir={};Oe(Ir,{CONTENT_PLACEHOLDER:()=>Ry,END_BLOCK:()=>Cy,START_BLOCK:()=>Oy});var Ry="{link-to-original}",Oy="{link-to-original-block}",Cy="{end-link-to-original-block}";var vf=n=>me(n,Ir);var Ef=n=>me(n,In);var _f=n=>me(n,Ln);var Tf=n=>me(n,Fn);var Af=(n,e)=>{let t=e.currentTemplate;return t=of(n,t,()=>n.title),t=rf(n,t,()=>!e.skipTags),t=mf(n,t,()=>!e.skipTags),t=nf(n,t,()=>n.content),t=vf(t),t=!e.skipCreationTime&&n.createdAt?af(n,t):gf(t),t=!e.skipUpdateTime&&n.updatedAt?sf(n,t):yf(t),t=!e.skipSourceUrl&&n.sourceUrl?lf(n,t):bf(t),t=!e.skipLocation&&n.location?cf(n,t):wf(t),t=e.isNotebookNameNeeded&&n.notebookName?pf(n,t):xf(t),t=!e.skipReminderTime&&n.reminderTime?uf(n,t):Ef(t),t=!e.skipReminderOrder&&n.reminderOrder?ff(n,t):Tf(t),t=!e.skipReminderDoneTime&&n.reminderDoneTime?df(n,t):_f(t),t=t.replace(Za,"").replace(Ga,""),t};var kf=(n,e,t)=>{try{K.writeFileSync(n,e),Or(n,t)}catch(i){throw console.error("Cannot write file ",i),i}};var Nf=(n,e)=>{let t=Yu(e);ke.getInstance().setCurrentNotePath(t),kf(t,n,e),console.log(`Note saved to ${t}`)};var Cf=n=>{let e=new RegExp(`\\${q.sep}`,"g"),t=zu(n).replace(e,B.pathSeparator||"/");return{absoluteResourceWorkDir:qa(n),relativeResourceWorkDir:t}},Df=n=>{let e={},t=n.content,{absoluteResourceWorkDir:i,relativeResourceWorkDir:r}=Cf(n);if(console.log(`relative resource work dir: ${r}`),console.log(`absolute resource work dir: ${i}`),Zu(n),Array.isArray(n.resource))for(let o of n.resource)e={...e,...Rf(i,o)};else e={...e,...Rf(i,n.resource)};for(let o of Object.keys(e))t=Dy(t,e,o,r);return t},Dy=(n,e,t,i)=>{let r=`${i}${B.pathSeparator}${e[t].fileName.replace(/ /g," ")}`;console.log(`mediaReference src ${r} added`);let o,a=`<en-media ([^>]*)hash="${t}".([^>]*)>`,s=new RegExp(a,"g"),l=n.match(s),c=l&&l.length>0&&l[0].split("type=");if(c&&c.length>1&&c[1].startsWith('"image')){let p=l[0].match(/width="(\w+)"/),m=p?` width="${p[1]}"`:"",g=l[0].match(/height="(\w+)"/),b=g?` height="${g[1]}"`:"";o=n.replace(s,`<img src="${r}"${m}${b} alt="${e[t].fileName}">`)}else o=n.replace(s,`<a href="${r}" type="file">${e[t].fileName}</a>`);return o},Rf=(n,e)=>{let t={},i=e.data.$text,r=ju(e),a=vu(n,e).fileName,s=`${n}${q.sep}${a}`;console.log(e),console.log(i);let l=Buffer.from(i,"base64");K.writeFileSync(s,l);let c=r.valueOf()/1e3;try{K.utimesSync(s,c,c)}catch(p){}if(e.recognition&&a){let p=e.recognition.match(/[a-f0-9]{32}/);console.log(`resource ${a} added with hash ${p}`),t[p]={fileName:a,alreadyUsed:!1}}else{let p=Of.default.createHash("md5");p.update(l);let m=p.digest("hex");t[m]={fileName:a,alreadyUsed:!1}}return t},If=(n,e)=>{if(e.indexOf('src="data:')<0)return e;let{absoluteResourceWorkDir:t,relativeResourceWorkDir:i}=Cf(n);return K.mkdirSync(t,{recursive:!0}),e.replace(/src="data:([^;,]*)(;base64)?,([^"]*)"/g,(r,o,a,s)=>{let l=Iy(o,a===";base64",s,t,n);return`src="${`${i}${B.pathSeparator}${l}`}"`})},Iy=(n,e,t,i,r)=>{let o="embedded",a=Fy(n)||".dat",s=xi(i,o),l=s<1?`${o}.${a}`:`${o}.${s}.${a}`,c=`${i}${q.sep}${l}`;return e||(t=decodeURIComponent(t)),K.writeFileSync(c,t,e?"base64":void 0),Or(c,r),console.log(`data url resource ${l} added`),l},Fy=n=>n.split("/").pop().split("+")[0];var Ff=(n,e)=>{let t=new Date;ke.getInstance().setCurrentNoteName(n.title),Array.isArray(n.content)&&(n.content=n.content.join(""));let r={title:n.title,content:n.content,htmlContent:n.content,originalContent:n.content};console.log(`Converting for note "${r.title}" started at ${t}...`);try{ef(n)&&(r.htmlContent=Df(n)),r.htmlContent=If(n,r.htmlContent),r={...r,...$u(B,r)},r={...r,...Bu(n,e)},r={...r,...Uu(n)};let o=Af(r,B);Nf(o,n)}catch(o){throw console.error(`Failed to convert note: ${r.title}`,o),o}finally{let o=new Date,a=(o.getTime()-t.getTime())/1e3;console.log(`Conversion for note "${r.title}" finished at ${o}. Took ${a} seconds`)}};var Mf=require("obsidian");var Lf=n=>n.taskstatus==="open"?Sr:Rr;var Ly="\u{1F53C}",Py="\u{1F53D}",My="\u{1F4C5}",$y="\u23F3",$f=(n,e)=>{let t=Lf(n),i=n.title?` ${n.title}`:"",r=B.obsidianTaskTag!==""?` ${B.obsidianTaskTag}`:"",o=n.duedate&&!isNaN(n.duedate.getTime())?` ${My} ${Pf(n.duedate)}`:"",a=n.reminderdate?` ${$y} ${Pf(n.reminderdate)}`:"",s=n.taskflag?` ${Ly}`:` ${Py}`;return`${t}${r}${i}${o}${a}${s}`},Pf=n=>(0,Mf.moment)(n).format("YYYY-MM-DD").toString();var Ka=(n,e,t)=>{let i=K.readdirSync(n);return e=e||[],i.forEach(r=>{K.statSync(`${n}${q.sep}${r}`).isDirectory()?e=Ka(`${n}${q.sep}${r}`,e,t):(t&&q.extname(r)==`.${t}`||!t)&&e.push(q.join(n,"/",r))}),e};var Bf=(n,e)=>{let i=ke.getInstance().getAllNoteIdNameMap(),r=Object.entries(i);if(r.length===0)return;console.log("About to update links...");let o=[];for(let a of e)Ka(a,o,"");for(let a of e){console.log(`Notebook: ${a}`);let l=K.readdirSync(a).filter(c=>q.extname(c).toLowerCaseLine truncated
`,By=`{source-url-block}source: {source-url}{end-source-url-block}
`,Uy=`{tags-yaml-list-block}
tags: {tags-yaml-list}
{end-tags-yaml-list-block}`,jy=`{content-block}{content}{end-content-block}
`,Zf=zf+Uy+By+zf+jy;var i1=nd.Platform.isDesktopApp?td():null,Pr={enexSources:[],currentTemplate:"",outputDir:"./mdNotes",isMetadataNeeded:!1,isNotebookNameNeeded:!1,isZettelkastenNeeded:!1,useZettelIdAsFilename:!1,plainTextNotesOnly:!1,skipWebClips:!1,useHashTags:!0,nestedTags:{separatorInEN:"_",replaceSeparatorWith:"/",replaceSpaceWith:"-"},obsidianTaskTag:"",urlEncodeFileNamesAndLinks:!1,sanitizeResourceNameSpaces:!1,replacementChar:"_",pathSeparator:"/",resourcesDir:"_resources",turndownOptions:{headingStyle:"atx"}},r1="@@@",B={...Pr};function o1(n){return n==null?n:JSON.parse(JSON.stringify(n))}function id(n,...e){for(let t of e)for(let i of Object.keys(t)){let r=t[i],o=n[i];!Array.isArray(r)&&typeof r=="object"&&!Array.isArray(o)&&typeof o=="object"?n[i]=id({},o,r):n[i]=o1(r)}return n}var a1=n=>{B=id({},Pr,n);let e=B.templateFile?K.readFileSync(B.templateFile,"utf-8"):Zf;e=B.currentTemplate?B.currentTemplate:e,B.skipCreationTime=!Uf(e),B.skipLocation=!jf(e),B.skipSourceUrl=!qf(e),B.skipTags=!Wf(e),B.skipUpdateTime=!Yf(e),B.isNotebookNameNeeded=Hf(e),B.currentTemplate=e,console.log(`Current config is: ${JSON.stringify(B,null,4)}`),console.log(`Path separator:${q.sep}`)},s1=async(n,e,t)=>{if(!(e instanceof Be))throw new Error("Evernote import currently only works on desktop");let i=ke.getInstance();t.status("Processing "+e.name),console.log(`Getting stream from ${e}`);let r=e.createReadStream(),o={},a=i.getCurrentNotebookName();return new Promise((s,l)=>{let c=g=>(t.reportFailed(i.getCurrentNotebookFullpath(),g),l(g)),p=i1(r),m=null;p.on("tag:note-attributes",g=>{m=g}),p.on("tag:note",g=>{if(t.isCancelled()){r.close();return}if(n.skipWebClips&&tf(g))t.reportSkipped(g.title);else{t.status("Importing note "+g.title),m&&(g["note-attributes"]=m);try{Ff(g,a),t.reportNoteSuccess(a+"/"+g.title)}catch(E){return t.reportFailed(g.title||e,E),s()}}m=null;let b=i.getCurrentNotePath();if(b)for(let E of Object.keys(o)){let f=`<YARLE-EN-V10-TASK>${E}</YARLE-EN-V10-TASK>`,d=K.readFileSync(b,"utf8"),h=new Map([...o[E]].sort()),v=d.replace(f,[...h.values()].join(`
`));K.writeFileSync(b,v)}}),p.on("tag:task",g=>{let b=Qp(g);o[b.taskgroupnotelevelid]||(o[b.taskgroupnotelevelid]=new Map),o[b.taskgroupnotelevelid].set(b.sortweight,$f(b,a))}),p.on("end",s),p.on("error",c),r.on("error",c)})};async function rd(n,e){a1(n);let t=[],i=n.outputDir;for(let r of n.enexSources){if(e.isCancelled())return;let o,a=ke.getInstance();r.basename.includes(r1)?(n.outputDir=Ku(r,n),o=Vu(r),Ju(o,n),a.setCurrentNotebookName(o.basename),a.setCurrentNotebookFullpath(o.fullpath)):(Xu(r,n),a.setCurrentNotebookName(r.basename),a.setCurrentNotebookFullpath(r.fullpath)),await s1(n,r,e),t.push(Wa()),n.outputDir=i}e.isCancelled()||await Bf(n,t)}var Mr=class extends ue{init(){this.addFileChooserSetting("Evernote",["enex"],!0),this.addOutputLocationSetting("Evernote")}async import(e){let{files:t}=this;if(t.length===0){new _i.Notice("Please pick at least one file to import.");return}let i=await this.getOutputFolder();if(!i){new _i.Notice("Please select a location to export to.");return}let{app:r}=this,o=r.vault.adapter;if(!(o instanceof _i.FileSystemAdapter))return;let a={...Pr,enexSources:t,outputDir:q.join(o.getBasePath(),i.path)};await rd(a,e)}};var Se=require("obsidian");var $r=class extends ue{init(){this.addFileChooserSetting("HTML",["htm","html"],!0),this.addAttachmentSizeLimit(0),this.addMinimumImageSize(65),this.addOutputLocationSetting("HTML import")}addAttachmentSizeLimit(e){this.attachmentSizeLimit=e*10**6,new Se.Setting(this.modal.contentEl).setName("Attachment size limit (MB)").setDesc("Set 0 to disable.").addText(t=>t.then(({inputEl:i})=>{i.type="number",i.step="0.1"}).setValue(e.toString()).onChange(i=>{let r=["+","-"].includes(i)?0:Number(i);if(Number.isNaN(r)||r<0){t.setValue((this.attachmentSizeLimit/10**6).toString());return}this.attachmentSizeLimit=r*10**6}))}addMinimumImageSize(e){this.minimumImageSize=e,new Se.Setting(this.modal.contentEl).setName("Minimum image size (px)").setDesc("Set 0 to disable.").addText(t=>t.then(({inputEl:i})=>i.type="number").setValue(e.toString()).onChange(i=>{let r=["+","-"].includes(i)?0:Number(i);if(!Number.isInteger(r)||r<0){t.setValue(this.minimumImageSize.toString());return}this.minimumImageSize=r}))}async import(e){let{files:t}=this;if(t.length===0){new Se.Notice("Please pick at least one file to import.");return}let i=await this.getOutputFolder();if(!i){new Se.Notice("Please select a location to export to.");return}let r=new Map;e.reportProgress(0,t.length);for(let l=0;l<t.length;l++){if(e.isCancelled())return;let c=t[l],p=await this.processFile(e,i,c);p&&r.set(c instanceof Be?ni.pathToFileURL(c.filepath).href:c.name,{file:c,tFile:p}),e.reportProgress(l+1,t.length)}let{metadataCache:o}=this.app,a,s=new Promise(l=>{a=l});o.onCleanCache(async()=>{for(let[l,{file:c,tFile:p}]of r){if(e.isCancelled())break;try{let m=await this.app.vault.cachedRead(p),g=o.computeMetadataAsync?await o.computeMetadataAsync(Lo(m)):o.getFileCache(p);if(!g)continue;let b=[];if(g.links)for(let{link:E,position:f,displayText:d}of g.links){let{path:h,subpath:v}=(0,Se.parseLinktext)(E),_;if(ni){let O=new URL(encodeURI(h),l);O.hash="",O.search="",_=decodeURIComponent(O.href)}else _=oe(h.replace(/#/gu,"%23")).name;let A=r.get(_);if(A){let O=this.app.fileManager.generateMarkdownLink(A.tFile,p.path,v,d);b.push({from:f.start.offset,to:f.end.offset,text:O})}}b.sort((E,f)=>f.from-E.from);for(let E of b)m=m.substring(0,E.from)+E.text+m.substring(E.to);await this.vault.modify(p,m)}catch(m){e.reportFailed(c.fullpath,m)}}a()}),await s}async processFile(e,t,i){e.status("Processing "+i.name);try{let r=await i.readText(),o=dt(r);l1(o);let a=i instanceof Be?ni.pathToFileURL(i.filepath):void 0,s=new Map,l=new Map;for(let m of o.findAll("img, audio, video")){if(e.isCancelled())return;let g=m.getAttribute("src");if(g)try{let b=new URL(g.startsWith("//")?`https:${g}`:g,a),E=b.href,f=s.get(E);s.has(E)||(e.status("Downloading attachment for "+i.name),f=await this.downloadAttachment(t,m,b),s.set(E,f),f?(l.set(f.path,f),e.reportAttachmentSuccess(f.name)):e.reportSkipped(g)),f&&(m.setAttribute("src",f.path.replace(/ /g,"%20")),m instanceof HTMLImageElement||m.replaceWith(createEl("img",{attr:{src:f.path.replace(/ /g,"%20"),alt:m.getAttr("alt")}})))}catch(b){e.reportFailed(g,b)}}let c=(0,Se.htmlToMarkdown)(o),p=await this.saveAsMarkdownFile(t,i.basename,c);if(!Object.isEmpty(s)){let{metadataCache:m}=this.app,g;m.computeMetadataAsync?g=await m.computeMetadataAsync(Lo(c)):g=await new Promise(E=>{let f=m.getFileCache(p);if(f)return E(f);let d=m.on("changed",(h,v,_)=>{h===p&&(m.offref(d),E(_))})});let b=[];if(g.embeds){for(let{link:E,position:f}of g.embeds)if(l.has(E)){let d=this.app.fileManager.generateMarkdownLink(l.get(E),p.path);b.push({from:f.start.offset,to:f.end.offset,text:d})}}b.sort((E,f)=>f.from-E.from);for(let E of b)c=c.substring(0,E.from)+E.text+c.substring(E.to);await this.vault.modify(p,c)}return e.reportNoteSuccess(i.fullpath),p}catch(r){e.reportFailed(i.fullpath,r)}return null}async downlo Line truncated
`).filter(p=>p!==r);c.length>0&&(a.aliases=c)}let s=[];if(t.color&&t.color!=="DEFAULT"){let c=t.color.toLowerCase();c=ad(c),s.push(`Keep/Color/${c}`)}if(t.isPinned&&s.push("Keep/Pinned"),t.attachments&&s.push("Keep/Attachment"),t.isArchived&&s.push("Keep/Archived"),t.isTrashed&&s.push("Keep/Deleted"),t.labels)for(let c of t.labels)s.push(`Keep/Label/${c.name}`);if(s.length>0&&(a.tags=s.map(c=>Qa(c))),o.push(Xi(a)),t.textContent&&(o.push(`
`),o.push(es(t.textContent))),t.listContent){let c=[];for(let p of t.listContent){if(!p.text)continue;let m=`- [${p.isChecked?"X":" "}] ${p.text}`;c.push(es(m))}o.push(`
`),o.push(c.join(`
`))}if(t.attachments){o.push(`
`);for(let c of t.attachments)o.push(`![[${c.filePath}]]`)}let l=await this.saveAsMarkdownFile(i,r,o.join(""));await this.vault.append(l,"",{ctime:t.createdTimestampUsec/1e3,mtime:t.userEditedTimestampUsec/1e3})}};var wt=require("obsidian");var ts=require("obsidian");function sd({info:n,vault:e,targetFolderPath:t,parentsInSubfolders:i}){let r=e.getAllLoadedFiles(),o=new Set,a=new Set(r.map(s=>s.name));i&&b1(n),y1({info:n,pathDuplicateChecks:o,titleDuplicateChecks:a}),x1({info:n,loadedFiles:r,titleDuplicateChecks:a,targetFolderPath:t})}function y1({info:n,pathDuplicateChecks:e,titleDuplicateChecks:t}){for(let i of Object.values(n.idsToFileInfo)){let r=n.getPathForFile(i);if(e.has(`${r}${i.title}`)){let o=2;for(i.title=i.title+" "+o;e.has(`${r}${i.title}`);)o++,i.title=`${i.title.replace(/ \d+$/,"")} ${o}`}t.has(i.title+".md")&&(i.fullLinkPathNeeded=!0),e.add(`${r}${i.title}`),t.add(i.title+".md")}}function b1(n){let e=new Set(Object.values(n.idsToFileInfo).map(t=>t.parentIds).concat(Object.values(n.pathsToAttachmentInfo).map(t=>t.parentIds)).map(t=>t.length>0?t[t.length-1]:""));for(let t of Object.keys(n.idsToFileInfo))e.has(t)&&n.idsToFileInfo[t].parentIds.push(t)}function x1({info:n,loadedFiles:e,titleDuplicateChecks:t,targetFolderPath:i}){var l;let r=new Set(e.filter(c=>!c.path.endsWith(".md")).map(c=>c.path)),o=n.attachmentPath,a=/^\.\//.test(o),s=(l=o.match(/\.\/(.*)/))==null?void 0:l[1];for(let c of Object.values(n.pathsToAttachmentInfo)){t.has(c.nameWithExtension)&&(c.fullLinkPathNeeded=!0);let p="";if(a?p=(0,ts.normalizePath)(`${i}${n.getPathForFile(c)}${s!=null?s:""}`):p=(0,ts.normalizePath)(o+"/"),p.endsWith("/")||(p+="/"),r.has(p+c.nameWithExtension)){let m=2,{basename:g,extension:b}=oe(c.path);for(;r.has(`${p}${g} ${m}.${b}`);)m++;c.nameWithExtension=`${g} ${m}.${b}`}c.targetParentFolder=p,r.add(p+c.nameWithExtension),t.add(c.nameWithExtension)}}var Bn=require("obsidian");var ld=n=>n.replace(/-/g,"").replace(/[ -]?[a-z0-9]{32}(\.|$)/,"$1"),xt=n=>{var e;return(e=n.replace(/-/g,"").match(/([a-z0-9]{32})(\?|\.|$)/))==null?void 0:e[1]},ns=n=>{let{parent:e}=oe(n);return e.split("/").map(t=>xt(t)).filter(t=>t)};function is(n){return n.hour()===0&&n.minute()===0?n.format("YYYY-MM-DD"):n.format("YYYY-MM-DDTHH:mm")}function cd(n){return n.replace(/^(\.\.\/)+/,"")}function pd(n){let e=/#\d*?(?:[-_/a-z]|[^\x00-\x7F])/gi;if(!e.test(n))return n;let t=n.split(`
`);for(let i=0;i<t.length;i++){let r=t[i].match(e);if(!r)continue;let o=t[i];for(let a of r)new RegExp(`\\[\\[[^\\]]*${a}(?:.*[^\\]])?\\]\\]|\\[[^\\]]*${a}[^\\]]*\\]\\([^\\)]*\\)|\\[[^\\]]*\\]\\([^\\)]*${a}[^\\)]*\\)|\\\\${a}|\`[^\`]*${a}[^\`]*\``).test(o)||(o=o.replace(a,"\\"+a));t[i]=o}return n=t.join(`
`),n}function rs(n){n.replaceWith(...Array.from(n.childNodes))}async function wd(n,e){var p;let t=await e.readText(),i=dt(t),r=i.find("div[class=page-body]");if(r===null)throw new Error("page body was not found");let o=fd(n,r);xd(n,o,!0);let a={},s=i.find("table[class=properties] > tbody");if(s){let m=fd(n,s);xd(n,m,!1),U1(s);for(let g of Array.from(s.rows)){let b=w1(g);b&&(b.title=="Tags"&&(b.title="tags",typeof b.content=="string"?b.content=b.content.replace(/ /g,"-"):b.content instanceof Array&&(b.content=b.content.map(E=>E.replace(/ /g,"-")))),a[b.title]=b.content)}}O1(r,["strong","em","mark","del"]),N1(r),E1(r),P1(r),A1(r),L1(r),_d(r),yd(r,"div.indented"),yd(r,"details"),M1(r),bd(r,"ul"),bd(r,"ol"),$1(r),B1(r),F1(r),S1(r);let l=(0,Bn.htmlToMarkdown)(r.innerHTML);n.singleLineBreaks&&(l=l.replace(/\n\n(?!>)/g,`
`)),l=pd(l),l=v1(l);let c=(p=i.find("p[class*=page-description]"))==null?void 0:p.textContent;return c&&(l=c+`
`+l),Xi(a)+l}var ud={checkbox:["checkbox"],date:["created_time","last_edited_time","date"],list:["file","multi_select","relation"],number:["number","auto_increment_id"],text:["email","person","phone_number","text","url","status","select","formula","rollup","last_edited_by","created_by"]};function w1(n){var a,s,l,c,p,m;let e=(a=n.className.match(/property-row-(.*)/))==null?void 0:a[1];if(!e)throw new Error("property type not found for: "+n);let t=(0,Bn.htmlToMarkdown)((s=n.cells[0].textContent)!=null?s:""),i=n.cells[1],r=Object.keys(ud).find(g=>ud[g].includes(e));if(!r)throw new Error("type not found for: "+i);let o="";switch(r){case"checkbox":o=i.innerHTML.includes("checkbox-on");break;case"number":if(o=Number(i.textContent),isNaN(o))return;break;case"date":_d(i);let g=i.getElementsByTagName("time");if(g.length===0)o="";else if(g.length===1)o=is((0,Bn.moment)((l=g.item(0))==null?void 0:l.textContent));else{let f=[];for(let d=0;d<g.length;d++)f.push(is((0,Bn.moment)((c=g.item(d))==null?void 0:c.textContent)));o=f.join(" - ")}if(o.length===0)return;break;case"list":let b=i.children,E=[];for(let f=0;f<b.length;f++){let d=(p=b.item(f))==null?void 0:p.textContent;d&&E.push(d)}if(o=E,o.length===0)return;break;case"text":if(o=(m=i.textContent)!=null?m:"",o.length===0)return;break}return{title:t,content:o}}function fd(n,e){var i,r;let t=[];for(let o of e.findAll("a")){let a=cd(decodeURI((i=o.getAttribute("href"))!=null?i:"")),s=xt(a),l=Object.keys(n.pathsToAttachmentInfo).find(c=>c.includes(a));s&&a.endsWith(".html")?t.push({type:"relation",a:o,id:s}):l?t.push({type:"attachment",a:o,path:l}):s&&a.startsWith("#")&&((r=o.parentElement)!=null&&r.classList.contains("table_of_contents-item"))&&t.push({type:"toc-item",a:o,id:s})}return t}function v1(n){let e=/\[\[[^\]]*(\\\\)\|[^\]]*\]\]/,t=n.match(new RegExp(e,"g"));return t==null||t.forEach(i=>{n=n.replace(i,i.replace(/\\\\\|/g,"\\|"))}),n}function E1(n){R1(n,"style"),vd(n,"span.notion-text-equation-token");let e=n.ownerDocument,t=n.findAll("figure.equation");for(let r of t){let o=r.find("annotation");if(!o)continue;let a=e.createElement("div");a.className="annotation",a.appendText(`$$${dd(o.textContent)}$$`),r.replaceWith(a)}let i=n.findAll("span.notion-text-equation-token");for(let r of i){let o=r.find("annotation");o&&r.replaceWith(`$${dd(o.textContent,!0)}$`)}}function dd(n,e=!1){var i;let t=new RegExp(/^(?:\s|\\\\|\\\s)*(.*?)[\s\\]*$/,"s");return(i=n==null?void 0:n.replace(t,"$1").replace(/[\r\n]+/g,e?" ":`
`))!=null?i:""}function _1(n){var t;let e=(t=n.match(/^[^\.\?\!\n]*[\.\?\!]?/))==null?void 0:t[0];return e!=null?e:""}function T1(n){var e;return!!/callout|bookmark/.test((e=n.getAttribute("class"))!=null?e:"")}function A1(n){var t;let e=n.ownerDocument;for(let i of n.findAll("figure.callout")){let r=(t=i.lastElementChild)==null?void 0:t.childNodes;if(!r)continue;let o=e.createElement("blockquote");o.append(...Array.from(r)),k1(o),i.replaceWith(o)}}function k1(n){var o,a,s;let e=n.firstChild,t=(o=e==null?void 0:e.nodeName)!=null?o:"",i=n.ownerDocument.createElement("p"),r="";t=="#text"?r=(a=e==null?void 0:e.textContent)!=null?a:"":t=="P"?r=e.innerHTML:["EM","STRONG","DEL","MARK"].includes(t)?r=e.outerHTML:n.prepend(i),r=r.replace(/<br>/g,"&lt;br&gt;"),i.innerHTML=`[!important] ${r}`,(s=n.firstChild)==null||s.replaceWith(i)}function N1(n){var e,t,i;for(let r of n.findAll("a.bookmark.source")){let o=r.getAttribute("href"),a=(e=r.find("div.bookmark-title"))==null?void 0:e.textContent,s=_1((i=(t=r.find("div.bookmark-description"))==null?void 0:t.textContent)!=null?i:""),l=`> [!info] ${a}
> ${s}
> [${o}](${o})
`;r.nextElementSibling&&T1(r.nextElementSibling)&&(l+=`
`),r.replaceWith(l)}}function S1(n){var e,t,i;for(let r of n.findAll("span[class=user]"))r.innerText=(e=r.textContent)!=null?e:"";for(let r of n.findAll("td div[class*=checkbox]")){let o=createSpan();o.setText(r.hasClass("checkbox-on")?"X":""),r.replaceWith(o)}for(let r of n.findAll("table span[class*=selected-value]"))((t=r.parentElement)==null?void 0:t.lastElementChild)!==r&&r.setText(r.textContent+", ");for(let r of n.findAll("a[href]"))if(!/^(https?:\/\/|www\.)/.test(r.href)){let o=createSpan();o.setText((i=r.textContent)!=null?i:""),r.replaceWith(o)}}function R1(n,e){for(let t of n.findAll(e))t.remove()}function O1(n,e){for(let t of e)C1(n,t);for(let t of e)D1(n,t);for(let t of e)vd(n,t);for(let t of e)I1(n,t)}function C1(n,e){for(let t of n.findAll(e)){if(!t.parentElement||t.parentElement.tagName===e.toUpperCase())continue;let i=t.find(e);for(;i;)rs(i),i=t.find(e)}}function D1(n,e){let t=n.findAll(e);if(!t)return;let i=new RegExp(`</${e}>( *)<${e}>`,"g");for(let r of t){if(!r||!r.parentElement)continue;let o=r.parentElement,a=o==null?void 0:o.innerHTML;o.innerHTML=a==null?void 0:a.replace(i,"$1")}}function vd(n,e){let t=n.findAll(e);if(t)for(let i of t){let r=i.previousSibling;(r==null?void 0:r.nodeName)=="BR"&&(r==null||r.remove())}}function I1(n,e){let t=n.innerHTML,i=t.match(new RegExp(`<${e}>.*?</${e}>`,"sg"));if(i){for(let r of i.filter(o=>o.includes("<br>")))t=t.replace(r,r.split("<br>").join(`</${e}><br><${e}>`));n.innerHTML=t}}function md(n){var e;return Number((e=n==null?void 0:n.classList[1].slice(-1))!=null?e:-1)}function Ed(n,e){let t=md(n),i=md(e);if(t>i&&e.childElementCount==1){let r=createEl("ul");r.append(n),e.append(r)}else if(t>i&&e.childElementCount==2){let r=e.lastElementChild;r==null||r.append(n)}else if(t==i){let r=e.parentElement;r==null||r.append(n)}else t<i&&(e=e.parentElement.parentElement,Ed(n,e))}function hd(n){var t;let e=createEl("li");return e.className=n.className,e.append((t=n.firstElementChild)!=null?t:""),e}function F1(n){let e=n.find(".table_of_contents"),t=e==null?void 0:e.children;if(!e||t.length==0)return;let i=createEl("ul"),r=hd(t[0]);i.append(r);let o=r;for(let a=1;a<t.length;a++)r=hd(t[a]),Ed(r,o),o=r;e.replaceWith(i)}function L1(n){n.innerHTML=n.innerHTML.replace(/(?:\n|<br ?\/>)/g,"<br>");for(let e of n.findAll("code"))for(let t of e.findAll("br"))t.replaceWith(`
`)}function P1(n){var e;for(let t of n.findAll("link"))t.innerText=(e=t.textContent)!=null?e:""}function _d(n){var e,t;for(let i of n.findAll("time"))i.textContent=(t=(e=i.textContent)==null?void 0:e.replace(/@/g,""))!=null?t:""}var gd={"1.875em":"h1","1.5em":"h2","1.25em":"h3"};function M1(n){var t;let e=n.findAll("summary");for(let i of e){let r=i.getAttribute("style");if(r){for(let o of Object.keys(gd))if(r.includes(o)){i.replaceWith(createEl(gd[o],{text:(t=i.textContent)!=null?t:""}));break}}}}function yd(n,e){let t=n.findAll(e);for(let i of t)rs(i)}function $1(n){for(let e of n.findAll(".language-Mermaid"))e.removeClass("language-Mermaid"),e.addClass("language-mermaid")}function bd(n,e){for(let t of n.findAll(e)){let i=[],r=[],o=t;for(;o.tagName===e.toUpperCase();){i.push(o);for(let s=0;s<o.children.length;s++)r.push(o.children[s]);if(!o.nextElementSibling||o.getAttribute("class")!==o.nextElementSibling.getAttribute("class"))break;o=o.nextElementSibling}let a=n.createEl(e);for(let s of r)a.appendChild(s);i[0].replaceWith(a),i.slice(1).forEach(s=>s.remove())}}function B1(n){for(let e of n.findAll(".checkbox.checkbox-on"))e.replaceWith("[x] ");for(let e of n.findAll(".checkbox.checkbox-off"))e.replaceWith("[ ] ")}function U1(n){var t;let e=n.findAll("a");if(e.length===0)return n;for(let i of e){let r=createSpan();r.setText((t=i.getAttribute("href"))!=null?t:""),i.replaceWith(r)}}function xd(n,e,t){var i,r,o;for(let a of e){let s=createSpan(),l="";switch(a.type){case"relation":let c=n.idsToFileInfo[a.id];if(c){let g=a.a.closest("table");l=`[[${c.fullLinkPathNeeded?`${n.getPathForFile(c)}${c.title}${g?"\\":""}|${c.title}`:c.title}]]`}else{console.warn("missing relation data for id: "+a.id);let{basename:g}=oe(decodeURI((i=a.a.getAttribute("href"))!=null?i:""));l=`[[${ld(g)}]]`}break;case"attachment":let p=n.pathsToAttachmentInfo[a.path];if(!p){console.warn("missing attachment data for: "+a.path);continue}l=`${t?"!":""}[[${p.fullLinkPathNeeded?p.targetParentFolder+p.nameWithExtension+"|"+p.nameWithExtension:p.nameWithExtension}]]`;break;case"toc-item":l=(r=a.a.textContent)!=null?r:"";let m=(o=l.endsWith("]"))!=null?o:!1;l=`[[#${l+(m?" ":"")}]]`}s.setText(l),a.a.replaceWith(s)}}var Ur=class{constructor(e,t){this.idsToFileInfo={};this.pathsToAttachmentInfo={};this.attachmentPath=e,this.singleLineBreaks=t}getPathForFile(e){let{idsToFileInfo:t}=this,i=e.path.split("/");return e.parentIds.map(r=>{var o,a,s;return(s=(o=t[r])==null?void 0:o.title)!=null?s:(a=i.find(l=>l.contains(r)))==null?void 0:a.replace(` ${r}`,"")}).filter(r=>r).map(r=>r.replace(/[\. ]+$/,"")).join("/")+"/"}};async function Ad(n,e){var i,r;let{filepath:t}=e;if(e.extension==="html"){let o=await e.readText(),a=dt(o),l=a.find("body").children,c;for(let E=0;E<l.length&&(c=xt((i=l[E].getAttr("id"))!=null?i:""),!c);E++);if(!c)throw new Error("no id found for: "+t);let p=Td(a,"property-row-created_time"),m=Td(a,"property-row-last_edited_time"),g=((r=a.find("title"))==null?void 0:r.textContent)||"Untitled",b=j1(ze(g.replace(/\n/g," ").replace(/[:\/]/g,"-").replace(/#/g,"").trim()));n.idsToFileInfo[c]={path:t,parentIds:ns(t),ctime:p,mtime:m,title:b,fullLinkPathNeeded:!1}}else n.pathsToAttachmentInfo[t]={path:t,parentIds:ns(t),nameWithExtension:ze(decodeURIComponent(e.name)),targetParentFolder:"",fullLinkPathNeeded:!1}}function j1(n){if(n.length<200)return n;let e=n.split(" "),t=[],i=0,r=0,o=!1;for(;i<200;){if(!e[r]){o=!0;break}t.push(e[r]),i+=e[r].length+1,r++}let a=t.join(" ");return o||(a+="..."),a}function H1(n){let e=n.startsWith("@")?n.substr(1).trim():n.trim(),t=new Date(e);return isNaN(t.getTime())?null:t}function Td(n,e){let t=n.querySelector(`tr.${e}`);if(t){let i=t.querySelector("time");return i&&i.textContent?H1(i.textContent):null}return null}var jr=class extends ue{init(){this.parentsInSubfolders=!0,this.addFileChooserSetting("Exported Notion",["zip"]),this.addOutputLocationSetting("Notion"),new wt.Setting(this.modal.contentEl).setName("Save parent pages in subfolders").setDesc("Places the parent database pages in the same folder as the nested content.").addToggle(e=>e.setValue(this.parentsInSubfolders).onChange(t=>this.parentsInSubfolders=t)),new wt.Setting(this.modal.contentEl).setName("Single line breaks").setDesc("Separate Notion blocks with only one line break (default is 2).").addToggle(e=>e.setValue(this.singleLineBreaks).onChange(t=>{this.singleLineBreaks=t}))}async import(e){var g;let{vault:t,parentsInSubfolders:i,files:r}=this;if(r.length===0){new wt.Notice("Please pick at least one file to import.");return}let o=await this.getOutputFolder();if(!o){new wt.Notice("Please select a location to export to.");return}let a=o.path;a=(0,wt.normalizePath)(a),a!=null&&a.endsWith("/")||(a+="/");let s=new Ur((g=t.getConfig("attachmentFolderPath"))!=null?g:"",this.singleLineBreaks);e.status("Looking for files to import");let l=0;if(await os(e,r,async b=>{try{await Ad(s,b),l=Object.keys(s.idsToFileInfo).length+Object.keys(s.pathsToAttachmentInf Line truncated
Expected state: ${this.graphData.state}
Returned state: ${t.state}`);await this.updateAccessToken(t.code),await this.setSwitchUser(),await this.showSectionPickerUI()}catch(i){console.error("An error occurred while we were trying to sign you in. Error details: ",i),this.modal.contentEl.createEl("div",{text:"An error occurred while trying to sign you in."}).createEl("details",{text:i}).createEl("summary",{text:"Click here to show error details"})}}async setSwitchUser(){let t=await this.fetchResource("https://graph.microsoft.com/v1.0/me","json");this.switchUserSetting.setDesc(`Signed in as ${t.displayName} (${t.mail}). If that's not the correct account, sign in again.`),this.switchUserSetting.settingEl.show(),this.microsoftAccountSetting.settingEl.hide()}async updateAccessToken(t){let i=new URLSearchParams({client_id:kd,scope:"offline_access "+Nd.join(" "),redirect_uri:qr});if(t)i.set("code",t),i.set("grant_type","authorization_code");else{let o=this.retrieveRefreshToken();if(!o)throw new Error("Missing token required for authentication. Please try logging in again.");i.set("refresh_token",o),i.set("grant_type","refresh_token")}let r=await(0,xe.requestUrl)({method:"POST",url:"https://login.microsoftonline.com/common/oauth2/v2.0/token",contentType:"application/x-www-form-urlencoded",body:i.toString()}).json;if(!r.access_token)throw new Error(`Unexpected data was returned instead of an access token. Error details: ${r}`);r.refresh_token&&this.storeRefreshToken(r.refresh_token),this.graphData.accessToken=r.access_token}storeRefreshToken(t){this.refreshToken=t,this.rememberMe&&localStorage.setItem(as,t)}retrieveRefreshToken(){return this.refreshToken?this.refreshToken:localStorage.getItem(as)}clearStoredRefreshToken(){localStorage.removeItem(as)}async showSectionPickerUI(){var o,a;this.loadingArea.show(),this.selectedIds=[];let t="https://graph.microsoft.com/v1.0/me/onenote/notebooks",i=new URLSearchParams({$expand:"sections($select=id,displayName),sectionGroups($expand=sections,sectionGroups)",$select:"id,displayName,lastModifiedDateTime",$orderby:"lastModifiedDateTime DESC"}),r=`${t}?${i.toString()}`;try{this.notebooks=(await this.fetchResource(r,"json")).value,this.contentArea.empty(),this.contentArea.createEl("h4",{text:"Choose data to import"});for(let s of this.notebooks){if(((o=s.sectionGroups)==null?void 0:o.length)!==0)for(let c of s.sectionGroups)await this.fetchNestedSectionGroups(c);let l=this.contentArea.createDiv();new xe.Setting(l).setName(s.displayName).setDesc(`Last edited on: ${xe.moment.utc(s.lastModifiedDateTime).format("Do MMMM YYYY")}. Contains ${(a=s.sections)==null?void 0:a.length} sections.`).addButton(c=>c.setCta().setButtonText("Select all").onClick(()=>{l.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(p=>p.click())})),this.renderHierarchy(s,l)}}catch(s){this.showContentAreaErrorMessage()}this.loadingArea.hide(),this.contentArea.show()}async fetchNestedSectionGroups(t){if(t.sectionGroups=(await this.fetchResource(t.sectionGroupsUrl+"?$expand=sectionGroups($expand=sections),sections","json")).value,t.sectionGroups)for(let i=0;i<t.sectionGroups.length;i++)await this.fetchNestedSectionGroups(t.sectionGroups[i])}renderHierarchy(t,i){if(t.sectionGroups)for(let r of t.sectionGroups){let o=i.createDiv({attr:{style:"padding-inline-start: 1em; padding-top: 8px"}});o.createEl("strong",{text:r.displayName}),this.renderHierarchy(r,o)}if(t.sections){let r=i.createEl("ul",{attr:{style:"padding-inline-start: 1em;"}});for(let o of t.sections){let s=r.createEl("li",{cls:"task-list-item"}).createEl("label"),l=s.createEl("input");l.type="checkbox",s.appendChild(document.createTextNode(o.displayName)),s.createEl("br"),l.addEventListener("change",()=>{if(l.checked)this.selectedIds.push(o.id);else{let c=this.selectedIds.findIndex(p=>p===o.id);c!==-1&&this.selectedIds.splice(c,1)}})}}}showContentAreaErrorMessage(){this.contentArea.empty(),this.contentArea.createEl("p",{text:"Microsoft OneNote has limited how fast notes can be imported. Please try again in 30 minutes to continue importing."}),this.contentArea.show(),this.loadingArea.hide()}async import(t){let i=new Set,r=await this.modal.plugin.loadData();r.importers.onenote||(r.importers.onenote={previouslyImportedIDs:[]});for(let c of r.importers.onenote.previouslyImportedIDs)i.add(c);if(!await this.getOutputFolder()){new xe.Notice("Please select a location to export to.");return}if(!this.graphData.accessToken){new xe.Notice("Please sign in to your Microsoft Account.");return}t.status("Starting OneNote import");let a=0,s=0,l=0;for(let c of this.selectedIds){t.reportProgress(s,a);let p=`https://graph.microsoft.com/v1.0/me/onenote/sections/${c}/pages`,m=new URLSearchParams({$select:"id,title,createdDateTime,lastModifiedDateTime,level,order,contentUrl",$orderby:"order",pagelevel:"true"}),g=`${p}?${m.toString()}`,b=null;try{b=(await this.fetchResource(g,"json")).value}catch(E){t.status("Microsoft OneNote has limited how fast notes can be imported. Please try again in 30 minutes to coLine truncated
`,1)[0];t.slice(0,-2);let o=t.split(r);if(o.shift(),o.length===2)for(let a of o){let l=a.split(`
`).find(p=>p.includes("Content-Type")).split(";")[0].split(":")[1].trim(),c=a.split(`
`).slice(2).join(`
`).trim();l==="text/html"?i.html=c:l==="application/inkml+xml"&&(i.inkml=c)}else throw new Error("The input string is incorrect and may be missing data. Inputted string: "+t);return i}convertTags(t){var r,o;let i=Array.from(t.querySelectorAll("[data-tag]"));for(let a of i)if((r=a.getAttribute("data-tag"))!=null&&r.contains("to-do")){let l=a.getAttribute("data-tag")==="to-do:completed"?"[x]":"[ ]";a.innerHTML=`- ${l} ${a.innerHTML}`}else{let s=(o=a.getAttribute("data-tag"))==null?void 0:o.split(",");s==null||s.forEach(l=>{a.innerHTML=a.innerHTML+` #${l.replace(":","-")} `})}return t.outerHTML}convertInternalLinks(t){let i=t.findAll("a");for(let r of i)if(r.href.startsWith("onenote:")){let o=r.href.indexOf("#")+1,a=r.href.indexOf("&",o);r.href=r.href.slice(o,a)}return t}getEntityPathNoParent(t,i){for(let r of this.notebooks){let o=this.getEntityPath(t,`${i}/${r.displayName}`,r);if(o)return o}return null}getEntityPath(t,i,r){let o=null;if("sectionGroups"in r&&r.sectionGroups){let a=this.searchSectionGroups(t,i,r.sectionGroups);a!==null&&(o=a)}if("sections"in r&&r.sections){let a=this.searchSectionGroups(t,i,r.sections);a!==null&&(o=a)}if("pages"in r&&r.pages){let a=this.searchPages(t,i,r);a!==null&&(o=a)}return o&&(o=this.sanitizeFilePath(o)),o}searchPages(t,i,r){var a;let o=null;for(let s=0;s<r.pages.length;s++){let l=r.pages[s],c=(a=l.contentUrl.split("page-id=")[1])==null?void 0:a.split("}")[0];if(l.id===t||c===t){if(l.level===0)r.pages[s+1]&&r.pages[s+1].level!==0?o=`${i}/${l.title}`:o=i;else{o=i;for(let p=r.pages.indexOf(l)-1;p>=0;p--)if(r.pages[p].level===l.level-1){o+="/"+r.pages[p].title;break}}break}}return o}searchSectionGroups(t,i,r){let o=null;for(let a of r)if(a.id===t)o=`${i}/${a.displayName}`;else{let s=this.getEntityPath(t,`${i}/${a.displayName}`,a);if(s){o=s;break}}return o}sanitizeOCRText(t){return t=t.replace(/[^\w\d\s]/g,""),t=t.replace(/\s+/g," ").trim(),t.length>50&&(t=t.substring(0,50)+"..."),t}async getAllAttachments(t,i){var l,c,p,m;let r=dt(i.replace(q1,"<$1$2></$1>")),o=r.findAll("object"),a=r.findAll("img"),s=r.findAll("iframe");for(let g of o){for(;g.firstChild;)(l=g.parentNode)==null||l.insertBefore(g.firstChild,g.nextSibling);let b=g.getAttribute("data-attachment").split("."),E=b[b.length-1];if(!(!$n.contains(E)&&!this.importIncompatibleAttachments)){let f=g.getAttribute("data-attachment"),d=g.getAttribute("data"),h=await this.fetchAttachment(t,f,d),v=document.createElement("p");v.innerText=`![[${h}]]`,(c=g.parentNode)==null||c.replaceChild(v,g)}}for(let g=0;g<a.length;g++){let b=a[g],f=b.getAttribute("data-fullres-src-type").split("/")[1],h=`Exported image ${(0,xe.moment)().format("YYYYMMDDHHmmss")}-${g}.${f}`,v=b.getAttribute("data-fullres-src"),_=await this.fetchAttachment(t,h,v);_&&(b.src=encodeURI(_),!b.alt||W1.test(b.alt)?b.alt="Exported image":b.alt=this.sanitizeOCRText(b.alt)||"Exported image")}for(let g of s)if(g.src.contains("youtube.com")||g.src.contains("youtu.be")){let b=document.createTextNode(`![Embedded YouTube video](${g.src})`);(p=g.parentNode)==null||p.replaceChild(b,g)}else{let b=document.createElement("a");b.href=g.src,(m=g.parentNode)==null||m.replaceChild(b,g)}return r}async fetchAttachment(t,i,r){this.attachmentDownloadPauseCounter===7&&await new Promise(o=>{t.status("Pausing attachment download to avoid rate limiting."),this.attachmentDownloadPauseCounter=0,setTimeout(o,3e3)}),this.attachmentDownloadPauseCounter++,t.status("Downloading attachment "+i);try{let o=await this.getAvailablePathForAttachment(i,[]),a=await this.fetchResource(r,"file");return await this.app.vault.createBinary(o,a),t.reportAttachmentSuccess(i),o}catch(o){t.reportFailed(i),console.error(o)}}styledElementToHTML(t){let i={"font-weight:bold":"b","font-style:italic":"i","text-decoration:underline":"u","text-decoration:line-through":"s","background-color":"mark"};t.findAll("cite").forEach(l=>l.innerHTML="> "+l.innerHTML+"<br>");let o=!1,a=document.createElement("pre");return t.querySelectorAll("*").forEach(l=>{let c=l.getAttribute("style")||"",p=Object.keys(i).find(m=>c.includes(m));if(c!=null&&c.contains("font-family:Consolas"))o?a.innerHTML=a.innerHTML.slice(0,-3)+l.innerHTML+"\n```":(o=!0,l.replaceWith(a),a.innerHTML="```\n"+l.innerHTML+"\n```");else if(l.nodeName==="BR"&&o)a.innerHTML=a.innerHTML.slice(0,-3)+"\n```";else if(l.nodeName==="TD"){l.removeAttribute("style");return}else if(p){let m=i[p],g=document.createElement(m);g.innerHTML=l.innerHTML,l.replaceWith(g)}}),t}convertDrawings(t){var o;let i=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT),r=!1;for(;i.nextNode();)((o=i.currentNode.nodeValue)==null?void 0:o.trim())==="InkNode is not supported"&&(r=!0);if(r){let a=document.createTextNode("> [!caution] This page contained a drawing which was not converted.");t.insertBefore(a,t.firstChild)}else for(let a=0;a<t.children.length;a++){let s=t.children[a];s instanceof HTMLElement&&this.convertDrawings(s)}return t}async fetchResource(t,i="json",r=0){try{let o=await fetch(t,{heade Line truncated
`),k=T.findIndex(w=>w.contains("* "+v));k!==-1&&(T[k]=T[k].replace(v,_)),b.set(A,T.join(`
`))}}let{vault:E}=this,f=b.size,d=1;for(let[h,v]of b.entries()){if(t.isCancelled())return;try{let{parent:_}=oe(h);await this.createFolders(_);let A=E.getAbstractFileByPath(h);A?await E.modify(A,v):await E.create(h,v),t.reportNoteSuccess(h),t.reportProgress(d,f)}catch(_){console.error("Error saving Markdown to file:",h,_),t.reportFailed(h)}d++}}}getUserDNPFormat(){let t=this.app.internalPlugins.getPluginById("daily-notes").instance;return t?t.options.format||"YYYY-MM-DD":(console.log('Daily note plugin is not enabled. Roam import defaulting to "YYYY-MM-DD" format.'),"YYYY-MM-DD")}preprocess(t){let i=new Map,r=new Map,o=this.userDNPFormat;function a(s,l){if(l.uid){let c=new Date(s.uid);if(!isNaN(c.getTime())){let g=Yr(s.title,o);s.title=g}let p={pageName:Wr(s.title),blockString:l.string};/.*?(\(\(.*?\)\)).*?/g.test(l.string)&&r.set(l.uid,p),i.set(l.uid,p)}if(l.children)for(let c of l.children)a(s,c)}for(let s of t)if(s.children)for(let l of s.children)a(s,l);return[i,r]}async roamMarkupScrubber(t,i,r,o=!1){return r=r.replace(eb,""),r.substring(0,8)==":hiccup "&&r.includes(":hr")?"---":(r=r.replace(/\[\[(.*?)\]\]/g,(a,s)=>`[[${Yr(Wr(s),this.userDNPFormat)}]]`),r=r.replace(/\[\[(.*\/.*)\]\]/g,(a,s)=>`[[${t}/${s}|${s}]]`),r=r.replace(/\[.+?\]\((\(.+?\)\))\)/g,"$1"),r=r.replace(/\[(.+?)\]\(\[\[(.+?)\]\]\)/g,"[[$2|$1]]"),r=r.replace(/\[\[>\]\]/g,">"),r=r.replace(/{{TODO}}|{{\[\[TODO\]\]}}/g,"[ ]"),r=r.replace(/{{DONE}}|{{\[\[DONE\]\]}}/g,"[x]"),r=r.replace("::",":"),r=r.replace(/{{.*?\bvideo\b.*?(\bhttp.*?\byoutu.*?)}}/g,"![]($1)"),r=r.replace(/(https?:\/\/twitter\.com\/(?:#!\/)?\w+\/status\/\d+(?:\?[\w=&-]+)?)/g,"![]($1)"),r=r.replace(/\_\_(.+?)\_\_/g,"*$1*"),r=r.replace(/\^\^(.+?)\^\^/g,"==$1=="),r=r.replace(/{{\[{0,2}embed.*?(\(\(.*?\)\)).*?}}/g,"$1"),r=r.replace(/{{\[{0,2}embed.*?(\[\[.*?\]\]).*?}}/g,"$1"),this.downloadAttachments&&!o&&r.includes("firebasestorage")&&(r=await this.downloadFirebaseFile(r,i)),r)}async jsonToMarkdown(t,i,r,o="",a=!1,s,l,c){let p=[],m=[],g=r["edit-time"],b=r["create-time"];if(this.newestTimestamp<this.oldestTimestamp&&(this.oldestTimestamp=this.newestTimestamp),this.newestTimestamp=!g||c>g?c:g,b!==void 0?l>10?this.oldestTimestamp=Math.min(l,b):this.oldestTimestamp=b:this.oldestTimestamp=l,"string"in r&&r.string){let E=r.heading?"#".repeat(r.heading)+" ":"",f=await this.roamMarkupScrubber(t,i,r.string);p.push(`${a?o+"* ":o}${E}${f}`)}if(r.children)for(let E of r.children)p.push(await this.jsonToMarkdown(t,i,E,o+" ",!0,"",this.oldestTimestamp,this.newestTimestamp));if((this.fileDateYAML||this.titleYAML)&&!a){let E=this.oldestTimestamp;if(m.push("---"),this.titleYAML&&m.push(`title: "${s}"`),this.fileDateYAML){let f="YYYY-MM-DD HH:mm:ss",d=this.newestTimestamp?(0,zr.moment)(this.newestTimestamp).format(f):(0,zr.moment)(new Date).format(f),h=E?(0,zr.moment)(E).format(f):d;m.push("created: "+h),m.push("updated: "+d)}m.push("---"),p.unshift(m.join(`
`))}return p.join(`
`)}async modifySourceBlockString(t,i,r,o){if(!i.blockString.endsWith("^"+o)){let a=`${r}/${i.pageName}.md`,s=t.get(a);if(s){let l=s.split(`
`),c=l.findIndex(p=>p.contains("* "+i.blockString));if(c!==-1){let p=i.blockString+" ^"+o;l[c]=l[c].replace(i.blockString,p),i.blockString=i.blockString+" ^"+o}t.set(a,l.join(`
`))}}}async extractAndProcessBlockReferences(t,i,r,o){let a=o.match(ib);if(!a)return o;let s=[];for(let p of a)try{let m=i.get(p);if(!m){s.push(p);continue}let g=m.blockString.replace(/\[\[|\]\]/g,""),b=`[[${r}/${m.pageName}#^${p}|${g}]]`;await this.modifySourceBlockString(t,m,r,p),s.push(b)}catch(m){s.push(p)}let l=0;return o.replace(/\(\(\b.*?\b\)\)/g,()=>s[l++])}async downloadFirebaseFile(t,i){let{progress:r,vault:o}=this,a="";try{let s,l;if(tb.test(t)?(s=t.match(/https:\/\/firebasestorage(.*?)\?alt(.*?)\}/),l=t.match(/{{.*https:\/\/firebasestorage.*?alt=media&.*?(?=\s|$)/)):Od.test(t)?(s=t.match(Od),l=t.match(/!\[.*https:\/\/firebasestorage.*?alt=media&.*?(?=\s|$)/)):(s=t.match(nb),l=t.match(/https:\/\/firebasestorage.*?alt=media&.*?(?=\s|$)/)),s&&l){let c="https://firebasestorage"+s[1],p=decodeURIComponent(c.split("/").last()||"");if(p){let f=p.split("/");f.length>1&&(f.splice(-1,1),this.createFolders(`${i}/${f.join("/")}`))}else{let f=Math.floor(Date.now()/1e3),d=c.slice(-5).match(/(.*?)\.(.+)/);if(!d)return r.reportSkipped(s[1],"Unexpected file extension"),t;p=`${f}.${d[2]}`}let m=`${i}/${p}`;if(o.getAbstractFileByPath(m))return r.reportSkipped(s[1],"File already exists"),t;a=s[0].slice(0,-1);let E=await(await fetch(a,{})).arrayBuffer();return await o.createBinary(m,E),r.reportAttachmentSuccess(a),t.replace(l[0],`![[${m}]]`)}}catch(s){console.error(s),r.reportFailed(a,s)}return t}};var qt=require("obsidian");var Cd=/!\[\]\(assets\/([^)]*)\)/g,Gr=class extends ue{init(){qt.Platform.isMacOS||this.modal.contentEl.createEl("p",{text:"Due to platform limitations, only textpack and zip files can be imported from this device. Open your vault on a Mac to import textbundle files."});let e=qt.Platform.isMacOS?["textbundle","textpack","zip"]:["textpack","zip"];this.addFileChooserSetting("Textbundle",e,!0),this.addOutputLocationSetting("Textbundle")}async import(e){let{files:t}=this;if(t.length===0){new qt.Notice("Please pick at least one file to import.");return}let i=await this.getOutputFolder();if(!i){new qt.Notice("Please select a location to export to.");return}this.attachmentsFolderPath=await this.createFolders(`${i.path}/assets`);for(let r of t)if(r.extension==="textpack")await yt(r,async(o,a)=>{await this.process(e,r.name,a)});else if(r.extension==="zip")await yt(r,async(o,a)=>{let s=this.groupFilesByTextbundle(r.name,a);for(let l of s)await this.process(e,r.name,l)});else{let a=await new en(`${r.toString()}/`).list();await this.process(e,r.name,a)}}groupFilesByTextbundle(e,t){let i={},r=e+"/",o=".textbundle";for(let a of t){if(!a.fullpath.startsWith(r)){console.log("Skipping",a.fullpath);continue}let s=a.fullpath.slice(r.length);if(s.startsWith("._")||s.startsWith("__MACOSX")){console.log("Skipping",a.fullpath);continue}let l=s.indexOf(o);if(l===-1){console.log("Skipping",a.fullpath);continue}let c=s.slice(0,l)+".textbundle";if(s.slice(l+o.length+1).startsWith("._")){console.log("Skipping",a.fullpath);continue}c in i?i[c].push(a):i[c]=[a]}return Object.values(i)}async process(e,t,i){let r=i.find(o=>o.name==="info.json");if(r){let o=await r.readText(),a=JSON.parse(o);if(a.hasOwnProperty("type")&&a.type!=="net.daringfireball.markdown"){e.reportSkipped(t,"The textbundle does not contain markdown");return}}for(let o of i)if(!o.name.startsWith("._"))try{if(o.type==="file"&&(o.extension==="md"||o.extension==="markdown")){let a="parent"in o?o.parent:t;a=a.replace(/.textbundle$/,"");let s=await o.readText();s.match(Cd)&&(s=s.replace(Cd,`![[${this.attachmentsFolderPath.path}/$1]]`));let l=(0,qt.normalizePath)(a),c=await this.getOutputFolder();await this.saveAsMarkdownFile(c,l,s),e.reportNoteSuccess(a)}else if(o.type==="file"&&o.fullpath.contains("assets/"))await this.importAsset(e,o);else if(o.type==="folder"){let{basename:a}=oe(o.toString());if(a!=="assets")continue;let l=await new en(`${o.toString()}/`).list();for(let c of l)await this.importAsset(e,c)}else o.name!=="info.json"&&e.reportSkipped(o.name,"the file is not a media or markdown file.")}catch(a){e.reportFailed(o.name,a)}}async importAsset(e,t){if(t.type==="folder"){e.reportSkipped(t.name);return}let i=`${this.attachmentsFolderPath.path}/${t.name}`;this.vault.getAbstractFileByPath(i)&&e.reportSkipped(t.name,"the file already exists.");let o=await t.read();await this.vault.createBinary(i,o),e.reportAttachmentSuccess(t.name)}};var qr="obsidian://importer-auth/",$n=["png","webp","jpg","jpeg","gif","bmp","svg","mpg","m4a","webm","wav","ogv","3gp","mov","mp4","mkv","pdf"],Vr=class{constructor(e){this.notes=0;this.attachments=0;this.skipped=[];this.failed=[];this.maxFileNameLength=100;this.cancelled=!1;this.el=e,e.empty(),this.statusEl=e.createDiv("importer-status"),this.progressBarEl=e.createDiv("importer-progress-bar",t=>{this.progressBarInnerEl=t.createDiv("importer-progress-bar-inner")}),e.createDiv("importer-stats-container",t=>{t.createDiv("importer-stat mod-imported",i=>{this.importedCountEl=i.createDiv({cls:"importer-stat-count",text:"0"}),i.createD Line truncated
/*! Bundled license information:
sax/lib/sax.js:
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
*/
/* nosourcemap */
+10
View File
@@ -0,0 +1,10 @@
{
"id": "obsidian-importer",
"name": "Importer",
"version": "1.6.21",
"minAppVersion": "0.15.0",
"description": "Import data from Notion, Evernote, Apple Notes, Microsoft OneNote, Google Keep, Bear, Roam, and HTML files.",
"author": "Obsidian",
"authorUrl": "https://obsidian.md",
"isDesktopOnly": false
}
+87
View File
@@ -0,0 +1,87 @@
.modal.mod-importer {
max-height: var(--modal-height);
padding: var(--size-4-4) 0 0 0;
position: relative;
overflow: hidden;
}
.modal.mod-importer .modal-title {
padding: 0 var(--size-4-4);
}
.modal.mod-importer .modal-content {
overflow: auto;
padding: var(--size-4-4);
margin-bottom: calc(var(--input-height) + var(--size-4-8));
border-top: var(--border-width) solid var(--background-modifier-border);
}
.modal.mod-importer .modal-button-container {
margin: 0 0 0 calc(var(--size-4-4) * -1);
padding: var(--size-4-4);
gap: var(--size-4-2);
position: absolute;
bottom: 0;
background-color: var(--background-primary);
border-top: var(--border-width) solid var(--background-modifier-border);
width: 100%;
}
.importer-progress-bar {
width: 100%;
height: 8px;
background-color: var(--background-secondary);
overflow: hidden;
box-shadow: inset 0px 0px 0px 1px var(--background-modifier-border);
border-radius: var(--radius-s);
}
.importer-progress-bar-inner {
width: 0;
height: 100%;
background-color: var(--interactive-accent);
}
.importer-status {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: var(--size-4-2) 0;
}
.importer-stats-container {
display: flex;
justify-content: space-evenly;
margin-top: var(--size-4-5);
margin-bottom: var(--size-4-5);
}
.importer-stat {
text-align: center;
}
.importer-stat-count {
font-size: var(--font-ui-large);
}
.importer-log {
overflow: auto;
flex-grow: 1;
font-family: var(--font-monospace);
font-size: var(--font-ui-smaller);
color: var(--text-muted);
border: 1px solid var(--background-modifier-border);
padding: var(--size-4-4);
background-color: var(--background-secondary);
border-radius: var(--radius-s);
max-height: 300px;
user-select: text;
}
.importer-log .list-item {
display: inline-block;
line-height: var(--line-height-normal);
white-space: pre;
margin: var(--size-2-1);
}
.importer-error {
color: var(--text-error);
}
File diff suppressed because it is too large. Load diff
+10
View File
@@ -0,0 +1,10 @@
{
"id": "obsidian-pandoc",
"name": "Pandoc Plugin",
"version": "0.4.1",
"minAppVersion": "0.12.5",
"description": "This is a Pandoc export plugin for Obsidian. It provides commands to export to formats like DOCX, ePub and PDF.",
"author": "Oliver Balfour",
"authorUrl": "https://github.com/OliverBalfour/obsidian-pandoc",
"isDesktopOnly": true
}
+4
View File
@@ -0,0 +1,4 @@
.pandoc-plugin-error {
color: red;
}
+170
View File
@@ -0,0 +1,170 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var sI=Object.create;var Du=Object.defineProperty;var oI=Object.getOwnPropertyDescriptor;var uI=Object.getOwnPropertyNames;var cI=Object.getPrototypeOf,lI=Object.prototype.hasOwnProperty;var fI=(e,t,r)=>t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var Pi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nn=(e,t)=>{for(var r in t)Du(e,r,{get:t[r],enumerable:!0})},F_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uI(t))!lI.call(e,i)&&i!==r&&Du(e,i,{get:()=>t[i],enumerable:!(n=oI(t,i))||n.enumerable});return e};var ln=(e,t,r)=>(r=e!=null?sI(cI(e)):{},F_(t||!e||!e.__esModule?Du(r,"default",{value:e,enumerable:!0}):r,e)),B_=e=>F_(Du({},"__esModule",{value:!0}),e);var ql=(e,t,r)=>(fI(e,typeof t!="symbol"?t+"":t,r),r),dp=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Mi=(e,t,r)=>(dp(e,t,"read from private field"),r?r.call(e):t.get(e)),ku=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},hp=(e,t,r,n)=>(dp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var $_=(e,t,r)=>(dp(e,t,"access private method"),r);var H_,U_=v(()=>{H_="5"});var Wn=v(()=>{U_();typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(H_)});var va,is,as,Fi,Pt,Ht,V_,q_,bt=v(()=>{va="[",is="[!",as="]",Fi={},Pt=Symbol(),Ht=Symbol("filename"),V_=Symbol("hmr"),q_="http://www.w3.org/1999/xhtml"});var zl,z_=v(()=>{zl=!0});var Y_,se,K_=v(()=>{Y_=globalThis.process?.env?.NODE_ENV,se=Y_&&!Y_.toLowerCase().startsWith("prod")});var j_=v(()=>{});var mt=v(()=>{z_();K_();j_()});var xr,ss,Ru,W_,Nt=v(()=>{xr=Symbol("$state"),ss=Symbol("$state metadata"),Ru=Symbol("legacy props"),W_=Symbol("")});function xa(e){return typeof e=="function"}function X_(e){return e()}function os(e){for(var t=0;t<e.length;t++)e[t]()}var fn,G_,Lu,pp,Kt,Kr,Yl,mp,Q_,Ta,Ut,it=v(()=>{fn=Array.isArray,G_=Array.prototype.indexOf,Lu=Array.from,pp=Object.keys,Kt=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,Yl=Object.getOwnPropertyDescriptors,mp=Object.prototype,Q_=Array.prototype,Ta=Object.getPrototypeOf;Ut=()=>{}});function Z_(){var e=Pu;Pu=[],os(e)}function J_(){var e=Mu;Mu=[],os(e)}function dn(e){Pu.length===0&&queueMicrotask(Z_),Pu.push(e)}function eb(e){Mu.length===0&&dI(J_),Mu.push(e)}function gp(){Pu.length>0&&Z_(),Mu.length>0&&J_()}var dI,Pu,Mu,On=v(()=>{it();dI=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback,Pu=[],Mu=[]});function Kl(e){return e===this.v}function Js(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function eo(e){return!Js(e,this.v)}var us=v(()=>{});function _p(){if(se){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function tb(){if(se){let e=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function rb(e){if(se){let t=new Error(`effect_in_teardown
\`${e}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function nb(){if(se){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ib(e){if(se){let t=new Error(`effect_orphan
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function ab(){if(se){let e=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`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function sb(){if(se){let e=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function ob(e){if(se){let t=new Error(`props_invalid_value
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function ub(e){if(se){let t=new Error(`rune_outside_svelte
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function cb(){if(se){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function lb(){if(se){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fb(){if(se){let e=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function db(){if(se){let e=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var hn=v(()=>{mt()});function hb(){mi=!0}var mi,gi,Bi=v(()=>{mi=!1,gi=!1});var bp=v(()=>{mt()});var Fu=v(()=>{mt();bp();it()});function $i(e){let t=Error(),r=t.stack;if(r){let n=r.split(`
`),i=[`
`];for(let a=0;a<n.length;a++){let o=n[a];if(o!=="Error"){if(o.includes("validate_each_keys"))return null;o.includes("svelte/src/internal")||i.push(o)}}if(i.length===1)return null;Kt(t,"stack",{value:i.join(`
`)}),Kt(t,"name",{value:`${e}Error`})}return t}var Bu,to=v(()=>{bt();Fu();it();Nt();He();Ge();Bu=null});function xp(e){cs=e}function Mt(e,t){var r={f:0,v:e,reactions:null,equals:Kl,rv:0,wv:0};return se&&gi&&(r.created=t??$i("CreatedAt"),r.debug=null),r}function Xn(e){return mb(Mt(e))}function _i(e,t=!1){let r=Mt(e);return t||(r.equals=eo),mi&&Pe!==null&&Pe.l!==null&&(Pe.l.s??=[]).push(r),r}function ft(e,t=!1){return mb(_i(e,t))}function mb(e){return $e!==null&&!gn&&$e.f&2&&(Gn===null?_b([e]):Gn.push(e)),e}function oe(e,t){return $e!==null&&!gn&&bi()&&$e.f&18&&(Gn===null||!Gn.includes(e))&&db(),no(e,t)}function no(e,t){if(!e.equals(t)){var r=e.v;if(fs?ro.set(e,t):ro.set(e,r),e.v=t,e.wv=Hu(),se&&gi&&(e.updated=$i("UpdatedAt"),Oe!=null&&(e.trace_need_increase=!0,e.trace_v??=r)),gb(e,2048),bi()&&Oe!==null&&Oe.f&1024&&!(Oe.f&96)&&(pn===null?bb([e]):pn.push(e)),se&&cs.size>0){let n=Array.from(cs);for(let i of n)i.f&1024&&Ar(i,4096),Ui(i)&&ds(i);cs.clear()}}return t}function gb(e,t){var r=e.reactions;if(r!==null)for(var n=bi(),i=r.length,a=0;a<i;a++){var o=r[a],l=o.f;if(!(l&2048)&&!(!n&&o===Oe)){if(se&&l&262144){cs.add(o);continue}Ar(o,t),l&1280&&(l&2?gb(o,4096):io(o))}}}var cs,ro,yr=v(()=>{mt();Ge();us();Nt();hn();Bi();to();Ot();cs=new Set,ro=new Map});function kn(e){var t=2050,r=$e!==null&&$e.f&2?$e:null;Oe===null||r!==null&&r.f&256?t|=256:Oe.f|=1048576;let n={ctx:Pe,deps:null,effects:null,equals:Kl,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??Oe};return se&&gi&&(n.created=$i("CreatedAt")),n}function Br(e){let t=kn(e);return t.equals=eo,t}function jl(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)lr(t[r])}}function hI(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t;t=t.parent}return null}function pI(e){var t,r=Oe;if(Wt(hI(e)),se){let n=cs;xp(new Set);try{yp.includes(e)&&tb(),yp.push(e),jl(e),t=Wl(e)}finally{Wt(r),xp(n),yp.pop()}}else try{jl(e),t=Wl(e)}finally{Wt(r)}return t}function wp(e){var t=pI(e),r=(Vi||e.f&256)&&e.deps!==null?4096:1024;Ar(e,r),e.equals(t)||(e.v=t,e.wv=Hu())}var yp,hs=v(()=>{mt();Nt();Ge();us();hn();He();yr();to();Bi();Ot();yp=[]});function Eb(e,t,r){se?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,ao,so):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function vb(e){se?console.warn(`%c[svelte] hydration_html_changed
%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
https://svelte.dev/e/hydration_html_changed`,ao,so):console.warn("https://svelte.dev/e/hydration_html_changed")}function ps(e){se?console.warn(`%c[svelte] hydration_mismatch
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,ao,so):console.warn("https://svelte.dev/e/hydration_mismatch")}function Tb(){se?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,ao,so):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Sp(e,t){se?console.warn(`%c[svelte] ownership_invalid_mutation
%c${e?`${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
https://svelte.dev/e/ownership_invalid_mutation`,ao,so):console.warn("https://svelte.dev/e/ownership_invalid_mutation")}function Gl(e){se?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,ao,so):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var ao,so,Wr=v(()=>{mt();ao="font-weight: bold",so="font-weight: normal"});function $r(e){ge=e}function wt(e){if(e===null)throw ps(),Fi;return De=e}function Vt(){return wt(fr(De))}function Te(e){if(ge){if(fr(De)!==null)throw ps(),Fi;De=e}}function wr(e=1){if(ge){for(var t=e,r=De;t--;)r=fr(r);De=r}}function oo(){for(var e=0,t=De;;){if(t.nodeType===8){var r=t.data;if(r===as){if(e===0)return t;e-=1}else(r===va||r===is)&&(e+=1)}var n=fr(t);t.remove(),t=n}}var ge,De,Et=v(()=>{bt();Wr();Gr();ge=!1});function er(e,t=null,r){var n=null;if(se&&gi&&(n=$i("CreatedAt")),typeof e!="object"||e===null||xr in e)return e;let i=Ta(e);if(i!==mp&&i!==Q_)return e;var a=new Map,o=fn(e),l=Mt(0);o&&a.set("length",Mt(e.length,n));var d;if(se)if(d={parent:t,owners:null},r){let p=r.v?.[ss]?.owners;d.owners=p?new Set(p):null}else d.owners=t===null?Pe!==null?new Set([Pe.function]):null:new Set;return new Proxy(e,{defineProperty(p,g,E){(!("value"in E)||E.configurable===!1||E.enumerable===!1||E.writable===!1)&&cb();var _=a.get(g);return _===void 0?(_=Mt(E.value,n),a.set(g,_)):oe(_,er(E.value,d)),!0},deleteProperty(p,g){var E=a.get(g);if(E===void 0)g in p&&a.set(g,Mt(Pt,n));else{if(o&&typeof g=="string"){var _=a.get("length"),y=Number(g);Number.isInteger(y)&&y<_.v&&oe(_,y)}oe(E,Pt),xb(l)}return!0},get(p,g,E){if(se&&g===ss)return d;if(g===xr)return e;var _=a.get(g),y=g in p;if(_===void 0&&(!y||Kr(p,g)?.writable)&&(_=Mt(er(y?p[g]:Pt,d),n),a.set(g,_)),_!==void 0){var C=q(_);if(se){var k=C?.[ss];k&&k?.parent!==d&&Cp(d,k)}return C===Pt?void 0:C}return Reflect.get(p,g,E)},getOwnPropertyDescriptor(p,g){var E=Reflect.getOwnPropertyDescriptor(p,g);if(E&&"value"in E){var _=a.get(g);_&&(E.value=q(_))}else if(E===void 0){var y=a.get(g),C=y?.v;if(y!==void 0&&C!==Pt)return{enumerable:!0,configurable:!0,value:C,writable:!0}}return E},has(p,g){if(se&&g===ss||g===xr)return!0;var E=a.get(g),_=E!==void 0&&E.v!==Pt||Reflect.has(p,g);if(E!==void 0||Oe!==null&&(!_||Kr(p,g)?.writable)){E===void 0&&(E=Mt(_?er(p[g],d):Pt,n),a.set(g,E));var y=q(E);if(y===Pt)return!1}return _},set(p,g,E,_){var y=a.get(g),C=g in p;if(o&&g==="length")for(var k=E;k<y.v;k+=1){var P=a.get(k+"");P!==void 0?oe(P,Pt):k in p&&(P=Mt(Pt,n),a.set(k+"",P))}if(y===void 0?(!C||Kr(p,g)?.writable)&&(y=Mt(void 0,n),oe(y,er(E,d)),a.set(g,y)):(C=y.v!==Pt,oe(y,er(E,d))),se){var N=E?.[ss];N&&N?.parent!==d&&Cp(d,N),yb(d)}var L=Reflect.getOwnPropertyDescriptor(p,g);if(L?.set&&L.set.call(_,E),!C){if(o&&typeof g=="string"){var H=a.get("length"),R=Number(g);Number.isInteger(R)&&R>=H.v&&oe(H,R+1)}xb(l)}return!0},ownKeys(p){q(l);var g=Reflect.ownKeys(p).filter(y=>{var C=a.get(y);return C===void 0||C.v!==Pt});for(var[E,_]of a)_.v!==Pt&&!(E in p)&&g.push(E);return g},setPrototypeOf(){lb()}})}function xb(e,t=1){oe(e,e.v+t)}function Ql(e){return e!==null&&typeof e=="object"&&xr in e?e[xr]:e}var uo=v(()=>{mt();Ge();Ot();it();Uu();yr();Nt();bt();hn();to();Bi()});function Ab(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,o){let l=r.call(this,a,o);if(l===-1){for(let d=o??0;d<this.length;d+=1)if(Ql(this[d])===a){Gl("array.indexOf(...)");break}}return l},e.lastIndexOf=function(a,o){let l=n.call(this,a,o??this.length-1);if(l===-1){for(let d=0;d<=(o??this.length-1);d+=1)if(Ql(this[d])===a){Gl("array.lastIndexOf(...)");break}}return l},e.includes=function(a,o){let l=i.call(this,a,o);if(!l){for(let d=0;d<this.length;d+=1)if(Ql(this[d])===a){Gl("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Ip=v(()=>{Wr();uo()});function Xl(){if(Np===void 0){Np=window,wb=document,Vu=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype;Sb=Kr(t,"firstChild").get,Cb=Kr(t,"nextSibling").get,e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0,Text.prototype.__t=void 0,se&&(e.__svelte_meta=null,Ab())}}function Qr(e=""){return document.createTextNode(e)}function qt(e){return Sb.call(e)}function fr(e){return Cb.call(e)}function xe(e,t){if(!ge)return qt(e);var r=qt(De);if(r===null)r=De.appendChild(Qr());else if(t&&r.nodeType!==3){var n=Qr();return r?.before(n),wt(n),n}return wt(r),r}function Sr(e,t){if(!ge){var r=qt(e);return r instanceof Comment&&r.data===""?fr(r):r}if(t&&De?.nodeType!==3){var n=Qr();return De?.before(n),wt(n),n}return De}function Ye(e,t=1,r=!1){let n=ge?De:e;for(var i;t--;)i=n,n=fr(n);if(!ge)return n;var a=n?.nodeType;if(r&&a!==3){var o=Qr();return n===null?i?.after(o):n.before(o),wt(o),o}return wt(n),n}function qu(e){e.textContent=""}var Np,wb,Vu,Sb,Cb,Gr=v(()=>{Et();mt();Ip();it()});function kp(e){fs=e}function tr(e){$e=e}function Wt(e){Oe=e}function _b(e){Gn=e}function bb(e){pn=e}function Hu(){return++Rb}function Ui(e){var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i,a,o=( Line truncated
${i.map(g=>`
${d}in ${g}`).join("")}
`}),Kt(e,"component_stack",{value:i});let p=e.stack;if(p){let g=p.split(`
`),E=[];for(let _=0;_<g.length;_++){let y=g[_];y.includes("svelte/src/internal")||E.push(y)}Kt(e,"stack",{value:E.join(`
`)})}if(Nb(e,t),Ob(t))throw e}function Lb(e,t,r=!0){var n=e.reactions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];a.f&2?Lb(a,t,!1):t===a&&(r?Ar(a,2048):a.f&1024&&Ar(a,4096),io(a))}}function Wl(e){var t=Hr,r=bn,n=pn,i=$e,a=Vi,o=Gn,l=Pe,d=gn,p=e.f;Hr=null,bn=0,pn=null,Vi=(p&256)!==0&&(gn||!ms||$e===null),$e=p&96?null:e,Gn=null,Wu(e.ctx),gn=!1,tf++;try{var g=(0,e.fn)(),E=e.deps;if(Hr!==null){var _;if(ju(e,bn),E!==null&&bn>0)for(E.length=bn+Hr.length,_=0;_<Hr.length;_++)E[bn+_]=Hr[_];else e.deps=E=Hr;if(!Vi)for(_=bn;_<E.length;_++)(E[_].reactions??=[]).push(e)}else E!==null&&bn<E.length&&(ju(e,bn),E.length=bn);if(bi()&&pn!==null&&!gn&&E!==null&&!(e.f&6146))for(_=0;_<pn.length;_++)Lb(pn[_],e);return i!==null&&(tf++,pn!==null&&(n===null?n=pn:n.push(...pn))),g}finally{Hr=t,bn=r,pn=n,$e=i,Vi=a,Gn=o,Wu(l),gn=d}}function mI(e,t){let r=t.reactions;if(r!==null){var n=G_.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&2&&(Hr===null||!Hr.includes(t))&&(Ar(t,4096),t.f&768||(t.f^=512),jl(t),ju(t,0))}function ju(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)mI(e,r[n])}function ds(e){var t=e.f;if(!(t&16384)){Ar(e,1024);var r=Oe,n=Pe,i=ms;if(Oe=e,ms=!0,se){var a=Xr;Gu(e.component_function)}try{t&16?Pb(e):Lp(e),Rp(e);var o=Wl(e);e.teardown=typeof o=="function"?o:null,e.wv=Rb;var l=e.deps;if(se&&gi&&e.f&2048&&l!==null)for(let p=0;p<l.length;p++){var d=l[p];d.trace_need_increase&&(d.wv=Hu(),d.trace_need_increase=void 0,d.trace_v=void 0)}se&&ef.push(e)}catch(p){lo(p,e,r,n||e.ctx)}finally{ms=i,Oe=r,se&&Gu(a)}}}function Db(){console.error("Last ten effects were: ",ef.slice(-10).map(e=>e.fn)),ef=[]}function gI(){try{ab()}catch(e){if(se&&Kt(e,"stack",{value:""}),zu!==null)if(se)try{lo(e,zu,null,null)}catch(t){throw Db(),t}else lo(e,zu,null,null);else throw se&&Db(),e}}function Op(){var e=ms;try{var t=0;for(ms=!0;Yu.length>0;){t++>1e3&&gI();var r=Yu,n=r.length;Yu=[];for(var i=0;i<n;i++){var a=bI(r[i]);_I(a)}}}finally{Ku=!1,ms=e,zu=null,se&&(ef=[]),ro.clear()}}function _I(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];if(!(n.f&24576))try{Ui(n)&&(ds(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pp(n):n.fn=null))}catch(i){lo(i,n,null,n.ctx)}}}function io(e){Ku||(Ku=!0,queueMicrotask(Op));for(var t=zu=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Yu.push(t)}function bI(e){for(var t=[],r=e;r!==null;){var n=r.f,i=(n&96)!==0,a=i&&(n&1024)!==0;if(!a&&!(n&8192)){if(n&4)t.push(r);else if(i)r.f^=1024;else{var o=$e;try{$e=r,Ui(r)&&ds(r)}catch(p){lo(p,r,null,r.ctx)}finally{$e=o}}var l=r.first;if(l!==null){r=l;continue}}var d=r.parent;for(r=r.next;r===null&&d!==null;)r=d.next,d=d.parent}return t}function fo(e){var t;for(e&&(Ku=!0,Op(),t=e()),gp();Yu.length>0;)Ku=!0,Op(),gp();return t}async function Ei(){await Promise.resolve(),fo()}function q(e){var t=e.f,r=(t&2)!==0;if($u!==null&&$u.add(e),$e!==null&&!gn){Gn!==null&&Gn.includes(e)&&fb();var n=$e.deps;e.rv<tf&&(e.rv=tf,Hr===null&&n!==null&&n[bn]===e?bn++:Hr===null?Hr=[e]:(!Vi||!Hr.includes(e))&&Hr.push(e))}else if(r&&e.deps===null&&e.effects===null){var i=e,a=i.parent;a!==null&&!(a.f&256)&&(i.f^=256)}if(r&&(i=e,Ui(i)&&wp(i)),se&&gi&&Bu!==null&&$e!==null&&Bu.reaction===$e){if(e.debug)e.debug();else if(e.created){var o=Bu.entries.get(e);o===void 0&&(o={read:[]},Bu.entries.set(e,o)),o.read.push($i("TracedAt"))}}return fs&&ro.has(e)?ro.get(e):e.v}function at(e){var t=gn;try{return gn=!0,e()}finally{gn=t}}function Ar(e,t){e.f=e.f&EI|t}function vt(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(xr in e)rf(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&xr in r&&rf(r)}}}function rf(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{rf(e[n],t)}catch{}let r=Ta(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=Yl(r);for(let i in n){let a=n[i].get;if(a)try{a.call(e)}catch{}}}}}var Ib,Zl,Ku,zu,ms,fs,Yu,ef,$e,gn,Oe,Gn,Hr,bn,pn,Rb,tf,Vi,$u,EI,Ge=v(()=>{mt();it();He();Nt();On();yr();hs();hn();bt();Bi();to();Ot();Gr();Ib=new WeakSet,Zl=!1,Ku=!1,zu=null,ms=!1,fs=!1;Yu=[],ef=[],$e=null,gn=!1;Oe=null;Gn=null;Hr=null,bn=0,pn=null;Rb=1,tf=0,Vi=!1,$u=null;EI=-7169});function Fp(e){Oe===null&&$e===null&&ib(e),$e!==null&&$e.f&256&&Oe===null&&nb(),fs&&rb(e)}function vI(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function gs(e,t,r,n=!0){var i=Oe;if(se)for(;i!==null&&i.f&262144;)i=i.parent;var a={ctx:Pe,deps:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(se&&(a.component_function=Xr),r)try{ds(a),a.f|=32768}catch(d){throw lr(a),d}else t!==null&&io(a);var o=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!o&&n&&(i!==nu Line truncated
`)){let n=xI.exec(r)??yI.exec(r);n&&t.push({file:n[1],line:+n[2],column:+n[3]})}return t}function $b(){let e=AI()?.slice(4);if(!e)return null;for(let t=0;t<e.length;t++){let r=e[t],n=TI[r.file];if(!n){if(t===0)return null;continue}for(let i of n){if(i.end==null)return null;if(i.start.line<r.line&&i.end.line>r.line)return i.component}}return null}function Cp(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function Hb(e,t){return e.owners===null?!0:e.owners.has(t)||Ht in t&&[...e.owners].some(r=>r[Ht]===t[Ht])||e.parent!==null&&Hb(e.parent,t)}function Ub(e){return e?.owners?.values().next().value??Ub(e.parent)}function yb(e){if(SI)return;let t=$b();if(t&&!Hb(e,t)){let r=Ub(e);r[Ht]!==t[Ht]?Sp(t[Ht],r[Ht]):Sp()}}var TI,xI,yI,wI,SI,Uu=v(()=>{Nt();He();Ot();it();Wr();bt();TI={},xI=/at (?:.+ \()?(.+):(\d+):(\d+)\)?$/,yI=/@(.+):(\d+):(\d+)$/;wI=Symbol("ADD_OWNER");SI=!1});function po(e){if(se){let t=new Error(`lifecycle_outside_component
\`${e}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var mo=v(()=>{mt()});function Wu(e){Pe=e}function Gu(e){Xr=e}function dr(e,t=!1,r){var n=Pe={p:Pe,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};mi&&!t&&(Pe.l={s:null,u:null,r1:[],r2:Mt(!1)}),Cr(()=>{n.d=!0}),se&&(Pe.function=r,Xr=r)}function hr(e){let t=Pe;if(t!==null){e!==void 0&&(t.x=e);let o=t.e;if(o!==null){var r=Oe,n=$e;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];Wt(a.effect),tr(a.reaction),Gt(a.fn)}}finally{Wt(r),tr(n)}}Pe=t.p,se&&(Xr=t.p?.function??null),t.m=!0}return e||{}}function bi(){return!mi||Pe!==null&&Pe.l===null}var Pe,Xr,Ot=v(()=>{mt();Uu();mo();yr();Ge();He();Bi();Pe=null;Xr=null});function Vb(e){e=e.replace(NI,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function qb(e){return DI.includes(e)}function $p(e){return e?.replace(/\//g,"/\u200B")}var NI,OI,hB,DI,_s=v(()=>{NI=/\r/g;OI=["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"],hB=[...OI,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],DI=["touchstart","touchmove"]});var zb=v(()=>{_s();Ge();Wr()});var Hp=v(()=>{});var Yb=v(()=>{bt();Et()});function of(){Kb||(Kb=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}var Kb,uf=v(()=>{Et();Gr();On();Kb=!1});function go(e){var t=$e,r=Oe;tr(null),Wt(null);try{return e()}finally{tr(t),Wt(r)}}function Up(e,t,r,n=r){e.addEventListener(t,()=>go(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),of()}var Ti=v(()=>{He();Ge();uf()});function Wb(e,t,r,n={}){function i(a){if(n.capture||_o.call(t,a),!a.cancelBubble)return go(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?dn(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function pr(e,t,r,n,i){var a={capture:n,passive:i},o=Wb(e,t,r,a);(t===document.body||t===window||t===document)&&Cr(()=>{t.removeEventListener(e,o,a)})}function _o(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],a=i[0]||e.target,o=0,l=e.__root;if(l){var d=i.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var p=i.indexOf(t);if(p===-1)return;d<=p&&(o=d)}if(a=i[o]||e.target,a!==t){Kt(e,"currentTarget",{configurable:!0,get(){return a||r}});var g=$e,E=Oe;tr(null),Wt(null);try{for(var _,y=[];a!==null;){var C=a.assignedSlot||a.parentNode||a.host||null;try{var k=a["__"+n];if(k!=null&&(!a.disabled||e.target===a))if(fn(k)){var[P,...N]=k;P.apply(a,[e,...N])}else k.call(a,e)}catch(L){_?y.push(L):_=L}if(e.cancelBubble||C===t||C===null)break;a=C}if(_){for(let L of y)queueMicrotask(()=>{throw L});throw _}}finally{e.__root=t,delete e.currentTarget,tr(g),Wt(E)}}}var jb,Vp,Xu=v(()=>{He();it();Et();On();bt();Wr();Ge();Ti();jb=new Set,Vp=new Set});function Gb(){kI=void 0}var kI,qp=v(()=>{Et();Gr();He();Nt();bt()});function Zu(e){var t=document.createElement("template");return t.innerHTML=e,t.content}var cf=v(()=>{});function Zr(e,t){var r=Oe;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Le(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("<!>");return()=>{if(ge)return Zr(De,null),De;i===void 0&&(i=Zu(a?e:"<!>"+e),r||(i=qt(i)));var o=n||Vu?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=qt(o),d=o.lastChild;Zr(l,d)}else Zr(o,o);return o}}function Ju(e=""){if(!ge){var t=Qr(e+"");return Zr(t,t),t}var r=De;return r.nodeType!==3&&(r.before(r=Qr()),wt(r)),Zr(r,r),r}function qi(){if(ge)return Zr(De,null),De;var e=document.createDocumentFragment(),t=document.createComment(""),r=Qr();return e.append(t,r),Zr(t,r),e}function we(e,t){if(ge){Oe.nodes_end=De,Vt();return}e!==null&&e.before(t)}var bs=v(()=>{Et();Gr();cf();Ge();bt()});function ir(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Es(e,t){return Qb(e,t)}function Yp(e,t){Xl(),t.intro=t.intro??!1;let r=t.target,n=ge,i=De;try{for(var a=qt(r);a&&(a.nodeType!==8||a.data!==va);)a=fr(a);if(!a)throw Fi;$r(!0),wt(a),Vt();let o=Qb(e,{...t,anchor:a});if(De===null||De.nodeType!==8||De.data!==as)throw ps(),Fi;return $r(!1),o}catch(o){if(o===Fi)return t.recover===!1&&sb(),Xl(),qu(r),$r(!1),Es(e,t);throw o}finally{$r(n),wt(i),Gb()}}function Qb(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:o=!0}){Xl();var l=new Set,d=E=>{for(var _=0;_<E.length;_++){var y=E[_];if(!l.has(y)){l.add(y);var C=qb(y);t.addEventListener(y,_o,{passive:C});v Line truncated
\r\f\xA0\v\uFEFF`]});function Yi(e,t,r,n,i,a){var o=e.__className;if(ge||o!==r){var l=EE(r,n,a);(!ge||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l)),e.__className=r}else if(a&&i!==a)for(var d in a){var p=!!a[d];(i==null||p!==!!i[d])&&e.classList.toggle(d,p)}return a}var Xp=v(()=>{nc();Et()});function Zp(e,t={},r,n){for(var i in r){var a=r[i];t[i]!==a&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,n))}}function ic(e,t,r,n){var i=e.__style;if(ge||i!==t){var a=vE(t,n);(!ge||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}else n&&(Array.isArray(n)?(Zp(e,r?.[0],n[0]),Zp(e,r?.[1],n[1],"important")):Zp(e,r,n));return n}var Jp=v(()=>{nc();Et()});function tm(e){if(ge){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Ki(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;Ki(e,"checked",null),e.checked=i}}};e.__on_r=r,eb(r),of()}}function Ki(e,t,r,n){var i=GI(e);if(ge&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||XI(e,t,r??"");return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[W_]=r),r==null?e.removeAttribute(t):typeof r!="string"&&QI(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function GI(e){return e.__attributes??={[jI]:e.nodeName.includes("-"),[WI]:e.namespaceURI===q_}}function QI(e){var t=TE.get(e.nodeName);if(t)return t;TE.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=Yl(n);for(var a in r)r[a].set&&t.push(a);n=Ta(n)}return t}function XI(e,t,r){se&&(t==="srcset"&&ZI(e,r)||em(e.getAttribute(t)??"",r)||Eb(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function em(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function xE(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function ZI(e,t){var r=xE(e.srcset),n=xE(t);return n.length===r.length&&n.every(([i,a],o)=>a===r[o][1]&&(em(r[o][0],i)||em(i,r[o][0])))}var YI,KI,jI,WI,TE,yE=v(()=>{mt();Et();it();Xu();uf();Wr();Nt();On();_s();Ge();nc();Xp();Jp();bt();YI=Symbol("class"),KI=Symbol("style"),jI=Symbol("is custom element"),WI=Symbol("is html");TE=new Map});var JI,ei,rm=v(()=>{it();mt();JI=zl?()=>performance.now():()=>Date.now(),ei={tick:e=>(zl?requestAnimationFrame:Ut)(e),now:()=>JI(),tasks:new Set}});function AE(){let e=ei.now();ei.tasks.forEach(t=>{t.c(e)||(ei.tasks.delete(t),t.f())}),ei.tasks.size!==0&&ei.tick(AE)}function wE(e){let t;return ei.tasks.size===0&&ei.tick(AE),{promise:new Promise(r=>{ei.tasks.add(t={c:e,f:r})}),abort(){ei.tasks.delete(t)}}}var SE=v(()=>{rm()});function df(e,t){go(()=>{e.dispatchEvent(new CustomEvent(t))})}function n3(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function CE(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let o=n3(i.trim());t[o]=a.trim()}return t}function im(e,t,r,n){var i=(e&1)!==0,a=(e&2)!==0,o=i&&a,l=(e&4)!==0,d=o?"both":i?"in":"out",p,g=t.inert,E=t.style.overflow,_,y;function C(){var H=$e,R=Oe;tr(null),Wt(null);try{return p??=r()(t,n?.()??{},{direction:d})}finally{tr(H),Wt(R)}}var k={is_global:l,in(){if(t.inert=g,!i){y?.abort(),y?.reset?.();return}a||_?.abort(),df(t,"introstart"),_=nm(t,C(),y,1,()=>{df(t,"introend"),_?.abort(),_=p=void 0,t.style.overflow=E})},out(H){if(!a){H?.(),p=void 0;return}t.inert=!0,df(t,"outrostart"),y=nm(t,C(),_,0,()=>{df(t,"outroend"),H?.()})},stop:()=>{_?.abort(),y?.abort()}},P=Oe;if((P.transitions??=[]).push(k),i&&lf){var N=l;if(!N){for(var L=P.parent;L&&L.f&65536;)for(;(L=L.parent)&&!(L.f&16););N=!L||(L.f&32768)!==0}N&&Gt(()=>{at(()=>k.in())})}}function nm(e,t,r,n,i){var a=n===1;if(xa(t)){var o,l=!1;return dn(()=>{if(!l){var P=t({direction:a?"in":"out"});o=nm(e,P,r,n,i)}}),{abort:()=>{l=!0,o?.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(r?.deactivate(),!t?.duration)return i(),{abort:Ut,deactivate:Ut,reset:Ut,t:()=>n};let{delay:d=0,css:p,tick:g,easing:E=i3}=t;var _=[];if(a&&r===void 0&&(g&&g(0,1),p)){var y=CE(p(0,1));_.push(y,y)}var C=()=>1-n,k=e.animate(_,{duration:d});return k.onfinish=()=>{var P=r?.t()??1-n;r?.abort();var N=n-P,L=t.duration*Math.abs(N),H=[];if(L>0){var R=!1;if(p)for(var B=Math.ceil(L/16.666666666666668),V=0;V<=B;V+=1){var X=P+N*E(V/B),ce=CE(p(X,1-X));H.push(ce),R||=ce.overflow==="hidden"}R&&(e.style.overflow="hidden"),C=()=>{var ve=k.currentTime;return P+N*E(ve/L)},g&&wE(()=>{if(k.playState!=="running")return!1;var ve=C();return g(ve,1-ve),!0})}k=e.animate(H,{duration:L,fill:"forwards"}),k.onfinish=()=>{C=()=>n,g?.(n,1-n),i()}},{abort:()=>{k&&(k.cancel(),k.effect=null,k.onfinish=Ut)},deactivate:()=>{i=Ut},reset:()=>{n===0&&g?.(1,0)},t:()=>C()}}var i3,IE=v(()=>{it();He();Ge();SE();vs();ff();bt();Nt();On();Ti();i3=e=>e});var NE=v(()=>{Ti()});function om( Line truncated
${n?`\u{1F44D} You have installed <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a>, Omnisearch can use it to index PDFs and images contents.
<br />Text extraction only works on desktop, but the cache can be synchronized with your mobile device.`:'\u26A0\uFE0F Omnisearch requires <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a> to index PDFs and images.'}
${i?'<br/>\u{1F44D} You have installed <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a>, Omnisearch can use it to index images contents with ai.':'<br/>\u26A0\uFE0F Omnisearch requires <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a> to index images with ai.'}`)),new Ji.Setting(r).setName(`PDFs content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(ar("Omnisearch will use Text Extractor to index the content of your PDFs.")).addToggle(p=>p.setValue(t.PDFIndexing).onChange(async g=>{await a.clearCache(),t.PDFIndexing=g,await ke(e)})).setDisabled(!n),new Ji.Setting(r).setName(`Images OCR indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(ar("Omnisearch will use Text Extractor to OCR your images and index their content.")).addToggle(p=>p.setValue(t.imagesIndexing).onChange(async g=>{await a.clearCache(),t.imagesIndexing=g,await ke(e)})).setDisabled(!n);let l=new DocumentFragment;l.createSpan({},p=>{p.innerHTML='Omnisearch will use Text Extractor to index the content of your office documents (currently <pre style="display:inline">.docx</pre> and <pre style="display:inline">.xlsx</pre>).'}),new Ji.Setting(r).setName(`Documents content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(l).addToggle(p=>p.setValue(t.officeIndexing).onChange(async g=>{await a.clearCache(),t.officeIndexing=g,await ke(e)})).setDisabled(!n);let d=new DocumentFragment;d.createSpan({},p=>{p.innerHTML="Omnisearch will use AI Image Analyzer to index the content of your images with ai."}),new Ji.Setting(r).setName(`Images AI indexing ${i?"":"\u26A0\uFE0F Disabled"}`).setDesc(d).addToggle(p=>p.setValue(t.aiImageIndexing).onChange(async g=>{await a.clearCache(),t.aiImageIndexing=g,await ke(e)})).setDisabled(!i),new Ji.Setting(r).setName("Index paths of unsupported files").setDesc(ar(`
Omnisearch can index file<strong>names</strong> of "unsupported" files, such as e.g. <pre style="display:inline">.mp4</pre>
or non-extracted PDFs & images.<br/>
"Obsidian setting" will respect the value of "Files & Links > Detect all file extensions".`)).addDropdown(p=>{p.addOptions({yes:"Yes",no:"No",default:"Obsidian setting"}).setValue(t.unsupportedFilesIndexing).onChange(async g=>{await o(),t.unsupportedFilesIndexing=g,await ke(e)})}),new Ji.Setting(r).setName("Set frontmatter property key as title").setDesc(ar(`If you have a custom property in your notes that you want to use as the title in search results. If you set this to '#heading', then use the first heading from a file as the title.<br>
Leave empty to disable.`)).addText(p=>{p.setValue(t.displayTitle).onChange(async g=>{await o(),t.displayTitle=g,await ke(e)})}),new Ji.Setting(r).setName("Additional TEXT files to index").setDesc(ar(`In addition to standard <code>md</code> files, Omnisearch can also index other <strong style="color: var(--text-accent)">PLAINTEXT</strong> files.<br/>
Add extensions separated by a space, without the dot. Example: "<code>txt org csv</code>".<br />
\u26A0\uFE0F <span style="color: var(--text-accent)">Using extensions of non-plaintext files (like .pptx) WILL cause crashes,
because Omnisearch will try to index their content.</span>`)).addText(p=>{p.setValue(t.indexedFileTypes.join(" ")).setPlaceholder("Example: txt org csv").onChange(async g=>{await a.clearCache(),t.indexedFileTypes=g.split(" "),await ke(e)})})}var Ji,Ey=v(()=>{Ji=require("obsidian");mr();mr();Oc()});function vy(e,t,r){let n=e.database;new rn.Setting(r).setName("Behavior").setHeading(),new rn.Setting(r).setName("Save index to cache").setDesc("Enable caching to speed up indexing time. In rare cases, the cache write may cause a crash in Obsidian. This option will disable itself if it happens.").addToggle(i=>i.setValue(t.useCache).onChange(async a=>{t.useCache=a,await ke(e)})),new rn.Setting(r).setName("Show previous query results").setDesc("Re-executes the previous query when opening Omnisearch.").addToggle(i=>i.setValue(t.showPreviousQueryResults).onChange(async a=>{t.showPreviousQueryResults=a,await ke(e)})),new rn.Setting(r).setName(`Respect Obsidian's "Excluded Files"`).setDesc(`By default, files that are in Obsidian's "Options > Files & Links > Excluded Files" list are downranked in results.
Enable this option to completely hide them.`).addToggle(i=>i.setValue(t.hideExcluded).onChange(async a=>{t.hideExcluded=a,await ke(e)})),new rn.Setting(r).setName("Folders to downrank in search results").setDesc("Folders to downrank in search results. Files in these folders will be downranked in results. They will still be indexed for tags, unlike excluded files. Folders should be comma delimited.").addText(i=>{i.setValue(t.downrankedFoldersFilters.join(",")).setPlaceholder("Example: src,p2/dir").onChange(async a=>{let o=a.split(",");o=o.map(l=>l.trim()),t.downrankedFoldersFilters=o,await ke(e)})}),new rn.Setting(r).setName("Split CamelCaseWords").setDesc(ar(`Enable this if you want to be able to search for CamelCaseWords as separate words.<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${yo}`)).addToggle(i=>i.setValue(t.splitCamelCase).onChange(async a=>{await n.clearCache(),t.splitCamelCase=a,await ke(e)})),new rn.Setting(r).setName("Simpler search").setDesc(`Enable this if Obsidian often freezes while making searches.
Words shorter than 3 characters won't be used as prefixes; this can reduce search delay but will return fewer results.`).addToggle(i=>i.setValue(t.simpleSearch).onChange(async a=>{t.simpleSearch=a,await ke(e)})),rn.Platform.isIosApp||new rn.Setting(r).setName("Tokenize URLs").setDesc(`Enable this if you want to be able to search for URLs as separate words.
This setting has a strong impact on indexing performance, and can crash Obsidian under certain conditions.`).addToggle(i=>i.setValue(t.tokenizeUrls).onChange(async a=>{t.tokenizeUrls=a,await ke(e)})),new rn.Setting(r).setName("Open in new pane").setDesc("Open and create files in a new pane instead of the current pane.").addToggle(i=>i.setValue(t.openInNewPane).onChange(async a=>{t.openInNewPane=a,await ke(e)})),new rn.Setting(r).setName("Set Vim like navigation keys").setDesc(`Navigate down the results with ${vn()} + J/N, or navigate up with ${vn()} + K/P.`).addToggle(i=>i.setValue(t.vimLikeNavigationShortcut).onChange(async a=>{t.vimLikeNavigationShortcut=a,await ke(e)})),new rn.Setting(r).setName("Fuzziness").setDesc("Define the level of fuzziness for the search. The higher the fuzziness, the more results you'll get.").addDropdown(i=>i.addOptions({0:"Exact match",1:"Not too fuzzy",2:"Fuzzy enough"}).setValue(t.fuzziness).onChange(async a=>{["0","1","2"].includes(a)||(a="2"),t.fuzziness=a,await ke(e)}))}var rn,Ty=v(()=>{rn=require("obsidian");mr();mr();Nr()});function xy(e,t,r){new Ma.Setting(r).setName("User Interface").setHeading(),new Ma.Setting(r).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(n=>n.setValue(t.ribbonIcon).onChange(async i=>{t.ribbonIcon=i,await ke(e),i?e.addRibbonButton():e.removeRibbonButton()})),new Ma.Setting(r).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(n=>n.setValue(t.showExcerpt).onChange(async i=>{Fa.set(i)})),new Ma.Setting(r).setName("Show embed references").setDesc(ar(`Some results are <a href="https://help.obsidian.md/Linking+notes+and+files/Embed+files">embedded</a> in other notes.<br>
This setting controls the maximum number of embeds to show in the search results. Set to 0 to disable.<br>
Also works with Text Extractor for embedded images and documents.`)).addSlider(n=>{n.setLimits(0,10,1).setValue(t.maxEmbeds).setDynamicTooltip().onChange(async i=>{t.maxEmbeds=i,await ke(e)})}),new Ma.Setting(r).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(n=>n.setValue(t.renderLineReturnInExcerpts).onChange(async i=>{t.renderLineReturnInExcerpts=i,await ke(e)})),new Ma.Setting(r).setName('Show "Create note" button').setDesc(ar(`Shows a button next to the search input, to create a note.
Acts the same as the <code>shift \u21B5</code> shortcut, can be useful for mobile device users.`)).addToggle(n=>n.setValue(t.showCreateButton).onChange(async i=>{t.showCreateButton=i,await ke(e)})),new Ma.Setting(r).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(n=>n.setValue(t.highlight).onChange(async i=>{t.highlight=i,await ke(e)}))}var Ma,yy=v(()=>{Ma=require("obsidian");Ao();mr();mr()});function wy(e,t,r,n){function i(o,l){o.setLimits(1,10,.5).setValue(t[l]).setDynamicTooltip().onChange(async d=>{t[l]=d,await ke(e)})}let a=Dc(e.app);new Fn.Setting(r).setName("Results weighting").setHeading(),new Fn.Setting(r).setName(`File name & declared aliases (default: ${a.weightBasename})`).addSlider(o=>i(o,"weightBasename")),new Fn.Setting(r).setName(`File directory (default: ${a.weightDirectory})`).addSlider(o=>i(o,"weightDirectory")),new Fn.Setting(r).setName(`Headings level 1 (default: ${a.weightH1})`).addSlider(o=>i(o,"weightH1")),new Fn.Setting(r).setName(`Headings level 2 (default: ${a.weightH2})`).addSlider(o=>i(o,"weightH2")),new Fn.Setting(r).setName(`Headings level 3 (default: ${a.weightH3})`).addSlider(o=>i(o,"weightH3")),new Fn.Setting(r).setName(`Tags (default: ${a.weightUnmarkedTags})`).addSlider(o=>i(o,"weightUnmarkedTags")),new Fn.Setting(r).setName("Header properties fields").setDesc('You can set custom weights for values of header properties (e.g. "keywords"). Weights under 1.0 will downrank the results.');for(let o=0;o<t.weightCustomProperties.length;o++){let l=t.weightCustomProperties[o],d=new Fn.Setting(r).setName((o+1).toString()+".");d.settingEl.style.paddingLeft="2em",d.addText(p=>{p.setPlaceholder("Property name").setValue(l.name).onChange(async g=>{l.name=g,await ke(e)})}).addSlider(p=>{p.setLimits(.1,5,.1).setValue(l.weight).setDynamicTooltip().onChange(async g=>{l.weight=g,await ke(e)})}).addButton(p=>{p.setButtonText("Remove"),p.onClick(async()=>{t.weightCustomProperties.splice(o,1),await ke(e),n()})})}new Fn.Setting(r).addButton(o=>{o.setButtonText("Add a new property"),o.onClick(l=>{t.weightCustomProperties.push({name:"",weight:1}),n()})}),new Fn.Setting(r).setName("Recency boost (experimental)").setDesc("Files that have been modified more recently than [selected cutoff] are given a higher rank.").addDropdown(o=>o.addOptions({["0"]:"Disabled",["1"]:"24 hours",["2"]:"7 days",["3"]:"30 days"}).setValue(t.recencyBoost).onChange(async l=>{t.recencyBoost=l,await ke(e)}))}var Fn,Sy=v(()=>{Fn=require("obsidian");Ao();mr();en()});function Cy(e,t,r){Ds.Platform.isMobile||(new Ds.Setting(r).setName("API Access Through HTTP").setHeading().setDesc(ar('Omnisearch can be used through a simple HTTP server (<a href="https://publish.obsidian.md/omnisearch/Public+API+%26+URL+Scheme#HTTP+Server">more information</a>).')),new Ds.Setting(r).setName("Enable the HTTP server").addToggle(n=>n.setValue(t.httpApiEnabled).onChange(async i=>{t.httpApiEnabled=i,i?e.apiHttpServer.listen(t.httpApiPort):e.apiHttpServer.close(),await ke(e)})),new Ds.Setting(r).setName("HTTP Port").addText(n=>{n.setValue(t.httpApiPort).setPlaceholder("51361").onChange(async i=>{parseInt(i)>65535&&(i=t.httpApiPort,n.setValue(t.httpApiPort)),t.httpApiPort=i,t.httpApiEnabled&&(e.apiHttpServer.close(),e.apiHttpServer.listen(t.httpApiPort)),await ke(e)})}),new Ds.Setting(r).setName("Show a notification when the server starts").setDesc("Will display a notification if the server is enabled, at Obsidian startup.").addToggle(n=>n.setValue(t.httpApiNotice).onChange(async i=>{t.httpApiNotice=i,await ke(e)})))}var Ds,Iy=v(()=>{Ds=require("obsidian");mr();mr()});function Ny(e,t,r){let n=e.database;new wi.Setting(r).setName("Danger Zone").setHeading(),new wi.Setting(r).setName("Ignore diacritics").setDesc(ar(`Normalize diacritics in search terms. Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky".<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">You probably should <strong>NOT</strong> disable this.</span><br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${yo}`)).addToggle(a=>a.setValue(t.ignoreDiacritics).onChange(async o=>{await n.clearCache(),t.ignoreDiacritics=o,await ke(e)})),new wi.Setting(r).setName("Ignore Arabic diacritics (beta)").addToggle(a=>a.setValue(t.ignoreArabicDiacritics).onChange(async o=>{await n.clearCache(),t.ignoreArabicDiacritics=o,await ke(e)}));let i=new DocumentFragment;i.createSpan({},a=>{a.innerHTML=`Disable Omnisearch on this device only.<br>
${yo}`}),new wi.Setting(r).setName("Disable on this device").setDesc(i).addToggle(a=>a.setValue(If(e.app)).onChange(async o=>{o?(e.app.saveLocalStorage(Ss,"1"),new wi.Notice("Omnisearch - Disabled. Please restart Obsidian.")):(e.app.saveLocalStorage(Ss),new wi.Notice("Omnisearch - Enabled. Please restart Obsidian."))})),new wi.Setting(r).setName("Force save the cache").setDesc(ar(`Omnisearch has a security feature that automatically disables cache writing if it cannot fully perform the operation.<br>
Use this option to force the cache to be saved, even if it causes a crash.<br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Enabling this setting could lead to crash loops</span>`)).addToggle(a=>a.setValue(t.DANGER_forceSaveCache).onChange(async o=>{t.DANGER_forceSaveCache=o,await ke(e)})),Qi()&&new wi.Setting(r).setName("Clear cache data").setDesc(ar(`Erase all Omnisearch cache data.
Use this if Omnisearch results are inconsistent, missing, or appear outdated.<br>
${yo}`)).addButton(a=>{a.setButtonText("Clear cache"),a.onClick(async()=>{await n.clearCache()})})}var wi,Oy=v(()=>{wi=require("obsidian");mr();mr();mr();en()});function Dc(e){return{useCache:!0,hideExcluded:!1,recencyBoost:"0",downrankedFoldersFilters:[],ignoreDiacritics:!0,ignoreArabicDiacritics:!1,indexedFileTypes:[],displayTitle:"",PDFIndexing:!1,officeIndexing:!1,imagesIndexing:!1,aiImageIndexing:!1,unsupportedFilesIndexing:"default",splitCamelCase:!1,openInNewPane:!1,vimLikeNavigationShortcut:e.vault.getConfig("vimMode"),ribbonIcon:!0,showExcerpt:!0,maxEmbeds:5,renderLineReturnInExcerpts:!0,showCreateButton:!1,highlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,tokenizeUrls:!1,fuzziness:"1",weightBasename:10,weightDirectory:7,weightH1:6,weightH2:5,weightH3:4,weightUnmarkedTags:2,weightCustomProperties:[],httpApiEnabled:!1,httpApiPort:"51361",httpApiNotice:!0,welcomeMessage:"",verboseLogging:!1,DANGER_httpHost:null,DANGER_forceSaveCache:!1}}async function Dy(e){return Or=Object.assign({},Dc(e.app),await e.loadData()),Fa.set(Or.showExcerpt),wm(Or.verboseLogging),Or}var kc,Fa,nd,Or,Ao=v(()=>{kc=require("obsidian");bm();en();Nr();Ey();mr();Ty();yy();Sy();Iy();Oy();Fa=xo(!1),nd=class extends kc.PluginSettingTab{constructor(r){super(r.app,r);this.plugin=r,Fa.subscribe(async n=>{Or.showExcerpt=n,await ke(this.plugin)})}display(){let{containerEl:r}=this,n=this.plugin.database;if(r.empty(),this.app.loadLocalStorage(Ss)=="1"){let a=r.createEl("span");a.innerHTML='<strong style="color: var(--text-accent)">\u26A0\uFE0F OMNISEARCH IS DISABLED \u26A0\uFE0F</strong>'}r.createEl("h1",{text:"Omnisearch"});let i=r.createDiv();i.innerHTML=`
<iframe sandbox="allow-top-navigation-by-user-activation" src="https://github.com/sponsors/scambier/button" title="Sponsor scambier" height="35" width="116" style="border: 0;"></iframe>
<a href='https://ko-fi.com/B0B6LQ2C' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
`,by(this.plugin,Or,r),r.createEl("hr"),vy(this.plugin,Or,r),r.createEl("hr"),xy(this.plugin,Or,r),r.createEl("hr"),wy(this.plugin,Or,r,this.display),r.createEl("hr"),Cy(this.plugin,Or,r),r.createEl("hr"),Ny(this.plugin,Or,r),r.createEl("hr"),new kc.Setting(r).setName("Debugging").setHeading(),new kc.Setting(r).setName("Enable verbose logging").setDesc('Adds a LOT of logs for debugging purposes. You also need to enable "Verbose" logging in the console to see these logs.').addToggle(a=>a.setValue(Or.verboseLogging).onChange(async o=>{Or.verboseLogging=o,wm(o),await ke(this.plugin)}))}}});function i0(e){var t=g6();we(e,t)}var g6,ky=v(()=>{Wn();yi();Pn();g6=Le('<span class="suggestion-flair" aria-label="Not created yet, select to create"><svg viewBox="0 0 100 100" class="add-note-glyph" width="16" height="16"><path fill="currentColor" stroke="currentColor" d="M23.3,6.7c-3.7,0-6.7,3-6.7,6.7v73.3c0,3.7,3,6.7,6.7,6.7h28.4c-3.2-4.8-5.1-10.5-5.1-16.7c0-16.6,13.4-30,30-30 c2.3,0,4.5,0.3,6.7,0.8V31.7c0-0.9-0.3-1.7-1-2.4L60.7,7.6c-0.6-0.6-1.5-1-2.4-1L23.3,6.7z M56.7,13L77,33.3H60 c-1.8,0-3.3-1.5-3.3-3.3L56.7,13z M76.7,53.3c-12.9,0-23.3,10.4-23.3,23.3S63.8,100,76.7,100S100,89.6,100,76.7 S89.6,53.3,76.7,53.3z M76.7,63.3c1.8,0,3.3,1.5,3.3,3.3v6.7h6.7c1.8,0,3.3,1.5,3.3,3.3c0,1.8-1.5,3.3-3.3,3.3H80v6.7 c0,1.8-1.5,3.3-3.3,3.3c-1.8,0-3.3-1.5-3.3-3.3V80h-6.7c-1.8,0-3.3-1.5-3.3-3.3s1.5-3.3,3.3-3.3h6.7v-6.7 C73.3,64.8,74.8,63.3,76.7,63.3L76.7,63.3z"></path></svg></span>')});function Rc(e,t){let r=ze(t,"id",8),n=ze(t,"selected",8,!1),i=ze(t,"glyph",8,!1),a=ze(t,"cssClass",8,"");var o=_6();let l;var d=xe(o);{var p=E=>{i0(E,{})};tt(d,E=>{i()&&E(p)})}var g=Ye(d,2);zi(g,t,"default",{},null),Te(o),rr(E=>{Ki(o,"data-result-id",r()),l=Yi(o,1,`suggestion-item omnisearch-result ${a()??""}`,null,l,E)},[()=>({"is-selected":n()})],Br),pr("mousemove",o,function(E){Jr.call(this,t,E)}),pr("click",o,function(E){Jr.call(this,t,E)}),pr("keypress",o,function(E){Jr.call(this,t,E)}),pr("auxclick",o,function(E){Jr.call(this,t,E)}),we(e,o)}var _6,a0=v(()=>{Wn();yi();Pn();ky();_6=Le("<div><!> <!></div>")});function ad(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}var Ry,id,s0=v(()=>{en();Nr();Ry=require("obsidian");Oc();id=class{constructor(t){this.plugin=t}highlightText(t,r){let n=`suggestion-highlight omnisearch-highlight ${this.plugin.settings.highlight?"omnisearch-default-highlight":""}`;if(!r.length)return t;try{return t.replace(new RegExp(`(${r.map(i=>Nc(i.match)).join("|")})`,"giu"),`<span class="${n}">$1</span>`)}catch(i){return console.error("Omnisearch - Error in highlightText()",i),t}}stringsToRegex(t){if(!t.length)return/^$/g;t.sort((n,i)=>i.length-n.length);let r=`(${t.map(n=>`\\b${Nc(n)}\\b|${Nc(n)}`).join("|")})`;return new RegExp(`${r}`,"gui")}getMatches(t,r,n){r=r.map(ad);let i=this.stringsToRegex(r),a=t;this.plugin.settings.ignoreDiacritics&&(t=Wi(t,this.plugin.settings.ignoreArabicDiacritics));let o=new Date().getTime(),l=null,d=[],p=0;for(;(l=i.exec(t))!==null;){if(++p>=100||new Date().getTime()-o>50){Gi("Stopped getMatches at",p,"results");break}let g=l.index,E=g+l[0].length,_=a.substring(g,E).trim();_&&l.index>=0&&d.push({match:_,offset:l.index})}if(n&&(n.query.text.length>1||n.getExactTerms().length>0)){let g=t.indexOf(n.getBestStringForExcerpt());g>-1&&d.find(E=>E.offset===g)&&d.unshift({offset:g,match:n.getBestStringForExcerpt()})}return d}makeExcerpt(t,r){let n=this.plugin.settings;try{let i=r??-1,a=Math.max(0,i-iv),o=Math.min(t.length,i+uc);if(i>-1?t=(a>0?"\u2026":"")+t.slice(a,o).trim()+(o<t.length-1?"\u2026":""):t=t.slice(0,uc),n.renderLineReturnInExcerpts){let l=new RegExp(/(?:\r\n|\r|\n)/g);t=t.split(l).filter(p=>p).join(`
`);let d=t.lastIndexOf(`
`,i-a);d>0&&(t=t.slice(d))}return t=ad(t),n.renderLineReturnInExcerpts&&(t=t.trim().replaceAll(`
`,"<br>")),t}catch(i){return new Ry.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(i),""}}}});async function Ly(e){let t=e.app;if(!t.plugins.getPlugin("obsidian-icon-folder"))return{};let n=`${t.vault.configDir}/plugins/obsidian-icon-folder/data.json`;try{let i=await t.vault.adapter.read(n),a=JSON.parse(i),o={};for(let l in a){let d=(0,Vo.normalizePath)(l);o[d]=a[l]}return o}catch(i){return Gi("Failed to read data.json:",i),{}}}async function Py(e){let t={Li:"lucide-icons"},r="icons",n=e.app,i=n.plugins.getPlugin("obsidian-icon-folder");if(i){r=i.settings?.iconPacksPath||"icons";let o=`${n.vault.configDir}/${r}`;try{let l=await n.vault.adapter.list(o);if(l.folders&&l.folders.length>0)for(let d of l.folders){let p=d.split("/"),g=p[p.length-1],E=b6(g);t[E]=g}}catch(l){Gi("Failed to list icon packs:",l)}}return{prefixToIconPack:t,iconsPath:r}}function b6(e){if(e.includes("-")){let t=e.split("-"),r=t[0].charAt(0).toUpperCase();for(let n=1;n<t.length;n++)r+=t[n].charAt(0).toLowerCase();return r}return e.charAt(0).toUpperCase()+e.charAt(1).toLowerCase()}function o0(e,t){let r=(0,Vo.normalizePath)(e),n=t[r];if(n){if(typeof n=="string")return n;if(typeof n=="object"&&n.iconName)return n.iconName}return null}function E6(e){let t=e.match(/^[A-Z][a-z]*/);if(t){let r=t[0],n=e.substring(r.length);return{prefix:r,name:n}}else return{prefix:"",name:e}}async function u0(e,t,r,n){let i=E6(e),{prefix:a,name:o}=i;if(!a)return`<span class="omnisearch-result__icon--emoji">${ad(o)}</span>`;let l=n[a];if(!l)return Gi(`No icon pack found for prefix: ${a}`),null;if(l==="lucide-icons"){let d=o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=(0,Vo.getIcon)(d);return p?p.outerHTML:(Gi(`Lucide icon not found: ${d}`),null)}else{if(!r)return Gi("Icons path is not set. Cannot load icon SVG."),null;let d=`${t.app.vault.configDir}/${r}/${l}/${o}.svg`;try{return await t.app.vault.adapter.read(d)}catch(p){return Gi(`Failed to load icon SVG for ${e} at ${d}:`,p),null}}}function c0(e,t){let r="file";Mn(e)?r="image":ti(e)?r="file-text":(Ai(e)||fc(e))&&(r="layout-dashboard");let n=(0,Vo.getIcon)(r);return n?n.outerHTML:""}var Vo,My=v(()=>{Vo=require("obsidian");Nr();s0()});function l0(e,t){dr(t,!1);let[r,n]=oc(),i=()=>sc(Fa,"$showExcerpt",r),a=ft(),o=ft(),l=ft(),d=ft(),p=ze(t,"selected",8,!1),g=ze(t,"note",8),E=ze(t,"plugin",8),_=ft(null),y=ft(""),C=ft(""),k={},P=ft(null),N=ft(null),L={},H,R=ft(!1);As(async()=>{k=await Ly(E());let qe=await Py(E());L=qe.prefixToIconPack,H=qe.iconsPath,oe(R,!0)});async function B(){let qe=o0(q(C),k);qe?oe(P,await u0(qe,E(),H,L)):oe(P,c0("folder",E()));let St=o0(g().path,k);St?oe(N,await u0(St,E(),H,L)):oe(N,c0(g().path,E()))}function V(qe,St){return qe.innerHTML=St,{update(Dt){qe.innerHTML=Dt},destroy(){qe.innerHTML=""}}}let X=null,ce=null,ve=ft(null);Qt(()=>(vt(g()),q(R),lc),()=>{g()&&g().path&&q(R)&&(async()=>(oe(y,g().displayTitle||g().basename),oe(C,lc(g().path)),await B()))()}),Qt(()=>(Mn,vt(g()),vt(E()),oi.TFile),()=>{if(oe(_,null),Mn(g().path)){let qe=E().app.vault.getAbstractFileByPath(g().path);qe instanceof oi.TFile&&oe(_,E().app.vault.getResourcePath(qe))}}),Qt(()=>(vt(g()),lc,oi.setIcon,Mn,ti,Ai,fc,q(ve)),()=>{oe(y,g().displayTitle||g().basename),oe(C,lc(g().path)),X&&(0,oi.setIcon)(X,"folder-open"),ce&&(Mn(g().path)?(0,oi.setIcon)(ce,"image"):ti(g().path)?(0,oi.setIcon)(ce,"file-text"):Ai(g().path)||fc(g().path)?(0,oi.setIcon)(ce,"layout-dashboard"):(0,oi.setIcon)(ce,"file")),q(ve)&&(0,oi.setIcon)(q(ve),"corner-down-right")}),Qt(()=>(vt(E()),q(y),vt(g())),()=>{oe(a,E().textProcessor.getMatches(q(y),g().foundWords))}),Qt(()=>(vt(E()),q(C),vt(g())),()=>{oe(o,E().textProcessor.getMatches(q(C),g().foundWords))}),Qt(()=>(vt(E()),vt(g())),()=>{oe(l,E().textProcessor.makeExcerpt(g().content,g().matches[0]?.offset??-1))}),Qt(()=>{},()=>{oe(d,!1)}),Jn(),En();let Re=Br(()=>g().isEmbed?"omnisearch-result__embed":"");Rc(e,{get glyph(){return q(d)},get id(){return g().path},get cssClass(){return` ${q(Re)??""}`},get selected(){return p()},$$events:{auxclick(qe){Jr.call(this,t,qe)},click(qe){Jr.call(this,t,qe)},mousemove(qe){Jr.call(this,t,qe)}},children:(qe,St)=>{var Dt=N6(),Se=xe(Dt),et=xe(Se),je=xe(et);{var lt=rt=>{var ct=v6();ys(ct,Xt=>oe(ve,Xt),()=>q(ve)),we(rt,ct)},F=rt=>{var ct=qi(),Xt=Sr(ct);{var Er=Pr=>{var zr=T6();wa(zr,(Ct,$t)=>V?.(Ct,$t),()=>q(N)),we(Pr,zr)};tt(Xt,Pr=>{q(N)&&Pr(Er)})}we(rt,ct)};tt(je,rt=>{g().isEmbed?rt(lt):rt(F,!1)})}var K=Ye(je,2),te=xe(K);Ts(te,()=>E().textProcessor.highlightText(q(y),q(a)),!1,!1),Te(K);var fe=Ye(K,2);{var Fe=rt=>{var ct=x6(),Xt=xe(ct);Te(ct),rr(Er=>ir(Xt,`.${Er??""}`),[()=>Cs(g().path)],Br),we(rt,ct)};tt(fe,rt=>{g().displayTitle||rt(Fe)})}var Je=Ye(fe,2);{var Ue=rt=>{var ct=y6(),Xt=xe(ct);Te(ct),rr(()=>ir(Xt,`${g().matches.length??""}\xA0${(g().matches.length>1?"matches":"match")??""}`)),we(rt,ct)};tt(Je,rt=>{g().matches.length>0&&rt(Ue)})}Te(et),Te(Se);var ot=Ye(SLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Je=!0,Ue=!1,ot;return{s:function(){te=te.call(F)},n:function(){var _t=te.next();return Je=_t.done,_t},e:function(_t){Ue=!0,ot=_t},f:function(){try{!Je&&te.return!=null&&te.return()}finally{if(Ue)throw ot}}}}function p(F,K){if(F){if(typeof F=="string")return g(F,K);var te=Object.prototype.toString.call(F).slice(8,-1);if(te==="Object"&&F.constructor&&(te=F.constructor.name),te==="Map"||te==="Set")return Array.from(F);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return g(F,K)}}function g(F,K){(K==null||K>F.length)&&(K=F.length);for(var te=0,fe=new Array(K);te<K;te++)fe[te]=F[te];return fe}function E(F,K){if(!(F instanceof K))throw new TypeError("Cannot call a class as a function")}function _(F,K){for(var te=0;te<K.length;te++){var fe=K[te];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(F,fe.key,fe)}}function y(F,K,te){return K&&_(F.prototype,K),te&&_(F,te),Object.defineProperty(F,"prototype",{writable:!1}),F}function C(F,K,te){return K in F?Object.defineProperty(F,K,{value:te,enumerable:!0,configurable:!0,writable:!0}):F[K]=te,F}function k(F,K,te){P(F,K),K.set(F,te)}function P(F,K){if(K.has(F))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(F,K){var te=R(F,K,"get");return L(F,te)}function L(F,K){return K.get?K.get.call(F):K.value}function H(F,K,te){var fe=R(F,K,"set");return B(F,fe,te),te}function R(F,K,te){if(!K.has(F))throw new TypeError("attempted to "+te+" private field on non-instance");return K.get(F)}function B(F,K,te){if(K.set)K.set.call(F,te);else{if(!K.writable)throw new TypeError("attempted to set read only private field");K.value=te}}var V=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",X=new WeakMap,ce=new WeakMap,ve=function(){function F(K){var te=K.executor,fe=te===void 0?function(){}:te,Fe=K.internals,Je=Fe===void 0?lt():Fe,Ue=K.promise,ot=Ue===void 0?new Promise(function(ut,_t){return fe(ut,_t,function(qr){Je.onCancelList.push(qr)})}):Ue;E(this,F),k(this,X,{writable:!0,value:void 0}),k(this,ce,{writable:!0,value:void 0}),C(this,V,"CancelablePromise"),this.cancel=this.cancel.bind(this),H(this,X,Je),H(this,ce,ot||new Promise(function(ut,_t){return fe(ut,_t,function(qr){Je.onCancelList.push(qr)})}))}return y(F,[{key:"then",value:function(te,fe){return et(N(this,ce).then(Se(te,N(this,X)),Se(fe,N(this,X))),N(this,X))}},{key:"catch",value:function(te){return et(N(this,ce).catch(Se(te,N(this,X))),N(this,X))}},{key:"finally",value:function(te,fe){var Fe=this;return fe&&N(this,X).onCancelList.push(te),et(N(this,ce).finally(Se(function(){if(te)return fe&&(N(Fe,X).onCancelList=N(Fe,X).onCancelList.filter(function(Je){return Je!==te})),te()},N(this,X))),N(this,X))}},{key:"cancel",value:function(){N(this,X).isCanceled=!0;var te=N(this,X).onCancelList;N(this,X).onCancelList=[];var fe=d(te),Fe;try{for(fe.s();!(Fe=fe.n()).done;){var Je=Fe.value;if(typeof Je=="function")try{Je()}catch(Ue){console.error(Ue)}}}catch(Ue){fe.e(Ue)}finally{fe.f()}}},{key:"isCanceled",value:function(){return N(this,X).isCanceled===!0}}]),F}(),Re=function(F){t(te,F);var K=n(te);function te(fe){return E(this,te),K.call(this,{executor:fe})}return y(te)}(ve);e.CancelablePromise=Re,C(Re,"all",function(K){return je(K,Promise.all(K))}),C(Re,"allSettled",function(K){return je(K,Promise.allSettled(K))}),C(Re,"any",function(K){return je(K,Promise.any(K))}),C(Re,"race",function(K){return je(K,Promise.race(K))}),C(Re,"resolve",function(K){return St(Promise.resolve(K))}),C(Re,"reject",function(K){return St(Promise.reject(K))}),C(Re,"isCancelable",Dt);var qe=Re;e.default=qe;function St(F){return et(F,lt())}function Dt(F){return F instanceof Re||F instanceof ve}function Se(F,K){if(F)return function(te){if(!K.isCanceled){var fe=F(te);return Dt(fe)&&K.onCancelList.push(fe.cancel),fe}return te}}function et(F,K){return new ve({internals:K,promise:F})}function je(F,K){var te=lt();return te.onCancelList.push(function(){var fe=d(F),Fe;try{for(fe.s();!(Fe=fe.n()).done;){var Je=Fe.value;Dt(Je)&&Je.cancel()}}catch(Ue){fe.e(Ue)}finally{fe.f()}}),new ve({internals:te,promise:K})}function lt(){return{isCanceled:!1,onCancelList:[]}}})});function qy(e,{delay:t=0,duration:r=400,easing:n=O6}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:n,css:a=>`opacity: ${a*i}`}}var O6,zy=v(()=>{mt();Wr();O6=e=>e});function cd(e,t){dr(t,!1);let r=ze(t,"placeholder",8,null),n=ze(t,"placeholderProps",8,null),i="svelte-lazy-placeholder";En();var a=qi(),o=Sr(a);{var l=d=>{var p=k6();Yi(p,1,xs(i));var g=xe(p);{var E=y=>{var C=D6(),k=xe(C,!0);Te(C),rr(()=>ir(k,r())),we(y,C)},_=(y,C)=>{{var k=P=>{var N=qi(),L=Sr(N);Gp(L,r,(H,R)=>{R(H,mm(n))}),we(P,N)};tt(y,P=>{["function","object"].includes(typeof r())&&P(k)},C)}};tt(g,y=>{typeof r()=="string"?y(E):y(_,!1)})}Te(p),we(d,p)};tt(o,d=>{r()&&d(l)})}we(e,a),hr()}var D6,k6,Yy=v(()=>{Wn();yi() Line truncated
characters.</span>`,1),U6=Le("We found 0 results for your search here. <!>",1),V6=Le('<!> <div style="text-align: center;"><!></div>',1),q6=Le('<!> <!> <!> <div class="prompt-instructions"><div class="prompt-instruction"><span class="prompt-instruction-command">\u2191\u2193</span><span>to navigate</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to cycle history</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Tab</span> <span>to switch to In-File Search</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"></span> <span>to open in a new split</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in the background</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to insert a link</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to toggle excerpts</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Esc</span><span>to close</span></div></div>',1)});function m0(e,t){dr(t,!1);let r=ft(),n=ze(t,"plugin",8),i=ze(t,"offset",8),a=ze(t,"note",8),o=ze(t,"index",8,0),l=ze(t,"selected",8,!1);Qt(()=>(vt(n()),vt(a()),vt(i())),()=>{oe(r,n().textProcessor.makeExcerpt(a()?.content??"",i()))}),Jn(),En();let d=Br(()=>o().toString());Rc(e,{get id(){return q(d)},get selected(){return l()},$$events:{auxclick(p){Jr.call(this,t,p)},click(p){Jr.call(this,t,p)},mousemove(p){Jr.call(this,t,p)}},children:(p,g)=>{var E=z6(),_=xe(E);Ts(_,()=>n().textProcessor.highlightText(q(r),a().matches),!1,!1),Te(E),we(p,E)},$$slots:{default:!0}}),hr()}var z6,Qy=v(()=>{Wn();yi();Pn();a0();z6=Le('<div class="omnisearch-result__body"><!></div>')});function g0(e,t){dr(t,!1);let r=ze(t,"plugin",8),n=ze(t,"modal",8),i=ze(t,"parent",8,null),a=ze(t,"singleFilePath",8,""),o=ze(t,"previousQuery",8),l=ft(),d=ft([]),p=ft(0),g=ft(),E=ft();As(()=>{Me.enable("infile"),Me.on("infile","enter",N),Me.on("infile","open-in-new-pane",P),Me.on("infile","arrow-up",()=>C(-1)),Me.on("infile","arrow-down",()=>C(1)),Me.on("infile","tab",L)}),mf(()=>{Me.disable("infile")});function _(Se){let et=[],je=-1,lt=0;for(;++lt<100;){let F=y(Se,je,uc);if(!F.length)break;je=F.last().offset,et.push(F)}return et}function y(Se,et,je){let lt=Se.find(F=>F.offset>et);return lt?Se.filter(F=>F.offset>et&&F.offset<=lt.offset+je):[]}function C(Se){oe(p,wf(q(p)+Se,q(d).length)),k()}async function k(){await Ei(),document.querySelector(`[data-result-id="${q(p)}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function P(){return N(!0)}async function N(Se=!1){if(q(g)){n().close(),i()&&i().close();let et=r().textProcessor.stringsToRegex(q(g).foundWords);et.exec(q(g).content),await Cf(r().app,q(g),et.lastIndex,Se);let je=r().app.workspace.getActiveViewOfType(ld.MarkdownView);if(!je)return;let lt=q(d)[q(p)]??0,F=je.editor.offsetToPos(lt);F.ch=0,je.editor.setCursor(F),je.editor.scrollIntoView({from:{line:F.line-10,ch:0},to:{line:F.line+10,ch:0}})}}function L(){new ta(r(),q(l)??o()).open(),n().close()}Qt(()=>vt(o()),()=>{oe(l,o()??"")}),Qt(()=>(q(l),q(E),ea,vt(r()),vt(a())),()=>{(async()=>(q(l)&&(oe(E,new ea(q(l),{ignoreDiacritics:r().settings.ignoreDiacritics,ignoreArabicDiacritics:r().settings.ignoreArabicDiacritics})),oe(g,(await r().searchEngine.getSuggestions(q(E),{singleFilePath:a()}))[0]??null)),oe(p,0),await k()))()}),Qt(()=>(q(g),q(E)),()=>{if(q(g)){let Se=_(q(g).matches),et=q(E).getExactTerms();et.length&&(Se=Se.filter(je=>et.every(lt=>je.some(F=>F.match.includes(lt))))),oe(d,Se.map(je=>Math.round(je.first().offset)))}}),Jn(),En();var H=Q6(),R=Sr(H);mc(R,{get plugin(){return r()},placeholder:"Omnisearch - File",get initialValue(){return o()},$$events:{input:Se=>oe(l,Se.detail)},children:(Se,et)=>{var je=K6(),lt=xe(je);{var F=K=>{var te=Y6();pr("click",te,L),we(K,te)};tt(lt,K=>{ld.Platform.isMobile&&K(F)})}Te(je),we(Se,je)},$$slots:{default:!0}});var B=Ye(R,2);gc(B,{children:(Se,et)=>{var je=qi(),lt=Sr(je);{var F=te=>{var fe=qi(),Fe=Sr(fe);rc(Fe,1,()=>q(d),tc,(Je,Ue,ot)=>{let ut=Br(()=>ot===q(p));m0(Je,{get plugin(){return r()},get offset(){return q(Ue)},get note(){return q(g)},index:ot,get selected(){return q(ut)},$$events:{mousemove:_t=>oe(p,ot),click:_t=>N(_t.ctrlKey),auxclick:_t=>{_t.button==1&&N(!0)}}})}),we(te,fe)},K=te=>{var fe=j6();we(te,fe)};tt(lt,te=>{q(d).length&&q(g)?te(F):te(K,!1)})}we(Se,je)},$$Line truncated
`)}function zr(s,u,f,h){this.failures=u,this.failedKeys=h,this.successCount=f,this.message=Pr(s,u)}C(zr).from(Er);function Ct(s,u){this.name="BulkError",this.failures=Object.keys(u).map(function(f){return u[f]}),this.failuresByPos=u,this.message=Pr(s,this.failures)}C(Ct).from(Er);var $t=ct.reduce(function(s,u){return s[u]=u+"Error",s},{}),Di=Er,me=ct.reduce(function(s,u){var f=u+"Error";function h(m,b){this.name=f,m?typeof m=="string"?(this.message="".concat(m).concat(b?`
`+b:""),this.inner=b||null):typeof m=="object"&&(this.message="".concat(m.name," ").concat(m.message),this.inner=m):(this.message=Xt[u]||f,this.inner=null)}return C(h).from(Di),s[u]=h,s},{});me.Syntax=SyntaxError,me.Type=TypeError,me.Range=RangeError;var gu=rt.reduce(function(s,u){return s[u+"Error"]=me[u],s},{});function Ih(s,u){if(!s||s instanceof Er||s instanceof TypeError||s instanceof SyntaxError||!s.name||!gu[s.name])return s;var f=new gu[s.name](u||s.message,s);return"stack"in s&&y(f,"stack",{get:function(){return this.inner.stack}}),f}var ca=ct.reduce(function(s,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(s[u+"Error"]=me[u]),s},{});ca.ModifyError=zr,ca.DexieError=Er,ca.BulkError=Ct;function nt(){}function Qa(s){return s}function _u(s,u){return s==null||s===Qa?u:function(f){return u(s(f))}}function fi(s,u){return function(){s.apply(this,arguments),u.apply(this,arguments)}}function Nh(s,u){return s===nt?u:function(){var f=s.apply(this,arguments);f!==void 0&&(arguments[0]=f);var h=this.onsuccess,m=this.onerror;this.onsuccess=null,this.onerror=null;var b=u.apply(this,arguments);return h&&(this.onsuccess=this.onsuccess?fi(h,this.onsuccess):h),m&&(this.onerror=this.onerror?fi(m,this.onerror):m),b!==void 0?b:f}}function bu(s,u){return s===nt?u:function(){s.apply(this,arguments);var f=this.onsuccess,h=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),f&&(this.onsuccess=this.onsuccess?fi(f,this.onsuccess):f),h&&(this.onerror=this.onerror?fi(h,this.onerror):h)}}function bl(s,u){return s===nt?u:function(f){var h=s.apply(this,arguments);l(f,h);var m=this.onsuccess,b=this.onerror;this.onsuccess=null,this.onerror=null;var T=u.apply(this,arguments);return m&&(this.onsuccess=this.onsuccess?fi(m,this.onsuccess):m),b&&(this.onerror=this.onerror?fi(b,this.onerror):b),h===void 0?T===void 0?void 0:T:l(h,T)}}function Oh(s,u){return s===nt?u:function(){return u.apply(this,arguments)===!1?!1:s.apply(this,arguments)}}function Ks(s,u){return s===nt?u:function(){var f=s.apply(this,arguments);if(f&&typeof f.then=="function"){for(var h=this,m=arguments.length,b=new Array(m);m--;)b[m]=arguments[m];return f.then(function(){return u.apply(h,b)})}return u.apply(this,arguments)}}var on=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function El(s,u){on=s}var Ne={},kt=100,Rt=typeof Promise>"u"?[]:function(){var s=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[s,d(s),s];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,d(u),s]}(),ur=Rt[0],Sn=Rt[1],ki=Rt[2],Eu=Sn&&Sn.then,cr=ur&&ur.constructor,Zt=!!ki;function la(){queueMicrotask(jS)}var Cn=function(s,u){vu.push([s,u]),Kn&&(la(),Kn=!1)},Yn=!0,Kn=!0,un=[],Xa=[],Dh=Qa,fa={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nt,pgp:!1,env:{},finalize:nt},be=fa,vu=[],Za=0,vl=[];function de(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=be;if(typeof s!="function"){if(s!==Ne)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Rh(this,this._value);return}this._state=null,this._value=null,++u.ref,s_(this,s)}var kh={get:function(){var s=be,u=Al;function f(h,m){var b=this,T=!s.global&&(s!==be||u!==Al),A=T&&!ha(),S=new de(function(O,$){Lh(b,new a_(c_(h,s,T,A),c_(m,s,T,A),O,$,s))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return f.prototype=Ne,f},set:function(s){y(this,"then",s&&s.prototype===Ne?kh:{get:function(){return s},set:kh.set})}};E(de.prototype,{then:kh,_then:function(s,u){Lh(this,new a_(null,null,s,u,be))},catch:function(s){if(arguments.length===1)return this.then(null,s);var u=arguments[0],f=arguments[1];return typeof u=="function"?this.then(null,function(h){return h instanceof u?f(h):Tl(h)}):this.then(null,function(h){return h&&h.name===u?f(h):Tl(h)})},finally:function(s){return this.then(function(u){return de.resolve(s()).then(function(){return u})},function(u){return de.resolve(s()).then(function(){return Tl(u)})})},timeout:function(s,u){var f=this;return s<1/0?new de(function(h,m){var b=setTimeout(function(){return m(new me.Timeout(u))},s);f.then(h,m).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&y(de.prototype,Symbol.toStringTag,"Dexie.Promise"),fa.env=u_();function a_(s,u,f,h,m){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof u=="function"?u:null,this.resolve=f,this.reject=h,this.psd=m}E(de,{all:function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.length===0&&u([]);var h=s.length;s.forEach(function(m,b){return de.resolve(m).then(function(T){s[b]=T,--h||u(s)},f)})})},resolve:function(s){if(s instanceof de)return s;if(s&&typeof s.then=="function")return new de(function(f,h){s.then(f,h)});var u=new de(Ne,!0,s);return u},reject:Tl,race:function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.map(function(h){return de Line truncated
`).map(i=>{let a=i.match(/^\s+/);if(a===null)return i;let[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(`
`)}var Rs=class{options;rules;lexer;constructor(t){this.options=t||Tt.defaults}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:vd(n,`
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=gR(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=vd(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=r[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
$1`);n=vd(n.replace(/^ *>[ \t]?/gm,""),`
`);let i=this.lexer.state.top;this.lexer.state.top=!0;let a=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:r[0],tokens:a,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),l="",d="",p=!1;for(;t;){let g=!1;if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let E=r[2].split(`
`,1)[0].replace(/^\t+/,N=>" ".repeat(3*N.length)),_=t.split(`
`,1)[0],y=0;this.options.pedantic?(y=2,d=E.trimStart()):(y=r[2].search(/[^ ]/),y=y>4?1:y,d=E.slice(y),y+=r[1].length);let C=!1;if(!E&&/^ *$/.test(_)&&(l+=_+`
`,t=t.substring(_.length+1),g=!0),!g){let N=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),L=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),H=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),R=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){let B=t.split(`
`,1)[0];if(_=B,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),H.test(_)||R.test(_)||N.test(_)||L.test(t))break;if(_.search(/[^ ]/)>=y||!_.trim())d+=`
`+_.slice(y);else{if(C||E.search(/[^ ]/)>=4||H.test(E)||R.test(E)||L.test(E))break;d+=`
`+_}!C&&!_.trim()&&(C=!0),l+=B+`
`,t=t.substring(B.length+1),E=_.slice(y)}}a.loose||(p?a.loose=!0:/\n *\n *$/.test(l)&&(p=!0));let k=null,P;this.options.gfm&&(k=/^\[[ xX]\] /.exec(d),k&&(P=k[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:l,task:!!k,checked:P,loose:!1,text:d,tokens:[]}),a.raw+=l}a.items[a.items.length-1].raw=l.trimEnd(),a.items[a.items.length-1].text=d.trimEnd(),a.raw=a.raw.trimEnd();for(let g=0;g<a.items.length;g++)if(this.lexer.state.top=!1,a.items[g].tokens=this.lexer.blockTokens(a.items[g].text,[]),!a.loose){let E=a.items[g].tokens.filter(y=>y.type==="space"),_=E.length>0&&E.some(y=>/\n.*\n/.test(y.raw));a.loose=_}if(a.loose)for(let g=0;g<a.items.length;g++)a.items[g].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(/\s+/g," "),i=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;let n=bA(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(`
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)/^ *-+: *$/.test(l)?o.align.push("right"):/^ *:-+: *$/.test(l)?o.align.push("center"):/^ *:-+ *$/.test(l)?o.align.push("left"):o.align.push(null);for(let l of n)o.header.push({text:l,tokens:this.lexer.inline(l)});for(let l of a)o.rows.push(bA(l,o.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:xn(r[1])}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let o=vd(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=mR(r[2],"()");if(o>-1){let d=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,d).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),EA(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return EA(n,a,n[0],this.lexer)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let o=[...i[0]].length-1,l,d,p=o,g=0,E=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,r=r.slice(-1*t.length+o);(i=E.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=[...l].length,i[3]||i[4]){p+=d;continue}else if((i[5]||i[6])&&o%3&&!((o+d)%3)){g+=d;continue}if(p-=d,p>0)continue;d=Math.min(d,d+p+g);let _=[...i[0]][0].length,y=t.slice(0,o+i.index+_+d);if(Math.min(o,d)%2){let k=y.slice(1,-1);return{type:"em",raw:y,text:k,tokens:this.lexer.inlineTokens(k)}}let C=y.slice(2,-2);return{type:"strong",raw:y,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=xn(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=xn(r[1]),i="mailto:"+n):(n=xn(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=xn(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=xn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=xn(r[0]),{type:"text",raw:r[0],text:n}}}},_R=/^(?: *(?:\n|$))+/,bR=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,ER=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AA=/(?:[*+-]|\d{1,9}[.)])/,wA=dt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,AA).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),k0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TR=/^[^\n]+/,R0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xR=dt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",R0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yR=dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AA).getRegex(),wd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|heaLine truncated
]`).replace("lheading",wA).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},CA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,IA=/^( {2,}|\\)\n(?!\s*$)/,NR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Hc="\\p{P}\\p{S}",OR=dt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Hc).getRegex(),DR=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,kR=dt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Hc).getRegex(),RR=dt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Hc).getRegex(),LR=dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Hc).getRegex(),PR=dt(/\\([punct])/,"gu").replace(/punct/g,Hc).getRegex(),MR=dt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),FR=dt(L0).replace("(?:-->|$)","-->").getRegex(),BR=dt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",FR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xd=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$R=dt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",xd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),NA=dt(/^!?\[(label)\]\[(ref)\]/).replace("label",xd).replace("ref",R0).getRegex(),OA=dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",R0).getRegex(),HR=dt("reflink|nolink(?!\\()","g").replace("reflink",NA).replace("nolink",OA).getRegex(),M0={_backpedal:Bc,anyPunctuation:PR,autolink:MR,blockSkip:DR,br:IA,code:IR,del:Bc,emStrongLDelim:kR,emStrongRDelimAst:RR,emStrongRDelimUnd:LR,escape:CA,link:$R,nolink:OA,punctuation:OR,reflink:NA,reflinkSearch:HR,tag:BR,text:NR,url:Bc},UR={...M0,link:dt(/^!?\[(label)\]\((.*?)\)/).replace("label",xd).getRegex(),reflink:dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xd).getRegex()},D0={...M0,escape:dt(CA).replace("])","~|])").getRegex(),url:dt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},VR={...D0,br:dt(IA).replace("{2,}","*").getRegex(),text:dt(D0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Td={normal:P0,gfm:SR,pedantic:CR},Fc={normal:M0,gfm:D0,breaks:VR,pedantic:UR},yn=class{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Tt.defaults,this.options.tokenizer=this.options.tokenizer||new Rs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={block:Td.normal,inline:Fc.normal};this.options.pedantic?(r.block=Td.pedantic,r.inline=Fc.pedantic):this.options.gfm&&(r.block=Td.gfm,this.options.breaks?r.inline=Fc.breaks:r.inline=Fc.gfm),this.tokenizer.rules=r}static get rules(){return{block:Td,inline:Fc}}static lex(t,r){return new yn(r).lex(t)}static lexInline(t,r){return new yn(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,d,p)=>d+" ".repeat(p.length));let n,i,a,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=`
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+n.raw,i.text+=`
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,d=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(a=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){i=r[r.length-1],o&&i.type==="paragraph"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n),o=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&i.type==="text"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,i,a,o=t,l,d,p;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)g.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(d||(p=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(g=>(n=g.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,o,p)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let g=1/0,E=t.slice(1),_;this.options.extensions.startInline.forEach(y=>{_=y.call({lexer:this},E),typeof _=="number"&&_>=0&&(g=Math.min(g,_))}),g<1/0&&g>=0&&(a=t.substring(0,g+1))}if(n=this.tokenizer.inlineText(a)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(p=n.raw.slice(-1)),d=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ls=class{options;constructor(t){this.options=t||Tt.defaults}code(t,r,n){let i=(r||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="language-'+xn(i)+'">'+(n?t:xn(t,!0))+`</code></pre>
`:"<pre><code>"+(n?t:xn(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
${t}</blockquote>
`}html(t,r){return t}heading(t,r,n){return`<h${r}>${t}</h${r}>
`}hr(){return`<hr>
`}list(t,r,n){let i=r?"ol":"ul",a=r&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
`+t+"</"+i+`>
`}listitem(t,r,n){return`<li>${t}</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
`}table(t,r){return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+r+`</table>
`}tablerow(t){return`<tr>
${t}</tr>
`}tablecell(t,r){let n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+`</${n}>
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,r,n){let i=_A(t);if(i===null)return n;t=i;let a='<a href="'+t+'"';return r&&(a+=' title="'+r+'"'),a+=">"+n+"</a>",a}image(t,r,n){let i=_A(t);if(i===null)return n;t=i;let a=`<img src="${t}" alt="${n}"`;return r&&(a+=` title="${r}"`),a+=">",a}text(t){return t}},Yo=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}},An=class{options;renderer;textRenderer;constructor(t){this.options=t||Tt.defaults,this.options.renderer=this.options.renderer||new Ls,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Yo}static parse(t,r){return new An(r).parse(t)}static parseInline(t,r){return new An(r).parseInline(t)}parse(t,r=!0){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){n+=l||"";continue}}switch(a.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{let o=a;n+=this.renderer.heading(this.parseInline(o.tokens),o.depth,hR(this.parseInline(o.tokens,this.textRenderer)));continue}case"code":{let o=a;n+=this.renderer.code(o.text,o.lang,!!o.escaped);continue}case"table":{let o=a,l="",d="";for(let g=0;g<o.header.length;g++)d+=this.renderer.tablecell(this.parseInline(o.header[g].tokens),{header:!0,align:o.align[g]});l+=this.renderer.tablerow(d);let p="";for(let g=0;g<o.rows.length;g++){let E=o.rows[g];d="";for(let _=0;_<E.length;_++)d+=this.renderer.tablecell(this.parseInline(E[_].tokens),{header:!1,align:o.align[_]});p+=this.renderer.tablerow(d)}n+=this.renderer.table(l,p);continue}case"blockquote":{let o=a,l=this.parse(o.tokens);n+=this.renderer.blockquote(l);continue}case"list":{let o=a,l=o.ordered,d=o.start,p=o.loose,g="";for(let E=0;E<o.items.length;E++){let _=o.items[E],y=_.checked,C=_.task,k="";if(_.task){let P=this.renderer.checkbox(!!y);p?_.tokens.length>0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=P+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=P+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:P+" "}):k+=P+" "}k+=this.parse(_.tokens,p),g+=this.renderer.listitem(k,C,!!y)}n+=this.renderer.list(g,l,d);continue}case"html":{let o=a;n+=this.renderer.html(o.text,o.block);continue}case"paragraph":{let o=a;n+=this.renderer.paragraph(this.parseInline(o.tokens));continue}case"text":{let o=a,l=o.tokens?this.parseInline(o.tokens):o.text;for(;i+1<t.length&&t[i+1].type==="text";)o=t[++i],l+=`
`+(o.tokens?this.parseInline(o.tokens):o.text);n+=r?this.renderer.paragraph(l):l;continue}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,r){r=r||this.renderer;let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=o||"";continue}}switch(a.type){case"escape":{let o=a;n+=r.text(o.text);break}case"html":{let o=a;n+=r.html(o.text);break}case"link":{let o=a;n+=r.link(o.href,o.title,this.parseInline(o.tokens,r));break}case"image":{let o=a;n+=r.image(o.href,o.title,o.text);break}case"strong":{let o=a;n+=r.strong(this.parseInline(o.tokens,r));break}case"em":{let o=a;n+=r.em(this.parseInline(o.tokens,r));break}case"codespan":{let o=a;n+=r.codespan(o.text);break}case"br":{n+=r.br();break}case"del":{let o=a;n+=r.del(this.parseInline(o.tokens,r));break}case"text":{let o=a;n+=r.text(o.text);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},Ba=class{options;constructor(t){this.options=t||Tt.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}};ql(Ba,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var yd=class{defaults=Ad();options=this.setOptions;parse=this.#e(yn.lex,An.parse);parseInline=this.#e(yn.lexInline,An.parseInline);Parser=An;Renderer=Ls;TextRenderer=Yo;Lexer=yn;Tokenizer=Rs;Hooks=Ba;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(let i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let o of a.header)n=n.concat(this.walkTokens(o.tokens,r));for(let o of a.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);n=n.concat(this.walkTokens(l,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...l){let d=a.renderer.apply(this,l);return d===!1&&(d=o.apply(this,l)),d}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Ls(this.defaults);for(let o in n.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(o==="options")continue;let l=o,d=n.renderer[l],p=a[l];a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Rs(this.defaults);for(let o in n.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,d=n.tokenizer[l],p=a[l];a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Ba;for(let o in n.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;let l=o,d=n.hooks[l],p=a[l];Ba.passThroughHooks.has(o)?a[l]=g=>{if(this.defaults.async)return Promise.resolve(d.call(a,g)).then(_=>p.call(a,_));let E=d.call(a,g);return p.call(a,E)}:a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(l){let d=[];return d.push(o.call(this,l)),a&&(d=d.concat(a.call(this,l))),d}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return yn.lex(t,r??this.defaults)}parser(t,r){return An.parse(t,r??this.defaults)}#e(t,r){return(n,i)=>{let a={...i},o={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);let l=this.#t(!!o.silent,!!o.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined o Line truncated
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+xn(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Ps=new yd;function st(e,t){return Ps.parse(e,t)}st.options=st.setOptions=function(e){return Ps.setOptions(e),st.defaults=Ps.defaults,TA(st.defaults),st};st.getDefaults=Ad;st.defaults=Tt.defaults;st.use=function(...e){return Ps.use(...e),st.defaults=Ps.defaults,TA(st.defaults),st};st.walkTokens=function(e,t){return Ps.walkTokens(e,t)};st.parseInline=Ps.parseInline;st.Parser=An;st.parser=An.parse;st.Renderer=Ls;st.TextRenderer=Yo;st.Lexer=yn;st.lexer=yn.lex;st.Tokenizer=Rs;st.Hooks=Ba;st.parse=st;var qR=st.options,zR=st.setOptions,YR=st.use,KR=st.walkTokens,jR=st.parseInline,WR=st,GR=An.parse,QR=yn.lex;Tt.Hooks=Ba;Tt.Lexer=yn;Tt.Marked=yd;Tt.Parser=An;Tt.Renderer=Ls;Tt.TextRenderer=Yo;Tt.Tokenizer=Rs;Tt.getDefaults=Ad;Tt.lexer=QR;Tt.marked=st;Tt.options=qR;Tt.parse=WR;Tt.parseInline=jR;Tt.parser=GR;Tt.setOptions=zR;Tt.use=YR;Tt.walkTokens=KR});function kA(e){return e.type===Ze.Tag||e.type===Ze.Script||e.type===Ze.Style}var Ze,RA,LA,PA,MA,FA,BA,$A,HA,UA,Ko=v(()=>{(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(Ze||(Ze={}));RA=Ze.Root,LA=Ze.Text,PA=Ze.Directive,MA=Ze.Comment,FA=Ze.Script,BA=Ze.Style,$A=Ze.Tag,HA=Ze.CDATA,UA=Ze.Doctype});function _e(e){return kA(e)}function jo(e){return e.type===Ze.CDATA}function nn(e){return e.type===Ze.Text}function $s(e){return e.type===Ze.Comment}function Cd(e){return e.type===Ze.Directive}function Bn(e){return e.type===Ze.Root}function ht(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Wo(e,t=!1){let r;if(nn(e))r=new Ni(e.data);else if($s(e))r=new Ms(e.data);else if(_e(e)){let n=t?F0(e.children):[],i=new Bs(e.name,{...e.attribs},n);n.forEach(a=>a.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=i}else if(jo(e)){let n=t?F0(e.children):[],i=new qc(n);n.forEach(a=>a.parent=i),r=i}else if(Bn(e)){let n=t?F0(e.children):[],i=new wn(n);n.forEach(a=>a.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),r=i}else if(Cd(e)){let n=new Fs(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function F0(e){let t=e.map(r=>Wo(r,!0));for(let r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}var Sd,Uc,Ni,Ms,Fs,Vc,qc,wn,Bs,B0=v(()=>{Ko();Sd=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Wo(this,t)}},Uc=class extends Sd{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},Ni=class extends Uc{constructor(){super(...arguments),this.type=Ze.Text}get nodeType(){return 3}},Ms=class extends Uc{constructor(){super(...arguments),this.type=Ze.Comment}get nodeType(){return 8}},Fs=class extends Uc{constructor(t,r){super(r),this.name=t,this.type=Ze.Directive}get nodeType(){return 1}},Vc=class extends Sd{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},qc=class extends Vc{constructor(){super(...arguments),this.type=Ze.CDATA}get nodeType(){return 4}},wn=class extends Vc{constructor(){super(...arguments),this.type=Ze.Root}get nodeType(){return 9}},Bs=class extends Vc{constructor(t,r,n=[],i=t==="script"?Ze.Script:t==="style"?Ze.Style:Ze.Tag){super(n),this.name=t,this.attribs=r,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}}});var qA,Go,_r=v(()=>{Ko();B0();B0();qA={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Go=class{constructor(t,r,n){this.dom=[],this.root=new wn(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(n=r,r=qA),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??qA,this.elementCB=n??null}onparserinit(t){this.parser=t} Line truncated
`:Dd(e.children):jo(e)?Dd(e.children):nn(e)?e.data:""}function ra(e){return Array.isArray(e)?e.map(ra).join(""):ht(e)&&!$s(e)?ra(e.children):nn(e)?e.data:""}function Kc(e){return Array.isArray(e)?e.map(Kc).join(""):ht(e)&&(e.type===Ze.Tag||jo(e))?Kc(e.children):nn(e)?e.data:""}var Q0=v(()=>{_r();G0();Ko()});function tu(e){return ht(e)?e.children:[]}function o2(e){return e.parent||null}function X0(e){let t=o2(e);if(t!=null)return tu(t);let r=[e],{prev:n,next:i}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;i!=null;)r.push(i),{next:i}=i;return r}function _L(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function bL(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function EL(e){return e.name}function kd(e){let{next:t}=e;for(;t!==null&&!_e(t);)({next:t}=t);return t}function Rd(e){let{prev:t}=e;for(;t!==null&&!_e(t);)({prev:t}=t);return t}var u2=v(()=>{_r()});function na(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function vL(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let i=t.parent=e.parent;if(i){let a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}}function TL(e,t){if(na(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function xL(e,t){na(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let i=r.children;i.splice(i.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function yL(e,t){if(na(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function AL(e,t){na(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}var c2=v(()=>{});function ru(e,t,r=!0,n=1/0){return Ld(e,Array.isArray(t)?t:[t],r,n)}function Ld(e,t,r,n){let i=[],a=[Array.isArray(t)?t:[t]],o=[0];for(;;){if(o[0]>=a[0].length){if(o.length===1)return i;a.shift(),o.shift();continue}let l=a[0][o[0]++];if(e(l)&&(i.push(l),--n<=0))return i;r&&ht(l)&&l.children.length>0&&(o.unshift(0),a.unshift(l.children))}}function wL(e,t){return t.find(e)}function Pd(e,t,r=!0){let n=Array.isArray(t)?t:[t];for(let i=0;i<n.length;i++){let a=n[i];if(_e(a)&&e(a))return a;if(r&&ht(a)&&a.children.length>0){let o=Pd(e,a.children,!0);if(o)return o}}return null}function l2(e,t){return(Array.isArray(t)?t:[t]).some(r=>_e(r)&&e(r)||ht(r)&&l2(e,r.children))}function SL(e,t){let r=[],n=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=n[0].length){if(n.length===1)return r;n.shift(),i.shift();continue}let a=n[0][i[0]++];_e(a)&&e(a)&&r.push(a),ht(a)&&a.children.length>0&&(i.unshift(0),n.unshift(a.children))}}var Z0=v(()=>{_r()});function J0(e,t){return typeof t=="function"?r=>_e(r)&&t(r.attribs[e]):r=>_e(r)&&r.attribs[e]===t}function CL(e,t){return r=>e(r)||t(r)}function f2(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(Md,r)?Md[r](n):J0(r,n)});return t.length===0?null:t.reduce(CL)}function IL(e,t){let r=f2(e);return r?r(t):!0}function NL(e,t,r,n=1/0){let i=f2(e);return i?ru(i,t,r,n):[]}function OL(e,t,r=!0){return Array.isArray(t)||(t=[t]),Pd(J0("id",e),t,r)}function Hs(e,t,r=!0,n=1/0){return ru(Md.tag_name(e),t,r,n)}function DL(e,t,r=!0,n=1/0){return ru(J0("class",e),t,r,n)}function kL(e,t,r=!0,n=1/0){return ru(Md.tag_type(e),t,r,n)}var Md,eg=v(()=>{_r();Z0();Md={tag_name(e){return typeof e=="function"?t=>_e(t)&&e(t.name):e==="*"?_e:t=>_e(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>nn(t)&&e(t.data):t=>nn(t)&&t.data===e}}});function RL(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}function d2(e,t){let r=[],n=[];if(e===t)return 0;let i=ht(e)?e:e.parent;for(;i;)r.unshift(i),i=i.parent;for(i=ht(t)?t:t.parent;i;)n.unshift(i),i=i.parent;let a=Math.min(r.length,n.length),o=0;for(;o<a&&r[o]===n[o];)o++;if(o===0)return $n.DISCONNECTED;let l=r[o-1],d=l.children,p=r[o],g=n[o];return d.indexOf(p)>d.indexOf(g)?l===t?$n.FOLLOWING|$n.CONTAINED_BY:$n.FOLLOWING:l===e?$n.PRECEDING|$n.CONTAINS:$n.PRECEDING}function Ua(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=d2(t,r);return n&$n.PRECEDING?-1:n&$n.FOLLOWING?1:0}),e}var $n,h2=v(()=>{_r();(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})($n||($n={}))});function tg(e){let t=Fd(BL,e);return t?t.name==="feed"?LL(t):PL(t):null}function LL(e){var t;let r=e.children,n={type:"atom",items:Hs("entry",r).map(o=>{var l;let{children:d}=o,p={media:p2(d)};an(p,"id","id",d),an(p,"title","title",d);let g=(l=Fd Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});function Eg(e,t){return e===Un.default.falseFunc?Un.default.falseFunc:r=>t.isTag(r)&&e(r)}function vg(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function _g(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var Un,bg,gg,Vd,qd=v(()=>{Un=ln(za(),1);dg();bg={};gg=(e,t,r,n,i)=>{let a=i(t,_g(r),n);return a===Un.default.trueFunc?e:a===Un.default.falseFunc?Un.default.falseFunc:o=>a(o)&&e(o)},Vd={is:gg,matches:gg,where:gg,not(e,t,r,n,i){let a=i(t,_g(r),n);return a===Un.default.falseFunc?e:a===Un.default.trueFunc?Un.default.falseFunc:o=>!a(o)&&e(o)},has(e,t,r,n,i){let{adapter:a}=r,o=_g(r);o.relativeSelector=!0;let l=t.some(g=>g.some(Jc))?[bg]:void 0,d=i(t,o,l);if(d===Un.default.falseFunc)return Un.default.falseFunc;let p=Eg(d,a);if(l&&d!==Un.default.trueFunc){let{shouldTestNextSiblings:g=!1}=d;return E=>{if(!e(E))return!1;l[0]=E;let _=a.getChildren(E),y=g?[..._,...vg(E,a)]:_;return a.existsOne(p,y)}}return g=>e(g)&&a.existsOne(p,a.getChildren(g))}}});function j2(e,t,r,n,i){var a;let{name:o,data:l}=t;if(Array.isArray(l)){if(!(o in Vd))throw new Error(`Unknown pseudo-class :${o}(${l})`);return Vd[o](e,l,r,n,i)}let d=(a=r.pseudos)===null||a===void 0?void 0:a[o],p=typeof d=="string"?d:Ud[o];if(typeof p=="string"){if(l!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let g=ia(p);return Vd.is(e,g,r,n,i)}if(typeof d=="function")return mg(d,o,l,1),g=>d(g,l)&&e(g);if(o in uu)return uu[o](e,l,r,n);if(o in tl){let g=tl[o];return mg(g,o,l,2),E=>g(E,r,l)&&e(E)}throw new Error(`Unknown pseudo-class :${o}`)}var Tg=v(()=>{su();z2();Y2();K2();qd()});function xg(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function W2(e,t,r,n,i){let{adapter:a,equals:o}=r;switch(t.type){case Ee.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ee.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ee.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),M2[t.action](e,t,r)}case Ee.Pseudo:return j2(e,t,r,n,i);case Ee.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:l}=t;return(!r.xmlMode||r.lowerCaseTags)&&(l=l.toLowerCase()),function(p){return a.getName(p)===l&&e(p)}}case Ee.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(p){let g=p;for(;g=xg(g,a);)if(e(g))return!0;return!1};let l=new WeakSet;return function(p){let g=p;for(;g=xg(g,a);)if(!l.has(g)){if(a.isTag(g)&&e(g))return!0;l.add(g)}return!1}}case"_flexibleDescendant":return function(d){let p=d;do if(e(p))return!0;while(p=xg(p,a));return!1};case Ee.Parent:return function(d){return a.getChildren(d).some(p=>a.isTag(p)&&e(p))};case Ee.Child:return function(d){let p=a.getParent(d);return p!=null&&a.isTag(p)&&e(p)};case Ee.Sibling:return function(d){let p=a.getSiblings(d);for(let g=0;g<p.length;g++){let E=p[g];if(o(d,E))break;if(a.isTag(E)&&e(E))return!0}return!1};case Ee.Adjacent:return a.prevElementSibling?function(d){let p=a.prevElementSibling(d);return p!=null&&e(p)}:function(d){let p=a.getSiblings(d),g;for(let E=0;E<p.length;E++){let _=p[E];if(o(d,_))break;a.isTag(_)&&(g=_)}return!!g&&e(g)};case Ee.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}var G2=v(()=>{F2();Tg();su()});function Q2(e,t,r){let n=zd(e,t,r);return Eg(n,t.adapter)}function zd(e,t,r){let n=typeof e=="string"?ia(e):e;return Yd(n,t,r)}function X2(e){return e.type===Ee.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(X2)))}function pP(e,{adapter:t},r){let n=!!r?.every(i=>{let a=t.isTag(i)&&t.getParent(i);return i===bg||a&&t.isTag(a)});for(let i of e){if(!(i.length>0&&Jc(i[0])&&i[0].type!==Ee.Descendant))if(n&&!i.some(X2))i.unshift(fP);else continue;i.unshift(hP)}}function Yd(e,t,r){var n;e.forEach(fg),r=(n=t.context)!==null&&n!==void 0?n:r;let i=Array.isArray(r),a=r&&(Arra Line truncated
`)})):{name:i,value:a.replace(Ew,`\r
`)}}).toArray()}var bw,w4,Ew,vw=v(()=>{_r();bw="input,select,textarea,keygen",w4=/%20/g,Ew=/\r?\n/g});var Ug={};Nn(Ug,{extract:()=>N4});function I4(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function N4(e){let t={};for(let r in e){let n=e[r],i=Array.isArray(n),{selector:a,value:o}=I4(i?n[0]:n),l=typeof o=="function"?o:typeof o=="string"?d=>this._make(d).prop(o):d=>this._make(d).extract(o);if(i)t[r]=this._findBySelector(a,Number.POSITIVE_INFINITY).map((d,p)=>l(p,r,t)).get();else{let d=this._findBySelector(a,1);t[r]=d.length>0?l(d[0],r,t):void 0}}return t}var Tw=v(()=>{});var ja,xw=v(()=>{C2();lw();pw();_w();vw();Tw();ja=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}};ja.prototype.cheerio="[cheerio object]";ja.prototype.splice=Array.prototype.splice;ja.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(ja.prototype,ug,Mg,Bg,$g,Hg,Ug)});function yw(e,t){return function r(n,i,a=!0){if(n==null)throw new Error("cheerio.load() expects a string");let o=jc(i),l=e(n,o,a,null);class d extends ja{_make(E,_){let y=p(E,_);return y.prevObject=this,y}_parse(E,_,y,C){return e(E,_,y,C)}_render(E){return t(E,this.options)}}function p(g,E,_=l,y){if(g&&Hn(g))return g;let C=jc(y,o),k=typeof _=="string"?[e(_,C,!1,null)]:"length"in _?_:[_],P=Hn(k)?k:new d(k,null,C);if(P._root=P,!g)return new d(void 0,P,C);let N=typeof g=="string"&&Gc(g)?e(g,C,!1,null).children:O4(g)?[g]:Array.isArray(g)?g:void 0,L=new d(N,P,C);if(N)return L;if(typeof g!="string")throw new TypeError("Unexpected type of selector");let H=g,R=E?typeof E=="string"?Gc(E)?new d([e(E,C,!1,null)],P,C):(H=`${E} ${H}`,P):Hn(E)?E:new d(Array.isArray(E)?E:[E],P,C):P;return R?R.find(H):L}return Object.assign(p,ig,{load:r,_root:l,_options:o,fn:d.prototype,prototype:d.prototype}),p}}function O4(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}var Aw=v(()=>{rg();nu();xw();iu()});function Xd(e){return e>=55296&&e<=57343}function ww(e){return e>=56320&&e<=57343}function Sw(e,t){return(e-55296)*1024+9216+t}function Zd(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Jd(e){return e>=64976&&e<=65007||D4.has(e)}var D4,xt,x,Vr,eh=v(()=>{D4=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),xt="\uFFFD";(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(x||(x={}));Vr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var Y,il=v(()=>{(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeVal Line truncated
`)}else if(dc(t))try{let g=JSON.parse(await r.vault.cachedRead(n)),E=[],_=y=>{for(let C in y)typeof y[C]=="object"?_(y[C]):C==="content"&&E.push(y[C])};_(g),i=E.join(`\r
`)}catch(g){console.error("Omnisearch: Error while parsing Dataloom file",t),console.error(g)}else Mn(t)&&(this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)||this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n))?(this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)&&(i=await a.extractText(n)),this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n)&&(i=await o.analyzeImage(n)+(i??""))):ti(t)&&this.plugin.settings.PDFIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):fv(t)&&this.plugin.settings.officeIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):this.plugin.notesIndexer.isFilenameIndexable(t)&&(i=n.path);i==null&&(console.warn(`Omnisearch: ${i} content for file`,n.path),i="");let l=r.metadataCache.getFileCache(n);if(l){let g=gv(this.plugin.app,n,l);for(let E of g.filter(_=>!this.documents.has(_))){let _=this.plugin.notesIndexer.generateIndexableNonexistingDocument(E,n.path)}if(l.frontmatter?.["excalidraw-plugin"]){let E=l.sections?.filter(_=>_.type==="comment")??[];for(let{start:_,end:y}of E.map(C=>C.position))i=i.substring(0,_.offset-1)+i.substring(y.offset)}}let d;this.plugin.settings.displayTitle==="#heading"?d=l?.headings?.find(g=>g.level===1)?.heading??"":d=l?.frontmatter?.[this.plugin.settings.displayTitle]??"";let p=lv(l);return{basename:n.basename,displayTitle:d,content:i,cleanedContent:uv(Wi(i)),path:n.path,mtime:n.stat.mtime,tags:p,unmarkedTags:p.map(g=>g.replace("#","")),aliases:cv(l).join(""),headings1:l?Af(l,1).join(" "):"",headings2:l?Af(l,2).join(" "):"",headings3:l?Af(l,3).join(" "):""}}};Nr();_c();Nr();var yh=class{constructor(t){this.plugin=t;this.notesToReindex=new Set}flagNoteForReindex(t){this.notesToReindex.add(t)}async refreshIndex(){for(let r of this.notesToReindex)Ke("Updating file",r.path),await this.plugin.documentsRepository.addDocument(r.path);let t=[...this.notesToReindex].map(r=>r.path);t.length&&(this.plugin.searchEngine.removeFromPaths(t),await this.plugin.searchEngine.addFromPaths(t),this.notesToReindex.clear())}isFileIndexable(t){return this.isFilenameIndexable(t)||this.isContentIndexable(t)}isContentIndexable(t){let r=this.plugin.settings,n=!!this.plugin.getTextExtractor(),i=!!this.plugin.getAIImageAnalyzer(),a=n&&r.PDFIndexing,o=n&&r.imagesIndexing,l=i&&r.aiImageIndexing;return this.isFilePlaintext(t)||Ai(t)||dc(t)||a&&ti(t)||o&&Mn(t)||l&&Mn(t)}isFilenameIndexable(t){return this.canIndexUnsupportedFiles()||this.isFilePlaintext(t)||Ai(t)||dc(t)}canIndexUnsupportedFiles(){return this.plugin.settings.unsupportedFilesIndexing==="yes"||this.plugin.settings.unsupportedFilesIndexing==="default"&&!!this.plugin.app.vault.getConfig("showUnsupportedFiles")}generateIndexableNonexistingDocument(t,r){return t=Nm(t),{path:t+(t.endsWith(".md")?"":".md"),basename:t,displayTitle:"",mtime:0,content:"",cleanedContent:"",tags:[],unmarkedTags:[],aliases:"",headings1:"",headings2:"",headings3:"",doesNotExist:!0,parent:r}}isFilePlaintext(t){return[...this.plugin.settings.indexedFileTypes,"md"].some(r=>t.endsWith(`.${r}`))}};s0();var wh=require("obsidian");Nr();var Ah=class{constructor(t){this.plugin=t;this.embeds=new Map}addEmbed(t,r){this.embeds.has(t)||this.embeds.set(t,new Set),this.embeds.get(t).add(r)}removeFile(t){this.embeds.delete(t),this.refreshEmbedsForNote(t)}renameFile(t,r){this.embeds.has(t)&&(this.embeds.set(r,this.embeds.get(t)),this.embeds.delete(t)),this.embeds.forEach((n,i)=>{n.has(t)&&(n.delete(t),n.add(r))})}refreshEmbedsForNote(t){this.embeds.forEach((r,n)=>{r.has(t)&&r.delete(t)}),this.addEmbedsForNote(t)}getEmbeds(t){return this.embeds.has(t)?[...this.embeds.get(t)]:[]}async writeToCache(){Ke("Writing embeds to cache");let t=this.plugin.database,r=[];for(let[n,i]of this.embeds)r.push({embedded:n,referencedBy:[...i]});await t.embeds.clear(),await t.embeds.bulkAdd(r)}async loadFromCache(){try{let t=this.plugin.database;if(!t.embeds){Ke("No embeds in cache");return}Ke("Loading embeds from cache");let r=await t.embeds.toArray();for(let{embedded:n,referencedBy:i}of r)for(let a of i)this.addEmbed(n,a)}catch{this.plugin.database.clearCache(),console.error("Omnisearch - Error while loading embeds cache"),new wh.Notice("Omnisearch - There was an error while loading the cache. Please restart Obsidian.")}}addEmbedsForNote(t){let r=(this.plugin.app.metadataCache.getCache(t)?.embeds??[]).map(n=>this.plugin.app.metadataCache.getFirstLinkpathDest((0,wh.getLinkpath)(n.link),t)).filter(n=>!!n);for(let n of r)this.addEmbed(n.path,t)}};var Sh=class{constructor(t){this.plugin=t;this.nextQueryIsEmpty=!1}async addToHistory(t){if(!t){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let r=this.plugin.database,n=await r.searchHistory.toArray();n=n.filter(i=>i.query!==t).reverse(),n.unshift({query:t}),n=n.slice(0,10),await r.searchHistory.clear(),await r.searchHistory.bulkAdd(n)}async getHistory(){let t=(await this.plugin.database.searchHistory.toArray()).reverse().map(r=>r.query);return this.nextQueryIsEmpty&&t.unshift(""),t}};var Ch=class Line truncated
/*! Bundled license information:
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
search-query-parser/lib/search-query-parser.js:
(*!
* search-query-parser.js
* Copyright(c) 2014-2019
* MIT Licensed
*)
dexie/dist/dexie.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.
***************************************************************************** *)
*/
/* nosourcemap */
+14
View File
@@ -0,0 +1,14 @@
{
"id": "omnisearch",
"name": "Omnisearch",
"version": "1.27.1",
"minAppVersion": "1.7.2",
"description": "A search engine that just works",
"author": "Simon Cambier",
"authorUrl": "https://github.com/scambier/obsidian-omnisearch",
"fundingUrl": {
"Github": "https://github.com/sponsors/scambier",
"Ko-fi": "https://ko-fi.com/scambier"
},
"isDesktopOnly": false
}
+135
View File
@@ -0,0 +1,135 @@
.omnisearch-modal {
}
.omnisearch-result {
white-space: normal;
display: flex;
flex-direction: row;
/* justify-content: space-between; */
flex-wrap: nowrap;
}
.omnisearch-result__title-container {
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 5px;
flex-wrap: wrap;
}
.omnisearch-result__title {
white-space: pre-wrap;
align-items: center;
display: flex;
gap: 5px;
}
.omnisearch-result__title > span {
}
.omnisearch-result__folder-path {
font-size: 0.75rem;
align-items: center;
display: flex;
gap: 5px;
color: var(--text-muted);
}
.omnisearch-result__extension {
font-size: 0.7rem;
color: var(--text-muted);
}
.omnisearch-result__counter {
font-size: 0.7rem;
color: var(--text-muted);
}
.omnisearch-result__body {
white-space: normal;
font-size: small;
word-wrap: normal;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
color: var(--text-muted);
margin-inline-start: 0.5em;
}
.omnisearch-result__embed {
margin-left: 1em;
}
.omnisearch-result__image-container {
flex-basis: 20%;
text-align: end;
}
.omnisearch-highlight {
}
.omnisearch-default-highlight {
text-decoration: underline;
text-decoration-color: var(--text-highlight-bg);
text-decoration-thickness: 3px;
text-underline-offset: -1px;
text-decoration-skip-ink: none;
}
.omnisearch-input-container {
display: flex;
align-items: center;
flex-direction: row;
gap: 5px;
}
.omnisearch-result__icon {
display: inline-block;
vertical-align: middle;
width: 16px;
height: 16px;
margin-right: 4px;
}
.omnisearch-result__icon svg {
width: 100%;
height: 100%;
}
.omnisearch-result__icon--emoji {
font-size: 16px;
vertical-align: middle;
margin-right: 4px;
}
@media only screen and (max-width: 600px) {
.omnisearch-input-container {
flex-direction: column;
}
.omnisearch-input-container__buttons {
display: flex;
flex-direction: row;
width: 100%;
padding: 0 1em 0 1em;
gap: 1em;
}
.omnisearch-input-container__buttons > button {
flex-grow: 1;
}
}
@media only screen and (min-width: 600px) {
.omnisearch-input-container__buttons {
margin-inline-end: 1em;
}
}
.omnisearch-input-field {
position: relative;
flex-grow: 1;
}
+26 -24
View File
@@ -27,12 +27,12 @@
"state": {
"type": "markdown",
"state": {
"file": "08-Inbox/博文测试.md",
"file": "copilot-custom-prompts/Translate to Chinese.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "博文测试"
"title": "Translate to Chinese"
}
},
{
@@ -60,7 +60,7 @@
}
}
],
"currentTab": 2
"currentTab": 1
}
],
"direction": "vertical"
@@ -244,7 +244,7 @@
}
}
],
"currentTab": 5
"currentTab": 4
},
{
"id": "ad86bdfc0cc9f06b",
@@ -300,13 +300,32 @@
"obsidian-raindrop-highlights:Sync your Raindrop bookmarks": false,
"obsidian-wordpress:发布到 WordPress": false,
"remotely-save:Remotely Save": false,
"obsidian-full-calendar:Open Full Calendar": false
"obsidian-full-calendar:Open Full Calendar": false,
"obsidian-importer:Open Importer": false,
"copilot:Open Copilot Chat": false
}
},
"active": "852546e21e37ef77",
"active": "3f7f823342ac46a5",
"lastOpenFiles": [
"01-工作日记/2025-07-04.md",
"copilot-custom-prompts/Summarize.md",
"copilot-custom-prompts/Simplify.md",
"copilot-custom-prompts/Generate glossary.md",
"copilot-custom-prompts/Explain like I am 5.md",
"copilot-custom-prompts/Emojify.md",
"08-Inbox/博文测试.md",
"08-Inbox/2025-07-04.md",
"08-Inbox/草稿.md",
"30-RSS/网文精选/从皮甲到铁铠:蒙古战马的防护升级与骑兵巅峰.md",
"copilot-custom-prompts/Rewrite as tweet thread.md",
"copilot-custom-prompts/Rewrite as tweet.md",
"copilot-custom-prompts/Remove URLs.md",
"copilot-custom-prompts/Generate table of contents.md",
"copilot-custom-prompts/Make longer.md",
"copilot-custom-prompts/Make shorter.md",
"copilot-custom-prompts/Translate to Chinese.md",
"copilot-custom-prompts/Fix grammar and spelling.md",
"copilot-custom-prompts",
"01-工作日记/2025-07-04.md",
"10-WebClipper/使用Obsidian打造个人图书馆!.md",
"README.md.md",
"04-博客发布/040-系统技术",
@@ -314,26 +333,10 @@
"01-工作日记/2025-07-05.md",
"30-RSS/网文精选/assets",
"04-博客发布/041-人文历史/使用Obsidian打造个人图书馆! -转自知乎.md",
"08-Inbox/草稿.md",
"08-Inbox/2025-07-04.md",
"08-Inbox/博文测试.md",
"30-RSS/网文精选",
"30-RSS/少数派.md",
"20-我的收藏夹/21-浏览器收藏/电子书/20230826/(5 封私信 82 条消息) 平板上OneNote怎么用(已解决,谢谢大家!)? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/20230826/(5 封私信 82 条消息) 华为阅读怎么在电脑使用?能否在电脑使用阅读呢? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/20230826/(5 封私信 82 条消息) 安卓平板的OneNote使用体验如何? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/20230826/(5 封私信 82 条消息) 百度网盘的epub书籍怎么用iBooks打开? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/翻译/10款翻译引擎全面对比,别再无脑吹DeepL了,根本不好用! - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/翻译/(30条消息) Mac上的全局翻译利器 Bob + PopClip_一头小山猪的博客-CSDN博客.md",
"20-我的收藏夹/21-浏览器收藏/翻译/(6 封私信 82 条消息) 有什么优秀且免费的Chrome翻译插件? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/翻译/(5 封私信 82 条消息) 哪款插件可以自动翻译网页 - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作/如何制作电子书?推荐6个优质的电子书制作软件 - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作/电子书制作软件 - 搜索.md",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作/(5 封私信 44 条消息) OS X 下最好的电子杂志制作软件是什么? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作/(5 封私信 44 条消息) 制作和编辑 ePub (电子书)有哪些工具值得推荐? - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作/使用 Sigil 制作 ePub 电子书的心得总结 —— 需要正则表达式、HTML(CSS)和排版设计知识 - 知乎.md",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作/FLBOOK-H5电子杂志制作-电子画册制作-在线电子杂志制作软件.md",
"20-我的收藏夹/21-浏览器收藏/电子书/20230826/阅读 3.0 使用教程:一款开源的聚合阅读软件 - 知乎.md",
"10-WebClipper/assets/v2-9f9b51f2020f8fd18c421810cc179483_1440w.png",
"10-WebClipper/assets/v2-0bb091571c199e26882c3bbba78eaf15_1440w.png",
"20-我的收藏夹/21-浏览器收藏/智能家居/HomeAssist",
@@ -342,7 +345,6 @@
"20-我的收藏夹/21-浏览器收藏/电子书/20230826",
"20-我的收藏夹/21-浏览器收藏/电子书/calibre",
"20-我的收藏夹/21-浏览器收藏/电子书/电子书制作",
"20-我的收藏夹/21-浏览器收藏/电子书",
"10-WebClipper/assets/v2-f666b8a845692cd6fee65bfbc52a3c59_1440w.png",
"10-WebClipper/assets/v2-d63c44ddcd747819424acf7340ebccfd_1440w.png",
"10-WebClipper/assets/v2-937ea34d7b9f0fcca1fc3ffba7d6c61a_1440w.png",