mulmoclaude 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,12 +97,12 @@ ${this.parser.parse(Ph)}</blockquote>
97
97
  ${Ph}</tr>
98
98
  `}tablecell(Ph){let Fh=this.parser.parseInline(Ph.tokens),Ih=Ph.header?`th`:`td`;return(Ph.align?`<${Ih} align="${Ph.align}">`:`<${Ih}>`)+Fh+`</${Ih}>
99
99
  `}strong({tokens:Ph}){return`<strong>${this.parser.parseInline(Ph)}</strong>`}em({tokens:Ph}){return`<em>${this.parser.parseInline(Ph)}</em>`}codespan({text:Ph}){return`<code>${O$4(Ph,!0)}</code>`}br(Ph){return`<br>`}del({tokens:Ph}){return`<del>${this.parser.parseInline(Ph)}</del>`}link({href:Ph,title:Fh,tokens:Ih}){let Lh=this.parser.parseInline(Ih),Rh=J$4(Ph);if(Rh===null)return Lh;Ph=Rh;let zh=`<a href="`+Ph+`"`;return Fh&&(zh+=` title="`+O$4(Fh)+`"`),zh+=`>`+Lh+`</a>`,zh}image({href:Ph,title:Fh,text:Ih,tokens:Lh}){Lh&&(Ih=this.parser.parseInline(Lh,this.parser.textRenderer));let Rh=J$4(Ph);if(Rh===null)return O$4(Ih);Ph=Rh;let zh=`<img src="${Ph}" alt="${O$4(Ih)}"`;return Fh&&(zh+=` title="${O$4(Fh)}"`),zh+=`>`,zh}text(Ph){return`tokens`in Ph&&Ph.tokens?this.parser.parseInline(Ph.tokens):`escaped`in Ph&&Ph.escaped?Ph.text:O$4(Ph.text)}},L$5=class{strong({text:Ph}){return Ph}em({text:Ph}){return Ph}codespan({text:Ph}){return Ph}del({text:Ph}){return Ph}html({text:Ph}){return Ph}text({text:Ph}){return Ph}link({text:Ph}){return``+Ph}image({text:Ph}){return``+Ph}br(){return``}checkbox({raw:Ph}){return Ph}},b$4=class Ph{options;renderer;textRenderer;constructor(Ph){this.options=Ph||T$4,this.options.renderer=this.options.renderer||new y$3,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new L$5}static parse(Fh,Ih){return new Ph(Ih).parse(Fh)}static parseInline(Fh,Ih){return new Ph(Ih).parseInline(Fh)}parse(Ph){this.renderer.parser=this;let Fh=``;for(let Ih=0;Ih<Ph.length;Ih++){let Lh=Ph[Ih];if(this.options.extensions?.renderers?.[Lh.type]){let Ph=Lh,Ih=this.options.extensions.renderers[Ph.type].call({parser:this},Ph);if(Ih!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(Ph.type)){Fh+=Ih||``;continue}}let Rh=Lh;switch(Rh.type){case`space`:Fh+=this.renderer.space(Rh);break;case`hr`:Fh+=this.renderer.hr(Rh);break;case`heading`:Fh+=this.renderer.heading(Rh);break;case`code`:Fh+=this.renderer.code(Rh);break;case`table`:Fh+=this.renderer.table(Rh);break;case`blockquote`:Fh+=this.renderer.blockquote(Rh);break;case`list`:Fh+=this.renderer.list(Rh);break;case`checkbox`:Fh+=this.renderer.checkbox(Rh);break;case`html`:Fh+=this.renderer.html(Rh);break;case`def`:Fh+=this.renderer.def(Rh);break;case`paragraph`:Fh+=this.renderer.paragraph(Rh);break;case`text`:Fh+=this.renderer.text(Rh);break;default:{let Ph=`Token with "`+Rh.type+`" type was not found.`;if(this.options.silent)return console.error(Ph),``;throw Error(Ph)}}}return Fh}parseInline(Ph,Fh=this.renderer){this.renderer.parser=this;let Ih=``;for(let Lh=0;Lh<Ph.length;Lh++){let Rh=Ph[Lh];if(this.options.extensions?.renderers?.[Rh.type]){let Ph=this.options.extensions.renderers[Rh.type].call({parser:this},Rh);if(Ph!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(Rh.type)){Ih+=Ph||``;continue}}let zh=Rh;switch(zh.type){case`escape`:Ih+=Fh.text(zh);break;case`html`:Ih+=Fh.html(zh);break;case`link`:Ih+=Fh.link(zh);break;case`image`:Ih+=Fh.image(zh);break;case`checkbox`:Ih+=Fh.checkbox(zh);break;case`strong`:Ih+=Fh.strong(zh);break;case`em`:Ih+=Fh.em(zh);break;case`codespan`:Ih+=Fh.codespan(zh);break;case`br`:Ih+=Fh.br(zh);break;case`del`:Ih+=Fh.del(zh);break;case`text`:Ih+=Fh.text(zh);break;default:{let Ph=`Token with "`+zh.type+`" type was not found.`;if(this.options.silent)return console.error(Ph),``;throw Error(Ph)}}}return Ih}},P$4=class{options;block;constructor(Ph){this.options=Ph||T$4}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(Ph){return Ph}postprocess(Ph){return Ph}processAllTokens(Ph){return Ph}emStrongMask(Ph){return Ph}provideLexer(Ph=this.block){return Ph?x$4.lex:x$4.lexInline}provideParser(Ph=this.block){return Ph?b$4.parse:b$4.parseInline}},D$4=class{defaults=z$5();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=b$4;Renderer=y$3;TextRenderer=L$5;Lexer=x$4;Tokenizer=w$4;Hooks=P$4;constructor(...Ph){this.use(...Ph)}walkTokens(Ph,Fh){let Ih=[];for(let Lh of Ph)switch(Ih=Ih.concat(Fh.call(this,Lh)),Lh.type){case`table`:{let Ph=Lh;for(let Lh of Ph.header)Ih=Ih.concat(this.walkTokens(Lh.tokens,Fh));for(let Lh of Ph.rows)for(let Ph of Lh)Ih=Ih.concat(this.walkTokens(Ph.tokens,Fh));break}case`list`:{let Ph=Lh;Ih=Ih.concat(this.walkTokens(Ph.items,Fh));break}default:{let Ph=Lh;this.defaults.extensions?.childTokens?.[Ph.type]?this.defaults.extensions.childTokens[Ph.type].forEach(Lh=>{let Rh=Ph[Lh].flat(1/0);Ih=Ih.concat(this.walkTokens(Rh,Fh))}):Ph.tokens&&(Ih=Ih.concat(this.walkTokens(Ph.tokens,Fh)))}}return Ih}use(...Ph){let Fh=this.defaults.extensions||{renderers:{},childTokens:{}};return Ph.forEach(Ph=>{let Ih={...Ph};if(Ih.async=this.defaults.async||Ih.async||!1,Ph.extensions&&(Ph.extensions.forEach(Ph=>{if(!Ph.name)throw Error(`extension name required`);if(`renderer`in Ph){let Ih=Fh.renderers[Ph.name];Ih?Fh.renderers[Ph.name]=function(...Fh){let Lh=Ph.renderer.apply(this,Fh);return Lh===!1&&(Lh=Ih.apply(this,Fh)),Lh}:Fh.renderers[Ph.name]=Ph.renderer}if(`tokenizer`in Ph){if(!Ph.level||Ph.level!==`block`&&Ph.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let Ih=Fh[Ph.level];Ih?Ih.unshift(Ph.tokenizer):Fh[Ph.level]=[Ph.tokenizer],Ph.start&&(Ph.level===`block`?Fh.startBlock?Fh.startBlock.push(Ph.start):Fh.startBlock=[Ph.start]:Ph.level===`inline`&&(Fh.startInline?Fh.startInline.push(Ph.start):Fh.startInline=[Ph.start]))}`childTokens`in Ph&&Ph.childTokens&&(Fh.childTokens[Ph.name]=Ph.childTokens)}),Ih.extensions=Fh),Ph.renderer){let Fh=this.defaults.renderer||new y$3(this.defaults);for(let Ih in Ph.renderer){if(!(Ih in Fh))throw Error(`renderer '${Ih}' does not exist`);if([`options`,`parser`].includes(Ih))continue;let Lh=Ih,Rh=Ph.renderer[Lh],zh=Fh[Lh];Fh[Lh]=(...Ph)=>{let Ih=Rh.apply(Fh,Ph);return Ih===!1&&(Ih=zh.apply(Fh,Ph)),Ih||``}}Ih.renderer=Fh}if(Ph.tokenizer){let Fh=this.defaults.tokenizer||new w$4(this.defaults);for(let Ih in Ph.tokenizer){if(!(Ih in Fh))throw Error(`tokenizer '${Ih}' does not exist`);if([`options`,`rules`,`lexer`].includes(Ih))continue;let Lh=Ih,Rh=Ph.tokenizer[Lh],zh=Fh[Lh];Fh[Lh]=(...Ph)=>{let Ih=Rh.apply(Fh,Ph);return Ih===!1&&(Ih=zh.apply(Fh,Ph)),Ih}}Ih.tokenizer=Fh}if(Ph.hooks){let Fh=this.defaults.hooks||new P$4;for(let Ih in Ph.hooks){if(!(Ih in Fh))throw Error(`hook '${Ih}' does not exist`);if([`options`,`block`].includes(Ih))continue;let Lh=Ih,Rh=Ph.hooks[Lh],zh=Fh[Lh];P$4.passThroughHooks.has(Ih)?Fh[Lh]=Ph=>{if(this.defaults.async&&P$4.passThroughHooksRespectAsync.has(Ih))return(async()=>{let Ih=await Rh.call(Fh,Ph);return zh.call(Fh,Ih)})();let Lh=Rh.call(Fh,Ph);return zh.call(Fh,Lh)}:Fh[Lh]=(...Ph)=>{if(this.defaults.async)return(async()=>{let Ih=await Rh.apply(Fh,Ph);return Ih===!1&&(Ih=await zh.apply(Fh,Ph)),Ih})();let Ih=Rh.apply(Fh,Ph);return Ih===!1&&(Ih=zh.apply(Fh,Ph)),Ih}}Ih.hooks=Fh}if(Ph.walkTokens){let Fh=this.defaults.walkTokens,Lh=Ph.walkTokens;Ih.walkTokens=function(Ph){let Ih=[];return Ih.push(Lh.call(this,Ph)),Fh&&(Ih=Ih.concat(Fh.call(this,Ph))),Ih}}this.defaults={...this.defaults,...Ih}}),this}setOptions(Ph){return this.defaults={...this.defaults,...Ph},this}lexer(Ph,Fh){return x$4.lex(Ph,Fh??this.defaults)}parser(Ph,Fh){return b$4.parse(Ph,Fh??this.defaults)}parseMarkdown(Ph){return(Fh,Ih)=>{let Lh={...Ih},Rh={...this.defaults,...Lh},zh=this.onError(!!Rh.silent,!!Rh.async);if(this.defaults.async===!0&&Lh.async===!1)return zh(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof Fh>`u`||Fh===null)return zh(Error(`marked(): input parameter is undefined or null`));if(typeof Fh!=`string`)return zh(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(Fh)+`, string expected`));if(Rh.hooks&&(Rh.hooks.options=Rh,Rh.hooks.block=Ph),Rh.async)return(async()=>{let Ih=Rh.hooks?await Rh.hooks.preprocess(Fh):Fh,Lh=await(Rh.hooks?await Rh.hooks.provideLexer(Ph):Ph?x$4.lex:x$4.lexInline)(Ih,Rh),zh=Rh.hooks?await Rh.hooks.processAllTokens(Lh):Lh;Rh.walkTokens&&await Promise.all(this.walkTokens(zh,Rh.walkTokens));let Bh=await(Rh.hooks?await Rh.hooks.provideParser(Ph):Ph?b$4.parse:b$4.parseInline)(zh,Rh);return Rh.hooks?await Rh.hooks.postprocess(Bh):Bh})().catch(zh);try{Rh.hooks&&(Fh=Rh.hooks.preprocess(Fh));let Ih=(Rh.hooks?Rh.hooks.provideLexer(Ph):Ph?x$4.lex:x$4.lexInline)(Fh,Rh);Rh.hooks&&(Ih=Rh.hooks.processAllTokens(Ih)),Rh.walkTokens&&this.walkTokens(Ih,Rh.walkTokens);let Lh=(Rh.hooks?Rh.hooks.provideParser(Ph):Ph?b$4.parse:b$4.parseInline)(Ih,Rh);return Rh.hooks&&(Lh=Rh.hooks.postprocess(Lh)),Lh}catch(Ph){return zh(Ph)}}}onError(Ph,Fh){return Ih=>{if(Ih.message+=`
100
- Please report this to https://github.com/markedjs/marked.`,Ph){let Ph=`<p>An error occurred:</p><pre>`+O$4(Ih.message+``,!0)+`</pre>`;return Fh?Promise.resolve(Ph):Ph}if(Fh)return Promise.reject(Ih);throw Ih}}},M$4=new D$4;function g$3(Ph,Fh){return M$4.parse(Ph,Fh)}g$3.options=g$3.setOptions=function(Ph){return M$4.setOptions(Ph),g$3.defaults=M$4.defaults,G$4(g$3.defaults),g$3},g$3.getDefaults=z$5,g$3.defaults=T$4,g$3.use=function(...Ph){return M$4.use(...Ph),g$3.defaults=M$4.defaults,G$4(g$3.defaults),g$3},g$3.walkTokens=function(Ph,Fh){return M$4.walkTokens(Ph,Fh)},g$3.parseInline=M$4.parseInline,g$3.Parser=b$4,g$3.parser=b$4.parse,g$3.Renderer=y$3,g$3.TextRenderer=L$5,g$3.Lexer=x$4,g$3.lexer=x$4.lex,g$3.Tokenizer=w$4,g$3.Hooks=P$4,g$3.parse=g$3;var jt$2=g$3.options,Ft$2=g$3.setOptions,Ut$2=g$3.use,Kt$2=g$3.walkTokens,Wt$2=g$3.parseInline,Xt$2=g$3,Jt$2=b$4.parse,Vt$2=x$4.lex;function isCrossOriginHttpUrl(Ph,Fh){if(!Ph.startsWith(`http://`)&&!Ph.startsWith(`https://`))return!1;try{return new URL(Ph).origin!==Fh}catch{return!1}}function handleExternalLinkClick(Ph){if(Ph.button!==0||Ph.ctrlKey||Ph.metaKey||Ph.shiftKey)return!1;let Fh=Ph.target;if(!Fh)return!1;let Ih=Fh.closest(`a`);if(!Ih)return!1;let Lh=Ih.href;return isCrossOriginHttpUrl(Lh,window.location.origin)?(Ph.preventDefault(),window.open(Lh,`_blank`,`noopener,noreferrer`),!0):!1}function isExternalHref(Ph){if(!Ph||Ph.startsWith(`//`)||Ph.startsWith(`http://`)||Ph.startsWith(`https://`)||Ph.startsWith(`mailto:`)||Ph.startsWith(`tel:`)||Ph.startsWith(`ftp://`))return!0;let Fh=Ph.indexOf(`:`);if(Fh>0){let Ih=Ph.indexOf(`/`);if(Ih===-1||Ih>Fh)return!0}return!1}function resolveWorkspaceLink(Ph,Fh){if(!Fh||isExternalHref(Fh)||Fh.startsWith(`#`))return null;let Ih=stripFragmentAndQuery$1(Fh);if(Ih.length===0)return null;let Lh;if(Ih.startsWith(`/`))Lh=Ih.slice(1);else{let Fh=posixDirname(Ph);Lh=Fh===``?Ih:`${Fh}/${Ih}`}return normalizeWorkspacePath(Lh)}function stripFragmentAndQuery$1(Ph){let Fh=Ph.indexOf(`#`),Ih=Ph.indexOf(`?`),Lh=Ph.length;return Fh!==-1&&Fh<Lh&&(Lh=Fh),Ih!==-1&&Ih<Lh&&(Lh=Ih),Ph.slice(0,Lh)}function extractSessionIdFromPath(Ph){let Fh=`chat/`,Ih=`.jsonl`;if(!Ph.startsWith(`chat/`)||!Ph.endsWith(`.jsonl`))return null;let Lh=Ph.slice(5,Ph.length-6);return Lh.length===0||Lh.includes(`/`)?null:Lh}function posixDirname(Ph){let Fh=Ph.lastIndexOf(`/`);return Fh===-1?``:Ph.slice(0,Fh)}function normalizeWorkspacePath(Ph){if(Ph.length===0)return null;let Fh=Ph.split(`/`),Ih=[];for(let Ph of Fh)if(!(Ph===``||Ph===`.`)){if(Ph===`..`){if(Ih.length===0)return null;Ih.pop();continue}Ih.push(Ph)}return Ih.length===0?null:Ih.join(`/`)}var WIKI_PAGE_PATTERN=/(?:data\/)?wiki\/pages\/([^/]+)\.md$/,CHAT_LOG_PREFIX=`conversations/`;function classifyWorkspacePath(Ph){if(!Ph||isExternalHref(Ph)||Ph.startsWith(`#`))return null;let Fh=stripFragmentAndQuery(Ph);if(Fh.length===0)return null;let Ih=normalizePath(Fh);if(!Ih)return null;let Lh=Ih.match(WIKI_PAGE_PATTERN);if(Lh)return{kind:`wiki`,slug:Lh[1]};if(Ih.startsWith(CHAT_LOG_PREFIX)){let Ph=extractSessionIdFromPath(Ih.slice(14));if(Ph)return{kind:`session`,sessionId:Ph}}return{kind:`file`,path:Ih}}function resolveWikiHref(Ph,Fh){return isExternalHref(Ph)?Ph:Ph.startsWith(`./`)||Ph.startsWith(`../`)||!Ph.includes(`/`)?`${Fh}/${Ph}`:Ph}function stripFragmentAndQuery(Ph){let Fh=Ph.indexOf(`#`),Ih=Ph.indexOf(`?`),Lh=Ph.length;return Fh!==-1&&Fh<Lh&&(Lh=Fh),Ih!==-1&&Ih<Lh&&(Lh=Ih),Ph.slice(0,Lh)}function normalizePath(Ph){if(Ph.length===0)return null;let Fh=Ph.split(`/`),Ih=[];for(let Ph of Fh)if(!(Ph===``||Ph===`.`)){if(Ph===`..`){if(Ih.length===0)return null;Ih.pop();continue}Ih.push(Ph)}return Ih.length===0?null:Ih.join(`/`)}var APP_API_KEY=Symbol(`appApi`);function provideAppApi(Ph){provide(APP_API_KEY,Ph)}function useAppApi(){let Ph=inject(APP_API_KEY);if(!Ph)throw Error(`useAppApi() called outside an App.vue subtree — provideAppApi must run first.`);return Ph}var EVENT_TYPES={status:`status`,text:`text`,toolCall:`tool_call`,toolCallResult:`tool_call_result`,toolResult:`tool_result`,switchRole:`switch_role`,error:`error`,claudeSessionId:`claude_session_id`,sessionFinished:`session_finished`,sessionMeta:`session_meta`,rolesUpdated:`roles_updated`,generationStarted:`generation_started`,generationFinished:`generation_finished`},GENERATION_KINDS={beatImage:`beatImage`,characterImage:`characterImage`,beatAudio:`beatAudio`,movie:`movie`};function generationKey(Ph,Fh,Ih){return`${Ph}\u001f${Fh}\u001f${Ih}`}var CHAT_SERVICE_ROUTES={message:`/api/transports/:transportId/chats/:externalChatId`,connect:`/api/transports/:transportId/chats/:externalChatId/connect`},API_ROUTES={health:`/api/health`,sandbox:`/api/sandbox`,agent:{run:`/api/agent`,cancel:`/api/agent/cancel`,internal:{toolResult:`/api/internal/tool-result`,switchRole:`/api/internal/switch-role`}},chart:{present:`/api/present-chart`},chatIndex:{rebuild:`/api/chat-index/rebuild`},chatService:CHAT_SERVICE_ROUTES,config:{base:`/api/config`,settings:`/api/config/settings`,mcp:`/api/config/mcp`,workspaceDirs:`/api/config/workspace-dirs`,referenceDirs:`/api/config/reference-dirs`,schedulerOverrides:`/api/config/scheduler-overrides`},files:{tree:`/api/files/tree`,dir:`/api/files/dir`,content:`/api/files/content`,raw:`/api/files/raw`,refRoots:`/api/files/ref-roots`},html:{generate:`/api/generate-html`,edit:`/api/edit-html`,present:`/api/present-html`},image:{generate:`/api/generate-image`,edit:`/api/edit-image`,upload:`/api/images`,update:`/api/images/update`},mcpTools:{list:`/api/mcp-tools`,invoke:`/api/mcp-tools/:tool`},notifications:{test:`/api/notifications/test`},mulmoScript:{save:`/api/mulmo-script`,updateBeat:`/api/mulmo-script/update-beat`,updateScript:`/api/mulmo-script/update-script`,beatImage:`/api/mulmo-script/beat-image`,beatAudio:`/api/mulmo-script/beat-audio`,generateBeatAudio:`/api/mulmo-script/generate-beat-audio`,renderBeat:`/api/mulmo-script/render-beat`,uploadBeatImage:`/api/mulmo-script/upload-beat-image`,characterImage:`/api/mulmo-script/character-image`,renderCharacter:`/api/mulmo-script/render-character`,uploadCharacterImage:`/api/mulmo-script/upload-character-image`,movieStatus:`/api/mulmo-script/movie-status`,generateMovie:`/api/mulmo-script/generate-movie`,downloadMovie:`/api/mulmo-script/download-movie`},pdf:{markdown:`/api/pdf/markdown`},plugins:{presentDocument:`/api/present-document`,updateMarkdown:`/api/markdowns/update`,presentSpreadsheet:`/api/present-spreadsheet`,updateSpreadsheet:`/api/spreadsheets/update`,mindmap:`/api/mindmap`,quiz:`/api/quiz`,form:`/api/form`,canvas:`/api/canvas`,present3d:`/api/present3d`},roles:{list:`/api/roles`,manage:`/api/roles/manage`},scheduler:{base:`/api/scheduler`,tasks:`/api/scheduler/tasks`,task:`/api/scheduler/tasks/:id`,taskRun:`/api/scheduler/tasks/:id/run`,logs:`/api/scheduler/logs`},sessions:{list:`/api/sessions`,detail:`/api/sessions/:id`,markRead:`/api/sessions/:id/mark-read`},skills:{list:`/api/skills`,detail:`/api/skills/:name`,create:`/api/skills`,update:`/api/skills/:name`,remove:`/api/skills/:name`},sources:{list:`/api/sources`,create:`/api/sources`,remove:`/api/sources/:slug`,rebuild:`/api/sources/rebuild`,manage:`/api/sources/manage`},news:{items:`/api/news/items`,itemBody:`/api/news/items/:id/body`,readState:`/api/news/read-state`},todos:{list:`/api/todos`,dispatch:`/api/todos`,items:`/api/todos/items`,item:`/api/todos/items/:id`,itemMove:`/api/todos/items/:id/move`,columns:`/api/todos/columns`,column:`/api/todos/columns/:id`,columnsOrder:`/api/todos/columns/order`},wiki:{base:`/api/wiki`}};function errorMessage(Ph,Fh){return Ph instanceof Error?Ph.message:Fh===void 0?String(Ph):Fh}function isRecord(Ph){return typeof Ph==`object`&&!!Ph&&!Array.isArray(Ph)}function isObj(Ph){return typeof Ph==`object`&&!!Ph}function isNonEmptyString(Ph){return typeof Ph==`string`&&Ph.trim().length>0}function hasStringProp(Ph,Fh){return isRecord(Ph)&&typeof Ph[Fh]==`string`}var authToken=null;function setAuthToken(Ph){authToken=Ph}function buildQueryString(Ph){if(!Ph)return``;let Fh=[];for(let[Ih,Lh]of Object.entries(Ph))Lh!==void 0&&Fh.push(`${encodeURIComponent(Ih)}=${encodeURIComponent(String(Lh))}`);return Fh.length===0?``:`?${Fh.join(`&`)}`}function buildHeaders(Ph,Fh){let Ih={...Ph.headers??{}};return Fh&&Ih[`Content-Type`]===void 0&&(Ih[`Content-Type`]=`application/json`),authToken&&Ih.Authorization===void 0&&(Ih.Authorization=`Bearer ${authToken}`),Ih}async function extractError(Ph){let Fh=Ph.status;try{let Ih=await Ph.clone().json();if(hasStringProp(Ih,`error`))return{error:Ih.error,status:Fh}}catch{}return{error:Ph.statusText||`Request failed (${Fh})`,status:Fh}}async function apiCall(Ph,Fh={}){let Ih=Fh.method??`GET`,Lh=Fh.body!==void 0,Rh=`${Ph}${buildQueryString(Fh.query)}`,zh={method:Ih,headers:buildHeaders(Fh,Lh),signal:Fh.signal};Lh&&(zh.body=JSON.stringify(Fh.body));let Bh;try{Bh=await fetch(Rh,zh)}catch(Ph){return{ok:!1,error:errorMessage(Ph),status:0}}if(!Bh.ok){let{error:Ph,status:Fh}=await extractError(Bh);return{ok:!1,error:Ph,status:Fh}}try{return{ok:!0,data:await Bh.json()}}catch(Ph){return{ok:!1,error:`Invalid JSON response: ${errorMessage(Ph)}`,status:Bh.status}}}function apiGet(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`GET`,query:Fh})}function apiPost(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`POST`,body:Fh})}function apiPut(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`PUT`,body:Fh})}function apiDelete(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`DELETE`,body:Fh})}async function apiFetchRaw(Ph,Fh={}){let Ih=`${Ph}${buildQueryString(Fh.query)}`,Lh={method:Fh.method??`GET`,headers:buildHeaders(Fh,!1),body:Fh.body,signal:Fh.signal};return fetch(Ih,Lh)}function usePdfDownload(){let Ph=ref(!1),Fh=ref(null);async function Ih(Ih,Lh){Fh.value=null,Ph.value=!0;let Rh=null;try{let Ph=await apiFetchRaw(API_ROUTES.pdf.markdown,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({markdown:Ih,filename:Lh})});if(!Ph.ok){let Ih=await Ph.text().catch(()=>``);Fh.value=`PDF error ${Ph.status}: ${Ih}`;return}let zh=await Ph.blob();Rh=URL.createObjectURL(zh);let Bh=document.createElement(`a`);Bh.href=Rh,Bh.download=Lh,Bh.click()}catch(Ph){Fh.value=errorMessage(Ph)}finally{Rh&&URL.revokeObjectURL(Rh),Ph.value=!1}}return{pdfDownloading:Ph,pdfError:Fh,downloadPdf:Ih}}function useClipboardCopy(Ph=2e3){let Fh=ref(!1);async function Ih(Ih){try{await navigator.clipboard.writeText(Ih),Fh.value=!0,setTimeout(()=>{Fh.value=!1},Ph)}catch{}}return{copied:Fh,copy:Ih}}var UNSAFE_FILENAME_CHARS=/[/\\:*?"<>|]/g;function toSafeFilename(Ph,Fh=`download`){return Ph.replace(UNSAFE_FILENAME_CHARS,`_`).trim()||Fh}function formatLocalDate(Ph){let Fh=new Date(Ph);return`${Fh.getFullYear()}-${String(Fh.getMonth()+1).padStart(2,`0`)}-${String(Fh.getDate()).padStart(2,`0`)}`}function buildPdfFilename(Ph){return`${toSafeFilename(Ph.name??``,Ph.fallback)}-${formatLocalDate(Ph.timestampMs??Date.now())}.pdf`}var MAX_TITLE_CHARS=50;function extractTextResponseTitle(Ph){let Fh=null;for(let Ih of Ph.split(`
100
+ Please report this to https://github.com/markedjs/marked.`,Ph){let Ph=`<p>An error occurred:</p><pre>`+O$4(Ih.message+``,!0)+`</pre>`;return Fh?Promise.resolve(Ph):Ph}if(Fh)return Promise.reject(Ih);throw Ih}}},M$4=new D$4;function g$3(Ph,Fh){return M$4.parse(Ph,Fh)}g$3.options=g$3.setOptions=function(Ph){return M$4.setOptions(Ph),g$3.defaults=M$4.defaults,G$4(g$3.defaults),g$3},g$3.getDefaults=z$5,g$3.defaults=T$4,g$3.use=function(...Ph){return M$4.use(...Ph),g$3.defaults=M$4.defaults,G$4(g$3.defaults),g$3},g$3.walkTokens=function(Ph,Fh){return M$4.walkTokens(Ph,Fh)},g$3.parseInline=M$4.parseInline,g$3.Parser=b$4,g$3.parser=b$4.parse,g$3.Renderer=y$3,g$3.TextRenderer=L$5,g$3.Lexer=x$4,g$3.lexer=x$4.lex,g$3.Tokenizer=w$4,g$3.Hooks=P$4,g$3.parse=g$3;var jt$2=g$3.options,Ft$2=g$3.setOptions,Ut$2=g$3.use,Kt$2=g$3.walkTokens,Wt$2=g$3.parseInline,Xt$2=g$3,Jt$2=b$4.parse,Vt$2=x$4.lex;function isCrossOriginHttpUrl(Ph,Fh){if(!Ph.startsWith(`http://`)&&!Ph.startsWith(`https://`))return!1;try{return new URL(Ph).origin!==Fh}catch{return!1}}function handleExternalLinkClick(Ph){if(Ph.button!==0||Ph.ctrlKey||Ph.metaKey||Ph.shiftKey)return!1;let Fh=Ph.target;if(!Fh)return!1;let Ih=Fh.closest(`a`);if(!Ih)return!1;let Lh=Ih.href;return isCrossOriginHttpUrl(Lh,window.location.origin)?(Ph.preventDefault(),window.open(Lh,`_blank`,`noopener,noreferrer`),!0):!1}function isExternalHref(Ph){if(!Ph||Ph.startsWith(`//`)||Ph.startsWith(`http://`)||Ph.startsWith(`https://`)||Ph.startsWith(`mailto:`)||Ph.startsWith(`tel:`)||Ph.startsWith(`ftp://`))return!0;let Fh=Ph.indexOf(`:`);if(Fh>0){let Ih=Ph.indexOf(`/`);if(Ih===-1||Ih>Fh)return!0}return!1}function resolveWorkspaceLink(Ph,Fh){if(!Fh||isExternalHref(Fh)||Fh.startsWith(`#`))return null;let Ih=stripFragmentAndQuery$1(Fh);if(Ih.length===0)return null;let Lh;if(Ih.startsWith(`/`))Lh=Ih.slice(1);else{let Fh=posixDirname(Ph);Lh=Fh===``?Ih:`${Fh}/${Ih}`}return normalizeWorkspacePath$1(Lh)}function stripFragmentAndQuery$1(Ph){let Fh=Ph.indexOf(`#`),Ih=Ph.indexOf(`?`),Lh=Ph.length;return Fh!==-1&&Fh<Lh&&(Lh=Fh),Ih!==-1&&Ih<Lh&&(Lh=Ih),Ph.slice(0,Lh)}function extractSessionIdFromPath(Ph){let Fh=`chat/`,Ih=`.jsonl`;if(!Ph.startsWith(`chat/`)||!Ph.endsWith(`.jsonl`))return null;let Lh=Ph.slice(5,Ph.length-6);return Lh.length===0||Lh.includes(`/`)?null:Lh}function posixDirname(Ph){let Fh=Ph.lastIndexOf(`/`);return Fh===-1?``:Ph.slice(0,Fh)}function normalizeWorkspacePath$1(Ph){if(Ph.length===0)return null;let Fh=Ph.split(`/`),Ih=[];for(let Ph of Fh)if(!(Ph===``||Ph===`.`)){if(Ph===`..`){if(Ih.length===0)return null;Ih.pop();continue}Ih.push(Ph)}return Ih.length===0?null:Ih.join(`/`)}var WIKI_PAGE_PATTERN=/(?:data\/)?wiki\/pages\/([^/]+)\.md$/,CHAT_LOG_PREFIX=`conversations/`;function classifyWorkspacePath(Ph){if(!Ph||isExternalHref(Ph)||Ph.startsWith(`#`))return null;let Fh=stripFragmentAndQuery(Ph);if(Fh.length===0)return null;let Ih=normalizePath(Fh);if(!Ih)return null;let Lh=Ih.match(WIKI_PAGE_PATTERN);if(Lh)return{kind:`wiki`,slug:Lh[1]};if(Ih.startsWith(CHAT_LOG_PREFIX)){let Ph=extractSessionIdFromPath(Ih.slice(14));if(Ph)return{kind:`session`,sessionId:Ph}}return{kind:`file`,path:Ih}}function resolveWikiHref(Ph,Fh){return isExternalHref(Ph)?Ph:Ph.startsWith(`./`)||Ph.startsWith(`../`)||!Ph.includes(`/`)?`${Fh}/${Ph}`:Ph}function stripFragmentAndQuery(Ph){let Fh=Ph.indexOf(`#`),Ih=Ph.indexOf(`?`),Lh=Ph.length;return Fh!==-1&&Fh<Lh&&(Lh=Fh),Ih!==-1&&Ih<Lh&&(Lh=Ih),Ph.slice(0,Lh)}function normalizePath(Ph){if(Ph.length===0)return null;let Fh=Ph.split(`/`),Ih=[];for(let Ph of Fh)if(!(Ph===``||Ph===`.`)){if(Ph===`..`){if(Ih.length===0)return null;Ih.pop();continue}Ih.push(Ph)}return Ih.length===0?null:Ih.join(`/`)}var APP_API_KEY=Symbol(`appApi`);function provideAppApi(Ph){provide(APP_API_KEY,Ph)}function useAppApi(){let Ph=inject(APP_API_KEY);if(!Ph)throw Error(`useAppApi() called outside an App.vue subtree — provideAppApi must run first.`);return Ph}var EVENT_TYPES={status:`status`,text:`text`,toolCall:`tool_call`,toolCallResult:`tool_call_result`,toolResult:`tool_result`,switchRole:`switch_role`,error:`error`,claudeSessionId:`claude_session_id`,sessionFinished:`session_finished`,sessionMeta:`session_meta`,rolesUpdated:`roles_updated`,generationStarted:`generation_started`,generationFinished:`generation_finished`},GENERATION_KINDS={beatImage:`beatImage`,characterImage:`characterImage`,beatAudio:`beatAudio`,movie:`movie`};function generationKey(Ph,Fh,Ih){return`${Ph}\u001f${Fh}\u001f${Ih}`}var CHAT_SERVICE_ROUTES={message:`/api/transports/:transportId/chats/:externalChatId`,connect:`/api/transports/:transportId/chats/:externalChatId/connect`},API_ROUTES={health:`/api/health`,sandbox:`/api/sandbox`,agent:{run:`/api/agent`,cancel:`/api/agent/cancel`,internal:{toolResult:`/api/internal/tool-result`,switchRole:`/api/internal/switch-role`}},chart:{present:`/api/present-chart`},chatIndex:{rebuild:`/api/chat-index/rebuild`},chatService:CHAT_SERVICE_ROUTES,config:{base:`/api/config`,settings:`/api/config/settings`,mcp:`/api/config/mcp`,workspaceDirs:`/api/config/workspace-dirs`,referenceDirs:`/api/config/reference-dirs`,schedulerOverrides:`/api/config/scheduler-overrides`},files:{tree:`/api/files/tree`,dir:`/api/files/dir`,content:`/api/files/content`,raw:`/api/files/raw`,refRoots:`/api/files/ref-roots`},html:{generate:`/api/generate-html`,edit:`/api/edit-html`,present:`/api/present-html`},image:{generate:`/api/generate-image`,edit:`/api/edit-image`,upload:`/api/images`,update:`/api/images/update`},mcpTools:{list:`/api/mcp-tools`,invoke:`/api/mcp-tools/:tool`},notifications:{test:`/api/notifications/test`},mulmoScript:{save:`/api/mulmo-script`,updateBeat:`/api/mulmo-script/update-beat`,updateScript:`/api/mulmo-script/update-script`,beatImage:`/api/mulmo-script/beat-image`,beatAudio:`/api/mulmo-script/beat-audio`,generateBeatAudio:`/api/mulmo-script/generate-beat-audio`,renderBeat:`/api/mulmo-script/render-beat`,uploadBeatImage:`/api/mulmo-script/upload-beat-image`,characterImage:`/api/mulmo-script/character-image`,renderCharacter:`/api/mulmo-script/render-character`,uploadCharacterImage:`/api/mulmo-script/upload-character-image`,movieStatus:`/api/mulmo-script/movie-status`,generateMovie:`/api/mulmo-script/generate-movie`,downloadMovie:`/api/mulmo-script/download-movie`},pdf:{markdown:`/api/pdf/markdown`},plugins:{presentDocument:`/api/present-document`,updateMarkdown:`/api/markdowns/update`,presentSpreadsheet:`/api/present-spreadsheet`,updateSpreadsheet:`/api/spreadsheets/update`,mindmap:`/api/mindmap`,quiz:`/api/quiz`,form:`/api/form`,canvas:`/api/canvas`,present3d:`/api/present3d`},roles:{list:`/api/roles`,manage:`/api/roles/manage`},scheduler:{base:`/api/scheduler`,tasks:`/api/scheduler/tasks`,task:`/api/scheduler/tasks/:id`,taskRun:`/api/scheduler/tasks/:id/run`,logs:`/api/scheduler/logs`},sessions:{list:`/api/sessions`,detail:`/api/sessions/:id`,markRead:`/api/sessions/:id/mark-read`},skills:{list:`/api/skills`,detail:`/api/skills/:name`,create:`/api/skills`,update:`/api/skills/:name`,remove:`/api/skills/:name`},sources:{list:`/api/sources`,create:`/api/sources`,remove:`/api/sources/:slug`,rebuild:`/api/sources/rebuild`,manage:`/api/sources/manage`},news:{items:`/api/news/items`,itemBody:`/api/news/items/:id/body`,readState:`/api/news/read-state`},todos:{list:`/api/todos`,dispatch:`/api/todos`,items:`/api/todos/items`,item:`/api/todos/items/:id`,itemMove:`/api/todos/items/:id/move`,columns:`/api/todos/columns`,column:`/api/todos/columns/:id`,columnsOrder:`/api/todos/columns/order`},wiki:{base:`/api/wiki`}};function errorMessage(Ph,Fh){return Ph instanceof Error?Ph.message:Fh===void 0?String(Ph):Fh}function isRecord(Ph){return typeof Ph==`object`&&!!Ph&&!Array.isArray(Ph)}function isObj(Ph){return typeof Ph==`object`&&!!Ph}function isNonEmptyString(Ph){return typeof Ph==`string`&&Ph.trim().length>0}function hasStringProp(Ph,Fh){return isRecord(Ph)&&typeof Ph[Fh]==`string`}var authToken=null;function setAuthToken(Ph){authToken=Ph}function buildQueryString(Ph){if(!Ph)return``;let Fh=[];for(let[Ih,Lh]of Object.entries(Ph))Lh!==void 0&&Fh.push(`${encodeURIComponent(Ih)}=${encodeURIComponent(String(Lh))}`);return Fh.length===0?``:`?${Fh.join(`&`)}`}function buildHeaders(Ph,Fh){let Ih={...Ph.headers??{}};return Fh&&Ih[`Content-Type`]===void 0&&(Ih[`Content-Type`]=`application/json`),authToken&&Ih.Authorization===void 0&&(Ih.Authorization=`Bearer ${authToken}`),Ih}async function extractError(Ph){let Fh=Ph.status;try{let Ih=await Ph.clone().json();if(hasStringProp(Ih,`error`))return{error:Ih.error,status:Fh}}catch{}return{error:Ph.statusText||`Request failed (${Fh})`,status:Fh}}async function apiCall(Ph,Fh={}){let Ih=Fh.method??`GET`,Lh=Fh.body!==void 0,Rh=`${Ph}${buildQueryString(Fh.query)}`,zh={method:Ih,headers:buildHeaders(Fh,Lh),signal:Fh.signal};Lh&&(zh.body=JSON.stringify(Fh.body));let Bh;try{Bh=await fetch(Rh,zh)}catch(Ph){return{ok:!1,error:errorMessage(Ph),status:0}}if(!Bh.ok){let{error:Ph,status:Fh}=await extractError(Bh);return{ok:!1,error:Ph,status:Fh}}try{return{ok:!0,data:await Bh.json()}}catch(Ph){return{ok:!1,error:`Invalid JSON response: ${errorMessage(Ph)}`,status:Bh.status}}}function apiGet(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`GET`,query:Fh})}function apiPost(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`POST`,body:Fh})}function apiPut(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`PUT`,body:Fh})}function apiDelete(Ph,Fh,Ih={}){return apiCall(Ph,{...Ih,method:`DELETE`,body:Fh})}async function apiFetchRaw(Ph,Fh={}){let Ih=`${Ph}${buildQueryString(Fh.query)}`,Lh={method:Fh.method??`GET`,headers:buildHeaders(Fh,!1),body:Fh.body,signal:Fh.signal};return fetch(Ih,Lh)}function usePdfDownload(){let Ph=ref(!1),Fh=ref(null);async function Ih(Ih,Lh){Fh.value=null,Ph.value=!0;let Rh=null;try{let Ph=await apiFetchRaw(API_ROUTES.pdf.markdown,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({markdown:Ih,filename:Lh})});if(!Ph.ok){let Ih=await Ph.text().catch(()=>``);Fh.value=`PDF error ${Ph.status}: ${Ih}`;return}let zh=await Ph.blob();Rh=URL.createObjectURL(zh);let Bh=document.createElement(`a`);Bh.href=Rh,Bh.download=Lh,Bh.click()}catch(Ph){Fh.value=errorMessage(Ph)}finally{Rh&&URL.revokeObjectURL(Rh),Ph.value=!1}}return{pdfDownloading:Ph,pdfError:Fh,downloadPdf:Ih}}function useClipboardCopy(Ph=2e3){let Fh=ref(!1);async function Ih(Ih){try{await navigator.clipboard.writeText(Ih),Fh.value=!0,setTimeout(()=>{Fh.value=!1},Ph)}catch{}}return{copied:Fh,copy:Ih}}var UNSAFE_FILENAME_CHARS=/[/\\:*?"<>|]/g;function toSafeFilename(Ph,Fh=`download`){return Ph.replace(UNSAFE_FILENAME_CHARS,`_`).trim()||Fh}function formatLocalDate(Ph){let Fh=new Date(Ph);return`${Fh.getFullYear()}-${String(Fh.getMonth()+1).padStart(2,`0`)}-${String(Fh.getDate()).padStart(2,`0`)}`}function buildPdfFilename(Ph){return`${toSafeFilename(Ph.name??``,Ph.fallback)}-${formatLocalDate(Ph.timestampMs??Date.now())}.pdf`}var MAX_TITLE_CHARS=50;function extractTextResponseTitle(Ph){let Fh=null;for(let Ih of Ph.split(`
101
101
  `)){let Ph=Ih.trim();if(Ph){if(Ph.startsWith(`# `))return Ph.slice(2).trim().slice(0,MAX_TITLE_CHARS);Fh===null&&(Fh=Ph)}}return(Fh??``).slice(0,MAX_TITLE_CHARS)}var _hoisted_1$70={class:`h-full flex flex-col`},_hoisted_2$69={key:0,class:`flex items-center justify-end gap-2 px-3 py-2 border-b border-gray-100 shrink-0`},_hoisted_3$65=[`disabled`],_hoisted_4$52={class:`material-icons text-base`},_hoisted_5$46=[`title`],_hoisted_6$45={class:`text-response-container`},_hoisted_7$42={class:`text-response-content-wrapper`},_hoisted_8$39={class:`p-6`},_hoisted_9$34={class:`max-w-3xl mx-auto space-y-4`},_hoisted_10$33={class:`flex justify-between items-start mb-2 text-sm text-gray-500`},_hoisted_11$30={class:`font-medium text-gray-700`},_hoisted_12$29={key:0,class:`italic`},_hoisted_13$27=[`innerHTML`],_hoisted_14$25={"data-testid":`text-response-edit-summary`},_hoisted_15$23=[`disabled`],_hoisted_16$21=[`title`],_hoisted_17$21={class:`material-icons`},View_vue_vue_type_script_setup_true_lang_default$15=defineComponent({__name:`View`,props:{selectedResult:{},editable:{type:Boolean,default:!0},editableSource:{default:void 0}},emits:[`updateResult`,`updateSource`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=useAppApi(),Rh=Ph,zh=Fh,Bh=computed(()=>Rh.selectedResult.data?.text??``),Vh=computed(()=>Rh.editableSource===void 0?Bh.value:Rh.editableSource),Hh=ref(Vh.value);watch(Vh,Ph=>{Hh.value=Ph});let Uh=computed(()=>Rh.selectedResult.data?.role??`assistant`),Wh=computed(()=>Rh.selectedResult.data?.transportKind??``),Gh=computed(()=>{if(!Bh.value)return``;let Ph=Bh.value,Fh=Ph.trim();if(Fh.startsWith(`{`)&&Fh.endsWith(`}`)||Fh.startsWith(`[`)&&Fh.endsWith(`]`))try{JSON.parse(Fh),Ph="```json\n"+Fh+"\n```"}catch{}return Ph=Ph.replace(/<think>([\s\S]*?)<\/think>/g,(Ph,Fh)=>`<div class="think-block">${g$3(Fh.trim())}</div>`),g$3(Ph,{breaks:!0,gfm:!0})}),Kh=computed(()=>{switch(Uh.value){case`system`:return`System`;case`user`:return`You`;default:return`Assistant`}}),qh=computed(()=>{switch(Uh.value){case`system`:return`bg-blue-50 border-blue-200`;case`user`:return`bg-green-50 border-green-200`;default:return`bg-purple-50 border-purple-200`}}),Jh=computed(()=>Hh.value!==Vh.value);function Yh(){Jh.value&&(Rh.editableSource===void 0?zh(`updateResult`,{...Rh.selectedResult,data:{...Rh.selectedResult.data,text:Hh.value}}):zh(`updateSource`,Hh.value),tg.value&&(tg.value.open=!1))}let Xh=computed(()=>(Rh.selectedResult.data?.role??`assistant`)===`assistant`);function Zh(Ph){if(handleExternalLinkClick(Ph))return;let Fh=Ph.target.closest(`a`);if(!Fh)return;let Ih=Fh.getAttribute(`href`);!Ih||Ih.startsWith(`#`)||classifyWorkspacePath(Ih)&&(Ph.preventDefault(),Lh.navigateToWorkspacePath(Ih))}let{pdfDownloading:Qh,pdfError:$h,downloadPdf:eg}=usePdfDownload(),tg=ref(),ng=ref(!1);function rg(Ph){ng.value=Ph.target.open}onMounted(()=>{tg.value?.addEventListener(`toggle`,rg)}),onBeforeUnmount(()=>{tg.value?.removeEventListener(`toggle`,rg)});function ig(){tg.value&&(tg.value.open=!1),Hh.value=Vh.value}let{copied:ag,copy:og}=useClipboardCopy();async function sg(){await og(Rh.selectedResult.data?.text??``)}async function cg(){let Ph=Rh.selectedResult.data?.text??``;await eg(Ph,buildPdfFilename({name:extractTextResponseTitle(Ph),fallback:`chat`,timestampMs:Lh.getResultTimestamp(Rh.selectedResult.uuid)}))}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$70,[Xh.value?(openBlock(),createElementBlock(`div`,_hoisted_2$69,[createBaseVNode(`button`,{class:`h-8 px-2.5 flex items-center gap-1 rounded bg-green-600 hover:bg-green-700 text-white text-sm disabled:opacity-60 disabled:cursor-not-allowed transition-colors`,disabled:unref(Qh),onClick:cg},[createBaseVNode(`span`,_hoisted_4$52,toDisplayString$1(unref(Qh)?`hourglass_empty`:`download`),1),createTextVNode(` `+toDisplayString$1(unref(Ih)(`pluginTextResponse.pdf`)),1)],8,_hoisted_3$65),unref($h)?(openBlock(),createElementBlock(`span`,{key:0,class:`text-xs text-red-500`,title:unref($h)},toDisplayString$1(unref(Ih)(`pluginTextResponse.pdfFailed`)),9,_hoisted_5$46)):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex-1 overflow-hidden relative`,onClickCapture:Zh},[createBaseVNode(`div`,_hoisted_6$45,[createBaseVNode(`div`,_hoisted_7$42,[createBaseVNode(`div`,_hoisted_8$39,[createBaseVNode(`div`,_hoisted_9$34,[createBaseVNode(`div`,{class:normalizeClass([`rounded-lg border border-gray-300 bg-white shadow-sm p-5`,qh.value])},[createBaseVNode(`div`,_hoisted_10$33,[createBaseVNode(`span`,_hoisted_11$30,toDisplayString$1(Kh.value),1),Wh.value?(openBlock(),createElementBlock(`span`,_hoisted_12$29,toDisplayString$1(Wh.value),1)):createCommentVNode(``,!0)]),createBaseVNode(`div`,{class:`markdown-content prose prose-slate max-w-none leading-relaxed text-gray-900`,innerHTML:Gh.value},null,8,_hoisted_13$27)],2)])])]),Ph.editable?(openBlock(),createElementBlock(`details`,{key:0,ref_key:`detailsEl`,ref:tg,class:`text-response-source`,"data-testid":`text-response-edit`},[createBaseVNode(`summary`,_hoisted_14$25,toDisplayString$1(unref(Ih)(`pluginTextResponse.editContent`)),1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Lh[0]||=Ph=>Hh.value=Ph,class:`text-response-editor`,spellcheck:`false`,"data-testid":`text-response-edit-textarea`},null,512),[[vModelText,Hh.value]]),createBaseVNode(`button`,{class:`apply-btn`,disabled:!Jh.value,"data-testid":`text-response-apply-btn`,onClick:Yh},toDisplayString$1(unref(Ih)(`pluginTextResponse.applyChanges`)),9,_hoisted_15$23)],512)):createCommentVNode(``,!0)]),withDirectives(createBaseVNode(`button`,{class:`copy-btn`,title:unref(ag)?unref(Ih)(`pluginTextResponse.copiedLabel`):unref(Ih)(`pluginTextResponse.copyLabel`),onClick:sg},[createBaseVNode(`span`,_hoisted_17$21,toDisplayString$1(unref(ag)?`check`:`content_copy`),1)],8,_hoisted_16$21),[[vShow,!ng.value]]),withDirectives(createBaseVNode(`button`,{class:`cancel-btn`,onClick:ig},toDisplayString$1(unref(Ih)(`pluginTextResponse.cancel`)),513),[[vShow,ng.value]])],32)]))}}),_plugin_vue_export_helper_default=(Ph,Fh)=>{let Ih=Ph.__vccOpts||Ph;for(let[Ph,Lh]of Fh)Ih[Ph]=Lh;return Ih},View_default$15=_plugin_vue_export_helper_default(View_vue_vue_type_script_setup_true_lang_default$15,[[`__scopeId`,`data-v-d850c9ce`]]),Preview_vue_vue_type_script_setup_true_lang_default$15=defineComponent({__name:`Preview`,props:{result:{}},setup(Ph){let Fh=Ph,Ih=computed(()=>Fh.result.data?.role??`assistant`),Lh=computed(()=>{switch(Ih.value){case`system`:return`text-blue-700`;case`user`:return`text-green-700 font-medium`;default:return`text-gray-700`}}),Rh=computed(()=>zh(Fh.result.data?.text??``));function zh(Ph){let Fh=g$3(Ph,{breaks:!0,gfm:!0}).replace(/<\/(td|th)>/gi,` `).replace(/<\/(p|h[1-6]|li|tr|blockquote|pre|div)>/gi,`$&
102
102
  `).replace(/<br\s*\/?>/gi,`
103
103
  `);return(new DOMParser().parseFromString(Fh,`text/html`).body.textContent??``).replace(/\n{3,}/g,`
104
104
 
105
- `).trim()}return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`preview-text p-2 text-sm leading-snug`,Lh.value])},toDisplayString$1(Rh.value),3))}}),Preview_default$15=_plugin_vue_export_helper_default(Preview_vue_vue_type_script_setup_true_lang_default$15,[[`__scopeId`,`data-v-dde9750a`]]),plugin={...pluginCore,viewComponent:View_default$15,previewComponent:Preview_default$15,samples},textResponse_default={plugin},TOOL_NAME$11=`presentDocument`;function isFilePath(Ph){return Ph.endsWith(`.md`)?Ph.startsWith(`artifacts/documents/`):!1}var toolDefinition$14={type:`function`,name:TOOL_NAME$11,description:`Display a document in markdown format.`,prompt:`Use the ${TOOL_NAME$11} tool when the user asks for a document that combines text with embedded images — guides, reports, tutorials, articles, or any structured content with visuals. Prefer this over standalone image generation when the user wants informational content with supporting visuals.\n\nFormat embedded images as: ![Detailed image prompt](__too_be_replaced_image_path__)`,parameters:{type:`object`,properties:{title:{type:`string`,description:`Title for the document`},markdown:{type:`string`,description:`The markdown content to display. Describe embedded images in the following format: ![Detailed image prompt](__too_be_replaced_image_path__). IMPORTANT: For embedded images, you MUST use the EXACT placeholder path '__too_be_replaced_image_path__'.`},filenamePrefix:{type:`string`,description:`Short English filename prefix (without extension). Use lowercase with hyphens, e.g. 'project-summary'. The server sanitizes the value and appends a random id to prevent collisions.`}},required:[`title`,`markdown`,`filenamePrefix`]}},imageBumps=reactive({});function getImageBump(Ph){return imageBumps[Ph]??0}function bumpImage(Ph){imageBumps[Ph]=Date.now()}function resolveImageSrc(Ph){return Ph.startsWith(`data:`)?Ph:`${API_ROUTES.files.raw}?path=${encodeURIComponent(Ph)}`}function resolveImageSrcFresh(Ph){if(Ph.startsWith(`data:`))return Ph;let Fh=`${API_ROUTES.files.raw}?path=${encodeURIComponent(Ph)}`,Ih=getImageBump(Ph);return Ih>0?`${Fh}&v=${Ih}`:Fh}function shouldSkip(Ph){return!!(Ph.startsWith(`data:`)||Ph.startsWith(`http://`)||Ph.startsWith(`https://`)||Ph.startsWith(`/api/`))}function resolveWorkspacePath(Ph,Fh){let Ih=Fh.startsWith(`/`),Lh=[...Ih?[]:Ph.split(`/`).filter(Ph=>Ph!==``&&Ph!==`.`)],Rh=(Ih?Fh.slice(1):Fh).split(`/`);for(let Ph of Rh)if(!(Ph===``||Ph===`.`)){if(Ph===`..`){if(Lh.length===0)return null;Lh.pop();continue}Lh.push(Ph)}return Lh.length===0?null:Lh.join(`/`)}function extractBracketedAlt(Ph){if(!Ph.startsWith(`![`))return null;let Fh=1;for(let Ih=2;Ih<Ph.length;Ih++){let Lh=Ph[Ih];if(Lh===`[`)Fh++;else if(Lh===`]`&&(Fh--,Fh===0))return Ph.slice(2,Ih)}return null}function rewriteImageToken(Ph,Fh){let Ih=(Ph.href??``).trim();if(Ih===``||shouldSkip(Ih))return null;let Lh=resolveWorkspacePath(Fh,Ih);if(Lh===null)return null;let Rh=resolveImageSrc(Lh),zh=extractBracketedAlt(Ph.raw)??Ph.text??``;return Ph.title?`![${zh}](${Rh} "${Ph.title.replace(/"/g,`\\"`)}")`:`![${zh}](${Rh})`}function isSkippable(Ph){return Ph.type===`code`||Ph.type===`codespan`||Ph.type===`html`}function getContainerChildren(Ph){let Fh=Ph;return Array.isArray(Fh.tokens)&&Fh.tokens.length>0?Fh.tokens:Array.isArray(Fh.items)&&Fh.items.length>0?Fh.items:null}function renderContainerChildren(Ph,Fh,Ih,Lh){let Rh=Fh.map(Ph=>Ph.raw??``).join(``);if(Rh===``)return!1;let zh=Ph.indexOf(Rh);if(zh<0)return!1;zh>0&&Lh.push(Ph.slice(0,zh));for(let Ph of Fh)renderToken(Ph,Ih,Lh);let Bh=Ph.slice(zh+Rh.length);return Bh&&Lh.push(Bh),!0}function renderToken(Ph,Fh,Ih){if(isSkippable(Ph)){Ih.push(Ph.raw);return}if(Ph.type===`image`){let Lh=rewriteImageToken(Ph,Fh);Ih.push(Lh??Ph.raw);return}let Lh=Ph.raw??``,Rh=getContainerChildren(Ph);Rh&&renderContainerChildren(Lh,Rh,Fh,Ih)||Ih.push(Lh)}function rewriteMarkdownImageRefs(Ph,Fh=``){let Ih=g$3.lexer(Ph),Lh=[];for(let Ph of Ih)renderToken(Ph,Fh,Lh);return Lh.join(``)}var TASK_LINE=/^(\s*(?:>\s*)*)([-*+]|\d+[.)])(\s+)\[([ xX])\]/,FENCE_LINE=/^( {0,3})(`{3,}|~{3,})/,BLOCKQUOTE_PREFIX=/^(\s*(?:>\s?)+)/;function stepFence(Ph,Fh){let Ih=Ph.match(BLOCKQUOTE_PREFIX),Lh=Ih?Ph.slice(Ih[0].length):Ph,Rh=Lh.match(FENCE_LINE);if(Rh){let Ph=Rh[2];if(!Fh.inFence)return Fh.inFence=!0,Fh.marker=Ph,!0;let Ih=Lh.slice(Rh[0].length);return Fh.marker&&Ph[0]===Fh.marker[0]&&Ph.length>=Fh.marker.length&&/^\s*$/.test(Ih)?(Fh.inFence=!1,Fh.marker=null,!0):!0}return Fh.inFence}function flipMark(Ph,Fh){let[Ih,Lh,Rh,zh,Bh]=Fh;return`${Lh}${Rh}${zh}[${Bh===` `?`x`:` `}]`+Ph.slice(Ih.length)}function findTaskLines(Ph){let Fh=Ph.split(`
105
+ `).trim()}return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`preview-text p-2 text-sm leading-snug`,Lh.value])},toDisplayString$1(Rh.value),3))}}),Preview_default$15=_plugin_vue_export_helper_default(Preview_vue_vue_type_script_setup_true_lang_default$15,[[`__scopeId`,`data-v-dde9750a`]]),plugin={...pluginCore,viewComponent:View_default$15,previewComponent:Preview_default$15,samples},textResponse_default={plugin},TOOL_NAME$11=`presentDocument`;function isFilePath(Ph){return Ph.endsWith(`.md`)?Ph.startsWith(`artifacts/documents/`):!1}var toolDefinition$14={type:`function`,name:TOOL_NAME$11,description:`Display a document in markdown format.`,prompt:`Use the ${TOOL_NAME$11} tool when the user asks for a document that combines text with embedded images — guides, reports, tutorials, articles, or any structured content with visuals. Prefer this over standalone image generation when the user wants informational content with supporting visuals.\n\nFormat embedded images as: ![Detailed image prompt](__too_be_replaced_image_path__)`,parameters:{type:`object`,properties:{title:{type:`string`,description:`Title for the document`},markdown:{type:`string`,description:`The markdown content to display. Describe embedded images in the following format: ![Detailed image prompt](__too_be_replaced_image_path__). IMPORTANT: For embedded images, you MUST use the EXACT placeholder path '__too_be_replaced_image_path__'.`},filenamePrefix:{type:`string`,description:`Short English filename prefix (without extension). Use lowercase with hyphens, e.g. 'project-summary'. The server sanitizes the value and appends a random id to prevent collisions.`}},required:[`title`,`markdown`,`filenamePrefix`]}},imageBumps=reactive({});function getImageBump(Ph){return imageBumps[Ph]??0}function bumpImage(Ph){imageBumps[Ph]=Date.now()}function resolveImageSrc(Ph){return Ph.startsWith(`data:`)?Ph:`${API_ROUTES.files.raw}?path=${encodeURIComponent(Ph)}`}function resolveImageSrcFresh(Ph){if(Ph.startsWith(`data:`))return Ph;let Fh=`${API_ROUTES.files.raw}?path=${encodeURIComponent(Ph)}`,Ih=getImageBump(Ph);return Ih>0?`${Fh}&v=${Ih}`:Fh}function shouldSkip$1(Ph){return!!(Ph.startsWith(`data:`)||Ph.startsWith(`http://`)||Ph.startsWith(`https://`)||Ph.startsWith(`/api/`))}function resolveWorkspacePath(Ph,Fh){let Ih=Fh.startsWith(`/`),Lh=[...Ih?[]:Ph.split(`/`).filter(Ph=>Ph!==``&&Ph!==`.`)],Rh=(Ih?Fh.slice(1):Fh).split(`/`);for(let Ph of Rh)if(!(Ph===``||Ph===`.`)){if(Ph===`..`){if(Lh.length===0)return null;Lh.pop();continue}Lh.push(Ph)}return Lh.length===0?null:Lh.join(`/`)}function extractBracketedAlt(Ph){if(!Ph.startsWith(`![`))return null;let Fh=1;for(let Ih=2;Ih<Ph.length;Ih++){let Lh=Ph[Ih];if(Lh===`[`)Fh++;else if(Lh===`]`&&(Fh--,Fh===0))return Ph.slice(2,Ih)}return null}function rewriteImageToken(Ph,Fh){let Ih=(Ph.href??``).trim();if(Ih===``||shouldSkip$1(Ih))return null;let Lh=resolveWorkspacePath(Fh,Ih);if(Lh===null)return null;let Rh=resolveImageSrc(Lh),zh=extractBracketedAlt(Ph.raw)??Ph.text??``;return Ph.title?`![${zh}](${Rh} "${Ph.title.replace(/"/g,`\\"`)}")`:`![${zh}](${Rh})`}function isSkippable(Ph){return Ph.type===`code`||Ph.type===`codespan`||Ph.type===`html`}function getContainerChildren(Ph){let Fh=Ph;return Array.isArray(Fh.tokens)&&Fh.tokens.length>0?Fh.tokens:Array.isArray(Fh.items)&&Fh.items.length>0?Fh.items:null}function renderContainerChildren(Ph,Fh,Ih,Lh){let Rh=Fh.map(Ph=>Ph.raw??``).join(``);if(Rh===``)return!1;let zh=Ph.indexOf(Rh);if(zh<0)return!1;zh>0&&Lh.push(Ph.slice(0,zh));for(let Ph of Fh)renderToken(Ph,Ih,Lh);let Bh=Ph.slice(zh+Rh.length);return Bh&&Lh.push(Bh),!0}function renderToken(Ph,Fh,Ih){if(isSkippable(Ph)){Ih.push(Ph.raw);return}if(Ph.type===`image`){let Lh=rewriteImageToken(Ph,Fh);Ih.push(Lh??Ph.raw);return}let Lh=Ph.raw??``,Rh=getContainerChildren(Ph);Rh&&renderContainerChildren(Lh,Rh,Fh,Ih)||Ih.push(Lh)}function rewriteMarkdownImageRefs(Ph,Fh=``){let Ih=g$3.lexer(Ph),Lh=[];for(let Ph of Ih)renderToken(Ph,Fh,Lh);return Lh.join(``)}var TASK_LINE=/^(\s*(?:>\s*)*)([-*+]|\d+[.)])(\s+)\[([ xX])\]/,FENCE_LINE=/^( {0,3})(`{3,}|~{3,})/,BLOCKQUOTE_PREFIX=/^(\s*(?:>\s?)+)/;function stepFence(Ph,Fh){let Ih=Ph.match(BLOCKQUOTE_PREFIX),Lh=Ih?Ph.slice(Ih[0].length):Ph,Rh=Lh.match(FENCE_LINE);if(Rh){let Ph=Rh[2];if(!Fh.inFence)return Fh.inFence=!0,Fh.marker=Ph,!0;let Ih=Lh.slice(Rh[0].length);return Fh.marker&&Ph[0]===Fh.marker[0]&&Ph.length>=Fh.marker.length&&/^\s*$/.test(Ih)?(Fh.inFence=!1,Fh.marker=null,!0):!0}return Fh.inFence}function flipMark(Ph,Fh){let[Ih,Lh,Rh,zh,Bh]=Fh;return`${Lh}${Rh}${zh}[${Bh===` `?`x`:` `}]`+Ph.slice(Ih.length)}function findTaskLines(Ph){let Fh=Ph.split(`
106
106
  `),Ih={inFence:!1,marker:null},Lh=[];for(let Ph=0;Ph<Fh.length;Ph++){let Rh=Fh[Ph];stepFence(Rh,Ih)||TASK_LINE.test(Rh)&&Lh.push(Ph)}return Lh}function toggleTaskAt(Ph,Fh){if(!Number.isInteger(Fh)||Fh<0)return null;let Ih=findTaskLines(Ph);if(Fh>=Ih.length)return null;let Lh=Ih[Fh],Rh=Ph.split(`
107
107
  `),zh=Rh[Lh].match(TASK_LINE);return zh?(Rh[Lh]=flipMark(Rh[Lh],zh),Rh.join(`
108
108
  `)):null}function makeTasksInteractive(Ph){return Ph.replace(/<input ([^>]*)disabled="" type="checkbox">/g,`<input $1class="md-task" type="checkbox">`)}var _hoisted_1$69={class:`markdown-container`},_hoisted_2$68={key:0,class:`min-h-full p-8 flex items-center justify-center`},_hoisted_3$64={class:`text-gray-500`},_hoisted_4$51={key:1,class:`min-h-full p-8 flex items-center justify-center`},_hoisted_5$45={class:`load-error-banner`,role:`alert`},_hoisted_6$44={key:2,class:`min-h-full p-8 flex items-center justify-center`},_hoisted_7$41={class:`text-gray-500`},_hoisted_8$38={class:`flex items-center justify-end gap-2 px-3 py-2 border-b border-gray-100 shrink-0`},_hoisted_9$33=[`disabled`],_hoisted_10$32={class:`material-icons text-base`},_hoisted_11$29=[`title`],_hoisted_12$28={key:0,class:`load-error-banner`,role:`alert`},_hoisted_13$26={class:`markdown-content-wrapper`},_hoisted_14$24={class:`p-4`},_hoisted_15$22=[`innerHTML`],_hoisted_16$20={class:`bottom-bar-wrapper`},_hoisted_17$20={class:`editor-actions`},_hoisted_18$20=[`disabled`],_hoisted_19$20={key:0,class:`save-error`,role:`alert`},_hoisted_20$16=[`title`],_hoisted_21$16={class:`material-icons`},View_vue_vue_type_script_setup_true_lang_default$14=defineComponent({__name:`View`,props:{selectedResult:{}},emits:[`updateResult`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=useAppApi(),Bh=ref(!1),Vh=ref(!1),Hh=ref(null),Uh=ref(null),Wh=ref(``),Gh=ref(``);async function Kh(){Uh.value=null;let Ph=Lh.selectedResult.data?.markdown;if(!Ph){Wh.value=``,Gh.value=``;return}if(isFilePath(Ph)){Bh.value=!0;let Fh=await apiGet(API_ROUTES.files.content,{path:Ph});if(!Fh.ok){Uh.value=Fh.error,Bh.value=!1;return}Wh.value=Fh.data.content??``,Bh.value=!1}else Wh.value=Ph;Gh.value=Wh.value}Kh();let qh=computed(()=>Gh.value!==Wh.value),Jh=computed(()=>{if(!Wh.value)return``;let Ph=Lh.selectedResult.data?.markdown,Fh=typeof Ph==`string`&&isFilePath(Ph)?Ph.slice(0,Ph.lastIndexOf(`/`)):``;return makeTasksInteractive(g$3(rewriteMarkdownImageRefs(Wh.value,Fh)))});watch(()=>Lh.selectedResult?.viewState?.scrollToAnchor,Ph=>{Ph&&nextTick$1(()=>{let Fh=document.getElementById(Ph);Fh?Fh.scrollIntoView({behavior:`smooth`,block:`start`}):console.warn(`Anchor element with id "${Ph}" not found`)})});let Yh=ref(),Xh=ref(!1),{copied:Zh,copy:Qh}=useClipboardCopy();function $h(Ph){let Fh=Ph.target.open;Xh.value=Fh,Fh||(Gh.value=Wh.value,Hh.value=null)}function eg(){Yh.value&&(Yh.value.open=!1)}async function tg(){await Qh(Wh.value)}let{pdfDownloading:ng,pdfError:rg,downloadPdf:ig}=usePdfDownload();async function ag(){if(!Wh.value)return;let Ph=Lh.selectedResult.data?.filenamePrefix||Lh.selectedResult.title||``,Fh=Lh.selectedResult.uuid,Ih=buildPdfFilename({name:Ph,fallback:`document`,timestampMs:Fh?zh.getResultTimestamp(Fh):void 0});await ig(Wh.value,Ih)}async function og(){let Ph=Lh.selectedResult.data?.markdown;if(Ph){if(Hh.value=null,isFilePath(Ph)){Vh.value=!0;let Fh=await apiPut(API_ROUTES.plugins.updateMarkdown,{relativePath:Ph,markdown:Gh.value});if(Vh.value=!1,!Fh.ok){Hh.value=Fh.error;return}}Wh.value=Gh.value,Rh(`updateResult`,{...Lh.selectedResult,data:{...Lh.selectedResult.data,markdown:isFilePath(Ph)?Ph:Gh.value,pdfPath:void 0}}),Yh.value&&(Yh.value.open=!1)}}let sg=Promise.resolve();async function cg(Ph,Fh){if(Lh.selectedResult.data?.markdown!==Ph)return;let Ih=await apiPut(API_ROUTES.plugins.updateMarkdown,{relativePath:Ph,markdown:Fh});if(Lh.selectedResult.data?.markdown===Ph){if(!Ih.ok){Hh.value=Ih.error,await Kh();return}Hh.value=null}}function lg(Ph){let Fh=Ph.target;if(!(Fh instanceof HTMLInputElement)||Fh.type!==`checkbox`||!Fh.classList.contains(`md-task`))return;if(Xh.value){Fh.checked=!Fh.checked;return}let zh=Ph.currentTarget.querySelectorAll(`input.md-task`),Bh=Array.from(zh).indexOf(Fh);if(Bh<0)return;if(findTaskLines(Wh.value).length!==zh.length){Fh.checked=!Fh.checked,Hh.value=Ih(`pluginMarkdown.taskCountMismatch`);return}let Vh=toggleTaskAt(Wh.value,Bh);if(Vh===null){Fh.checked=!Fh.checked;return}Wh.value=Vh,Gh.value=Vh;let Uh=Lh.selectedResult.data?.markdown;typeof Uh==`string`&&isFilePath(Uh)?sg=sg.then(()=>cg(Uh,Vh)):Rh(`updateResult`,{...Lh.selectedResult,data:{...Lh.selectedResult.data,markdown:Vh,pdfPath:void 0}})}return watch(()=>Lh.selectedResult.data?.markdown,()=>{Kh()}),(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$69,[Bh.value?(openBlock(),createElementBlock(`div`,_hoisted_2$68,[createBaseVNode(`div`,_hoisted_3$64,toDisplayString$1(unref(Ih)(`pluginMarkdown.loading`)),1)])):Uh.value&&!Wh.value?(openBlock(),createElementBlock(`div`,_hoisted_4$51,[createBaseVNode(`div`,_hoisted_5$45,toDisplayString$1(unref(Ih)(`pluginMarkdown.loadFailed`,{error:Uh.value})),1)])):Wh.value?(openBlock(),createElementBlock(Fragment,{key:3},[createBaseVNode(`div`,_hoisted_8$38,[createBaseVNode(`button`,{class:`h-8 px-2.5 flex items-center gap-1 rounded bg-green-600 hover:bg-green-700 text-white text-sm disabled:opacity-60 disabled:cursor-not-allowed transition-colors`,disabled:unref(ng),onClick:ag},[createBaseVNode(`span`,_hoisted_10$32,toDisplayString$1(unref(ng)?`hourglass_empty`:`download`),1),createTextVNode(` `+toDisplayString$1(unref(Ih)(`pluginMarkdown.pdf`)),1)],8,_hoisted_9$33),unref(rg)?(openBlock(),createElementBlock(`span`,{key:0,class:`text-xs text-red-500`,title:unref(rg)},toDisplayString$1(unref(Ih)(`pluginMarkdown.pdfFailedShort`)),9,_hoisted_11$29)):createCommentVNode(``,!0)]),Uh.value?(openBlock(),createElementBlock(`div`,_hoisted_12$28,toDisplayString$1(unref(Ih)(`pluginMarkdown.refreshFailed`,{error:Uh.value})),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_13$26,[createBaseVNode(`div`,_hoisted_14$24,[createBaseVNode(`div`,{class:`markdown-content prose prose-slate max-w-none`,onClick:lg,innerHTML:Jh.value},null,8,_hoisted_15$22)])]),createBaseVNode(`div`,_hoisted_16$20,[createBaseVNode(`details`,{ref_key:`sourceDetails`,ref:Yh,class:`markdown-source`,onToggle:$h},[createBaseVNode(`summary`,null,toDisplayString$1(unref(Ih)(`pluginMarkdown.editSource`)),1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Fh[0]||=Ph=>Gh.value=Ph,class:`markdown-editor`,spellcheck:`false`},null,512),[[vModelText,Gh.value]]),createBaseVNode(`div`,_hoisted_17$20,[createBaseVNode(`button`,{class:`apply-btn`,disabled:!qh.value||Vh.value,onClick:og},toDisplayString$1(Vh.value?unref(Ih)(`pluginMarkdown.saving`):unref(Ih)(`pluginMarkdown.applyChanges`)),9,_hoisted_18$20),createBaseVNode(`button`,{class:`cancel-btn`,onClick:eg},toDisplayString$1(unref(Ih)(`pluginMarkdown.cancel`)),1)]),Hh.value?(openBlock(),createElementBlock(`p`,_hoisted_19$20,toDisplayString$1(unref(Ih)(`pluginMarkdown.saveError`,{error:Hh.value})),1)):createCommentVNode(``,!0)],544),withDirectives(createBaseVNode(`button`,{class:`copy-btn`,title:unref(Zh)?unref(Ih)(`pluginMarkdown.copiedLabel`):unref(Ih)(`pluginMarkdown.copyLabel`),onClick:tg},[createBaseVNode(`span`,_hoisted_21$16,toDisplayString$1(unref(Zh)?`check`:`content_copy`),1)],8,_hoisted_20$16),[[vShow,!Xh.value]])])],64)):(openBlock(),createElementBlock(`div`,_hoisted_6$44,[createBaseVNode(`div`,_hoisted_7$41,toDisplayString$1(unref(Ih)(`pluginMarkdown.noContent`)),1)]))]))}}),View_default$14=_plugin_vue_export_helper_default(View_vue_vue_type_script_setup_true_lang_default$14,[[`__scopeId`,`data-v-6920dff7`]]);function extractFirstH1(Ph){for(let Fh of splitLines(Ph)){if(Fh.length<2||Fh[0]!==`#`||!isInlineSpace(Fh.charCodeAt(1)))continue;let Ph=Fh.slice(2).trim();if(Ph.length>0)return Ph}return null}function splitLines(Ph){return Ph.split(/\r\n|\r|\n/)}function isInlineSpace(Ph){return Ph===32||Ph===9}var _hoisted_1$68={class:`p-2 bg-purple-100 rounded overflow-hidden`},_hoisted_2$67={class:`text-sm text-gray-800 font-medium truncate`},_hoisted_3$63={key:0,class:`text-xs text-gray-500 mt-1 line-clamp-4 whitespace-pre-line`},Preview_vue_vue_type_script_setup_true_lang_default$14=defineComponent({__name:`Preview`,props:{result:{}},setup(Ph){let Fh=Ph,Ih=ref(``);async function Lh(){let Ph=Fh.result.data?.markdown;if(!Ph||!isFilePath(Ph)){Ih.value=``;return}let Lh=await apiGet(API_ROUTES.files.content,{path:Ph});if(!Lh.ok){Ih.value=``;return}Ih.value=Lh.data.content??``}Lh(),watch(()=>Fh.result.data?.markdown,Lh);let Rh=computed(()=>{if(Fh.result.title)return Fh.result.title;let Ph=zh.value;if(Ph){let Fh=extractFirstH1(Ph);if(Fh)return Fh}return`Markdown Document`}),zh=computed(()=>{let Ph=Fh.result.data?.markdown;return Ph?isFilePath(Ph)?Ih.value:Ph:``});function Bh(Ph){return Ph.split(`
@@ -284,7 +284,7 @@ T* `):Ph.join(` Tj
284
284
  `),Fh}},Cross:{createAppearanceStream:function(Ph){var Fh={D:{Off:$$4.RadioButton.Cross.OffPushDown},N:{}};return Fh.N[Ph]=$$4.RadioButton.Cross.YesNormal,Fh.D[Ph]=$$4.RadioButton.Cross.YesPushDown,Fh},getCA:function(){return`8`},YesNormal:function(Ph){var Fh=ts$1(Ph);Fh.scope=Ph.scope;var Ih=[],Lh=$$4.internal.calculateCross(Ph);return Ih.push(`q`),Ih.push(`1 1 `+Q$3($$4.internal.getWidth(Ph)-2)+` `+Q$3($$4.internal.getHeight(Ph)-2)+` re`),Ih.push(`W`),Ih.push(`n`),Ih.push(Q$3(Lh.x1.x)+` `+Q$3(Lh.x1.y)+` m`),Ih.push(Q$3(Lh.x2.x)+` `+Q$3(Lh.x2.y)+` l`),Ih.push(Q$3(Lh.x4.x)+` `+Q$3(Lh.x4.y)+` m`),Ih.push(Q$3(Lh.x3.x)+` `+Q$3(Lh.x3.y)+` l`),Ih.push(`s`),Ih.push(`Q`),Fh.stream=Ih.join(`
285
285
  `),Fh},YesPushDown:function(Ph){var Fh=ts$1(Ph);Fh.scope=Ph.scope;var Ih=$$4.internal.calculateCross(Ph),Lh=[];return Lh.push(`0.749023 g`),Lh.push(`0 0 `+Q$3($$4.internal.getWidth(Ph))+` `+Q$3($$4.internal.getHeight(Ph))+` re`),Lh.push(`f`),Lh.push(`q`),Lh.push(`1 1 `+Q$3($$4.internal.getWidth(Ph)-2)+` `+Q$3($$4.internal.getHeight(Ph)-2)+` re`),Lh.push(`W`),Lh.push(`n`),Lh.push(Q$3(Ih.x1.x)+` `+Q$3(Ih.x1.y)+` m`),Lh.push(Q$3(Ih.x2.x)+` `+Q$3(Ih.x2.y)+` l`),Lh.push(Q$3(Ih.x4.x)+` `+Q$3(Ih.x4.y)+` m`),Lh.push(Q$3(Ih.x3.x)+` `+Q$3(Ih.x3.y)+` l`),Lh.push(`s`),Lh.push(`Q`),Fh.stream=Lh.join(`
286
286
  `),Fh},OffPushDown:function(Ph){var Fh=ts$1(Ph);Fh.scope=Ph.scope;var Ih=[];return Ih.push(`0.749023 g`),Ih.push(`0 0 `+Q$3($$4.internal.getWidth(Ph))+` `+Q$3($$4.internal.getHeight(Ph))+` re`),Ih.push(`f`),Fh.stream=Ih.join(`
287
- `),Fh}}},createDefaultAppearanceStream:function(Ph){var Fh=Ph.scope.internal.getFont(Ph.fontName,Ph.fontStyle).id,Ih=Ph.scope.__private__.encodeColorString(Ph.color);return`/`+Fh+` `+Ph.fontSize+` Tf `+Ih}};$$4.internal={Bezier_C:.551915024494,calculateCross:function(Ph){var Fh=$$4.internal.getWidth(Ph),Ih=$$4.internal.getHeight(Ph),Lh=Math.min(Fh,Ih);return{x1:{x:(Fh-Lh)/2,y:(Ih-Lh)/2+Lh},x2:{x:(Fh-Lh)/2+Lh,y:(Ih-Lh)/2},x3:{x:(Fh-Lh)/2,y:(Ih-Lh)/2},x4:{x:(Fh-Lh)/2+Lh,y:(Ih-Lh)/2+Lh}}}},$$4.internal.getWidth=function(Ph){var Fh=0;return e$4(Ph)===`object`&&(Fh=es$1(Ph.Rect[2])),Fh},$$4.internal.getHeight=function(Ph){var Fh=0;return e$4(Ph)===`object`&&(Fh=es$1(Ph.Rect[3])),Fh};var Ms$1=qo$1.addField=function(Ph){if(ms$1(this,Ph),!(Ph instanceof bs$1))throw Error(`Invalid argument passed to jsPDF.addField.`);var Fh;return(Fh=Ph).scope.internal.acroformPlugin.printedOut&&(Fh.scope.internal.acroformPlugin.printedOut=!1,Fh.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),Fh.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(Fh),Ph.page=Ph.scope.internal.getCurrentPageInfo().pageNumber,this};qo$1.AcroFormChoiceField=xs$1,qo$1.AcroFormListBox=Ss$1,qo$1.AcroFormComboBox=Cs$1,qo$1.AcroFormEditBox=ws$1,qo$1.AcroFormButton=Ts$1,qo$1.AcroFormPushButton=Es$1,qo$1.AcroFormRadioButton=Ds$1,qo$1.AcroFormCheckBox=ks$1,qo$1.AcroFormTextField=As$1,qo$1.AcroFormPasswordField=js$1,qo$1.AcroFormAppearance=$$4,qo$1.AcroForm={ChoiceField:xs$1,ListBox:Ss$1,ComboBox:Cs$1,EditBox:ws$1,Button:Ts$1,PushButton:Es$1,RadioButton:Ds$1,CheckBox:ks$1,TextField:As$1,PasswordField:js$1,Appearance:$$4},Z$3.AcroForm={ChoiceField:xs$1,ListBox:Ss$1,ComboBox:Cs$1,EditBox:ws$1,Button:Ts$1,PushButton:Es$1,RadioButton:Ds$1,CheckBox:ks$1,TextField:As$1,PasswordField:js$1,Appearance:$$4},Z$3.AcroForm;function Ns$1(Ph){return Ph.reduce(function(Ph,Fh,Ih){return Ph[Fh]=Ih,Ph},{})}(function(Ph){var Fh=`addImage_`;Ph.__addimage__={};var Ih=`UNKNOWN`,Lh={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]]},Rh=Ph.__addimage__.getImageFileTypeByImageData=function(Ph,Fh){var Rh,zh,Bh,Vh,Hh,Uh=Ih;if((Fh||=Ih)===`RGBA`||Ph.data!==void 0&&Ph.data instanceof Uint8ClampedArray&&`height`in Ph&&`width`in Ph)return`RGBA`;if(ng(Ph))for(Hh in Lh)for(Bh=Lh[Hh],Rh=0;Rh<Bh.length;Rh+=1){for(Vh=!0,zh=0;zh<Bh[Rh].length;zh+=1)if(Bh[Rh][zh]!==void 0&&Bh[Rh][zh]!==Ph[zh]){Vh=!1;break}if(!0===Vh){Uh=Hh;break}}else for(Hh in Lh)for(Bh=Lh[Hh],Rh=0;Rh<Bh.length;Rh+=1){for(Vh=!0,zh=0;zh<Bh[Rh].length;zh+=1)if(Bh[Rh][zh]!==void 0&&Bh[Rh][zh]!==Ph.charCodeAt(zh)){Vh=!1;break}if(!0===Vh){Uh=Hh;break}}return Uh===Ih&&Fh!==Ih&&(Uh=Fh),Uh},zh=function Ph(Fh){for(var Ih=this.internal.write,Lh=this.internal.putStream,Rh=(0,this.internal.getFilters)();Rh.indexOf(`FlateEncode`)!==-1;)Rh.splice(Rh.indexOf(`FlateEncode`),1);Fh.objectId=this.internal.newObject();var zh=[];if(zh.push({key:`Type`,value:`/XObject`}),zh.push({key:`Subtype`,value:`/Image`}),zh.push({key:`Width`,value:Fh.width}),zh.push({key:`Height`,value:Fh.height}),Fh.colorSpace===Zh.INDEXED?zh.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(Fh.palette.length/3-1)+` `+(`sMask`in Fh&&Fh.sMask!==void 0?Fh.objectId+2:Fh.objectId+1)+` 0 R]`}):(zh.push({key:`ColorSpace`,value:`/`+Fh.colorSpace}),Fh.colorSpace===Zh.DEVICE_CMYK&&zh.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),zh.push({key:`BitsPerComponent`,value:Fh.bitsPerComponent}),`decodeParameters`in Fh&&Fh.decodeParameters!==void 0&&zh.push({key:`DecodeParms`,value:`<<`+Fh.decodeParameters+`>>`}),`transparency`in Fh&&Array.isArray(Fh.transparency)&&Fh.transparency.length>0){for(var Bh=``,Vh=0,Hh=Fh.transparency.length;Vh<Hh;Vh++)Bh+=Fh.transparency[Vh]+` `+Fh.transparency[Vh]+` `;zh.push({key:`Mask`,value:`[`+Bh+`]`})}Fh.sMask!==void 0&&zh.push({key:`SMask`,value:Fh.objectId+1+` 0 R`});var Uh=Fh.filter===void 0?void 0:[`/`+Fh.filter];if(Lh({data:Fh.data,additionalKeyValues:zh,alreadyAppliedFilters:Uh,objectId:Fh.objectId}),Ih(`endobj`),`sMask`in Fh&&Fh.sMask!==void 0){var Wh=Fh.sMaskBitsPerComponent??Fh.bitsPerComponent,Gh={width:Fh.width,height:Fh.height,colorSpace:`DeviceGray`,bitsPerComponent:Wh,data:Fh.sMask};`filter`in Fh&&(Gh.decodeParameters=`/Predictor ${Fh.predictor} /Colors 1 /BitsPerComponent ${Wh} /Columns ${Fh.width}`,Gh.filter=Fh.filter),Ph.call(this,Gh)}if(Fh.colorSpace===Zh.INDEXED){var Kh=this.internal.newObject();Lh({data:ig(new Uint8Array(Fh.palette)),objectId:Kh}),Ih(`endobj`)}},Bh=function(){var Ph=this.internal.collections[Fh+`images`];for(var Ih in Ph)zh.call(this,Ph[Ih])},Vh=function(){var Ph,Ih=this.internal.collections[Fh+`images`],Lh=this.internal.write;for(var Rh in Ih)Lh(`/I`+(Ph=Ih[Rh]).index,Ph.objectId,`0`,`R`)},Hh=function(){this.internal.collections[Fh+`images`]||(this.internal.collections[Fh+`images`]={},this.internal.events.subscribe(`putResources`,Bh),this.internal.events.subscribe(`putXobjectDict`,Vh))},Uh=function(){var Ph=this.internal.collections[Fh+`images`];return Hh.call(this),Ph},Wh=function(){return Object.keys(this.internal.collections[Fh+`images`]).length},Gh=function(Fh){return typeof Ph[`process`+Fh.toUpperCase()]==`function`},Kh=function(Ph){return e$4(Ph)===`object`&&Ph.nodeType===1},qh=function(Fh,Ih){if(Fh.nodeName===`IMG`&&Fh.hasAttribute(`src`)){var Lh=``+Fh.getAttribute(`src`);if(Lh.indexOf(`data:image/`)===0)return So$1(unescape(Lh).split(`base64,`).pop());var Rh=Ph.loadFile(Lh,!0);if(Rh!==void 0)return Rh}if(Fh.nodeName===`CANVAS`){if(Fh.width===0||Fh.height===0)throw Error(`Given canvas must have data. Canvas width: `+Fh.width+`, height: `+Fh.height);var zh;switch(Ih){case`PNG`:zh=`image/png`;break;case`WEBP`:zh=`image/webp`;break;default:zh=`image/jpeg`}return So$1(Fh.toDataURL(zh,1).split(`base64,`).pop())}},Jh=function(Ph){var Ih=this.internal.collections[Fh+`images`];if(Ih){for(var Lh in Ih)if(Ph===Ih[Lh].alias)return Ih[Lh]}},Yh=function(Ph,Fh,Ih){return Ph||Fh||(Ph=-96,Fh=-96),Ph<0&&(Ph=-1*Ih.width*72/Ph/this.internal.scaleFactor),Fh<0&&(Fh=-1*Ih.height*72/Fh/this.internal.scaleFactor),Ph===0&&(Ph=Fh*Ih.width/Ih.height),Fh===0&&(Fh=Ph*Ih.height/Ih.width),[Ph,Fh]},Xh=function(Ph,Fh,Ih,Lh,Rh,zh){var Bh=Yh.call(this,Ih,Lh,Rh),Vh=this.internal.getCoordinateString,Hh=this.internal.getVerticalCoordinateString,Wh=Uh.call(this);if(Ih=Bh[0],Lh=Bh[1],Wh[Rh.index]=Rh,zh){zh*=Math.PI/180;var Gh=Math.cos(zh),Kh=Math.sin(zh),qh=function(Ph){return Ph.toFixed(4)},Jh=[qh(Gh),qh(Kh),qh(-1*Kh),qh(Gh),0,0,`cm`]}this.internal.write(`q`),zh?(this.internal.write([1,`0`,`0`,1,Vh(Ph),Hh(Fh+Lh),`cm`].join(` `)),this.internal.write(Jh.join(` `)),this.internal.write([Vh(Ih),`0`,`0`,Vh(Lh),`0`,`0`,`cm`].join(` `))):this.internal.write([Vh(Ih),`0`,`0`,Vh(Lh),Vh(Ph),Hh(Fh+Lh),`cm`].join(` `)),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,`cm`].join(` `)),this.internal.write(`/I`+Rh.index+` Do`),this.internal.write(`Q`)},Zh=Ph.color_spaces={DEVICE_RGB:`DeviceRGB`,DEVICE_GRAY:`DeviceGray`,DEVICE_CMYK:`DeviceCMYK`,CAL_GREY:`CalGray`,CAL_RGB:`CalRGB`,LAB:`Lab`,ICC_BASED:`ICCBased`,INDEXED:`Indexed`,PATTERN:`Pattern`,SEPARATION:`Separation`,DEVICE_N:`DeviceN`};Ph.decode={DCT_DECODE:`DCTDecode`,FLATE_DECODE:`FlateDecode`,LZW_DECODE:`LZWDecode`,JPX_DECODE:`JPXDecode`,JBIG2_DECODE:`JBIG2Decode`,ASCII85_DECODE:`ASCII85Decode`,ASCII_HEX_DECODE:`ASCIIHexDecode`,RUN_LENGTH_DECODE:`RunLengthDecode`,CCITT_FAX_DECODE:`CCITTFaxDecode`};var Qh=Ph.image_compression={NONE:`NONE`,FAST:`FAST`,MEDIUM:`MEDIUM`,SLOW:`SLOW`},$h=Ph.__addimage__.sHashCode=function(Ph){var Fh,Ih,Lh=0;if(typeof Ph==`string`)for(Ih=Ph.length,Fh=0;Fh<Ih;Fh++)Lh=(Lh<<5)-Lh+Ph.charCodeAt(Fh),Lh|=0;else if(ng(Ph))for(Ih=Ph.byteLength/2,Fh=0;Fh<Ih;Fh++)Lh=(Lh<<5)-Lh+Ph[Fh],Lh|=0;return Lh},eg=Ph.__addimage__.validateStringAsBase64=function(Ph){(Ph||=``).toString().trim();var Fh=!0;return Ph.length===0&&(Fh=!1),Ph.length%4!=0&&(Fh=!1),!1===/^[A-Za-z0-9+/]+$/.test(Ph.substr(0,Ph.length-2))&&(Fh=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(Ph.substr(-2))&&(Fh=!1),Fh},tg=Ph.__addimage__.extractImageFromDataUrl=function(Ph){if(Ph==null||!(Ph=Ph.trim()).startsWith(`data:`))return null;var Fh=Ph.indexOf(`,`);return Fh<0?null:Ph.substring(0,Fh).trim().endsWith(`base64`)?Ph.substring(Fh+1):null};Ph.__addimage__.isArrayBuffer=function(Ph){return Ph instanceof ArrayBuffer};var ng=Ph.__addimage__.isArrayBufferView=function(Ph){return Ph instanceof Int8Array||Ph instanceof Uint8Array||Ph instanceof Uint8ClampedArray||Ph instanceof Int16Array||Ph instanceof Uint16Array||Ph instanceof Int32Array||Ph instanceof Uint32Array||Ph instanceof Float32Array||Ph instanceof Float64Array},rg=Ph.__addimage__.binaryStringToUint8Array=function(Ph){for(var Fh=Ph.length,Ih=new Uint8Array(Fh),Lh=0;Lh<Fh;Lh++)Ih[Lh]=Ph.charCodeAt(Lh);return Ih},ig=Ph.__addimage__.arrayBufferToBinaryString=function(Ph){for(var Fh=``,Ih=ng(Ph)?Ph:new Uint8Array(Ph),Lh=0;Lh<Ih.length;Lh+=8192)Fh+=String.fromCharCode.apply(null,Ih.subarray(Lh,Lh+8192));return Fh};Ph.addImage=function(){var Ph,Fh,Lh,Rh,zh,Bh,Vh,Uh,Wh;if(typeof arguments[1]==`number`?(Fh=Ih,Lh=arguments[1],Rh=arguments[2],zh=arguments[3],Bh=arguments[4],Vh=arguments[5],Uh=arguments[6],Wh=arguments[7]):(Fh=arguments[1],Lh=arguments[2],Rh=arguments[3],zh=arguments[4],Bh=arguments[5],Vh=arguments[6],Uh=arguments[7],Wh=arguments[8]),e$4(Ph=arguments[0])===`object`&&!Kh(Ph)&&`imageData`in Ph){var Gh=Ph;Ph=Gh.imageData,Fh=Gh.format||Fh||Ih,Lh=Gh.x||Lh||0,Rh=Gh.y||Rh||0,zh=Gh.w||Gh.width||zh,Bh=Gh.h||Gh.height||Bh,Vh=Gh.alias||Vh,Uh=Gh.compression||Uh,Wh=Gh.rotation||Gh.angle||Wh}var qh=this.internal.getFilters();if(Uh===void 0&&qh.indexOf(`FlateEncode`)!==-1&&(Uh=`SLOW`),isNaN(Lh)||isNaN(Rh))throw Error(`Invalid coordinates passed to jsPDF.addImage`);Hh.call(this);var Jh=ag.call(this,Ph,Fh,Vh,Uh);return Xh.call(this,Lh,Rh,zh,Bh,Jh,Wh),this};var ag=function(Fh,Lh,zh,Bh){var Vh,Hh,Uh;if(typeof Fh==`string`&&Rh(Fh)===Ih){Fh=unescape(Fh);var Yh=og(Fh,!1);(Yh!==``||(Yh=Ph.loadFile(Fh,!0))!==void 0)&&(Fh=Yh)}if(Kh(Fh)&&(Fh=qh(Fh,Lh)),Lh=Rh(Fh,Lh),!Gh(Lh))throw Error(`addImage does not support files of type '`+Lh+`', please ensure that a plugin for '`+Lh+`' support is added.`);if(((Uh=zh)==null||Uh.length===0)&&(zh=function(Ph){return typeof Ph==`string`||ng(Ph)?$h(Ph):ng(Ph.data)?$h(Ph.data):null}(Fh)),(Vh=Jh.call(this,zh))||(Fh instanceof Uint8Array||Lh===`RGBA`||(Hh=Fh,Fh=rg(Fh)),Vh=this[`process`+Lh.toUpperCase()](Fh,Wh.call(this),zh,function(Fh){return Fh&&typeof Fh==`string`&&(Fh=Fh.toUpperCase()),Fh in Ph.image_compression?Fh:Qh.NONE}(Bh),Hh)),!Vh)throw Error(`An unknown error occurred whilst processing the image.`);return Vh},og=Ph.__addimage__.convertBase64ToBinaryString=function(Ph,Fh){Fh=typeof Fh!=`boolean`||Fh;var Ih,Lh=``;if(typeof Ph==`string`){Ih=tg(Ph)??Ph;try{Lh=So$1(Ih)}catch(Ph){if(Fh)throw eg(Ih)?Error(`atob-Error in jsPDF.convertBase64ToBinaryString `+Ph.message):Error(`Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString `)}}return Lh};Ph.getImageProperties=function(Fh){var Lh,zh,Bh=``;if(Kh(Fh)&&(Fh=qh(Fh)),typeof Fh==`string`&&Rh(Fh)===Ih&&((Bh=og(Fh,!1))===``&&(Bh=Ph.loadFile(Fh)||``),Fh=Bh),zh=Rh(Fh),!Gh(zh))throw Error(`addImage does not support files of type '`+zh+`', please ensure that a plugin for '`+zh+`' support is added.`);if(Fh instanceof Uint8Array||(Fh=rg(Fh)),!(Lh=this[`process`+zh.toUpperCase()](Fh)))throw Error(`An unknown error occurred whilst processing the image`);return Lh.fileType=zh,Lh}})(Z$3.API),function(Ph){var Fh=function(Ph){if(Ph!==void 0&&Ph!=``)return!0};Z$3.API.events.push([`addPage`,function(Ph){this.internal.getPageInfo(Ph.pageNumber).pageContext.annotations=[]}]),Ph.events.push([`putPage`,function(Ph){for(var Ih,Lh,Rh,zh=this.internal.getCoordinateString,Bh=this.internal.getVerticalCoordinateString,Vh=this.internal.getPageInfoByObjId(Ph.objId),Hh=Ph.pageContext.annotations,Uh=!1,Wh=0;Wh<Hh.length&&!Uh;Wh++)switch((Ih=Hh[Wh]).type){case`link`:(Fh(Ih.options.url)||Fh(Ih.options.pageNumber))&&(Uh=!0);break;case`reference`:case`text`:case`freetext`:Uh=!0}if(Uh!=0){this.internal.write(`/Annots [`);for(var Gh=0;Gh<Hh.length;Gh++){Ih=Hh[Gh];var Kh=this.internal.pdfEscape,qh=this.internal.getEncryptor(Ph.objId);switch(Ih.type){case`reference`:this.internal.write(` `+Ih.object.objId+` 0 R `);break;case`text`:var Jh=this.internal.newAdditionalObject(),Yh=this.internal.newAdditionalObject(),Xh=this.internal.getEncryptor(Jh.objId),Zh=Ih.title||`Note`;Rh=`<</Type /Annot /Subtype /Text `+(Lh=`/Rect [`+zh(Ih.bounds.x)+` `+Bh(Ih.bounds.y+Ih.bounds.h)+` `+zh(Ih.bounds.x+Ih.bounds.w)+` `+Bh(Ih.bounds.y)+`] `)+`/Contents (`+Kh(Xh(Ih.contents))+`)`,Rh+=` /Popup `+Yh.objId+` 0 R`,Rh+=` /P `+Vh.objId+` 0 R`,Rh+=` /T (`+Kh(Xh(Zh))+`) >>`,Jh.content=Rh;var Qh=Jh.objId+` 0 R`;Rh=`<</Type /Annot /Subtype /Popup `+(Lh=`/Rect [`+zh(Ih.bounds.x+30)+` `+Bh(Ih.bounds.y+Ih.bounds.h)+` `+zh(Ih.bounds.x+Ih.bounds.w+30)+` `+Bh(Ih.bounds.y)+`] `)+` /Parent `+Qh,Ih.open&&(Rh+=` /Open true`),Rh+=` >>`,Yh.content=Rh,this.internal.write(Jh.objId,`0 R`,Yh.objId,`0 R`);break;case`freetext`:Lh=`/Rect [`+zh(Ih.bounds.x)+` `+Bh(Ih.bounds.y)+` `+zh(Ih.bounds.x+Ih.bounds.w)+` `+Bh(Ih.bounds.y+Ih.bounds.h)+`] `;var $h=`font: Helvetica,sans-serif 12.0pt; text-align:left; color:#`+(Ih.color||`#000000`);Rh=`<</Type /Annot /Subtype /FreeText `+Lh+`/Contents (`+Kh(qh(Ih.contents))+`)`,Rh+=` /DS(`+Kh(qh($h))+`)`,Rh+=` /Border [0 0 0]`,Rh+=` >>`,this.internal.write(Rh);break;case`link`:if(Ih.options.name){var eg=this.annotations._nameMap[Ih.options.name];Ih.options.pageNumber=eg.page,Ih.options.top=eg.y}else Ih.options.top||(Ih.options.top=0);if(Lh=`/Rect [`+Ih.finalBounds.x+` `+Ih.finalBounds.y+` `+Ih.finalBounds.w+` `+Ih.finalBounds.h+`] `,Rh=``,Ih.options.url)Rh=`<</Type /Annot /Subtype /Link `+Lh+`/Border [0 0 0] /A <</S /URI /URI (`+Kh(qh(Ih.options.url))+`) >>`;else if(Ih.options.pageNumber)switch(Rh=`<</Type /Annot /Subtype /Link `+Lh+`/Border [0 0 0] /Dest [`+this.internal.getPageInfo(Ih.options.pageNumber).objId+` 0 R`,Ih.options.magFactor=Ih.options.magFactor||`XYZ`,Ih.options.magFactor){case`Fit`:Rh+=` /Fit]`;break;case`FitH`:Rh+=` /FitH `+Ih.options.top+`]`;break;case`FitV`:Ih.options.left=Ih.options.left||0,Rh+=` /FitV `+Ih.options.left+`]`;break;default:var tg=Bh(Ih.options.top);Ih.options.left=Ih.options.left||0,Ih.options.zoom===void 0&&(Ih.options.zoom=0),Rh+=` /XYZ `+Ih.options.left+` `+tg+` `+Ih.options.zoom+`]`}Rh!=``&&(Rh+=` >>`,this.internal.write(Rh))}}this.internal.write(`]`)}}]),Ph.createAnnotation=function(Ph){var Fh=this.internal.getCurrentPageInfo();switch(Ph.type){case`link`:this.link(Ph.bounds.x,Ph.bounds.y,Ph.bounds.w,Ph.bounds.h,Ph);break;case`text`:case`freetext`:Fh.pageContext.annotations.push(Ph)}},Ph.link=function(Ph,Fh,Ih,Lh,Rh){var zh=this.internal.getCurrentPageInfo(),Bh=this.internal.getCoordinateString,Vh=this.internal.getVerticalCoordinateString;zh.pageContext.annotations.push({finalBounds:{x:Bh(Ph),y:Vh(Fh),w:Bh(Ph+Ih),h:Vh(Fh+Lh)},options:Rh,type:`link`})},Ph.textWithLink=function(Ph,Fh,Ih,Lh){var Rh,zh,Bh=this.getTextWidth(Ph),Vh=this.internal.getLineHeight()/this.internal.scaleFactor;if(Lh.maxWidth!==void 0){zh=Lh.maxWidth;var Hh=this.splitTextToSize(Ph,zh).length;Rh=Math.ceil(Vh*Hh)}else zh=Bh,Rh=Vh;return this.text(Ph,Fh,Ih,Lh),Ih+=.2*Vh,Lh.align===`center`&&(Fh-=Bh/2),Lh.align===`right`&&(Fh-=Bh),this.link(Fh,Ih-Vh,zh,Rh,Lh),Bh},Ph.getTextWidth=function(Ph){var Fh=this.internal.getFontSize();return this.getStringUnitWidth(Ph)*Fh/this.internal.scaleFactor}}(Z$3.API),function(Ph){var Fh={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},Ih={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},Lh={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},Rh=[1570,1571,1573,1575];Ph.__arabicParser__={};var zh=Ph.__arabicParser__.isInArabicSubstitutionA=function(Ph){return Fh[Ph.charCodeAt(0)]!==void 0},Bh=Ph.__arabicParser__.isArabicLetter=function(Ph){return typeof Ph==`string`&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(Ph)},Vh=Ph.__arabicParser__.isArabicEndLetter=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length<=2},Hh=Ph.__arabicParser__.isArabicAlfLetter=function(Ph){return Bh(Ph)&&Rh.indexOf(Ph.charCodeAt(0))>=0};Ph.__arabicParser__.arabicLetterHasIsolatedForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length>=1};var Uh=Ph.__arabicParser__.arabicLetterHasFinalForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length>=2};Ph.__arabicParser__.arabicLetterHasInitialForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length>=3};var Wh=Ph.__arabicParser__.arabicLetterHasMedialForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length==4},Gh=Ph.__arabicParser__.resolveLigatures=function(Ph){var Fh=0,Lh=Ih,Rh=``,zh=0;for(Fh=0;Fh<Ph.length;Fh+=1)Lh[Ph.charCodeAt(Fh)]===void 0?(Lh=Ih,Rh+=Ph.charAt(Fh-zh),Fh-=zh,zh=0):(zh++,typeof(Lh=Lh[Ph.charCodeAt(Fh)])==`number`&&(Rh+=String.fromCharCode(Lh),Lh=Ih,zh=0),Fh===Ph.length-1&&(Lh=Ih,Rh+=Ph.charAt(Fh-(zh-1)),Fh-=zh-1,zh=0));return Rh};Ph.__arabicParser__.isArabicDiacritic=function(Ph){return Ph!==void 0&&Lh[Ph.charCodeAt(0)]!==void 0};var Kh=Ph.__arabicParser__.getCorrectForm=function(Ph,Fh,Ih){return Bh(Ph)?!1===zh(Ph)?-1:!Uh(Ph)||!Bh(Fh)&&!Bh(Ih)||!Bh(Ih)&&Vh(Fh)||Vh(Ph)&&!Bh(Fh)||Vh(Ph)&&Hh(Fh)||Vh(Ph)&&Vh(Fh)?0:Wh(Ph)&&Bh(Fh)&&!Vh(Fh)&&Bh(Ih)&&Uh(Ih)?3:Vh(Ph)||!Bh(Ih)?1:2:-1},qh=function(Ph){var Ih=0,Lh=0,Rh=0,zh=``,Vh=``,Hh=``,Uh=(Ph||=``).split(`\\s+`),Wh=[];for(Ih=0;Ih<Uh.length;Ih+=1){for(Wh.push(``),Lh=0;Lh<Uh[Ih].length;Lh+=1)zh=Uh[Ih][Lh],Vh=Uh[Ih][Lh-1],Hh=Uh[Ih][Lh+1],Bh(zh)?(Rh=Kh(zh,Vh,Hh),Wh[Ih]+=Rh===-1?zh:String.fromCharCode(Fh[zh.charCodeAt(0)][Rh])):Wh[Ih]+=zh;Wh[Ih]=Gh(Wh[Ih])}return Wh.join(` `)},Jh=Ph.__arabicParser__.processArabic=Ph.processArabic=function(){var Ph,Fh=typeof arguments[0]==`string`?arguments[0]:arguments[0].text,Ih=[];if(Array.isArray(Fh)){var Lh=0;for(Ih=[],Lh=0;Lh<Fh.length;Lh+=1)Array.isArray(Fh[Lh])?Ih.push([qh(Fh[Lh][0]),Fh[Lh][1],Fh[Lh][2]]):Ih.push([qh(Fh[Lh])]);Ph=Ih}else Ph=qh(Fh);return typeof arguments[0]==`string`?Ph:(arguments[0].text=Ph,arguments[0])};Ph.events.push([`preProcessText`,Jh])}(Z$3.API),Z$3.API.autoPrint=function(Ph){var Fh;return(Ph||={}).variant=Ph.variant||`non-conform`,Ph.variant===`javascript`?this.addJS(`print({});`):(this.internal.events.subscribe(`postPutResources`,function(){Fh=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /Named`),this.internal.out(`/Type /Action`),this.internal.out(`/N /Print`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){this.internal.out(`/OpenAction `+Fh+` 0 R`)})),this},function(Ph){var Fh=function(){var Ph=void 0;Object.defineProperty(this,`pdf`,{get:function(){return Ph},set:function(Fh){Ph=Fh}});var Fh=150;Object.defineProperty(this,`width`,{get:function(){return Fh},set:function(Ph){Fh=isNaN(Ph)||!1===Number.isInteger(Ph)||Ph<0?150:Ph,this.getContext(`2d`).pageWrapXEnabled&&(this.getContext(`2d`).pageWrapX=Fh+1)}});var Ih=300;Object.defineProperty(this,`height`,{get:function(){return Ih},set:function(Ph){Ih=isNaN(Ph)||!1===Number.isInteger(Ph)||Ph<0?300:Ph,this.getContext(`2d`).pageWrapYEnabled&&(this.getContext(`2d`).pageWrapY=Ih+1)}});var Lh=[];Object.defineProperty(this,`childNodes`,{get:function(){return Lh},set:function(Ph){Lh=Ph}});var Rh={};Object.defineProperty(this,`style`,{get:function(){return Rh},set:function(Ph){Rh=Ph}}),Object.defineProperty(this,`parentNode`,{})};Fh.prototype.getContext=function(Ph,Fh){var Ih;if((Ph||=`2d`)!==`2d`)return null;for(Ih in Fh)this.pdf.context2d.hasOwnProperty(Ih)&&(this.pdf.context2d[Ih]=Fh[Ih]);return this.pdf.context2d._canvas=this,this.pdf.context2d},Fh.prototype.toDataURL=function(){throw Error(`toDataURL is not implemented.`)},Ph.events.push([`initialized`,function(){this.canvas=new Fh,this.canvas.pdf=this}])}(Z$3.API),function(Ph){var Fh={left:0,top:0,bottom:0,right:0},Ih=!1,Lh=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},Fh),this.internal.__cell__.margins.width=this.getPageWidth(),Rh.call(this))},Rh=function(){this.internal.__cell__.lastCell=new zh,this.internal.__cell__.pages=1},zh=function(){var Ph=arguments[0];Object.defineProperty(this,`x`,{enumerable:!0,get:function(){return Ph},set:function(Fh){Ph=Fh}});var Fh=arguments[1];Object.defineProperty(this,`y`,{enumerable:!0,get:function(){return Fh},set:function(Ph){Fh=Ph}});var Ih=arguments[2];Object.defineProperty(this,`width`,{enumerable:!0,get:function(){return Ih},set:function(Ph){Ih=Ph}});var Lh=arguments[3];Object.defineProperty(this,`height`,{enumerable:!0,get:function(){return Lh},set:function(Ph){Lh=Ph}});var Rh=arguments[4];Object.defineProperty(this,`text`,{enumerable:!0,get:function(){return Rh},set:function(Ph){Rh=Ph}});var zh=arguments[5];Object.defineProperty(this,`lineNumber`,{enumerable:!0,get:function(){return zh},set:function(Ph){zh=Ph}});var Bh=arguments[6];return Object.defineProperty(this,`align`,{enumerable:!0,get:function(){return Bh},set:function(Ph){Bh=Ph}}),this};zh.prototype.clone=function(){return new zh(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},zh.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},Ph.setHeaderFunction=function(Ph){return Lh.call(this),this.internal.__cell__.headerFunction=typeof Ph==`function`?Ph:void 0,this},Ph.getTextDimensions=function(Ph,Fh){Lh.call(this);var Ih=(Fh||={}).fontSize||this.getFontSize(),Rh=Fh.font||this.getFont(),zh=Fh.scaleFactor||this.internal.scaleFactor,Bh=0,Vh=0,Hh=0,Uh=this;if(!Array.isArray(Ph)&&typeof Ph!=`string`){if(typeof Ph!=`number`)throw Error(`getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.`);Ph=String(Ph)}var Wh=Fh.maxWidth;Wh>0?typeof Ph==`string`?Ph=this.splitTextToSize(Ph,Wh):Object.prototype.toString.call(Ph)===`[object Array]`&&(Ph=Ph.reduce(function(Ph,Fh){return Ph.concat(Uh.splitTextToSize(Fh,Wh))},[])):Ph=Array.isArray(Ph)?Ph:[Ph];for(var Gh=0;Gh<Ph.length;Gh++)Bh<(Hh=this.getStringUnitWidth(Ph[Gh],{font:Rh})*Ih)&&(Bh=Hh);return Bh!==0&&(Vh=Ph.length),{w:Bh/=zh,h:Math.max((Vh*Ih*this.getLineHeightFactor()-Ih*(this.getLineHeightFactor()-1))/zh,0)}},Ph.cellAddPage=function(){Lh.call(this),this.addPage();var Ph=this.internal.__cell__.margins||Fh;return this.internal.__cell__.lastCell=new zh(Ph.left,Ph.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var Bh=Ph.cell=function(){var Ph=arguments[0]instanceof zh?arguments[0]:new zh(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);Lh.call(this);var Rh=this.internal.__cell__.lastCell,Bh=this.internal.__cell__.padding,Vh=this.internal.__cell__.margins||Fh,Hh=this.internal.__cell__.tableHeaderRow,Uh=this.internal.__cell__.printHeaders;return Rh.lineNumber!==void 0&&(Rh.lineNumber===Ph.lineNumber?(Ph.x=(Rh.x||0)+(Rh.width||0),Ph.y=Rh.y||0):Rh.y+Rh.height+Ph.height+Vh.bottom>this.getPageHeight()?(this.cellAddPage(),Ph.y=Vh.top,Uh&&Hh&&(this.printHeaderRow(Ph.lineNumber,!0),Ph.y+=Hh[0].height)):Ph.y=Rh.y+Rh.height||Ph.y),Ph.text[0]!==void 0&&(this.rect(Ph.x,Ph.y,Ph.width,Ph.height,!0===Ih?`FD`:void 0),Ph.align===`right`?this.text(Ph.text,Ph.x+Ph.width-Bh,Ph.y+Bh,{align:`right`,baseline:`top`}):Ph.align===`center`?this.text(Ph.text,Ph.x+Ph.width/2,Ph.y+Bh,{align:`center`,baseline:`top`,maxWidth:Ph.width-Bh-Bh}):this.text(Ph.text,Ph.x+Bh,Ph.y+Bh,{align:`left`,baseline:`top`,maxWidth:Ph.width-Bh-Bh})),this.internal.__cell__.lastCell=Ph,this};Ph.table=function(Ph,Ih,Hh,Uh,Wh){if(Lh.call(this),!Hh)throw Error(`No data for PDF table.`);var Gh,Kh,qh,Jh,Yh=[],Xh=[],Zh=[],Qh={},$h={},eg=[],tg=[],ng=(Wh||={}).autoSize||!1,rg=!1!==Wh.printHeaders,ig=Wh.css&&Wh.css[`font-size`]!==void 0?16*Wh.css[`font-size`]:Wh.fontSize||12,ag=Wh.margins||Object.assign({width:this.getPageWidth()},Fh),og=typeof Wh.padding==`number`?Wh.padding:3,sg=Wh.headerBackgroundColor||`#c8c8c8`,cg=Wh.headerTextColor||`#000`;if(Rh.call(this),this.internal.__cell__.printHeaders=rg,this.internal.__cell__.margins=ag,this.internal.__cell__.table_font_size=ig,this.internal.__cell__.padding=og,this.internal.__cell__.headerBackgroundColor=sg,this.internal.__cell__.headerTextColor=cg,this.setFontSize(ig),Uh==null)Xh=Yh=Object.keys(Hh[0]),Zh=Yh.map(function(){return`left`});else if(Array.isArray(Uh)&&e$4(Uh[0])===`object`)for(Yh=Uh.map(function(Ph){return Ph.name}),Xh=Uh.map(function(Ph){return Ph.prompt||Ph.name||``}),Zh=Uh.map(function(Ph){return Ph.align||`left`}),Gh=0;Gh<Uh.length;Gh+=1)$h[Uh[Gh].name]=.7499990551181103*Uh[Gh].width;else Array.isArray(Uh)&&typeof Uh[0]==`string`&&(Xh=Yh=Uh,Zh=Yh.map(function(){return`left`}));if(ng||Array.isArray(Uh)&&typeof Uh[0]==`string`)for(Gh=0;Gh<Yh.length;Gh+=1){for(Qh[Jh=Yh[Gh]]=Hh.map(function(Ph){return Ph[Jh]}),this.setFont(void 0,`bold`),eg.push(this.getTextDimensions(Xh[Gh],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),Kh=Qh[Jh],this.setFont(void 0,`normal`),qh=0;qh<Kh.length;qh+=1)eg.push(this.getTextDimensions(Kh[qh],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);$h[Jh]=Math.max.apply(null,eg)+og+og,eg=[]}if(rg){var lg={};for(Gh=0;Gh<Yh.length;Gh+=1)lg[Yh[Gh]]={},lg[Yh[Gh]].text=Xh[Gh],lg[Yh[Gh]].align=Zh[Gh];var ug=Vh.call(this,lg,$h);tg=Yh.map(function(Fh){return new zh(Ph,Ih,$h[Fh],ug,lg[Fh].text,void 0,lg[Fh].align)}),this.setTableHeaderRow(tg),this.printHeaderRow(1,!1)}var dg=Uh.reduce(function(Ph,Fh){return Ph[Fh.name]=Fh.align,Ph},{});for(Gh=0;Gh<Hh.length;Gh+=1){`rowStart`in Wh&&Wh.rowStart instanceof Function&&Wh.rowStart({row:Gh,data:Hh[Gh]},this);var fg=Vh.call(this,Hh[Gh],$h);for(qh=0;qh<Yh.length;qh+=1){var pg=Hh[Gh][Yh[qh]];`cellStart`in Wh&&Wh.cellStart instanceof Function&&Wh.cellStart({row:Gh,col:qh,data:pg},this),Bh.call(this,new zh(Ph,Ih,$h[Yh[qh]],fg,pg,Gh+2,dg[Yh[qh]]))}}return this.internal.__cell__.table_x=Ph,this.internal.__cell__.table_y=Ih,this};var Vh=function(Ph,Fh){var Ih=this.internal.__cell__.padding,Lh=this.internal.__cell__.table_font_size,Rh=this.internal.scaleFactor;return Object.keys(Ph).map(function(Lh){var Rh=Ph[Lh];return this.splitTextToSize(Rh.hasOwnProperty(`text`)?Rh.text:Rh,Fh[Lh]-Ih-Ih)},this).map(function(Ph){return this.getLineHeightFactor()*Ph.length*Lh/Rh+Ih+Ih},this).reduce(function(Ph,Fh){return Math.max(Ph,Fh)},0)};Ph.setTableHeaderRow=function(Ph){Lh.call(this),this.internal.__cell__.tableHeaderRow=Ph},Ph.printHeaderRow=function(Ph,Fh){if(Lh.call(this),!this.internal.__cell__.tableHeaderRow)throw Error(`Property tableHeaderRow does not exist.`);var Rh;if(Ih=!0,typeof this.internal.__cell__.headerFunction==`function`){var Vh=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new zh(Vh[0],Vh[1],Vh[2],Vh[3],void 0,-1)}this.setFont(void 0,`bold`);for(var Hh=[],Uh=0;Uh<this.internal.__cell__.tableHeaderRow.length;Uh+=1){Rh=this.internal.__cell__.tableHeaderRow[Uh].clone(),Fh&&(Rh.y=this.internal.__cell__.margins.top||0,Hh.push(Rh)),Rh.lineNumber=Ph;var Wh=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),Bh.call(this,Rh),this.setTextColor(Wh)}Hh.length>0&&this.setTableHeaderRow(Hh),this.setFont(void 0,`normal`),Ih=!1}}(Z$3.API);var Ps$1={italic:[`italic`,`oblique`,`normal`],oblique:[`oblique`,`italic`,`normal`],normal:[`normal`,`oblique`,`italic`]},Fs$1=[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`],Is$1=Ns$1(Fs$1),Ls$1=[100,200,300,400,500,600,700,800,900],Rs$1=Ns$1(Ls$1);function zs$1(Ph){var Fh=Ph.family.replace(/"|'/g,``).toLowerCase(),Ih=function(Ph){return Ps$1[Ph||=`normal`]?Ph:`normal`}(Ph.style),Lh=function(Ph){return Ph?typeof Ph==`number`?Ph>=100&&Ph<=900&&Ph%100==0?Ph:400:/^\d00$/.test(Ph)?parseInt(Ph):Ph===`bold`?700:400:400}(Ph.weight),Rh=function(Ph){return typeof Is$1[Ph||=`normal`]==`number`?Ph:`normal`}(Ph.stretch);return{family:Fh,style:Ih,weight:Lh,stretch:Rh,src:Ph.src||[],ref:Ph.ref||{name:Fh,style:[Rh,Ih,Lh].join(` `)}}}function Bs$1(Ph,Fh,Ih,Lh){var Rh;for(Rh=Ih;Rh>=0&&Rh<Fh.length;Rh+=Lh)if(Ph[Fh[Rh]])return Ph[Fh[Rh]];for(Rh=Ih;Rh>=0&&Rh<Fh.length;Rh-=Lh)if(Ph[Fh[Rh]])return Ph[Fh[Rh]]}var Vs$1={"sans-serif":`helvetica`,fixed:`courier`,monospace:`courier`,terminal:`courier`,cursive:`times`,fantasy:`times`,serif:`times`},Hs$1={caption:`times`,icon:`times`,menu:`times`,"message-box":`times`,"small-caption":`times`,"status-bar":`times`};function Us$1(Ph){return[Ph.stretch,Ph.style,Ph.weight,Ph.family].join(` `)}function Ws$1(Ph){return Ph.trimLeft()}function Gs$1(Ph,Fh){for(var Ih=0;Ih<Ph.length;){if(Ph.charAt(Ih)===Fh)return[Ph.substring(0,Ih),Ph.substring(Ih+1)];Ih+=1}return null}function Ks$1(Ph){var Fh=Ph.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return Fh===null?null:[Fh[0],Ph.substring(Fh[0].length)]}var qs$1,Js$1,Ys$1,Xs$1,Zs$1,Qs$1=[`times`];function $s$1(Ph,Fh,Ih,Lh,Rh){var zh=4,Bh=nc$1;switch(Rh){case Z$3.API.image_compression.FAST:zh=1,Bh=tc$1;break;case Z$3.API.image_compression.MEDIUM:zh=6,Bh=rc$1;break;case Z$3.API.image_compression.SLOW:zh=9,Bh=ic$1}Ph=function(Ph,Fh,Ih,Lh){for(var Rh,zh=Ph.length/Fh,Bh=new Uint8Array(Ph.length+zh),Vh=[ec$1,tc$1,nc$1,rc$1,ic$1],Hh=0;Hh<zh;Hh+=1){var Uh=Hh*Fh,Wh=Ph.subarray(Uh,Uh+Fh);if(Lh)Bh.set(Lh(Wh,Ih,Rh),Uh+Hh);else{for(var Gh=Vh.length,Kh=[],qh=0;qh<Gh;qh+=1)Kh[qh]=Vh[qh](Wh,Ih,Rh);var Jh=oc$1(Kh.concat());Bh.set(Kh[Jh],Uh+Hh)}Rh=Wh}return Bh}(Ph,Fh,Math.ceil(Ih*Lh/8),Bh);var Vh=me$3(Ph,{level:zh});return Z$3.API.__addimage__.arrayBufferToBinaryString(Vh)}function ec$1(Ph){var Fh=Array.apply([],Ph);return Fh.unshift(0),Fh}function tc$1(Ph,Fh){var Ih=Ph.length,Lh=[];Lh[0]=1;for(var Rh=0;Rh<Ih;Rh+=1){var zh=Ph[Rh-Fh]||0;Lh[Rh+1]=Ph[Rh]-zh+256&255}return Lh}function nc$1(Ph,Fh,Ih){var Lh=Ph.length,Rh=[];Rh[0]=2;for(var zh=0;zh<Lh;zh+=1){var Bh=Ih&&Ih[zh]||0;Rh[zh+1]=Ph[zh]-Bh+256&255}return Rh}function rc$1(Ph,Fh,Ih){var Lh=Ph.length,Rh=[];Rh[0]=3;for(var zh=0;zh<Lh;zh+=1){var Bh=Ph[zh-Fh]||0,Vh=Ih&&Ih[zh]||0;Rh[zh+1]=Ph[zh]+256-(Bh+Vh>>>1)&255}return Rh}function ic$1(Ph,Fh,Ih){var Lh=Ph.length,Rh=[];Rh[0]=4;for(var zh=0;zh<Lh;zh+=1){var Bh=ac$1(Ph[zh-Fh]||0,Ih&&Ih[zh]||0,Ih&&Ih[zh-Fh]||0);Rh[zh+1]=Ph[zh]-Bh+256&255}return Rh}function ac$1(Ph,Fh,Ih){if(Ph===Fh&&Fh===Ih)return Ph;var Lh=Math.abs(Fh-Ih),Rh=Math.abs(Ph-Ih),zh=Math.abs(Ph+Fh-Ih-Ih);return Lh<=Rh&&Lh<=zh?Ph:Rh<=zh?Fh:Ih}function oc$1(Ph){var Fh=Ph.map(function(Ph){return Ph.reduce(function(Ph,Fh){return Ph+Math.abs(Fh)},0)});return Fh.indexOf(Math.min.apply(null,Fh))}function sc$1(Ph,Fh,Ih){var Lh=Fh*Ih,Rh=Math.floor(Lh/8),zh=16-(Lh-8*Rh+Ih),Bh=(1<<Ih)-1;return lc$1(Ph,Rh)>>zh&Bh}function cc$1(Ph,Fh,Ih,Lh){var Rh=Ih*Lh,zh=Math.floor(Rh/8),Bh=16-(Rh-8*zh+Lh),Vh=(1<<Lh)-1,Hh=(Fh&Vh)<<Bh;(function(Ph,Fh,Ih){if(Fh+1<Ph.byteLength)Ph.setUint16(Fh,Ih,!1);else{var Lh=Ih>>8&255;Ph.setUint8(Fh,Lh)}})(Ph,zh,lc$1(Ph,zh)&~(Vh<<Bh)&65535|Hh)}function lc$1(Ph,Fh){return Fh+1<Ph.byteLength?Ph.getUint16(Fh,!1):Ph.getUint8(Fh)<<8}function uc$1(Ph){var Fh=0;if(Ph[Fh++]!==71||Ph[Fh++]!==73||Ph[Fh++]!==70||Ph[Fh++]!==56||(Ph[Fh++]+1&253)!=56||Ph[Fh++]!==97)throw Error(`Invalid GIF 87a/89a header.`);var Ih=Ph[Fh++]|Ph[Fh++]<<8,Lh=Ph[Fh++]|Ph[Fh++]<<8,Rh=Ph[Fh++],zh=Rh>>7,Bh=1<<1+(7&Rh);Ph[Fh++],Ph[Fh++];var Vh=null,Hh=null;zh&&(Vh=Fh,Hh=Bh,Fh+=3*Bh);var Uh=!0,Wh=[],Gh=0,Kh=null,qh=0,Jh=null;for(this.width=Ih,this.height=Lh;Uh&&Fh<Ph.length;)switch(Ph[Fh++]){case 33:switch(Ph[Fh++]){case 255:if(Ph[Fh]!==11||Ph[Fh+1]==78&&Ph[Fh+2]==69&&Ph[Fh+3]==84&&Ph[Fh+4]==83&&Ph[Fh+5]==67&&Ph[Fh+6]==65&&Ph[Fh+7]==80&&Ph[Fh+8]==69&&Ph[Fh+9]==50&&Ph[Fh+10]==46&&Ph[Fh+11]==48&&Ph[Fh+12]==3&&Ph[Fh+13]==1&&Ph[Fh+16]==0)Fh+=14,Jh=Ph[Fh++]|Ph[Fh++]<<8,Fh++;else for(Fh+=12;;){if(!((sg=Ph[Fh++])>=0))throw Error(`Invalid block size`);if(sg===0)break;Fh+=sg}break;case 249:if(Ph[Fh++]!==4||Ph[Fh+4]!==0)throw Error(`Invalid graphics extension block.`);var Yh=Ph[Fh++];Gh=Ph[Fh++]|Ph[Fh++]<<8,Kh=Ph[Fh++],1&Yh||(Kh=null),qh=Yh>>2&7,Fh++;break;case 254:for(;;){if(!((sg=Ph[Fh++])>=0))throw Error(`Invalid block size`);if(sg===0)break;Fh+=sg}break;default:throw Error(`Unknown graphic control label: 0x`+Ph[Fh-1].toString(16))}break;case 44:var Xh=Ph[Fh++]|Ph[Fh++]<<8,Zh=Ph[Fh++]|Ph[Fh++]<<8,Qh=Ph[Fh++]|Ph[Fh++]<<8,$h=Ph[Fh++]|Ph[Fh++]<<8,eg=Ph[Fh++],tg=eg>>6&1,ng=1<<1+(7&eg),rg=Vh,ig=Hh,ag=!1;eg>>7&&(ag=!0,rg=Fh,ig=ng,Fh+=3*ng);var og=Fh;for(Fh++;;){var sg;if(!((sg=Ph[Fh++])>=0))throw Error(`Invalid block size`);if(sg===0)break;Fh+=sg}Wh.push({x:Xh,y:Zh,width:Qh,height:$h,has_local_palette:ag,palette_offset:rg,palette_size:ig,data_offset:og,data_length:Fh-og,transparent_index:Kh,interlaced:!!tg,delay:Gh,disposal:qh});break;case 59:Uh=!1;break;default:throw Error(`Unknown gif block: 0x`+Ph[Fh-1].toString(16))}this.numFrames=function(){return Wh.length},this.loopCount=function(){return Jh},this.frameInfo=function(Ph){if(Ph<0||Ph>=Wh.length)throw Error(`Frame index out of range.`);return Wh[Ph]},this.decodeAndBlitFrameBGRA=function(Fh,Lh){var Rh=this.frameInfo(Fh),zh=Rh.width*Rh.height;if(zh>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var Bh=new Uint8Array(zh);dc$1(Ph,Rh.data_offset,Bh,zh);var Vh=Rh.palette_offset,Hh=Rh.transparent_index;Hh===null&&(Hh=256);var Uh=Rh.width,Wh=Ih-Uh,Gh=Uh,Kh=4*(Rh.y*Ih+Rh.x),qh=4*((Rh.y+Rh.height)*Ih+Rh.x),Jh=Kh,Yh=4*Wh;!0===Rh.interlaced&&(Yh+=4*Ih*7);for(var Xh=8,Zh=0,Qh=Bh.length;Zh<Qh;++Zh){var $h=Bh[Zh];if(Gh===0&&(Gh=Uh,(Jh+=Yh)>=qh&&(Yh=4*Wh+4*Ih*(Xh-1),Jh=Kh+(Uh+Wh)*(Xh<<1),Xh>>=1)),$h===Hh)Jh+=4;else{var eg=Ph[Vh+3*$h],tg=Ph[Vh+3*$h+1],ng=Ph[Vh+3*$h+2];Lh[Jh++]=ng,Lh[Jh++]=tg,Lh[Jh++]=eg,Lh[Jh++]=255}--Gh}},this.decodeAndBlitFrameRGBA=function(Fh,Lh){var Rh=this.frameInfo(Fh),zh=Rh.width*Rh.height;if(zh>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var Bh=new Uint8Array(zh);dc$1(Ph,Rh.data_offset,Bh,zh);var Vh=Rh.palette_offset,Hh=Rh.transparent_index;Hh===null&&(Hh=256);var Uh=Rh.width,Wh=Ih-Uh,Gh=Uh,Kh=4*(Rh.y*Ih+Rh.x),qh=4*((Rh.y+Rh.height)*Ih+Rh.x),Jh=Kh,Yh=4*Wh;!0===Rh.interlaced&&(Yh+=4*Ih*7);for(var Xh=8,Zh=0,Qh=Bh.length;Zh<Qh;++Zh){var $h=Bh[Zh];if(Gh===0&&(Gh=Uh,(Jh+=Yh)>=qh&&(Yh=4*Wh+4*Ih*(Xh-1),Jh=Kh+(Uh+Wh)*(Xh<<1),Xh>>=1)),$h===Hh)Jh+=4;else{var eg=Ph[Vh+3*$h],tg=Ph[Vh+3*$h+1],ng=Ph[Vh+3*$h+2];Lh[Jh++]=eg,Lh[Jh++]=tg,Lh[Jh++]=ng,Lh[Jh++]=255}--Gh}}}function dc$1(Ph,Fh,Ih,Lh){for(var Rh=Ph[Fh++],zh=1<<Rh,Bh=zh+1,Vh=Bh+1,Hh=Rh+1,Uh=(1<<Hh)-1,Wh=0,Gh=0,Kh=0,qh=Ph[Fh++],Jh=new Int32Array(4096),Yh=null;;){for(;Wh<16&&qh!==0;)Gh|=Ph[Fh++]<<Wh,Wh+=8,qh===1?qh=Ph[Fh++]:--qh;if(Wh<Hh)break;var Xh=Gh&Uh;if(Gh>>=Hh,Wh-=Hh,Xh!==zh){if(Xh===Bh)break;for(var Zh=Xh<Vh?Xh:Yh,Qh=0,$h=Zh;$h>zh;)$h=Jh[$h]>>8,++Qh;var eg=$h;if(Kh+Qh+(Zh===Xh?0:1)>Lh)return void go$1.log(`Warning, gif stream longer than expected.`);Ih[Kh++]=eg;var tg=Kh+=Qh;for(Zh!==Xh&&(Ih[Kh++]=eg),$h=Zh;Qh--;)$h=Jh[$h],Ih[--tg]=255&$h,$h>>=8;Yh!==null&&Vh<4096&&(Jh[Vh++]=Yh<<8|eg,Vh>=Uh+1&&Hh<12&&(++Hh,Uh=Uh<<1|1)),Yh=Xh}else Vh=Bh+1,Uh=(1<<(Hh=Rh+1))-1,Yh=null}return Kh!==Lh&&go$1.log(`Warning, gif stream shorter than expected.`),Ih}function fc$1(Ph){var Fh,Ih,Lh,Rh,zh,Bh=Math.floor,Vh=Array(64),Hh=Array(64),Uh=Array(64),Wh=Array(64),Gh=Array(65535),Kh=Array(65535),qh=Array(64),Jh=Array(64),Yh=[],Xh=0,Zh=7,Qh=Array(64),$h=Array(64),eg=Array(64),tg=Array(256),ng=Array(2048),rg=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],ig=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],ag=[0,1,2,3,4,5,6,7,8,9,10,11],og=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],sg=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],cg=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],lg=[0,1,2,3,4,5,6,7,8,9,10,11],ug=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],dg=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function fg(Ph,Fh){for(var Ih=0,Lh=0,Rh=[],zh=1;zh<=16;zh++){for(var Bh=1;Bh<=Ph[zh];Bh++)Rh[Fh[Lh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,gg=Lh-Hh,_g=Rh+Vh,vg=Rh-Vh,yg=zh+Bh,bg=zh-Bh,xg=pg+yg,Sg=pg-yg,Cg=hg+_g,wg=hg-_g;Ph[Kh]=xg+Cg,Ph[Kh+32]=xg-Cg;var Tg=.707106781*(wg+Sg);Ph[Kh+16]=Sg+Tg,Ph[Kh+48]=Sg-Tg;var Eg=.382683433*((xg=bg+vg)-(wg=gg+mg)),Dg=.5411961*xg+Eg,Og=1.306562965*wg+Eg,kg=.707106781*(Cg=vg+gg),Ag=mg+kg,jg=mg-kg;Ph[Kh+40]=jg+Dg,Ph[Kh+24]=jg-Dg,Ph[Kh+8]=Ag+Og,Ph[Kh+56]=Ag-Og,Kh++}for(Wh=0;Wh<64;++Wh)Gh=Ph[Wh]*Fh[Wh],qh[Wh]=Gh>0?Gh+.5|0:Gh-.5|0;return qh}(Ph,Fh),Uh=0;Uh<64;++Uh)Jh[rg[Uh]]=Hh[Uh];var Wh=Jh[0]-Ih;Ih=Jh[0],Wh==0?pg(Lh[0]):(pg(Lh[Kh[zh=32767+Wh]]),pg(Gh[zh]));for(var Yh=63;Yh>0&&Jh[Yh]==0;)Yh--;if(Yh==0)return pg(Bh),Ih;for(var Xh,Zh=1;Zh<=Yh;){for(var Qh=Zh;Jh[Zh]==0&&Zh<=Yh;)++Zh;var $h=Zh-Qh;if($h>=16){Xh=$h>>4;for(var eg=1;eg<=Xh;++eg)pg(Vh);$h&=15}zh=32767+Jh[Zh],pg(Rh[($h<<4)+Kh[zh]]),pg(Gh[zh]),Zh++}return Yh!=63&&pg(Bh),Ih}function _g(Ph){Ph=Math.min(Math.max(Ph,1),100),zh!=Ph&&(function(Ph){for(var Fh=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],Ih=0;Ih<64;Ih++){var Lh=Bh((Fh[Ih]*Ph+50)/100);Lh=Math.min(Math.max(Lh,1),255),Vh[rg[Ih]]=Lh}for(var Rh=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],zh=0;zh<64;zh++){var Gh=Bh((Rh[zh]*Ph+50)/100);Gh=Math.min(Math.max(Gh,1),255),Hh[rg[zh]]=Gh}for(var Kh=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],qh=0,Jh=0;Jh<8;Jh++)for(var Yh=0;Yh<8;Yh++)Uh[qh]=1/(Vh[rg[qh]]*Kh[Jh]*Kh[Yh]*8),Wh[qh]=1/(Hh[rg[qh]]*Kh[Jh]*Kh[Yh]*8),qh++}(Math.floor(Ph<50?5e3/Ph:200-2*Ph)),zh=Ph)}this.encode=function(Ph,zh){zh&&_g(zh),Yh=[],Xh=0,Zh=7,hg(65496),hg(65504),hg(16),mg(74),mg(70),mg(73),mg(70),mg(0),mg(1),mg(1),mg(0),hg(1),hg(1),mg(0),mg(0),function(){hg(65499),hg(132),mg(0);for(var Ph=0;Ph<64;Ph++)mg(Vh[Ph]);mg(1);for(var Fh=0;Fh<64;Fh++)mg(Hh[Fh])}(),function(Ph,Fh){hg(65472),hg(17),mg(8),hg(Fh),hg(Ph),mg(3),mg(1),mg(17),mg(0),mg(2),mg(17),mg(1),mg(3),mg(17),mg(1)}(Ph.width,Ph.height),function(){hg(65476),hg(418),mg(0);for(var Ph=0;Ph<16;Ph++)mg(ig[Ph+1]);for(var Fh=0;Fh<=11;Fh++)mg(ag[Fh]);mg(16);for(var Ih=0;Ih<16;Ih++)mg(og[Ih+1]);for(var Lh=0;Lh<=161;Lh++)mg(sg[Lh]);mg(1);for(var Rh=0;Rh<16;Rh++)mg(cg[Rh+1]);for(var zh=0;zh<=11;zh++)mg(lg[zh]);mg(17);for(var Bh=0;Bh<16;Bh++)mg(ug[Bh+1]);for(var Vh=0;Vh<=161;Vh++)mg(dg[Vh])}(),hg(65498),hg(12),mg(3),mg(1),mg(0),mg(2),mg(17),mg(3),mg(17),mg(0),mg(63),mg(0);var Bh=0,Gh=0,Kh=0;Xh=0,Zh=7,this.encode.displayName=`_encode_`;for(var qh,Jh,tg,rg,fg,vg,yg,bg,xg,Sg=Ph.data,Cg=Ph.width,wg=Ph.height,Tg=4*Cg,Eg=0;Eg<wg;){for(qh=0;qh<Tg;){for(fg=Tg*Eg+qh,yg=-1,bg=0,xg=0;xg<64;xg++)vg=fg+(bg=xg>>3)*Tg+(yg=4*(7&xg)),Eg+bg>=wg&&(vg-=Tg*(Eg+1+bg-wg)),qh+yg>=Tg&&(vg-=qh+yg-Tg+4),Jh=Sg[vg++],tg=Sg[vg++],rg=Sg[vg++],Qh[xg]=(ng[Jh]+ng[tg+256|0]+ng[rg+512|0]>>16)-128,$h[xg]=(ng[Jh+768|0]+ng[tg+1024|0]+ng[rg+1280|0]>>16)-128,eg[xg]=(ng[Jh+1280|0]+ng[tg+1536|0]+ng[rg+1792|0]>>16)-128;Bh=gg(Qh,Uh,Bh,Fh,Lh),Gh=gg($h,Wh,Gh,Ih,Rh),Kh=gg(eg,Wh,Kh,Ih,Rh),qh+=32}Eg+=8}if(Zh>=0){var Dg=[];Dg[1]=Zh+1,Dg[0]=(1<<Zh+1)-1,pg(Dg)}return hg(65497),new Uint8Array(Yh)},Ph||=50,function(){for(var Ph=String.fromCharCode,Fh=0;Fh<256;Fh++)tg[Fh]=Ph(Fh)}(),Fh=fg(ig,ag),Ih=fg(cg,lg),Lh=fg(og,sg),Rh=fg(ug,dg),function(){for(var Ph=1,Fh=2,Ih=1;Ih<=15;Ih++){for(var Lh=Ph;Lh<Fh;Lh++)Kh[32767+Lh]=Ih,Gh[32767+Lh]=[],Gh[32767+Lh][1]=Ih,Gh[32767+Lh][0]=Lh;for(var Rh=-(Fh-1);Rh<=-Ph;Rh++)Kh[32767+Rh]=Ih,Gh[32767+Rh]=[],Gh[32767+Rh][1]=Ih,Gh[32767+Rh][0]=Fh-1+Rh;Ph<<=1,Fh<<=1}}(),function(){for(var Ph=0;Ph<256;Ph++)ng[Ph]=19595*Ph,ng[Ph+256|0]=38470*Ph,ng[Ph+512|0]=7471*Ph+32768,ng[Ph+768|0]=-11059*Ph,ng[Ph+1024|0]=-21709*Ph,ng[Ph+1280|0]=32768*Ph+8421375,ng[Ph+1536|0]=-27439*Ph,ng[Ph+1792|0]=-5329*Ph}(),_g(Ph)}function pc$1(Ph,Fh){if(this.pos=0,this.buffer=Ph,this.datav=new DataView(Ph.buffer),this.is_with_alpha=!!Fh,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,[`BM`,`BA`,`CI`,`CP`,`IC`,`PT`].indexOf(this.flag)===-1)throw Error(`Invalid BMP File`);this.parseHeader(),this.parseBGR()}function mc$1(Ph){function Fh(Ph){if(!Ph)throw Error(`assert :P`)}function Ih(Ph,Fh,Ih){for(var Lh=0;4>Lh;Lh++)if(Ph[Fh+Lh]!=Ih.charCodeAt(Lh))return!0;return!1}function Lh(Ph,Fh,Ih,Lh,Rh){for(var zh=0;zh<Rh;zh++)Ph[Fh+zh]=Ih[Lh+zh]}function Rh(Ph,Fh,Ih,Lh){for(var Rh=0;Rh<Lh;Rh++)Ph[Fh+Rh]=Ih}function zh(Ph){return new Int32Array(Ph)}function Bh(Ph,Fh){for(var Ih=[],Lh=0;Lh<Ph;Lh++)Ih.push(new Fh);return Ih}function Vh(Ph,Fh){var Ih=[];return function Ph(Ih,Lh,Rh){for(var zh=Rh[Lh],Bh=0;Bh<zh&&(Ih.push(Rh.length>Lh+1?[]:new Fh),!(Rh.length<Lh+1));Bh++)Ph(Ih[Bh],Lh+1,Rh)}(Ih,0,Ph),Ih}var Hh=function(){var Ph=this;function Hh(Ph,Fh){for(var Ih=1<<Fh-1>>>0;Ph&Ih;)Ih>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h,Ph[Ih+Qh].value=qh-Ih-Qh}Rh.g=Wh-Lh,Rh.value=Vh[Kh++],Uh(Ph,qh+(eg>>Lh),Bh,rg,Rh),eg=Hh(eg,Wh)}}return tg==2*Xh[15]-1?Jh:0}(Ph,Ih,Lh,Rh,Bh,Vh)}function Gh(){this.value=this.g=0}function Kh(){this.value=this.g=0}function qh(){this.G=Bh(5,Gh),this.H=zh(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=Bh(_y,Kh)}function Jh(Ph,Ih,Lh,Rh){Fh(Ph!=null),Fh(Ih!=null),Fh(2147483648>Rh),Ph.Ca=254,Ph.I=0,Ph.b=-8,Ph.Ka=0,Ph.oa=Ih,Ph.pa=Lh,Ph.Jd=Ih,Ph.Yc=Lh+Rh,Ph.Zc=4<=Rh?Lh+Rh-4+1:Lh,og(Ph)}function Yh(Ph,Fh){for(var Ih=0;0<Fh--;)Ih|=cg(Ph,128)<<Fh;return Ih}function Xh(Ph,Fh){var Ih=Yh(Ph,Fh);return sg(Ph)?-Ih:Ih}function Zh(Ph,Ih,Lh,Rh){var zh,Bh=0;for(Fh(Ph!=null),Fh(Ih!=null),Fh(4294967288>Rh),Ph.Sb=Rh,Ph.Ra=0,Ph.u=0,Ph.h=0,4<Rh&&(Rh=4),zh=0;zh<Rh;++zh)Bh+=Ih[Lh+zh]<<8*zh;Ph.Ra=Bh,Ph.bb=Rh,Ph.oa=Ih,Ph.pa=Lh}function Qh(Ph){for(;8<=Ph.u&&Ph.bb<Ph.Sb;)Ph.Ra>>>=8,Ph.Ra+=Ph.oa[Ph.pa+Ph.bb]<<by-8>>>0,++Ph.bb,Ph.u-=8;rg(Ph)&&(Ph.h=1,Ph.u=0)}function $h(Ph,Ih){if(Fh(0<=Ih),!Ph.h&&Ih<=yy){var Lh=ng(Ph)&vy[Ih];return Ph.u+=Ih,Qh(Ph),Lh}return Ph.h=1,Ph.u=0}function eg(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function tg(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function ng(Ph){return Ph.Ra>>>(Ph.u&by-1)>>>0}function rg(Ph){return Fh(Ph.bb<=Ph.Sb),Ph.h||Ph.bb==Ph.Sb&&Ph.u>by}function ig(Ph,Fh){Ph.u=Fh,Ph.h=rg(Ph)}function ag(Ph){Ph.u>=xy&&(Fh(Ph.u>=xy),Qh(Ph))}function og(Ph){Fh(Ph!=null&&Ph.oa!=null),Ph.pa<Ph.Zc?(Ph.I=(Ph.oa[Ph.pa++]|Ph.I<<8)>>>0,Ph.b+=8):(Fh(Ph!=null&&Ph.oa!=null),Ph.pa<Ph.Yc?(Ph.b+=8,Ph.I=Ph.oa[Ph.pa++]|Ph.I<<8):Ph.Ka?Ph.b=0:(Ph.I<<=8,Ph.b+=8,Ph.Ka=1))}function sg(Ph){return Yh(Ph,1)}function cg(Ph,Fh){var Ih=Ph.Ca;0>Ph.b&&og(Ph);var Lh=Ph.b,Rh=Ih*Fh>>>8,zh=(Ph.I>>>Lh>Rh)+0;for(zh?(Ih-=Rh,Ph.I-=Rh+1<<Lh>>>0):Ih=Rh+1,Lh=Ih,Rh=0;256<=Lh;)Rh+=8,Lh>>=8;return Lh=7^Rh+Sy[Lh],Ph.b-=Lh,Ph.Ca=(Ih<<Lh)-1,zh}function lg(Ph,Fh,Ih){Ph[Fh+0]=Ih>>24&255,Ph[Fh+1]=Ih>>16&255,Ph[Fh+2]=Ih>>8&255,Ph[Fh+3]=255&Ih}function ug(Ph,Fh){return Ph[Fh+0]|Ph[Fh+1]<<8}function dg(Ph,Fh){return ug(Ph,Fh)|Ph[Fh+2]<<16}function fg(Ph,Fh){return ug(Ph,Fh)|ug(Ph,Fh+2)<<16}function pg(Ph,Ih){var Lh=1<<Ih;return Fh(Ph!=null),Fh(0<Ih),Ph.X=zh(Lh),Ph.X==null?0:(Ph.Mb=32-Ih,Ph.Xa=Ih,1)}function mg(Ph,Ih){Fh(Ph!=null),Fh(Ih!=null),Fh(Ph.Xa==Ih.Xa),Lh(Ih.X,0,Ph.X,0,1<<Ih.Xa)}function hg(){this.X=[],this.Xa=this.Mb=0}function gg(Ph,Ih,Lh,Rh){Fh(Lh!=null),Fh(Rh!=null);var zh=Lh[0],Bh=Rh[0];return zh==0&&(zh=(Ph*Bh+Ih/2)/Ih),Bh==0&&(Bh=(Ih*zh+Ph/2)/Ph),0>=zh||0>=Bh?0:(Lh[0]=zh,Rh[0]=Bh,1)}function _g(Ph,Fh){return Ph+(1<<Fh)-1>>>Fh}function vg(Ph,Fh){return((4278255360&Ph)+(4278255360&Fh)>>>0&4278255360)+((16711935&Ph)+(16711935&Fh)>>>0&16711935)>>>0}function yg(Fh,Ih){Ph[Ih]=function(Ih,Lh,Rh,zh,Bh,Vh,Hh){var Uh;for(Uh=0;Uh<Bh;++Uh){var Wh=Ph[Fh](Vh[Hh+Uh-1],Rh,zh+Uh);Vh[Hh+Uh]=vg(Ih[Lh+Uh],Wh)}}}function bg(){this.ud=this.hd=this.jd=0}function xg(Ph,Fh){return((4278124286&(Ph^Fh))>>>1)+(Ph&Fh)>>>0}function Sg(Ph){return 0<=Ph&&256>Ph?Ph:0>Ph?0:255<Ph?255:void 0}function Cg(Ph,Fh){return Sg(Ph+(Ph-Fh+.5>>1))}function wg(Ph,Fh,Ih){return Math.abs(Fh-Ih)-Math.abs(Ph-Ih)}function Tg(Ph,Fh,Ih,Lh,Rh,zh,Bh){for(Lh=zh[Bh-1],Ih=0;Ih<Rh;++Ih)zh[Bh+Ih]=Lh=vg(Ph[Fh+Ih],Lh)}function Eg(Ph,Fh,Ih,Lh,Rh){var zh;for(zh=0;zh<Ih;++zh){var Bh=Ph[Fh+zh],Vh=Bh>>8&255,Hh=16711935&(Hh=(Hh=16711935&Bh)+((Vh<<16)+Vh));Lh[Rh+zh]=(4278255360&Bh)+Hh>>>0}}function Dg(Ph,Fh){Fh.jd=255&Ph,Fh.hd=Ph>>8&255,Fh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>>16&240|Bh>>12&15,Bh=240&Bh|Bh>>28&15;Lh[Rh++]=zh,Lh[Rh++]=Bh}}function Ng(Ph,Fh,Ih,Lh,Rh){for(Ih=Fh+Ih;Fh<Ih;){var zh=(Bh=Ph[Fh++])>>16&248|Bh>>13&7,Bh=Bh>>5&224|Bh>>3&31;Lh[Rh++]=zh,Lh[Rh++]=Bh}}function Pg(Ph,Fh,Ih,Lh,Rh){for(Ih=Fh+Ih;Fh<Ih;){var zh=Ph[Fh++];Lh[Rh++]=255&zh,Lh[Rh++]=zh>>8&255,Lh[Rh++]=zh>>16&255}}function Fg(Ph,Fh,Ih,Rh,zh,Bh){if(Bh==0)for(Ih=Fh+Ih;Fh<Ih;)lg(Rh,((Bh=Ph[Fh++])[0]>>24|Bh[1]>>8&65280|Bh[2]<<8&16711680|Bh[3]<<24)>>>0),zh+=32;else Lh(Rh,zh,Ph,Fh,Ih)}function Ig(Fh,Ih){Ph[Ih][0]=Ph[Fh+`0`],Ph[Ih][1]=Ph[Fh+`1`],Ph[Ih][2]=Ph[Fh+`2`],Ph[Ih][3]=Ph[Fh+`3`],Ph[Ih][4]=Ph[Fh+`4`],Ph[Ih][5]=Ph[Fh+`5`],Ph[Ih][6]=Ph[Fh+`6`],Ph[Ih][7]=Ph[Fh+`7`],Ph[Ih][8]=Ph[Fh+`8`],Ph[Ih][9]=Ph[Fh+`9`],Ph[Ih][10]=Ph[Fh+`10`],Ph[Ih][11]=Ph[Fh+`11`],Ph[Ih][12]=Ph[Fh+`12`],Ph[Ih][13]=Ph[Fh+`13`],Ph[Ih][14]=Ph[Fh+`0`],Ph[Ih][15]=Ph[Fh+`0`]}function Lg(Ph){return Ph==wb||Ph==Tb||Ph==Eb||Ph==Db}function Rg(){this.eb=[],this.size=this.A=this.fb=0}function zg(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Bg(){this.Rd=this.height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else{if(!(tg<Yh))break t;for(eg=tg-280,Fh(Zh!=null);qh<Kh;)tg=Ih[qh++],Zh.X[(506832829*tg&4294967295)>>>Zh.Mb]=tg;tg=Kh,Fh(!(eg>>>(og=Zh).Xa)),Ih[tg]=og.X[eg],eg=!0}eg||Fh(Wh.h==rg(Wh))}if(Ph.Pb&&Wh.h&&Kh<zh)Fh(Ph.m.h),Ph.a=5,Ph.m=Ph.wd,Ph.$=Ph.xd,0<Ph.s.ua&&mg(Ph.s.vb,Ph.s.Wa);else{if(Wh.h)break t;Vh?.(Ph,Hh>Bh?Bh:Hh),Ph.a=0,Ph.$=Kh-Lh}return 1}return Ph.a=3,0}function s_(Ph){Fh(Ph!=null),Ph.vc=null,Ph.yc=null,Ph.Ya=null;var Ih=Ph.Wa;Ih!=null&&(Ih.X=null),Ph.vb=null,Fh(Ph!=null)}function c_(){var Fh=new zv;return Fh==null?null:(Fh.a=0,Fh.xb=Xb,Ig(`Predictor`,`VP8LPredictors`),Ig(`Predictor`,`VP8LPredictors_C`),Ig(`PredictorAdd`,`VP8LPredictorsAdd`),Ig(`PredictorAdd`,`VP8LPredictorsAdd_C`),Ty=Eg,jy=Og,My=Ag,Ny=jg,Py=Mg,Fy=Ng,Iy=Pg,Ph.VP8LMapColor32b=Dy,Ph.VP8LMapColor8b=ky,Fh)}function l_(Ph,Ih,Lh,Vh,Hh){var Uh=1,Kh=[Ph],Jh=[Ih],Yh=Vh.m,Xh=Vh.s,Zh=null,Qh=0;t:for(;;){if(Lh)for(;Uh&&$h(Yh,1);){var eg=Kh,tg=Jh,rg=Vh,og=1,sg=rg.m,cg=rg.gc[rg.ab],lg=$h(sg,2);if(rg.Oc&1<<lg)Uh=0;else{switch(rg.Oc|=1<<lg,cg.hc=lg,cg.Ea=eg[0],cg.nc=tg[0],cg.K=[null],++rg.ab,Fh(4>=rg.ab),lg){case 0:case 1:cg.b=$h(sg,3)+2,og=l_(_g(cg.Ea,cg.b),_g(cg.nc,cg.b),0,rg,cg.K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>Tg;++Tg){Ug=Ab[Tg],Zg[Tg]=Yg,Qg[Tg]=Eg,!Tg&&0<Ag&&(Ug+=1<<Ag);n:{var r_,i_=Ug,a_=Dg,c_=Jg,u_=Yg,d_=Eg,f_=0,p_=a_.m,m_=$h(p_,1);if(Rh(c_,0,0,i_),m_){var h_=$h(p_,1)+1,g_=$h(p_,$h(p_,1)==0?1:8);c_[g_]=1,h_==2&&(c_[g_=$h(p_,8)]=1);var __=1}else{var v_=zh(19),y_=$h(p_,4)+4;if(19<y_){a_.a=3;var b_=0;break n}for(r_=0;r_<y_;++r_)v_[Mb[r_]]=$h(p_,3);var x_=void 0,S_=void 0,C_=a_,w_=v_,T_=i_,E_=c_,D_=0,O_=C_.m,k_=8,A_=Bh(128,Gh);i:for(;Wh(A_,0,7,w_,19);){if($h(O_,1)){if((x_=2+$h(O_,2+2*$h(O_,3)))>T_)break i}else x_=T_;for(S_=0;S_<T_&&x_--;){ag(O_);var j_=A_[0+(127&ng(O_))];ig(O_,O_.u+j_.g);var M_=j_.value;if(16>M_)E_[S_++]=M_,M_!=0&&(k_=M_);else{var N_=M_==16,P_=M_-16,F_=kb[P_],I_=$h(O_,Ob[P_])+F_;if(S_+I_>T_)break i;for(var L_=N_?k_:0;0<I_--;)E_[S_++]=L_}}D_=1;break i}D_||(C_.a=3),__=D_}(__&&=!p_.h)&&(f_=Wh(u_,d_,8,c_,i_)),__&&f_!=0?b_=f_:(a_.a=3,b_=0)}if(b_==0)break r;if(t_&&jb[Tg]==1&&(t_=Yg[Eg].g==0),e_+=Yg[Eg].g,Eg+=b_,3>=Tg){var R_,z_=Jg[0];for(R_=1;R_<Ug;++R_)Jg[R_]>z_&&(z_=Jg[R_]);n_+=z_}}if(Xg.nd=t_,Xg.Qb=0,t_&&(Xg.qb=(Zg[3][Qg[3]+0].value<<24|Zg[1][Qg[1]+0].value<<16|Zg[2][Qg[2]+0].value)>>>0,e_==0&&256>Zg[0][Qg[0]+0].value&&(Xg.Qb=1,Xg.qb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tb+Uh*Lh,qh=Ph.Ta,Jh=Ph.Ua;t_(Ph,Vh,zh,Bh),ab(qh,Jh,Gh,Kh,Wh),i_(Hh,Lh,Lh+Vh,Gh,Kh,Uh),Rh-=Vh,zh+=Vh*Ph.c,Lh+=Vh}Fh(Lh==Ih),Ph.C=Ph.Ma=Ih}function f_(){this.ub=this.yd=this.td=this.Rb=0}function p_(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function m_(){this.Fb=this.Bb=this.Cb=0,this.Zb=zh(4),this.Lb=zh(4)}function h_(){this.Yb=function(){var Ph=[];return function Ph(Fh,Ih,Lh){for(var Rh=Lh[Ih],zh=0;zh<Rh&&(Fh.push(Lh.length>Ih+1?[]:0),!(Lh.length<Ih+1));zh++)Ph(Fh[zh],Ih+1,Lh)}(Ph,0,[3,11]),Ph}()}function g_(){this.jb=zh(3),this.Wc=Vh([4,8],h_),this.Xc=Vh([4,17],h_)}function __(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new zh(4),this.od=new zh(4)}function v_(){this.ld=this.La=this.dd=this.tc=0}function y_(){this.Na=this.la=0}function b_(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function x_(){this.ad=zh(384),this.Za=0,this.Ob=zh(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function S_(){this.uc=this.M=this.Nb=0,this.wa=Array(new v_),this.Y=0,this.ya=Array(new x_),this.aa=0,this.l=new E_}function C_(){this.y=zh(16),this.f=zh(8),this.ea=zh(8)}function w_(){this.cb=this.a=0,this.sc=``,this.m=new eg,this.Od=new f_,this.Kc=new p_,this.ed=new __,this.Qa=new m_,this.Ic=this.$c=this.Aa=0,this.D=new S_,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=Bh(8,eg),this.ia=0,this.pb=Bh(4,b_),this.Pa=new g_,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new C_),this.Hd=0,this.rb=Array(new y_),this.sb=0,this.wa=Array(new v_),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new x_),this.L=this.aa=0,this.gd=Vh([4,2],v_),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function T_(Ph,Fh){return 0>Ph?0:Ph>Fh?Fh:Ph}function E_(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma=`void`,this.put=`VP8IoPutHook`,this.ac=`VP8IoSetupHook`,this.bc=`VP8IoTeardownHook`,this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function D_(){var Ph=new w_;return Ph!=null&&(Ph.a=0,Ph.sc=`OK`,Ph.cb=0,Ph.Xb=0,Rb||=j_),Ph}function O_(Ph,Fh,Ih){return Ph.a==0&&(Ph.a=Fh,Ph.sc=Ih,Ph.cb=0),0}function k_(Ph,Fh,Ih){return 3<=Ih&&Ph[Fh+0]==157&&Ph[Fh+1]==1&&Ph[Fh+2]==42}function A_(Ph,Ih){if(Ph==null)return 0;if(Ph.a=0,Ph.sc=`OK`,Ih==null)return O_(Ph,2,`null VP8Io passed to VP8GetHeaders()`);var Lh=Ih.data,zh=Ih.w,Bh=Ih.ha;if(4>Bh)return O_(Ph,7,`Truncated header.`);var Vh=Lh[zh+0]|Lh[zh+1]<<8|Lh[zh+2]<<16,Hh=Ph.Od;if(Hh.Rb=!(1&Vh),Hh.td=Vh>>1&7,Hh.yd=Vh>>4&1,Hh.ub=Vh>>5,3<Hh.td)return O_(Ph,3,`Incorrect keyframe parameters.`);if(!Hh.yd)return O_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,this.memory=0,this.Ib=`OutputFunc`,this.Jb=`OutputAlphaFunc`,this.Nd=`OutputRowFunc`}function Iv(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Lv(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Rv(){this.ua=0,this.Wa=new hg,this.vb=new hg,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new qh,this.yc=new Gh}function zv(){this.xb=this.a=0,this.l=new E_,this.ca=new Bg,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new tg,this.Pb=0,this.wd=new tg,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Rv,this.ab=0,this.gc=Bh(4,Lv),this.Oc=0}function Bv(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new E_,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Vv(Ph,Fh,Ih,Lh,Rh,zh,Bh){for(Ph=Ph==null?0:Ph[Fh+0],Fh=0;Fh<Bh;++Fh)Rh[zh+Fh]=Ph+Ih[Lh+Fh]&255,Ph=Rh[zh+Fh]}function Hv(Ph,Fh,Ih,Lh,Rh,zh,Bh){var Vh;if(Ph==null)Vv(null,null,Ih,Lh,Rh,zh,Bh);else for(Vh=0;Vh<Bh;++Vh)Rh[zh+Vh]=Ph[Fh+Vh]+Ih[Lh+Vh]&255}function Uv(Ph,Fh,Ih,Lh,Rh,zh,Bh){if(Ph==null)Vv(null,null,Ih,Lh,Rh,zh,Bh);else{var Vh,Hh=Ph[Fh+0],Uh=Hh,Wh=Hh;for(Vh=0;Vh<Bh;++Vh)Uh=Wh+(Hh=Ph[Fh+Vh])-Uh,Wh=Ih[Lh+Vh]+(-256&Uh?0>Uh?0:255:Uh)&255,Uh=Hh,Rh[zh+Vh]=Wh}}function Wv(Ph,Ih,Rh,Bh){var Vh=Ih.width,Hh=Ih.o;if(Fh(Ph!=null&&Ih!=null),0>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qh,$h+Ih*Ph.B,Kh,qh+32*Ih,8)}}function py(Ph,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh){var Gh=[0],Kh=[0],qh=0,Jh=Wh==null?0:Wh.kd,Yh=Wh??new Iv;if(Ph==null||12>Rh)return 7;Yh.data=Ph,Yh.w=Lh,Yh.ha=Rh,Lh=[Lh],Rh=[Rh],Yh.gb=[Yh.gb];t:{var Xh=Lh,Qh=Rh,$h=Yh.gb;if(Fh(Ph!=null),Fh(Qh!=null),Fh($h!=null),$h[0]=0,12<=Qh[0]&&!Ih(Ph,Xh[0],`RIFF`)){if(Ih(Ph,Xh[0]+8,`WEBP`)){$h=3;break t}var eg=fg(Ph,Xh[0]+4);if(12>eg||4294967286<eg){$h=3;break t}if(Jh&&eg>Qh[0]-8){$h=7;break t}$h[0]=eg,Xh[0]+=12,Qh[0]-=12}$h=0}if($h!=0)return $h;for(eg=0<Yh.gb[0],Rh=Rh[0];;){t:{var ng=Ph;Qh=Lh,$h=Rh;var rg=Gh,ig=Kh,ag=Xh=[0];if((cg=qh=[qh])[0]=0,8>$h[0])$h=7;else{if(!Ih(ng,Qh[0],`VP8X`)){if(fg(ng,Qh[0]+4)!=10){$h=3;break t}if(18>$h[0]){$h=7;break t}var og=fg(ng,Qh[0]+8),sg=1+dg(ng,Qh[0]+12);if(2147483648<=sg*(ng=1+dg(ng,Qh[0]+15))){$h=3;break t}ag!=null&&(ag[0]=og),rg!=null&&(rg[0]=sg),ig!=null&&(ig[0]=ng),Qh[0]+=18,$h[0]-=18,cg[0]=1}$h=0}}if(qh=qh[0],Xh=Xh[0],$h!=0)return $h;if(Qh=!!(2&Xh),!eg&&qh)return 3;if(Vh!=null&&(Vh[0]=!!(16&Xh)),Hh!=null&&(Hh[0]=Qh),Uh!=null&&(Uh[0]=0),Hh=Gh[0],Xh=Kh[0],qh&&Qh&&Wh==null){$h=0;break}if(4>Rh){$h=7;break}if(eg&&qh||!eg&&!qh&&!Ih(Ph,Lh[0],`ALPH`)){Rh=[Rh],Yh.na=[Yh.na],Yh.P=[Yh.P],Yh.Sa=[Yh.Sa];t:{og=Ph,$h=Lh,eg=Rh;var cg=Yh.gb;rg=Yh.na,ig=Yh.P,ag=Yh.Sa,sg=22,Fh(og!=null),Fh(eg!=null),ng=$h[0];var lg=eg[0];for(Fh(rg!=null),Fh(ag!=null),rg[0]=null,ig[0]=null,ag[0]=0;;){if($h[0]=ng,eg[0]=lg,8>lg){$h=7;break t}var ug=fg(og,ng+4);if(4294967286<ug){$h=3;break t}var pg=8+ug+1&-2;if(sg+=pg,0<cg&&sg>cg){$h=3;break t}if(!Ih(og,ng,`VP8 `)||!Ih(og,ng,`VP8L`)){$h=0;break t}if(lg[0]<pg){$h=7;break t}Ih(og,ng,`ALPH`)||(rg[0]=og,ig[0]=ng+8,ag[0]=ug),ng+=pg,lg-=pg}}if(Rh=Rh[0],Yh.na=Yh.na[0],Yh.P=Yh.P[0],Yh.Sa=Yh.Sa[0],$h!=0)break}Rh=[Rh],Yh.Ja=[Yh.Ja],Yh.xa=[Yh.xa];t:if(cg=Ph,$h=Lh,eg=Rh,rg=Yh.gb[0],ig=Yh.Ja,ag=Yh.xa,og=$h[0],ng=!Ih(cg,og,`VP8 `),sg=!Ih(cg,og,`VP8L`),Fh(cg!=null),Fh(eg!=null),Fh(ig!=null),Fh(ag!=null),8>eg[0])$h=7;else{if(ng||sg){if(cg=fg(cg,og+4),12<=rg&&cg>rg-12){$h=3;break t}if(Jh&&cg>eg[0]-8){$h=7;break t}ig[0]=cg,$h[0]+=8,eg[0]-=8,ag[0]=sg}else ag[0]=5<=eg[0]&&cg[og+0]==47&&!(cg[og+4]>>5),ig[0]=eg[0];$h=0}if(Rh=Rh[0],Yh.Ja=Yh.Ja[0],Yh.xa=Yh.xa[0],Lh=Lh[0],$h!=0)break;if(4294967286<Yh.Ja)return 3;if(Uh==null||Qh||(Uh[0]=Yh.xa?2:1),Hh=[Hh],Xh=[Xh],Yh.xa){if(5>Rh){$h=7;break}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,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];yg(`Predictor0`,`PredictorAdd0`),Ph.Predictor0=function(){return 4278190080},Ph.Predictor1=function(Ph){return Ph},Ph.Predictor2=function(Ph,Fh,Ih){return Fh[Ih+0]},Ph.Predictor3=function(Ph,Fh,Ih){return Fh[Ih+1]},Ph.Predictor4=function(Ph,Fh,Ih){return Fh[Ih-1]},Ph.Predictor5=function(Ph,Fh,Ih){return xg(xg(Ph,Fh[Ih+1]),Fh[Ih+0])},Ph.Predictor6=function(Ph,Fh,Ih){return xg(Ph,Fh[Ih-1])},Ph.Predictor7=function(Ph,Fh,Ih){return xg(Ph,Fh[Ih+0])},Ph.Predictor8=function(Ph,Fh,Ih){return xg(Fh[Ih-1],Fh[Ih+0])},Ph.Predictor9=function(Ph,Fh,Ih){return xg(Fh[Ih+0],Fh[Ih+1])},Ph.Predictor10=function(Ph,Fh,Ih){return xg(xg(Ph,Fh[Ih-1]),xg(Fh[Ih+0],Fh[Ih+1]))},Ph.Predictor11=function(Ph,Fh,Ih){var Lh=Fh[Ih+0];return 0>=wg(Lh>>24&255,Ph>>24&255,(Fh=Fh[Ih-1])>>24&255)+wg(Lh>>16&255,Ph>>16&255,Fh>>16&255)+wg(Lh>>8&255,Ph>>8&255,Fh>>8&255)+wg(255&Lh,255&Ph,255&Fh)?Lh:Ph},Ph.Predictor12=function(Ph,Fh,Ih){var Lh=Fh[Ih+0];return(Sg((Ph>>24&255)+(Lh>>24&255)-((Fh=Fh[Ih-1])>>24&255))<<24|Sg((Ph>>16&255)+(Lh>>16&255)-(Fh>>16&255))<<16|Sg((Ph>>8&255)+(Lh>>8&255)-(Fh>>8&255))<<8|Sg((255&Ph)+(255&Lh)-(255&Fh)))>>>0},Ph.Predictor13=function(Ph,Fh,Ih){var Lh=Fh[Ih-1];return(Cg((Ph=xg(Ph,Fh[Ih+0]))>>24&255,Lh>>24&255)<<24|Cg(Ph>>16&255,Lh>>16&255)<<16|Cg(Ph>>8&255,Lh>>8&255)<<8|Cg(255&Ph,255&Lh))>>>0};var Cy=Ph.PredictorAdd0;Ph.PredictorAdd1=Tg,yg(`Predictor2`,`PredictorAdd2`),yg(`Predictor3`,`PredictorAdd3`),yg(`Predictor4`,`PredictorAdd4`),yg(`Predictor5`,`PredictorAdd5`),yg(`Predictor6`,`PredictorAdd6`),yg(`Predictor7`,`PredictorAdd7`),yg(`Predictor8`,`PredictorAdd8`),yg(`Predictor9`,`PredictorAdd9`),yg(`Predictor10`,`PredictorAdd10`),yg(`Predictor11`,`PredictorAdd11`),yg(`Predictor12`,`PredictorAdd12`),yg(`Predictor13`,`PredictorAdd13`);var wy=Ph.PredictorAdd2;kg(`ColorIndexInverseTransform`,`MapARGB`,`32b`,function(Ph){return Ph>>8&255},function(Ph){return Ph}),kg(`VP8LColorIndexInverseTransformAlpha`,`MapAlpha`,`8b`,function(Ph){return Ph},function(Ph){return Ph>>8&255});var Ty,Ey=Ph.ColorIndexInverseTransform,Dy=Ph.MapARGB,Oy=Ph.VP8LColorIndexInverseTransformAlpha,ky=Ph.MapAlpha,Ay=Ph.VP8LPredictorsAdd=[];Ay.length=16,(Ph.VP8LPredictors=[]).length=16,(Ph.VP8LPredictorsAdd_C=[]).length=16,(Ph.VP8LPredictors_C=[]).length=16;var jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,ib,ab,ob=zh(511),sb=zh(2041),cb=zh(225),ub=zh(767),db=0,fb=sb,pb=cb,mb=ub,hb=ob,gb=0,vb=1,yb=2,bb=3,xb=4,Sb=5,Cb=6,wb=7,Tb=8,Eb=9,Db=10,Ob=[2,3,7],kb=[3,3,11],Ab=[280,256,256,256,40],jb=[0,1,1,1,0],Mb=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Nb=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Pb=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Fb=8,Ib=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Lb=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Rb=null,zb=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Bb=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Vb=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Hb=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Ub=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Wb=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Gb=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Kb=[],qb=[],Jb=[],Yb=1,Xb=2,Zb=[],Qb=[];Xv(`UpsampleRgbLinePair`,ny,3),Xv(`UpsampleBgrLinePair`,ry,3),Xv(`UpsampleRgbaLinePair`,cy,4),Xv(`UpsampleBgraLinePair`,sy,4),Xv(`UpsampleArgbLinePair`,oy,4),Xv(`UpsampleRgba4444LinePair`,ay,2),Xv(`UpsampleRgb565LinePair`,iy,2);var $b=Ph.UpsampleRgbLinePair,ex=Ph.UpsampleBgrLinePair,tx=Ph.UpsampleRgbaLinePair,nx=Ph.UpsampleBgraLinePair,rx=Ph.UpsampleArgbLinePair,ix=Ph.UpsampleRgba4444LinePair,ax=Ph.UpsampleRgb565LinePair,ox=16,sx=1<<ox-1,cx=-227,lx=482,ux=6,dx=(256<<ux)-1,fx=0,px=zh(256),mx=zh(256),hx=zh(256),gx=zh(256),_x=zh(lx-cx),vx=zh(lx-cx);ly(`YuvToRgbRow`,ny,3),ly(`YuvToBgrRow`,ry,3),ly(`YuvToRgbaRow`,cy,4),ly(`YuvToBgraRow`,sy,4),ly(`YuvToArgbRow`,oy,4),ly(`YuvToRgba4444Row`,ay,2),ly(`YuvToRgb565Row`,iy,2);var yx=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],bx=[0,2,8],xx=[8,7,6,4,4,2,2,2,1,1,1,1],Sx=1;this.WebPDecodeRGBA=function(Ph,Ih,Vh,Hh,Uh){var Wh=vb,Gh=new Fv,Kh=new Bg;Gh.ba=Kh,Kh.S=Wh,Kh.width=[Kh.width],Kh.height=[Kh.height];var qh=Kh.width,Jh=Kh.height,Yh=new Vg;if(Yh==null||Ph==null)var Xh=2;else Fh(Yh!=null),Xh=py(Ph,Ih,Vh,Yh.width,Yh.height,Yh.Pd,Yh.Qd,Yh.format,null);if(Xh==0?(qh!=null&&(qh[0]=Yh.width[0]),Jh!=null&&(Jh[0]=Yh.height[0]),qh=1):qh=0,qh){Kh.width=Kh.width[0],Kh.height=Kh.height[0],Hh!=null&&(Hh[0]=Kh.width),Uh!=null&&(Uh[0]=Kh.height);t:{if(Hh=new E_,(Uh=new Iv).data=Ph,Uh.w=Ih,Uh.ha=Vh,Uh.kd=1,Ih=[0],Fh(Uh!=null),((Ph=py(Uh.data,Uh.w,Uh.ha,null,null,null,Ih,null,Uh))==0||Ph==7)&&Ih[0]&&(Ph=4),(Ih=Ph)==0){if(Fh(Gh!=null),Hh.data=Uh.data,Hh.w=Uh.w+Uh.offset,Hh.ha=Uh.ha-Uh.offset,Hh.put=qg,Hh.ac=Kg,Hh.bc=Jg,Hh.ma=Gh,Uh.xa){if((Ph=c_())==null){Gh=1;break t}if(function(Ph,Ih){var Lh=[0],Rh=[0],zh=[0];e:for(;;){if(Ph==null)return 0;if(Ih==null)return Ph.a=2,0;if(Ph.l=Ih,Ph.a=0,Zh(Ph.m,Ih.data,Ih.w,Ih.ha),!Yg(Ph.m,Lh,Rh,zh)){Ph.a=3;break e}if(Ph.xb=Xb,Ih.width=Lh[0],Ih.height=Rh[0],!l_(Lh[0],Rh[0],1,Ph,null))break e;return 1}return Fh(Ph.a!=0),0}(Ph,Hh)){if(Hh=(Ih=gy(Hh.width,Hh.height,Gh.Oa,Gh.ba))==0){e:{Hh=Ph;r:for(;;){if(Hh==null){Hh=0;break e}if(Fh(Hh.s.yc!=null),Fh(Hh.s.Ya!=null),Fh(0<Hh.s.Wb),Fh((Vh=Hh.l)!=null),Fh((Uh=Vh.ma)!=null),Hh.xb!=0){if(Hh.ca=Uh.ba,Hh.tb=Uh.tb,Fh(Hh.ca!=null),!my(Uh.Oa,Vh,bb)){Hh.a=2;break r}if(!u_(Hh,Vh.width)||Vh.da)break r;if((Vh.da||Lg(Hh.ca.S))&&Yv(),11>Hh.ca.S||(alert(`todo:WebPInitConvertARGBToYUV`),Hh.ca.f.kb.F!=null&&Yv()),Hh.Pb&&0<Hh.s.ua&&Hh.s.vb.X==null&&!pg(Hh.s.vb,Hh.s.Wa.Xa)){Hh.a=1;break r}Hh.xb=0}if(!o_(Hh,Hh.V,Hh.Ba,Hh.c,Hh.i,Vh.o,n_))break r;Uh.Dc=Hh.Ma,Hh=1;break e}Fh(Hh.a!=0),Hh=0}Hh=!Hh}Hh&&(Ih=Ph.a)}else Ih=Ph.a}else{if((Ph=new D_)==null){Gh=1;break t}if(Ph.Fa=Uh.na,Ph.P=Uh.P,Ph.qc=Uh.Sa,A_(Ph,Hh)){if((Ih=gy(Hh.width,Hh.height,Gh.Oa,Gh.ba))==0){if(Ph.Aa=0,Vh=Gh.Oa,Fh((Uh=Ph)!=null),Vh!=null){if(0<(qh=0>(qh=Vh.Md)?0:100<qh?255:255*qh/100)){for(Jh=Yh=0;4>Jh;++Jh)12>(Xh=Uh.p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=4);Fh+=4;var qh=Hh+(1&Hh);switch(Vh){case`VP8 `:case`VP8L`:Ih.frames[Lh]===void 0&&(Ih.frames[Lh]={}),(Xh=Ih.frames[Lh]).src_off=Rh?Bh:Fh-8,Xh.src_size=zh+Hh+8,Lh++,Rh&&(Rh=!1,zh=0,Bh=0);break;case`VP8X`:(Xh=Ih.header={}).feature_flags=Ph[Fh];var Jh=Fh+4;Xh.canvas_width=1+Gh(Ph,Jh),Jh+=3,Xh.canvas_height=1+Gh(Ph,Jh),Jh+=3;break;case`ALPH`:Rh=!0,zh=qh+8,Bh=Fh-8;break;case`ANIM`:(Xh=Ih.header).bgcolor=Kh(Ph,Fh),Jh=Fh+4,Xh.loop_count=Wh(Ph,Jh),Jh+=2;break;case`ANMF`:var Yh,Xh;(Xh=Ih.frames[Lh]={}).offset_x=2*Gh(Ph,Fh),Fh+=3,Xh.offset_y=2*Gh(Ph,Fh),Fh+=3,Xh.width=1+Gh(Ph,Fh),Fh+=3,Xh.height=1+Gh(Ph,Fh),Fh+=3,Xh.duration=Gh(Ph,Fh),Fh+=3,Yh=Ph[Fh++],Xh.dispose=1&Yh,Xh.blend=Yh>>1&1}Vh!=`ANMF`&&(Fh+=qh)}return Ih}}(Zh,0);Qh.response=Zh,Qh.rgbaoutput=!0,Qh.dataurl=!1;var $h=Qh.header?Qh.header:null,eg=Qh.frames?Qh.frames:null;if($h){$h.loop_counter=$h.loop_count,qh=[$h.canvas_height],Jh=[$h.canvas_width];for(var tg=0;tg<eg.length&&eg[tg].blend!=0;tg++);}var ng=eg[0],rg=Xh.WebPDecodeRGBA(Zh,ng.src_off,ng.src_size,Jh,qh);ng.rgba=rg,ng.imgwidth=Jh[0],ng.imgheight=qh[0];for(var ig=0;ig<Jh[0]*qh[0]*4;ig++)Yh[ig]=rg[ig];return this.width=Jh,this.height=qh,this.data=Yh,this}function hc$1(){var Ph,Fh=this.internal.__metadata__.metadata,Ih=unescape(encodeURIComponent(Fh));Ph=this.internal.__metadata__.rawXml?Ih:`<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>`+Ih.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)+`</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>`,this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write(`<< /Type /Metadata /Subtype /XML /Length `+Ph.length+` >>`),this.internal.write(`stream`),this.internal.write(Ph),this.internal.write(`endstream`),this.internal.write(`endobj`)}function gc$1(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write(`/Metadata `+this.internal.__metadata__.metadataObjectNumber+` 0 R`)}(function(Ph){var Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh=function(Ph){return Ph||={},this.isStrokeTransparent=Ph.isStrokeTransparent||!1,this.strokeOpacity=Ph.strokeOpacity||1,this.strokeStyle=Ph.strokeStyle||`#000000`,this.fillStyle=Ph.fillStyle||`#000000`,this.isFillTransparent=Ph.isFillTransparent||!1,this.fillOpacity=Ph.fillOpacity||1,this.font=Ph.font||`10px sans-serif`,this.textBaseline=Ph.textBaseline||`alphabetic`,this.textAlign=Ph.textAlign||`left`,this.lineWidth=Ph.lineWidth||1,this.lineJoin=Ph.lineJoin||`miter`,this.lineCap=Ph.lineCap||`butt`,this.path=Ph.path||[],this.transform=Ph.transform===void 0?new Hh:Ph.transform.clone(),this.globalCompositeOperation=Ph.globalCompositeOperation||`normal`,this.globalAlpha=Ph.globalAlpha||1,this.clip_path=Ph.clip_path||[],this.currentPoint=Ph.currentPoint||new Bh,this.miterLimit=Ph.miterLimit||10,this.lastPoint=Ph.lastPoint||new Bh,this.lineDashOffset=Ph.lineDashOffset||0,this.lineDash=Ph.lineDash||[],this.margin=Ph.margin||[0,0,0,0],this.prevPageLastElemOffset=Ph.prevPageLastElemOffset||0,this.ignoreClearRect=typeof Ph.ignoreClearRect!=`boolean`||Ph.ignoreClearRect,this};Ph.events.push([`initialized`,function(){this.context2d=new Gh(this),Fh=this.internal.f2,Ih=this.internal.getCoordinateString,Lh=this.internal.getVerticalCoordinateString,Rh=this.internal.getHorizontalCoordinate,zh=this.internal.getVerticalCoordinate,Bh=this.internal.Point,Vh=this.internal.Rectangle,Hh=this.internal.Matrix,Uh=new Wh}]);var Gh=function(Ph){Object.defineProperty(this,`canvas`,{get:function(){return{parentNode:!1,style:!1}}});var Fh=Ph;Object.defineProperty(this,`pdf`,{get:function(){return Fh}});var Ih=!1;Object.defineProperty(this,`pageWrapXEnabled`,{get:function(){return Ih},set:function(Ph){Ih=!!Ph}});var Lh=!1;Object.defineProperty(this,`pageWrapYEnabled`,{get:function(){return Lh},set:function(Ph){Lh=!!Ph}});var Rh=0;Object.defineProperty(this,`posX`,{get:function(){return Rh},set:function(Ph){isNaN(Ph)||(Rh=Ph)}});var zh=0;Object.defineProperty(this,`posY`,{get:function(){return zh},set:function(Ph){isNaN(Ph)||(zh=Ph)}}),Object.defineProperty(this,`margin`,{get:function(){return Uh.margin},set:function(Ph){var Fh;typeof Ph==`number`?Fh=[Ph,Ph,Ph,Ph]:((Fh=[,,,,])[0]=Ph[0],Fh[1]=Ph.length>=2?Ph[1]:Fh[0],Fh[2]=Ph.length>=3?Ph[2]:Fh[0],Fh[3]=Ph.length>=4?Ph[3]:Fh[1]),Uh.margin=Fh}});var Bh=!1;Object.defineProperty(this,`autoPaging`,{get:function(){return Bh},set:function(Ph){Bh=Ph}});var Vh=0;Object.defineProperty(this,`lastBreak`,{get:function(){return Vh},set:function(Ph){Vh=Ph}});var Hh=[];Object.defineProperty(this,`pageBreaks`,{get:function(){return Hh},set:function(Ph){Hh=Ph}}),Object.defineProperty(this,`ctx`,{get:function(){return Uh},set:function(Ph){Ph instanceof Wh&&(Uh=Ph)}}),Object.defineProperty(this,`path`,{get:function(){return Uh.path},set:function(Ph){Uh.path=Ph}});var Gh=[];Object.defineProperty(this,`ctxStack`,{get:function(){return Gh},set:function(Ph){Gh=Ph}}),Object.defineProperty(this,`fillStyle`,{get:function(){return this.ctx.fillStyle},set:function(Ph){var Fh=Kh(Ph);this.ctx.fillStyle=Fh.style,this.ctx.isFillTransparent=Fh.a===0,this.ctx.fillOpacity=Fh.a,this.pdf.setFillColor(Fh.r,Fh.g,Fh.b,{a:Fh.a}),this.pdf.setTextColor(Fh.r,Fh.g,Fh.b,{a:Fh.a})}}),Object.defineProperty(this,`strokeStyle`,{get:function(){return this.ctx.strokeStyle},set:function(Ph){var Fh=Kh(Ph);this.ctx.strokeStyle=Fh.style,this.ctx.isStrokeTransparent=Fh.a===0,this.ctx.strokeOpacity=Fh.a,Fh.a===0?this.pdf.setDrawColor(255,255,255):(Fh.a,this.pdf.setDrawColor(Fh.r,Fh.g,Fh.b))}}),Object.defineProperty(this,`lineCap`,{get:function(){return this.ctx.lineCap},set:function(Ph){[`butt`,`round`,`square`].indexOf(Ph)!==-1&&(this.ctx.lineCap=Ph,this.pdf.setLineCap(Ph))}}),Object.defineProperty(this,`lineWidth`,{get:function(){return this.ctx.lineWidth},set:function(Ph){isNaN(Ph)||(this.ctx.lineWidth=Ph,this.pdf.setLineWidth(Ph))}}),Object.defineProperty(this,`lineJoin`,{get:function(){return this.ctx.lineJoin},set:function(Ph){[`bevel`,`round`,`miter`].indexOf(Ph)!==-1&&(this.ctx.lineJoin=Ph,this.pdf.setLineJoin(Ph))}}),Object.defineProperty(this,`miterLimit`,{get:function(){return this.ctx.miterLimit},set:function(Ph){isNaN(Ph)||(this.ctx.miterLimit=Ph,this.pdf.setMiterLimit(Ph))}}),Object.defineProperty(this,`textBaseline`,{get:function(){return this.ctx.textBaseline},set:function(Ph){this.ctx.textBaseline=Ph}}),Object.defineProperty(this,`textAlign`,{get:function(){return this.ctx.textAlign},set:function(Ph){[`right`,`end`,`center`,`left`,`start`].indexOf(Ph)!==-1&&(this.ctx.textAlign=Ph)}});var qh=null,Jh=null,Yh=null;Object.defineProperty(this,`fontFaces`,{get:function(){return Yh},set:function(Ph){qh=null,Jh=null,Yh=Ph}}),Object.defineProperty(this,`font`,{get:function(){return this.ctx.font},set:function(Ph){var Fh;if(this.ctx.font=Ph,(Fh=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(Ph))!==null){var Ih=Fh[1];Fh[2];var Lh=Fh[3],Rh=Fh[4];Fh[5];var zh=Fh[6],Bh=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Rh)[2];Rh=Math.floor(Bh===`px`?parseFloat(Rh)*this.pdf.internal.scaleFactor:Bh===`em`?parseFloat(Rh)*this.pdf.getFontSize():parseFloat(Rh)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Rh);var Vh=function(Ph){var Fh,Ih,Lh=[],Rh=Ph.trim();if(Rh===``)return Qs$1;if(Rh in Hs$1)return[Hs$1[Rh]];for(;Rh!==``;){switch(Ih=null,Fh=(Rh=Ws$1(Rh)).charAt(0)){case`"`:case`'`:Ih=Gs$1(Rh.substring(1),Fh);break;default:Ih=Ks$1(Rh)}if(Ih===null||(Lh.push(Ih[0]),(Rh=Ws$1(Ih[1]))!==``&&Rh.charAt(0)!==`,`))return Qs$1;Rh=Rh.replace(/^,/,``)}return Lh}(zh);if(this.fontFaces){var Hh=function(Ph,Fh,Ih){for(var Lh=(Ih||={}).defaultFontFamily||`times`,Rh=Object.assign({},Vs$1,Ih.genericFontFamilies||{}),zh=null,Bh=null,Vh=0;Vh<Fh.length;++Vh)if(Rh[(zh=zs$1(Fh[Vh])).family]&&(zh.family=Rh[zh.family]),Ph.hasOwnProperty(zh.family)){Bh=Ph[zh.family];break}if(!(Bh||=Ph[Lh]))throw Error(`Could not find a font-family for the rule '`+Us$1(zh)+`' and default family '`+Lh+`'.`);if(Bh=function(Ph,Fh){if(Fh[Ph])return Fh[Ph];var Ih=Is$1[Ph],Lh=Bs$1(Fh,Fs$1,Ih,Ih<=Is$1.normal?-1:1);if(!Lh)throw Error(`Could not find a matching font-stretch value for `+Ph);return Lh}(zh.stretch,Bh),Bh=function(Ph,Fh){if(Fh[Ph])return Fh[Ph];for(var Ih=Ps$1[Ph],Lh=0;Lh<Ih.length;++Lh)if(Fh[Ih[Lh]])return Fh[Ih[Lh]];throw Error(`Could not find a matching font-style for `+Ph)}(zh.style,Bh),!(Bh=function(Ph,Fh){if(Fh[Ph])return Fh[Ph];if(Ph===400&&Fh[500])return Fh[500];if(Ph===500&&Fh[400])return Fh[400];var Ih=Rs$1[Ph],Lh=Bs$1(Fh,Ls$1,Ih,Ph<400?-1:1);if(!Lh)throw Error(`Could not find a matching font-weight for value `+Ph);return Lh}(zh.weight,Bh)))throw Error(`Failed to resolve a font for the rule '`+Us$1(zh)+`'.`);return Bh}(function(Ph,Fh){var Ih=Ph.getFontList(),Lh=JSON.stringify(Ih);return(qh===null||Jh!==Lh)&&(qh=function(Ph){for(var Fh={},Ih=0;Ih<Ph.length;++Ih){var Lh=zs$1(Ph[Ih]),Rh=Lh.family,zh=Lh.stretch,Bh=Lh.style,Vh=Lh.weight;Fh[Rh]=Fh[Rh]||{},Fh[Rh][zh]=Fh[Rh][zh]||{},Fh[Rh][zh][Bh]=Fh[Rh][zh][Bh]||{},Fh[Rh][zh][Bh][Vh]=Lh}return Fh}(function(Ph){var Fh=[];return Object.keys(Ph).forEach(function(Ih){Ph[Ih].forEach(function(Ph){var Lh=null;switch(Ph){case`bold`:Lh={family:Ih,weight:`bold`};break;case`italic`:Lh={family:Ih,style:`italic`};break;case`bolditalic`:Lh={family:Ih,weight:`bold`,style:`italic`};break;case``:case`normal`:Lh={family:Ih}}Lh!==null&&(Lh.ref={name:Ih,style:Ph},Fh.push(Lh))})}),Fh}(Ih).concat(Fh)),Jh=Lh),qh}(this.pdf,this.fontFaces),Vh.map(function(Ph){return{family:Ph,stretch:`normal`,weight:Lh,style:Ih}}));this.pdf.setFont(Hh.ref.name,Hh.ref.style)}else{var Uh=``;(Lh===`bold`||parseInt(Lh,10)>=700||Ih===`bold`)&&(Uh=`bold`),Ih===`italic`&&(Uh+=`italic`),Uh.length===0&&(Uh=`normal`);for(var Wh=``,Gh={arial:`Helvetica`,Arial:`Helvetica`,verdana:`Helvetica`,Verdana:`Helvetica`,helvetica:`Helvetica`,Helvetica:`Helvetica`,"sans-serif":`Helvetica`,fixed:`Courier`,monospace:`Courier`,terminal:`Courier`,cursive:`Times`,fantasy:`Times`,serif:`Times`},Kh=0;Kh<Vh.length;Kh++){if(this.pdf.internal.getFont(Vh[Kh],Uh,{noFallback:!0,disableWarning:!0})!==void 0){Wh=Vh[Kh];break}if(Uh===`bolditalic`&&this.pdf.internal.getFont(Vh[Kh],`bold`,{noFallback:!0,disableWarning:!0})!==void 0)Wh=Vh[Kh],Uh=`bold`;else if(this.pdf.internal.getFont(Vh[Kh],`normal`,{noFallback:!0,disableWarning:!0})!==void 0){Wh=Vh[Kh],Uh=`normal`;break}}if(Wh===``){for(var Yh=0;Yh<Vh.length;Yh++)if(Gh[Vh[Yh]]){Wh=Gh[Vh[Yh]];break}}Wh=Wh===``?`Times`:Wh,this.pdf.setFont(Wh,Uh)}}}}),Object.defineProperty(this,`globalCompositeOperation`,{get:function(){return this.ctx.globalCompositeOperation},set:function(Ph){this.ctx.globalCompositeOperation=Ph}}),Object.defineProperty(this,`globalAlpha`,{get:function(){return this.ctx.globalAlpha},set:function(Ph){this.ctx.globalAlpha=Ph}}),Object.defineProperty(this,`lineDashOffset`,{get:function(){return this.ctx.lineDashOffset},set:function(Ph){this.ctx.lineDashOffset=Ph,_g.call(this)}}),Object.defineProperty(this,`lineDash`,{get:function(){return this.ctx.lineDash},set:function(Ph){this.ctx.lineDash=Ph,_g.call(this)}}),Object.defineProperty(this,`ignoreClearRect`,{get:function(){return this.ctx.ignoreClearRect},set:function(Ph){this.ctx.ignoreClearRect=!!Ph}})};Gh.prototype.setLineDash=function(Ph){this.lineDash=Ph},Gh.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},Gh.prototype.fill=function(){eg.call(this,`fill`,!1)},Gh.prototype.stroke=function(){eg.call(this,`stroke`,!1)},Gh.prototype.beginPath=function(){this.path=[{type:`begin`}]},Gh.prototype.moveTo=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.moveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.moveTo`);var Ih=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));this.path.push({type:`mt`,x:Ih.x,y:Ih.y}),this.ctx.lastPoint=new Bh(Ph,Fh)},Gh.prototype.closePath=function(){var Ph=new Bh(0,0),Fh=0;for(Fh=this.path.length-1;Fh!==-1;Fh--)if(this.path[Fh].type===`begin`&&e$4(this.path[Fh+1])===`object`&&typeof this.path[Fh+1].x==`number`){Ph=new Bh(this.path[Fh+1].x,this.path[Fh+1].y);break}this.path.push({type:`close`}),this.ctx.lastPoint=new Bh(Ph.x,Ph.y)},Gh.prototype.lineTo=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.lineTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.lineTo`);var Ih=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));this.path.push({type:`lt`,x:Ih.x,y:Ih.y}),this.ctx.lastPoint=new Bh(Ih.x,Ih.y)},Gh.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),eg.call(this,null,!0)},Gh.prototype.quadraticCurveTo=function(Ph,Fh,Ih,Lh){if(isNaN(Ih)||isNaN(Lh)||isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.quadraticCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.quadraticCurveTo`);var Rh=this.ctx.transform.applyToPoint(new Bh(Ih,Lh)),zh=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));this.path.push({type:`qct`,x1:zh.x,y1:zh.y,x:Rh.x,y:Rh.y}),this.ctx.lastPoint=new Bh(Rh.x,Rh.y)},Gh.prototype.bezierCurveTo=function(Ph,Fh,Ih,Lh,Rh,zh){if(isNaN(Rh)||isNaN(zh)||isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.bezierCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.bezierCurveTo`);var Vh=this.ctx.transform.applyToPoint(new Bh(Rh,zh)),Hh=this.ctx.transform.applyToPoint(new Bh(Ph,Fh)),Uh=this.ctx.transform.applyToPoint(new Bh(Ih,Lh));this.path.push({type:`bct`,x1:Hh.x,y1:Hh.y,x2:Uh.x,y2:Uh.y,x:Vh.x,y:Vh.y}),this.ctx.lastPoint=new Bh(Vh.x,Vh.y)},Gh.prototype.arc=function(Ph,Fh,Ih,Lh,Rh,zh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh)||isNaN(Rh))throw go$1.error(`jsPDF.context2d.arc: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.arc`);if(zh=!!zh,!this.ctx.transform.isIdentity){var Vh=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));Ph=Vh.x,Fh=Vh.y;var Hh=this.ctx.transform.applyToPoint(new Bh(0,Ih)),Uh=this.ctx.transform.applyToPoint(new Bh(0,0));Ih=Math.sqrt((Hh.x-Uh.x)**2+(Hh.y-Uh.y)**2)}Math.abs(Rh-Lh)>=2*Math.PI&&(Lh=0,Rh=2*Math.PI),this.path.push({type:`arc`,x:Ph,y:Fh,radius:Ih,startAngle:Lh,endAngle:Rh,counterclockwise:zh})},Gh.prototype.arcTo=function(Ph,Fh,Ih,Lh,Rh){throw Error(`arcTo not implemented.`)},Gh.prototype.rect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.rect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rect`);this.moveTo(Ph,Fh),this.lineTo(Ph+Ih,Fh),this.lineTo(Ph+Ih,Fh+Lh),this.lineTo(Ph,Fh+Lh),this.lineTo(Ph,Fh),this.lineTo(Ph+Ih,Fh),this.lineTo(Ph,Fh)},Gh.prototype.fillRect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.fillRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillRect`);if(!qh.call(this)){var Rh={};this.lineCap!==`butt`&&(Rh.lineCap=this.lineCap,this.lineCap=`butt`),this.lineJoin!==`miter`&&(Rh.lineJoin=this.lineJoin,this.lineJoin=`miter`),this.beginPath(),this.rect(Ph,Fh,Ih,Lh),this.fill(),Rh.hasOwnProperty(`lineCap`)&&(this.lineCap=Rh.lineCap),Rh.hasOwnProperty(`lineJoin`)&&(this.lineJoin=Rh.lineJoin)}},Gh.prototype.strokeRect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.strokeRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeRect`);Jh.call(this)||(this.beginPath(),this.rect(Ph,Fh,Ih,Lh),this.stroke())},Gh.prototype.clearRect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.clearRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.clearRect`);this.ignoreClearRect||(this.fillStyle=`#ffffff`,this.fillRect(Ph,Fh,Ih,Lh))},Gh.prototype.save=function(Ph){Ph=typeof Ph!=`boolean`||Ph;for(var Fh=this.pdf.internal.getCurrentPageInfo().pageNumber,Ih=0;Ih<this.pdf.internal.getNumberOfPages();Ih++)this.pdf.setPage(Ih+1),this.pdf.internal.out(`q`);if(this.pdf.setPage(Fh),Ph){this.ctx.fontSize=this.pdf.internal.getFontSize();var Lh=new Wh(this.ctx);this.ctxStack.push(this.ctx),this.ctx=Lh}},Gh.prototype.restore=function(Ph){Ph=typeof Ph!=`boolean`||Ph;for(var Fh=this.pdf.internal.getCurrentPageInfo().pageNumber,Ih=0;Ih<this.pdf.internal.getNumberOfPages();Ih++)this.pdf.setPage(Ih+1),this.pdf.internal.out(`Q`);this.pdf.setPage(Fh),Ph&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},Gh.prototype.toDataURL=function(){throw Error(`toDataUrl not implemented.`)};var Kh=function(Ph){var Fh,Ih,Lh,Rh;if(!0===Ph.isCanvasGradient&&(Ph=Ph.getColor()),!Ph)return{r:0,g:0,b:0,a:0,style:Ph};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(Ph))Fh=0,Ih=0,Lh=0,Rh=0;else{var zh=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(Ph);if(zh!==null)Fh=parseInt(zh[1]),Ih=parseInt(zh[2]),Lh=parseInt(zh[3]),Rh=1;else if((zh=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(Ph))!==null)Fh=parseInt(zh[1]),Ih=parseInt(zh[2]),Lh=parseInt(zh[3]),Rh=parseFloat(zh[4]);else{if(Rh=1,typeof Ph==`string`&&Ph.charAt(0)!==`#`){var Bh=new xo$1(Ph);Ph=Bh.ok?Bh.toHex():`#000000`}Ph.length===4?(Fh=Ph.substring(1,2),Fh+=Fh,Ih=Ph.substring(2,3),Ih+=Ih,Lh=Ph.substring(3,4),Lh+=Lh):(Fh=Ph.substring(1,3),Ih=Ph.substring(3,5),Lh=Ph.substring(5,7)),Fh=parseInt(Fh,16),Ih=parseInt(Ih,16),Lh=parseInt(Lh,16)}}return{r:Fh,g:Ih,b:Lh,a:Rh,style:Ph}},qh=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},Jh=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};Gh.prototype.fillText=function(Ph,Fh,Ih,Lh){if(isNaN(Fh)||isNaN(Ih)||typeof Ph!=`string`)throw go$1.error(`jsPDF.context2d.fillText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillText`);if(Lh=isNaN(Lh)?void 0:Lh,!qh.call(this)){var Rh=mg(this.ctx.transform.rotation),zh=this.ctx.transform.scaleX;cg.call(this,{text:Ph,x:Fh,y:Ih,scale:zh,angle:Rh,align:this.textAlign,maxWidth:Lh})}},Gh.prototype.strokeText=function(Ph,Fh,Ih,Lh){if(isNaN(Fh)||isNaN(Ih)||typeof Ph!=`string`)throw go$1.error(`jsPDF.context2d.strokeText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeText`);if(!Jh.call(this)){Lh=isNaN(Lh)?void 0:Lh;var Rh=mg(this.ctx.transform.rotation),zh=this.ctx.transform.scaleX;cg.call(this,{text:Ph,x:Fh,y:Ih,scale:zh,renderingMode:`stroke`,angle:Rh,align:this.textAlign,maxWidth:Lh})}},Gh.prototype.measureText=function(Ph){if(typeof Ph!=`string`)throw go$1.error(`jsPDF.context2d.measureText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.measureText`);var Fh=this.pdf,Ih=this.pdf.internal.scaleFactor,Lh=Fh.internal.getFontSize(),Rh=Fh.getStringUnitWidth(Ph)*Lh/Fh.internal.scaleFactor;return new function(Ph){var Fh=(Ph||={}).width||0;return Object.defineProperty(this,`width`,{get:function(){return Fh}}),this}({width:Rh*=Math.round(96*Ih/72*1e4)/1e4})},Gh.prototype.scale=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.scale: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.scale`);var Ih=new Hh(Ph,0,0,Fh,0,0);this.ctx.transform=this.ctx.transform.multiply(Ih)},Gh.prototype.rotate=function(Ph){if(isNaN(Ph))throw go$1.error(`jsPDF.context2d.rotate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rotate`);var Fh=new Hh(Math.cos(Ph),Math.sin(Ph),-Math.sin(Ph),Math.cos(Ph),0,0);this.ctx.transform=this.ctx.transform.multiply(Fh)},Gh.prototype.translate=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.translate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.translate`);var Ih=new Hh(1,0,0,1,Ph,Fh);this.ctx.transform=this.ctx.transform.multiply(Ih)},Gh.prototype.transform=function(Ph,Fh,Ih,Lh,Rh,zh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh)||isNaN(Rh)||isNaN(zh))throw go$1.error(`jsPDF.context2d.transform: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.transform`);var Bh=new Hh(Ph,Fh,Ih,Lh,Rh,zh);this.ctx.transform=this.ctx.transform.multiply(Bh)},Gh.prototype.setTransform=function(Ph,Fh,Ih,Lh,Rh,zh){Ph=isNaN(Ph)?1:Ph,Fh=isNaN(Fh)?0:Fh,Ih=isNaN(Ih)?0:Ih,Lh=isNaN(Lh)?1:Lh,Rh=isNaN(Rh)?0:Rh,zh=isNaN(zh)?0:zh,this.ctx.transform=new Hh(Ph,Fh,Ih,Lh,Rh,zh)};var Yh=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};Gh.prototype.drawImage=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Uh,Wh){var Gh=this.pdf.getImageProperties(Ph),Kh=1,qh=1,Jh=1,Zh=1;Lh!==void 0&&Uh!==void 0&&(Jh=Uh/Lh,Zh=Wh/Rh,Kh=Gh.width/Lh*Uh/Lh,qh=Gh.height/Rh*Wh/Rh),zh===void 0&&(zh=Fh,Bh=Ih,Fh=0,Ih=0),Lh!==void 0&&Uh===void 0&&(Uh=Lh,Wh=Rh),Lh===void 0&&Uh===void 0&&(Uh=Gh.width,Wh=Gh.height);var eg=this.ctx.transform.decompose(),ng=mg(eg.rotate.shx),rg=new Hh,ig=(rg=(rg=(rg=rg.multiply(eg.translate)).multiply(eg.skew)).multiply(eg.scale)).applyToRectangle(new Vh(zh-Fh*Jh,Bh-Ih*Zh,Lh*Kh,Rh*qh));if(this.autoPaging){for(var ag,og=Xh.call(this,ig),sg=[],cg=0;cg<og.length;cg+=1)sg.indexOf(og[cg])===-1&&sg.push(og[cg]);$h(sg);for(var lg=sg[0],ug=sg[sg.length-1],dg=lg;dg<ug+1;dg++){this.pdf.setPage(dg);var fg=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],pg=dg===1?this.posY+this.margin[0]:this.margin[0],hg=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],gg=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],_g=dg===1?0:hg+(dg-2)*gg;if(this.ctx.clip_path.length!==0){var vg=this.path;ag=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Qh(ag,this.posX+this.margin[3],-_g+pg+this.ctx.prevPageLastElemOffset),tg.call(this,`fill`,!0),this.path=vg}var yg=JSON.parse(JSON.stringify(ig));yg=Qh([yg],this.posX+this.margin[3],-_g+pg+this.ctx.prevPageLastElemOffset)[0];var bg=(dg>lg||dg<ug)&&Yh.call(this);bg&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],fg,gg,null).clip().discardPath()),this.pdf.addImage(Ph,`JPEG`,yg.x,yg.y,yg.w,yg.h,null,null,ng),bg&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(Ph,`JPEG`,ig.x,ig.y,ig.w,ig.h,null,null,ng)};var Xh=function(Ph,Fh,Ih){var Lh=[];Fh||=this.pdf.internal.pageSize.width,Ih||=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Rh=this.posY+this.ctx.prevPageLastElemOffset;switch(Ph.type){default:case`mt`:case`lt`:Lh.push(Math.floor((Ph.y+Rh)/Ih)+1);break;case`arc`:Lh.push(Math.floor((Ph.y+Rh-Ph.radius)/Ih)+1),Lh.push(Math.floor((Ph.y+Rh+Ph.radius)/Ih)+1);break;case`qct`:var zh=hg(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Ph.x1,Ph.y1,Ph.x,Ph.y);Lh.push(Math.floor((zh.y+Rh)/Ih)+1),Lh.push(Math.floor((zh.y+zh.h+Rh)/Ih)+1);break;case`bct`:var Bh=gg(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Ph.x1,Ph.y1,Ph.x2,Ph.y2,Ph.x,Ph.y);Lh.push(Math.floor((Bh.y+Rh)/Ih)+1),Lh.push(Math.floor((Bh.y+Bh.h+Rh)/Ih)+1);break;case`rect`:Lh.push(Math.floor((Ph.y+Rh)/Ih)+1),Lh.push(Math.floor((Ph.y+Ph.h+Rh)/Ih)+1)}for(var Vh=0;Vh<Lh.length;Vh+=1)for(;this.pdf.internal.getNumberOfPages()<Lh[Vh];)Zh.call(this);return Lh},Zh=function(){var Ph=this.fillStyle,Fh=this.strokeStyle,Ih=this.font,Lh=this.lineCap,Rh=this.lineWidth,zh=this.lineJoin;this.pdf.addPage(),this.fillStyle=Ph,this.strokeStyle=Fh,this.font=Ih,this.lineCap=Lh,this.lineWidth=Rh,this.lineJoin=zh},Qh=function(Ph,Fh,Ih){for(var Lh=0;Lh<Ph.length;Lh++)switch(Ph[Lh].type){case`bct`:Ph[Lh].x2+=Fh,Ph[Lh].y2+=Ih;case`qct`:Ph[Lh].x1+=Fh,Ph[Lh].y1+=Ih;default:Ph[Lh].x+=Fh,Ph[Lh].y+=Ih}return Ph},$h=function(Ph){return Ph.sort(function(Ph,Fh){return Ph-Fh})},eg=function(Ph,Fh){var Ih=this.fillStyle,Lh=this.strokeStyle,Rh=this.lineCap,zh=this.lineWidth,Bh=Math.abs(zh*this.ctx.transform.scaleX),Vh=this.lineJoin;if(this.autoPaging){for(var Hh,Uh,Wh=JSON.parse(JSON.stringify(this.path)),Gh=JSON.parse(JSON.stringify(this.path)),Kh=[],qh=0;qh<Gh.length;qh++)if(Gh[qh].x!==void 0)for(var Jh=Xh.call(this,Gh[qh]),eg=0;eg<Jh.length;eg+=1)Kh.indexOf(Jh[eg])===-1&&Kh.push(Jh[eg]);for(var ng=0;ng<Kh.length;ng++)for(;this.pdf.internal.getNumberOfPages()<Kh[ng];)Zh.call(this);$h(Kh);for(var rg=Kh[0],ig=Kh[Kh.length-1],ag=rg;ag<ig+1;ag++){this.pdf.setPage(ag),this.fillStyle=Ih,this.strokeStyle=Lh,this.lineCap=Rh,this.lineWidth=Bh,this.lineJoin=Vh;var og=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],sg=ag===1?this.posY+this.margin[0]:this.margin[0],cg=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],lg=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ug=ag===1?0:cg+(ag-2)*lg;if(this.ctx.clip_path.length!==0){var dg=this.path;Hh=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Qh(Hh,this.posX+this.margin[3],-ug+sg+this.ctx.prevPageLastElemOffset),tg.call(this,Ph,!0),this.path=dg}if(Uh=JSON.parse(JSON.stringify(Wh)),this.path=Qh(Uh,this.posX+this.margin[3],-ug+sg+this.ctx.prevPageLastElemOffset),!1===Fh||ag===0){var fg=(ag>rg||ag<ig)&&Yh.call(this);fg&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],og,lg,null).clip().discardPath()),tg.call(this,Ph,Fh),fg&&this.pdf.restoreGraphicsState()}this.lineWidth=zh}this.path=Wh}else this.lineWidth=Bh,tg.call(this,Ph,Fh),this.lineWidth=zh},tg=function(Ph,Fh){if((Ph!==`stroke`||Fh||!Jh.call(this))&&(Ph===`stroke`||Fh||!qh.call(this))){for(var Ih,Lh,Rh=[],zh=this.path,Bh=0;Bh<zh.length;Bh++){var Vh=zh[Bh];switch(Vh.type){case`begin`:Rh.push({begin:!0});break;case`close`:Rh.push({close:!0});break;case`mt`:Rh.push({start:Vh,deltas:[],abs:[]});break;case`lt`:var Hh=Rh.length;if(zh[Bh-1]&&!isNaN(zh[Bh-1].x)&&(Ih=[Vh.x-zh[Bh-1].x,Vh.y-zh[Bh-1].y],Hh>0)){for(;Hh>=0;Hh--)if(!0!==Rh[Hh-1].close&&!0!==Rh[Hh-1].begin){Rh[Hh-1].deltas.push(Ih),Rh[Hh-1].abs.push(Vh);break}}break;case`bct`:Ih=[Vh.x1-zh[Bh-1].x,Vh.y1-zh[Bh-1].y,Vh.x2-zh[Bh-1].x,Vh.y2-zh[Bh-1].y,Vh.x-zh[Bh-1].x,Vh.y-zh[Bh-1].y],Rh[Rh.length-1].deltas.push(Ih);break;case`qct`:var Uh=zh[Bh-1].x+2/3*(Vh.x1-zh[Bh-1].x),Wh=zh[Bh-1].y+2/3*(Vh.y1-zh[Bh-1].y),Gh=Vh.x+2/3*(Vh.x1-Vh.x),Kh=Vh.y+2/3*(Vh.y1-Vh.y),Yh=Vh.x,Xh=Vh.y;Ih=[Uh-zh[Bh-1].x,Wh-zh[Bh-1].y,Gh-zh[Bh-1].x,Kh-zh[Bh-1].y,Yh-zh[Bh-1].x,Xh-zh[Bh-1].y],Rh[Rh.length-1].deltas.push(Ih);break;case`arc`:Rh.push({deltas:[],abs:[],arc:!0}),Array.isArray(Rh[Rh.length-1].abs)&&Rh[Rh.length-1].abs.push(Vh)}}Lh=Fh?null:Ph===`stroke`?`stroke`:`fill`;for(var Zh=!1,Qh=0;Qh<Rh.length;Qh++)if(Rh[Qh].arc)for(var $h=Rh[Qh].abs,eg=0;eg<$h.length;eg++){var tg=$h[eg];tg.type===`arc`?ig.call(this,tg.x,tg.y,tg.radius,tg.startAngle,tg.endAngle,tg.counterclockwise,void 0,Fh,!Zh):lg.call(this,tg.x,tg.y),Zh=!0}else if(!0===Rh[Qh].close)this.pdf.internal.out(`h`),Zh=!1;else if(!0!==Rh[Qh].begin){var ng=Rh[Qh].start.x,rg=Rh[Qh].start.y;ug.call(this,Rh[Qh].deltas,ng,rg),Zh=!0}Lh&&ag.call(this,Lh),Fh&&og.call(this)}},ng=function(Ph){var Fh=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Ih=Fh*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case`bottom`:return Ph-Ih;case`top`:return Ph+Fh-Ih;case`hanging`:return Ph+Fh-2*Ih;case`middle`:return Ph+Fh/2-Ih;default:return Ph}},rg=function(Ph){return Ph+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};Gh.prototype.createLinearGradient=function(){var Ph=function(){};return Ph.colorStops=[],Ph.addColorStop=function(Ph,Fh){this.colorStops.push([Ph,Fh])},Ph.getColor=function(){return this.colorStops.length===0?`#000000`:this.colorStops[0][1]},Ph.isCanvasGradient=!0,Ph},Gh.prototype.createPattern=function(){return this.createLinearGradient()},Gh.prototype.createRadialGradient=function(){return this.createLinearGradient()};var ig=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh){for(var Uh=fg.call(this,Ih,Lh,Rh,zh),Wh=0;Wh<Uh.length;Wh++){var Gh=Uh[Wh];Wh===0&&(Hh?sg.call(this,Gh.x1+Ph,Gh.y1+Fh):lg.call(this,Gh.x1+Ph,Gh.y1+Fh)),dg.call(this,Ph,Fh,Gh.x2,Gh.y2,Gh.x3,Gh.y3,Gh.x4,Gh.y4)}Vh?og.call(this):ag.call(this,Bh)},ag=function(Ph){switch(Ph){case`stroke`:this.pdf.internal.out(`S`);break;case`fill`:this.pdf.internal.out(`f`)}},og=function(){this.pdf.clip(),this.pdf.discardPath()},sg=function(Ph,Fh){this.pdf.internal.out(Ih(Ph)+` `+Lh(Fh)+` m`)},cg=function(Ph){var Fh;switch(Ph.align){case`right`:case`end`:Fh=`right`;break;case`center`:Fh=`center`;break;default:Fh=`left`}var Ih,Lh,Rh,zh=this.pdf.getTextDimensions(Ph.text),Uh=ng.call(this,Ph.y),Wh=rg.call(this,Uh)-zh.h,Gh=this.ctx.transform.applyToPoint(new Bh(Ph.x,Uh));if(this.autoPaging){var Kh=this.ctx.transform.decompose(),qh=new Hh;qh=(qh=(qh=qh.multiply(Kh.translate)).multiply(Kh.skew)).multiply(Kh.scale);for(var Jh=this.ctx.transform.applyToRectangle(new Vh(Ph.x,Uh,zh.w,zh.h)),Zh=qh.applyToRectangle(new Vh(Ph.x,Wh,zh.w,zh.h)),eg=Xh.call(this,Zh),ig=[],ag=0;ag<eg.length;ag+=1)ig.indexOf(eg[ag])===-1&&ig.push(eg[ag]);$h(ig);for(var og=ig[0],sg=ig[ig.length-1],cg=og;cg<sg+1;cg++){this.pdf.setPage(cg);var lg=cg===1?this.posY+this.margin[0]:this.margin[0],ug=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],dg=this.pdf.internal.pageSize.height-this.margin[2],fg=dg-this.margin[0],pg=this.pdf.internal.pageSize.width-this.margin[1],mg=pg-this.margin[3],hg=cg===1?0:ug+(cg-2)*fg;if(this.ctx.clip_path.length!==0){var gg=this.path;Ih=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Qh(Ih,this.posX+this.margin[3],-1*hg+lg),tg.call(this,`fill`,!0),this.path=gg}var _g=Qh([JSON.parse(JSON.stringify(Zh))],this.posX+this.margin[3],-hg+lg+this.ctx.prevPageLastElemOffset)[0];Ph.scale>=.01&&(Lh=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lh*Ph.scale),Rh=this.lineWidth,this.lineWidth=Rh*Ph.scale);var vg=this.autoPaging!==`text`;if(vg||_g.y+_g.h<=dg){if(vg||_g.y>=lg&&_g.x<=pg){var yg=vg?Ph.text:this.pdf.splitTextToSize(Ph.text,Ph.maxWidth||pg-_g.x)[0],bg=Qh([JSON.parse(JSON.stringify(Jh))],this.posX+this.margin[3],-hg+lg+this.ctx.prevPageLastElemOffset)[0],xg=vg&&(cg>og||cg<sg)&&Yh.call(this);xg&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],mg,fg,null).clip().discardPath()),this.pdf.text(yg,bg.x,bg.y,{angle:Ph.angle,align:Fh,renderingMode:Ph.renderingMode}),xg&&this.pdf.restoreGraphicsState()}}else _g.y<dg&&(this.ctx.prevPageLastElemOffset+=dg-_g.y);Ph.scale>=.01&&(this.pdf.setFontSize(Lh),this.lineWidth=Rh)}}else Ph.scale>=.01&&(Lh=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lh*Ph.scale),Rh=this.lineWidth,this.lineWidth=Rh*Ph.scale),this.pdf.text(Ph.text,Gh.x+this.posX,Gh.y+this.posY,{angle:Ph.angle,align:Fh,renderingMode:Ph.renderingMode,maxWidth:Ph.maxWidth}),Ph.scale>=.01&&(this.pdf.setFontSize(Lh),this.lineWidth=Rh)},lg=function(Ph,Fh,Rh,zh){Rh||=0,zh||=0,this.pdf.internal.out(Ih(Ph+Rh)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h=Math.max(Ph,Rh,Bh,Uh),qh=Math.min(Fh,zh,Hh,Wh),Jh=Math.max(Fh,zh,Hh,Wh);return new Vh(Gh,qh,Kh-Gh,Jh-qh)},gg=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Hh){var Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg=Ih-Ph,ig=Lh-Fh,ag=Rh-Ih,og=zh-Lh,sg=Bh-Rh,cg=Hh-zh;for(Wh=0;Wh<41;Wh++)Zh=(Yh=(Gh=Ph+(Uh=Wh/40)*rg)+Uh*((qh=Ih+Uh*ag)-Gh))+Uh*(qh+Uh*(Rh+Uh*sg-qh)-Yh),Qh=(Xh=(Kh=Fh+Uh*ig)+Uh*((Jh=Lh+Uh*og)-Kh))+Uh*(Jh+Uh*(zh+Uh*cg-Jh)-Xh),Wh==0?($h=Zh,eg=Qh,tg=Zh,ng=Qh):($h=Math.min($h,Zh),eg=Math.min(eg,Qh),tg=Math.max(tg,Zh),ng=Math.max(ng,Qh));return new Vh(Math.round($h),Math.round(eg),Math.round(tg-$h),Math.round(ng-eg))},_g=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var Ph,Fh,Ih=(Ph=this.ctx.lineDash,Fh=this.ctx.lineDashOffset,JSON.stringify({lineDash:Ph,lineDashOffset:Fh}));this.prevLineDash!==Ih&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Ih)}}})(Z$3.API),function(Ph){var Fh=function(Ph){var Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh;for(/[^\x00-\xFF]/.test(Ph),Ih=[],Lh=0,Rh=(Ph+=Fh=`\0\0\0\0`.slice(Ph.length%4||4)).length;Rh>Lh;Lh+=4)(zh=(Ph.charCodeAt(Lh)<<24)+(Ph.charCodeAt(Lh+1)<<16)+(Ph.charCodeAt(Lh+2)<<8)+Ph.charCodeAt(Lh+3))===0?Ih.push(122):(Bh=(zh=((zh=((zh=((zh=(zh-(Wh=zh%85))/85)-(Uh=zh%85))/85)-(Hh=zh%85))/85)-(Vh=zh%85))/85)%85,Ih.push(Bh+33,Vh+33,Hh+33,Uh+33,Wh+33));return function(Ph,Fh){for(var Ih=Fh;Ih>0;Ih--)Ph.pop()}(Ih,Fh.length),String.fromCharCode.apply(String,Ih)+`~>`},Ih=function(Ph){var Fh,Ih,Lh,Rh,zh,Bh=String,Vh=`length`,Hh=255,Uh=`charCodeAt`,Wh=`slice`,Gh=`replace`;for(Ph[Wh](-2),Ph=Ph[Wh](0,-2)[Gh](/\s/g,``)[Gh](`z`,`!!!!!`),Lh=[],Rh=0,zh=(Ph+=Fh=`uuuuu`[Wh](Ph[Vh]%5||5))[Vh];zh>Rh;Rh+=5)Ih=52200625*(Ph[Uh](Rh)-33)+614125*(Ph[Uh](Rh+1)-33)+7225*(Ph[Uh](Rh+2)-33)+85*(Ph[Uh](Rh+3)-33)+(Ph[Uh](Rh+4)-33),Lh.push(Hh&Ih>>24,Hh&Ih>>16,Hh&Ih>>8,Hh&Ih);return function(Ph,Fh){for(var Ih=Fh;Ih>0;Ih--)Ph.pop()}(Lh,Fh[Vh]),Bh.fromCharCode.apply(Bh,Lh)},Lh=function(Ph){return Ph.split(``).map(function(Ph){return(`0`+Ph.charCodeAt().toString(16)).slice(-2)}).join(``)+`>`},Rh=function(Ph){var Fh=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((Ph=Ph.replace(/\s/g,``)).indexOf(`>`)!==-1&&(Ph=Ph.substr(0,Ph.indexOf(`>`))),Ph.length%2&&(Ph+=`0`),!1===Fh.test(Ph))return``;for(var Ih=``,Lh=0;Lh<Ph.length;Lh+=2)Ih+=String.fromCharCode(`0x`+(Ph[Lh]+Ph[Lh+1]));return Ih},zh=function(Ph){for(var Fh=new Uint8Array(Ph.length),Ih=Ph.length;Ih--;)Fh[Ih]=Ph.charCodeAt(Ih);return(Fh=me$3(Fh)).reduce(function(Ph,Fh){return Ph+String.fromCharCode(Fh)},``)};Ph.processDataByFilters=function(Ph,Bh){var Vh=0,Hh=Ph||``,Uh=[];for(typeof(Bh||=[])==`string`&&(Bh=[Bh]),Vh=0;Vh<Bh.length;Vh+=1)switch(Bh[Vh]){case`ASCII85Decode`:case`/ASCII85Decode`:Hh=Ih(Hh),Uh.push(`/ASCII85Encode`);break;case`ASCII85Encode`:case`/ASCII85Encode`:Hh=Fh(Hh),Uh.push(`/ASCII85Decode`);break;case`ASCIIHexDecode`:case`/ASCIIHexDecode`:Hh=Rh(Hh),Uh.push(`/ASCIIHexEncode`);break;case`ASCIIHexEncode`:case`/ASCIIHexEncode`:Hh=Lh(Hh),Uh.push(`/ASCIIHexDecode`);break;case`FlateEncode`:case`/FlateEncode`:Hh=zh(Hh),Uh.push(`/FlateDecode`);break;default:throw Error(`The filter: "`+Bh[Vh]+`" is not implemented`)}return{data:Hh,reverseChain:Uh.reverse().join(` `)}}}(Z$3.API),function(Ph){Ph.loadFile=function(Ph,Fh,Ih){return function(Ph,Fh,Ih){Fh=!1!==Fh,Ih=typeof Ih==`function`?Ih:function(){};var Lh=void 0;try{Lh=function(Ph,Fh,Ih){var Lh=new XMLHttpRequest,Rh=0,zh=function(Ph){var Fh=Ph.length,Ih=[],Lh=String.fromCharCode;for(Rh=0;Rh<Fh;Rh+=1)Ih.push(Lh(255&Ph.charCodeAt(Rh)));return Ih.join(``)};if(Lh.open(`GET`,Ph,!Fh),Lh.overrideMimeType(`text/plain; charset=x-user-defined`),!1===Fh&&(Lh.onload=function(){Lh.status===200?Ih(zh(this.responseText)):Ih(void 0)}),Lh.send(null),Fh&&Lh.status===200)return zh(Lh.responseText)}(Ph,Fh,Ih)}catch{}return Lh}(Ph,Fh,Ih)},Ph.allowFsRead=void 0,Ph.loadImageFile=Ph.loadFile}(Z$3.API),function(Ph){function Fh(){return(X$3.html2canvas?Promise.resolve(X$3.html2canvas):__vitePreload(()=>import(`./html2canvas-Cx501zZr-DiKaqnKs.js`).then(Ph=>c$2(Ph.default)),[])).catch(function(Ph){return Promise.reject(Error(`Could not load html2canvas: `+Ph))}).then(function(Ph){return Ph.default?Ph.default:Ph})}function Ih(){return(X$3.DOMPurify?Promise.resolve(X$3.DOMPurify):__vitePreload(()=>import(`./purify.es-Fx1Nqyry-BwJECkqS.js`),[])).catch(function(Ph){return Promise.reject(Error(`Could not load dompurify: `+Ph))}).then(function(Ph){return Ph.default?Ph.default:Ph})}var Lh=function(Ph){var Fh=e$4(Ph);return Fh===`undefined`?`undefined`:Fh===`string`||Ph instanceof String?`string`:Fh===`number`||Ph instanceof Number?`number`:Fh===`function`||Ph instanceof Function?`function`:Ph&&Ph.constructor===Array?`array`:Ph&&Ph.nodeType===1?`element`:Fh===`object`?`object`:`unknown`},Rh=function(Ph,Fh){var Ih=document.createElement(Ph);for(var Lh in Fh.className&&(Ih.className=Fh.className),Fh.innerHTML&&Fh.dompurify&&(Ih.innerHTML=Fh.dompurify.sanitize(Fh.innerHTML)),Fh.style)Ih.style[Lh]=Fh.style[Lh];return Ih},zh=function Ph(Fh,Ih){for(var Lh=Fh.nodeType===3?document.createTextNode(Fh.nodeValue):Fh.cloneNode(!1),Rh=Fh.firstChild;Rh;Rh=Rh.nextSibling)!0!==Ih&&Rh.nodeType===1&&Rh.nodeName===`SCRIPT`||Lh.appendChild(Ph(Rh,Ih));return Fh.nodeType===1&&(Fh.nodeName===`CANVAS`?(Lh.width=Fh.width,Lh.height=Fh.height,Lh.getContext(`2d`).drawImage(Fh,0,0)):Fh.nodeName!==`TEXTAREA`&&Fh.nodeName!==`SELECT`||(Lh.value=Fh.value),Lh.addEventListener(`load`,function(){Lh.scrollTop=Fh.scrollTop,Lh.scrollLeft=Fh.scrollLeft},!0)),Lh},Bh=function Ph(Fh){var Ih=Object.assign(Ph.convert(Promise.resolve()),JSON.parse(JSON.stringify(Ph.template))),Lh=Ph.convert(Promise.resolve(),Ih);return(Lh=Lh.setProgress(1,Ph,1,[Ph])).set(Fh)};(Bh.prototype=Object.create(Promise.prototype)).constructor=Bh,Bh.convert=function(Ph,Fh){return Ph.__proto__=Fh||Bh.prototype,Ph},Bh.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:`file.pdf`,margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:`transparent`}},Bh.prototype.from=function(Ph,Fh){return this.then(function(){switch(Fh||=function(Ph){switch(Lh(Ph)){case`string`:return`string`;case`element`:return Ph.nodeName.toLowerCase()===`canvas`?`canvas`:`element`;default:return`unknown`}}(Ph),Fh){case`string`:return this.then(Ih).then(function(Fh){return this.set({src:Rh(`div`,{innerHTML:Ph,dompurify:Fh})})});case`element`:return this.set({src:Ph});case`canvas`:return this.set({canvas:Ph});case`img`:return this.set({img:Ph});default:return this.error(`Unknown source type.`)}})},Bh.prototype.to=function(Ph){switch(Ph){case`container`:return this.toContainer();case`canvas`:return this.toCanvas();case`img`:return this.toImg();case`pdf`:return this.toPdf();default:return this.error(`Invalid target.`)}},Bh.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error(`Cannot duplicate - no source HTML.`)},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var Ph={position:`relative`,display:`inline-block`,width:(typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+`px`,left:0,right:0,top:0,margin:`auto`,backgroundColor:this.opt.backgroundColor},Fh=zh(this.prop.src,this.opt.html2canvas.javascriptEnabled);Fh.tagName===`BODY`&&(Ph.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+`px`),this.prop.overlay=Rh(`div`,{className:`html2pdf__overlay`,style:{position:`fixed`,overflow:`hidden`,zIndex:1e3,left:`-100000px`,right:0,bottom:0,top:0}}),this.prop.container=Rh(`div`,{className:`html2pdf__container`,style:Ph}),this.prop.container.appendChild(Fh),this.prop.container.firstChild.appendChild(Rh(`div`,{style:{clear:`both`,border:`0 none transparent`,margin:0,padding:0,height:0}})),this.prop.container.style.float=`none`,this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position=`relative`,this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+`px`})},Bh.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(Fh).then(function(Ph){var Fh=Object.assign({},this.opt.html2canvas);return delete Fh.onrendered,Ph(this.prop.container,Fh)}).then(function(Ph){(this.opt.html2canvas.onrendered||function(){})(Ph),this.prop.canvas=Ph,document.body.removeChild(this.prop.overlay)})},Bh.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(Fh).then(function(Ph){var Fh=this.opt.jsPDF,Ih=this.opt.fontFaces,Lh=typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,Rh=Object.assign({async:!0,allowTaint:!0,scale:Lh,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:`#ffffff`,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete Rh.onrendered,Fh.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,Fh.context2d.posX=this.opt.x,Fh.context2d.posY=this.opt.y,Fh.context2d.margin=this.opt.margin,Fh.context2d.fontFaces=Ih,Ih)for(var zh=0;zh<Ih.length;++zh){var Bh=Ih[zh],Vh=Bh.src.find(function(Ph){return Ph.format===`truetype`});Vh&&Fh.addFont(Vh.url,Bh.ref.name,Bh.ref.style)}return Rh.windowHeight=Rh.windowHeight||0,Rh.windowHeight=Rh.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):Rh.windowHeight,Fh.context2d.save(!0),Ph(this.prop.container,Rh)}).then(function(Ph){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(Ph),this.prop.canvas=Ph,document.body.removeChild(this.prop.overlay)})},Bh.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var Ph=this.prop.canvas.toDataURL(`image/`+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement(`img`),this.prop.img.src=Ph})},Bh.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},Bh.prototype.output=function(Ph,Fh,Ih){return(Ih||=`pdf`).toLowerCase()===`img`||Ih.toLowerCase()===`image`?this.outputImg(Ph,Fh):this.outputPdf(Ph,Fh)},Bh.prototype.outputPdf=function(Ph,Fh){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(Ph,Fh)})},Bh.prototype.outputImg=function(Ph){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(Ph){case void 0:case`img`:return this.prop.img;case`datauristring`:case`dataurlstring`:return this.prop.img.src;case`datauri`:case`dataurl`:return document.location.href=this.prop.img.src;default:throw`Image output type "`+Ph+`" is not supported.`}})},Bh.prototype.save=function(Ph){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(Ph?{filename:Ph}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},Bh.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},Bh.prototype.set=function(Ph){if(Lh(Ph)!==`object`)return this;var Fh=Object.keys(Ph||{}).map(function(Fh){if(Fh in Bh.template.prop)return function(){this.prop[Fh]=Ph[Fh]};switch(Fh){case`margin`:return this.setMargin.bind(this,Ph.margin);case`jsPDF`:return function(){return this.opt.jsPDF=Ph.jsPDF,this.setPageSize()};case`pageSize`:return this.setPageSize.bind(this,Ph.pageSize);default:return function(){this.opt[Fh]=Ph[Fh]}}},this);return this.then(function(){return this.thenList(Fh)})},Bh.prototype.get=function(Ph,Fh){return this.then(function(){var Ih=Ph in Bh.template.prop?this.prop[Ph]:this.opt[Ph];return Fh?Fh(Ih):Ih})},Bh.prototype.setMargin=function(Ph){return this.then(function(){switch(Lh(Ph)){case`number`:Ph=[Ph,Ph,Ph,Ph];case`array`:if(Ph.length===2&&(Ph=[Ph[0],Ph[1],Ph[0],Ph[1]]),Ph.length===4)break;default:return this.error(`Invalid margin array.`)}this.opt.margin=Ph}).then(this.setPageSize)},Bh.prototype.setPageSize=function(Ph){function Fh(Ph,Fh){return Math.floor(Ph*Fh/72*96)}return this.then(function(){(Ph||=Z$3.getPageSize(this.opt.jsPDF)).hasOwnProperty(`inner`)||(Ph.inner={width:Ph.width-this.opt.margin[1]-this.opt.margin[3],height:Ph.height-this.opt.margin[0]-this.opt.margin[2]},Ph.inner.px={width:Fh(Ph.inner.width,Ph.k),height:Fh(Ph.inner.height,Ph.k)},Ph.inner.ratio=Ph.inner.height/Ph.inner.width),this.prop.pageSize=Ph})},Bh.prototype.setProgress=function(Ph,Fh,Ih,Lh){return Ph!=null&&(this.progress.val=Ph),Fh!=null&&(this.progress.state=Fh),Ih!=null&&(this.progress.n=Ih),Lh!=null&&(this.progress.stack=Lh),this.progress.ratio=this.progress.val/this.progress.state,this},Bh.prototype.updateProgress=function(Ph,Fh,Ih,Lh){return this.setProgress(Ph?this.progress.val+Ph:null,Fh||null,Ih?this.progress.n+Ih:null,Lh?this.progress.stack.concat(Lh):null)},Bh.prototype.then=function(Ph,Fh){var Ih=this;return this.thenCore(Ph,Fh,function(Ph,Fh){return Ih.updateProgress(null,null,1,[Ph]),Promise.prototype.then.call(this,function(Fh){return Ih.updateProgress(null,Ph),Fh}).then(Ph,Fh).then(function(Ph){return Ih.updateProgress(1),Ph})})},Bh.prototype.thenCore=function(Ph,Fh,Ih){Ih||=Promise.prototype.then;var Lh=this;Ph&&=Ph.bind(Lh),Fh&&=Fh.bind(Lh);var Rh=Promise.toString().indexOf(`[native code]`)!==-1&&Promise.name===`Promise`?Lh:Bh.convert(Object.assign({},Lh),Promise.prototype),zh=Ih.call(Rh,Ph,Fh);return Bh.convert(zh,Lh.__proto__)},Bh.prototype.thenExternal=function(Ph,Fh){return Promise.prototype.then.call(this,Ph,Fh)},Bh.prototype.thenList=function(Ph){var Fh=this;return Ph.forEach(function(Ph){Fh=Fh.thenCore(Ph)}),Fh},Bh.prototype.catch=function(Ph){Ph&&=Ph.bind(this);var Fh=Promise.prototype.catch.call(this,Ph);return Bh.convert(Fh,this)},Bh.prototype.catchExternal=function(Ph){return Promise.prototype.catch.call(this,Ph)},Bh.prototype.error=function(Ph){return this.then(function(){throw Error(Ph)})},Bh.prototype.using=Bh.prototype.set,Bh.prototype.saveAs=Bh.prototype.save,Bh.prototype.export=Bh.prototype.output,Bh.prototype.run=Bh.prototype.then,Z$3.getPageSize=function(Ph,Fh,Ih){if(e$4(Ph)===`object`){var Lh=Ph;Ph=Lh.orientation,Fh=Lh.unit||Fh,Ih=Lh.format||Ih}Fh||=`mm`,Ih||=`a4`,Ph=(``+(Ph||`P`)).toLowerCase();var Rh,zh=(``+Ih).toLowerCase(),Bh={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(Fh){case`pt`:Rh=1;break;case`mm`:Rh=72/25.4;break;case`cm`:Rh=72/2.54;break;case`in`:Rh=72;break;case`px`:Rh=.75;break;case`pc`:case`em`:Rh=12;break;case`ex`:Rh=6;break;default:throw`Invalid unit: `+Fh}var Vh,Hh=0,Uh=0;if(Bh.hasOwnProperty(zh))Hh=Bh[zh][1]/Rh,Uh=Bh[zh][0]/Rh;else try{Hh=Ih[1],Uh=Ih[0]}catch{throw Error(`Invalid format: `+Ih)}if(Ph===`p`||Ph===`portrait`)Ph=`p`,Uh>Hh&&(Vh=Uh,Uh=Hh,Hh=Vh);else{if(Ph!==`l`&&Ph!==`landscape`)throw`Invalid orientation: `+Ph;Ph=`l`,Hh>Uh&&(Vh=Uh,Uh=Hh,Hh=Vh)}return{width:Uh,height:Hh,unit:Fh,k:Rh,orientation:Ph}},Ph.html=function(Ph,Fh){(Fh||={}).callback=Fh.callback||function(){},Fh.html2canvas=Fh.html2canvas||{},Fh.html2canvas.canvas=Fh.html2canvas.canvas||this.canvas,Fh.jsPDF=Fh.jsPDF||this,Fh.fontFaces=Fh.fontFaces?Fh.fontFaces.map(zs$1):null;var Ih=new Bh(Fh);return Fh.worker?Ih:Ih.from(Ph).doCallback()}}(Z$3.API),Z$3.API.addJS=function(Ph){var Fh,Ih,Lh=function(Ph){for(var Fh=``,Ih=0;Ih<Ph.length;Ih++){var Lh=Ph[Ih];if(Lh===`(`||Lh===`)`){for(var Rh=0,zh=Ih-1;zh>=0&&Ph[zh]===`\\`;zh--)Rh++;Fh+=Rh%2==0?`\\`+Lh:Lh}else Fh+=Lh}return Fh}(Ph);return this.internal.events.subscribe(`postPutResources`,function(){Fh=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/Names [(EmbeddedJS) `+(Fh+1)+` 0 R]`),this.internal.out(`>>`),this.internal.out(`endobj`),Ih=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /JavaScript`),this.internal.out(`/JS (`+Lh+`)`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){Fh!==void 0&&Ih!==void 0&&this.internal.out(`/Names <</JavaScript `+Fh+` 0 R>>`)}),this},function(Ph){var Fh;Ph.events.push([`postPutResources`,function(){var Ph=this,Ih=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var Lh=Ph.outline.render().split(/\r\n/),Rh=0;Rh<Lh.length;Rh++){var zh=Lh[Rh],Bh=Ih.exec(zh);if(Bh!=null){var Vh=Bh[1];Ph.internal.newObjectDeferredBegin(Vh,!1)}Ph.internal.write(zh)}if(this.outline.createNamedDestinations){var Hh=this.internal.pages.length,Uh=[];for(Rh=0;Rh<Hh;Rh++){var Wh=Ph.internal.newObject();Uh.push(Wh);var Gh=Ph.internal.getPageInfo(Rh+1);Ph.internal.write(`<< /D[`+Gh.objId+` 0 R /XYZ null null null]>> endobj`)}var Kh=Ph.internal.newObject();for(Ph.internal.write(`<< /Names [ `),Rh=0;Rh<Uh.length;Rh++)Ph.internal.write(`(page_`+(Rh+1)+`)`+Uh[Rh]+` 0 R`);Ph.internal.write(` ] >>`,`endobj`),Fh=Ph.internal.newObject(),Ph.internal.write(`<< /Dests `+Kh+` 0 R`),Ph.internal.write(`>>`,`endobj`)}}]),Ph.events.push([`putCatalog`,function(){var Ph=this;Ph.outline.root.children.length>0&&(Ph.internal.write(`/Outlines`,this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&Ph.internal.write(`/Names `+Fh+` 0 R`))}]),Ph.events.push([`initialized`,function(){var Ph=this;Ph.outline={createNamedDestinations:!1,root:{children:[]}},Ph.outline.add=function(Ph,Fh,Ih){var Lh={title:Fh,options:Ih,children:[]};return Ph??=this.root,Ph.children.push(Lh),Lh},Ph.outline.render=function(){return this.ctx={},this.ctx.val=``,this.ctx.pdf=Ph,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},Ph.outline.genIds_r=function(Fh){Fh.id=Ph.internal.newObjectDeferred();for(var Ih=0;Ih<Fh.children.length;Ih++)this.genIds_r(Fh.children[Ih])},Ph.outline.renderRoot=function(Ph){this.objStart(Ph),this.line(`/Type /Outlines`),Ph.children.length>0&&(this.line(`/First `+this.makeRef(Ph.children[0])),this.line(`/Last `+this.makeRef(Ph.children[Ph.children.length-1]))),this.line(`/Count `+this.count_r({count:0},Ph)),this.objEnd()},Ph.outline.renderItems=function(Fh){for(var Ih=this.ctx.pdf.internal.getVerticalCoordinateString,Lh=0;Lh<Fh.children.length;Lh++){var Rh=Fh.children[Lh];this.objStart(Rh),this.line(`/Title `+this.makeString(Rh.title)),this.line(`/Parent `+this.makeRef(Fh)),Lh>0&&this.line(`/Prev `+this.makeRef(Fh.children[Lh-1])),Lh<Fh.children.length-1&&this.line(`/Next `+this.makeRef(Fh.children[Lh+1])),Rh.children.length>0&&(this.line(`/First `+this.makeRef(Rh.children[0])),this.line(`/Last `+this.makeRef(Rh.children[Rh.children.length-1])));var zh=this.count=this.count_r({count:0},Rh);if(zh>0&&this.line(`/Count `+zh),Rh.options&&Rh.options.pageNumber){var Bh=Ph.internal.getPageInfo(Rh.options.pageNumber);this.line(`/Dest [`+Bh.objId+` 0 R /XYZ 0 `+Ih(0)+` 0]`)}this.objEnd()}for(var Vh=0;Vh<Fh.children.length;Vh++)this.renderItems(Fh.children[Vh])},Ph.outline.line=function(Ph){this.ctx.val+=Ph+`\r
287
+ `),Fh}}},createDefaultAppearanceStream:function(Ph){var Fh=Ph.scope.internal.getFont(Ph.fontName,Ph.fontStyle).id,Ih=Ph.scope.__private__.encodeColorString(Ph.color);return`/`+Fh+` `+Ph.fontSize+` Tf `+Ih}};$$4.internal={Bezier_C:.551915024494,calculateCross:function(Ph){var Fh=$$4.internal.getWidth(Ph),Ih=$$4.internal.getHeight(Ph),Lh=Math.min(Fh,Ih);return{x1:{x:(Fh-Lh)/2,y:(Ih-Lh)/2+Lh},x2:{x:(Fh-Lh)/2+Lh,y:(Ih-Lh)/2},x3:{x:(Fh-Lh)/2,y:(Ih-Lh)/2},x4:{x:(Fh-Lh)/2+Lh,y:(Ih-Lh)/2+Lh}}}},$$4.internal.getWidth=function(Ph){var Fh=0;return e$4(Ph)===`object`&&(Fh=es$1(Ph.Rect[2])),Fh},$$4.internal.getHeight=function(Ph){var Fh=0;return e$4(Ph)===`object`&&(Fh=es$1(Ph.Rect[3])),Fh};var Ms$1=qo$1.addField=function(Ph){if(ms$1(this,Ph),!(Ph instanceof bs$1))throw Error(`Invalid argument passed to jsPDF.addField.`);var Fh;return(Fh=Ph).scope.internal.acroformPlugin.printedOut&&(Fh.scope.internal.acroformPlugin.printedOut=!1,Fh.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),Fh.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(Fh),Ph.page=Ph.scope.internal.getCurrentPageInfo().pageNumber,this};qo$1.AcroFormChoiceField=xs$1,qo$1.AcroFormListBox=Ss$1,qo$1.AcroFormComboBox=Cs$1,qo$1.AcroFormEditBox=ws$1,qo$1.AcroFormButton=Ts$1,qo$1.AcroFormPushButton=Es$1,qo$1.AcroFormRadioButton=Ds$1,qo$1.AcroFormCheckBox=ks$1,qo$1.AcroFormTextField=As$1,qo$1.AcroFormPasswordField=js$1,qo$1.AcroFormAppearance=$$4,qo$1.AcroForm={ChoiceField:xs$1,ListBox:Ss$1,ComboBox:Cs$1,EditBox:ws$1,Button:Ts$1,PushButton:Es$1,RadioButton:Ds$1,CheckBox:ks$1,TextField:As$1,PasswordField:js$1,Appearance:$$4},Z$3.AcroForm={ChoiceField:xs$1,ListBox:Ss$1,ComboBox:Cs$1,EditBox:ws$1,Button:Ts$1,PushButton:Es$1,RadioButton:Ds$1,CheckBox:ks$1,TextField:As$1,PasswordField:js$1,Appearance:$$4},Z$3.AcroForm;function Ns$1(Ph){return Ph.reduce(function(Ph,Fh,Ih){return Ph[Fh]=Ih,Ph},{})}(function(Ph){var Fh=`addImage_`;Ph.__addimage__={};var Ih=`UNKNOWN`,Lh={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]]},Rh=Ph.__addimage__.getImageFileTypeByImageData=function(Ph,Fh){var Rh,zh,Bh,Vh,Hh,Uh=Ih;if((Fh||=Ih)===`RGBA`||Ph.data!==void 0&&Ph.data instanceof Uint8ClampedArray&&`height`in Ph&&`width`in Ph)return`RGBA`;if(ng(Ph))for(Hh in Lh)for(Bh=Lh[Hh],Rh=0;Rh<Bh.length;Rh+=1){for(Vh=!0,zh=0;zh<Bh[Rh].length;zh+=1)if(Bh[Rh][zh]!==void 0&&Bh[Rh][zh]!==Ph[zh]){Vh=!1;break}if(!0===Vh){Uh=Hh;break}}else for(Hh in Lh)for(Bh=Lh[Hh],Rh=0;Rh<Bh.length;Rh+=1){for(Vh=!0,zh=0;zh<Bh[Rh].length;zh+=1)if(Bh[Rh][zh]!==void 0&&Bh[Rh][zh]!==Ph.charCodeAt(zh)){Vh=!1;break}if(!0===Vh){Uh=Hh;break}}return Uh===Ih&&Fh!==Ih&&(Uh=Fh),Uh},zh=function Ph(Fh){for(var Ih=this.internal.write,Lh=this.internal.putStream,Rh=(0,this.internal.getFilters)();Rh.indexOf(`FlateEncode`)!==-1;)Rh.splice(Rh.indexOf(`FlateEncode`),1);Fh.objectId=this.internal.newObject();var zh=[];if(zh.push({key:`Type`,value:`/XObject`}),zh.push({key:`Subtype`,value:`/Image`}),zh.push({key:`Width`,value:Fh.width}),zh.push({key:`Height`,value:Fh.height}),Fh.colorSpace===Zh.INDEXED?zh.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(Fh.palette.length/3-1)+` `+(`sMask`in Fh&&Fh.sMask!==void 0?Fh.objectId+2:Fh.objectId+1)+` 0 R]`}):(zh.push({key:`ColorSpace`,value:`/`+Fh.colorSpace}),Fh.colorSpace===Zh.DEVICE_CMYK&&zh.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),zh.push({key:`BitsPerComponent`,value:Fh.bitsPerComponent}),`decodeParameters`in Fh&&Fh.decodeParameters!==void 0&&zh.push({key:`DecodeParms`,value:`<<`+Fh.decodeParameters+`>>`}),`transparency`in Fh&&Array.isArray(Fh.transparency)&&Fh.transparency.length>0){for(var Bh=``,Vh=0,Hh=Fh.transparency.length;Vh<Hh;Vh++)Bh+=Fh.transparency[Vh]+` `+Fh.transparency[Vh]+` `;zh.push({key:`Mask`,value:`[`+Bh+`]`})}Fh.sMask!==void 0&&zh.push({key:`SMask`,value:Fh.objectId+1+` 0 R`});var Uh=Fh.filter===void 0?void 0:[`/`+Fh.filter];if(Lh({data:Fh.data,additionalKeyValues:zh,alreadyAppliedFilters:Uh,objectId:Fh.objectId}),Ih(`endobj`),`sMask`in Fh&&Fh.sMask!==void 0){var Wh=Fh.sMaskBitsPerComponent??Fh.bitsPerComponent,Gh={width:Fh.width,height:Fh.height,colorSpace:`DeviceGray`,bitsPerComponent:Wh,data:Fh.sMask};`filter`in Fh&&(Gh.decodeParameters=`/Predictor ${Fh.predictor} /Colors 1 /BitsPerComponent ${Wh} /Columns ${Fh.width}`,Gh.filter=Fh.filter),Ph.call(this,Gh)}if(Fh.colorSpace===Zh.INDEXED){var Kh=this.internal.newObject();Lh({data:ig(new Uint8Array(Fh.palette)),objectId:Kh}),Ih(`endobj`)}},Bh=function(){var Ph=this.internal.collections[Fh+`images`];for(var Ih in Ph)zh.call(this,Ph[Ih])},Vh=function(){var Ph,Ih=this.internal.collections[Fh+`images`],Lh=this.internal.write;for(var Rh in Ih)Lh(`/I`+(Ph=Ih[Rh]).index,Ph.objectId,`0`,`R`)},Hh=function(){this.internal.collections[Fh+`images`]||(this.internal.collections[Fh+`images`]={},this.internal.events.subscribe(`putResources`,Bh),this.internal.events.subscribe(`putXobjectDict`,Vh))},Uh=function(){var Ph=this.internal.collections[Fh+`images`];return Hh.call(this),Ph},Wh=function(){return Object.keys(this.internal.collections[Fh+`images`]).length},Gh=function(Fh){return typeof Ph[`process`+Fh.toUpperCase()]==`function`},Kh=function(Ph){return e$4(Ph)===`object`&&Ph.nodeType===1},qh=function(Fh,Ih){if(Fh.nodeName===`IMG`&&Fh.hasAttribute(`src`)){var Lh=``+Fh.getAttribute(`src`);if(Lh.indexOf(`data:image/`)===0)return So$1(unescape(Lh).split(`base64,`).pop());var Rh=Ph.loadFile(Lh,!0);if(Rh!==void 0)return Rh}if(Fh.nodeName===`CANVAS`){if(Fh.width===0||Fh.height===0)throw Error(`Given canvas must have data. Canvas width: `+Fh.width+`, height: `+Fh.height);var zh;switch(Ih){case`PNG`:zh=`image/png`;break;case`WEBP`:zh=`image/webp`;break;default:zh=`image/jpeg`}return So$1(Fh.toDataURL(zh,1).split(`base64,`).pop())}},Jh=function(Ph){var Ih=this.internal.collections[Fh+`images`];if(Ih){for(var Lh in Ih)if(Ph===Ih[Lh].alias)return Ih[Lh]}},Yh=function(Ph,Fh,Ih){return Ph||Fh||(Ph=-96,Fh=-96),Ph<0&&(Ph=-1*Ih.width*72/Ph/this.internal.scaleFactor),Fh<0&&(Fh=-1*Ih.height*72/Fh/this.internal.scaleFactor),Ph===0&&(Ph=Fh*Ih.width/Ih.height),Fh===0&&(Fh=Ph*Ih.height/Ih.width),[Ph,Fh]},Xh=function(Ph,Fh,Ih,Lh,Rh,zh){var Bh=Yh.call(this,Ih,Lh,Rh),Vh=this.internal.getCoordinateString,Hh=this.internal.getVerticalCoordinateString,Wh=Uh.call(this);if(Ih=Bh[0],Lh=Bh[1],Wh[Rh.index]=Rh,zh){zh*=Math.PI/180;var Gh=Math.cos(zh),Kh=Math.sin(zh),qh=function(Ph){return Ph.toFixed(4)},Jh=[qh(Gh),qh(Kh),qh(-1*Kh),qh(Gh),0,0,`cm`]}this.internal.write(`q`),zh?(this.internal.write([1,`0`,`0`,1,Vh(Ph),Hh(Fh+Lh),`cm`].join(` `)),this.internal.write(Jh.join(` `)),this.internal.write([Vh(Ih),`0`,`0`,Vh(Lh),`0`,`0`,`cm`].join(` `))):this.internal.write([Vh(Ih),`0`,`0`,Vh(Lh),Vh(Ph),Hh(Fh+Lh),`cm`].join(` `)),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,`cm`].join(` `)),this.internal.write(`/I`+Rh.index+` Do`),this.internal.write(`Q`)},Zh=Ph.color_spaces={DEVICE_RGB:`DeviceRGB`,DEVICE_GRAY:`DeviceGray`,DEVICE_CMYK:`DeviceCMYK`,CAL_GREY:`CalGray`,CAL_RGB:`CalRGB`,LAB:`Lab`,ICC_BASED:`ICCBased`,INDEXED:`Indexed`,PATTERN:`Pattern`,SEPARATION:`Separation`,DEVICE_N:`DeviceN`};Ph.decode={DCT_DECODE:`DCTDecode`,FLATE_DECODE:`FlateDecode`,LZW_DECODE:`LZWDecode`,JPX_DECODE:`JPXDecode`,JBIG2_DECODE:`JBIG2Decode`,ASCII85_DECODE:`ASCII85Decode`,ASCII_HEX_DECODE:`ASCIIHexDecode`,RUN_LENGTH_DECODE:`RunLengthDecode`,CCITT_FAX_DECODE:`CCITTFaxDecode`};var Qh=Ph.image_compression={NONE:`NONE`,FAST:`FAST`,MEDIUM:`MEDIUM`,SLOW:`SLOW`},$h=Ph.__addimage__.sHashCode=function(Ph){var Fh,Ih,Lh=0;if(typeof Ph==`string`)for(Ih=Ph.length,Fh=0;Fh<Ih;Fh++)Lh=(Lh<<5)-Lh+Ph.charCodeAt(Fh),Lh|=0;else if(ng(Ph))for(Ih=Ph.byteLength/2,Fh=0;Fh<Ih;Fh++)Lh=(Lh<<5)-Lh+Ph[Fh],Lh|=0;return Lh},eg=Ph.__addimage__.validateStringAsBase64=function(Ph){(Ph||=``).toString().trim();var Fh=!0;return Ph.length===0&&(Fh=!1),Ph.length%4!=0&&(Fh=!1),!1===/^[A-Za-z0-9+/]+$/.test(Ph.substr(0,Ph.length-2))&&(Fh=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(Ph.substr(-2))&&(Fh=!1),Fh},tg=Ph.__addimage__.extractImageFromDataUrl=function(Ph){if(Ph==null||!(Ph=Ph.trim()).startsWith(`data:`))return null;var Fh=Ph.indexOf(`,`);return Fh<0?null:Ph.substring(0,Fh).trim().endsWith(`base64`)?Ph.substring(Fh+1):null};Ph.__addimage__.isArrayBuffer=function(Ph){return Ph instanceof ArrayBuffer};var ng=Ph.__addimage__.isArrayBufferView=function(Ph){return Ph instanceof Int8Array||Ph instanceof Uint8Array||Ph instanceof Uint8ClampedArray||Ph instanceof Int16Array||Ph instanceof Uint16Array||Ph instanceof Int32Array||Ph instanceof Uint32Array||Ph instanceof Float32Array||Ph instanceof Float64Array},rg=Ph.__addimage__.binaryStringToUint8Array=function(Ph){for(var Fh=Ph.length,Ih=new Uint8Array(Fh),Lh=0;Lh<Fh;Lh++)Ih[Lh]=Ph.charCodeAt(Lh);return Ih},ig=Ph.__addimage__.arrayBufferToBinaryString=function(Ph){for(var Fh=``,Ih=ng(Ph)?Ph:new Uint8Array(Ph),Lh=0;Lh<Ih.length;Lh+=8192)Fh+=String.fromCharCode.apply(null,Ih.subarray(Lh,Lh+8192));return Fh};Ph.addImage=function(){var Ph,Fh,Lh,Rh,zh,Bh,Vh,Uh,Wh;if(typeof arguments[1]==`number`?(Fh=Ih,Lh=arguments[1],Rh=arguments[2],zh=arguments[3],Bh=arguments[4],Vh=arguments[5],Uh=arguments[6],Wh=arguments[7]):(Fh=arguments[1],Lh=arguments[2],Rh=arguments[3],zh=arguments[4],Bh=arguments[5],Vh=arguments[6],Uh=arguments[7],Wh=arguments[8]),e$4(Ph=arguments[0])===`object`&&!Kh(Ph)&&`imageData`in Ph){var Gh=Ph;Ph=Gh.imageData,Fh=Gh.format||Fh||Ih,Lh=Gh.x||Lh||0,Rh=Gh.y||Rh||0,zh=Gh.w||Gh.width||zh,Bh=Gh.h||Gh.height||Bh,Vh=Gh.alias||Vh,Uh=Gh.compression||Uh,Wh=Gh.rotation||Gh.angle||Wh}var qh=this.internal.getFilters();if(Uh===void 0&&qh.indexOf(`FlateEncode`)!==-1&&(Uh=`SLOW`),isNaN(Lh)||isNaN(Rh))throw Error(`Invalid coordinates passed to jsPDF.addImage`);Hh.call(this);var Jh=ag.call(this,Ph,Fh,Vh,Uh);return Xh.call(this,Lh,Rh,zh,Bh,Jh,Wh),this};var ag=function(Fh,Lh,zh,Bh){var Vh,Hh,Uh;if(typeof Fh==`string`&&Rh(Fh)===Ih){Fh=unescape(Fh);var Yh=og(Fh,!1);(Yh!==``||(Yh=Ph.loadFile(Fh,!0))!==void 0)&&(Fh=Yh)}if(Kh(Fh)&&(Fh=qh(Fh,Lh)),Lh=Rh(Fh,Lh),!Gh(Lh))throw Error(`addImage does not support files of type '`+Lh+`', please ensure that a plugin for '`+Lh+`' support is added.`);if(((Uh=zh)==null||Uh.length===0)&&(zh=function(Ph){return typeof Ph==`string`||ng(Ph)?$h(Ph):ng(Ph.data)?$h(Ph.data):null}(Fh)),(Vh=Jh.call(this,zh))||(Fh instanceof Uint8Array||Lh===`RGBA`||(Hh=Fh,Fh=rg(Fh)),Vh=this[`process`+Lh.toUpperCase()](Fh,Wh.call(this),zh,function(Fh){return Fh&&typeof Fh==`string`&&(Fh=Fh.toUpperCase()),Fh in Ph.image_compression?Fh:Qh.NONE}(Bh),Hh)),!Vh)throw Error(`An unknown error occurred whilst processing the image.`);return Vh},og=Ph.__addimage__.convertBase64ToBinaryString=function(Ph,Fh){Fh=typeof Fh!=`boolean`||Fh;var Ih,Lh=``;if(typeof Ph==`string`){Ih=tg(Ph)??Ph;try{Lh=So$1(Ih)}catch(Ph){if(Fh)throw eg(Ih)?Error(`atob-Error in jsPDF.convertBase64ToBinaryString `+Ph.message):Error(`Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString `)}}return Lh};Ph.getImageProperties=function(Fh){var Lh,zh,Bh=``;if(Kh(Fh)&&(Fh=qh(Fh)),typeof Fh==`string`&&Rh(Fh)===Ih&&((Bh=og(Fh,!1))===``&&(Bh=Ph.loadFile(Fh)||``),Fh=Bh),zh=Rh(Fh),!Gh(zh))throw Error(`addImage does not support files of type '`+zh+`', please ensure that a plugin for '`+zh+`' support is added.`);if(Fh instanceof Uint8Array||(Fh=rg(Fh)),!(Lh=this[`process`+zh.toUpperCase()](Fh)))throw Error(`An unknown error occurred whilst processing the image`);return Lh.fileType=zh,Lh}})(Z$3.API),function(Ph){var Fh=function(Ph){if(Ph!==void 0&&Ph!=``)return!0};Z$3.API.events.push([`addPage`,function(Ph){this.internal.getPageInfo(Ph.pageNumber).pageContext.annotations=[]}]),Ph.events.push([`putPage`,function(Ph){for(var Ih,Lh,Rh,zh=this.internal.getCoordinateString,Bh=this.internal.getVerticalCoordinateString,Vh=this.internal.getPageInfoByObjId(Ph.objId),Hh=Ph.pageContext.annotations,Uh=!1,Wh=0;Wh<Hh.length&&!Uh;Wh++)switch((Ih=Hh[Wh]).type){case`link`:(Fh(Ih.options.url)||Fh(Ih.options.pageNumber))&&(Uh=!0);break;case`reference`:case`text`:case`freetext`:Uh=!0}if(Uh!=0){this.internal.write(`/Annots [`);for(var Gh=0;Gh<Hh.length;Gh++){Ih=Hh[Gh];var Kh=this.internal.pdfEscape,qh=this.internal.getEncryptor(Ph.objId);switch(Ih.type){case`reference`:this.internal.write(` `+Ih.object.objId+` 0 R `);break;case`text`:var Jh=this.internal.newAdditionalObject(),Yh=this.internal.newAdditionalObject(),Xh=this.internal.getEncryptor(Jh.objId),Zh=Ih.title||`Note`;Rh=`<</Type /Annot /Subtype /Text `+(Lh=`/Rect [`+zh(Ih.bounds.x)+` `+Bh(Ih.bounds.y+Ih.bounds.h)+` `+zh(Ih.bounds.x+Ih.bounds.w)+` `+Bh(Ih.bounds.y)+`] `)+`/Contents (`+Kh(Xh(Ih.contents))+`)`,Rh+=` /Popup `+Yh.objId+` 0 R`,Rh+=` /P `+Vh.objId+` 0 R`,Rh+=` /T (`+Kh(Xh(Zh))+`) >>`,Jh.content=Rh;var Qh=Jh.objId+` 0 R`;Rh=`<</Type /Annot /Subtype /Popup `+(Lh=`/Rect [`+zh(Ih.bounds.x+30)+` `+Bh(Ih.bounds.y+Ih.bounds.h)+` `+zh(Ih.bounds.x+Ih.bounds.w+30)+` `+Bh(Ih.bounds.y)+`] `)+` /Parent `+Qh,Ih.open&&(Rh+=` /Open true`),Rh+=` >>`,Yh.content=Rh,this.internal.write(Jh.objId,`0 R`,Yh.objId,`0 R`);break;case`freetext`:Lh=`/Rect [`+zh(Ih.bounds.x)+` `+Bh(Ih.bounds.y)+` `+zh(Ih.bounds.x+Ih.bounds.w)+` `+Bh(Ih.bounds.y+Ih.bounds.h)+`] `;var $h=`font: Helvetica,sans-serif 12.0pt; text-align:left; color:#`+(Ih.color||`#000000`);Rh=`<</Type /Annot /Subtype /FreeText `+Lh+`/Contents (`+Kh(qh(Ih.contents))+`)`,Rh+=` /DS(`+Kh(qh($h))+`)`,Rh+=` /Border [0 0 0]`,Rh+=` >>`,this.internal.write(Rh);break;case`link`:if(Ih.options.name){var eg=this.annotations._nameMap[Ih.options.name];Ih.options.pageNumber=eg.page,Ih.options.top=eg.y}else Ih.options.top||(Ih.options.top=0);if(Lh=`/Rect [`+Ih.finalBounds.x+` `+Ih.finalBounds.y+` `+Ih.finalBounds.w+` `+Ih.finalBounds.h+`] `,Rh=``,Ih.options.url)Rh=`<</Type /Annot /Subtype /Link `+Lh+`/Border [0 0 0] /A <</S /URI /URI (`+Kh(qh(Ih.options.url))+`) >>`;else if(Ih.options.pageNumber)switch(Rh=`<</Type /Annot /Subtype /Link `+Lh+`/Border [0 0 0] /Dest [`+this.internal.getPageInfo(Ih.options.pageNumber).objId+` 0 R`,Ih.options.magFactor=Ih.options.magFactor||`XYZ`,Ih.options.magFactor){case`Fit`:Rh+=` /Fit]`;break;case`FitH`:Rh+=` /FitH `+Ih.options.top+`]`;break;case`FitV`:Ih.options.left=Ih.options.left||0,Rh+=` /FitV `+Ih.options.left+`]`;break;default:var tg=Bh(Ih.options.top);Ih.options.left=Ih.options.left||0,Ih.options.zoom===void 0&&(Ih.options.zoom=0),Rh+=` /XYZ `+Ih.options.left+` `+tg+` `+Ih.options.zoom+`]`}Rh!=``&&(Rh+=` >>`,this.internal.write(Rh))}}this.internal.write(`]`)}}]),Ph.createAnnotation=function(Ph){var Fh=this.internal.getCurrentPageInfo();switch(Ph.type){case`link`:this.link(Ph.bounds.x,Ph.bounds.y,Ph.bounds.w,Ph.bounds.h,Ph);break;case`text`:case`freetext`:Fh.pageContext.annotations.push(Ph)}},Ph.link=function(Ph,Fh,Ih,Lh,Rh){var zh=this.internal.getCurrentPageInfo(),Bh=this.internal.getCoordinateString,Vh=this.internal.getVerticalCoordinateString;zh.pageContext.annotations.push({finalBounds:{x:Bh(Ph),y:Vh(Fh),w:Bh(Ph+Ih),h:Vh(Fh+Lh)},options:Rh,type:`link`})},Ph.textWithLink=function(Ph,Fh,Ih,Lh){var Rh,zh,Bh=this.getTextWidth(Ph),Vh=this.internal.getLineHeight()/this.internal.scaleFactor;if(Lh.maxWidth!==void 0){zh=Lh.maxWidth;var Hh=this.splitTextToSize(Ph,zh).length;Rh=Math.ceil(Vh*Hh)}else zh=Bh,Rh=Vh;return this.text(Ph,Fh,Ih,Lh),Ih+=.2*Vh,Lh.align===`center`&&(Fh-=Bh/2),Lh.align===`right`&&(Fh-=Bh),this.link(Fh,Ih-Vh,zh,Rh,Lh),Bh},Ph.getTextWidth=function(Ph){var Fh=this.internal.getFontSize();return this.getStringUnitWidth(Ph)*Fh/this.internal.scaleFactor}}(Z$3.API),function(Ph){var Fh={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},Ih={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},Lh={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},Rh=[1570,1571,1573,1575];Ph.__arabicParser__={};var zh=Ph.__arabicParser__.isInArabicSubstitutionA=function(Ph){return Fh[Ph.charCodeAt(0)]!==void 0},Bh=Ph.__arabicParser__.isArabicLetter=function(Ph){return typeof Ph==`string`&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(Ph)},Vh=Ph.__arabicParser__.isArabicEndLetter=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length<=2},Hh=Ph.__arabicParser__.isArabicAlfLetter=function(Ph){return Bh(Ph)&&Rh.indexOf(Ph.charCodeAt(0))>=0};Ph.__arabicParser__.arabicLetterHasIsolatedForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length>=1};var Uh=Ph.__arabicParser__.arabicLetterHasFinalForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length>=2};Ph.__arabicParser__.arabicLetterHasInitialForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length>=3};var Wh=Ph.__arabicParser__.arabicLetterHasMedialForm=function(Ph){return Bh(Ph)&&zh(Ph)&&Fh[Ph.charCodeAt(0)].length==4},Gh=Ph.__arabicParser__.resolveLigatures=function(Ph){var Fh=0,Lh=Ih,Rh=``,zh=0;for(Fh=0;Fh<Ph.length;Fh+=1)Lh[Ph.charCodeAt(Fh)]===void 0?(Lh=Ih,Rh+=Ph.charAt(Fh-zh),Fh-=zh,zh=0):(zh++,typeof(Lh=Lh[Ph.charCodeAt(Fh)])==`number`&&(Rh+=String.fromCharCode(Lh),Lh=Ih,zh=0),Fh===Ph.length-1&&(Lh=Ih,Rh+=Ph.charAt(Fh-(zh-1)),Fh-=zh-1,zh=0));return Rh};Ph.__arabicParser__.isArabicDiacritic=function(Ph){return Ph!==void 0&&Lh[Ph.charCodeAt(0)]!==void 0};var Kh=Ph.__arabicParser__.getCorrectForm=function(Ph,Fh,Ih){return Bh(Ph)?!1===zh(Ph)?-1:!Uh(Ph)||!Bh(Fh)&&!Bh(Ih)||!Bh(Ih)&&Vh(Fh)||Vh(Ph)&&!Bh(Fh)||Vh(Ph)&&Hh(Fh)||Vh(Ph)&&Vh(Fh)?0:Wh(Ph)&&Bh(Fh)&&!Vh(Fh)&&Bh(Ih)&&Uh(Ih)?3:Vh(Ph)||!Bh(Ih)?1:2:-1},qh=function(Ph){var Ih=0,Lh=0,Rh=0,zh=``,Vh=``,Hh=``,Uh=(Ph||=``).split(`\\s+`),Wh=[];for(Ih=0;Ih<Uh.length;Ih+=1){for(Wh.push(``),Lh=0;Lh<Uh[Ih].length;Lh+=1)zh=Uh[Ih][Lh],Vh=Uh[Ih][Lh-1],Hh=Uh[Ih][Lh+1],Bh(zh)?(Rh=Kh(zh,Vh,Hh),Wh[Ih]+=Rh===-1?zh:String.fromCharCode(Fh[zh.charCodeAt(0)][Rh])):Wh[Ih]+=zh;Wh[Ih]=Gh(Wh[Ih])}return Wh.join(` `)},Jh=Ph.__arabicParser__.processArabic=Ph.processArabic=function(){var Ph,Fh=typeof arguments[0]==`string`?arguments[0]:arguments[0].text,Ih=[];if(Array.isArray(Fh)){var Lh=0;for(Ih=[],Lh=0;Lh<Fh.length;Lh+=1)Array.isArray(Fh[Lh])?Ih.push([qh(Fh[Lh][0]),Fh[Lh][1],Fh[Lh][2]]):Ih.push([qh(Fh[Lh])]);Ph=Ih}else Ph=qh(Fh);return typeof arguments[0]==`string`?Ph:(arguments[0].text=Ph,arguments[0])};Ph.events.push([`preProcessText`,Jh])}(Z$3.API),Z$3.API.autoPrint=function(Ph){var Fh;return(Ph||={}).variant=Ph.variant||`non-conform`,Ph.variant===`javascript`?this.addJS(`print({});`):(this.internal.events.subscribe(`postPutResources`,function(){Fh=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /Named`),this.internal.out(`/Type /Action`),this.internal.out(`/N /Print`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){this.internal.out(`/OpenAction `+Fh+` 0 R`)})),this},function(Ph){var Fh=function(){var Ph=void 0;Object.defineProperty(this,`pdf`,{get:function(){return Ph},set:function(Fh){Ph=Fh}});var Fh=150;Object.defineProperty(this,`width`,{get:function(){return Fh},set:function(Ph){Fh=isNaN(Ph)||!1===Number.isInteger(Ph)||Ph<0?150:Ph,this.getContext(`2d`).pageWrapXEnabled&&(this.getContext(`2d`).pageWrapX=Fh+1)}});var Ih=300;Object.defineProperty(this,`height`,{get:function(){return Ih},set:function(Ph){Ih=isNaN(Ph)||!1===Number.isInteger(Ph)||Ph<0?300:Ph,this.getContext(`2d`).pageWrapYEnabled&&(this.getContext(`2d`).pageWrapY=Ih+1)}});var Lh=[];Object.defineProperty(this,`childNodes`,{get:function(){return Lh},set:function(Ph){Lh=Ph}});var Rh={};Object.defineProperty(this,`style`,{get:function(){return Rh},set:function(Ph){Rh=Ph}}),Object.defineProperty(this,`parentNode`,{})};Fh.prototype.getContext=function(Ph,Fh){var Ih;if((Ph||=`2d`)!==`2d`)return null;for(Ih in Fh)this.pdf.context2d.hasOwnProperty(Ih)&&(this.pdf.context2d[Ih]=Fh[Ih]);return this.pdf.context2d._canvas=this,this.pdf.context2d},Fh.prototype.toDataURL=function(){throw Error(`toDataURL is not implemented.`)},Ph.events.push([`initialized`,function(){this.canvas=new Fh,this.canvas.pdf=this}])}(Z$3.API),function(Ph){var Fh={left:0,top:0,bottom:0,right:0},Ih=!1,Lh=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},Fh),this.internal.__cell__.margins.width=this.getPageWidth(),Rh.call(this))},Rh=function(){this.internal.__cell__.lastCell=new zh,this.internal.__cell__.pages=1},zh=function(){var Ph=arguments[0];Object.defineProperty(this,`x`,{enumerable:!0,get:function(){return Ph},set:function(Fh){Ph=Fh}});var Fh=arguments[1];Object.defineProperty(this,`y`,{enumerable:!0,get:function(){return Fh},set:function(Ph){Fh=Ph}});var Ih=arguments[2];Object.defineProperty(this,`width`,{enumerable:!0,get:function(){return Ih},set:function(Ph){Ih=Ph}});var Lh=arguments[3];Object.defineProperty(this,`height`,{enumerable:!0,get:function(){return Lh},set:function(Ph){Lh=Ph}});var Rh=arguments[4];Object.defineProperty(this,`text`,{enumerable:!0,get:function(){return Rh},set:function(Ph){Rh=Ph}});var zh=arguments[5];Object.defineProperty(this,`lineNumber`,{enumerable:!0,get:function(){return zh},set:function(Ph){zh=Ph}});var Bh=arguments[6];return Object.defineProperty(this,`align`,{enumerable:!0,get:function(){return Bh},set:function(Ph){Bh=Ph}}),this};zh.prototype.clone=function(){return new zh(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},zh.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},Ph.setHeaderFunction=function(Ph){return Lh.call(this),this.internal.__cell__.headerFunction=typeof Ph==`function`?Ph:void 0,this},Ph.getTextDimensions=function(Ph,Fh){Lh.call(this);var Ih=(Fh||={}).fontSize||this.getFontSize(),Rh=Fh.font||this.getFont(),zh=Fh.scaleFactor||this.internal.scaleFactor,Bh=0,Vh=0,Hh=0,Uh=this;if(!Array.isArray(Ph)&&typeof Ph!=`string`){if(typeof Ph!=`number`)throw Error(`getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.`);Ph=String(Ph)}var Wh=Fh.maxWidth;Wh>0?typeof Ph==`string`?Ph=this.splitTextToSize(Ph,Wh):Object.prototype.toString.call(Ph)===`[object Array]`&&(Ph=Ph.reduce(function(Ph,Fh){return Ph.concat(Uh.splitTextToSize(Fh,Wh))},[])):Ph=Array.isArray(Ph)?Ph:[Ph];for(var Gh=0;Gh<Ph.length;Gh++)Bh<(Hh=this.getStringUnitWidth(Ph[Gh],{font:Rh})*Ih)&&(Bh=Hh);return Bh!==0&&(Vh=Ph.length),{w:Bh/=zh,h:Math.max((Vh*Ih*this.getLineHeightFactor()-Ih*(this.getLineHeightFactor()-1))/zh,0)}},Ph.cellAddPage=function(){Lh.call(this),this.addPage();var Ph=this.internal.__cell__.margins||Fh;return this.internal.__cell__.lastCell=new zh(Ph.left,Ph.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var Bh=Ph.cell=function(){var Ph=arguments[0]instanceof zh?arguments[0]:new zh(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);Lh.call(this);var Rh=this.internal.__cell__.lastCell,Bh=this.internal.__cell__.padding,Vh=this.internal.__cell__.margins||Fh,Hh=this.internal.__cell__.tableHeaderRow,Uh=this.internal.__cell__.printHeaders;return Rh.lineNumber!==void 0&&(Rh.lineNumber===Ph.lineNumber?(Ph.x=(Rh.x||0)+(Rh.width||0),Ph.y=Rh.y||0):Rh.y+Rh.height+Ph.height+Vh.bottom>this.getPageHeight()?(this.cellAddPage(),Ph.y=Vh.top,Uh&&Hh&&(this.printHeaderRow(Ph.lineNumber,!0),Ph.y+=Hh[0].height)):Ph.y=Rh.y+Rh.height||Ph.y),Ph.text[0]!==void 0&&(this.rect(Ph.x,Ph.y,Ph.width,Ph.height,!0===Ih?`FD`:void 0),Ph.align===`right`?this.text(Ph.text,Ph.x+Ph.width-Bh,Ph.y+Bh,{align:`right`,baseline:`top`}):Ph.align===`center`?this.text(Ph.text,Ph.x+Ph.width/2,Ph.y+Bh,{align:`center`,baseline:`top`,maxWidth:Ph.width-Bh-Bh}):this.text(Ph.text,Ph.x+Bh,Ph.y+Bh,{align:`left`,baseline:`top`,maxWidth:Ph.width-Bh-Bh})),this.internal.__cell__.lastCell=Ph,this};Ph.table=function(Ph,Ih,Hh,Uh,Wh){if(Lh.call(this),!Hh)throw Error(`No data for PDF table.`);var Gh,Kh,qh,Jh,Yh=[],Xh=[],Zh=[],Qh={},$h={},eg=[],tg=[],ng=(Wh||={}).autoSize||!1,rg=!1!==Wh.printHeaders,ig=Wh.css&&Wh.css[`font-size`]!==void 0?16*Wh.css[`font-size`]:Wh.fontSize||12,ag=Wh.margins||Object.assign({width:this.getPageWidth()},Fh),og=typeof Wh.padding==`number`?Wh.padding:3,sg=Wh.headerBackgroundColor||`#c8c8c8`,cg=Wh.headerTextColor||`#000`;if(Rh.call(this),this.internal.__cell__.printHeaders=rg,this.internal.__cell__.margins=ag,this.internal.__cell__.table_font_size=ig,this.internal.__cell__.padding=og,this.internal.__cell__.headerBackgroundColor=sg,this.internal.__cell__.headerTextColor=cg,this.setFontSize(ig),Uh==null)Xh=Yh=Object.keys(Hh[0]),Zh=Yh.map(function(){return`left`});else if(Array.isArray(Uh)&&e$4(Uh[0])===`object`)for(Yh=Uh.map(function(Ph){return Ph.name}),Xh=Uh.map(function(Ph){return Ph.prompt||Ph.name||``}),Zh=Uh.map(function(Ph){return Ph.align||`left`}),Gh=0;Gh<Uh.length;Gh+=1)$h[Uh[Gh].name]=.7499990551181103*Uh[Gh].width;else Array.isArray(Uh)&&typeof Uh[0]==`string`&&(Xh=Yh=Uh,Zh=Yh.map(function(){return`left`}));if(ng||Array.isArray(Uh)&&typeof Uh[0]==`string`)for(Gh=0;Gh<Yh.length;Gh+=1){for(Qh[Jh=Yh[Gh]]=Hh.map(function(Ph){return Ph[Jh]}),this.setFont(void 0,`bold`),eg.push(this.getTextDimensions(Xh[Gh],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),Kh=Qh[Jh],this.setFont(void 0,`normal`),qh=0;qh<Kh.length;qh+=1)eg.push(this.getTextDimensions(Kh[qh],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);$h[Jh]=Math.max.apply(null,eg)+og+og,eg=[]}if(rg){var lg={};for(Gh=0;Gh<Yh.length;Gh+=1)lg[Yh[Gh]]={},lg[Yh[Gh]].text=Xh[Gh],lg[Yh[Gh]].align=Zh[Gh];var ug=Vh.call(this,lg,$h);tg=Yh.map(function(Fh){return new zh(Ph,Ih,$h[Fh],ug,lg[Fh].text,void 0,lg[Fh].align)}),this.setTableHeaderRow(tg),this.printHeaderRow(1,!1)}var dg=Uh.reduce(function(Ph,Fh){return Ph[Fh.name]=Fh.align,Ph},{});for(Gh=0;Gh<Hh.length;Gh+=1){`rowStart`in Wh&&Wh.rowStart instanceof Function&&Wh.rowStart({row:Gh,data:Hh[Gh]},this);var fg=Vh.call(this,Hh[Gh],$h);for(qh=0;qh<Yh.length;qh+=1){var pg=Hh[Gh][Yh[qh]];`cellStart`in Wh&&Wh.cellStart instanceof Function&&Wh.cellStart({row:Gh,col:qh,data:pg},this),Bh.call(this,new zh(Ph,Ih,$h[Yh[qh]],fg,pg,Gh+2,dg[Yh[qh]]))}}return this.internal.__cell__.table_x=Ph,this.internal.__cell__.table_y=Ih,this};var Vh=function(Ph,Fh){var Ih=this.internal.__cell__.padding,Lh=this.internal.__cell__.table_font_size,Rh=this.internal.scaleFactor;return Object.keys(Ph).map(function(Lh){var Rh=Ph[Lh];return this.splitTextToSize(Rh.hasOwnProperty(`text`)?Rh.text:Rh,Fh[Lh]-Ih-Ih)},this).map(function(Ph){return this.getLineHeightFactor()*Ph.length*Lh/Rh+Ih+Ih},this).reduce(function(Ph,Fh){return Math.max(Ph,Fh)},0)};Ph.setTableHeaderRow=function(Ph){Lh.call(this),this.internal.__cell__.tableHeaderRow=Ph},Ph.printHeaderRow=function(Ph,Fh){if(Lh.call(this),!this.internal.__cell__.tableHeaderRow)throw Error(`Property tableHeaderRow does not exist.`);var Rh;if(Ih=!0,typeof this.internal.__cell__.headerFunction==`function`){var Vh=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new zh(Vh[0],Vh[1],Vh[2],Vh[3],void 0,-1)}this.setFont(void 0,`bold`);for(var Hh=[],Uh=0;Uh<this.internal.__cell__.tableHeaderRow.length;Uh+=1){Rh=this.internal.__cell__.tableHeaderRow[Uh].clone(),Fh&&(Rh.y=this.internal.__cell__.margins.top||0,Hh.push(Rh)),Rh.lineNumber=Ph;var Wh=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),Bh.call(this,Rh),this.setTextColor(Wh)}Hh.length>0&&this.setTableHeaderRow(Hh),this.setFont(void 0,`normal`),Ih=!1}}(Z$3.API);var Ps$1={italic:[`italic`,`oblique`,`normal`],oblique:[`oblique`,`italic`,`normal`],normal:[`normal`,`oblique`,`italic`]},Fs$1=[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`],Is$1=Ns$1(Fs$1),Ls$1=[100,200,300,400,500,600,700,800,900],Rs$1=Ns$1(Ls$1);function zs$1(Ph){var Fh=Ph.family.replace(/"|'/g,``).toLowerCase(),Ih=function(Ph){return Ps$1[Ph||=`normal`]?Ph:`normal`}(Ph.style),Lh=function(Ph){return Ph?typeof Ph==`number`?Ph>=100&&Ph<=900&&Ph%100==0?Ph:400:/^\d00$/.test(Ph)?parseInt(Ph):Ph===`bold`?700:400:400}(Ph.weight),Rh=function(Ph){return typeof Is$1[Ph||=`normal`]==`number`?Ph:`normal`}(Ph.stretch);return{family:Fh,style:Ih,weight:Lh,stretch:Rh,src:Ph.src||[],ref:Ph.ref||{name:Fh,style:[Rh,Ih,Lh].join(` `)}}}function Bs$1(Ph,Fh,Ih,Lh){var Rh;for(Rh=Ih;Rh>=0&&Rh<Fh.length;Rh+=Lh)if(Ph[Fh[Rh]])return Ph[Fh[Rh]];for(Rh=Ih;Rh>=0&&Rh<Fh.length;Rh-=Lh)if(Ph[Fh[Rh]])return Ph[Fh[Rh]]}var Vs$1={"sans-serif":`helvetica`,fixed:`courier`,monospace:`courier`,terminal:`courier`,cursive:`times`,fantasy:`times`,serif:`times`},Hs$1={caption:`times`,icon:`times`,menu:`times`,"message-box":`times`,"small-caption":`times`,"status-bar":`times`};function Us$1(Ph){return[Ph.stretch,Ph.style,Ph.weight,Ph.family].join(` `)}function Ws$1(Ph){return Ph.trimLeft()}function Gs$1(Ph,Fh){for(var Ih=0;Ih<Ph.length;){if(Ph.charAt(Ih)===Fh)return[Ph.substring(0,Ih),Ph.substring(Ih+1)];Ih+=1}return null}function Ks$1(Ph){var Fh=Ph.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return Fh===null?null:[Fh[0],Ph.substring(Fh[0].length)]}var qs$1,Js$1,Ys$1,Xs$1,Zs$1,Qs$1=[`times`];function $s$1(Ph,Fh,Ih,Lh,Rh){var zh=4,Bh=nc$1;switch(Rh){case Z$3.API.image_compression.FAST:zh=1,Bh=tc$1;break;case Z$3.API.image_compression.MEDIUM:zh=6,Bh=rc$1;break;case Z$3.API.image_compression.SLOW:zh=9,Bh=ic$1}Ph=function(Ph,Fh,Ih,Lh){for(var Rh,zh=Ph.length/Fh,Bh=new Uint8Array(Ph.length+zh),Vh=[ec$1,tc$1,nc$1,rc$1,ic$1],Hh=0;Hh<zh;Hh+=1){var Uh=Hh*Fh,Wh=Ph.subarray(Uh,Uh+Fh);if(Lh)Bh.set(Lh(Wh,Ih,Rh),Uh+Hh);else{for(var Gh=Vh.length,Kh=[],qh=0;qh<Gh;qh+=1)Kh[qh]=Vh[qh](Wh,Ih,Rh);var Jh=oc$1(Kh.concat());Bh.set(Kh[Jh],Uh+Hh)}Rh=Wh}return Bh}(Ph,Fh,Math.ceil(Ih*Lh/8),Bh);var Vh=me$3(Ph,{level:zh});return Z$3.API.__addimage__.arrayBufferToBinaryString(Vh)}function ec$1(Ph){var Fh=Array.apply([],Ph);return Fh.unshift(0),Fh}function tc$1(Ph,Fh){var Ih=Ph.length,Lh=[];Lh[0]=1;for(var Rh=0;Rh<Ih;Rh+=1){var zh=Ph[Rh-Fh]||0;Lh[Rh+1]=Ph[Rh]-zh+256&255}return Lh}function nc$1(Ph,Fh,Ih){var Lh=Ph.length,Rh=[];Rh[0]=2;for(var zh=0;zh<Lh;zh+=1){var Bh=Ih&&Ih[zh]||0;Rh[zh+1]=Ph[zh]-Bh+256&255}return Rh}function rc$1(Ph,Fh,Ih){var Lh=Ph.length,Rh=[];Rh[0]=3;for(var zh=0;zh<Lh;zh+=1){var Bh=Ph[zh-Fh]||0,Vh=Ih&&Ih[zh]||0;Rh[zh+1]=Ph[zh]+256-(Bh+Vh>>>1)&255}return Rh}function ic$1(Ph,Fh,Ih){var Lh=Ph.length,Rh=[];Rh[0]=4;for(var zh=0;zh<Lh;zh+=1){var Bh=ac$1(Ph[zh-Fh]||0,Ih&&Ih[zh]||0,Ih&&Ih[zh-Fh]||0);Rh[zh+1]=Ph[zh]-Bh+256&255}return Rh}function ac$1(Ph,Fh,Ih){if(Ph===Fh&&Fh===Ih)return Ph;var Lh=Math.abs(Fh-Ih),Rh=Math.abs(Ph-Ih),zh=Math.abs(Ph+Fh-Ih-Ih);return Lh<=Rh&&Lh<=zh?Ph:Rh<=zh?Fh:Ih}function oc$1(Ph){var Fh=Ph.map(function(Ph){return Ph.reduce(function(Ph,Fh){return Ph+Math.abs(Fh)},0)});return Fh.indexOf(Math.min.apply(null,Fh))}function sc$1(Ph,Fh,Ih){var Lh=Fh*Ih,Rh=Math.floor(Lh/8),zh=16-(Lh-8*Rh+Ih),Bh=(1<<Ih)-1;return lc$1(Ph,Rh)>>zh&Bh}function cc$1(Ph,Fh,Ih,Lh){var Rh=Ih*Lh,zh=Math.floor(Rh/8),Bh=16-(Rh-8*zh+Lh),Vh=(1<<Lh)-1,Hh=(Fh&Vh)<<Bh;(function(Ph,Fh,Ih){if(Fh+1<Ph.byteLength)Ph.setUint16(Fh,Ih,!1);else{var Lh=Ih>>8&255;Ph.setUint8(Fh,Lh)}})(Ph,zh,lc$1(Ph,zh)&~(Vh<<Bh)&65535|Hh)}function lc$1(Ph,Fh){return Fh+1<Ph.byteLength?Ph.getUint16(Fh,!1):Ph.getUint8(Fh)<<8}function uc$1(Ph){var Fh=0;if(Ph[Fh++]!==71||Ph[Fh++]!==73||Ph[Fh++]!==70||Ph[Fh++]!==56||(Ph[Fh++]+1&253)!=56||Ph[Fh++]!==97)throw Error(`Invalid GIF 87a/89a header.`);var Ih=Ph[Fh++]|Ph[Fh++]<<8,Lh=Ph[Fh++]|Ph[Fh++]<<8,Rh=Ph[Fh++],zh=Rh>>7,Bh=1<<1+(7&Rh);Ph[Fh++],Ph[Fh++];var Vh=null,Hh=null;zh&&(Vh=Fh,Hh=Bh,Fh+=3*Bh);var Uh=!0,Wh=[],Gh=0,Kh=null,qh=0,Jh=null;for(this.width=Ih,this.height=Lh;Uh&&Fh<Ph.length;)switch(Ph[Fh++]){case 33:switch(Ph[Fh++]){case 255:if(Ph[Fh]!==11||Ph[Fh+1]==78&&Ph[Fh+2]==69&&Ph[Fh+3]==84&&Ph[Fh+4]==83&&Ph[Fh+5]==67&&Ph[Fh+6]==65&&Ph[Fh+7]==80&&Ph[Fh+8]==69&&Ph[Fh+9]==50&&Ph[Fh+10]==46&&Ph[Fh+11]==48&&Ph[Fh+12]==3&&Ph[Fh+13]==1&&Ph[Fh+16]==0)Fh+=14,Jh=Ph[Fh++]|Ph[Fh++]<<8,Fh++;else for(Fh+=12;;){if(!((sg=Ph[Fh++])>=0))throw Error(`Invalid block size`);if(sg===0)break;Fh+=sg}break;case 249:if(Ph[Fh++]!==4||Ph[Fh+4]!==0)throw Error(`Invalid graphics extension block.`);var Yh=Ph[Fh++];Gh=Ph[Fh++]|Ph[Fh++]<<8,Kh=Ph[Fh++],1&Yh||(Kh=null),qh=Yh>>2&7,Fh++;break;case 254:for(;;){if(!((sg=Ph[Fh++])>=0))throw Error(`Invalid block size`);if(sg===0)break;Fh+=sg}break;default:throw Error(`Unknown graphic control label: 0x`+Ph[Fh-1].toString(16))}break;case 44:var Xh=Ph[Fh++]|Ph[Fh++]<<8,Zh=Ph[Fh++]|Ph[Fh++]<<8,Qh=Ph[Fh++]|Ph[Fh++]<<8,$h=Ph[Fh++]|Ph[Fh++]<<8,eg=Ph[Fh++],tg=eg>>6&1,ng=1<<1+(7&eg),rg=Vh,ig=Hh,ag=!1;eg>>7&&(ag=!0,rg=Fh,ig=ng,Fh+=3*ng);var og=Fh;for(Fh++;;){var sg;if(!((sg=Ph[Fh++])>=0))throw Error(`Invalid block size`);if(sg===0)break;Fh+=sg}Wh.push({x:Xh,y:Zh,width:Qh,height:$h,has_local_palette:ag,palette_offset:rg,palette_size:ig,data_offset:og,data_length:Fh-og,transparent_index:Kh,interlaced:!!tg,delay:Gh,disposal:qh});break;case 59:Uh=!1;break;default:throw Error(`Unknown gif block: 0x`+Ph[Fh-1].toString(16))}this.numFrames=function(){return Wh.length},this.loopCount=function(){return Jh},this.frameInfo=function(Ph){if(Ph<0||Ph>=Wh.length)throw Error(`Frame index out of range.`);return Wh[Ph]},this.decodeAndBlitFrameBGRA=function(Fh,Lh){var Rh=this.frameInfo(Fh),zh=Rh.width*Rh.height;if(zh>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var Bh=new Uint8Array(zh);dc$1(Ph,Rh.data_offset,Bh,zh);var Vh=Rh.palette_offset,Hh=Rh.transparent_index;Hh===null&&(Hh=256);var Uh=Rh.width,Wh=Ih-Uh,Gh=Uh,Kh=4*(Rh.y*Ih+Rh.x),qh=4*((Rh.y+Rh.height)*Ih+Rh.x),Jh=Kh,Yh=4*Wh;!0===Rh.interlaced&&(Yh+=4*Ih*7);for(var Xh=8,Zh=0,Qh=Bh.length;Zh<Qh;++Zh){var $h=Bh[Zh];if(Gh===0&&(Gh=Uh,(Jh+=Yh)>=qh&&(Yh=4*Wh+4*Ih*(Xh-1),Jh=Kh+(Uh+Wh)*(Xh<<1),Xh>>=1)),$h===Hh)Jh+=4;else{var eg=Ph[Vh+3*$h],tg=Ph[Vh+3*$h+1],ng=Ph[Vh+3*$h+2];Lh[Jh++]=ng,Lh[Jh++]=tg,Lh[Jh++]=eg,Lh[Jh++]=255}--Gh}},this.decodeAndBlitFrameRGBA=function(Fh,Lh){var Rh=this.frameInfo(Fh),zh=Rh.width*Rh.height;if(zh>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var Bh=new Uint8Array(zh);dc$1(Ph,Rh.data_offset,Bh,zh);var Vh=Rh.palette_offset,Hh=Rh.transparent_index;Hh===null&&(Hh=256);var Uh=Rh.width,Wh=Ih-Uh,Gh=Uh,Kh=4*(Rh.y*Ih+Rh.x),qh=4*((Rh.y+Rh.height)*Ih+Rh.x),Jh=Kh,Yh=4*Wh;!0===Rh.interlaced&&(Yh+=4*Ih*7);for(var Xh=8,Zh=0,Qh=Bh.length;Zh<Qh;++Zh){var $h=Bh[Zh];if(Gh===0&&(Gh=Uh,(Jh+=Yh)>=qh&&(Yh=4*Wh+4*Ih*(Xh-1),Jh=Kh+(Uh+Wh)*(Xh<<1),Xh>>=1)),$h===Hh)Jh+=4;else{var eg=Ph[Vh+3*$h],tg=Ph[Vh+3*$h+1],ng=Ph[Vh+3*$h+2];Lh[Jh++]=eg,Lh[Jh++]=tg,Lh[Jh++]=ng,Lh[Jh++]=255}--Gh}}}function dc$1(Ph,Fh,Ih,Lh){for(var Rh=Ph[Fh++],zh=1<<Rh,Bh=zh+1,Vh=Bh+1,Hh=Rh+1,Uh=(1<<Hh)-1,Wh=0,Gh=0,Kh=0,qh=Ph[Fh++],Jh=new Int32Array(4096),Yh=null;;){for(;Wh<16&&qh!==0;)Gh|=Ph[Fh++]<<Wh,Wh+=8,qh===1?qh=Ph[Fh++]:--qh;if(Wh<Hh)break;var Xh=Gh&Uh;if(Gh>>=Hh,Wh-=Hh,Xh!==zh){if(Xh===Bh)break;for(var Zh=Xh<Vh?Xh:Yh,Qh=0,$h=Zh;$h>zh;)$h=Jh[$h]>>8,++Qh;var eg=$h;if(Kh+Qh+(Zh===Xh?0:1)>Lh)return void go$1.log(`Warning, gif stream longer than expected.`);Ih[Kh++]=eg;var tg=Kh+=Qh;for(Zh!==Xh&&(Ih[Kh++]=eg),$h=Zh;Qh--;)$h=Jh[$h],Ih[--tg]=255&$h,$h>>=8;Yh!==null&&Vh<4096&&(Jh[Vh++]=Yh<<8|eg,Vh>=Uh+1&&Hh<12&&(++Hh,Uh=Uh<<1|1)),Yh=Xh}else Vh=Bh+1,Uh=(1<<(Hh=Rh+1))-1,Yh=null}return Kh!==Lh&&go$1.log(`Warning, gif stream shorter than expected.`),Ih}function fc$1(Ph){var Fh,Ih,Lh,Rh,zh,Bh=Math.floor,Vh=Array(64),Hh=Array(64),Uh=Array(64),Wh=Array(64),Gh=Array(65535),Kh=Array(65535),qh=Array(64),Jh=Array(64),Yh=[],Xh=0,Zh=7,Qh=Array(64),$h=Array(64),eg=Array(64),tg=Array(256),ng=Array(2048),rg=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],ig=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],ag=[0,1,2,3,4,5,6,7,8,9,10,11],og=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],sg=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],cg=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],lg=[0,1,2,3,4,5,6,7,8,9,10,11],ug=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],dg=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function fg(Ph,Fh){for(var Ih=0,Lh=0,Rh=[],zh=1;zh<=16;zh++){for(var Bh=1;Bh<=Ph[zh];Bh++)Rh[Fh[Lh]]=[],Rh[Fh[Lh]][0]=Ih,Rh[Fh[Lh]][1]=zh,Lh++,Ih++;Ih*=2}return Rh}function pg(Ph){for(var Fh=Ph[0],Ih=Ph[1]-1;Ih>=0;)Fh&1<<Ih&&(Xh|=1<<Zh),Ih--,--Zh<0&&(Xh==255?(mg(255),mg(0)):mg(Xh),Zh=7,Xh=0)}function mg(Ph){Yh.push(Ph)}function hg(Ph){mg(Ph>>8&255),mg(255&Ph)}function gg(Ph,Fh,Ih,Lh,Rh){for(var zh,Bh=Rh[0],Vh=Rh[240],Hh=function(Ph,Fh){var Ih,Lh,Rh,zh,Bh,Vh,Hh,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+8]=Ag+Og,Ph[Kh+56]=Ag-Og,Kh++}for(Wh=0;Wh<64;++Wh)Gh=Ph[Wh]*Fh[Wh],qh[Wh]=Gh>0?Gh+.5|0:Gh-.5|0;return qh}(Ph,Fh),Uh=0;Uh<64;++Uh)Jh[rg[Uh]]=Hh[Uh];var Wh=Jh[0]-Ih;Ih=Jh[0],Wh==0?pg(Lh[0]):(pg(Lh[Kh[zh=32767+Wh]]),pg(Gh[zh]));for(var Yh=63;Yh>0&&Jh[Yh]==0;)Yh--;if(Yh==0)return pg(Bh),Ih;for(var Xh,Zh=1;Zh<=Yh;){for(var Qh=Zh;Jh[Zh]==0&&Zh<=Yh;)++Zh;var $h=Zh-Qh;if($h>=16){Xh=$h>>4;for(var eg=1;eg<=Xh;++eg)pg(Vh);$h&=15}zh=32767+Jh[Zh],pg(Rh[($h<<4)+Kh[zh]]),pg(Gh[zh]),Zh++}return Yh!=63&&pg(Bh),Ih}function _g(Ph){Ph=Math.min(Math.max(Ph,1),100),zh!=Ph&&(function(Ph){for(var Fh=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],Ih=0;Ih<64;Ih++){var Lh=Bh((Fh[Ih]*Ph+50)/100);Lh=Math.min(Math.max(Lh,1),255),Vh[rg[Ih]]=Lh}for(var Rh=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],zh=0;zh<64;zh++){var Gh=Bh((Rh[zh]*Ph+50)/100);Gh=Math.min(Math.max(Gh,1),255),Hh[rg[zh]]=Gh}for(var Kh=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],qh=0,Jh=0;Jh<8;Jh++)for(var Yh=0;Yh<8;Yh++)Uh[qh]=1/(Vh[rg[qh]]*Kh[Jh]*Kh[Yh]*8),Wh[qh]=1/(Hh[rg[qh]]*Kh[Jh]*Kh[Yh]*8),qh++}(Math.floor(Ph<50?5e3/Ph:200-2*Ph)),zh=Ph)}this.encode=function(Ph,zh){zh&&_g(zh),Yh=[],Xh=0,Zh=7,hg(65496),hg(65504),hg(16),mg(74),mg(70),mg(73),mg(70),mg(0),mg(1),mg(1),mg(0),hg(1),hg(1),mg(0),mg(0),function(){hg(65499),hg(132),mg(0);for(var Ph=0;Ph<64;Ph++)mg(Vh[Ph]);mg(1);for(var Fh=0;Fh<64;Fh++)mg(Hh[Fh])}(),function(Ph,Fh){hg(65472),hg(17),mg(8),hg(Fh),hg(Ph),mg(3),mg(1),mg(17),mg(0),mg(2),mg(17),mg(1),mg(3),mg(17),mg(1)}(Ph.width,Ph.height),function(){hg(65476),hg(418),mg(0);for(var Ph=0;Ph<16;Ph++)mg(ig[Ph+1]);for(var Fh=0;Fh<=11;Fh++)mg(ag[Fh]);mg(16);for(var Ih=0;Ih<16;Ih++)mg(og[Ih+1]);for(var Lh=0;Lh<=161;Lh++)mg(sg[Lh]);mg(1);for(var Rh=0;Rh<16;Rh++)mg(cg[Rh+1]);for(var zh=0;zh<=11;zh++)mg(lg[zh]);mg(17);for(var Bh=0;Bh<16;Bh++)mg(ug[Bh+1]);for(var Vh=0;Vh<=161;Vh++)mg(dg[Vh])}(),hg(65498),hg(12),mg(3),mg(1),mg(0),mg(2),mg(17),mg(3),mg(17),mg(0),mg(63),mg(0);var Bh=0,Gh=0,Kh=0;Xh=0,Zh=7,this.encode.displayName=`_encode_`;for(var qh,Jh,tg,rg,fg,vg,yg,bg,xg,Sg=Ph.data,Cg=Ph.width,wg=Ph.height,Tg=4*Cg,Eg=0;Eg<wg;){for(qh=0;qh<Tg;){for(fg=Tg*Eg+qh,yg=-1,bg=0,xg=0;xg<64;xg++)vg=fg+(bg=xg>>3)*Tg+(yg=4*(7&xg)),Eg+bg>=wg&&(vg-=Tg*(Eg+1+bg-wg)),qh+yg>=Tg&&(vg-=qh+yg-Tg+4),Jh=Sg[vg++],tg=Sg[vg++],rg=Sg[vg++],Qh[xg]=(ng[Jh]+ng[tg+256|0]+ng[rg+512|0]>>16)-128,$h[xg]=(ng[Jh+768|0]+ng[tg+1024|0]+ng[rg+1280|0]>>16)-128,eg[xg]=(ng[Jh+1280|0]+ng[tg+1536|0]+ng[rg+1792|0]>>16)-128;Bh=gg(Qh,Uh,Bh,Fh,Lh),Gh=gg($h,Wh,Gh,Ih,Rh),Kh=gg(eg,Wh,Kh,Ih,Rh),qh+=32}Eg+=8}if(Zh>=0){var Dg=[];Dg[1]=Zh+1,Dg[0]=(1<<Zh+1)-1,pg(Dg)}return hg(65497),new Uint8Array(Yh)},Ph||=50,function(){for(var Ph=String.fromCharCode,Fh=0;Fh<256;Fh++)tg[Fh]=Ph(Fh)}(),Fh=fg(ig,ag),Ih=fg(cg,lg),Lh=fg(og,sg),Rh=fg(ug,dg),function(){for(var Ph=1,Fh=2,Ih=1;Ih<=15;Ih++){for(var Lh=Ph;Lh<Fh;Lh++)Kh[32767+Lh]=Ih,Gh[32767+Lh]=[],Gh[32767+Lh][1]=Ih,Gh[32767+Lh][0]=Lh;for(var Rh=-(Fh-1);Rh<=-Ph;Rh++)Kh[32767+Rh]=Ih,Gh[32767+Rh]=[],Gh[32767+Rh][1]=Ih,Gh[32767+Rh][0]=Fh-1+Rh;Ph<<=1,Fh<<=1}}(),function(){for(var Ph=0;Ph<256;Ph++)ng[Ph]=19595*Ph,ng[Ph+256|0]=38470*Ph,ng[Ph+512|0]=7471*Ph+32768,ng[Ph+768|0]=-11059*Ph,ng[Ph+1024|0]=-21709*Ph,ng[Ph+1280|0]=32768*Ph+8421375,ng[Ph+1536|0]=-27439*Ph,ng[Ph+1792|0]=-5329*Ph}(),_g(Ph)}function pc$1(Ph,Fh){if(this.pos=0,this.buffer=Ph,this.datav=new DataView(Ph.buffer),this.is_with_alpha=!!Fh,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,[`BM`,`BA`,`CI`,`CP`,`IC`,`PT`].indexOf(this.flag)===-1)throw Error(`Invalid BMP File`);this.parseHeader(),this.parseBGR()}function mc$1(Ph){function Fh(Ph){if(!Ph)throw Error(`assert :P`)}function Ih(Ph,Fh,Ih){for(var Lh=0;4>Lh;Lh++)if(Ph[Fh+Lh]!=Ih.charCodeAt(Lh))return!0;return!1}function Lh(Ph,Fh,Ih,Lh,Rh){for(var zh=0;zh<Rh;zh++)Ph[Fh+zh]=Ih[Lh+zh]}function Rh(Ph,Fh,Ih,Lh){for(var Rh=0;Rh<Lh;Rh++)Ph[Fh+Rh]=Ih}function zh(Ph){return new Int32Array(Ph)}function Bh(Ph,Fh){for(var Ih=[],Lh=0;Lh<Ph;Lh++)Ih.push(new Fh);return Ih}function Vh(Ph,Fh){var Ih=[];return function Ph(Ih,Lh,Rh){for(var zh=Rh[Lh],Bh=0;Bh<zh&&(Ih.push(Rh.length>Lh+1?[]:new Fh),!(Rh.length<Lh+1));Bh++)Ph(Ih[Bh],Lh+1,Rh)}(Ih,0,Ph),Ih}var Hh=function(){var Ph=this;function Hh(Ph,Fh){for(var Ih=1<<Fh-1>>>0;Ph&Ih;)Ih>>>=1;return Ih?(Ph&Ih-1)+Ih:Ph}function Uh(Ph,Ih,Lh,Rh,zh){Fh(!(Rh%Lh));do Ph[Ih+(Rh-=Lh)]=zh;while(0<Rh)}function Wh(Ph,Ih,Lh,Rh,Bh){if(Fh(2328>=Bh),512>=Bh)var Vh=zh(512);else if((Vh=zh(Bh))==null)return 0;return function(Ph,Ih,Lh,Rh,Bh,Vh){var Wh,Kh,qh=Ih,Jh=1<<Lh,Yh=zh(16),Xh=zh(16);for(Fh(Bh!=0),Fh(Rh!=null),Fh(Ph!=null),Fh(0<Lh),Kh=0;Kh<Bh;++Kh){if(15<Rh[Kh])return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.b=-8,Ph.Ka=0,Ph.oa=Ih,Ph.pa=Lh,Ph.Jd=Ih,Ph.Yc=Lh+Rh,Ph.Zc=4<=Rh?Lh+Rh-4+1:Lh,og(Ph)}function Yh(Ph,Fh){for(var Ih=0;0<Fh--;)Ih|=cg(Ph,128)<<Fh;return Ih}function Xh(Ph,Fh){var Ih=Yh(Ph,Fh);return sg(Ph)?-Ih:Ih}function Zh(Ph,Ih,Lh,Rh){var zh,Bh=0;for(Fh(Ph!=null),Fh(Ih!=null),Fh(4294967288>Rh),Ph.Sb=Rh,Ph.Ra=0,Ph.u=0,Ph.h=0,4<Rh&&(Rh=4),zh=0;zh<Rh;++zh)Bh+=Ih[Lh+zh]<<8*zh;Ph.Ra=Bh,Ph.bb=Rh,Ph.oa=Ih,Ph.pa=Lh}function Qh(Ph){for(;8<=Ph.u&&Ph.bb<Ph.Sb;)Ph.Ra>>>=8,Ph.Ra+=Ph.oa[Ph.pa+Ph.bb]<<by-8>>>0,++Ph.bb,Ph.u-=8;rg(Ph)&&(Ph.h=1,Ph.u=0)}function $h(Ph,Ih){if(Fh(0<=Ih),!Ph.h&&Ih<=yy){var Lh=ng(Ph)&vy[Ih];return Ph.u+=Ih,Qh(Ph),Lh}return Ph.h=1,Ph.u=0}function eg(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function tg(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function ng(Ph){return Ph.Ra>>>(Ph.u&by-1)>>>0}function rg(Ph){return Fh(Ph.bb<=Ph.Sb),Ph.h||Ph.bb==Ph.Sb&&Ph.u>by}function ig(Ph,Fh){Ph.u=Fh,Ph.h=rg(Ph)}function ag(Ph){Ph.u>=xy&&(Fh(Ph.u>=xy),Qh(Ph))}function og(Ph){Fh(Ph!=null&&Ph.oa!=null),Ph.pa<Ph.Zc?(Ph.I=(Ph.oa[Ph.pa++]|Ph.I<<8)>>>0,Ph.b+=8):(Fh(Ph!=null&&Ph.oa!=null),Ph.pa<Ph.Yc?(Ph.b+=8,Ph.I=Ph.oa[Ph.pa++]|Ph.I<<8):Ph.Ka?Ph.b=0:(Ph.I<<=8,Ph.b+=8,Ph.Ka=1))}function sg(Ph){return Yh(Ph,1)}function cg(Ph,Fh){var Ih=Ph.Ca;0>Ph.b&&og(Ph);var Lh=Ph.b,Rh=Ih*Fh>>>8,zh=(Ph.I>>>Lh>Rh)+0;for(zh?(Ih-=Rh,Ph.I-=Rh+1<<Lh>>>0):Ih=Rh+1,Lh=Ih,Rh=0;256<=Lh;)Rh+=8,Lh>>=8;return Lh=7^Rh+Sy[Lh],Ph.b-=Lh,Ph.Ca=(Ih<<Lh)-1,zh}function lg(Ph,Fh,Ih){Ph[Fh+0]=Ih>>24&255,Ph[Fh+1]=Ih>>16&255,Ph[Fh+2]=Ih>>8&255,Ph[Fh+3]=255&Ih}function ug(Ph,Fh){return Ph[Fh+0]|Ph[Fh+1]<<8}function dg(Ph,Fh){return ug(Ph,Fh)|Ph[Fh+2]<<16}function fg(Ph,Fh){return ug(Ph,Fh)|ug(Ph,Fh+2)<<16}function pg(Ph,Ih){var Lh=1<<Ih;return Fh(Ph!=null),Fh(0<Ih),Ph.X=zh(Lh),Ph.X==null?0:(Ph.Mb=32-Ih,Ph.Xa=Ih,1)}function mg(Ph,Ih){Fh(Ph!=null),Fh(Ih!=null),Fh(Ph.Xa==Ih.Xa),Lh(Ih.X,0,Ph.X,0,1<<Ih.Xa)}function hg(){this.X=[],this.Xa=this.Mb=0}function gg(Ph,Ih,Lh,Rh){Fh(Lh!=null),Fh(Rh!=null);var zh=Lh[0],Bh=Rh[0];return zh==0&&(zh=(Ph*Bh+Ih/2)/Ih),Bh==0&&(Bh=(Ih*zh+Ph/2)/Ph),0>=zh||0>=Bh?0:(Lh[0]=zh,Rh[0]=Bh,1)}function _g(Ph,Fh){return Ph+(1<<Fh)-1>>>Fh}function vg(Ph,Fh){return((4278255360&Ph)+(4278255360&Fh)>>>0&4278255360)+((16711935&Ph)+(16711935&Fh)>>>0&16711935)>>>0}function yg(Fh,Ih){Ph[Ih]=function(Ih,Lh,Rh,zh,Bh,Vh,Hh){var Uh;for(Uh=0;Uh<Bh;++Uh){var Wh=Ph[Fh](Vh[Hh+Uh-1],Rh,zh+Uh);Vh[Hh+Uh]=vg(Ih[Lh+Uh],Wh)}}}function bg(){this.ud=this.hd=this.jd=0}function xg(Ph,Fh){return((4278124286&(Ph^Fh))>>>1)+(Ph&Fh)>>>0}function Sg(Ph){return 0<=Ph&&256>Ph?Ph:0>Ph?0:255<Ph?255:void 0}function Cg(Ph,Fh){return Sg(Ph+(Ph-Fh+.5>>1))}function wg(Ph,Fh,Ih){return Math.abs(Fh-Ih)-Math.abs(Ph-Ih)}function Tg(Ph,Fh,Ih,Lh,Rh,zh,Bh){for(Lh=zh[Bh-1],Ih=0;Ih<Rh;++Ih)zh[Bh+Ih]=Lh=vg(Ph[Fh+Ih],Lh)}function Eg(Ph,Fh,Ih,Lh,Rh){var zh;for(zh=0;zh<Ih;++zh){var Bh=Ph[Fh+zh],Vh=Bh>>8&255,Hh=16711935&(Hh=(Hh=16711935&Bh)+((Vh<<16)+Vh));Lh[Rh+zh]=(4278255360&Bh)+Hh>>>0}}function Dg(Ph,Fh){Fh.jd=255&Ph,Fh.hd=Ph>>8&255,Fh.ud=Ph>>16&255}function Og(Ph,Fh,Ih,Lh,Rh,zh){var Bh;for(Bh=0;Bh<Lh;++Bh){var Vh=Fh[Ih+Bh],Hh=Vh>>>8,Uh=Vh,Wh=255&(Wh=(Wh=Vh>>>16)+((Ph.jd<<24>>24)*(Hh<<24>>24)>>>5));Uh=255&(Uh=(Uh+=(Ph.hd<<24>>24)*(Hh<<24>>24)>>>5)+((Ph.ud<<24>>24)*(Wh<<24>>24)>>>5)),Rh[zh+Bh]=(4278255360&Vh)+(Wh<<16)+Uh}}function kg(Fh,Ih,Lh,Rh,zh){Ph[Ih]=function(Ph,Fh,Ih,Lh,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zh,Bh){if(Bh==0)for(Ih=Fh+Ih;Fh<Ih;)lg(Rh,((Bh=Ph[Fh++])[0]>>24|Bh[1]>>8&65280|Bh[2]<<8&16711680|Bh[3]<<24)>>>0),zh+=32;else Lh(Rh,zh,Ph,Fh,Ih)}function Ig(Fh,Ih){Ph[Ih][0]=Ph[Fh+`0`],Ph[Ih][1]=Ph[Fh+`1`],Ph[Ih][2]=Ph[Fh+`2`],Ph[Ih][3]=Ph[Fh+`3`],Ph[Ih][4]=Ph[Fh+`4`],Ph[Ih][5]=Ph[Fh+`5`],Ph[Ih][6]=Ph[Fh+`6`],Ph[Ih][7]=Ph[Fh+`7`],Ph[Ih][8]=Ph[Fh+`8`],Ph[Ih][9]=Ph[Fh+`9`],Ph[Ih][10]=Ph[Fh+`10`],Ph[Ih][11]=Ph[Fh+`11`],Ph[Ih][12]=Ph[Fh+`12`],Ph[Ih][13]=Ph[Fh+`13`],Ph[Ih][14]=Ph[Fh+`0`],Ph[Ih][15]=Ph[Fh+`0`]}function Lg(Ph){return Ph==wb||Ph==Tb||Ph==Eb||Ph==Db}function Rg(){this.eb=[],this.size=this.A=this.fb=0}function zg(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Bg(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Rg,this.f.kb=new zg,this.sd=null}function Vg(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Hg(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Ug(Ph){return alert(`todo:WebPSamplerProcessPlane`),Ph.T}function Wg(Ph,Fh){var Ih=Ph.T,Rh=Fh.ba.f.RGBA,zh=Rh.eb,Bh=Rh.fb+Ph.ka*Rh.A,Vh=Qb[Fh.ba.S],Hh=Ph.y,Uh=Ph.O,Wh=Ph.f,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A)}return 0}function Kg(Ph){var Fh=Ph.ma,Ih=Fh.ba.S,Lh=11>Ih,Rh=Ih==vb||Ih==bb||Ih==xb||Ih==Sb||Ih==12||Lg(Ih);if(Fh.memory=null,Fh.Ib=null,Fh.Jb=null,Fh.Nd=null,!my(Fh.Oa,Ph,Rh?11:12))return 0;if(Rh&&Lg(Ih)&&Zv(),Ph.da)alert(`todo:use_scaling`);else{if(Lh){if(Fh.Ib=Ug,Ph.Kb){if(Ih=Ph.U+1>>1,Fh.memory=zh(Ph.U+2*Ih),Fh.memory==null)return 0;Fh.ec=Fh.memory,Fh.fc=0,Fh.cc=Fh.ec,Fh.dc=Fh.fc+Ph.U,Fh.Mc=Fh.cc,Fh.Nc=Fh.dc+Ih,Fh.Ib=Wg,Zv()}}else alert(`todo:EmitYUV`);Rh&&(Fh.Jb=Gg,Lh&&Yv())}if(Lh&&!fx){for(Ph=0;256>Ph;++Ph)px[Ph]=89858*(Ph-128)+sx>>ox,gx[Ph]=-22014*(Ph-128)+sx,hx[Ph]=-45773*(Ph-128),mx[Ph]=113618*(Ph-128)+sx>>ox;for(Ph=cx;Ph<lx;++Ph)Fh=76283*(Ph-16)+sx>>ox,_x[Ph-cx]=T_(Fh,255),vx[Ph-cx]=T_(Fh+8>>4,15);fx=1}return 1}function qg(Ph){var Ih=Ph.ma,Lh=Ph.U,Rh=Ph.T;return Fh(!(1&Ph.ka)),0>=Lh||0>=Rh?0:(Lh=Ih.Ib(Ph,Ih),Ih.Jb!=null&&Ih.Jb(Ph,Ih,Lh),Ih.Dc+=Lh,1)}function Jg(Ph){Ph.ma.memory=null}function Yg(Ph,Fh,Ih,Lh){return $h(Ph,8)==47?(Fh[0]=$h(Ph,14)+1,Ih[0]=$h(Ph,14)+1,Lh[0]=$h(Ph,1),$h(Ph,3)==0?!Ph.h:0):0}function Xg(Ph,Fh){if(4>Ph)return Ph+1;var Ih=Ph-2>>1;return(2+(1&Ph)<<Ih)+$h(Fh,Ih)+1}function Zg(Ph,Fh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}return 1}return Ph.a=3,0}function s_(Ph){Fh(Ph!=null),Ph.vc=null,Ph.yc=null,Ph.Ya=null;var Ih=Ph.Wa;Ih!=null&&(Ih.X=null),Ph.vb=null,Fh(Ph!=null)}function c_(){var Fh=new zv;return Fh==null?null:(Fh.a=0,Fh.xb=Xb,Ig(`Predictor`,`VP8LPredictors`),Ig(`Predictor`,`VP8LPredictors_C`),Ig(`PredictorAdd`,`VP8LPredictorsAdd`),Ig(`PredictorAdd`,`VP8LPredictorsAdd_C`),Ty=Eg,jy=Og,My=Ag,Ny=jg,Py=Mg,Fy=Ng,Iy=Pg,Ph.VP8LMapColor32b=Dy,Ph.VP8LMapColor8b=ky,Fh)}function l_(Ph,Ih,Lh,Vh,Hh){var Uh=1,Kh=[Ph],Jh=[Ih],Yh=Vh.m,Xh=Vh.s,Zh=null,Qh=0;t:for(;;){if(Lh)for(;Uh&&$h(Yh,1);){var eg=Kh,tg=Jh,rg=Vh,og=1,sg=rg.m,cg=rg.gc[rg.ab],lg=$h(sg,2);if(rg.Oc&1<<lg)Uh=0;else{switch(rg.Oc|=1<<lg,cg.hc=lg,cg.Ea=eg[0],cg.nc=tg[0],cg.K=[null],++rg.ab,Fh(4>=rg.ab),lg){case 0:case 1:cg.b=$h(sg,3)+2,og=l_(_g(cg.Ea,cg.b),_g(cg.nc,cg.b),0,rg,cg.K),cg.K=cg.K[0];break;case 3:var ug,dg=$h(sg,8)+1,fg=16<dg?0:4<dg?1:2<dg?2:3;if(eg[0]=_g(cg.Ea,fg),cg.b=fg,ug=og=l_(dg,1,0,rg,cg.K)){var mg,hg=dg,gg=cg,yg=1<<(8>>gg.b),bg=zh(yg);if(bg==null)ug=0;else{var xg=gg.K[0],Sg=gg.w;for(bg[0]=gg.K[0][0],mg=1;mg<1*hg;++mg)bg[mg]=vg(xg[Sg+mg],bg[mg-1]);for(;mg<4*yg;++mg)bg[mg]=0;gg.K[0]=null,gg.K[0]=bg,ug=1}}og=ug;break;case 2:break;default:Fh(0)}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 0,S_=void 0,C_=a_,w_=v_,T_=i_,E_=c_,D_=0,O_=C_.m,k_=8,A_=Bh(128,Gh);i:for(;Wh(A_,0,7,w_,19);){if($h(O_,1)){if((x_=2+$h(O_,2+2*$h(O_,3)))>T_)break i}else x_=T_;for(S_=0;S_<T_&&x_--;){ag(O_);var j_=A_[0+(127&ng(O_))];ig(O_,O_.u+j_.g);var M_=j_.value;if(16>M_)E_[S_++]=M_,M_!=0&&(k_=M_);else{var N_=M_==16,P_=M_-16,F_=kb[P_],I_=$h(O_,Ob[P_])+F_;if(S_+I_>T_)break i;for(var L_=N_?k_:0;0<I_--;)E_[S_++]=L_}}D_=1;break i}D_||(C_.a=3),__=D_}(__&&=!p_.h)&&(f_=Wh(u_,d_,8,c_,i_)),__&&f_!=0?b_=f_:(a_.a=3,b_=0)}if(b_==0)break r;if(t_&&jb[Tg]==1&&(t_=Yg[Eg].g==0),e_+=Yg[Eg].g,Eg+=b_,3>=Tg){var R_,z_=Jg[0];for(R_=1;R_<Ug;++R_)Jg[R_]>z_&&(z_=Jg[R_]);n_+=z_}}if(Xg.nd=t_,Xg.Qb=0,t_&&(Xg.qb=(Zg[3][Qg[3]+0].value<<24|Zg[1][Qg[1]+0].value<<16|Zg[2][Qg[2]+0].value)>>>0,e_==0&&256>Zg[0][Qg[0]+0].value&&(Xg.Qb=1,Xg.qb+=Zg[0][Qg[0]+0].value<<8)),Xg.jc=!Xg.Qb&&6>n_,Xg.jc){var B_,V_=Xg;for(B_=0;B_<_y;++B_){var H_=B_,U_=V_.pd[H_],W_=V_.G[0][V_.H[0]+H_];256<=W_.value?(U_.g=W_.g+256,U_.value=W_.value):(U_.g=0,U_.value=0,H_>>=$g(W_,8,U_),H_>>=$g(V_.G[1][V_.H[1]+H_],16,U_),H_>>=$g(V_.G[2][V_.H[2]+H_],0,U_),$g(V_.G[3][V_.H[3]+H_],24,U_))}}}Ng.vc=Pg,Ng.Wb=Fg,Ng.Ya=qg,Ng.yc=Wg,Cg=1;break e}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lh[Ih],zh=0;zh<Rh&&(Fh.push(Lh.length>Ih+1?[]:0),!(Lh.length<Ih+1));zh++)Ph(Fh[zh],Ih+1,Lh)}(Ph,0,[3,11]),Ph}()}function g_(){this.jb=zh(3),this.Wc=Vh([4,8],h_),this.Xc=Vh([4,17],h_)}function __(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new zh(4),this.od=new zh(4)}function v_(){this.ld=this.La=this.dd=this.tc=0}function y_(){this.Na=this.la=0}function b_(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function x_(){this.ad=zh(384),this.Za=0,this.Ob=zh(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function S_(){this.uc=this.M=this.Nb=0,this.wa=Array(new v_),this.Y=0,this.ya=Array(new x_),this.aa=0,this.l=new E_}function C_(){this.y=zh(16),this.f=zh(8),this.ea=zh(8)}function w_(){this.cb=this.a=0,this.sc=``,this.m=new eg,this.Od=new f_,this.Kc=new p_,this.ed=new __,this.Qa=new m_,this.Ic=this.$c=this.Aa=0,this.D=new S_,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=Bh(8,eg),this.ia=0,this.pb=Bh(4,b_),this.Pa=new g_,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new C_),this.Hd=0,this.rb=Array(new y_),this.sb=0,this.wa=Array(new v_),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new x_),this.L=this.aa=0,this.gd=Vh([4,2],v_),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function T_(Ph,Fh){return 0>Ph?0:Ph>Fh?Fh:Ph}function E_(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma=`void`,this.put=`VP8IoPutHook`,this.ac=`VP8IoSetupHook`,this.bc=`VP8IoTeardownHook`,this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function D_(){var Ph=new w_;return Ph!=null&&(Ph.a=0,Ph.sc=`OK`,Ph.cb=0,Ph.Xb=0,Rb||=j_),Ph}function O_(Ph,Fh,Ih){return Ph.a==0&&(Ph.a=Fh,Ph.sc=Ih,Ph.cb=0),0}function k_(Ph,Fh,Ih){return 3<=Ih&&Ph[Fh+0]==157&&Ph[Fh+1]==1&&Ph[Fh+2]==42}function A_(Ph,Ih){if(Ph==null)return 0;if(Ph.a=0,Ph.sc=`OK`,Ih==null)return O_(Ph,2,`null VP8Io passed to VP8GetHeaders()`);var Lh=Ih.data,zh=Ih.w,Bh=Ih.ha;if(4>Bh)return O_(Ph,7,`Truncated header.`);var Vh=Lh[zh+0]|Lh[zh+1]<<8|Lh[zh+2]<<16,Hh=Ph.Od;if(Hh.Rb=!(1&Vh),Hh.td=Vh>>1&7,Hh.yd=Vh>>4&1,Hh.ub=Vh>>5,3<Hh.td)return O_(Ph,3,`Incorrect keyframe parameters.`);if(!Hh.yd)return O_(Ph,4,`Frame not displayable.`);zh+=3,Bh-=3;var Uh=Ph.Kc;if(Hh.Rb){if(7>Bh)return O_(Ph,7,`cannot parse picture header`);if(!k_(Lh,zh,Bh))return O_(Ph,3,`Bad code word`);Uh.c=16383&(Lh[zh+4]<<8|Lh[zh+3]),Uh.Td=Lh[zh+4]>>6,Uh.i=16383&(Lh[zh+6]<<8|Lh[zh+5]),Uh.Ud=Lh[zh+6]>>6,zh+=7,Bh-=7,Ph.za=Uh.c+15>>4,Ph.Ub=Uh.i+15>>4,Ih.width=Uh.c,Ih.height=Uh.i,Ih.Da=0,Ih.j=0,Ih.v=0,Ih.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rh,zh){Tv(Ph,Fh,1,Ih,16,Lh,Rh,zh)}function kv(Ph,Fh,Ih,Lh,Rh,zh){var Bh;for(Bh=3;0<Bh;--Bh)Ev(Ph,Fh+=4*Ih,Ih,1,16,Lh,Rh,zh)}function Av(Ph,Fh,Ih,Lh,Rh,zh){var Bh;for(Bh=3;0<Bh;--Bh)Ev(Ph,Fh+=4,1,Ih,16,Lh,Rh,zh)}function jv(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){Tv(Ph,Fh,Rh,1,8,zh,Bh,Vh),Tv(Ih,Lh,Rh,1,8,zh,Bh,Vh)}function Mv(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){Tv(Ph,Fh,1,Rh,8,zh,Bh,Vh),Tv(Ih,Lh,1,Rh,8,zh,Bh,Vh)}function Nv(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){Ev(Ph,Fh+4*Rh,Rh,1,8,zh,Bh,Vh),Ev(Ih,Lh+4*Rh,Rh,1,8,zh,Bh,Vh)}function Pv(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){Ev(Ph,Fh+4,1,Rh,8,zh,Bh,Vh),Ev(Ih,Lh+4,1,Rh,8,zh,Bh,Vh)}function Fv(){this.ba=new Bg,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Hg,this.memory=0,this.Ib=`OutputFunc`,this.Jb=`OutputAlphaFunc`,this.Nd=`OutputRowFunc`}function Iv(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Lv(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Rv(){this.ua=0,this.Wa=new hg,this.vb=new hg,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new qh,this.yc=new Gh}function zv(){this.xb=this.a=0,this.l=new E_,this.ca=new Bg,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new tg,this.Pb=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8,`WEBP`)){$h=3;break t}var eg=fg(Ph,Xh[0]+4);if(12>eg||4294967286<eg){$h=3;break t}if(Jh&&eg>Qh[0]-8){$h=7;break t}$h[0]=eg,Xh[0]+=12,Qh[0]-=12}$h=0}if($h!=0)return $h;for(eg=0<Yh.gb[0],Rh=Rh[0];;){t:{var ng=Ph;Qh=Lh,$h=Rh;var rg=Gh,ig=Kh,ag=Xh=[0];if((cg=qh=[qh])[0]=0,8>$h[0])$h=7;else{if(!Ih(ng,Qh[0],`VP8X`)){if(fg(ng,Qh[0]+4)!=10){$h=3;break t}if(18>$h[0]){$h=7;break t}var og=fg(ng,Qh[0]+8),sg=1+dg(ng,Qh[0]+12);if(2147483648<=sg*(ng=1+dg(ng,Qh[0]+15))){$h=3;break t}ag!=null&&(ag[0]=og),rg!=null&&(rg[0]=sg),ig!=null&&(ig[0]=ng),Qh[0]+=18,$h[0]-=18,cg[0]=1}$h=0}}if(qh=qh[0],Xh=Xh[0],$h!=0)return $h;if(Qh=!!(2&Xh),!eg&&qh)return 3;if(Vh!=null&&(Vh[0]=!!(16&Xh)),Hh!=null&&(Hh[0]=Qh),Uh!=null&&(Uh[0]=0),Hh=Gh[0],Xh=Kh[0],qh&&Qh&&Wh==null){$h=0;break}if(4>Rh){$h=7;break}if(eg&&qh||!eg&&!qh&&!Ih(Ph,Lh[0],`ALPH`)){Rh=[Rh],Yh.na=[Yh.na],Yh.P=[Yh.P],Yh.Sa=[Yh.Sa];t:{og=Ph,$h=Lh,eg=Rh;var cg=Yh.gb;rg=Yh.na,ig=Yh.P,ag=Yh.Sa,sg=22,Fh(og!=null),Fh(eg!=null),ng=$h[0];var lg=eg[0];for(Fh(rg!=null),Fh(ag!=null),rg[0]=null,ig[0]=null,ag[0]=0;;){if($h[0]=ng,eg[0]=lg,8>lg){$h=7;break t}var ug=fg(og,ng+4);if(4294967286<ug){$h=3;break t}var pg=8+ug+1&-2;if(sg+=pg,0<cg&&sg>cg){$h=3;break t}if(!Ih(og,ng,`V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7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];yg(`Predictor0`,`PredictorAdd0`),Ph.Predictor0=function(){return 4278190080},Ph.Predictor1=function(Ph){return Ph},Ph.Predictor2=function(Ph,Fh,Ih){return Fh[Ih+0]},Ph.Predictor3=function(Ph,Fh,Ih){return Fh[Ih+1]},Ph.Predictor4=function(Ph,Fh,Ih){return Fh[Ih-1]},Ph.Predictor5=function(Ph,Fh,Ih){return xg(xg(Ph,Fh[Ih+1]),Fh[Ih+0])},Ph.Predictor6=function(Ph,Fh,Ih){return xg(Ph,Fh[Ih-1])},Ph.Predictor7=function(Ph,Fh,Ih){return xg(Ph,Fh[Ih+0])},Ph.Predictor8=function(Ph,Fh,Ih){return xg(Fh[Ih-1],Fh[Ih+0])},Ph.Predictor9=function(Ph,Fh,Ih){return xg(Fh[Ih+0],Fh[Ih+1])},Ph.Predictor10=function(Ph,Fh,Ih){return xg(xg(Ph,Fh[Ih-1]),xg(Fh[Ih+0],Fh[Ih+1]))},Ph.Predictor11=function(Ph,Fh,Ih){var Lh=Fh[Ih+0];return 0>=wg(Lh>>24&255,Ph>>24&255,(Fh=Fh[Ih-1])>>24&255)+wg(Lh>>16&255,Ph>>16&255,Fh>>16&255)+wg(Lh>>8&255,Ph>>8&255,Fh>>8&255)+wg(255&Lh,255&Ph,255&Fh)?Lh:Ph},Ph.Predictor12=function(Ph,Fh,Ih){var Lh=Fh[Ih+0];return(Sg((Ph>>24&255)+(Lh>>24&255)-((Fh=Fh[Ih-1])>>24&255))<<24|Sg((Ph>>16&255)+(Lh>>16&255)-(Fh>>16&255))<<16|Sg((Ph>>8&255)+(Lh>>8&255)-(Fh>>8&255))<<8|Sg((255&Ph)+(255&Lh)-(255&Fh)))>>>0},Ph.Predictor13=function(Ph,Fh,Ih){var Lh=Fh[Ih-1];return(Cg((Ph=xg(Ph,Fh[Ih+0]))>>24&255,Lh>>24&255)<<24|Cg(Ph>>16&255,Lh>>16&255)<<16|Cg(Ph>>8&255,Lh>>8&255)<<8|Cg(255&Ph,255&Lh))>>>0};var Cy=Ph.PredictorAdd0;Ph.PredictorAdd1=Tg,yg(`Predictor2`,`PredictorAdd2`),yg(`Predictor3`,`PredictorAdd3`),yg(`Predictor4`,`PredictorAdd4`),yg(`Predictor5`,`PredictorAdd5`),yg(`Predictor6`,`PredictorAdd6`),yg(`Predictor7`,`PredictorAdd7`),yg(`Predictor8`,`PredictorAdd8`),yg(`Predictor9`,`PredictorAdd9`),yg(`Predictor10`,`PredictorAdd10`),yg(`Predictor11`,`PredictorAdd11`),yg(`Predictor12`,`PredictorAdd12`),yg(`Predictor13`,`PredictorAdd13`);var wy=Ph.PredictorAdd2;kg(`ColorIndexInverseTransform`,`MapARGB`,`32b`,function(Ph){return Ph>>8&255},function(Ph){return Ph}),kg(`VP8LColorIndexInverseTransformAlpha`,`MapAlpha`,`8b`,function(Ph){return Ph},function(Ph){return Ph>>8&255});var Ty,Ey=Ph.ColorIndexInverseTransform,Dy=Ph.MapARGB,Oy=Ph.VP8LColorIndexInverseTransformAlpha,ky=Ph.MapAlpha,Ay=Ph.VP8LPredictorsAdd=[];Ay.length=16,(Ph.VP8LPredictors=[]).length=16,(Ph.VP8LPredictorsAdd_C=[]).length=16,(Ph.VP8LPredictors_C=[]).length=16;var jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,ib,ab,ob=zh(511),sb=zh(2041),cb=zh(225),ub=zh(767),db=0,fb=sb,pb=cb,mb=ub,hb=ob,gb=0,vb=1,yb=2,bb=3,xb=4,Sb=5,Cb=6,wb=7,Tb=8,Eb=9,Db=10,Ob=[2,3,7],kb=[3,3,11],Ab=[280,256,256,256,40],jb=[0,1,1,1,0],Mb=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Nb=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Pb=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Fb=8,Ib=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Lb=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Rb=null,zb=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Bb=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Vb=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Hb=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Ub=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Wb=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Gb=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Kb=[],qb=[],Jb=[],Yb=1,Xb=2,Zb=[],Qb=[];Xv(`UpsampleRgbLinePair`,ny,3),Xv(`UpsampleBgrLinePair`,ry,3),Xv(`UpsampleRgbaLinePair`,cy,4),Xv(`UpsampleBgraLinePair`,sy,4),Xv(`UpsampleArgbLinePair`,oy,4),Xv(`UpsampleRgba4444LinePair`,ay,2),Xv(`UpsampleRgb565LinePair`,iy,2);var $b=Ph.UpsampleRgbLinePair,ex=Ph.UpsampleBgrLinePair,tx=Ph.UpsampleRgbaLinePair,nx=Ph.UpsampleBgraLinePair,rx=Ph.UpsampleArgbLinePair,ix=Ph.UpsampleRgba4444LinePair,ax=Ph.UpsampleRgb565LinePair,ox=16,sx=1<<ox-1,cx=-227,lx=482,ux=6,dx=(256<<ux)-1,fx=0,px=zh(256),mx=zh(256),hx=zh(256),gx=zh(256),_x=zh(lx-cx),vx=zh(lx-cx);ly(`YuvToRgbRow`,ny,3),ly(`YuvToBgrRow`,ry,3),ly(`YuvToRgbaRow`,cy,4),ly(`YuvToBgraRow`,sy,4),ly(`YuvToArgbRow`,oy,4),ly(`YuvToRgba4444Row`,ay,2),ly(`YuvToRgb565Row`,iy,2);var yx=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],bx=[0,2,8],xx=[8,7,6,4,4,2,2,2,1,1,1,1],Sx=1;this.WebPDecodeRGBA=function(Ph,Ih,Vh,Hh,Uh){var Wh=vb,Gh=new Fv,Kh=new Bg;Gh.ba=Kh,Kh.S=Wh,Kh.width=[Kh.width],Kh.height=[Kh.height];var qh=Kh.width,Jh=Kh.height,Yh=new Vg;if(Yh==null||Ph==null)var Xh=2;else Fh(Yh!=null),Xh=py(Ph,Ih,Vh,Yh.width,Yh.height,Yh.Pd,Yh.Qd,Yh.format,null);if(Xh==0?(qh!=null&&(qh[0]=Yh.width[0]),Jh!=null&&(Jh[0]=Yh.height[0]),qh=1):qh=0,qh){Kh.width=Kh.width[0],Kh.height=Kh.height[0],Hh!=null&&(Hh[0]=Kh.width),Uh!=null&&(Uh[0]=Kh.height);t:{if(Hh=new E_,(Uh=new Iv).data=Ph,Uh.w=Ih,Uh.ha=Vh,Uh.kd=1,Ih=[0],Fh(Uh!=null),((Ph=py(Uh.data,Uh.w,Uh.ha,null,null,null,Ih,null,Uh))==0||Ph==7)&&Ih[0]&&(Ph=4),(Ih=Ph)==0){if(Fh(Gh!=null),Hh.data=Uh.data,Hh.w=Uh.w+Uh.offset,Hh.ha=Uh.ha-Uh.offset,Hh.put=qg,Hh.ac=Kg,Hh.bc=Jg,Hh.ma=Gh,Uh.xa){if((Ph=c_())==null){Gh=1;break t}if(function(Ph,Ih){var Lh=[0],Rh=[0],zh=[0];e:for(;;){if(Ph==null)return 0;if(Ih==null)return Ph.a=2,0;if(Ph.l=Ih,Ph.a=0,Zh(Ph.m,Ih.data,Ih.w,Ih.ha),!Yg(Ph.m,Lh,Rh,zh)){Ph.a=3;break e}if(Ph.xb=Xb,Ih.width=Lh[0],Ih.height=Rh[0],!l_(Lh[0],Rh[0],1,Ph,null))break e;return 1}return Fh(Ph.a!=0),0}(Ph,Hh)){if(Hh=(Ih=gy(Hh.width,Hh.height,Gh.Oa,Gh.ba))==0){e:{Hh=Ph;r:for(;;){if(Hh==null){Hh=0;break e}if(Fh(Hh.s.yc!=null),Fh(Hh.s.Ya!=null),Fh(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(Ih),Vh&=1}return Vh?(Ph.cb=0,Vh):0})(Ph,Hh)||(Ih=Ph.a)}}else Ih=Ph.a}Ih==0&&Gh.Oa!=null&&Gh.Oa.fd&&(Ih=hy(Gh.ba))}Gh=Ih}Wh=Gh==0?11>Wh?Kh.f.RGBA.eb:Kh.f.kb.y:null}else Wh=null;return Wh};var Cx=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function Uh(Ph,Fh){for(var Ih=``,Lh=0;Lh<4;Lh++)Ih+=String.fromCharCode(Ph[Fh++]);return Ih}function Wh(Ph,Fh){return Ph[Fh+0]|Ph[Fh+1]<<8}function Gh(Ph,Fh){return(Ph[Fh+0]|Ph[Fh+1]<<8|Ph[Fh+2]<<16)>>>0}function Kh(Ph,Fh){return(Ph[Fh+0]|Ph[Fh+1]<<8|Ph[Fh+2]<<16|Ph[Fh+3]<<24)>>>0}new Hh;var qh=[0],Jh=[0],Yh=[],Xh=new Hh,Zh=Ph,Qh=function(Ph,Fh){var Ih={},Lh=0,Rh=!1,zh=0,Bh=0;if(Ih.frames=[],!function(Ph,Fh){for(var Ih=0;Ih<4;Ih++)if(Ph[Fh+Ih]!=`RIFF`.charCodeAt(Ih))return!0;return!1}(Ph,Fh)){for(Kh(Ph,Fh+=4),Fh+=8;Fh<Ph.length;){var Vh=Uh(Ph,Fh),Hh=Kh(Ph,Fh+=4);Fh+=4;var qh=Hh+(1&Hh);switch(Vh){case`VP8 `:case`VP8L`:Ih.frames[Lh]===void 0&&(Ih.frames[Lh]={}),(Xh=Ih.frames[Lh]).src_off=Rh?Bh:Fh-8,Xh.src_size=zh+Hh+8,Lh++,Rh&&(Rh=!1,zh=0,Bh=0);break;case`VP8X`:(Xh=Ih.header={}).feature_flags=Ph[Fh];var Jh=Fh+4;Xh.canvas_width=1+Gh(Ph,Jh),Jh+=3,Xh.canvas_height=1+Gh(Ph,Jh),Jh+=3;break;case`ALPH`:Rh=!0,zh=qh+8,Bh=Fh-8;break;case`ANIM`:(Xh=Ih.header).bgcolor=Kh(Ph,Fh),Jh=Fh+4,Xh.loop_count=Wh(Ph,Jh),Jh+=2;break;case`ANMF`:var Yh,Xh;(Xh=Ih.frames[Lh]={}).offset_x=2*Gh(Ph,Fh),Fh+=3,Xh.offset_y=2*Gh(Ph,Fh),Fh+=3,Xh.width=1+Gh(Ph,Fh),Fh+=3,Xh.height=1+Gh(Ph,Fh),Fh+=3,Xh.duration=Gh(Ph,Fh),Fh+=3,Yh=Ph[Fh++],Xh.dispose=1&Yh,Xh.blend=Yh>>1&1}Vh!=`ANMF`&&(Fh+=qh)}return Ih}}(Zh,0);Qh.response=Zh,Qh.rgbaoutput=!0,Qh.dataurl=!1;var $h=Qh.header?Qh.header:null,eg=Qh.frames?Qh.frames:null;if($h){$h.loop_counter=$h.loop_count,qh=[$h.canvas_height],Jh=[$h.canvas_width];for(var tg=0;tg<eg.length&&eg[tg].blend!=0;tg++);}var ng=eg[0],rg=Xh.WebPDecodeRGBA(Zh,ng.src_off,ng.src_size,Jh,qh);ng.rgba=rg,ng.imgwidth=Jh[0],ng.imgheight=qh[0];for(var ig=0;ig<Jh[0]*qh[0]*4;ig++)Yh[ig]=rg[ig];return this.width=Jh,this.height=qh,this.data=Yh,this}function hc$1(){var Ph,Fh=this.internal.__metadata__.metadata,Ih=unescape(encodeURIComponent(Fh));Ph=this.internal.__metadata__.rawXml?Ih:`<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>`+Ih.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)+`</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>`,this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write(`<< /Type /Metadata /Subtype /XML /Length `+Ph.length+` >>`),this.internal.write(`stream`),this.internal.write(Ph),this.internal.write(`endstream`),this.internal.write(`endobj`)}function gc$1(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write(`/Metadata `+this.internal.__metadata__.metadataObjectNumber+` 0 R`)}(function(Ph){var Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh=function(Ph){return Ph||={},this.isStrokeTransparent=Ph.isStrokeTransparent||!1,this.strokeOpacity=Ph.strokeOpacity||1,this.strokeStyle=Ph.strokeStyle||`#000000`,this.fillStyle=Ph.fillStyle||`#000000`,this.isFillTransparent=Ph.isFillTransparent||!1,this.fillOpacity=Ph.fillOpacity||1,this.font=Ph.font||`10px sans-serif`,this.textBaseline=Ph.textBaseline||`alphabetic`,this.textAlign=Ph.textAlign||`left`,this.lineWidth=Ph.lineWidth||1,this.lineJoin=Ph.lineJoin||`miter`,this.lineCap=Ph.lineCap||`butt`,this.path=Ph.path||[],this.transform=Ph.transform===void 0?new Hh:Ph.transform.clone(),this.globalCompositeOperation=Ph.globalCompositeOperation||`normal`,this.globalAlpha=Ph.globalAlpha||1,this.clip_path=Ph.clip_path||[],this.currentPoint=Ph.currentPoint||new Bh,this.miterLimit=Ph.miterLimit||10,this.lastPoint=Ph.lastPoint||new Bh,this.lineDashOffset=Ph.lineDashOffset||0,this.lineDash=Ph.lineDash||[],this.margin=Ph.margin||[0,0,0,0],this.prevPageLastElemOffset=Ph.prevPageLastElemOffset||0,this.ignoreClearRect=typeof Ph.ignoreClearRect!=`boolean`||Ph.ignoreClearRect,this};Ph.events.push([`initialized`,function(){this.context2d=new Gh(this),Fh=this.internal.f2,Ih=this.internal.getCoordinateString,Lh=this.internal.getVerticalCoordinateString,Rh=this.internal.getHorizontalCoordinate,zh=this.internal.getVerticalCoordinate,Bh=this.internal.Point,Vh=this.internal.Rectangle,Hh=this.internal.Matrix,Uh=new Wh}]);var Gh=function(Ph){Object.defineProperty(this,`canvas`,{get:function(){return{parentNode:!1,style:!1}}});var Fh=Ph;Object.defineProperty(this,`pdf`,{get:function(){return Fh}});var Ih=!1;Object.defineProperty(this,`pageWrapXEnabled`,{get:function(){return Ih},set:function(Ph){Ih=!!Ph}});var Lh=!1;Object.defineProperty(this,`pageWrapYEnabled`,{get:function(){return Lh},set:function(Ph){Lh=!!Ph}});var Rh=0;Object.defineProperty(this,`posX`,{get:function(){return Rh},set:function(Ph){isNaN(Ph)||(Rh=Ph)}});var zh=0;Object.defineProperty(this,`posY`,{get:function(){return zh},set:function(Ph){isNaN(Ph)||(zh=Ph)}}),Object.defineProperty(this,`margin`,{get:function(){return Uh.margin},set:function(Ph){var Fh;typeof Ph==`number`?Fh=[Ph,Ph,Ph,Ph]:((Fh=[,,,,])[0]=Ph[0],Fh[1]=Ph.length>=2?Ph[1]:Fh[0],Fh[2]=Ph.length>=3?Ph[2]:Fh[0],Fh[3]=Ph.length>=4?Ph[3]:Fh[1]),Uh.margin=Fh}});var Bh=!1;Object.defineProperty(this,`autoPaging`,{get:function(){return Bh},set:function(Ph){Bh=Ph}});var Vh=0;Object.defineProperty(this,`lastBreak`,{get:function(){return Vh},set:function(Ph){Vh=Ph}});var Hh=[];Object.defineProperty(this,`pageBreaks`,{get:function(){return Hh},set:function(Ph){Hh=Ph}}),Object.defineProperty(this,`ctx`,{get:function(){return Uh},set:function(Ph){Ph instanceof Wh&&(Uh=Ph)}}),Object.defineProperty(this,`path`,{get:function(){return Uh.path},set:function(Ph){Uh.path=Ph}});var Gh=[];Object.defineProperty(this,`ctxStack`,{get:function(){return Gh},set:function(Ph){Gh=Ph}}),Object.defineProperty(this,`fillStyle`,{get:function(){return this.ctx.fillStyle},set:function(Ph){var Fh=Kh(Ph);this.ctx.fillStyle=Fh.style,this.ctx.isFillTransparent=Fh.a===0,this.ctx.fillOpacity=Fh.a,this.pdf.setFillColor(Fh.r,Fh.g,Fh.b,{a:Fh.a}),this.pdf.setTextColor(Fh.r,Fh.g,Fh.b,{a:Fh.a})}}),Object.defineProperty(this,`strokeStyle`,{get:function(){return this.ctx.strokeStyle},set:function(Ph){var Fh=Kh(Ph);this.ctx.strokeStyle=Fh.style,this.ctx.isStrokeTransparent=Fh.a===0,this.ctx.strokeOpacity=Fh.a,Fh.a===0?this.pdf.setDrawColor(255,255,255):(Fh.a,this.pdf.setDrawColor(Fh.r,Fh.g,Fh.b))}}),Object.defineProperty(this,`lineCap`,{get:function(){return this.ctx.lineCap},set:function(Ph){[`butt`,`round`,`square`].indexOf(Ph)!==-1&&(this.ctx.lineCap=Ph,this.pdf.setLineCap(Ph))}}),Object.defineProperty(this,`lineWidth`,{get:function(){return this.ctx.lineWidth},set:function(Ph){isNaN(Ph)||(this.ctx.lineWidth=Ph,this.pdf.setLineWidth(Ph))}}),Object.defineProperty(this,`lineJoin`,{get:function(){return this.ctx.lineJoin},set:function(Ph){[`bevel`,`round`,`miter`].indexOf(Ph)!==-1&&(this.ctx.lineJoin=Ph,this.pdf.setLineJoin(Ph))}}),Object.defineProperty(this,`miterLimit`,{get:function(){return this.ctx.miterLimit},set:function(Ph){isNaN(Ph)||(this.ctx.miterLimit=Ph,this.pdf.setMiterLimit(Ph))}}),Object.defineProperty(this,`textBaseline`,{get:function(){return this.ctx.textBaseline},set:function(Ph){this.ctx.textBaseline=Ph}}),Object.defineProperty(this,`textAlign`,{get:function(){return this.ctx.textAlign},set:function(Ph){[`right`,`end`,`center`,`left`,`start`].indexOf(Ph)!==-1&&(this.ctx.textAlign=Ph)}});var qh=null,Jh=null,Yh=null;Object.defineProperty(this,`fontFaces`,{get:function(){return Yh},set:function(Ph){qh=null,Jh=null,Yh=Ph}}),Object.defineProperty(this,`font`,{get:function(){return this.ctx.font},set:function(Ph){var Fh;if(this.ctx.font=Ph,(Fh=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(Ph))!==null){var Ih=Fh[1];Fh[2];var Lh=Fh[3],Rh=Fh[4];Fh[5];var zh=Fh[6],Bh=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Rh)[2];Rh=Math.floor(Bh===`px`?parseFloat(Rh)*this.pdf.internal.scaleFactor:Bh===`em`?parseFloat(Rh)*this.pdf.getFontSize():parseFloat(Rh)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Rh);var Vh=function(Ph){var Fh,Ih,Lh=[],Rh=Ph.trim();if(Rh===``)return Qs$1;if(Rh in Hs$1)return[Hs$1[Rh]];for(;Rh!==``;){switch(Ih=null,Fh=(Rh=Ws$1(Rh)).charAt(0)){case`"`:case`'`:Ih=Gs$1(Rh.substring(1),Fh);break;default:Ih=Ks$1(Rh)}if(Ih===null||(Lh.push(Ih[0]),(Rh=Ws$1(Ih[1]))!==``&&Rh.charAt(0)!==`,`))return Qs$1;Rh=Rh.replace(/^,/,``)}return Lh}(zh);if(this.fontFaces){var Hh=function(Ph,Fh,Ih){for(var Lh=(Ih||={}).defaultFontFamily||`times`,Rh=Object.assign({},Vs$1,Ih.genericFontFamilies||{}),zh=null,Bh=null,Vh=0;Vh<Fh.length;++Vh)if(Rh[(zh=zs$1(Fh[Vh])).family]&&(zh.family=Rh[zh.family]),Ph.hasOwnProperty(zh.family)){Bh=Ph[zh.family];break}if(!(Bh||=Ph[Lh]))throw Error(`Could not find a font-family for the rule '`+Us$1(zh)+`' and default family '`+Lh+`'.`);if(Bh=function(Ph,Fh){if(Fh[Ph])return Fh[Ph];var Ih=Is$1[Ph],Lh=Bs$1(Fh,Fs$1,Ih,Ih<=Is$1.normal?-1:1);if(!Lh)throw Error(`Could not find a matching font-stretch value for `+Ph);return Lh}(zh.stretch,Bh),Bh=function(Ph,Fh){if(Fh[Ph])return Fh[Ph];for(var Ih=Ps$1[Ph],Lh=0;Lh<Ih.length;++Lh)if(Fh[Ih[Lh]])return Fh[Ih[Lh]];throw Error(`Could not find a matching font-style for `+Ph)}(zh.style,Bh),!(Bh=function(Ph,Fh){if(Fh[Ph])return Fh[Ph];if(Ph===400&&Fh[500])return Fh[500];if(Ph===500&&Fh[400])return Fh[400];var Ih=Rs$1[Ph],Lh=Bs$1(Fh,Ls$1,Ih,Ph<400?-1:1);if(!Lh)throw Error(`Could not find a matching font-weight for value `+Ph);return Lh}(zh.weight,Bh)))throw Error(`Failed to resolve a font for the rule '`+Us$1(zh)+`'.`);return Bh}(function(Ph,Fh){var Ih=Ph.getFontList(),Lh=JSON.stringify(Ih);return(qh===null||Jh!==Lh)&&(qh=function(Ph){for(var Fh={},Ih=0;Ih<Ph.length;++Ih){var Lh=zs$1(Ph[Ih]),Rh=Lh.family,zh=Lh.stretch,Bh=Lh.style,Vh=Lh.weight;Fh[Rh]=Fh[Rh]||{},Fh[Rh][zh]=Fh[Rh][zh]||{},Fh[Rh][zh][Bh]=Fh[Rh][zh][Bh]||{},Fh[Rh][zh][Bh][Vh]=Lh}return Fh}(function(Ph){var Fh=[];return Object.keys(Ph).forEach(function(Ih){Ph[Ih].forEach(function(Ph){var Lh=null;switch(Ph){case`bold`:Lh={family:Ih,weight:`bold`};break;case`italic`:Lh={family:Ih,style:`italic`};break;case`bolditalic`:Lh={family:Ih,weight:`bold`,style:`italic`};break;case``:case`normal`:Lh={family:Ih}}Lh!==null&&(Lh.ref={name:Ih,style:Ph},Fh.push(Lh))})}),Fh}(Ih).concat(Fh)),Jh=Lh),qh}(this.pdf,this.fontFaces),Vh.map(function(Ph){return{family:Ph,stretch:`normal`,weight:Lh,style:Ih}}));this.pdf.setFont(Hh.ref.name,Hh.ref.style)}else{var Uh=``;(Lh===`bold`||parseInt(Lh,10)>=700||Ih===`bold`)&&(Uh=`bold`),Ih===`italic`&&(Uh+=`italic`),Uh.length===0&&(Uh=`normal`);for(var Wh=``,Gh={arial:`Helvetica`,Arial:`Helvetica`,verdana:`Helvetica`,Verdana:`Helvetica`,helvetica:`Helvetica`,Helvetica:`Helvetica`,"sans-serif":`Helvetica`,fixed:`Courier`,monospace:`Courier`,terminal:`Courier`,cursive:`Times`,fantasy:`Times`,serif:`Times`},Kh=0;Kh<Vh.length;Kh++){if(this.pdf.internal.getFont(Vh[Kh],Uh,{noFallback:!0,disableWarning:!0})!==void 0){Wh=Vh[Kh];break}if(Uh===`bolditalic`&&this.pdf.internal.getFont(Vh[Kh],`bold`,{noFallback:!0,disableWarning:!0})!==void 0)Wh=Vh[Kh],Uh=`bold`;else if(this.pdf.internal.getFont(Vh[Kh],`normal`,{noFallback:!0,disableWarning:!0})!==void 0){Wh=Vh[Kh],Uh=`normal`;break}}if(Wh===``){for(var Yh=0;Yh<Vh.length;Yh++)if(Gh[Vh[Yh]]){Wh=Gh[Vh[Yh]];break}}Wh=Wh===``?`Times`:Wh,this.pdf.setFont(Wh,Uh)}}}}),Object.defineProperty(this,`globalCompositeOperation`,{get:function(){return this.ctx.globalCompositeOperation},set:function(Ph){this.ctx.globalCompositeOperation=Ph}}),Object.defineProperty(this,`globalAlpha`,{get:function(){return this.ctx.globalAlpha},set:function(Ph){this.ctx.globalAlpha=Ph}}),Object.defineProperty(this,`lineDashOffset`,{get:function(){return this.ctx.lineDashOffset},set:function(Ph){this.ctx.lineDashOffset=Ph,_g.call(this)}}),Object.defineProperty(this,`lineDash`,{get:function(){return this.ctx.lineDash},set:function(Ph){this.ctx.lineDash=Ph,_g.call(this)}}),Object.defineProperty(this,`ignoreClearRect`,{get:function(){return this.ctx.ignoreClearRect},set:function(Ph){this.ctx.ignoreClearRect=!!Ph}})};Gh.prototype.setLineDash=function(Ph){this.lineDash=Ph},Gh.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},Gh.prototype.fill=function(){eg.call(this,`fill`,!1)},Gh.prototype.stroke=function(){eg.call(this,`stroke`,!1)},Gh.prototype.beginPath=function(){this.path=[{type:`begin`}]},Gh.prototype.moveTo=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.moveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.moveTo`);var Ih=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));this.path.push({type:`mt`,x:Ih.x,y:Ih.y}),this.ctx.lastPoint=new Bh(Ph,Fh)},Gh.prototype.closePath=function(){var Ph=new Bh(0,0),Fh=0;for(Fh=this.path.length-1;Fh!==-1;Fh--)if(this.path[Fh].type===`begin`&&e$4(this.path[Fh+1])===`object`&&typeof this.path[Fh+1].x==`number`){Ph=new Bh(this.path[Fh+1].x,this.path[Fh+1].y);break}this.path.push({type:`close`}),this.ctx.lastPoint=new Bh(Ph.x,Ph.y)},Gh.prototype.lineTo=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.lineTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.lineTo`);var Ih=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));this.path.push({type:`lt`,x:Ih.x,y:Ih.y}),this.ctx.lastPoint=new Bh(Ih.x,Ih.y)},Gh.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),eg.call(this,null,!0)},Gh.prototype.quadraticCurveTo=function(Ph,Fh,Ih,Lh){if(isNaN(Ih)||isNaN(Lh)||isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.quadraticCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.quadraticCurveTo`);var Rh=this.ctx.transform.applyToPoint(new Bh(Ih,Lh)),zh=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));this.path.push({type:`qct`,x1:zh.x,y1:zh.y,x:Rh.x,y:Rh.y}),this.ctx.lastPoint=new Bh(Rh.x,Rh.y)},Gh.prototype.bezierCurveTo=function(Ph,Fh,Ih,Lh,Rh,zh){if(isNaN(Rh)||isNaN(zh)||isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.bezierCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.bezierCurveTo`);var Vh=this.ctx.transform.applyToPoint(new Bh(Rh,zh)),Hh=this.ctx.transform.applyToPoint(new Bh(Ph,Fh)),Uh=this.ctx.transform.applyToPoint(new Bh(Ih,Lh));this.path.push({type:`bct`,x1:Hh.x,y1:Hh.y,x2:Uh.x,y2:Uh.y,x:Vh.x,y:Vh.y}),this.ctx.lastPoint=new Bh(Vh.x,Vh.y)},Gh.prototype.arc=function(Ph,Fh,Ih,Lh,Rh,zh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh)||isNaN(Rh))throw go$1.error(`jsPDF.context2d.arc: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.arc`);if(zh=!!zh,!this.ctx.transform.isIdentity){var Vh=this.ctx.transform.applyToPoint(new Bh(Ph,Fh));Ph=Vh.x,Fh=Vh.y;var Hh=this.ctx.transform.applyToPoint(new Bh(0,Ih)),Uh=this.ctx.transform.applyToPoint(new Bh(0,0));Ih=Math.sqrt((Hh.x-Uh.x)**2+(Hh.y-Uh.y)**2)}Math.abs(Rh-Lh)>=2*Math.PI&&(Lh=0,Rh=2*Math.PI),this.path.push({type:`arc`,x:Ph,y:Fh,radius:Ih,startAngle:Lh,endAngle:Rh,counterclockwise:zh})},Gh.prototype.arcTo=function(Ph,Fh,Ih,Lh,Rh){throw Error(`arcTo not implemented.`)},Gh.prototype.rect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.rect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rect`);this.moveTo(Ph,Fh),this.lineTo(Ph+Ih,Fh),this.lineTo(Ph+Ih,Fh+Lh),this.lineTo(Ph,Fh+Lh),this.lineTo(Ph,Fh),this.lineTo(Ph+Ih,Fh),this.lineTo(Ph,Fh)},Gh.prototype.fillRect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.fillRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillRect`);if(!qh.call(this)){var Rh={};this.lineCap!==`butt`&&(Rh.lineCap=this.lineCap,this.lineCap=`butt`),this.lineJoin!==`miter`&&(Rh.lineJoin=this.lineJoin,this.lineJoin=`miter`),this.beginPath(),this.rect(Ph,Fh,Ih,Lh),this.fill(),Rh.hasOwnProperty(`lineCap`)&&(this.lineCap=Rh.lineCap),Rh.hasOwnProperty(`lineJoin`)&&(this.lineJoin=Rh.lineJoin)}},Gh.prototype.strokeRect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.strokeRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeRect`);Jh.call(this)||(this.beginPath(),this.rect(Ph,Fh,Ih,Lh),this.stroke())},Gh.prototype.clearRect=function(Ph,Fh,Ih,Lh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh))throw go$1.error(`jsPDF.context2d.clearRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.clearRect`);this.ignoreClearRect||(this.fillStyle=`#ffffff`,this.fillRect(Ph,Fh,Ih,Lh))},Gh.prototype.save=function(Ph){Ph=typeof Ph!=`boolean`||Ph;for(var Fh=this.pdf.internal.getCurrentPageInfo().pageNumber,Ih=0;Ih<this.pdf.internal.getNumberOfPages();Ih++)this.pdf.setPage(Ih+1),this.pdf.internal.out(`q`);if(this.pdf.setPage(Fh),Ph){this.ctx.fontSize=this.pdf.internal.getFontSize();var Lh=new Wh(this.ctx);this.ctxStack.push(this.ctx),this.ctx=Lh}},Gh.prototype.restore=function(Ph){Ph=typeof Ph!=`boolean`||Ph;for(var Fh=this.pdf.internal.getCurrentPageInfo().pageNumber,Ih=0;Ih<this.pdf.internal.getNumberOfPages();Ih++)this.pdf.setPage(Ih+1),this.pdf.internal.out(`Q`);this.pdf.setPage(Fh),Ph&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},Gh.prototype.toDataURL=function(){throw Error(`toDataUrl not implemented.`)};var Kh=function(Ph){var Fh,Ih,Lh,Rh;if(!0===Ph.isCanvasGradient&&(Ph=Ph.getColor()),!Ph)return{r:0,g:0,b:0,a:0,style:Ph};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(Ph))Fh=0,Ih=0,Lh=0,Rh=0;else{var zh=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(Ph);if(zh!==null)Fh=parseInt(zh[1]),Ih=parseInt(zh[2]),Lh=parseInt(zh[3]),Rh=1;else if((zh=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(Ph))!==null)Fh=parseInt(zh[1]),Ih=parseInt(zh[2]),Lh=parseInt(zh[3]),Rh=parseFloat(zh[4]);else{if(Rh=1,typeof Ph==`string`&&Ph.charAt(0)!==`#`){var Bh=new xo$1(Ph);Ph=Bh.ok?Bh.toHex():`#000000`}Ph.length===4?(Fh=Ph.substring(1,2),Fh+=Fh,Ih=Ph.substring(2,3),Ih+=Ih,Lh=Ph.substring(3,4),Lh+=Lh):(Fh=Ph.substring(1,3),Ih=Ph.substring(3,5),Lh=Ph.substring(5,7)),Fh=parseInt(Fh,16),Ih=parseInt(Ih,16),Lh=parseInt(Lh,16)}}return{r:Fh,g:Ih,b:Lh,a:Rh,style:Ph}},qh=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},Jh=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};Gh.prototype.fillText=function(Ph,Fh,Ih,Lh){if(isNaN(Fh)||isNaN(Ih)||typeof Ph!=`string`)throw go$1.error(`jsPDF.context2d.fillText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillText`);if(Lh=isNaN(Lh)?void 0:Lh,!qh.call(this)){var Rh=mg(this.ctx.transform.rotation),zh=this.ctx.transform.scaleX;cg.call(this,{text:Ph,x:Fh,y:Ih,scale:zh,angle:Rh,align:this.textAlign,maxWidth:Lh})}},Gh.prototype.strokeText=function(Ph,Fh,Ih,Lh){if(isNaN(Fh)||isNaN(Ih)||typeof Ph!=`string`)throw go$1.error(`jsPDF.context2d.strokeText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeText`);if(!Jh.call(this)){Lh=isNaN(Lh)?void 0:Lh;var Rh=mg(this.ctx.transform.rotation),zh=this.ctx.transform.scaleX;cg.call(this,{text:Ph,x:Fh,y:Ih,scale:zh,renderingMode:`stroke`,angle:Rh,align:this.textAlign,maxWidth:Lh})}},Gh.prototype.measureText=function(Ph){if(typeof Ph!=`string`)throw go$1.error(`jsPDF.context2d.measureText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.measureText`);var Fh=this.pdf,Ih=this.pdf.internal.scaleFactor,Lh=Fh.internal.getFontSize(),Rh=Fh.getStringUnitWidth(Ph)*Lh/Fh.internal.scaleFactor;return new function(Ph){var Fh=(Ph||={}).width||0;return Object.defineProperty(this,`width`,{get:function(){return Fh}}),this}({width:Rh*=Math.round(96*Ih/72*1e4)/1e4})},Gh.prototype.scale=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.scale: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.scale`);var Ih=new Hh(Ph,0,0,Fh,0,0);this.ctx.transform=this.ctx.transform.multiply(Ih)},Gh.prototype.rotate=function(Ph){if(isNaN(Ph))throw go$1.error(`jsPDF.context2d.rotate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rotate`);var Fh=new Hh(Math.cos(Ph),Math.sin(Ph),-Math.sin(Ph),Math.cos(Ph),0,0);this.ctx.transform=this.ctx.transform.multiply(Fh)},Gh.prototype.translate=function(Ph,Fh){if(isNaN(Ph)||isNaN(Fh))throw go$1.error(`jsPDF.context2d.translate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.translate`);var Ih=new Hh(1,0,0,1,Ph,Fh);this.ctx.transform=this.ctx.transform.multiply(Ih)},Gh.prototype.transform=function(Ph,Fh,Ih,Lh,Rh,zh){if(isNaN(Ph)||isNaN(Fh)||isNaN(Ih)||isNaN(Lh)||isNaN(Rh)||isNaN(zh))throw go$1.error(`jsPDF.context2d.transform: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.transform`);var Bh=new Hh(Ph,Fh,Ih,Lh,Rh,zh);this.ctx.transform=this.ctx.transform.multiply(Bh)},Gh.prototype.setTransform=function(Ph,Fh,Ih,Lh,Rh,zh){Ph=isNaN(Ph)?1:Ph,Fh=isNaN(Fh)?0:Fh,Ih=isNaN(Ih)?0:Ih,Lh=isNaN(Lh)?1:Lh,Rh=isNaN(Rh)?0:Rh,zh=isNaN(zh)?0:zh,this.ctx.transform=new Hh(Ph,Fh,Ih,Lh,Rh,zh)};var Yh=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};Gh.prototype.drawImage=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Uh,Wh){var Gh=this.pdf.getImageProperties(Ph),Kh=1,qh=1,Jh=1,Zh=1;Lh!==void 0&&Uh!==void 0&&(Jh=Uh/Lh,Zh=Wh/Rh,Kh=Gh.width/Lh*Uh/Lh,qh=Gh.height/Rh*Wh/Rh),zh===void 0&&(zh=Fh,Bh=Ih,Fh=0,Ih=0),Lh!==void 0&&Uh===void 0&&(Uh=Lh,Wh=Rh),Lh===void 0&&Uh===void 0&&(Uh=Gh.width,Wh=Gh.height);var eg=this.ctx.transform.decompose(),ng=mg(eg.rotate.shx),rg=new Hh,ig=(rg=(rg=(rg=rg.multiply(eg.translate)).multiply(eg.skew)).multiply(eg.scale)).applyToRectangle(new Vh(zh-Fh*Jh,Bh-Ih*Zh,Lh*Kh,Rh*qh));if(this.autoPaging){for(var ag,og=Xh.call(this,ig),sg=[],cg=0;cg<og.length;cg+=1)sg.indexOf(og[cg])===-1&&sg.push(og[cg]);$h(sg);for(var lg=sg[0],ug=sg[sg.length-1],dg=lg;dg<ug+1;dg++){this.pdf.setPage(dg);var fg=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],pg=dg===1?this.posY+this.margin[0]:this.margin[0],hg=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],gg=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],_g=dg===1?0:hg+(dg-2)*gg;if(this.ctx.clip_path.length!==0){var vg=this.path;ag=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Qh(ag,this.posX+this.margin[3],-_g+pg+this.ctx.prevPageLastElemOffset),tg.call(this,`fill`,!0),this.path=vg}var yg=JSON.parse(JSON.stringify(ig));yg=Qh([yg],this.posX+this.margin[3],-_g+pg+this.ctx.prevPageLastElemOffset)[0];var bg=(dg>lg||dg<ug)&&Yh.call(this);bg&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],fg,gg,null).clip().discardPath()),this.pdf.addImage(Ph,`JPEG`,yg.x,yg.y,yg.w,yg.h,null,null,ng),bg&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(Ph,`JPEG`,ig.x,ig.y,ig.w,ig.h,null,null,ng)};var Xh=function(Ph,Fh,Ih){var Lh=[];Fh||=this.pdf.internal.pageSize.width,Ih||=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Rh=this.posY+this.ctx.prevPageLastElemOffset;switch(Ph.type){default:case`mt`:case`lt`:Lh.push(Math.floor((Ph.y+Rh)/Ih)+1);break;case`arc`:Lh.push(Math.floor((Ph.y+Rh-Ph.radius)/Ih)+1),Lh.push(Math.floor((Ph.y+Rh+Ph.radius)/Ih)+1);break;case`qct`:var zh=hg(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Ph.x1,Ph.y1,Ph.x,Ph.y);Lh.push(Math.floor((zh.y+Rh)/Ih)+1),Lh.push(Math.floor((zh.y+zh.h+Rh)/Ih)+1);break;case`bct`:var Bh=gg(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Ph.x1,Ph.y1,Ph.x2,Ph.y2,Ph.x,Ph.y);Lh.push(Math.floor((Bh.y+Rh)/Ih)+1),Lh.push(Math.floor((Bh.y+Bh.h+Rh)/Ih)+1);break;case`rect`:Lh.push(Math.floor((Ph.y+Rh)/Ih)+1),Lh.push(Math.floor((Ph.y+Ph.h+Rh)/Ih)+1)}for(var Vh=0;Vh<Lh.length;Vh+=1)for(;this.pdf.internal.getNumberOfPages()<Lh[Vh];)Zh.call(this);return Lh},Zh=function(){var Ph=this.fillStyle,Fh=this.strokeStyle,Ih=this.font,Lh=this.lineCap,Rh=this.lineWidth,zh=this.lineJoin;this.pdf.addPage(),this.fillStyle=Ph,this.strokeStyle=Fh,this.font=Ih,this.lineCap=Lh,this.lineWidth=Rh,this.lineJoin=zh},Qh=function(Ph,Fh,Ih){for(var Lh=0;Lh<Ph.length;Lh++)switch(Ph[Lh].type){case`bct`:Ph[Lh].x2+=Fh,Ph[Lh].y2+=Ih;case`qct`:Ph[Lh].x1+=Fh,Ph[Lh].y1+=Ih;default:Ph[Lh].x+=Fh,Ph[Lh].y+=Ih}return Ph},$h=function(Ph){return Ph.sort(function(Ph,Fh){return Ph-Fh})},eg=function(Ph,Fh){var Ih=this.fillStyle,Lh=this.strokeStyle,Rh=this.lineCap,zh=this.lineWidth,Bh=Math.abs(zh*this.ctx.transform.scaleX),Vh=this.lineJoin;if(this.autoPaging){for(var Hh,Uh,Wh=JSON.parse(JSON.stringify(this.path)),Gh=JSON.parse(JSON.stringify(this.path)),Kh=[],qh=0;qh<Gh.length;qh++)if(Gh[qh].x!==void 0)for(var Jh=Xh.call(this,Gh[qh]),eg=0;eg<Jh.length;eg+=1)Kh.indexOf(Jh[eg])===-1&&Kh.push(Jh[eg]);for(var ng=0;ng<Kh.length;ng++)for(;this.pdf.internal.getNumberOfPages()<Kh[ng];)Zh.call(this);$h(Kh);for(var rg=Kh[0],ig=Kh[Kh.length-1],ag=rg;ag<ig+1;ag++){this.pdf.setPage(ag),this.fillStyle=Ih,this.strokeStyle=Lh,this.lineCap=Rh,this.lineWidth=Bh,this.lineJoin=Vh;var og=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],sg=ag===1?this.posY+this.margin[0]:this.margin[0],cg=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],lg=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ug=ag===1?0:cg+(ag-2)*lg;if(this.ctx.clip_path.length!==0){var dg=this.path;Hh=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Qh(Hh,this.posX+this.margin[3],-ug+sg+this.ctx.prevPageLastElemOffset),tg.call(this,Ph,!0),this.path=dg}if(Uh=JSON.parse(JSON.stringify(Wh)),this.path=Qh(Uh,this.posX+this.margin[3],-ug+sg+this.ctx.prevPageLastElemOffset),!1===Fh||ag===0){var fg=(ag>rg||ag<ig)&&Yh.call(this);fg&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],og,lg,null).clip().discardPath()),tg.call(this,Ph,Fh),fg&&this.pdf.restoreGraphicsState()}this.lineWidth=zh}this.path=Wh}else this.lineWidth=Bh,tg.call(this,Ph,Fh),this.lineWidth=zh},tg=function(Ph,Fh){if((Ph!==`stroke`||Fh||!Jh.call(this))&&(Ph===`stroke`||Fh||!qh.call(this))){for(var Ih,Lh,Rh=[],zh=this.path,Bh=0;Bh<zh.length;Bh++){var Vh=zh[Bh];switch(Vh.type){case`begin`:Rh.push({begin:!0});break;case`close`:Rh.push({close:!0});break;case`mt`:Rh.push({start:Vh,deltas:[],abs:[]});break;case`lt`:var Hh=Rh.length;if(zh[Bh-1]&&!isNaN(zh[Bh-1].x)&&(Ih=[Vh.x-zh[Bh-1].x,Vh.y-zh[Bh-1].y],Hh>0)){for(;Hh>=0;Hh--)if(!0!==Rh[Hh-1].close&&!0!==Rh[Hh-1].begin){Rh[Hh-1].deltas.push(Ih),Rh[Hh-1].abs.push(Vh);break}}break;case`bct`:Ih=[Vh.x1-zh[Bh-1].x,Vh.y1-zh[Bh-1].y,Vh.x2-zh[Bh-1].x,Vh.y2-zh[Bh-1].y,Vh.x-zh[Bh-1].x,Vh.y-zh[Bh-1].y],Rh[Rh.length-1].deltas.push(Ih);break;case`qct`:var Uh=zh[Bh-1].x+2/3*(Vh.x1-zh[Bh-1].x),Wh=zh[Bh-1].y+2/3*(Vh.y1-zh[Bh-1].y),Gh=Vh.x+2/3*(Vh.x1-Vh.x),Kh=Vh.y+2/3*(Vh.y1-Vh.y),Yh=Vh.x,Xh=Vh.y;Ih=[Uh-zh[Bh-1].x,Wh-zh[Bh-1].y,Gh-zh[Bh-1].x,Kh-zh[Bh-1].y,Yh-zh[Bh-1].x,Xh-zh[Bh-1].y],Rh[Rh.length-1].deltas.push(Ih);break;case`arc`:Rh.push({deltas:[],abs:[],arc:!0}),Array.isArray(Rh[Rh.length-1].abs)&&Rh[Rh.length-1].abs.push(Vh)}}Lh=Fh?null:Ph===`stroke`?`stroke`:`fill`;for(var Zh=!1,Qh=0;Qh<Rh.length;Qh++)if(Rh[Qh].arc)for(var $h=Rh[Qh].abs,eg=0;eg<$h.length;eg++){var tg=$h[eg];tg.type===`arc`?ig.call(this,tg.x,tg.y,tg.radius,tg.startAngle,tg.endAngle,tg.counterclockwise,void 0,Fh,!Zh):lg.call(this,tg.x,tg.y),Zh=!0}else if(!0===Rh[Qh].close)this.pdf.internal.out(`h`),Zh=!1;else if(!0!==Rh[Qh].begin){var ng=Rh[Qh].start.x,rg=Rh[Qh].start.y;ug.call(this,Rh[Qh].deltas,ng,rg),Zh=!0}Lh&&ag.call(this,Lh),Fh&&og.call(this)}},ng=function(Ph){var Fh=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Ih=Fh*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case`bottom`:return Ph-Ih;case`top`:return Ph+Fh-Ih;case`hanging`:return Ph+Fh-2*Ih;case`middle`:return Ph+Fh/2-Ih;default:return Ph}},rg=function(Ph){return Ph+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};Gh.prototype.createLinearGradient=function(){var Ph=function(){};return Ph.colorStops=[],Ph.addColorStop=function(Ph,Fh){this.colorStops.push([Ph,Fh])},Ph.getColor=function(){return this.colorStops.length===0?`#000000`:this.colorStops[0][1]},Ph.isCanvasGradient=!0,Ph},Gh.prototype.createPattern=function(){return this.createLinearGradient()},Gh.prototype.createRadialGradient=function(){return this.createLinearGradient()};var ig=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh){for(var Uh=fg.call(this,Ih,Lh,Rh,zh),Wh=0;Wh<Uh.length;Wh++){var Gh=Uh[Wh];Wh===0&&(Hh?sg.call(this,Gh.x1+Ph,Gh.y1+Fh):lg.call(this,Gh.x1+Ph,Gh.y1+Fh)),dg.call(this,Ph,Fh,Gh.x2,Gh.y2,Gh.x3,Gh.y3,Gh.x4,Gh.y4)}Vh?og.call(this):ag.call(this,Bh)},ag=function(Ph){switch(Ph){case`stroke`:this.pdf.internal.out(`S`);break;case`fill`:this.pdf.internal.out(`f`)}},og=function(){this.pdf.clip(),this.pdf.discardPath()},sg=function(Ph,Fh){this.pdf.internal.out(Ih(Ph)+` `+Lh(Fh)+` m`)},cg=function(Ph){var Fh;switch(Ph.align){case`right`:case`end`:Fh=`right`;break;case`center`:Fh=`center`;break;default:Fh=`left`}var Ih,Lh,Rh,zh=this.pdf.getTextDimensions(Ph.text),Uh=ng.call(this,Ph.y),Wh=rg.call(this,Uh)-zh.h,Gh=this.ctx.transform.applyToPoint(new Bh(Ph.x,Uh));if(this.autoPaging){var Kh=this.ctx.transform.decompose(),qh=new Hh;qh=(qh=(qh=qh.multiply(Kh.translate)).multiply(Kh.skew)).multiply(Kh.scale);for(var Jh=this.ctx.transform.applyToRectangle(new Vh(Ph.x,Uh,zh.w,zh.h)),Zh=qh.applyToRectangle(new Vh(Ph.x,Wh,zh.w,zh.h)),eg=Xh.call(this,Zh),ig=[],ag=0;ag<eg.length;ag+=1)ig.indexOf(eg[ag])===-1&&ig.push(eg[ag]);$h(ig);for(var og=ig[0],sg=ig[ig.length-1],cg=og;cg<sg+1;cg++){this.pdf.setPage(cg);var lg=cg===1?this.posY+this.margin[0]:this.margin[0],ug=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],dg=this.pdf.internal.pageSize.height-this.margin[2],fg=dg-this.margin[0],pg=this.pdf.internal.pageSize.width-this.margin[1],mg=pg-this.margin[3],hg=cg===1?0:ug+(cg-2)*fg;if(this.ctx.clip_path.length!==0){var gg=this.path;Ih=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Qh(Ih,this.posX+this.margin[3],-1*hg+lg),tg.call(this,`fill`,!0),this.path=gg}var _g=Qh([JSON.parse(JSON.stringify(Zh))],this.posX+this.margin[3],-hg+lg+this.ctx.prevPageLastElemOffset)[0];Ph.scale>=.01&&(Lh=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lh*Ph.scale),Rh=this.lineWidth,this.lineWidth=Rh*Ph.scale);var vg=this.autoPaging!==`text`;if(vg||_g.y+_g.h<=dg){if(vg||_g.y>=lg&&_g.x<=pg){var yg=vg?Ph.text:this.pdf.splitTextToSize(Ph.text,Ph.maxWidth||pg-_g.x)[0],bg=Qh([JSON.parse(JSON.stringify(Jh))],this.posX+this.margin[3],-hg+lg+this.ctx.prevPageLastElemOffset)[0],xg=vg&&(cg>og||cg<sg)&&Yh.call(this);xg&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],mg,fg,null).clip().discardPath()),this.pdf.text(yg,bg.x,bg.y,{angle:Ph.angle,align:Fh,renderingMode:Ph.renderingMode}),xg&&this.pdf.restoreGraphicsState()}}else _g.y<dg&&(this.ctx.prevPageLastElemOffset+=dg-_g.y);Ph.scale>=.01&&(this.pdf.setFontSize(Lh),this.lineWidth=Rh)}}else Ph.scale>=.01&&(Lh=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lh*Ph.scale),Rh=this.lineWidth,this.lineWidth=Rh*Ph.scale),this.pdf.text(Ph.text,Gh.x+this.posX,Gh.y+this.posY,{angle:Ph.angle,align:Fh,renderingMode:Ph.renderingMode,maxWidth:Ph.maxWidth}),Ph.scale>=.01&&(this.pdf.setFontSize(Lh),this.lineWidth=Rh)},lg=function(Ph,Fh,Rh,zh){Rh||=0,zh||=0,this.pdf.internal.out(Ih(Ph+Rh)+` `+Lh(Fh+zh)+` l`)},ug=function(Ph,Fh,Ih){return this.pdf.lines(Ph,Fh,Ih,null,null)},dg=function(Ph,Ih,Lh,Bh,Vh,Hh,Uh,Wh){this.pdf.internal.out([Fh(Rh(Lh+Ph)),Fh(zh(Bh+Ih)),Fh(Rh(Vh+Ph)),Fh(zh(Hh+Ih)),Fh(Rh(Uh+Ph)),Fh(zh(Wh+Ih)),`c`].join(` `))},fg=function(Ph,Fh,Ih,Lh){for(var Rh=2*Math.PI,zh=Math.PI/2;Fh>Ih;)Fh-=Rh;var Bh=Math.abs(Ih-Fh);Bh<Rh&&Lh&&(Bh=R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+Uh*(qh+Uh*(Rh+Uh*sg-qh)-Yh),Qh=(Xh=(Kh=Fh+Uh*ig)+Uh*((Jh=Lh+Uh*og)-Kh))+Uh*(Jh+Uh*(zh+Uh*cg-Jh)-Xh),Wh==0?($h=Zh,eg=Qh,tg=Zh,ng=Qh):($h=Math.min($h,Zh),eg=Math.min(eg,Qh),tg=Math.max(tg,Zh),ng=Math.max(ng,Qh));return new Vh(Math.round($h),Math.round(eg),Math.round(tg-$h),Math.round(ng-eg))},_g=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var Ph,Fh,Ih=(Ph=this.ctx.lineDash,Fh=this.ctx.lineDashOffset,JSON.stringify({lineDash:Ph,lineDashOffset:Fh}));this.prevLineDash!==Ih&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Ih)}}})(Z$3.API),function(Ph){var Fh=function(Ph){var Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh;for(/[^\x00-\xFF]/.test(Ph),Ih=[],Lh=0,Rh=(Ph+=Fh=`\0\0\0\0`.slice(Ph.length%4||4)).length;Rh>Lh;Lh+=4)(zh=(Ph.charCodeAt(Lh)<<24)+(Ph.charCodeAt(Lh+1)<<16)+(Ph.charCodeAt(Lh+2)<<8)+Ph.charCodeAt(Lh+3))===0?Ih.push(122):(Bh=(zh=((zh=((zh=((zh=(zh-(Wh=zh%85))/85)-(Uh=zh%85))/85)-(Hh=zh%85))/85)-(Vh=zh%85))/85)%85,Ih.push(Bh+33,Vh+33,Hh+33,Uh+33,Wh+33));return function(Ph,Fh){for(var Ih=Fh;Ih>0;Ih--)Ph.pop()}(Ih,Fh.length),String.fromCharCode.apply(String,Ih)+`~>`},Ih=function(Ph){var Fh,Ih,Lh,Rh,zh,Bh=String,Vh=`length`,Hh=255,Uh=`charCodeAt`,Wh=`slice`,Gh=`replace`;for(Ph[Wh](-2),Ph=Ph[Wh](0,-2)[Gh](/\s/g,``)[Gh](`z`,`!!!!!`),Lh=[],Rh=0,zh=(Ph+=Fh=`uuuuu`[Wh](Ph[Vh]%5||5))[Vh];zh>Rh;Rh+=5)Ih=52200625*(Ph[Uh](Rh)-33)+614125*(Ph[Uh](Rh+1)-33)+7225*(Ph[Uh](Rh+2)-33)+85*(Ph[Uh](Rh+3)-33)+(Ph[Uh](Rh+4)-33),Lh.push(Hh&Ih>>24,Hh&Ih>>16,Hh&Ih>>8,Hh&Ih);return function(Ph,Fh){for(var Ih=Fh;Ih>0;Ih--)Ph.pop()}(Lh,Fh[Vh]),Bh.fromCharCode.apply(Bh,Lh)},Lh=function(Ph){return Ph.split(``).map(function(Ph){return(`0`+Ph.charCodeAt().toString(16)).slice(-2)}).join(``)+`>`},Rh=function(Ph){var Fh=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((Ph=Ph.replace(/\s/g,``)).indexOf(`>`)!==-1&&(Ph=Ph.substr(0,Ph.indexOf(`>`))),Ph.length%2&&(Ph+=`0`),!1===Fh.test(Ph))return``;for(var Ih=``,Lh=0;Lh<Ph.length;Lh+=2)Ih+=String.fromCharCode(`0x`+(Ph[Lh]+Ph[Lh+1]));return Ih},zh=function(Ph){for(var Fh=new Uint8Array(Ph.length),Ih=Ph.length;Ih--;)Fh[Ih]=Ph.charCodeAt(Ih);return(Fh=me$3(Fh)).reduce(function(Ph,Fh){return Ph+String.fromCharCode(Fh)},``)};Ph.processDataByFilters=function(Ph,Bh){var Vh=0,Hh=Ph||``,Uh=[];for(typeof(Bh||=[])==`string`&&(Bh=[Bh]),Vh=0;Vh<Bh.length;Vh+=1)switch(Bh[Vh]){case`ASCII85Decode`:case`/ASCII85Decode`:Hh=Ih(Hh),Uh.push(`/ASCII85Encode`);break;case`ASCII85Encode`:case`/ASCII85Encode`:Hh=Fh(Hh),Uh.push(`/ASCII85Decode`);break;case`ASCIIHexDecode`:case`/ASCIIHexDecode`:Hh=Rh(Hh),Uh.push(`/ASCIIHexEncode`);break;case`ASCIIHexEncode`:case`/ASCIIHexEncode`:Hh=Lh(Hh),Uh.push(`/ASCIIHexDecode`);break;case`FlateEncode`:case`/FlateEncode`:Hh=zh(Hh),Uh.push(`/FlateDecode`);break;default:throw Error(`The filter: "`+Bh[Vh]+`" is not implemented`)}return{data:Hh,reverseChain:Uh.reverse().join(` `)}}}(Z$3.API),function(Ph){Ph.loadFile=function(Ph,Fh,Ih){return function(Ph,Fh,Ih){Fh=!1!==Fh,Ih=typeof Ih==`function`?Ih:function(){};var Lh=void 0;try{Lh=function(Ph,Fh,Ih){var Lh=new XMLHttpRequest,Rh=0,zh=function(Ph){var Fh=Ph.length,Ih=[],Lh=String.fromCharCode;for(Rh=0;Rh<Fh;Rh+=1)Ih.push(Lh(255&Ph.charCodeAt(Rh)));return Ih.join(``)};if(Lh.open(`GET`,Ph,!Fh),Lh.overrideMimeType(`text/plain; charset=x-user-defined`),!1===Fh&&(Lh.onload=function(){Lh.status===200?Ih(zh(this.responseText)):Ih(void 0)}),Lh.send(null),Fh&&Lh.status===200)return zh(Lh.responseText)}(Ph,Fh,Ih)}catch{}return Lh}(Ph,Fh,Ih)},Ph.allowFsRead=void 0,Ph.loadImageFile=Ph.loadFile}(Z$3.API),function(Ph){function Fh(){return(X$3.html2canvas?Promise.resolve(X$3.html2canvas):__vitePreload(()=>import(`./html2canvas-Cx501zZr-Bug0qRNv.js`).then(Ph=>c$2(Ph.default)),[])).catch(function(Ph){return Promise.reject(Error(`Could not load html2canvas: `+Ph))}).then(function(Ph){return Ph.default?Ph.default:Ph})}function Ih(){return(X$3.DOMPurify?Promise.resolve(X$3.DOMPurify):__vitePreload(()=>import(`./purify.es-Fx1Nqyry-BwJECkqS.js`),[])).catch(function(Ph){return Promise.reject(Error(`Could not load dompurify: `+Ph))}).then(function(Ph){return Ph.default?Ph.default:Ph})}var Lh=function(Ph){var Fh=e$4(Ph);return Fh===`undefined`?`undefined`:Fh===`string`||Ph instanceof String?`string`:Fh===`number`||Ph instanceof Number?`number`:Fh===`function`||Ph instanceof Function?`function`:Ph&&Ph.constructor===Array?`array`:Ph&&Ph.nodeType===1?`element`:Fh===`object`?`object`:`unknown`},Rh=function(Ph,Fh){var Ih=document.createElement(Ph);for(var Lh in Fh.className&&(Ih.className=Fh.className),Fh.innerHTML&&Fh.dompurify&&(Ih.innerHTML=Fh.dompurify.sanitize(Fh.innerHTML)),Fh.style)Ih.style[Lh]=Fh.style[Lh];return Ih},zh=function Ph(Fh,Ih){for(var Lh=Fh.nodeType===3?document.createTextNode(Fh.nodeValue):Fh.cloneNode(!1),Rh=Fh.firstChild;Rh;Rh=Rh.nextSibling)!0!==Ih&&Rh.nodeType===1&&Rh.nodeName===`SCRIPT`||Lh.appendChild(Ph(Rh,Ih));return Fh.nodeType===1&&(Fh.nodeName===`CANVAS`?(Lh.width=Fh.width,Lh.height=Fh.height,Lh.getContext(`2d`).drawImage(Fh,0,0)):Fh.nodeName!==`TEXTAREA`&&Fh.nodeName!==`SELECT`||(Lh.value=Fh.value),Lh.addEventListener(`load`,function(){Lh.scrollTop=Fh.scrollTop,Lh.scrollLeft=Fh.scrollLeft},!0)),Lh},Bh=function Ph(Fh){var Ih=Object.assign(Ph.convert(Promise.resolve()),JSON.parse(JSON.stringify(Ph.template))),Lh=Ph.convert(Promise.resolve(),Ih);return(Lh=Lh.setProgress(1,Ph,1,[Ph])).set(Fh)};(Bh.prototype=Object.create(Promise.prototype)).constructor=Bh,Bh.convert=function(Ph,Fh){return Ph.__proto__=Fh||Bh.prototype,Ph},Bh.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:`file.pdf`,margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:`transparent`}},Bh.prototype.from=function(Ph,Fh){return this.then(function(){switch(Fh||=function(Ph){switch(Lh(Ph)){case`string`:return`string`;case`element`:return Ph.nodeName.toLowerCase()===`canvas`?`canvas`:`element`;default:return`unknown`}}(Ph),Fh){case`string`:return this.then(Ih).then(function(Fh){return this.set({src:Rh(`div`,{innerHTML:Ph,dompurify:Fh})})});case`element`:return this.set({src:Ph});case`canvas`:return this.set({canvas:Ph});case`img`:return this.set({img:Ph});default:return this.error(`Unknown source type.`)}})},Bh.prototype.to=function(Ph){switch(Ph){case`container`:return this.toContainer();case`canvas`:return this.toCanvas();case`img`:return this.toImg();case`pdf`:return this.toPdf();default:return this.error(`Invalid target.`)}},Bh.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error(`Cannot duplicate - no source HTML.`)},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var Ph={position:`relative`,display:`inline-block`,width:(typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+`px`,left:0,right:0,top:0,margin:`auto`,backgroundColor:this.opt.backgroundColor},Fh=zh(this.prop.src,this.opt.html2canvas.javascriptEnabled);Fh.tagName===`BODY`&&(Ph.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+`px`),this.prop.overlay=Rh(`div`,{className:`html2pdf__overlay`,style:{position:`fixed`,overflow:`hidden`,zIndex:1e3,left:`-100000px`,right:0,bottom:0,top:0}}),this.prop.container=Rh(`div`,{className:`html2pdf__container`,style:Ph}),this.prop.container.appendChild(Fh),this.prop.container.firstChild.appendChild(Rh(`div`,{style:{clear:`both`,border:`0 none transparent`,margin:0,padding:0,height:0}})),this.prop.container.style.float=`none`,this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position=`relative`,this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+`px`})},Bh.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(Fh).then(function(Ph){var Fh=Object.assign({},this.opt.html2canvas);return delete Fh.onrendered,Ph(this.prop.container,Fh)}).then(function(Ph){(this.opt.html2canvas.onrendered||function(){})(Ph),this.prop.canvas=Ph,document.body.removeChild(this.prop.overlay)})},Bh.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(Fh).then(function(Ph){var Fh=this.opt.jsPDF,Ih=this.opt.fontFaces,Lh=typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,Rh=Object.assign({async:!0,allowTaint:!0,scale:Lh,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:`#ffffff`,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete Rh.onrendered,Fh.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,Fh.context2d.posX=this.opt.x,Fh.context2d.posY=this.opt.y,Fh.context2d.margin=this.opt.margin,Fh.context2d.fontFaces=Ih,Ih)for(var zh=0;zh<Ih.length;++zh){var Bh=Ih[zh],Vh=Bh.src.find(function(Ph){return Ph.format===`truetype`});Vh&&Fh.addFont(Vh.url,Bh.ref.name,Bh.ref.style)}return Rh.windowHeight=Rh.windowHeight||0,Rh.windowHeight=Rh.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):Rh.windowHeight,Fh.context2d.save(!0),Ph(this.prop.container,Rh)}).then(function(Ph){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(Ph),this.prop.canvas=Ph,document.body.removeChild(this.prop.overlay)})},Bh.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var Ph=this.prop.canvas.toDataURL(`image/`+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement(`img`),this.prop.img.src=Ph})},Bh.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},Bh.prototype.output=function(Ph,Fh,Ih){return(Ih||=`pdf`).toLowerCase()===`img`||Ih.toLowerCase()===`image`?this.outputImg(Ph,Fh):this.outputPdf(Ph,Fh)},Bh.prototype.outputPdf=function(Ph,Fh){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(Ph,Fh)})},Bh.prototype.outputImg=function(Ph){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(Ph){case void 0:case`img`:return this.prop.img;case`datauristring`:case`dataurlstring`:return this.prop.img.src;case`datauri`:case`dataurl`:return document.location.href=this.prop.img.src;default:throw`Image output type "`+Ph+`" is not supported.`}})},Bh.prototype.save=function(Ph){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(Ph?{filename:Ph}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},Bh.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},Bh.prototype.set=function(Ph){if(Lh(Ph)!==`object`)return this;var Fh=Object.keys(Ph||{}).map(function(Fh){if(Fh in Bh.template.prop)return function(){this.prop[Fh]=Ph[Fh]};switch(Fh){case`margin`:return this.setMargin.bind(this,Ph.margin);case`jsPDF`:return function(){return this.opt.jsPDF=Ph.jsPDF,this.setPageSize()};case`pageSize`:return this.setPageSize.bind(this,Ph.pageSize);default:return function(){this.opt[Fh]=Ph[Fh]}}},this);return this.then(function(){return this.thenList(Fh)})},Bh.prototype.get=function(Ph,Fh){return this.then(function(){var Ih=Ph in Bh.template.prop?this.prop[Ph]:this.opt[Ph];return Fh?Fh(Ih):Ih})},Bh.prototype.setMargin=function(Ph){return this.then(function(){switch(Lh(Ph)){case`number`:Ph=[Ph,Ph,Ph,Ph];case`array`:if(Ph.length===2&&(Ph=[Ph[0],Ph[1],Ph[0],Ph[1]]),Ph.length===4)break;default:return this.error(`Invalid margin array.`)}this.opt.margin=Ph}).then(this.setPageSize)},Bh.prototype.setPageSize=function(Ph){function Fh(Ph,Fh){return Math.floor(Ph*Fh/72*96)}return this.then(function(){(Ph||=Z$3.getPageSize(this.opt.jsPDF)).hasOwnProperty(`inner`)||(Ph.inner={width:Ph.width-this.opt.margin[1]-this.opt.margin[3],height:Ph.height-this.opt.margin[0]-this.opt.margin[2]},Ph.inner.px={width:Fh(Ph.inner.width,Ph.k),height:Fh(Ph.inner.height,Ph.k)},Ph.inner.ratio=Ph.inner.height/Ph.inner.width),this.prop.pageSize=Ph})},Bh.prototype.setProgress=function(Ph,Fh,Ih,Lh){return Ph!=null&&(this.progress.val=Ph),Fh!=null&&(this.progress.state=Fh),Ih!=null&&(this.progress.n=Ih),Lh!=null&&(this.progress.stack=Lh),this.progress.ratio=this.progress.val/this.progress.state,this},Bh.prototype.updateProgress=function(Ph,Fh,Ih,Lh){return this.setProgress(Ph?this.progress.val+Ph:null,Fh||null,Ih?this.progress.n+Ih:null,Lh?this.progress.stack.concat(Lh):null)},Bh.prototype.then=function(Ph,Fh){var Ih=this;return this.thenCore(Ph,Fh,function(Ph,Fh){return Ih.updateProgress(null,null,1,[Ph]),Promise.prototype.then.call(this,function(Fh){return Ih.updateProgress(null,Ph),Fh}).then(Ph,Fh).then(function(Ph){return Ih.updateProgress(1),Ph})})},Bh.prototype.thenCore=function(Ph,Fh,Ih){Ih||=Promise.prototype.then;var Lh=this;Ph&&=Ph.bind(Lh),Fh&&=Fh.bind(Lh);var Rh=Promise.toString().indexOf(`[native code]`)!==-1&&Promise.name===`Promise`?Lh:Bh.convert(Object.assign({},Lh),Promise.prototype),zh=Ih.call(Rh,Ph,Fh);return Bh.convert(zh,Lh.__proto__)},Bh.prototype.thenExternal=function(Ph,Fh){return Promise.prototype.then.call(this,Ph,Fh)},Bh.prototype.thenList=function(Ph){var Fh=this;return Ph.forEach(function(Ph){Fh=Fh.thenCore(Ph)}),Fh},Bh.prototype.catch=function(Ph){Ph&&=Ph.bind(this);var Fh=Promise.prototype.catch.call(this,Ph);return Bh.convert(Fh,this)},Bh.prototype.catchExternal=function(Ph){return Promise.prototype.catch.call(this,Ph)},Bh.prototype.error=function(Ph){return this.then(function(){throw Error(Ph)})},Bh.prototype.using=Bh.prototype.set,Bh.prototype.saveAs=Bh.prototype.save,Bh.prototype.export=Bh.prototype.output,Bh.prototype.run=Bh.prototype.then,Z$3.getPageSize=function(Ph,Fh,Ih){if(e$4(Ph)===`object`){var Lh=Ph;Ph=Lh.orientation,Fh=Lh.unit||Fh,Ih=Lh.format||Ih}Fh||=`mm`,Ih||=`a4`,Ph=(``+(Ph||`P`)).toLowerCase();var Rh,zh=(``+Ih).toLowerCase(),Bh={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(Fh){case`pt`:Rh=1;break;case`mm`:Rh=72/25.4;break;case`cm`:Rh=72/2.54;break;case`in`:Rh=72;break;case`px`:Rh=.75;break;case`pc`:case`em`:Rh=12;break;case`ex`:Rh=6;break;default:throw`Invalid unit: `+Fh}var Vh,Hh=0,Uh=0;if(Bh.hasOwnProperty(zh))Hh=Bh[zh][1]/Rh,Uh=Bh[zh][0]/Rh;else try{Hh=Ih[1],Uh=Ih[0]}catch{throw Error(`Invalid format: `+Ih)}if(Ph===`p`||Ph===`portrait`)Ph=`p`,Uh>Hh&&(Vh=Uh,Uh=Hh,Hh=Vh);else{if(Ph!==`l`&&Ph!==`landscape`)throw`Invalid orientation: `+Ph;Ph=`l`,Hh>Uh&&(Vh=Uh,Uh=Hh,Hh=Vh)}return{width:Uh,height:Hh,unit:Fh,k:Rh,orientation:Ph}},Ph.html=function(Ph,Fh){(Fh||={}).callback=Fh.callback||function(){},Fh.html2canvas=Fh.html2canvas||{},Fh.html2canvas.canvas=Fh.html2canvas.canvas||this.canvas,Fh.jsPDF=Fh.jsPDF||this,Fh.fontFaces=Fh.fontFaces?Fh.fontFaces.map(zs$1):null;var Ih=new Bh(Fh);return Fh.worker?Ih:Ih.from(Ph).doCallback()}}(Z$3.API),Z$3.API.addJS=function(Ph){var Fh,Ih,Lh=function(Ph){for(var Fh=``,Ih=0;Ih<Ph.length;Ih++){var Lh=Ph[Ih];if(Lh===`(`||Lh===`)`){for(var Rh=0,zh=Ih-1;zh>=0&&Ph[zh]===`\\`;zh--)Rh++;Fh+=Rh%2==0?`\\`+Lh:Lh}else Fh+=Lh}return Fh}(Ph);return this.internal.events.subscribe(`postPutResources`,function(){Fh=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/Names [(EmbeddedJS) `+(Fh+1)+` 0 R]`),this.internal.out(`>>`),this.internal.out(`endobj`),Ih=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /JavaScript`),this.internal.out(`/JS (`+Lh+`)`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){Fh!==void 0&&Ih!==void 0&&this.internal.out(`/Names <</JavaScript `+Fh+` 0 R>>`)}),this},function(Ph){var Fh;Ph.events.push([`postPutResources`,function(){var Ph=this,Ih=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var Lh=Ph.outline.render().split(/\r\n/),Rh=0;Rh<Lh.length;Rh++){var zh=Lh[Rh],Bh=Ih.exec(zh);if(Bh!=null){var Vh=Bh[1];Ph.internal.newObjectDeferredBegin(Vh,!1)}Ph.internal.write(zh)}if(this.outline.createNamedDestinations){var Hh=this.internal.pages.length,Uh=[];for(Rh=0;Rh<Hh;Rh++){var Wh=Ph.internal.newObject();Uh.push(Wh);var Gh=Ph.internal.getPageInfo(Rh+1);Ph.internal.write(`<< /D[`+Gh.objId+` 0 R /XYZ null null null]>> endobj`)}var Kh=Ph.internal.newObject();for(Ph.internal.write(`<< /Names [ `),Rh=0;Rh<Uh.length;Rh++)Ph.internal.write(`(page_`+(Rh+1)+`)`+Uh[Rh]+` 0 R`);Ph.internal.write(` ] >>`,`endobj`),Fh=Ph.internal.newObject(),Ph.internal.write(`<< /Dests `+Kh+` 0 R`),Ph.internal.write(`>>`,`endobj`)}}]),Ph.events.push([`putCatalog`,function(){var Ph=this;Ph.outline.root.children.length>0&&(Ph.internal.write(`/Outlines`,this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&Ph.internal.write(`/Names `+Fh+` 0 R`))}]),Ph.events.push([`initialized`,function(){var Ph=this;Ph.outline={createNamedDestinations:!1,root:{children:[]}},Ph.outline.add=function(Ph,Fh,Ih){var Lh={title:Fh,options:Ih,children:[]};return Ph??=this.root,Ph.children.push(Lh),Lh},Ph.outline.render=function(){return this.ctx={},this.ctx.val=``,this.ctx.pdf=Ph,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},Ph.outline.genIds_r=function(Fh){Fh.id=Ph.internal.newObjectDeferred();for(var Ih=0;Ih<Fh.children.length;Ih++)this.genIds_r(Fh.children[Ih])},Ph.outline.renderRoot=function(Ph){this.objStart(Ph),this.line(`/Type /Outlines`),Ph.children.length>0&&(this.line(`/First `+this.makeRef(Ph.children[0])),this.line(`/Last `+this.makeRef(Ph.children[Ph.children.length-1]))),this.line(`/Count `+this.count_r({count:0},Ph)),this.objEnd()},Ph.outline.renderItems=function(Fh){for(var Ih=this.ctx.pdf.internal.getVerticalCoordinateString,Lh=0;Lh<Fh.children.length;Lh++){var Rh=Fh.children[Lh];this.objStart(Rh),this.line(`/Title `+this.makeString(Rh.title)),this.line(`/Parent `+this.makeRef(Fh)),Lh>0&&this.line(`/Prev `+this.makeRef(Fh.children[Lh-1])),Lh<Fh.children.length-1&&this.line(`/Next `+this.makeRef(Fh.children[Lh+1])),Rh.children.length>0&&(this.line(`/First `+this.makeRef(Rh.children[0])),this.line(`/Last `+this.makeRef(Rh.children[Rh.children.length-1])));var zh=this.count=this.count_r({count:0},Rh);if(zh>0&&this.line(`/Count `+zh),Rh.options&&Rh.options.pageNumber){var Bh=Ph.internal.getPageInfo(Rh.options.pageNumber);this.line(`/Dest [`+Bh.objId+` 0 R /XYZ 0 `+Ih(0)+` 0]`)}this.objEnd()}for(var Vh=0;Vh<Fh.children.length;Vh++)this.renderItems(Fh.children[Vh])},Ph.outline.line=function(Ph){this.ctx.val+=Ph+`\r
288
288
  `},Ph.outline.makeRef=function(Ph){return Ph.id+` 0 R`},Ph.outline.makeString=function(Fh){return`(`+Ph.internal.pdfEscape(Fh)+`)`},Ph.outline.objStart=function(Ph){this.ctx.val+=`\r
289
289
  `+Ph.id+` 0 obj\r
290
290
  <<\r
@@ -292,7 +292,7 @@ T* `):Ph.join(` Tj
292
292
  endobj\r
293
293
  `},Ph.outline.count_r=function(Ph,Fh){for(var Ih=0;Ih<Fh.children.length;Ih++)Ph.count++,this.count_r(Ph,Fh.children[Ih]);return Ph.count}}])}(Z$3.API),function(Ph){var Fh=[192,193,194,195,196,197,198,199];Ph.processJPEG=function(Ph,Ih,Lh,Rh,zh,Bh){var Vh,Hh=this.decode.DCT_DECODE,Uh=null;if(typeof Ph==`string`||this.__addimage__.isArrayBuffer(Ph)||this.__addimage__.isArrayBufferView(Ph)){switch(Ph=zh||Ph,Ph=this.__addimage__.isArrayBuffer(Ph)?new Uint8Array(Ph):Ph,Vh=function(Ph){for(var Ih,Lh=256*Ph.charCodeAt(4)+Ph.charCodeAt(5),Rh=Ph.length,zh={width:0,height:0,numcomponents:1},Bh=4;Bh<Rh;Bh+=2){if(Bh+=Lh,Fh.indexOf(Ph.charCodeAt(Bh+1))!==-1){Ih=256*Ph.charCodeAt(Bh+5)+Ph.charCodeAt(Bh+6),zh={width:256*Ph.charCodeAt(Bh+7)+Ph.charCodeAt(Bh+8),height:Ih,numcomponents:Ph.charCodeAt(Bh+9)};break}Lh=256*Ph.charCodeAt(Bh+2)+Ph.charCodeAt(Bh+3)}return zh}(Ph=this.__addimage__.isArrayBufferView(Ph)?this.__addimage__.arrayBufferToBinaryString(Ph):Ph),Vh.numcomponents){case 1:Bh=this.color_spaces.DEVICE_GRAY;break;case 4:Bh=this.color_spaces.DEVICE_CMYK;break;case 3:Bh=this.color_spaces.DEVICE_RGB}Uh={data:Ph,width:Vh.width,height:Vh.height,colorSpace:Bh,bitsPerComponent:8,filter:Hh,index:Ih,alias:Lh}}return Uh}}(Z$3.API),Z$3.API.processPNG=function(Ph,Fh,Ih,Lh){if(this.__addimage__.isArrayBuffer(Ph)&&(Ph=new Uint8Array(Ph)),this.__addimage__.isArrayBufferView(Ph)){var Rh,zh=mo$1(Ph,{checkCrc:!0}),Bh=zh.width,Vh=zh.height,Hh=zh.channels,Uh=zh.palette,Wh=zh.depth;Rh=Uh&&Hh===1?function(Ph){for(var Fh=Ph.width,Ih=Ph.height,Lh=Ph.data,Rh=Ph.palette,zh=Ph.depth,Bh=!1,Vh=[],Hh=[],Uh=void 0,Wh=!1,Gh=0,Kh=0;Kh<Rh.length;Kh++){var qh=xe$3(Rh[Kh],4),Jh=qh[0],Yh=qh[1],Xh=qh[2],Zh=qh[3];Vh.push(Jh,Yh,Xh),Zh!=null&&(Zh===0?(Gh++,Hh.length<1&&Hh.push(Kh)):Zh<255&&(Wh=!0))}if(Wh||Gh>1){Bh=!0,Hh=void 0;var Qh=Fh*Ih;Uh=new Uint8Array(Qh);for(var $h=new DataView(Lh.buffer),eg=0;eg<Qh;eg++){var tg=xe$3(Rh[sc$1($h,eg,zh)],4)[3];Uh[eg]=tg}}else Gh===0&&(Hh=void 0);return{colorSpace:`Indexed`,colorsPerPixel:1,sMaskBitsPerComponent:Bh?8:void 0,colorBytes:Lh,alphaBytes:Uh,needSMask:Bh,palette:Vh,mask:Hh}}(zh):Hh===2||Hh===4?function(Ph){for(var Fh=Ph.data,Ih=Ph.width,Lh=Ph.height,Rh=Ph.channels,zh=Ph.depth,Bh=Rh===2?`DeviceGray`:`DeviceRGB`,Vh=Rh-1,Hh=Ih*Lh,Uh=Vh,Wh=Hh*Uh,Gh=1*Hh,Kh=Math.ceil(Wh*zh/8),qh=Math.ceil(Gh*zh/8),Jh=new Uint8Array(Kh),Yh=new Uint8Array(qh),Xh=new DataView(Fh.buffer),Zh=new DataView(Jh.buffer),Qh=new DataView(Yh.buffer),$h=!1,eg=0;eg<Hh;eg++){for(var tg=eg*Rh,ng=0;ng<Uh;ng++)cc$1(Zh,sc$1(Xh,tg+ng,zh),eg*Uh+ng,zh);var rg=sc$1(Xh,tg+Uh,zh);rg<(1<<zh)-1&&($h=!0),cc$1(Qh,rg,1*eg,zh)}return{colorSpace:Bh,colorsPerPixel:Vh,sMaskBitsPerComponent:$h?zh:void 0,colorBytes:Jh,alphaBytes:Yh,needSMask:$h}}(zh):function(Ph){var Fh=Ph.data,Ih=Ph.channels===1?`DeviceGray`:`DeviceRGB`;return{colorSpace:Ih,colorsPerPixel:Ih===`DeviceGray`?1:3,colorBytes:Fh instanceof Uint16Array?function(Ph){for(var Fh=Ph.length,Ih=new Uint8Array(2*Fh),Lh=new DataView(Ih.buffer,Ih.byteOffset,Ih.byteLength),Rh=0;Rh<Fh;Rh++)Lh.setUint16(2*Rh,Ph[Rh],!1);return Ih}(Fh):Fh,needSMask:!1}}(zh);var Gh,Kh,qh,Jh=Rh,Yh=Jh.colorSpace,Xh=Jh.colorsPerPixel,Zh=Jh.sMaskBitsPerComponent,Qh=Jh.colorBytes,$h=Jh.alphaBytes,eg=Jh.needSMask,tg=Jh.palette,ng=Jh.mask,rg=null;return Lh!==Z$3.API.image_compression.NONE&&typeof me$3==`function`?(rg=function(Ph){var Fh;switch(Ph){case Z$3.API.image_compression.FAST:Fh=11;break;case Z$3.API.image_compression.MEDIUM:Fh=13;break;case Z$3.API.image_compression.SLOW:Fh=14;break;default:Fh=12}return Fh}(Lh),Gh=this.decode.FLATE_DECODE,Kh=`/Predictor ${rg} /Colors ${Xh} /BitsPerComponent ${Wh} /Columns ${Bh}`,Ph=$s$1(Qh,Math.ceil(Bh*Xh*Wh/8),Xh,Wh,Lh),eg&&(qh=$s$1($h,Math.ceil(Bh*Zh/8),1,Zh,Lh))):(Gh=void 0,Kh=void 0,Ph=Qh,eg&&(qh=$h)),(this.__addimage__.isArrayBuffer(Ph)||this.__addimage__.isArrayBufferView(Ph))&&(Ph=this.__addimage__.arrayBufferToBinaryString(Ph)),(qh&&this.__addimage__.isArrayBuffer(qh)||this.__addimage__.isArrayBufferView(qh))&&(qh=this.__addimage__.arrayBufferToBinaryString(qh)),{alias:Ih,data:Ph,index:Fh,filter:Gh,decodeParameters:Kh,transparency:ng,palette:tg,sMask:qh,predictor:rg,width:Bh,height:Vh,bitsPerComponent:Wh,sMaskBitsPerComponent:Zh,colorSpace:Yh}}},function(Ph){Ph.processGIF89A=function(Fh,Ih,Lh,Rh){var zh=new uc$1(Fh),Bh=zh.width,Vh=zh.height,Hh=[];zh.decodeAndBlitFrameRGBA(0,Hh);var Uh={data:Hh,width:Bh,height:Vh},Wh=new fc$1(100).encode(Uh,100);return Ph.processJPEG.call(this,Wh,Ih,Lh,Rh)},Ph.processGIF87A=Ph.processGIF89A}(Z$3.API),pc$1.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var Ph=this.colors===0?1<<this.bitPP:this.colors;this.palette=Array(Ph);for(var Fh=0;Fh<Ph;Fh++){var Ih=this.datav.getUint8(this.pos++,!0),Lh=this.datav.getUint8(this.pos++,!0),Rh=this.datav.getUint8(this.pos++,!0),zh=this.datav.getUint8(this.pos++,!0);this.palette[Fh]={red:Rh,green:Lh,blue:Ih,quad:zh}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},pc$1.prototype.parseBGR=function(){this.pos=this.offset;var Ph=`bit`+this.bitPP,Fh=this.width*this.height*4;if(Fh>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);this.data=new Uint8Array(Fh);try{this[Ph]()}catch(Ph){go$1.log(`bit decode error:`+Ph)}},pc$1.prototype.bit1=function(){var Ph,Fh=Math.ceil(this.width/8),Ih=Fh%4;for(Ph=this.height-1;Ph>=0;Ph--){for(var Lh=this.bottom_up?Ph:this.height-1-Ph,Rh=0;Rh<Fh;Rh++)for(var zh=this.datav.getUint8(this.pos++,!0),Bh=Lh*this.width*4+8*Rh*4,Vh=0;Vh<8&&8*Rh+Vh<this.width;Vh++){var Hh=this.palette[zh>>7-Vh&1];this.data[Bh+4*Vh]=Hh.blue,this.data[Bh+4*Vh+1]=Hh.green,this.data[Bh+4*Vh+2]=Hh.red,this.data[Bh+4*Vh+3]=255}Ih!==0&&(this.pos+=4-Ih)}},pc$1.prototype.bit4=function(){for(var Ph=Math.ceil(this.width/2),Fh=Ph%4,Ih=this.height-1;Ih>=0;Ih--){for(var Lh=this.bottom_up?Ih:this.height-1-Ih,Rh=0;Rh<Ph;Rh++){var zh=this.datav.getUint8(this.pos++,!0),Bh=Lh*this.width*4+2*Rh*4,Vh=zh>>4,Hh=15&zh,Uh=this.palette[Vh];if(this.data[Bh]=Uh.blue,this.data[Bh+1]=Uh.green,this.data[Bh+2]=Uh.red,this.data[Bh+3]=255,2*Rh+1>=this.width)break;Uh=this.palette[Hh],this.data[Bh+4]=Uh.blue,this.data[Bh+4+1]=Uh.green,this.data[Bh+4+2]=Uh.red,this.data[Bh+4+3]=255}Fh!==0&&(this.pos+=4-Fh)}},pc$1.prototype.bit8=function(){for(var Ph=this.width%4,Fh=this.height-1;Fh>=0;Fh--){for(var Ih=this.bottom_up?Fh:this.height-1-Fh,Lh=0;Lh<this.width;Lh++){var Rh=this.datav.getUint8(this.pos++,!0),zh=Ih*this.width*4+4*Lh;if(Rh<this.palette.length){var Bh=this.palette[Rh];this.data[zh]=Bh.red,this.data[zh+1]=Bh.green,this.data[zh+2]=Bh.blue,this.data[zh+3]=255}else this.data[zh]=255,this.data[zh+1]=255,this.data[zh+2]=255,this.data[zh+3]=255}Ph!==0&&(this.pos+=4-Ph)}},pc$1.prototype.bit15=function(){for(var Ph=this.width%3,Fh=31,Ih=this.height-1;Ih>=0;Ih--){for(var Lh=this.bottom_up?Ih:this.height-1-Ih,Rh=0;Rh<this.width;Rh++){var zh=this.datav.getUint16(this.pos,!0);this.pos+=2;var Bh=(zh&Fh)/Fh*255|0,Vh=(zh>>5&Fh)/Fh*255|0,Hh=(zh>>10&Fh)/Fh*255|0,Uh=zh>>15?255:0,Wh=Lh*this.width*4+4*Rh;this.data[Wh]=Hh,this.data[Wh+1]=Vh,this.data[Wh+2]=Bh,this.data[Wh+3]=Uh}this.pos+=Ph}},pc$1.prototype.bit16=function(){for(var Ph=this.width%3,Fh=31,Ih=63,Lh=this.height-1;Lh>=0;Lh--){for(var Rh=this.bottom_up?Lh:this.height-1-Lh,zh=0;zh<this.width;zh++){var Bh=this.datav.getUint16(this.pos,!0);this.pos+=2;var Vh=(Bh&Fh)/Fh*255|0,Hh=(Bh>>5&Ih)/Ih*255|0,Uh=(Bh>>11)/Fh*255|0,Wh=Rh*this.width*4+4*zh;this.data[Wh]=Uh,this.data[Wh+1]=Hh,this.data[Wh+2]=Vh,this.data[Wh+3]=255}this.pos+=Ph}},pc$1.prototype.bit24=function(){for(var Ph=this.height-1;Ph>=0;Ph--){for(var Fh=this.bottom_up?Ph:this.height-1-Ph,Ih=0;Ih<this.width;Ih++){var Lh=this.datav.getUint8(this.pos++,!0),Rh=this.datav.getUint8(this.pos++,!0),zh=this.datav.getUint8(this.pos++,!0),Bh=Fh*this.width*4+4*Ih;this.data[Bh]=zh,this.data[Bh+1]=Rh,this.data[Bh+2]=Lh,this.data[Bh+3]=255}this.pos+=this.width%4}},pc$1.prototype.bit32=function(){for(var Ph=this.height-1;Ph>=0;Ph--)for(var Fh=this.bottom_up?Ph:this.height-1-Ph,Ih=0;Ih<this.width;Ih++){var Lh=this.datav.getUint8(this.pos++,!0),Rh=this.datav.getUint8(this.pos++,!0),zh=this.datav.getUint8(this.pos++,!0),Bh=this.datav.getUint8(this.pos++,!0),Vh=Fh*this.width*4+4*Ih;this.data[Vh]=zh,this.data[Vh+1]=Rh,this.data[Vh+2]=Lh,this.data[Vh+3]=Bh}},pc$1.prototype.getData=function(){return this.data},function(Ph){Ph.processBMP=function(Fh,Ih,Lh,Rh){var zh=new pc$1(Fh,!1),Bh=zh.width,Vh=zh.height,Hh={data:zh.getData(),width:Bh,height:Vh},Uh=new fc$1(100).encode(Hh,100);return Ph.processJPEG.call(this,Uh,Ih,Lh,Rh)}}(Z$3.API),mc$1.prototype.getData=function(){return this.data},function(Ph){Ph.processWEBP=function(Fh,Ih,Lh,Rh){var zh=new mc$1(Fh),Bh=zh.width,Vh=zh.height,Hh={data:zh.getData(),width:Bh,height:Vh},Uh=new fc$1(100).encode(Hh,100);return Ph.processJPEG.call(this,Uh,Ih,Lh,Rh)}}(Z$3.API),Z$3.API.processRGBA=function(Ph,Fh,Ih){for(var Lh=Ph.data,Rh=Lh.length,zh=new Uint8Array(Rh/4*3),Bh=new Uint8Array(Rh/4),Vh=0,Hh=0,Uh=0;Uh<Rh;Uh+=4){var Wh=Lh[Uh],Gh=Lh[Uh+1],Kh=Lh[Uh+2],qh=Lh[Uh+3];zh[Vh++]=Wh,zh[Vh++]=Gh,zh[Vh++]=Kh,Bh[Hh++]=qh}var Jh=this.__addimage__.arrayBufferToBinaryString(zh);return{alpha:this.__addimage__.arrayBufferToBinaryString(Bh),data:Jh,index:Fh,alias:Ih,colorSpace:`DeviceRGB`,bitsPerComponent:8,width:Ph.width,height:Ph.height}},Z$3.API.setLanguage=function(Ph){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:`Afrikaans`,sq:`Albanian`,ar:`Arabic (Standard)`,"ar-DZ":`Arabic (Algeria)`,"ar-BH":`Arabic (Bahrain)`,"ar-EG":`Arabic (Egypt)`,"ar-IQ":`Arabic (Iraq)`,"ar-JO":`Arabic (Jordan)`,"ar-KW":`Arabic (Kuwait)`,"ar-LB":`Arabic (Lebanon)`,"ar-LY":`Arabic (Libya)`,"ar-MA":`Arabic (Morocco)`,"ar-OM":`Arabic (Oman)`,"ar-QA":`Arabic (Qatar)`,"ar-SA":`Arabic (Saudi Arabia)`,"ar-SY":`Arabic (Syria)`,"ar-TN":`Arabic (Tunisia)`,"ar-AE":`Arabic (U.A.E.)`,"ar-YE":`Arabic (Yemen)`,an:`Aragonese`,hy:`Armenian`,as:`Assamese`,ast:`Asturian`,az:`Azerbaijani`,eu:`Basque`,be:`Belarusian`,bn:`Bengali`,bs:`Bosnian`,br:`Breton`,bg:`Bulgarian`,my:`Burmese`,ca:`Catalan`,ch:`Chamorro`,ce:`Chechen`,zh:`Chinese`,"zh-HK":`Chinese (Hong Kong)`,"zh-CN":`Chinese (PRC)`,"zh-SG":`Chinese (Singapore)`,"zh-TW":`Chinese (Taiwan)`,cv:`Chuvash`,co:`Corsican`,cr:`Cree`,hr:`Croatian`,cs:`Czech`,da:`Danish`,nl:`Dutch (Standard)`,"nl-BE":`Dutch (Belgian)`,en:`English`,"en-AU":`English (Australia)`,"en-BZ":`English (Belize)`,"en-CA":`English (Canada)`,"en-IE":`English (Ireland)`,"en-JM":`English (Jamaica)`,"en-NZ":`English (New Zealand)`,"en-PH":`English (Philippines)`,"en-ZA":`English (South Africa)`,"en-TT":`English (Trinidad & Tobago)`,"en-GB":`English (United Kingdom)`,"en-US":`English (United States)`,"en-ZW":`English (Zimbabwe)`,eo:`Esperanto`,et:`Estonian`,fo:`Faeroese`,fj:`Fijian`,fi:`Finnish`,fr:`French (Standard)`,"fr-BE":`French (Belgium)`,"fr-CA":`French (Canada)`,"fr-FR":`French (France)`,"fr-LU":`French (Luxembourg)`,"fr-MC":`French (Monaco)`,"fr-CH":`French (Switzerland)`,fy:`Frisian`,fur:`Friulian`,gd:`Gaelic (Scots)`,"gd-IE":`Gaelic (Irish)`,gl:`Galacian`,ka:`Georgian`,de:`German (Standard)`,"de-AT":`German (Austria)`,"de-DE":`German (Germany)`,"de-LI":`German (Liechtenstein)`,"de-LU":`German (Luxembourg)`,"de-CH":`German (Switzerland)`,el:`Greek`,gu:`Gujurati`,ht:`Haitian`,he:`Hebrew`,hi:`Hindi`,hu:`Hungarian`,is:`Icelandic`,id:`Indonesian`,iu:`Inuktitut`,ga:`Irish`,it:`Italian (Standard)`,"it-CH":`Italian (Switzerland)`,ja:`Japanese`,kn:`Kannada`,ks:`Kashmiri`,kk:`Kazakh`,km:`Khmer`,ky:`Kirghiz`,tlh:`Klingon`,ko:`Korean`,"ko-KP":`Korean (North Korea)`,"ko-KR":`Korean (South Korea)`,la:`Latin`,lv:`Latvian`,lt:`Lithuanian`,lb:`Luxembourgish`,mk:`North Macedonia`,ms:`Malay`,ml:`Malayalam`,mt:`Maltese`,mi:`Maori`,mr:`Marathi`,mo:`Moldavian`,nv:`Navajo`,ng:`Ndonga`,ne:`Nepali`,no:`Norwegian`,nb:`Norwegian (Bokmal)`,nn:`Norwegian (Nynorsk)`,oc:`Occitan`,or:`Oriya`,om:`Oromo`,fa:`Persian`,"fa-IR":`Persian/Iran`,pl:`Polish`,pt:`Portuguese`,"pt-BR":`Portuguese (Brazil)`,pa:`Punjabi`,"pa-IN":`Punjabi (India)`,"pa-PK":`Punjabi (Pakistan)`,qu:`Quechua`,rm:`Rhaeto-Romanic`,ro:`Romanian`,"ro-MO":`Romanian (Moldavia)`,ru:`Russian`,"ru-MO":`Russian (Moldavia)`,sz:`Sami (Lappish)`,sg:`Sango`,sa:`Sanskrit`,sc:`Sardinian`,sd:`Sindhi`,si:`Singhalese`,sr:`Serbian`,sk:`Slovak`,sl:`Slovenian`,so:`Somani`,sb:`Sorbian`,es:`Spanish`,"es-AR":`Spanish (Argentina)`,"es-BO":`Spanish (Bolivia)`,"es-CL":`Spanish (Chile)`,"es-CO":`Spanish (Colombia)`,"es-CR":`Spanish (Costa Rica)`,"es-DO":`Spanish (Dominican Republic)`,"es-EC":`Spanish (Ecuador)`,"es-SV":`Spanish (El Salvador)`,"es-GT":`Spanish (Guatemala)`,"es-HN":`Spanish (Honduras)`,"es-MX":`Spanish (Mexico)`,"es-NI":`Spanish (Nicaragua)`,"es-PA":`Spanish (Panama)`,"es-PY":`Spanish (Paraguay)`,"es-PE":`Spanish (Peru)`,"es-PR":`Spanish (Puerto Rico)`,"es-ES":`Spanish (Spain)`,"es-UY":`Spanish (Uruguay)`,"es-VE":`Spanish (Venezuela)`,sx:`Sutu`,sw:`Swahili`,sv:`Swedish`,"sv-FI":`Swedish (Finland)`,"sv-SV":`Swedish (Sweden)`,ta:`Tamil`,tt:`Tatar`,te:`Teluga`,th:`Thai`,tig:`Tigre`,ts:`Tsonga`,tn:`Tswana`,tr:`Turkish`,tk:`Turkmen`,uk:`Ukrainian`,hsb:`Upper Sorbian`,ur:`Urdu`,ve:`Venda`,vi:`Vietnamese`,vo:`Volapuk`,wa:`Walloon`,cy:`Welsh`,xh:`Xhosa`,ji:`Yiddish`,zu:`Zulu`}[Ph]!==void 0&&(this.internal.languageSettings.languageCode=Ph,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){this.internal.write(`/Lang (`+this.internal.languageSettings.languageCode+`)`)}),this.internal.languageSettings.isSubscribed=!0)),this},qs$1=Z$3.API,Js$1=qs$1.getCharWidthsArray=function(Ph,Fh){var Ih,Lh,Rh=(Fh||={}).font||this.internal.getFont(),zh=Fh.fontSize||this.internal.getFontSize(),Bh=Fh.charSpace||this.internal.getCharSpace(),Vh=Fh.widths?Fh.widths:Rh.metadata.Unicode.widths,Hh=Vh.fof?Vh.fof:1,Uh=Fh.kerning?Fh.kerning:Rh.metadata.Unicode.kerning,Wh=Uh.fof?Uh.fof:1,Gh=!1!==Fh.doKerning,Kh=0,qh=Ph.length,Jh=0,Yh=Vh[0]||Hh,Xh=[];for(Ih=0;Ih<qh;Ih++)Lh=Ph.charCodeAt(Ih),typeof Rh.metadata.widthOfString==`function`?Xh.push((Rh.metadata.widthOfGlyph(Rh.metadata.characterToGlyph(Lh))+1e3/zh*Bh||0)/1e3):(Kh=Gh&&e$4(Uh[Lh])===`object`&&!isNaN(parseInt(Uh[Lh][Jh],10))?Uh[Lh][Jh]/Wh:0,Xh.push((Vh[Lh]||Yh)/Hh+Kh)),Jh=Lh;return Xh},Ys$1=qs$1.getStringUnitWidth=function(Ph,Fh){var Ih=(Fh||={}).fontSize||this.internal.getFontSize(),Lh=Fh.font||this.internal.getFont(),Rh=Fh.charSpace||this.internal.getCharSpace();return qs$1.processArabic&&(Ph=qs$1.processArabic(Ph)),typeof Lh.metadata.widthOfString==`function`?Lh.metadata.widthOfString(Ph,Ih,Rh)/Ih:Js$1.apply(this,arguments).reduce(function(Ph,Fh){return Ph+Fh},0)},Xs$1=function(Ph,Fh,Ih,Lh){for(var Rh=[],zh=0,Bh=Ph.length,Vh=0;zh!==Bh&&Vh+Fh[zh]<Ih;)Vh+=Fh[zh],zh++;Rh.push(Ph.slice(0,zh));var Hh=zh;for(Vh=0;zh!==Bh;)Vh+Fh[zh]>Lh&&(Rh.push(Ph.slice(Hh,zh)),Vh=0,Hh=zh),Vh+=Fh[zh],zh++;return Hh!==zh&&Rh.push(Ph.slice(Hh,zh)),Rh},Zs$1=function(Ph,Fh,Ih){Ih||={};var Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh=[],Gh=[Wh],Kh=Ih.textIndent||0,qh=0,Jh=0,Yh=Ph.split(` `),Xh=Js$1.apply(this,[` `,Ih])[0];if(Hh=Ih.lineIndent===-1?Yh[0].length+2:Ih.lineIndent||0){var Zh=Array(Hh).join(` `),Qh=[];Yh.map(function(Ph){(Ph=Ph.split(/\s*\n/)).length>1?Qh=Qh.concat(Ph.map(function(Ph,Fh){return(Fh&&Ph.length?`
294
294
  `:``)+Ph})):Qh.push(Ph[0])}),Yh=Qh,Hh=Ys$1.apply(this,[Zh,Ih])}for(zh=0,Bh=Yh.length;zh<Bh;zh++){var $h=0;if(Lh=Yh[zh],Hh&&Lh[0]==`
295
- `&&(Lh=Lh.substr(1),$h=1),Kh+qh+(Jh=(Rh=Js$1.apply(this,[Lh,Ih])).reduce(function(Ph,Fh){return Ph+Fh},0))>Fh||$h){if(Jh>Fh){for(Vh=Xs$1.apply(this,[Lh,Rh,Fh-(Kh+qh),Fh]),Wh.push(Vh.shift()),Wh=[Vh.pop()];Vh.length;)Gh.push([Vh.shift()]);Jh=Rh.slice(Lh.length-(Wh[0]?Wh[0].length:0)).reduce(function(Ph,Fh){return Ph+Fh},0)}else Wh=[Lh];Gh.push(Wh),Kh=Jh+Hh,qh=Xh}else Wh.push(Lh),Kh+=qh+Jh,qh=Xh}return Uh=Hh?function(Ph,Fh){return(Fh?Zh:``)+Ph.join(` `)}:function(Ph){return Ph.join(` `)},Gh.map(Uh)},qs$1.splitTextToSize=function(Ph,Fh,Ih){var Lh,Rh=(Ih||={}).fontSize||this.internal.getFontSize(),zh=function(Ph){if(Ph.widths&&Ph.kerning)return{widths:Ph.widths,kerning:Ph.kerning};var Fh=this.internal.getFont(Ph.fontName,Ph.fontStyle),Ih=`Unicode`;return Fh.metadata[Ih]?{widths:Fh.metadata[Ih].widths||{0:1},kerning:Fh.metadata[Ih].kerning||{}}:{font:Fh.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,Ih);Lh=Array.isArray(Ph)?Ph:String(Ph).split(/\r?\n/);var Bh=1*this.internal.scaleFactor*Fh/Rh;zh.textIndent=Ih.textIndent?1*Ih.textIndent*this.internal.scaleFactor/Rh:0,zh.lineIndent=Ih.lineIndent;var Vh,Hh,Uh=[];for(Vh=0,Hh=Lh.length;Vh<Hh;Vh++)Uh=Uh.concat(Zs$1.apply(this,[Lh[Vh],Bh,zh]));return Uh},function(Ph){Ph.__fontmetrics__=Ph.__fontmetrics__||{};for(var Fh=`0123456789abcdef`,Ih=`klmnopqrstuvwxyz`,Lh={},Rh={},zh=0;zh<16;zh++)Lh[Ih[zh]]=Fh[zh],Rh[Fh[zh]]=Ih[zh];var Bh=function(Ph){return`0x`+parseInt(Ph,10).toString(16)},Vh=Ph.__fontmetrics__.compress=function(Ph){var Fh,Ih,Lh,zh,Hh=[`{`];for(var Uh in Ph){if(Fh=Ph[Uh],isNaN(parseInt(Uh,10))?Ih=`'`+Uh+`'`:(Uh=parseInt(Uh,10),Ih=(Ih=Bh(Uh).slice(2)).slice(0,-1)+Rh[Ih.slice(-1)]),typeof Fh==`number`)Fh<0?(Lh=Bh(Fh).slice(3),zh=`-`):(Lh=Bh(Fh).slice(2),zh=``),Lh=zh+Lh.slice(0,-1)+Rh[Lh.slice(-1)];else{if(e$4(Fh)!==`object`)throw Error(`Don't know what to do with value type `+e$4(Fh)+`.`);Lh=Vh(Fh)}Hh.push(Ih+Lh)}return Hh.push(`}`),Hh.join(``)},Hh=Ph.__fontmetrics__.uncompress=function(Ph){if(typeof Ph!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var Fh,Ih,Rh,zh,Bh={},Vh=1,Hh=Bh,Uh=[],Wh=``,Gh=``,Kh=Ph.length-1,qh=1;qh<Kh;qh+=1)(zh=Ph[qh])==`'`?Fh?(Rh=Fh.join(``),Fh=void 0):Fh=[]:Fh?Fh.push(zh):zh==`{`?(Uh.push([Hh,Rh]),Hh={},Rh=void 0):zh==`}`?((Ih=Uh.pop())[0][Ih[1]]=Hh,Rh=void 0,Hh=Ih[0]):zh==`-`?Vh=-1:Rh===void 0?Lh.hasOwnProperty(zh)?(Wh+=Lh[zh],Rh=parseInt(Wh,16)*Vh,Vh=1,Wh=``):Wh+=zh:Lh.hasOwnProperty(zh)?(Gh+=Lh[zh],Hh[Rh]=parseInt(Gh,16)*Vh,Vh=1,Rh=void 0,Gh=``):Gh+=zh;return Bh},Uh={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:Hh(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},Wh={Unicode:{Courier:Uh,"Courier-Bold":Uh,"Courier-BoldOblique":Uh,"Courier-Oblique":Uh,Helvetica:Uh,"Helvetica-Bold":Uh,"Helvetica-BoldOblique":Uh,"Helvetica-Oblique":Uh,"Times-Roman":Uh,"Times-Bold":Uh,"Times-BoldItalic":Uh,"Times-Italic":Uh}},Gh={Unicode:{"Courier-Oblique":Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":Hh(`{'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":Hh(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),Courier:Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-BoldOblique":Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Bold":Hh(`{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}`),Symbol:Hh(`{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}`),Helvetica:Hh(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1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5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`),"Helvetica-BoldOblique":Hh(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),ZapfDingbats:Hh(`{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-Bold":Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Italic":Hh(`{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}`),"Times-Roman":Hh(`{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}`),"Helvetica-Oblique":Hh(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`)}};Ph.events.push([`addFont`,function(Ph){var Fh=Ph.font,Ih=Gh.Unicode[Fh.postScriptName];Ih&&(Fh.metadata.Unicode={},Fh.metadata.Unicode.widths=Ih.widths,Fh.metadata.Unicode.kerning=Ih.kerning);var Lh=Wh.Unicode[Fh.postScriptName];Lh&&(Fh.metadata.Unicode.encoding=Lh,Fh.encoding=Lh.codePages[0])}])}(Z$3.API),function(Ph){var Fh=function(Ph){for(var Fh=Ph.length,Ih=new Uint8Array(Fh),Lh=0;Lh<Fh;Lh++)Ih[Lh]=Ph.charCodeAt(Lh);return Ih};Ph.API.events.push([`addFont`,function(Ih){var Lh=void 0,Rh=Ih.font,zh=Ih.instance;if(!Rh.isStandardFont){if(zh===void 0)throw Error(`Font does not exist in vFS, import fonts or remove declaration doc.addFont('`+Rh.postScriptName+`').`);if(typeof(Lh=!1===zh.existsFileInVFS(Rh.postScriptName)?zh.loadFile(Rh.postScriptName):zh.getFileFromVFS(Rh.postScriptName))!=`string`)throw Error(`Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('`+Rh.postScriptName+`').`);(function(Ih,Lh){Lh=/^\x00\x01\x00\x00/.test(Lh)?Fh(Lh):Fh(So$1(Lh)),Ih.metadata=Ph.API.TTFFont.open(Lh),Ih.metadata.Unicode=Ih.metadata.Unicode||{encoding:{},kerning:{},widths:[]},Ih.metadata.glyIdsUsed=[0]})(Rh,Lh)}}])}(Z$3),Z$3.API.addSvgAsImage=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){if(isNaN(Fh)||isNaN(Ih))throw go$1.error(`jsPDF.addSvgAsImage: Invalid coordinates`,arguments),Error(`Invalid coordinates passed to jsPDF.addSvgAsImage`);if(isNaN(Lh)||isNaN(Rh))throw go$1.error(`jsPDF.addSvgAsImage: Invalid measurements`,arguments),Error(`Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage`);var Hh=document.createElement(`canvas`);Hh.width=Lh,Hh.height=Rh;var Uh=Hh.getContext(`2d`);Uh.fillStyle=`#fff`,Uh.fillRect(0,0,Hh.width,Hh.height);var Wh={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},Gh=this;return(X$3.canvg?Promise.resolve(X$3.canvg):__vitePreload(()=>import(`./index.es-D4YyL_Dg-5ipqh8Pe.js`),[])).catch(function(Ph){return Promise.reject(Error(`Could not load canvg: `+Ph))}).then(function(Ph){return Ph.default?Ph.default:Ph}).then(function(Fh){return Fh.fromString(Uh,Ph,Wh)},function(){return Promise.reject(Error(`Could not load canvg.`))}).then(function(Ph){return Ph.render(Wh)}).then(function(){Gh.addImage(Hh.toDataURL(`image/jpeg`,1),Fh,Ih,Lh,Rh,Bh,Vh)})},Z$3.API.putTotalPages=function(Ph){var Fh,Ih=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(Fh=new RegExp(Ph,`g`),Ih=this.internal.getNumberOfPages()):(Fh=new RegExp(this.pdfEscape16(Ph,this.internal.getFont()),`g`),Ih=this.pdfEscape16(this.internal.getNumberOfPages()+``,this.internal.getFont()));for(var Lh=1;Lh<=this.internal.getNumberOfPages();Lh++)for(var Rh=0;Rh<this.internal.pages[Lh].length;Rh++)this.internal.pages[Lh][Rh]=this.internal.pages[Lh][Rh].replace(Fh,Ih);return this},Z$3.API.viewerPreferences=function(Ph,Fh){var Ih;Ph||={},Fh||=!1;var Lh,Rh,zh,Bh={HideToolbar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:`UseNone`,value:`UseNone`,type:`name`,explicitSet:!1,valueSet:[`UseNone`,`UseOutlines`,`UseThumbs`,`UseOC`],pdfVersion:1.3},Direction:{defaultValue:`L2R`,value:`L2R`,type:`name`,explicitSet:!1,valueSet:[`L2R`,`R2L`],pdfVersion:1.3},ViewArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},ViewClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintScaling:{defaultValue:`AppDefault`,value:`AppDefault`,type:`name`,explicitSet:!1,valueSet:[`AppDefault`,`None`],pdfVersion:1.6},Duplex:{defaultValue:``,value:`none`,type:`name`,explicitSet:!1,valueSet:[`Simplex`,`DuplexFlipShortEdge`,`DuplexFlipLongEdge`,`none`],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:``,value:``,type:`array`,explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:`integer`,explicitSet:!1,valueSet:null,pdfVersion:1.7}},Vh=Object.keys(Bh),Hh=[],Uh=0,Wh=0,Gh=0;function Kh(Ph,Fh){var Ih,Lh=!1;for(Ih=0;Ih<Ph.length;Ih+=1)Ph[Ih]===Fh&&(Lh=!0);return Lh}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(Bh)),this.internal.viewerpreferences.isSubscribed=!1),Ih=this.internal.viewerpreferences.configuration,Ph===`reset`||!0===Fh){var qh=Vh.length;for(Gh=0;Gh<qh;Gh+=1)Ih[Vh[Gh]].value=Ih[Vh[Gh]].defaultValue,Ih[Vh[Gh]].explicitSet=!1}if(e$4(Ph)===`object`){for(Rh in Ph)if(zh=Ph[Rh],Kh(Vh,Rh)&&zh!==void 0){if(Ih[Rh].type===`boolean`&&typeof zh==`boolean`)Ih[Rh].value=zh;else if(Ih[Rh].type===`name`&&Kh(Ih[Rh].valueSet,zh))Ih[Rh].value=zh;else if(Ih[Rh].type===`integer`&&Number.isInteger(zh))Ih[Rh].value=zh;else if(Ih[Rh].type===`array`){for(Uh=0;Uh<zh.length;Uh+=1)if(Lh=!0,zh[Uh].length===1&&typeof zh[Uh][0]==`number`)Hh.push(String(zh[Uh]-1));else if(zh[Uh].length>1){for(Wh=0;Wh<zh[Uh].length;Wh+=1)typeof zh[Uh][Wh]!=`number`&&(Lh=!1);!0===Lh&&Hh.push([zh[Uh][0]-1,zh[Uh][1]-1].join(` `))}Ih[Rh].value=`[`+Hh.join(` `)+`]`}else Ih[Rh].value=Ih[Rh].defaultValue;Ih[Rh].explicitSet=!0}}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){var Ph,Fh=[];for(Ph in Ih)!0===Ih[Ph].explicitSet&&(Ih[Ph].type===`name`?Fh.push(`/`+Ph+` /`+Ih[Ph].value):Fh.push(`/`+Ph+` `+Ih[Ph].value));Fh.length!==0&&this.internal.write(`/ViewerPreferences
295
+ `&&(Lh=Lh.substr(1),$h=1),Kh+qh+(Jh=(Rh=Js$1.apply(this,[Lh,Ih])).reduce(function(Ph,Fh){return Ph+Fh},0))>Fh||$h){if(Jh>Fh){for(Vh=Xs$1.apply(this,[Lh,Rh,Fh-(Kh+qh),Fh]),Wh.push(Vh.shift()),Wh=[Vh.pop()];Vh.length;)Gh.push([Vh.shift()]);Jh=Rh.slice(Lh.length-(Wh[0]?Wh[0].length:0)).reduce(function(Ph,Fh){return Ph+Fh},0)}else Wh=[Lh];Gh.push(Wh),Kh=Jh+Hh,qh=Xh}else Wh.push(Lh),Kh+=qh+Jh,qh=Xh}return Uh=Hh?function(Ph,Fh){return(Fh?Zh:``)+Ph.join(` `)}:function(Ph){return Ph.join(` `)},Gh.map(Uh)},qs$1.splitTextToSize=function(Ph,Fh,Ih){var Lh,Rh=(Ih||={}).fontSize||this.internal.getFontSize(),zh=function(Ph){if(Ph.widths&&Ph.kerning)return{widths:Ph.widths,kerning:Ph.kerning};var Fh=this.internal.getFont(Ph.fontName,Ph.fontStyle),Ih=`Unicode`;return Fh.metadata[Ih]?{widths:Fh.metadata[Ih].widths||{0:1},kerning:Fh.metadata[Ih].kerning||{}}:{font:Fh.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,Ih);Lh=Array.isArray(Ph)?Ph:String(Ph).split(/\r?\n/);var Bh=1*this.internal.scaleFactor*Fh/Rh;zh.textIndent=Ih.textIndent?1*Ih.textIndent*this.internal.scaleFactor/Rh:0,zh.lineIndent=Ih.lineIndent;var Vh,Hh,Uh=[];for(Vh=0,Hh=Lh.length;Vh<Hh;Vh++)Uh=Uh.concat(Zs$1.apply(this,[Lh[Vh],Bh,zh]));return Uh},function(Ph){Ph.__fontmetrics__=Ph.__fontmetrics__||{};for(var Fh=`0123456789abcdef`,Ih=`klmnopqrstuvwxyz`,Lh={},Rh={},zh=0;zh<16;zh++)Lh[Ih[zh]]=Fh[zh],Rh[Fh[zh]]=Ih[zh];var Bh=function(Ph){return`0x`+parseInt(Ph,10).toString(16)},Vh=Ph.__fontmetrics__.compress=function(Ph){var Fh,Ih,Lh,zh,Hh=[`{`];for(var Uh in Ph){if(Fh=Ph[Uh],isNaN(parseInt(Uh,10))?Ih=`'`+Uh+`'`:(Uh=parseInt(Uh,10),Ih=(Ih=Bh(Uh).slice(2)).slice(0,-1)+Rh[Ih.slice(-1)]),typeof Fh==`number`)Fh<0?(Lh=Bh(Fh).slice(3),zh=`-`):(Lh=Bh(Fh).slice(2),zh=``),Lh=zh+Lh.slice(0,-1)+Rh[Lh.slice(-1)];else{if(e$4(Fh)!==`object`)throw Error(`Don't know what to do with value type `+e$4(Fh)+`.`);Lh=Vh(Fh)}Hh.push(Ih+Lh)}return Hh.push(`}`),Hh.join(``)},Hh=Ph.__fontmetrics__.uncompress=function(Ph){if(typeof Ph!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var Fh,Ih,Rh,zh,Bh={},Vh=1,Hh=Bh,Uh=[],Wh=``,Gh=``,Kh=Ph.length-1,qh=1;qh<Kh;qh+=1)(zh=Ph[qh])==`'`?Fh?(Rh=Fh.join(``),Fh=void 0):Fh=[]:Fh?Fh.push(zh):zh==`{`?(Uh.push([Hh,Rh]),Hh={},Rh=void 0):zh==`}`?((Ih=Uh.pop())[0][Ih[1]]=Hh,Rh=void 0,Hh=Ih[0]):zh==`-`?Vh=-1:Rh===void 0?Lh.hasOwnProperty(zh)?(Wh+=Lh[zh],Rh=parseInt(Wh,16)*Vh,Vh=1,Wh=``):Wh+=zh:Lh.hasOwnProperty(zh)?(Gh+=Lh[zh],Hh[Rh]=parseInt(Gh,16)*Vh,Vh=1,Rh=void 0,Gh=``):Gh+=zh;return Bh},Uh={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:Hh(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},Wh={Unicode:{Courier:Uh,"Courier-Bold":Uh,"Courier-BoldOblique":Uh,"Courier-Oblique":Uh,Helvetica:Uh,"Helvetica-Bold":Uh,"Helvetica-BoldOblique":Uh,"Helvetica-Oblique":Uh,"Times-Roman":Uh,"Times-Bold":Uh,"Times-BoldItalic":Uh,"Times-Italic":Uh}},Gh={Unicode:{"Courier-Oblique":Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":Hh(`{'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":Hh(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),Courier:Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-BoldOblique":Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Bold":Hh(`{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}`),Symbol:Hh(`{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}`),Helvetica:Hh(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`),"Helvetica-BoldOblique":Hh(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),ZapfDingbats:Hh(`{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-Bold":Hh(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Italic":Hh(`{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q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ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}`),"Times-Roman":Hh(`{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}`),"Helvetica-Oblique":Hh(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`)}};Ph.events.push([`addFont`,function(Ph){var Fh=Ph.font,Ih=Gh.Unicode[Fh.postScriptName];Ih&&(Fh.metadata.Unicode={},Fh.metadata.Unicode.widths=Ih.widths,Fh.metadata.Unicode.kerning=Ih.kerning);var Lh=Wh.Unicode[Fh.postScriptName];Lh&&(Fh.metadata.Unicode.encoding=Lh,Fh.encoding=Lh.codePages[0])}])}(Z$3.API),function(Ph){var Fh=function(Ph){for(var Fh=Ph.length,Ih=new Uint8Array(Fh),Lh=0;Lh<Fh;Lh++)Ih[Lh]=Ph.charCodeAt(Lh);return Ih};Ph.API.events.push([`addFont`,function(Ih){var Lh=void 0,Rh=Ih.font,zh=Ih.instance;if(!Rh.isStandardFont){if(zh===void 0)throw Error(`Font does not exist in vFS, import fonts or remove declaration doc.addFont('`+Rh.postScriptName+`').`);if(typeof(Lh=!1===zh.existsFileInVFS(Rh.postScriptName)?zh.loadFile(Rh.postScriptName):zh.getFileFromVFS(Rh.postScriptName))!=`string`)throw Error(`Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('`+Rh.postScriptName+`').`);(function(Ih,Lh){Lh=/^\x00\x01\x00\x00/.test(Lh)?Fh(Lh):Fh(So$1(Lh)),Ih.metadata=Ph.API.TTFFont.open(Lh),Ih.metadata.Unicode=Ih.metadata.Unicode||{encoding:{},kerning:{},widths:[]},Ih.metadata.glyIdsUsed=[0]})(Rh,Lh)}}])}(Z$3),Z$3.API.addSvgAsImage=function(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){if(isNaN(Fh)||isNaN(Ih))throw go$1.error(`jsPDF.addSvgAsImage: Invalid coordinates`,arguments),Error(`Invalid coordinates passed to jsPDF.addSvgAsImage`);if(isNaN(Lh)||isNaN(Rh))throw go$1.error(`jsPDF.addSvgAsImage: Invalid measurements`,arguments),Error(`Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage`);var Hh=document.createElement(`canvas`);Hh.width=Lh,Hh.height=Rh;var Uh=Hh.getContext(`2d`);Uh.fillStyle=`#fff`,Uh.fillRect(0,0,Hh.width,Hh.height);var Wh={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},Gh=this;return(X$3.canvg?Promise.resolve(X$3.canvg):__vitePreload(()=>import(`./index.es-D4YyL_Dg-BgT6a3Nd.js`),[])).catch(function(Ph){return Promise.reject(Error(`Could not load canvg: `+Ph))}).then(function(Ph){return Ph.default?Ph.default:Ph}).then(function(Fh){return Fh.fromString(Uh,Ph,Wh)},function(){return Promise.reject(Error(`Could not load canvg.`))}).then(function(Ph){return Ph.render(Wh)}).then(function(){Gh.addImage(Hh.toDataURL(`image/jpeg`,1),Fh,Ih,Lh,Rh,Bh,Vh)})},Z$3.API.putTotalPages=function(Ph){var Fh,Ih=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(Fh=new RegExp(Ph,`g`),Ih=this.internal.getNumberOfPages()):(Fh=new RegExp(this.pdfEscape16(Ph,this.internal.getFont()),`g`),Ih=this.pdfEscape16(this.internal.getNumberOfPages()+``,this.internal.getFont()));for(var Lh=1;Lh<=this.internal.getNumberOfPages();Lh++)for(var Rh=0;Rh<this.internal.pages[Lh].length;Rh++)this.internal.pages[Lh][Rh]=this.internal.pages[Lh][Rh].replace(Fh,Ih);return this},Z$3.API.viewerPreferences=function(Ph,Fh){var Ih;Ph||={},Fh||=!1;var Lh,Rh,zh,Bh={HideToolbar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:`UseNone`,value:`UseNone`,type:`name`,explicitSet:!1,valueSet:[`UseNone`,`UseOutlines`,`UseThumbs`,`UseOC`],pdfVersion:1.3},Direction:{defaultValue:`L2R`,value:`L2R`,type:`name`,explicitSet:!1,valueSet:[`L2R`,`R2L`],pdfVersion:1.3},ViewArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},ViewClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintScaling:{defaultValue:`AppDefault`,value:`AppDefault`,type:`name`,explicitSet:!1,valueSet:[`AppDefault`,`None`],pdfVersion:1.6},Duplex:{defaultValue:``,value:`none`,type:`name`,explicitSet:!1,valueSet:[`Simplex`,`DuplexFlipShortEdge`,`DuplexFlipLongEdge`,`none`],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:``,value:``,type:`array`,explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:`integer`,explicitSet:!1,valueSet:null,pdfVersion:1.7}},Vh=Object.keys(Bh),Hh=[],Uh=0,Wh=0,Gh=0;function Kh(Ph,Fh){var Ih,Lh=!1;for(Ih=0;Ih<Ph.length;Ih+=1)Ph[Ih]===Fh&&(Lh=!0);return Lh}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(Bh)),this.internal.viewerpreferences.isSubscribed=!1),Ih=this.internal.viewerpreferences.configuration,Ph===`reset`||!0===Fh){var qh=Vh.length;for(Gh=0;Gh<qh;Gh+=1)Ih[Vh[Gh]].value=Ih[Vh[Gh]].defaultValue,Ih[Vh[Gh]].explicitSet=!1}if(e$4(Ph)===`object`){for(Rh in Ph)if(zh=Ph[Rh],Kh(Vh,Rh)&&zh!==void 0){if(Ih[Rh].type===`boolean`&&typeof zh==`boolean`)Ih[Rh].value=zh;else if(Ih[Rh].type===`name`&&Kh(Ih[Rh].valueSet,zh))Ih[Rh].value=zh;else if(Ih[Rh].type===`integer`&&Number.isInteger(zh))Ih[Rh].value=zh;else if(Ih[Rh].type===`array`){for(Uh=0;Uh<zh.length;Uh+=1)if(Lh=!0,zh[Uh].length===1&&typeof zh[Uh][0]==`number`)Hh.push(String(zh[Uh]-1));else if(zh[Uh].length>1){for(Wh=0;Wh<zh[Uh].length;Wh+=1)typeof zh[Uh][Wh]!=`number`&&(Lh=!1);!0===Lh&&Hh.push([zh[Uh][0]-1,zh[Uh][1]-1].join(` `))}Ih[Rh].value=`[`+Hh.join(` `)+`]`}else Ih[Rh].value=Ih[Rh].defaultValue;Ih[Rh].explicitSet=!0}}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){var Ph,Fh=[];for(Ph in Ih)!0===Ih[Ph].explicitSet&&(Ih[Ph].type===`name`?Fh.push(`/`+Ph+` /`+Ih[Ph].value):Fh.push(`/`+Ph+` `+Ih[Ph].value));Fh.length!==0&&this.internal.write(`/ViewerPreferences
296
296
  <<
297
297
  `+Fh.join(`
298
298
  `)+`
@@ -4830,11 +4830,11 @@ Beat visual options (choose one per beat):
4830
4830
  - "image": { "type": "html_tailwind", "html": "...", "script"?: "..." } ← PREFER for rich layouts, animations, custom visuals
4831
4831
 
4832
4832
  IMPORTANT: "imagePrompt" and "moviePrompt" are plain string fields on the beat, NOT nested under "image".`,parameters:{type:`object`,properties:{script:{type:`object`,description:`Complete MulmoScript JSON. Must include $mulmocast, speechParams, imageParams, movieParams, and beats array. Always populate the top-level 'description' field with a concise 1–2 sentence summary of the presentation.`,additionalProperties:!0},filename:{type:`string`,description:`Optional filename without extension. Defaults to a slug of the script title.`}},required:[`script`]}},provider2TTSAgent={openai:{agentName:`ttsOpenaiAgent`,hasLimitedConcurrency:!1,defaultModel:`gpt-4o-mini-tts`,defaultVoice:`shimmer`,keyName:`OPENAI_API_KEY`,baseURLKeyName:`OPENAI_BASE_URL`},google:{agentName:`ttsGoogleAgent`,hasLimitedConcurrency:!1,keyName:`GEMINI_API_KEY`},gemini:{agentName:`ttsGeminiAgent`,hasLimitedConcurrency:!1,defaultModel:`gemini-2.5-flash-preview-tts`,defaultVoice:`Kore`,models:[`gemini-2.5-flash-preview-tts`,`gemini-2.5-pro-preview-tts`],keyName:`GEMINI_API_KEY`},elevenlabs:{agentName:`ttsElevenlabsAgent`,hasLimitedConcurrency:!0,defaultModel:`eleven_multilingual_v2`,models:[`eleven_v3`,`eleven_multilingual_v2`,`eleven_turbo_v2_5`,`eleven_turbo_v2`,`eleven_flash_v2_5`,`eleven_flash_v2`],keyName:`ELEVENLABS_API_KEY`},kotodama:{agentName:`ttsKotodamaAgent`,hasLimitedConcurrency:!0,defaultVoice:`Atla`,defaultDecoration:`neutral`,keyName:`KOTODAMA_API_KEY`},mock:{agentName:`mediaMockAgent`,hasLimitedConcurrency:!0,defaultModel:`mock-model`,models:[`mock-model`]}},gptImages=[`gpt-image-1.5`,`gpt-image-1`,`gpt-image-1-mini`],provider2ImageAgent={openai:{agentName:`imageOpenaiAgent`,defaultModel:`gpt-image-1`,models:[`dall-e-3`,...gptImages],keyName:`OPENAI_API_KEY`,baseURLKeyName:`OPENAI_BASE_URL`},google:{agentName:`imageGenAIAgent`,defaultModel:`gemini-2.5-flash-image`,models:[`imagen-4.0-generate-001`,`imagen-4.0-ultra-generate-001`,`imagen-4.0-fast-generate-001`,`gemini-2.5-flash-image`,`gemini-3.1-flash-image-preview`,`gemini-3-pro-image-preview`],keyName:`GEMINI_API_KEY`},replicate:{agentName:`imageReplicateAgent`,defaultModel:`bytedance/seedream-4`,models:[`bytedance/seedream-4`,`qwen/qwen-image`],keyName:`REPLICATE_API_TOKEN`},mock:{agentName:`mediaMockAgent`,defaultModel:`mock-model`,models:[`mock-model`],keyName:``}},AUDIO_MODE_NEVER=`never`,AUDIO_MODE_ALWAYS=`always`,AUDIO_MODE_OPTIONAL=`optional`,provider2MovieAgent={replicate:{agentName:`movieReplicateAgent`,defaultModel:`bytedance/seedance-1-lite`,keyName:`REPLICATE_API_TOKEN`,models:[`bytedance/seedance-1-lite`,`bytedance/seedance-1-pro`,`bytedance/seedance-2.0`,`bytedance/seedance-2.0-fast`,`kwaivgi/kling-v1.6-pro`,`kwaivgi/kling-v2.1`,`kwaivgi/kling-v2.1-master`,`google/veo-2`,`google/veo-3`,`google/veo-3.1`,`google/veo-3.1-fast`,`google/veo-3.1-lite`,`google/veo-3-fast`,`minimax/video-01`,`minimax/hailuo-02`,`minimax/hailuo-02-fast`,`pixverse/pixverse-v4.5`,`wan-video/wan-2.2-i2v-fast`,`wan-video/wan-2.2-t2v-fast`,`xai/grok-imagine-video`,`xai/grok-imagine-r2v`,`runwayml/gen-4.5`,`kwaivgi/kling-v3-omni-video`,`kwaivgi/kling-v3-video`],modelParams:{"bytedance/seedance-1-lite":{durations:[5,10],start_image:`image`,last_image:`last_frame_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.036},"bytedance/seedance-1-pro":{durations:[5,10],start_image:`image`,last_image:`last_frame_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.15},"bytedance/seedance-2.0":{durations:[4,5,6,7,8,9,10,11,12,13,14,15],start_image:`image`,last_image:`last_frame_image`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.29},"bytedance/seedance-2.0-fast":{durations:[4,5,6,7,8,9,10,11,12,13,14,15],start_image:`image`,last_image:`last_frame_image`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.22},"kwaivgi/kling-v1.6-pro":{durations:[5,10],start_image:`start_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.095},"kwaivgi/kling-v2.1":{durations:[5,10],start_image:`start_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.05},"kwaivgi/kling-v2.1-master":{durations:[5,10],start_image:`start_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.28},"google/veo-2":{durations:[5,6,7,8],start_image:`image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.5},"google/veo-3":{durations:[8],start_image:`image`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.75},"google/veo-3.1":{durations:[4,6,8],start_image:`image`,last_image:`last_frame_image`,reference_images_param:`reference_images`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.75},"google/veo-3.1-fast":{durations:[4,6,8],start_image:`image`,last_image:`last_frame_image`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.4},"google/veo-3.1-lite":{durations:[4,6,8],start_image:`image`,last_image:`last_frame`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.05},"google/veo-3-fast":{durations:[8],start_image:`image`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.4},"minimax/video-01":{durations:[6],start_image:`first_frame_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.5},"minimax/hailuo-02":{durations:[6],start_image:`first_frame_image`,last_image:`end_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.08},"minimax/hailuo-02-fast":{durations:[6,10],start_image:`first_frame_image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.0166},"pixverse/pixverse-v4.5":{durations:[5,8],start_image:`image`,last_image:`last_frame_image`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`sound_effect_switch`},price_per_sec:.12},"wan-video/wan-2.2-i2v-fast":{durations:[5],start_image:`image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.012},"wan-video/wan-2.2-t2v-fast":{durations:[5],start_image:void 0,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.012},"xai/grok-imagine-video":{durations:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],start_image:`image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.08},"xai/grok-imagine-r2v":{durations:[1,2,3,4,5,6,7,8,9,10],start_image:void 0,reference_images_param:`reference_images`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.08},"runwayml/gen-4.5":{durations:[5,10],start_image:`image`,audio:{mode:AUDIO_MODE_NEVER},price_per_sec:.25},"kwaivgi/kling-v3-omni-video":{durations:[3,4,5,6,7,8,9,10,11,12,13,14,15],start_image:`start_image`,last_image:`end_image`,reference_images_param:`reference_images`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.3},"kwaivgi/kling-v3-video":{durations:[3,4,5,6,7,8,9,10,11,12,13,14,15],start_image:`start_image`,last_image:`end_image`,reference_images_param:`reference_images`,audio:{mode:AUDIO_MODE_OPTIONAL,param:`generate_audio`},price_per_sec:.3}}},google:{agentName:`movieGenAIAgent`,defaultModel:`veo-2.0-generate-001`,models:[`veo-2.0-generate-001`,`veo-3.0-generate-001`,`veo-3.1-generate-preview`,`veo-3.1-lite-generate-preview`],keyName:`GEMINI_API_KEY`,modelParams:{"veo-3.1-lite-generate-preview":{durations:[4,6,8],supportsDuration:!0,supportsLastFrame:!0,supportsReferenceImages:!1,supportsPersonGeneration:!1,audio:{mode:AUDIO_MODE_ALWAYS}},"veo-3.1-generate-preview":{durations:[4,6,8],supportsDuration:!0,supportsLastFrame:!0,supportsReferenceImages:!0,supportsPersonGeneration:!1,audio:{mode:AUDIO_MODE_ALWAYS}},"veo-3.0-generate-001":{durations:[8],supportsDuration:!1,supportsLastFrame:!1,supportsReferenceImages:!1,supportsPersonGeneration:!1,audio:{mode:AUDIO_MODE_ALWAYS}},"veo-2.0-generate-001":{durations:[5,6,8],supportsDuration:!0,supportsLastFrame:!1,supportsReferenceImages:!1,supportsPersonGeneration:!0,audio:{mode:AUDIO_MODE_NEVER}}}},mock:{agentName:`mediaMockAgent`,defaultModel:`mock-model`,models:[`mock-model`],keyName:``,modelParams:{}}},provider2SoundEffectAgent={replicate:{agentName:`soundEffectReplicateAgent`,defaultModel:`zsxkib/mmaudio`,keyName:`REPLICATE_API_TOKEN`,models:[`zsxkib/mmaudio`],modelParams:{"zsxkib/mmaudio":{identifier:`zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484`}}}},defaultProviders={tts:`openai`,text2image:`openai`,text2movie:`replicate`,text2Html:`openai`,llm:`openai`,soundEffect:`replicate`,lipSync:`replicate`},htmlLLMProvider=[`openai`,`anthropic`,`mock`],mulmoVideoFilterMonoSchema=object({type:literal(`mono`)}),mulmoVideoFilterSepiaSchema=object({type:literal(`sepia`)}),mulmoVideoFilterBrightnessContrastSchema=object({type:literal(`brightness_contrast`),brightness:number().min(-1).max(1).optional().default(0),contrast:number().min(0).max(3).optional().default(1)}),mulmoVideoFilterHueSchema=object({type:literal(`hue`),hue:number().min(-180).max(180).optional().default(0),saturation:number().min(-10).max(10).optional().default(1),brightness:number().min(-10).max(10).optional().default(0)}),mulmoVideoFilterColorBalanceSchema=object({type:literal(`colorbalance`),rs:number().min(-1).max(1).optional().default(0),gs:number().min(-1).max(1).optional().default(0),bs:number().min(-1).max(1).optional().default(0),rm:number().min(-1).max(1).optional().default(0),gm:number().min(-1).max(1).optional().default(0),bm:number().min(-1).max(1).optional().default(0),rh:number().min(-1).max(1).optional().default(0),gh:number().min(-1).max(1).optional().default(0),bh:number().min(-1).max(1).optional().default(0)}),mulmoVideoFilterVibranceSchema=object({type:literal(`vibrance`),intensity:number().min(-2).max(2).optional().default(0)}),mulmoVideoFilterNegateSchema=object({type:literal(`negate`),negate_alpha:boolean().optional().default(!1)}),mulmoVideoFilterColorHoldSchema=object({type:literal(`colorhold`),color:string().optional().default(`red`),similarity:number().min(0).max(1).optional().default(.01),blend:number().min(0).max(1).optional().default(0)}),mulmoVideoFilterColorKeySchema=object({type:literal(`colorkey`),color:string().optional().default(`green`),similarity:number().min(0).max(1).optional().default(.01),blend:number().min(0).max(1).optional().default(0)}),mulmoVideoFilterBlurSchema=object({type:literal(`blur`),radius:number().min(1).max(50).optional().default(10),power:number().min(1).max(10).optional().default(1)}),mulmoVideoFilterGBlurSchema=object({type:literal(`gblur`),sigma:number().min(0).max(100).optional().default(30)}),mulmoVideoFilterAvgBlurSchema=object({type:literal(`avgblur`),sizeX:number().min(1).max(100).optional().default(10),sizeY:number().min(1).max(100).optional().default(10)}),mulmoVideoFilterUnsharpSchema=object({type:literal(`unsharp`),luma_msize_x:number().min(3).max(23).optional().default(5),luma_msize_y:number().min(3).max(23).optional().default(5),luma_amount:number().min(-2).max(5).optional().default(1),chroma_msize_x:number().min(3).max(23).optional().default(5),chroma_msize_y:number().min(3).max(23).optional().default(5),chroma_amount:number().min(-2).max(5).optional().default(0)}),mulmoVideoFilterEdgeDetectSchema=object({type:literal(`edgedetect`),low:number().min(0).max(1).optional().default(.2),high:number().min(0).max(1).optional().default(.4),mode:_enum([`wires`,`colormix`,`canny`]).optional().default(`wires`)}),mulmoVideoFilterSobelSchema=object({type:literal(`sobel`),planes:number().min(0).max(15).optional().default(15),scale:number().min(0).max(65535).optional().default(1),delta:number().min(-65535).max(65535).optional().default(0)}),mulmoVideoFilterEmbossSchema=object({type:literal(`emboss`)}),mulmoVideoFilterGlitchSchema=object({type:literal(`glitch`),intensity:number().min(1).max(100).optional().default(20),style:_enum([`noise`,`blend`]).optional().default(`noise`)}),mulmoVideoFilterGrainSchema=object({type:literal(`grain`),intensity:number().min(1).max(100).optional().default(10)}),mulmoVideoFilterHFlipSchema=object({type:literal(`hflip`)}),mulmoVideoFilterVFlipSchema=object({type:literal(`vflip`)}),mulmoVideoFilterRotateSchema=object({type:literal(`rotate`),angle:number().optional().default(0),fillcolor:string().optional().default(`black`)}),mulmoVideoFilterTransposeSchema=object({type:literal(`transpose`),dir:_enum([`cclock`,`clock`,`cclock_flip`,`clock_flip`]).optional().default(`clock`)}),mulmoVideoFilterVignetteSchema=object({type:literal(`vignette`),angle:number().min(0).max(Math.PI).optional().default(Math.PI/5),x0:number().min(0).max(1).optional(),y0:number().min(0).max(1).optional(),mode:_enum([`forward`,`backward`]).optional().default(`forward`)}),mulmoVideoFilterFadeSchema=object({type:literal(`fade`),mode:_enum([`in`,`out`]).optional().default(`in`),start_frame:number().min(0).optional().default(0),nb_frames:number().min(1).optional().default(25),alpha:boolean().optional().default(!1),color:string().optional().default(`black`)}),mulmoVideoFilterPixelizeSchema=object({type:literal(`pixelize`),width:number().min(1).max(1e3).optional().default(16),height:number().min(1).max(1e3).optional().default(16),mode:_enum([`avg`,`min`,`max`]).optional().default(`avg`)}),mulmoVideoFilterPseudoColorSchema=object({type:literal(`pseudocolor`),preset:_enum([`magma`,`inferno`,`plasma`,`viridis`,`turbo`,`cividis`,`range1`,`range2`,`shadows`,`highlights`,`solar`,`nominal`,`preferred`,`total`]).optional().default(`magma`)}),mulmoVideoFilterTmixSchema=object({type:literal(`tmix`),frames:number().min(1).max(1024).optional().default(3),weights:string().optional()}),mulmoVideoFilterLagfunSchema=object({type:literal(`lagfun`),decay:number().min(0).max(1).optional().default(.95),planes:number().min(0).max(15).optional().default(15)}),mulmoVideoFilterThresholdSchema=object({type:literal(`threshold`),planes:number().min(0).max(15).optional().default(15)}),mulmoVideoFilterElbgSchema=object({type:literal(`elbg`),codebook_length:number().min(1).max(256).optional().default(256)}),mulmoVideoFilterLensDistortionSchema=object({type:literal(`lensdistortion`),k1:number().min(-1).max(1).optional().default(0),k2:number().min(-1).max(1).optional().default(0)}),mulmoVideoFilterChromaShiftSchema=object({type:literal(`chromashift`),cbh:number().min(-255).max(255).optional().default(0),cbv:number().min(-255).max(255).optional().default(0),crh:number().min(-255).max(255).optional().default(0),crv:number().min(-255).max(255).optional().default(0),edge:_enum([`smear`,`wrap`]).optional().default(`smear`)}),mulmoVideoFilterDeflickerSchema=object({type:literal(`deflicker`),size:number().min(2).max(129).optional().default(5),mode:_enum([`am`,`gm`,`hm`,`qm`,`cm`,`pm`,`median`]).optional().default(`am`)}),mulmoVideoFilterDctDenoiseSchema=object({type:literal(`dctdnoiz`),sigma:number().min(0).max(999).optional().default(10)}),mulmoVideoFilterCustomSchema=object({type:literal(`custom`),filter:string()}),mulmoVideoFilterSchema=union([mulmoVideoFilterMonoSchema,mulmoVideoFilterSepiaSchema,mulmoVideoFilterBrightnessContrastSchema,mulmoVideoFilterHueSchema,mulmoVideoFilterColorBalanceSchema,mulmoVideoFilterVibranceSchema,mulmoVideoFilterNegateSchema,mulmoVideoFilterColorHoldSchema,mulmoVideoFilterColorKeySchema,mulmoVideoFilterBlurSchema,mulmoVideoFilterGBlurSchema,mulmoVideoFilterAvgBlurSchema,mulmoVideoFilterUnsharpSchema,mulmoVideoFilterEdgeDetectSchema,mulmoVideoFilterSobelSchema,mulmoVideoFilterEmbossSchema,mulmoVideoFilterGlitchSchema,mulmoVideoFilterGrainSchema,mulmoVideoFilterHFlipSchema,mulmoVideoFilterVFlipSchema,mulmoVideoFilterRotateSchema,mulmoVideoFilterTransposeSchema,mulmoVideoFilterVignetteSchema,mulmoVideoFilterFadeSchema,mulmoVideoFilterPixelizeSchema,mulmoVideoFilterPseudoColorSchema,mulmoVideoFilterTmixSchema,mulmoVideoFilterLagfunSchema,mulmoVideoFilterThresholdSchema,mulmoVideoFilterElbgSchema,mulmoVideoFilterLensDistortionSchema,mulmoVideoFilterChromaShiftSchema,mulmoVideoFilterDeflickerSchema,mulmoVideoFilterDctDenoiseSchema,mulmoVideoFilterCustomSchema]),hexColorSchema=string().regex(/^[0-9A-Fa-f]{6}$/),accentColorKeySchema=_enum([`primary`,`accent`,`success`,`warning`,`danger`,`info`,`highlight`]),slideThemeColorsSchema=object({bg:hexColorSchema,bgCard:hexColorSchema,bgCardAlt:hexColorSchema,text:hexColorSchema,textMuted:hexColorSchema,textDim:hexColorSchema,primary:hexColorSchema,accent:hexColorSchema,success:hexColorSchema,warning:hexColorSchema,danger:hexColorSchema,info:hexColorSchema,highlight:hexColorSchema}),slideThemeFontsSchema=object({title:string(),body:string(),mono:string()}),slideThemeSchema=object({colors:slideThemeColorsSchema,fonts:slideThemeFontsSchema}),textBlockSchema=object({type:literal(`text`),value:string(),align:_enum([`left`,`center`,`right`]).optional(),bold:boolean().optional(),dim:boolean().optional(),fontSize:number().optional(),color:accentColorKeySchema.optional()}),subBulletItemSchema=union([string(),object({text:string()})]),bulletItemSchema=union([string(),object({text:string(),items:array(subBulletItemSchema).optional()})]),bulletsBlockSchema=object({type:literal(`bullets`),items:array(bulletItemSchema),ordered:boolean().optional(),icon:string().optional()}),codeBlockSchema=object({type:literal(`code`),code:string(),language:string().optional()}),calloutBlockSchema=object({type:literal(`callout`),text:string(),label:string().optional(),color:accentColorKeySchema.optional(),style:_enum([`quote`,`info`,`warning`]).optional()}),metricBlockSchema=object({type:literal(`metric`),value:string(),label:string(),color:accentColorKeySchema.optional(),change:string().optional()}),dividerBlockSchema=object({type:literal(`divider`),color:accentColorKeySchema.optional()}),imageBlockSchema=object({type:literal(`image`),src:string(),alt:string().optional(),fit:_enum([`contain`,`cover`]).optional()}),imageRefBlockSchema=object({type:literal(`imageRef`),ref:string(),alt:string().optional(),fit:_enum([`contain`,`cover`]).optional()}),chartBlockSchema=object({type:literal(`chart`),chartData:record(string(),unknown()),title:string().optional()}),mermaidBlockSchema=object({type:literal(`mermaid`),code:string(),title:string().optional()}),tableCellValueSchema=union([string(),object({text:string(),color:accentColorKeySchema.optional(),bold:boolean().optional(),badge:boolean().optional()})]),tableBlockSchema=object({type:literal(`table`),title:string().optional(),headers:array(string()).optional(),rows:array(array(tableCellValueSchema)),rowHeaders:boolean().optional(),striped:boolean().optional()}),baseBlockSchemas=[textBlockSchema,bulletsBlockSchema,codeBlockSchema,calloutBlockSchema,metricBlockSchema,dividerBlockSchema,imageBlockSchema,imageRefBlockSchema,chartBlockSchema,mermaidBlockSchema,tableBlockSchema],nonSectionContentBlockSchema=discriminatedUnion(`type`,[...baseBlockSchemas]),sectionBlockSchema=object({type:literal(`section`),label:string(),color:accentColorKeySchema.optional(),content:array(nonSectionContentBlockSchema).optional(),text:string().optional(),sidebar:boolean().optional()}),contentBlockSchema=discriminatedUnion(`type`,[...baseBlockSchemas,sectionBlockSchema]),calloutBarSchema=object({text:string(),label:string().optional(),color:accentColorKeySchema.optional(),align:_enum([`left`,`center`]).optional(),leftBar:boolean().optional()}),cardSchema=object({title:string(),accentColor:accentColorKeySchema.optional(),content:array(contentBlockSchema).optional(),footer:string().optional(),label:string().optional(),num:number().optional(),icon:string().optional()}),slideStyleSchema=object({bgColor:string().optional(),decorations:boolean().optional(),bgOpacity:number().optional(),footer:string().optional()}),slideBaseFields={accentColor:accentColorKeySchema.optional(),style:slideStyleSchema.optional()},titleSlideSchema=object({layout:literal(`title`),...slideBaseFields,title:string(),subtitle:string().optional(),author:string().optional(),note:string().optional()}),columnsSlideSchema=object({layout:literal(`columns`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),columns:array(cardSchema),showArrows:boolean().optional(),callout:calloutBarSchema.optional(),bottomText:string().optional()}),comparisonPanelSchema=object({title:string(),accentColor:accentColorKeySchema.optional(),content:array(contentBlockSchema).optional(),footer:string().optional()}),comparisonSlideSchema=object({layout:literal(`comparison`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),left:comparisonPanelSchema,right:comparisonPanelSchema,callout:calloutBarSchema.optional()}),gridItemSchema=object({title:string(),description:string().optional(),accentColor:accentColorKeySchema.optional(),num:number().optional(),icon:string().optional(),content:array(contentBlockSchema).optional()}),gridSlideSchema=object({layout:literal(`grid`),...slideBaseFields,title:string(),subtitle:string().optional(),gridColumns:number().optional(),items:array(gridItemSchema),footer:string().optional()}),bigQuoteSlideSchema=object({layout:literal(`bigQuote`),...slideBaseFields,quote:string(),author:string().optional(),role:string().optional()}),statItemSchema=object({value:string(),label:string(),color:accentColorKeySchema.optional(),change:string().optional()}),statsSlideSchema=object({layout:literal(`stats`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),stats:array(statItemSchema),callout:calloutBarSchema.optional()}),timelineItemSchema=object({date:string(),title:string(),description:string().optional(),color:accentColorKeySchema.optional(),done:boolean().optional()}),timelineSlideSchema=object({layout:literal(`timeline`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),items:array(timelineItemSchema)}),splitPanelSchema=object({title:string().optional(),subtitle:string().optional(),label:string().optional(),labelBadge:boolean().optional(),accentColor:accentColorKeySchema.optional(),content:array(contentBlockSchema).optional(),dark:boolean().optional(),ratio:number().optional(),valign:_enum([`top`,`center`,`bottom`]).optional()}),splitSlideSchema=object({layout:literal(`split`),...slideBaseFields,left:splitPanelSchema.optional(),right:splitPanelSchema.optional()}),matrixCellSchema=object({label:string(),items:array(string()).optional(),content:array(contentBlockSchema).optional(),accentColor:accentColorKeySchema.optional()}),matrixSlideSchema=object({layout:literal(`matrix`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),rows:number().optional(),cols:number().optional(),xAxis:object({low:string().optional(),high:string().optional(),label:string().optional()}).optional(),yAxis:object({low:string().optional(),high:string().optional(),label:string().optional()}).optional(),cells:array(matrixCellSchema)}),tableSlideSchema=object({layout:literal(`table`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),headers:array(string()),rows:array(array(tableCellValueSchema)),rowHeaders:boolean().optional(),striped:boolean().optional(),callout:calloutBarSchema.optional()}),waterfallItemSchema=object({label:string(),value:number(),isTotal:boolean().optional(),color:accentColorKeySchema.optional()}),waterfallSlideSchema=object({layout:literal(`waterfall`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),items:array(waterfallItemSchema),unit:string().optional(),callout:calloutBarSchema.optional()}),funnelStageSchema=object({label:string(),value:string().optional(),description:string().optional(),color:accentColorKeySchema.optional()}),funnelSlideSchema=object({layout:literal(`funnel`),...slideBaseFields,title:string(),stepLabel:string().optional(),subtitle:string().optional(),stages:array(funnelStageSchema),callout:calloutBarSchema.optional()}),slideMediaSourceSchema=discriminatedUnion(`kind`,[object({kind:literal(`url`),url:url$1()}).strict(),object({kind:literal(`base64`),data:string().min(1)}).strict(),object({kind:literal(`path`),path:string().min(1)}).strict()]),slideBackgroundImageSourceSchema=object({source:slideMediaSourceSchema,size:_enum([`cover`,`contain`,`fill`,`auto`]).optional(),opacity:number().min(0).max(1).optional(),bgOpacity:number().min(0).max(1).optional()}),slideBrandingLogoSchema=object({source:slideMediaSourceSchema,position:_enum([`top-left`,`top-right`,`bottom-left`,`bottom-right`]).default(`top-right`),width:number().positive().default(120)}).strict(),slideBrandingSchema=object({logo:slideBrandingLogoSchema.optional(),backgroundImage:slideBackgroundImageSourceSchema.optional()}).strict(),slideLayoutSchema=discriminatedUnion(`layout`,[titleSlideSchema,columnsSlideSchema,comparisonSlideSchema,gridSlideSchema,bigQuoteSlideSchema,statsSlideSchema,timelineSlideSchema,splitSlideSchema,matrixSlideSchema,tableSlideSchema,funnelSlideSchema,waterfallSlideSchema]),mulmoSlideMediaSchema=object({type:literal(`slide`),theme:slideThemeSchema.optional(),slide:slideLayoutSchema,reference:string().optional(),branding:slideBrandingSchema.nullable().optional()}).strict(),langSchema=string(),URLStringSchema=url$1(),localizedTextSchema=object({text:string(),lang:langSchema,texts:array(string()).optional(),ttsTexts:array(string()).optional(),cacheKey:string(),duration:number().optional()}).strict(),multiLingualTextsSchema=record(langSchema,localizedTextSchema),speechOptionsSchema=object({speed:number().optional(),instruction:string().optional(),decoration:string().optional(),stability:number().optional(),similarity_boost:number().optional()}).strict(),speakerIdSchema=string(),defaultSpeaker=`Presenter`,text2SpeechProviderSchema=_enum(Object.keys(provider2TTSAgent)).default(defaultProviders.tts),speakerDataSchema=object({displayName:record(langSchema,string()).optional(),voiceId:string(),isDefault:boolean().optional(),speechOptions:speechOptionsSchema.optional(),provider:text2SpeechProviderSchema.optional(),model:string().optional().describe(`TTS model to use for this speaker`),baseURL:string().optional(),apiVersion:string().optional()}).strict(),speakerSchema=speakerDataSchema.extend({lang:record(langSchema,speakerDataSchema).optional()}),speakerDictionarySchema=record(speakerIdSchema,speakerSchema),mulmoSpeechParamsSchema=object({speakers:speakerDictionarySchema}).default({speakers:{[defaultSpeaker]:{provider:defaultProviders.tts,voiceId:`shimmer`,displayName:{en:defaultSpeaker}}}}),mediaSourceSchema=discriminatedUnion(`kind`,[object({kind:literal(`url`),url:URLStringSchema}).strict(),object({kind:literal(`base64`),data:string().min(1)}).strict(),object({kind:literal(`path`),path:string().min(1)}).strict()]),mediaSourceMermaidSchema=discriminatedUnion(`kind`,[object({kind:literal(`url`),url:URLStringSchema}).strict(),object({kind:literal(`base64`),data:string().min(1)}).strict(),object({kind:literal(`text`),text:string().min(1)}).strict(),object({kind:literal(`path`),path:string().min(1)}).strict()]),backgroundImageSourceSchema=object({source:mediaSourceSchema,size:_enum([`cover`,`contain`,`fill`,`auto`]).optional(),opacity:number().min(0).max(1).optional()}),backgroundImageSchema=union([string(),backgroundImageSourceSchema]).nullable().optional(),stringOrStringArray=union([string(),array(string())]),row2Schema=tuple([stringOrStringArray,stringOrStringArray]),grid2x2Schema=tuple([stringOrStringArray,stringOrStringArray,stringOrStringArray,stringOrStringArray]),layoutFrameSchema=object({header:stringOrStringArray.optional(),"sidebar-left":stringOrStringArray.optional()}),layoutMainSchema=union([object({"row-2":row2Schema}),object({"2x2":grid2x2Schema}),object({content:stringOrStringArray})]),markdownLayoutSchema=layoutFrameSchema.and(layoutMainSchema),mulmoMarkdownMediaSchema=object({type:literal(`markdown`),markdown:union([stringOrStringArray,markdownLayoutSchema]),style:string().optional(),backgroundImage:backgroundImageSchema}).strict(),mulmoWebMediaSchema=object({type:literal(`web`),url:URLStringSchema}).strict(),mulmoPdfMediaSchema=object({type:literal(`pdf`),source:mediaSourceSchema}).strict(),mulmoImageMediaSchema=object({type:literal(`image`),source:mediaSourceSchema}).strict(),mulmoSvgMediaSchema=object({type:literal(`svg`),source:mediaSourceSchema}).strict(),mulmoMovieMediaSchema=object({type:literal(`movie`),source:mediaSourceSchema}).strict(),mulmoMoviePromptMediaSchema=object({type:literal(`moviePrompt`),prompt:string().min(1),imageName:string().optional().describe(`Reference an imageRefs key to use as image-to-video input`)}).strict(),mulmoTextSlideMediaSchema=object({type:literal(`textSlide`),slide:object({title:string(),subtitle:string().optional(),bullets:array(string()).optional()}),style:string().optional(),backgroundImage:backgroundImageSchema}).strict(),captionSplitSchema=_enum([`none`,`estimate`]).default(`none`),textSplitSchema=discriminatedUnion(`type`,[object({type:literal(`none`)}),object({type:literal(`delimiters`),delimiters:array(string()).optional()})]),mulmoCaptionParamsSchema=object({lang:langSchema.optional(),styles:array(string()).optional(),captionSplit:captionSplitSchema.optional(),textSplit:textSplitSchema.optional(),bottomOffset:number().min(0).max(100).optional()}).strict(),mulmoChartMediaSchema=object({type:literal(`chart`),title:string(),chartData:record(string(),any()),style:string().optional(),backgroundImage:backgroundImageSchema}).strict(),mulmoMermaidMediaSchema=object({type:literal(`mermaid`),title:string().describe(`The title of the diagram`),code:mediaSourceMermaidSchema.describe(`The code of the mermaid diagram`),appendix:array(string()).optional().describe(`The appendix of the mermaid diagram; typically, style information.`),style:string().optional(),backgroundImage:backgroundImageSchema}).strict(),swipePositionValue=union([number(),string()]),swipeTransitionSchema=object({opacity:number().min(0).max(1).optional(),rotate:number().optional(),scale:union([number(),tuple([number(),number()])]).optional(),translate:tuple([number(),number()]).optional(),bc:string().optional(),timing:tuple([number(),number()]).default([0,1]).optional().describe(`Animation timing [start, end] as ratio 0.0-1.0 of beat duration`)}).strict(),swipeLoopSchema=object({style:_enum([`vibrate`,`blink`,`wiggle`,`spin`,`shift`,`bounce`,`pulse`]),count:number().optional().describe(`Number of loop iterations. 0 = infinite`),delta:number().optional().describe(`Distance for vibrate / angle for wiggle`),duration:number().optional().describe(`Duration of one cycle in seconds`),direction:_enum([`n`,`s`,`e`,`w`]).optional().describe(`Direction for shift animation`),clockwise:boolean().optional().describe(`Spin direction. Default: true`)}).strict(),swipeShadowSchema=object({color:string().optional().default(`black`),offset:tuple([number(),number()]).optional().default([1,1]),opacity:number().optional().default(.5),radius:number().optional().default(1)}).strict(),swipeElementSchema=lazy(()=>object({id:string().optional(),x:swipePositionValue.optional(),y:swipePositionValue.optional(),w:swipePositionValue.optional(),h:swipePositionValue.optional(),pos:tuple([swipePositionValue,swipePositionValue]).optional().describe(`Position by anchor point [x, y]`),bc:string().optional().describe(`Background color`),opacity:number().min(0).max(1).optional(),rotate:number().optional(),scale:union([number(),tuple([number(),number()])]).optional(),translate:tuple([number(),number()]).optional(),cornerRadius:number().optional(),borderWidth:number().optional(),borderColor:string().optional(),shadow:swipeShadowSchema.optional(),clip:boolean().optional(),text:string().optional(),fontSize:union([number(),string()]).optional(),fontWeight:string().optional(),textColor:string().optional(),textAlign:_enum([`center`,`left`,`right`]).optional(),lineHeight:union([number(),string()]).optional(),img:string().optional().describe(`Image URL or image:ref`),imgFit:_enum([`contain`,`cover`,`fill`]).optional().default(`contain`),to:swipeTransitionSchema.optional().describe(`Transition animation`),loop:swipeLoopSchema.optional().describe(`Loop animation`),elements:array(lazy(()=>swipeElementSchema)).optional()}).strict()),htmlTailwindAnimationSchema=union([literal(!0),object({fps:number().min(1).max(60).optional().default(30),movie:boolean().optional().describe(`Use CDP screencast for real-time recording (experimental, faster). Default: false (frame-by-frame screenshot).`)})]),mulmoHtmlTailwindMediaSchema=object({type:literal(`html_tailwind`),html:stringOrStringArray.optional(),script:stringOrStringArray.optional().describe(`JavaScript code for the beat. Injected as a <script> tag after html. Use for render() function etc.`),elements:array(swipeElementSchema).optional().describe(`Swipe-style declarative animation elements. Converted to HTML + render() automatically. Use this OR html, not both.`),animation:htmlTailwindAnimationSchema.optional().describe(`Enable frame-based animation (Remotion-style). true for defaults (30fps), or { fps: N } for custom frame rate.`)}).strict(),mulmoBeatReferenceMediaSchema=object({type:literal(`beat`),id:string().optional().describe(`Specifies the beat to reference.`)}).strict(),mulmoVoiceOverMediaSchema=object({type:literal(`voice_over`),startAt:number().optional().describe(`The time to start the voice over the video in seconds.`)}).strict(),mulmoVisionMediaSchema=object({type:literal(`vision`),style:string().min(1),data:record(string(),any())}).strict(),mulmoImageAssetSchema=union([mulmoMarkdownMediaSchema,mulmoWebMediaSchema,mulmoPdfMediaSchema,mulmoImageMediaSchema,mulmoSvgMediaSchema,mulmoMovieMediaSchema,mulmoTextSlideMediaSchema,mulmoChartMediaSchema,mulmoMermaidMediaSchema,mulmoHtmlTailwindMediaSchema,mulmoBeatReferenceMediaSchema,mulmoVoiceOverMediaSchema,mulmoVisionMediaSchema,mulmoSlideMediaSchema]),mulmoAudioMediaSchema=object({type:literal(`audio`),source:mediaSourceSchema}).strict(),mulmoMidiMediaSchema=object({type:literal(`midi`),source:string()}).strict(),mulmoAudioAssetSchema=union([mulmoAudioMediaSchema,mulmoMidiMediaSchema]),imageIdSchema=string(),mulmoImagePromptMediaSchema=object({type:literal(`imagePrompt`),prompt:string().min(1),canvasSize:object({width:number(),height:number()}).strict().optional(),referenceImageName:imageIdSchema.optional().describe(`Reference another imageRefs key as input for image generation`),referenceImage:mediaSourceSchema.optional().describe(`Direct source (path/url/base64) as reference image for generation`)}).strict(),mulmoImageParamsImagesValueSchema=union([mulmoImageMediaSchema,mulmoImagePromptMediaSchema,mulmoMovieMediaSchema,mulmoMoviePromptMediaSchema]),mulmoImageParamsImagesSchema=record(imageIdSchema,mulmoImageParamsImagesValueSchema),mulmoFillOptionSchema=object({style:_enum([`aspectFit`,`aspectFill`]).optional().default(`aspectFit`)}).describe(`How to handle aspect ratio differences between image and canvas`),text2ImageProviderSchema=_enum(Object.keys(provider2ImageAgent)).optional(),mulmoOpenAIImageModelSchema=object({provider:literal(`openai`),model:_enum(provider2ImageAgent.openai.models).optional(),quality:_enum([`low`,`medium`,`high`,`auto`]).optional()}).strict(),mulmoGoogleImageModelSchema=object({provider:literal(`google`),model:_enum(provider2ImageAgent.google.models).optional()}).strict(),mulmoBeatImageParamsSchema=object({provider:text2ImageProviderSchema,model:string().optional(),quality:string().optional(),style:string().optional(),moderation:string().optional(),baseURL:string().optional(),apiVersion:string().optional(),vertexai_project:string().optional(),vertexai_location:string().optional()}).strict(),mulmoImageParamsSchema=mulmoBeatImageParamsSchema.extend({images:mulmoImageParamsImagesSchema.optional(),backgroundImage:backgroundImageSchema,concurrency:number().int().positive().optional().describe(`Max concurrent image generation requests`)}).strict(),textSlideParamsSchema=object({cssStyles:stringOrStringArray}).strict(),mulmoSlideParamsSchema=object({theme:slideThemeSchema,branding:slideBrandingSchema.optional()}).strict(),beatAudioParamsSchema=object({padding:number().optional().describe(`Padding between beats`),movieVolume:number().min(0).max(1).optional().describe(`Audio volume of the imported or generated movie`)}).strict(),mulmoHtmlImageParamsSchema=object({model:string().optional()}).strict(),audioParamsSchema=object({padding:number().optional().default(.3).describe(`Padding between beats`),introPadding:number().optional().default(1).describe(`Padding at the beginning of the audio`),closingPadding:number().optional().default(.8).describe(`Padding before the last beat`),outroPadding:number().optional().default(1).describe(`Padding at the end of the audio`),bgm:mediaSourceSchema.optional(),bgmVolume:number().optional().default(.2).describe(`Volume of the background music`),audioVolume:number().optional().default(1).describe(`Volume of the audio`),suppressSpeech:boolean().optional().default(!1).describe(`Suppress speech generation`),movieVolume:number().min(0).max(1).optional().describe(`Default movie audio volume for all beats`),ttsVolume:number().min(0).max(2).optional().describe(`TTS narration volume before mixing with BGM/movie audio`),ducking:object({ratio:number().min(0).max(1).optional().describe(`Movie volume ratio during TTS beats (default 0.3)`)}).optional().describe(`Auto-reduce movie audio when TTS is playing`),concurrency:number().int().positive().optional().describe(`Max concurrent TTS generation requests`)}).strict(),htmlPromptParamsSchema=object({systemPrompt:string().optional().default(``),prompt:string().min(1),data:any().optional(),images:record(string(),any()).optional()}).strict(),text2MovieProviderSchema=_enum(Object.keys(provider2MovieAgent)),text2SoundEffectProviderSchema=_enum(Object.keys(provider2SoundEffectAgent)).default(defaultProviders.soundEffect),mulmoSoundEffectParamsSchema=object({provider:text2SoundEffectProviderSchema.optional(),model:string().optional()}),mulmoLipSyncParamsSchema=object({provider:string().optional(),model:string().optional()}),mulmoTransitionSchema=object({type:_enum([`fade`,`slideout_left`,`slideout_right`,`slideout_up`,`slideout_down`,`slidein_left`,`slidein_right`,`slidein_up`,`slidein_down`,`wipeleft`,`wiperight`,`wipeup`,`wipedown`,`wipetl`,`wipetr`,`wipebl`,`wipebr`]),duration:number().min(0).max(2).optional().default(.3)}),movieReferenceImageSchema=object({imageName:imageIdSchema.describe(`Reference an imageRefs key`),referenceType:_enum([`ASSET`,`STYLE`]).describe(`ASSET: scene/object/character, STYLE: aesthetics/lighting`)}),mulmoMovieParamsSchema=object({provider:text2MovieProviderSchema.optional(),model:string().optional(),fillOption:mulmoFillOptionSchema.optional(),transition:mulmoTransitionSchema.optional(),filters:array(mulmoVideoFilterSchema).optional(),vertexai_project:string().optional(),vertexai_location:string().optional(),firstFrameImageName:imageIdSchema.optional().describe(`Reference an imageRefs key for the first frame (image-to-video input)`),lastFrameImageName:imageIdSchema.optional().describe(`Reference an imageRefs key for the last frame (image-to-video interpolation)`),referenceImages:array(movieReferenceImageSchema).optional().describe(`Style/asset reference images (Veo 3.1). Mutually exclusive with imageName/lastFrameImageName`),concurrency:number().int().positive().optional().describe(`Max concurrent movie generation requests`),generateAudio:boolean().optional().describe(`Request audio generation in the video (model-dependent)`)}),mulmoBeatSchema=object({speaker:speakerIdSchema.optional(),text:string().optional().default(``).describe(`Text to be spoken. If empty, the audio is not generated.`),texts:array(string()).optional().describe(`Manually split texts for captions. Takes precedence over text for caption display.`),id:string().optional().describe(`Unique identifier for the beat.`),description:string().optional(),image:mulmoImageAssetSchema.optional(),audio:mulmoAudioAssetSchema.optional(),duration:number().optional().describe(`Duration of the beat. Used only when the text is empty`),imageParams:mulmoBeatImageParamsSchema.optional(),audioParams:beatAudioParamsSchema.optional(),movieParams:mulmoMovieParamsSchema.extend({speed:number().optional().describe(`Speed of the video. 1.0 is normal speed. 0.5 is half speed. 2.0 is double speed.`)}).optional(),soundEffectParams:mulmoSoundEffectParamsSchema.optional(),lipSyncParams:mulmoLipSyncParamsSchema.optional(),htmlImageParams:mulmoHtmlImageParamsSchema.optional(),speechOptions:speechOptionsSchema.optional(),textSlideParams:textSlideParamsSchema.optional(),captionParams:mulmoCaptionParamsSchema.optional(),images:mulmoImageParamsImagesSchema.optional().describe(`Beat-local media references. Same schema as imageParams.images. Merged with global refs (local takes precedence).`),imageNames:array(imageIdSchema).optional(),imagePrompt:string().optional(),moviePrompt:string().optional(),soundEffectPrompt:string().optional(),htmlPrompt:htmlPromptParamsSchema.optional(),enableLipSync:boolean().optional().describe(`Enable lip sync generation for this beat`),hidden:boolean().optional().describe(`Hide this beat from the presentation`)}).strict(),mulmoCanvasDimensionSchema=object({width:number(),height:number()}).default({width:1280,height:720}),mulmoCastCreditSchema=object({version:literal(`1.1`),credit:literal(`closing`).optional()}).strict(),text2HtmlImageProviderSchema=_enum(htmlLLMProvider).default(defaultProviders.text2Html),mulmoGoogleMovieModelSchema=object({provider:literal(`google`),model:_enum(provider2MovieAgent.google.models).optional()}).strict(),mulmoReplicateMovieModelSchema=object({provider:literal(`replicate`),model:_enum(provider2MovieAgent.replicate.models).optional()}).strict(),mulmoPresentationStyleSchema=object({$mulmocast:mulmoCastCreditSchema,canvasSize:mulmoCanvasDimensionSchema,speechParams:mulmoSpeechParamsSchema,imageParams:mulmoImageParamsSchema.optional().default({provider:defaultProviders.text2image,images:{}}),movieParams:mulmoMovieParamsSchema.optional().default({provider:defaultProviders.text2movie}),soundEffectParams:mulmoSoundEffectParamsSchema.optional().default({provider:defaultProviders.soundEffect}),lipSyncParams:mulmoLipSyncParamsSchema.optional(),htmlImageParams:mulmoHtmlImageParamsSchema.extend({provider:text2HtmlImageProviderSchema}).optional(),textSlideParams:textSlideParamsSchema.optional(),slideParams:mulmoSlideParamsSchema.optional(),captionParams:mulmoCaptionParamsSchema.optional(),audioParams:audioParamsSchema.default({introPadding:1,padding:.3,closingPadding:.8,outroPadding:1,bgmVolume:.2,audioVolume:1,suppressSpeech:!1})}),mulmoReferenceSchema=object({url:URLStringSchema,title:string().optional(),description:string().optional(),type:union([_enum([`article`,`paper`,`image`,`video`,`audio`]),string()]).optional().default(`article`)}),mulmoScriptSchema=mulmoPresentationStyleSchema.extend({title:string().optional(),description:string().optional(),references:array(mulmoReferenceSchema).optional(),lang:langSchema.optional().default(`en`),beats:array(mulmoBeatSchema).min(1),imagePath:string().optional(),__test_invalid__:boolean().optional()}).strict(),mulmoStudioBeatSchema=object({id:string().optional().describe(`Unique identifier for the beat.`),hash:string().optional(),duration:number().optional(),startAt:number().optional(),audioDuration:number().optional(),movieDuration:number().optional(),silenceDuration:number().optional(),hasMovieAudio:boolean().optional(),audioFile:string().optional(),imageFile:string().optional(),movieFile:string().optional(),soundEffectFile:string().optional(),lipSyncFile:string().optional(),captionFile:string().optional(),captionFiles:array(object({file:string(),startAt:number(),endAt:number()})).optional(),htmlImageFile:string().optional(),markdown:string().optional(),html:string().optional()}).strict(),mulmoStudioMultiLingualDataSchema=object({multiLingualTexts:multiLingualTextsSchema,cacheKey:string().optional()}),mulmoStudioMultiLingualArraySchema=array(mulmoStudioMultiLingualDataSchema).min(1),mulmoStudioMultiLingualSchema=record(string(),mulmoStudioMultiLingualDataSchema),mulmoStudioMultiLingualFileSchema=object({version:literal(`1.1`),multiLingual:mulmoStudioMultiLingualSchema}),mulmoSessionStateSchema=object({inSession:object({audio:boolean(),image:boolean(),video:boolean(),multiLingual:boolean(),caption:boolean(),pdf:boolean(),markdown:boolean(),html:boolean()}),inBeatSession:object({audio:record(string(),boolean()),image:record(string(),boolean()),movie:record(string(),boolean()),multiLingual:record(string(),boolean()),caption:record(string(),boolean()),html:record(string(),boolean()),imageReference:record(string(),boolean()),soundEffect:record(string(),boolean()),lipSync:record(string(),boolean())})}),mulmoStudioSchema=object({script:mulmoScriptSchema,filename:string(),beats:array(mulmoStudioBeatSchema).min(1)}).strict(),mulmoPromptTemplateSchema=object({title:string(),description:string(),systemPrompt:string(),scriptName:string().optional(),presentationStyle:mulmoPresentationStyleSchema.optional()}).strict(),mulmoPromptTemplateFileSchema=mulmoPromptTemplateSchema.extend({filename:string()}),mulmoStoryboardSceneSchema=object({description:string(),references:array(mulmoReferenceSchema).optional()}).describe(`A detailed description of the content of the scene, not the presentation style`).strict(),mulmoStoryboardSchema=object({title:string(),references:array(mulmoReferenceSchema).optional(),scenes:array(mulmoStoryboardSceneSchema)}).describe(`A storyboard for a presentation, a story, a video, etc.`).strict(),urlsSchema=array(url$1({message:`Invalid URL format`})),mulmoViewerBeatSchema=object({id:string().optional(),text:string().optional(),duration:number().optional(),startTime:number().optional(),endTime:number().optional(),importance:number().optional(),multiLinguals:record(string(),string()).optional(),audioSources:record(string(),string().optional()).optional(),imageSource:string().optional(),videoSource:string().optional(),videoWithAudioSource:string().optional(),htmlImageSource:string().optional(),soundEffectSource:string().optional()}),mulmoViewerDataSchema=object({beats:array(mulmoViewerBeatSchema),bgmSource:string().optional(),bgmFile:string().optional(),title:string().optional(),lang:string().optional()});function parseSSEEventLine(Ph){if(!Ph.startsWith(`data: `))return null;let Fh;try{Fh=JSON.parse(Ph.slice(6))}catch{return null}if(!isRecord(Fh))return null;let Ih=Fh;return Ih.type===`beat_image_done`&&typeof Ih.beatIndex==`number`?{type:`beat_image_done`,beatIndex:Ih.beatIndex}:Ih.type===`beat_audio_done`&&typeof Ih.beatIndex==`number`?{type:`beat_audio_done`,beatIndex:Ih.beatIndex}:Ih.type===`done`&&typeof Ih.moviePath==`string`?{type:`done`,moviePath:Ih.moviePath}:Ih.type===`error`&&typeof Ih.message==`string`?{type:`error`,message:Ih.message}:{type:`unknown`}}function shouldAutoRenderBeat(Ph,Fh,Ih){if(Fh)return!1;let Lh=Ph.image?.type;return typeof Lh==`string`?Ih.includes(Lh):!1}function getMissingCharacterKeys(Ph,Fh,Ih){return Ph.filter(Ph=>!Fh[Ph]&&Ih[Ph]!==`rendering`)}function validateBeatJSON(Ph,Fh){let Ih;try{Ih=JSON.parse(Ph)}catch{return!1}return Fh.safeParse(Ih).success}function extractErrorMessage(Ph){return errorMessage(Ph)}function applyMovieEvent(Ph,Fh){switch(Ph.type){case`beat_image_done`:Fh.onBeatImageDone(Ph.beatIndex);return;case`beat_audio_done`:Fh.onBeatAudioDone(Ph.beatIndex);return;case`done`:Fh.onDone(Ph.moviePath);return;case`error`:throw Error(Ph.message);case`unknown`:return}}async function streamMovieEvents(Ph,Fh){let Ih=Ph.getReader(),Lh=new TextDecoder,Rh=``;for(;;){let{done:Ph,value:zh}=await Ih.read();if(Ph)break;Rh+=Lh.decode(zh,{stream:!0});let Bh=Rh.split(`
4833
- `);Rh=Bh.pop()??``;for(let Ph of Bh){let Ih=parseSSEEventLine(Ph);Ih&&applyMovieEvent(Ih,Fh)}}}var ACTIVE_SESSION_KEY=Symbol(`activeSession`);function provideActiveSession(Ph){provide(ACTIVE_SESSION_KEY,Ph)}function useActiveSession(){return inject(ACTIVE_SESSION_KEY)}var _hoisted_1$43={class:`h-full bg-white flex flex-col overflow-hidden`},_hoisted_2$43={class:`flex items-start justify-between px-6 py-4 border-b border-gray-100 shrink-0`},_hoisted_3$40={class:`min-w-0 flex-1`},_hoisted_4$34={class:`text-lg font-semibold text-gray-800 truncate`},_hoisted_5$29={key:0,class:`text-sm text-gray-500 mt-0.5 truncate`},_hoisted_6$29={class:`flex items-center gap-3 mt-1 text-xs text-gray-400`},_hoisted_7$27={key:0},_hoisted_8$25={key:1,class:`truncate`},_hoisted_9$22={class:`ml-4 shrink-0 flex gap-2`},_hoisted_10$21=[`href`],_hoisted_11$18=[`disabled`],_hoisted_12$17={key:0,class:`animate-spin w-3 h-3 shrink-0`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_13$15={key:1},_hoisted_14$13={key:0,class:`border-b border-gray-100 shrink-0 px-4 py-3`},_hoisted_15$11={class:`flex items-center justify-between mb-2`},_hoisted_16$10={class:`text-xs font-semibold text-gray-500 uppercase tracking-wide`},_hoisted_17$10=[`disabled`],_hoisted_18$10={class:`flex gap-3 flex-wrap`},_hoisted_19$10=[`onDragover`,`onDragleave`,`onDrop`],_hoisted_20$6=[`src`,`alt`,`onClick`],_hoisted_21$6={key:1,class:`animate-spin w-4 h-4 text-green-400`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_22$6={key:2,class:`text-xs text-red-400 text-center px-1`},_hoisted_23$5={key:3,class:`text-xs text-gray-300 text-center px-1 leading-tight`},_hoisted_24$4={key:4,class:`absolute bottom-0 inset-x-0 text-center text-xs text-gray-400 bg-white/70 py-0.5 pointer-events-none`},_hoisted_25$4={key:5,class:`absolute inset-0 flex items-center justify-center bg-blue-50/80 pointer-events-none`},_hoisted_26$4={class:`text-xs text-blue-500 font-medium`},_hoisted_27$4=[`disabled`,`onClick`],_hoisted_28$3={key:0,class:`inline-block animate-spin`},_hoisted_29$3={key:1},_hoisted_30$3=[`disabled`,`onClick`],_hoisted_31$3={key:0,class:`animate-spin w-3 h-3`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_32$3={key:1},_hoisted_33$2={class:`text-xs text-gray-600 text-center truncate w-full`},_hoisted_34$1={class:`flex gap-3 items-stretch`},_hoisted_35$1=[`onDragover`,`onDragleave`,`onDrop`],_hoisted_36$1=[`src`,`alt`,`onClick`],_hoisted_37$1=[`disabled`,`onClick`],_hoisted_38$1={key:2,class:`w-full aspect-video flex flex-col items-center justify-center gap-1 p-2`},_hoisted_39$1={class:`text-xs text-green-500`},_hoisted_40$1={key:1,class:`text-xs text-red-400 text-center`},_hoisted_41$1={key:0,class:`text-xs text-gray-400 text-center italic leading-relaxed px-1`},_hoisted_42$1={key:1,class:`text-xs text-gray-300`},_hoisted_43$1={key:3,class:`absolute inset-0 flex items-center justify-center bg-blue-50/80 pointer-events-none`},_hoisted_44$1={class:`text-xs text-blue-500 font-medium`},_hoisted_45$1={key:4,class:`absolute bottom-0 inset-x-0 text-center text-xs text-gray-400 bg-white/70 py-0.5 pointer-events-none`},_hoisted_46$1=[`onClick`],_hoisted_47$1={class:`flex flex-col flex-1 min-w-0 px-2 py-1.5`},_hoisted_48$1={class:`text-sm text-gray-800 leading-relaxed`},_hoisted_49$1={class:`flex justify-between mt-auto pt-1`},_hoisted_50$1={class:`flex items-center gap-1`},_hoisted_51$1={key:0,class:`animate-spin w-3 h-3 text-green-400`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_52$1=[`onClick`],_hoisted_53$1=[`title`],_hoisted_54$1=[`disabled`,`onClick`],_hoisted_55$1=[`onClick`],_hoisted_56$1=[`title`,`onClick`],_hoisted_57$1={key:0,class:`border-t border-gray-100`},_hoisted_58$1=[`onUpdate:modelValue`],_hoisted_59$1={class:`flex items-center justify-end gap-2 px-2 pb-2`},_hoisted_60$1={key:0,class:`text-xs text-red-600`,role:`alert`},_hoisted_61$1=[`disabled`,`onClick`],_hoisted_62$1={key:0,class:`flex items-center justify-center h-32 text-gray-400 text-sm`},_hoisted_63$1={class:`bottom-bar-wrapper`},_hoisted_64$1={class:`editor-actions`},_hoisted_65=[`disabled`],_hoisted_66=[`title`],_hoisted_67={class:`material-icons`},_hoisted_68=[`disabled`],_hoisted_69={class:`flex flex-col items-center gap-3`},_hoisted_70=[`src`],_hoisted_71={class:`flex items-center gap-4`},_hoisted_72={key:0,class:`max-w-[80vw] text-center text-white text-2xl leading-relaxed`},_hoisted_73=[`disabled`],View_vue_vue_type_script_setup_true_lang_default$2=defineComponent({__name:`View`,props:{selectedResult:{}},emits:[`updateResult`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=computed(()=>Lh.selectedResult.data),Bh=computed(()=>zh.value?.script??{}),Vh=computed(()=>zh.value?.filePath??``),Hh=computed(()=>Bh.value.beats??[]),Uh=API_ROUTES.mulmoScript.downloadMovie,Wh=reactive({}),Gh=reactive({}),Kh=reactive({}),qh=reactive({}),Jh=reactive({}),Yh=reactive({}),Xh=reactive({}),Zh=reactive({}),Qh=ref(!1),$h=ref(null),eg=reactive({}),tg=reactive({}),ng=reactive({}),rg=ref(null),ig=ref(null),ag=ref(null),og=reactive({}),sg=reactive({}),cg=reactive({}),lg=reactive({}),ug=reactive({}),dg=computed(()=>Object.values(Wh).some(Ph=>Ph===`rendering`)),fg=computed(()=>{let Ph=Bh.value.imageParams?.images??{};return Object.keys(Ph).filter(Fh=>Ph[Fh]?.type===`imagePrompt`)}),pg=useActiveSession(),mg=computed(()=>pg?.value?.id),hg=computed(()=>{let Ph={},Fh=pg?.value?.pendingGenerations??{},Ih=Vh.value;if(!Ih)return Ph;for(let[Lh,Rh]of Object.entries(Fh))Rh.filePath===Ih&&(Ph[Lh]=Rh);return Ph});function gg(Ph){return Bh.value.imageParams?.images?.[Ph]?.prompt??``}function _g(Ph){rg.value&&=(rg.value.audio.pause(),null),ag.value={src:Gh[Ph],text:Fg(Ph).text,index:Ph}}let vg=computed(()=>{if(!ag.value)return!1;for(let Ph=ag.value.index-1;Ph>=0;Ph--)if(Gh[Ph])return!0;return!1}),yg=computed(()=>{if(!ag.value)return!1;for(let Ph=ag.value.index+1;Ph<Hh.value.length;Ph++)if(Gh[Ph])return!0;return!1});function bg(Ph){if(!ag.value)return;let Fh=Hh.value.length,Ih=ag.value.index+Ph;for(;Ih>=0&&Ih<Fh;){if(Gh[Ih]){_g(Ih);return}Ih+=Ph}}let xg=ref(),Sg=ref(!1),Cg=ref(``),{copied:wg,copy:Tg}=useClipboardCopy(),Eg=computed(()=>({...Bh.value,beats:Hh.value.map((Ph,Fh)=>Zh[Fh]??Ph)})),Dg=computed(()=>JSON.stringify(Eg.value,null,2)),Og=ref(``),kg=computed(()=>Cg.value!==Og.value),Ag=computed(()=>{try{let Ph=JSON.parse(Cg.value);return mulmoScriptSchema.safeParse(Ph).success}catch{return!1}});async function jg(Ph){if(Sg.value=Ph,Ph){let Ph=Dg.value;if(Vh.value){let Fh=await apiGet(API_ROUTES.files.content,{path:Vh.value});Fh.ok&&Fh.data.content&&(Ph=Fh.data.content)}Cg.value=Ph,Og.value=Ph}}function Mg(){xg.value&&(xg.value.open=!1)}async function Ng(){let Ph;try{Ph=JSON.parse(Cg.value)}catch(Ph){alert(extractErrorMessage(Ph));return}let Fh=await apiPost(API_ROUTES.mulmoScript.updateScript,{filePath:Vh.value,script:Ph});if(!Fh.ok){alert(Fh.error||`Update failed`);return}Rh(`updateResult`,{...Lh.selectedResult,data:{...Lh.selectedResult.data,script:Ph}}),xg.value&&(xg.value.open=!1),await n_()}async function Pg(){await Tg(Dg.value)}function Fg(Ph){return Zh[Ph]??Hh.value[Ph]??{}}function Ig(Ph){qh[Ph]||(Jh[Ph]=JSON.stringify(Fg(Ph),null,2),delete Yh[Ph]),qh[Ph]=!qh[Ph]}function Lg(Ph){return validateBeatJSON(Jh[Ph]??``,mulmoBeatSchema)}async function Rg(Ph){let Fh;try{Fh=JSON.parse(Jh[Ph])}catch(Fh){Yh[Ph]={kind:`invalidJson`,error:errorMessage(Fh)};return}let Ih=JSON.stringify(Fg(Ph).image);delete Yh[Ph],Xh[Ph]=!0;let Lh=await apiPost(API_ROUTES.mulmoScript.updateBeat,{filePath:Vh.value,beatIndex:Ph,beat:Fh});if(delete Xh[Ph],!Lh.ok){Yh[Ph]={kind:`saveFailed`,error:Lh.error};return}Zh[Ph]=Fh,qh[Ph]=!1,JSON.stringify(Fh.image)!==Ih&&(delete Gh[Ph],zg(Ph))}async function zg(Ph){Wh[Ph]=`rendering`;let Fh=await apiPost(API_ROUTES.mulmoScript.renderBeat,{filePath:Vh.value,beatIndex:Ph,chatSessionId:mg.value});if(!Fh.ok){Kh[Ph]=Fh.error||`Render failed`,Wh[Ph]=`error`;return}if(Fh.data.error){Kh[Ph]=Fh.data.error,Wh[Ph]=`error`;return}Gh[Ph]=Fh.data.image??``,Wh[Ph]=`done`,$g()}async function Bg(Ph){delete Gh[Ph],Wh[Ph]=`rendering`;let Fh=await apiPost(API_ROUTES.mulmoScript.renderBeat,{filePath:Vh.value,beatIndex:Ph,force:!0,chatSessionId:mg.value});if(!Fh.ok){Kh[Ph]=Fh.error||`Render failed`,Wh[Ph]=`error`;return}if(Fh.data.error){Kh[Ph]=Fh.data.error,Wh[Ph]=`error`;return}Gh[Ph]=Fh.data.image??``,Wh[Ph]=`done`}async function Vg(Ph){let Fh=await apiGet(API_ROUTES.mulmoScript.beatImage,{filePath:Vh.value,beatIndex:String(Ph)});Fh.ok&&Fh.data.image&&(Gh[Ph]=Fh.data.image,Wh[Ph]=`done`)}async function Hg(Ph){let Fh=await apiGet(API_ROUTES.mulmoScript.beatAudio,{filePath:Vh.value,beatIndex:String(Ph)});Fh.ok&&Fh.data.audio&&(eg[Ph]=Fh.data.audio,tg[Ph]=`done`)}async function Ug(Ph){tg[Ph]=`generating`,delete ng[Ph];let Fh=await apiPost(API_ROUTES.mulmoScript.generateBeatAudio,{filePath:Vh.value,beatIndex:Ph,chatSessionId:mg.value});if(!Fh.ok){ng[Ph]=Fh.error||`Audio generation failed`,tg[Ph]=`error`;return}if(Fh.data.error){ng[Ph]=Fh.data.error,tg[Ph]=`error`;return}eg[Ph]=Fh.data.audio??``,tg[Ph]=`done`}function Wg(Ph){if(rg.value){rg.value.audio.pause();let Fh=rg.value.index;if(rg.value=null,Fh===Ph)return}let Fh=eg[Ph];if(!Fh)return;let Ih=new Audio(Fh);rg.value={index:Ph,audio:Ih},Ih.addEventListener(`ended`,()=>{if(rg.value?.index===Ph&&(rg.value=null,ag.value?.index===Ph)){bg(1);let Fh=ag.value?.index;Fh!==void 0&&Fh!==Ph&&eg[Fh]&&Wg(Fh)}}),Ih.play()}function Gg(Ph,Fh){Ph.dataTransfer?.types.includes(`Files`)&&(Ph.preventDefault(),ug[Fh]=!0)}function Kg(Ph){ug[Ph]=!1}async function qg(Ph,Fh){Ph.preventDefault(),ug[Fh]=!1;let Ih=Ph.dataTransfer?.files[0];if(!Ih||!Ih.type.startsWith(`image/`))return;Wh[Fh]=`rendering`,delete Kh[Fh];let Lh;try{Lh=await new Promise((Ph,Fh)=>{let Lh=new FileReader;Lh.onload=()=>Ph(Lh.result),Lh.onerror=Fh,Lh.readAsDataURL(Ih)})}catch(Ph){Kh[Fh]=errorMessage(Ph),Wh[Fh]=`error`;return}let Rh=await apiPost(API_ROUTES.mulmoScript.uploadBeatImage,{filePath:Vh.value,beatIndex:Fh,imageData:Lh});if(!Rh.ok){Kh[Fh]=Rh.error||`Upload failed`,Wh[Fh]=`error`;return}if(Rh.data.error){Kh[Fh]=Rh.data.error,Wh[Fh]=`error`;return}Gh[Fh]=Rh.data.image??``,Wh[Fh]=`done`}function Jg(Ph,Fh){Ph.dataTransfer?.types.includes(`Files`)&&(Ph.preventDefault(),lg[Fh]=!0)}function Yg(Ph){lg[Ph]=!1}async function Xg(Ph,Fh){Ph.preventDefault(),lg[Fh]=!1;let Ih=Ph.dataTransfer?.files[0];if(!Ih||!Ih.type.startsWith(`image/`))return;og[Fh]=`rendering`,delete cg[Fh];let Lh;try{Lh=await new Promise((Ph,Fh)=>{let Lh=new FileReader;Lh.onload=()=>Ph(Lh.result),Lh.onerror=Fh,Lh.readAsDataURL(Ih)})}catch(Ph){cg[Fh]=errorMessage(Ph),og[Fh]=`error`;return}let Rh=await apiPost(API_ROUTES.mulmoScript.uploadCharacterImage,{filePath:Vh.value,key:Fh,imageData:Lh});if(!Rh.ok){cg[Fh]=Rh.error||`Upload failed`,og[Fh]=`error`;return}if(Rh.data.error){cg[Fh]=Rh.data.error,og[Fh]=`error`;return}sg[Fh]=Rh.data.image??``,og[Fh]=`done`}function Zg(Ph){rg.value&&=(rg.value.audio.pause(),null),ag.value={src:sg[Ph],text:Ph,index:-1,isCharacter:!0}}async function Qg(Ph){let Fh=await apiGet(API_ROUTES.mulmoScript.characterImage,{filePath:Vh.value,key:Ph});Fh.ok&&Fh.data.image&&(sg[Ph]=Fh.data.image,og[Ph]=`done`)}function $g(){getMissingCharacterKeys(fg.value,sg,og).forEach(Ph=>Qg(Ph))}async function e_(Ph,Fh){og[Ph]=`rendering`,delete cg[Ph];let Ih=await apiPost(API_ROUTES.mulmoScript.renderCharacter,{filePath:Vh.value,key:Ph,force:Fh,chatSessionId:mg.value});if(!Ih.ok){cg[Ph]=Ih.error||`Render failed`,og[Ph]=`error`;return}if(Ih.data.error){cg[Ph]=Ih.data.error,og[Ph]=`error`;return}sg[Ph]=Ih.data.image??``,og[Ph]=`done`}async function t_(){await Promise.all(fg.value.filter(Ph=>og[Ph]!==`rendering`).map(Ph=>e_(Ph,!1)))}async function n_(){ig.value&&(ig.value.scrollTop=0),Object.keys(Wh).forEach(Ph=>delete Wh[+Ph]),Object.keys(Gh).forEach(Ph=>delete Gh[+Ph]),Object.keys(Kh).forEach(Ph=>delete Kh[+Ph]),Object.keys(qh).forEach(Ph=>delete qh[+Ph]),Object.keys(Jh).forEach(Ph=>delete Jh[+Ph]),Object.keys(Yh).forEach(Ph=>delete Yh[+Ph]),Object.keys(Xh).forEach(Ph=>delete Xh[+Ph]),Object.keys(Zh).forEach(Ph=>delete Zh[+Ph]),Object.keys(eg).forEach(Ph=>delete eg[+Ph]),Object.keys(tg).forEach(Ph=>delete tg[+Ph]),Object.keys(ng).forEach(Ph=>delete ng[+Ph]),Object.keys(og).forEach(Ph=>delete og[Ph]),Object.keys(sg).forEach(Ph=>delete sg[Ph]),Object.keys(cg).forEach(Ph=>delete cg[Ph]),Object.keys(ug).forEach(Ph=>delete ug[+Ph]),$h.value=null,xg.value&&(xg.value.open=!1);let Ph=[`textSlide`,`markdown`,`chart`,`mermaid`,`html_tailwind`],Fh=fg.value.length>0;if(Hh.value.forEach((Ih,Lh)=>{shouldAutoRenderBeat(Ih,Fh,Ph)?zg(Lh):Ih.imagePrompt&&Vg(Lh),Ih.text&&Hg(Lh)}),fg.value.forEach(Ph=>Qg(Ph)),Vh.value){let Ph=await apiGet(API_ROUTES.mulmoScript.movieStatus,{filePath:Vh.value});Ph.ok&&Ph.data.moviePath&&($h.value=Ph.data.moviePath)}for(let Ph of Object.values(hg.value))r_(Ph)}onMounted(n_),watch(()=>Lh.selectedResult,n_),watch(hg,(Ph,Fh={})=>{for(let[Ih,Lh]of Object.entries(Ph))Ih in Fh||r_(Lh);for(let[Ih,Lh]of Object.entries(Fh))Ih in Ph||i_(Lh).catch(Ph=>{console.error(`[presentMulmoScript] reload on finish failed:`,Ph)})});function r_(Ph){if(Ph.kind===GENERATION_KINDS.beatImage){let Fh=Number(Ph.key);Gh[Fh]||(Wh[Fh]=`rendering`)}else if(Ph.kind===GENERATION_KINDS.beatAudio){let Fh=Number(Ph.key);eg[Fh]||(tg[Fh]=`generating`)}else Ph.kind===GENERATION_KINDS.characterImage?sg[Ph.key]||(og[Ph.key]=`rendering`):Ph.kind===GENERATION_KINDS.movie&&(Qh.value=!0)}async function i_(Ph){if(Ph.kind===GENERATION_KINDS.beatImage){let Fh=Number(Ph.key);await Vg(Fh),Wh[Fh]===`rendering`&&delete Wh[Fh]}else if(Ph.kind===GENERATION_KINDS.beatAudio){let Fh=Number(Ph.key);await Hg(Fh),tg[Fh]===`generating`&&delete tg[Fh]}else Ph.kind===GENERATION_KINDS.characterImage?(await Qg(Ph.key),og[Ph.key]===`rendering`&&delete og[Ph.key]):Ph.kind===GENERATION_KINDS.movie&&(Qh.value=!1,await a_())}async function a_(){if(!Vh.value)return;let Ph=await apiGet(API_ROUTES.mulmoScript.movieStatus,{filePath:Vh.value});Ph.ok&&Ph.data.moviePath&&($h.value=Ph.data.moviePath)}async function o_(){Qh.value=!0;try{let Ph=await apiFetchRaw(API_ROUTES.mulmoScript.generateMovie,{method:`POST`,body:JSON.stringify({filePath:Vh.value,chatSessionId:mg.value}),headers:{"Content-Type":`application/json`}});if(!Ph.ok||!Ph.body)throw Error(`Generation failed`);await streamMovieEvents(Ph.body,{onBeatImageDone:Ph=>{Vg(Ph),$g()},onBeatAudioDone:Ph=>Hg(Ph),onDone:Ph=>{$h.value=Ph}})}catch(Ph){alert(extractErrorMessage(Ph))}finally{Qh.value=!1}}return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$43,[createBaseVNode(`div`,_hoisted_2$43,[createBaseVNode(`div`,_hoisted_3$40,[createBaseVNode(`h2`,_hoisted_4$34,toDisplayString$1(Bh.value.title||`Untitled Script`),1),Bh.value.description?(openBlock(),createElementBlock(`p`,_hoisted_5$29,toDisplayString$1(Bh.value.description),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$29,[createBaseVNode(`span`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.beatCount`,Hh.value.length,{named:{count:Hh.value.length}})),1),Bh.value.lang?(openBlock(),createElementBlock(`span`,_hoisted_7$27,toDisplayString$1(Bh.value.lang),1)):createCommentVNode(``,!0),Vh.value?(openBlock(),createElementBlock(`span`,_hoisted_8$25,toDisplayString$1(Vh.value),1)):createCommentVNode(``,!0)])]),createBaseVNode(`div`,_hoisted_9$22,[$h.value&&!Qh.value?(openBlock(),createElementBlock(`a`,{key:0,href:`${unref(Uh)}?moviePath=${encodeURIComponent($h.value)}`,download:``,class:`px-3 py-1 text-xs rounded-full border transition-colors border-gray-200 text-gray-500 hover:bg-gray-50 flex items-center justify-center gap-1`},[Fh[7]||=createBaseVNode(`span`,{class:`material-icons text-sm leading-none`},`download`,-1),createBaseVNode(`span`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.movie`)),1)],8,_hoisted_10$21)):createCommentVNode(``,!0),createBaseVNode(`button`,{class:`px-3 py-1 text-xs rounded-full border transition-colors border-gray-200 text-gray-500 hover:bg-gray-50 disabled:opacity-40 flex items-center justify-center gap-1`,disabled:Qh.value,onClick:o_},[Qh.value?(openBlock(),createElementBlock(`svg`,_hoisted_12$17,[...Fh[8]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):createCommentVNode(``,!0),Qh.value?(openBlock(),createElementBlock(`span`,_hoisted_13$15,toDisplayString$1(unref(Ih)(`pluginMulmoScript.generating`)),1)):(openBlock(),createElementBlock(Fragment,{key:2},[Fh[9]||=createBaseVNode(`span`,{class:`material-icons text-sm leading-none`},`refresh`,-1),createBaseVNode(`span`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.movie`)),1)],64))],8,_hoisted_11$18)])]),fg.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_14$13,[createBaseVNode(`div`,_hoisted_15$11,[createBaseVNode(`span`,_hoisted_16$10,toDisplayString$1(unref(Ih)(`pluginMulmoScript.characters`)),1),createBaseVNode(`button`,{class:`px-2 py-0.5 text-xs rounded border border-gray-300 text-gray-500 hover:bg-gray-50 disabled:opacity-50`,disabled:Qh.value||dg.value||fg.value.every(Ph=>og[Ph]===`rendering`),onClick:t_},toDisplayString$1(unref(Ih)(`pluginMulmoScript.generateAll`)),9,_hoisted_17$10)]),createBaseVNode(`div`,_hoisted_18$10,[(openBlock(!0),createElementBlock(Fragment,null,renderList(fg.value,Ph=>(openBlock(),createElementBlock(`div`,{key:Ph,class:`flex flex-col items-center gap-1 w-36`},[createBaseVNode(`div`,{class:normalizeClass([`relative w-36 h-36 rounded-lg border overflow-hidden bg-gray-50 flex items-center justify-center transition-colors`,lg[Ph]?`border-blue-400 bg-blue-50`:`border-gray-200`]),onDragover:Fh=>Jg(Fh,Ph),onDragleave:Fh=>Yg(Ph),onDrop:Fh=>Xg(Fh,Ph)},[sg[Ph]?(openBlock(),createElementBlock(`img`,{key:0,src:sg[Ph],class:`w-full h-full object-cover cursor-zoom-in`,alt:Ph,onClick:Fh=>Zg(Ph)},null,8,_hoisted_20$6)):og[Ph]===`rendering`?(openBlock(),createElementBlock(`svg`,_hoisted_21$6,[...Fh[10]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):og[Ph]===`error`?(openBlock(),createElementBlock(`span`,_hoisted_22$6,toDisplayString$1(cg[Ph]),1)):(openBlock(),createElementBlock(`span`,_hoisted_23$5,toDisplayString$1(gg(Ph)),1)),lg[Ph]?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_24$4,toDisplayString$1(unref(Ih)(`pluginMulmoScript.orDropImage`)),1)),lg[Ph]?(openBlock(),createElementBlock(`div`,_hoisted_25$4,[createBaseVNode(`span`,_hoisted_26$4,toDisplayString$1(unref(Ih)(`pluginMulmoScript.drop`)),1)])):createCommentVNode(``,!0),sg[Ph]&&og[Ph]!==`rendering`?(openBlock(),createElementBlock(`button`,{key:6,class:normalizeClass([`absolute top-0.5 right-0.5 px-1 py-0.5 text-xs rounded border bg-white`,Qh.value||dg.value?`border-yellow-400 text-yellow-500 cursor-not-allowed`:`border-gray-400 text-gray-600 hover:bg-gray-50`]),disabled:Qh.value||dg.value,onClick:withModifiers(Fh=>e_(Ph,!0),[`stop`])},[Qh.value||dg.value?(openBlock(),createElementBlock(`span`,_hoisted_28$3,`↺`)):(openBlock(),createElementBlock(`span`,_hoisted_29$3,`↺`))],10,_hoisted_27$4)):!sg[Ph]&&og[Ph]!==`rendering`?(openBlock(),createElementBlock(`button`,{key:7,class:normalizeClass([`absolute top-0.5 right-0.5 px-1 py-0.5 text-xs rounded border bg-white`,Qh.value||dg.value?`border-yellow-400 text-yellow-500 cursor-not-allowed`:`border-blue-400 text-blue-600 hover:bg-blue-50`]),disabled:Qh.value||dg.value,onClick:withModifiers(Fh=>e_(Ph,!1),[`stop`])},[Qh.value||dg.value?(openBlock(),createElementBlock(`svg`,_hoisted_31$3,[...Fh[11]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):(openBlock(),createElementBlock(`span`,_hoisted_32$3,toDisplayString$1(unref(Ih)(`pluginMulmoScript.gen`)),1))],10,_hoisted_30$3)):createCommentVNode(``,!0)],42,_hoisted_19$10),createBaseVNode(`span`,_hoisted_33$2,toDisplayString$1(Ph),1)]))),128))])])):createCommentVNode(``,!0),createBaseVNode(`div`,{ref_key:`beatListEl`,ref:ig,class:`flex-1 overflow-y-auto p-2 space-y-1.5`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Hh.value,(Ph,Lh)=>(openBlock(),createElementBlock(`div`,{key:Lh,class:`rounded-lg border border-gray-200 overflow-hidden`},[createBaseVNode(`div`,_hoisted_34$1,[createBaseVNode(`div`,{class:normalizeClass([`relative shrink-0 w-[45%] overflow-hidden bg-gray-50 transition-colors`,ug[Lh]?`bg-blue-50`:``]),onDragover:Ph=>Gg(Ph,Lh),onDragleave:Ph=>Kg(Lh),onDrop:Ph=>qg(Ph,Lh)},[Gh[Lh]?(openBlock(),createElementBlock(`img`,{key:0,src:Gh[Lh],class:`w-full object-contain cursor-zoom-in`,alt:`Beat ${Lh+1}`,onClick:Ph=>_g(Lh)},null,8,_hoisted_36$1)):createCommentVNode(``,!0),Gh[Lh]&&Wh[Lh]!==`rendering`?(openBlock(),createElementBlock(`button`,{key:1,class:`absolute top-1.5 right-1.5 flex items-center gap-1 px-2 py-0.5 text-xs rounded border border-gray-400 text-gray-600 bg-white hover:bg-gray-50 disabled:opacity-60 disabled:cursor-not-allowed`,disabled:Qh.value,onClick:withModifiers(Ph=>Bg(Lh),[`stop`])},` ↺ `,8,_hoisted_37$1)):Gh[Lh]?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_38$1,[Wh[Lh]===`rendering`||Qh.value&&!Gh[Lh]&&Fg(Lh).imagePrompt?(openBlock(),createElementBlock(Fragment,{key:0},[Fh[12]||=createBaseVNode(`svg`,{class:`animate-spin w-4 h-4 text-green-400`,viewBox:`0 0 24 24`,fill:`none`},[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`})],-1),createBaseVNode(`span`,_hoisted_39$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.rendering`)),1)],64)):Wh[Lh]===`error`?(openBlock(),createElementBlock(`span`,_hoisted_40$1,toDisplayString$1(Kh[Lh]),1)):(openBlock(),createElementBlock(Fragment,{key:2},[Fg(Lh).imagePrompt?(openBlock(),createElementBlock(`span`,_hoisted_41$1,toDisplayString$1(Fg(Lh).imagePrompt),1)):(openBlock(),createElementBlock(`span`,_hoisted_42$1,toDisplayString$1(Ph.image?.type??`—`),1))],64))])),ug[Lh]?(openBlock(),createElementBlock(`div`,_hoisted_43$1,[createBaseVNode(`span`,_hoisted_44$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.drop`)),1)])):!Gh[Lh]&&Wh[Lh]!==`rendering`?(openBlock(),createElementBlock(`div`,_hoisted_45$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.orDropImage`)),1)):createCommentVNode(``,!0),Fg(Lh).imagePrompt&&!Gh[Lh]&&Wh[Lh]!==`rendering`&&!Qh.value?(openBlock(),createElementBlock(`button`,{key:5,class:`absolute top-1.5 right-1.5 flex items-center gap-1 px-2 py-0.5 text-xs rounded border border-blue-400 text-blue-600 bg-white hover:bg-blue-50`,onClick:Ph=>zg(Lh)},toDisplayString$1(unref(Ih)(`pluginMulmoScript.generate`)),9,_hoisted_46$1)):createCommentVNode(``,!0)],42,_hoisted_35$1),createBaseVNode(`div`,_hoisted_47$1,[createBaseVNode(`span`,_hoisted_48$1,toDisplayString$1(Fg(Lh).text),1),createBaseVNode(`div`,_hoisted_49$1,[createBaseVNode(`div`,_hoisted_50$1,[tg[Lh]===`generating`||Qh.value&&!eg[Lh]&&Fg(Lh).text?(openBlock(),createElementBlock(`svg`,_hoisted_51$1,[...Fh[13]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):eg[Lh]?(openBlock(),createElementBlock(`button`,{key:1,class:normalizeClass([`text-xs px-2 py-0.5 rounded border`,rg.value?.index===Lh?`border-red-400 text-red-600 hover:bg-red-50`:`border-green-400 text-green-600 hover:bg-green-50`]),onClick:Ph=>Wg(Lh)},toDisplayString$1(rg.value?.index===Lh?unref(Ih)(`pluginMulmoScript.stop`):unref(Ih)(`pluginMulmoScript.play`)),11,_hoisted_52$1)):ng[Lh]?(openBlock(),createElementBlock(Fragment,{key:2},[createBaseVNode(`span`,{class:`text-xs text-red-400`,title:ng[Lh]},toDisplayString$1(unref(Ih)(`pluginMulmoScript.errPrefix`)),9,_hoisted_53$1),Fg(Lh).text?(openBlock(),createElementBlock(`button`,{key:0,class:`text-xs px-2 py-0.5 rounded border border-gray-300 text-gray-500 hover:bg-gray-50 disabled:opacity-50`,disabled:Qh.value,onClick:Ph=>Ug(Lh)},` ↺ `,8,_hoisted_54$1)):createCommentVNode(``,!0)],64)):Fg(Lh).text?(openBlock(),createElementBlock(`button`,{key:3,class:`text-xs px-2 py-0.5 rounded border border-gray-300 text-gray-500 hover:bg-gray-50`,onClick:Ph=>Ug(Lh)},toDisplayString$1(unref(Ih)(`pluginMulmoScript.generateAudio`)),9,_hoisted_55$1)):createCommentVNode(``,!0)]),createBaseVNode(`button`,{class:`text-gray-400 hover:text-gray-600`,title:qh[Lh]?`Hide source`:`Show source`,onClick:Ph=>Ig(Lh)},[...Fh[14]||=[createBaseVNode(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[createBaseVNode(`polyline`,{points:`16 18 22 12 16 6`}),createBaseVNode(`polyline`,{points:`8 6 2 12 8 18`})],-1)]],8,_hoisted_56$1)])])]),qh[Lh]?(openBlock(),createElementBlock(`div`,_hoisted_57$1,[withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Ph=>Jh[Lh]=Ph,class:normalizeClass([`w-full text-xs text-gray-600 bg-gray-50 p-2 font-mono resize-none`,Lg(Lh)?`outline-none`:`outline outline-2 outline-red-400`]),rows:`8`,spellcheck:`false`},null,10,_hoisted_58$1),[[vModelText,Jh[Lh]]]),createBaseVNode(`div`,_hoisted_59$1,[Yh[Lh]?(openBlock(),createElementBlock(`span`,_hoisted_60$1,toDisplayString$1(unref(Ih)(Yh[Lh].kind===`invalidJson`?`pluginMulmoScript.saveErrorInvalidJson`:`pluginMulmoScript.saveErrorSaveFailed`,{error:Yh[Lh].error})),1)):createCommentVNode(``,!0),createBaseVNode(`button`,{class:normalizeClass([`px-2 py-1 text-xs rounded border`,Lg(Lh)&&!Xh[Lh]?`border-blue-400 text-blue-600 hover:bg-blue-50 cursor-pointer`:`border-gray-200 text-gray-300 cursor-not-allowed`]),disabled:!Lg(Lh)||!!Xh[Lh],onClick:Ph=>Rg(Lh)},toDisplayString$1(Xh[Lh]?unref(Ih)(`pluginMulmoScript.saving`):unref(Ih)(`pluginMulmoScript.update`)),11,_hoisted_61$1)])])):createCommentVNode(``,!0)]))),128)),Hh.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_62$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.noBeats`)),1)):createCommentVNode(``,!0)],512),createBaseVNode(`div`,_hoisted_63$1,[createBaseVNode(`details`,{ref_key:`sourceDetails`,ref:xg,class:`script-source`,onToggle:Fh[1]||=Ph=>jg(Ph.target.open)},[createBaseVNode(`summary`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.editSource`)),1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Fh[0]||=Ph=>Cg.value=Ph,class:normalizeClass([`script-editor`,{"script-editor-invalid":kg.value&&!Ag.value}]),spellcheck:`false`},null,2),[[vModelText,Cg.value]]),createBaseVNode(`div`,_hoisted_64$1,[createBaseVNode(`button`,{class:`apply-btn`,disabled:!kg.value||!Ag.value,onClick:Ng},toDisplayString$1(unref(Ih)(`pluginMulmoScript.applyChanges`)),9,_hoisted_65),createBaseVNode(`button`,{class:`cancel-btn`,onClick:Mg},toDisplayString$1(unref(Ih)(`common.cancel`)),1)])],544),withDirectives(createBaseVNode(`button`,{class:`copy-btn`,title:unref(wg)?`Copied!`:`Copy`,onClick:Pg},[createBaseVNode(`span`,_hoisted_67,toDisplayString$1(unref(wg)?`check`:`content_copy`),1)],8,_hoisted_66),[[vShow,!Sg.value]])]),ag.value?(openBlock(),createElementBlock(`div`,{key:1,class:`fixed inset-0 z-50 flex items-center justify-center bg-black/80`,onClick:Fh[6]||=Ph=>ag.value=null},[createBaseVNode(`div`,{class:`flex items-center gap-4`,onClick:Fh[5]||=withModifiers(()=>{},[`stop`])},[ag.value.isCharacter?createCommentVNode(``,!0):(openBlock(),createElementBlock(`button`,{key:0,class:`text-white/60 hover:text-white disabled:opacity-20 text-4xl leading-none`,disabled:!vg.value,onClick:Fh[2]||=Ph=>bg(-1)},` ‹ `,8,_hoisted_68)),createBaseVNode(`div`,_hoisted_69,[createBaseVNode(`img`,{src:ag.value.src,class:`max-w-[80vw] max-h-[80vh] object-contain rounded shadow-2xl`},null,8,_hoisted_70),createBaseVNode(`div`,_hoisted_71,[ag.value.text?(openBlock(),createElementBlock(`p`,_hoisted_72,toDisplayString$1(ag.value.text),1)):createCommentVNode(``,!0),eg[ag.value.index]?(openBlock(),createElementBlock(`button`,{key:1,class:normalizeClass([`shrink-0 text-sm px-3 py-1 rounded border`,rg.value?.index===ag.value.index?`border-red-400 text-red-400 hover:bg-red-400/20`:`border-white/60 text-white/60 hover:bg-white/20`]),onClick:Fh[3]||=Ph=>Wg(ag.value.index)},toDisplayString$1(rg.value?.index===ag.value.index?unref(Ih)(`pluginMulmoScript.stop`):unref(Ih)(`pluginMulmoScript.play`)),3)):createCommentVNode(``,!0)])]),ag.value.isCharacter?createCommentVNode(``,!0):(openBlock(),createElementBlock(`button`,{key:1,class:`text-white/60 hover:text-white disabled:opacity-20 text-4xl leading-none`,disabled:!yg.value,onClick:Fh[4]||=Ph=>bg(1)},` › `,8,_hoisted_73))])])):createCommentVNode(``,!0)]))}}),View_default$2=_plugin_vue_export_helper_default(View_vue_vue_type_script_setup_true_lang_default$2,[[`__scopeId`,`data-v-f7ad9276`]]),_hoisted_1$42={class:`p-2 text-sm`},_hoisted_2$42={class:`font-medium text-gray-700 truncate mb-1`},_hoisted_3$39={key:0,class:`text-xs text-gray-500 leading-relaxed`},Preview_vue_vue_type_script_setup_true_lang_default$2=defineComponent({__name:`Preview`,props:{result:{}},setup(Ph){let Fh=Ph,Ih=computed(()=>Fh.result.data),Lh=computed(()=>Ih.value?.script),Rh=computed(()=>Lh.value?.title||Ih.value?.filePath?.split(`/`).pop()||`MulmoScript`),zh=computed(()=>Lh.value?.description);return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$42,[createBaseVNode(`div`,_hoisted_2$42,toDisplayString$1(Rh.value),1),zh.value?(openBlock(),createElementBlock(`div`,_hoisted_3$39,toDisplayString$1(zh.value),1)):createCommentVNode(``,!0)]))}}),Preview_default$2=Preview_vue_vue_type_script_setup_true_lang_default$2,presentMulmoScriptPlugin={toolDefinition:toolDefinition$2,async execute(Ph,Fh){let Ih=await apiPost(API_ROUTES.mulmoScript.save,Fh);return Ih.ok?{...Ih.data,toolName:TOOL_NAME$2,uuid:makeUuid()}:{toolName:TOOL_NAME$2,uuid:makeUuid(),message:Ih.error}},isEnabled:()=>!0,generatingMessage:`Generating MulmoScript storyboard…`,viewComponent:View_default$2,previewComponent:Preview_default$2},TOOL_NAME$1=`presentHtml`,toolDefinition$1={type:`function`,name:TOOL_NAME$1,description:`Save and present a complete, self-contained HTML page in the canvas. Claude generates the HTML and calls this tool to display it. Use for rich interactive output, dashboards, custom layouts, or any content best expressed as HTML.`,parameters:{type:`object`,properties:{html:{type:`string`,description:`Complete, self-contained HTML string. All CSS and JavaScript must be inline or loaded via CDN. Must be a full document (include <!DOCTYPE html> and <html>/<body> tags).`},title:{type:`string`,description:`Short label shown in the preview sidebar.`}},required:[`html`]}},_hoisted_1$41={class:`h-full flex flex-col overflow-hidden`},_hoisted_2$41={class:`px-4 py-2 border-b border-gray-100 shrink-0 flex items-center justify-between`},_hoisted_3$38={class:`text-sm font-medium text-gray-700 truncate`},_hoisted_4$33={class:`flex items-center gap-2`},_hoisted_5$28=[`title`],_hoisted_6$28={key:0,class:`border-b border-gray-100 shrink-0`},_hoisted_7$26=[`value`],_hoisted_8$24=[`srcdoc`],PRINT_STYLE=`<style>@media print {
4833
+ `);Rh=Bh.pop()??``;for(let Ph of Bh){let Ih=parseSSEEventLine(Ph);Ih&&applyMovieEvent(Ih,Fh)}}}var ACTIVE_SESSION_KEY=Symbol(`activeSession`);function provideActiveSession(Ph){provide(ACTIVE_SESSION_KEY,Ph)}function useActiveSession(){return inject(ACTIVE_SESSION_KEY)}var _hoisted_1$43={class:`h-full bg-white flex flex-col overflow-hidden`},_hoisted_2$43={class:`flex items-start justify-between px-6 py-4 border-b border-gray-100 shrink-0`},_hoisted_3$40={class:`min-w-0 flex-1`},_hoisted_4$34={class:`text-lg font-semibold text-gray-800 truncate`},_hoisted_5$29={key:0,class:`text-sm text-gray-500 mt-0.5 truncate`},_hoisted_6$29={class:`flex items-center gap-3 mt-1 text-xs text-gray-400`},_hoisted_7$27={key:0},_hoisted_8$25={key:1,class:`truncate`},_hoisted_9$22={class:`ml-4 shrink-0 flex gap-2`},_hoisted_10$21=[`href`],_hoisted_11$18=[`disabled`],_hoisted_12$17={key:0,class:`animate-spin w-3 h-3 shrink-0`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_13$15={key:1},_hoisted_14$13={key:0,class:`border-b border-gray-100 shrink-0 px-4 py-3`},_hoisted_15$11={class:`flex items-center justify-between mb-2`},_hoisted_16$10={class:`text-xs font-semibold text-gray-500 uppercase tracking-wide`},_hoisted_17$10=[`disabled`],_hoisted_18$10={class:`flex gap-3 flex-wrap`},_hoisted_19$10=[`onDragover`,`onDragleave`,`onDrop`],_hoisted_20$6=[`src`,`alt`,`onClick`],_hoisted_21$6={key:1,class:`animate-spin w-4 h-4 text-green-400`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_22$6={key:2,class:`text-xs text-red-400 text-center px-1`},_hoisted_23$5={key:3,class:`text-xs text-gray-300 text-center px-1 leading-tight`},_hoisted_24$4={key:4,class:`absolute bottom-0 inset-x-0 text-center text-xs text-gray-400 bg-white/70 py-0.5 pointer-events-none`},_hoisted_25$4={key:5,class:`absolute inset-0 flex items-center justify-center bg-blue-50/80 pointer-events-none`},_hoisted_26$4={class:`text-xs text-blue-500 font-medium`},_hoisted_27$4=[`disabled`,`onClick`],_hoisted_28$3={key:0,class:`inline-block animate-spin`},_hoisted_29$3={key:1},_hoisted_30$3=[`disabled`,`onClick`],_hoisted_31$3={key:0,class:`animate-spin w-3 h-3`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_32$3={key:1},_hoisted_33$2={class:`text-xs text-gray-600 text-center truncate w-full`},_hoisted_34$1={class:`flex gap-3 items-stretch`},_hoisted_35$1=[`onDragover`,`onDragleave`,`onDrop`],_hoisted_36$1=[`src`,`alt`,`onClick`],_hoisted_37$1=[`disabled`,`onClick`],_hoisted_38$1={key:2,class:`w-full aspect-video flex flex-col items-center justify-center gap-1 p-2`},_hoisted_39$1={class:`text-xs text-green-500`},_hoisted_40$1={key:1,class:`text-xs text-red-400 text-center`},_hoisted_41$1={key:0,class:`text-xs text-gray-400 text-center italic leading-relaxed px-1`},_hoisted_42$1={key:1,class:`text-xs text-gray-300`},_hoisted_43$1={key:3,class:`absolute inset-0 flex items-center justify-center bg-blue-50/80 pointer-events-none`},_hoisted_44$1={class:`text-xs text-blue-500 font-medium`},_hoisted_45$1={key:4,class:`absolute bottom-0 inset-x-0 text-center text-xs text-gray-400 bg-white/70 py-0.5 pointer-events-none`},_hoisted_46$1=[`onClick`],_hoisted_47$1={class:`flex flex-col flex-1 min-w-0 px-2 py-1.5`},_hoisted_48$1={class:`text-sm text-gray-800 leading-relaxed`},_hoisted_49$1={class:`flex justify-between mt-auto pt-1`},_hoisted_50$1={class:`flex items-center gap-1`},_hoisted_51$1={key:0,class:`animate-spin w-3 h-3 text-green-400`,viewBox:`0 0 24 24`,fill:`none`},_hoisted_52$1=[`onClick`],_hoisted_53$1=[`title`],_hoisted_54$1=[`disabled`,`onClick`],_hoisted_55$1=[`onClick`],_hoisted_56$1=[`title`,`onClick`],_hoisted_57$1={key:0,class:`border-t border-gray-100`},_hoisted_58$1=[`onUpdate:modelValue`],_hoisted_59$1={class:`flex items-center justify-end gap-2 px-2 pb-2`},_hoisted_60$1={key:0,class:`text-xs text-red-600`,role:`alert`},_hoisted_61$1=[`disabled`,`onClick`],_hoisted_62$1={key:0,class:`flex items-center justify-center h-32 text-gray-400 text-sm`},_hoisted_63$1={class:`bottom-bar-wrapper`},_hoisted_64$1={class:`editor-actions`},_hoisted_65=[`disabled`],_hoisted_66=[`title`],_hoisted_67={class:`material-icons`},_hoisted_68=[`disabled`],_hoisted_69={class:`flex flex-col items-center gap-3`},_hoisted_70=[`src`],_hoisted_71={class:`flex items-center gap-4`},_hoisted_72={key:0,class:`max-w-[80vw] text-center text-white text-2xl leading-relaxed`},_hoisted_73=[`disabled`],View_vue_vue_type_script_setup_true_lang_default$2=defineComponent({__name:`View`,props:{selectedResult:{}},emits:[`updateResult`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=computed(()=>Lh.selectedResult.data),Bh=computed(()=>zh.value?.script??{}),Vh=computed(()=>zh.value?.filePath??``),Hh=computed(()=>Bh.value.beats??[]),Uh=API_ROUTES.mulmoScript.downloadMovie,Wh=reactive({}),Gh=reactive({}),Kh=reactive({}),qh=reactive({}),Jh=reactive({}),Yh=reactive({}),Xh=reactive({}),Zh=reactive({}),Qh=ref(!1),$h=ref(null),eg=reactive({}),tg=reactive({}),ng=reactive({}),rg=ref(null),ig=ref(null),ag=ref(null),og=reactive({}),sg=reactive({}),cg=reactive({}),lg=reactive({}),ug=reactive({}),dg=computed(()=>Object.values(Wh).some(Ph=>Ph===`rendering`)),fg=computed(()=>{let Ph=Bh.value.imageParams?.images??{};return Object.keys(Ph).filter(Fh=>Ph[Fh]?.type===`imagePrompt`)}),pg=useActiveSession(),mg=computed(()=>pg?.value?.id),hg=computed(()=>{let Ph={},Fh=pg?.value?.pendingGenerations??{},Ih=Vh.value;if(!Ih)return Ph;for(let[Lh,Rh]of Object.entries(Fh))Rh.filePath===Ih&&(Ph[Lh]=Rh);return Ph});function gg(Ph){return Bh.value.imageParams?.images?.[Ph]?.prompt??``}function _g(Ph){rg.value&&=(rg.value.audio.pause(),null),ag.value={src:Gh[Ph],text:Fg(Ph).text,index:Ph}}let vg=computed(()=>{if(!ag.value)return!1;for(let Ph=ag.value.index-1;Ph>=0;Ph--)if(Gh[Ph])return!0;return!1}),yg=computed(()=>{if(!ag.value)return!1;for(let Ph=ag.value.index+1;Ph<Hh.value.length;Ph++)if(Gh[Ph])return!0;return!1});function bg(Ph){if(!ag.value)return;let Fh=Hh.value.length,Ih=ag.value.index+Ph;for(;Ih>=0&&Ih<Fh;){if(Gh[Ih]){_g(Ih);return}Ih+=Ph}}let xg=ref(),Sg=ref(!1),Cg=ref(``),{copied:wg,copy:Tg}=useClipboardCopy(),Eg=computed(()=>({...Bh.value,beats:Hh.value.map((Ph,Fh)=>Zh[Fh]??Ph)})),Dg=computed(()=>JSON.stringify(Eg.value,null,2)),Og=ref(``),kg=computed(()=>Cg.value!==Og.value),Ag=computed(()=>{try{let Ph=JSON.parse(Cg.value);return mulmoScriptSchema.safeParse(Ph).success}catch{return!1}});async function jg(Ph){if(Sg.value=Ph,Ph){let Ph=Dg.value;if(Vh.value){let Fh=await apiGet(API_ROUTES.files.content,{path:Vh.value});Fh.ok&&Fh.data.content&&(Ph=Fh.data.content)}Cg.value=Ph,Og.value=Ph}}function Mg(){xg.value&&(xg.value.open=!1)}async function Ng(){let Ph;try{Ph=JSON.parse(Cg.value)}catch(Ph){alert(extractErrorMessage(Ph));return}let Fh=await apiPost(API_ROUTES.mulmoScript.updateScript,{filePath:Vh.value,script:Ph});if(!Fh.ok){alert(Fh.error||`Update failed`);return}Rh(`updateResult`,{...Lh.selectedResult,data:{...Lh.selectedResult.data,script:Ph}}),xg.value&&(xg.value.open=!1),await n_()}async function Pg(){await Tg(Dg.value)}function Fg(Ph){return Zh[Ph]??Hh.value[Ph]??{}}function Ig(Ph){qh[Ph]||(Jh[Ph]=JSON.stringify(Fg(Ph),null,2),delete Yh[Ph]),qh[Ph]=!qh[Ph]}function Lg(Ph){return validateBeatJSON(Jh[Ph]??``,mulmoBeatSchema)}async function Rg(Ph){let Fh;try{Fh=JSON.parse(Jh[Ph])}catch(Fh){Yh[Ph]={kind:`invalidJson`,error:errorMessage(Fh)};return}let Ih=JSON.stringify(Fg(Ph).image);delete Yh[Ph],Xh[Ph]=!0;let Lh=await apiPost(API_ROUTES.mulmoScript.updateBeat,{filePath:Vh.value,beatIndex:Ph,beat:Fh});if(delete Xh[Ph],!Lh.ok){Yh[Ph]={kind:`saveFailed`,error:Lh.error};return}Zh[Ph]=Fh,qh[Ph]=!1,JSON.stringify(Fh.image)!==Ih&&(delete Gh[Ph],zg(Ph))}async function zg(Ph){Wh[Ph]=`rendering`;let Fh=await apiPost(API_ROUTES.mulmoScript.renderBeat,{filePath:Vh.value,beatIndex:Ph,chatSessionId:mg.value});if(!Fh.ok){Kh[Ph]=Fh.error||`Render failed`,Wh[Ph]=`error`;return}if(Fh.data.error){Kh[Ph]=Fh.data.error,Wh[Ph]=`error`;return}Gh[Ph]=Fh.data.image??``,Wh[Ph]=`done`,$g()}async function Bg(Ph){delete Gh[Ph],Wh[Ph]=`rendering`;let Fh=await apiPost(API_ROUTES.mulmoScript.renderBeat,{filePath:Vh.value,beatIndex:Ph,force:!0,chatSessionId:mg.value});if(!Fh.ok){Kh[Ph]=Fh.error||`Render failed`,Wh[Ph]=`error`;return}if(Fh.data.error){Kh[Ph]=Fh.data.error,Wh[Ph]=`error`;return}Gh[Ph]=Fh.data.image??``,Wh[Ph]=`done`}async function Vg(Ph){let Fh=await apiGet(API_ROUTES.mulmoScript.beatImage,{filePath:Vh.value,beatIndex:String(Ph)});Fh.ok&&Fh.data.image&&(Gh[Ph]=Fh.data.image,Wh[Ph]=`done`)}async function Hg(Ph){let Fh=await apiGet(API_ROUTES.mulmoScript.beatAudio,{filePath:Vh.value,beatIndex:String(Ph)});Fh.ok&&Fh.data.audio&&(eg[Ph]=Fh.data.audio,tg[Ph]=`done`)}async function Ug(Ph){tg[Ph]=`generating`,delete ng[Ph];let Fh=await apiPost(API_ROUTES.mulmoScript.generateBeatAudio,{filePath:Vh.value,beatIndex:Ph,chatSessionId:mg.value});if(!Fh.ok){ng[Ph]=Fh.error||`Audio generation failed`,tg[Ph]=`error`;return}if(Fh.data.error){ng[Ph]=Fh.data.error,tg[Ph]=`error`;return}eg[Ph]=Fh.data.audio??``,tg[Ph]=`done`}function Wg(Ph){if(rg.value){rg.value.audio.pause();let Fh=rg.value.index;if(rg.value=null,Fh===Ph)return}let Fh=eg[Ph];if(!Fh)return;let Ih=new Audio(Fh);rg.value={index:Ph,audio:Ih},Ih.addEventListener(`ended`,()=>{if(rg.value?.index===Ph&&(rg.value=null,ag.value?.index===Ph)){bg(1);let Fh=ag.value?.index;Fh!==void 0&&Fh!==Ph&&eg[Fh]&&Wg(Fh)}}),Ih.play()}function Gg(Ph,Fh){Ph.dataTransfer?.types.includes(`Files`)&&(Ph.preventDefault(),ug[Fh]=!0)}function Kg(Ph){ug[Ph]=!1}async function qg(Ph,Fh){Ph.preventDefault(),ug[Fh]=!1;let Ih=Ph.dataTransfer?.files[0];if(!Ih||!Ih.type.startsWith(`image/`))return;Wh[Fh]=`rendering`,delete Kh[Fh];let Lh;try{Lh=await new Promise((Ph,Fh)=>{let Lh=new FileReader;Lh.onload=()=>Ph(Lh.result),Lh.onerror=Fh,Lh.readAsDataURL(Ih)})}catch(Ph){Kh[Fh]=errorMessage(Ph),Wh[Fh]=`error`;return}let Rh=await apiPost(API_ROUTES.mulmoScript.uploadBeatImage,{filePath:Vh.value,beatIndex:Fh,imageData:Lh});if(!Rh.ok){Kh[Fh]=Rh.error||`Upload failed`,Wh[Fh]=`error`;return}if(Rh.data.error){Kh[Fh]=Rh.data.error,Wh[Fh]=`error`;return}Gh[Fh]=Rh.data.image??``,Wh[Fh]=`done`}function Jg(Ph,Fh){Ph.dataTransfer?.types.includes(`Files`)&&(Ph.preventDefault(),lg[Fh]=!0)}function Yg(Ph){lg[Ph]=!1}async function Xg(Ph,Fh){Ph.preventDefault(),lg[Fh]=!1;let Ih=Ph.dataTransfer?.files[0];if(!Ih||!Ih.type.startsWith(`image/`))return;og[Fh]=`rendering`,delete cg[Fh];let Lh;try{Lh=await new Promise((Ph,Fh)=>{let Lh=new FileReader;Lh.onload=()=>Ph(Lh.result),Lh.onerror=Fh,Lh.readAsDataURL(Ih)})}catch(Ph){cg[Fh]=errorMessage(Ph),og[Fh]=`error`;return}let Rh=await apiPost(API_ROUTES.mulmoScript.uploadCharacterImage,{filePath:Vh.value,key:Fh,imageData:Lh});if(!Rh.ok){cg[Fh]=Rh.error||`Upload failed`,og[Fh]=`error`;return}if(Rh.data.error){cg[Fh]=Rh.data.error,og[Fh]=`error`;return}sg[Fh]=Rh.data.image??``,og[Fh]=`done`}function Zg(Ph){rg.value&&=(rg.value.audio.pause(),null),ag.value={src:sg[Ph],text:Ph,index:-1,isCharacter:!0}}async function Qg(Ph){let Fh=await apiGet(API_ROUTES.mulmoScript.characterImage,{filePath:Vh.value,key:Ph});Fh.ok&&Fh.data.image&&(sg[Ph]=Fh.data.image,og[Ph]=`done`)}function $g(){getMissingCharacterKeys(fg.value,sg,og).forEach(Ph=>Qg(Ph))}async function e_(Ph,Fh){og[Ph]=`rendering`,delete cg[Ph];let Ih=await apiPost(API_ROUTES.mulmoScript.renderCharacter,{filePath:Vh.value,key:Ph,force:Fh,chatSessionId:mg.value});if(!Ih.ok){cg[Ph]=Ih.error||`Render failed`,og[Ph]=`error`;return}if(Ih.data.error){cg[Ph]=Ih.data.error,og[Ph]=`error`;return}sg[Ph]=Ih.data.image??``,og[Ph]=`done`}async function t_(){await Promise.all(fg.value.filter(Ph=>og[Ph]!==`rendering`).map(Ph=>e_(Ph,!1)))}async function n_(){ig.value&&(ig.value.scrollTop=0),Object.keys(Wh).forEach(Ph=>delete Wh[+Ph]),Object.keys(Gh).forEach(Ph=>delete Gh[+Ph]),Object.keys(Kh).forEach(Ph=>delete Kh[+Ph]),Object.keys(qh).forEach(Ph=>delete qh[+Ph]),Object.keys(Jh).forEach(Ph=>delete Jh[+Ph]),Object.keys(Yh).forEach(Ph=>delete Yh[+Ph]),Object.keys(Xh).forEach(Ph=>delete Xh[+Ph]),Object.keys(Zh).forEach(Ph=>delete Zh[+Ph]),Object.keys(eg).forEach(Ph=>delete eg[+Ph]),Object.keys(tg).forEach(Ph=>delete tg[+Ph]),Object.keys(ng).forEach(Ph=>delete ng[+Ph]),Object.keys(og).forEach(Ph=>delete og[Ph]),Object.keys(sg).forEach(Ph=>delete sg[Ph]),Object.keys(cg).forEach(Ph=>delete cg[Ph]),Object.keys(ug).forEach(Ph=>delete ug[+Ph]),$h.value=null,xg.value&&(xg.value.open=!1);let Ph=[`textSlide`,`markdown`,`chart`,`mermaid`,`html_tailwind`],Fh=fg.value.length>0;if(Hh.value.forEach((Ih,Lh)=>{shouldAutoRenderBeat(Ih,Fh,Ph)?zg(Lh):Ih.imagePrompt&&Vg(Lh),Ih.text&&Hg(Lh)}),fg.value.forEach(Ph=>Qg(Ph)),Vh.value){let Ph=await apiGet(API_ROUTES.mulmoScript.movieStatus,{filePath:Vh.value});Ph.ok&&Ph.data.moviePath&&($h.value=Ph.data.moviePath)}for(let Ph of Object.values(hg.value))r_(Ph)}onMounted(n_),watch(()=>Lh.selectedResult,n_),watch(hg,(Ph,Fh={})=>{for(let[Ih,Lh]of Object.entries(Ph))Ih in Fh||r_(Lh);for(let[Ih,Lh]of Object.entries(Fh))Ih in Ph||i_(Lh).catch(Ph=>{console.error(`[presentMulmoScript] reload on finish failed:`,Ph)})});function r_(Ph){if(Ph.kind===GENERATION_KINDS.beatImage){let Fh=Number(Ph.key);Gh[Fh]||(Wh[Fh]=`rendering`)}else if(Ph.kind===GENERATION_KINDS.beatAudio){let Fh=Number(Ph.key);eg[Fh]||(tg[Fh]=`generating`)}else Ph.kind===GENERATION_KINDS.characterImage?sg[Ph.key]||(og[Ph.key]=`rendering`):Ph.kind===GENERATION_KINDS.movie&&(Qh.value=!0)}async function i_(Ph){if(Ph.kind===GENERATION_KINDS.beatImage){let Fh=Number(Ph.key);await Vg(Fh),Wh[Fh]===`rendering`&&delete Wh[Fh]}else if(Ph.kind===GENERATION_KINDS.beatAudio){let Fh=Number(Ph.key);await Hg(Fh),tg[Fh]===`generating`&&delete tg[Fh]}else Ph.kind===GENERATION_KINDS.characterImage?(await Qg(Ph.key),og[Ph.key]===`rendering`&&delete og[Ph.key]):Ph.kind===GENERATION_KINDS.movie&&(Qh.value=!1,await a_())}async function a_(){if(!Vh.value)return;let Ph=await apiGet(API_ROUTES.mulmoScript.movieStatus,{filePath:Vh.value});Ph.ok&&Ph.data.moviePath&&($h.value=Ph.data.moviePath)}async function o_(){Qh.value=!0;try{let Ph=await apiFetchRaw(API_ROUTES.mulmoScript.generateMovie,{method:`POST`,body:JSON.stringify({filePath:Vh.value,chatSessionId:mg.value}),headers:{"Content-Type":`application/json`}});if(!Ph.ok||!Ph.body)throw Error(`Generation failed`);await streamMovieEvents(Ph.body,{onBeatImageDone:Ph=>{Vg(Ph),$g()},onBeatAudioDone:Ph=>Hg(Ph),onDone:Ph=>{$h.value=Ph}})}catch(Ph){alert(extractErrorMessage(Ph))}finally{Qh.value=!1}}return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$43,[createBaseVNode(`div`,_hoisted_2$43,[createBaseVNode(`div`,_hoisted_3$40,[createBaseVNode(`h2`,_hoisted_4$34,toDisplayString$1(Bh.value.title||`Untitled Script`),1),Bh.value.description?(openBlock(),createElementBlock(`p`,_hoisted_5$29,toDisplayString$1(Bh.value.description),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$29,[createBaseVNode(`span`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.beatCount`,Hh.value.length,{named:{count:Hh.value.length}})),1),Bh.value.lang?(openBlock(),createElementBlock(`span`,_hoisted_7$27,toDisplayString$1(Bh.value.lang),1)):createCommentVNode(``,!0),Vh.value?(openBlock(),createElementBlock(`span`,_hoisted_8$25,toDisplayString$1(Vh.value),1)):createCommentVNode(``,!0)])]),createBaseVNode(`div`,_hoisted_9$22,[$h.value&&!Qh.value?(openBlock(),createElementBlock(`a`,{key:0,href:`${unref(Uh)}?moviePath=${encodeURIComponent($h.value)}`,download:``,class:`px-3 py-1 text-xs rounded-full border transition-colors border-gray-200 text-gray-500 hover:bg-gray-50 flex items-center justify-center gap-1`},[Fh[7]||=createBaseVNode(`span`,{class:`material-icons text-sm leading-none`},`download`,-1),createBaseVNode(`span`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.movie`)),1)],8,_hoisted_10$21)):createCommentVNode(``,!0),createBaseVNode(`button`,{class:`px-3 py-1 text-xs rounded-full border transition-colors border-gray-200 text-gray-500 hover:bg-gray-50 disabled:opacity-40 flex items-center justify-center gap-1`,disabled:Qh.value,onClick:o_},[Qh.value?(openBlock(),createElementBlock(`svg`,_hoisted_12$17,[...Fh[8]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):createCommentVNode(``,!0),Qh.value?(openBlock(),createElementBlock(`span`,_hoisted_13$15,toDisplayString$1(unref(Ih)(`pluginMulmoScript.generating`)),1)):(openBlock(),createElementBlock(Fragment,{key:2},[Fh[9]||=createBaseVNode(`span`,{class:`material-icons text-sm leading-none`},`refresh`,-1),createBaseVNode(`span`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.movie`)),1)],64))],8,_hoisted_11$18)])]),fg.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_14$13,[createBaseVNode(`div`,_hoisted_15$11,[createBaseVNode(`span`,_hoisted_16$10,toDisplayString$1(unref(Ih)(`pluginMulmoScript.characters`)),1),createBaseVNode(`button`,{class:`px-2 py-0.5 text-xs rounded border border-gray-300 text-gray-500 hover:bg-gray-50 disabled:opacity-50`,disabled:Qh.value||dg.value||fg.value.every(Ph=>og[Ph]===`rendering`),onClick:t_},toDisplayString$1(unref(Ih)(`pluginMulmoScript.generateAll`)),9,_hoisted_17$10)]),createBaseVNode(`div`,_hoisted_18$10,[(openBlock(!0),createElementBlock(Fragment,null,renderList(fg.value,Ph=>(openBlock(),createElementBlock(`div`,{key:Ph,class:`flex flex-col items-center gap-1 w-36`},[createBaseVNode(`div`,{class:normalizeClass([`relative w-36 h-36 rounded-lg border overflow-hidden bg-gray-50 flex items-center justify-center transition-colors`,lg[Ph]?`border-blue-400 bg-blue-50`:`border-gray-200`]),onDragover:Fh=>Jg(Fh,Ph),onDragleave:Fh=>Yg(Ph),onDrop:Fh=>Xg(Fh,Ph)},[sg[Ph]?(openBlock(),createElementBlock(`img`,{key:0,src:sg[Ph],class:`w-full h-full object-cover cursor-zoom-in`,alt:Ph,onClick:Fh=>Zg(Ph)},null,8,_hoisted_20$6)):og[Ph]===`rendering`?(openBlock(),createElementBlock(`svg`,_hoisted_21$6,[...Fh[10]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):og[Ph]===`error`?(openBlock(),createElementBlock(`span`,_hoisted_22$6,toDisplayString$1(cg[Ph]),1)):(openBlock(),createElementBlock(`span`,_hoisted_23$5,toDisplayString$1(gg(Ph)),1)),lg[Ph]?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_24$4,toDisplayString$1(unref(Ih)(`pluginMulmoScript.orDropImage`)),1)),lg[Ph]?(openBlock(),createElementBlock(`div`,_hoisted_25$4,[createBaseVNode(`span`,_hoisted_26$4,toDisplayString$1(unref(Ih)(`pluginMulmoScript.drop`)),1)])):createCommentVNode(``,!0),sg[Ph]&&og[Ph]!==`rendering`?(openBlock(),createElementBlock(`button`,{key:6,class:normalizeClass([`absolute top-0.5 right-0.5 px-1 py-0.5 text-xs rounded border bg-white`,Qh.value||dg.value?`border-yellow-400 text-yellow-500 cursor-not-allowed`:`border-gray-400 text-gray-600 hover:bg-gray-50`]),disabled:Qh.value||dg.value,onClick:withModifiers(Fh=>e_(Ph,!0),[`stop`])},[Qh.value||dg.value?(openBlock(),createElementBlock(`span`,_hoisted_28$3,`↺`)):(openBlock(),createElementBlock(`span`,_hoisted_29$3,`↺`))],10,_hoisted_27$4)):!sg[Ph]&&og[Ph]!==`rendering`?(openBlock(),createElementBlock(`button`,{key:7,class:normalizeClass([`absolute top-0.5 right-0.5 px-1 py-0.5 text-xs rounded border bg-white`,Qh.value||dg.value?`border-yellow-400 text-yellow-500 cursor-not-allowed`:`border-blue-400 text-blue-600 hover:bg-blue-50`]),disabled:Qh.value||dg.value,onClick:withModifiers(Fh=>e_(Ph,!1),[`stop`])},[Qh.value||dg.value?(openBlock(),createElementBlock(`svg`,_hoisted_31$3,[...Fh[11]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):(openBlock(),createElementBlock(`span`,_hoisted_32$3,toDisplayString$1(unref(Ih)(`pluginMulmoScript.gen`)),1))],10,_hoisted_30$3)):createCommentVNode(``,!0)],42,_hoisted_19$10),createBaseVNode(`span`,_hoisted_33$2,toDisplayString$1(Ph),1)]))),128))])])):createCommentVNode(``,!0),createBaseVNode(`div`,{ref_key:`beatListEl`,ref:ig,class:`flex-1 overflow-y-auto p-2 space-y-1.5`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Hh.value,(Ph,Lh)=>(openBlock(),createElementBlock(`div`,{key:Lh,class:`rounded-lg border border-gray-200 overflow-hidden`},[createBaseVNode(`div`,_hoisted_34$1,[createBaseVNode(`div`,{class:normalizeClass([`relative shrink-0 w-[45%] overflow-hidden bg-gray-50 transition-colors`,ug[Lh]?`bg-blue-50`:``]),onDragover:Ph=>Gg(Ph,Lh),onDragleave:Ph=>Kg(Lh),onDrop:Ph=>qg(Ph,Lh)},[Gh[Lh]?(openBlock(),createElementBlock(`img`,{key:0,src:Gh[Lh],class:`w-full object-contain cursor-zoom-in`,alt:`Beat ${Lh+1}`,onClick:Ph=>_g(Lh)},null,8,_hoisted_36$1)):createCommentVNode(``,!0),Gh[Lh]&&Wh[Lh]!==`rendering`?(openBlock(),createElementBlock(`button`,{key:1,class:`absolute top-1.5 right-1.5 flex items-center gap-1 px-2 py-0.5 text-xs rounded border border-gray-400 text-gray-600 bg-white hover:bg-gray-50 disabled:opacity-60 disabled:cursor-not-allowed`,disabled:Qh.value,onClick:withModifiers(Ph=>Bg(Lh),[`stop`])},` ↺ `,8,_hoisted_37$1)):Gh[Lh]?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_38$1,[Wh[Lh]===`rendering`||Qh.value&&!Gh[Lh]&&Fg(Lh).imagePrompt?(openBlock(),createElementBlock(Fragment,{key:0},[Fh[12]||=createBaseVNode(`svg`,{class:`animate-spin w-4 h-4 text-green-400`,viewBox:`0 0 24 24`,fill:`none`},[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`})],-1),createBaseVNode(`span`,_hoisted_39$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.rendering`)),1)],64)):Wh[Lh]===`error`?(openBlock(),createElementBlock(`span`,_hoisted_40$1,toDisplayString$1(Kh[Lh]),1)):(openBlock(),createElementBlock(Fragment,{key:2},[Fg(Lh).imagePrompt?(openBlock(),createElementBlock(`span`,_hoisted_41$1,toDisplayString$1(Fg(Lh).imagePrompt),1)):(openBlock(),createElementBlock(`span`,_hoisted_42$1,toDisplayString$1(Ph.image?.type??`—`),1))],64))])),ug[Lh]?(openBlock(),createElementBlock(`div`,_hoisted_43$1,[createBaseVNode(`span`,_hoisted_44$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.drop`)),1)])):!Gh[Lh]&&Wh[Lh]!==`rendering`?(openBlock(),createElementBlock(`div`,_hoisted_45$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.orDropImage`)),1)):createCommentVNode(``,!0),Fg(Lh).imagePrompt&&!Gh[Lh]&&Wh[Lh]!==`rendering`&&!Qh.value?(openBlock(),createElementBlock(`button`,{key:5,class:`absolute top-1.5 right-1.5 flex items-center gap-1 px-2 py-0.5 text-xs rounded border border-blue-400 text-blue-600 bg-white hover:bg-blue-50`,onClick:Ph=>zg(Lh)},toDisplayString$1(unref(Ih)(`pluginMulmoScript.generate`)),9,_hoisted_46$1)):createCommentVNode(``,!0)],42,_hoisted_35$1),createBaseVNode(`div`,_hoisted_47$1,[createBaseVNode(`span`,_hoisted_48$1,toDisplayString$1(Fg(Lh).text),1),createBaseVNode(`div`,_hoisted_49$1,[createBaseVNode(`div`,_hoisted_50$1,[tg[Lh]===`generating`||Qh.value&&!eg[Lh]&&Fg(Lh).text?(openBlock(),createElementBlock(`svg`,_hoisted_51$1,[...Fh[13]||=[createBaseVNode(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),createBaseVNode(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8v8H4z`},null,-1)]])):eg[Lh]?(openBlock(),createElementBlock(`button`,{key:1,class:normalizeClass([`text-xs px-2 py-0.5 rounded border`,rg.value?.index===Lh?`border-red-400 text-red-600 hover:bg-red-50`:`border-green-400 text-green-600 hover:bg-green-50`]),onClick:Ph=>Wg(Lh)},toDisplayString$1(rg.value?.index===Lh?unref(Ih)(`pluginMulmoScript.stop`):unref(Ih)(`pluginMulmoScript.play`)),11,_hoisted_52$1)):ng[Lh]?(openBlock(),createElementBlock(Fragment,{key:2},[createBaseVNode(`span`,{class:`text-xs text-red-400`,title:ng[Lh]},toDisplayString$1(unref(Ih)(`pluginMulmoScript.errPrefix`)),9,_hoisted_53$1),Fg(Lh).text?(openBlock(),createElementBlock(`button`,{key:0,class:`text-xs px-2 py-0.5 rounded border border-gray-300 text-gray-500 hover:bg-gray-50 disabled:opacity-50`,disabled:Qh.value,onClick:Ph=>Ug(Lh)},` ↺ `,8,_hoisted_54$1)):createCommentVNode(``,!0)],64)):Fg(Lh).text?(openBlock(),createElementBlock(`button`,{key:3,class:`text-xs px-2 py-0.5 rounded border border-gray-300 text-gray-500 hover:bg-gray-50`,onClick:Ph=>Ug(Lh)},toDisplayString$1(unref(Ih)(`pluginMulmoScript.generateAudio`)),9,_hoisted_55$1)):createCommentVNode(``,!0)]),createBaseVNode(`button`,{class:`text-gray-400 hover:text-gray-600`,title:qh[Lh]?`Hide source`:`Show source`,onClick:Ph=>Ig(Lh)},[...Fh[14]||=[createBaseVNode(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[createBaseVNode(`polyline`,{points:`16 18 22 12 16 6`}),createBaseVNode(`polyline`,{points:`8 6 2 12 8 18`})],-1)]],8,_hoisted_56$1)])])]),qh[Lh]?(openBlock(),createElementBlock(`div`,_hoisted_57$1,[withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Ph=>Jh[Lh]=Ph,class:normalizeClass([`w-full text-xs text-gray-600 bg-gray-50 p-2 font-mono resize-none`,Lg(Lh)?`outline-none`:`outline outline-2 outline-red-400`]),rows:`8`,spellcheck:`false`},null,10,_hoisted_58$1),[[vModelText,Jh[Lh]]]),createBaseVNode(`div`,_hoisted_59$1,[Yh[Lh]?(openBlock(),createElementBlock(`span`,_hoisted_60$1,toDisplayString$1(unref(Ih)(Yh[Lh].kind===`invalidJson`?`pluginMulmoScript.saveErrorInvalidJson`:`pluginMulmoScript.saveErrorSaveFailed`,{error:Yh[Lh].error})),1)):createCommentVNode(``,!0),createBaseVNode(`button`,{class:normalizeClass([`px-2 py-1 text-xs rounded border`,Lg(Lh)&&!Xh[Lh]?`border-blue-400 text-blue-600 hover:bg-blue-50 cursor-pointer`:`border-gray-200 text-gray-300 cursor-not-allowed`]),disabled:!Lg(Lh)||!!Xh[Lh],onClick:Ph=>Rg(Lh)},toDisplayString$1(Xh[Lh]?unref(Ih)(`pluginMulmoScript.saving`):unref(Ih)(`pluginMulmoScript.update`)),11,_hoisted_61$1)])])):createCommentVNode(``,!0)]))),128)),Hh.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_62$1,toDisplayString$1(unref(Ih)(`pluginMulmoScript.noBeats`)),1)):createCommentVNode(``,!0)],512),createBaseVNode(`div`,_hoisted_63$1,[createBaseVNode(`details`,{ref_key:`sourceDetails`,ref:xg,class:`script-source`,onToggle:Fh[1]||=Ph=>jg(Ph.target.open)},[createBaseVNode(`summary`,null,toDisplayString$1(unref(Ih)(`pluginMulmoScript.editSource`)),1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Fh[0]||=Ph=>Cg.value=Ph,class:normalizeClass([`script-editor`,{"script-editor-invalid":kg.value&&!Ag.value}]),spellcheck:`false`},null,2),[[vModelText,Cg.value]]),createBaseVNode(`div`,_hoisted_64$1,[createBaseVNode(`button`,{class:`apply-btn`,disabled:!kg.value||!Ag.value,onClick:Ng},toDisplayString$1(unref(Ih)(`pluginMulmoScript.applyChanges`)),9,_hoisted_65),createBaseVNode(`button`,{class:`cancel-btn`,onClick:Mg},toDisplayString$1(unref(Ih)(`common.cancel`)),1)])],544),withDirectives(createBaseVNode(`button`,{class:`copy-btn`,title:unref(wg)?`Copied!`:`Copy`,onClick:Pg},[createBaseVNode(`span`,_hoisted_67,toDisplayString$1(unref(wg)?`check`:`content_copy`),1)],8,_hoisted_66),[[vShow,!Sg.value]])]),ag.value?(openBlock(),createElementBlock(`div`,{key:1,class:`fixed inset-0 z-50 flex items-center justify-center bg-black/80`,onClick:Fh[6]||=Ph=>ag.value=null},[createBaseVNode(`div`,{class:`flex items-center gap-4`,onClick:Fh[5]||=withModifiers(()=>{},[`stop`])},[ag.value.isCharacter?createCommentVNode(``,!0):(openBlock(),createElementBlock(`button`,{key:0,class:`text-white/60 hover:text-white disabled:opacity-20 text-4xl leading-none`,disabled:!vg.value,onClick:Fh[2]||=Ph=>bg(-1)},` ‹ `,8,_hoisted_68)),createBaseVNode(`div`,_hoisted_69,[createBaseVNode(`img`,{src:ag.value.src,class:`max-w-[80vw] max-h-[80vh] object-contain rounded shadow-2xl`},null,8,_hoisted_70),createBaseVNode(`div`,_hoisted_71,[ag.value.text?(openBlock(),createElementBlock(`p`,_hoisted_72,toDisplayString$1(ag.value.text),1)):createCommentVNode(``,!0),eg[ag.value.index]?(openBlock(),createElementBlock(`button`,{key:1,class:normalizeClass([`shrink-0 text-sm px-3 py-1 rounded border`,rg.value?.index===ag.value.index?`border-red-400 text-red-400 hover:bg-red-400/20`:`border-white/60 text-white/60 hover:bg-white/20`]),onClick:Fh[3]||=Ph=>Wg(ag.value.index)},toDisplayString$1(rg.value?.index===ag.value.index?unref(Ih)(`pluginMulmoScript.stop`):unref(Ih)(`pluginMulmoScript.play`)),3)):createCommentVNode(``,!0)])]),ag.value.isCharacter?createCommentVNode(``,!0):(openBlock(),createElementBlock(`button`,{key:1,class:`text-white/60 hover:text-white disabled:opacity-20 text-4xl leading-none`,disabled:!yg.value,onClick:Fh[4]||=Ph=>bg(1)},` › `,8,_hoisted_73))])])):createCommentVNode(``,!0)]))}}),View_default$2=_plugin_vue_export_helper_default(View_vue_vue_type_script_setup_true_lang_default$2,[[`__scopeId`,`data-v-f7ad9276`]]),_hoisted_1$42={class:`p-2 text-sm`},_hoisted_2$42={class:`font-medium text-gray-700 truncate mb-1`},_hoisted_3$39={key:0,class:`text-xs text-gray-500 leading-relaxed`},Preview_vue_vue_type_script_setup_true_lang_default$2=defineComponent({__name:`Preview`,props:{result:{}},setup(Ph){let Fh=Ph,Ih=computed(()=>Fh.result.data),Lh=computed(()=>Ih.value?.script),Rh=computed(()=>Lh.value?.title||Ih.value?.filePath?.split(`/`).pop()||`MulmoScript`),zh=computed(()=>Lh.value?.description);return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$42,[createBaseVNode(`div`,_hoisted_2$42,toDisplayString$1(Rh.value),1),zh.value?(openBlock(),createElementBlock(`div`,_hoisted_3$39,toDisplayString$1(zh.value),1)):createCommentVNode(``,!0)]))}}),Preview_default$2=Preview_vue_vue_type_script_setup_true_lang_default$2,presentMulmoScriptPlugin={toolDefinition:toolDefinition$2,async execute(Ph,Fh){let Ih=await apiPost(API_ROUTES.mulmoScript.save,Fh);return Ih.ok?{...Ih.data,toolName:TOOL_NAME$2,uuid:makeUuid()}:{toolName:TOOL_NAME$2,uuid:makeUuid(),message:Ih.error}},isEnabled:()=>!0,generatingMessage:`Generating MulmoScript storyboard…`,viewComponent:View_default$2,previewComponent:Preview_default$2},TOOL_NAME$1=`presentHtml`,toolDefinition$1={type:`function`,name:TOOL_NAME$1,description:`Save and present a complete, self-contained HTML page in the canvas. Claude generates the HTML and calls this tool to display it. Use for rich interactive output, dashboards, custom layouts, or any content best expressed as HTML.`,parameters:{type:`object`,properties:{html:{type:`string`,description:`Complete, self-contained HTML string. All CSS and JavaScript must be inline or loaded via CDN. Must be a full document (include <!DOCTYPE html> and <html>/<body> tags).`},title:{type:`string`,description:`Short label shown in the preview sidebar.`}},required:[`html`]}},IMG_SRC_RE=/(<img\s[^>]*src=")([^"]+)(")/g;function shouldSkip(Ph){return!!(Ph.startsWith(`data:`)||Ph.startsWith(`http://`)||Ph.startsWith(`https://`)||Ph.startsWith(`/api/`))}function normalizeWorkspacePath(Ph){return Ph.startsWith(`/`)?Ph.slice(1):Ph}function rewriteHtmlImageRefs(Ph){return Ph.replace(IMG_SRC_RE,(Ph,Fh,Ih,Lh)=>{if(shouldSkip(Ih))return Ph;let Rh=normalizeWorkspacePath(Ih);return Rh.length===0?Ph:`${Fh}${resolveImageSrc(Rh)}${Lh}`})}var _hoisted_1$41={class:`h-full flex flex-col overflow-hidden`},_hoisted_2$41={class:`px-4 py-2 border-b border-gray-100 shrink-0 flex items-center justify-between`},_hoisted_3$38={class:`text-sm font-medium text-gray-700 truncate`},_hoisted_4$33={class:`flex items-center gap-2`},_hoisted_5$28=[`title`],_hoisted_6$28={key:0,class:`border-b border-gray-100 shrink-0`},_hoisted_7$26=[`value`],_hoisted_8$24=[`srcdoc`],PRINT_STYLE=`<style>@media print {
4834
4834
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
4835
4835
  body { width: 100% !important; margin: 0 !important; padding: 8px !important; }
4836
4836
  @page { margin: 10mm; }
4837
- }</style>`,View_vue_vue_type_script_setup_true_lang_default$1=defineComponent({__name:`View`,props:{selectedResult:{}},setup(Ph){let{t:Fh}=useI18n(),Ih=Ph,Lh=computed(()=>Ih.selectedResult.data),Rh=computed(()=>Lh.value?.html??``),zh=computed(()=>Rh.value.includes(`</head>`)?Rh.value.replace(`</head>`,`${PRINT_STYLE}</head>`):`${PRINT_STYLE}${Rh.value}`),Bh=computed(()=>Lh.value?.title),Vh=ref(!1),Hh=ref(null);function Uh(){Hh.value?.contentWindow?.print()}return(Ph,Ih)=>(openBlock(),createElementBlock(`div`,_hoisted_1$41,[createBaseVNode(`div`,_hoisted_2$41,[createBaseVNode(`span`,_hoisted_3$38,toDisplayString$1(Bh.value??unref(Fh)(`pluginPresentHtml.untitled`)),1),createBaseVNode(`div`,_hoisted_4$33,[createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded border border-gray-300 text-gray-500 hover:bg-gray-50 shrink-0`,title:unref(Fh)(`pluginPresentHtml.saveAsPdf`),onClick:Uh},[Ih[1]||=createBaseVNode(`span`,{class:`material-icons text-sm align-middle`},`picture_as_pdf`,-1),createTextVNode(` `+toDisplayString$1(unref(Fh)(`pluginPresentHtml.pdf`)),1)],8,_hoisted_5$28),createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded border border-gray-300 text-gray-500 hover:bg-gray-50 shrink-0`,onClick:Ih[0]||=Ph=>Vh.value=!Vh.value},toDisplayString$1(Vh.value?unref(Fh)(`pluginPresentHtml.hideSource`):unref(Fh)(`pluginPresentHtml.showSource`)),1)])]),Vh.value?(openBlock(),createElementBlock(`div`,_hoisted_6$28,[createBaseVNode(`textarea`,{value:zh.value,readonly:``,class:`w-full text-xs text-gray-600 bg-gray-50 p-3 font-mono resize-none outline-none`,rows:`16`},null,8,_hoisted_7$26)])):createCommentVNode(``,!0),createBaseVNode(`iframe`,{ref_key:`iframeRef`,ref:Hh,srcdoc:zh.value,sandbox:`allow-scripts allow-same-origin allow-modals`,class:`flex-1 w-full border-0`},null,8,_hoisted_8$24)]))}}),View_default$1=View_vue_vue_type_script_setup_true_lang_default$1;function stripHtmlToPreview(Ph,Fh){let Ih={out:[],lastWasSpace:!0},Lh=0;for(;Lh<Ph.length;){let Fh=Ph[Lh];if(Fh===`<`){let Fh=Ph.indexOf(`>`,Lh+1);if(Fh!==-1){emitSeparator(Ih),Lh=Fh+1;continue}}emitChar(Ih,Fh),Lh++}return trimTrailingSpace(Ih.out),Ih.out.join(``).slice(0,Fh)}function emitChar(Ph,Fh){if(isWhitespace$1(Fh)){emitSeparator(Ph);return}Ph.out.push(Fh),Ph.lastWasSpace=!1}function emitSeparator(Ph){Ph.lastWasSpace||=(Ph.out.push(` `),!0)}function trimTrailingSpace(Ph){Ph.length>0&&Ph[Ph.length-1]===` `&&Ph.pop()}function isWhitespace$1(Ph){return Ph===` `||Ph===` `||Ph===`
4837
+ }</style>`,View_vue_vue_type_script_setup_true_lang_default$1=defineComponent({__name:`View`,props:{selectedResult:{}},setup(Ph){let{t:Fh}=useI18n(),Ih=Ph,Lh=computed(()=>Ih.selectedResult.data),Rh=computed(()=>rewriteHtmlImageRefs(Lh.value?.html??``)),zh=computed(()=>Rh.value.includes(`</head>`)?Rh.value.replace(`</head>`,`${PRINT_STYLE}</head>`):`${PRINT_STYLE}${Rh.value}`),Bh=computed(()=>Lh.value?.title),Vh=ref(!1),Hh=ref(null);function Uh(){Hh.value?.contentWindow?.print()}return(Ph,Ih)=>(openBlock(),createElementBlock(`div`,_hoisted_1$41,[createBaseVNode(`div`,_hoisted_2$41,[createBaseVNode(`span`,_hoisted_3$38,toDisplayString$1(Bh.value??unref(Fh)(`pluginPresentHtml.untitled`)),1),createBaseVNode(`div`,_hoisted_4$33,[createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded border border-gray-300 text-gray-500 hover:bg-gray-50 shrink-0`,title:unref(Fh)(`pluginPresentHtml.saveAsPdf`),onClick:Uh},[Ih[1]||=createBaseVNode(`span`,{class:`material-icons text-sm align-middle`},`picture_as_pdf`,-1),createTextVNode(` `+toDisplayString$1(unref(Fh)(`pluginPresentHtml.pdf`)),1)],8,_hoisted_5$28),createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded border border-gray-300 text-gray-500 hover:bg-gray-50 shrink-0`,onClick:Ih[0]||=Ph=>Vh.value=!Vh.value},toDisplayString$1(Vh.value?unref(Fh)(`pluginPresentHtml.hideSource`):unref(Fh)(`pluginPresentHtml.showSource`)),1)])]),Vh.value?(openBlock(),createElementBlock(`div`,_hoisted_6$28,[createBaseVNode(`textarea`,{value:zh.value,readonly:``,class:`w-full text-xs text-gray-600 bg-gray-50 p-3 font-mono resize-none outline-none`,rows:`16`},null,8,_hoisted_7$26)])):createCommentVNode(``,!0),createBaseVNode(`iframe`,{ref_key:`iframeRef`,ref:Hh,srcdoc:zh.value,sandbox:`allow-scripts allow-same-origin allow-modals`,class:`flex-1 w-full border-0`},null,8,_hoisted_8$24)]))}}),View_default$1=View_vue_vue_type_script_setup_true_lang_default$1;function stripHtmlToPreview(Ph,Fh){let Ih={out:[],lastWasSpace:!0},Lh=0;for(;Lh<Ph.length;){let Fh=Ph[Lh];if(Fh===`<`){let Fh=Ph.indexOf(`>`,Lh+1);if(Fh!==-1){emitSeparator(Ih),Lh=Fh+1;continue}}emitChar(Ih,Fh),Lh++}return trimTrailingSpace(Ih.out),Ih.out.join(``).slice(0,Fh)}function emitChar(Ph,Fh){if(isWhitespace$1(Fh)){emitSeparator(Ph);return}Ph.out.push(Fh),Ph.lastWasSpace=!1}function emitSeparator(Ph){Ph.lastWasSpace||=(Ph.out.push(` `),!0)}function trimTrailingSpace(Ph){Ph.length>0&&Ph[Ph.length-1]===` `&&Ph.pop()}function isWhitespace$1(Ph){return Ph===` `||Ph===` `||Ph===`
4838
4838
  `||Ph===`\r`||Ph===`\v`||Ph===`\f`}var _hoisted_1$40={class:`p-2 text-sm`},_hoisted_2$40={class:`font-medium text-gray-700 truncate mb-1`},_hoisted_3$37={key:0,class:`text-xs text-gray-500 leading-relaxed truncate`},HINT_MAX_LENGTH=60,Preview_vue_vue_type_script_setup_true_lang_default$1=defineComponent({__name:`Preview`,props:{result:{}},setup(Ph){let Fh=Ph,Ih=computed(()=>Fh.result.data),Lh=computed(()=>Ih.value?.title??`HTML Page`),Rh=computed(()=>stripHtmlToPreview(Ih.value?.html??``,HINT_MAX_LENGTH));return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$40,[createBaseVNode(`div`,_hoisted_2$40,toDisplayString$1(Lh.value),1),Rh.value?(openBlock(),createElementBlock(`div`,_hoisted_3$37,toDisplayString$1(Rh.value),1)):createCommentVNode(``,!0)]))}}),Preview_default$1=Preview_vue_vue_type_script_setup_true_lang_default$1,presentHtmlPlugin={toolDefinition:toolDefinition$1,async execute(Ph,Fh){let Ih=await apiPost(API_ROUTES.html.present,Fh);return Ih.ok?{...Ih.data,toolName:TOOL_NAME$1,uuid:makeUuid()}:{toolName:TOOL_NAME$1,uuid:makeUuid(),message:Ih.error}},isEnabled:()=>!0,generatingMessage:`Presenting HTML page…`,viewComponent:View_default$1,previewComponent:Preview_default$1},TOOL_NAME=`presentChart`,toolDefinition={type:`function`,name:TOOL_NAME,description:"Save and present one or more Apache ECharts visualizations as a single document. Use this for line, bar, area, scatter, pie, candlestick, heatmap, sankey, or graph/network charts — anything ECharts supports. Pass ECharts option object(s) directly; the plugin calls setOption on each one. Use `charts: []` array form even for a single chart so multi-chart dashboards share the same slug.",parameters:{type:`object`,properties:{document:{type:`object`,description:`Chart document. Contains an optional title and an array of chart entries. Each entry has its own ECharts option object that the UI renders independently.`,properties:{title:{type:`string`,description:`Optional human-friendly title for the whole document. Used to derive the file slug and as the preview label.`},charts:{type:`array`,description:`List of charts to render, in order. Each charts[i].option is passed as-is to ECharts' setOption().`,items:{type:`object`,properties:{title:{type:`string`,description:`Optional short label for this specific chart (shown above it in the UI).`},type:{type:`string`,description:`Informational tag shown in the UI (e.g. 'line', 'bar', 'candlestick', 'sankey'). The actual chart type is determined by option.series[].type.`},option:{type:`object`,description:`Full ECharts option object. Include all series, axes, tooltip, legend, dataset — anything ECharts accepts. Keep data inline; large datasets are fine.`}},required:[`option`]}}},required:[`charts`]},title:{type:`string`,description:`Short label shown in the canvas preview sidebar. Defaults to document.title, or 'Chart' when both are blank.`}},required:[`document`]}},extendStatics$1=function(Ph,Fh){return extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ph,Fh){Ph.__proto__=Fh}||function(Ph,Fh){for(var Ih in Fh)Object.prototype.hasOwnProperty.call(Fh,Ih)&&(Ph[Ih]=Fh[Ih])},extendStatics$1(Ph,Fh)};function __extends$1(Ph,Fh){if(typeof Fh!=`function`&&Fh!==null)throw TypeError(`Class extends value `+String(Fh)+` is not a constructor or null`);extendStatics$1(Ph,Fh);function Ih(){this.constructor=Ph}Ph.prototype=Fh===null?Object.create(Fh):(Ih.prototype=Fh.prototype,new Ih)}var Browser=function(){function Ph(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return Ph}(),env=new(function(){function Ph(){this.browser=new Browser,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return Ph}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(env.wxa=!0,env.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?env.worker=!0:!env.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(env.node=!0,env.svgSupported=!0):detect(navigator.userAgent,env);function detect(Ph,Fh){var Ih=Fh.browser,Lh=Ph.match(/Firefox\/([\d.]+)/),Rh=Ph.match(/MSIE\s([\d.]+)/)||Ph.match(/Trident\/.+?rv:(([\d.]+))/),zh=Ph.match(/Edge?\/([\d.]+)/),Bh=/micromessenger/i.test(Ph);if(Lh&&(Ih.firefox=!0,Ih.version=Lh[1]),Rh&&(Ih.ie=!0,Ih.version=Rh[1]),zh&&(Ih.edge=!0,Ih.version=zh[1],Ih.newEdge=+zh[1].split(`.`)[0]>18),Bh&&(Ih.weChat=!0),Fh.svgSupported=typeof SVGRect<`u`,Fh.touchEventsSupported=`ontouchstart`in window&&!Ih.ie&&!Ih.edge,Fh.pointerEventsSupported=`onpointerdown`in window&&(Ih.edge||Ih.ie&&+Ih.version>=11),Fh.domSupported=typeof document<`u`){var Vh=document.documentElement.style;Fh.transform3dSupported=(Ih.ie&&`transition`in Vh||Ih.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in Vh)&&!(`OTransition`in Vh),Fh.transformSupported=Fh.transform3dSupported||Ih.ie&&+Ih.version>=9}}var DEFAULT_FONT_SIZE=12,DEFAULT_FONT_FAMILY=`sans-serif`,DEFAULT_FONT=`12px `+DEFAULT_FONT_FAMILY,OFFSET=20,SCALE=100,defaultWidthMapStr=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function getTextWidthMap(Ph){var Fh={};if(typeof JSON>`u`)return Fh;for(var Ih=0;Ih<Ph.length;Ih++){var Lh=String.fromCharCode(Ih+32);Fh[Lh]=(Ph.charCodeAt(Ih)-OFFSET)/SCALE}return Fh}var DEFAULT_TEXT_WIDTH_MAP=getTextWidthMap(defaultWidthMapStr),platformApi={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var Ph,Fh;return function(Ih,Lh){if(!Ph){var Rh=platformApi.createCanvas();Ph=Rh&&Rh.getContext(`2d`)}if(Ph)return Fh!==Lh&&(Fh=Ph.font=Lh||`12px sans-serif`),Ph.measureText(Ih);Ih||=``,Lh||=`12px sans-serif`;var zh=/((?:\d+)?\.?\d*)px/.exec(Lh),Bh=zh&&+zh[1]||12,Vh=0;if(Lh.indexOf(`mono`)>=0)Vh=Bh*Ih.length;else for(var Hh=0;Hh<Ih.length;Hh++){var Uh=DEFAULT_TEXT_WIDTH_MAP[Ih[Hh]];Vh+=Uh==null?Bh:Uh*Bh}return{width:Vh}}})(),loadImage:function(Ph,Fh,Ih){var Lh=new Image;return Lh.onload=Fh,Lh.onerror=Ih,Lh.src=Ph,Lh}},BUILTIN_OBJECT=reduce([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(Ph,Fh){return Ph[`[object `+Fh+`]`]=!0,Ph},{}),TYPED_ARRAY=reduce([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(Ph,Fh){return Ph[`[object `+Fh+`Array]`]=!0,Ph},{}),objToString=Object.prototype.toString,arrayProto=Array.prototype,nativeForEach=arrayProto.forEach,nativeFilter=arrayProto.filter,nativeSlice=arrayProto.slice,nativeMap=arrayProto.map,ctorFunction=function(){}.constructor,protoFunction=ctorFunction?ctorFunction.prototype:null,protoKey=`__proto__`,idStart=2311;function guid(){return idStart++}function logError(){var Ph=[...arguments];typeof console<`u`&&console.error.apply(console,Ph)}function clone$5(Ph){if(typeof Ph!=`object`||!Ph)return Ph;var Fh=Ph,Ih=objToString.call(Ph);if(Ih===`[object Array]`){if(!isPrimitive(Ph)){Fh=[];for(var Lh=0,Rh=Ph.length;Lh<Rh;Lh++)Fh[Lh]=clone$5(Ph[Lh])}}else if(TYPED_ARRAY[Ih]){if(!isPrimitive(Ph)){var zh=Ph.constructor;if(zh.from)Fh=zh.from(Ph);else{Fh=new zh(Ph.length);for(var Lh=0,Rh=Ph.length;Lh<Rh;Lh++)Fh[Lh]=Ph[Lh]}}}else if(!BUILTIN_OBJECT[Ih]&&!isPrimitive(Ph)&&!isDom(Ph))for(var Bh in Fh={},Ph)Ph.hasOwnProperty(Bh)&&Bh!==protoKey&&(Fh[Bh]=clone$5(Ph[Bh]));return Fh}function merge(Ph,Fh,Ih){if(!isObject$4(Fh)||!isObject$4(Ph))return Ih?clone$5(Fh):Ph;for(var Lh in Fh)if(Fh.hasOwnProperty(Lh)&&Lh!==protoKey){var Rh=Ph[Lh],zh=Fh[Lh];isObject$4(zh)&&isObject$4(Rh)&&!isArray$1(zh)&&!isArray$1(Rh)&&!isDom(zh)&&!isDom(Rh)&&!isBuiltInObject(zh)&&!isBuiltInObject(Rh)&&!isPrimitive(zh)&&!isPrimitive(Rh)?merge(Rh,zh,Ih):(Ih||!(Lh in Ph))&&(Ph[Lh]=clone$5(Fh[Lh]))}return Ph}function mergeAll(Ph,Fh){for(var Ih=Ph[0],Lh=1,Rh=Ph.length;Lh<Rh;Lh++)Ih=merge(Ih,Ph[Lh],Fh);return Ih}function extend$1(Ph,Fh){if(Object.assign)Object.assign(Ph,Fh);else for(var Ih in Fh)Fh.hasOwnProperty(Ih)&&Ih!==protoKey&&(Ph[Ih]=Fh[Ih]);return Ph}function defaults$1(Ph,Fh,Ih){for(var Lh=keys(Fh),Rh=0,zh=Lh.length;Rh<zh;Rh++){var Bh=Lh[Rh];(Ih?Fh[Bh]!=null:Ph[Bh]==null)&&(Ph[Bh]=Fh[Bh])}return Ph}var createCanvas=platformApi.createCanvas;function indexOf(Ph,Fh){if(Ph){if(Ph.indexOf)return Ph.indexOf(Fh);for(var Ih=0,Lh=Ph.length;Ih<Lh;Ih++)if(Ph[Ih]===Fh)return Ih}return-1}function inherits(Ph,Fh){var Ih=Ph.prototype;function Lh(){}for(var Rh in Lh.prototype=Fh.prototype,Ph.prototype=new Lh,Ih)Ih.hasOwnProperty(Rh)&&(Ph.prototype[Rh]=Ih[Rh]);Ph.prototype.constructor=Ph,Ph.superClass=Fh}function mixin$1(Ph,Fh,Ih){if(Ph=`prototype`in Ph?Ph.prototype:Ph,Fh=`prototype`in Fh?Fh.prototype:Fh,Object.getOwnPropertyNames)for(var Lh=Object.getOwnPropertyNames(Fh),Rh=0;Rh<Lh.length;Rh++){var zh=Lh[Rh];zh!==`constructor`&&(Ih?Fh[zh]!=null:Ph[zh]==null)&&(Ph[zh]=Fh[zh])}else defaults$1(Ph,Fh,Ih)}function isArrayLike(Ph){return!Ph||typeof Ph==`string`?!1:typeof Ph.length==`number`}function each$15(Ph,Fh,Ih){if(Ph&&Fh)if(Ph.forEach&&Ph.forEach===nativeForEach)Ph.forEach(Fh,Ih);else if(Ph.length===+Ph.length)for(var Lh=0,Rh=Ph.length;Lh<Rh;Lh++)Fh.call(Ih,Ph[Lh],Lh,Ph);else for(var zh in Ph)Ph.hasOwnProperty(zh)&&Fh.call(Ih,Ph[zh],zh,Ph)}function map$1(Ph,Fh,Ih){if(!Ph)return[];if(!Fh)return slice(Ph);if(Ph.map&&Ph.map===nativeMap)return Ph.map(Fh,Ih);for(var Lh=[],Rh=0,zh=Ph.length;Rh<zh;Rh++)Lh.push(Fh.call(Ih,Ph[Rh],Rh,Ph));return Lh}function reduce(Ph,Fh,Ih,Lh){if(Ph&&Fh){for(var Rh=0,zh=Ph.length;Rh<zh;Rh++)Ih=Fh.call(Lh,Ih,Ph[Rh],Rh,Ph);return Ih}}function filter(Ph,Fh,Ih){if(!Ph)return[];if(!Fh)return slice(Ph);if(Ph.filter&&Ph.filter===nativeFilter)return Ph.filter(Fh,Ih);for(var Lh=[],Rh=0,zh=Ph.length;Rh<zh;Rh++)Fh.call(Ih,Ph[Rh],Rh,Ph)&&Lh.push(Ph[Rh]);return Lh}function find$1(Ph,Fh,Ih){if(Ph&&Fh){for(var Lh=0,Rh=Ph.length;Lh<Rh;Lh++)if(Fh.call(Ih,Ph[Lh],Lh,Ph))return Ph[Lh]}}function keys(Ph){if(!Ph)return[];if(Object.keys)return Object.keys(Ph);var Fh=[];for(var Ih in Ph)Ph.hasOwnProperty(Ih)&&Fh.push(Ih);return Fh}function bindPolyfill(Ph,Fh){var Ih=[...arguments].slice(2);return function(){return Ph.apply(Fh,Ih.concat(nativeSlice.call(arguments)))}}var bind$1=protoFunction&&isFunction(protoFunction.bind)?protoFunction.call.bind(protoFunction.bind):bindPolyfill;function curry$1(Ph){var Fh=[...arguments].slice(1);return function(){return Ph.apply(this,Fh.concat(nativeSlice.call(arguments)))}}function isArray$1(Ph){return Array.isArray?Array.isArray(Ph):objToString.call(Ph)===`[object Array]`}function isFunction(Ph){return typeof Ph==`function`}function isString(Ph){return typeof Ph==`string`}function isStringSafe(Ph){return objToString.call(Ph)===`[object String]`}function isNumber(Ph){return typeof Ph==`number`}function isObject$4(Ph){var Fh=typeof Ph;return Fh===`function`||!!Ph&&Fh===`object`}function isBuiltInObject(Ph){return!!BUILTIN_OBJECT[objToString.call(Ph)]}function isTypedArray(Ph){return!!TYPED_ARRAY[objToString.call(Ph)]}function isDom(Ph){return typeof Ph==`object`&&typeof Ph.nodeType==`number`&&typeof Ph.ownerDocument==`object`}function isGradientObject(Ph){return Ph.colorStops!=null}function isImagePatternObject(Ph){return Ph.image!=null}function isRegExp(Ph){return objToString.call(Ph)===`[object RegExp]`}function eqNaN(Ph){return Ph!==Ph}function retrieve(){for(var Ph=[...arguments],Fh=0,Ih=Ph.length;Fh<Ih;Fh++)if(Ph[Fh]!=null)return Ph[Fh]}function retrieve2(Ph,Fh){return Ph??Fh}function retrieve3(Ph,Fh,Ih){return Ph??Fh??Ih}function slice(Ph){var Fh=[...arguments].slice(1);return nativeSlice.apply(Ph,Fh)}function normalizeCssArray$1(Ph){if(typeof Ph==`number`)return[Ph,Ph,Ph,Ph];var Fh=Ph.length;return Fh===2?[Ph[0],Ph[1],Ph[0],Ph[1]]:Fh===3?[Ph[0],Ph[1],Ph[2],Ph[1]]:Ph}function assert$1(Ph,Fh){if(!Ph)throw Error(Fh)}function trim$1(Ph){return Ph==null?null:typeof Ph.trim==`function`?Ph.trim():Ph.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var primitiveKey=`__ec_primitive__`;function setAsPrimitive(Ph){Ph[primitiveKey]=!0}function isPrimitive(Ph){return Ph[primitiveKey]}var MapPolyfill=function(){function Ph(){this.data={}}return Ph.prototype.delete=function(Ph){var Fh=this.has(Ph);return Fh&&delete this.data[Ph],Fh},Ph.prototype.has=function(Ph){return this.data.hasOwnProperty(Ph)},Ph.prototype.get=function(Ph){return this.data[Ph]},Ph.prototype.set=function(Ph,Fh){return this.data[Ph]=Fh,this},Ph.prototype.keys=function(){return keys(this.data)},Ph.prototype.forEach=function(Ph){var Fh=this.data;for(var Ih in Fh)Fh.hasOwnProperty(Ih)&&Ph(Fh[Ih],Ih)},Ph}(),isNativeMapSupported=typeof Map==`function`;function maybeNativeMap(){return isNativeMapSupported?new Map:new MapPolyfill}var HashMap=function(){function Ph(Fh){var Ih=isArray$1(Fh);this.data=maybeNativeMap();var Lh=this;Fh instanceof Ph?Fh.each(Rh):Fh&&each$15(Fh,Rh);function Rh(Ph,Fh){Ih?Lh.set(Ph,Fh):Lh.set(Fh,Ph)}}return Ph.prototype.hasKey=function(Ph){return this.data.has(Ph)},Ph.prototype.get=function(Ph){return this.data.get(Ph)},Ph.prototype.set=function(Ph,Fh){return this.data.set(Ph,Fh),Fh},Ph.prototype.each=function(Ph,Fh){this.data.forEach(function(Ih,Lh){Ph.call(Fh,Ih,Lh)})},Ph.prototype.keys=function(){var Ph=this.data.keys();return isNativeMapSupported?Array.from(Ph):Ph},Ph.prototype.removeKey=function(Ph){this.data.delete(Ph)},Ph}();function createHashMap(Ph){return new HashMap(Ph)}function concatArray(Ph,Fh){for(var Ih=new Ph.constructor(Ph.length+Fh.length),Lh=0;Lh<Ph.length;Lh++)Ih[Lh]=Ph[Lh];for(var Rh=Ph.length,Lh=0;Lh<Fh.length;Lh++)Ih[Lh+Rh]=Fh[Lh];return Ih}function createObject(Ph,Fh){var Ih;if(Object.create)Ih=Object.create(Ph);else{var Lh=function(){};Lh.prototype=Ph,Ih=new Lh}return Fh&&extend$1(Ih,Fh),Ih}function disableUserSelect(Ph){var Fh=Ph.style;Fh.webkitUserSelect=`none`,Fh.userSelect=`none`,Fh.webkitTapHighlightColor=`rgba(0,0,0,0)`,Fh[`-webkit-touch-callout`]=`none`}function hasOwn(Ph,Fh){return Ph.hasOwnProperty(Fh)}function noop(){}var RADIAN_TO_DEGREE=180/Math.PI,EPSILON$5=2**-52||2**-52,extendStatics=function(Ph,Fh){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ph,Fh){Ph.__proto__=Fh}||function(Ph,Fh){for(var Ih in Fh)Object.prototype.hasOwnProperty.call(Fh,Ih)&&(Ph[Ih]=Fh[Ih])},extendStatics(Ph,Fh)};function __extends(Ph,Fh){if(typeof Fh!=`function`&&Fh!==null)throw TypeError(`Class extends value `+String(Fh)+` is not a constructor or null`);extendStatics(Ph,Fh);function Ih(){this.constructor=Ph}Ph.prototype=Fh===null?Object.create(Fh):(Ih.prototype=Fh.prototype,new Ih)}function create$2(Ph,Fh){return Ph??=0,Fh??=0,[Ph,Fh]}function copy$1(Ph,Fh){return Ph[0]=Fh[0],Ph[1]=Fh[1],Ph}function clone$4(Ph){return[Ph[0],Ph[1]]}function set$1(Ph,Fh,Ih){return Ph[0]=Fh,Ph[1]=Ih,Ph}function add(Ph,Fh,Ih){return Ph[0]=Fh[0]+Ih[0],Ph[1]=Fh[1]+Ih[1],Ph}function scaleAndAdd$1(Ph,Fh,Ih,Lh){return Ph[0]=Fh[0]+Ih[0]*Lh,Ph[1]=Fh[1]+Ih[1]*Lh,Ph}function sub(Ph,Fh,Ih){return Ph[0]=Fh[0]-Ih[0],Ph[1]=Fh[1]-Ih[1],Ph}function len(Ph){return Math.sqrt(lenSquare(Ph))}function lenSquare(Ph){return Ph[0]*Ph[0]+Ph[1]*Ph[1]}function scale$2(Ph,Fh,Ih){return Ph[0]=Fh[0]*Ih,Ph[1]=Fh[1]*Ih,Ph}function normalize$3(Ph,Fh){var Ih=len(Fh);return Ih===0?(Ph[0]=0,Ph[1]=0):(Ph[0]=Fh[0]/Ih,Ph[1]=Fh[1]/Ih),Ph}function distance(Ph,Fh){return Math.sqrt((Ph[0]-Fh[0])*(Ph[0]-Fh[0])+(Ph[1]-Fh[1])*(Ph[1]-Fh[1]))}var dist$1=distance;function distanceSquare(Ph,Fh){return(Ph[0]-Fh[0])*(Ph[0]-Fh[0])+(Ph[1]-Fh[1])*(Ph[1]-Fh[1])}var distSquare=distanceSquare;function lerp$1(Ph,Fh,Ih,Lh){return Ph[0]=Fh[0]+Lh*(Ih[0]-Fh[0]),Ph[1]=Fh[1]+Lh*(Ih[1]-Fh[1]),Ph}function applyTransform$1(Ph,Fh,Ih){var Lh=Fh[0],Rh=Fh[1];return Ph[0]=Ih[0]*Lh+Ih[2]*Rh+Ih[4],Ph[1]=Ih[1]*Lh+Ih[3]*Rh+Ih[5],Ph}function min$1(Ph,Fh,Ih){return Ph[0]=Math.min(Fh[0],Ih[0]),Ph[1]=Math.min(Fh[1],Ih[1]),Ph}function max$1(Ph,Fh,Ih){return Ph[0]=Math.max(Fh[0],Ih[0]),Ph[1]=Math.max(Fh[1],Ih[1]),Ph}var Param=function(){function Ph(Ph,Fh){this.target=Ph,this.topTarget=Fh&&Fh.topTarget}return Ph}(),Draggable=function(){function Ph(Ph){this.handler=Ph,Ph.on(`mousedown`,this._dragStart,this),Ph.on(`mousemove`,this._drag,this),Ph.on(`mouseup`,this._dragEnd,this)}return Ph.prototype._dragStart=function(Ph){for(var Fh=Ph.target;Fh&&!Fh.draggable;)Fh=Fh.parent||Fh.__hostTarget;Fh&&(this._draggingTarget=Fh,Fh.dragging=!0,this._x=Ph.offsetX,this._y=Ph.offsetY,this.handler.dispatchToElement(new Param(Fh,Ph),`dragstart`,Ph.event))},Ph.prototype._drag=function(Ph){var Fh=this._draggingTarget;if(Fh){var Ih=Ph.offsetX,Lh=Ph.offsetY,Rh=Ih-this._x,zh=Lh-this._y;this._x=Ih,this._y=Lh,Fh.drift(Rh,zh,Ph),this.handler.dispatchToElement(new Param(Fh,Ph),`drag`,Ph.event);var Bh=this.handler.findHover(Ih,Lh,Fh).target,Vh=this._dropTarget;this._dropTarget=Bh,Fh!==Bh&&(Vh&&Bh!==Vh&&this.handler.dispatchToElement(new Param(Vh,Ph),`dragleave`,Ph.event),Bh&&Bh!==Vh&&this.handler.dispatchToElement(new Param(Bh,Ph),`dragenter`,Ph.event))}},Ph.prototype._dragEnd=function(Ph){var Fh=this._draggingTarget;Fh&&(Fh.dragging=!1),this.handler.dispatchToElement(new Param(Fh,Ph),`dragend`,Ph.event),this._dropTarget&&this.handler.dispatchToElement(new Param(this._dropTarget,Ph),`drop`,Ph.event),this._draggingTarget=null,this._dropTarget=null},Ph}(),Eventful=function(){function Ph(Ph){Ph&&(this._$eventProcessor=Ph)}return Ph.prototype.on=function(Ph,Fh,Ih,Lh){this._$handlers||={};var Rh=this._$handlers;if(typeof Fh==`function`&&(Lh=Ih,Ih=Fh,Fh=null),!Ih||!Ph)return this;var zh=this._$eventProcessor;Fh!=null&&zh&&zh.normalizeQuery&&(Fh=zh.normalizeQuery(Fh)),Rh[Ph]||(Rh[Ph]=[]);for(var Bh=0;Bh<Rh[Ph].length;Bh++)if(Rh[Ph][Bh].h===Ih)return this;var Vh={h:Ih,query:Fh,ctx:Lh||this,callAtLast:Ih.zrEventfulCallAtLast},Hh=Rh[Ph].length-1,Uh=Rh[Ph][Hh];return Uh&&Uh.callAtLast?Rh[Ph].splice(Hh,0,Vh):Rh[Ph].push(Vh),this},Ph.prototype.isSilent=function(Ph){var Fh=this._$handlers;return!Fh||!Fh[Ph]||!Fh[Ph].length},Ph.prototype.off=function(Ph,Fh){var Ih=this._$handlers;if(!Ih)return this;if(!Ph)return this._$handlers={},this;if(Fh){if(Ih[Ph]){for(var Lh=[],Rh=0,zh=Ih[Ph].length;Rh<zh;Rh++)Ih[Ph][Rh].h!==Fh&&Lh.push(Ih[Ph][Rh]);Ih[Ph]=Lh}Ih[Ph]&&Ih[Ph].length===0&&delete Ih[Ph]}else delete Ih[Ph];return this},Ph.prototype.trigger=function(Ph){var Fh=[...arguments].slice(1);if(!this._$handlers)return this;var Ih=this._$handlers[Ph],Lh=this._$eventProcessor;if(Ih)for(var Rh=Fh.length,zh=Ih.length,Bh=0;Bh<zh;Bh++){var Vh=Ih[Bh];if(!(Lh&&Lh.filter&&Vh.query!=null&&!Lh.filter(Ph,Vh.query)))switch(Rh){case 0:Vh.h.call(Vh.ctx);break;case 1:Vh.h.call(Vh.ctx,Fh[0]);break;case 2:Vh.h.call(Vh.ctx,Fh[0],Fh[1]);break;default:Vh.h.apply(Vh.ctx,Fh);break}}return Lh&&Lh.afterTrigger&&Lh.afterTrigger(Ph),this},Ph.prototype.triggerWithContext=function(Ph){var Fh=[...arguments].slice(1);if(!this._$handlers)return this;var Ih=this._$handlers[Ph],Lh=this._$eventProcessor;if(Ih)for(var Rh=Fh.length,zh=Fh[Rh-1],Bh=Ih.length,Vh=0;Vh<Bh;Vh++){var Hh=Ih[Vh];if(!(Lh&&Lh.filter&&Hh.query!=null&&!Lh.filter(Ph,Hh.query)))switch(Rh){case 0:Hh.h.call(zh);break;case 1:Hh.h.call(zh,Fh[0]);break;case 2:Hh.h.call(zh,Fh[0],Fh[1]);break;default:Hh.h.apply(zh,Fh.slice(1,Rh-1));break}}return Lh&&Lh.afterTrigger&&Lh.afterTrigger(Ph),this},Ph}(),LN2=Math.log(2);function determinant(Ph,Fh,Ih,Lh,Rh,zh){var Bh=Lh+`-`+Rh,Vh=Ph.length;if(zh.hasOwnProperty(Bh))return zh[Bh];if(Fh===1){var Hh=Math.round(Math.log((1<<Vh)-1&~Rh)/LN2);return Ph[Ih][Hh]}for(var Uh=Lh|1<<Ih,Wh=Ih+1;Lh&1<<Wh;)Wh++;for(var Gh=0,Kh=0,qh=0;Kh<Vh;Kh++){var Jh=1<<Kh;Jh&Rh||(Gh+=(qh%2?-1:1)*Ph[Ih][Kh]*determinant(Ph,Fh-1,Wh,Uh,Rh|Jh,zh),qh++)}return zh[Bh]=Gh,Gh}function buildTransformer(Ph,Fh){var Ih=[[Ph[0],Ph[1],1,0,0,0,-Fh[0]*Ph[0],-Fh[0]*Ph[1]],[0,0,0,Ph[0],Ph[1],1,-Fh[1]*Ph[0],-Fh[1]*Ph[1]],[Ph[2],Ph[3],1,0,0,0,-Fh[2]*Ph[2],-Fh[2]*Ph[3]],[0,0,0,Ph[2],Ph[3],1,-Fh[3]*Ph[2],-Fh[3]*Ph[3]],[Ph[4],Ph[5],1,0,0,0,-Fh[4]*Ph[4],-Fh[4]*Ph[5]],[0,0,0,Ph[4],Ph[5],1,-Fh[5]*Ph[4],-Fh[5]*Ph[5]],[Ph[6],Ph[7],1,0,0,0,-Fh[6]*Ph[6],-Fh[6]*Ph[7]],[0,0,0,Ph[6],Ph[7],1,-Fh[7]*Ph[6],-Fh[7]*Ph[7]]],Lh={},Rh=determinant(Ih,8,0,0,0,Lh);if(Rh!==0){for(var zh=[],Bh=0;Bh<8;Bh++)for(var Vh=0;Vh<8;Vh++)zh[Vh]??(zh[Vh]=0),zh[Vh]+=((Bh+Vh)%2?-1:1)*determinant(Ih,7,+(Bh===0),1<<Bh,1<<Vh,Lh)/Rh*Fh[Bh];return function(Ph,Fh,Ih){var Lh=Fh*zh[6]+Ih*zh[7]+1;Ph[0]=(Fh*zh[0]+Ih*zh[1]+zh[2])/Lh,Ph[1]=(Fh*zh[3]+Ih*zh[4]+zh[5])/Lh}}}var EVENT_SAVED_PROP=`___zrEVENTSAVED`,_calcOut$1=[];function transformLocalCoord(Ph,Fh,Ih,Lh,Rh){return transformCoordWithViewport(_calcOut$1,Fh,Lh,Rh,!0)&&transformCoordWithViewport(Ph,Ih,_calcOut$1[0],_calcOut$1[1])}function transformLocalCoordClear(Ph,Fh){Ph&&Ih(Ph),Fh&&Ih(Fh);function Ih(Ph){var Fh=Ph[EVENT_SAVED_PROP];Fh&&(Fh.clearMarkers&&Fh.clearMarkers(),delete Ph[EVENT_SAVED_PROP])}}function transformCoordWithViewport(Ph,Fh,Ih,Lh,Rh){if(Fh.getBoundingClientRect&&env.domSupported&&!isCanvasEl(Fh)){var zh=Fh[EVENT_SAVED_PROP]||(Fh[EVENT_SAVED_PROP]={}),Bh=preparePointerTransformer(prepareCoordMarkers(Fh,zh),zh,Rh);if(Bh)return Bh(Ph,Ih,Lh),!0}return!1}function prepareCoordMarkers(Ph,Fh){var Ih=Fh.markers;if(Ih)return Ih;Ih=Fh.markers=[];for(var Lh=[`left`,`right`],Rh=[`top`,`bottom`],zh=0;zh<4;zh++){var Bh=document.createElement(`div`),Vh=Bh.style,Hh=zh%2,Uh=(zh>>1)%2;Vh.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,Lh[Hh]+`:0`,Rh[Uh]+`:0`,Lh[1-Hh]+`:auto`,Rh[1-Uh]+`:auto`,``].join(`!important;`),Ph.appendChild(Bh),Ih.push(Bh)}return Fh.clearMarkers=function(){each$15(Ih,function(Ph){Ph.parentNode&&Ph.parentNode.removeChild(Ph)})},Ih}function preparePointerTransformer(Ph,Fh,Ih){for(var Lh=Ih?`invTrans`:`trans`,Rh=Fh[Lh],zh=Fh.srcCoords,Bh=[],Vh=[],Hh=!0,Uh=0;Uh<4;Uh++){var Wh=Ph[Uh].getBoundingClientRect(),Gh=2*Uh,Kh=Wh.left,qh=Wh.top;Bh.push(Kh,qh),Hh=Hh&&zh&&Kh===zh[Gh]&&qh===zh[Gh+1],Vh.push(Ph[Uh].offsetLeft,Ph[Uh].offsetTop)}return Hh&&Rh?Rh:(Fh.srcCoords=Bh,Fh[Lh]=Ih?buildTransformer(Vh,Bh):buildTransformer(Bh,Vh))}function isCanvasEl(Ph){return Ph.nodeName.toUpperCase()===`CANVAS`}var replaceReg=/([&<>"'])/g,replaceMap={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function encodeHTML(Ph){return Ph==null?``:(Ph+``).replace(replaceReg,function(Ph,Fh){return replaceMap[Fh]})}var MOUSE_EVENT_REG=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_calcOut=[],firefoxNotSupportOffsetXY=env.browser.firefox&&+env.browser.version.split(`.`)[0]<39;function clientToLocal(Ph,Fh,Ih,Lh){return Ih||={},Lh?calculateZrXY(Ph,Fh,Ih):firefoxNotSupportOffsetXY&&Fh.layerX!=null&&Fh.layerX!==Fh.offsetX?(Ih.zrX=Fh.layerX,Ih.zrY=Fh.layerY):Fh.offsetX==null?calculateZrXY(Ph,Fh,Ih):(Ih.zrX=Fh.offsetX,Ih.zrY=Fh.offsetY),Ih}function calculateZrXY(Ph,Fh,Ih){if(env.domSupported&&Ph.getBoundingClientRect){var Lh=Fh.clientX,Rh=Fh.clientY;if(isCanvasEl(Ph)){var zh=Ph.getBoundingClientRect();Ih.zrX=Lh-zh.left,Ih.zrY=Rh-zh.top;return}else if(transformCoordWithViewport(_calcOut,Ph,Lh,Rh)){Ih.zrX=_calcOut[0],Ih.zrY=_calcOut[1];return}}Ih.zrX=Ih.zrY=0}function getNativeEvent(Ph){return Ph||window.event}function normalizeEvent(Ph,Fh,Ih){if(Fh=getNativeEvent(Fh),Fh.zrX!=null)return Fh;var Lh=Fh.type;if(Lh&&Lh.indexOf(`touch`)>=0){var Rh=Lh===`touchend`?Fh.changedTouches[0]:Fh.targetTouches[0];Rh&&clientToLocal(Ph,Rh,Fh,Ih)}else{clientToLocal(Ph,Fh,Fh,Ih);var zh=getWheelDeltaMayPolyfill(Fh);Fh.zrDelta=zh?zh/120:-(Fh.detail||0)/3}var Bh=Fh.button;return Fh.which==null&&Bh!==void 0&&MOUSE_EVENT_REG.test(Fh.type)&&(Fh.which=Bh&1?1:Bh&2?3:Bh&4?2:0),Fh}function getWheelDeltaMayPolyfill(Ph){var Fh=Ph.wheelDelta;if(Fh)return Fh;var Ih=Ph.deltaX,Lh=Ph.deltaY;if(Ih==null||Lh==null)return Fh;var Rh=Math.abs(Lh===0?Ih:Lh),zh=Lh>0?-1:Lh<0?1:Ih>0?-1:1;return 3*Rh*zh}function addEventListener$1(Ph,Fh,Ih,Lh){Ph.addEventListener(Fh,Ih,Lh)}function removeEventListener$1(Ph,Fh,Ih,Lh){Ph.removeEventListener(Fh,Ih,Lh)}var stop=function(Ph){Ph.preventDefault(),Ph.stopPropagation(),Ph.cancelBubble=!0};function isMiddleOrRightButtonOnMouseUpDown(Ph){return Ph.which===2||Ph.which===3}var GestureMgr=function(){function Ph(){this._track=[]}return Ph.prototype.recognize=function(Ph,Fh,Ih){return this._doTrack(Ph,Fh,Ih),this._recognize(Ph)},Ph.prototype.clear=function(){return this._track.length=0,this},Ph.prototype._doTrack=function(Ph,Fh,Ih){var Lh=Ph.touches;if(Lh){for(var Rh={points:[],touches:[],target:Fh,event:Ph},zh=0,Bh=Lh.length;zh<Bh;zh++){var Vh=Lh[zh],Hh=clientToLocal(Ih,Vh,{});Rh.points.push([Hh.zrX,Hh.zrY]),Rh.touches.push(Vh)}this._track.push(Rh)}},Ph.prototype._recognize=function(Ph){for(var Fh in recognizers)if(recognizers.hasOwnProperty(Fh)){var Ih=recognizers[Fh](this._track,Ph);if(Ih)return Ih}},Ph}();function dist(Ph){var Fh=Ph[1][0]-Ph[0][0],Ih=Ph[1][1]-Ph[0][1];return Math.sqrt(Fh*Fh+Ih*Ih)}function center$1(Ph){return[(Ph[0][0]+Ph[1][0])/2,(Ph[0][1]+Ph[1][1])/2]}var recognizers={pinch:function(Ph,Fh){var Ih=Ph.length;if(Ih){var Lh=(Ph[Ih-1]||{}).points,Rh=(Ph[Ih-2]||{}).points||Lh;if(Rh&&Rh.length>1&&Lh&&Lh.length>1){var zh=dist(Lh)/dist(Rh);!isFinite(zh)&&(zh=1),Fh.pinchScale=zh;var Bh=center$1(Lh);return Fh.pinchX=Bh[0],Fh.pinchY=Bh[1],{type:`pinch`,target:Ph[0].target,event:Fh}}}}};function create$1(){return[1,0,0,1,0,0]}function identity(Ph){return Ph[0]=1,Ph[1]=0,Ph[2]=0,Ph[3]=1,Ph[4]=0,Ph[5]=0,Ph}function copy(Ph,Fh){return Ph[0]=Fh[0],Ph[1]=Fh[1],Ph[2]=Fh[2],Ph[3]=Fh[3],Ph[4]=Fh[4],Ph[5]=Fh[5],Ph}function mul(Ph,Fh,Ih){var Lh=Fh[0]*Ih[0]+Fh[2]*Ih[1],Rh=Fh[1]*Ih[0]+Fh[3]*Ih[1],zh=Fh[0]*Ih[2]+Fh[2]*Ih[3],Bh=Fh[1]*Ih[2]+Fh[3]*Ih[3],Vh=Fh[0]*Ih[4]+Fh[2]*Ih[5]+Fh[4],Hh=Fh[1]*Ih[4]+Fh[3]*Ih[5]+Fh[5];return Ph[0]=Lh,Ph[1]=Rh,Ph[2]=zh,Ph[3]=Bh,Ph[4]=Vh,Ph[5]=Hh,Ph}function translate(Ph,Fh,Ih){return Ph[0]=Fh[0],Ph[1]=Fh[1],Ph[2]=Fh[2],Ph[3]=Fh[3],Ph[4]=Fh[4]+Ih[0],Ph[5]=Fh[5]+Ih[1],Ph}function rotate(Ph,Fh,Ih,Lh){Lh===void 0&&(Lh=[0,0]);var Rh=Fh[0],zh=Fh[2],Bh=Fh[4],Vh=Fh[1],Hh=Fh[3],Uh=Fh[5],Wh=Math.sin(Ih),Gh=Math.cos(Ih);return Ph[0]=Rh*Gh+Vh*Wh,Ph[1]=-Rh*Wh+Vh*Gh,Ph[2]=zh*Gh+Hh*Wh,Ph[3]=-zh*Wh+Gh*Hh,Ph[4]=Gh*(Bh-Lh[0])+Wh*(Uh-Lh[1])+Lh[0],Ph[5]=Gh*(Uh-Lh[1])-Wh*(Bh-Lh[0])+Lh[1],Ph}function scale$1(Ph,Fh,Ih){var Lh=Ih[0],Rh=Ih[1];return Ph[0]=Fh[0]*Lh,Ph[1]=Fh[1]*Rh,Ph[2]=Fh[2]*Lh,Ph[3]=Fh[3]*Rh,Ph[4]=Fh[4]*Lh,Ph[5]=Fh[5]*Rh,Ph}function invert(Ph,Fh){var Ih=Fh[0],Lh=Fh[2],Rh=Fh[4],zh=Fh[1],Bh=Fh[3],Vh=Fh[5],Hh=Ih*Bh-zh*Lh;return Hh?(Hh=1/Hh,Ph[0]=Bh*Hh,Ph[1]=-zh*Hh,Ph[2]=-Lh*Hh,Ph[3]=Ih*Hh,Ph[4]=(Lh*Vh-Bh*Rh)*Hh,Ph[5]=(zh*Rh-Ih*Vh)*Hh,Ph):null}function clone$3(Ph){var Fh=create$1();return copy(Fh,Ph),Fh}var Point=function(){function Ph(Ph,Fh){this.x=Ph||0,this.y=Fh||0}return Ph.prototype.copy=function(Ph){return this.x=Ph.x,this.y=Ph.y,this},Ph.prototype.clone=function(){return new Ph(this.x,this.y)},Ph.prototype.set=function(Ph,Fh){return this.x=Ph,this.y=Fh,this},Ph.prototype.equal=function(Ph){return Ph.x===this.x&&Ph.y===this.y},Ph.prototype.add=function(Ph){return this.x+=Ph.x,this.y+=Ph.y,this},Ph.prototype.scale=function(Ph){this.x*=Ph,this.y*=Ph},Ph.prototype.scaleAndAdd=function(Ph,Fh){this.x+=Ph.x*Fh,this.y+=Ph.y*Fh},Ph.prototype.sub=function(Ph){return this.x-=Ph.x,this.y-=Ph.y,this},Ph.prototype.dot=function(Ph){return this.x*Ph.x+this.y*Ph.y},Ph.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Ph.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Ph.prototype.normalize=function(){var Ph=this.len();return this.x/=Ph,this.y/=Ph,this},Ph.prototype.distance=function(Ph){var Fh=this.x-Ph.x,Ih=this.y-Ph.y;return Math.sqrt(Fh*Fh+Ih*Ih)},Ph.prototype.distanceSquare=function(Ph){var Fh=this.x-Ph.x,Ih=this.y-Ph.y;return Fh*Fh+Ih*Ih},Ph.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Ph.prototype.transform=function(Ph){if(Ph){var Fh=this.x,Ih=this.y;return this.x=Ph[0]*Fh+Ph[2]*Ih+Ph[4],this.y=Ph[1]*Fh+Ph[3]*Ih+Ph[5],this}},Ph.prototype.toArray=function(Ph){return Ph[0]=this.x,Ph[1]=this.y,Ph},Ph.prototype.fromArray=function(Ph){this.x=Ph[0],this.y=Ph[1]},Ph.set=function(Ph,Fh,Ih){Ph.x=Fh,Ph.y=Ih},Ph.copy=function(Ph,Fh){Ph.x=Fh.x,Ph.y=Fh.y},Ph.len=function(Ph){return Math.sqrt(Ph.x*Ph.x+Ph.y*Ph.y)},Ph.lenSquare=function(Ph){return Ph.x*Ph.x+Ph.y*Ph.y},Ph.dot=function(Ph,Fh){return Ph.x*Fh.x+Ph.y*Fh.y},Ph.add=function(Ph,Fh,Ih){Ph.x=Fh.x+Ih.x,Ph.y=Fh.y+Ih.y},Ph.sub=function(Ph,Fh,Ih){Ph.x=Fh.x-Ih.x,Ph.y=Fh.y-Ih.y},Ph.scale=function(Ph,Fh,Ih){Ph.x=Fh.x*Ih,Ph.y=Fh.y*Ih},Ph.scaleAndAdd=function(Ph,Fh,Ih,Lh){Ph.x=Fh.x+Ih.x*Lh,Ph.y=Fh.y+Ih.y*Lh},Ph.lerp=function(Ph,Fh,Ih,Lh){var Rh=1-Lh;Ph.x=Rh*Fh.x+Lh*Ih.x,Ph.y=Rh*Fh.y+Lh*Ih.y},Ph}(),mathMin$11=Math.min,mathMax$11=Math.max,mathAbs$5=Math.abs,XY$3=[`x`,`y`],WH$3=[`width`,`height`],lt=new Point,rb=new Point,lb=new Point,rt=new Point,_intersectCtx$1=createIntersectContext(),_minTv$1=_intersectCtx$1.minTv,_maxTv$1=_intersectCtx$1.maxTv,_lenMinMax=[0,0],BoundingRect=function(){function Ph(Fh,Ih,Lh,Rh){Ph.set(this,Fh,Ih,Lh,Rh)}return Ph.set=function(Ph,Fh,Ih,Lh,Rh){return Lh<0&&(Fh+=Lh,Lh=-Lh),Rh<0&&(Ih+=Rh,Rh=-Rh),Ph.x=Fh,Ph.y=Ih,Ph.width=Lh,Ph.height=Rh,Ph},Ph.prototype.union=function(Ph){var Fh=mathMin$11(Ph.x,this.x),Ih=mathMin$11(Ph.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=mathMax$11(Ph.x+Ph.width,this.x+this.width)-Fh:this.width=Ph.width,isFinite(this.y)&&isFinite(this.height)?this.height=mathMax$11(Ph.y+Ph.height,this.y+this.height)-Ih:this.height=Ph.height,this.x=Fh,this.y=Ih},Ph.prototype.applyTransform=function(Fh){Ph.applyTransform(this,this,Fh)},Ph.prototype.calculateTransform=function(Ph){var Fh=this,Ih=Ph.width/Fh.width,Lh=Ph.height/Fh.height,Rh=create$1();return translate(Rh,Rh,[-Fh.x,-Fh.y]),scale$1(Rh,Rh,[Ih,Lh]),translate(Rh,Rh,[Ph.x,Ph.y]),Rh},Ph.prototype.intersect=function(Fh,Ih,Lh){return Ph.intersect(this,Fh,Ih,Lh)},Ph.intersect=function(Fh,Ih,Lh,Rh){Lh&&Point.set(Lh,0,0);var zh=Rh&&Rh.outIntersectRect||null,Bh=Rh&&Rh.clamp;if(zh&&(zh.x=zh.y=zh.width=zh.height=NaN),!Fh||!Ih)return!1;Fh instanceof Ph||(Fh=Ph.set(_tmpIntersectA,Fh.x,Fh.y,Fh.width,Fh.height)),Ih instanceof Ph||(Ih=Ph.set(_tmpIntersectB,Ih.x,Ih.y,Ih.width,Ih.height));var Vh=!!Lh;_intersectCtx$1.reset(Rh,Vh);var Hh=_intersectCtx$1.touchThreshold,Uh=Fh.x+Hh,Wh=Fh.x+Fh.width-Hh,Gh=Fh.y+Hh,Kh=Fh.y+Fh.height-Hh,qh=Ih.x+Hh,Jh=Ih.x+Ih.width-Hh,Yh=Ih.y+Hh,Xh=Ih.y+Ih.height-Hh;if(Uh>Wh||Gh>Kh||qh>Jh||Yh>Xh)return!1;var Zh=!(Wh<qh||Jh<Uh||Kh<Yh||Xh<Gh);return(Vh||zh)&&(_lenMinMax[0]=1/0,_lenMinMax[1]=0,intersectOneDim(Uh,Wh,qh,Jh,0,Vh,zh,Bh),intersectOneDim(Gh,Kh,Yh,Xh,1,Vh,zh,Bh),Vh&&Point.copy(Lh,Zh?_intersectCtx$1.useDir?_intersectCtx$1.dirMinTv:_minTv$1:_maxTv$1)),Zh},Ph.contain=function(Ph,Fh,Ih){return Fh>=Ph.x&&Fh<=Ph.x+Ph.width&&Ih>=Ph.y&&Ih<=Ph.y+Ph.height},Ph.prototype.contain=function(Fh,Ih){return Ph.contain(this,Fh,Ih)},Ph.prototype.clone=function(){return new Ph(this.x,this.y,this.width,this.height)},Ph.prototype.copy=function(Fh){Ph.copy(this,Fh)},Ph.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ph.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ph.prototype.isZero=function(){return this.width===0||this.height===0},Ph.create=function(Fh){return new Ph(Fh.x,Fh.y,Fh.width,Fh.height)},Ph.copy=function(Ph,Fh){return Ph.x=Fh.x,Ph.y=Fh.y,Ph.width=Fh.width,Ph.height=Fh.height,Ph},Ph.applyTransform=function(Fh,Ih,Lh){if(!Lh){Fh!==Ih&&Ph.copy(Fh,Ih);return}if(Lh[1]<1e-5&&Lh[1]>-1e-5&&Lh[2]<1e-5&&Lh[2]>-1e-5){var Rh=Lh[0],zh=Lh[3],Bh=Lh[4],Vh=Lh[5];Fh.x=Ih.x*Rh+Bh,Fh.y=Ih.y*zh+Vh,Fh.width=Ih.width*Rh,Fh.height=Ih.height*zh,Fh.width<0&&(Fh.x+=Fh.width,Fh.width=-Fh.width),Fh.height<0&&(Fh.y+=Fh.height,Fh.height=-Fh.height);return}lt.x=lb.x=Ih.x,lt.y=rt.y=Ih.y,rb.x=rt.x=Ih.x+Ih.width,rb.y=lb.y=Ih.y+Ih.height,lt.transform(Lh),rt.transform(Lh),rb.transform(Lh),lb.transform(Lh),Fh.x=mathMin$11(lt.x,rb.x,lb.x,rt.x),Fh.y=mathMin$11(lt.y,rb.y,lb.y,rt.y);var Hh=mathMax$11(lt.x,rb.x,lb.x,rt.x),Uh=mathMax$11(lt.y,rb.y,lb.y,rt.y);Fh.width=Hh-Fh.x,Fh.height=Uh-Fh.y},Ph}(),_tmpIntersectA=new BoundingRect(0,0,0,0),_tmpIntersectB=new BoundingRect(0,0,0,0);function intersectOneDim(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){var Hh=mathAbs$5(Fh-Ih),Uh=mathAbs$5(Lh-Ph),Wh=mathMin$11(Hh,Uh),Gh=XY$3[Rh],Kh=XY$3[1-Rh],qh=WH$3[Rh];Fh<Ih||Lh<Ph?Hh<Uh?(zh&&(_maxTv$1[Gh]=-Hh),Vh&&(Bh[Gh]=Fh,Bh[qh]=0)):(zh&&(_maxTv$1[Gh]=Uh),Vh&&(Bh[Gh]=Ph,Bh[qh]=0)):(Bh&&(Bh[Gh]=mathMax$11(Ph,Ih),Bh[qh]=mathMin$11(Fh,Lh)-Bh[Gh]),zh&&(Wh<_lenMinMax[0]||_intersectCtx$1.useDir)&&(_lenMinMax[0]=mathMin$11(Wh,_lenMinMax[0]),(Hh<Uh||!_intersectCtx$1.bidirectional)&&(_minTv$1[Gh]=Hh,_minTv$1[Kh]=0,_intersectCtx$1.useDir&&_intersectCtx$1.calcDirMTV()),(Hh>=Uh||!_intersectCtx$1.bidirectional)&&(_minTv$1[Gh]=-Uh,_minTv$1[Kh]=0,_intersectCtx$1.useDir&&_intersectCtx$1.calcDirMTV())))}function createIntersectContext(){var Ph=0,Fh=new Point,Ih=new Point,Lh={minTv:new Point,maxTv:new Point,useDir:!1,dirMinTv:new Point,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(Rh,zh){Lh.touchThreshold=0,Rh&&Rh.touchThreshold!=null&&(Lh.touchThreshold=mathMax$11(0,Rh.touchThreshold)),Lh.negativeSize=!1,zh&&(Lh.minTv.set(1/0,1/0),Lh.maxTv.set(0,0),Lh.useDir=!1,Rh&&Rh.direction!=null&&(Lh.useDir=!0,Lh.dirMinTv.copy(Lh.minTv),Ih.copy(Lh.minTv),Ph=Rh.direction,Lh.bidirectional=Rh.bidirectional==null||!!Rh.bidirectional,Lh.bidirectional||Fh.set(Math.cos(Ph),Math.sin(Ph))))},calcDirMTV:function(){var zh=Lh.minTv,Bh=Lh.dirMinTv,Vh=zh.y*zh.y+zh.x*zh.x,Hh=Math.sin(Ph),Uh=Math.cos(Ph),Wh=Hh*zh.y+Uh*zh.x;if(Rh(Wh)){Rh(zh.x)&&Rh(zh.y)&&Bh.set(0,0);return}if(Ih.x=Vh*Uh/Wh,Ih.y=Vh*Hh/Wh,Rh(Ih.x)&&Rh(Ih.y)){Bh.set(0,0);return}(Lh.bidirectional||Fh.dot(Ih)>0)&&Ih.len()<Bh.len()&&Bh.copy(Ih)}};function Rh(Ph){return mathAbs$5(Ph)<1e-10}return Lh}var SILENT=`silent`;function makeEventPacket(Ph,Fh,Ih){return{type:Ph,event:Ih,target:Fh.target,topTarget:Fh.topTarget,cancelBubble:!1,offsetX:Ih.zrX,offsetY:Ih.zrY,gestureEvent:Ih.gestureEvent,pinchX:Ih.pinchX,pinchY:Ih.pinchY,pinchScale:Ih.pinchScale,wheelDelta:Ih.zrDelta,zrByTouch:Ih.zrByTouch,which:Ih.which,stop:stopEvent}}function stopEvent(){stop(this.event)}var EmptyProxy=function(Ph){__extends(Fh,Ph);function Fh(){var Fh=Ph!==null&&Ph.apply(this,arguments)||this;return Fh.handler=null,Fh}return Fh.prototype.dispose=function(){},Fh.prototype.setCursor=function(){},Fh}(Eventful),HoveredResult=function(){function Ph(Ph,Fh){this.x=Ph,this.y=Fh}return Ph}(),handlerNames=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],tmpRect$1=new BoundingRect(0,0,0,0),Handler=function(Ph){__extends(Fh,Ph);function Fh(Fh,Ih,Lh,Rh,zh){var Bh=Ph.call(this)||this;return Bh._hovered=new HoveredResult(0,0),Bh.storage=Fh,Bh.painter=Ih,Bh.painterRoot=Rh,Bh._pointerSize=zh,Lh||=new EmptyProxy,Bh.proxy=null,Bh.setHandlerProxy(Lh),Bh._draggingMgr=new Draggable(Bh),Bh}return Fh.prototype.setHandlerProxy=function(Ph){this.proxy&&this.proxy.dispose(),Ph&&(each$15(handlerNames,function(Fh){Ph.on&&Ph.on(Fh,this[Fh],this)},this),Ph.handler=this),this.proxy=Ph},Fh.prototype.mousemove=function(Ph){var Fh=Ph.zrX,Ih=Ph.zrY,Lh=isOutsideBoundary(this,Fh,Ih),Rh=this._hovered,zh=Rh.target;zh&&!zh.__zr&&(Rh=this.findHover(Rh.x,Rh.y),zh=Rh.target);var Bh=this._hovered=Lh?new HoveredResult(Fh,Ih):this.findHover(Fh,Ih),Vh=Bh.target,Hh=this.proxy;Hh.setCursor&&Hh.setCursor(Vh?Vh.cursor:`default`),zh&&Vh!==zh&&this.dispatchToElement(Rh,`mouseout`,Ph),this.dispatchToElement(Bh,`mousemove`,Ph),Vh&&Vh!==zh&&this.dispatchToElement(Bh,`mouseover`,Ph)},Fh.prototype.mouseout=function(Ph){var Fh=Ph.zrEventControl;Fh!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,Ph),Fh!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:Ph})},Fh.prototype.resize=function(){this._hovered=new HoveredResult(0,0)},Fh.prototype.dispatch=function(Ph,Fh){var Ih=this[Ph];Ih&&Ih.call(this,Fh)},Fh.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},Fh.prototype.setCursorStyle=function(Ph){var Fh=this.proxy;Fh.setCursor&&Fh.setCursor(Ph)},Fh.prototype.dispatchToElement=function(Ph,Fh,Ih){Ph||={};var Lh=Ph.target;if(!(Lh&&Lh.silent)){for(var Rh=`on`+Fh,zh=makeEventPacket(Fh,Ph,Ih);Lh&&(Lh[Rh]&&(zh.cancelBubble=!!Lh[Rh].call(Lh,zh)),Lh.trigger(Fh,zh),Lh=Lh.__hostTarget?Lh.__hostTarget:Lh.parent,!zh.cancelBubble););zh.cancelBubble||(this.trigger(Fh,zh),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(Ph){typeof Ph[Rh]==`function`&&Ph[Rh].call(Ph,zh),Ph.trigger&&Ph.trigger(Fh,zh)}))}},Fh.prototype.findHover=function(Ph,Fh,Ih){var Lh=this.storage.getDisplayList(),Rh=new HoveredResult(Ph,Fh);if(setHoverTarget(Lh,Rh,Ph,Fh,Ih),this._pointerSize&&!Rh.target){for(var zh=[],Bh=this._pointerSize,Vh=Bh/2,Hh=new BoundingRect(Ph-Vh,Fh-Vh,Bh,Bh),Uh=Lh.length-1;Uh>=0;Uh--){var Wh=Lh[Uh];Wh!==Ih&&!Wh.ignore&&!Wh.ignoreCoarsePointer&&(!Wh.parent||!Wh.parent.ignoreCoarsePointer)&&(tmpRect$1.copy(Wh.getBoundingRect()),Wh.transform&&tmpRect$1.applyTransform(Wh.transform),tmpRect$1.intersect(Hh)&&zh.push(Wh))}if(zh.length){for(var Gh=4,Kh=Math.PI/12,qh=Math.PI*2,Jh=0;Jh<Vh;Jh+=Gh)for(var Yh=0;Yh<qh;Yh+=Kh)if(setHoverTarget(zh,Rh,Ph+Jh*Math.cos(Yh),Fh+Jh*Math.sin(Yh),Ih),Rh.target)return Rh}}return Rh},Fh.prototype.processGesture=function(Ph,Fh){this._gestureMgr||=new GestureMgr;var Ih=this._gestureMgr;Fh===`start`&&Ih.clear();var Lh=Ih.recognize(Ph,this.findHover(Ph.zrX,Ph.zrY,null).target,this.proxy.dom);if(Fh===`end`&&Ih.clear(),Lh){var Rh=Lh.type;Ph.gestureEvent=Rh;var zh=new HoveredResult;zh.target=Lh.target,this.dispatchToElement(zh,Rh,Lh.event)}},Fh}(Eventful);each$15([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(Ph){Handler.prototype[Ph]=function(Fh){var Ih=Fh.zrX,Lh=Fh.zrY,Rh=isOutsideBoundary(this,Ih,Lh),zh,Bh;if((Ph!==`mouseup`||!Rh)&&(zh=this.findHover(Ih,Lh),Bh=zh.target),Ph===`mousedown`)this._downEl=Bh,this._downPoint=[Fh.zrX,Fh.zrY],this._upEl=Bh;else if(Ph===`mouseup`)this._upEl=Bh;else if(Ph===`click`){if(this._downEl!==this._upEl||!this._downPoint||dist$1(this._downPoint,[Fh.zrX,Fh.zrY])>4)return;this._downPoint=null}this.dispatchToElement(zh,Ph,Fh)}});function isHover(Ph,Fh,Ih){if(Ph[Ph.rectHover?`rectContain`:`contain`](Fh,Ih)){for(var Lh=Ph,Rh=void 0,zh=!1;Lh;){if(Lh.ignoreClip&&(zh=!0),!zh){var Bh=Lh.getClipPath();if(Bh&&!Bh.contain(Fh,Ih))return!1}Lh.silent&&(Rh=!0);var Vh=Lh.__hostTarget;Lh=Vh?Lh.ignoreHostSilent?null:Vh:Lh.parent}return Rh?SILENT:!0}return!1}function setHoverTarget(Ph,Fh,Ih,Lh,Rh){for(var zh=Ph.length-1;zh>=0;zh--){var Bh=Ph[zh],Vh=void 0;if(Bh!==Rh&&!Bh.ignore&&(Vh=isHover(Bh,Ih,Lh))&&(!Fh.topTarget&&(Fh.topTarget=Bh),Vh!==SILENT)){Fh.target=Bh;break}}}function isOutsideBoundary(Ph,Fh,Ih){var Lh=Ph.painter;return Fh<0||Fh>Lh.getWidth()||Ih<0||Ih>Lh.getHeight()}var DEFAULT_MIN_MERGE=32,DEFAULT_MIN_GALLOPING=7;function minRunLength(Ph){for(var Fh=0;Ph>=DEFAULT_MIN_MERGE;)Fh|=Ph&1,Ph>>=1;return Ph+Fh}function makeAscendingRun(Ph,Fh,Ih,Lh){var Rh=Fh+1;if(Rh===Ih)return 1;if(Lh(Ph[Rh++],Ph[Fh])<0){for(;Rh<Ih&&Lh(Ph[Rh],Ph[Rh-1])<0;)Rh++;reverseRun(Ph,Fh,Rh)}else for(;Rh<Ih&&Lh(Ph[Rh],Ph[Rh-1])>=0;)Rh++;return Rh-Fh}function reverseRun(Ph,Fh,Ih){for(Ih--;Fh<Ih;){var Lh=Ph[Fh];Ph[Fh++]=Ph[Ih],Ph[Ih--]=Lh}}function binaryInsertionSort(Ph,Fh,Ih,Lh,Rh){for(Lh===Fh&&Lh++;Lh<Ih;Lh++){for(var zh=Ph[Lh],Bh=Fh,Vh=Lh,Hh;Bh<Vh;)Hh=Bh+Vh>>>1,Rh(zh,Ph[Hh])<0?Vh=Hh:Bh=Hh+1;var Uh=Lh-Bh;switch(Uh){case 3:Ph[Bh+3]=Ph[Bh+2];case 2:Ph[Bh+2]=Ph[Bh+1];case 1:Ph[Bh+1]=Ph[Bh];break;default:for(;Uh>0;)Ph[Bh+Uh]=Ph[Bh+Uh-1],Uh--}Ph[Bh]=zh}}function gallopLeft(Ph,Fh,Ih,Lh,Rh,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function logInvalidZError(){invalidZErrorLogged||(invalidZErrorLogged=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function shapeCompareFunc(Ph,Fh){return Ph.zlevel===Fh.zlevel?Ph.z===Fh.z?Ph.z2-Fh.z2:Ph.z-Fh.z:Ph.zlevel-Fh.zlevel}var Storage=function(){function Ph(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=shapeCompareFunc}return Ph.prototype.traverse=function(Ph,Fh){for(var Ih=0;Ih<this._roots.length;Ih++)this._roots[Ih].traverse(Ph,Fh)},Ph.prototype.getDisplayList=function(Ph,Fh){Fh||=!1;var Ih=this._displayList;return(Ph||!Ih.length)&&this.updateDisplayList(Fh),Ih},Ph.prototype.updateDisplayList=function(Ph){this._displayListLen=0;for(var Fh=this._roots,Ih=this._displayList,Lh=0,Rh=Fh.length;Lh<Rh;Lh++)this._updateAndAddDisplayable(Fh[Lh],null,Ph);Ih.length=this._displayListLen,sort$2(Ih,shapeCompareFunc)},Ph.prototype._updateAndAddDisplayable=function(Ph,Fh,Ih){if(!(Ph.ignore&&!Ih)){Ph.beforeUpdate(),Ph.update(),Ph.afterUpdate();var Lh=Ph.getClipPath(),Rh=Fh&&Fh.length,zh=0,Bh=Ph.__clipPaths;if(!Ph.ignoreClip&&(Rh||Lh)){if(Bh||=Ph.__clipPaths=[],Rh)for(var Vh=0;Vh<Fh.length;Vh++)Bh[zh++]=Fh[Vh];for(var Hh=Lh,Uh=Ph;Hh;)Hh.parent=Uh,Hh.updateTransform(),Bh[zh++]=Hh,Uh=Hh,Hh=Hh.getClipPath()}if(Bh&&(Bh.length=zh),Ph.childrenRef){for(var Wh=Ph.childrenRef(),Gh=0;Gh<Wh.length;Gh++){var Kh=Wh[Gh];Ph.__dirty&&(Kh.__dirty|=1),this._updateAndAddDisplayable(Kh,Bh,Ih)}Ph.__dirty=0}else{var qh=Ph;isNaN(qh.z)&&(logInvalidZError(),qh.z=0),isNaN(qh.z2)&&(logInvalidZError(),qh.z2=0),isNaN(qh.zlevel)&&(logInvalidZError(),qh.zlevel=0),this._displayList[this._displayListLen++]=qh}var Jh=Ph.getDecalElement&&Ph.getDecalElement();Jh&&this._updateAndAddDisplayable(Jh,Bh,Ih);var Yh=Ph.getTextGuideLine();Yh&&this._updateAndAddDisplayable(Yh,Bh,Ih);var Xh=Ph.getTextContent();Xh&&this._updateAndAddDisplayable(Xh,Bh,Ih)}},Ph.prototype.addRoot=function(Ph){Ph.__zr&&Ph.__zr.storage===this||this._roots.push(Ph)},Ph.prototype.delRoot=function(Ph){if(Ph instanceof Array){for(var Fh=0,Ih=Ph.length;Fh<Ih;Fh++)this.delRoot(Ph[Fh]);return}var Lh=indexOf(this._roots,Ph);Lh>=0&&this._roots.splice(Lh,1)},Ph.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},Ph.prototype.getRoots=function(){return this._roots},Ph.prototype.dispose=function(){this._displayList=null,this._roots=null},Ph}(),requestAnimationFrame$1=env.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(Ph){return setTimeout(Ph,16)},easingFuncs={linear:function(Ph){return Ph},quadraticIn:function(Ph){return Ph*Ph},quadraticOut:function(Ph){return Ph*(2-Ph)},quadraticInOut:function(Ph){return(Ph*=2)<1?.5*Ph*Ph:-.5*(--Ph*(Ph-2)-1)},cubicIn:function(Ph){return Ph*Ph*Ph},cubicOut:function(Ph){return--Ph*Ph*Ph+1},cubicInOut:function(Ph){return(Ph*=2)<1?.5*Ph*Ph*Ph:.5*((Ph-=2)*Ph*Ph+2)},quarticIn:function(Ph){return Ph*Ph*Ph*Ph},quarticOut:function(Ph){return 1- --Ph*Ph*Ph*Ph},quarticInOut:function(Ph){return(Ph*=2)<1?.5*Ph*Ph*Ph*Ph:-.5*((Ph-=2)*Ph*Ph*Ph-2)},quinticIn:function(Ph){return Ph*Ph*Ph*Ph*Ph},quinticOut:function(Ph){return--Ph*Ph*Ph*Ph*Ph+1},quinticInOut:function(Ph){return(Ph*=2)<1?.5*Ph*Ph*Ph*Ph*Ph:.5*((Ph-=2)*Ph*Ph*Ph*Ph+2)},sinusoidalIn:function(Ph){return 1-Math.cos(Ph*Math.PI/2)},sinusoidalOut:function(Ph){return Math.sin(Ph*Math.PI/2)},sinusoidalInOut:function(Ph){return .5*(1-Math.cos(Math.PI*Ph))},exponentialIn:function(Ph){return Ph===0?0:1024**(Ph-1)},exponentialOut:function(Ph){return Ph===1?1:1-2**(-10*Ph)},exponentialInOut:function(Ph){return Ph===0?0:Ph===1?1:(Ph*=2)<1?.5*1024**(Ph-1):.5*(-(2**(-10*(Ph-1)))+2)},circularIn:function(Ph){return 1-Math.sqrt(1-Ph*Ph)},circularOut:function(Ph){return Math.sqrt(1- --Ph*Ph)},circularInOut:function(Ph){return(Ph*=2)<1?-.5*(Math.sqrt(1-Ph*Ph)-1):.5*(Math.sqrt(1-(Ph-=2)*Ph)+1)},elasticIn:function(Ph){var Fh,Ih=.1,Lh=.4;return Ph===0?0:Ph===1?1:(!Ih||Ih<1?(Ih=1,Fh=Lh/4):Fh=Lh*Math.asin(1/Ih)/(2*Math.PI),-(Ih*2**(10*--Ph)*Math.sin((Ph-Fh)*(2*Math.PI)/Lh)))},elasticOut:function(Ph){var Fh,Ih=.1,Lh=.4;return Ph===0?0:Ph===1?1:(!Ih||Ih<1?(Ih=1,Fh=Lh/4):Fh=Lh*Math.asin(1/Ih)/(2*Math.PI),Ih*2**(-10*Ph)*Math.sin((Ph-Fh)*(2*Math.PI)/Lh)+1)},elasticInOut:function(Ph){var Fh,Ih=.1,Lh=.4;return Ph===0?0:Ph===1?1:(!Ih||Ih<1?(Ih=1,Fh=Lh/4):Fh=Lh*Math.asin(1/Ih)/(2*Math.PI),(Ph*=2)<1?-.5*(Ih*2**(10*--Ph)*Math.sin((Ph-Fh)*(2*Math.PI)/Lh)):Ih*2**(-10*--Ph)*Math.sin((Ph-Fh)*(2*Math.PI)/Lh)*.5+1)},backIn:function(Ph){var Fh=1.70158;return Ph*Ph*((Fh+1)*Ph-Fh)},backOut:function(Ph){var Fh=1.70158;return--Ph*Ph*((Fh+1)*Ph+Fh)+1},backInOut:function(Ph){var Fh=1.70158*1.525;return(Ph*=2)<1?.5*(Ph*Ph*((Fh+1)*Ph-Fh)):.5*((Ph-=2)*Ph*((Fh+1)*Ph+Fh)+2)},bounceIn:function(Ph){return 1-easingFuncs.bounceOut(1-Ph)},bounceOut:function(Ph){return Ph<1/2.75?7.5625*Ph*Ph:Ph<2/2.75?7.5625*(Ph-=1.5/2.75)*Ph+.75:Ph<2.5/2.75?7.5625*(Ph-=2.25/2.75)*Ph+.9375:7.5625*(Ph-=2.625/2.75)*Ph+.984375},bounceInOut:function(Ph){return Ph<.5?easingFuncs.bounceIn(Ph*2)*.5:easingFuncs.bounceOut(Ph*2-1)*.5+.5}},mathPow$2=Math.pow,mathSqrt$3=Math.sqrt,EPSILON$4=1e-8,EPSILON_NUMERIC=1e-4,THREE_SQRT=mathSqrt$3(3),ONE_THIRD=1/3,_v0=create$2(),_v1=create$2(),_v2=create$2();function isAroundZero$1(Ph){return Ph>-EPSILON$4&&Ph<EPSILON$4}function isNotAroundZero$1(Ph){return Ph>EPSILON$4||Ph<-EPSILON$4}function cubicAt(Ph,Fh,Ih,Lh,Rh){var zh=1-Rh;return zh*zh*(zh*Ph+3*Rh*Fh)+Rh*Rh*(Rh*Lh+3*zh*Ih)}function cubicDerivativeAt(Ph,Fh,Ih,Lh,Rh){var zh=1-Rh;return 3*(((Fh-Ph)*zh+2*(Ih-Fh)*Rh)*zh+(Lh-Ih)*Rh*Rh)}function cubicRootAt(Ph,Fh,Ih,Lh,Rh,zh){var Bh=Lh+3*(Fh-Ih)-Ph,Vh=3*(Ih-Fh*2+Ph),Hh=3*(Fh-Ph),Uh=Ph-Rh,Wh=Vh*Vh-3*Bh*Hh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oint(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh){var Uh,Wh=.005,Gh=1/0;_v0[0]=Bh,_v0[1]=Vh;for(var Kh=0;Kh<1;Kh+=.05){_v1[0]=quadraticAt$1(Ph,Ih,Rh,Kh),_v1[1]=quadraticAt$1(Fh,Lh,zh,Kh);var qh=distSquare(_v0,_v1);qh<Gh&&(Uh=Kh,Gh=qh)}Gh=1/0;for(var Jh=0;Jh<32&&!(Wh<EPSILON_NUMERIC);Jh++){var Yh=Uh-Wh,Xh=Uh+Wh;_v1[0]=quadraticAt$1(Ph,Ih,Rh,Yh),_v1[1]=quadraticAt$1(Fh,Lh,zh,Yh);var qh=distSquare(_v1,_v0);if(Yh>=0&&qh<Gh)Uh=Yh,Gh=qh;else{_v2[0]=quadraticAt$1(Ph,Ih,Rh,Xh),_v2[1]=quadraticAt$1(Fh,Lh,zh,Xh);var Zh=distSquare(_v2,_v0);Xh<=1&&Zh<Gh?(Uh=Xh,Gh=Zh):Wh*=.5}}return Hh&&(Hh[0]=quadraticAt$1(Ph,Ih,Rh,Uh),Hh[1]=quadraticAt$1(Fh,Lh,zh,Uh)),mathSqrt$3(Gh)}function quadraticLength(Ph,Fh,Ih,Lh,Rh,zh,Bh){for(var Vh=Ph,Hh=Fh,Uh=0,Wh=1/Bh,Gh=1;Gh<=Bh;Gh++){var Kh=Gh*Wh,qh=quadraticAt$1(Ph,Ih,Rh,Kh),Jh=quadraticAt$1(Fh,Lh,zh,Kh),Yh=qh-Vh,Xh=Jh-Hh;Uh+=Math.sqrt(Yh*Yh+Xh*Xh),Vh=qh,Hh=Jh}return Uh}var regexp=/cubic-bezier\(([0-9,\.e ]+)\)/;function createCubicEasingFunc(Ph){var Fh=Ph&&regexp.exec(Ph);if(Fh){var Ih=Fh[1].split(`,`),Lh=+trim$1(Ih[0]),Rh=+trim$1(Ih[1]),zh=+trim$1(Ih[2]),Bh=+trim$1(Ih[3]);if(isNaN(Lh+Rh+zh+Bh))return;var Vh=[];return function(Ph){return Ph<=0?0:Ph>=1?1:cubicRootAt(0,Lh,zh,1,Ph,Vh)&&cubicAt(0,Rh,Bh,1,Vh[0])}}}var Clip=function(){function Ph(Ph){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=Ph.life||1e3,this._delay=Ph.delay||0,this.loop=Ph.loop||!1,this.onframe=Ph.onframe||noop,this.ondestroy=Ph.ondestroy||noop,this.onrestart=Ph.onrestart||noop,Ph.easing&&this.setEasing(Ph.easing)}return Ph.prototype.step=function(Ph,Fh){if(this._inited||=(this._startTime=Ph+this._delay,!0),this._paused){this._pausedTime+=Fh;return}var Ih=this._life,Lh=Ph-this._startTime-this._pausedTime,Rh=Lh/Ih;Rh<0&&(Rh=0),Rh=Math.min(Rh,1);var zh=this.easingFunc,Bh=zh?zh(Rh):Rh;if(this.onframe(Bh),Rh===1)if(this.loop){var Vh=Lh%Ih;this._startTime=Ph-Vh,this._pausedTime=0,this.onrestart()}else return!0;return!1},Ph.prototype.pause=function(){this._paused=!0},Ph.prototype.resume=function(){this._paused=!1},Ph.prototype.setEasing=function(Ph){this.easing=Ph,this.easingFunc=isFunction(Ph)?Ph:easingFuncs[Ph]||createCubicEasingFunc(Ph)},Ph}(),Entry=function(){function Ph(Ph){this.value=Ph}return Ph}(),LinkedList=function(){function Ph(){this._len=0}return Ph.prototype.insert=function(Ph){var Fh=new Entry(Ph);return this.insertEntry(Fh),Fh},Ph.prototype.insertEntry=function(Ph){this.head?(this.tail.next=Ph,Ph.prev=this.tail,Ph.next=null,this.tail=Ph):this.head=this.tail=Ph,this._len++},Ph.prototype.remove=function(Ph){var Fh=Ph.prev,Ih=Ph.next;Fh?Fh.next=Ih:this.head=Ih,Ih?Ih.prev=Fh:this.tail=Fh,Ph.next=Ph.prev=null,this._len--},Ph.prototype.len=function(){return this._len},Ph.prototype.clear=function(){this.head=this.tail=null,this._len=0},Ph}(),LRU=function(){function Ph(Ph){this._list=new LinkedList,this._maxSize=10,this._map={},this._maxSize=Ph}return Ph.prototype.put=function(Ph,Fh){var Ih=this._list,Lh=this._map,Rh=null;if(Lh[Ph]==null){var zh=Ih.len(),Bh=this._lastRemovedEntry;if(zh>=this._maxSize&&zh>0){var Vh=Ih.head;Ih.remove(Vh),delete Lh[Vh.key],Rh=Vh.value,this._lastRemovedEntry=Vh}Bh?Bh.value=Fh:Bh=new Entry(Fh),Bh.key=Ph,Ih.insertEntry(Bh),Lh[Ph]=Bh}return Rh},Ph.prototype.get=function(Ph){var Fh=this._map[Ph],Ih=this._list;if(Fh!=null)return Fh!==Ih.tail&&(Ih.remove(Fh),Ih.insertEntry(Fh)),Fh.value},Ph.prototype.clear=function(){this._list.clear(),this._map={}},Ph.prototype.len=function(){return this._list.len()},Ph}(),kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function clampCssByte(Ph){return Ph=Math.round(Ph),Ph<0?0:Ph>255?255:Ph}function clampCssAngle(Ph){return Ph=Math.round(Ph),Ph<0?0:Ph>360?360:Ph}function clampCssFloat(Ph){return Ph<0?0:Ph>1?1:Ph}function parseCssInt(Ph){var Fh=Ph;return Fh.length&&Fh.charAt(Fh.length-1)===`%`?clampCssByte(parseFloat(Fh)/100*255):clampCssByte(parseInt(Fh,10))}function parseCssFloat(Ph){var Fh=Ph;return Fh.length&&Fh.charAt(Fh.length-1)===`%`?clampCssFloat(parseFloat(Fh)/100):clampCssFloat(parseFloat(Fh))}function cssHueToRgb(Ph,Fh,Ih){return Ih<0?Ih+=1:Ih>1&&--Ih,Ih*6<1?Ph+(Fh-Ph)*Ih*6:Ih*2<1?Fh:Ih*3<2?Ph+(Fh-Ph)*(2/3-Ih)*6:Ph}function lerpNumber(Ph,Fh,Ih){return Ph+(Fh-Ph)*Ih}function setRgba(Ph,Fh,Ih,Lh,Rh){return Ph[0]=Fh,Ph[1]=Ih,Ph[2]=Lh,Ph[3]=Rh,Ph}function copyRgba(Ph,Fh){return Ph[0]=Fh[0],Ph[1]=Fh[1],Ph[2]=Fh[2],Ph[3]=Fh[3],Ph}var colorCache=new LRU(20),lastRemovedArr=null;function putToCache(Ph,Fh){lastRemovedArr&&copyRgba(lastRemovedArr,Fh),lastRemovedArr=colorCache.put(Ph,lastRemovedArr||Fh.slice())}function parse$2(Ph,Fh){if(Ph){Fh||=[];var Ih=colorCache.get(Ph);if(Ih)return copyRgba(Fh,Ih);Ph+=``;var Lh=Ph.replace(/ /g,``).toLowerCase();if(Lh in kCSSColorTable)return copyRgba(Fh,kCSSColorTable[Lh]),putToCache(Ph,Fh),Fh;var Rh=Lh.length;if(Lh.charAt(0)===`#`){if(Rh===4||Rh===5){var zh=parseInt(Lh.slice(1,4),16);if(!(zh>=0&&zh<=4095)){setRgba(Fh,0,0,0,1);return}return setRgba(Fh,(zh&3840)>>4|(zh&3840)>>8,zh&240|(zh&240)>>4,zh&15|(zh&15)<<4,Rh===5?parseInt(Lh.slice(4),16)/15:1),putToCache(Ph,Fh),Fh}else if(Rh===7||Rh===9){var zh=parseInt(Lh.slice(1,7),16);if(!(zh>=0&&zh<=16777215)){setRgba(Fh,0,0,0,1);return}return setRgba(Fh,(zh&16711680)>>16,(zh&65280)>>8,zh&255,Rh===9?parseInt(Lh.slice(7),16)/255:1),putToCache(Ph,Fh),Fh}return}var Bh=Lh.indexOf(`(`),Vh=Lh.indexOf(`)`);if(Bh!==-1&&Vh+1===Rh){var Hh=Lh.substr(0,Bh),Uh=Lh.substr(Bh+1,Vh-(Bh+1)).split(`,`),Wh=1;switch(Hh){case`rgba`:if(Uh.length!==4)return Uh.length===3?setRgba(Fh,+Uh[0],+Uh[1],+Uh[2],1):setRgba(Fh,0,0,0,1);Wh=parseCssFloat(Uh.pop());case`rgb`:if(Uh.length>=3)return setRgba(Fh,parseCssInt(Uh[0]),parseCssInt(Uh[1]),parseCssInt(Uh[2]),Uh.length===3?Wh:parseCssFloat(Uh[3])),putToCache(Ph,Fh),Fh;setRgba(Fh,0,0,0,1);return;case`hsla`:if(Uh.length!==4){setRgba(Fh,0,0,0,1);return}return Uh[3]=parseCssFloat(Uh[3]),hsla2rgba(Uh,Fh),putToCache(Ph,Fh),Fh;case`hsl`:if(Uh.length!==3){setRgba(Fh,0,0,0,1);return}return hsla2rgba(Uh,Fh),putToCache(Ph,Fh),Fh;default:return}}setRgba(Fh,0,0,0,1)}}function hsla2rgba(Ph,Fh){var Ih=(parseFloat(Ph[0])%360+360)%360/360,Lh=parseCssFloat(Ph[1]),Rh=parseCssFloat(Ph[2]),zh=Rh<=.5?Rh*(Lh+1):Rh+Lh-Rh*Lh,Bh=Rh*2-zh;return Fh||=[],setRgba(Fh,clampCssByte(cssHueToRgb(Bh,zh,Ih+1/3)*255),clampCssByte(cssHueToRgb(Bh,zh,Ih)*255),clampCssByte(cssHueToRgb(Bh,zh,Ih-1/3)*255),1),Ph.length===4&&(Fh[3]=Ph[3]),Fh}function rgba2hsla(Ph){if(Ph){var Fh=Ph[0]/255,Ih=Ph[1]/255,Lh=Ph[2]/255,Rh=Math.min(Fh,Ih,Lh),zh=Math.max(Fh,Ih,Lh),Bh=zh-Rh,Vh=(zh+Rh)/2,Hh,Uh;if(Bh===0)Hh=0,Uh=0;else{Uh=Vh<.5?Bh/(zh+Rh):Bh/(2-zh-Rh);var Wh=((zh-Fh)/6+Bh/2)/Bh,Gh=((zh-Ih)/6+Bh/2)/Bh,Kh=((zh-Lh)/6+Bh/2)/Bh;Fh===zh?Hh=Kh-Gh:Ih===zh?Hh=1/3+Wh-Kh:Lh===zh&&(Hh=2/3+Gh-Wh),Hh<0&&(Hh+=1),Hh>1&&--Hh}var qh=[Hh*360,Uh,Vh];return Ph[3]!=null&&qh.push(Ph[3]),qh}}function lift(Ph,Fh){var Ih=parse$2(Ph);if(Ih){for(var Lh=0;Lh<3;Lh++)Fh<0?Ih[Lh]=Ih[Lh]*(1-Fh)|0:Ih[Lh]=(255-Ih[Lh])*Fh+Ih[Lh]|0,Ih[Lh]>255?Ih[Lh]=255:Ih[Lh]<0&&(Ih[Lh]=0);return stringify(Ih,Ih.length===4?`rgba`:`rgb`)}}function fastLerp(Ph,Fh,Ih){if(!(!(Fh&&Fh.length)||!(Ph>=0&&Ph<=1))){Ih||=[];var Lh=Ph*(Fh.length-1),Rh=Math.floor(Lh),zh=Math.ceil(Lh),Bh=Fh[Rh],Vh=Fh[zh],Hh=Lh-Rh;return Ih[0]=clampCssByte(lerpNumber(Bh[0],Vh[0],Hh)),Ih[1]=clampCssByte(lerpNumber(Bh[1],Vh[1],Hh)),Ih[2]=clampCssByte(lerpNumber(Bh[2],Vh[2],Hh)),Ih[3]=clampCssFloat(lerpNumber(Bh[3],Vh[3],Hh)),Ih}}function lerp(Ph,Fh,Ih){if(!(!(Fh&&Fh.length)||!(Ph>=0&&Ph<=1))){var Lh=Ph*(Fh.length-1),Rh=Math.floor(Lh),zh=Math.ceil(Lh),Bh=parse$2(Fh[Rh]),Vh=parse$2(Fh[zh]),Hh=Lh-Rh,Uh=stringify([clampCssByte(lerpNumber(Bh[0],Vh[0],Hh)),clampCssByte(lerpNumber(Bh[1],Vh[1],Hh)),clampCssByte(lerpNumber(Bh[2],Vh[2],Hh)),clampCssFloat(lerpNumber(Bh[3],Vh[3],Hh))],`rgba`);return Ih?{color:Uh,leftIndex:Rh,rightIndex:zh,value:Lh}:Uh}}function modifyHSL(Ph,Fh,Ih,Lh){var Rh=parse$2(Ph);if(Ph)return Rh=rgba2hsla(Rh),Fh!=null&&(Rh[0]=clampCssAngle(isFunction(Fh)?Fh(Rh[0]):Fh)),Ih!=null&&(Rh[1]=parseCssFloat(isFunction(Ih)?Ih(Rh[1]):Ih)),Lh!=null&&(Rh[2]=parseCssFloat(isFunction(Lh)?Lh(Rh[2]):Lh)),stringify(hsla2rgba(Rh),`rgba`)}function modifyAlpha(Ph,Fh){var Ih=parse$2(Ph);if(Ih&&Fh!=null)return Ih[3]=clampCssFloat(Fh),stringify(Ih,`rgba`)}function stringify(Ph,Fh){if(!(!Ph||!Ph.length)){var Ih=Ph[0]+`,`+Ph[1]+`,`+Ph[2];return(Fh===`rgba`||Fh===`hsva`||Fh===`hsla`)&&(Ih+=`,`+Ph[3]),Fh+`(`+Ih+`)`}}function lum(Ph,Fh){var Ih=parse$2(Ph);return Ih?(.299*Ih[0]+.587*Ih[1]+.114*Ih[2])*Ih[3]/255+(1-Ih[3])*Fh:0}var liftedColorCache=new LRU(100);function liftColor(Ph){if(isString(Ph)){var Fh=liftedColorCache.get(Ph);return Fh||(Fh=lift(Ph,-.1),liftedColorCache.put(Ph,Fh)),Fh}else if(isGradientObject(Ph)){var Ih=extend$1({},Ph);return Ih.colorStops=map$1(Ph.colorStops,function(Ph){return{offset:Ph.offset,color:lift(Ph.color,-.1)}}),Ih}return Ph}var mathRound$1=Math.round;function normalizeColor(Ph){var Fh;if(!Ph||Ph===`transparent`)Ph=`none`;else if(typeof Ph==`string`&&Ph.indexOf(`rgba`)>-1){var Ih=parse$2(Ph);Ih&&(Ph=`rgb(`+Ih[0]+`,`+Ih[1]+`,`+Ih[2]+`)`,Fh=Ih[3])}return{color:Ph,opacity:Fh??1}}var EPSILON$3=1e-4;function isAroundZero(Ph){return Ph<EPSILON$3&&Ph>-EPSILON$3}function round3(Ph){return mathRound$1(Ph*1e3)/1e3}function round4(Ph){return mathRound$1(Ph*1e4)/1e4}function getMatrixStr(Ph){return`matrix(`+round3(Ph[0])+`,`+round3(Ph[1])+`,`+round3(Ph[2])+`,`+round3(Ph[3])+`,`+round4(Ph[4])+`,`+round4(Ph[5])+`)`}var TEXT_ALIGN_TO_ANCHOR={left:`start`,right:`end`,center:`middle`,middle:`middle`};function adjustTextY$1(Ph,Fh,Ih){return Ih===`top`?Ph+=Fh/2:Ih===`bottom`&&(Ph-=Fh/2),Ph}function hasShadow(Ph){return Ph&&(Ph.shadowBlur||Ph.shadowOffsetX||Ph.shadowOffsetY)}function getShadowKey(Ph){var Fh=Ph.style,Ih=Ph.getGlobalScale();return[Fh.shadowColor,(Fh.shadowBlur||0).toFixed(2),(Fh.shadowOffsetX||0).toFixed(2),(Fh.shadowOffsetY||0).toFixed(2),Ih[0],Ih[1]].join(`,`)}function isImagePattern(Ph){return Ph&&!!Ph.image}function isSVGPattern(Ph){return Ph&&!!Ph.svgElement}function isPattern(Ph){return isImagePattern(Ph)||isSVGPattern(Ph)}function isLinearGradient(Ph){return Ph.type===`linear`}function isRadialGradient(Ph){return Ph.type===`radial`}function isGradient(Ph){return Ph&&(Ph.type===`linear`||Ph.type===`radial`)}function getIdURL(Ph){return`url(#`+Ph+`)`}function getPathPrecision(Ph){var Fh=Ph.getGlobalScale(),Ih=Math.max(Fh[0],Fh[1]);return Math.max(Math.ceil(Math.log(Ih)/Math.log(10)),1)}function getSRTTransformString(Ph){var Fh=Ph.x||0,Ih=Ph.y||0,Lh=(Ph.rotation||0)*RADIAN_TO_DEGREE,Rh=retrieve2(Ph.scaleX,1),zh=retrieve2(Ph.scaleY,1),Bh=Ph.skewX||0,Vh=Ph.skewY||0,Hh=[];return(Fh||Ih)&&Hh.push(`translate(`+Fh+`px,`+Ih+`px)`),Lh&&Hh.push(`rotate(`+Lh+`)`),(Rh!==1||zh!==1)&&Hh.push(`scale(`+Rh+`,`+zh+`)`),(Bh||Vh)&&Hh.push(`skew(`+mathRound$1(Bh*RADIAN_TO_DEGREE)+`deg, `+mathRound$1(Vh*RADIAN_TO_DEGREE)+`deg)`),Hh.join(` `)}var encodeBase64=(function(){return env.hasGlobalWindow&&isFunction(window.btoa)?function(Ph){return window.btoa(unescape(encodeURIComponent(Ph)))}:typeof Buffer<`u`?function(Ph){return Buffer.from(Ph).toString(`base64`)}:function(Ph){return null}})(),arraySlice=Array.prototype.slice;function interpolateNumber$1(Ph,Fh,Ih){return(Fh-Ph)*Ih+Ph}function interpolate1DArray(Ph,Fh,Ih,Lh){for(var Rh=Fh.length,zh=0;zh<Rh;zh++)Ph[zh]=interpolateNumber$1(Fh[zh],Ih[zh],Lh);return Ph}function interpolate2DArray(Ph,Fh,Ih,Lh){for(var Rh=Fh.length,zh=Rh&&Fh[0].length,Bh=0;Bh<Rh;Bh++){Ph[Bh]||(Ph[Bh]=[]);for(var Vh=0;Vh<zh;Vh++)Ph[Bh][Vh]=interpolateNumber$1(Fh[Bh][Vh],Ih[Bh][Vh],Lh)}return Ph}function add1DArray(Ph,Fh,Ih,Lh){for(var Rh=Fh.length,zh=0;zh<Rh;zh++)Ph[zh]=Fh[zh]+Ih[zh]*Lh;return Ph}function add2DArray(Ph,Fh,Ih,Lh){for(var Rh=Fh.length,zh=Rh&&Fh[0].length,Bh=0;Bh<Rh;Bh++){Ph[Bh]||(Ph[Bh]=[]);for(var Vh=0;Vh<zh;Vh++)Ph[Bh][Vh]=Fh[Bh][Vh]+Ih[Bh][Vh]*Lh}return Ph}function fillColorStops(Ph,Fh){for(var Ih=Ph.length,Lh=Fh.length,Rh=Ih>Lh?Fh:Ph,zh=Math.min(Ih,Lh),Bh=Rh[zh-1]||{color:[0,0,0,0],offset:0},Vh=zh;Vh<Math.max(Ih,Lh);Vh++)Rh.push({offset:Bh.offset,color:Bh.color.slice()})}function fillArray(Ph,Fh,Ih){var Lh=Ph,Rh=Fh;if(!(!Lh.push||!Rh.push)){var zh=Lh.length,Bh=Rh.length;if(zh!==Bh)if(zh>Bh)Lh.length=Bh;else for(var Vh=zh;Vh<Bh;Vh++)Lh.push(Ih===1?Rh[Vh]:arraySlice.call(Rh[Vh]));for(var Hh=Lh[0]&&Lh[0].length,Vh=0;Vh<Lh.length;Vh++)if(Ih===1)isNaN(Lh[Vh])&&(Lh[Vh]=Rh[Vh]);else for(var Uh=0;Uh<Hh;Uh++)isNaN(Lh[Vh][Uh])&&(Lh[Vh][Uh]=Rh[Vh][Uh])}}function cloneValue(Ph){if(isArrayLike(Ph)){var Fh=Ph.length;if(isArrayLike(Ph[0])){for(var Ih=[],Lh=0;Lh<Fh;Lh++)Ih.push(arraySlice.call(Ph[Lh]));return Ih}return arraySlice.call(Ph)}return Ph}function rgba2String(Ph){return Ph[0]=Math.floor(Ph[0])||0,Ph[1]=Math.floor(Ph[1])||0,Ph[2]=Math.floor(Ph[2])||0,Ph[3]=Ph[3]==null?1:Ph[3],`rgba(`+Ph.join(`,`)+`)`}function guessArrayDim(Ph){return isArrayLike(Ph&&Ph[0])?2:1}var VALUE_TYPE_NUMBER=0,VALUE_TYPE_1D_ARRAY=1,VALUE_TYPE_2D_ARRAY=2,VALUE_TYPE_COLOR=3,VALUE_TYPE_LINEAR_GRADIENT=4,VALUE_TYPE_RADIAL_GRADIENT=5,VALUE_TYPE_UNKOWN=6;function isGradientValueType(Ph){return Ph===VALUE_TYPE_LINEAR_GRADIENT||Ph===VALUE_TYPE_RADIAL_GRADIENT}function isArrayValueType(Ph){return Ph===VALUE_TYPE_1D_ARRAY||Ph===VALUE_TYPE_2D_ARRAY}var tmpRgba=[0,0,0,0],Track=function(){function Ph(Ph){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=Ph}return Ph.prototype.isFinished=function(){return this._finished},Ph.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},Ph.prototype.needsAnimate=function(){return this.keyframes.length>=1},Ph.prototype.getAdditiveTrack=function(){return this._additiveTrack},Ph.prototype.addKeyframe=function(Ph,Fh,Ih){this._needsSort=!0;var Lh=this.keyframes,Rh=Lh.length,zh=!1,Bh=VALUE_TYPE_UNKOWN,Vh=Fh;if(isArrayLike(Fh)){var Hh=guessArrayDim(Fh);Bh=Hh,(Hh===1&&!isNumber(Fh[0])||Hh===2&&!isNumber(Fh[0][0]))&&(zh=!0)}else if(isNumber(Fh)&&!eqNaN(Fh))Bh=VALUE_TYPE_NUMBER;else if(isString(Fh))if(!isNaN(+Fh))Bh=VALUE_TYPE_NUMBER;else{var Uh=parse$2(Fh);Uh&&(Vh=Uh,Bh=VALUE_TYPE_COLOR)}else if(isGradientObject(Fh)){var Wh=extend$1({},Vh);Wh.colorStops=map$1(Fh.colorStops,function(Ph){return{offset:Ph.offset,color:parse$2(Ph.color)}}),isLinearGradient(Fh)?Bh=VALUE_TYPE_LINEAR_GRADIENT:isRadialGradient(Fh)&&(Bh=VALUE_TYPE_RADIAL_GRADIENT),Vh=Wh}Rh===0?this.valType=Bh:(Bh!==this.valType||Bh===VALUE_TYPE_UNKOWN)&&(zh=!0),this.discrete=this.discrete||zh;var Gh={time:Ph,value:Vh,rawValue:Fh,percent:0};return Ih&&(Gh.easing=Ih,Gh.easingFunc=isFunction(Ih)?Ih:easingFuncs[Ih]||createCubicEasingFunc(Ih)),Lh.push(Gh),Gh},Ph.prototype.prepare=function(Ph,Fh){var Ih=this.keyframes;this._needsSort&&Ih.sort(function(Ph,Fh){return Ph.time-Fh.time});for(var Lh=this.valType,Rh=Ih.length,zh=Ih[Rh-1],Bh=this.discrete,Vh=isArrayValueType(Lh),Hh=isGradientValueType(Lh),Uh=0;Uh<Rh;Uh++){var Wh=Ih[Uh],Gh=Wh.value,Kh=zh.value;Wh.percent=Wh.time/Ph,Bh||(Vh&&Uh!==Rh-1?fillArray(Gh,Kh,Lh):Hh&&fillColorStops(Gh.colorStops,Kh.colorStops))}if(!Bh&&Lh!==VALUE_TYPE_RADIAL_GRADIENT&&Fh&&this.needsAnimate()&&Fh.needsAnimate()&&Lh===Fh.valType&&!Fh._finished){this._additiveTrack=Fh;for(var qh=Ih[0].value,Uh=0;Uh<Rh;Uh++)Lh===VALUE_TYPE_NUMBER?Ih[Uh].additiveValue=Ih[Uh].value-qh:Lh===VALUE_TYPE_COLOR?Ih[Uh].additiveValue=add1DArray([],Ih[Uh].value,qh,-1):isArrayValueType(Lh)&&(Ih[Uh].additiveValue=Lh===VALUE_TYPE_1D_ARRAY?add1DArray([],Ih[Uh].value,qh,-1):add2DArray([],Ih[Uh].value,qh,-1))}},Ph.prototype.step=function(Ph,Fh){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var Ih=this._additiveTrack!=null,Lh=Ih?`additiveValue`:`value`,Rh=this.valType,zh=this.keyframes,Bh=zh.length,Vh=this.propName,Hh=Rh===VALUE_TYPE_COLOR,Uh,Wh=this._lastFr,Gh=Math.min,Kh,qh;if(Bh===1)Kh=qh=zh[0];else{if(Fh<0)Uh=0;else if(Fh<this._lastFrP){for(Uh=Gh(Wh+1,Bh-1);Uh>=0&&!(zh[Uh].percent<=Fh);Uh--);Uh=Gh(Uh,Bh-2)}else{for(Uh=Wh;Uh<Bh&&!(zh[Uh].percent>Fh);Uh++);Uh=Gh(Uh-1,Bh-2)}qh=zh[Uh+1],Kh=zh[Uh]}if(Kh&&qh){this._lastFr=Uh,this._lastFrP=Fh;var Jh=qh.percent-Kh.percent,Yh=Jh===0?1:Gh((Fh-Kh.percent)/Jh,1);qh.easingFunc&&(Yh=qh.easingFunc(Yh));var Xh=Ih?this._additiveValue:Hh?tmpRgba:Ph[Vh];if((isArrayValueType(Rh)||Hh)&&!Xh&&(Xh=this._additiveValue=[]),this.discrete)Ph[Vh]=Yh<1?Kh.rawValue:qh.rawValue;else if(isArrayValueType(Rh))Rh===VALUE_TYPE_1D_ARRAY?interpolate1DArray(Xh,Kh[Lh],qh[Lh],Yh):interpolate2DArray(Xh,Kh[Lh],qh[Lh],Yh);else if(isGradientValueType(Rh)){var Zh=Kh[Lh],Qh=qh[Lh],$h=Rh===VALUE_TYPE_LINEAR_GRADIENT;Ph[Vh]={type:$h?`linear`:`radial`,x:interpolateNumber$1(Zh.x,Qh.x,Yh),y:interpolateNumber$1(Zh.y,Qh.y,Yh),colorStops:map$1(Zh.colorStops,function(Ph,Fh){var Ih=Qh.colorStops[Fh];return{offset:interpolateNumber$1(Ph.offset,Ih.offset,Yh),color:rgba2String(interpolate1DArray([],Ph.color,Ih.color,Yh))}}),global:Qh.global},$h?(Ph[Vh].x2=interpolateNumber$1(Zh.x2,Qh.x2,Yh),Ph[Vh].y2=interpolateNumber$1(Zh.y2,Qh.y2,Yh)):Ph[Vh].r=interpolateNumber$1(Zh.r,Qh.r,Yh)}else if(Hh)interpolate1DArray(Xh,Kh[Lh],qh[Lh],Yh),Ih||(Ph[Vh]=rgba2String(Xh));else{var eg=interpolateNumber$1(Kh[Lh],qh[Lh],Yh);Ih?this._additiveValue=eg:Ph[Vh]=eg}Ih&&this._addToTarget(Ph)}}},Ph.prototype._addToTarget=function(Ph){var Fh=this.valType,Ih=this.propName,Lh=this._additiveValue;Fh===VALUE_TYPE_NUMBER?Ph[Ih]=Ph[Ih]+Lh:Fh===VALUE_TYPE_COLOR?(parse$2(Ph[Ih],tmpRgba),add1DArray(tmpRgba,tmpRgba,Lh,1),Ph[Ih]=rgba2String(tmpRgba)):Fh===VALUE_TYPE_1D_ARRAY?add1DArray(Ph[Ih],Ph[Ih],Lh,1):Fh===VALUE_TYPE_2D_ARRAY&&add2DArray(Ph[Ih],Ph[Ih],Lh,1)},Ph}(),Animator=function(){function Ph(Ph,Fh,Ih,Lh){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=Ph,this._loop=Fh,Fh&&Lh){logError(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=Lh,this._allowDiscrete=Ih}return Ph.prototype.getMaxTime=function(){return this._maxTime},Ph.prototype.getDelay=function(){return this._delay},Ph.prototype.getLoop=function(){return this._loop},Ph.prototype.getTarget=function(){return this._target},Ph.prototype.changeTarget=function(Ph){this._target=Ph},Ph.prototype.when=function(Ph,Fh,Ih){return this.whenWithKeys(Ph,Fh,keys(Fh),Ih)},Ph.prototype.whenWithKeys=function(Ph,Fh,Ih,Lh){for(var Rh=this._tracks,zh=0;zh<Ih.length;zh++){var Bh=Ih[zh],Vh=Rh[Bh];if(!Vh){Vh=Rh[Bh]=new Track(Bh);var Hh=void 0,Uh=this._getAdditiveTrack(Bh);if(Uh){var Wh=Uh.keyframes,Gh=Wh[Wh.length-1];Hh=Gh&&Gh.value,Uh.valType===VALUE_TYPE_COLOR&&Hh&&(Hh=rgba2String(Hh))}else Hh=this._target[Bh];if(Hh==null)continue;Ph>0&&Vh.addKeyframe(0,cloneValue(Hh),Lh),this._trackKeys.push(Bh)}Vh.addKeyframe(Ph,cloneValue(Fh[Bh]),Lh)}return this._maxTime=Math.max(this._maxTime,Ph),this},Ph.prototype.pause=function(){this._clip.pause(),this._paused=!0},Ph.prototype.resume=function(){this._clip.resume(),this._paused=!1},Ph.prototype.isPaused=function(){return!!this._paused},Ph.prototype.duration=function(Ph){return this._maxTime=Ph,this._force=!0,this},Ph.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var Ph=this._doneCbs;if(Ph)for(var Fh=Ph.length,Ih=0;Ih<Fh;Ih++)Ph[Ih].call(this)},Ph.prototype._abortedCallback=function(){this._setTracksFinished();var Ph=this.animation,Fh=this._abortedCbs;if(Ph&&Ph.removeClip(this._clip),this._clip=null,Fh)for(var Ih=0;Ih<Fh.length;Ih++)Fh[Ih].call(this)},Ph.prototype._setTracksFinished=function(){for(var Ph=this._tracks,Fh=this._trackKeys,Ih=0;Ih<Fh.length;Ih++)Ph[Fh[Ih]].setFinished()},Ph.prototype._getAdditiveTrack=function(Ph){var Fh,Ih=this._additiveAnimators;if(Ih)for(var Lh=0;Lh<Ih.length;Lh++){var Rh=Ih[Lh].getTrack(Ph);Rh&&(Fh=Rh)}return Fh},Ph.prototype.start=function(Ph){if(!(this._started>0)){this._started=1;for(var Fh=this,Ih=[],Lh=this._maxTime||0,Rh=0;Rh<this._trackKeys.length;Rh++){var zh=this._trackKeys[Rh],Bh=this._tracks[zh],Vh=this._getAdditiveTrack(zh),Hh=Bh.keyframes,Uh=Hh.length;if(Bh.prepare(Lh,Vh),Bh.needsAnimate())if(!this._allowDiscrete&&Bh.discrete){var Wh=Hh[Uh-1];Wh&&(Fh._target[Bh.propName]=Wh.rawValue),Bh.setFinished()}else Ih.push(Bh)}if(Ih.length||this._force){var Gh=new Clip({life:Lh,loop:this._loop,delay:this._delay||0,onframe:function(Ph){Fh._started=2;var Lh=Fh._additiveAnimators;if(Lh){for(var Rh=!1,zh=0;zh<Lh.length;zh++)if(Lh[zh]._clip){Rh=!0;break}Rh||(Fh._additiveAnimators=null)}for(var zh=0;zh<Ih.length;zh++)Ih[zh].step(Fh._target,Ph);var Bh=Fh._onframeCbs;if(Bh)for(var zh=0;zh<Bh.length;zh++)Bh[zh](Fh._target,Ph)},ondestroy:function(){Fh._doneCallback()}});this._clip=Gh,this.animation&&this.animation.addClip(Gh),Ph&&Gh.setEasing(Ph)}else this._doneCallback();return this}},Ph.prototype.stop=function(Ph){if(this._clip){var Fh=this._clip;Ph&&Fh.onframe(1),this._abortedCallback()}},Ph.prototype.delay=function(Ph){return this._delay=Ph,this},Ph.prototype.during=function(Ph){return Ph&&(this._onframeCbs||=[],this._onframeCbs.push(Ph)),this},Ph.prototype.done=function(Ph){return Ph&&(this._doneCbs||=[],this._doneCbs.push(Ph)),this},Ph.prototype.aborted=function(Ph){return Ph&&(this._abortedCbs||=[],this._abortedCbs.push(Ph)),this},Ph.prototype.getClip=function(){return this._clip},Ph.prototype.getTrack=function(Ph){return this._tracks[Ph]},Ph.prototype.getTracks=function(){var Ph=this;return map$1(this._trackKeys,function(Fh){return Ph._tracks[Fh]})},Ph.prototype.stopTracks=function(Ph,Fh){if(!Ph.length||!this._clip)return!0;for(var Ih=this._tracks,Lh=this._trackKeys,Rh=0;Rh<Ph.length;Rh++){var zh=Ih[Ph[Rh]];zh&&!zh.isFinished()&&(Fh?zh.step(this._target,1):this._started===1&&zh.step(this._target,0),zh.setFinished())}for(var Bh=!0,Rh=0;Rh<Lh.length;Rh++)if(!Ih[Lh[Rh]].isFinished()){Bh=!1;break}return Bh&&this._abortedCallback(),Bh},Ph.prototype.saveTo=function(Ph,Fh,Ih){if(Ph){Fh||=this._trackKeys;for(var Lh=0;Lh<Fh.length;Lh++){var Rh=Fh[Lh],zh=this._tracks[Rh];if(!(!zh||zh.isFinished())){var Bh=zh.keyframes,Vh=Bh[Ih?0:Bh.length-1];Vh&&(Ph[Rh]=cloneValue(Vh.rawValue))}}}},Ph.prototype.__changeFinalValue=function(Ph,Fh){Fh||=keys(Ph);for(var Ih=0;Ih<Fh.length;Ih++){var Lh=Fh[Ih],Rh=this._tracks[Lh];if(Rh){var zh=Rh.keyframes;if(zh.length>1){var Bh=zh.pop();Rh.addKeyframe(Bh.time,Ph[Lh]),Rh.prepare(this._maxTime,Rh.getAdditiveTrack())}}}},Ph}();function getTime(){return new Date().getTime()}var Animation=function(Ph){__extends(Fh,Ph);function Fh(Fh){var Ih=Ph.call(this)||this;return Ih._running=!1,Ih._time=0,Ih._pausedTime=0,Ih._pauseStart=0,Ih._paused=!1,Fh||={},Ih.stage=Fh.stage||{},Ih}return Fh.prototype.addClip=function(Ph){Ph.animation&&this.removeClip(Ph),this._head?(this._tail.next=Ph,Ph.prev=this._tail,Ph.next=null,this._tail=Ph):this._head=this._tail=Ph,Ph.animation=this},Fh.prototype.addAnimator=function(Ph){Ph.animation=this;var Fh=Ph.getClip();Fh&&this.addClip(Fh)},Fh.prototype.removeClip=function(Ph){if(Ph.animation){var Fh=Ph.prev,Ih=Ph.next;Fh?Fh.next=Ih:this._head=Ih,Ih?Ih.prev=Fh:this._tail=Fh,Ph.next=Ph.prev=Ph.animation=null}},Fh.prototype.removeAnimator=function(Ph){var Fh=Ph.getClip();Fh&&this.removeClip(Fh),Ph.animation=null},Fh.prototype.update=function(Ph){for(var Fh=getTime()-this._pausedTime,Ih=Fh-this._time,Lh=this._head;Lh;){var Rh=Lh.next;Lh.step(Fh,Ih)?(Lh.ondestroy(),this.removeClip(Lh),Lh=Rh):Lh=Rh}this._time=Fh,Ph||(this.trigger(`frame`,Ih),this.stage.update&&this.stage.update())},Fh.prototype._startLoop=function(){var Ph=this;this._running=!0;function Fh(){Ph._running&&(requestAnimationFrame$1(Fh),!Ph._paused&&Ph.update())}requestAnimationFrame$1(Fh)},Fh.prototype.start=function(){this._running||(this._time=getTime(),this._pausedTime=0,this._startLoop())},Fh.prototype.stop=function(){this._running=!1},Fh.prototype.pause=function(){this._paused||=(this._pauseStart=getTime(),!0)},Fh.prototype.resume=function(){this._paused&&=(this._pausedTime+=getTime()-this._pauseStart,!1)},Fh.prototype.clear=function(){for(var Ph=this._head;Ph;){var Fh=Ph.next;Ph.prev=Ph.next=Ph.animation=null,Ph=Fh}this._head=this._tail=null},Fh.prototype.isFinished=function(){return this._head==null},Fh.prototype.animate=function(Ph,Fh){Fh||={},this.start();var Ih=new Animator(Ph,Fh.loop);return this.addAnimator(Ih),Ih},Fh}(Eventful),TOUCH_CLICK_DELAY=300,globalEventSupported=env.domSupported,localNativeListenerNames=(function(){var Ph=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Fh=[`touchstart`,`touchend`,`touchmove`],Ih={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:Ph,touch:Fh,pointer:map$1(Ph,function(Ph){var Fh=Ph.replace(`mouse`,`pointer`);return Ih.hasOwnProperty(Fh)?Fh:Ph})}})(),globalNativeListenerNames={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},wheelEventSupported=!1;function isPointerFromTouch(Ph){var Fh=Ph.pointerType;return Fh===`pen`||Fh===`touch`}function setTouchTimer(Ph){Ph.touching=!0,Ph.touchTimer!=null&&(clearTimeout(Ph.touchTimer),Ph.touchTimer=null),Ph.touchTimer=setTimeout(function(){Ph.touching=!1,Ph.touchTimer=null},700)}function markTouch(Ph){Ph&&(Ph.zrByTouch=!0)}function normalizeGlobalEvent(Ph,Fh){return normalizeEvent(Ph.dom,new FakeGlobalEvent(Ph,Fh),!0)}function isLocalEl(Ph,Fh){for(var Ih=Fh,Lh=!1;Ih&&Ih.nodeType!==9&&!(Lh=Ih.domBelongToZr||Ih!==Fh&&Ih===Ph.painterRoot);)Ih=Ih.parentNode;return Lh}var FakeGlobalEvent=function(){function Ph(Ph,Fh){this.stopPropagation=noop,this.stopImmediatePropagation=noop,this.preventDefault=noop,this.type=Fh.type,this.target=this.currentTarget=Ph.dom,this.pointerType=Fh.pointerType,this.clientX=Fh.clientX,this.clientY=Fh.clientY}return Ph}(),localDOMHandlers={mousedown:function(Ph){Ph=normalizeEvent(this.dom,Ph),this.__mayPointerCapture=[Ph.zrX,Ph.zrY],this.trigger(`mousedown`,Ph)},mousemove:function(Ph){Ph=normalizeEvent(this.dom,Ph);var Fh=this.__mayPointerCapture;Fh&&(Ph.zrX!==Fh[0]||Ph.zrY!==Fh[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,Ph)},mouseup:function(Ph){Ph=normalizeEvent(this.dom,Ph),this.__togglePointerCapture(!1),this.trigger(`mouseup`,Ph)},mouseout:function(Ph){Ph=normalizeEvent(this.dom,Ph);var Fh=Ph.toElement||Ph.relatedTarget;isLocalEl(this,Fh)||(this.__pointerCapturing&&(Ph.zrEventControl=`no_globalout`),this.trigger(`mouseout`,Ph))},wheel:function(Ph){wheelEventSupported=!0,Ph=normalizeEvent(this.dom,Ph),this.trigger(`mousewheel`,Ph)},mousewheel:function(Ph){wheelEventSupported||(Ph=normalizeEvent(this.dom,Ph),this.trigger(`mousewheel`,Ph))},touchstart:function(Ph){Ph=normalizeEvent(this.dom,Ph),markTouch(Ph),this.__lastTouchMoment=new Date,this.handler.processGesture(Ph,`start`),localDOMHandlers.mousemove.call(this,Ph),localDOMHandlers.mousedown.call(this,Ph)},touchmove:function(Ph){Ph=normalizeEvent(this.dom,Ph),markTouch(Ph),this.handler.processGesture(Ph,`change`),localDOMHandlers.mousemove.call(this,Ph)},touchend:function(Ph){Ph=normalizeEvent(this.dom,Ph),markTouch(Ph),this.handler.processGesture(Ph,`end`),localDOMHandlers.mouseup.call(this,Ph),new Date-+this.__lastTouchMoment<TOUCH_CLICK_DELAY&&localDOMHandlers.click.call(this,Ph)},pointerdown:function(Ph){localDOMHandlers.mousedown.call(this,Ph)},pointermove:function(Ph){isPointerFromTouch(Ph)||localDOMHandlers.mousemove.call(this,Ph)},pointerup:function(Ph){localDOMHandlers.mouseup.call(this,Ph)},pointerout:function(Ph){isPointerFromTouch(Ph)||localDOMHandlers.mouseout.call(this,Ph)}};each$15([`click`,`dblclick`,`contextmenu`],function(Ph){localDOMHandlers[Ph]=function(Fh){Fh=normalizeEvent(this.dom,Fh),this.trigger(Ph,Fh)}});var globalDOMHandlers={pointermove:function(Ph){isPointerFromTouch(Ph)||globalDOMHandlers.mousemove.call(this,Ph)},pointerup:function(Ph){globalDOMHandlers.mouseup.call(this,Ph)},mousemove:function(Ph){this.trigger(`mousemove`,Ph)},mouseup:function(Ph){var Fh=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,Ph),Fh&&(Ph.zrEventControl=`only_globalout`,this.trigger(`mouseout`,Ph))}};function mountLocalDOMEventListeners(Ph,Fh){var Ih=Fh.domHandlers;env.pointerEventsSupported?each$15(localNativeListenerNames.pointer,function(Lh){mountSingleDOMEventListener(Fh,Lh,function(Fh){Ih[Lh].call(Ph,Fh)})}):(env.touchEventsSupported&&each$15(localNativeListenerNames.touch,function(Lh){mountSingleDOMEventListener(Fh,Lh,function(Rh){Ih[Lh].call(Ph,Rh),setTouchTimer(Fh)})}),each$15(localNativeListenerNames.mouse,function(Lh){mountSingleDOMEventListener(Fh,Lh,function(Rh){Rh=getNativeEvent(Rh),Fh.touching||Ih[Lh].call(Ph,Rh)})}))}function mountGlobalDOMEventListeners(Ph,Fh){env.pointerEventsSupported?each$15(globalNativeListenerNames.pointer,Ih):env.touchEventsSupported||each$15(globalNativeListenerNames.mouse,Ih);function Ih(Ih){function Lh(Lh){Lh=getNativeEvent(Lh),isLocalEl(Ph,Lh.target)||(Lh=normalizeGlobalEvent(Ph,Lh),Fh.domHandlers[Ih].call(Ph,Lh))}mountSingleDOMEventListener(Fh,Ih,Lh,{capture:!0})}}function mountSingleDOMEventListener(Ph,Fh,Ih,Lh){Ph.mounted[Fh]=Ih,Ph.listenerOpts[Fh]=Lh,addEventListener$1(Ph.domTarget,Fh,Ih,Lh)}function unmountDOMEventListeners(Ph){var Fh=Ph.mounted;for(var Ih in Fh)Fh.hasOwnProperty(Ih)&&removeEventListener$1(Ph.domTarget,Ih,Fh[Ih],Ph.listenerOpts[Ih]);Ph.mounted={}}var DOMHandlerScope=function(){function Ph(Ph,Fh){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=Ph,this.domHandlers=Fh}return Ph}(),HandlerDomProxy=function(Ph){__extends(Fh,Ph);function Fh(Fh,Ih){var Lh=Ph.call(this)||this;return Lh.__pointerCapturing=!1,Lh.dom=Fh,Lh.painterRoot=Ih,Lh._localHandlerScope=new DOMHandlerScope(Fh,localDOMHandlers),globalEventSupported&&(Lh._globalHandlerScope=new DOMHandlerScope(document,globalDOMHandlers)),mountLocalDOMEventListeners(Lh,Lh._localHandlerScope),Lh}return Fh.prototype.dispose=function(){unmountDOMEventListeners(this._localHandlerScope),globalEventSupported&&unmountDOMEventListeners(this._globalHandlerScope)},Fh.prototype.setCursor=function(Ph){this.dom.style&&(this.dom.style.cursor=Ph||`default`)},Fh.prototype.__togglePointerCapture=function(Ph){if(this.__mayPointerCapture=null,globalEventSupported&&this.__pointerCapturing^+Ph){this.__pointerCapturing=Ph;var Fh=this._globalHandlerScope;Ph?mountGlobalDOMEventListeners(this,Fh):unmountDOMEventListeners(Fh)}},Fh}(Eventful),dpr=1;env.hasGlobalWindow&&(dpr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var devicePixelRatio=dpr,DARK_MODE_THRESHOLD=.4,DARK_LABEL_COLOR=`#333`,LIGHT_LABEL_COLOR=`#ccc`,LIGHTER_LABEL_COLOR=`#eee`,mIdentity=identity,EPSILON$2=5e-5;function isNotAroundZero(Ph){return Ph>EPSILON$2||Ph<-EPSILON$2}var scaleTmp=[],tmpTransform=[],originTransform=create$1(),abs=Math.abs,Transformable=function(){function Ph(){}return Ph.prototype.getLocalTransform=function(Fh){return Ph.getLocalTransform(this,Fh)},Ph.prototype.setPosition=function(Ph){this.x=Ph[0],this.y=Ph[1]},Ph.prototype.setScale=function(Ph){this.scaleX=Ph[0],this.scaleY=Ph[1]},Ph.prototype.setSkew=function(Ph){this.skewX=Ph[0],this.skewY=Ph[1]},Ph.prototype.setOrigin=function(Ph){this.originX=Ph[0],this.originY=Ph[1]},Ph.prototype.needLocalTransform=function(){return isNotAroundZero(this.rotation)||isNotAroundZero(this.x)||isNotAroundZero(this.y)||isNotAroundZero(this.scaleX-1)||isNotAroundZero(this.scaleY-1)||isNotAroundZero(this.skewX)||isNotAroundZero(this.skewY)},Ph.prototype.updateTransform=function(){var Ph=this.parent&&this.parent.transform,Fh=this.needLocalTransform(),Ih=this.transform;if(!(Fh||Ph)){Ih&&(mIdentity(Ih),this.invTransform=null);return}Ih||=create$1(),Fh?this.getLocalTransform(Ih):mIdentity(Ih),Ph&&(Fh?mul(Ih,Ph,Ih):copy(Ih,Ph)),this.transform=Ih,this._resolveGlobalScaleRatio(Ih)},Ph.prototype._resolveGlobalScaleRatio=function(Ph){var Fh=this.globalScaleRatio;if(Fh!=null&&Fh!==1){this.getGlobalScale(scaleTmp);var Ih=scaleTmp[0]<0?-1:1,Lh=scaleTmp[1]<0?-1:1,Rh=((scaleTmp[0]-Ih)*Fh+Ih)/scaleTmp[0]||0,zh=((scaleTmp[1]-Lh)*Fh+Lh)/scaleTmp[1]||0;Ph[0]*=Rh,Ph[1]*=Rh,Ph[2]*=zh,Ph[3]*=zh}this.invTransform=this.invTransform||create$1(),invert(this.invTransform,Ph)},Ph.prototype.getComputedTransform=function(){for(var Ph=this,Fh=[];Ph;)Fh.push(Ph),Ph=Ph.parent;for(;Ph=Fh.pop();)Ph.updateTransform();return this.transform},Ph.prototype.setLocalTransform=function(Ph){if(Ph){var Fh=Ph[0]*Ph[0]+Ph[1]*Ph[1],Ih=Ph[2]*Ph[2]+Ph[3]*Ph[3],Lh=Math.atan2(Ph[1],Ph[0]),Rh=Math.PI/2+Lh-Math.atan2(Ph[3],Ph[2]);Ih=Math.sqrt(Ih)*Math.cos(Rh),Fh=Math.sqrt(Fh),this.skewX=Rh,this.skewY=0,this.rotation=-Lh,this.x=+Ph[4],this.y=+Ph[5],this.scaleX=Fh,this.scaleY=Ih,this.originX=0,this.originY=0}},Ph.prototype.decomposeTransform=function(){if(this.transform){var Ph=this.parent,Fh=this.transform;Ph&&Ph.transform&&(Ph.invTransform=Ph.invTransform||create$1(),mul(tmpTransform,Ph.invTransform,Fh),Fh=tmpTransform);var Ih=this.originX,Lh=this.originY;(Ih||Lh)&&(originTransform[4]=Ih,originTransform[5]=Lh,mul(tmpTransform,Fh,originTransform),tmpTransform[4]-=Ih,tmpTransform[5]-=Lh,Fh=tmpTransform),this.setLocalTransform(Fh)}},Ph.prototype.getGlobalScale=function(Ph){var Fh=this.transform;return Ph||=[],Fh?(Ph[0]=Math.sqrt(Fh[0]*Fh[0]+Fh[1]*Fh[1]),Ph[1]=Math.sqrt(Fh[2]*Fh[2]+Fh[3]*Fh[3]),Fh[0]<0&&(Ph[0]=-Ph[0]),Fh[3]<0&&(Ph[1]=-Ph[1]),Ph):(Ph[0]=1,Ph[1]=1,Ph)},Ph.prototype.transformCoordToLocal=function(Ph,Fh){var Ih=[Ph,Fh],Lh=this.invTransform;return Lh&&applyTransform$1(Ih,Ih,Lh),Ih},Ph.prototype.transformCoordToGlobal=function(Ph,Fh){var Ih=[Ph,Fh],Lh=this.transform;return Lh&&applyTransform$1(Ih,Ih,Lh),Ih},Ph.prototype.getLineScale=function(){var Ph=this.transform;return Ph&&abs(Ph[0]-1)>1e-10&&abs(Ph[3]-1)>1e-10?Math.sqrt(abs(Ph[0]*Ph[3]-Ph[2]*Ph[1])):1},Ph.prototype.copyTransform=function(Ph){copyTransform(this,Ph)},Ph.getLocalTransform=function(Ph,Fh){Fh||=[];var Ih=Ph.originX||0,Lh=Ph.originY||0,Rh=Ph.scaleX,zh=Ph.scaleY,Bh=Ph.anchorX,Vh=Ph.anchorY,Hh=Ph.rotation||0,Uh=Ph.x,Wh=Ph.y,Gh=Ph.skewX?Math.tan(Ph.skewX):0,Kh=Ph.skewY?Math.tan(-Ph.skewY):0;if(Ih||Lh||Bh||Vh){var qh=Ih+Bh,Jh=Lh+Vh;Fh[4]=-qh*Rh-Gh*Jh*zh,Fh[5]=-Jh*zh-Kh*qh*Rh}else Fh[4]=Fh[5]=0;return Fh[0]=Rh,Fh[3]=zh,Fh[1]=Kh*Rh,Fh[2]=Gh*zh,Hh&&rotate(Fh,Fh,Hh),Fh[4]+=Ih+Uh,Fh[5]+=Lh+Wh,Fh},Ph.initDefaultProps=(function(){var Fh=Ph.prototype;Fh.scaleX=Fh.scaleY=Fh.globalScaleRatio=1,Fh.x=Fh.y=Fh.originX=Fh.originY=Fh.skewX=Fh.skewY=Fh.rotation=Fh.anchorX=Fh.anchorY=0})(),Ph}(),TRANSFORMABLE_PROPS=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function copyTransform(Ph,Fh){for(var Ih=0;Ih<TRANSFORMABLE_PROPS.length;Ih++){var Lh=TRANSFORMABLE_PROPS[Ih];Ph[Lh]=Fh[Lh]}}function ensureFontMeasureInfo(Ph){_fontMeasureInfoCache||=new LRU(100),Ph||=`12px sans-serif`;var Fh=_fontMeasureInfoCache.get(Ph);return Fh||(Fh={font:Ph,strWidthCache:new LRU(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:platformApi.measureText(`国`,Ph).width,asciiCharWidth:platformApi.measureText(`a`,Ph).width},_fontMeasureInfoCache.put(Ph,Fh)),Fh}var _fontMeasureInfoCache;function tryCreateASCIIWidthMap(Ph){if(!(_getASCIIWidthMapLongCount>=GET_ASCII_WIDTH_LONG_COUNT_MAX)){Ph||=`12px sans-serif`;for(var Fh=[],Ih=+new Date,Lh=0;Lh<=127;Lh++)Fh[Lh]=platformApi.measureText(String.fromCharCode(Lh),Ph).width;var Rh=+new Date-Ih;return Rh>16?_getASCIIWidthMapLongCount=GET_ASCII_WIDTH_LONG_COUNT_MAX:Rh>2&&_getASCIIWidthMapLongCount++,Fh}}var _getASCIIWidthMapLongCount=0,GET_ASCII_WIDTH_LONG_COUNT_MAX=5;function measureCharWidth(Ph,Fh){return Ph.asciiWidthMapTried||=(Ph.asciiWidthMap=tryCreateASCIIWidthMap(Ph.font),!0),0<=Fh&&Fh<=127?Ph.asciiWidthMap==null?Ph.asciiCharWidth:Ph.asciiWidthMap[Fh]:Ph.stWideCharWidth}function measureWidth(Ph,Fh){var Ih=Ph.strWidthCache,Lh=Ih.get(Fh);return Lh??(Lh=platformApi.measureText(Fh,Ph.font).width,Ih.put(Fh,Lh)),Lh}function innerGetBoundingRect(Ph,Fh,Ih,Lh){var Rh=measureWidth(ensureFontMeasureInfo(Fh),Ph),zh=getLineHeight(Fh);return new BoundingRect(adjustTextX(0,Rh,Ih),adjustTextY(0,zh,Lh),Rh,zh)}function getBoundingRect(Ph,Fh,Ih,Lh){var Rh=((Ph||``)+``).split(`
4839
4839
  `);if(Rh.length===1)return innerGetBoundingRect(Rh[0],Fh,Ih,Lh);for(var zh=new BoundingRect(0,0,0,0),Bh=0;Bh<Rh.length;Bh++){var Vh=innerGetBoundingRect(Rh[Bh],Fh,Ih,Lh);Bh===0?zh.copy(Vh):zh.union(Vh)}return zh}function adjustTextX(Ph,Fh,Ih,Lh){return Ih===`right`?Lh?Ph+=Fh:Ph-=Fh:Ih===`center`&&(Lh?Ph+=Fh/2:Ph-=Fh/2),Ph}function adjustTextY(Ph,Fh,Ih,Lh){return Ih===`middle`?Lh?Ph+=Fh/2:Ph-=Fh/2:Ih===`bottom`&&(Lh?Ph+=Fh:Ph-=Fh),Ph}function getLineHeight(Ph){return ensureFontMeasureInfo(Ph).stWideCharWidth}function parsePercent$1(Ph,Fh){return typeof Ph==`string`?Ph.lastIndexOf(`%`)>=0?parseFloat(Ph)/100*Fh:parseFloat(Ph):Ph}function calculateTextPosition(Ph,Fh,Ih){var Lh=Fh.position||`inside`,Rh=Fh.distance==null?5:Fh.distance,zh=Ih.height,Bh=Ih.width,Vh=zh/2,Hh=Ih.x,Uh=Ih.y,Wh=`left`,Gh=`top`;if(Lh instanceof Array)Hh+=parsePercent$1(Lh[0],Ih.width),Uh+=parsePercent$1(Lh[1],Ih.height),Wh=null,Gh=null;else switch(Lh){case`left`:Hh-=Rh,Uh+=Vh,Wh=`right`,Gh=`middle`;break;case`right`:Hh+=Rh+Bh,Uh+=Vh,Gh=`middle`;break;case`top`:Hh+=Bh/2,Uh-=Rh,Wh=`center`,Gh=`bottom`;break;case`bottom`:Hh+=Bh/2,Uh+=zh+Rh,Wh=`center`;break;case`inside`:Hh+=Bh/2,Uh+=Vh,Wh=`center`,Gh=`middle`;break;case`insideLeft`:Hh+=Rh,Uh+=Vh,Gh=`middle`;break;case`insideRight`:Hh+=Bh-Rh,Uh+=Vh,Wh=`right`,Gh=`middle`;break;case`insideTop`:Hh+=Bh/2,Uh+=Rh,Wh=`center`;break;case`insideBottom`:Hh+=Bh/2,Uh+=zh-Rh,Wh=`center`,Gh=`bottom`;break;case`insideTopLeft`:Hh+=Rh,Uh+=Rh;break;case`insideTopRight`:Hh+=Bh-Rh,Uh+=Rh,Wh=`right`;break;case`insideBottomLeft`:Hh+=Rh,Uh+=zh-Rh,Gh=`bottom`;break;case`insideBottomRight`:Hh+=Bh-Rh,Uh+=zh-Rh,Wh=`right`,Gh=`bottom`;break}return Ph||={},Ph.x=Hh,Ph.y=Uh,Ph.align=Wh,Ph.verticalAlign=Gh,Ph}var PRESERVED_NORMAL_STATE=`__zr_normal__`,PRIMARY_STATES_KEYS$1=TRANSFORMABLE_PROPS.concat([`ignore`]),DEFAULT_ANIMATABLE_MAP=reduce(TRANSFORMABLE_PROPS,function(Ph,Fh){return Ph[Fh]=!0,Ph},{ignore:!1}),tmpTextPosCalcRes={},tmpBoundingRect=new BoundingRect(0,0,0,0),tmpInnerTextTrans=[],Element$1=function(){function Ph(Ph){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(Ph)}return Ph.prototype._init=function(Ph){this.attr(Ph)},Ph.prototype.drift=function(Ph,Fh,Ih){switch(this.draggable){case`horizontal`:Fh=0;break;case`vertical`:Ph=0;break}var Lh=this.transform;Lh||=this.transform=[1,0,0,1,0,0],Lh[4]+=Ph,Lh[5]+=Fh,this.decomposeTransform(),this.markRedraw()},Ph.prototype.beforeUpdate=function(){},Ph.prototype.afterUpdate=function(){},Ph.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},Ph.prototype.updateInnerText=function(Ph){var Fh=this._textContent;if(Fh&&(!Fh.ignore||Ph)){this.textConfig||={};var Ih=this.textConfig,Lh=Ih.local,Rh=Fh.innerTransformable,zh=void 0,Bh=void 0,Vh=!1;Rh.parent=Lh?this:null;var Hh=!1;Rh.copyTransform(Fh);var Uh=Ih.position!=null,Wh=Ih.autoOverflowArea,Gh=void 0;if((Wh||Uh)&&(Gh=tmpBoundingRect,Ih.layoutRect?Gh.copy(Ih.layoutRect):Gh.copy(this.getBoundingRect()),Lh||Gh.applyTransform(this.transform)),Uh){this.calculateTextPosition?this.calculateTextPosition(tmpTextPosCalcRes,Ih,Gh):calculateTextPosition(tmpTextPosCalcRes,Ih,Gh),Rh.x=tmpTextPosCalcRes.x,Rh.y=tmpTextPosCalcRes.y,zh=tmpTextPosCalcRes.align,Bh=tmpTextPosCalcRes.verticalAlign;var Kh=Ih.origin;if(Kh&&Ih.rotation!=null){var qh=void 0,Jh=void 0;Kh===`center`?(qh=Gh.width*.5,Jh=Gh.height*.5):(qh=parsePercent$1(Kh[0],Gh.width),Jh=parsePercent$1(Kh[1],Gh.height)),Hh=!0,Rh.originX=-Rh.x+qh+(Lh?0:Gh.x),Rh.originY=-Rh.y+Jh+(Lh?0:Gh.y)}}Ih.rotation!=null&&(Rh.rotation=Ih.rotation);var Yh=Ih.offset;Yh&&(Rh.x+=Yh[0],Rh.y+=Yh[1],Hh||(Rh.originX=-Yh[0],Rh.originY=-Yh[1]));var Xh=this._innerTextDefaultStyle||={};if(Wh){var Zh=Xh.overflowRect=Xh.overflowRect||new BoundingRect(0,0,0,0);Rh.getLocalTransform(tmpInnerTextTrans),invert(tmpInnerTextTrans,tmpInnerTextTrans),BoundingRect.copy(Zh,Gh),Zh.applyTransform(tmpInnerTextTrans)}else Xh.overflowRect=null;var Qh=Ih.inside==null?typeof Ih.position==`string`&&Ih.position.indexOf(`inside`)>=0:Ih.inside,$h=void 0,eg=void 0,tg=void 0;Qh&&this.canBeInsideText()?($h=Ih.insideFill,eg=Ih.insideStroke,($h==null||$h===`auto`)&&($h=this.getInsideTextFill()),(eg==null||eg===`auto`)&&(eg=this.getInsideTextStroke($h),tg=!0)):($h=Ih.outsideFill,eg=Ih.outsideStroke,($h==null||$h===`auto`)&&($h=this.getOutsideFill()),(eg==null||eg===`auto`)&&(eg=this.getOutsideStroke($h),tg=!0)),$h||=`#000`,($h!==Xh.fill||eg!==Xh.stroke||tg!==Xh.autoStroke||zh!==Xh.align||Bh!==Xh.verticalAlign)&&(Vh=!0,Xh.fill=$h,Xh.stroke=eg,Xh.autoStroke=tg,Xh.align=zh,Xh.verticalAlign=Bh,Fh.setDefaultTextStyle(Xh)),Fh.__dirty|=1,Vh&&Fh.dirtyStyle(!0)}},Ph.prototype.canBeInsideText=function(){return!0},Ph.prototype.getInsideTextFill=function(){return`#fff`},Ph.prototype.getInsideTextStroke=function(Ph){return`#000`},Ph.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?LIGHT_LABEL_COLOR:DARK_LABEL_COLOR},Ph.prototype.getOutsideStroke=function(Ph){var Fh=this.__zr&&this.__zr.getBackgroundColor(),Ih=typeof Fh==`string`&&parse$2(Fh);Ih||=[255,255,255,1];for(var Lh=Ih[3],Rh=this.__zr.isDarkMode(),zh=0;zh<3;zh++)Ih[zh]=Ih[zh]*Lh+(Rh?0:255)*(1-Lh);return Ih[3]=1,stringify(Ih,`rgba`)},Ph.prototype.traverse=function(Ph,Fh){},Ph.prototype.attrKV=function(Ph,Fh){Ph===`textConfig`?this.setTextConfig(Fh):Ph===`textContent`?this.setTextContent(Fh):Ph===`clipPath`?this.setClipPath(Fh):Ph===`extra`?(this.extra=this.extra||{},extend$1(this.extra,Fh)):this[Ph]=Fh},Ph.prototype.hide=function(){this.ignore=!0,this.markRedraw()},Ph.prototype.show=function(){this.ignore=!1,this.markRedraw()},Ph.prototype.attr=function(Ph,Fh){if(typeof Ph==`string`)this.attrKV(Ph,Fh);else if(isObject$4(Ph))for(var Ih=keys(Ph),Lh=0;Lh<Ih.length;Lh++){var Rh=Ih[Lh];this.attrKV(Rh,Ph[Rh])}return this.markRedraw(),this},Ph.prototype.saveCurrentToNormalState=function(Ph){this._innerSaveToNormal(Ph);for(var Fh=this._normalState,Ih=0;Ih<this.animators.length;Ih++){var Lh=this.animators[Ih],Rh=Lh.__fromStateTransition;if(!(Lh.getLoop()||Rh&&Rh!==`__zr_normal__`)){var zh=Lh.targetName,Bh=zh?Fh[zh]:Fh;Lh.saveTo(Bh)}}},Ph.prototype._innerSaveToNormal=function(Ph){var Fh=this._normalState;Fh||=this._normalState={},Ph.textConfig&&!Fh.textConfig&&(Fh.textConfig=this.textConfig),this._savePrimaryToNormal(Ph,Fh,PRIMARY_STATES_KEYS$1)},Ph.prototype._savePrimaryToNormal=function(Ph,Fh,Ih){for(var Lh=0;Lh<Ih.length;Lh++){var Rh=Ih[Lh];Ph[Rh]!=null&&!(Rh in Fh)&&(Fh[Rh]=this[Rh])}},Ph.prototype.hasState=function(){return this.currentStates.length>0},Ph.prototype.getState=function(Ph){return this.states[Ph]},Ph.prototype.ensureState=function(Ph){var Fh=this.states;return Fh[Ph]||(Fh[Ph]={}),Fh[Ph]},Ph.prototype.clearStates=function(Ph){this.useState(PRESERVED_NORMAL_STATE,!1,Ph)},Ph.prototype.useState=function(Ph,Fh,Ih,Lh){var Rh=Ph===PRESERVED_NORMAL_STATE;if(!(!this.hasState()&&Rh)){var zh=this.currentStates,Bh=this.stateTransition;if(!(indexOf(zh,Ph)>=0&&(Fh||zh.length===1))){var Vh;if(this.stateProxy&&!Rh&&(Vh=this.stateProxy(Ph)),Vh||=this.states&&this.states[Ph],!Vh&&!Rh){logError(`State `+Ph+` not exists.`);return}Rh||this.saveCurrentToNormalState(Vh);var Hh=!!(Vh&&Vh.hoverLayer||Lh);Hh&&this._toggleHoverLayerFlag(!0),this._applyStateObj(Ph,Vh,this._normalState,Fh,!Ih&&!this.__inHover&&Bh&&Bh.duration>0,Bh);var Uh=this._textContent,Wh=this._textGuide;return Uh&&Uh.useState(Ph,Fh,Ih,Hh),Wh&&Wh.useState(Ph,Fh,Ih,Hh),Rh?(this.currentStates=[],this._normalState={}):Fh?this.currentStates.push(Ph):this.currentStates=[Ph],this._updateAnimationTargets(),this.markRedraw(),!Hh&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),Vh}}},Ph.prototype.useStates=function(Ph,Fh,Ih){if(!Ph.length)this.clearStates();else{var Lh=[],Rh=this.currentStates,zh=Ph.length,Bh=zh===Rh.length;if(Bh){for(var Vh=0;Vh<zh;Vh++)if(Ph[Vh]!==Rh[Vh]){Bh=!1;break}}if(Bh)return;for(var Vh=0;Vh<zh;Vh++){var Hh=Ph[Vh],Uh=void 0;this.stateProxy&&(Uh=this.stateProxy(Hh,Ph)),Uh||=this.states[Hh],Uh&&Lh.push(Uh)}var Wh=Lh[zh-1],Gh=!!(Wh&&Wh.hoverLayer||Ih);Gh&&this._toggleHoverLayerFlag(!0);var Kh=this._mergeStates(Lh),qh=this.stateTransition;this.saveCurrentToNormalState(Kh),this._applyStateObj(Ph.join(`,`),Kh,this._normalState,!1,!Fh&&!this.__inHover&&qh&&qh.duration>0,qh);var Jh=this._textContent,Yh=this._textGuide;Jh&&Jh.useStates(Ph,Fh,Gh),Yh&&Yh.useStates(Ph,Fh,Gh),this._updateAnimationTargets(),this.currentStates=Ph.slice(),this.markRedraw(),!Gh&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},Ph.prototype.isSilent=function(){for(var Ph=this;Ph;){if(Ph.silent)return!0;var Fh=Ph.__hostTarget;Ph=Fh?Ph.ignoreHostSilent?null:Fh:Ph.parent}return!1},Ph.prototype._updateAnimationTargets=function(){for(var Ph=0;Ph<this.animators.length;Ph++){var Fh=this.animators[Ph];Fh.targetName&&Fh.changeTarget(this[Fh.targetName])}},Ph.prototype.removeState=function(Ph){var Fh=indexOf(this.currentStates,Ph);if(Fh>=0){var Ih=this.currentStates.slice();Ih.splice(Fh,1),this.useStates(Ih)}},Ph.prototype.replaceState=function(Ph,Fh,Ih){var Lh=this.currentStates.slice(),Rh=indexOf(Lh,Ph),zh=indexOf(Lh,Fh)>=0;Rh>=0?zh?Lh.splice(Rh,1):Lh[Rh]=Fh:Ih&&!zh&&Lh.push(Fh),this.useStates(Lh)},Ph.prototype.toggleState=function(Ph,Fh){Fh?this.useState(Ph,!0):this.removeState(Ph)},Ph.prototype._mergeStates=function(Ph){for(var Fh={},Ih,Lh=0;Lh<Ph.length;Lh++){var Rh=Ph[Lh];extend$1(Fh,Rh),Rh.textConfig&&(Ih||={},extend$1(Ih,Rh.textConfig))}return Ih&&(Fh.textConfig=Ih),Fh},Ph.prototype._applyStateObj=function(Ph,Fh,Ih,Lh,Rh,zh){var Bh=!(Fh&&Lh);Fh&&Fh.textConfig?(this.textConfig=extend$1({},Lh?this.textConfig:Ih.textConfig),extend$1(this.textConfig,Fh.textConfig)):Bh&&Ih.textConfig&&(this.textConfig=Ih.textConfig);for(var Vh={},Hh=!1,Uh=0;Uh<PRIMARY_STATES_KEYS$1.length;Uh++){var Wh=PRIMARY_STATES_KEYS$1[Uh],Gh=Rh&&DEFAULT_ANIMATABLE_MAP[Wh];Fh&&Fh[Wh]!=null?Gh?(Hh=!0,Vh[Wh]=Fh[Wh]):this[Wh]=Fh[Wh]:Bh&&Ih[Wh]!=null&&(Gh?(Hh=!0,Vh[Wh]=Ih[Wh]):this[Wh]=Ih[Wh])}if(!Rh)for(var Uh=0;Uh<this.animators.length;Uh++){var Kh=this.animators[Uh],qh=Kh.targetName;Kh.getLoop()||Kh.__changeFinalValue(qh?(Fh||Ih)[qh]:Fh||Ih)}Hh&&this._transitionState(Ph,Vh,zh)},Ph.prototype._attachComponent=function(Ph){if(!(Ph.__zr&&!Ph.__hostTarget)&&Ph!==this){var Fh=this.__zr;Fh&&Ph.addSelfToZr(Fh),Ph.__zr=Fh,Ph.__hostTarget=this}},Ph.prototype._detachComponent=function(Ph){Ph.__zr&&Ph.removeSelfFromZr(Ph.__zr),Ph.__zr=null,Ph.__hostTarget=null},Ph.prototype.getClipPath=function(){return this._clipPath},Ph.prototype.setClipPath=function(Ph){this._clipPath&&this._clipPath!==Ph&&this.removeClipPath(),this._attachComponent(Ph),this._clipPath=Ph,this.markRedraw()},Ph.prototype.removeClipPath=function(){var Ph=this._clipPath;Ph&&(this._detachComponent(Ph),this._clipPath=null,this.markRedraw())},Ph.prototype.getTextContent=function(){return this._textContent},Ph.prototype.setTextContent=function(Ph){var Fh=this._textContent;Fh!==Ph&&(Fh&&Fh!==Ph&&this.removeTextContent(),Ph.innerTransformable=new Transformable,this._attachComponent(Ph),this._textContent=Ph,this.markRedraw())},Ph.prototype.setTextConfig=function(Ph){this.textConfig||={},extend$1(this.textConfig,Ph),this.markRedraw()},Ph.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},Ph.prototype.removeTextContent=function(){var Ph=this._textContent;Ph&&(Ph.innerTransformable=null,this._detachComponent(Ph),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},Ph.prototype.getTextGuideLine=function(){return this._textGuide},Ph.prototype.setTextGuideLine=function(Ph){this._textGuide&&this._textGuide!==Ph&&this.removeTextGuideLine(),this._attachComponent(Ph),this._textGuide=Ph,this.markRedraw()},Ph.prototype.removeTextGuideLine=function(){var Ph=this._textGuide;Ph&&(this._detachComponent(Ph),this._textGuide=null,this.markRedraw())},Ph.prototype.markRedraw=function(){this.__dirty|=1;var Ph=this.__zr;Ph&&(this.__inHover?Ph.refreshHover():Ph.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},Ph.prototype.dirty=function(){this.markRedraw()},Ph.prototype._toggleHoverLayerFlag=function(Ph){this.__inHover=Ph;var Fh=this._textContent,Ih=this._textGuide;Fh&&(Fh.__inHover=Ph),Ih&&(Ih.__inHover=Ph)},Ph.prototype.addSelfToZr=function(Ph){if(this.__zr!==Ph){this.__zr=Ph;var Fh=this.animators;if(Fh)for(var Ih=0;Ih<Fh.length;Ih++)Ph.animation.addAnimator(Fh[Ih]);this._clipPath&&this._clipPath.addSelfToZr(Ph),this._textContent&&this._textContent.addSelfToZr(Ph),this._textGuide&&this._textGuide.addSelfToZr(Ph)}},Ph.prototype.removeSelfFromZr=function(Ph){if(this.__zr){this.__zr=null;var Fh=this.animators;if(Fh)for(var Ih=0;Ih<Fh.length;Ih++)Ph.animation.removeAnimator(Fh[Ih]);this._clipPath&&this._clipPath.removeSelfFromZr(Ph),this._textContent&&this._textContent.removeSelfFromZr(Ph),this._textGuide&&this._textGuide.removeSelfFromZr(Ph)}},Ph.prototype.animate=function(Ph,Fh,Ih){var Lh=new Animator(Ph?this[Ph]:this,Fh,Ih);return Ph&&(Lh.targetName=Ph),this.addAnimator(Lh,Ph),Lh},Ph.prototype.addAnimator=function(Ph,Fh){var Ih=this.__zr,Lh=this;Ph.during(function(){Lh.updateDuringAnimation(Fh)}).done(function(){var Fh=Lh.animators,Ih=indexOf(Fh,Ph);Ih>=0&&Fh.splice(Ih,1)}),this.animators.push(Ph),Ih&&Ih.animation.addAnimator(Ph),Ih&&Ih.wakeUp()},Ph.prototype.updateDuringAnimation=function(Ph){this.markRedraw()},Ph.prototype.stopAnimation=function(Ph,Fh){for(var Ih=this.animators,Lh=Ih.length,Rh=[],zh=0;zh<Lh;zh++){var Bh=Ih[zh];!Ph||Ph===Bh.scope?Bh.stop(Fh):Rh.push(Bh)}return this.animators=Rh,this},Ph.prototype.animateTo=function(Ph,Fh,Ih){animateTo(this,Ph,Fh,Ih)},Ph.prototype.animateFrom=function(Ph,Fh,Ih){animateTo(this,Ph,Fh,Ih,!0)},Ph.prototype._transitionState=function(Ph,Fh,Ih,Lh){for(var Rh=animateTo(this,Fh,Ih,Lh),zh=0;zh<Rh.length;zh++)Rh[zh].__fromStateTransition=Ph},Ph.prototype.getBoundingRect=function(){return null},Ph.prototype.getPaintRect=function(){return null},Ph.initDefaultProps=(function(){var Fh=Ph.prototype;Fh.type=`element`,Fh.name=``,Fh.ignore=Fh.silent=Fh.ignoreHostSilent=Fh.isGroup=Fh.draggable=Fh.dragging=Fh.ignoreClip=Fh.__inHover=!1,Fh.__dirty=1;function Ih(Ph,Ih,Lh,Rh){Object.defineProperty(Fh,Ph,{get:function(){if(!this[Ih]){var Ph=this[Ih]=[];zh(this,Ph)}return this[Ih]},set:function(Ph){this[Lh]=Ph[0],this[Rh]=Ph[1],this[Ih]=Ph,zh(this,Ph)}});function zh(Ph,Fh){Object.defineProperty(Fh,0,{get:function(){return Ph[Lh]},set:function(Fh){Ph[Lh]=Fh}}),Object.defineProperty(Fh,1,{get:function(){return Ph[Rh]},set:function(Fh){Ph[Rh]=Fh}})}}Object.defineProperty&&(Ih(`position`,`_legacyPos`,`x`,`y`),Ih(`scale`,`_legacyScale`,`scaleX`,`scaleY`),Ih(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),Ph}();mixin$1(Element$1,Eventful),mixin$1(Element$1,Transformable);function animateTo(Ph,Fh,Ih,Lh,Rh){Ih||={};var zh=[];animateToShallow(Ph,``,Ph,Fh,Ih,Lh,zh,Rh);var Bh=zh.length,Vh=!1,Hh=Ih.done,Uh=Ih.aborted,Wh=function(){Vh=!0,Bh--,Bh<=0&&(Vh?Hh&&Hh():Uh&&Uh())},Gh=function(){Bh--,Bh<=0&&(Vh?Hh&&Hh():Uh&&Uh())};Bh||Hh&&Hh(),zh.length>0&&Ih.during&&zh[0].during(function(Ph,Fh){Ih.during(Fh)});for(var Kh=0;Kh<zh.length;Kh++){var qh=zh[Kh];Wh&&qh.done(Wh),Gh&&qh.aborted(Gh),Ih.force&&qh.duration(Ih.duration),qh.start(Ih.easing)}return zh}function copyArrShallow(Ph,Fh,Ih){for(var Lh=0;Lh<Ih;Lh++)Ph[Lh]=Fh[Lh]}function is2DArray(Ph){return isArrayLike(Ph[0])}function copyValue(Ph,Fh,Ih){if(isArrayLike(Fh[Ih]))if(isArrayLike(Ph[Ih])||(Ph[Ih]=[]),isTypedArray(Fh[Ih])){var Lh=Fh[Ih].length;Ph[Ih].length!==Lh&&(Ph[Ih]=new Fh[Ih].constructor(Lh),copyArrShallow(Ph[Ih],Fh[Ih],Lh))}else{var Rh=Fh[Ih],zh=Ph[Ih],Bh=Rh.length;if(is2DArray(Rh))for(var Vh=Rh[0].length,Hh=0;Hh<Bh;Hh++)zh[Hh]?copyArrShallow(zh[Hh],Rh[Hh],Vh):zh[Hh]=Array.prototype.slice.call(Rh[Hh]);else copyArrShallow(zh,Rh,Bh);zh.length=Rh.length}else Ph[Ih]=Fh[Ih]}function isValueSame(Ph,Fh){return Ph===Fh||isArrayLike(Ph)&&isArrayLike(Fh)&&is1DArraySame(Ph,Fh)}function is1DArraySame(Ph,Fh){var Ih=Ph.length;if(Ih!==Fh.length)return!1;for(var Lh=0;Lh<Ih;Lh++)if(Ph[Lh]!==Fh[Lh])return!1;return!0}function animateToShallow(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){for(var Hh=keys(Lh),Uh=Rh.duration,Wh=Rh.delay,Gh=Rh.additive,Kh=Rh.setToFinal,qh=!isObject$4(zh),Jh=Ph.animators,Yh=[],Xh=0;Xh<Hh.length;Xh++){var Zh=Hh[Xh],Qh=Lh[Zh];if(Qh!=null&&Ih[Zh]!=null&&(qh||zh[Zh]))if(isObject$4(Qh)&&!isArrayLike(Qh)&&!isGradientObject(Qh)){if(Fh){Vh||(Ih[Zh]=Qh,Ph.updateDuringAnimation(Fh));continue}animateToShallow(Ph,Zh,Ih[Zh],Qh,Rh,zh&&zh[Zh],Bh,Vh)}else Yh.push(Zh);else Vh||(Ih[Zh]=Qh,Ph.updateDuringAnimation(Fh),Yh.push(Zh))}var $h=Yh.length;if(!Gh&&$h)for(var eg=0;eg<Jh.length;eg++){var tg=Jh[eg];if(tg.targetName===Fh&&tg.stopTracks(Yh)){var ng=indexOf(Jh,tg);Jh.splice(ng,1)}}if(Rh.force||(Yh=filter(Yh,function(Ph){return!isValueSame(Lh[Ph],Ih[Ph])}),$h=Yh.length),$h>0||Rh.force&&!Bh.length){var rg=void 0,ig=void 0,ag=void 0;if(Vh){ig={},Kh&&(rg={});for(var eg=0;eg<$h;eg++){var Zh=Yh[eg];ig[Zh]=Ih[Zh],Kh?rg[Zh]=Lh[Zh]:Ih[Zh]=Lh[Zh]}}else if(Kh){ag={};for(var eg=0;eg<$h;eg++){var Zh=Yh[eg];ag[Zh]=cloneValue(Ih[Zh]),copyValue(Ih,Lh,Zh)}}var tg=new Animator(Ih,!1,!1,Gh?filter(Jh,function(Ph){return Ph.targetName===Fh}):null);tg.targetName=Fh,Rh.scope&&(tg.scope=Rh.scope),Kh&&rg&&tg.whenWithKeys(0,rg,Yh),ag&&tg.whenWithKeys(0,ag,Yh),tg.whenWithKeys(Uh??500,Vh?ig:Lh,Yh).delay(Wh||0),Ph.addAnimator(tg,Fh),Bh.push(tg)}}var Group$3=function(Ph){__extends(Fh,Ph);function Fh(Fh){var Ih=Ph.call(this)||this;return Ih.isGroup=!0,Ih._children=[],Ih.attr(Fh),Ih}return Fh.prototype.childrenRef=function(){return this._children},Fh.prototype.children=function(){return this._children.slice()},Fh.prototype.childAt=function(Ph){return this._children[Ph]},Fh.prototype.childOfName=function(Ph){for(var Fh=this._children,Ih=0;Ih<Fh.length;Ih++)if(Fh[Ih].name===Ph)return Fh[Ih]},Fh.prototype.childCount=function(){return this._children.length},Fh.prototype.add=function(Ph){return Ph&&Ph!==this&&Ph.parent!==this&&(this._children.push(Ph),this._doAdd(Ph)),this},Fh.prototype.addBefore=function(Ph,Fh){if(Ph&&Ph!==this&&Ph.parent!==this&&Fh&&Fh.parent===this){var Ih=this._children,Lh=Ih.indexOf(Fh);Lh>=0&&(Ih.splice(Lh,0,Ph),this._doAdd(Ph))}return this},Fh.prototype.replace=function(Ph,Fh){var Ih=indexOf(this._children,Ph);return Ih>=0&&this.replaceAt(Fh,Ih),this},Fh.prototype.replaceAt=function(Ph,Fh){var Ih=this._children,Lh=Ih[Fh];if(Ph&&Ph!==this&&Ph.parent!==this&&Ph!==Lh){Ih[Fh]=Ph,Lh.parent=null;var Rh=this.__zr;Rh&&Lh.removeSelfFromZr(Rh),this._doAdd(Ph)}return this},Fh.prototype._doAdd=function(Ph){Ph.parent&&Ph.parent.remove(Ph),Ph.parent=this;var Fh=this.__zr;Fh&&Fh!==Ph.__zr&&Ph.addSelfToZr(Fh),Fh&&Fh.refresh()},Fh.prototype.remove=function(Ph){var Fh=this.__zr,Ih=this._children,Lh=indexOf(Ih,Ph);return Lh<0?this:(Ih.splice(Lh,1),Ph.parent=null,Fh&&Ph.removeSelfFromZr(Fh),Fh&&Fh.refresh(),this)},Fh.prototype.removeAll=function(){for(var Ph=this._children,Fh=this.__zr,Ih=0;Ih<Ph.length;Ih++){var Lh=Ph[Ih];Fh&&Lh.removeSelfFromZr(Fh),Lh.parent=null}return Ph.length=0,this},Fh.prototype.eachChild=function(Ph,Fh){for(var Ih=this._children,Lh=0;Lh<Ih.length;Lh++){var Rh=Ih[Lh];Ph.call(Fh,Rh,Lh)}return this},Fh.prototype.traverse=function(Ph,Fh){for(var Ih=0;Ih<this._children.length;Ih++){var Lh=this._children[Ih],Rh=Ph.call(Fh,Lh);Lh.isGroup&&!Rh&&Lh.traverse(Ph,Fh)}return this},Fh.prototype.addSelfToZr=function(Fh){Ph.prototype.addSelfToZr.call(this,Fh);for(var Ih=0;Ih<this._children.length;Ih++)this._children[Ih].addSelfToZr(Fh)},Fh.prototype.removeSelfFromZr=function(Fh){Ph.prototype.removeSelfFromZr.call(this,Fh);for(var Ih=0;Ih<this._children.length;Ih++)this._children[Ih].removeSelfFromZr(Fh)},Fh.prototype.getBoundingRect=function(Ph){for(var Fh=new BoundingRect(0,0,0,0),Ih=Ph||this._children,Lh=[],Rh=null,zh=0;zh<Ih.length;zh++){var Bh=Ih[zh];if(!(Bh.ignore||Bh.invisible)){var Vh=Bh.getBoundingRect(),Hh=Bh.getLocalTransform(Lh);Hh?(BoundingRect.applyTransform(Fh,Vh,Hh),Rh||=Fh.clone(),Rh.union(Fh)):(Rh||=Vh.clone(),Rh.union(Vh))}}return Rh||Fh},Fh}(Element$1);Group$3.prototype.type=`group`;var painterCtors={},instances$1={};function delInstance(Ph){delete instances$1[Ph]}function isDarkMode(Ph){if(!Ph)return!1;if(typeof Ph==`string`)return lum(Ph,1)<DARK_MODE_THRESHOLD;if(Ph.colorStops){for(var Fh=Ph.colorStops,Ih=0,Lh=Fh.length,Rh=0;Rh<Lh;Rh++)Ih+=lum(Fh[Rh].color,1);return Ih/=Lh,Ih<DARK_MODE_THRESHOLD}return!1}var ZRender=function(){function Ph(Ph,Fh,Ih){var Lh=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,Ih||={},this.dom=Fh,this.id=Ph;var Rh=new Storage,zh=Ih.renderer||`canvas`;painterCtors[zh]||(zh=keys(painterCtors)[0]),Ih.useDirtyRect=Ih.useDirtyRect==null?!1:Ih.useDirtyRect;var Bh=new painterCtors[zh](Fh,Rh,Ih,Ph),Vh=Ih.ssr||Bh.ssrOnly;this.storage=Rh,this.painter=Bh;var Hh=!env.node&&!env.worker&&!Vh?new HandlerDomProxy(Bh.getViewportRoot(),Bh.root):null,Uh=Ih.useCoarsePointer,Wh=Uh==null||Uh===`auto`?env.touchEventsSupported:!!Uh,Gh=44,Kh;Wh&&(Kh=retrieve2(Ih.pointerSize,Gh)),this.handler=new Handler(Rh,Bh,Hh,Bh.root,Kh),this.animation=new Animation({stage:{update:Vh?null:function(){return Lh._flush(!0)}}}),Vh||this.animation.start()}return Ph.prototype.add=function(Ph){this._disposed||!Ph||(this.storage.addRoot(Ph),Ph.addSelfToZr(this),this.refresh())},Ph.prototype.remove=function(Ph){this._disposed||!Ph||(this.storage.delRoot(Ph),Ph.removeSelfFromZr(this),this.refresh())},Ph.prototype.configLayer=function(Ph,Fh){this._disposed||(this.painter.configLayer&&this.painter.configLayer(Ph,Fh),this.refresh())},Ph.prototype.setBackgroundColor=function(Ph){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(Ph),this.refresh(),this._backgroundColor=Ph,this._darkMode=isDarkMode(Ph))},Ph.prototype.getBackgroundColor=function(){return this._backgroundColor},Ph.prototype.setDarkMode=function(Ph){this._darkMode=Ph},Ph.prototype.isDarkMode=function(){return this._darkMode},Ph.prototype.refreshImmediately=function(Ph){this._disposed||(Ph||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},Ph.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},Ph.prototype.flush=function(){this._disposed||this._flush(!1)},Ph.prototype._flush=function(Ph){var Fh,Ih=getTime();this._needsRefresh&&(Fh=!0,this.refreshImmediately(Ph)),this._needsRefreshHover&&(Fh=!0,this.refreshHoverImmediately());var Lh=getTime();Fh?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:Lh-Ih})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},Ph.prototype.setSleepAfterStill=function(Ph){this._sleepAfterStill=Ph},Ph.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},Ph.prototype.refreshHover=function(){this._needsRefreshHover=!0},Ph.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},Ph.prototype.resize=function(Ph){this._disposed||(Ph||={},this.painter.resize(Ph.width,Ph.height),this.handler.resize())},Ph.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},Ph.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},Ph.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},Ph.prototype.setCursorStyle=function(Ph){this._disposed||this.handler.setCursorStyle(Ph)},Ph.prototype.findHover=function(Ph,Fh){if(!this._disposed)return this.handler.findHover(Ph,Fh)},Ph.prototype.on=function(Ph,Fh,Ih){return this._disposed||this.handler.on(Ph,Fh,Ih),this},Ph.prototype.off=function(Ph,Fh){this._disposed||this.handler.off(Ph,Fh)},Ph.prototype.trigger=function(Ph,Fh){this._disposed||this.handler.trigger(Ph,Fh)},Ph.prototype.clear=function(){if(!this._disposed){for(var Ph=this.storage.getRoots(),Fh=0;Fh<Ph.length;Fh++)Ph[Fh]instanceof Group$3&&Ph[Fh].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},Ph.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,delInstance(this.id))},Ph}();function init$2(Ph,Fh){var Ih=new ZRender(guid(),Ph,Fh);return instances$1[Ih.id]=Ih,Ih}function registerPainter(Ph,Fh){painterCtors[Ph]=Fh}var ssrDataGetter;function getElementSSRData(Ph){if(typeof ssrDataGetter==`function`)return ssrDataGetter(Ph)}function registerSSRDataGetter(Ph){ssrDataGetter=Ph}var RADIAN_EPSILON=1e-4,ROUND_SUPPORTED_PRECISION_MAX=20;function _trim(Ph){return Ph.replace(/^\s+|\s+$/g,``)}var mathMin$10=Math.min,mathMax$10=Math.max,mathAbs$4=Math.abs;function linearMap$2(Ph,Fh,Ih,Lh){var Rh=Fh[0],zh=Fh[1],Bh=Ih[0],Vh=Ih[1],Hh=zh-Rh,Uh=Vh-Bh;if(Hh===0)return Uh===0?Bh:(Bh+Vh)/2;if(Lh){if(Hh>0){if(Ph<=Rh)return Bh;if(Ph>=zh)return Vh}else if(Ph>=Rh)return Bh;else if(Ph<=zh)return Vh}else{if(Ph===Rh)return Bh;if(Ph===zh)return Vh}return(Ph-Rh)/Hh*Uh+Bh}var parsePercent=parsePositionOption;function parsePositionOption(Ph,Fh,Ih){switch(Ph){case`center`:case`middle`:Ph=`50%`;break;case`left`:case`top`:Ph=`0%`;break;case`right`:case`bottom`:Ph=`100%`;break}return parsePositionSizeOption(Ph,Fh,Ih)}function parsePositionSizeOption(Ph,Fh,Ih){return isString(Ph)?_trim(Ph).match(/%$/)?parseFloat(Ph)/100*Fh+(Ih||0):parseFloat(Ph):Ph==null?NaN:+Ph}function round$4(Ph,Fh,Ih){return Fh??=10,Fh=Math.min(Math.max(0,Fh),ROUND_SUPPORTED_PRECISION_MAX),Ph=(+Ph).toFixed(Fh),Ih?Ph:+Ph}function asc$2(Ph){return Ph.sort(function(Ph,Fh){return Ph-Fh}),Ph}function getPrecision(Ph){if(Ph=+Ph,isNaN(Ph))return 0;if(Ph>1e-14){for(var Fh=1,Ih=0;Ih<15;Ih++,Fh*=10)if(Math.round(Ph*Fh)/Fh===Ph)return Ih}return getPrecisionSafe(Ph)}function getPrecisionSafe(Ph){var Fh=Ph.toString().toLowerCase(),Ih=Fh.indexOf(`e`),Lh=Ih>0?+Fh.slice(Ih+1):0,Rh=Ih>0?Ih:Fh.length,zh=Fh.indexOf(`.`),Bh=zh<0?0:Rh-1-zh;return Math.max(0,Bh-Lh)}function getPixelPrecision(Ph,Fh){var Ih=Math.log,Lh=Math.LN10,Rh=Math.floor(Ih(Ph[1]-Ph[0])/Lh),zh=Math.round(Ih(mathAbs$4(Fh[1]-Fh[0]))/Lh),Bh=Math.min(Math.max(-Rh+zh,0),20);return isFinite(Bh)?Bh:20}function getPercentSeats(Ph,Fh){var Ih=reduce(Ph,function(Ph,Fh){return Ph+(isNaN(Fh)?0:Fh)},0);if(Ih===0)return[];for(var Lh=10**Fh,Rh=map$1(Ph,function(Ph){return(isNaN(Ph)?0:Ph)/Ih*Lh*100}),zh=Lh*100,Bh=map$1(Rh,function(Ph){return Math.floor(Ph)}),Vh=reduce(Bh,function(Ph,Fh){return Ph+Fh},0),Hh=map$1(Rh,function(Ph,Fh){return Ph-Bh[Fh]});Vh<zh;){for(var Uh=-1/0,Wh=null,Gh=0,Kh=Hh.length;Gh<Kh;++Gh)Hh[Gh]>Uh&&(Uh=Hh[Gh],Wh=Gh);++Bh[Wh],Hh[Wh]=0,++Vh}return map$1(Bh,function(Ph){return Ph/Lh})}function addSafe(Ph,Fh){var Ih=Math.max(getPrecision(Ph),getPrecision(Fh)),Lh=Ph+Fh;return Ih>ROUND_SUPPORTED_PRECISION_MAX?Lh:round$4(Lh,Ih)}var MAX_SAFE_INTEGER=9007199254740991;function remRadian(Ph){var Fh=Math.PI*2;return(Ph%Fh+Fh)%Fh}function isRadianAroundZero(Ph){return Ph>-RADIAN_EPSILON&&Ph<RADIAN_EPSILON}var TIME_REG=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function parseDate(Ph){if(Ph instanceof Date)return Ph;if(isString(Ph)){var Fh=TIME_REG.exec(Ph);if(!Fh)return new Date(NaN);if(Fh[8]){var Ih=+Fh[4]||0;return Fh[8].toUpperCase()!==`Z`&&(Ih-=+Fh[8].slice(0,3)),new Date(Date.UTC(+Fh[1],(Fh[2]||1)-1,+Fh[3]||1,Ih,+(Fh[5]||0),+Fh[6]||0,Fh[7]?+Fh[7].substring(0,3):0))}else return new Date(+Fh[1],(Fh[2]||1)-1,+Fh[3]||1,+Fh[4]||0,+(Fh[5]||0),+Fh[6]||0,Fh[7]?+Fh[7].substring(0,3):0)}else if(Ph==null)return new Date(NaN);return new Date(Math.round(Ph))}function quantity(Ph){return 10**quantityExponent(Ph)}function quantityExponent(Ph){if(Ph===0)return 0;var Fh=Math.floor(Math.log(Ph)/Math.LN10);return Ph/10**Fh>=10&&Fh++,Fh}function nice(Ph,Fh){var Ih=quantityExponent(Ph),Lh=10**Ih,Rh=Ph/Lh;return Ph=(Fh?Rh<1.5?1:Rh<2.5?2:Rh<4?3:Rh<7?5:10:Rh<1?1:Rh<2?2:Rh<3?3:Rh<5?5:10)*Lh,Ih>=-20?+Ph.toFixed(Ih<0?-Ih:0):Ph}function quantile(Ph,Fh){var Ih=(Ph.length-1)*Fh+1,Lh=Math.floor(Ih),Rh=+Ph[Lh-1],zh=Ih-Lh;return zh?Rh+zh*(Ph[Lh]-Rh):Rh}function reformIntervals(Ph){Ph.sort(function(Ph,Fh){return Vh(Ph,Fh,0)?-1:1});for(var Fh=-1/0,Ih=1,Lh=0;Lh<Ph.length;){for(var Rh=Ph[Lh].interval,zh=Ph[Lh].close,Bh=0;Bh<2;Bh++)Rh[Bh]<=Fh&&(Rh[Bh]=Fh,zh[Bh]=Bh?1:1-Ih),Fh=Rh[Bh],Ih=zh[Bh];Rh[0]===Rh[1]&&zh[0]*zh[1]!==1?Ph.splice(Lh,1):Lh++}return Ph;function Vh(Ph,Fh,Ih){return Ph.interval[Ih]<Fh.interval[Ih]||Ph.interval[Ih]===Fh.interval[Ih]&&(Ph.close[Ih]-Fh.close[Ih]===(Ih?-1:1)||!Ih&&Vh(Ph,Fh,1))}}function numericToNumber(Ph){var Fh=parseFloat(Ph);return Fh==Ph&&(Fh!==0||!isString(Ph)||Ph.indexOf(`x`)<=0)?Fh:NaN}function isNumeric(Ph){return!isNaN(numericToNumber(Ph))}function getRandomIdBase(){return Math.round(Math.random()*9)}function getGreatestCommonDividor(Ph,Fh){return Fh===0?Ph:getGreatestCommonDividor(Fh,Ph%Fh)}function getLeastCommonMultiple(Ph,Fh){return Ph==null?Fh:Fh==null?Ph:Ph*Fh/getGreatestCommonDividor(Ph,Fh)}var ECHARTS_PREFIX=`[ECharts] `,storedLogs={},hasConsole=typeof console<`u`&&console.warn&&console.log;function outputLog(Ph,Fh,Ih){if(hasConsole){if(Ih){if(storedLogs[Fh])return;storedLogs[Fh]=!0}console[Ph](ECHARTS_PREFIX+Fh)}}function error(Ph,Fh){outputLog(`error`,Ph,Fh)}function deprecateLog(Ph){}function throwError(Ph){throw Error(Ph)}function interpolateNumber(Ph,Fh,Ih){return(Fh-Ph)*Ih+Ph}var DUMMY_COMPONENT_NAME_PREFIX=`series\0`,INTERNAL_COMPONENT_ID_PREFIX=`\0_ec_\0`;function normalizeToArray(Ph){return Ph instanceof Array?Ph:Ph==null?[]:[Ph]}function defaultEmphasis(Ph,Fh,Ih){if(Ph){Ph[Fh]=Ph[Fh]||{},Ph.emphasis=Ph.emphasis||{},Ph.emphasis[Fh]=Ph.emphasis[Fh]||{};for(var Lh=0,Rh=Ih.length;Lh<Rh;Lh++){var zh=Ih[Lh];!Ph.emphasis[Fh].hasOwnProperty(zh)&&Ph[Fh].hasOwnProperty(zh)&&(Ph.emphasis[Fh][zh]=Ph[Fh][zh])}}}var TEXT_STYLE_OPTIONS=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function getDataItemValue(Ph){return isObject$4(Ph)&&!isArray$1(Ph)&&!(Ph instanceof Date)?Ph.value:Ph}function isDataItemOption(Ph){return isObject$4(Ph)&&!(Ph instanceof Array)}function mappingToExists(Ph,Fh,Ih){var Lh=Ih===`normalMerge`,Rh=Ih===`replaceMerge`,zh=Ih===`replaceAll`;Ph||=[],Fh=(Fh||[]).slice();var Bh=createHashMap();each$15(Fh,function(Ph,Ih){if(!isObject$4(Ph)){Fh[Ih]=null;return}});var Vh=prepareResult(Ph,Bh,Ih);return(Lh||Rh)&&mappingById(Vh,Ph,Bh,Fh),Lh&&mappingByName(Vh,Fh),Lh||Rh?mappingByIndex(Vh,Fh,Rh):zh&&mappingInReplaceAllMode(Vh,Fh),makeIdAndName(Vh),Vh}function prepareResult(Ph,Fh,Ih){var Lh=[];if(Ih===`replaceAll`)return Lh;for(var Rh=0;Rh<Ph.length;Rh++){var zh=Ph[Rh];zh&&zh.id!=null&&Fh.set(zh.id,Rh),Lh.push({existing:Ih===`replaceMerge`||isComponentIdInternal(zh)?null:zh,newOption:null,keyInfo:null,brandNew:null})}return Lh}function mappingById(Ph,Fh,Ih,Lh){each$15(Lh,function(Rh,zh){if(!(!Rh||Rh.id==null)){var Bh=makeComparableKey(Rh.id),Vh=Ih.get(Bh);if(Vh!=null){var Hh=Ph[Vh];assert$1(!Hh.newOption,`Duplicated option on id "`+Bh+`".`),Hh.newOption=Rh,Hh.existing=Fh[Vh],Lh[zh]=null}}})}function mappingByName(Ph,Fh){each$15(Fh,function(Ih,Lh){if(!(!Ih||Ih.name==null))for(var Rh=0;Rh<Ph.length;Rh++){var zh=Ph[Rh].existing;if(!Ph[Rh].newOption&&zh&&(zh.id==null||Ih.id==null)&&!isComponentIdInternal(Ih)&&!isComponentIdInternal(zh)&&keyExistAndEqual(`name`,zh,Ih)){Ph[Rh].newOption=Ih,Fh[Lh]=null;return}}})}function mappingByIndex(Ph,Fh,Ih){each$15(Fh,function(Fh){if(Fh){for(var Lh,Rh=0;(Lh=Ph[Rh])&&(Lh.newOption||isComponentIdInternal(Lh.existing)||Lh.existing&&Fh.id!=null&&!keyExistAndEqual(`id`,Fh,Lh.existing));)Rh++;Lh?(Lh.newOption=Fh,Lh.brandNew=Ih):Ph.push({newOption:Fh,brandNew:Ih,existing:null,keyInfo:null}),Rh++}})}function mappingInReplaceAllMode(Ph,Fh){each$15(Fh,function(Fh){Ph.push({newOption:Fh,brandNew:!0,existing:null,keyInfo:null})})}function makeIdAndName(Ph){var Fh=createHashMap();each$15(Ph,function(Ph){var Ih=Ph.existing;Ih&&Fh.set(Ih.id,Ph)}),each$15(Ph,function(Ph){var Ih=Ph.newOption;assert$1(!Ih||Ih.id==null||!Fh.get(Ih.id)||Fh.get(Ih.id)===Ph,`id duplicates: `+(Ih&&Ih.id)),Ih&&Ih.id!=null&&Fh.set(Ih.id,Ph),!Ph.keyInfo&&(Ph.keyInfo={})}),each$15(Ph,function(Ph,Ih){var Lh=Ph.existing,Rh=Ph.newOption,zh=Ph.keyInfo;if(isObject$4(Rh)){if(zh.name=Rh.name==null?Lh?Lh.name:DUMMY_COMPONENT_NAME_PREFIX+Ih:makeComparableKey(Rh.name),Lh)zh.id=makeComparableKey(Lh.id);else if(Rh.id!=null)zh.id=makeComparableKey(Rh.id);else{var Bh=0;do zh.id=`\0`+zh.name+`\0`+ Bh++;while(Fh.get(zh.id))}Fh.set(zh.id,Ph)}})}function keyExistAndEqual(Ph,Fh,Ih){var Lh=convertOptionIdName(Fh[Ph],null),Rh=convertOptionIdName(Ih[Ph],null);return Lh!=null&&Rh!=null&&Lh===Rh}function makeComparableKey(Ph){return convertOptionIdName(Ph,``)}function convertOptionIdName(Ph,Fh){return Ph==null?Fh:isString(Ph)?Ph:isNumber(Ph)||isStringSafe(Ph)?Ph+``:Fh}function isNameSpecified(Ph){var Fh=Ph.name;return!!(Fh&&Fh.indexOf(DUMMY_COMPONENT_NAME_PREFIX))}function isComponentIdInternal(Ph){return Ph&&Ph.id!=null&&makeComparableKey(Ph.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX)===0}function makeInternalComponentId(Ph){return INTERNAL_COMPONENT_ID_PREFIX+Ph}function setComponentTypeToKeyInfo(Ph,Fh,Ih){each$15(Ph,function(Ph){var Lh=Ph.newOption;isObject$4(Lh)&&(Ph.keyInfo.mainType=Fh,Ph.keyInfo.subType=determineSubType(Fh,Lh,Ph.existing,Ih))})}function determineSubType(Ph,Fh,Ih,Lh){return Fh.type?Fh.type:Ih?Ih.subType:Lh.determineSubType(Ph,Fh)}function compressBatches(Ph,Fh){var Ih={},Lh={};return Rh(Ph||[],Ih),Rh(Fh||[],Lh,Ih),[zh(Ih),zh(Lh)];function Rh(Ph,Fh,Ih){for(var Lh=0,Rh=Ph.length;Lh<Rh;Lh++){var zh=convertOptionIdName(Ph[Lh].seriesId,null);if(zh==null)return;for(var Bh=normalizeToArray(Ph[Lh].dataIndex),Vh=Ih&&Ih[zh],Hh=0,Uh=Bh.length;Hh<Uh;Hh++){var Wh=Bh[Hh];Vh&&Vh[Wh]?Vh[Wh]=null:(Fh[zh]||(Fh[zh]={}))[Wh]=1}}}function zh(Ph,Fh){var Ih=[];for(var Lh in Ph)if(Ph.hasOwnProperty(Lh)&&Ph[Lh]!=null)if(Fh)Ih.push(+Lh);else{var Rh=zh(Ph[Lh],!0);Rh.length&&Ih.push({seriesId:Lh,dataIndex:Rh})}return Ih}}function queryDataIndex(Ph,Fh){if(Fh.dataIndexInside!=null)return Fh.dataIndexInside;if(Fh.dataIndex!=null)return isArray$1(Fh.dataIndex)?map$1(Fh.dataIndex,function(Fh){return Ph.indexOfRawIndex(Fh)}):Ph.indexOfRawIndex(Fh.dataIndex);if(Fh.name!=null)return isArray$1(Fh.name)?map$1(Fh.name,function(Fh){return Ph.indexOfName(Fh)}):Ph.indexOfName(Fh.name)}function makeInner(){var Ph=`__ec_inner_`+ innerUniqueIndex++;return function(Fh){return Fh[Ph]||(Fh[Ph]={})}}var innerUniqueIndex=getRandomIdBase();function parseFinder$1(Ph,Fh,Ih){var Lh=preParseFinder(Fh,Ih),Rh=Lh.mainTypeSpecified,zh=Lh.queryOptionMap,Bh=Lh.others,Vh=Ih?Ih.defaultMainType:null;return!Rh&&Vh&&zh.set(Vh,{}),zh.each(function(Fh,Lh){var Rh=queryReferringComponents(Ph,Lh,Fh,{useDefault:Vh===Lh,enableAll:Ih&&Ih.enableAll!=null?Ih.enableAll:!0,enableNone:Ih&&Ih.enableNone!=null?Ih.enableNone:!0});Bh[Lh+`Models`]=Rh.models,Bh[Lh+`Model`]=Rh.models[0]}),Bh}function preParseFinder(Ph,Fh){var Ih;if(isString(Ph)){var Lh={};Lh[Ph+`Index`]=0,Ih=Lh}else Ih=Ph;var Rh=createHashMap(),zh={},Bh=!1;return each$15(Ih,function(Ph,Ih){if(Ih===`dataIndex`||Ih===`dataIndexInside`){zh[Ih]=Ph;return}var Lh=Ih.match(/^(\w+)(Index|Id|Name)$/)||[],Vh=Lh[1],Hh=(Lh[2]||``).toLowerCase();if(!(!Vh||!Hh||Fh&&Fh.includeMainTypes&&indexOf(Fh.includeMainTypes,Vh)<0)){Bh||=!!Vh;var Uh=Rh.get(Vh)||Rh.set(Vh,{});Uh[Hh]=Ph}}),{mainTypeSpecified:Bh,queryOptionMap:Rh,others:zh}}var SINGLE_REFERRING={useDefault:!0,enableAll:!1,enableNone:!1},MULTIPLE_REFERRING={useDefault:!1,enableAll:!0,enableNone:!0};function queryReferringComponents(Ph,Fh,Ih,Lh){Lh||=SINGLE_REFERRING;var Rh=Ih.index,zh=Ih.id,Bh=Ih.name,Vh={models:null,specified:Rh!=null||zh!=null||Bh!=null};if(!Vh.specified){var Hh=void 0;return Vh.models=Lh.useDefault&&(Hh=Ph.getComponent(Fh))?[Hh]:[],Vh}if(Rh===`none`||Rh===!1){if(Lh.enableNone)return Vh.models=[],Vh;Rh=-1}return Rh===`all`&&(Rh=Lh.enableAll?zh=Bh=null:-1),Vh.models=Ph.queryComponents({mainType:Fh,index:Rh,id:zh,name:Bh}),Vh}function setAttribute(Ph,Fh,Ih){Ph.setAttribute?Ph.setAttribute(Fh,Ih):Ph[Fh]=Ih}function getAttribute(Ph,Fh){return Ph.getAttribute?Ph.getAttribute(Fh):Ph[Fh]}function getTooltipRenderMode(Ph){return Ph===`auto`?env.domSupported?`html`:`richText`:Ph||`html`}function groupData(Ph,Fh){var Ih=createHashMap(),Lh=[];return each$15(Ph,function(Ph){var Rh=Fh(Ph);(Ih.get(Rh)||(Lh.push(Rh),Ih.set(Rh,[]))).push(Ph)}),{keys:Lh,buckets:Ih}}function interpolateRawValues(Ph,Fh,Ih,Lh,Rh){var zh=Fh==null||Fh===`auto`;if(Lh==null)return Lh;if(isNumber(Lh)){var Bh=interpolateNumber(Ih||0,Lh,Rh);return round$4(Bh,zh?Math.max(getPrecision(Ih||0),getPrecision(Lh)):Fh)}else if(isString(Lh))return Rh<1?Ih:Lh;else{for(var Vh=[],Hh=Ih,Uh=Lh,Wh=Math.max(Hh?Hh.length:0,Uh.length),Gh=0;Gh<Wh;++Gh){var Kh=Ph.getDimensionInfo(Gh);if(Kh&&Kh.type===`ordinal`)Vh[Gh]=(Rh<1&&Hh?Hh:Uh)[Gh];else{var qh=Hh&&Hh[Gh]?Hh[Gh]:0,Jh=Uh[Gh],Bh=interpolateNumber(qh,Jh,Rh);Vh[Gh]=round$4(Bh,zh?Math.max(getPrecision(qh),getPrecision(Jh)):Fh)}}return Vh}}var ListIterator=function(){function Ph(){}return Ph.prototype.reset=function(Ph,Fh,Ih,Lh){return this._list=Ph,this._step=Lh||=1,this._idx=Fh,this._end=Ih??(Lh>0?Ph.length:0),this.item=null,this.key=NaN,this},Ph.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},Ph}();function clearTmpModel(Ph){Ph.option=Ph.parentModel=Ph.ecModel=null}var TYPE_DELIMITER=`.`,IS_CONTAINER=`___EC__COMPONENT__CONTAINER___`,IS_EXTENDED_CLASS=`___EC__EXTENDED_CLASS___`;function parseClassType(Ph){var Fh={main:``,sub:``};if(Ph){var Ih=Ph.split(TYPE_DELIMITER);Fh.main=Ih[0]||``,Fh.sub=Ih[1]||``}return Fh}function checkClassType(Ph){assert$1(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(Ph),`componentType "`+Ph+`" illegal`)}function isExtendedClass(Ph){return!!(Ph&&Ph[IS_EXTENDED_CLASS])}function enableClassExtend(Ph,Fh){Ph.$constructor=Ph,Ph.extend=function(Ph){var Fh=this,Ih;return isESClass(Fh)?Ih=function(Ph){__extends$1(Fh,Ph);function Fh(){return Ph.apply(this,arguments)||this}return Fh}(Fh):(Ih=function(){(Ph.$constructor||Fh).apply(this,arguments)},inherits(Ih,this)),extend$1(Ih.prototype,Ph),Ih[IS_EXTENDED_CLASS]=!0,Ih.extend=this.extend,Ih.superCall=superCall,Ih.superApply=superApply,Ih.superClass=Fh,Ih}}function isESClass(Ph){return isFunction(Ph)&&/^class\s/.test(Function.prototype.toString.call(Ph))}function mountExtend(Ph,Fh){Ph.extend=Fh.extend}var classBase=Math.round(Math.random()*10);function enableClassCheck(Ph){var Fh=[`__\0is_clz`,classBase++].join(`_`);Ph.prototype[Fh]=!0,Ph.isInstance=function(Ph){return!!(Ph&&Ph[Fh])}}function superCall(Ph,Fh){var Ih=[...arguments].slice(2);return this.superClass.prototype[Fh].apply(Ph,Ih)}function superApply(Ph,Fh,Ih){return this.superClass.prototype[Fh].apply(Ph,Ih)}function enableClassManagement(Ph){var Fh={};Ph.registerClass=function(Ph){var Lh=Ph.type||Ph.prototype.type;if(Lh){checkClassType(Lh),Ph.prototype.type=Lh;var Rh=parseClassType(Lh);if(!Rh.sub)Fh[Rh.main]=Ph;else if(Rh.sub!==IS_CONTAINER){var zh=Ih(Rh);zh[Rh.sub]=Ph}}return Ph},Ph.getClass=function(Ph,Ih,Lh){var Rh=Fh[Ph];if(Rh&&Rh[IS_CONTAINER]&&(Rh=Ih?Rh[Ih]:null),Lh&&!Rh)throw Error(Ih?`Component `+Ph+`.`+(Ih||``)+` is used but not imported.`:Ph+`.type should be specified.`);return Rh},Ph.getClassesByMainType=function(Ph){var Ih=parseClassType(Ph),Lh=[],Rh=Fh[Ih.main];return Rh&&Rh[IS_CONTAINER]?each$15(Rh,function(Ph,Fh){Fh!==IS_CONTAINER&&Lh.push(Ph)}):Lh.push(Rh),Lh},Ph.hasClass=function(Ph){return!!Fh[parseClassType(Ph).main]},Ph.getAllClassMainTypes=function(){var Ph=[];return each$15(Fh,function(Fh,Ih){Ph.push(Ih)}),Ph},Ph.hasSubTypes=function(Ph){var Ih=Fh[parseClassType(Ph).main];return Ih&&Ih[IS_CONTAINER]};function Ih(Ph){var Ih=Fh[Ph.main];return(!Ih||!Ih[IS_CONTAINER])&&(Ih=Fh[Ph.main]={},Ih[IS_CONTAINER]=!0),Ih}}function makeStyleMapper(Ph,Fh){for(var Ih=0;Ih<Ph.length;Ih++)Ph[Ih][1]||(Ph[Ih][1]=Ph[Ih][0]);return Fh||=!1,function(Ih,Lh,Rh){for(var zh={},Bh=0;Bh<Ph.length;Bh++){var Vh=Ph[Bh][1];if(!(Lh&&indexOf(Lh,Vh)>=0||Rh&&indexOf(Rh,Vh)<0)){var Hh=Ih.getShallow(Vh,Fh);Hh!=null&&(zh[Ph[Bh][0]]=Hh)}}return zh}}var AREA_STYLE_KEY_MAP=[[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]],getAreaStyle=makeStyleMapper(AREA_STYLE_KEY_MAP),AreaStyleMixin=function(){function Ph(){}return Ph.prototype.getAreaStyle=function(Ph,Fh){return getAreaStyle(this,Ph,Fh)},Ph}(),globalImageCache=new LRU(50);function findExistImage(Ph){if(typeof Ph==`string`){var Fh=globalImageCache.get(Ph);return Fh&&Fh.image}else return Ph}function createOrUpdateImage(Ph,Fh,Ih,Lh,Rh){if(!Ph)return Fh;if(typeof Ph==`string`){if(Fh&&Fh.__zrImageSrc===Ph||!Ih)return Fh;var zh=globalImageCache.get(Ph),Bh={hostEl:Ih,cb:Lh,cbPayload:Rh};return zh?(Fh=zh.image,!isImageReady(Fh)&&zh.pending.push(Bh)):(Fh=platformApi.loadImage(Ph,imageOnLoad,imageOnLoad),Fh.__zrImageSrc=Ph,globalImageCache.put(Ph,Fh.__cachedImgObj={image:Fh,pending:[Bh]})),Fh}else return Ph}function imageOnLoad(){var Ph=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var Fh=0;Fh<Ph.pending.length;Fh++){var Ih=Ph.pending[Fh],Lh=Ih.cb;Lh&&Lh(this,Ih.cbPayload),Ih.hostEl.dirty()}Ph.pending.length=0}function isImageReady(Ph){return Ph&&Ph.width&&Ph.height}var STYLE_REG=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function truncateText2(Ph,Fh,Ih,Lh,Rh,zh){if(!Ih){Ph.text=``,Ph.isTruncated=!1;return}var Bh=(Fh+``).split(`
4840
4840
  `);zh=prepareTruncateOptions(Ih,Lh,Rh,zh);for(var Vh=!1,Hh={},Uh=0,Wh=Bh.length;Uh<Wh;Uh++)truncateSingleLine(Hh,Bh[Uh],zh),Bh[Uh]=Hh.textLine,Vh||=Hh.isTruncated;Ph.text=Bh.join(`
@@ -4885,7 +4885,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
4885
4885
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function userAgent(Ph){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(Ph)}function on(Ph,Fh,Ih){Ph.addEventListener(Fh,Ih,!IE11OrLess&&captureMode)}function off(Ph,Fh,Ih){Ph.removeEventListener(Fh,Ih,!IE11OrLess&&captureMode)}function matches(Ph,Fh){if(Fh){if(Fh[0]===`>`&&(Fh=Fh.substring(1)),Ph)try{if(Ph.matches)return Ph.matches(Fh);if(Ph.msMatchesSelector)return Ph.msMatchesSelector(Fh);if(Ph.webkitMatchesSelector)return Ph.webkitMatchesSelector(Fh)}catch{return!1}return!1}}function getParentOrHost(Ph){return Ph.host&&Ph!==document&&Ph.host.nodeType?Ph.host:Ph.parentNode}function closest(Ph,Fh,Ih,Lh){if(Ph){Ih||=document;do{if(Fh!=null&&(Fh[0]===`>`?Ph.parentNode===Ih&&matches(Ph,Fh):matches(Ph,Fh))||Lh&&Ph===Ih)return Ph;if(Ph===Ih)break}while(Ph=getParentOrHost(Ph))}return null}function toggleClass(Ph,Fh,Ih){Ph&&Fh&&(Ph.classList?Ph.classList[Ih?`add`:`remove`](Fh):Ph.className=((` `+Ph.className+` `).replace(R_SPACE,` `).replace(` `+Fh+` `,` `)+(Ih?` `+Fh:``)).replace(R_SPACE,` `))}function css(Ph,Fh,Ih){var Lh=Ph&&Ph.style;if(Lh){if(Ih===void 0)return document.defaultView&&document.defaultView.getComputedStyle?Ih=document.defaultView.getComputedStyle(Ph,``):Ph.currentStyle&&(Ih=Ph.currentStyle),Fh===void 0?Ih:Ih[Fh];!(Fh in Lh)&&Fh.indexOf(`webkit`)===-1&&(Fh=`-webkit-`+Fh),Lh[Fh]=Ih+(typeof Ih==`string`?``:`px`)}}function matrix(Ph,Fh){var Ih=``;if(typeof Ph==`string`)Ih=Ph;else do{var Lh=css(Ph,`transform`);Lh&&Lh!==`none`&&(Ih=Lh+` `+Ih)}while(!Fh&&(Ph=Ph.parentNode));var Rh=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return Rh&&new Rh(Ih)}function find(Ph,Fh,Ih){if(Ph){var Lh=Ph.getElementsByTagName(Fh),Rh=0,zh=Lh.length;if(Ih)for(;Rh<zh;Rh++)Ih(Lh[Rh],Rh);return Lh}return[]}function getWindowScrollingElement(){return document.scrollingElement||document.documentElement}function getRect(Ph,Fh,Ih,Lh,Rh){if(!(!Ph.getBoundingClientRect&&Ph!==window)){var zh,Bh,Vh,Hh,Uh,Wh,Gh;if(Ph!==window&&Ph.parentNode&&Ph!==getWindowScrollingElement()?(zh=Ph.getBoundingClientRect(),Bh=zh.top,Vh=zh.left,Hh=zh.bottom,Uh=zh.right,Wh=zh.height,Gh=zh.width):(Bh=0,Vh=0,Hh=window.innerHeight,Uh=window.innerWidth,Wh=window.innerHeight,Gh=window.innerWidth),(Fh||Ih)&&Ph!==window&&(Rh||=Ph.parentNode,!IE11OrLess))do if(Rh&&Rh.getBoundingClientRect&&(css(Rh,`transform`)!==`none`||Ih&&css(Rh,`position`)!==`static`)){var Kh=Rh.getBoundingClientRect();Bh-=Kh.top+parseInt(css(Rh,`border-top-width`)),Vh-=Kh.left+parseInt(css(Rh,`border-left-width`)),Hh=Bh+zh.height,Uh=Vh+zh.width;break}while(Rh=Rh.parentNode);if(Lh&&Ph!==window){var qh=matrix(Rh||Ph),Jh=qh&&qh.a,Yh=qh&&qh.d;qh&&(Bh/=Yh,Vh/=Jh,Gh/=Jh,Wh/=Yh,Hh=Bh+Wh,Uh=Vh+Gh)}return{top:Bh,left:Vh,bottom:Hh,right:Uh,width:Gh,height:Wh}}}function isScrolledPast(Ph,Fh,Ih){for(var Lh=getParentAutoScrollElement(Ph,!0),Rh=getRect(Ph)[Fh];Lh;){var zh=getRect(Lh)[Ih],Bh=void 0;if(Bh=Ih===`top`||Ih===`left`?Rh>=zh:Rh<=zh,!Bh)return Lh;if(Lh===getWindowScrollingElement())break;Lh=getParentAutoScrollElement(Lh,!1)}return!1}function getChild(Ph,Fh,Ih,Lh){for(var Rh=0,zh=0,Bh=Ph.children;zh<Bh.length;){if(Bh[zh].style.display!==`none`&&Bh[zh]!==Sortable.ghost&&(Lh||Bh[zh]!==Sortable.dragged)&&closest(Bh[zh],Ih.draggable,Ph,!1)){if(Rh===Fh)return Bh[zh];Rh++}zh++}return null}function lastChild(Ph,Fh){for(var Ih=Ph.lastElementChild;Ih&&(Ih===Sortable.ghost||css(Ih,`display`)===`none`||Fh&&!matches(Ih,Fh));)Ih=Ih.previousElementSibling;return Ih||null}function index(Ph,Fh){var Ih=0;if(!Ph||!Ph.parentNode)return-1;for(;Ph=Ph.previousElementSibling;)Ph.nodeName.toUpperCase()!==`TEMPLATE`&&Ph!==Sortable.clone&&(!Fh||matches(Ph,Fh))&&Ih++;return Ih}function getRelativeScrollOffset(Ph){var Fh=0,Ih=0,Lh=getWindowScrollingElement();if(Ph)do{var Rh=matrix(Ph),zh=Rh.a,Bh=Rh.d;Fh+=Ph.scrollLeft*zh,Ih+=Ph.scrollTop*Bh}while(Ph!==Lh&&(Ph=Ph.parentNode));return[Fh,Ih]}function indexOfObject(Ph,Fh){for(var Ih in Ph)if(Ph.hasOwnProperty(Ih)){for(var Lh in Fh)if(Fh.hasOwnProperty(Lh)&&Fh[Lh]===Ph[Ih][Lh])return Number(Ih)}return-1}function getParentAutoScrollElement(Ph,Fh){if(!Ph||!Ph.getBoundingClientRect)return getWindowScrollingElement();var Ih=Ph,Lh=!1;do if(Ih.clientWidth<Ih.scrollWidth||Ih.clientHeight<Ih.scrollHeight){var Rh=css(Ih);if(Ih.clientWidth<Ih.scrollWidth&&(Rh.overflowX==`auto`||Rh.overflowX==`scroll`)||Ih.clientHeight<Ih.scrollHeight&&(Rh.overflowY==`auto`||Rh.overflowY==`scroll`)){if(!Ih.getBoundingClientRect||Ih===document.body)return getWindowScrollingElement();if(Lh||Fh)return Ih;Lh=!0}}while(Ih=Ih.parentNode);return getWindowScrollingElement()}function extend(Ph,Fh){if(Ph&&Fh)for(var Ih in Fh)Fh.hasOwnProperty(Ih)&&(Ph[Ih]=Fh[Ih]);return Ph}function isRectEqual(Ph,Fh){return Math.round(Ph.top)===Math.round(Fh.top)&&Math.round(Ph.left)===Math.round(Fh.left)&&Math.round(Ph.height)===Math.round(Fh.height)&&Math.round(Ph.width)===Math.round(Fh.width)}function throttle(Ph,Fh){return function(){if(!_throttleTimeout){var Ih=arguments,Lh=this;Ih.length===1?Ph.call(Lh,Ih[0]):Ph.apply(Lh,Ih),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},Fh)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(Ph,Fh,Ih){Ph.scrollLeft+=Fh,Ph.scrollTop+=Ih}function clone(Ph){var Fh=window.Polymer,Ih=window.jQuery||window.Zepto;return Fh&&Fh.dom?Fh.dom(Ph).cloneNode(!0):Ih?Ih(Ph).clone(!0)[0]:Ph.cloneNode(!0)}function setRect(Ph,Fh){css(Ph,`position`,`absolute`),css(Ph,`top`,Fh.top),css(Ph,`left`,Fh.left),css(Ph,`width`,Fh.width),css(Ph,`height`,Fh.height)}function unsetRect(Ph){css(Ph,`position`,``),css(Ph,`top`,``),css(Ph,`left`,``),css(Ph,`width`,``),css(Ph,`height`,``)}function AnimationStateManager(){var Ph=[],Fh;return{captureAnimationState:function(){Ph=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(Fh){if(!(css(Fh,`display`)===`none`||Fh===Sortable.ghost)){Ph.push({target:Fh,rect:getRect(Fh)});var Ih=_objectSpread2({},Ph[Ph.length-1].rect);if(Fh.thisAnimationDuration){var Lh=matrix(Fh,!0);Lh&&(Ih.top-=Lh.f,Ih.left-=Lh.e)}Fh.fromRect=Ih}})},addAnimationState:function(Fh){Ph.push(Fh)},removeAnimationState:function(Fh){Ph.splice(indexOfObject(Ph,{target:Fh}),1)},animateAll:function(Ih){var Lh=this;if(!this.options.animation){clearTimeout(Fh),typeof Ih==`function`&&Ih();return}var Rh=!1,zh=0;Ph.forEach(function(Ph){var Fh=0,Ih=Ph.target,Bh=Ih.fromRect,Vh=getRect(Ih),Hh=Ih.prevFromRect,Uh=Ih.prevToRect,Wh=Ph.rect,Gh=matrix(Ih,!0);Gh&&(Vh.top-=Gh.f,Vh.left-=Gh.e),Ih.toRect=Vh,Ih.thisAnimationDuration&&isRectEqual(Hh,Vh)&&!isRectEqual(Bh,Vh)&&(Wh.top-Vh.top)/(Wh.left-Vh.left)===(Bh.top-Vh.top)/(Bh.left-Vh.left)&&(Fh=calculateRealTime(Wh,Hh,Uh,Lh.options)),isRectEqual(Vh,Bh)||(Ih.prevFromRect=Bh,Ih.prevToRect=Vh,Fh||=Lh.options.animation,Lh.animate(Ih,Wh,Vh,Fh)),Fh&&(Rh=!0,zh=Math.max(zh,Fh),clearTimeout(Ih.animationResetTimer),Ih.animationResetTimer=setTimeout(function(){Ih.animationTime=0,Ih.prevFromRect=null,Ih.fromRect=null,Ih.prevToRect=null,Ih.thisAnimationDuration=null},Fh),Ih.thisAnimationDuration=Fh)}),clearTimeout(Fh),Rh?Fh=setTimeout(function(){typeof Ih==`function`&&Ih()},zh):typeof Ih==`function`&&Ih(),Ph=[]},animate:function(Ph,Fh,Ih,Lh){if(Lh){css(Ph,`transition`,``),css(Ph,`transform`,``);var Rh=matrix(this.el),zh=Rh&&Rh.a,Bh=Rh&&Rh.d,Vh=(Fh.left-Ih.left)/(zh||1),Hh=(Fh.top-Ih.top)/(Bh||1);Ph.animatingX=!!Vh,Ph.animatingY=!!Hh,css(Ph,`transform`,`translate3d(`+Vh+`px,`+Hh+`px,0)`),this.forRepaintDummy=repaint(Ph),css(Ph,`transition`,`transform `+Lh+`ms`+(this.options.easing?` `+this.options.easing:``)),css(Ph,`transform`,`translate3d(0,0,0)`),typeof Ph.animated==`number`&&clearTimeout(Ph.animated),Ph.animated=setTimeout(function(){css(Ph,`transition`,``),css(Ph,`transform`,``),Ph.animated=!1,Ph.animatingX=!1,Ph.animatingY=!1},Lh)}}}}function repaint(Ph){return Ph.offsetWidth}function calculateRealTime(Ph,Fh,Ih,Lh){return Math.sqrt((Fh.top-Ph.top)**2+(Fh.left-Ph.left)**2)/Math.sqrt((Fh.top-Ih.top)**2+(Fh.left-Ih.left)**2)*Lh.animation}function dispatchEvent(Ph){var Fh=Ph.sortable,Ih=Ph.rootEl,Lh=Ph.name,Rh=Ph.targetEl,zh=Ph.cloneEl,Bh=Ph.toEl,Vh=Ph.fromEl,Hh=Ph.oldIndex,Uh=Ph.newIndex,Wh=Ph.oldDraggableIndex,Gh=Ph.newDraggableIndex,Kh=Ph.originalEvent,qh=Ph.putSortable,Jh=Ph.extraEventProperties;if(Fh||=Ih&&Ih[expando],Fh){var Yh,Xh=Fh.options,Zh=`on`+Lh.charAt(0).toUpperCase()+Lh.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?Yh=new CustomEvent(Lh,{bubbles:!0,cancelable:!0}):(Yh=document.createEvent(`Event`),Yh.initEvent(Lh,!0,!0)),Yh.to=Bh||Ih,Yh.from=Vh||Ih,Yh.item=Rh||Ih,Yh.clone=zh,Yh.oldIndex=Hh,Yh.newIndex=Uh,Yh.oldDraggableIndex=Wh,Yh.newDraggableIndex=Gh,Yh.originalEvent=Kh,Yh.pullMode=qh?qh.lastPutMode:void 0;var Qh=_objectSpread2(_objectSpread2({},Jh),PluginManager.getEventProperties(Lh,Fh));for(var $h in Qh)Yh[$h]=Qh[$h];Ih&&Ih.dispatchEvent(Yh),Xh[Zh]&&Xh[Zh].call(Fh,Yh)}}function _dispatchEvent(Ph){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},Ph))}function Sortable(Ph,Fh){if(!(Ph&&Ph.nodeType&&Ph.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(Ph)}`;this.el=Ph,this.options=Fh=_extends({},Fh),Ph[expando]=this;var Ih={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(Ph.nodeName)?`>li`:`>*`,swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(Ph,this.options)},ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,ignore:`a, img`,filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(Ph,Fh){Ph.setData(`Text`,Fh.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:`data-id`,delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:`sortable-fallback`,fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&`PointerEvent`in window&&!Safari,emptyInsertThreshold:5};for(var Lh in PluginManager.initializePlugins(this,Ph,Ih),Ih)!(Lh in Fh)&&(Fh[Lh]=Ih[Lh]);for(var Rh in _prepareGroup(Fh),this)Rh.charAt(0)===`_`&&typeof this[Rh]==`function`&&(this[Rh]=this[Rh].bind(this));this.nativeDraggable=Fh.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),Fh.supportPointer?on(Ph,`pointerdown`,this._onTapStart):(on(Ph,`mousedown`,this._onTapStart),on(Ph,`touchstart`,this._onTapStart)),this.nativeDraggable&&(on(Ph,`dragover`,this),on(Ph,`dragenter`,this)),sortables.push(this.el),Fh.store&&Fh.store.get&&this.sort(Fh.store.get(this)||[]),_extends(this,AnimationStateManager())}function _globalDragOver(Ph){Ph.dataTransfer&&(Ph.dataTransfer.dropEffect=`move`),Ph.cancelable&&Ph.preventDefault()}function _onMove(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){var Hh,Uh=Ph[expando],Wh=Uh.options.onMove,Gh;return window.CustomEvent&&!IE11OrLess&&!Edge?Hh=new CustomEvent(`move`,{bubbles:!0,cancelable:!0}):(Hh=document.createEvent(`Event`),Hh.initEvent(`move`,!0,!0)),Hh.to=Fh,Hh.from=Ph,Hh.dragged=Ih,Hh.draggedRect=Lh,Hh.related=Rh||Fh,Hh.relatedRect=zh||getRect(Fh),Hh.willInsertAfter=Vh,Hh.originalEvent=Bh,Ph.dispatchEvent(Hh),Wh&&(Gh=Wh.call(Uh,Hh,Bh)),Gh}function _disableDraggable(Ph){Ph.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(Ph,Fh,Ih){var Lh=getRect(getChild(Ih.el,0,Ih.options,!0)),Rh=10;return Fh?Ph.clientX<Lh.left-Rh||Ph.clientY<Lh.top&&Ph.clientX<Lh.right:Ph.clientY<Lh.top-Rh||Ph.clientY<Lh.bottom&&Ph.clientX<Lh.left}function _ghostIsLast(Ph,Fh,Ih){var Lh=getRect(lastChild(Ih.el,Ih.options.draggable)),Rh=10;return Fh?Ph.clientX>Lh.right+Rh||Ph.clientX<=Lh.right&&Ph.clientY>Lh.bottom&&Ph.clientX>=Lh.left:Ph.clientX>Lh.right&&Ph.clientY>Lh.top||Ph.clientX<=Lh.right&&Ph.clientY>Lh.bottom+Rh}function _getSwapDirection(Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh){var Hh=Lh?Ph.clientY:Ph.clientX,Uh=Lh?Ih.height:Ih.width,Wh=Lh?Ih.top:Ih.left,Gh=Lh?Ih.bottom:Ih.right,Kh=!1;if(!Bh){if(Vh&&targetMoveDistance<Uh*Rh){if(!pastFirstInvertThresh&&(lastDirection===1?Hh>Wh+Uh*zh/2:Hh<Gh-Uh*zh/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)Kh=!0;else if(lastDirection===1?Hh<Wh+targetMoveDistance:Hh>Gh-targetMoveDistance)return-lastDirection}else if(Hh>Wh+Uh*(1-Rh)/2&&Hh<Gh-Uh*(1-Rh)/2)return _getInsertDirection(Fh)}return Kh||=Bh,Kh&&(Hh<Wh+Uh*zh/2||Hh>Gh-Uh*zh/2)?Hh>Wh+Uh/2?1:-1:0}function _getInsertDirection(Ph){return index(dragEl)<index(Ph)?1:-1}function _generateId(Ph){for(var Fh=Ph.tagName+Ph.className+Ph.src+Ph.href+Ph.textContent,Ih=Fh.length,Lh=0;Ih--;)Lh+=Fh.charCodeAt(Ih);return Lh.toString(36)}function _saveInputCheckedState(Ph){savedInputChecked.length=0;for(var Fh=Ph.getElementsByTagName(`input`),Ih=Fh.length;Ih--;){var Lh=Fh[Ih];Lh.checked&&savedInputChecked.push(Lh)}}function _nextTick(Ph){return setTimeout(Ph,0)}function _cancelNextTick(Ph){return clearTimeout(Ph)}function AutoScrollPlugin(){function Ph(){for(var Ph in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)Ph.charAt(0)===`_`&&typeof this[Ph]==`function`&&(this[Ph]=this[Ph].bind(this))}return Ph.prototype={dragStarted:function(Ph){var Fh=Ph.originalEvent;this.sortable.nativeDraggable?on(document,`dragover`,this._handleAutoScroll):this.options.supportPointer?on(document,`pointermove`,this._handleFallbackAutoScroll):Fh.touches?on(document,`touchmove`,this._handleFallbackAutoScroll):on(document,`mousemove`,this._handleFallbackAutoScroll)},dragOverCompleted:function(Ph){var Fh=Ph.originalEvent;!this.options.dragOverBubble&&!Fh.rootEl&&this._handleAutoScroll(Fh)},drop:function(){this.sortable.nativeDraggable?off(document,`dragover`,this._handleAutoScroll):(off(document,`pointermove`,this._handleFallbackAutoScroll),off(document,`touchmove`,this._handleFallbackAutoScroll),off(document,`mousemove`,this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(Ph){this._handleAutoScroll(Ph,!0)},_handleAutoScroll:function(Ph,Fh){var Ih=this,Lh=(Ph.touches?Ph.touches[0]:Ph).clientX,Rh=(Ph.touches?Ph.touches[0]:Ph).clientY,zh=document.elementFromPoint(Lh,Rh);if(touchEvt$1=Ph,Fh||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(Ph,this.options,zh,Fh);var Bh=getParentAutoScrollElement(zh,!0);scrolling&&(!pointerElemChangedInterval||Lh!==lastAutoScrollX||Rh!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var zh=getParentAutoScrollElement(document.elementFromPoint(Lh,Rh),!0);zh!==Bh&&(Bh=zh,clearAutoScrolls()),autoScroll(Ph,Ih.options,zh,Fh)},10),lastAutoScrollX=Lh,lastAutoScrollY=Rh)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(zh,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(Ph,this.options,getParentAutoScrollElement(zh,!1),!1)}}},_extends(Ph,{pluginName:`scroll`,initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(Ph){clearInterval(Ph.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}function Revert(){}function Remove(){}function SwapPlugin(){function Ph(){this.defaults={swapClass:`sortable-swap-highlight`}}return Ph.prototype={dragStart:function(Ph){lastSwapEl=Ph.dragEl},dragOverValid:function(Ph){var Fh=Ph.completed,Ih=Ph.target,Lh=Ph.onMove,Rh=Ph.activeSortable,zh=Ph.changed,Bh=Ph.cancel;if(Rh.options.swap){var Vh=this.sortable.el,Hh=this.options;if(Ih&&Ih!==Vh){var Uh=lastSwapEl;Lh(Ih)===!1?lastSwapEl=null:(toggleClass(Ih,Hh.swapClass,!0),lastSwapEl=Ih),Uh&&Uh!==lastSwapEl&&toggleClass(Uh,Hh.swapClass,!1)}zh(),Fh(!0),Bh()}},drop:function(Ph){var Fh=Ph.activeSortable,Ih=Ph.putSortable,Lh=Ph.dragEl,Rh=Ih||this.sortable,zh=this.options;lastSwapEl&&toggleClass(lastSwapEl,zh.swapClass,!1),lastSwapEl&&(zh.swap||Ih&&Ih.options.swap)&&Lh!==lastSwapEl&&(Rh.captureAnimationState(),Rh!==Fh&&Fh.captureAnimationState(),swapNodes(Lh,lastSwapEl),Rh.animateAll(),Rh!==Fh&&Fh.animateAll())},nulling:function(){lastSwapEl=null}},_extends(Ph,{pluginName:`swap`,eventProperties:function(){return{swapItem:lastSwapEl}}})}function swapNodes(Ph,Fh){var Ih=Ph.parentNode,Lh=Fh.parentNode,Rh,zh;!Ih||!Lh||Ih.isEqualNode(Fh)||Lh.isEqualNode(Ph)||(Rh=index(Ph),zh=index(Fh),Ih.isEqualNode(Lh)&&Rh<zh&&zh++,Ih.insertBefore(Fh,Ih.children[Rh]),Lh.insertBefore(Ph,Lh.children[zh]))}function MultiDragPlugin(){function Ph(Ph){for(var Fh in this)Fh.charAt(0)===`_`&&typeof this[Fh]==`function`&&(this[Fh]=this[Fh].bind(this));Ph.options.supportPointer?on(document,`pointerup`,this._deselectMultiDrag):(on(document,`mouseup`,this._deselectMultiDrag),on(document,`touchend`,this._deselectMultiDrag)),on(document,`keydown`,this._checkKeyDown),on(document,`keyup`,this._checkKeyUp),this.defaults={selectedClass:`sortable-selected`,multiDragKey:null,setData:function(Fh,Ih){var Lh=``;multiDragElements.length&&multiDragSortable===Ph?multiDragElements.forEach(function(Ph,Fh){Lh+=(Fh?`, `:``)+Ph.textContent}):Lh=Ih.textContent,Fh.setData(`Text`,Lh)}}}return Ph.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(Ph){dragEl$1=Ph.dragEl},delayEnded:function(){this.isMultiDrag=~multiDragElements.indexOf(dragEl$1)},setupClone:function(Ph){var Fh=Ph.sortable,Ih=Ph.cancel;if(this.isMultiDrag){for(var Lh=0;Lh<multiDragElements.length;Lh++)multiDragClones.push(clone(multiDragElements[Lh])),multiDragClones[Lh].sortableIndex=multiDragElements[Lh].sortableIndex,multiDragClones[Lh].draggable=!1,multiDragClones[Lh].style[`will-change`]=``,toggleClass(multiDragClones[Lh],this.options.selectedClass,!1),multiDragElements[Lh]===dragEl$1&&toggleClass(multiDragClones[Lh],this.options.chosenClass,!1);Fh._hideClone(),Ih()}},clone:function(Ph){var Fh=Ph.sortable,Ih=Ph.rootEl,Lh=Ph.dispatchSortableEvent,Rh=Ph.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||multiDragElements.length&&multiDragSortable===Fh&&(insertMultiDragClones(!0,Ih),Lh(`clone`),Rh()))},showClone:function(Ph){var Fh=Ph.cloneNowShown,Ih=Ph.rootEl,Lh=Ph.cancel;this.isMultiDrag&&(insertMultiDragClones(!1,Ih),multiDragClones.forEach(function(Ph){css(Ph,`display`,``)}),Fh(),clonesHidden=!1,Lh())},hideClone:function(Ph){var Fh=this;Ph.sortable;var Ih=Ph.cloneNowHidden,Lh=Ph.cancel;this.isMultiDrag&&(multiDragClones.forEach(function(Ph){css(Ph,`display`,`none`),Fh.options.removeCloneOnHide&&Ph.parentNode&&Ph.parentNode.removeChild(Ph)}),Ih(),clonesHidden=!0,Lh())},dragStartGlobal:function(Ph){Ph.sortable,!this.isMultiDrag&&multiDragSortable&&multiDragSortable.multiDrag._deselectMultiDrag(),multiDragElements.forEach(function(Ph){Ph.sortableIndex=index(Ph)}),multiDragElements=multiDragElements.sort(function(Ph,Fh){return Ph.sortableIndex-Fh.sortableIndex}),dragStarted=!0},dragStarted:function(Ph){var Fh=this,Ih=Ph.sortable;if(this.isMultiDrag){if(this.options.sort&&(Ih.captureAnimationState(),this.options.animation)){multiDragElements.forEach(function(Ph){Ph!==dragEl$1&&css(Ph,`position`,`absolute`)});var Lh=getRect(dragEl$1,!1,!0,!0);multiDragElements.forEach(function(Ph){Ph!==dragEl$1&&setRect(Ph,Lh)}),folding=!0,initialFolding=!0}Ih.animateAll(function(){folding=!1,initialFolding=!1,Fh.options.animation&&multiDragElements.forEach(function(Ph){unsetRect(Ph)}),Fh.options.sort&&removeMultiDragElements()})}},dragOver:function(Ph){var Fh=Ph.target,Ih=Ph.completed,Lh=Ph.cancel;folding&&~multiDragElements.indexOf(Fh)&&(Ih(!1),Lh())},revert:function(Ph){var Fh=Ph.fromSortable,Ih=Ph.rootEl,Lh=Ph.sortable,Rh=Ph.dragRect;multiDragElements.length>1&&(multiDragElements.forEach(function(Ph){Lh.addAnimationState({target:Ph,rect:folding?getRect(Ph):Rh}),unsetRect(Ph),Ph.fromRect=Rh,Fh.removeAnimationState(Ph)}),folding=!1,insertMultiDragElements(!this.options.removeCloneOnHide,Ih))},dragOverCompleted:function(Ph){var Fh=Ph.sortable,Ih=Ph.isOwner,Lh=Ph.insertion,Rh=Ph.activeSortable,zh=Ph.parentEl,Bh=Ph.putSortable,Vh=this.options;if(Lh){if(Ih&&Rh._hideClone(),initialFolding=!1,Vh.animation&&multiDragElements.length>1&&(folding||!Ih&&!Rh.options.sort&&!Bh)){var Hh=getRect(dragEl$1,!1,!0,!0);multiDragElements.forEach(function(Ph){Ph!==dragEl$1&&(setRect(Ph,Hh),zh.appendChild(Ph))}),folding=!0}if(!Ih)if(folding||removeMultiDragElements(),multiDragElements.length>1){var Uh=clonesHidden;Rh._showClone(Fh),Rh.options.animation&&!clonesHidden&&Uh&&multiDragClones.forEach(function(Ph){Rh.addAnimationState({target:Ph,rect:clonesFromRect}),Ph.fromRect=clonesFromRect,Ph.thisAnimationDuration=null})}else Rh._showClone(Fh)}},dragOverAnimationCapture:function(Ph){var Fh=Ph.dragRect,Ih=Ph.isOwner,Lh=Ph.activeSortable;if(multiDragElements.forEach(function(Ph){Ph.thisAnimationDuration=null}),Lh.options.animation&&!Ih&&Lh.multiDrag.isMultiDrag){clonesFromRect=_extends({},Fh);var Rh=matrix(dragEl$1,!0);clonesFromRect.top-=Rh.f,clonesFromRect.left-=Rh.e}},dragOverAnimationComplete:function(){folding&&(folding=!1,removeMultiDragElements())},drop:function(Ph){var Fh=Ph.originalEvent,Ih=Ph.rootEl,Lh=Ph.parentEl,Rh=Ph.sortable,zh=Ph.dispatchSortableEvent,Bh=Ph.oldIndex,Vh=Ph.putSortable,Hh=Vh||this.sortable;if(Fh){var Uh=this.options,Wh=Lh.children;if(!dragStarted)if(Uh.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),toggleClass(dragEl$1,Uh.selectedClass,!~multiDragElements.indexOf(dragEl$1)),~multiDragElements.indexOf(dragEl$1))multiDragElements.splice(multiDragElements.indexOf(dragEl$1),1),lastMultiDragSelect=null,dispatchEvent({sortable:Rh,rootEl:Ih,name:`deselect`,targetEl:dragEl$1,originalEvt:Fh});else{if(multiDragElements.push(dragEl$1),dispatchEvent({sortable:Rh,rootEl:Ih,name:`select`,targetEl:dragEl$1,originalEvt:Fh}),Fh.shiftKey&&lastMultiDragSelect&&Rh.el.contains(lastMultiDragSelect)){var Gh=index(lastMultiDragSelect),Kh=index(dragEl$1);if(~Gh&&~Kh&&Gh!==Kh){var qh,Jh;for(Kh>Gh?(Jh=Gh,qh=Kh):(Jh=Kh,qh=Gh+1);Jh<qh;Jh++)~multiDragElements.indexOf(Wh[Jh])||(toggleClass(Wh[Jh],Uh.selectedClass,!0),multiDragElements.push(Wh[Jh]),dispatchEvent({sortable:Rh,rootEl:Ih,name:`select`,targetEl:Wh[Jh],originalEvt:Fh}))}}else lastMultiDragSelect=dragEl$1;multiDragSortable=Hh}if(dragStarted&&this.isMultiDrag){if(folding=!1,(Lh[expando].options.sort||Lh!==Ih)&&multiDragElements.length>1){var Yh=getRect(dragEl$1),Xh=index(dragEl$1,`:not(.`+this.options.selectedClass+`)`);if(!initialFolding&&Uh.animation&&(dragEl$1.thisAnimationDuration=null),Hh.captureAnimationState(),!initialFolding&&(Uh.animation&&(dragEl$1.fromRect=Yh,multiDragElements.forEach(function(Ph){if(Ph.thisAnimationDuration=null,Ph!==dragEl$1){var Fh=folding?getRect(Ph):Yh;Ph.fromRect=Fh,Hh.addAnimationState({target:Ph,rect:Fh})}})),removeMultiDragElements(),multiDragElements.forEach(function(Ph){Wh[Xh]?Lh.insertBefore(Ph,Wh[Xh]):Lh.appendChild(Ph),Xh++}),Bh===index(dragEl$1))){var Zh=!1;multiDragElements.forEach(function(Ph){if(Ph.sortableIndex!==index(Ph)){Zh=!0;return}}),Zh&&zh(`update`)}multiDragElements.forEach(function(Ph){unsetRect(Ph)}),Hh.animateAll()}multiDragSortable=Hh}(Ih===Lh||Vh&&Vh.lastPutMode!==`clone`)&&multiDragClones.forEach(function(Ph){Ph.parentNode&&Ph.parentNode.removeChild(Ph)})}},nullingGlobal:function(){this.isMultiDrag=dragStarted=!1,multiDragClones.length=0},destroyGlobal:function(){this._deselectMultiDrag(),off(document,`pointerup`,this._deselectMultiDrag),off(document,`mouseup`,this._deselectMultiDrag),off(document,`touchend`,this._deselectMultiDrag),off(document,`keydown`,this._checkKeyDown),off(document,`keyup`,this._checkKeyUp)},_deselectMultiDrag:function(Ph){if(!(dragStarted!==void 0&&dragStarted)&&multiDragSortable===this.sortable&&!(Ph&&closest(Ph.target,this.options.draggable,this.sortable.el,!1))&&!(Ph&&Ph.button!==0))for(;multiDragElements.length;){var Fh=multiDragElements[0];toggleClass(Fh,this.options.selectedClass,!1),multiDragElements.shift(),dispatchEvent({sortable:this.sortable,rootEl:this.sortable.el,name:`deselect`,targetEl:Fh,originalEvt:Ph})}},_checkKeyDown:function(Ph){Ph.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(Ph){Ph.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},_extends(Ph,{pluginName:`multiDrag`,utils:{select:function(Ph){var Fh=Ph.parentNode[expando];!Fh||!Fh.options.multiDrag||~multiDragElements.indexOf(Ph)||(multiDragSortable&&multiDragSortable!==Fh&&(multiDragSortable.multiDrag._deselectMultiDrag(),multiDragSortable=Fh),toggleClass(Ph,Fh.options.selectedClass,!0),multiDragElements.push(Ph))},deselect:function(Ph){var Fh=Ph.parentNode[expando],Ih=multiDragElements.indexOf(Ph);!Fh||!Fh.options.multiDrag||!~Ih||(toggleClass(Ph,Fh.options.selectedClass,!1),multiDragElements.splice(Ih,1))}},eventProperties:function(){var Ph=this,Fh=[],Ih=[];return multiDragElements.forEach(function(Lh){Fh.push({multiDragElement:Lh,index:Lh.sortableIndex});var Rh=folding&&Lh!==dragEl$1?-1:folding?index(Lh,`:not(.`+Ph.options.selectedClass+`)`):index(Lh);Ih.push({multiDragElement:Lh,index:Rh})}),{items:_toConsumableArray(multiDragElements),clones:[].concat(multiDragClones),oldIndicies:Fh,newIndicies:Ih}},optionListeners:{multiDragKey:function(Ph){return Ph=Ph.toLowerCase(),Ph===`ctrl`?Ph=`Control`:Ph.length>1&&(Ph=Ph.charAt(0).toUpperCase()+Ph.substr(1)),Ph}}})}function insertMultiDragElements(Ph,Fh){multiDragElements.forEach(function(Ih,Lh){var Rh=Fh.children[Ih.sortableIndex+(Ph?Number(Lh):0)];Rh?Fh.insertBefore(Ih,Rh):Fh.appendChild(Ih)})}function insertMultiDragClones(Ph,Fh){multiDragClones.forEach(function(Ih,Lh){var Rh=Fh.children[Ih.sortableIndex+(Ph?Number(Lh):0)];Rh?Fh.insertBefore(Ih,Rh):Fh.appendChild(Ih)})}function removeMultiDragElements(){multiDragElements.forEach(function(Ph){Ph!==dragEl$1&&Ph.parentNode&&Ph.parentNode.removeChild(Ph)})}var version,IE11OrLess,Edge,FireFox,Safari,IOS,ChromeForAndroid,captureMode,R_SPACE,_throttleTimeout,expando,plugins,defaults,PluginManager,_excluded,pluginEvent,dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted,ignoreNextClick,sortables,tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh,isCircumstantialInvert,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll,_silent,savedInputChecked,documentExists,PositionGhostAbsolutely,CSSFloatProperty,supportDraggable,supportCssPointerEvents,_detectDirection,_dragElInRowColumn,_detectNearestEmptySortable,_prepareGroup,_hideGhostForTarget,_unhideGhostForTarget,nearestEmptyInsertDetectEvent,_checkOutsideTargetEl,autoScrolls,scrollEl,scrollRootEl,scrolling,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval,autoScroll,drop,lastSwapEl,multiDragElements,multiDragClones,lastMultiDragSelect,multiDragSortable,initialFolding,folding,dragStarted,dragEl$1,clonesFromRect,clonesHidden,init_sortable_esm=__esmMin((()=>{version=`1.14.0`,IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1},R_SPACE=/\s+/g,expando=`Sortable`+new Date().getTime(),plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function(Ph){for(var Fh in defaults)defaults.hasOwnProperty(Fh)&&!(Fh in Ph)&&(Ph[Fh]=defaults[Fh]);plugins.forEach(function(Fh){if(Fh.pluginName===Ph.pluginName)throw`Sortable: Cannot mount plugin ${Ph.pluginName} more than once`}),plugins.push(Ph)},pluginEvent:function(Ph,Fh,Ih){var Lh=this;this.eventCanceled=!1,Ih.cancel=function(){Lh.eventCanceled=!0};var Rh=Ph+`Global`;plugins.forEach(function(Lh){Fh[Lh.pluginName]&&(Fh[Lh.pluginName][Rh]&&Fh[Lh.pluginName][Rh](_objectSpread2({sortable:Fh},Ih)),Fh.options[Lh.pluginName]&&Fh[Lh.pluginName][Ph]&&Fh[Lh.pluginName][Ph](_objectSpread2({sortable:Fh},Ih)))})},initializePlugins:function(Ph,Fh,Ih,Lh){for(var Rh in plugins.forEach(function(Lh){var Rh=Lh.pluginName;if(!(!Ph.options[Rh]&&!Lh.initializeByDefault)){var zh=new Lh(Ph,Fh,Ph.options);zh.sortable=Ph,zh.options=Ph.options,Ph[Rh]=zh,_extends(Ih,zh.defaults)}}),Ph.options)if(Ph.options.hasOwnProperty(Rh)){var zh=this.modifyOption(Ph,Rh,Ph.options[Rh]);zh!==void 0&&(Ph.options[Rh]=zh)}},getEventProperties:function(Ph,Fh){var Ih={};return plugins.forEach(function(Lh){typeof Lh.eventProperties==`function`&&_extends(Ih,Lh.eventProperties.call(Fh[Lh.pluginName],Ph))}),Ih},modifyOption:function(Ph,Fh,Ih){var Lh;return plugins.forEach(function(Rh){Ph[Rh.pluginName]&&Rh.optionListeners&&typeof Rh.optionListeners[Fh]==`function`&&(Lh=Rh.optionListeners[Fh].call(Ph[Rh.pluginName],Ih))}),Lh}},_excluded=[`evt`],pluginEvent=function(Ph,Fh){var Ih=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Lh=Ih.evt,Rh=_objectWithoutProperties(Ih,_excluded);PluginManager.pluginEvent.bind(Sortable)(Ph,Fh,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:Lh,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(Ph){_dispatchEvent({sortable:Fh,name:Ph,originalEvent:Lh})}},Rh))},awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],pastFirstInvertThresh=!1,isCircumstantialInvert=!1,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<`u`,PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?`cssFloat`:`float`,supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&`draggable`in document.createElement(`div`),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var Ph=document.createElement(`x`);return Ph.style.cssText=`pointer-events:auto`,Ph.style.pointerEvents===`auto`}}(),_detectDirection=function(Ph,Fh){var Ih=css(Ph),Lh=parseInt(Ih.width)-parseInt(Ih.paddingLeft)-parseInt(Ih.paddingRight)-parseInt(Ih.borderLeftWidth)-parseInt(Ih.borderRightWidth),Rh=getChild(Ph,0,Fh),zh=getChild(Ph,1,Fh),Bh=Rh&&css(Rh),Vh=zh&&css(zh),Hh=Bh&&parseInt(Bh.marginLeft)+parseInt(Bh.marginRight)+getRect(Rh).width,Uh=Vh&&parseInt(Vh.marginLeft)+parseInt(Vh.marginRight)+getRect(zh).width;if(Ih.display===`flex`)return Ih.flexDirection===`column`||Ih.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(Ih.display===`grid`)return Ih.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(Rh&&Bh.float&&Bh.float!==`none`){var Wh=Bh.float===`left`?`left`:`right`;return zh&&(Vh.clear===`both`||Vh.clear===Wh)?`vertical`:`horizontal`}return Rh&&(Bh.display===`block`||Bh.display===`flex`||Bh.display===`table`||Bh.display===`grid`||Hh>=Lh&&Ih[CSSFloatProperty]===`none`||zh&&Ih[CSSFloatProperty]===`none`&&Hh+Uh>Lh)?`vertical`:`horizontal`},_dragElInRowColumn=function(Ph,Fh,Ih){var Lh=Ih?Ph.left:Ph.top,Rh=Ih?Ph.right:Ph.bottom,zh=Ih?Ph.width:Ph.height,Bh=Ih?Fh.left:Fh.top,Vh=Ih?Fh.right:Fh.bottom,Hh=Ih?Fh.width:Fh.height;return Lh===Bh||Rh===Vh||Lh+zh/2===Bh+Hh/2},_detectNearestEmptySortable=function(Ph,Fh){var Ih;return sortables.some(function(Lh){var Rh=Lh[expando].options.emptyInsertThreshold;if(!(!Rh||lastChild(Lh))){var zh=getRect(Lh),Bh=Ph>=zh.left-Rh&&Ph<=zh.right+Rh,Vh=Fh>=zh.top-Rh&&Fh<=zh.bottom+Rh;if(Bh&&Vh)return Ih=Lh}}),Ih},_prepareGroup=function(Ph){function Fh(Ph,Ih){return function(Lh,Rh,zh,Bh){var Vh=Lh.options.group.name&&Rh.options.group.name&&Lh.options.group.name===Rh.options.group.name;if(Ph==null&&(Ih||Vh))return!0;if(Ph==null||Ph===!1)return!1;if(Ih&&Ph===`clone`)return Ph;if(typeof Ph==`function`)return Fh(Ph(Lh,Rh,zh,Bh),Ih)(Lh,Rh,zh,Bh);var Hh=(Ih?Lh:Rh).options.group.name;return Ph===!0||typeof Ph==`string`&&Ph===Hh||Ph.join&&Ph.indexOf(Hh)>-1}}var Ih={},Lh=Ph.group;(!Lh||_typeof(Lh)!=`object`)&&(Lh={name:Lh}),Ih.name=Lh.name,Ih.checkPull=Fh(Lh.pull,!0),Ih.checkPut=Fh(Lh.put),Ih.revertClone=Lh.revertClone,Ph.group=Ih},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,`display`,`none`)},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,`display`,``)},documentExists&&document.addEventListener(`click`,function(Ph){if(ignoreNextClick)return Ph.preventDefault(),Ph.stopPropagation&&Ph.stopPropagation(),Ph.stopImmediatePropagation&&Ph.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0),nearestEmptyInsertDetectEvent=function(Ph){if(dragEl){Ph=Ph.touches?Ph.touches[0]:Ph;var Fh=_detectNearestEmptySortable(Ph.clientX,Ph.clientY);if(Fh){var Ih={};for(var Lh in Ph)Ph.hasOwnProperty(Lh)&&(Ih[Lh]=Ph[Lh]);Ih.target=Ih.rootEl=Fh,Ih.preventDefault=void 0,Ih.stopPropagation=void 0,Fh[expando]._onDragOver(Ih)}}},_checkOutsideTargetEl=function(Ph){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(Ph.target)},Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(Ph){!this.el.contains(Ph)&&Ph!==this.el&&(lastTarget=null)},_getDirection:function(Ph,Fh){return typeof this.options.direction==`function`?this.options.direction.call(this,Ph,Fh,dragEl):this.options.direction},_onTapStart:function(Ph){if(Ph.cancelable){var Fh=this,Ih=this.el,Lh=this.options,Rh=Lh.preventOnFilter,zh=Ph.type,Bh=Ph.touches&&Ph.touches[0]||Ph.pointerType&&Ph.pointerType===`touch`&&Ph,Vh=(Bh||Ph).target,Hh=Ph.target.shadowRoot&&(Ph.path&&Ph.path[0]||Ph.composedPath&&Ph.composedPath()[0])||Vh,Uh=Lh.filter;if(_saveInputCheckedState(Ih),!dragEl&&!(/mousedown|pointerdown/.test(zh)&&Ph.button!==0||Lh.disabled)&&!Hh.isContentEditable&&!(!this.nativeDraggable&&Safari&&Vh&&Vh.tagName.toUpperCase()===`SELECT`)&&(Vh=closest(Vh,Lh.draggable,Ih,!1),!(Vh&&Vh.animated)&&lastDownEl!==Vh)){if(oldIndex=index(Vh),oldDraggableIndex=index(Vh,Lh.draggable),typeof Uh==`function`){if(Uh.call(this,Ph,Vh,this)){_dispatchEvent({sortable:Fh,rootEl:Hh,name:`filter`,targetEl:Vh,toEl:Ih,fromEl:Ih}),pluginEvent(`filter`,Fh,{evt:Ph}),Rh&&Ph.cancelable&&Ph.preventDefault();return}}else if(Uh&&(Uh=Uh.split(`,`).some(function(Lh){if(Lh=closest(Hh,Lh.trim(),Ih,!1),Lh)return _dispatchEvent({sortable:Fh,rootEl:Lh,name:`filter`,targetEl:Vh,fromEl:Ih,toEl:Ih}),pluginEvent(`filter`,Fh,{evt:Ph}),!0}),Uh)){Rh&&Ph.cancelable&&Ph.preventDefault();return}Lh.handle&&!closest(Hh,Lh.handle,Ih,!1)||this._prepareDragStart(Ph,Bh,Vh)}}},_prepareDragStart:function(Ph,Fh,Ih){var Lh=this,Rh=Lh.el,zh=Lh.options,Bh=Rh.ownerDocument,Vh;if(Ih&&!dragEl&&Ih.parentNode===Rh){var Hh=getRect(Ih);if(rootEl=Rh,dragEl=Ih,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=Ih,activeGroup=zh.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(Fh||Ph).clientX,clientY:(Fh||Ph).clientY},tapDistanceLeft=tapEvt.clientX-Hh.left,tapDistanceTop=tapEvt.clientY-Hh.top,this._lastX=(Fh||Ph).clientX,this._lastY=(Fh||Ph).clientY,dragEl.style[`will-change`]=`all`,Vh=function(){if(pluginEvent(`delayEnded`,Lh,{evt:Ph}),Sortable.eventCanceled){Lh._onDrop();return}Lh._disableDelayedDragEvents(),!FireFox&&Lh.nativeDraggable&&(dragEl.draggable=!0),Lh._triggerDragStart(Ph,Fh),_dispatchEvent({sortable:Lh,name:`choose`,originalEvent:Ph}),toggleClass(dragEl,zh.chosenClass,!0)},zh.ignore.split(`,`).forEach(function(Ph){find(dragEl,Ph.trim(),_disableDraggable)}),on(Bh,`dragover`,nearestEmptyInsertDetectEvent),on(Bh,`mousemove`,nearestEmptyInsertDetectEvent),on(Bh,`touchmove`,nearestEmptyInsertDetectEvent),on(Bh,`mouseup`,Lh._onDrop),on(Bh,`touchend`,Lh._onDrop),on(Bh,`touchcancel`,Lh._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent(`delayStart`,this,{evt:Ph}),zh.delay&&(!zh.delayOnTouchOnly||Fh)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}on(Bh,`mouseup`,Lh._disableDelayedDrag),on(Bh,`touchend`,Lh._disableDelayedDrag),on(Bh,`touchcancel`,Lh._disableDelayedDrag),on(Bh,`mousemove`,Lh._delayedDragTouchMoveHandler),on(Bh,`touchmove`,Lh._delayedDragTouchMoveHandler),zh.supportPointer&&on(Bh,`pointermove`,Lh._delayedDragTouchMoveHandler),Lh._dragStartTimer=setTimeout(Vh,zh.delay)}else Vh()}},_delayedDragTouchMoveHandler:function(Ph){var Fh=Ph.touches?Ph.touches[0]:Ph;Math.max(Math.abs(Fh.clientX-this._lastX),Math.abs(Fh.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var Ph=this.el.ownerDocument;off(Ph,`mouseup`,this._disableDelayedDrag),off(Ph,`touchend`,this._disableDelayedDrag),off(Ph,`touchcancel`,this._disableDelayedDrag),off(Ph,`mousemove`,this._delayedDragTouchMoveHandler),off(Ph,`touchmove`,this._delayedDragTouchMoveHandler),off(Ph,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(Ph,Fh){Fh||=Ph.pointerType==`touch`&&Ph,!this.nativeDraggable||Fh?this.options.supportPointer?on(document,`pointermove`,this._onTouchMove):Fh?on(document,`touchmove`,this._onTouchMove):on(document,`mousemove`,this._onTouchMove):(on(dragEl,`dragend`,this),on(rootEl,`dragstart`,this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(Ph,Fh){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent(`dragStarted`,this,{evt:Fh}),this.nativeDraggable&&on(document,`dragover`,_checkOutsideTargetEl);var Ih=this.options;!Ph&&toggleClass(dragEl,Ih.dragClass,!1),toggleClass(dragEl,Ih.ghostClass,!0),Sortable.active=this,Ph&&this._appendGhost(),_dispatchEvent({sortable:this,name:`start`,originalEvent:Fh})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var Ph=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),Fh=Ph;Ph&&Ph.shadowRoot&&(Ph=Ph.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),Ph!==Fh);)Fh=Ph;if(dragEl.parentNode[expando]._isOutsideThisEl(Ph),Fh)do{if(Fh[expando]){var Ih=void 0;if(Ih=Fh[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:Ph,rootEl:Fh}),Ih&&!this.options.dragoverBubble)break}Ph=Fh}while(Fh=Fh.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(Ph){if(tapEvt){var Fh=this.options,Ih=Fh.fallbackTolerance,Lh=Fh.fallbackOffset,Rh=Ph.touches?Ph.touches[0]:Ph,zh=ghostEl&&matrix(ghostEl,!0),Bh=ghostEl&&zh&&zh.a,Vh=ghostEl&&zh&&zh.d,Hh=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),Uh=(Rh.clientX-tapEvt.clientX+Lh.x)/(Bh||1)+(Hh?Hh[0]-ghostRelativeParentInitialScroll[0]:0)/(Bh||1),Wh=(Rh.clientY-tapEvt.clientY+Lh.y)/(Vh||1)+(Hh?Hh[1]-ghostRelativeParentInitialScroll[1]:0)/(Vh||1);if(!Sortable.active&&!awaitingDragStarted){if(Ih&&Math.max(Math.abs(Rh.clientX-this._lastX),Math.abs(Rh.clientY-this._lastY))<Ih)return;this._onDragStart(Ph,!0)}if(ghostEl){zh?(zh.e+=Uh-(lastDx||0),zh.f+=Wh-(lastDy||0)):zh={a:1,b:0,c:0,d:1,e:Uh,f:Wh};var Gh=`matrix(${zh.a},${zh.b},${zh.c},${zh.d},${zh.e},${zh.f})`;css(ghostEl,`webkitTransform`,Gh),css(ghostEl,`mozTransform`,Gh),css(ghostEl,`msTransform`,Gh),css(ghostEl,`transform`,Gh),lastDx=Uh,lastDy=Wh,touchEvt=Rh}Ph.cancelable&&Ph.preventDefault()}},_appendGhost:function(){if(!ghostEl){var Ph=this.options.fallbackOnBody?document.body:rootEl,Fh=getRect(dragEl,!0,PositionGhostAbsolutely,!0,Ph),Ih=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=Ph;css(ghostRelativeParent,`position`)===`static`&&css(ghostRelativeParent,`transform`)===`none`&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),Fh.top+=ghostRelativeParent.scrollTop,Fh.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,Ih.ghostClass,!1),toggleClass(ghostEl,Ih.fallbackClass,!0),toggleClass(ghostEl,Ih.dragClass,!0),css(ghostEl,`transition`,``),css(ghostEl,`transform`,``),css(ghostEl,`box-sizing`,`border-box`),css(ghostEl,`margin`,0),css(ghostEl,`top`,Fh.top),css(ghostEl,`left`,Fh.left),css(ghostEl,`width`,Fh.width),css(ghostEl,`height`,Fh.height),css(ghostEl,`opacity`,`0.8`),css(ghostEl,`position`,PositionGhostAbsolutely?`absolute`:`fixed`),css(ghostEl,`zIndex`,`100000`),css(ghostEl,`pointerEvents`,`none`),Sortable.ghost=ghostEl,Ph.appendChild(ghostEl),css(ghostEl,`transform-origin`,tapDistanceLeft/parseInt(ghostEl.style.width)*100+`% `+tapDistanceTop/parseInt(ghostEl.style.height)*100+`%`)}},_onDragStart:function(Ph,Fh){var Ih=this,Lh=Ph.dataTransfer,Rh=Ih.options;if(pluginEvent(`dragStart`,this,{evt:Ph}),Sortable.eventCanceled){this._onDrop();return}pluginEvent(`setupClone`,this),Sortable.eventCanceled||(cloneEl=clone(dragEl),cloneEl.draggable=!1,cloneEl.style[`will-change`]=``,this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),Ih.cloneId=_nextTick(function(){pluginEvent(`clone`,Ih),!Sortable.eventCanceled&&(Ih.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),Ih._hideClone(),_dispatchEvent({sortable:Ih,name:`clone`}))}),!Fh&&toggleClass(dragEl,Rh.dragClass,!0),Fh?(ignoreNextClick=!0,Ih._loopId=setInterval(Ih._emulateDragOver,50)):(off(document,`mouseup`,Ih._onDrop),off(document,`touchend`,Ih._onDrop),off(document,`touchcancel`,Ih._onDrop),Lh&&(Lh.effectAllowed=`move`,Rh.setData&&Rh.setData.call(Ih,Lh,dragEl)),on(document,`drop`,Ih),css(dragEl,`transform`,`translateZ(0)`)),awaitingDragStarted=!0,Ih._dragStartId=_nextTick(Ih._dragStarted.bind(Ih,Fh,Ph)),on(document,`selectstart`,Ih),moved=!0,Safari&&css(document.body,`user-select`,`none`)},_onDragOver:function(Ph){var Fh=this.el,Ih=Ph.target,Lh,Rh,zh,Bh=this.options,Vh=Bh.group,Hh=Sortable.active,Uh=activeGroup===Vh,Wh=Bh.sort,Gh=putSortable||Hh,Kh,qh=this,Jh=!1;if(_silent)return;function Yh(Bh,Vh){pluginEvent(Bh,qh,_objectSpread2({evt:Ph,isOwner:Uh,axis:Kh?`vertical`:`horizontal`,revert:zh,dragRect:Lh,targetRect:Rh,canSort:Wh,fromSortable:Gh,target:Ih,completed:Zh,onMove:function(Ih,Rh){return _onMove(rootEl,Fh,dragEl,Lh,Ih,getRect(Ih),Ph,Rh)},changed:Qh},Vh))}function Xh(){Yh(`dragOverAnimationCapture`),qh.captureAnimationState(),qh!==Gh&&Gh.captureAnimationState()}function Zh(Lh){return Yh(`dragOverCompleted`,{insertion:Lh}),Lh&&(Uh?Hh._hideClone():Hh._showClone(qh),qh!==Gh&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:Hh.options.ghostClass,!1),toggleClass(dragEl,Bh.ghostClass,!0)),putSortable!==qh&&qh!==Sortable.active?putSortable=qh:qh===Sortable.active&&putSortable&&(putSortable=null),Gh===qh&&(qh._ignoreWhileAnimating=Ih),qh.animateAll(function(){Yh(`dragOverAnimationComplete`),qh._ignoreWhileAnimating=null}),qh!==Gh&&(Gh.animateAll(),Gh._ignoreWhileAnimating=null)),(Ih===dragEl&&!dragEl.animated||Ih===Fh&&!Ih.animated)&&(lastTarget=null),!Bh.dragoverBubble&&!Ph.rootEl&&Ih!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(Ph.target),!Lh&&nearestEmptyInsertDetectEvent(Ph)),!Bh.dragoverBubble&&Ph.stopPropagation&&Ph.stopPropagation(),Jh=!0}function Qh(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,Bh.draggable),_dispatchEvent({sortable:qh,name:`change`,toEl:Fh,newIndex,newDraggableIndex,originalEvent:Ph})}if(Ph.preventDefault!==void 0&&Ph.cancelable&&Ph.preventDefault(),Ih=closest(Ih,Bh.draggable,Fh,!0),Yh(`dragOver`),Sortable.eventCanceled)return Jh;if(dragEl.contains(Ph.target)||Ih.animated&&Ih.animatingX&&Ih.animatingY||qh._ignoreWhileAnimating===Ih)return Zh(!1);if(ignoreNextClick=!1,Hh&&!Bh.disabled&&(Uh?Wh||(zh=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,Hh,dragEl,Ph))&&Vh.checkPut(this,Hh,dragEl,Ph))){if(Kh=this._getDirection(Ph,Ih)===`vertical`,Lh=getRect(dragEl),Yh(`dragOverValid`),Sortable.eventCanceled)return Jh;if(zh)return parentEl=rootEl,Xh(),this._hideClone(),Yh(`revert`),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),Zh(!0);var $h=lastChild(Fh,Bh.draggable);if(!$h||_ghostIsLast(Ph,Kh,this)&&!$h.animated){if($h===dragEl)return Zh(!1);if($h&&Fh===Ph.target&&(Ih=$h),Ih&&(Rh=getRect(Ih)),_onMove(rootEl,Fh,dragEl,Lh,Ih,Rh,Ph,!!Ih)!==!1)return Xh(),Fh.appendChild(dragEl),parentEl=Fh,Qh(),Zh(!0)}else if($h&&_ghostIsFirst(Ph,Kh,this)){var eg=getChild(Fh,0,Bh,!0);if(eg===dragEl)return Zh(!1);if(Ih=eg,Rh=getRect(Ih),_onMove(rootEl,Fh,dragEl,Lh,Ih,Rh,Ph,!1)!==!1)return Xh(),Fh.insertBefore(dragEl,eg),parentEl=Fh,Qh(),Zh(!0)}else if(Ih.parentNode===Fh){Rh=getRect(Ih);var tg=0,ng,rg=dragEl.parentNode!==Fh,ig=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||Lh,Ih.animated&&Ih.toRect||Rh,Kh),ag=Kh?`top`:`left`,og=isScrolledPast(Ih,`top`,`top`)||isScrolledPast(dragEl,`top`,`top`),sg=og?og.scrollTop:void 0;lastTarget!==Ih&&(ng=Rh[ag],pastFirstInvertThresh=!1,isCircumstantialInvert=!ig&&Bh.invertSwap||rg),tg=_getSwapDirection(Ph,Ih,Rh,Kh,ig?1:Bh.swapThreshold,Bh.invertedSwapThreshold==null?Bh.swapThreshold:Bh.invertedSwapThreshold,isCircumstantialInvert,lastTarget===Ih);var cg;if(tg!==0){var lg=index(dragEl);do lg-=tg,cg=parentEl.children[lg];while(cg&&(css(cg,`display`)===`none`||cg===ghostEl))}if(tg===0||cg===Ih)return Zh(!1);lastTarget=Ih,lastDirection=tg;var ug=Ih.nextElementSibling,dg=!1;dg=tg===1;var fg=_onMove(rootEl,Fh,dragEl,Lh,Ih,Rh,Ph,dg);if(fg!==!1)return(fg===1||fg===-1)&&(dg=fg===1),_silent=!0,setTimeout(_unsilent,30),Xh(),dg&&!ug?Fh.appendChild(dragEl):Ih.parentNode.insertBefore(dragEl,dg?ug:Ih),og&&scrollBy(og,0,sg-og.scrollTop),parentEl=dragEl.parentNode,ng!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs(ng-getRect(Ih)[ag])),Qh(),Zh(!0)}if(Fh.contains(dragEl))return Zh(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,`mousemove`,this._onTouchMove),off(document,`touchmove`,this._onTouchMove),off(document,`pointermove`,this._onTouchMove),off(document,`dragover`,nearestEmptyInsertDetectEvent),off(document,`mousemove`,nearestEmptyInsertDetectEvent),off(document,`touchmove`,nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var Ph=this.el.ownerDocument;off(Ph,`mouseup`,this._onDrop),off(Ph,`touchend`,this._onDrop),off(Ph,`pointerup`,this._onDrop),off(Ph,`touchcancel`,this._onDrop),off(document,`selectstart`,this)},_onDrop:function(Ph){var Fh=this.el,Ih=this.options;if(newIndex=index(dragEl),newDraggableIndex=index(dragEl,Ih.draggable),pluginEvent(`drop`,this,{evt:Ph}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,Ih.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,`drop`,this),off(Fh,`dragstart`,this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,`user-select`,``),css(dragEl,`transform`,``),Ph&&(moved&&(Ph.cancelable&&Ph.preventDefault(),!Ih.dropBubble&&Ph.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!==`clone`)&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,`dragend`,this),_disableDraggable(dragEl),dragEl.style[`will-change`]=``,moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:`unchoose`,toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:Ph}),rootEl===parentEl?newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:`update`,toEl:parentEl,originalEvent:Ph}),_dispatchEvent({sortable:this,name:`sort`,toEl:parentEl,originalEvent:Ph})):(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:`add`,toEl:parentEl,fromEl:rootEl,originalEvent:Ph}),_dispatchEvent({sortable:this,name:`remove`,toEl:parentEl,originalEvent:Ph}),_dispatchEvent({rootEl:parentEl,name:`sort`,toEl:parentEl,fromEl:rootEl,originalEvent:Ph}),_dispatchEvent({sortable:this,name:`sort`,toEl:parentEl,originalEvent:Ph})),putSortable&&putSortable.save()),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:`end`,toEl:parentEl,originalEvent:Ph}),this.save()))),this._nulling()},_nulling:function(){pluginEvent(`nulling`,this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(Ph){Ph.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(Ph){switch(Ph.type){case`drop`:case`dragend`:this._onDrop(Ph);break;case`dragenter`:case`dragover`:dragEl&&(this._onDragOver(Ph),_globalDragOver(Ph));break;case`selectstart`:Ph.preventDefault();break}},toArray:function(){for(var Ph=[],Fh,Ih=this.el.children,Lh=0,Rh=Ih.length,zh=this.options;Lh<Rh;Lh++)Fh=Ih[Lh],closest(Fh,zh.draggable,this.el,!1)&&Ph.push(Fh.getAttribute(zh.dataIdAttr)||_generateId(Fh));return Ph},sort:function(Ph,Fh){var Ih={},Lh=this.el;this.toArray().forEach(function(Ph,Fh){var Rh=Lh.children[Fh];closest(Rh,this.options.draggable,Lh,!1)&&(Ih[Ph]=Rh)},this),Fh&&this.captureAnimationState(),Ph.forEach(function(Ph){Ih[Ph]&&(Lh.removeChild(Ih[Ph]),Lh.appendChild(Ih[Ph]))}),Fh&&this.animateAll()},save:function(){var Ph=this.options.store;Ph&&Ph.set&&Ph.set(this)},closest:function(Ph,Fh){return closest(Ph,Fh||this.options.draggable,this.el,!1)},option:function(Ph,Fh){var Ih=this.options;if(Fh===void 0)return Ih[Ph];var Lh=PluginManager.modifyOption(this,Ph,Fh);Lh===void 0?Ih[Ph]=Fh:Ih[Ph]=Lh,Ph===`group`&&_prepareGroup(Ih)},destroy:function(){pluginEvent(`destroy`,this);var Ph=this.el;Ph[expando]=null,off(Ph,`mousedown`,this._onTapStart),off(Ph,`touchstart`,this._onTapStart),off(Ph,`pointerdown`,this._onTapStart),this.nativeDraggable&&(off(Ph,`dragover`,this),off(Ph,`dragenter`,this)),Array.prototype.forEach.call(Ph.querySelectorAll(`[draggable]`),function(Ph){Ph.removeAttribute(`draggable`)}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=Ph=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent(`hideClone`,this),Sortable.eventCanceled)return;css(cloneEl,`display`,`none`),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(Ph){if(Ph.lastPutMode!==`clone`){this._hideClone();return}if(cloneHidden){if(pluginEvent(`showClone`,this),Sortable.eventCanceled)return;dragEl.parentNode==rootEl&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,`display`,``),cloneHidden=!1}}},documentExists&&on(document,`touchmove`,function(Ph){(Sortable.active||awaitingDragStarted)&&Ph.cancelable&&Ph.preventDefault()}),Sortable.utils={on,off,css,find,is:function(Ph,Fh){return!!closest(Ph,Fh,Ph,!1)},extend,throttle,closest,toggleClass,clone,index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild},Sortable.get=function(Ph){return Ph[expando]},Sortable.mount=function(){var Ph=[...arguments];Ph[0].constructor===Array&&(Ph=Ph[0]),Ph.forEach(function(Ph){if(!Ph.prototype||!Ph.prototype.constructor)throw`Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(Ph)}`;Ph.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),Ph.utils)),PluginManager.mount(Ph)})},Sortable.create=function(Ph,Fh){return new Sortable(Ph,Fh)},Sortable.version=version,autoScrolls=[],scrolling=!1,autoScroll=throttle(function(Ph,Fh,Ih,Lh){if(Fh.scroll){var Rh=(Ph.touches?Ph.touches[0]:Ph).clientX,zh=(Ph.touches?Ph.touches[0]:Ph).clientY,Bh=Fh.scrollSensitivity,Vh=Fh.scrollSpeed,Hh=getWindowScrollingElement(),Uh=!1,Wh;scrollRootEl!==Ih&&(scrollRootEl=Ih,clearAutoScrolls(),scrollEl=Fh.scroll,Wh=Fh.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(Ih,!0)));var Gh=0,Kh=scrollEl;do{var qh=Kh,Jh=getRect(qh),Yh=Jh.top,Xh=Jh.bottom,Zh=Jh.left,Qh=Jh.right,$h=Jh.width,eg=Jh.height,tg=void 0,ng=void 0,rg=qh.scrollWidth,ig=qh.scrollHeight,ag=css(qh),og=qh.scrollLeft,sg=qh.scrollTop;qh===Hh?(tg=$h<rg&&(ag.overflowX===`auto`||ag.overflowX===`scroll`||ag.overflowX===`visible`),ng=eg<ig&&(ag.overflowY===`auto`||ag.overflowY===`scroll`||ag.overflowY===`visible`)):(tg=$h<rg&&(ag.overflowX===`auto`||ag.overflowX===`scroll`),ng=eg<ig&&(ag.overflowY===`auto`||ag.overflowY===`scroll`));var cg=tg&&(Math.abs(Qh-Rh)<=Bh&&og+$h<rg)-(Math.abs(Zh-Rh)<=Bh&&!!og),lg=ng&&(Math.abs(Xh-zh)<=Bh&&sg+eg<ig)-(Math.abs(Yh-zh)<=Bh&&!!sg);if(!autoScrolls[Gh])for(var ug=0;ug<=Gh;ug++)autoScrolls[ug]||(autoScrolls[ug]={});(autoScrolls[Gh].vx!=cg||autoScrolls[Gh].vy!=lg||autoScrolls[Gh].el!==qh)&&(autoScrolls[Gh].el=qh,autoScrolls[Gh].vx=cg,autoScrolls[Gh].vy=lg,clearInterval(autoScrolls[Gh].pid),(cg!=0||lg!=0)&&(Uh=!0,autoScrolls[Gh].pid=setInterval(function(){Lh&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var Fh=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*Vh:0,Ih=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*Vh:0;typeof Wh==`function`&&Wh.call(Sortable.dragged.parentNode[expando],Ih,Fh,Ph,touchEvt$1,autoScrolls[this.layer].el)!==`continue`||scrollBy(autoScrolls[this.layer].el,Ih,Fh)}.bind({layer:Gh}),24))),Gh++}while(Fh.bubbleScroll&&Kh!==Hh&&(Kh=getParentAutoScrollElement(Kh,!1)));scrolling=Uh}},30),drop=function(Ph){var Fh=Ph.originalEvent,Ih=Ph.putSortable,Lh=Ph.dragEl,Rh=Ph.activeSortable,zh=Ph.dispatchSortableEvent,Bh=Ph.hideGhostForTarget,Vh=Ph.unhideGhostForTarget;if(Fh){var Hh=Ih||Rh;Bh();var Uh=Fh.changedTouches&&Fh.changedTouches.length?Fh.changedTouches[0]:Fh,Wh=document.elementFromPoint(Uh.clientX,Uh.clientY);Vh(),Hh&&!Hh.el.contains(Wh)&&(zh(`spill`),this.onSpill({dragEl:Lh,putSortable:Ih}))}},Revert.prototype={startIndex:null,dragStart:function(Ph){var Fh=Ph.oldDraggableIndex;this.startIndex=Fh},onSpill:function(Ph){var Fh=Ph.dragEl,Ih=Ph.putSortable;this.sortable.captureAnimationState(),Ih&&Ih.captureAnimationState();var Lh=getChild(this.sortable.el,this.startIndex,this.options);Lh?this.sortable.el.insertBefore(Fh,Lh):this.sortable.el.appendChild(Fh),this.sortable.animateAll(),Ih&&Ih.animateAll()},drop},_extends(Revert,{pluginName:`revertOnSpill`}),Remove.prototype={onSpill:function(Ph){var Fh=Ph.dragEl,Ih=Ph.putSortable||this.sortable;Ih.captureAnimationState(),Fh.parentNode&&Fh.parentNode.removeChild(Fh),Ih.animateAll()},drop},_extends(Remove,{pluginName:`removeOnSpill`}),multiDragElements=[],multiDragClones=[],initialFolding=!1,folding=!1,dragStarted=!1,Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert)})),require_vuedraggable_umd=__commonJSMin(((Ph,Fh)=>{(function(Ih,Lh){typeof Ph==`object`&&typeof Fh==`object`?Fh.exports=Lh(require_vue(),(init_sortable_esm(),__toCommonJS(sortable_esm_exports))):typeof define==`function`&&define.amd?define([,`sortablejs`],Lh):typeof Ph==`object`?Ph.vuedraggable=Lh(require_vue(),(init_sortable_esm(),__toCommonJS(sortable_esm_exports))):Ih.vuedraggable=Lh(Ih.Vue,Ih.Sortable)})(typeof self<`u`?self:Ph,function(Ph,Fh){return(function(Ph){var Fh={};function Ih(Lh){if(Fh[Lh])return Fh[Lh].exports;var Rh=Fh[Lh]={i:Lh,l:!1,exports:{}};return Ph[Lh].call(Rh.exports,Rh,Rh.exports,Ih),Rh.l=!0,Rh.exports}return Ih.m=Ph,Ih.c=Fh,Ih.d=function(Ph,Fh,Lh){Ih.o(Ph,Fh)||Object.defineProperty(Ph,Fh,{enumerable:!0,get:Lh})},Ih.r=function(Ph){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(Ph,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(Ph,`__esModule`,{value:!0})},Ih.t=function(Ph,Fh){if(Fh&1&&(Ph=Ih(Ph)),Fh&8||Fh&4&&typeof Ph==`object`&&Ph&&Ph.__esModule)return Ph;var Lh=Object.create(null);if(Ih.r(Lh),Object.defineProperty(Lh,`default`,{enumerable:!0,value:Ph}),Fh&2&&typeof Ph!=`string`)for(var Rh in Ph)Ih.d(Lh,Rh,function(Fh){return Ph[Fh]}.bind(null,Rh));return Lh},Ih.n=function(Ph){var Fh=Ph&&Ph.__esModule?function(){return Ph.default}:function(){return Ph};return Ih.d(Fh,`a`,Fh),Fh},Ih.o=function(Ph,Fh){return Object.prototype.hasOwnProperty.call(Ph,Fh)},Ih.p=``,Ih(Ih.s=`fb15`)})({"00ee":(function(Ph,Fh,Ih){var Lh=Ih(`b622`)(`toStringTag`),Rh={};Rh[Lh]=`z`,Ph.exports=String(Rh)===`[object z]`}),"0366":(function(Ph,Fh,Ih){var Lh=Ih(`1c0b`);Ph.exports=function(Ph,Fh,Ih){if(Lh(Ph),Fh===void 0)return Ph;switch(Ih){case 0:return function(){return Ph.call(Fh)};case 1:return function(Ih){return Ph.call(Fh,Ih)};case 2:return function(Ih,Lh){return Ph.call(Fh,Ih,Lh)};case 3:return function(Ih,Lh,Rh){return Ph.call(Fh,Ih,Lh,Rh)}}return function(){return Ph.apply(Fh,arguments)}}}),"057f":(function(Ph,Fh,Ih){var Lh=Ih(`fc6a`),Rh=Ih(`241c`).f,zh={}.toString,Bh=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Vh=function(Ph){try{return Rh(Ph)}catch{return Bh.slice()}};Ph.exports.f=function(Ph){return Bh&&zh.call(Ph)==`[object Window]`?Vh(Ph):Rh(Lh(Ph))}}),"06cf":(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`d1e7`),zh=Ih(`5c6c`),Bh=Ih(`fc6a`),Vh=Ih(`c04e`),Hh=Ih(`5135`),Uh=Ih(`0cfb`),Wh=Object.getOwnPropertyDescriptor;Fh.f=Lh?Wh:function(Ph,Fh){if(Ph=Bh(Ph),Fh=Vh(Fh,!0),Uh)try{return Wh(Ph,Fh)}catch{}if(Hh(Ph,Fh))return zh(!Rh.f.call(Ph,Fh),Ph[Fh])}}),"0cfb":(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`d039`),zh=Ih(`cc12`);Ph.exports=!Lh&&!Rh(function(){return Object.defineProperty(zh(`div`),`a`,{get:function(){return 7}}).a!=7})}),"13d5":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`d58f`).left,zh=Ih(`a640`),Bh=Ih(`ae40`),Vh=zh(`reduce`),Hh=Bh(`reduce`,{1:0});Lh({target:`Array`,proto:!0,forced:!Vh||!Hh},{reduce:function(Ph){return Rh(this,Ph,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),"14c3":(function(Ph,Fh,Ih){var Lh=Ih(`c6b6`),Rh=Ih(`9263`);Ph.exports=function(Ph,Fh){var Ih=Ph.exec;if(typeof Ih==`function`){var zh=Ih.call(Ph,Fh);if(typeof zh!=`object`)throw TypeError(`RegExp exec method returned something other than an Object or null`);return zh}if(Lh(Ph)!==`RegExp`)throw TypeError(`RegExp#exec called on incompatible receiver`);return Rh.call(Ph,Fh)}}),"159b":(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`fdbc`),zh=Ih(`17c2`),Bh=Ih(`9112`);for(var Vh in Rh){var Hh=Lh[Vh],Uh=Hh&&Hh.prototype;if(Uh&&Uh.forEach!==zh)try{Bh(Uh,`forEach`,zh)}catch{Uh.forEach=zh}}}),"17c2":(function(Ph,Fh,Ih){var Lh=Ih(`b727`).forEach,Rh=Ih(`a640`),zh=Ih(`ae40`),Bh=Rh(`forEach`),Vh=zh(`forEach`);Ph.exports=!Bh||!Vh?function(Ph){return Lh(this,Ph,arguments.length>1?arguments[1]:void 0)}:[].forEach}),"1be4":(function(Ph,Fh,Ih){Ph.exports=Ih(`d066`)(`document`,`documentElement`)}),"1c0b":(function(Ph,Fh){Ph.exports=function(Ph){if(typeof Ph!=`function`)throw TypeError(String(Ph)+` is not a function`);return Ph}}),"1c7e":(function(Ph,Fh,Ih){var Lh=Ih(`b622`)(`iterator`),Rh=!1;try{var zh=0,Bh={next:function(){return{done:!!zh++}},return:function(){Rh=!0}};Bh[Lh]=function(){return this},Array.from(Bh,function(){throw 2})}catch{}Ph.exports=function(Ph,Fh){if(!Fh&&!Rh)return!1;var Ih=!1;try{var zh={};zh[Lh]=function(){return{next:function(){return{done:Ih=!0}}}},Ph(zh)}catch{}return Ih}}),"1d80":(function(Ph,Fh){Ph.exports=function(Ph){if(Ph==null)throw TypeError(`Can't call method on `+Ph);return Ph}}),"1dde":(function(Ph,Fh,Ih){var Lh=Ih(`d039`),Rh=Ih(`b622`),zh=Ih(`2d00`),Bh=Rh(`species`);Ph.exports=function(Ph){return zh>=51||!Lh(function(){var Fh=[],Ih=Fh.constructor={};return Ih[Bh]=function(){return{foo:1}},Fh[Ph](Boolean).foo!==1})}}),"23cb":(function(Ph,Fh,Ih){var Lh=Ih(`a691`),Rh=Math.max,zh=Math.min;Ph.exports=function(Ph,Fh){var Ih=Lh(Ph);return Ih<0?Rh(Ih+Fh,0):zh(Ih,Fh)}}),"23e7":(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`06cf`).f,zh=Ih(`9112`),Bh=Ih(`6eeb`),Vh=Ih(`ce4e`),Hh=Ih(`e893`),Uh=Ih(`94ca`);Ph.exports=function(Ph,Fh){var Ih=Ph.target,Wh=Ph.global,Gh=Ph.stat,Kh,qh=Wh?Lh:Gh?Lh[Ih]||Vh(Ih,{}):(Lh[Ih]||{}).prototype,Jh,Yh,Xh,Zh;if(qh)for(Jh in Fh){if(Xh=Fh[Jh],Ph.noTargetGet?(Zh=Rh(qh,Jh),Yh=Zh&&Zh.value):Yh=qh[Jh],Kh=Uh(Wh?Jh:Ih+(Gh?`.`:`#`)+Jh,Ph.forced),!Kh&&Yh!==void 0){if(typeof Xh==typeof Yh)continue;Hh(Xh,Yh)}(Ph.sham||Yh&&Yh.sham)&&zh(Xh,`sham`,!0),Bh(qh,Jh,Xh,Ph)}}}),"241c":(function(Ph,Fh,Ih){var Lh=Ih(`ca84`),Rh=Ih(`7839`).concat(`length`,`prototype`);Fh.f=Object.getOwnPropertyNames||function(Ph){return Lh(Ph,Rh)}}),"25f0":(function(Ph,Fh,Ih){var Lh=Ih(`6eeb`),Rh=Ih(`825a`),zh=Ih(`d039`),Bh=Ih(`ad6d`),Vh=`toString`,Hh=RegExp.prototype,Uh=Hh[Vh],Wh=zh(function(){return Uh.call({source:`a`,flags:`b`})!=`/a/b`}),Gh=Uh.name!=Vh;(Wh||Gh)&&Lh(RegExp.prototype,Vh,function(){var Ph=Rh(this),Fh=String(Ph.source),Ih=Ph.flags,Lh=String(Ih===void 0&&Ph instanceof RegExp&&!(`flags`in Hh)?Bh.call(Ph):Ih);return`/`+Fh+`/`+Lh},{unsafe:!0})}),"2ca0":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`06cf`).f,zh=Ih(`50c4`),Bh=Ih(`5a34`),Vh=Ih(`1d80`),Hh=Ih(`ab13`),Uh=Ih(`c430`),Wh=``.startsWith,Gh=Math.min,Kh=Hh(`startsWith`);Lh({target:`String`,proto:!0,forced:!(!Uh&&!Kh&&function(){var Ph=Rh(String.prototype,`startsWith`);return Ph&&!Ph.writable}())&&!Kh},{startsWith:function(Ph){var Fh=String(Vh(this));Bh(Ph);var Ih=zh(Gh(arguments.length>1?arguments[1]:void 0,Fh.length)),Lh=String(Ph);return Wh?Wh.call(Fh,Lh,Ih):Fh.slice(Ih,Ih+Lh.length)===Lh}})}),"2d00":(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`342f`),zh=Lh.process,Bh=zh&&zh.versions,Vh=Bh&&Bh.v8,Hh,Uh;Vh?(Hh=Vh.split(`.`),Uh=Hh[0]+Hh[1]):Rh&&(Hh=Rh.match(/Edge\/(\d+)/),(!Hh||Hh[1]>=74)&&(Hh=Rh.match(/Chrome\/(\d+)/),Hh&&(Uh=Hh[1]))),Ph.exports=Uh&&+Uh}),"342f":(function(Ph,Fh,Ih){Ph.exports=Ih(`d066`)(`navigator`,`userAgent`)||``}),"35a1":(function(Ph,Fh,Ih){var Lh=Ih(`f5df`),Rh=Ih(`3f8c`),zh=Ih(`b622`)(`iterator`);Ph.exports=function(Ph){if(Ph!=null)return Ph[zh]||Ph[`@@iterator`]||Rh[Lh(Ph)]}}),"37e8":(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`9bf2`),zh=Ih(`825a`),Bh=Ih(`df75`);Ph.exports=Lh?Object.defineProperties:function(Ph,Fh){zh(Ph);for(var Ih=Bh(Fh),Lh=Ih.length,Vh=0,Hh;Lh>Vh;)Rh.f(Ph,Hh=Ih[Vh++],Fh[Hh]);return Ph}}),"3bbe":(function(Ph,Fh,Ih){var Lh=Ih(`861d`);Ph.exports=function(Ph){if(!Lh(Ph)&&Ph!==null)throw TypeError(`Can't set `+String(Ph)+` as a prototype`);return Ph}}),"3ca3":(function(Ph,Fh,Ih){var Lh=Ih(`6547`).charAt,Rh=Ih(`69f3`),zh=Ih(`7dd0`),Bh=`String Iterator`,Vh=Rh.set,Hh=Rh.getterFor(Bh);zh(String,`String`,function(Ph){Vh(this,{type:Bh,string:String(Ph),index:0})},function(){var Ph=Hh(this),Fh=Ph.string,Ih=Ph.index,Rh;return Ih>=Fh.length?{value:void 0,done:!0}:(Rh=Lh(Fh,Ih),Ph.index+=Rh.length,{value:Rh,done:!1})})}),"3f8c":(function(Ph,Fh){Ph.exports={}}),4160:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`17c2`);Lh({target:`Array`,proto:!0,forced:[].forEach!=Rh},{forEach:Rh})}),"428f":(function(Ph,Fh,Ih){Ph.exports=Ih(`da84`)}),"44ad":(function(Ph,Fh,Ih){var Lh=Ih(`d039`),Rh=Ih(`c6b6`),zh=``.split;Ph.exports=Lh(function(){return!Object(`z`).propertyIsEnumerable(0)})?function(Ph){return Rh(Ph)==`String`?zh.call(Ph,``):Object(Ph)}:Object}),"44d2":(function(Ph,Fh,Ih){var Lh=Ih(`b622`),Rh=Ih(`7c73`),zh=Ih(`9bf2`),Bh=Lh(`unscopables`),Vh=Array.prototype;Vh[Bh]??zh.f(Vh,Bh,{configurable:!0,value:Rh(null)}),Ph.exports=function(Ph){Vh[Bh][Ph]=!0}}),"44e7":(function(Ph,Fh,Ih){var Lh=Ih(`861d`),Rh=Ih(`c6b6`),zh=Ih(`b622`)(`match`);Ph.exports=function(Ph){var Fh;return Lh(Ph)&&((Fh=Ph[zh])===void 0?Rh(Ph)==`RegExp`:!!Fh)}}),4930:(function(Ph,Fh,Ih){var Lh=Ih(`d039`);Ph.exports=!!Object.getOwnPropertySymbols&&!Lh(function(){return!String(Symbol())})}),"4d64":(function(Ph,Fh,Ih){var Lh=Ih(`fc6a`),Rh=Ih(`50c4`),zh=Ih(`23cb`),Bh=function(Ph){return function(Fh,Ih,Bh){var Vh=Lh(Fh),Hh=Rh(Vh.length),Uh=zh(Bh,Hh),Wh;if(Ph&&Ih!=Ih){for(;Hh>Uh;)if(Wh=Vh[Uh++],Wh!=Wh)return!0}else for(;Hh>Uh;Uh++)if((Ph||Uh in Vh)&&Vh[Uh]===Ih)return Ph||Uh||0;return!Ph&&-1}};Ph.exports={includes:Bh(!0),indexOf:Bh(!1)}}),"4de4":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`b727`).filter,zh=Ih(`1dde`),Bh=Ih(`ae40`),Vh=zh(`filter`),Hh=Bh(`filter`);Lh({target:`Array`,proto:!0,forced:!Vh||!Hh},{filter:function(Ph){return Rh(this,Ph,arguments.length>1?arguments[1]:void 0)}})}),"4df4":(function(Ph,Fh,Ih){var Lh=Ih(`0366`),Rh=Ih(`7b0b`),zh=Ih(`9bdd`),Bh=Ih(`e95a`),Vh=Ih(`50c4`),Hh=Ih(`8418`),Uh=Ih(`35a1`);Ph.exports=function(Ph){var Fh=Rh(Ph),Ih=typeof this==`function`?this:Array,Wh=arguments.length,Gh=Wh>1?arguments[1]:void 0,Kh=Gh!==void 0,qh=Uh(Fh),Jh=0,Yh,Xh,Zh,Qh,$h,eg;if(Kh&&(Gh=Lh(Gh,Wh>2?arguments[2]:void 0,2)),qh!=null&&!(Ih==Array&&Bh(qh)))for(Qh=qh.call(Fh),$h=Qh.next,Xh=new Ih;!(Zh=$h.call(Qh)).done;Jh++)eg=Kh?zh(Qh,Gh,[Zh.value,Jh],!0):Zh.value,Hh(Xh,Jh,eg);else for(Yh=Vh(Fh.length),Xh=new Ih(Yh);Yh>Jh;Jh++)eg=Kh?Gh(Fh[Jh],Jh):Fh[Jh],Hh(Xh,Jh,eg);return Xh.length=Jh,Xh}}),"4fad":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`6f53`).entries;Lh({target:`Object`,stat:!0},{entries:function(Ph){return Rh(Ph)}})}),"50c4":(function(Ph,Fh,Ih){var Lh=Ih(`a691`),Rh=Math.min;Ph.exports=function(Ph){return Ph>0?Rh(Lh(Ph),9007199254740991):0}}),5135:(function(Ph,Fh){var Ih={}.hasOwnProperty;Ph.exports=function(Ph,Fh){return Ih.call(Ph,Fh)}}),5319:(function(Ph,Fh,Ih){var Lh=Ih(`d784`),Rh=Ih(`825a`),zh=Ih(`7b0b`),Bh=Ih(`50c4`),Vh=Ih(`a691`),Hh=Ih(`1d80`),Uh=Ih(`8aa5`),Wh=Ih(`14c3`),Gh=Math.max,Kh=Math.min,qh=Math.floor,Jh=/\$([$&'`]|\d\d?|<[^>]*>)/g,Yh=/\$([$&'`]|\d\d?)/g,Xh=function(Ph){return Ph===void 0?Ph:String(Ph)};Lh(`replace`,2,function(Ph,Fh,Ih,Lh){var Zh=Lh.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,Qh=Lh.REPLACE_KEEPS_$0,$h=Zh?`$`:`$0`;return[function(Ih,Lh){var Rh=Hh(this),zh=Ih?.[Ph];return zh===void 0?Fh.call(String(Rh),Ih,Lh):zh.call(Ih,Rh,Lh)},function(Ph,Lh){if(!Zh&&Qh||typeof Lh==`string`&&Lh.indexOf($h)===-1){var zh=Ih(Fh,Ph,this,Lh);if(zh.done)return zh.value}var Hh=Rh(Ph),qh=String(this),Jh=typeof Lh==`function`;Jh||(Lh=String(Lh));var Yh=Hh.global;if(Yh){var tg=Hh.unicode;Hh.lastIndex=0}for(var ng=[];;){var rg=Wh(Hh,qh);if(rg===null||(ng.push(rg),!Yh))break;String(rg[0])===``&&(Hh.lastIndex=Uh(qh,Bh(Hh.lastIndex),tg))}for(var ig=``,ag=0,og=0;og<ng.length;og++){rg=ng[og];for(var sg=String(rg[0]),cg=Gh(Kh(Vh(rg.index),qh.length),0),lg=[],ug=1;ug<rg.length;ug++)lg.push(Xh(rg[ug]));var dg=rg.groups;if(Jh){var fg=[sg].concat(lg,cg,qh);dg!==void 0&&fg.push(dg);var pg=String(Lh.apply(void 0,fg))}else pg=eg(sg,qh,cg,lg,dg,Lh);cg>=ag&&(ig+=qh.slice(ag,cg)+pg,ag=cg+sg.length)}return ig+qh.slice(ag)}];function eg(Ph,Ih,Lh,Rh,Bh,Vh){var Hh=Lh+Ph.length,Uh=Rh.length,Wh=Yh;return Bh!==void 0&&(Bh=zh(Bh),Wh=Jh),Fh.call(Vh,Wh,function(Fh,zh){var Vh;switch(zh.charAt(0)){case`$`:return`$`;case`&`:return Ph;case"`":return Ih.slice(0,Lh);case`'`:return Ih.slice(Hh);case`<`:Vh=Bh[zh.slice(1,-1)];break;default:var Wh=+zh;if(Wh===0)return Fh;if(Wh>Uh){var Gh=qh(Wh/10);return Gh===0?Fh:Gh<=Uh?Rh[Gh-1]===void 0?zh.charAt(1):Rh[Gh-1]+zh.charAt(1):Fh}Vh=Rh[Wh-1]}return Vh===void 0?``:Vh})}})}),5692:(function(Ph,Fh,Ih){var Lh=Ih(`c430`),Rh=Ih(`c6cd`);(Ph.exports=function(Ph,Fh){return Rh[Ph]||(Rh[Ph]=Fh===void 0?{}:Fh)})(`versions`,[]).push({version:`3.6.5`,mode:Lh?`pure`:`global`,copyright:`© 2020 Denis Pushkarev (zloirock.ru)`})}),"56ef":(function(Ph,Fh,Ih){var Lh=Ih(`d066`),Rh=Ih(`241c`),zh=Ih(`7418`),Bh=Ih(`825a`);Ph.exports=Lh(`Reflect`,`ownKeys`)||function(Ph){var Fh=Rh.f(Bh(Ph)),Ih=zh.f;return Ih?Fh.concat(Ih(Ph)):Fh}}),"5a34":(function(Ph,Fh,Ih){var Lh=Ih(`44e7`);Ph.exports=function(Ph){if(Lh(Ph))throw TypeError(`The method doesn't accept regular expressions`);return Ph}}),"5c6c":(function(Ph,Fh){Ph.exports=function(Ph,Fh){return{enumerable:!(Ph&1),configurable:!(Ph&2),writable:!(Ph&4),value:Fh}}}),"5db7":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`a2bf`),zh=Ih(`7b0b`),Bh=Ih(`50c4`),Vh=Ih(`1c0b`),Hh=Ih(`65f0`);Lh({target:`Array`,proto:!0},{flatMap:function(Ph){var Fh=zh(this),Ih=Bh(Fh.length),Lh;return Vh(Ph),Lh=Hh(Fh,0),Lh.length=Rh(Lh,Fh,Fh,Ih,0,1,Ph,arguments.length>1?arguments[1]:void 0),Lh}})}),6547:(function(Ph,Fh,Ih){var Lh=Ih(`a691`),Rh=Ih(`1d80`),zh=function(Ph){return function(Fh,Ih){var zh=String(Rh(Fh)),Bh=Lh(Ih),Vh=zh.length,Hh,Uh;return Bh<0||Bh>=Vh?Ph?``:void 0:(Hh=zh.charCodeAt(Bh),Hh<55296||Hh>56319||Bh+1===Vh||(Uh=zh.charCodeAt(Bh+1))<56320||Uh>57343?Ph?zh.charAt(Bh):Hh:Ph?zh.slice(Bh,Bh+2):(Hh-55296<<10)+(Uh-56320)+65536)}};Ph.exports={codeAt:zh(!1),charAt:zh(!0)}}),"65f0":(function(Ph,Fh,Ih){var Lh=Ih(`861d`),Rh=Ih(`e8b5`),zh=Ih(`b622`)(`species`);Ph.exports=function(Ph,Fh){var Ih;return Rh(Ph)&&(Ih=Ph.constructor,typeof Ih==`function`&&(Ih===Array||Rh(Ih.prototype))?Ih=void 0:Lh(Ih)&&(Ih=Ih[zh],Ih===null&&(Ih=void 0))),new(Ih===void 0?Array:Ih)(Fh===0?0:Fh)}}),"69f3":(function(Ph,Fh,Ih){var Lh=Ih(`7f9a`),Rh=Ih(`da84`),zh=Ih(`861d`),Bh=Ih(`9112`),Vh=Ih(`5135`),Hh=Ih(`f772`),Uh=Ih(`d012`),Wh=Rh.WeakMap,Gh,Kh,qh,Jh=function(Ph){return qh(Ph)?Kh(Ph):Gh(Ph,{})},Yh=function(Ph){return function(Fh){var Ih;if(!zh(Fh)||(Ih=Kh(Fh)).type!==Ph)throw TypeError(`Incompatible receiver, `+Ph+` required`);return Ih}};if(Lh){var Xh=new Wh,Zh=Xh.get,Qh=Xh.has,$h=Xh.set;Gh=function(Ph,Fh){return $h.call(Xh,Ph,Fh),Fh},Kh=function(Ph){return Zh.call(Xh,Ph)||{}},qh=function(Ph){return Qh.call(Xh,Ph)}}else{var eg=Hh(`state`);Uh[eg]=!0,Gh=function(Ph,Fh){return Bh(Ph,eg,Fh),Fh},Kh=function(Ph){return Vh(Ph,eg)?Ph[eg]:{}},qh=function(Ph){return Vh(Ph,eg)}}Ph.exports={set:Gh,get:Kh,has:qh,enforce:Jh,getterFor:Yh}}),"6eeb":(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`9112`),zh=Ih(`5135`),Bh=Ih(`ce4e`),Vh=Ih(`8925`),Hh=Ih(`69f3`),Uh=Hh.get,Wh=Hh.enforce,Gh=String(String).split(`String`);(Ph.exports=function(Ph,Fh,Ih,Vh){var Hh=Vh?!!Vh.unsafe:!1,Uh=Vh?!!Vh.enumerable:!1,Kh=Vh?!!Vh.noTargetGet:!1;if(typeof Ih==`function`&&(typeof Fh==`string`&&!zh(Ih,`name`)&&Rh(Ih,`name`,Fh),Wh(Ih).source=Gh.join(typeof Fh==`string`?Fh:``)),Ph===Lh){Uh?Ph[Fh]=Ih:Bh(Fh,Ih);return}else Hh?!Kh&&Ph[Fh]&&(Uh=!0):delete Ph[Fh];Uh?Ph[Fh]=Ih:Rh(Ph,Fh,Ih)})(Function.prototype,`toString`,function(){return typeof this==`function`&&Uh(this).source||Vh(this)})}),"6f53":(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`df75`),zh=Ih(`fc6a`),Bh=Ih(`d1e7`).f,Vh=function(Ph){return function(Fh){for(var Ih=zh(Fh),Vh=Rh(Ih),Hh=Vh.length,Uh=0,Wh=[],Gh;Hh>Uh;)Gh=Vh[Uh++],(!Lh||Bh.call(Ih,Gh))&&Wh.push(Ph?[Gh,Ih[Gh]]:Ih[Gh]);return Wh}};Ph.exports={entries:Vh(!0),values:Vh(!1)}}),"73d9":(function(Ph,Fh,Ih){Ih(`44d2`)(`flatMap`)}),7418:(function(Ph,Fh){Fh.f=Object.getOwnPropertySymbols}),"746f":(function(Ph,Fh,Ih){var Lh=Ih(`428f`),Rh=Ih(`5135`),zh=Ih(`e538`),Bh=Ih(`9bf2`).f;Ph.exports=function(Ph){var Fh=Lh.Symbol||={};Rh(Fh,Ph)||Bh(Fh,Ph,{value:zh.f(Ph)})}}),7839:(function(Ph,Fh){Ph.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]}),"7b0b":(function(Ph,Fh,Ih){var Lh=Ih(`1d80`);Ph.exports=function(Ph){return Object(Lh(Ph))}}),"7c73":(function(Ph,Fh,Ih){var Lh=Ih(`825a`),Rh=Ih(`37e8`),zh=Ih(`7839`),Bh=Ih(`d012`),Vh=Ih(`1be4`),Hh=Ih(`cc12`),Uh=Ih(`f772`),Wh=`>`,Gh=`<`,Kh=`prototype`,qh=`script`,Jh=Uh(`IE_PROTO`),Yh=function(){},Xh=function(Ph){return Gh+qh+Wh+Ph+Gh+`/`+qh+Wh},Zh=function(Ph){Ph.write(Xh(``)),Ph.close();var Fh=Ph.parentWindow.Object;return Ph=null,Fh},Qh=function(){var Ph=Hh(`iframe`),Fh=`java`+qh+`:`,Ih;return Ph.style.display=`none`,Vh.appendChild(Ph),Ph.src=String(Fh),Ih=Ph.contentWindow.document,Ih.open(),Ih.write(Xh(`document.F=Object`)),Ih.close(),Ih.F},$h,eg=function(){try{$h=document.domain&&new ActiveXObject(`htmlfile`)}catch{}eg=$h?Zh($h):Qh();for(var Ph=zh.length;Ph--;)delete eg[Kh][zh[Ph]];return eg()};Bh[Jh]=!0,Ph.exports=Object.create||function(Ph,Fh){var Ih;return Ph===null?Ih=eg():(Yh[Kh]=Lh(Ph),Ih=new Yh,Yh[Kh]=null,Ih[Jh]=Ph),Fh===void 0?Ih:Rh(Ih,Fh)}}),"7dd0":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`9ed3`),zh=Ih(`e163`),Bh=Ih(`d2bb`),Vh=Ih(`d44e`),Hh=Ih(`9112`),Uh=Ih(`6eeb`),Wh=Ih(`b622`),Gh=Ih(`c430`),Kh=Ih(`3f8c`),qh=Ih(`ae93`),Jh=qh.IteratorPrototype,Yh=qh.BUGGY_SAFARI_ITERATORS,Xh=Wh(`iterator`),Zh=`keys`,Qh=`values`,$h=`entries`,eg=function(){return this};Ph.exports=function(Ph,Fh,Ih,Wh,qh,tg,ng){Rh(Ih,Fh,Wh);var rg=function(Ph){if(Ph===qh&&cg)return cg;if(!Yh&&Ph in og)return og[Ph];switch(Ph){case Zh:return function(){return new Ih(this,Ph)};case Qh:return function(){return new Ih(this,Ph)};case $h:return function(){return new Ih(this,Ph)}}return function(){return new Ih(this)}},ig=Fh+` Iterator`,ag=!1,og=Ph.prototype,sg=og[Xh]||og[`@@iterator`]||qh&&og[qh],cg=!Yh&&sg||rg(qh),lg=Fh==`Array`&&og.entries||sg,ug,dg,fg;if(lg&&(ug=zh(lg.call(new Ph)),Jh!==Object.prototype&&ug.next&&(!Gh&&zh(ug)!==Jh&&(Bh?Bh(ug,Jh):typeof ug[Xh]!=`function`&&Hh(ug,Xh,eg)),Vh(ug,ig,!0,!0),Gh&&(Kh[ig]=eg))),qh==Qh&&sg&&sg.name!==Qh&&(ag=!0,cg=function(){return sg.call(this)}),(!Gh||ng)&&og[Xh]!==cg&&Hh(og,Xh,cg),Kh[Fh]=cg,qh)if(dg={values:rg(Qh),keys:tg?cg:rg(Zh),entries:rg($h)},ng)for(fg in dg)(Yh||ag||!(fg in og))&&Uh(og,fg,dg[fg]);else Lh({target:Fh,proto:!0,forced:Yh||ag},dg);return dg}}),"7f9a":(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`8925`),zh=Lh.WeakMap;Ph.exports=typeof zh==`function`&&/native code/.test(Rh(zh))}),"825a":(function(Ph,Fh,Ih){var Lh=Ih(`861d`);Ph.exports=function(Ph){if(!Lh(Ph))throw TypeError(String(Ph)+` is not an object`);return Ph}}),"83ab":(function(Ph,Fh,Ih){Ph.exports=!Ih(`d039`)(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),8418:(function(Ph,Fh,Ih){var Lh=Ih(`c04e`),Rh=Ih(`9bf2`),zh=Ih(`5c6c`);Ph.exports=function(Ph,Fh,Ih){var Bh=Lh(Fh);Bh in Ph?Rh.f(Ph,Bh,zh(0,Ih)):Ph[Bh]=Ih}}),"861d":(function(Ph,Fh){Ph.exports=function(Ph){return typeof Ph==`object`?Ph!==null:typeof Ph==`function`}}),8875:(function(Ph,Fh,Ih){var Lh,Rh,zh;(function(Ih,Bh){Rh=[],Lh=Bh,zh=typeof Lh==`function`?Lh.apply(Fh,Rh):Lh,zh!==void 0&&(Ph.exports=zh)})(typeof self<`u`?self:this,function(){function Ph(){var Fh=Object.getOwnPropertyDescriptor(document,`currentScript`);if(!Fh&&`currentScript`in document&&document.currentScript||Fh&&Fh.get!==Ph&&document.currentScript)return document.currentScript;try{throw Error()}catch(Ph){var Ih=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(Ph.stack)||/@([^@]*):(\d+):(\d+)\s*$/gi.exec(Ph.stack),Lh=Ih&&Ih[1]||!1,Rh=Ih&&Ih[2]||!1,zh=document.location.href.replace(document.location.hash,``),Bh,Vh,Hh,Uh=document.getElementsByTagName(`script`);Lh===zh&&(Bh=document.documentElement.outerHTML,Vh=RegExp(`(?:[^\\n]+?\\n){0,`+(Rh-2)+`}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*`,`i`),Hh=Bh.replace(Vh,`$1`).trim());for(var Wh=0;Wh<Uh.length;Wh++)if(Uh[Wh].readyState===`interactive`||Uh[Wh].src===Lh||Lh===zh&&Uh[Wh].innerHTML&&Uh[Wh].innerHTML.trim()===Hh)return Uh[Wh];return null}}return Ph})}),8925:(function(Ph,Fh,Ih){var Lh=Ih(`c6cd`),Rh=Function.toString;typeof Lh.inspectSource!=`function`&&(Lh.inspectSource=function(Ph){return Rh.call(Ph)}),Ph.exports=Lh.inspectSource}),"8aa5":(function(Ph,Fh,Ih){var Lh=Ih(`6547`).charAt;Ph.exports=function(Ph,Fh,Ih){return Fh+(Ih?Lh(Ph,Fh).length:1)}}),"8bbf":(function(Fh,Ih){Fh.exports=Ph}),"90e3":(function(Ph,Fh){var Ih=0,Lh=Math.random();Ph.exports=function(Ph){return`Symbol(`+String(Ph===void 0?``:Ph)+`)_`+(++Ih+Lh).toString(36)}}),9112:(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`9bf2`),zh=Ih(`5c6c`);Ph.exports=Lh?function(Ph,Fh,Ih){return Rh.f(Ph,Fh,zh(1,Ih))}:function(Ph,Fh,Ih){return Ph[Fh]=Ih,Ph}}),9263:(function(Ph,Fh,Ih){var Lh=Ih(`ad6d`),Rh=Ih(`9f7f`),zh=RegExp.prototype.exec,Bh=String.prototype.replace,Vh=zh,Hh=(function(){var Ph=/a/,Fh=/b*/g;return zh.call(Ph,`a`),zh.call(Fh,`a`),Ph.lastIndex!==0||Fh.lastIndex!==0})(),Uh=Rh.UNSUPPORTED_Y||Rh.BROKEN_CARET,Wh=/()??/.exec(``)[1]!==void 0;(Hh||Wh||Uh)&&(Vh=function(Ph){var Fh=this,Ih,Rh,Vh,Gh,Kh=Uh&&Fh.sticky,qh=Lh.call(Fh),Jh=Fh.source,Yh=0,Xh=Ph;return Kh&&(qh=qh.replace(`y`,``),qh.indexOf(`g`)===-1&&(qh+=`g`),Xh=String(Ph).slice(Fh.lastIndex),Fh.lastIndex>0&&(!Fh.multiline||Fh.multiline&&Ph[Fh.lastIndex-1]!==`
4886
4886
  `)&&(Jh=`(?: `+Jh+`)`,Xh=` `+Xh,Yh++),Rh=RegExp(`^(?:`+Jh+`)`,qh)),Wh&&(Rh=RegExp(`^`+Jh+`$(?!\\s)`,qh)),Hh&&(Ih=Fh.lastIndex),Vh=zh.call(Kh?Rh:Fh,Xh),Kh?Vh?(Vh.input=Vh.input.slice(Yh),Vh[0]=Vh[0].slice(Yh),Vh.index=Fh.lastIndex,Fh.lastIndex+=Vh[0].length):Fh.lastIndex=0:Hh&&Vh&&(Fh.lastIndex=Fh.global?Vh.index+Vh[0].length:Ih),Wh&&Vh&&Vh.length>1&&Bh.call(Vh[0],Rh,function(){for(Gh=1;Gh<arguments.length-2;Gh++)arguments[Gh]===void 0&&(Vh[Gh]=void 0)}),Vh}),Ph.exports=Vh}),"94ca":(function(Ph,Fh,Ih){var Lh=Ih(`d039`),Rh=/#|\.prototype\./,zh=function(Ph,Fh){var Ih=Vh[Bh(Ph)];return Ih==Uh?!0:Ih==Hh?!1:typeof Fh==`function`?Lh(Fh):!!Fh},Bh=zh.normalize=function(Ph){return String(Ph).replace(Rh,`.`).toLowerCase()},Vh=zh.data={},Hh=zh.NATIVE=`N`,Uh=zh.POLYFILL=`P`;Ph.exports=zh}),"99af":(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`d039`),zh=Ih(`e8b5`),Bh=Ih(`861d`),Vh=Ih(`7b0b`),Hh=Ih(`50c4`),Uh=Ih(`8418`),Wh=Ih(`65f0`),Gh=Ih(`1dde`),Kh=Ih(`b622`),qh=Ih(`2d00`),Jh=Kh(`isConcatSpreadable`),Yh=9007199254740991,Xh=`Maximum allowed index exceeded`,Zh=qh>=51||!Rh(function(){var Ph=[];return Ph[Jh]=!1,Ph.concat()[0]!==Ph}),Qh=Gh(`concat`),$h=function(Ph){if(!Bh(Ph))return!1;var Fh=Ph[Jh];return Fh===void 0?zh(Ph):!!Fh};Lh({target:`Array`,proto:!0,forced:!Zh||!Qh},{concat:function(Ph){var Fh=Vh(this),Ih=Wh(Fh,0),Lh=0,Rh,zh,Bh,Gh,Kh;for(Rh=-1,Bh=arguments.length;Rh<Bh;Rh++)if(Kh=Rh===-1?Fh:arguments[Rh],$h(Kh)){if(Gh=Hh(Kh.length),Lh+Gh>Yh)throw TypeError(Xh);for(zh=0;zh<Gh;zh++,Lh++)zh in Kh&&Uh(Ih,Lh,Kh[zh])}else{if(Lh>=Yh)throw TypeError(Xh);Uh(Ih,Lh++,Kh)}return Ih.length=Lh,Ih}})}),"9bdd":(function(Ph,Fh,Ih){var Lh=Ih(`825a`);Ph.exports=function(Ph,Fh,Ih,Rh){try{return Rh?Fh(Lh(Ih)[0],Ih[1]):Fh(Ih)}catch(Fh){var zh=Ph.return;throw zh!==void 0&&Lh(zh.call(Ph)),Fh}}}),"9bf2":(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`0cfb`),zh=Ih(`825a`),Bh=Ih(`c04e`),Vh=Object.defineProperty;Fh.f=Lh?Vh:function(Ph,Fh,Ih){if(zh(Ph),Fh=Bh(Fh,!0),zh(Ih),Rh)try{return Vh(Ph,Fh,Ih)}catch{}if(`get`in Ih||`set`in Ih)throw TypeError(`Accessors not supported`);return`value`in Ih&&(Ph[Fh]=Ih.value),Ph}}),"9ed3":(function(Ph,Fh,Ih){var Lh=Ih(`ae93`).IteratorPrototype,Rh=Ih(`7c73`),zh=Ih(`5c6c`),Bh=Ih(`d44e`),Vh=Ih(`3f8c`),Hh=function(){return this};Ph.exports=function(Ph,Fh,Ih){var Uh=Fh+` Iterator`;return Ph.prototype=Rh(Lh,{next:zh(1,Ih)}),Bh(Ph,Uh,!1,!0),Vh[Uh]=Hh,Ph}}),"9f7f":(function(Ph,Fh,Ih){var Lh=Ih(`d039`);function Rh(Ph,Fh){return RegExp(Ph,Fh)}Fh.UNSUPPORTED_Y=Lh(function(){var Ph=Rh(`a`,`y`);return Ph.lastIndex=2,Ph.exec(`abcd`)!=null}),Fh.BROKEN_CARET=Lh(function(){var Ph=Rh(`^r`,`gy`);return Ph.lastIndex=2,Ph.exec(`str`)!=null})}),a2bf:(function(Ph,Fh,Ih){var Lh=Ih(`e8b5`),Rh=Ih(`50c4`),zh=Ih(`0366`),Bh=function(Ph,Fh,Ih,Vh,Hh,Uh,Wh,Gh){for(var Kh=Hh,qh=0,Jh=Wh?zh(Wh,Gh,3):!1,Yh;qh<Vh;){if(qh in Ih){if(Yh=Jh?Jh(Ih[qh],qh,Fh):Ih[qh],Uh>0&&Lh(Yh))Kh=Bh(Ph,Fh,Yh,Rh(Yh.length),Kh,Uh-1)-1;else{if(Kh>=9007199254740991)throw TypeError(`Exceed the acceptable array length`);Ph[Kh]=Yh}Kh++}qh++}return Kh};Ph.exports=Bh}),a352:(function(Ph,Ih){Ph.exports=Fh}),a434:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`23cb`),zh=Ih(`a691`),Bh=Ih(`50c4`),Vh=Ih(`7b0b`),Hh=Ih(`65f0`),Uh=Ih(`8418`),Wh=Ih(`1dde`),Gh=Ih(`ae40`),Kh=Wh(`splice`),qh=Gh(`splice`,{ACCESSORS:!0,0:0,1:2}),Jh=Math.max,Yh=Math.min,Xh=9007199254740991,Zh=`Maximum allowed length exceeded`;Lh({target:`Array`,proto:!0,forced:!Kh||!qh},{splice:function(Ph,Fh){var Ih=Vh(this),Lh=Bh(Ih.length),Wh=Rh(Ph,Lh),Gh=arguments.length,Kh,qh,Qh,$h,eg,tg;if(Gh===0?Kh=qh=0:Gh===1?(Kh=0,qh=Lh-Wh):(Kh=Gh-2,qh=Yh(Jh(zh(Fh),0),Lh-Wh)),Lh+Kh-qh>Xh)throw TypeError(Zh);for(Qh=Hh(Ih,qh),$h=0;$h<qh;$h++)eg=Wh+$h,eg in Ih&&Uh(Qh,$h,Ih[eg]);if(Qh.length=qh,Kh<qh){for($h=Wh;$h<Lh-qh;$h++)eg=$h+qh,tg=$h+Kh,eg in Ih?Ih[tg]=Ih[eg]:delete Ih[tg];for($h=Lh;$h>Lh-qh+Kh;$h--)delete Ih[$h-1]}else if(Kh>qh)for($h=Lh-qh;$h>Wh;$h--)eg=$h+qh-1,tg=$h+Kh-1,eg in Ih?Ih[tg]=Ih[eg]:delete Ih[tg];for($h=0;$h<Kh;$h++)Ih[$h+Wh]=arguments[$h+2];return Ih.length=Lh-qh+Kh,Qh}})}),a4d3:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`da84`),zh=Ih(`d066`),Bh=Ih(`c430`),Vh=Ih(`83ab`),Hh=Ih(`4930`),Uh=Ih(`fdbf`),Wh=Ih(`d039`),Gh=Ih(`5135`),Kh=Ih(`e8b5`),qh=Ih(`861d`),Jh=Ih(`825a`),Yh=Ih(`7b0b`),Xh=Ih(`fc6a`),Zh=Ih(`c04e`),Qh=Ih(`5c6c`),$h=Ih(`7c73`),eg=Ih(`df75`),tg=Ih(`241c`),ng=Ih(`057f`),rg=Ih(`7418`),ig=Ih(`06cf`),ag=Ih(`9bf2`),og=Ih(`d1e7`),sg=Ih(`9112`),cg=Ih(`6eeb`),lg=Ih(`5692`),ug=Ih(`f772`),dg=Ih(`d012`),fg=Ih(`90e3`),pg=Ih(`b622`),mg=Ih(`e538`),hg=Ih(`746f`),gg=Ih(`d44e`),_g=Ih(`69f3`),vg=Ih(`b727`).forEach,yg=ug(`hidden`),bg=`Symbol`,xg=`prototype`,Sg=pg(`toPrimitive`),Cg=_g.set,wg=_g.getterFor(bg),Tg=Object[xg],Eg=Rh.Symbol,Dg=zh(`JSON`,`stringify`),Og=ig.f,kg=ag.f,Ag=ng.f,jg=og.f,Mg=lg(`symbols`),Ng=lg(`op-symbols`),Pg=lg(`string-to-symbol-registry`),Fg=lg(`symbol-to-string-registry`),Ig=lg(`wks`),Lg=Rh.QObject,Rg=!Lg||!Lg[xg]||!Lg[xg].findChild,zg=Vh&&Wh(function(){return $h(kg({},`a`,{get:function(){return kg(this,`a`,{value:7}).a}})).a!=7})?function(Ph,Fh,Ih){var Lh=Og(Tg,Fh);Lh&&delete Tg[Fh],kg(Ph,Fh,Ih),Lh&&Ph!==Tg&&kg(Tg,Fh,Lh)}:kg,Bg=function(Ph,Fh){var Ih=Mg[Ph]=$h(Eg[xg]);return Cg(Ih,{type:bg,tag:Ph,description:Fh}),Vh||(Ih.description=Fh),Ih},Vg=Uh?function(Ph){return typeof Ph==`symbol`}:function(Ph){return Object(Ph)instanceof Eg},Hg=function(Ph,Fh,Ih){Ph===Tg&&Hg(Ng,Fh,Ih),Jh(Ph);var Lh=Zh(Fh,!0);return Jh(Ih),Gh(Mg,Lh)?(Ih.enumerable?(Gh(Ph,yg)&&Ph[yg][Lh]&&(Ph[yg][Lh]=!1),Ih=$h(Ih,{enumerable:Qh(0,!1)})):(Gh(Ph,yg)||kg(Ph,yg,Qh(1,{})),Ph[yg][Lh]=!0),zg(Ph,Lh,Ih)):kg(Ph,Lh,Ih)},Ug=function(Ph,Fh){Jh(Ph);var Ih=Xh(Fh);return vg(eg(Ih).concat(Jg(Ih)),function(Fh){(!Vh||Gg.call(Ih,Fh))&&Hg(Ph,Fh,Ih[Fh])}),Ph},Wg=function(Ph,Fh){return Fh===void 0?$h(Ph):Ug($h(Ph),Fh)},Gg=function(Ph){var Fh=Zh(Ph,!0),Ih=jg.call(this,Fh);return this===Tg&&Gh(Mg,Fh)&&!Gh(Ng,Fh)?!1:Ih||!Gh(this,Fh)||!Gh(Mg,Fh)||Gh(this,yg)&&this[yg][Fh]?Ih:!0},Kg=function(Ph,Fh){var Ih=Xh(Ph),Lh=Zh(Fh,!0);if(!(Ih===Tg&&Gh(Mg,Lh)&&!Gh(Ng,Lh))){var Rh=Og(Ih,Lh);return Rh&&Gh(Mg,Lh)&&!(Gh(Ih,yg)&&Ih[yg][Lh])&&(Rh.enumerable=!0),Rh}},qg=function(Ph){var Fh=Ag(Xh(Ph)),Ih=[];return vg(Fh,function(Ph){!Gh(Mg,Ph)&&!Gh(dg,Ph)&&Ih.push(Ph)}),Ih},Jg=function(Ph){var Fh=Ph===Tg,Ih=Ag(Fh?Ng:Xh(Ph)),Lh=[];return vg(Ih,function(Ph){Gh(Mg,Ph)&&(!Fh||Gh(Tg,Ph))&&Lh.push(Mg[Ph])}),Lh};Hh||(Eg=function(){if(this instanceof Eg)throw TypeError(`Symbol is not a constructor`);var Ph=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Fh=fg(Ph),Ih=function(Ph){this===Tg&&Ih.call(Ng,Ph),Gh(this,yg)&&Gh(this[yg],Fh)&&(this[yg][Fh]=!1),zg(this,Fh,Qh(1,Ph))};return Vh&&Rg&&zg(Tg,Fh,{configurable:!0,set:Ih}),Bg(Fh,Ph)},cg(Eg[xg],`toString`,function(){return wg(this).tag}),cg(Eg,`withoutSetter`,function(Ph){return Bg(fg(Ph),Ph)}),og.f=Gg,ag.f=Hg,ig.f=Kg,tg.f=ng.f=qg,rg.f=Jg,mg.f=function(Ph){return Bg(pg(Ph),Ph)},Vh&&(kg(Eg[xg],`description`,{configurable:!0,get:function(){return wg(this).description}}),Bh||cg(Tg,`propertyIsEnumerable`,Gg,{unsafe:!0}))),Lh({global:!0,wrap:!0,forced:!Hh,sham:!Hh},{Symbol:Eg}),vg(eg(Ig),function(Ph){hg(Ph)}),Lh({target:bg,stat:!0,forced:!Hh},{for:function(Ph){var Fh=String(Ph);if(Gh(Pg,Fh))return Pg[Fh];var Ih=Eg(Fh);return Pg[Fh]=Ih,Fg[Ih]=Fh,Ih},keyFor:function(Ph){if(!Vg(Ph))throw TypeError(Ph+` is not a symbol`);if(Gh(Fg,Ph))return Fg[Ph]},useSetter:function(){Rg=!0},useSimple:function(){Rg=!1}}),Lh({target:`Object`,stat:!0,forced:!Hh,sham:!Vh},{create:Wg,defineProperty:Hg,defineProperties:Ug,getOwnPropertyDescriptor:Kg}),Lh({target:`Object`,stat:!0,forced:!Hh},{getOwnPropertyNames:qg,getOwnPropertySymbols:Jg}),Lh({target:`Object`,stat:!0,forced:Wh(function(){rg.f(1)})},{getOwnPropertySymbols:function(Ph){return rg.f(Yh(Ph))}}),Dg&&Lh({target:`JSON`,stat:!0,forced:!Hh||Wh(function(){var Ph=Eg();return Dg([Ph])!=`[null]`||Dg({a:Ph})!=`{}`||Dg(Object(Ph))!=`{}`})},{stringify:function(Ph,Fh,Ih){for(var Lh=[Ph],Rh=1,zh;arguments.length>Rh;)Lh.push(arguments[Rh++]);if(zh=Fh,!(!qh(Fh)&&Ph===void 0||Vg(Ph)))return Kh(Fh)||(Fh=function(Ph,Fh){if(typeof zh==`function`&&(Fh=zh.call(this,Ph,Fh)),!Vg(Fh))return Fh}),Lh[1]=Fh,Dg.apply(null,Lh)}}),Eg[xg][Sg]||sg(Eg[xg],Sg,Eg[xg].valueOf),gg(Eg,bg),dg[yg]=!0}),a630:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`4df4`);Lh({target:`Array`,stat:!0,forced:!Ih(`1c7e`)(function(Ph){Array.from(Ph)})},{from:Rh})}),a640:(function(Ph,Fh,Ih){var Lh=Ih(`d039`);Ph.exports=function(Ph,Fh){var Ih=[][Ph];return!!Ih&&Lh(function(){Ih.call(null,Fh||function(){throw 1},1)})}}),a691:(function(Ph,Fh){var Ih=Math.ceil,Lh=Math.floor;Ph.exports=function(Ph){return isNaN(Ph=+Ph)?0:(Ph>0?Lh:Ih)(Ph)}}),ab13:(function(Ph,Fh,Ih){var Lh=Ih(`b622`)(`match`);Ph.exports=function(Ph){var Fh=/./;try{`/./`[Ph](Fh)}catch{try{return Fh[Lh]=!1,`/./`[Ph](Fh)}catch{}}return!1}}),ac1f:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`9263`);Lh({target:`RegExp`,proto:!0,forced:/./.exec!==Rh},{exec:Rh})}),ad6d:(function(Ph,Fh,Ih){var Lh=Ih(`825a`);Ph.exports=function(){var Ph=Lh(this),Fh=``;return Ph.global&&(Fh+=`g`),Ph.ignoreCase&&(Fh+=`i`),Ph.multiline&&(Fh+=`m`),Ph.dotAll&&(Fh+=`s`),Ph.unicode&&(Fh+=`u`),Ph.sticky&&(Fh+=`y`),Fh}}),ae40:(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`d039`),zh=Ih(`5135`),Bh=Object.defineProperty,Vh={},Hh=function(Ph){throw Ph};Ph.exports=function(Ph,Fh){if(zh(Vh,Ph))return Vh[Ph];Fh||={};var Ih=[][Ph],Uh=zh(Fh,`ACCESSORS`)?Fh.ACCESSORS:!1,Wh=zh(Fh,0)?Fh[0]:Hh,Gh=zh(Fh,1)?Fh[1]:void 0;return Vh[Ph]=!!Ih&&!Rh(function(){if(Uh&&!Lh)return!0;var Ph={length:-1};Uh?Bh(Ph,1,{enumerable:!0,get:Hh}):Ph[1]=1,Ih.call(Ph,Wh,Gh)})}}),ae93:(function(Ph,Fh,Ih){var Lh=Ih(`e163`),Rh=Ih(`9112`),zh=Ih(`5135`),Bh=Ih(`b622`),Vh=Ih(`c430`),Hh=Bh(`iterator`),Uh=!1,Wh=function(){return this},Gh,Kh,qh;[].keys&&(qh=[].keys(),`next`in qh?(Kh=Lh(Lh(qh)),Kh!==Object.prototype&&(Gh=Kh)):Uh=!0),Gh??={},!Vh&&!zh(Gh,Hh)&&Rh(Gh,Hh,Wh),Ph.exports={IteratorPrototype:Gh,BUGGY_SAFARI_ITERATORS:Uh}}),b041:(function(Ph,Fh,Ih){var Lh=Ih(`00ee`),Rh=Ih(`f5df`);Ph.exports=Lh?{}.toString:function(){return`[object `+Rh(this)+`]`}}),b0c0:(function(Ph,Fh,Ih){var Lh=Ih(`83ab`),Rh=Ih(`9bf2`).f,zh=Function.prototype,Bh=zh.toString,Vh=/^\s*function ([^ (]*)/,Hh=`name`;Lh&&!(Hh in zh)&&Rh(zh,Hh,{configurable:!0,get:function(){try{return Bh.call(this).match(Vh)[1]}catch{return``}}})}),b622:(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`5692`),zh=Ih(`5135`),Bh=Ih(`90e3`),Vh=Ih(`4930`),Hh=Ih(`fdbf`),Uh=Rh(`wks`),Wh=Lh.Symbol,Gh=Hh?Wh:Wh&&Wh.withoutSetter||Bh;Ph.exports=function(Ph){return zh(Uh,Ph)||(Vh&&zh(Wh,Ph)?Uh[Ph]=Wh[Ph]:Uh[Ph]=Gh(`Symbol.`+Ph)),Uh[Ph]}}),b64b:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`7b0b`),zh=Ih(`df75`);Lh({target:`Object`,stat:!0,forced:Ih(`d039`)(function(){zh(1)})},{keys:function(Ph){return zh(Rh(Ph))}})}),b727:(function(Ph,Fh,Ih){var Lh=Ih(`0366`),Rh=Ih(`44ad`),zh=Ih(`7b0b`),Bh=Ih(`50c4`),Vh=Ih(`65f0`),Hh=[].push,Uh=function(Ph){var Fh=Ph==1,Ih=Ph==2,Uh=Ph==3,Wh=Ph==4,Gh=Ph==6,Kh=Ph==5||Gh;return function(qh,Jh,Yh,Xh){for(var Zh=zh(qh),Qh=Rh(Zh),$h=Lh(Jh,Yh,3),eg=Bh(Qh.length),tg=0,ng=Xh||Vh,rg=Fh?ng(qh,eg):Ih?ng(qh,0):void 0,ig,ag;eg>tg;tg++)if((Kh||tg in Qh)&&(ig=Qh[tg],ag=$h(ig,tg,Zh),Ph)){if(Fh)rg[tg]=ag;else if(ag)switch(Ph){case 3:return!0;case 5:return ig;case 6:return tg;case 2:Hh.call(rg,ig)}else if(Wh)return!1}return Gh?-1:Uh||Wh?Wh:rg}};Ph.exports={forEach:Uh(0),map:Uh(1),filter:Uh(2),some:Uh(3),every:Uh(4),find:Uh(5),findIndex:Uh(6)}}),c04e:(function(Ph,Fh,Ih){var Lh=Ih(`861d`);Ph.exports=function(Ph,Fh){if(!Lh(Ph))return Ph;var Ih,Rh;if(Fh&&typeof(Ih=Ph.toString)==`function`&&!Lh(Rh=Ih.call(Ph))||typeof(Ih=Ph.valueOf)==`function`&&!Lh(Rh=Ih.call(Ph))||!Fh&&typeof(Ih=Ph.toString)==`function`&&!Lh(Rh=Ih.call(Ph)))return Rh;throw TypeError(`Can't convert object to primitive value`)}}),c430:(function(Ph,Fh){Ph.exports=!1}),c6b6:(function(Ph,Fh){var Ih={}.toString;Ph.exports=function(Ph){return Ih.call(Ph).slice(8,-1)}}),c6cd:(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`ce4e`),zh=`__core-js_shared__`;Ph.exports=Lh[zh]||Rh(zh,{})}),c740:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`b727`).findIndex,zh=Ih(`44d2`),Bh=Ih(`ae40`),Vh=`findIndex`,Hh=!0,Uh=Bh(Vh);Vh in[]&&[,][Vh](function(){Hh=!1}),Lh({target:`Array`,proto:!0,forced:Hh||!Uh},{findIndex:function(Ph){return Rh(this,Ph,arguments.length>1?arguments[1]:void 0)}}),zh(Vh)}),c8ba:(function(Ph,Fh){var Ih=(function(){return this})();try{Ih||=Function(`return this`)()}catch{typeof window==`object`&&(Ih=window)}Ph.exports=Ih}),c975:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`4d64`).indexOf,zh=Ih(`a640`),Bh=Ih(`ae40`),Vh=[].indexOf,Hh=!!Vh&&1/[1].indexOf(1,-0)<0,Uh=zh(`indexOf`),Wh=Bh(`indexOf`,{ACCESSORS:!0,1:0});Lh({target:`Array`,proto:!0,forced:Hh||!Uh||!Wh},{indexOf:function(Ph){return Hh?Vh.apply(this,arguments)||0:Rh(this,Ph,arguments.length>1?arguments[1]:void 0)}})}),ca84:(function(Ph,Fh,Ih){var Lh=Ih(`5135`),Rh=Ih(`fc6a`),zh=Ih(`4d64`).indexOf,Bh=Ih(`d012`);Ph.exports=function(Ph,Fh){var Ih=Rh(Ph),Vh=0,Hh=[],Uh;for(Uh in Ih)!Lh(Bh,Uh)&&Lh(Ih,Uh)&&Hh.push(Uh);for(;Fh.length>Vh;)Lh(Ih,Uh=Fh[Vh++])&&(~zh(Hh,Uh)||Hh.push(Uh));return Hh}}),caad:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`4d64`).includes,zh=Ih(`44d2`);Lh({target:`Array`,proto:!0,forced:!Ih(`ae40`)(`indexOf`,{ACCESSORS:!0,1:0})},{includes:function(Ph){return Rh(this,Ph,arguments.length>1?arguments[1]:void 0)}}),zh(`includes`)}),cc12:(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`861d`),zh=Lh.document,Bh=Rh(zh)&&Rh(zh.createElement);Ph.exports=function(Ph){return Bh?zh.createElement(Ph):{}}}),ce4e:(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`9112`);Ph.exports=function(Ph,Fh){try{Rh(Lh,Ph,Fh)}catch{Lh[Ph]=Fh}return Fh}}),d012:(function(Ph,Fh){Ph.exports={}}),d039:(function(Ph,Fh){Ph.exports=function(Ph){try{return!!Ph()}catch{return!0}}}),d066:(function(Ph,Fh,Ih){var Lh=Ih(`428f`),Rh=Ih(`da84`),zh=function(Ph){return typeof Ph==`function`?Ph:void 0};Ph.exports=function(Ph,Fh){return arguments.length<2?zh(Lh[Ph])||zh(Rh[Ph]):Lh[Ph]&&Lh[Ph][Fh]||Rh[Ph]&&Rh[Ph][Fh]}}),d1e7:(function(Ph,Fh,Ih){var Lh={}.propertyIsEnumerable,Rh=Object.getOwnPropertyDescriptor;Fh.f=Rh&&!Lh.call({1:2},1)?function(Ph){var Fh=Rh(this,Ph);return!!Fh&&Fh.enumerable}:Lh}),d28b:(function(Ph,Fh,Ih){Ih(`746f`)(`iterator`)}),d2bb:(function(Ph,Fh,Ih){var Lh=Ih(`825a`),Rh=Ih(`3bbe`);Ph.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var Ph=!1,Fh={},Ih;try{Ih=Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set,Ih.call(Fh,[]),Ph=Fh instanceof Array}catch{}return function(Fh,zh){return Lh(Fh),Rh(zh),Ph?Ih.call(Fh,zh):Fh.__proto__=zh,Fh}}():void 0)}),d3b7:(function(Ph,Fh,Ih){var Lh=Ih(`00ee`),Rh=Ih(`6eeb`),zh=Ih(`b041`);Lh||Rh(Object.prototype,`toString`,zh,{unsafe:!0})}),d44e:(function(Ph,Fh,Ih){var Lh=Ih(`9bf2`).f,Rh=Ih(`5135`),zh=Ih(`b622`)(`toStringTag`);Ph.exports=function(Ph,Fh,Ih){Ph&&!Rh(Ph=Ih?Ph:Ph.prototype,zh)&&Lh(Ph,zh,{configurable:!0,value:Fh})}}),d58f:(function(Ph,Fh,Ih){var Lh=Ih(`1c0b`),Rh=Ih(`7b0b`),zh=Ih(`44ad`),Bh=Ih(`50c4`),Vh=function(Ph){return function(Fh,Ih,Vh,Hh){Lh(Ih);var Uh=Rh(Fh),Wh=zh(Uh),Gh=Bh(Uh.length),Kh=Ph?Gh-1:0,qh=Ph?-1:1;if(Vh<2)for(;;){if(Kh in Wh){Hh=Wh[Kh],Kh+=qh;break}if(Kh+=qh,Ph?Kh<0:Gh<=Kh)throw TypeError(`Reduce of empty array with no initial value`)}for(;Ph?Kh>=0:Gh>Kh;Kh+=qh)Kh in Wh&&(Hh=Ih(Hh,Wh[Kh],Kh,Uh));return Hh}};Ph.exports={left:Vh(!1),right:Vh(!0)}}),d784:(function(Ph,Fh,Ih){Ih(`ac1f`);var Lh=Ih(`6eeb`),Rh=Ih(`d039`),zh=Ih(`b622`),Bh=Ih(`9263`),Vh=Ih(`9112`),Hh=zh(`species`),Uh=!Rh(function(){var Ph=/./;return Ph.exec=function(){var Ph=[];return Ph.groups={a:`7`},Ph},``.replace(Ph,`$<a>`)!==`7`}),Wh=(function(){return`a`.replace(/./,`$0`)===`$0`})(),Gh=zh(`replace`),Kh=(function(){return/./[Gh]?/./[Gh](`a`,`$0`)===``:!1})(),qh=!Rh(function(){var Ph=/(?:)/,Fh=Ph.exec;Ph.exec=function(){return Fh.apply(this,arguments)};var Ih=`ab`.split(Ph);return Ih.length!==2||Ih[0]!==`a`||Ih[1]!==`b`});Ph.exports=function(Ph,Fh,Ih,Gh){var Jh=zh(Ph),Yh=!Rh(function(){var Fh={};return Fh[Jh]=function(){return 7},``[Ph](Fh)!=7}),Xh=Yh&&!Rh(function(){var Fh=!1,Ih=/a/;return Ph===`split`&&(Ih={},Ih.constructor={},Ih.constructor[Hh]=function(){return Ih},Ih.flags=``,Ih[Jh]=/./[Jh]),Ih.exec=function(){return Fh=!0,null},Ih[Jh](``),!Fh});if(!Yh||!Xh||Ph===`replace`&&!(Uh&&Wh&&!Kh)||Ph===`split`&&!qh){var Zh=/./[Jh],Qh=Ih(Jh,``[Ph],function(Ph,Fh,Ih,Lh,Rh){return Fh.exec===Bh?Yh&&!Rh?{done:!0,value:Zh.call(Fh,Ih,Lh)}:{done:!0,value:Ph.call(Ih,Fh,Lh)}:{done:!1}},{REPLACE_KEEPS_$0:Wh,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Kh}),$h=Qh[0],eg=Qh[1];Lh(String.prototype,Ph,$h),Lh(RegExp.prototype,Jh,Fh==2?function(Ph,Fh){return eg.call(Ph,this,Fh)}:function(Ph){return eg.call(Ph,this)})}Gh&&Vh(RegExp.prototype[Jh],`sham`,!0)}}),d81d:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`b727`).map,zh=Ih(`1dde`),Bh=Ih(`ae40`),Vh=zh(`map`),Hh=Bh(`map`);Lh({target:`Array`,proto:!0,forced:!Vh||!Hh},{map:function(Ph){return Rh(this,Ph,arguments.length>1?arguments[1]:void 0)}})}),da84:(function(Ph,Fh,Ih){(function(Fh){var Ih=function(Ph){return Ph&&Ph.Math==Math&&Ph};Ph.exports=Ih(typeof globalThis==`object`&&globalThis)||Ih(typeof window==`object`&&window)||Ih(typeof self==`object`&&self)||Ih(typeof Fh==`object`&&Fh)||Function(`return this`)()}).call(this,Ih(`c8ba`))}),dbb4:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`83ab`),zh=Ih(`56ef`),Bh=Ih(`fc6a`),Vh=Ih(`06cf`),Hh=Ih(`8418`);Lh({target:`Object`,stat:!0,sham:!Rh},{getOwnPropertyDescriptors:function(Ph){for(var Fh=Bh(Ph),Ih=Vh.f,Lh=zh(Fh),Rh={},Uh=0,Wh,Gh;Lh.length>Uh;)Gh=Ih(Fh,Wh=Lh[Uh++]),Gh!==void 0&&Hh(Rh,Wh,Gh);return Rh}})}),dbf1:(function(Ph,Fh,Ih){(function(Ph){Ih.d(Fh,`a`,function(){return Rh});function Lh(){return typeof window<`u`?window.console:Ph.console}var Rh=Lh()}).call(this,Ih(`c8ba`))}),ddb0:(function(Ph,Fh,Ih){var Lh=Ih(`da84`),Rh=Ih(`fdbc`),zh=Ih(`e260`),Bh=Ih(`9112`),Vh=Ih(`b622`),Hh=Vh(`iterator`),Uh=Vh(`toStringTag`),Wh=zh.values;for(var Gh in Rh){var Kh=Lh[Gh],qh=Kh&&Kh.prototype;if(qh){if(qh[Hh]!==Wh)try{Bh(qh,Hh,Wh)}catch{qh[Hh]=Wh}if(qh[Uh]||Bh(qh,Uh,Gh),Rh[Gh]){for(var Jh in zh)if(qh[Jh]!==zh[Jh])try{Bh(qh,Jh,zh[Jh])}catch{qh[Jh]=zh[Jh]}}}}}),df75:(function(Ph,Fh,Ih){var Lh=Ih(`ca84`),Rh=Ih(`7839`);Ph.exports=Object.keys||function(Ph){return Lh(Ph,Rh)}}),e01a:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`83ab`),zh=Ih(`da84`),Bh=Ih(`5135`),Vh=Ih(`861d`),Hh=Ih(`9bf2`).f,Uh=Ih(`e893`),Wh=zh.Symbol;if(Rh&&typeof Wh==`function`&&(!(`description`in Wh.prototype)||Wh().description!==void 0)){var Gh={},Kh=function(){var Ph=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),Fh=this instanceof Kh?new Wh(Ph):Ph===void 0?Wh():Wh(Ph);return Ph===``&&(Gh[Fh]=!0),Fh};Uh(Kh,Wh);var qh=Kh.prototype=Wh.prototype;qh.constructor=Kh;var Jh=qh.toString,Yh=String(Wh(`test`))==`Symbol(test)`,Xh=/^Symbol\((.*)\)[^)]+$/;Hh(qh,`description`,{configurable:!0,get:function(){var Ph=Vh(this)?this.valueOf():this,Fh=Jh.call(Ph);if(Bh(Gh,Ph))return``;var Ih=Yh?Fh.slice(7,-1):Fh.replace(Xh,`$1`);return Ih===``?void 0:Ih}}),Lh({global:!0,forced:!0},{Symbol:Kh})}}),e163:(function(Ph,Fh,Ih){var Lh=Ih(`5135`),Rh=Ih(`7b0b`),zh=Ih(`f772`),Bh=Ih(`e177`),Vh=zh(`IE_PROTO`),Hh=Object.prototype;Ph.exports=Bh?Object.getPrototypeOf:function(Ph){return Ph=Rh(Ph),Lh(Ph,Vh)?Ph[Vh]:typeof Ph.constructor==`function`&&Ph instanceof Ph.constructor?Ph.constructor.prototype:Ph instanceof Object?Hh:null}}),e177:(function(Ph,Fh,Ih){Ph.exports=!Ih(`d039`)(function(){function Ph(){}return Ph.prototype.constructor=null,Object.getPrototypeOf(new Ph)!==Ph.prototype})}),e260:(function(Ph,Fh,Ih){var Lh=Ih(`fc6a`),Rh=Ih(`44d2`),zh=Ih(`3f8c`),Bh=Ih(`69f3`),Vh=Ih(`7dd0`),Hh=`Array Iterator`,Uh=Bh.set,Wh=Bh.getterFor(Hh);Ph.exports=Vh(Array,`Array`,function(Ph,Fh){Uh(this,{type:Hh,target:Lh(Ph),index:0,kind:Fh})},function(){var Ph=Wh(this),Fh=Ph.target,Ih=Ph.kind,Lh=Ph.index++;return!Fh||Lh>=Fh.length?(Ph.target=void 0,{value:void 0,done:!0}):Ih==`keys`?{value:Lh,done:!1}:Ih==`values`?{value:Fh[Lh],done:!1}:{value:[Lh,Fh[Lh]],done:!1}},`values`),zh.Arguments=zh.Array,Rh(`keys`),Rh(`values`),Rh(`entries`)}),e439:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`d039`),zh=Ih(`fc6a`),Bh=Ih(`06cf`).f,Vh=Ih(`83ab`),Hh=Rh(function(){Bh(1)});Lh({target:`Object`,stat:!0,forced:!Vh||Hh,sham:!Vh},{getOwnPropertyDescriptor:function(Ph,Fh){return Bh(zh(Ph),Fh)}})}),e538:(function(Ph,Fh,Ih){Fh.f=Ih(`b622`)}),e893:(function(Ph,Fh,Ih){var Lh=Ih(`5135`),Rh=Ih(`56ef`),zh=Ih(`06cf`),Bh=Ih(`9bf2`);Ph.exports=function(Ph,Fh){for(var Ih=Rh(Fh),Vh=Bh.f,Hh=zh.f,Uh=0;Uh<Ih.length;Uh++){var Wh=Ih[Uh];Lh(Ph,Wh)||Vh(Ph,Wh,Hh(Fh,Wh))}}}),e8b5:(function(Ph,Fh,Ih){var Lh=Ih(`c6b6`);Ph.exports=Array.isArray||function(Ph){return Lh(Ph)==`Array`}}),e95a:(function(Ph,Fh,Ih){var Lh=Ih(`b622`),Rh=Ih(`3f8c`),zh=Lh(`iterator`),Bh=Array.prototype;Ph.exports=function(Ph){return Ph!==void 0&&(Rh.Array===Ph||Bh[zh]===Ph)}}),f5df:(function(Ph,Fh,Ih){var Lh=Ih(`00ee`),Rh=Ih(`c6b6`),zh=Ih(`b622`)(`toStringTag`),Bh=Rh(function(){return arguments}())==`Arguments`,Vh=function(Ph,Fh){try{return Ph[Fh]}catch{}};Ph.exports=Lh?Rh:function(Ph){var Fh,Ih,Lh;return Ph===void 0?`Undefined`:Ph===null?`Null`:typeof(Ih=Vh(Fh=Object(Ph),zh))==`string`?Ih:Bh?Rh(Fh):(Lh=Rh(Fh))==`Object`&&typeof Fh.callee==`function`?`Arguments`:Lh}}),f772:(function(Ph,Fh,Ih){var Lh=Ih(`5692`),Rh=Ih(`90e3`),zh=Lh(`keys`);Ph.exports=function(Ph){return zh[Ph]||(zh[Ph]=Rh(Ph))}}),fb15:(function(Ph,Fh,Ih){if(Ih.r(Fh),typeof window<`u`){var Lh=window.document.currentScript,Rh=Ih(`8875`);Lh=Rh(),`currentScript`in document||Object.defineProperty(document,`currentScript`,{get:Rh});var zh=Lh&&Lh.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);zh&&(Ih.p=zh[1])}Ih(`99af`),Ih(`4de4`),Ih(`4160`),Ih(`c975`),Ih(`d81d`),Ih(`a434`),Ih(`159b`),Ih(`a4d3`),Ih(`e439`),Ih(`dbb4`),Ih(`b64b`);function Bh(Ph,Fh,Ih){return Fh in Ph?Object.defineProperty(Ph,Fh,{value:Ih,enumerable:!0,configurable:!0,writable:!0}):Ph[Fh]=Ih,Ph}function Vh(Ph,Fh){var Ih=Object.keys(Ph);if(Object.getOwnPropertySymbols){var Lh=Object.getOwnPropertySymbols(Ph);Fh&&(Lh=Lh.filter(function(Fh){return Object.getOwnPropertyDescriptor(Ph,Fh).enumerable})),Ih.push.apply(Ih,Lh)}return Ih}function Hh(Ph){for(var Fh=1;Fh<arguments.length;Fh++){var Ih=arguments[Fh]==null?{}:arguments[Fh];Fh%2?Vh(Object(Ih),!0).forEach(function(Fh){Bh(Ph,Fh,Ih[Fh])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ph,Object.getOwnPropertyDescriptors(Ih)):Vh(Object(Ih)).forEach(function(Fh){Object.defineProperty(Ph,Fh,Object.getOwnPropertyDescriptor(Ih,Fh))})}return Ph}function Uh(Ph){if(Array.isArray(Ph))return Ph}Ih(`e01a`),Ih(`d28b`),Ih(`e260`),Ih(`d3b7`),Ih(`3ca3`),Ih(`ddb0`);function Wh(Ph,Fh){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(Ph)))){var Ih=[],Lh=!0,Rh=!1,zh=void 0;try{for(var Bh=Ph[Symbol.iterator](),Vh;!(Lh=(Vh=Bh.next()).done)&&(Ih.push(Vh.value),!(Fh&&Ih.length===Fh));Lh=!0);}catch(Ph){Rh=!0,zh=Ph}finally{try{!Lh&&Bh.return!=null&&Bh.return()}finally{if(Rh)throw zh}}return Ih}}Ih(`a630`),Ih(`fb6a`),Ih(`b0c0`),Ih(`25f0`);function Gh(Ph,Fh){(Fh==null||Fh>Ph.length)&&(Fh=Ph.length);for(var Ih=0,Lh=Array(Fh);Ih<Fh;Ih++)Lh[Ih]=Ph[Ih];return Lh}function Kh(Ph,Fh){if(Ph){if(typeof Ph==`string`)return Gh(Ph,Fh);var Ih=Object.prototype.toString.call(Ph).slice(8,-1);if(Ih===`Object`&&Ph.constructor&&(Ih=Ph.constructor.name),Ih===`Map`||Ih===`Set`)return Array.from(Ph);if(Ih===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ih))return Gh(Ph,Fh)}}function qh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4887
4887
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jh(Ph,Fh){return Uh(Ph)||Wh(Ph,Fh)||Kh(Ph,Fh)||qh()}function Yh(Ph){if(Array.isArray(Ph))return Gh(Ph)}function Xh(Ph){if(typeof Symbol<`u`&&Symbol.iterator in Object(Ph))return Array.from(Ph)}function Zh(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4888
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qh(Ph){return Yh(Ph)||Xh(Ph)||Kh(Ph)||Zh()}var $h=Ih(`a352`),eg=Ih.n($h);function tg(Ph){Ph.parentElement!==null&&Ph.parentElement.removeChild(Ph)}function ng(Ph,Fh,Ih){var Lh=Ih===0?Ph.children[0]:Ph.children[Ih-1].nextSibling;Ph.insertBefore(Fh,Lh)}var rg=Ih(`dbf1`);Ih(`13d5`),Ih(`4fad`),Ih(`ac1f`),Ih(`5319`);function ig(Ph){var Fh=Object.create(null);return function(Ih){return Fh[Ih]||(Fh[Ih]=Ph(Ih))}}var ag=/-(\w)/g,og=ig(function(Ph){return Ph.replace(ag,function(Ph,Fh){return Fh.toUpperCase()})});Ih(`5db7`),Ih(`73d9`);var sg=[`Start`,`Add`,`Remove`,`Update`,`End`],cg=[`Choose`,`Unchoose`,`Sort`,`Filter`,`Clone`],lg=[`Move`],ug=[lg,sg,cg].flatMap(function(Ph){return Ph}).map(function(Ph){return`on${Ph}`}),dg={manage:lg,manageAndEmit:sg,emit:cg};function fg(Ph){return ug.indexOf(Ph)!==-1}Ih(`caad`),Ih(`2ca0`);var pg=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.math.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.slot.small.source.span.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`);function mg(Ph){return pg.includes(Ph)}function hg(Ph){return[`transition-group`,`TransitionGroup`].includes(Ph)}function gg(Ph){return[`id`,`class`,`role`,`style`].includes(Ph)||Ph.startsWith(`data-`)||Ph.startsWith(`aria-`)||Ph.startsWith(`on`)}function _g(Ph){return Ph.reduce(function(Ph,Fh){var Ih=Jh(Fh,2),Lh=Ih[0];return Ph[Lh]=Ih[1],Ph},{})}function vg(Ph){var Fh=Ph.$attrs,Ih=Ph.componentData,Lh=Ih===void 0?{}:Ih;return Hh(Hh({},_g(Object.entries(Fh).filter(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0];return Fh[1],gg(Ih)}))),Lh)}function yg(Ph){var Fh=Ph.$attrs,Ih=Ph.callBackBuilder,Lh=_g(bg(Fh));Object.entries(Ih).forEach(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0],Rh=Fh[1];dg[Ih].forEach(function(Ph){Lh[`on${Ph}`]=Rh(Ph)})});var Rh=`[data-draggable]${Lh.draggable||``}`;return Hh(Hh({},Lh),{},{draggable:Rh})}function bg(Ph){return Object.entries(Ph).filter(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0];return Fh[1],!gg(Ih)}).map(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0],Lh=Fh[1];return[og(Ih),Lh]}).filter(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0];return Fh[1],!fg(Ih)})}Ih(`c740`);function xg(Ph,Fh){if(!(Ph instanceof Fh))throw TypeError(`Cannot call a class as a function`)}function Sg(Ph,Fh){for(var Ih=0;Ih<Fh.length;Ih++){var Lh=Fh[Ih];Lh.enumerable=Lh.enumerable||!1,Lh.configurable=!0,`value`in Lh&&(Lh.writable=!0),Object.defineProperty(Ph,Lh.key,Lh)}}function Cg(Ph,Fh,Ih){return Fh&&Sg(Ph.prototype,Fh),Ih&&Sg(Ph,Ih),Ph}var wg=function(Ph){return Ph.el},Tg=function(Ph,Fh){return Ph.__draggable_context=Fh},Eg=function(Ph){return Ph.__draggable_context},Dg=function(){function Ph(Fh){var Ih=Fh.nodes,Lh=Ih.header,Rh=Ih.default,zh=Ih.footer,Bh=Fh.root,Vh=Fh.realList;xg(this,Ph),this.defaultNodes=Rh,this.children=[].concat(Qh(Lh),Qh(Rh),Qh(zh)),this.externalComponent=Bh.externalComponent,this.rootTransition=Bh.transition,this.tag=Bh.tag,this.realList=Vh}return Cg(Ph,[{key:`render`,value:function(Ph,Fh){var Ih=this.tag,Lh=this.children;return Ph(Ih,Fh,this._isRootComponent?{default:function(){return Lh}}:Lh)}},{key:`updated`,value:function(){var Ph=this.defaultNodes,Fh=this.realList;Ph.forEach(function(Ph,Ih){Tg(wg(Ph),{element:Fh[Ih],index:Ih})})}},{key:`getUnderlyingVm`,value:function(Ph){return Eg(Ph)}},{key:`getVmIndexFromDomIndex`,value:function(Ph,Fh){var Ih=this.defaultNodes,Lh=Ih.length,Rh=Fh.children,zh=Rh.item(Ph);if(zh===null)return Lh;var Bh=Eg(zh);if(Bh)return Bh.index;if(Lh===0)return 0;var Vh=wg(Ih[0]);return Ph<Qh(Rh).findIndex(function(Ph){return Ph===Vh})?0:Lh}},{key:`_isRootComponent`,get:function(){return this.externalComponent||this.rootTransition}}]),Ph}(),Og=Ih(`8bbf`);function kg(Ph,Fh){var Ih=Ph[Fh];return Ih?Ih():[]}function Ag(Ph){var Fh=Ph.$slots,Ih=Ph.realList,Lh=Ph.getKey,Rh=Ih||[],zh=Jh([`header`,`footer`].map(function(Ph){return kg(Fh,Ph)}),2),Bh=zh[0],Vh=zh[1],Uh=Fh.item;if(!Uh)throw Error(`draggable element must have an item slot`);var Wh=Rh.flatMap(function(Ph,Fh){return Uh({element:Ph,index:Fh}).map(function(Fh){return Fh.key=Lh(Ph),Fh.props=Hh(Hh({},Fh.props||{}),{},{"data-draggable":!0}),Fh})});if(Wh.length!==Rh.length)throw Error(`Item slot must have only one child`);return{header:Bh,footer:Vh,default:Wh}}function jg(Ph){var Fh=hg(Ph),Ih=!mg(Ph)&&!Fh;return{transition:Fh,externalComponent:Ih,tag:Ih?(0,Og.resolveComponent)(Ph):Fh?Og.TransitionGroup:Ph}}function Mg(Ph){var Fh=Ph.$slots,Ih=Ph.tag,Lh=Ph.realList,Rh=Ph.getKey;return new Dg({nodes:Ag({$slots:Fh,realList:Lh,getKey:Rh}),root:jg(Ih),realList:Lh})}function Ng(Ph,Fh){var Ih=this;(0,Og.nextTick)(function(){return Ih.$emit(Ph.toLowerCase(),Fh)})}function Pg(Ph){var Fh=this;return function(Ih,Lh){if(Fh.realList!==null)return Fh[`onDrag${Ph}`](Ih,Lh)}}function Fg(Ph){var Fh=this,Ih=Pg.call(this,Ph);return function(Lh,Rh){Ih.call(Fh,Lh,Rh),Ng.call(Fh,Ph,Lh)}}var Ig=null,Lg={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(Ph){return Ph}},tag:{type:String,default:`div`},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Rg=[`update:modelValue`,`change`].concat(Qh([].concat(Qh(dg.manageAndEmit),Qh(dg.emit)).map(function(Ph){return Ph.toLowerCase()})));Fh.default=(0,Og.defineComponent)({name:`draggable`,inheritAttrs:!1,props:Lg,emits:Rg,data:function(){return{error:!1}},render:function(){try{this.error=!1;var Ph=this.$slots,Fh=this.$attrs,Ih=this.tag,Lh=this.componentData,Rh=this.realList,zh=this.getKey,Bh=Mg({$slots:Ph,tag:Ih,realList:Rh,getKey:zh});this.componentStructure=Bh;var Vh=vg({$attrs:Fh,componentData:Lh});return Bh.render(Og.h,Vh)}catch(Ph){return this.error=!0,(0,Og.h)(`pre`,{style:{color:`red`}},Ph.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&rg.a.error(`modelValue and list props are mutually exclusive! Please set one or another.`)},mounted:function(){var Ph=this;if(!this.error){var Fh=this.$attrs,Ih=this.$el;this.componentStructure.updated();var Lh=yg({$attrs:Fh,callBackBuilder:{manageAndEmit:function(Fh){return Fg.call(Ph,Fh)},emit:function(Fh){return Ng.bind(Ph,Fh)},manage:function(Fh){return Pg.call(Ph,Fh)}}}),Rh=Ih.nodeType===1?Ih:Ih.parentElement;this._sortable=new eg.a(Rh,Lh),this.targetDomElement=Rh,Rh.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){return this.list||this.modelValue},getKey:function(){var Ph=this.itemKey;return typeof Ph==`function`?Ph:function(Fh){return Fh[Ph]}}},watch:{$attrs:{handler:function(Ph){var Fh=this._sortable;Fh&&bg(Ph).forEach(function(Ph){var Ih=Jh(Ph,2),Lh=Ih[0],Rh=Ih[1];Fh.option(Lh,Rh)})},deep:!0}},methods:{getUnderlyingVm:function(Ph){return this.componentStructure.getUnderlyingVm(Ph)||null},getUnderlyingPotencialDraggableComponent:function(Ph){return Ph.__draggable_component__},emitChanges:function(Ph){var Fh=this;(0,Og.nextTick)(function(){return Fh.$emit(`change`,Ph)})},alterList:function(Ph){if(this.list){Ph(this.list);return}var Fh=Qh(this.modelValue);Ph(Fh),this.$emit(`update:modelValue`,Fh)},spliceList:function(){var Ph=arguments;this.alterList(function(Fh){return Fh.splice.apply(Fh,Qh(Ph))})},updatePosition:function(Ph,Fh){this.alterList(function(Ih){return Ih.splice(Fh,0,Ih.splice(Ph,1)[0])})},getRelatedContextFromMoveEvent:function(Ph){var Fh=Ph.to,Ih=Ph.related,Lh=this.getUnderlyingPotencialDraggableComponent(Fh);if(!Lh)return{component:Lh};var Rh=Lh.realList,zh={list:Rh,component:Lh};return Fh!==Ih&&Rh?Hh(Hh({},Lh.getUnderlyingVm(Ih)||{}),zh):zh},getVmIndexFromDomIndex:function(Ph){return this.componentStructure.getVmIndexFromDomIndex(Ph,this.targetDomElement)},onDragStart:function(Ph){this.context=this.getUnderlyingVm(Ph.item),Ph.item._underlying_vm_=this.clone(this.context.element),Ig=Ph.item},onDragAdd:function(Ph){var Fh=Ph.item._underlying_vm_;if(Fh!==void 0){tg(Ph.item);var Ih=this.getVmIndexFromDomIndex(Ph.newIndex);this.spliceList(Ih,0,Fh);var Lh={element:Fh,newIndex:Ih};this.emitChanges({added:Lh})}},onDragRemove:function(Ph){if(ng(this.$el,Ph.item,Ph.oldIndex),Ph.pullMode===`clone`){tg(Ph.clone);return}var Fh=this.context,Ih=Fh.index,Lh=Fh.element;this.spliceList(Ih,1);var Rh={element:Lh,oldIndex:Ih};this.emitChanges({removed:Rh})},onDragUpdate:function(Ph){tg(Ph.item),ng(Ph.from,Ph.item,Ph.oldIndex);var Fh=this.context.index,Ih=this.getVmIndexFromDomIndex(Ph.newIndex);this.updatePosition(Fh,Ih);var Lh={element:this.context.element,oldIndex:Fh,newIndex:Ih};this.emitChanges({moved:Lh})},computeFutureIndex:function(Ph,Fh){if(!Ph.element)return 0;var Ih=Qh(Fh.to.children).filter(function(Ph){return Ph.style.display!==`none`}),Lh=Ih.indexOf(Fh.related),Rh=Ph.component.getVmIndexFromDomIndex(Lh);return Ih.indexOf(Ig)!==-1||!Fh.willInsertAfter?Rh:Rh+1},onDragMove:function(Ph,Fh){var Ih=this.move,Lh=this.realList;if(!Ih||!Lh)return!0;var Rh=this.getRelatedContextFromMoveEvent(Ph),zh=this.computeFutureIndex(Rh,Ph),Bh=Hh(Hh({},this.context),{},{futureIndex:zh});return Ih(Hh(Hh({},Ph),{},{relatedContext:Rh,draggedContext:Bh}),Fh)},onDragEnd:function(){Ig=null}}})}),fb6a:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`861d`),zh=Ih(`e8b5`),Bh=Ih(`23cb`),Vh=Ih(`50c4`),Hh=Ih(`fc6a`),Uh=Ih(`8418`),Wh=Ih(`b622`),Gh=Ih(`1dde`),Kh=Ih(`ae40`),qh=Gh(`slice`),Jh=Kh(`slice`,{ACCESSORS:!0,0:0,1:2}),Yh=Wh(`species`),Xh=[].slice,Zh=Math.max;Lh({target:`Array`,proto:!0,forced:!qh||!Jh},{slice:function(Ph,Fh){var Ih=Hh(this),Lh=Vh(Ih.length),Wh=Bh(Ph,Lh),Gh=Bh(Fh===void 0?Lh:Fh,Lh),Kh,qh,Jh;if(zh(Ih)&&(Kh=Ih.constructor,typeof Kh==`function`&&(Kh===Array||zh(Kh.prototype))?Kh=void 0:Rh(Kh)&&(Kh=Kh[Yh],Kh===null&&(Kh=void 0)),Kh===Array||Kh===void 0))return Xh.call(Ih,Wh,Gh);for(qh=new(Kh===void 0?Array:Kh)(Zh(Gh-Wh,0)),Jh=0;Wh<Gh;Wh++,Jh++)Wh in Ih&&Uh(qh,Jh,Ih[Wh]);return qh.length=Jh,qh}})}),fc6a:(function(Ph,Fh,Ih){var Lh=Ih(`44ad`),Rh=Ih(`1d80`);Ph.exports=function(Ph){return Lh(Rh(Ph))}}),fdbc:(function(Ph,Fh){Ph.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),fdbf:(function(Ph,Fh,Ih){Ph.exports=Ih(`4930`)&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})}).default})})),import_vuedraggable_umd=__toESM(require_vuedraggable_umd(),1),PRIORITY_ORDER={low:0,medium:1,high:2,urgent:3},PRIORITY_LABELS={low:`Low`,medium:`Medium`,high:`High`,urgent:`Urgent`},PRIORITY_CLASSES={low:`bg-slate-100 text-slate-600`,medium:`bg-sky-100 text-sky-700`,high:`bg-orange-100 text-orange-700`,urgent:`bg-red-100 text-red-700`},PRIORITY_BORDER={low:`border-l-slate-300`,medium:`border-l-sky-400`,high:`border-l-orange-400`,urgent:`border-l-red-500`},PRIORITIES=[`low`,`medium`,`high`,`urgent`];function dueDateClasses(Ph){if(!Ph)return``;let Fh=todayISO();if(Ph<Fh)return`bg-red-100 text-red-700`;if(Ph===Fh)return`bg-orange-100 text-orange-700`;let Ih=new Date(Fh),Lh=new Date(Ph);return Math.round((Lh.getTime()-Ih.getTime())/(1e3*60*60*24))<=3?`bg-yellow-100 text-yellow-700`:`bg-gray-100 text-gray-600`}function todayISO(){let Ph=new Date;return`${Ph.getFullYear()}-${String(Ph.getMonth()+1).padStart(2,`0`)}-${String(Ph.getDate()).padStart(2,`0`)}`}function formatDueLabel(Ph){if(!Ph)return``;let Fh=new Date(`${Ph}T00:00:00`);if(Number.isNaN(Fh.getTime()))return Ph;let Ih=new Date,Lh=Fh.getFullYear()===Ih.getFullYear();return Fh.toLocaleDateString(void 0,{month:`short`,day:`numeric`,...Lh?{}:{year:`numeric`}})}var _hoisted_1$16={class:`h-full overflow-x-auto overflow-y-hidden`},_hoisted_2$16=[`data-testid`],_hoisted_3$15={class:`flex items-center justify-between px-3 py-2 border-b border-gray-200 col-handle cursor-grab active:cursor-grabbing`},_hoisted_4$14={class:`flex items-center gap-2 min-w-0`},_hoisted_5$14=[`title`],_hoisted_6$14=[`onKeydown`,`onBlur`],_hoisted_7$14={class:`text-xs text-gray-500 shrink-0`},_hoisted_8$13={class:`relative`},_hoisted_9$13=[`title`,`onClick`],_hoisted_10$12=[`onClick`],_hoisted_11$11=[`onClick`],_hoisted_12$11=[`onClick`],_hoisted_13$11=[`data-testid`,`aria-label`,`onClick`,`onKeydown`],_hoisted_14$10={class:`flex items-start gap-2`},_hoisted_15$9=[`checked`,`onChange`],_hoisted_16$8={class:`flex-1 min-w-0`},_hoisted_17$8={key:0,class:`text-[11px] text-gray-400 mt-0.5 line-clamp-2`},_hoisted_18$8={key:1,class:`flex flex-wrap gap-1 mt-1.5`},_hoisted_19$8=[`onClick`],TodoKanbanView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoKanbanView`,props:{filteredItems:{},columns:{}},emits:[`move`,`open`,`toggleComplete`,`quickAdd`,`renameColumn`,`deleteColumn`,`markDone`,`reorderColumns`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref([...Lh.columns]);watch(()=>Lh.columns,Ph=>{zh.value=[...Ph]});function Bh(){let Ph=Lh.columns.map(Ph=>Ph.id),Fh=zh.value.map(Ph=>Ph.id);Ph.length===Fh.length&&Ph.every((Ph,Ih)=>Ph===Fh[Ih])||Rh(`reorderColumns`,Fh)}let Vh=computed(()=>{let Ph=new Map;for(let Fh of Lh.columns)Ph.set(Fh.id,[]);for(let Fh of Lh.filteredItems){let Ih=Fh.status??Lh.columns[0]?.id;Ih&&(Ph.has(Ih)||Ph.set(Ih,[]),Ph.get(Ih).push(Fh))}for(let Fh of Ph.values())Fh.sort((Ph,Fh)=>(Ph.order??0)-(Fh.order??0));return Ph});function Hh(Ph){return Vh.value.get(Ph)??[]}function Uh(Ph,Fh){if(Fh.added){Rh(`move`,Fh.added.element.id,Ph,Fh.added.newIndex);return}Fh.moved&&Rh(`move`,Fh.moved.element.id,Ph,Fh.moved.newIndex)}let Wh=ref(null),Gh=ref(null),Kh=ref(``),qh=ref(null);function Jh(Ph){Wh.value=Wh.value===Ph?null:Ph}function Yh(Ph){Wh.value=null,Gh.value=Ph.id,Kh.value=Ph.label,nextTick$1(()=>{let Ph=qh.value,Fh=Array.isArray(Ph)?Ph[0]:Ph;Fh?.focus(),Fh?.select()})}function Xh(Ph){if(Gh.value!==Ph)return;let Fh=Kh.value.trim();if(Gh.value=null,Fh.length===0)return;let Ih=Lh.columns.find(Fh=>Fh.id===Ph);!Ih||Ih.label===Fh||Rh(`renameColumn`,Ph,Fh)}function Zh(Ph){Wh.value=null,Rh(`deleteColumn`,Ph)}function Qh(Ph){Wh.value=null,Rh(`markDone`,Ph)}return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$16,[createVNode$1(unref(import_vuedraggable_umd.default),{list:zh.value,"item-key":`id`,group:`todo-columns`,handle:`.col-handle`,animation:150,class:`flex gap-3 h-full p-3 min-w-max`,onEnd:Bh},{item:withCtx(({element:Ph})=>[createBaseVNode(`div`,{"data-testid":`todo-column-${Ph.id}`,class:`w-72 shrink-0 flex flex-col bg-gray-100 rounded-lg`},[createBaseVNode(`div`,_hoisted_3$15,[createBaseVNode(`div`,_hoisted_4$14,[createBaseVNode(`span`,{class:normalizeClass([`w-2 h-2 rounded-full shrink-0`,Ph.isDone?`bg-green-500`:`bg-gray-400`])},null,2),Gh.value===Ph.id?withDirectives((openBlock(),createElementBlock(`input`,{key:1,ref_key:`renameInput`,ref:qh,"onUpdate:modelValue":Fh[0]||=Ph=>Kh.value=Ph,class:`px-1 py-0.5 text-sm bg-white border border-blue-400 rounded w-32`,onKeydown:[withKeys(Fh=>Xh(Ph.id),[`enter`]),Fh[1]||=withKeys(Ph=>Gh.value=null,[`escape`])],onBlur:Fh=>Xh(Ph.id)},null,40,_hoisted_6$14)),[[vModelText,Kh.value]]):(openBlock(),createElementBlock(`span`,{key:0,class:`font-semibold text-sm text-gray-700 truncate`,title:Ph.label},toDisplayString$1(Ph.label),9,_hoisted_5$14)),createBaseVNode(`span`,_hoisted_7$14,toDisplayString$1(Hh(Ph.id).length),1)]),createBaseVNode(`div`,_hoisted_8$13,[createBaseVNode(`button`,{class:`text-gray-400 hover:text-gray-600 px-1`,title:unref(Ih)(`todoKanban.columnActions`),onClick:Fh=>Jh(Ph.id)},[...Fh[4]||=[createBaseVNode(`span`,{class:`material-icons text-base`},`more_horiz`,-1)]],8,_hoisted_9$13),Wh.value===Ph.id?(openBlock(),createElementBlock(`div`,{key:0,class:`absolute right-0 top-6 z-20 bg-white border border-gray-200 rounded shadow-md text-xs w-40 py-1`,onClick:Fh[2]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`button`,{class:`w-full text-left px-3 py-1.5 hover:bg-gray-50`,onClick:Fh=>Yh(Ph)},toDisplayString$1(unref(Ih)(`todoKanban.rename`)),9,_hoisted_10$12),createBaseVNode(`button`,{class:`w-full text-left px-3 py-1.5 hover:bg-gray-50`,onClick:Fh=>Qh(Ph.id)},toDisplayString$1(Ph.isDone?unref(Ih)(`todoKanban.alreadyDoneColumn`):unref(Ih)(`todoKanban.markAsDoneColumn`)),9,_hoisted_11$11),createBaseVNode(`button`,{class:`w-full text-left px-3 py-1.5 text-red-600 hover:bg-red-50`,onClick:Fh=>Zh(Ph.id)},toDisplayString$1(unref(Ih)(`todoKanban.deleteColumn`)),9,_hoisted_12$11)])):createCommentVNode(``,!0)])]),createVNode$1(unref(import_vuedraggable_umd.default),{"model-value":Hh(Ph.id),"item-key":`id`,group:`todos`,class:`flex-1 overflow-y-auto p-2 space-y-2 min-h-[2rem]`,animation:150,onChange:Fh=>Uh(Ph.id,Fh)},{item:withCtx(({element:Ph})=>[createBaseVNode(`div`,{"data-testid":`todo-card-${Ph.id}`,tabindex:`0`,role:`button`,"aria-label":unref(Ih)(`todoKanban.openCardAria`,{task:Ph.text}),class:normalizeClass([`bg-white border border-l-4 border-gray-200 rounded shadow-sm p-2 cursor-grab hover:shadow active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400`,Ph.priority?unref(PRIORITY_BORDER)[Ph.priority]:`border-l-gray-200`]),onClick:Fh=>Rh(`open`,Ph),onKeydown:[withKeys(withModifiers(Fh=>!Fh.repeat&&Rh(`open`,Ph),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Fh=>!Fh.repeat&&Rh(`open`,Ph),[`prevent`,`self`]),[`space`])]},[createBaseVNode(`div`,_hoisted_14$10,[createBaseVNode(`input`,{type:`checkbox`,checked:Ph.completed,class:`mt-0.5 cursor-pointer shrink-0`,onClick:Fh[3]||=withModifiers(()=>{},[`stop`]),onChange:Fh=>Rh(`toggleComplete`,Ph)},null,40,_hoisted_15$9),createBaseVNode(`div`,_hoisted_16$8,[createBaseVNode(`div`,{class:normalizeClass([`text-sm`,Ph.completed?`line-through text-gray-400`:`text-gray-800`])},toDisplayString$1(Ph.text),3),Ph.note?(openBlock(),createElementBlock(`div`,_hoisted_17$8,toDisplayString$1(Ph.note),1)):createCommentVNode(``,!0),Ph.labels&&Ph.labels.length>0||Ph.priority||Ph.dueDate?(openBlock(),createElementBlock(`div`,_hoisted_18$8,[Ph.priority?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(PRIORITY_CLASSES)[Ph.priority]])},toDisplayString$1(unref(PRIORITY_LABELS)[Ph.priority]),3)):createCommentVNode(``,!0),Ph.dueDate?(openBlock(),createElementBlock(`span`,{key:1,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(dueDateClasses)(Ph.dueDate)])},toDisplayString$1(unref(formatDueLabel)(Ph.dueDate)),3)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.labels??[],Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(colorForLabel)(Ph)])},toDisplayString$1(Ph),3))),128))])):createCommentVNode(``,!0)])])],42,_hoisted_13$11)]),_:1},8,[`model-value`,`onChange`]),createBaseVNode(`button`,{class:`m-2 text-xs text-gray-500 hover:text-gray-800 hover:bg-gray-200 rounded py-1.5 transition-colors`,onClick:Fh=>Rh(`quickAdd`,Ph.id)},toDisplayString$1(unref(Ih)(`todoKanban.addCard`)),9,_hoisted_19$8)],8,_hoisted_2$16)]),_:1},8,[`list`])]))}}),TodoKanbanView_default=TodoKanbanView_vue_vue_type_script_setup_true_lang_default,_hoisted_1$15={class:`border-t border-blue-100 bg-blue-50 p-4 space-y-3 rounded-b-lg`},_hoisted_2$15={class:`grid grid-cols-1 sm:grid-cols-2 gap-3`},_hoisted_3$14={class:`block text-xs text-gray-600 sm:col-span-2`},_hoisted_4$13={class:`block text-xs text-gray-600 sm:col-span-2`},_hoisted_5$13={class:`block text-xs text-gray-600`},_hoisted_6$13=[`value`],_hoisted_7$13={class:`block text-xs text-gray-600`},_hoisted_8$12={value:``},_hoisted_9$12=[`value`],_hoisted_10$11={class:`block text-xs text-gray-600`},_hoisted_11$10={class:`block text-xs text-gray-600`},_hoisted_12$10=[`placeholder`],_hoisted_13$10={class:`flex items-center gap-2 pt-1`},TodoEditPanel_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoEditPanel`,props:{item:{},columns:{}},emits:[`save`,`cancel`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(Lh.item.text),Bh=ref(Lh.item.note??``),Vh=ref(Lh.item.status??Lh.columns[0]?.id??``),Hh=ref(Lh.item.priority??``),Uh=ref(Lh.item.dueDate??``),Wh=ref((Lh.item.labels??[]).join(`, `));function Gh(Ph){return Ph.split(`,`).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0)}function Kh(){let Ph={text:zh.value,note:Bh.value===``?null:Bh.value,status:Vh.value,labels:Gh(Wh.value)};Hh.value===``?Ph.priority=null:Ph.priority=Hh.value,Uh.value===``?Ph.dueDate=null:Ph.dueDate=Uh.value,Rh(`save`,Ph)}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$15,[createBaseVNode(`div`,_hoisted_2$15,[createBaseVNode(`label`,_hoisted_3$14,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldText`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[0]||=Ph=>zh.value=Ph,type:`text`,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},null,512),[[vModelText,zh.value]])]),createBaseVNode(`label`,_hoisted_4$13,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldNote`))+` `,1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Lh[1]||=Ph=>Bh.value=Ph,rows:`2`,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded resize-y focus:outline-none focus:border-blue-500`},null,512),[[vModelText,Bh.value]])]),createBaseVNode(`label`,_hoisted_5$13,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldStatus`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[2]||=Ph=>Vh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.columns,Ph=>(openBlock(),createElementBlock(`option`,{key:Ph.id,value:Ph.id},toDisplayString$1(Ph.label),9,_hoisted_6$13))),128))],512),[[vModelSelect,Vh.value]])]),createBaseVNode(`label`,_hoisted_7$13,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldPriority`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[3]||=Ph=>Hh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},[createBaseVNode(`option`,_hoisted_8$12,toDisplayString$1(unref(Ih)(`todoDialogs.noneOption`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(PRIORITIES),Ph=>(openBlock(),createElementBlock(`option`,{key:Ph,value:Ph},toDisplayString$1(unref(PRIORITY_LABELS)[Ph]),9,_hoisted_9$12))),128))],512),[[vModelSelect,Hh.value]])]),createBaseVNode(`label`,_hoisted_10$11,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldDueDate`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[4]||=Ph=>Uh.value=Ph,type:`date`,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},null,512),[[vModelText,Uh.value]])]),createBaseVNode(`label`,_hoisted_11$10,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldLabelsCommaSeparated`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[5]||=Ph=>Wh.value=Ph,type:`text`,placeholder:unref(Ih)(`todoDialogs.labelsPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},null,8,_hoisted_12$10),[[vModelText,Wh.value]])])]),createBaseVNode(`div`,_hoisted_13$10,[createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:Kh},toDisplayString$1(unref(Ih)(`common.save`)),1),createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Lh[6]||=Ph=>Rh(`cancel`)},toDisplayString$1(unref(Ih)(`common.cancel`)),1)])]))}}),TodoEditPanel_default=TodoEditPanel_vue_vue_type_script_setup_true_lang_default,_hoisted_1$14={class:`h-full overflow-auto`},_hoisted_2$14={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_3$13={key:1,class:`min-w-full text-sm`},_hoisted_4$12={class:`bg-gray-50 sticky top-0 z-10`},_hoisted_5$12={class:`text-left text-xs font-medium text-gray-500 uppercase`},_hoisted_6$12=[`aria-sort`,`aria-label`,`onClick`,`onKeydown`],_hoisted_7$12={key:0,class:`material-icons text-xs align-middle`},_hoisted_8$11={class:`bg-white divide-y divide-gray-100`},_hoisted_9$11={class:`hover:bg-gray-50`},_hoisted_10$10={class:`px-3 py-2`},_hoisted_11$9=[`checked`,`onChange`],_hoisted_12$9=[`aria-label`,`onClick`,`onKeydown`],_hoisted_13$9={key:0,class:`text-xs text-gray-400 truncate max-w-xs`},_hoisted_14$9={class:`px-3 py-2 text-xs text-gray-600`},_hoisted_15$8={class:`px-3 py-2`},_hoisted_16$7={class:`px-3 py-2`},_hoisted_17$7={class:`flex flex-wrap gap-1`},_hoisted_18$7={class:`px-3 py-2 text-xs`},_hoisted_19$7={class:`px-3 py-2 text-xs text-gray-400`},_hoisted_20$4={class:`px-3 py-2 text-right`},_hoisted_21$4=[`title`,`onClick`],_hoisted_22$4={key:0},_hoisted_23$3={colspan:`8`,class:`bg-blue-50 p-0`},TodoTableView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoTableView`,props:{filteredItems:{},columns:{}},emits:[`patch`,`delete`,`toggleComplete`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=[{key:`completed`,label:``,ariaLabel:`Completion`},{key:`text`,label:`Text`},{key:`status`,label:`Status`},{key:`priority`,label:`Priority`},{key:`labels`,label:`Labels`},{key:`dueDate`,label:`Due`},{key:`createdAt`,label:`Created`}],Rh=Ph,zh=Fh,Bh=ref(`createdAt`),Vh=ref(`desc`),Hh=ref(null);function Uh(Ph){Bh.value===Ph?Vh.value=Vh.value===`asc`?`desc`:`asc`:(Bh.value=Ph,Vh.value=Ph===`createdAt`?`desc`:`asc`)}function Wh(Ph){Hh.value=Hh.value===Ph?null:Ph}function Gh(Ph,Fh){zh(`patch`,Ph,Fh),Hh.value=null}function Kh(Ph){return Ph.status?Rh.columns.find(Fh=>Fh.id===Ph.status)?.label??``:``}function qh(Ph,Fh){return Ph===void 0&&Fh===void 0?0:Ph===void 0?1:Fh===void 0?-1:typeof Ph==`number`&&typeof Fh==`number`?Ph-Fh:typeof Ph==`boolean`&&typeof Fh==`boolean`?Ph===Fh?0:Ph?1:-1:String(Ph).localeCompare(String(Fh))}function Jh(Ph,Fh){switch(Fh){case`completed`:return Ph.completed;case`text`:return Ph.text.toLowerCase();case`status`:return Kh(Ph).toLowerCase();case`priority`:return Ph.priority?PRIORITY_ORDER[Ph.priority]:void 0;case`labels`:return(Ph.labels??[]).join(`,`).toLowerCase();case`dueDate`:return Ph.dueDate;case`createdAt`:return Ph.createdAt}}let Yh=computed(()=>{let Ph=[...Rh.filteredItems];return Ph.sort((Ph,Fh)=>{let Ih=qh(Jh(Ph,Bh.value),Jh(Fh,Bh.value));return Vh.value===`asc`?Ih:-Ih}),Ph});return(Fh,Rh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$14,[Ph.filteredItems.length===0?(openBlock(),createElementBlock(`div`,_hoisted_2$14,toDisplayString$1(unref(Ih)(`todoTableList.noMatchingFilter`)),1)):(openBlock(),createElementBlock(`table`,_hoisted_3$13,[createBaseVNode(`thead`,_hoisted_4$12,[createBaseVNode(`tr`,_hoisted_5$12,[(openBlock(),createElementBlock(Fragment,null,renderList(Lh,Ph=>createBaseVNode(`th`,{key:Ph.key,tabindex:`0`,"aria-sort":Bh.value===Ph.key?Vh.value===`asc`?`ascending`:`descending`:`none`,"aria-label":unref(Ih)(`todoTableList.sortColumnAria`,{column:Ph.ariaLabel??Ph.label}),class:`px-3 py-2 cursor-pointer hover:bg-gray-100 select-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400`,onClick:Fh=>Uh(Ph.key),onKeydown:[withKeys(withModifiers(Fh=>!Fh.repeat&&Uh(Ph.key),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Fh=>!Fh.repeat&&Uh(Ph.key),[`prevent`,`self`]),[`space`])]},[createTextVNode(toDisplayString$1(Ph.label)+` `,1),Bh.value===Ph.key?(openBlock(),createElementBlock(`span`,_hoisted_7$12,toDisplayString$1(Vh.value===`asc`?`arrow_upward`:`arrow_downward`),1)):createCommentVNode(``,!0)],40,_hoisted_6$12)),64)),Rh[1]||=createBaseVNode(`th`,{class:`px-3 py-2`},null,-1)])]),createBaseVNode(`tbody`,_hoisted_8$11,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Yh.value,Fh=>(openBlock(),createElementBlock(Fragment,{key:Fh.id},[createBaseVNode(`tr`,_hoisted_9$11,[createBaseVNode(`td`,_hoisted_10$10,[createBaseVNode(`input`,{type:`checkbox`,checked:Fh.completed,onChange:Ph=>zh(`toggleComplete`,Fh)},null,40,_hoisted_11$9)]),createBaseVNode(`td`,{tabindex:`0`,"aria-label":unref(Ih)(`todoTableList.expandRowAria`,{task:Fh.text}),class:`px-3 py-2 max-w-md cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400`,onClick:Ph=>Wh(Fh.id),onKeydown:[withKeys(withModifiers(Ph=>!Ph.repeat&&Wh(Fh.id),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Ph=>!Ph.repeat&&Wh(Fh.id),[`prevent`,`self`]),[`space`])]},[createBaseVNode(`div`,{class:normalizeClass(Fh.completed?`line-through text-gray-400`:`text-gray-800`)},toDisplayString$1(Fh.text),3),Fh.note?(openBlock(),createElementBlock(`div`,_hoisted_13$9,toDisplayString$1(Fh.note),1)):createCommentVNode(``,!0)],40,_hoisted_12$9),createBaseVNode(`td`,_hoisted_14$9,toDisplayString$1(Kh(Fh)),1),createBaseVNode(`td`,_hoisted_15$8,[Fh.priority?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(PRIORITY_CLASSES)[Fh.priority]])},toDisplayString$1(unref(PRIORITY_LABELS)[Fh.priority]),3)):createCommentVNode(``,!0)]),createBaseVNode(`td`,_hoisted_16$7,[createBaseVNode(`div`,_hoisted_17$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Fh.labels??[],Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(colorForLabel)(Ph)])},toDisplayString$1(Ph),3))),128))])]),createBaseVNode(`td`,_hoisted_18$7,[Fh.dueDate?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(dueDateClasses)(Fh.dueDate)])},toDisplayString$1(unref(formatDueLabel)(Fh.dueDate)),3)):createCommentVNode(``,!0)]),createBaseVNode(`td`,_hoisted_19$7,toDisplayString$1(unref(formatShortDate)(Fh.createdAt)),1),createBaseVNode(`td`,_hoisted_20$4,[createBaseVNode(`button`,{class:`text-gray-300 hover:text-red-500 text-xs`,title:unref(Ih)(`pluginTodo.deleteItem`),onClick:Ph=>zh(`delete`,Fh.id)},`✕`,8,_hoisted_21$4)])]),Hh.value===Fh.id?(openBlock(),createElementBlock(`tr`,_hoisted_22$4,[createBaseVNode(`td`,_hoisted_23$3,[createVNode$1(TodoEditPanel_default,{item:Fh,columns:Ph.columns,onSave:Ph=>Gh(Fh.id,Ph),onCancel:Rh[0]||=Ph=>Hh.value=null},null,8,[`item`,`columns`,`onSave`])])])):createCommentVNode(``,!0)],64))),128))])]))]))}}),TodoTableView_default=TodoTableView_vue_vue_type_script_setup_true_lang_default,_hoisted_1$13={class:`h-full overflow-y-auto p-4`},_hoisted_2$13={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_3$12={key:1,class:`space-y-2 max-w-3xl mx-auto`},_hoisted_4$11=[`aria-label`,`onClick`,`onKeydown`],_hoisted_5$11=[`checked`,`onChange`],_hoisted_6$11={class:`flex-1 min-w-0`},_hoisted_7$11={class:`flex items-center gap-2 flex-wrap`},_hoisted_8$10={key:0,class:`px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-gray-100 text-gray-600`},_hoisted_9$10={key:0,class:`text-xs text-gray-400 mt-0.5`},_hoisted_10$9=[`title`,`onClick`],TodoListView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoListView`,props:{filteredItems:{},columns:{}},emits:[`patch`,`delete`,`toggleComplete`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(null);function Bh(Ph){zh.value=zh.value===Ph?null:Ph}function Vh(Ph){Rh(`toggleComplete`,Ph)}function Hh(Ph,Fh){Rh(`patch`,Ph,Fh),zh.value=null}function Uh(Ph){return Ph.status?Lh.columns.find(Fh=>Fh.id===Ph.status)?.label??``:``}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$13,[Ph.filteredItems.length===0?(openBlock(),createElementBlock(`div`,_hoisted_2$13,toDisplayString$1(unref(Ih)(`todoTableList.noMatchingFilter`)),1)):(openBlock(),createElementBlock(`ul`,_hoisted_3$12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.filteredItems,Fh=>(openBlock(),createElementBlock(`li`,{key:Fh.id,class:`rounded-lg border border-gray-200 hover:border-gray-300 transition-colors`},[createBaseVNode(`div`,{tabindex:`0`,role:`button`,"aria-label":unref(Ih)(`todoTableList.expandRowAria`,{task:Fh.text}),class:`flex items-center gap-3 p-3 cursor-pointer group focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 rounded`,onClick:Ph=>Bh(Fh.id),onKeydown:[withKeys(withModifiers(Ph=>!Ph.repeat&&Bh(Fh.id),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Ph=>!Ph.repeat&&Bh(Fh.id),[`prevent`,`self`]),[`space`])]},[createBaseVNode(`input`,{type:`checkbox`,checked:Fh.completed,class:`cursor-pointer shrink-0`,onClick:Lh[0]||=withModifiers(()=>{},[`stop`]),onChange:Ph=>Vh(Fh)},null,40,_hoisted_5$11),createBaseVNode(`div`,_hoisted_6$11,[createBaseVNode(`div`,_hoisted_7$11,[createBaseVNode(`span`,{class:normalizeClass([`text-sm`,Fh.completed?`line-through text-gray-400`:`text-gray-800`])},toDisplayString$1(Fh.text),3),Uh(Fh)?(openBlock(),createElementBlock(`span`,_hoisted_8$10,toDisplayString$1(Uh(Fh)),1)):createCommentVNode(``,!0),Fh.priority?(openBlock(),createElementBlock(`span`,{key:1,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(PRIORITY_CLASSES)[Fh.priority]])},toDisplayString$1(unref(PRIORITY_LABELS)[Fh.priority]),3)):createCommentVNode(``,!0),Fh.dueDate?(openBlock(),createElementBlock(`span`,{key:2,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(dueDateClasses)(Fh.dueDate)])},toDisplayString$1(unref(formatDueLabel)(Fh.dueDate)),3)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Fh.labels??[],Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(colorForLabel)(Ph)])},toDisplayString$1(Ph),3))),128))]),Fh.note?(openBlock(),createElementBlock(`div`,_hoisted_9$10,toDisplayString$1(Fh.note),1)):createCommentVNode(``,!0)]),createBaseVNode(`button`,{class:`opacity-0 group-hover:opacity-100 text-gray-400 hover:text-red-500 text-xs px-1 shrink-0`,title:unref(Ih)(`pluginTodo.deleteItem`),onClick:withModifiers(Ph=>Rh(`delete`,Fh.id),[`stop`])},` ✕ `,8,_hoisted_10$9)],40,_hoisted_4$11),zh.value===Fh.id?(openBlock(),createBlock(TodoEditPanel_default,{key:0,item:Fh,columns:Ph.columns,onSave:Ph=>Hh(Fh.id,Ph),onCancel:Lh[1]||=Ph=>zh.value=null},null,8,[`item`,`columns`,`onSave`])):createCommentVNode(``,!0)]))),128))]))]))}}),TodoListView_default=TodoListView_vue_vue_type_script_setup_true_lang_default,_hoisted_1$12={id:`todo-add-dialog-title`,class:`text-base font-semibold text-gray-800`},_hoisted_2$12={class:`block text-xs text-gray-600`},_hoisted_3$11=[`placeholder`],_hoisted_4$10={class:`block text-xs text-gray-600`},_hoisted_5$10={class:`grid grid-cols-2 gap-3`},_hoisted_6$10={class:`block text-xs text-gray-600`},_hoisted_7$10=[`value`],_hoisted_8$9={class:`block text-xs text-gray-600`},_hoisted_9$9={value:``},_hoisted_10$8=[`value`],_hoisted_11$8={class:`block text-xs text-gray-600`},_hoisted_12$8={class:`block text-xs text-gray-600`},_hoisted_13$8=[`placeholder`],_hoisted_14$8={class:`flex justify-end gap-2 pt-1`},TodoAddDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoAddDialog`,props:{columns:{},defaultStatus:{}},emits:[`cancel`,`create`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(``),Bh=ref(``),Vh=ref(Lh.defaultStatus??Lh.columns[0]?.id??``),Hh=ref(``),Uh=ref(``),Wh=ref(``),Gh=ref(null);function Kh(Ph){Ph.key===`Escape`&&Rh(`cancel`)}onMounted(()=>{Gh.value?.focus(),document.addEventListener(`keydown`,Kh)}),onUnmounted(()=>{document.removeEventListener(`keydown`,Kh)});function qh(){let Ph=zh.value.trim();if(Ph.length===0)return;let Fh={text:Ph};Bh.value!==``&&(Fh.note=Bh.value),Vh.value!==``&&(Fh.status=Vh.value),Hh.value!==``&&(Fh.priority=Hh.value),Uh.value!==``&&(Fh.dueDate=Uh.value);let Ih=Wh.value.split(`,`).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0);Ih.length>0&&(Fh.labels=Ih),Rh(`create`,Fh)}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,{class:`fixed inset-0 z-50 bg-black/30 flex items-center justify-center`,onClick:Lh[8]||=Ph=>Rh(`cancel`)},[createBaseVNode(`div`,{class:`bg-white rounded-lg shadow-xl w-96 max-w-[90vw] p-5 space-y-3`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`todo-add-dialog-title`,onClick:Lh[7]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`h3`,_hoisted_1$12,toDisplayString$1(unref(Ih)(`todoDialogs.addTitle`)),1),createBaseVNode(`label`,_hoisted_2$12,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldText`))+` `,1),withDirectives(createBaseVNode(`input`,{ref_key:`textInput`,ref:Gh,"onUpdate:modelValue":Lh[0]||=Ph=>zh.value=Ph,type:`text`,placeholder:unref(Ih)(`todoDialogs.textPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,onKeydown:withKeys(qh,[`enter`])},null,40,_hoisted_3$11),[[vModelText,zh.value]])]),createBaseVNode(`label`,_hoisted_4$10,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldNote`))+` `,1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Lh[1]||=Ph=>Bh.value=Ph,rows:`2`,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded resize-y focus:outline-none focus:border-blue-400`},null,512),[[vModelText,Bh.value]])]),createBaseVNode(`div`,_hoisted_5$10,[createBaseVNode(`label`,_hoisted_6$10,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldStatus`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[2]||=Ph=>Vh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.columns,Ph=>(openBlock(),createElementBlock(`option`,{key:Ph.id,value:Ph.id},toDisplayString$1(Ph.label),9,_hoisted_7$10))),128))],512),[[vModelSelect,Vh.value]])]),createBaseVNode(`label`,_hoisted_8$9,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldPriority`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[3]||=Ph=>Hh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},[createBaseVNode(`option`,_hoisted_9$9,toDisplayString$1(unref(Ih)(`todoDialogs.noneOption`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(PRIORITIES),Ph=>(openBlock(),createElementBlock(`option`,{key:Ph,value:Ph},toDisplayString$1(unref(PRIORITY_LABELS)[Ph]),9,_hoisted_10$8))),128))],512),[[vModelSelect,Hh.value]])]),createBaseVNode(`label`,_hoisted_11$8,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldDueDate`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[4]||=Ph=>Uh.value=Ph,type:`date`,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},null,512),[[vModelText,Uh.value]])]),createBaseVNode(`label`,_hoisted_12$8,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldLabels`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[5]||=Ph=>Wh.value=Ph,type:`text`,placeholder:unref(Ih)(`todoDialogs.labelsPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},null,8,_hoisted_13$8),[[vModelText,Wh.value]])])]),createBaseVNode(`div`,_hoisted_14$8,[createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Lh[6]||=Ph=>Rh(`cancel`)},toDisplayString$1(unref(Ih)(`common.cancel`)),1),createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:qh},toDisplayString$1(unref(Ih)(`common.add`)),1)])])]))}}),TodoAddDialog_default=TodoAddDialog_vue_vue_type_script_setup_true_lang_default,_hoisted_1$11={class:`flex items-center justify-between px-4 py-2 border-b border-gray-100`},_hoisted_2$11={id:`todo-edit-dialog-title`,class:`text-base font-semibold text-gray-800`},_hoisted_3$10=[`title`],TodoEditDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoEditDialog`,props:{item:{},columns:{}},emits:[`save`,`cancel`,`delete`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Fh;function Rh(Ph){Ph.key===`Escape`&&Lh(`cancel`)}return onMounted(()=>document.addEventListener(`keydown`,Rh)),onUnmounted(()=>document.removeEventListener(`keydown`,Rh)),(Fh,Rh)=>(openBlock(),createElementBlock(`div`,{class:`fixed inset-0 z-50 bg-black/30 flex items-center justify-center`,onClick:Rh[4]||=Ph=>Lh(`cancel`)},[createBaseVNode(`div`,{class:`bg-white rounded-lg shadow-xl w-[28rem] max-w-[92vw] overflow-hidden`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`todo-edit-dialog-title`,onClick:Rh[3]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`div`,_hoisted_1$11,[createBaseVNode(`h3`,_hoisted_2$11,toDisplayString$1(unref(Ih)(`todoDialogs.editTitle`)),1),createBaseVNode(`button`,{class:`text-gray-400 hover:text-red-500 text-xs px-2 py-0.5`,title:unref(Ih)(`todoDialogs.deleteTitle`),onClick:Rh[0]||=Fh=>Lh(`delete`,Ph.item.id)},toDisplayString$1(unref(Ih)(`todoDialogs.deleteButton`)),9,_hoisted_3$10)]),createVNode$1(TodoEditPanel_default,{item:Ph.item,columns:Ph.columns,onSave:Rh[1]||=Ph=>Lh(`save`,Ph),onCancel:Rh[2]||=Ph=>Lh(`cancel`)},null,8,[`item`,`columns`])])]))}}),TodoEditDialog_default=TodoEditDialog_vue_vue_type_script_setup_true_lang_default,TODO_VIEW={kanban:`kanban`,table:`table`,list:`list`},TODO_VIEW_MODES=[{key:TODO_VIEW.kanban,label:`Kanban`,icon:`view_kanban`},{key:TODO_VIEW.table,label:`Table`,icon:`table_rows`},{key:TODO_VIEW.list,label:`List`,icon:`view_list`}],_hoisted_1$10={class:`h-full bg-white flex flex-col`},_hoisted_2$10={class:`flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-100 shrink-0`},_hoisted_3$9={class:`flex items-center gap-2 min-w-0`},_hoisted_4$9={class:`text-base font-semibold text-gray-800 shrink-0`},_hoisted_5$9={class:`text-xs text-gray-500 shrink-0`},_hoisted_6$9=[`placeholder`],_hoisted_7$9={class:`flex items-center gap-2`},_hoisted_8$8={class:`flex border border-gray-300 rounded overflow-hidden`},_hoisted_9$8=[`data-testid`,`title`,`onClick`],_hoisted_10$7={class:`material-icons text-sm`},_hoisted_11$7={key:0,class:`flex flex-wrap items-center gap-1.5 px-4 py-1.5 border-b border-gray-100 bg-gray-50 shrink-0`},_hoisted_12$7={class:`text-[11px] text-gray-500 mr-1`},_hoisted_13$7=[`onClick`],_hoisted_14$7={class:`opacity-60`},_hoisted_15$7=[`title`],_hoisted_16$6={key:1,class:`px-4 py-2 text-xs text-red-600 bg-red-50 border-b border-red-100 shrink-0`},_hoisted_17$6={class:`flex-1 min-h-0`},_hoisted_18$6={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_19$6={id:`todo-add-column-title`,class:`text-base font-semibold text-gray-800`},_hoisted_20$3={class:`block text-xs text-gray-600`},_hoisted_21$3=[`placeholder`],_hoisted_22$3={class:`flex justify-end gap-2 pt-1`},VIEW_MODE_KEY=`todo_explorer_view_mode`,TODO_FOCUS_MAX_RETRIES=10,TODO_FOCUS_RETRY_MS=150,TodoExplorer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoExplorer`,props:{selectedResult:{}},setup(Ph){let{t:Fh}=useI18n(),Ih=Ph,{items:Lh,columns:Rh,error:zh,refresh:Bh,createItem:Vh,patchItem:Hh,moveItem:Uh,deleteItem:Wh,addColumn:Gh,patchColumn:Kh,deleteColumn:qh,reorderColumns:Jh}=useTodos(Ih.selectedResult?.data?.items??[],Ih.selectedResult?.data?.columns??[]);watch(()=>Ih.selectedResult?.uuid,()=>{Lh.value=Ih.selectedResult?.data?.items??[],Rh.value=Ih.selectedResult?.data?.columns??[],Bh()});let Yh=new Set(Object.values(TODO_VIEW));function Xh(){let Ph=localStorage.getItem(VIEW_MODE_KEY);return Ph&&Yh.has(Ph)?Ph:TODO_VIEW.kanban}let Zh=ref(Xh());function Qh(Ph){Zh.value=Ph,localStorage.setItem(VIEW_MODE_KEY,Ph)}let $h=ref(``),eg=ref(new Set),tg=computed(()=>listLabelsWithCount(Lh.value));function ng(Ph){let Fh=Ph.toLowerCase(),Ih=new Set(eg.value);Ih.has(Fh)?Ih.delete(Fh):Ih.add(Fh),eg.value=Ih}function rg(){eg.value=new Set}let ig=computed(()=>{let Ph=filterByLabels(Lh.value,[...eg.value]),Fh=$h.value.trim().toLowerCase();return Fh.length===0?Ph:Ph.filter(Ph=>!!(Ph.text.toLowerCase().includes(Fh)||Ph.note?.toLowerCase().includes(Fh)))}),ag=computed(()=>Lh.value.filter(Ph=>Ph.completed).length),og=ref(!1),sg=ref(void 0);function cg(Ph){sg.value=Ph,og.value=!0}async function lg(Ph){await Vh(Ph)&&(og.value=!1,sg.value=void 0)}let ug=ref(!1),dg=ref(``);async function fg(){let Ph=dg.value.trim();Ph.length!==0&&await Gh({label:Ph})&&(ug.value=!1,dg.value=``)}function pg(Ph){Ph.key===`Escape`&&(ug.value&&=!1)}onMounted(()=>document.addEventListener(`keydown`,pg)),onUnmounted(()=>document.removeEventListener(`keydown`,pg));let mg=useRoute();async function hg(Ph){for(let Fh=0;Fh<TODO_FOCUS_MAX_RETRIES;Fh++){if(await nextTick$1(),scrollIntoViewByTestId(`todo-card-${Ph}`))return;await new Promise(Ph=>window.setTimeout(Ph,TODO_FOCUS_RETRY_MS))}}onMounted(()=>{let Ph=mg.params.itemId;typeof Ph==`string`&&Ph&&hg(Ph)}),watch(()=>mg.params.itemId,Ph=>{typeof Ph==`string`&&Ph&&hg(Ph)});function gg(Ph,Fh){Hh(Ph,Fh)}function _g(Ph){let Fh=Lh.value.find(Fh=>Fh.id===Ph);return!Fh||!window.confirm(`Delete "${Fh.text}"?`)?!1:(Wh(Ph),!0)}function vg(Ph){_g(Ph)}function yg(Ph){Hh(Ph.id,{completed:!Ph.completed})}function bg(Ph,Fh,Ih){Uh(Ph,{status:Fh,position:Ih})}let xg=ref(null);function Sg(Ph){xg.value=Ph}async function Cg(Ph){let Fh=xg.value;Fh&&await Hh(Fh.id,Ph)&&(xg.value=null)}function wg(Ph){_g(Ph)&&(xg.value=null)}function Tg(Ph,Fh){Kh(Ph,{label:Fh})}function Eg(Ph){let Fh=Rh.value.find(Fh=>Fh.id===Ph);Fh&&window.confirm(`Delete column "${Fh.label}"? Items in this column will be moved to another column.`)&&qh(Ph)}function Dg(Ph){Kh(Ph,{isDone:!0})}function Og(Ph){Jh(Ph)}return(Ph,Ih)=>(openBlock(),createElementBlock(`div`,_hoisted_1$10,[createBaseVNode(`div`,_hoisted_2$10,[createBaseVNode(`div`,_hoisted_3$9,[createBaseVNode(`h2`,_hoisted_4$9,toDisplayString$1(unref(Fh)(`todoExplorer.heading`)),1),createBaseVNode(`span`,_hoisted_5$9,toDisplayString$1(unref(Fh)(`todoExplorer.doneRatio`,{done:ag.value,total:unref(Lh).length})),1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[0]||=Ph=>$h.value=Ph,"data-testid":`todo-search`,type:`text`,placeholder:unref(Fh)(`todoExplorer.searchPlaceholder`),class:`h-8 px-2.5 text-sm border border-gray-200 rounded w-44 focus:outline-none focus:border-blue-400`},null,8,_hoisted_6$9),[[vModelText,$h.value]])]),createBaseVNode(`div`,_hoisted_7$9,[createBaseVNode(`button`,{"data-testid":`todo-add-btn`,class:`h-8 px-2.5 flex items-center gap-1 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:Ih[1]||=Ph=>og.value=!0},toDisplayString$1(unref(Fh)(`todoExplorer.addButton`)),1),Zh.value===unref(TODO_VIEW).kanban?(openBlock(),createElementBlock(`button`,{key:0,"data-testid":`todo-column-add-btn`,class:`h-8 px-2.5 flex items-center gap-1 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Ih[2]||=Ph=>ug.value=!0},toDisplayString$1(unref(Fh)(`todoExplorer.addColumnButton`)),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_8$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(TODO_VIEW_MODES),Ph=>(openBlock(),createElementBlock(`button`,{key:Ph.key,class:normalizeClass([`h-8 w-8 flex items-center justify-center`,Zh.value===Ph.key?`bg-blue-500 text-white`:`bg-white text-gray-600 hover:bg-gray-50`]),"data-testid":`todo-view-${Ph.key}`,title:Ph.label,onClick:Fh=>Qh(Ph.key)},[createBaseVNode(`span`,_hoisted_10$7,toDisplayString$1(Ph.icon),1)],10,_hoisted_9$8))),128))])])]),tg.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_11$7,[createBaseVNode(`span`,_hoisted_12$7,toDisplayString$1(unref(Fh)(`todoExplorer.labels`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(tg.value,Ph=>(openBlock(),createElementBlock(`button`,{key:Ph.label,class:normalizeClass([`px-2 py-0.5 rounded-full text-[10px] font-medium transition-all`,eg.value.has(Ph.label.toLowerCase())?`ring-2 ring-blue-400 `+unref(colorForLabel)(Ph.label):unref(colorForLabel)(Ph.label)+` opacity-70 hover:opacity-100`]),onClick:Fh=>ng(Ph.label)},[createTextVNode(toDisplayString$1(Ph.label)+` `,1),createBaseVNode(`span`,_hoisted_14$7,toDisplayString$1(Ph.count),1)],10,_hoisted_13$7))),128)),eg.value.size>0?(openBlock(),createElementBlock(`button`,{key:0,class:`ml-auto text-[11px] text-gray-500 hover:text-gray-700`,title:unref(Fh)(`todoExplorer.clearFiltersTitle`),onClick:rg},toDisplayString$1(unref(Fh)(`todoExplorer.clearButton`)),9,_hoisted_15$7)):createCommentVNode(``,!0)])):createCommentVNode(``,!0),unref(zh)?(openBlock(),createElementBlock(`div`,_hoisted_16$6,toDisplayString$1(unref(zh)),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_17$6,[unref(Lh).length===0?(openBlock(),createElementBlock(`div`,_hoisted_18$6,toDisplayString$1(unref(Fh)(`todoExplorer.emptyHint`)),1)):(openBlock(),createElementBlock(Fragment,{key:1},[Zh.value===unref(TODO_VIEW).kanban?(openBlock(),createBlock(TodoKanbanView_default,{key:0,"filtered-items":ig.value,columns:unref(Rh),onMove:bg,onOpen:Sg,onToggleComplete:yg,onQuickAdd:cg,onRenameColumn:Tg,onDeleteColumn:Eg,onMarkDone:Dg,onReorderColumns:Og},null,8,[`filtered-items`,`columns`])):Zh.value===unref(TODO_VIEW).table?(openBlock(),createBlock(TodoTableView_default,{key:1,"filtered-items":ig.value,columns:unref(Rh),onPatch:gg,onDelete:vg,onToggleComplete:yg},null,8,[`filtered-items`,`columns`])):(openBlock(),createBlock(TodoListView_default,{key:2,"filtered-items":ig.value,columns:unref(Rh),onPatch:gg,onDelete:vg,onToggleComplete:yg},null,8,[`filtered-items`,`columns`]))],64))]),og.value?(openBlock(),createBlock(TodoAddDialog_default,{key:2,columns:unref(Rh),"default-status":sg.value,onCancel:Ih[3]||=Ph=>og.value=!1,onCreate:lg},null,8,[`columns`,`default-status`])):createCommentVNode(``,!0),xg.value?(openBlock(),createBlock(TodoEditDialog_default,{key:3,item:xg.value,columns:unref(Rh),onCancel:Ih[4]||=Ph=>xg.value=null,onSave:Cg,onDelete:wg},null,8,[`item`,`columns`])):createCommentVNode(``,!0),ug.value?(openBlock(),createElementBlock(`div`,{key:4,class:`fixed inset-0 z-50 bg-black/30 flex items-center justify-center`,onClick:Ih[8]||=Ph=>ug.value=!1},[createBaseVNode(`div`,{class:`bg-white rounded-lg shadow-xl w-80 p-5 space-y-3`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`todo-add-column-title`,onClick:Ih[7]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`h3`,_hoisted_19$6,toDisplayString$1(unref(Fh)(`todoExplorer.addColumn`)),1),createBaseVNode(`label`,_hoisted_20$3,[createTextVNode(toDisplayString$1(unref(Fh)(`todoExplorer.newColumnLabelField`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[5]||=Ph=>dg.value=Ph,type:`text`,placeholder:unref(Fh)(`todoExplorer.newColumnPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,onKeydown:withKeys(fg,[`enter`])},null,40,_hoisted_21$3),[[vModelText,dg.value]])]),createBaseVNode(`div`,_hoisted_22$3,[createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Ih[6]||=Ph=>ug.value=!1},toDisplayString$1(unref(Fh)(`common.cancel`)),1),createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:fg},toDisplayString$1(unref(Fh)(`common.add`)),1)])])])):createCommentVNode(``,!0)]))}}),TodoExplorer_default=TodoExplorer_vue_vue_type_script_setup_true_lang_default,_hoisted_1$9={class:`m-4 mb-0 rounded border border-blue-200 bg-blue-50 text-sm`,"data-testid":`system-file-banner`},_hoisted_2$9={class:`flex items-start gap-2 px-3 py-2`},_hoisted_3$8={class:`flex-1 min-w-0`},_hoisted_4$8={class:`flex items-center gap-2 flex-wrap`},_hoisted_5$8={class:`font-semibold text-blue-900`},_hoisted_6$8={key:0,class:`mt-1 text-gray-700 leading-snug whitespace-pre-line`},_hoisted_7$8={key:1,class:`mt-1 text-xs text-gray-500`},_hoisted_8$7=[`href`],_hoisted_9$7=[`aria-label`],STORAGE_PREFIX=`systemFileBanner.collapsed.`,INFO_ICON=`ℹ️`,GITHUB_REPO_URL=`https://github.com/receptron/mulmoclaude/blob/main/`,SystemFileBanner_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SystemFileBanner`,props:{descriptor:{},path:{}},setup(Ph){let{t:Fh}=useI18n(),Ih=Ph;function Lh(Ph){return STORAGE_PREFIX+Ph}function Rh(Ph){try{return localStorage.getItem(Lh(Ph))===`1`}catch{return!1}}function zh(Ph,Fh){try{Fh?localStorage.setItem(Lh(Ph),`1`):localStorage.removeItem(Lh(Ph))}catch{}}let Bh=ref(Rh(Ih.descriptor.id));watch(()=>Ih.descriptor.id,Ph=>{Bh.value=Rh(Ph)});function Vh(){Bh.value=!Bh.value,zh(Ih.descriptor.id,Bh.value)}let Hh={"agent-managed-but-hand-editable":`bg-emerald-100 text-emerald-800`,"user-editable":`bg-blue-100 text-blue-800`,"agent-managed":`bg-amber-100 text-amber-800`,"fragile-format":`bg-orange-100 text-orange-800`,ephemeral:`bg-gray-200 text-gray-700`},Uh=computed(()=>Hh[Ih.descriptor.editPolicy]),Wh=computed(()=>Ih.descriptor.schemaRef?GITHUB_REPO_URL+Ih.descriptor.schemaRef:``);return(Ih,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$9,[createBaseVNode(`div`,_hoisted_2$9,[createBaseVNode(`span`,{class:`text-blue-600 shrink-0`,"aria-hidden":`true`},toDisplayString$1(INFO_ICON)),createBaseVNode(`div`,_hoisted_3$8,[createBaseVNode(`div`,_hoisted_4$8,[createBaseVNode(`span`,_hoisted_5$8,toDisplayString$1(unref(Fh)(`systemFiles.${Ph.descriptor.id}.title`)),1),createBaseVNode(`span`,{class:normalizeClass([`text-xs px-1.5 py-0.5 rounded shrink-0`,Uh.value])},toDisplayString$1(unref(Fh)(`systemFiles.editPolicy.${Ph.descriptor.editPolicy}`)),3)]),Bh.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`p`,_hoisted_6$8,toDisplayString$1(unref(Fh)(`systemFiles.${Ph.descriptor.id}.summary`)),1)),!Bh.value&&Ph.descriptor.schemaRef?(openBlock(),createElementBlock(`p`,_hoisted_7$8,[createTextVNode(toDisplayString$1(unref(Fh)(`systemFiles.schemaLabel`))+`: `,1),createBaseVNode(`a`,{href:Wh.value,target:`_blank`,rel:`noopener noreferrer`,class:`font-mono text-blue-700 hover:underline break-all`},toDisplayString$1(Ph.descriptor.schemaRef),9,_hoisted_8$7)])):createCommentVNode(``,!0)]),createBaseVNode(`button`,{type:`button`,class:`shrink-0 text-xs text-blue-700 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 rounded px-1`,"aria-label":Bh.value?unref(Fh)(`systemFiles.showDetails`):unref(Fh)(`systemFiles.hideDetails`),"data-testid":`system-file-banner-toggle`,onClick:Vh},toDisplayString$1(Bh.value?unref(Fh)(`systemFiles.showDetails`):unref(Fh)(`systemFiles.hideDetails`)),9,_hoisted_9$7)])]))}}),SystemFileBanner_default=SystemFileBanner_vue_vue_type_script_setup_true_lang_default,JSON_TOKEN_CLASS={key:`text-blue-700`,string:`text-green-700`,number:`text-orange-600`,keyword:`text-purple-700`,punct:`text-gray-500`,whitespace:``},MATCHERS=[{type:`string`,pattern:/^"(?:[^"\\]|\\.)*"/},{type:`keyword`,pattern:/^(?:true|false|null)\b/},{type:`number`,pattern:/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/},{type:`whitespace`,pattern:/^\s+/},{type:`punct`,pattern:/^[{}[\]:,]/}];function nextToken(Ph){for(let{type:Fh,pattern:Ih}of MATCHERS){let Lh=Ih.exec(Ph);if(Lh)return{type:Fh,value:Lh[0]}}return null}function tokenizeJson(Ph){let Fh=[],Ih=0;for(;Ih<Ph.length;){let Lh=nextToken(Ph.slice(Ih));if(!Lh){Fh.push({type:`punct`,value:Ph[Ih]}),Ih++;continue}Fh.push(Lh),Ih+=Lh.value.length}return markKeys(Fh),Fh}function markKeys(Ph){for(let Fh=0;Fh<Ph.length;Fh++){if(Ph[Fh].type!==`string`)continue;let Ih=Fh+1;for(;Ih<Ph.length&&Ph[Ih].type===`whitespace`;)Ih++;Ih<Ph.length&&Ph[Ih].type===`punct`&&Ph[Ih].value===`:`&&(Ph[Fh]={type:`key`,value:Ph[Fh].value})}}function prettyJson(Ph){try{return JSON.stringify(JSON.parse(Ph),null,2)}catch{return Ph}}function tokenizeJsonl(Ph){return Ph.split(/\r?\n/).filter(Ph=>Ph.trim().length>0).map(Ph=>{try{return{tokens:tokenizeJson(JSON.stringify(JSON.parse(Ph),null,2)),parseError:!1}}catch{return{tokens:tokenizeJson(Ph),parseError:!0}}})}var _hoisted_1$8={class:`flex-1 overflow-auto min-h-0`},_hoisted_2$8={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_3$7={key:1,class:`p-4 text-sm text-red-600`},_hoisted_4$7={key:2,class:`p-4 text-sm text-gray-400`},_hoisted_5$7={key:0,class:`h-full`},_hoisted_6$7={key:1,class:`h-full`},_hoisted_7$7={key:2,class:`h-full flex flex-col overflow-auto`},_hoisted_8$6={key:0,class:`shrink-0 m-4 mb-0 rounded border border-gray-200 bg-gray-50 p-3 text-xs`},_hoisted_9$6={class:`font-semibold text-gray-600 shrink-0`},_hoisted_10$6={key:0,class:`flex flex-wrap gap-1`},_hoisted_11$6={key:1,class:`text-gray-800 break-words`},_hoisted_12$6={key:1,class:`shrink-0 m-4 mt-0 rounded border border-red-300 bg-red-50 p-2 text-xs text-red-700`,role:`alert`},_hoisted_13$6={key:3,class:`p-4 text-xs whitespace-pre-wrap font-mono text-gray-800`},_hoisted_14$6=[`srcdoc`,`title`],_hoisted_15$6={key:5,class:`p-4 text-xs whitespace-pre-wrap font-mono text-gray-800`},_hoisted_16$5={key:6,class:`p-4 space-y-2`},_hoisted_17$5={key:0,class:`text-xs text-red-600 mb-1 font-sans`},_hoisted_18$5={class:`text-xs font-mono text-gray-800 whitespace-pre-wrap`},_hoisted_19$5={key:7,class:`p-4 text-xs whitespace-pre-wrap font-mono text-gray-800`},_hoisted_20$2={key:2,class:`h-full flex items-center justify-center p-4`},_hoisted_21$2=[`src`,`alt`],_hoisted_22$2=[`src`,`title`],_hoisted_23$2={key:4,class:`h-full flex items-center justify-center p-4`},_hoisted_24$2=[`src`],_hoisted_25$2={key:5,class:`h-full flex items-center justify-center p-4 bg-black`},_hoisted_26$2=[`src`],_hoisted_27$2={key:6,class:`p-4 text-sm text-gray-500`},FileContentRenderer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FileContentRenderer`,props:{selectedPath:{},content:{},contentError:{},contentLoading:{type:Boolean},schedulerResult:{},todoExplorerResult:{},isMarkdown:{type:Boolean},isHtml:{type:Boolean},isJson:{type:Boolean},isJsonl:{type:Boolean},mdRawMode:{type:Boolean},sandboxedHtml:{},jsonTokens:{},jsonlLines:{},mdFrontmatter:{},rawSaveError:{}},emits:[`markdownLinkClick`,`updateSource`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=computed(()=>Lh.selectedPath?descriptorForPath(Lh.selectedPath):null);function Bh(Ph){return`${API_ROUTES.files.raw}?path=${encodeURIComponent(Ph)}`}function Vh(Ph){let Fh=Lh.selectedPath??``,Ih=Fh.lastIndexOf(`/`),Rh=rewriteMarkdownImageRefs(Ph,Ih>=0?Fh.slice(0,Ih):``);return{uuid:`files-preview`,toolName:`text-response`,message:Rh,title:Lh.selectedPath??``,data:{text:Rh,role:`user`,transportKind:`text-rest`}}}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$8,[Ph.selectedPath?Ph.contentError?(openBlock(),createElementBlock(`div`,_hoisted_3$7,toDisplayString$1(Ph.contentError),1)):Ph.contentLoading?(openBlock(),createElementBlock(`div`,_hoisted_4$7,toDisplayString$1(unref(Ih)(`common.loading`)),1)):Ph.content?(openBlock(),createElementBlock(Fragment,{key:3},[zh.value&&Ph.selectedPath?(openBlock(),createBlock(SystemFileBanner_default,{key:0,descriptor:zh.value,path:Ph.selectedPath},null,8,[`descriptor`,`path`])):createCommentVNode(``,!0),Ph.content.kind===`text`?(openBlock(),createElementBlock(Fragment,{key:1},[Ph.schedulerResult?(openBlock(),createElementBlock(`div`,_hoisted_5$7,[createVNode$1(CalendarView_default,{"selected-result":Ph.schedulerResult},null,8,[`selected-result`])])):Ph.todoExplorerResult?(openBlock(),createElementBlock(`div`,_hoisted_6$7,[createVNode$1(TodoExplorer_default,{"selected-result":Ph.todoExplorerResult},null,8,[`selected-result`])])):Ph.isMarkdown&&!Ph.mdRawMode?(openBlock(),createElementBlock(`div`,_hoisted_7$7,[Ph.mdFrontmatter&&Ph.mdFrontmatter.fields.length>0?(openBlock(),createElementBlock(`div`,_hoisted_8$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.mdFrontmatter.fields,Ph=>(openBlock(),createElementBlock(`div`,{key:Ph.key,class:`flex items-baseline gap-2 py-0.5`},[createBaseVNode(`span`,_hoisted_9$6,toDisplayString$1(Ph.key)+`:`,1),Array.isArray(Ph.value)?(openBlock(),createElementBlock(`span`,_hoisted_10$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.value,Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:`rounded-full bg-white border border-gray-300 px-2 py-0.5 text-gray-700`},toDisplayString$1(Ph),1))),128))])):(openBlock(),createElementBlock(`span`,_hoisted_11$6,toDisplayString$1(Ph.value),1))]))),128))])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex-1 min-h-0`,onClickCapture:Lh[1]||=Ph=>Rh(`markdownLinkClick`,Ph)},[createVNode$1(View_default$15,{"selected-result":Vh(Ph.mdFrontmatter?Ph.mdFrontmatter.body:Ph.content.content),"editable-source":Ph.content.content,onUpdateSource:Lh[0]||=Ph=>Rh(`updateSource`,Ph)},null,8,[`selected-result`,`editable-source`])],32),Ph.rawSaveError?(openBlock(),createElementBlock(`div`,_hoisted_12$6,` ⚠ `+toDisplayString$1(Ph.rawSaveError),1)):createCommentVNode(``,!0)])):Ph.isMarkdown&&Ph.mdRawMode?(openBlock(),createElementBlock(`pre`,_hoisted_13$6,toDisplayString$1(Ph.content.content),1)):Ph.isHtml?(openBlock(),createElementBlock(`iframe`,{key:4,srcdoc:Ph.sandboxedHtml,class:`w-full h-full border-0`,sandbox:`allow-scripts`,title:unref(Ih)(`fileContentRenderer.htmlPreview`)},null,8,_hoisted_14$6)):Ph.isJson?(openBlock(),createElementBlock(`pre`,_hoisted_15$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.jsonTokens,(Ph,Fh)=>(openBlock(),createElementBlock(`span`,{key:Fh,class:normalizeClass(unref(JSON_TOKEN_CLASS)[Ph.type])},toDisplayString$1(Ph.value),3))),128))])):Ph.isJsonl?(openBlock(),createElementBlock(`div`,_hoisted_16$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.jsonlLines,(Ph,Fh)=>(openBlock(),createElementBlock(`div`,{key:Fh,class:normalizeClass([`rounded border bg-gray-50 p-3`,Ph.parseError?`border-red-300`:`border-gray-200`])},[Ph.parseError?(openBlock(),createElementBlock(`div`,_hoisted_17$5,toDisplayString$1(unref(Ih)(`fileContentRenderer.parseError`)),1)):createCommentVNode(``,!0),createBaseVNode(`pre`,_hoisted_18$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.tokens,(Ph,Fh)=>(openBlock(),createElementBlock(`span`,{key:Fh,class:normalizeClass(unref(JSON_TOKEN_CLASS)[Ph.type])},toDisplayString$1(Ph.value),3))),128))])],2))),128))])):(openBlock(),createElementBlock(`pre`,_hoisted_19$5,toDisplayString$1(Ph.content.content),1))],64)):Ph.content.kind===`image`&&Ph.selectedPath?(openBlock(),createElementBlock(`div`,_hoisted_20$2,[createBaseVNode(`img`,{src:Bh(Ph.selectedPath),alt:Ph.selectedPath,class:`max-w-full max-h-full object-contain`},null,8,_hoisted_21$2)])):Ph.content.kind===`pdf`&&Ph.selectedPath?(openBlock(),createElementBlock(`iframe`,{key:3,src:Bh(Ph.selectedPath),class:`w-full h-full border-0`,title:unref(Ih)(`fileContentRenderer.pdfPreview`)},null,8,_hoisted_22$2)):Ph.content.kind===`audio`&&Ph.selectedPath?(openBlock(),createElementBlock(`div`,_hoisted_23$2,[(openBlock(),createElementBlock(`audio`,{key:Ph.selectedPath,src:Bh(Ph.selectedPath),controls:``,preload:`metadata`,class:`w-full max-w-2xl`},null,8,_hoisted_24$2))])):Ph.content.kind===`video`&&Ph.selectedPath?(openBlock(),createElementBlock(`div`,_hoisted_25$2,[(openBlock(),createElementBlock(`video`,{key:Ph.selectedPath,src:Bh(Ph.selectedPath),controls:``,preload:`metadata`,class:`max-w-full max-h-full`},null,8,_hoisted_26$2))])):(openBlock(),createElementBlock(`div`,_hoisted_27$2,[`message`in Ph.content?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString$1(Ph.content.message),1)],64)):createCommentVNode(``,!0)]))],64)):createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_2$8,toDisplayString$1(unref(Ih)(`fileContentRenderer.selectFile`)),1))]))}}),FileContentRenderer_default=FileContentRenderer_vue_vue_type_script_setup_true_lang_default;function useFileTree(){let{expand:Ph}=useExpandedDirs(),Fh=ref(null),Ih=ref([]),Lh=ref(new Map),Rh=ref(null),zh=0;async function Bh(Ph){if(Lh.value.has(Ph))return;let Ih=zh,Bh=new Map(Lh.value);Bh.set(Ph,null),Lh.value=Bh;let Vh=await apiGet(API_ROUTES.files.dir,{path:Ph});if(Ih!==zh)return;if(!Vh.ok){let Fh=new Map(Lh.value);Fh.delete(Ph),Lh.value=Fh,Rh.value=Vh.error||`dir: ${Vh.status}`;return}let Hh=Vh.data,Uh=new Map(Lh.value);Uh.set(Ph,Hh.children??[]),Lh.value=Uh,Ph===``&&(Fh.value={...Hh,children:[]})}async function Vh(Fh){let Ih=Fh.split(`/`).filter(Boolean);if(Ih.length<=1)return;let Lh=[];for(let Ph=1;Ph<Ih.length;Ph++)Lh.push(Ih.slice(0,Ph).join(`/`));for(let Fh of Lh)Ph(Fh),await Bh(Fh)}async function Hh(){zh++,Fh.value=null,Lh.value=new Map,Rh.value=null,await Bh(``)}async function Uh(){let Ph=await apiGet(API_ROUTES.files.refRoots);Ph.ok&&Array.isArray(Ph.data)&&(Ih.value=Ph.data)}return{rootNode:Fh,refRoots:Ih,childrenByPath:Lh,treeError:Rh,loadDirChildren:Bh,ensureAncestorsLoaded:Vh,reloadRoot:Hh,loadRefRoots:Uh}}function isValidFilePath(Ph){return typeof Ph!=`string`||Ph.length===0||Ph.startsWith(`/`)?!1:!Ph.split(`/`).some(Ph=>Ph===`..`)}function readPathMatch(Ph){return Array.isArray(Ph)?Ph.length===0?null:Ph.join(`/`):isNonEmptyString(Ph)?Ph:null}function useFileSelection(){let Ph=useRoute(),Fh=useRouter(),Ih=readPathMatch(Ph.params.pathMatch),Lh=ref(isValidFilePath(Ih)?Ih:null),Rh=ref(null),zh=ref(!1),Bh=ref(null),Vh=null;async function Hh(Ph){Vh?.abort();let Fh=new AbortController;Vh=Fh,zh.value=!0,Bh.value=null,Rh.value=null;try{let Ih=await apiGet(API_ROUTES.files.content,{path:Ph},{signal:Fh.signal});if(Fh.signal.aborted)return;Ih.ok?Rh.value=Ih.data:Bh.value=Ih.error}finally{Vh===Fh&&(zh.value=!1,Vh=null)}}function Uh(Ih){Lh.value=Ih,Hh(Ih),Fh.push({name:`files`,params:{pathMatch:Ih.split(`/`)},query:Ph.query}).catch(Ph=>{isNavigationFailure(Ph)||console.error(`[selectFile] navigation failed:`,Ph)})}function Wh(){Vh?.abort(),Vh=null,Lh.value=null,Rh.value=null,zh.value=!1,Bh.value=null,Fh.replace({name:`files`,params:{pathMatch:[]},query:Ph.query}).catch(Ph=>{isNavigationFailure(Ph)||console.error(`[deselectFile] navigation failed:`,Ph)})}function Gh(){Vh?.abort(),Vh=null,zh.value=!1}return{selectedPath:Lh,content:Rh,contentLoading:zh,contentError:Bh,loadContent:Hh,selectFile:Uh,deselectFile:Wh,abortContent:Gh}}var MD_RAW_STORAGE_KEY=`files_md_raw_mode`;function useMarkdownMode(){let Ph=ref(localStorage.getItem(MD_RAW_STORAGE_KEY)===`true`);function Fh(){Ph.value=!Ph.value,localStorage.setItem(MD_RAW_STORAGE_KEY,String(Ph.value))}return{mdRawMode:Ph,toggleMdRaw:Fh}}var SORT_MODE_STORAGE_KEY=`files_sort_mode`;function readStoredMode(){return localStorage.getItem(SORT_MODE_STORAGE_KEY)===`recent`?`recent`:`name`}function useFileSortMode(){let Ph=ref(readStoredMode());function Fh(Fh){Ph.value=Fh,localStorage.setItem(SORT_MODE_STORAGE_KEY,Fh)}return{sortMode:Ph,setSortMode:Fh}}var HTML_PREVIEW_CSP_ALLOWED_CDNS=[`https://cdn.jsdelivr.net`,`https://unpkg.com`,`https://cdnjs.cloudflare.com`,`https://fonts.googleapis.com`,`https://fonts.gstatic.com`];function buildHtmlPreviewCsp(Ph=HTML_PREVIEW_CSP_ALLOWED_CDNS){let Fh=Ph.join(` `);return[`default-src 'none'`,`script-src 'unsafe-inline' ${Fh}`,`style-src 'unsafe-inline' ${Fh}`,`font-src ${Fh}`,`img-src 'self' ${Fh} data: blob:`,`connect-src 'none'`].join(`; `)}var CSP_META_NONCE=``;function wrapHtmlWithPreviewCsp(Ph){let Fh=`<meta http-equiv="Content-Security-Policy" content="${buildHtmlPreviewCsp()}">`;return/<head\b[^>]*>/i.test(Ph)?Ph.replace(/(<head\b[^>]*>)/i,`$1${Fh}`):`<!DOCTYPE html><html><head>${Fh}</head><body>${Ph}</body></html>${CSP_META_NONCE}`}function hasExt(Ph,Fh){if(!Ph)return!1;let Ih=Ph.toLowerCase();return Fh.some(Ph=>Ih.endsWith(Ph))}function useContentDisplay(Ph,Fh){let Ih=computed(()=>hasExt(Ph.value,[`.md`,`.markdown`])),Lh=computed(()=>hasExt(Ph.value,[`.html`,`.htm`])),Rh=computed(()=>hasExt(Ph.value,[`.json`])),zh=computed(()=>hasExt(Ph.value,[`.jsonl`,`.ndjson`]));return{isMarkdown:Ih,isHtml:Lh,isJson:Rh,isJsonl:zh,sandboxedHtml:computed(()=>Fh.value?.kind===`text`&&Lh.value?wrapHtmlWithPreviewCsp(Fh.value.content):``),jsonTokens:computed(()=>!Fh.value||Fh.value.kind!==`text`||!Rh.value?[]:tokenizeJson(prettyJson(Fh.value.content))),jsonlLines:computed(()=>!Fh.value||Fh.value.kind!==`text`||!zh.value?[]:tokenizeJsonl(Fh.value.content)),mdFrontmatter:computed(()=>!Fh.value||Fh.value.kind!==`text`||!Ih.value?null:extractFrontmatter(Fh.value.content))}}function useMarkdownLinkHandler(Ph,Fh){function Ih(Ih){if(Ih.button!==0||Ih.ctrlKey||Ih.metaKey||Ih.shiftKey)return;let Lh=Ih.target;if(!(Lh instanceof Element))return;let Rh=Lh.closest(`a`);if(!Rh)return;let zh=Rh.getAttribute(`href`);if(!zh||isExternalHref(zh)||zh.startsWith(`#`)||!Ph.value)return;let Bh=resolveWorkspaceLink(Ph.value,zh);if(!Bh)return;Ih.preventDefault(),Ih.stopPropagation();let Vh=extractSessionIdFromPath(Bh);if(Vh!==null){Fh.onLoadSession(Vh);return}Fh.onNavigate(Bh)}return{handleMarkdownLinkClick:Ih}}var WORKSPACE_FILES={memory:`conversations/memory.md`,sessionToken:`.session-token`,wikiIndex:`data/wiki/index.md`,wikiLog:`data/wiki/log.md`,wikiSchema:`data/wiki/SCHEMA.md`,wikiSummary:`data/wiki/summary.md`,summariesIndex:`conversations/summaries/_index.md`,todosItems:`data/todos/todos.json`,todosColumns:`data/todos/columns.json`,schedulerItems:`data/scheduler/items.json`,schedulerUserTasks:`config/scheduler/tasks.json`,schedulerOverrides:`config/scheduler/overrides.json`,newsReadState:`config/news-read-state.json`};function isScheduledItem(Ph){return!(!isRecord(Ph)||typeof Ph.id!=`string`||typeof Ph.title!=`string`)}function isScheduledItemArray(Ph){return Array.isArray(Ph)&&Ph.every(isScheduledItem)}function toSchedulerResult(Ph,Fh){if(Ph!==WORKSPACE_FILES.schedulerItems||Fh===null)return null;let Ih;try{Ih=JSON.parse(Fh)}catch{return null}return isScheduledItemArray(Ih)?{uuid:`files-scheduler-preview`,toolName:`manageCalendar`,message:WORKSPACE_FILES.schedulerItems,title:`Scheduler`,data:{items:Ih}}:null}function isTodoItem(Ph){return!(!isRecord(Ph)||typeof Ph.id!=`string`||typeof Ph.text!=`string`||typeof Ph.completed!=`boolean`||typeof Ph.createdAt!=`number`)}function isTodoItemArray(Ph){return Array.isArray(Ph)&&Ph.every(isTodoItem)}function toTodoExplorerResult(Ph,Fh){if(Ph!==WORKSPACE_FILES.todosItems||Fh===null)return null;let Ih;try{Ih=JSON.parse(Fh)}catch{return null}let Lh=isTodoItemArray(Ih)?Ih:[];return{uuid:`files-todo-preview`,toolName:`manageTodoList`,message:WORKSPACE_FILES.todosItems,title:`Todo`,data:{items:Lh,columns:[]}}}var _hoisted_1$7={class:`h-full flex bg-white`},_hoisted_2$7={class:`flex-1 flex flex-col min-w-0 overflow-hidden`},RECENT_THRESHOLD_MS=60*1e3,FilesView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FilesView`,props:{refreshToken:{}},emits:[`loadSession`],setup(Ph,{emit:Fh}){let Ih=useRoute(),Lh=Ph,Rh=Fh,{rootNode:zh,refRoots:Bh,childrenByPath:Vh,treeError:Hh,loadDirChildren:Uh,ensureAncestorsLoaded:Wh,reloadRoot:Gh,loadRefRoots:Kh}=useFileTree(),{selectedPath:qh,content:Jh,contentLoading:Yh,contentError:Xh,loadContent:Zh,selectFile:Qh,deselectFile:$h,abortContent:eg}=useFileSelection(),{mdRawMode:tg,toggleMdRaw:ng}=useMarkdownMode(),{sortMode:rg,setSortMode:ig}=useFileSortMode(),{isMarkdown:ag,isHtml:og,isJson:sg,isJsonl:cg,sandboxedHtml:lg,jsonTokens:ug,jsonlLines:dg,mdFrontmatter:fg}=useContentDisplay(qh,Jh),pg=ref(null);async function mg(Ph){if(!qh.value||Jh.value?.kind!==`text`||Ph===Jh.value.content)return;let Fh=qh.value;pg.value=null;let Ih=await apiPut(API_ROUTES.files.content,{path:Fh,content:Ph});if(qh.value===Fh){if(!Ih.ok){pg.value=Ih.error;return}Jh.value={kind:`text`,path:Ih.data.path,content:Ph,size:Ih.data.size,modifiedMs:Ih.data.modifiedMs}}}watch(Jh,()=>{pg.value=null});let hg=computed(()=>toSchedulerResult(qh.value,Jh.value?.kind===`text`?Jh.value.content:null)),gg=computed(()=>toTodoExplorerResult(qh.value,Jh.value?.kind===`text`?Jh.value.content:null)),_g=computed(()=>{let Ph=new Set,Fh=Date.now();for(let Ih of Vh.value.values())if(Ih)for(let Lh of Ih)Lh.type===`file`&&Lh.modifiedMs&&Fh-Lh.modifiedMs<RECENT_THRESHOLD_MS&&Ph.add(Lh.path);return Ph}),{handleMarkdownLinkClick:vg}=useMarkdownLinkHandler(qh,{onNavigate:Qh,onLoadSession:Ph=>Rh(`loadSession`,Ph)});return watch(()=>readPathMatch(Ih.params.pathMatch),Ph=>{if(!isValidFilePath(Ph)){qh.value!==null&&(qh.value=null,Jh.value=null);return}Ph!==qh.value&&(qh.value=Ph,Zh(Ph))}),watch(()=>Lh.refreshToken,()=>{Gh(),qh.value&&Zh(qh.value)}),onMounted(async()=>{await Uh(``),await Kh(),qh.value&&(await Wh(qh.value),Zh(qh.value))}),onUnmounted(()=>{eg()}),(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$7,[createVNode$1(FileTreePane_default,{"root-node":unref(zh),"ref-roots":unref(Bh),"children-by-path":unref(Vh),"tree-error":unref(Hh),"selected-path":unref(qh),"recent-paths":_g.value,"sort-mode":unref(rg),onSelect:unref(Qh),onLoadChildren:unref(Uh),"onUpdate:sortMode":unref(ig)},null,8,[`root-node`,`ref-roots`,`children-by-path`,`tree-error`,`selected-path`,`recent-paths`,`sort-mode`,`onSelect`,`onLoadChildren`,`onUpdate:sortMode`]),createBaseVNode(`div`,_hoisted_2$7,[createVNode$1(FileContentHeader_default,{"selected-path":unref(qh),size:unref(Jh)?.size??null,"modified-ms":unref(Jh)?.modifiedMs??null,"is-markdown":unref(ag),"md-raw-mode":unref(tg),onToggleMdRaw:unref(ng),onDeselect:unref($h)},null,8,[`selected-path`,`size`,`modified-ms`,`is-markdown`,`md-raw-mode`,`onToggleMdRaw`,`onDeselect`]),createVNode$1(FileContentRenderer_default,{"selected-path":unref(qh),content:unref(Jh),"content-error":unref(Xh),"content-loading":unref(Yh),"scheduler-result":hg.value,"todo-explorer-result":gg.value,"is-markdown":unref(ag),"is-html":unref(og),"is-json":unref(sg),"is-jsonl":unref(cg),"md-raw-mode":unref(tg),"sandboxed-html":unref(lg),"json-tokens":unref(ug),"jsonl-lines":unref(dg),"md-frontmatter":unref(fg),"raw-save-error":pg.value,onMarkdownLinkClick:unref(vg),onUpdateSource:mg},null,8,[`selected-path`,`content`,`content-error`,`content-loading`,`scheduler-result`,`todo-explorer-result`,`is-markdown`,`is-html`,`is-json`,`is-jsonl`,`md-raw-mode`,`sandboxed-html`,`json-tokens`,`jsonl-lines`,`md-frontmatter`,`raw-save-error`,`onMarkdownLinkClick`])])]))}}),FilesView_default=FilesView_vue_vue_type_script_setup_true_lang_default,MAX_RETRIES=10,RETRY_INTERVAL_MS=150,SourcesView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SourcesView`,setup(Ph){let Fh=useRoute();async function Ih(Ph){for(let Fh=0;Fh<MAX_RETRIES;Fh++){if(await nextTick$1(),scrollIntoViewByTestId(`source-row-${Ph}`))return;await new Promise(Ph=>window.setTimeout(Ph,RETRY_INTERVAL_MS))}}return onMounted(()=>{let Ph=Fh.params.slug;typeof Ph==`string`&&Ph&&Ih(Ph)}),watch(()=>Fh.params.slug,Ph=>{typeof Ph==`string`&&Ph&&Ih(Ph)}),(Ph,Fh)=>(openBlock(),createBlock(SourcesManager_default,{mode:`page`}))}}),SourcesView_default=SourcesView_vue_vue_type_script_setup_true_lang_default;function useNewsItems(){let Ph=ref([]),Fh=ref(!1),Ih=ref(null);async function Lh(Lh=30){Fh.value=!0,Ih.value=null;let Rh=await apiGet(`${API_ROUTES.news.items}?days=${Lh}`);if(Fh.value=!1,!Rh.ok){Ih.value=Rh.error;return}Ph.value=Rh.data.items}return{items:Ph,loading:Fh,error:Ih,load:Lh}}function useNewsReadState(){let Ph=ref(new Set),Fh=ref(null),Ih=Promise.resolve();async function Lh(){let Ih=await apiGet(API_ROUTES.news.readState);if(!Ih.ok){Fh.value=Ih.error;return}Fh.value=null,Ph.value=new Set(Ih.data.readIds)}async function Rh(){let Lh=Array.from(Ph.value),Rh=Ih.catch(()=>void 0).then(async()=>{let Ih=await apiPut(API_ROUTES.news.readState,{readIds:Lh});if(!Ih.ok){Fh.value=Ih.error;return}Fh.value=null,Ph.value=new Set(Ih.data.readIds)});return Ih=Rh,Rh}function zh(Fh){Ph.value.has(Fh)||(Ph.value.add(Fh),Ph.value=new Set(Ph.value),Rh())}function Bh(Fh){let Ih=!1;for(let Lh of Fh)Ph.value.has(Lh)||(Ph.value.add(Lh),Ih=!0);Ih&&(Ph.value=new Set(Ph.value),Rh())}function Vh(Fh){return Ph.value.has(Fh)}return{readIds:Ph,error:Fh,load:Lh,markRead:zh,markAllRead:Bh,isRead:Vh,readCount:computed(()=>Ph.value.size)}}var _hoisted_1$6={class:`h-full flex flex-col bg-white`,"data-testid":`news-view`},_hoisted_2$6={class:`px-3 py-2 border-b border-gray-200 flex flex-wrap items-center gap-2 shrink-0`},_hoisted_3$6={class:`text-base font-semibold text-gray-900 mr-3`},_hoisted_4$6={class:`text-xs text-gray-500`,"data-testid":`news-counts`},_hoisted_5$6={class:`ml-auto flex items-center gap-2`},_hoisted_6$6={class:`flex border border-gray-300 rounded overflow-hidden`,role:`tablist`},_hoisted_7$6=[`data-testid`,`aria-pressed`,`onClick`],_hoisted_8$5=[`disabled`],_hoisted_9$5={key:0,class:`px-3 py-2 border-b border-gray-100 flex flex-wrap items-center gap-1 shrink-0`},_hoisted_10$5={class:`flex-1 min-h-0 flex`},_hoisted_11$5={class:`w-80 shrink-0 border-r border-gray-200 overflow-y-auto`,"data-testid":`news-list`},_hoisted_12$5={key:0,class:`p-4 text-sm text-gray-400`},_hoisted_13$5={key:1,class:`p-4 text-sm text-red-600 bg-red-50`,role:`alert`},_hoisted_14$5={key:2,class:`p-4 text-sm text-gray-400`},_hoisted_15$5={key:3,class:`divide-y divide-gray-100`},_hoisted_16$4=[`data-testid`,`onClick`],_hoisted_17$4={class:`flex items-start gap-2`},_hoisted_18$4=[`title`,`aria-label`],_hoisted_19$4={class:`min-w-0 flex-1`},_hoisted_20$1={class:`mt-0.5 flex items-center gap-2 text-[11px] text-gray-500`},_hoisted_21$1={class:`truncate`},_hoisted_22$1={class:`flex-1 min-w-0 flex flex-col`,"data-testid":`news-detail`},_hoisted_23$1={key:0,class:`flex-1 flex items-center justify-center text-sm text-gray-400`},_hoisted_24$1={class:`flex-1 min-h-0 overflow-y-auto`},_hoisted_25$1={class:`px-6 py-4 max-w-3xl`},_hoisted_26$1={class:`text-xl font-semibold text-gray-900 leading-snug`},_hoisted_27$1={class:`mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500`},_hoisted_28$1=[`href`],_hoisted_29$1={class:`mt-4`},_hoisted_30$1={key:0,class:`text-sm text-gray-400`},_hoisted_31$1={key:1,class:`text-sm text-red-600`},_hoisted_32$1={key:2,class:`text-sm text-gray-400 italic`},_hoisted_33$1=[`innerHTML`],NewsView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`NewsView`,setup(Ph){let{t:Fh}=useI18n(),Ih=useRoute(),{items:Lh,loading:Rh,error:zh,load:Bh}=useNewsItems(),{isRead:Vh,markRead:Hh,markAllRead:Uh,load:Wh}=useNewsReadState(),Gh=ref(`unread`),Kh=ref(`all`),qh=ref(null),Jh=ref(null),Yh=ref(!1),Xh=ref(null),Zh=computed(()=>[{value:`unread`,label:Fh(`pluginNews.filterUnread`)},{value:`all`,label:Fh(`pluginNews.filterAll`)}]),Qh=computed(()=>Lh.value.filter(Ph=>!(Gh.value===`unread`&&Vh(Ph.id)||Kh.value!==`all`&&Ph.sourceSlug!==Kh.value))),$h=computed(()=>{let Ph=new Map;for(let Fh of Lh.value)Ph.set(Fh.sourceSlug,(Ph.get(Fh.sourceSlug)??0)+1);let Ih=Array.from(Ph.entries()).sort(([,Ph],[,Fh])=>Fh-Ph).map(([Ph,Fh])=>({slug:Ph,label:Ph,count:Fh}));return[{slug:`all`,label:Fh(`pluginNews.allSources`),count:Lh.value.length},...Ih]}),eg=computed(()=>Lh.value.filter(Ph=>!Vh(Ph.id)).length),tg=computed(()=>Lh.value.find(Ph=>Ph.id===qh.value)??null),ng=computed(()=>Jh.value?g$3(Jh.value,{breaks:!0,gfm:!0}):``);function rg(Ph){qh.value=Ph,setTimeout(()=>{qh.value===Ph&&Hh(Ph)},250)}function ig(){Uh(Lh.value.map(Ph=>Ph.id))}let ag=0;watch(()=>qh.value,async Ph=>{if(Jh.value=null,Xh.value=null,!Ph)return;Yh.value=!0;let Fh=++ag,Ih=await apiGet(API_ROUTES.news.itemBody.replace(`:id`,encodeURIComponent(Ph)));if(Fh===ag){if(Yh.value=!1,!Ih.ok){Xh.value=Ih.error;return}Jh.value=Ih.data.body}});function og(){let Ph=Ih.query.source;typeof Ph==`string`&&Ph.length>0&&(Kh.value=Ph)}return onMounted(async()=>{og(),await Promise.all([Bh(),Wh()])}),watch(()=>Ih.query.source,()=>og()),(Ph,Ih)=>(openBlock(),createElementBlock(`div`,_hoisted_1$6,[createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`h1`,_hoisted_3$6,toDisplayString$1(unref(Fh)(`pluginNews.title`)),1),createBaseVNode(`span`,_hoisted_4$6,toDisplayString$1(unref(Fh)(`pluginNews.itemCount`,{unread:eg.value,total:unref(Lh).length})),1),createBaseVNode(`div`,_hoisted_5$6,[createBaseVNode(`div`,_hoisted_6$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Zh.value,Ph=>(openBlock(),createElementBlock(`button`,{key:Ph.value,class:normalizeClass([`h-8 px-2.5 flex items-center gap-1 text-sm transition-colors`,Gh.value===Ph.value?`bg-blue-50 text-blue-600 font-medium`:`bg-white text-gray-600 hover:bg-gray-50`]),"data-testid":`news-filter-${Ph.value}`,"aria-pressed":Gh.value===Ph.value,onClick:Fh=>Gh.value=Ph.value},toDisplayString$1(Ph.label),11,_hoisted_7$6))),128))]),createBaseVNode(`button`,{class:`h-8 px-2.5 flex items-center gap-1 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed`,disabled:eg.value===0,"data-testid":`news-mark-all-read`,onClick:ig},toDisplayString$1(unref(Fh)(`pluginNews.markAllRead`)),9,_hoisted_8$5)])]),$h.value.length>1?(openBlock(),createElementBlock(`div`,_hoisted_9$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList($h.value,Ph=>(openBlock(),createBlock(FilterChip_default,{key:Ph.slug,active:Kh.value===Ph.slug,label:Ph.label,count:Ph.count,"data-testid":`news-source-${Ph.slug}`,onClick:Fh=>Kh.value=Ph.slug},null,8,[`active`,`label`,`count`,`data-testid`,`onClick`]))),128))])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_10$5,[createBaseVNode(`div`,_hoisted_11$5,[unref(Rh)?(openBlock(),createElementBlock(`div`,_hoisted_12$5,toDisplayString$1(unref(Fh)(`common.loading`)),1)):unref(zh)?(openBlock(),createElementBlock(`div`,_hoisted_13$5,toDisplayString$1(unref(Fh)(`pluginNews.loadError`,{error:unref(zh)})),1)):Qh.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_14$5,toDisplayString$1(unref(Fh)(`pluginNews.empty`)),1)):(openBlock(),createElementBlock(`ul`,_hoisted_15$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Qh.value,Ph=>(openBlock(),createElementBlock(`li`,{key:Ph.id,class:normalizeClass([`px-3 py-2 cursor-pointer`,qh.value===Ph.id?`bg-blue-50`:`hover:bg-gray-50`]),"data-testid":`news-item-${Ph.id}`,onClick:Fh=>rg(Ph.id)},[createBaseVNode(`div`,_hoisted_17$4,[unref(Vh)(Ph.id)?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,{key:0,class:`mt-1 w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0`,title:unref(Fh)(`pluginNews.unread`),"aria-label":unref(Fh)(`pluginNews.unread`)},null,8,_hoisted_18$4)),createBaseVNode(`div`,_hoisted_19$4,[createBaseVNode(`div`,{class:normalizeClass([`text-sm leading-snug`,unref(Vh)(Ph.id)?`text-gray-500`:`text-gray-900 font-medium`])},toDisplayString$1(Ph.title),3),createBaseVNode(`div`,_hoisted_20$1,[createBaseVNode(`span`,_hoisted_21$1,toDisplayString$1(Ph.sourceSlug),1),createBaseVNode(`span`,null,toDisplayString$1(unref(formatSmartTime)(Ph.publishedAt)),1)])])])],10,_hoisted_16$4))),128))]))]),createBaseVNode(`div`,_hoisted_22$1,[tg.value?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_24$1,[createBaseVNode(`div`,_hoisted_25$1,[createBaseVNode(`h2`,_hoisted_26$1,toDisplayString$1(tg.value.title),1),createBaseVNode(`div`,_hoisted_27$1,[createBaseVNode(`span`,null,toDisplayString$1(tg.value.sourceSlug),1),createBaseVNode(`span`,null,toDisplayString$1(unref(formatSmartTime)(tg.value.publishedAt)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(tg.value.categories,Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:`text-[10px] px-1.5 py-0.5 rounded bg-gray-100 text-gray-600`},toDisplayString$1(Ph),1))),128))]),createBaseVNode(`a`,{href:tg.value.url,target:`_blank`,rel:`noopener noreferrer`,class:`mt-3 inline-flex items-center gap-1 text-sm text-blue-600 hover:underline`,"data-testid":`news-open-original`},[Ih[0]||=createBaseVNode(`span`,{class:`material-icons text-sm`},`open_in_new`,-1),createTextVNode(` `+toDisplayString$1(unref(Fh)(`pluginNews.openOriginal`)),1)],8,_hoisted_28$1),createBaseVNode(`div`,_hoisted_29$1,[Yh.value?(openBlock(),createElementBlock(`div`,_hoisted_30$1,toDisplayString$1(unref(Fh)(`common.loading`)),1)):Xh.value?(openBlock(),createElementBlock(`div`,_hoisted_31$1,toDisplayString$1(unref(Fh)(`pluginNews.bodyError`,{error:Xh.value})),1)):Jh.value?(openBlock(),createElementBlock(`div`,{key:3,class:`markdown-content prose prose-slate max-w-none`,innerHTML:ng.value},null,8,_hoisted_33$1)):(openBlock(),createElementBlock(`div`,_hoisted_32$1,toDisplayString$1(unref(Fh)(`pluginNews.noBody`)),1))])])]),(openBlock(),createBlock(PageChatComposer_default,{key:tg.value.id,placeholder:unref(Fh)(`pluginNews.chatPlaceholder`),"prepend-text":`Read this article. ${tg.value.url}`,"allow-empty":!0,"test-id-prefix":`news-page-chat`},null,8,[`placeholder`,`prepend-text`]))],64)):(openBlock(),createElementBlock(`div`,_hoisted_23$1,toDisplayString$1(unref(Fh)(`pluginNews.selectPrompt`)),1))])])]))}}),NewsView_default=NewsView_vue_vue_type_script_setup_true_lang_default,MCP_CATALOG=[{id:`memory`,displayName:`settingsMcpTab.catalog.entry.memory.displayName`,description:`settingsMcpTab.catalog.entry.memory.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/memory`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-memory`]},configSchema:[],riskLevel:`low`},{id:`sequential-thinking`,displayName:`settingsMcpTab.catalog.entry.sequentialThinking.displayName`,description:`settingsMcpTab.catalog.entry.sequentialThinking.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-sequential-thinking`]},configSchema:[],riskLevel:`low`},{id:`context7`,displayName:`settingsMcpTab.catalog.entry.context7.displayName`,description:`settingsMcpTab.catalog.entry.context7.description`,audience:`general`,upstreamUrl:`https://github.com/upstash/context7`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@upstash/context7-mcp`]},configSchema:[],riskLevel:`low`},{id:`deepwiki`,displayName:`settingsMcpTab.catalog.entry.deepwiki.displayName`,description:`settingsMcpTab.catalog.entry.deepwiki.description`,audience:`general`,upstreamUrl:`https://docs.devin.ai/work-with-devin/deepwiki-mcp`,spec:{type:`http`,url:`https://mcp.deepwiki.com/sse`},configSchema:[],riskLevel:`low`},{id:`notion`,displayName:`settingsMcpTab.catalog.entry.notion.displayName`,description:`settingsMcpTab.catalog.entry.notion.description`,audience:`general`,upstreamUrl:`https://github.com/makenotion/notion-mcp-server`,setupGuideUrl:`https://www.notion.so/help/create-integrations-with-the-notion-api`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@notionhq/notion-mcp-server`],env:{OPENAPI_MCP_HEADERS:'{"Authorization":"Bearer ${NOTION_API_KEY}","Notion-Version":"2022-06-28"}'}},configSchema:[{key:`NOTION_API_KEY`,label:`settingsMcpTab.catalog.entry.notion.field.apiKey.label`,kind:`secret`,placeholder:`secret_...`,required:!0,helpUrl:`https://www.notion.so/my-integrations`,helpText:`settingsMcpTab.catalog.entry.notion.field.apiKey.help`}],riskLevel:`medium`},{id:`slack`,displayName:`settingsMcpTab.catalog.entry.slack.displayName`,description:`settingsMcpTab.catalog.entry.slack.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/slack`,setupGuideUrl:`https://api.slack.com/quickstart`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-slack`],env:{SLACK_BOT_TOKEN:"${SLACK_BOT_TOKEN}",SLACK_TEAM_ID:"${SLACK_TEAM_ID}"}},configSchema:[{key:`SLACK_BOT_TOKEN`,label:`settingsMcpTab.catalog.entry.slack.field.botToken.label`,kind:`secret`,placeholder:`xoxb-...`,required:!0,helpUrl:`https://api.slack.com/apps`,helpText:`settingsMcpTab.catalog.entry.slack.field.botToken.help`},{key:`SLACK_TEAM_ID`,label:`settingsMcpTab.catalog.entry.slack.field.teamId.label`,kind:`text`,placeholder:`T01ABC23DEF`,required:!0,helpUrl:`https://api.slack.com/methods/team.info`,helpText:`settingsMcpTab.catalog.entry.slack.field.teamId.help`}],riskLevel:`medium`},{id:`google-maps`,displayName:`settingsMcpTab.catalog.entry.googleMaps.displayName`,description:`settingsMcpTab.catalog.entry.googleMaps.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/google-maps`,setupGuideUrl:`https://developers.google.com/maps/documentation/javascript/get-api-key`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-google-maps`],env:{GOOGLE_MAPS_API_KEY:"${GOOGLE_MAPS_API_KEY}"}},configSchema:[{key:`GOOGLE_MAPS_API_KEY`,label:`settingsMcpTab.catalog.entry.googleMaps.field.apiKey.label`,kind:`secret`,placeholder:`AIza...`,required:!0,helpUrl:`https://console.cloud.google.com/google/maps-apis/credentials`,helpText:`settingsMcpTab.catalog.entry.googleMaps.field.apiKey.help`}],riskLevel:`low`},{id:`weather-open-meteo`,displayName:`settingsMcpTab.catalog.entry.weatherOpenMeteo.displayName`,description:`settingsMcpTab.catalog.entry.weatherOpenMeteo.description`,audience:`general`,upstreamUrl:`https://open-meteo.com/`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`mcp-server-open-meteo`]},configSchema:[],riskLevel:`low`}];function requiredKeysOf(Ph){return new Set(Ph.configSchema.filter(Ph=>Ph.required).map(Ph=>Ph.key))}var PLACEHOLDER=/\$\{([A-Z_][A-Z0-9_]*)\}/g;function interpolateMcpSpec(Ph,Fh,Ih){let Lh=new Set,Rh=new Set,zh=Ph=>Ph.replace(PLACEHOLDER,(Ph,zh)=>{Rh.add(zh);let Bh=Fh[zh];return Bh===void 0||Bh===``?(Ih.has(zh)&&Lh.add(zh),``):Bh}),Bh;Bh=Ph.type===`http`?{type:`http`,url:zh(Ph.url),...Ph.headers!==void 0&&{headers:mapValues(Ph.headers,zh)},...Ph.enabled!==void 0&&{enabled:Ph.enabled}}:{type:`stdio`,command:zh(Ph.command),...Ph.args!==void 0&&{args:Ph.args.map(zh)},...Ph.env!==void 0&&{env:mapValues(Ph.env,zh)},...Ph.enabled!==void 0&&{enabled:Ph.enabled}};for(let Ph of Ih)Rh.has(Ph)||Lh.add(Ph);return Lh.size>0?{ok:!1,missing:[...Lh]}:{ok:!0,spec:Bh}}function mapValues(Ph,Fh){let Ih={};for(let[Lh,Rh]of Object.entries(Ph))Ih[Lh]=Fh(Rh);return Ih}var _hoisted_1$5={class:`space-y-3`},_hoisted_2$5={"data-testid":`mcp-catalog`,class:`space-y-2 pt-1`},_hoisted_3$5={class:`text-xs font-semibold text-gray-700`},_hoisted_4$5={class:`group`,open:``,"data-testid":`mcp-catalog-audience-general`},_hoisted_5$5={class:`cursor-pointer text-xs font-medium text-gray-700 select-none py-1`},_hoisted_6$5={class:`text-gray-400 ml-1`},_hoisted_7$5={class:`mt-2 space-y-2`},_hoisted_8$4=[`data-testid`],_hoisted_9$4={class:`flex items-start gap-2 cursor-pointer`},_hoisted_10$4=[`checked`,`data-testid`,`onChange`],_hoisted_11$4={class:`flex-1 min-w-0`},_hoisted_12$4={class:`flex items-center gap-2 flex-wrap`},_hoisted_13$4={class:`text-sm font-semibold text-gray-800`},_hoisted_14$4={class:`text-xs text-gray-600 mt-0.5`},_hoisted_15$4={class:`text-[11px] text-gray-500 flex flex-wrap gap-x-3 ml-6`},_hoisted_16$3=[`href`,`data-testid`,`textContent`],_hoisted_17$3=[`href`,`data-testid`,`textContent`],_hoisted_18$3=[`data-testid`,`onSubmit`],_hoisted_19$3={class:`flex items-center gap-1.5`},_hoisted_20=[`for`],_hoisted_21=[`aria-label`],_hoisted_22=[`href`,`title`,`aria-label`,`data-testid`],_hoisted_23=[`id`,`onUpdate:modelValue`,`aria-required`,`data-testid`],_hoisted_24={key:0,value:``},_hoisted_25=[`value`],_hoisted_26=[`id`,`onUpdate:modelValue`,`type`,`placeholder`,`aria-required`,`data-testid`],_hoisted_27={key:2,class:`text-[11px] text-gray-500`},_hoisted_28=[`data-testid`],_hoisted_29={class:`flex gap-2 justify-end`},_hoisted_30=[`data-testid`],_hoisted_31=[`data-testid`],_hoisted_32={class:`text-xs font-semibold text-gray-700`},_hoisted_33={key:0,class:`text-xs text-gray-500 italic`,"data-testid":`mcp-empty`},_hoisted_34={key:1,class:`space-y-2`,"data-testid":`mcp-server-list`},_hoisted_35=[`data-testid`],_hoisted_36={class:`flex items-center justify-between`},_hoisted_37={class:`flex items-center gap-2`},_hoisted_38={class:`text-sm font-semibold text-gray-800`},_hoisted_39={class:`flex items-center gap-1 text-xs text-gray-600 ml-2`},_hoisted_40=[`checked`,`data-testid`,`onChange`],_hoisted_41=[`data-testid`,`onClick`],_hoisted_42={key:0,class:`text-xs space-y-1`},_hoisted_43={class:`text-gray-500`},_hoisted_44={class:`ml-1`},_hoisted_45={key:1,class:`text-xs space-y-1`},_hoisted_46={class:`text-gray-500`},_hoisted_47={class:`ml-1`},_hoisted_48={key:0,class:`ml-1`},_hoisted_49=[`data-testid`],_hoisted_50={key:3,class:`border border-blue-300 rounded p-3 space-y-2`,"data-testid":`mcp-add-form`},_hoisted_51={class:`block text-xs font-semibold text-gray-700`},_hoisted_52=[`placeholder`],_hoisted_53={class:`flex gap-3 text-xs`},_hoisted_54={class:`flex items-center gap-1`},_hoisted_55={class:`flex items-center gap-1`},_hoisted_56={key:0,class:`space-y-2`},_hoisted_57={class:`block text-xs font-semibold text-gray-700`},_hoisted_58=[`placeholder`],_hoisted_59={key:1,class:`space-y-2`},_hoisted_60={class:`block text-xs font-semibold text-gray-700`},_hoisted_61={class:`block text-xs font-semibold text-gray-700`},_hoisted_62=[`placeholder`],_hoisted_63={key:2,class:`text-xs text-red-600`,"data-testid":`mcp-draft-error`},_hoisted_64={class:`flex justify-end gap-2`},CONFIG_DRAFT_LS_PREFIX=`mcp-catalog-draft:`,SettingsMcpTab_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SettingsMcpTab`,props:{servers:{},dockerMode:{type:Boolean}},emits:[`add`,`update`,`remove`],setup(Ph,{expose:Fh,emit:Ih}){let{t:Lh}=useI18n(),Rh=Ph,zh=Ih,Bh=ref(!1),Vh=ref(ig()),Hh=ref(``),Uh=computed(()=>MCP_CATALOG.filter(Ph=>Ph.audience===`general`));function Wh(Ph){return Rh.servers.some(Fh=>Fh.id===Ph)}function Gh(Ph,Fh){if(Fh.target.checked){if(Ph.configSchema.length>0){Yh(Ph),Fh.target.checked=!1;return}zh(`add`,{id:Ph.id,spec:{...Ph.spec,enabled:!0}});return}let Ih=Rh.servers.findIndex(Fh=>Fh.id===Ph.id);Ih>=0&&zh(`remove`,Ih)}let Kh=ref(null),qh=ref({}),Jh=ref([]);function Yh(Ph){Kh.value=Ph.id,Jh.value=[],qh.value=$h(Ph.id);for(let Fh of Ph.configSchema)qh.value[Fh.key]===void 0&&(qh.value[Fh.key]=``)}function Xh(){Kh.value=null,qh.value={},Jh.value=[]}function Zh(){Xh()}function Qh(Ph){Jh.value=[];let Fh=interpolateMcpSpec(Ph.spec,qh.value,requiredKeysOf(Ph));if(!Fh.ok){Jh.value=Fh.missing,eg(Ph.id,qh.value,Ph.configSchema);return}zh(`add`,{id:Ph.id,spec:{...Fh.spec,enabled:!0}}),tg(Ph.id),Xh()}function $h(Ph){try{let Fh=window.localStorage.getItem(CONFIG_DRAFT_LS_PREFIX+Ph);if(!Fh)return{};let Ih=JSON.parse(Fh);if(!Ih||typeof Ih!=`object`||Array.isArray(Ih))return{};let Lh={};for(let[Ph,Fh]of Object.entries(Ih))typeof Fh==`string`&&(Lh[Ph]=Fh);return Lh}catch{return{}}}function eg(Ph,Fh,Ih){let Lh=new Set(Ih.filter(Ph=>Ph.kind===`secret`).map(Ph=>Ph.key)),Rh={};for(let[Ph,Ih]of Object.entries(Fh))Lh.has(Ph)||(Rh[Ph]=Ih);try{window.localStorage.setItem(CONFIG_DRAFT_LS_PREFIX+Ph,JSON.stringify(Rh))}catch{}}function tg(Ph){try{window.localStorage.removeItem(CONFIG_DRAFT_LS_PREFIX+Ph)}catch{}}function ng(Ph){return Ph.kind===`secret`?`password`:Ph.kind===`url`?`url`:`text`}function rg(Ph){return Ph===`low`?`bg-green-100 text-green-700`:Ph===`medium`?`bg-amber-100 text-amber-700`:`bg-red-100 text-red-700`}function ig(){return{id:``,type:`http`,url:``,command:`npx`,argsText:``}}function ag(){Vh.value=ig(),Hh.value=``,Bh.value=!0}function og(){Bh.value=!1,Hh.value=``}let sg=/^[a-z][a-z0-9_-]{0,63}$/;function cg(Ph){return Ph.type===`http`?lg(Ph.url.trim()):ug(Ph.argsText.split(`
4888
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qh(Ph){return Yh(Ph)||Xh(Ph)||Kh(Ph)||Zh()}var $h=Ih(`a352`),eg=Ih.n($h);function tg(Ph){Ph.parentElement!==null&&Ph.parentElement.removeChild(Ph)}function ng(Ph,Fh,Ih){var Lh=Ih===0?Ph.children[0]:Ph.children[Ih-1].nextSibling;Ph.insertBefore(Fh,Lh)}var rg=Ih(`dbf1`);Ih(`13d5`),Ih(`4fad`),Ih(`ac1f`),Ih(`5319`);function ig(Ph){var Fh=Object.create(null);return function(Ih){return Fh[Ih]||(Fh[Ih]=Ph(Ih))}}var ag=/-(\w)/g,og=ig(function(Ph){return Ph.replace(ag,function(Ph,Fh){return Fh.toUpperCase()})});Ih(`5db7`),Ih(`73d9`);var sg=[`Start`,`Add`,`Remove`,`Update`,`End`],cg=[`Choose`,`Unchoose`,`Sort`,`Filter`,`Clone`],lg=[`Move`],ug=[lg,sg,cg].flatMap(function(Ph){return Ph}).map(function(Ph){return`on${Ph}`}),dg={manage:lg,manageAndEmit:sg,emit:cg};function fg(Ph){return ug.indexOf(Ph)!==-1}Ih(`caad`),Ih(`2ca0`);var pg=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.math.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.slot.small.source.span.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`);function mg(Ph){return pg.includes(Ph)}function hg(Ph){return[`transition-group`,`TransitionGroup`].includes(Ph)}function gg(Ph){return[`id`,`class`,`role`,`style`].includes(Ph)||Ph.startsWith(`data-`)||Ph.startsWith(`aria-`)||Ph.startsWith(`on`)}function _g(Ph){return Ph.reduce(function(Ph,Fh){var Ih=Jh(Fh,2),Lh=Ih[0];return Ph[Lh]=Ih[1],Ph},{})}function vg(Ph){var Fh=Ph.$attrs,Ih=Ph.componentData,Lh=Ih===void 0?{}:Ih;return Hh(Hh({},_g(Object.entries(Fh).filter(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0];return Fh[1],gg(Ih)}))),Lh)}function yg(Ph){var Fh=Ph.$attrs,Ih=Ph.callBackBuilder,Lh=_g(bg(Fh));Object.entries(Ih).forEach(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0],Rh=Fh[1];dg[Ih].forEach(function(Ph){Lh[`on${Ph}`]=Rh(Ph)})});var Rh=`[data-draggable]${Lh.draggable||``}`;return Hh(Hh({},Lh),{},{draggable:Rh})}function bg(Ph){return Object.entries(Ph).filter(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0];return Fh[1],!gg(Ih)}).map(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0],Lh=Fh[1];return[og(Ih),Lh]}).filter(function(Ph){var Fh=Jh(Ph,2),Ih=Fh[0];return Fh[1],!fg(Ih)})}Ih(`c740`);function xg(Ph,Fh){if(!(Ph instanceof Fh))throw TypeError(`Cannot call a class as a function`)}function Sg(Ph,Fh){for(var Ih=0;Ih<Fh.length;Ih++){var Lh=Fh[Ih];Lh.enumerable=Lh.enumerable||!1,Lh.configurable=!0,`value`in Lh&&(Lh.writable=!0),Object.defineProperty(Ph,Lh.key,Lh)}}function Cg(Ph,Fh,Ih){return Fh&&Sg(Ph.prototype,Fh),Ih&&Sg(Ph,Ih),Ph}var wg=function(Ph){return Ph.el},Tg=function(Ph,Fh){return Ph.__draggable_context=Fh},Eg=function(Ph){return Ph.__draggable_context},Dg=function(){function Ph(Fh){var Ih=Fh.nodes,Lh=Ih.header,Rh=Ih.default,zh=Ih.footer,Bh=Fh.root,Vh=Fh.realList;xg(this,Ph),this.defaultNodes=Rh,this.children=[].concat(Qh(Lh),Qh(Rh),Qh(zh)),this.externalComponent=Bh.externalComponent,this.rootTransition=Bh.transition,this.tag=Bh.tag,this.realList=Vh}return Cg(Ph,[{key:`render`,value:function(Ph,Fh){var Ih=this.tag,Lh=this.children;return Ph(Ih,Fh,this._isRootComponent?{default:function(){return Lh}}:Lh)}},{key:`updated`,value:function(){var Ph=this.defaultNodes,Fh=this.realList;Ph.forEach(function(Ph,Ih){Tg(wg(Ph),{element:Fh[Ih],index:Ih})})}},{key:`getUnderlyingVm`,value:function(Ph){return Eg(Ph)}},{key:`getVmIndexFromDomIndex`,value:function(Ph,Fh){var Ih=this.defaultNodes,Lh=Ih.length,Rh=Fh.children,zh=Rh.item(Ph);if(zh===null)return Lh;var Bh=Eg(zh);if(Bh)return Bh.index;if(Lh===0)return 0;var Vh=wg(Ih[0]);return Ph<Qh(Rh).findIndex(function(Ph){return Ph===Vh})?0:Lh}},{key:`_isRootComponent`,get:function(){return this.externalComponent||this.rootTransition}}]),Ph}(),Og=Ih(`8bbf`);function kg(Ph,Fh){var Ih=Ph[Fh];return Ih?Ih():[]}function Ag(Ph){var Fh=Ph.$slots,Ih=Ph.realList,Lh=Ph.getKey,Rh=Ih||[],zh=Jh([`header`,`footer`].map(function(Ph){return kg(Fh,Ph)}),2),Bh=zh[0],Vh=zh[1],Uh=Fh.item;if(!Uh)throw Error(`draggable element must have an item slot`);var Wh=Rh.flatMap(function(Ph,Fh){return Uh({element:Ph,index:Fh}).map(function(Fh){return Fh.key=Lh(Ph),Fh.props=Hh(Hh({},Fh.props||{}),{},{"data-draggable":!0}),Fh})});if(Wh.length!==Rh.length)throw Error(`Item slot must have only one child`);return{header:Bh,footer:Vh,default:Wh}}function jg(Ph){var Fh=hg(Ph),Ih=!mg(Ph)&&!Fh;return{transition:Fh,externalComponent:Ih,tag:Ih?(0,Og.resolveComponent)(Ph):Fh?Og.TransitionGroup:Ph}}function Mg(Ph){var Fh=Ph.$slots,Ih=Ph.tag,Lh=Ph.realList,Rh=Ph.getKey;return new Dg({nodes:Ag({$slots:Fh,realList:Lh,getKey:Rh}),root:jg(Ih),realList:Lh})}function Ng(Ph,Fh){var Ih=this;(0,Og.nextTick)(function(){return Ih.$emit(Ph.toLowerCase(),Fh)})}function Pg(Ph){var Fh=this;return function(Ih,Lh){if(Fh.realList!==null)return Fh[`onDrag${Ph}`](Ih,Lh)}}function Fg(Ph){var Fh=this,Ih=Pg.call(this,Ph);return function(Lh,Rh){Ih.call(Fh,Lh,Rh),Ng.call(Fh,Ph,Lh)}}var Ig=null,Lg={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(Ph){return Ph}},tag:{type:String,default:`div`},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Rg=[`update:modelValue`,`change`].concat(Qh([].concat(Qh(dg.manageAndEmit),Qh(dg.emit)).map(function(Ph){return Ph.toLowerCase()})));Fh.default=(0,Og.defineComponent)({name:`draggable`,inheritAttrs:!1,props:Lg,emits:Rg,data:function(){return{error:!1}},render:function(){try{this.error=!1;var Ph=this.$slots,Fh=this.$attrs,Ih=this.tag,Lh=this.componentData,Rh=this.realList,zh=this.getKey,Bh=Mg({$slots:Ph,tag:Ih,realList:Rh,getKey:zh});this.componentStructure=Bh;var Vh=vg({$attrs:Fh,componentData:Lh});return Bh.render(Og.h,Vh)}catch(Ph){return this.error=!0,(0,Og.h)(`pre`,{style:{color:`red`}},Ph.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&rg.a.error(`modelValue and list props are mutually exclusive! Please set one or another.`)},mounted:function(){var Ph=this;if(!this.error){var Fh=this.$attrs,Ih=this.$el;this.componentStructure.updated();var Lh=yg({$attrs:Fh,callBackBuilder:{manageAndEmit:function(Fh){return Fg.call(Ph,Fh)},emit:function(Fh){return Ng.bind(Ph,Fh)},manage:function(Fh){return Pg.call(Ph,Fh)}}}),Rh=Ih.nodeType===1?Ih:Ih.parentElement;this._sortable=new eg.a(Rh,Lh),this.targetDomElement=Rh,Rh.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){return this.list||this.modelValue},getKey:function(){var Ph=this.itemKey;return typeof Ph==`function`?Ph:function(Fh){return Fh[Ph]}}},watch:{$attrs:{handler:function(Ph){var Fh=this._sortable;Fh&&bg(Ph).forEach(function(Ph){var Ih=Jh(Ph,2),Lh=Ih[0],Rh=Ih[1];Fh.option(Lh,Rh)})},deep:!0}},methods:{getUnderlyingVm:function(Ph){return this.componentStructure.getUnderlyingVm(Ph)||null},getUnderlyingPotencialDraggableComponent:function(Ph){return Ph.__draggable_component__},emitChanges:function(Ph){var Fh=this;(0,Og.nextTick)(function(){return Fh.$emit(`change`,Ph)})},alterList:function(Ph){if(this.list){Ph(this.list);return}var Fh=Qh(this.modelValue);Ph(Fh),this.$emit(`update:modelValue`,Fh)},spliceList:function(){var Ph=arguments;this.alterList(function(Fh){return Fh.splice.apply(Fh,Qh(Ph))})},updatePosition:function(Ph,Fh){this.alterList(function(Ih){return Ih.splice(Fh,0,Ih.splice(Ph,1)[0])})},getRelatedContextFromMoveEvent:function(Ph){var Fh=Ph.to,Ih=Ph.related,Lh=this.getUnderlyingPotencialDraggableComponent(Fh);if(!Lh)return{component:Lh};var Rh=Lh.realList,zh={list:Rh,component:Lh};return Fh!==Ih&&Rh?Hh(Hh({},Lh.getUnderlyingVm(Ih)||{}),zh):zh},getVmIndexFromDomIndex:function(Ph){return this.componentStructure.getVmIndexFromDomIndex(Ph,this.targetDomElement)},onDragStart:function(Ph){this.context=this.getUnderlyingVm(Ph.item),Ph.item._underlying_vm_=this.clone(this.context.element),Ig=Ph.item},onDragAdd:function(Ph){var Fh=Ph.item._underlying_vm_;if(Fh!==void 0){tg(Ph.item);var Ih=this.getVmIndexFromDomIndex(Ph.newIndex);this.spliceList(Ih,0,Fh);var Lh={element:Fh,newIndex:Ih};this.emitChanges({added:Lh})}},onDragRemove:function(Ph){if(ng(this.$el,Ph.item,Ph.oldIndex),Ph.pullMode===`clone`){tg(Ph.clone);return}var Fh=this.context,Ih=Fh.index,Lh=Fh.element;this.spliceList(Ih,1);var Rh={element:Lh,oldIndex:Ih};this.emitChanges({removed:Rh})},onDragUpdate:function(Ph){tg(Ph.item),ng(Ph.from,Ph.item,Ph.oldIndex);var Fh=this.context.index,Ih=this.getVmIndexFromDomIndex(Ph.newIndex);this.updatePosition(Fh,Ih);var Lh={element:this.context.element,oldIndex:Fh,newIndex:Ih};this.emitChanges({moved:Lh})},computeFutureIndex:function(Ph,Fh){if(!Ph.element)return 0;var Ih=Qh(Fh.to.children).filter(function(Ph){return Ph.style.display!==`none`}),Lh=Ih.indexOf(Fh.related),Rh=Ph.component.getVmIndexFromDomIndex(Lh);return Ih.indexOf(Ig)!==-1||!Fh.willInsertAfter?Rh:Rh+1},onDragMove:function(Ph,Fh){var Ih=this.move,Lh=this.realList;if(!Ih||!Lh)return!0;var Rh=this.getRelatedContextFromMoveEvent(Ph),zh=this.computeFutureIndex(Rh,Ph),Bh=Hh(Hh({},this.context),{},{futureIndex:zh});return Ih(Hh(Hh({},Ph),{},{relatedContext:Rh,draggedContext:Bh}),Fh)},onDragEnd:function(){Ig=null}}})}),fb6a:(function(Ph,Fh,Ih){var Lh=Ih(`23e7`),Rh=Ih(`861d`),zh=Ih(`e8b5`),Bh=Ih(`23cb`),Vh=Ih(`50c4`),Hh=Ih(`fc6a`),Uh=Ih(`8418`),Wh=Ih(`b622`),Gh=Ih(`1dde`),Kh=Ih(`ae40`),qh=Gh(`slice`),Jh=Kh(`slice`,{ACCESSORS:!0,0:0,1:2}),Yh=Wh(`species`),Xh=[].slice,Zh=Math.max;Lh({target:`Array`,proto:!0,forced:!qh||!Jh},{slice:function(Ph,Fh){var Ih=Hh(this),Lh=Vh(Ih.length),Wh=Bh(Ph,Lh),Gh=Bh(Fh===void 0?Lh:Fh,Lh),Kh,qh,Jh;if(zh(Ih)&&(Kh=Ih.constructor,typeof Kh==`function`&&(Kh===Array||zh(Kh.prototype))?Kh=void 0:Rh(Kh)&&(Kh=Kh[Yh],Kh===null&&(Kh=void 0)),Kh===Array||Kh===void 0))return Xh.call(Ih,Wh,Gh);for(qh=new(Kh===void 0?Array:Kh)(Zh(Gh-Wh,0)),Jh=0;Wh<Gh;Wh++,Jh++)Wh in Ih&&Uh(qh,Jh,Ih[Wh]);return qh.length=Jh,qh}})}),fc6a:(function(Ph,Fh,Ih){var Lh=Ih(`44ad`),Rh=Ih(`1d80`);Ph.exports=function(Ph){return Lh(Rh(Ph))}}),fdbc:(function(Ph,Fh){Ph.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),fdbf:(function(Ph,Fh,Ih){Ph.exports=Ih(`4930`)&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})}).default})})),import_vuedraggable_umd=__toESM(require_vuedraggable_umd(),1),PRIORITY_ORDER={low:0,medium:1,high:2,urgent:3},PRIORITY_LABELS={low:`Low`,medium:`Medium`,high:`High`,urgent:`Urgent`},PRIORITY_CLASSES={low:`bg-slate-100 text-slate-600`,medium:`bg-sky-100 text-sky-700`,high:`bg-orange-100 text-orange-700`,urgent:`bg-red-100 text-red-700`},PRIORITY_BORDER={low:`border-l-slate-300`,medium:`border-l-sky-400`,high:`border-l-orange-400`,urgent:`border-l-red-500`},PRIORITIES=[`low`,`medium`,`high`,`urgent`];function dueDateClasses(Ph){if(!Ph)return``;let Fh=todayISO();if(Ph<Fh)return`bg-red-100 text-red-700`;if(Ph===Fh)return`bg-orange-100 text-orange-700`;let Ih=new Date(Fh),Lh=new Date(Ph);return Math.round((Lh.getTime()-Ih.getTime())/(1e3*60*60*24))<=3?`bg-yellow-100 text-yellow-700`:`bg-gray-100 text-gray-600`}function todayISO(){let Ph=new Date;return`${Ph.getFullYear()}-${String(Ph.getMonth()+1).padStart(2,`0`)}-${String(Ph.getDate()).padStart(2,`0`)}`}function formatDueLabel(Ph){if(!Ph)return``;let Fh=new Date(`${Ph}T00:00:00`);if(Number.isNaN(Fh.getTime()))return Ph;let Ih=new Date,Lh=Fh.getFullYear()===Ih.getFullYear();return Fh.toLocaleDateString(void 0,{month:`short`,day:`numeric`,...Lh?{}:{year:`numeric`}})}var _hoisted_1$16={class:`h-full overflow-x-auto overflow-y-hidden`},_hoisted_2$16=[`data-testid`],_hoisted_3$15={class:`flex items-center justify-between px-3 py-2 border-b border-gray-200 col-handle cursor-grab active:cursor-grabbing`},_hoisted_4$14={class:`flex items-center gap-2 min-w-0`},_hoisted_5$14=[`title`],_hoisted_6$14=[`onKeydown`,`onBlur`],_hoisted_7$14={class:`text-xs text-gray-500 shrink-0`},_hoisted_8$13={class:`relative`},_hoisted_9$13=[`title`,`onClick`],_hoisted_10$12=[`onClick`],_hoisted_11$11=[`onClick`],_hoisted_12$11=[`onClick`],_hoisted_13$11=[`data-testid`,`aria-label`,`onClick`,`onKeydown`],_hoisted_14$10={class:`flex items-start gap-2`},_hoisted_15$9=[`checked`,`onChange`],_hoisted_16$8={class:`flex-1 min-w-0`},_hoisted_17$8={key:0,class:`text-[11px] text-gray-400 mt-0.5 line-clamp-2`},_hoisted_18$8={key:1,class:`flex flex-wrap gap-1 mt-1.5`},_hoisted_19$8=[`onClick`],TodoKanbanView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoKanbanView`,props:{filteredItems:{},columns:{}},emits:[`move`,`open`,`toggleComplete`,`quickAdd`,`renameColumn`,`deleteColumn`,`markDone`,`reorderColumns`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref([...Lh.columns]);watch(()=>Lh.columns,Ph=>{zh.value=[...Ph]});function Bh(){let Ph=Lh.columns.map(Ph=>Ph.id),Fh=zh.value.map(Ph=>Ph.id);Ph.length===Fh.length&&Ph.every((Ph,Ih)=>Ph===Fh[Ih])||Rh(`reorderColumns`,Fh)}let Vh=computed(()=>{let Ph=new Map;for(let Fh of Lh.columns)Ph.set(Fh.id,[]);for(let Fh of Lh.filteredItems){let Ih=Fh.status??Lh.columns[0]?.id;Ih&&(Ph.has(Ih)||Ph.set(Ih,[]),Ph.get(Ih).push(Fh))}for(let Fh of Ph.values())Fh.sort((Ph,Fh)=>(Ph.order??0)-(Fh.order??0));return Ph});function Hh(Ph){return Vh.value.get(Ph)??[]}function Uh(Ph,Fh){if(Fh.added){Rh(`move`,Fh.added.element.id,Ph,Fh.added.newIndex);return}Fh.moved&&Rh(`move`,Fh.moved.element.id,Ph,Fh.moved.newIndex)}let Wh=ref(null),Gh=ref(null),Kh=ref(``),qh=ref(null);function Jh(Ph){Wh.value=Wh.value===Ph?null:Ph}function Yh(Ph){Wh.value=null,Gh.value=Ph.id,Kh.value=Ph.label,nextTick$1(()=>{let Ph=qh.value,Fh=Array.isArray(Ph)?Ph[0]:Ph;Fh?.focus(),Fh?.select()})}function Xh(Ph){if(Gh.value!==Ph)return;let Fh=Kh.value.trim();if(Gh.value=null,Fh.length===0)return;let Ih=Lh.columns.find(Fh=>Fh.id===Ph);!Ih||Ih.label===Fh||Rh(`renameColumn`,Ph,Fh)}function Zh(Ph){Wh.value=null,Rh(`deleteColumn`,Ph)}function Qh(Ph){Wh.value=null,Rh(`markDone`,Ph)}return(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$16,[createVNode$1(unref(import_vuedraggable_umd.default),{list:zh.value,"item-key":`id`,group:`todo-columns`,handle:`.col-handle`,animation:150,class:`flex gap-3 h-full p-3 min-w-max`,onEnd:Bh},{item:withCtx(({element:Ph})=>[createBaseVNode(`div`,{"data-testid":`todo-column-${Ph.id}`,class:`w-72 shrink-0 flex flex-col bg-gray-100 rounded-lg`},[createBaseVNode(`div`,_hoisted_3$15,[createBaseVNode(`div`,_hoisted_4$14,[createBaseVNode(`span`,{class:normalizeClass([`w-2 h-2 rounded-full shrink-0`,Ph.isDone?`bg-green-500`:`bg-gray-400`])},null,2),Gh.value===Ph.id?withDirectives((openBlock(),createElementBlock(`input`,{key:1,ref_key:`renameInput`,ref:qh,"onUpdate:modelValue":Fh[0]||=Ph=>Kh.value=Ph,class:`px-1 py-0.5 text-sm bg-white border border-blue-400 rounded w-32`,onKeydown:[withKeys(Fh=>Xh(Ph.id),[`enter`]),Fh[1]||=withKeys(Ph=>Gh.value=null,[`escape`])],onBlur:Fh=>Xh(Ph.id)},null,40,_hoisted_6$14)),[[vModelText,Kh.value]]):(openBlock(),createElementBlock(`span`,{key:0,class:`font-semibold text-sm text-gray-700 truncate`,title:Ph.label},toDisplayString$1(Ph.label),9,_hoisted_5$14)),createBaseVNode(`span`,_hoisted_7$14,toDisplayString$1(Hh(Ph.id).length),1)]),createBaseVNode(`div`,_hoisted_8$13,[createBaseVNode(`button`,{class:`text-gray-400 hover:text-gray-600 px-1`,title:unref(Ih)(`todoKanban.columnActions`),onClick:Fh=>Jh(Ph.id)},[...Fh[4]||=[createBaseVNode(`span`,{class:`material-icons text-base`},`more_horiz`,-1)]],8,_hoisted_9$13),Wh.value===Ph.id?(openBlock(),createElementBlock(`div`,{key:0,class:`absolute right-0 top-6 z-20 bg-white border border-gray-200 rounded shadow-md text-xs w-40 py-1`,onClick:Fh[2]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`button`,{class:`w-full text-left px-3 py-1.5 hover:bg-gray-50`,onClick:Fh=>Yh(Ph)},toDisplayString$1(unref(Ih)(`todoKanban.rename`)),9,_hoisted_10$12),createBaseVNode(`button`,{class:`w-full text-left px-3 py-1.5 hover:bg-gray-50`,onClick:Fh=>Qh(Ph.id)},toDisplayString$1(Ph.isDone?unref(Ih)(`todoKanban.alreadyDoneColumn`):unref(Ih)(`todoKanban.markAsDoneColumn`)),9,_hoisted_11$11),createBaseVNode(`button`,{class:`w-full text-left px-3 py-1.5 text-red-600 hover:bg-red-50`,onClick:Fh=>Zh(Ph.id)},toDisplayString$1(unref(Ih)(`todoKanban.deleteColumn`)),9,_hoisted_12$11)])):createCommentVNode(``,!0)])]),createVNode$1(unref(import_vuedraggable_umd.default),{"model-value":Hh(Ph.id),"item-key":`id`,group:`todos`,class:`flex-1 overflow-y-auto p-2 space-y-2 min-h-[2rem]`,animation:150,onChange:Fh=>Uh(Ph.id,Fh)},{item:withCtx(({element:Ph})=>[createBaseVNode(`div`,{"data-testid":`todo-card-${Ph.id}`,tabindex:`0`,role:`button`,"aria-label":unref(Ih)(`todoKanban.openCardAria`,{task:Ph.text}),class:normalizeClass([`bg-white border border-l-4 border-gray-200 rounded shadow-sm p-2 cursor-grab hover:shadow active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400`,Ph.priority?unref(PRIORITY_BORDER)[Ph.priority]:`border-l-gray-200`]),onClick:Fh=>Rh(`open`,Ph),onKeydown:[withKeys(withModifiers(Fh=>!Fh.repeat&&Rh(`open`,Ph),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Fh=>!Fh.repeat&&Rh(`open`,Ph),[`prevent`,`self`]),[`space`])]},[createBaseVNode(`div`,_hoisted_14$10,[createBaseVNode(`input`,{type:`checkbox`,checked:Ph.completed,class:`mt-0.5 cursor-pointer shrink-0`,onClick:Fh[3]||=withModifiers(()=>{},[`stop`]),onChange:Fh=>Rh(`toggleComplete`,Ph)},null,40,_hoisted_15$9),createBaseVNode(`div`,_hoisted_16$8,[createBaseVNode(`div`,{class:normalizeClass([`text-sm`,Ph.completed?`line-through text-gray-400`:`text-gray-800`])},toDisplayString$1(Ph.text),3),Ph.note?(openBlock(),createElementBlock(`div`,_hoisted_17$8,toDisplayString$1(Ph.note),1)):createCommentVNode(``,!0),Ph.labels&&Ph.labels.length>0||Ph.priority||Ph.dueDate?(openBlock(),createElementBlock(`div`,_hoisted_18$8,[Ph.priority?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(PRIORITY_CLASSES)[Ph.priority]])},toDisplayString$1(unref(PRIORITY_LABELS)[Ph.priority]),3)):createCommentVNode(``,!0),Ph.dueDate?(openBlock(),createElementBlock(`span`,{key:1,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(dueDateClasses)(Ph.dueDate)])},toDisplayString$1(unref(formatDueLabel)(Ph.dueDate)),3)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.labels??[],Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(colorForLabel)(Ph)])},toDisplayString$1(Ph),3))),128))])):createCommentVNode(``,!0)])])],42,_hoisted_13$11)]),_:1},8,[`model-value`,`onChange`]),createBaseVNode(`button`,{class:`m-2 text-xs text-gray-500 hover:text-gray-800 hover:bg-gray-200 rounded py-1.5 transition-colors`,onClick:Fh=>Rh(`quickAdd`,Ph.id)},toDisplayString$1(unref(Ih)(`todoKanban.addCard`)),9,_hoisted_19$8)],8,_hoisted_2$16)]),_:1},8,[`list`])]))}}),TodoKanbanView_default=TodoKanbanView_vue_vue_type_script_setup_true_lang_default,_hoisted_1$15={class:`border-t border-blue-100 bg-blue-50 p-4 space-y-3 rounded-b-lg`},_hoisted_2$15={class:`grid grid-cols-1 sm:grid-cols-2 gap-3`},_hoisted_3$14={class:`block text-xs text-gray-600 sm:col-span-2`},_hoisted_4$13={class:`block text-xs text-gray-600 sm:col-span-2`},_hoisted_5$13={class:`block text-xs text-gray-600`},_hoisted_6$13=[`value`],_hoisted_7$13={class:`block text-xs text-gray-600`},_hoisted_8$12={value:``},_hoisted_9$12=[`value`],_hoisted_10$11={class:`block text-xs text-gray-600`},_hoisted_11$10={class:`block text-xs text-gray-600`},_hoisted_12$10=[`placeholder`],_hoisted_13$10={class:`flex items-center gap-2 pt-1`},TodoEditPanel_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoEditPanel`,props:{item:{},columns:{}},emits:[`save`,`cancel`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(Lh.item.text),Bh=ref(Lh.item.note??``),Vh=ref(Lh.item.status??Lh.columns[0]?.id??``),Hh=ref(Lh.item.priority??``),Uh=ref(Lh.item.dueDate??``),Wh=ref((Lh.item.labels??[]).join(`, `));function Gh(Ph){return Ph.split(`,`).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0)}function Kh(){let Ph={text:zh.value,note:Bh.value===``?null:Bh.value,status:Vh.value,labels:Gh(Wh.value)};Hh.value===``?Ph.priority=null:Ph.priority=Hh.value,Uh.value===``?Ph.dueDate=null:Ph.dueDate=Uh.value,Rh(`save`,Ph)}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$15,[createBaseVNode(`div`,_hoisted_2$15,[createBaseVNode(`label`,_hoisted_3$14,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldText`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[0]||=Ph=>zh.value=Ph,type:`text`,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},null,512),[[vModelText,zh.value]])]),createBaseVNode(`label`,_hoisted_4$13,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldNote`))+` `,1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Lh[1]||=Ph=>Bh.value=Ph,rows:`2`,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded resize-y focus:outline-none focus:border-blue-500`},null,512),[[vModelText,Bh.value]])]),createBaseVNode(`label`,_hoisted_5$13,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldStatus`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[2]||=Ph=>Vh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.columns,Ph=>(openBlock(),createElementBlock(`option`,{key:Ph.id,value:Ph.id},toDisplayString$1(Ph.label),9,_hoisted_6$13))),128))],512),[[vModelSelect,Vh.value]])]),createBaseVNode(`label`,_hoisted_7$13,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldPriority`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[3]||=Ph=>Hh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},[createBaseVNode(`option`,_hoisted_8$12,toDisplayString$1(unref(Ih)(`todoDialogs.noneOption`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(PRIORITIES),Ph=>(openBlock(),createElementBlock(`option`,{key:Ph,value:Ph},toDisplayString$1(unref(PRIORITY_LABELS)[Ph]),9,_hoisted_9$12))),128))],512),[[vModelSelect,Hh.value]])]),createBaseVNode(`label`,_hoisted_10$11,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldDueDate`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[4]||=Ph=>Uh.value=Ph,type:`date`,class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},null,512),[[vModelText,Uh.value]])]),createBaseVNode(`label`,_hoisted_11$10,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldLabelsCommaSeparated`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[5]||=Ph=>Wh.value=Ph,type:`text`,placeholder:unref(Ih)(`todoDialogs.labelsPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm bg-white border border-blue-300 rounded focus:outline-none focus:border-blue-500`},null,8,_hoisted_12$10),[[vModelText,Wh.value]])])]),createBaseVNode(`div`,_hoisted_13$10,[createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:Kh},toDisplayString$1(unref(Ih)(`common.save`)),1),createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Lh[6]||=Ph=>Rh(`cancel`)},toDisplayString$1(unref(Ih)(`common.cancel`)),1)])]))}}),TodoEditPanel_default=TodoEditPanel_vue_vue_type_script_setup_true_lang_default,_hoisted_1$14={class:`h-full overflow-auto`},_hoisted_2$14={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_3$13={key:1,class:`min-w-full text-sm`},_hoisted_4$12={class:`bg-gray-50 sticky top-0 z-10`},_hoisted_5$12={class:`text-left text-xs font-medium text-gray-500 uppercase`},_hoisted_6$12=[`aria-sort`,`aria-label`,`onClick`,`onKeydown`],_hoisted_7$12={key:0,class:`material-icons text-xs align-middle`},_hoisted_8$11={class:`bg-white divide-y divide-gray-100`},_hoisted_9$11={class:`hover:bg-gray-50`},_hoisted_10$10={class:`px-3 py-2`},_hoisted_11$9=[`checked`,`onChange`],_hoisted_12$9=[`aria-label`,`onClick`,`onKeydown`],_hoisted_13$9={key:0,class:`text-xs text-gray-400 truncate max-w-xs`},_hoisted_14$9={class:`px-3 py-2 text-xs text-gray-600`},_hoisted_15$8={class:`px-3 py-2`},_hoisted_16$7={class:`px-3 py-2`},_hoisted_17$7={class:`flex flex-wrap gap-1`},_hoisted_18$7={class:`px-3 py-2 text-xs`},_hoisted_19$7={class:`px-3 py-2 text-xs text-gray-400`},_hoisted_20$4={class:`px-3 py-2 text-right`},_hoisted_21$4=[`title`,`onClick`],_hoisted_22$4={key:0},_hoisted_23$3={colspan:`8`,class:`bg-blue-50 p-0`},TodoTableView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoTableView`,props:{filteredItems:{},columns:{}},emits:[`patch`,`delete`,`toggleComplete`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=[{key:`completed`,label:``,ariaLabel:`Completion`},{key:`text`,label:`Text`},{key:`status`,label:`Status`},{key:`priority`,label:`Priority`},{key:`labels`,label:`Labels`},{key:`dueDate`,label:`Due`},{key:`createdAt`,label:`Created`}],Rh=Ph,zh=Fh,Bh=ref(`createdAt`),Vh=ref(`desc`),Hh=ref(null);function Uh(Ph){Bh.value===Ph?Vh.value=Vh.value===`asc`?`desc`:`asc`:(Bh.value=Ph,Vh.value=Ph===`createdAt`?`desc`:`asc`)}function Wh(Ph){Hh.value=Hh.value===Ph?null:Ph}function Gh(Ph,Fh){zh(`patch`,Ph,Fh),Hh.value=null}function Kh(Ph){return Ph.status?Rh.columns.find(Fh=>Fh.id===Ph.status)?.label??``:``}function qh(Ph,Fh){return Ph===void 0&&Fh===void 0?0:Ph===void 0?1:Fh===void 0?-1:typeof Ph==`number`&&typeof Fh==`number`?Ph-Fh:typeof Ph==`boolean`&&typeof Fh==`boolean`?Ph===Fh?0:Ph?1:-1:String(Ph).localeCompare(String(Fh))}function Jh(Ph,Fh){switch(Fh){case`completed`:return Ph.completed;case`text`:return Ph.text.toLowerCase();case`status`:return Kh(Ph).toLowerCase();case`priority`:return Ph.priority?PRIORITY_ORDER[Ph.priority]:void 0;case`labels`:return(Ph.labels??[]).join(`,`).toLowerCase();case`dueDate`:return Ph.dueDate;case`createdAt`:return Ph.createdAt}}let Yh=computed(()=>{let Ph=[...Rh.filteredItems];return Ph.sort((Ph,Fh)=>{let Ih=qh(Jh(Ph,Bh.value),Jh(Fh,Bh.value));return Vh.value===`asc`?Ih:-Ih}),Ph});return(Fh,Rh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$14,[Ph.filteredItems.length===0?(openBlock(),createElementBlock(`div`,_hoisted_2$14,toDisplayString$1(unref(Ih)(`todoTableList.noMatchingFilter`)),1)):(openBlock(),createElementBlock(`table`,_hoisted_3$13,[createBaseVNode(`thead`,_hoisted_4$12,[createBaseVNode(`tr`,_hoisted_5$12,[(openBlock(),createElementBlock(Fragment,null,renderList(Lh,Ph=>createBaseVNode(`th`,{key:Ph.key,tabindex:`0`,"aria-sort":Bh.value===Ph.key?Vh.value===`asc`?`ascending`:`descending`:`none`,"aria-label":unref(Ih)(`todoTableList.sortColumnAria`,{column:Ph.ariaLabel??Ph.label}),class:`px-3 py-2 cursor-pointer hover:bg-gray-100 select-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400`,onClick:Fh=>Uh(Ph.key),onKeydown:[withKeys(withModifiers(Fh=>!Fh.repeat&&Uh(Ph.key),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Fh=>!Fh.repeat&&Uh(Ph.key),[`prevent`,`self`]),[`space`])]},[createTextVNode(toDisplayString$1(Ph.label)+` `,1),Bh.value===Ph.key?(openBlock(),createElementBlock(`span`,_hoisted_7$12,toDisplayString$1(Vh.value===`asc`?`arrow_upward`:`arrow_downward`),1)):createCommentVNode(``,!0)],40,_hoisted_6$12)),64)),Rh[1]||=createBaseVNode(`th`,{class:`px-3 py-2`},null,-1)])]),createBaseVNode(`tbody`,_hoisted_8$11,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Yh.value,Fh=>(openBlock(),createElementBlock(Fragment,{key:Fh.id},[createBaseVNode(`tr`,_hoisted_9$11,[createBaseVNode(`td`,_hoisted_10$10,[createBaseVNode(`input`,{type:`checkbox`,checked:Fh.completed,onChange:Ph=>zh(`toggleComplete`,Fh)},null,40,_hoisted_11$9)]),createBaseVNode(`td`,{tabindex:`0`,"aria-label":unref(Ih)(`todoTableList.expandRowAria`,{task:Fh.text}),class:`px-3 py-2 max-w-md cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400`,onClick:Ph=>Wh(Fh.id),onKeydown:[withKeys(withModifiers(Ph=>!Ph.repeat&&Wh(Fh.id),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Ph=>!Ph.repeat&&Wh(Fh.id),[`prevent`,`self`]),[`space`])]},[createBaseVNode(`div`,{class:normalizeClass(Fh.completed?`line-through text-gray-400`:`text-gray-800`)},toDisplayString$1(Fh.text),3),Fh.note?(openBlock(),createElementBlock(`div`,_hoisted_13$9,toDisplayString$1(Fh.note),1)):createCommentVNode(``,!0)],40,_hoisted_12$9),createBaseVNode(`td`,_hoisted_14$9,toDisplayString$1(Kh(Fh)),1),createBaseVNode(`td`,_hoisted_15$8,[Fh.priority?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(PRIORITY_CLASSES)[Fh.priority]])},toDisplayString$1(unref(PRIORITY_LABELS)[Fh.priority]),3)):createCommentVNode(``,!0)]),createBaseVNode(`td`,_hoisted_16$7,[createBaseVNode(`div`,_hoisted_17$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Fh.labels??[],Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(colorForLabel)(Ph)])},toDisplayString$1(Ph),3))),128))])]),createBaseVNode(`td`,_hoisted_18$7,[Fh.dueDate?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(dueDateClasses)(Fh.dueDate)])},toDisplayString$1(unref(formatDueLabel)(Fh.dueDate)),3)):createCommentVNode(``,!0)]),createBaseVNode(`td`,_hoisted_19$7,toDisplayString$1(unref(formatShortDate)(Fh.createdAt)),1),createBaseVNode(`td`,_hoisted_20$4,[createBaseVNode(`button`,{class:`text-gray-300 hover:text-red-500 text-xs`,title:unref(Ih)(`pluginTodo.deleteItem`),onClick:Ph=>zh(`delete`,Fh.id)},`✕`,8,_hoisted_21$4)])]),Hh.value===Fh.id?(openBlock(),createElementBlock(`tr`,_hoisted_22$4,[createBaseVNode(`td`,_hoisted_23$3,[createVNode$1(TodoEditPanel_default,{item:Fh,columns:Ph.columns,onSave:Ph=>Gh(Fh.id,Ph),onCancel:Rh[0]||=Ph=>Hh.value=null},null,8,[`item`,`columns`,`onSave`])])])):createCommentVNode(``,!0)],64))),128))])]))]))}}),TodoTableView_default=TodoTableView_vue_vue_type_script_setup_true_lang_default,_hoisted_1$13={class:`h-full overflow-y-auto p-4`},_hoisted_2$13={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_3$12={key:1,class:`space-y-2 max-w-3xl mx-auto`},_hoisted_4$11=[`aria-label`,`onClick`,`onKeydown`],_hoisted_5$11=[`checked`,`onChange`],_hoisted_6$11={class:`flex-1 min-w-0`},_hoisted_7$11={class:`flex items-center gap-2 flex-wrap`},_hoisted_8$10={key:0,class:`px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-gray-100 text-gray-600`},_hoisted_9$10={key:0,class:`text-xs text-gray-400 mt-0.5`},_hoisted_10$9=[`title`,`onClick`],TodoListView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoListView`,props:{filteredItems:{},columns:{}},emits:[`patch`,`delete`,`toggleComplete`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(null);function Bh(Ph){zh.value=zh.value===Ph?null:Ph}function Vh(Ph){Rh(`toggleComplete`,Ph)}function Hh(Ph,Fh){Rh(`patch`,Ph,Fh),zh.value=null}function Uh(Ph){return Ph.status?Lh.columns.find(Fh=>Fh.id===Ph.status)?.label??``:``}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$13,[Ph.filteredItems.length===0?(openBlock(),createElementBlock(`div`,_hoisted_2$13,toDisplayString$1(unref(Ih)(`todoTableList.noMatchingFilter`)),1)):(openBlock(),createElementBlock(`ul`,_hoisted_3$12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.filteredItems,Fh=>(openBlock(),createElementBlock(`li`,{key:Fh.id,class:`rounded-lg border border-gray-200 hover:border-gray-300 transition-colors`},[createBaseVNode(`div`,{tabindex:`0`,role:`button`,"aria-label":unref(Ih)(`todoTableList.expandRowAria`,{task:Fh.text}),class:`flex items-center gap-3 p-3 cursor-pointer group focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 rounded`,onClick:Ph=>Bh(Fh.id),onKeydown:[withKeys(withModifiers(Ph=>!Ph.repeat&&Bh(Fh.id),[`prevent`,`self`]),[`enter`]),withKeys(withModifiers(Ph=>!Ph.repeat&&Bh(Fh.id),[`prevent`,`self`]),[`space`])]},[createBaseVNode(`input`,{type:`checkbox`,checked:Fh.completed,class:`cursor-pointer shrink-0`,onClick:Lh[0]||=withModifiers(()=>{},[`stop`]),onChange:Ph=>Vh(Fh)},null,40,_hoisted_5$11),createBaseVNode(`div`,_hoisted_6$11,[createBaseVNode(`div`,_hoisted_7$11,[createBaseVNode(`span`,{class:normalizeClass([`text-sm`,Fh.completed?`line-through text-gray-400`:`text-gray-800`])},toDisplayString$1(Fh.text),3),Uh(Fh)?(openBlock(),createElementBlock(`span`,_hoisted_8$10,toDisplayString$1(Uh(Fh)),1)):createCommentVNode(``,!0),Fh.priority?(openBlock(),createElementBlock(`span`,{key:1,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(PRIORITY_CLASSES)[Fh.priority]])},toDisplayString$1(unref(PRIORITY_LABELS)[Fh.priority]),3)):createCommentVNode(``,!0),Fh.dueDate?(openBlock(),createElementBlock(`span`,{key:2,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(dueDateClasses)(Fh.dueDate)])},toDisplayString$1(unref(formatDueLabel)(Fh.dueDate)),3)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Fh.labels??[],Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:normalizeClass([`px-1.5 py-0.5 rounded-full text-[10px] font-medium`,unref(colorForLabel)(Ph)])},toDisplayString$1(Ph),3))),128))]),Fh.note?(openBlock(),createElementBlock(`div`,_hoisted_9$10,toDisplayString$1(Fh.note),1)):createCommentVNode(``,!0)]),createBaseVNode(`button`,{class:`opacity-0 group-hover:opacity-100 text-gray-400 hover:text-red-500 text-xs px-1 shrink-0`,title:unref(Ih)(`pluginTodo.deleteItem`),onClick:withModifiers(Ph=>Rh(`delete`,Fh.id),[`stop`])},` ✕ `,8,_hoisted_10$9)],40,_hoisted_4$11),zh.value===Fh.id?(openBlock(),createBlock(TodoEditPanel_default,{key:0,item:Fh,columns:Ph.columns,onSave:Ph=>Hh(Fh.id,Ph),onCancel:Lh[1]||=Ph=>zh.value=null},null,8,[`item`,`columns`,`onSave`])):createCommentVNode(``,!0)]))),128))]))]))}}),TodoListView_default=TodoListView_vue_vue_type_script_setup_true_lang_default,_hoisted_1$12={id:`todo-add-dialog-title`,class:`text-base font-semibold text-gray-800`},_hoisted_2$12={class:`block text-xs text-gray-600`},_hoisted_3$11=[`placeholder`],_hoisted_4$10={class:`block text-xs text-gray-600`},_hoisted_5$10={class:`grid grid-cols-2 gap-3`},_hoisted_6$10={class:`block text-xs text-gray-600`},_hoisted_7$10=[`value`],_hoisted_8$9={class:`block text-xs text-gray-600`},_hoisted_9$9={value:``},_hoisted_10$8=[`value`],_hoisted_11$8={class:`block text-xs text-gray-600`},_hoisted_12$8={class:`block text-xs text-gray-600`},_hoisted_13$8=[`placeholder`],_hoisted_14$8={class:`flex justify-end gap-2 pt-1`},TodoAddDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoAddDialog`,props:{columns:{},defaultStatus:{}},emits:[`cancel`,`create`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(``),Bh=ref(``),Vh=ref(Lh.defaultStatus??Lh.columns[0]?.id??``),Hh=ref(``),Uh=ref(``),Wh=ref(``),Gh=ref(null);function Kh(Ph){Ph.key===`Escape`&&Rh(`cancel`)}onMounted(()=>{Gh.value?.focus(),document.addEventListener(`keydown`,Kh)}),onUnmounted(()=>{document.removeEventListener(`keydown`,Kh)});function qh(){let Ph=zh.value.trim();if(Ph.length===0)return;let Fh={text:Ph};Bh.value!==``&&(Fh.note=Bh.value),Vh.value!==``&&(Fh.status=Vh.value),Hh.value!==``&&(Fh.priority=Hh.value),Uh.value!==``&&(Fh.dueDate=Uh.value);let Ih=Wh.value.split(`,`).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0);Ih.length>0&&(Fh.labels=Ih),Rh(`create`,Fh)}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,{class:`fixed inset-0 z-50 bg-black/30 flex items-center justify-center`,onClick:Lh[8]||=Ph=>Rh(`cancel`)},[createBaseVNode(`div`,{class:`bg-white rounded-lg shadow-xl w-96 max-w-[90vw] p-5 space-y-3`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`todo-add-dialog-title`,onClick:Lh[7]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`h3`,_hoisted_1$12,toDisplayString$1(unref(Ih)(`todoDialogs.addTitle`)),1),createBaseVNode(`label`,_hoisted_2$12,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldText`))+` `,1),withDirectives(createBaseVNode(`input`,{ref_key:`textInput`,ref:Gh,"onUpdate:modelValue":Lh[0]||=Ph=>zh.value=Ph,type:`text`,placeholder:unref(Ih)(`todoDialogs.textPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,onKeydown:withKeys(qh,[`enter`])},null,40,_hoisted_3$11),[[vModelText,zh.value]])]),createBaseVNode(`label`,_hoisted_4$10,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldNote`))+` `,1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Lh[1]||=Ph=>Bh.value=Ph,rows:`2`,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded resize-y focus:outline-none focus:border-blue-400`},null,512),[[vModelText,Bh.value]])]),createBaseVNode(`div`,_hoisted_5$10,[createBaseVNode(`label`,_hoisted_6$10,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldStatus`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[2]||=Ph=>Vh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.columns,Ph=>(openBlock(),createElementBlock(`option`,{key:Ph.id,value:Ph.id},toDisplayString$1(Ph.label),9,_hoisted_7$10))),128))],512),[[vModelSelect,Vh.value]])]),createBaseVNode(`label`,_hoisted_8$9,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldPriority`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Lh[3]||=Ph=>Hh.value=Ph,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},[createBaseVNode(`option`,_hoisted_9$9,toDisplayString$1(unref(Ih)(`todoDialogs.noneOption`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(PRIORITIES),Ph=>(openBlock(),createElementBlock(`option`,{key:Ph,value:Ph},toDisplayString$1(unref(PRIORITY_LABELS)[Ph]),9,_hoisted_10$8))),128))],512),[[vModelSelect,Hh.value]])]),createBaseVNode(`label`,_hoisted_11$8,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldDueDate`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[4]||=Ph=>Uh.value=Ph,type:`date`,class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},null,512),[[vModelText,Uh.value]])]),createBaseVNode(`label`,_hoisted_12$8,[createTextVNode(toDisplayString$1(unref(Ih)(`todoDialogs.fieldLabels`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Lh[5]||=Ph=>Wh.value=Ph,type:`text`,placeholder:unref(Ih)(`todoDialogs.labelsPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`},null,8,_hoisted_13$8),[[vModelText,Wh.value]])])]),createBaseVNode(`div`,_hoisted_14$8,[createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Lh[6]||=Ph=>Rh(`cancel`)},toDisplayString$1(unref(Ih)(`common.cancel`)),1),createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:qh},toDisplayString$1(unref(Ih)(`common.add`)),1)])])]))}}),TodoAddDialog_default=TodoAddDialog_vue_vue_type_script_setup_true_lang_default,_hoisted_1$11={class:`flex items-center justify-between px-4 py-2 border-b border-gray-100`},_hoisted_2$11={id:`todo-edit-dialog-title`,class:`text-base font-semibold text-gray-800`},_hoisted_3$10=[`title`],TodoEditDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoEditDialog`,props:{item:{},columns:{}},emits:[`save`,`cancel`,`delete`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Fh;function Rh(Ph){Ph.key===`Escape`&&Lh(`cancel`)}return onMounted(()=>document.addEventListener(`keydown`,Rh)),onUnmounted(()=>document.removeEventListener(`keydown`,Rh)),(Fh,Rh)=>(openBlock(),createElementBlock(`div`,{class:`fixed inset-0 z-50 bg-black/30 flex items-center justify-center`,onClick:Rh[4]||=Ph=>Lh(`cancel`)},[createBaseVNode(`div`,{class:`bg-white rounded-lg shadow-xl w-[28rem] max-w-[92vw] overflow-hidden`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`todo-edit-dialog-title`,onClick:Rh[3]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`div`,_hoisted_1$11,[createBaseVNode(`h3`,_hoisted_2$11,toDisplayString$1(unref(Ih)(`todoDialogs.editTitle`)),1),createBaseVNode(`button`,{class:`text-gray-400 hover:text-red-500 text-xs px-2 py-0.5`,title:unref(Ih)(`todoDialogs.deleteTitle`),onClick:Rh[0]||=Fh=>Lh(`delete`,Ph.item.id)},toDisplayString$1(unref(Ih)(`todoDialogs.deleteButton`)),9,_hoisted_3$10)]),createVNode$1(TodoEditPanel_default,{item:Ph.item,columns:Ph.columns,onSave:Rh[1]||=Ph=>Lh(`save`,Ph),onCancel:Rh[2]||=Ph=>Lh(`cancel`)},null,8,[`item`,`columns`])])]))}}),TodoEditDialog_default=TodoEditDialog_vue_vue_type_script_setup_true_lang_default,TODO_VIEW={kanban:`kanban`,table:`table`,list:`list`},TODO_VIEW_MODES=[{key:TODO_VIEW.kanban,label:`Kanban`,icon:`view_kanban`},{key:TODO_VIEW.table,label:`Table`,icon:`table_rows`},{key:TODO_VIEW.list,label:`List`,icon:`view_list`}],_hoisted_1$10={class:`h-full bg-white flex flex-col`},_hoisted_2$10={class:`flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-100 shrink-0`},_hoisted_3$9={class:`flex items-center gap-2 min-w-0`},_hoisted_4$9={class:`text-base font-semibold text-gray-800 shrink-0`},_hoisted_5$9={class:`text-xs text-gray-500 shrink-0`},_hoisted_6$9=[`placeholder`],_hoisted_7$9={class:`flex items-center gap-2`},_hoisted_8$8={class:`flex border border-gray-300 rounded overflow-hidden`},_hoisted_9$8=[`data-testid`,`title`,`onClick`],_hoisted_10$7={class:`material-icons text-sm`},_hoisted_11$7={key:0,class:`flex flex-wrap items-center gap-1.5 px-4 py-1.5 border-b border-gray-100 bg-gray-50 shrink-0`},_hoisted_12$7={class:`text-[11px] text-gray-500 mr-1`},_hoisted_13$7=[`onClick`],_hoisted_14$7={class:`opacity-60`},_hoisted_15$7=[`title`],_hoisted_16$6={key:1,class:`px-4 py-2 text-xs text-red-600 bg-red-50 border-b border-red-100 shrink-0`},_hoisted_17$6={class:`flex-1 min-h-0`},_hoisted_18$6={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_19$6={id:`todo-add-column-title`,class:`text-base font-semibold text-gray-800`},_hoisted_20$3={class:`block text-xs text-gray-600`},_hoisted_21$3=[`placeholder`],_hoisted_22$3={class:`flex justify-end gap-2 pt-1`},VIEW_MODE_KEY=`todo_explorer_view_mode`,TODO_FOCUS_MAX_RETRIES=10,TODO_FOCUS_RETRY_MS=150,TodoExplorer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TodoExplorer`,props:{selectedResult:{}},setup(Ph){let{t:Fh}=useI18n(),Ih=Ph,{items:Lh,columns:Rh,error:zh,refresh:Bh,createItem:Vh,patchItem:Hh,moveItem:Uh,deleteItem:Wh,addColumn:Gh,patchColumn:Kh,deleteColumn:qh,reorderColumns:Jh}=useTodos(Ih.selectedResult?.data?.items??[],Ih.selectedResult?.data?.columns??[]);watch(()=>Ih.selectedResult?.uuid,()=>{Lh.value=Ih.selectedResult?.data?.items??[],Rh.value=Ih.selectedResult?.data?.columns??[],Bh()});let Yh=new Set(Object.values(TODO_VIEW));function Xh(){let Ph=localStorage.getItem(VIEW_MODE_KEY);return Ph&&Yh.has(Ph)?Ph:TODO_VIEW.kanban}let Zh=ref(Xh());function Qh(Ph){Zh.value=Ph,localStorage.setItem(VIEW_MODE_KEY,Ph)}let $h=ref(``),eg=ref(new Set),tg=computed(()=>listLabelsWithCount(Lh.value));function ng(Ph){let Fh=Ph.toLowerCase(),Ih=new Set(eg.value);Ih.has(Fh)?Ih.delete(Fh):Ih.add(Fh),eg.value=Ih}function rg(){eg.value=new Set}let ig=computed(()=>{let Ph=filterByLabels(Lh.value,[...eg.value]),Fh=$h.value.trim().toLowerCase();return Fh.length===0?Ph:Ph.filter(Ph=>!!(Ph.text.toLowerCase().includes(Fh)||Ph.note?.toLowerCase().includes(Fh)))}),ag=computed(()=>Lh.value.filter(Ph=>Ph.completed).length),og=ref(!1),sg=ref(void 0);function cg(Ph){sg.value=Ph,og.value=!0}async function lg(Ph){await Vh(Ph)&&(og.value=!1,sg.value=void 0)}let ug=ref(!1),dg=ref(``);async function fg(){let Ph=dg.value.trim();Ph.length!==0&&await Gh({label:Ph})&&(ug.value=!1,dg.value=``)}function pg(Ph){Ph.key===`Escape`&&(ug.value&&=!1)}onMounted(()=>document.addEventListener(`keydown`,pg)),onUnmounted(()=>document.removeEventListener(`keydown`,pg));let mg=useRoute();async function hg(Ph){for(let Fh=0;Fh<TODO_FOCUS_MAX_RETRIES;Fh++){if(await nextTick$1(),scrollIntoViewByTestId(`todo-card-${Ph}`))return;await new Promise(Ph=>window.setTimeout(Ph,TODO_FOCUS_RETRY_MS))}}onMounted(()=>{let Ph=mg.params.itemId;typeof Ph==`string`&&Ph&&hg(Ph)}),watch(()=>mg.params.itemId,Ph=>{typeof Ph==`string`&&Ph&&hg(Ph)});function gg(Ph,Fh){Hh(Ph,Fh)}function _g(Ph){let Fh=Lh.value.find(Fh=>Fh.id===Ph);return!Fh||!window.confirm(`Delete "${Fh.text}"?`)?!1:(Wh(Ph),!0)}function vg(Ph){_g(Ph)}function yg(Ph){Hh(Ph.id,{completed:!Ph.completed})}function bg(Ph,Fh,Ih){Uh(Ph,{status:Fh,position:Ih})}let xg=ref(null);function Sg(Ph){xg.value=Ph}async function Cg(Ph){let Fh=xg.value;Fh&&await Hh(Fh.id,Ph)&&(xg.value=null)}function wg(Ph){_g(Ph)&&(xg.value=null)}function Tg(Ph,Fh){Kh(Ph,{label:Fh})}function Eg(Ph){let Fh=Rh.value.find(Fh=>Fh.id===Ph);Fh&&window.confirm(`Delete column "${Fh.label}"? Items in this column will be moved to another column.`)&&qh(Ph)}function Dg(Ph){Kh(Ph,{isDone:!0})}function Og(Ph){Jh(Ph)}return(Ph,Ih)=>(openBlock(),createElementBlock(`div`,_hoisted_1$10,[createBaseVNode(`div`,_hoisted_2$10,[createBaseVNode(`div`,_hoisted_3$9,[createBaseVNode(`h2`,_hoisted_4$9,toDisplayString$1(unref(Fh)(`todoExplorer.heading`)),1),createBaseVNode(`span`,_hoisted_5$9,toDisplayString$1(unref(Fh)(`todoExplorer.doneRatio`,{done:ag.value,total:unref(Lh).length})),1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[0]||=Ph=>$h.value=Ph,"data-testid":`todo-search`,type:`text`,placeholder:unref(Fh)(`todoExplorer.searchPlaceholder`),class:`h-8 px-2.5 text-sm border border-gray-200 rounded w-44 focus:outline-none focus:border-blue-400`},null,8,_hoisted_6$9),[[vModelText,$h.value]])]),createBaseVNode(`div`,_hoisted_7$9,[createBaseVNode(`button`,{"data-testid":`todo-add-btn`,class:`h-8 px-2.5 flex items-center gap-1 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:Ih[1]||=Ph=>og.value=!0},toDisplayString$1(unref(Fh)(`todoExplorer.addButton`)),1),Zh.value===unref(TODO_VIEW).kanban?(openBlock(),createElementBlock(`button`,{key:0,"data-testid":`todo-column-add-btn`,class:`h-8 px-2.5 flex items-center gap-1 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Ih[2]||=Ph=>ug.value=!0},toDisplayString$1(unref(Fh)(`todoExplorer.addColumnButton`)),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_8$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(TODO_VIEW_MODES),Ph=>(openBlock(),createElementBlock(`button`,{key:Ph.key,class:normalizeClass([`h-8 w-8 flex items-center justify-center`,Zh.value===Ph.key?`bg-blue-500 text-white`:`bg-white text-gray-600 hover:bg-gray-50`]),"data-testid":`todo-view-${Ph.key}`,title:Ph.label,onClick:Fh=>Qh(Ph.key)},[createBaseVNode(`span`,_hoisted_10$7,toDisplayString$1(Ph.icon),1)],10,_hoisted_9$8))),128))])])]),tg.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_11$7,[createBaseVNode(`span`,_hoisted_12$7,toDisplayString$1(unref(Fh)(`todoExplorer.labels`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(tg.value,Ph=>(openBlock(),createElementBlock(`button`,{key:Ph.label,class:normalizeClass([`px-2 py-0.5 rounded-full text-[10px] font-medium transition-all`,eg.value.has(Ph.label.toLowerCase())?`ring-2 ring-blue-400 `+unref(colorForLabel)(Ph.label):unref(colorForLabel)(Ph.label)+` opacity-70 hover:opacity-100`]),onClick:Fh=>ng(Ph.label)},[createTextVNode(toDisplayString$1(Ph.label)+` `,1),createBaseVNode(`span`,_hoisted_14$7,toDisplayString$1(Ph.count),1)],10,_hoisted_13$7))),128)),eg.value.size>0?(openBlock(),createElementBlock(`button`,{key:0,class:`ml-auto text-[11px] text-gray-500 hover:text-gray-700`,title:unref(Fh)(`todoExplorer.clearFiltersTitle`),onClick:rg},toDisplayString$1(unref(Fh)(`todoExplorer.clearButton`)),9,_hoisted_15$7)):createCommentVNode(``,!0)])):createCommentVNode(``,!0),unref(zh)?(openBlock(),createElementBlock(`div`,_hoisted_16$6,toDisplayString$1(unref(zh)),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_17$6,[unref(Lh).length===0?(openBlock(),createElementBlock(`div`,_hoisted_18$6,toDisplayString$1(unref(Fh)(`todoExplorer.emptyHint`)),1)):(openBlock(),createElementBlock(Fragment,{key:1},[Zh.value===unref(TODO_VIEW).kanban?(openBlock(),createBlock(TodoKanbanView_default,{key:0,"filtered-items":ig.value,columns:unref(Rh),onMove:bg,onOpen:Sg,onToggleComplete:yg,onQuickAdd:cg,onRenameColumn:Tg,onDeleteColumn:Eg,onMarkDone:Dg,onReorderColumns:Og},null,8,[`filtered-items`,`columns`])):Zh.value===unref(TODO_VIEW).table?(openBlock(),createBlock(TodoTableView_default,{key:1,"filtered-items":ig.value,columns:unref(Rh),onPatch:gg,onDelete:vg,onToggleComplete:yg},null,8,[`filtered-items`,`columns`])):(openBlock(),createBlock(TodoListView_default,{key:2,"filtered-items":ig.value,columns:unref(Rh),onPatch:gg,onDelete:vg,onToggleComplete:yg},null,8,[`filtered-items`,`columns`]))],64))]),og.value?(openBlock(),createBlock(TodoAddDialog_default,{key:2,columns:unref(Rh),"default-status":sg.value,onCancel:Ih[3]||=Ph=>og.value=!1,onCreate:lg},null,8,[`columns`,`default-status`])):createCommentVNode(``,!0),xg.value?(openBlock(),createBlock(TodoEditDialog_default,{key:3,item:xg.value,columns:unref(Rh),onCancel:Ih[4]||=Ph=>xg.value=null,onSave:Cg,onDelete:wg},null,8,[`item`,`columns`])):createCommentVNode(``,!0),ug.value?(openBlock(),createElementBlock(`div`,{key:4,class:`fixed inset-0 z-50 bg-black/30 flex items-center justify-center`,onClick:Ih[8]||=Ph=>ug.value=!1},[createBaseVNode(`div`,{class:`bg-white rounded-lg shadow-xl w-80 p-5 space-y-3`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`todo-add-column-title`,onClick:Ih[7]||=withModifiers(()=>{},[`stop`])},[createBaseVNode(`h3`,_hoisted_19$6,toDisplayString$1(unref(Fh)(`todoExplorer.addColumn`)),1),createBaseVNode(`label`,_hoisted_20$3,[createTextVNode(toDisplayString$1(unref(Fh)(`todoExplorer.newColumnLabelField`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[5]||=Ph=>dg.value=Ph,type:`text`,placeholder:unref(Fh)(`todoExplorer.newColumnPlaceholder`),class:`mt-1 w-full px-2 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,onKeydown:withKeys(fg,[`enter`])},null,40,_hoisted_21$3),[[vModelText,dg.value]])]),createBaseVNode(`div`,_hoisted_22$3,[createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,onClick:Ih[6]||=Ph=>ug.value=!1},toDisplayString$1(unref(Fh)(`common.cancel`)),1),createBaseVNode(`button`,{class:`px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600`,onClick:fg},toDisplayString$1(unref(Fh)(`common.add`)),1)])])])):createCommentVNode(``,!0)]))}}),TodoExplorer_default=TodoExplorer_vue_vue_type_script_setup_true_lang_default,_hoisted_1$9={class:`m-4 mb-0 rounded border border-blue-200 bg-blue-50 text-sm`,"data-testid":`system-file-banner`},_hoisted_2$9={class:`flex items-start gap-2 px-3 py-2`},_hoisted_3$8={class:`flex-1 min-w-0`},_hoisted_4$8={class:`flex items-center gap-2 flex-wrap`},_hoisted_5$8={class:`font-semibold text-blue-900`},_hoisted_6$8={key:0,class:`mt-1 text-gray-700 leading-snug whitespace-pre-line`},_hoisted_7$8={key:1,class:`mt-1 text-xs text-gray-500`},_hoisted_8$7=[`href`],_hoisted_9$7=[`aria-label`],STORAGE_PREFIX=`systemFileBanner.collapsed.`,INFO_ICON=`ℹ️`,GITHUB_REPO_URL=`https://github.com/receptron/mulmoclaude/blob/main/`,SystemFileBanner_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SystemFileBanner`,props:{descriptor:{},path:{}},setup(Ph){let{t:Fh}=useI18n(),Ih=Ph;function Lh(Ph){return STORAGE_PREFIX+Ph}function Rh(Ph){try{return localStorage.getItem(Lh(Ph))===`1`}catch{return!1}}function zh(Ph,Fh){try{Fh?localStorage.setItem(Lh(Ph),`1`):localStorage.removeItem(Lh(Ph))}catch{}}let Bh=ref(Rh(Ih.descriptor.id));watch(()=>Ih.descriptor.id,Ph=>{Bh.value=Rh(Ph)});function Vh(){Bh.value=!Bh.value,zh(Ih.descriptor.id,Bh.value)}let Hh={"agent-managed-but-hand-editable":`bg-emerald-100 text-emerald-800`,"user-editable":`bg-blue-100 text-blue-800`,"agent-managed":`bg-amber-100 text-amber-800`,"fragile-format":`bg-orange-100 text-orange-800`,ephemeral:`bg-gray-200 text-gray-700`},Uh=computed(()=>Hh[Ih.descriptor.editPolicy]),Wh=computed(()=>Ih.descriptor.schemaRef?GITHUB_REPO_URL+Ih.descriptor.schemaRef:``);return(Ih,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$9,[createBaseVNode(`div`,_hoisted_2$9,[createBaseVNode(`span`,{class:`text-blue-600 shrink-0`,"aria-hidden":`true`},toDisplayString$1(INFO_ICON)),createBaseVNode(`div`,_hoisted_3$8,[createBaseVNode(`div`,_hoisted_4$8,[createBaseVNode(`span`,_hoisted_5$8,toDisplayString$1(unref(Fh)(`systemFiles.${Ph.descriptor.id}.title`)),1),createBaseVNode(`span`,{class:normalizeClass([`text-xs px-1.5 py-0.5 rounded shrink-0`,Uh.value])},toDisplayString$1(unref(Fh)(`systemFiles.editPolicy.${Ph.descriptor.editPolicy}`)),3)]),Bh.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`p`,_hoisted_6$8,toDisplayString$1(unref(Fh)(`systemFiles.${Ph.descriptor.id}.summary`)),1)),!Bh.value&&Ph.descriptor.schemaRef?(openBlock(),createElementBlock(`p`,_hoisted_7$8,[createTextVNode(toDisplayString$1(unref(Fh)(`systemFiles.schemaLabel`))+`: `,1),createBaseVNode(`a`,{href:Wh.value,target:`_blank`,rel:`noopener noreferrer`,class:`font-mono text-blue-700 hover:underline break-all`},toDisplayString$1(Ph.descriptor.schemaRef),9,_hoisted_8$7)])):createCommentVNode(``,!0)]),createBaseVNode(`button`,{type:`button`,class:`shrink-0 text-xs text-blue-700 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 rounded px-1`,"aria-label":Bh.value?unref(Fh)(`systemFiles.showDetails`):unref(Fh)(`systemFiles.hideDetails`),"data-testid":`system-file-banner-toggle`,onClick:Vh},toDisplayString$1(Bh.value?unref(Fh)(`systemFiles.showDetails`):unref(Fh)(`systemFiles.hideDetails`)),9,_hoisted_9$7)])]))}}),SystemFileBanner_default=SystemFileBanner_vue_vue_type_script_setup_true_lang_default,JSON_TOKEN_CLASS={key:`text-blue-700`,string:`text-green-700`,number:`text-orange-600`,keyword:`text-purple-700`,punct:`text-gray-500`,whitespace:``},MATCHERS=[{type:`string`,pattern:/^"(?:[^"\\]|\\.)*"/},{type:`keyword`,pattern:/^(?:true|false|null)\b/},{type:`number`,pattern:/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/},{type:`whitespace`,pattern:/^\s+/},{type:`punct`,pattern:/^[{}[\]:,]/}];function nextToken(Ph){for(let{type:Fh,pattern:Ih}of MATCHERS){let Lh=Ih.exec(Ph);if(Lh)return{type:Fh,value:Lh[0]}}return null}function tokenizeJson(Ph){let Fh=[],Ih=0;for(;Ih<Ph.length;){let Lh=nextToken(Ph.slice(Ih));if(!Lh){Fh.push({type:`punct`,value:Ph[Ih]}),Ih++;continue}Fh.push(Lh),Ih+=Lh.value.length}return markKeys(Fh),Fh}function markKeys(Ph){for(let Fh=0;Fh<Ph.length;Fh++){if(Ph[Fh].type!==`string`)continue;let Ih=Fh+1;for(;Ih<Ph.length&&Ph[Ih].type===`whitespace`;)Ih++;Ih<Ph.length&&Ph[Ih].type===`punct`&&Ph[Ih].value===`:`&&(Ph[Fh]={type:`key`,value:Ph[Fh].value})}}function prettyJson(Ph){try{return JSON.stringify(JSON.parse(Ph),null,2)}catch{return Ph}}function tokenizeJsonl(Ph){return Ph.split(/\r?\n/).filter(Ph=>Ph.trim().length>0).map(Ph=>{try{return{tokens:tokenizeJson(JSON.stringify(JSON.parse(Ph),null,2)),parseError:!1}}catch{return{tokens:tokenizeJson(Ph),parseError:!0}}})}var _hoisted_1$8={class:`flex-1 overflow-auto min-h-0`},_hoisted_2$8={key:0,class:`h-full flex items-center justify-center text-gray-400 text-sm`},_hoisted_3$7={key:1,class:`p-4 text-sm text-red-600`},_hoisted_4$7={key:2,class:`p-4 text-sm text-gray-400`},_hoisted_5$7={key:0,class:`h-full`},_hoisted_6$7={key:1,class:`h-full`},_hoisted_7$7={key:2,class:`h-full flex flex-col overflow-auto`},_hoisted_8$6={key:0,class:`shrink-0 m-4 mb-0 rounded border border-gray-200 bg-gray-50 p-3 text-xs`},_hoisted_9$6={class:`font-semibold text-gray-600 shrink-0`},_hoisted_10$6={key:0,class:`flex flex-wrap gap-1`},_hoisted_11$6={key:1,class:`text-gray-800 break-words`},_hoisted_12$6={key:1,class:`shrink-0 m-4 mt-0 rounded border border-red-300 bg-red-50 p-2 text-xs text-red-700`,role:`alert`},_hoisted_13$6={key:3,class:`p-4 text-xs whitespace-pre-wrap font-mono text-gray-800`},_hoisted_14$6=[`srcdoc`,`title`],_hoisted_15$6={key:5,class:`p-4 text-xs whitespace-pre-wrap font-mono text-gray-800`},_hoisted_16$5={key:6,class:`p-4 space-y-2`},_hoisted_17$5={key:0,class:`text-xs text-red-600 mb-1 font-sans`},_hoisted_18$5={class:`text-xs font-mono text-gray-800 whitespace-pre-wrap`},_hoisted_19$5={key:7,class:`p-4 text-xs whitespace-pre-wrap font-mono text-gray-800`},_hoisted_20$2={key:2,class:`h-full flex items-center justify-center p-4`},_hoisted_21$2=[`src`,`alt`],_hoisted_22$2=[`src`,`title`],_hoisted_23$2={key:4,class:`h-full flex items-center justify-center p-4`},_hoisted_24$2=[`src`],_hoisted_25$2={key:5,class:`h-full flex items-center justify-center p-4 bg-black`},_hoisted_26$2=[`src`],_hoisted_27$2={key:6,class:`p-4 text-sm text-gray-500`},FileContentRenderer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FileContentRenderer`,props:{selectedPath:{},content:{},contentError:{},contentLoading:{type:Boolean},schedulerResult:{},todoExplorerResult:{},isMarkdown:{type:Boolean},isHtml:{type:Boolean},isJson:{type:Boolean},isJsonl:{type:Boolean},mdRawMode:{type:Boolean},sandboxedHtml:{},jsonTokens:{},jsonlLines:{},mdFrontmatter:{},rawSaveError:{}},emits:[`markdownLinkClick`,`updateSource`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=computed(()=>Lh.selectedPath?descriptorForPath(Lh.selectedPath):null);function Bh(Ph){return`${API_ROUTES.files.raw}?path=${encodeURIComponent(Ph)}`}function Vh(Ph){let Fh=Lh.selectedPath??``,Ih=Fh.lastIndexOf(`/`),Rh=rewriteMarkdownImageRefs(Ph,Ih>=0?Fh.slice(0,Ih):``);return{uuid:`files-preview`,toolName:`text-response`,message:Rh,title:Lh.selectedPath??``,data:{text:Rh,role:`user`,transportKind:`text-rest`}}}return(Fh,Lh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$8,[Ph.selectedPath?Ph.contentError?(openBlock(),createElementBlock(`div`,_hoisted_3$7,toDisplayString$1(Ph.contentError),1)):Ph.contentLoading?(openBlock(),createElementBlock(`div`,_hoisted_4$7,toDisplayString$1(unref(Ih)(`common.loading`)),1)):Ph.content?(openBlock(),createElementBlock(Fragment,{key:3},[zh.value&&Ph.selectedPath?(openBlock(),createBlock(SystemFileBanner_default,{key:0,descriptor:zh.value,path:Ph.selectedPath},null,8,[`descriptor`,`path`])):createCommentVNode(``,!0),Ph.content.kind===`text`?(openBlock(),createElementBlock(Fragment,{key:1},[Ph.schedulerResult?(openBlock(),createElementBlock(`div`,_hoisted_5$7,[createVNode$1(CalendarView_default,{"selected-result":Ph.schedulerResult},null,8,[`selected-result`])])):Ph.todoExplorerResult?(openBlock(),createElementBlock(`div`,_hoisted_6$7,[createVNode$1(TodoExplorer_default,{"selected-result":Ph.todoExplorerResult},null,8,[`selected-result`])])):Ph.isMarkdown&&!Ph.mdRawMode?(openBlock(),createElementBlock(`div`,_hoisted_7$7,[Ph.mdFrontmatter&&Ph.mdFrontmatter.fields.length>0?(openBlock(),createElementBlock(`div`,_hoisted_8$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.mdFrontmatter.fields,Ph=>(openBlock(),createElementBlock(`div`,{key:Ph.key,class:`flex items-baseline gap-2 py-0.5`},[createBaseVNode(`span`,_hoisted_9$6,toDisplayString$1(Ph.key)+`:`,1),Array.isArray(Ph.value)?(openBlock(),createElementBlock(`span`,_hoisted_10$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.value,Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:`rounded-full bg-white border border-gray-300 px-2 py-0.5 text-gray-700`},toDisplayString$1(Ph),1))),128))])):(openBlock(),createElementBlock(`span`,_hoisted_11$6,toDisplayString$1(Ph.value),1))]))),128))])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex-1 min-h-0`,onClickCapture:Lh[1]||=Ph=>Rh(`markdownLinkClick`,Ph)},[createVNode$1(View_default$15,{"selected-result":Vh(Ph.mdFrontmatter?Ph.mdFrontmatter.body:Ph.content.content),"editable-source":Ph.content.content,onUpdateSource:Lh[0]||=Ph=>Rh(`updateSource`,Ph)},null,8,[`selected-result`,`editable-source`])],32),Ph.rawSaveError?(openBlock(),createElementBlock(`div`,_hoisted_12$6,` ⚠ `+toDisplayString$1(Ph.rawSaveError),1)):createCommentVNode(``,!0)])):Ph.isMarkdown&&Ph.mdRawMode?(openBlock(),createElementBlock(`pre`,_hoisted_13$6,toDisplayString$1(Ph.content.content),1)):Ph.isHtml?(openBlock(),createElementBlock(`iframe`,{key:4,srcdoc:Ph.sandboxedHtml,class:`w-full h-full border-0`,sandbox:`allow-scripts`,title:unref(Ih)(`fileContentRenderer.htmlPreview`)},null,8,_hoisted_14$6)):Ph.isJson?(openBlock(),createElementBlock(`pre`,_hoisted_15$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.jsonTokens,(Ph,Fh)=>(openBlock(),createElementBlock(`span`,{key:Fh,class:normalizeClass(unref(JSON_TOKEN_CLASS)[Ph.type])},toDisplayString$1(Ph.value),3))),128))])):Ph.isJsonl?(openBlock(),createElementBlock(`div`,_hoisted_16$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.jsonlLines,(Ph,Fh)=>(openBlock(),createElementBlock(`div`,{key:Fh,class:normalizeClass([`rounded border bg-gray-50 p-3`,Ph.parseError?`border-red-300`:`border-gray-200`])},[Ph.parseError?(openBlock(),createElementBlock(`div`,_hoisted_17$5,toDisplayString$1(unref(Ih)(`fileContentRenderer.parseError`)),1)):createCommentVNode(``,!0),createBaseVNode(`pre`,_hoisted_18$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.tokens,(Ph,Fh)=>(openBlock(),createElementBlock(`span`,{key:Fh,class:normalizeClass(unref(JSON_TOKEN_CLASS)[Ph.type])},toDisplayString$1(Ph.value),3))),128))])],2))),128))])):(openBlock(),createElementBlock(`pre`,_hoisted_19$5,toDisplayString$1(Ph.content.content),1))],64)):Ph.content.kind===`image`&&Ph.selectedPath?(openBlock(),createElementBlock(`div`,_hoisted_20$2,[createBaseVNode(`img`,{src:Bh(Ph.selectedPath),alt:Ph.selectedPath,class:`max-w-full max-h-full object-contain`},null,8,_hoisted_21$2)])):Ph.content.kind===`pdf`&&Ph.selectedPath?(openBlock(),createElementBlock(`iframe`,{key:3,src:Bh(Ph.selectedPath),class:`w-full h-full border-0`,title:unref(Ih)(`fileContentRenderer.pdfPreview`)},null,8,_hoisted_22$2)):Ph.content.kind===`audio`&&Ph.selectedPath?(openBlock(),createElementBlock(`div`,_hoisted_23$2,[(openBlock(),createElementBlock(`audio`,{key:Ph.selectedPath,src:Bh(Ph.selectedPath),controls:``,preload:`metadata`,class:`w-full max-w-2xl`},null,8,_hoisted_24$2))])):Ph.content.kind===`video`&&Ph.selectedPath?(openBlock(),createElementBlock(`div`,_hoisted_25$2,[(openBlock(),createElementBlock(`video`,{key:Ph.selectedPath,src:Bh(Ph.selectedPath),controls:``,preload:`metadata`,class:`max-w-full max-h-full`},null,8,_hoisted_26$2))])):(openBlock(),createElementBlock(`div`,_hoisted_27$2,[`message`in Ph.content?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString$1(Ph.content.message),1)],64)):createCommentVNode(``,!0)]))],64)):createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_2$8,toDisplayString$1(unref(Ih)(`fileContentRenderer.selectFile`)),1))]))}}),FileContentRenderer_default=FileContentRenderer_vue_vue_type_script_setup_true_lang_default;function useFileTree(){let{expand:Ph}=useExpandedDirs(),Fh=ref(null),Ih=ref([]),Lh=ref(new Map),Rh=ref(null),zh=0;async function Bh(Ph){if(Lh.value.has(Ph))return;let Ih=zh,Bh=new Map(Lh.value);Bh.set(Ph,null),Lh.value=Bh;let Vh=await apiGet(API_ROUTES.files.dir,{path:Ph});if(Ih!==zh)return;if(!Vh.ok){let Fh=new Map(Lh.value);Fh.delete(Ph),Lh.value=Fh,Rh.value=Vh.error||`dir: ${Vh.status}`;return}let Hh=Vh.data,Uh=new Map(Lh.value);Uh.set(Ph,Hh.children??[]),Lh.value=Uh,Ph===``&&(Fh.value={...Hh,children:[]})}async function Vh(Fh){let Ih=Fh.split(`/`).filter(Boolean);if(Ih.length<=1)return;let Lh=[];for(let Ph=1;Ph<Ih.length;Ph++)Lh.push(Ih.slice(0,Ph).join(`/`));for(let Fh of Lh)Ph(Fh),await Bh(Fh)}async function Hh(){zh++,Fh.value=null,Lh.value=new Map,Rh.value=null,await Bh(``)}async function Uh(){let Ph=await apiGet(API_ROUTES.files.refRoots);Ph.ok&&Array.isArray(Ph.data)&&(Ih.value=Ph.data)}return{rootNode:Fh,refRoots:Ih,childrenByPath:Lh,treeError:Rh,loadDirChildren:Bh,ensureAncestorsLoaded:Vh,reloadRoot:Hh,loadRefRoots:Uh}}function isValidFilePath(Ph){return typeof Ph!=`string`||Ph.length===0||Ph.startsWith(`/`)?!1:!Ph.split(`/`).some(Ph=>Ph===`..`)}function readPathMatch(Ph){return Array.isArray(Ph)?Ph.length===0?null:Ph.join(`/`):isNonEmptyString(Ph)?Ph:null}function useFileSelection(){let Ph=useRoute(),Fh=useRouter(),Ih=readPathMatch(Ph.params.pathMatch),Lh=ref(isValidFilePath(Ih)?Ih:null),Rh=ref(null),zh=ref(!1),Bh=ref(null),Vh=null;async function Hh(Ph){Vh?.abort();let Fh=new AbortController;Vh=Fh,zh.value=!0,Bh.value=null,Rh.value=null;try{let Ih=await apiGet(API_ROUTES.files.content,{path:Ph},{signal:Fh.signal});if(Fh.signal.aborted)return;Ih.ok?Rh.value=Ih.data:Bh.value=Ih.error}finally{Vh===Fh&&(zh.value=!1,Vh=null)}}function Uh(Ih){Lh.value=Ih,Hh(Ih),Fh.push({name:`files`,params:{pathMatch:Ih.split(`/`)},query:Ph.query}).catch(Ph=>{isNavigationFailure(Ph)||console.error(`[selectFile] navigation failed:`,Ph)})}function Wh(){Vh?.abort(),Vh=null,Lh.value=null,Rh.value=null,zh.value=!1,Bh.value=null,Fh.replace({name:`files`,params:{pathMatch:[]},query:Ph.query}).catch(Ph=>{isNavigationFailure(Ph)||console.error(`[deselectFile] navigation failed:`,Ph)})}function Gh(){Vh?.abort(),Vh=null,zh.value=!1}return{selectedPath:Lh,content:Rh,contentLoading:zh,contentError:Bh,loadContent:Hh,selectFile:Uh,deselectFile:Wh,abortContent:Gh}}var MD_RAW_STORAGE_KEY=`files_md_raw_mode`;function useMarkdownMode(){let Ph=ref(localStorage.getItem(MD_RAW_STORAGE_KEY)===`true`);function Fh(){Ph.value=!Ph.value,localStorage.setItem(MD_RAW_STORAGE_KEY,String(Ph.value))}return{mdRawMode:Ph,toggleMdRaw:Fh}}var SORT_MODE_STORAGE_KEY=`files_sort_mode`;function readStoredMode(){return localStorage.getItem(SORT_MODE_STORAGE_KEY)===`recent`?`recent`:`name`}function useFileSortMode(){let Ph=ref(readStoredMode());function Fh(Fh){Ph.value=Fh,localStorage.setItem(SORT_MODE_STORAGE_KEY,Fh)}return{sortMode:Ph,setSortMode:Fh}}var HTML_PREVIEW_CSP_ALLOWED_CDNS=[`https://cdn.jsdelivr.net`,`https://unpkg.com`,`https://cdnjs.cloudflare.com`,`https://fonts.googleapis.com`,`https://fonts.gstatic.com`];function buildHtmlPreviewCsp(Ph=HTML_PREVIEW_CSP_ALLOWED_CDNS){let Fh=Ph.join(` `);return[`default-src 'none'`,`script-src 'unsafe-inline' ${Fh}`,`style-src 'unsafe-inline' ${Fh}`,`font-src ${Fh}`,`img-src 'self' ${Fh} data: blob:`,`connect-src 'none'`].join(`; `)}var CSP_META_NONCE=``;function wrapHtmlWithPreviewCsp(Ph){let Fh=`<meta http-equiv="Content-Security-Policy" content="${buildHtmlPreviewCsp()}">`;return/<head\b[^>]*>/i.test(Ph)?Ph.replace(/(<head\b[^>]*>)/i,`$1${Fh}`):`<!DOCTYPE html><html><head>${Fh}</head><body>${Ph}</body></html>${CSP_META_NONCE}`}function hasExt(Ph,Fh){if(!Ph)return!1;let Ih=Ph.toLowerCase();return Fh.some(Ph=>Ih.endsWith(Ph))}function useContentDisplay(Ph,Fh){let Ih=computed(()=>hasExt(Ph.value,[`.md`,`.markdown`])),Lh=computed(()=>hasExt(Ph.value,[`.html`,`.htm`])),Rh=computed(()=>hasExt(Ph.value,[`.json`])),zh=computed(()=>hasExt(Ph.value,[`.jsonl`,`.ndjson`]));return{isMarkdown:Ih,isHtml:Lh,isJson:Rh,isJsonl:zh,sandboxedHtml:computed(()=>Fh.value?.kind===`text`&&Lh.value?wrapHtmlWithPreviewCsp(Fh.value.content):``),jsonTokens:computed(()=>!Fh.value||Fh.value.kind!==`text`||!Rh.value?[]:tokenizeJson(prettyJson(Fh.value.content))),jsonlLines:computed(()=>!Fh.value||Fh.value.kind!==`text`||!zh.value?[]:tokenizeJsonl(Fh.value.content)),mdFrontmatter:computed(()=>!Fh.value||Fh.value.kind!==`text`||!Ih.value?null:extractFrontmatter(Fh.value.content))}}function useMarkdownLinkHandler(Ph,Fh){function Ih(Ih){if(Ih.button!==0||Ih.ctrlKey||Ih.metaKey||Ih.shiftKey)return;let Lh=Ih.target;if(!(Lh instanceof Element))return;let Rh=Lh.closest(`a`);if(!Rh)return;let zh=Rh.getAttribute(`href`);if(!zh||isExternalHref(zh)||zh.startsWith(`#`)||!Ph.value)return;let Bh=resolveWorkspaceLink(Ph.value,zh);if(!Bh)return;Ih.preventDefault(),Ih.stopPropagation();let Vh=extractSessionIdFromPath(Bh);if(Vh!==null){Fh.onLoadSession(Vh);return}Fh.onNavigate(Bh)}return{handleMarkdownLinkClick:Ih}}var WORKSPACE_FILES={memory:`conversations/memory.md`,sessionToken:`.session-token`,wikiIndex:`data/wiki/index.md`,wikiLog:`data/wiki/log.md`,wikiSchema:`data/wiki/SCHEMA.md`,wikiSummary:`data/wiki/summary.md`,summariesIndex:`conversations/summaries/_index.md`,todosItems:`data/todos/todos.json`,todosColumns:`data/todos/columns.json`,schedulerItems:`data/scheduler/items.json`,schedulerUserTasks:`config/scheduler/tasks.json`,schedulerOverrides:`config/scheduler/overrides.json`,newsReadState:`config/news-read-state.json`};function isScheduledItem(Ph){return!(!isRecord(Ph)||typeof Ph.id!=`string`||typeof Ph.title!=`string`)}function isScheduledItemArray(Ph){return Array.isArray(Ph)&&Ph.every(isScheduledItem)}function toSchedulerResult(Ph,Fh){if(Ph!==WORKSPACE_FILES.schedulerItems||Fh===null)return null;let Ih;try{Ih=JSON.parse(Fh)}catch{return null}return isScheduledItemArray(Ih)?{uuid:`files-scheduler-preview`,toolName:`manageCalendar`,message:WORKSPACE_FILES.schedulerItems,title:`Scheduler`,data:{items:Ih}}:null}function isTodoItem(Ph){return!(!isRecord(Ph)||typeof Ph.id!=`string`||typeof Ph.text!=`string`||typeof Ph.completed!=`boolean`||typeof Ph.createdAt!=`number`)}function isTodoItemArray(Ph){return Array.isArray(Ph)&&Ph.every(isTodoItem)}function toTodoExplorerResult(Ph,Fh){if(Ph!==WORKSPACE_FILES.todosItems||Fh===null)return null;let Ih;try{Ih=JSON.parse(Fh)}catch{return null}let Lh=isTodoItemArray(Ih)?Ih:[];return{uuid:`files-todo-preview`,toolName:`manageTodoList`,message:WORKSPACE_FILES.todosItems,title:`Todo`,data:{items:Lh,columns:[]}}}var _hoisted_1$7={class:`h-full flex bg-white`},_hoisted_2$7={class:`flex-1 flex flex-col min-w-0 overflow-hidden`},RECENT_THRESHOLD_MS=60*1e3,FilesView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FilesView`,props:{refreshToken:{}},emits:[`loadSession`],setup(Ph,{emit:Fh}){let Ih=useRoute(),Lh=Ph,Rh=Fh,{rootNode:zh,refRoots:Bh,childrenByPath:Vh,treeError:Hh,loadDirChildren:Uh,ensureAncestorsLoaded:Wh,reloadRoot:Gh,loadRefRoots:Kh}=useFileTree(),{selectedPath:qh,content:Jh,contentLoading:Yh,contentError:Xh,loadContent:Zh,selectFile:Qh,deselectFile:$h,abortContent:eg}=useFileSelection(),{mdRawMode:tg,toggleMdRaw:ng}=useMarkdownMode(),{sortMode:rg,setSortMode:ig}=useFileSortMode(),{isMarkdown:ag,isHtml:og,isJson:sg,isJsonl:cg,sandboxedHtml:lg,jsonTokens:ug,jsonlLines:dg,mdFrontmatter:fg}=useContentDisplay(qh,Jh),pg=ref(null);async function mg(Ph){if(!qh.value||Jh.value?.kind!==`text`||Ph===Jh.value.content)return;let Fh=qh.value;pg.value=null;let Ih=await apiPut(API_ROUTES.files.content,{path:Fh,content:Ph});if(qh.value===Fh){if(!Ih.ok){pg.value=Ih.error;return}Jh.value={kind:`text`,path:Ih.data.path,content:Ph,size:Ih.data.size,modifiedMs:Ih.data.modifiedMs}}}watch(Jh,()=>{pg.value=null});let hg=computed(()=>toSchedulerResult(qh.value,Jh.value?.kind===`text`?Jh.value.content:null)),gg=computed(()=>toTodoExplorerResult(qh.value,Jh.value?.kind===`text`?Jh.value.content:null)),_g=computed(()=>{let Ph=new Set,Fh=Date.now();for(let Ih of Vh.value.values())if(Ih)for(let Lh of Ih)Lh.type===`file`&&Lh.modifiedMs&&Fh-Lh.modifiedMs<RECENT_THRESHOLD_MS&&Ph.add(Lh.path);return Ph}),{handleMarkdownLinkClick:vg}=useMarkdownLinkHandler(qh,{onNavigate:Qh,onLoadSession:Ph=>Rh(`loadSession`,Ph)});return watch(()=>readPathMatch(Ih.params.pathMatch),Ph=>{if(!isValidFilePath(Ph)){qh.value!==null&&(qh.value=null,Jh.value=null);return}Ph!==qh.value&&(qh.value=Ph,Zh(Ph))}),watch(()=>Lh.refreshToken,()=>{Gh(),qh.value&&Zh(qh.value)}),onMounted(async()=>{await Uh(``),await Kh(),qh.value&&(await Wh(qh.value),Zh(qh.value))}),onUnmounted(()=>{eg()}),(Ph,Fh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$7,[createVNode$1(FileTreePane_default,{"root-node":unref(zh),"ref-roots":unref(Bh),"children-by-path":unref(Vh),"tree-error":unref(Hh),"selected-path":unref(qh),"recent-paths":_g.value,"sort-mode":unref(rg),onSelect:unref(Qh),onLoadChildren:unref(Uh),"onUpdate:sortMode":unref(ig)},null,8,[`root-node`,`ref-roots`,`children-by-path`,`tree-error`,`selected-path`,`recent-paths`,`sort-mode`,`onSelect`,`onLoadChildren`,`onUpdate:sortMode`]),createBaseVNode(`div`,_hoisted_2$7,[createVNode$1(FileContentHeader_default,{"selected-path":unref(qh),size:unref(Jh)?.size??null,"modified-ms":unref(Jh)?.modifiedMs??null,"is-markdown":unref(ag),"md-raw-mode":unref(tg),onToggleMdRaw:unref(ng),onDeselect:unref($h)},null,8,[`selected-path`,`size`,`modified-ms`,`is-markdown`,`md-raw-mode`,`onToggleMdRaw`,`onDeselect`]),createVNode$1(FileContentRenderer_default,{"selected-path":unref(qh),content:unref(Jh),"content-error":unref(Xh),"content-loading":unref(Yh),"scheduler-result":hg.value,"todo-explorer-result":gg.value,"is-markdown":unref(ag),"is-html":unref(og),"is-json":unref(sg),"is-jsonl":unref(cg),"md-raw-mode":unref(tg),"sandboxed-html":unref(lg),"json-tokens":unref(ug),"jsonl-lines":unref(dg),"md-frontmatter":unref(fg),"raw-save-error":pg.value,onMarkdownLinkClick:unref(vg),onUpdateSource:mg},null,8,[`selected-path`,`content`,`content-error`,`content-loading`,`scheduler-result`,`todo-explorer-result`,`is-markdown`,`is-html`,`is-json`,`is-jsonl`,`md-raw-mode`,`sandboxed-html`,`json-tokens`,`jsonl-lines`,`md-frontmatter`,`raw-save-error`,`onMarkdownLinkClick`])])]))}}),FilesView_default=FilesView_vue_vue_type_script_setup_true_lang_default,MAX_RETRIES=10,RETRY_INTERVAL_MS=150,SourcesView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SourcesView`,setup(Ph){let Fh=useRoute();async function Ih(Ph){for(let Fh=0;Fh<MAX_RETRIES;Fh++){if(await nextTick$1(),scrollIntoViewByTestId(`source-row-${Ph}`))return;await new Promise(Ph=>window.setTimeout(Ph,RETRY_INTERVAL_MS))}}return onMounted(()=>{let Ph=Fh.params.slug;typeof Ph==`string`&&Ph&&Ih(Ph)}),watch(()=>Fh.params.slug,Ph=>{typeof Ph==`string`&&Ph&&Ih(Ph)}),(Ph,Fh)=>(openBlock(),createBlock(SourcesManager_default,{mode:`page`}))}}),SourcesView_default=SourcesView_vue_vue_type_script_setup_true_lang_default;function useNewsItems(){let Ph=ref([]),Fh=ref(!1),Ih=ref(null);async function Lh(Lh=30){Fh.value=!0,Ih.value=null;let Rh=await apiGet(`${API_ROUTES.news.items}?days=${Lh}`);if(Fh.value=!1,!Rh.ok){Ih.value=Rh.error;return}Ph.value=Rh.data.items}return{items:Ph,loading:Fh,error:Ih,load:Lh}}function useNewsReadState(){let Ph=ref(new Set),Fh=ref(null),Ih=Promise.resolve();async function Lh(){let Ih=await apiGet(API_ROUTES.news.readState);if(!Ih.ok){Fh.value=Ih.error;return}Fh.value=null,Ph.value=new Set(Ih.data.readIds)}async function Rh(){let Lh=Array.from(Ph.value),Rh=Ih.catch(()=>void 0).then(async()=>{let Ih=await apiPut(API_ROUTES.news.readState,{readIds:Lh});if(!Ih.ok){Fh.value=Ih.error;return}Fh.value=null,Ph.value=new Set(Ih.data.readIds)});return Ih=Rh,Rh}function zh(Fh){Ph.value.has(Fh)||(Ph.value.add(Fh),Ph.value=new Set(Ph.value),Rh())}function Bh(Fh){let Ih=!1;for(let Lh of Fh)Ph.value.has(Lh)||(Ph.value.add(Lh),Ih=!0);Ih&&(Ph.value=new Set(Ph.value),Rh())}function Vh(Fh){return Ph.value.has(Fh)}return{readIds:Ph,error:Fh,load:Lh,markRead:zh,markAllRead:Bh,isRead:Vh,readCount:computed(()=>Ph.value.size)}}var _hoisted_1$6={class:`h-full flex flex-col bg-white`,"data-testid":`news-view`},_hoisted_2$6={class:`px-3 py-2 border-b border-gray-200 flex flex-wrap items-center gap-2 shrink-0`},_hoisted_3$6={class:`text-base font-semibold text-gray-900 mr-3`},_hoisted_4$6={class:`text-xs text-gray-500`,"data-testid":`news-counts`},_hoisted_5$6={class:`ml-auto flex items-center gap-2`},_hoisted_6$6={class:`flex border border-gray-300 rounded overflow-hidden`,role:`tablist`},_hoisted_7$6=[`data-testid`,`aria-pressed`,`onClick`],_hoisted_8$5=[`disabled`],_hoisted_9$5={key:0,class:`px-3 py-2 border-b border-gray-100 flex flex-wrap items-center gap-1 shrink-0`},_hoisted_10$5={class:`flex-1 min-h-0 flex`},_hoisted_11$5={class:`w-80 shrink-0 border-r border-gray-200 overflow-y-auto`,"data-testid":`news-list`},_hoisted_12$5={key:0,class:`p-4 text-sm text-gray-400`},_hoisted_13$5={key:1,class:`p-4 text-sm text-red-600 bg-red-50`,role:`alert`},_hoisted_14$5={key:2,class:`p-4 text-sm text-gray-400`},_hoisted_15$5={key:3,class:`divide-y divide-gray-100`},_hoisted_16$4=[`data-testid`,`onClick`],_hoisted_17$4={class:`flex items-start gap-2`},_hoisted_18$4=[`title`,`aria-label`],_hoisted_19$4={class:`min-w-0 flex-1`},_hoisted_20$1={class:`mt-0.5 flex items-center gap-2 text-[11px] text-gray-500`},_hoisted_21$1={class:`truncate`},_hoisted_22$1={class:`flex-1 min-w-0 flex flex-col`,"data-testid":`news-detail`},_hoisted_23$1={key:0,class:`flex-1 flex items-center justify-center text-sm text-gray-400`},_hoisted_24$1={class:`flex-1 min-h-0 overflow-y-auto`},_hoisted_25$1={class:`px-6 py-4 max-w-3xl`},_hoisted_26$1={class:`text-xl font-semibold text-gray-900 leading-snug`},_hoisted_27$1={class:`mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500`},_hoisted_28$1=[`href`],_hoisted_29$1={class:`mt-4`},_hoisted_30$1={key:0,class:`text-sm text-gray-400`},_hoisted_31$1={key:1,class:`text-sm text-red-600`},_hoisted_32$1={key:2,class:`text-sm text-gray-400 italic`},_hoisted_33$1=[`innerHTML`],NewsView_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`NewsView`,setup(Ph){let{t:Fh}=useI18n(),Ih=useRoute(),{items:Lh,loading:Rh,error:zh,load:Bh}=useNewsItems(),{isRead:Vh,markRead:Hh,markAllRead:Uh,load:Wh}=useNewsReadState(),Gh=ref(`unread`),Kh=ref(`all`),qh=ref(null),Jh=ref(null),Yh=ref(!1),Xh=ref(null),Zh=computed(()=>[{value:`unread`,label:Fh(`pluginNews.filterUnread`)},{value:`all`,label:Fh(`pluginNews.filterAll`)}]),Qh=computed(()=>Lh.value.filter(Ph=>!(Gh.value===`unread`&&Vh(Ph.id)||Kh.value!==`all`&&Ph.sourceSlug!==Kh.value))),$h=computed(()=>{let Ph=new Map;for(let Fh of Lh.value)Ph.set(Fh.sourceSlug,(Ph.get(Fh.sourceSlug)??0)+1);let Ih=Array.from(Ph.entries()).sort(([,Ph],[,Fh])=>Fh-Ph).map(([Ph,Fh])=>({slug:Ph,label:Ph,count:Fh}));return[{slug:`all`,label:Fh(`pluginNews.allSources`),count:Lh.value.length},...Ih]}),eg=computed(()=>Lh.value.filter(Ph=>!Vh(Ph.id)).length),tg=computed(()=>Lh.value.find(Ph=>Ph.id===qh.value)??null),ng=computed(()=>Jh.value?g$3(Jh.value,{breaks:!0,gfm:!0}):``);function rg(Ph){qh.value=Ph,setTimeout(()=>{qh.value===Ph&&Hh(Ph)},250)}function ig(){Uh(Lh.value.map(Ph=>Ph.id))}let ag=0;watch(()=>qh.value,async Ph=>{if(Jh.value=null,Xh.value=null,!Ph)return;Yh.value=!0;let Fh=++ag,Ih=await apiGet(API_ROUTES.news.itemBody.replace(`:id`,encodeURIComponent(Ph)));if(Fh===ag){if(Yh.value=!1,!Ih.ok){Xh.value=Ih.error;return}Jh.value=Ih.data.body}});function og(){let Ph=Ih.query.source;typeof Ph==`string`&&Ph.length>0&&(Kh.value=Ph)}return onMounted(async()=>{og(),await Promise.all([Bh(),Wh()])}),watch(()=>Ih.query.source,()=>og()),(Ph,Ih)=>(openBlock(),createElementBlock(`div`,_hoisted_1$6,[createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`h1`,_hoisted_3$6,toDisplayString$1(unref(Fh)(`pluginNews.title`)),1),createBaseVNode(`span`,_hoisted_4$6,toDisplayString$1(unref(Fh)(`pluginNews.itemCount`,{unread:eg.value,total:unref(Lh).length})),1),createBaseVNode(`div`,_hoisted_5$6,[createBaseVNode(`div`,_hoisted_6$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Zh.value,Ph=>(openBlock(),createElementBlock(`button`,{key:Ph.value,class:normalizeClass([`h-8 px-2.5 flex items-center gap-1 text-sm transition-colors`,Gh.value===Ph.value?`bg-blue-50 text-blue-600 font-medium`:`bg-white text-gray-600 hover:bg-gray-50`]),"data-testid":`news-filter-${Ph.value}`,"aria-pressed":Gh.value===Ph.value,onClick:Fh=>Gh.value=Ph.value},toDisplayString$1(Ph.label),11,_hoisted_7$6))),128))]),createBaseVNode(`button`,{class:`h-8 px-2.5 flex items-center gap-1 text-sm rounded border border-gray-300 text-gray-600 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed`,disabled:eg.value===0,"data-testid":`news-mark-all-read`,onClick:ig},toDisplayString$1(unref(Fh)(`pluginNews.markAllRead`)),9,_hoisted_8$5)])]),$h.value.length>1?(openBlock(),createElementBlock(`div`,_hoisted_9$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList($h.value,Ph=>(openBlock(),createBlock(FilterChip_default,{key:Ph.slug,active:Kh.value===Ph.slug,label:Ph.label,count:Ph.count,"data-testid":`news-source-${Ph.slug}`,onClick:Fh=>Kh.value=Ph.slug},null,8,[`active`,`label`,`count`,`data-testid`,`onClick`]))),128))])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_10$5,[createBaseVNode(`div`,_hoisted_11$5,[unref(Rh)?(openBlock(),createElementBlock(`div`,_hoisted_12$5,toDisplayString$1(unref(Fh)(`common.loading`)),1)):unref(zh)?(openBlock(),createElementBlock(`div`,_hoisted_13$5,toDisplayString$1(unref(Fh)(`pluginNews.loadError`,{error:unref(zh)})),1)):Qh.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_14$5,toDisplayString$1(unref(Fh)(`pluginNews.empty`)),1)):(openBlock(),createElementBlock(`ul`,_hoisted_15$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Qh.value,Ph=>(openBlock(),createElementBlock(`li`,{key:Ph.id,class:normalizeClass([`px-3 py-2 cursor-pointer`,qh.value===Ph.id?`bg-blue-50`:`hover:bg-gray-50`]),"data-testid":`news-item-${Ph.id}`,onClick:Fh=>rg(Ph.id)},[createBaseVNode(`div`,_hoisted_17$4,[unref(Vh)(Ph.id)?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,{key:0,class:`mt-1 w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0`,title:unref(Fh)(`pluginNews.unread`),"aria-label":unref(Fh)(`pluginNews.unread`)},null,8,_hoisted_18$4)),createBaseVNode(`div`,_hoisted_19$4,[createBaseVNode(`div`,{class:normalizeClass([`text-sm leading-snug`,unref(Vh)(Ph.id)?`text-gray-500`:`text-gray-900 font-medium`])},toDisplayString$1(Ph.title),3),createBaseVNode(`div`,_hoisted_20$1,[createBaseVNode(`span`,_hoisted_21$1,toDisplayString$1(Ph.sourceSlug),1),createBaseVNode(`span`,null,toDisplayString$1(unref(formatSmartTime)(Ph.publishedAt)),1)])])])],10,_hoisted_16$4))),128))]))]),createBaseVNode(`div`,_hoisted_22$1,[tg.value?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_24$1,[createBaseVNode(`div`,_hoisted_25$1,[createBaseVNode(`h2`,_hoisted_26$1,toDisplayString$1(tg.value.title),1),createBaseVNode(`div`,_hoisted_27$1,[createBaseVNode(`span`,null,toDisplayString$1(tg.value.sourceSlug),1),createBaseVNode(`span`,null,toDisplayString$1(unref(formatSmartTime)(tg.value.publishedAt)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(tg.value.categories,Ph=>(openBlock(),createElementBlock(`span`,{key:Ph,class:`text-[10px] px-1.5 py-0.5 rounded bg-gray-100 text-gray-600`},toDisplayString$1(Ph),1))),128))]),createBaseVNode(`a`,{href:tg.value.url,target:`_blank`,rel:`noopener noreferrer`,class:`mt-3 inline-flex items-center gap-1 text-sm text-blue-600 hover:underline`,"data-testid":`news-open-original`},[Ih[0]||=createBaseVNode(`span`,{class:`material-icons text-sm`},`open_in_new`,-1),createTextVNode(` `+toDisplayString$1(unref(Fh)(`pluginNews.openOriginal`)),1)],8,_hoisted_28$1),createBaseVNode(`div`,_hoisted_29$1,[Yh.value?(openBlock(),createElementBlock(`div`,_hoisted_30$1,toDisplayString$1(unref(Fh)(`common.loading`)),1)):Xh.value?(openBlock(),createElementBlock(`div`,_hoisted_31$1,toDisplayString$1(unref(Fh)(`pluginNews.bodyError`,{error:Xh.value})),1)):Jh.value?(openBlock(),createElementBlock(`div`,{key:3,class:`markdown-content prose prose-slate max-w-none`,innerHTML:ng.value},null,8,_hoisted_33$1)):(openBlock(),createElementBlock(`div`,_hoisted_32$1,toDisplayString$1(unref(Fh)(`pluginNews.noBody`)),1))])])]),(openBlock(),createBlock(PageChatComposer_default,{key:tg.value.id,placeholder:unref(Fh)(`pluginNews.chatPlaceholder`),"prepend-text":`Read this article. ${tg.value.url}`,"allow-empty":!0,"test-id-prefix":`news-page-chat`},null,8,[`placeholder`,`prepend-text`]))],64)):(openBlock(),createElementBlock(`div`,_hoisted_23$1,toDisplayString$1(unref(Fh)(`pluginNews.selectPrompt`)),1))])])]))}}),NewsView_default=NewsView_vue_vue_type_script_setup_true_lang_default,MCP_CATALOG=[{id:`memory`,displayName:`settingsMcpTab.catalog.entry.memory.displayName`,description:`settingsMcpTab.catalog.entry.memory.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/memory`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-memory`]},configSchema:[],riskLevel:`low`},{id:`sequential-thinking`,displayName:`settingsMcpTab.catalog.entry.sequentialThinking.displayName`,description:`settingsMcpTab.catalog.entry.sequentialThinking.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-sequential-thinking`]},configSchema:[],riskLevel:`low`},{id:`context7`,displayName:`settingsMcpTab.catalog.entry.context7.displayName`,description:`settingsMcpTab.catalog.entry.context7.description`,audience:`general`,upstreamUrl:`https://github.com/upstash/context7`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@upstash/context7-mcp`]},configSchema:[],riskLevel:`low`},{id:`deepwiki`,displayName:`settingsMcpTab.catalog.entry.deepwiki.displayName`,description:`settingsMcpTab.catalog.entry.deepwiki.description`,audience:`general`,upstreamUrl:`https://docs.devin.ai/work-with-devin/deepwiki-mcp`,spec:{type:`http`,url:`https://mcp.deepwiki.com/sse`},configSchema:[],riskLevel:`low`},{id:`notion`,displayName:`settingsMcpTab.catalog.entry.notion.displayName`,description:`settingsMcpTab.catalog.entry.notion.description`,audience:`general`,upstreamUrl:`https://github.com/makenotion/notion-mcp-server`,setupGuideUrl:`https://www.notion.so/help/create-integrations-with-the-notion-api`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@notionhq/notion-mcp-server`],env:{NOTION_TOKEN:"${NOTION_API_KEY}"}},configSchema:[{key:`NOTION_API_KEY`,label:`settingsMcpTab.catalog.entry.notion.field.apiKey.label`,kind:`secret`,placeholder:`secret_...`,required:!0,helpUrl:`https://www.notion.so/my-integrations`,helpText:`settingsMcpTab.catalog.entry.notion.field.apiKey.help`}],riskLevel:`medium`},{id:`slack`,displayName:`settingsMcpTab.catalog.entry.slack.displayName`,description:`settingsMcpTab.catalog.entry.slack.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/slack`,setupGuideUrl:`https://api.slack.com/quickstart`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-slack`],env:{SLACK_BOT_TOKEN:"${SLACK_BOT_TOKEN}",SLACK_TEAM_ID:"${SLACK_TEAM_ID}"}},configSchema:[{key:`SLACK_BOT_TOKEN`,label:`settingsMcpTab.catalog.entry.slack.field.botToken.label`,kind:`secret`,placeholder:`xoxb-...`,required:!0,helpUrl:`https://api.slack.com/apps`,helpText:`settingsMcpTab.catalog.entry.slack.field.botToken.help`},{key:`SLACK_TEAM_ID`,label:`settingsMcpTab.catalog.entry.slack.field.teamId.label`,kind:`text`,placeholder:`T01ABC23DEF`,required:!0,helpUrl:`https://api.slack.com/methods/team.info`,helpText:`settingsMcpTab.catalog.entry.slack.field.teamId.help`}],riskLevel:`medium`},{id:`google-maps`,displayName:`settingsMcpTab.catalog.entry.googleMaps.displayName`,description:`settingsMcpTab.catalog.entry.googleMaps.description`,audience:`general`,upstreamUrl:`https://github.com/modelcontextprotocol/servers/tree/main/src/google-maps`,setupGuideUrl:`https://developers.google.com/maps/documentation/javascript/get-api-key`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-google-maps`],env:{GOOGLE_MAPS_API_KEY:"${GOOGLE_MAPS_API_KEY}"}},configSchema:[{key:`GOOGLE_MAPS_API_KEY`,label:`settingsMcpTab.catalog.entry.googleMaps.field.apiKey.label`,kind:`secret`,placeholder:`AIza...`,required:!0,helpUrl:`https://console.cloud.google.com/google/maps-apis/credentials`,helpText:`settingsMcpTab.catalog.entry.googleMaps.field.apiKey.help`}],riskLevel:`low`},{id:`weather-open-meteo`,displayName:`settingsMcpTab.catalog.entry.weatherOpenMeteo.displayName`,description:`settingsMcpTab.catalog.entry.weatherOpenMeteo.description`,audience:`general`,upstreamUrl:`https://open-meteo.com/`,spec:{type:`stdio`,command:`npx`,args:[`-y`,`mcp-server-open-meteo`]},configSchema:[],riskLevel:`low`}];function requiredKeysOf(Ph){return new Set(Ph.configSchema.filter(Ph=>Ph.required).map(Ph=>Ph.key))}var PLACEHOLDER=/\$\{([A-Z_][A-Z0-9_]*)\}/g;function interpolateMcpSpec(Ph,Fh,Ih){let Lh=new Set,Rh=new Set,zh=Ph=>Ph.replace(PLACEHOLDER,(Ph,zh)=>{Rh.add(zh);let Bh=Fh[zh];return Bh===void 0||Bh===``?(Ih.has(zh)&&Lh.add(zh),``):Bh}),Bh;Bh=Ph.type===`http`?{type:`http`,url:zh(Ph.url),...Ph.headers!==void 0&&{headers:mapValues(Ph.headers,zh)},...Ph.enabled!==void 0&&{enabled:Ph.enabled}}:{type:`stdio`,command:zh(Ph.command),...Ph.args!==void 0&&{args:Ph.args.map(zh)},...Ph.env!==void 0&&{env:mapValues(Ph.env,zh)},...Ph.enabled!==void 0&&{enabled:Ph.enabled}};for(let Ph of Ih)Rh.has(Ph)||Lh.add(Ph);return Lh.size>0?{ok:!1,missing:[...Lh]}:{ok:!0,spec:Bh}}function mapValues(Ph,Fh){let Ih={};for(let[Lh,Rh]of Object.entries(Ph))Ih[Lh]=Fh(Rh);return Ih}var _hoisted_1$5={class:`space-y-3`},_hoisted_2$5={"data-testid":`mcp-catalog`,class:`space-y-2 pt-1`},_hoisted_3$5={class:`text-xs font-semibold text-gray-700`},_hoisted_4$5={class:`group`,open:``,"data-testid":`mcp-catalog-audience-general`},_hoisted_5$5={class:`cursor-pointer text-xs font-medium text-gray-700 select-none py-1`},_hoisted_6$5={class:`text-gray-400 ml-1`},_hoisted_7$5={class:`mt-2 space-y-2`},_hoisted_8$4=[`data-testid`],_hoisted_9$4={class:`flex items-start gap-2 cursor-pointer`},_hoisted_10$4=[`checked`,`data-testid`,`onChange`],_hoisted_11$4={class:`flex-1 min-w-0`},_hoisted_12$4={class:`flex items-center gap-2 flex-wrap`},_hoisted_13$4={class:`text-sm font-semibold text-gray-800`},_hoisted_14$4={class:`text-xs text-gray-600 mt-0.5`},_hoisted_15$4={class:`text-[11px] text-gray-500 flex flex-wrap gap-x-3 ml-6`},_hoisted_16$3=[`href`,`data-testid`,`textContent`],_hoisted_17$3=[`href`,`data-testid`,`textContent`],_hoisted_18$3=[`data-testid`,`onSubmit`],_hoisted_19$3={class:`flex items-center gap-1.5`},_hoisted_20=[`for`],_hoisted_21=[`aria-label`],_hoisted_22=[`href`,`title`,`aria-label`,`data-testid`],_hoisted_23=[`id`,`onUpdate:modelValue`,`aria-required`,`data-testid`],_hoisted_24={key:0,value:``},_hoisted_25=[`value`],_hoisted_26=[`id`,`onUpdate:modelValue`,`type`,`placeholder`,`aria-required`,`data-testid`],_hoisted_27={key:2,class:`text-[11px] text-gray-500`},_hoisted_28=[`data-testid`],_hoisted_29={class:`flex gap-2 justify-end`},_hoisted_30=[`data-testid`],_hoisted_31=[`data-testid`],_hoisted_32={class:`text-xs font-semibold text-gray-700`},_hoisted_33={key:0,class:`text-xs text-gray-500 italic`,"data-testid":`mcp-empty`},_hoisted_34={key:1,class:`space-y-2`,"data-testid":`mcp-server-list`},_hoisted_35=[`data-testid`],_hoisted_36={class:`flex items-center justify-between`},_hoisted_37={class:`flex items-center gap-2`},_hoisted_38={class:`text-sm font-semibold text-gray-800`},_hoisted_39={class:`flex items-center gap-1 text-xs text-gray-600 ml-2`},_hoisted_40=[`checked`,`data-testid`,`onChange`],_hoisted_41=[`data-testid`,`onClick`],_hoisted_42={key:0,class:`text-xs space-y-1`},_hoisted_43={class:`text-gray-500`},_hoisted_44={class:`ml-1`},_hoisted_45={key:1,class:`text-xs space-y-1`},_hoisted_46={class:`text-gray-500`},_hoisted_47={class:`ml-1`},_hoisted_48={key:0,class:`ml-1`},_hoisted_49=[`data-testid`],_hoisted_50={key:3,class:`border border-blue-300 rounded p-3 space-y-2`,"data-testid":`mcp-add-form`},_hoisted_51={class:`block text-xs font-semibold text-gray-700`},_hoisted_52=[`placeholder`],_hoisted_53={class:`flex gap-3 text-xs`},_hoisted_54={class:`flex items-center gap-1`},_hoisted_55={class:`flex items-center gap-1`},_hoisted_56={key:0,class:`space-y-2`},_hoisted_57={class:`block text-xs font-semibold text-gray-700`},_hoisted_58=[`placeholder`],_hoisted_59={key:1,class:`space-y-2`},_hoisted_60={class:`block text-xs font-semibold text-gray-700`},_hoisted_61={class:`block text-xs font-semibold text-gray-700`},_hoisted_62=[`placeholder`],_hoisted_63={key:2,class:`text-xs text-red-600`,"data-testid":`mcp-draft-error`},_hoisted_64={class:`flex justify-end gap-2`},CONFIG_DRAFT_LS_PREFIX=`mcp-catalog-draft:`,SettingsMcpTab_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SettingsMcpTab`,props:{servers:{},dockerMode:{type:Boolean}},emits:[`add`,`update`,`remove`],setup(Ph,{expose:Fh,emit:Ih}){let{t:Lh}=useI18n(),Rh=Ph,zh=Ih,Bh=ref(!1),Vh=ref(ig()),Hh=ref(``),Uh=computed(()=>MCP_CATALOG.filter(Ph=>Ph.audience===`general`));function Wh(Ph){return Rh.servers.some(Fh=>Fh.id===Ph)}function Gh(Ph,Fh){if(Fh.target.checked){if(Ph.configSchema.length>0){Yh(Ph),Fh.target.checked=!1;return}zh(`add`,{id:Ph.id,spec:{...Ph.spec,enabled:!0}});return}let Ih=Rh.servers.findIndex(Fh=>Fh.id===Ph.id);Ih>=0&&zh(`remove`,Ih)}let Kh=ref(null),qh=ref({}),Jh=ref([]);function Yh(Ph){Kh.value=Ph.id,Jh.value=[],qh.value=$h(Ph.id);for(let Fh of Ph.configSchema)qh.value[Fh.key]===void 0&&(qh.value[Fh.key]=``)}function Xh(){Kh.value=null,qh.value={},Jh.value=[]}function Zh(){Xh()}function Qh(Ph){Jh.value=[];let Fh=interpolateMcpSpec(Ph.spec,qh.value,requiredKeysOf(Ph));if(!Fh.ok){Jh.value=Fh.missing,eg(Ph.id,qh.value,Ph.configSchema);return}zh(`add`,{id:Ph.id,spec:{...Fh.spec,enabled:!0}}),tg(Ph.id),Xh()}function $h(Ph){try{let Fh=window.localStorage.getItem(CONFIG_DRAFT_LS_PREFIX+Ph);if(!Fh)return{};let Ih=JSON.parse(Fh);if(!Ih||typeof Ih!=`object`||Array.isArray(Ih))return{};let Lh={};for(let[Ph,Fh]of Object.entries(Ih))typeof Fh==`string`&&(Lh[Ph]=Fh);return Lh}catch{return{}}}function eg(Ph,Fh,Ih){let Lh=new Set(Ih.filter(Ph=>Ph.kind===`secret`).map(Ph=>Ph.key)),Rh={};for(let[Ph,Ih]of Object.entries(Fh))Lh.has(Ph)||(Rh[Ph]=Ih);try{window.localStorage.setItem(CONFIG_DRAFT_LS_PREFIX+Ph,JSON.stringify(Rh))}catch{}}function tg(Ph){try{window.localStorage.removeItem(CONFIG_DRAFT_LS_PREFIX+Ph)}catch{}}function ng(Ph){return Ph.kind===`secret`?`password`:Ph.kind===`url`?`url`:`text`}function rg(Ph){return Ph===`low`?`bg-green-100 text-green-700`:Ph===`medium`?`bg-amber-100 text-amber-700`:`bg-red-100 text-red-700`}function ig(){return{id:``,type:`http`,url:``,command:`npx`,argsText:``}}function ag(){Vh.value=ig(),Hh.value=``,Bh.value=!0}function og(){Bh.value=!1,Hh.value=``}let sg=/^[a-z][a-z0-9_-]{0,63}$/;function cg(Ph){return Ph.type===`http`?lg(Ph.url.trim()):ug(Ph.argsText.split(`
4889
4889
  `).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0))}function lg(Ph){try{let Fh=new URL(Ph).hostname.split(`.`).filter(Ph=>Ph.length>0);return dg(Fh.filter((Ph,Ih)=>!(Ih===0&&(Ph===`mcp`||Ph===`www`||Ph===`api`))&&!(Ih===Fh.length-1&&/^[a-z]{2,4}$/.test(Ph)))[0]??Fh[0]??``)}catch{return``}}function ug(Ph){let Fh=Ph.find(Ph=>!Ph.startsWith(`-`));return Fh?dg((Fh.split(`/`).pop()??Fh).replace(/^(mcp-server-|server-|mcp-)/,``).replace(/\.(?:[jt]s|mjs|cjs)$/,``)):``}function dg(Ph){let Fh=Ph.toLowerCase().replace(/[^a-z0-9_-]+/g,`-`);for(;Fh.startsWith(`-`);)Fh=Fh.slice(1);for(;Fh.endsWith(`-`);)Fh=Fh.slice(0,-1);return Fh=Fh.slice(0,64),/^[a-z]/.test(Fh)?Fh:``}function fg(Ph){if(!Ph)return``;if(!Rh.servers.some(Fh=>Fh.id===Ph))return Ph;for(let Fh=2;Fh<1e3;Fh+=1){let Ih=`${Ph}-${Fh}`;if(!Rh.servers.some(Ph=>Ph.id===Ih))return Ih}return``}function pg(){let Ph=Vh.value.id.trim();if(!Ph){let Fh=fg(cg(Vh.value));if(!Fh){Hh.value=Lh(`settingsMcpTab.errNoName`);return}Ph=Fh}if(!sg.test(Ph)){Hh.value=Lh(`settingsMcpTab.errBadName`);return}if(Rh.servers.some(Fh=>Fh.id===Ph)){Hh.value=Lh(`settingsMcpTab.errIdExists`,{id:Ph});return}let Fh;if(Vh.value.type===`http`){let Ph=Vh.value.url.trim();if(!/^https?:\/\//.test(Ph)){Hh.value=Lh(`settingsMcpTab.errBadHttpUrl`);return}Fh={type:`http`,url:Ph,enabled:!0}}else{let Ph=Vh.value.argsText.split(`
4890
4890
  `).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0);Fh={type:`stdio`,command:Vh.value.command,args:Ph,enabled:!0}}zh(`add`,{id:Ph,spec:Fh}),Bh.value=!1,Hh.value=``}function mg(){return Bh.value?Vh.value.id.trim().length>0||Vh.value.type===`http`&&Vh.value.url.trim().length>0||Vh.value.type===`stdio`&&Vh.value.argsText.trim().length>0?(pg(),!Bh.value):(og(),!0):!0}function hg(){return Bh.value?Vh.value.id.trim().length>0||Vh.value.url.trim().length>0||Vh.value.type===`stdio`&&(Vh.value.command.trim().length>0||Vh.value.argsText.trim().length>0):!1}Fh({flushDraft:mg,hasPendingDraft:hg});function gg(Ph,Fh){let Ih=Fh.target,Lh=Rh.servers[Ph];Lh&&zh(`update`,Ph,{...Lh,spec:{...Lh.spec,enabled:Ih.checked}})}function _g(Ph){return/^https?:\/\/(localhost|127\.0\.0\.1)(?=[:/]|$)/.test(Ph)}function vg(Ph){return Ph?Ph.some(Ph=>/^\//.test(Ph)&&Ph!==`/workspace`&&!Ph.startsWith(`/workspace/`)):!1}return(Fh,Ih)=>{let Rh=resolveComponent(`i18n-t`);return openBlock(),createElementBlock(`div`,_hoisted_1$5,[createVNode$1(Rh,{keypath:`settingsMcpTab.explanation`,tag:`p`,class:`text-xs text-gray-600 leading-relaxed`},{npx:withCtx(()=>[...Ih[9]||=[createBaseVNode(`code`,{class:`bg-gray-100 px-1 rounded`},`npx`,-1)]]),node:withCtx(()=>[...Ih[10]||=[createBaseVNode(`code`,{class:`bg-gray-100 px-1 rounded`},`node`,-1)]]),tsx:withCtx(()=>[...Ih[11]||=[createBaseVNode(`code`,{class:`bg-gray-100 px-1 rounded`},`tsx`,-1)]]),_:1}),createBaseVNode(`section`,_hoisted_2$5,[createBaseVNode(`h3`,_hoisted_3$5,toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.heading`)),1),createBaseVNode(`details`,_hoisted_4$5,[createBaseVNode(`summary`,_hoisted_5$5,[createTextVNode(toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.audience.general`))+` `,1),createBaseVNode(`span`,_hoisted_6$5,`(`+toDisplayString$1(Uh.value.length)+`)`,1)]),createBaseVNode(`ul`,_hoisted_7$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Uh.value,Ph=>(openBlock(),createElementBlock(`li`,{key:Ph.id,"data-testid":`mcp-catalog-entry-${Ph.id}`,class:`border border-gray-200 rounded p-3 space-y-1.5`},[createBaseVNode(`label`,_hoisted_9$4,[createBaseVNode(`input`,{type:`checkbox`,checked:Wh(Ph.id),"data-testid":`mcp-catalog-toggle-${Ph.id}`,class:`mt-1 shrink-0`,onChange:Fh=>Gh(Ph,Fh)},null,40,_hoisted_10$4),createBaseVNode(`div`,_hoisted_11$4,[createBaseVNode(`div`,_hoisted_12$4,[createBaseVNode(`span`,_hoisted_13$4,toDisplayString$1(unref(Lh)(Ph.displayName)),1),createBaseVNode(`span`,{class:normalizeClass([`text-[10px] uppercase tracking-wide rounded px-1.5 py-0.5`,rg(Ph.riskLevel)])},toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.risk.${Ph.riskLevel}`)),3)]),createBaseVNode(`p`,_hoisted_14$4,toDisplayString$1(unref(Lh)(Ph.description)),1)])]),createBaseVNode(`div`,_hoisted_15$4,[createBaseVNode(`a`,{href:Ph.upstreamUrl,target:`_blank`,rel:`noopener noreferrer`,class:`hover:text-blue-600 hover:underline`,"data-testid":`mcp-catalog-upstream-${Ph.id}`,textContent:toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.upstream`))},null,8,_hoisted_16$3),Ph.setupGuideUrl?(openBlock(),createElementBlock(`a`,{key:0,href:Ph.setupGuideUrl,target:`_blank`,rel:`noopener noreferrer`,class:`hover:text-blue-600 hover:underline`,"data-testid":`mcp-catalog-setup-${Ph.id}`,textContent:toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.setupGuide`))},null,8,_hoisted_17$3)):createCommentVNode(``,!0)]),Kh.value===Ph.id?(openBlock(),createElementBlock(`form`,{key:0,"data-testid":`mcp-catalog-config-form-${Ph.id}`,class:`ml-6 mt-2 space-y-3 border-l-2 border-blue-200 pl-3`,onSubmit:withModifiers(Fh=>Qh(Ph),[`prevent`])},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.configSchema,Fh=>(openBlock(),createElementBlock(`div`,{key:Fh.key,class:`space-y-1`},[createBaseVNode(`div`,_hoisted_19$3,[createBaseVNode(`label`,{for:`mcp-config-${Ph.id}-${Fh.key}`,class:`text-xs font-medium text-gray-700`},[createTextVNode(toDisplayString$1(unref(Lh)(Fh.label))+` `,1),Fh.required?(openBlock(),createElementBlock(`span`,{key:0,class:`text-red-500`,"aria-label":unref(Lh)(`settingsMcpTab.catalog.config.requiredAria`)},toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.config.requiredMarker`)),9,_hoisted_21)):createCommentVNode(``,!0)],8,_hoisted_20),Fh.helpUrl?(openBlock(),createElementBlock(`a`,{key:0,href:Fh.helpUrl,target:`_blank`,rel:`noopener noreferrer`,class:`text-xs text-blue-600 hover:underline`,title:unref(Lh)(`settingsMcpTab.catalog.config.howToGet`),"aria-label":unref(Lh)(`settingsMcpTab.catalog.config.howToGet`),"data-testid":`mcp-catalog-config-help-${Ph.id}-${Fh.key}`},` 🔑 `,8,_hoisted_22)):createCommentVNode(``,!0)]),Fh.kind===`select`?withDirectives((openBlock(),createElementBlock(`select`,{key:0,id:`mcp-config-${Ph.id}-${Fh.key}`,"onUpdate:modelValue":Ph=>qh.value[Fh.key]=Ph,"aria-required":Fh.required,class:normalizeClass([`w-full px-2 py-1 text-xs border rounded`,Jh.value.includes(Fh.key)?`border-red-400 bg-red-50`:`border-gray-300`]),"data-testid":`mcp-catalog-config-input-${Ph.id}-${Fh.key}`},[Fh.required?createCommentVNode(``,!0):(openBlock(),createElementBlock(`option`,_hoisted_24,toDisplayString$1(Fh.placeholder??``),1)),(openBlock(!0),createElementBlock(Fragment,null,renderList(Fh.options??[],Ph=>(openBlock(),createElementBlock(`option`,{key:Ph,value:Ph},toDisplayString$1(Ph),9,_hoisted_25))),128))],10,_hoisted_23)),[[vModelSelect,qh.value[Fh.key]]]):withDirectives((openBlock(),createElementBlock(`input`,{key:1,id:`mcp-config-${Ph.id}-${Fh.key}`,"onUpdate:modelValue":Ph=>qh.value[Fh.key]=Ph,type:ng(Fh),placeholder:Fh.placeholder??``,"aria-required":Fh.required,class:normalizeClass([`w-full px-2 py-1 text-xs border rounded`,Jh.value.includes(Fh.key)?`border-red-400 bg-red-50`:`border-gray-300`]),"data-testid":`mcp-catalog-config-input-${Ph.id}-${Fh.key}`,autocomplete:`off`,spellcheck:`false`},null,10,_hoisted_26)),[[vModelDynamic,qh.value[Fh.key]]]),Fh.helpText?(openBlock(),createElementBlock(`p`,_hoisted_27,toDisplayString$1(unref(Lh)(Fh.helpText)),1)):createCommentVNode(``,!0)]))),128)),Jh.value.length>0?(openBlock(),createElementBlock(`div`,{key:0,class:`text-xs text-red-600`,"data-testid":`mcp-catalog-config-error-${Ph.id}`},toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.config.errMissingRequired`,{fields:Jh.value.join(`, `)})),9,_hoisted_28)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_29,[createBaseVNode(`button`,{type:`button`,class:`px-2 py-1 text-xs rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,"data-testid":`mcp-catalog-config-cancel-${Ph.id}`,onClick:Zh},toDisplayString$1(unref(Lh)(`common.cancel`)),9,_hoisted_30),createBaseVNode(`button`,{type:`submit`,class:`px-2 py-1 text-xs rounded bg-blue-500 text-white hover:bg-blue-600`,"data-testid":`mcp-catalog-config-install-${Ph.id}`},toDisplayString$1(unref(Lh)(`settingsMcpTab.catalog.config.install`)),9,_hoisted_31)])],40,_hoisted_18$3)):createCommentVNode(``,!0)],8,_hoisted_8$4))),128))])])]),Ih[15]||=createBaseVNode(`hr`,{class:`border-gray-200`},null,-1),createBaseVNode(`h3`,_hoisted_32,toDisplayString$1(unref(Lh)(`settingsMcpTab.customHeading`)),1),Ph.servers.length===0?(openBlock(),createElementBlock(`div`,_hoisted_33,toDisplayString$1(unref(Lh)(`settingsMcpTab.noServers`)),1)):(openBlock(),createElementBlock(`ul`,_hoisted_34,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ph.servers,(Fh,Bh)=>(openBlock(),createElementBlock(`li`,{key:Fh.id+`:`+Bh,class:`border border-gray-200 rounded p-3 space-y-2`,"data-testid":`mcp-server-`+Fh.id},[createBaseVNode(`div`,_hoisted_36,[createBaseVNode(`div`,_hoisted_37,[createBaseVNode(`span`,_hoisted_38,toDisplayString$1(Fh.id),1),createBaseVNode(`span`,{class:normalizeClass([`text-[10px] uppercase tracking-wide rounded px-1.5 py-0.5`,Fh.spec.type===`http`?`bg-green-100 text-green-700`:`bg-amber-100 text-amber-700`])},toDisplayString$1(Fh.spec.type),3),createBaseVNode(`label`,_hoisted_39,[createBaseVNode(`input`,{type:`checkbox`,checked:Fh.spec.enabled!==!1,"data-testid":`mcp-enabled-`+Fh.id,onChange:Ph=>gg(Bh,Ph)},null,40,_hoisted_40),createTextVNode(` `+toDisplayString$1(unref(Lh)(`settingsMcpTab.enabled`)),1)])]),createBaseVNode(`button`,{class:`text-xs text-red-600 hover:text-red-800`,"data-testid":`mcp-remove-`+Fh.id,onClick:Ph=>zh(`remove`,Bh)},toDisplayString$1(unref(Lh)(`common.remove`)),9,_hoisted_41)]),Fh.spec.type===`http`?(openBlock(),createElementBlock(`div`,_hoisted_42,[createBaseVNode(`div`,null,[createBaseVNode(`span`,_hoisted_43,toDisplayString$1(unref(Lh)(`settingsMcpTab.urlLabel`)),1),createBaseVNode(`code`,_hoisted_44,toDisplayString$1(Fh.spec.url),1)]),Ph.dockerMode&&_g(Fh.spec.url)?(openBlock(),createBlock(Rh,{key:0,keypath:`settingsMcpTab.localhostRewrite`,tag:`div`,class:`text-amber-700`},{localhost:withCtx(()=>[...Ih[12]||=[createBaseVNode(`code`,null,`localhost`,-1)]]),hostDockerInternal:withCtx(()=>[...Ih[13]||=[createBaseVNode(`code`,null,`host.docker.internal`,-1)]]),_:1})):createCommentVNode(``,!0)])):Fh.spec.type===`stdio`?(openBlock(),createElementBlock(`div`,_hoisted_45,[createBaseVNode(`div`,null,[createBaseVNode(`span`,_hoisted_46,toDisplayString$1(unref(Lh)(`settingsMcpTab.commandLabel`)),1),createBaseVNode(`code`,_hoisted_47,toDisplayString$1(Fh.spec.command),1),Fh.spec.args?.length?(openBlock(),createElementBlock(`code`,_hoisted_48,toDisplayString$1((Fh.spec.args??[]).join(` `)),1)):createCommentVNode(``,!0)]),Ph.dockerMode&&vg(Fh.spec.args)?(openBlock(),createElementBlock(`div`,{key:0,class:`text-red-600`,"data-testid":`mcp-docker-warning-`+Fh.id},toDisplayString$1(unref(Lh)(`settingsMcpTab.dockerNonWorkspaceWarning`)),9,_hoisted_49)):createCommentVNode(``,!0)])):createCommentVNode(``,!0)],8,_hoisted_35))),128))])),Bh.value?(openBlock(),createElementBlock(`div`,_hoisted_50,[createBaseVNode(`label`,_hoisted_51,[createTextVNode(toDisplayString$1(unref(Lh)(`settingsMcpTab.nameLabel`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[0]||=Ph=>Vh.value.id=Ph,type:`text`,placeholder:unref(Lh)(`settingsMcpTab.namePlaceholder`),class:`mt-1 w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,"data-testid":`mcp-draft-id`,onKeydown:Ih[1]||=withModifiers(()=>{},[`stop`])},null,40,_hoisted_52),[[vModelText,Vh.value.id]])]),createBaseVNode(`div`,_hoisted_53,[createBaseVNode(`label`,_hoisted_54,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[2]||=Ph=>Vh.value.type=Ph,type:`radio`,value:`http`,"data-testid":`mcp-draft-type-http`},null,512),[[vModelRadio,Vh.value.type]]),createTextVNode(` `+toDisplayString$1(unref(Lh)(`settingsMcpTab.typeHttp`)),1)]),createBaseVNode(`label`,_hoisted_55,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[3]||=Ph=>Vh.value.type=Ph,type:`radio`,value:`stdio`,"data-testid":`mcp-draft-type-stdio`},null,512),[[vModelRadio,Vh.value.type]]),createTextVNode(` `+toDisplayString$1(unref(Lh)(`settingsMcpTab.typeStdio`)),1)])]),Vh.value.type===`http`?(openBlock(),createElementBlock(`div`,_hoisted_56,[createBaseVNode(`label`,_hoisted_57,[createTextVNode(toDisplayString$1(unref(Lh)(`settingsMcpTab.urlFieldLabel`))+` `,1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Ih[4]||=Ph=>Vh.value.url=Ph,type:`text`,placeholder:unref(Lh)(`settingsMcpTab.urlPlaceholder`),class:`mt-1 w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,"data-testid":`mcp-draft-url`,onKeydown:Ih[5]||=withModifiers(()=>{},[`stop`])},null,40,_hoisted_58),[[vModelText,Vh.value.url]])])])):(openBlock(),createElementBlock(`div`,_hoisted_59,[createBaseVNode(`label`,_hoisted_60,[createTextVNode(toDisplayString$1(unref(Lh)(`settingsMcpTab.commandFieldLabel`))+` `,1),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Ih[6]||=Ph=>Vh.value.command=Ph,class:`mt-1 w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:border-blue-400`,"data-testid":`mcp-draft-command`},[...Ih[14]||=[createBaseVNode(`option`,{value:`npx`},`npx`,-1),createBaseVNode(`option`,{value:`node`},`node`,-1),createBaseVNode(`option`,{value:`tsx`},`tsx`,-1)]],512),[[vModelSelect,Vh.value.command]])]),createBaseVNode(`label`,_hoisted_61,[createTextVNode(toDisplayString$1(unref(Lh)(`settingsMcpTab.argsLabel`))+` `,1),withDirectives(createBaseVNode(`textarea`,{"onUpdate:modelValue":Ih[7]||=Ph=>Vh.value.argsText=Ph,class:`mt-1 w-full h-20 px-2 py-1 text-sm font-mono border border-gray-300 rounded focus:outline-none focus:border-blue-400`,placeholder:unref(Lh)(`settingsMcpTab.argsPlaceholder`),"data-testid":`mcp-draft-args`,onKeydown:Ih[8]||=withModifiers(()=>{},[`stop`])},null,40,_hoisted_62),[[vModelText,Vh.value.argsText]])])])),Hh.value?(openBlock(),createElementBlock(`div`,_hoisted_63,toDisplayString$1(Hh.value),1)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_64,[createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded border border-gray-300 text-gray-600 hover:bg-gray-50`,"data-testid":`mcp-draft-cancel`,onClick:og},toDisplayString$1(unref(Lh)(`common.cancel`)),1),createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded bg-blue-500 text-white hover:bg-blue-600`,"data-testid":`mcp-draft-add`,onClick:pg},toDisplayString$1(unref(Lh)(`common.add`)),1)])])):(openBlock(),createElementBlock(`button`,{key:2,class:`text-xs px-2 py-1 rounded border border-gray-300 text-gray-700 hover:bg-gray-50`,"data-testid":`mcp-add-btn`,onClick:ag},toDisplayString$1(unref(Lh)(`settingsMcpTab.addServerButton`)),1))])}}}),SettingsMcpTab_default=SettingsMcpTab_vue_vue_type_script_setup_true_lang_default,_hoisted_1$4={class:`space-y-3`},_hoisted_2$4={key:0,class:`text-sm text-gray-400`},_hoisted_3$4={key:1,class:`text-sm text-red-600 bg-red-50 rounded px-3 py-2`},_hoisted_4$4={key:0,class:`text-sm text-gray-400`},_hoisted_5$4={key:1,class:`space-y-1.5`},_hoisted_6$4=[`data-testid`],_hoisted_7$4={class:`flex-1 min-w-0`},_hoisted_8$3={class:`font-mono text-xs text-gray-800`},_hoisted_9$3={key:0,class:`text-xs text-gray-500 truncate`},_hoisted_10$3={class:`text-[10px] px-1.5 py-0.5 rounded bg-gray-200 text-gray-600 shrink-0`},_hoisted_11$3=[`title`,`onClick`],_hoisted_12$3={class:`border border-gray-200 rounded p-2 space-y-2`},_hoisted_13$3={class:`text-xs font-semibold text-gray-600`},_hoisted_14$3={class:`flex gap-2`},_hoisted_15$3=[`placeholder`],_hoisted_16$2=[`placeholder`],_hoisted_17$2={class:`flex items-center gap-2`},_hoisted_18$2={key:0,class:`text-xs text-red-500`},_hoisted_19$2={key:2,class:`text-xs text-red-600 bg-red-50 rounded px-3 py-1.5`,"data-testid":`workspace-dirs-persist-error`},SettingsWorkspaceDirsTab_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SettingsWorkspaceDirsTab`,setup(Ph){let{t:Fh}=useI18n(),Ih=ref([]),Lh=ref(!0),Rh=ref(``),zh=ref(``),Bh=ref(``),Vh=ref(``),Hh=ref(`flat`),Uh=ref(``);async function Wh(){Lh.value=!0,Rh.value=``;let Ph=await apiGet(API_ROUTES.config.workspaceDirs);if(Lh.value=!1,!Ph.ok){Rh.value=Ph.error;return}Ih.value=Ph.data.dirs}let Gh=Promise.resolve();async function Kh(Ph){let Fh=Gh.catch(()=>void 0).then(async()=>{let Fh=Ph(Ih.value),Lh=await apiPut(API_ROUTES.config.workspaceDirs,{dirs:Fh});return Lh.ok?(Ih.value=Lh.data.dirs,zh.value=``,!0):(zh.value=Lh.error,!1)});return Gh=Fh,Fh}async function qh(){Uh.value=``;let Ph=Bh.value.trim();if(!Ph){Uh.value=Fh(`settingsWorkspaceDirs.errPathRequired`);return}if(!Ph.startsWith(`data/`)&&!Ph.startsWith(`artifacts/`)){Uh.value=Fh(`settingsWorkspaceDirs.errMustStartWith`);return}if(Ih.value.some(Fh=>Fh.path===Ph)){Uh.value=Fh(`settingsWorkspaceDirs.errAlreadyExists`);return}let Lh={path:Ph,description:Vh.value.trim(),structure:Hh.value};await Kh(Ph=>[...Ph,Lh])&&(Bh.value=``,Vh.value=``,Hh.value=`flat`)}async function Jh(Ph){let Fh=Ih.value[Ph];Fh&&await Kh(Ph=>Ph.filter(Ph=>Ph!==Fh))}return onMounted(Wh),(Ph,Wh)=>{let Gh=resolveComponent(`i18n-t`);return openBlock(),createElementBlock(`div`,_hoisted_1$4,[createVNode$1(Gh,{keypath:`settingsWorkspaceDirs.explanation`,tag:`p`,class:`text-xs text-gray-600 leading-relaxed`},{dataDir:withCtx(()=>[...Wh[5]||=[createBaseVNode(`code`,{class:`bg-gray-100 px-1 rounded`},`data/`,-1)]]),artifactsDir:withCtx(()=>[...Wh[6]||=[createBaseVNode(`code`,{class:`bg-gray-100 px-1 rounded`},`artifacts/`,-1)]]),_:1}),Lh.value?(openBlock(),createElementBlock(`div`,_hoisted_2$4,toDisplayString$1(unref(Fh)(`common.loading`)),1)):Rh.value?(openBlock(),createElementBlock(`div`,_hoisted_3$4,toDisplayString$1(Rh.value),1)):(openBlock(),createElementBlock(Fragment,{key:2},[Ih.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_4$4,toDisplayString$1(unref(Fh)(`settingsWorkspaceDirs.noEntries`)),1)):(openBlock(),createElementBlock(`div`,_hoisted_5$4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ih.value,(Ph,Ih)=>(openBlock(),createElementBlock(`div`,{key:Ph.path,class:`flex items-center gap-2 px-2 py-1.5 bg-gray-50 rounded text-sm`,"data-testid":`workspace-dir-${Ih}`},[createBaseVNode(`div`,_hoisted_7$4,[createBaseVNode(`div`,_hoisted_8$3,toDisplayString$1(Ph.path)+`/`,1),Ph.description?(openBlock(),createElementBlock(`div`,_hoisted_9$3,toDisplayString$1(Ph.description),1)):createCommentVNode(``,!0)]),createBaseVNode(`span`,_hoisted_10$3,toDisplayString$1(Ph.structure),1),createBaseVNode(`button`,{class:`text-gray-300 hover:text-red-500 shrink-0`,title:unref(Fh)(`common.remove`),onClick:Ph=>Jh(Ih)},[...Wh[7]||=[createBaseVNode(`span`,{class:`material-icons text-sm`},`close`,-1)]],8,_hoisted_11$3)],8,_hoisted_6$4))),128))])),createBaseVNode(`div`,_hoisted_12$3,[createBaseVNode(`div`,_hoisted_13$3,toDisplayString$1(unref(Fh)(`settingsWorkspaceDirs.addDirTitle`)),1),createBaseVNode(`div`,_hoisted_14$3,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Wh[0]||=Ph=>Bh.value=Ph,class:`flex-1 px-2 py-1 text-xs font-mono border border-gray-300 rounded focus:outline-none focus:border-blue-400`,placeholder:unref(Fh)(`settingsWorkspaceDirs.pathPlaceholder`),"data-testid":`workspace-dir-path-input`,onKeydown:[withKeys(qh,[`enter`]),Wh[1]||=withModifiers(()=>{},[`stop`])]},null,40,_hoisted_15$3),[[vModelText,Bh.value]]),withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":Wh[2]||=Ph=>Hh.value=Ph,class:`text-xs border border-gray-300 rounded px-1 py-1 focus:outline-none`,"data-testid":`workspace-dir-structure-select`},[...Wh[8]||=[createBaseVNode(`option`,{value:`flat`},`flat`,-1),createBaseVNode(`option`,{value:`by-name`},`by-name`,-1),createBaseVNode(`option`,{value:`by-date`},`by-date`,-1)]],512),[[vModelSelect,Hh.value]])]),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Wh[3]||=Ph=>Vh.value=Ph,class:`w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-400`,placeholder:unref(Fh)(`settingsWorkspaceDirs.descPlaceholder`),"data-testid":`workspace-dir-desc-input`,onKeydown:[withKeys(qh,[`enter`]),Wh[4]||=withModifiers(()=>{},[`stop`])]},null,40,_hoisted_16$2),[[vModelText,Vh.value]]),createBaseVNode(`div`,_hoisted_17$2,[createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded bg-blue-500 text-white hover:bg-blue-600`,"data-testid":`workspace-dir-add-btn`,onClick:qh},toDisplayString$1(unref(Fh)(`common.add`)),1),Uh.value?(openBlock(),createElementBlock(`span`,_hoisted_18$2,toDisplayString$1(Uh.value),1)):createCommentVNode(``,!0)])]),zh.value?(openBlock(),createElementBlock(`div`,_hoisted_19$2,toDisplayString$1(zh.value),1)):createCommentVNode(``,!0)],64))])}}}),SettingsWorkspaceDirsTab_default=SettingsWorkspaceDirsTab_vue_vue_type_script_setup_true_lang_default,_hoisted_1$3={class:`space-y-3`},_hoisted_2$3={class:`text-xs text-gray-600 leading-relaxed`},_hoisted_3$3={key:0,class:`text-sm text-gray-400`},_hoisted_4$3={key:1,class:`text-sm text-red-600 bg-red-50 rounded px-3 py-2`},_hoisted_5$3={key:0,class:`text-sm text-gray-400`},_hoisted_6$3={key:1,class:`space-y-1.5`},_hoisted_7$3=[`data-testid`],_hoisted_8$2={class:`flex-1 min-w-0`},_hoisted_9$2={class:`font-mono text-xs text-gray-800 truncate`},_hoisted_10$2={key:0,class:`text-xs text-gray-500 truncate`},_hoisted_11$2={class:`text-[10px] px-1.5 py-0.5 rounded bg-blue-100 text-blue-600 shrink-0`},_hoisted_12$2=[`title`,`onClick`],_hoisted_13$2={class:`border border-gray-200 rounded p-2 space-y-2`},_hoisted_14$2={class:`text-xs font-semibold text-gray-600`},_hoisted_15$2=[`placeholder`],_hoisted_16$1=[`placeholder`],_hoisted_17$1={class:`flex items-center gap-2`},_hoisted_18$1={key:0,class:`text-xs text-red-500`},_hoisted_19$1={key:2,class:`text-xs text-red-600 bg-red-50 rounded px-3 py-1.5`,"data-testid":`reference-dirs-persist-error`},SettingsReferenceDirsTab_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SettingsReferenceDirsTab`,setup(Ph){let{t:Fh}=useI18n(),Ih=ref([]),Lh=ref(!0),Rh=ref(``),zh=ref(``),Bh=ref(``),Vh=ref(``),Hh=ref(``);async function Uh(){Lh.value=!0,Rh.value=``;let Ph=await apiGet(API_ROUTES.config.referenceDirs);if(Lh.value=!1,!Ph.ok){Rh.value=Ph.error;return}Ih.value=Ph.data.dirs}let Wh=Promise.resolve();async function Gh(Ph){let Fh=Wh.catch(()=>void 0).then(async()=>{let Fh=Ph(Ih.value),Lh=await apiPut(API_ROUTES.config.referenceDirs,{dirs:Fh});return Lh.ok?(Ih.value=Lh.data.dirs,zh.value=``,!0):(zh.value=Lh.error,!1)});return Wh=Fh,Fh}async function Kh(){Hh.value=``;let Ph=Bh.value.trim();if(!Ph){Hh.value=Fh(`settingsReferenceDirs.errPathRequired`);return}if(!Ph.startsWith(`/`)&&!Ph.startsWith(`~/`)){Hh.value=Fh(`settingsReferenceDirs.errMustBeAbsolute`);return}let Lh=Ph;for(;Lh.length>1&&Lh.endsWith(`/`);)Lh=Lh.slice(0,-1);let Rh=Ph=>{let Fh=Ph;for(;Fh.length>1&&Fh.endsWith(`/`);)Fh=Fh.slice(0,-1);return Fh};if(Ih.value.some(Ph=>Rh(Ph.hostPath)===Lh)){Hh.value=Fh(`settingsReferenceDirs.errAlreadyExists`);return}let zh=Lh.split(`/`).pop(),Uh=Vh.value.trim()||zh||Lh;if(Ih.value.some(Ph=>Ph.label===Uh)){Hh.value=Fh(`settingsReferenceDirs.errLabelConflict`,{label:Uh});return}let Wh={hostPath:Lh,label:Uh};await Gh(Ph=>[...Ph,Wh])&&(Bh.value=``,Vh.value=``)}async function qh(Ph){let Fh=Ih.value[Ph];Fh&&await Gh(Ph=>Ph.filter(Ph=>Ph!==Fh))}return onMounted(Uh),(Ph,Uh)=>(openBlock(),createElementBlock(`div`,_hoisted_1$3,[createBaseVNode(`p`,_hoisted_2$3,toDisplayString$1(unref(Fh)(`settingsReferenceDirs.explanation`)),1),Lh.value?(openBlock(),createElementBlock(`div`,_hoisted_3$3,toDisplayString$1(unref(Fh)(`common.loading`)),1)):Rh.value?(openBlock(),createElementBlock(`div`,_hoisted_4$3,toDisplayString$1(Rh.value),1)):(openBlock(),createElementBlock(Fragment,{key:2},[Ih.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_5$3,toDisplayString$1(unref(Fh)(`settingsReferenceDirs.noEntries`)),1)):(openBlock(),createElementBlock(`div`,_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ih.value,(Ph,Ih)=>(openBlock(),createElementBlock(`div`,{key:Ph.hostPath,class:`flex items-center gap-2 px-2 py-1.5 bg-gray-50 rounded text-sm`,"data-testid":`reference-dir-${Ih}`},[Uh[5]||=createBaseVNode(`span`,{class:`material-icons text-sm text-gray-400 shrink-0`},`folder_open`,-1),createBaseVNode(`div`,_hoisted_8$2,[createBaseVNode(`div`,_hoisted_9$2,toDisplayString$1(Ph.hostPath),1),Ph.label?(openBlock(),createElementBlock(`div`,_hoisted_10$2,toDisplayString$1(Ph.label),1)):createCommentVNode(``,!0)]),createBaseVNode(`span`,_hoisted_11$2,toDisplayString$1(unref(Fh)(`settingsReferenceDirs.readOnlyBadge`)),1),createBaseVNode(`button`,{class:`text-gray-300 hover:text-red-500 shrink-0`,title:unref(Fh)(`common.remove`),"data-testid":`reference-dir-remove-btn`,onClick:Ph=>qh(Ih)},[...Uh[4]||=[createBaseVNode(`span`,{class:`material-icons text-sm`},`close`,-1)]],8,_hoisted_12$2)],8,_hoisted_7$3))),128))])),createBaseVNode(`div`,_hoisted_13$2,[createBaseVNode(`div`,_hoisted_14$2,toDisplayString$1(unref(Fh)(`settingsReferenceDirs.addDirTitle`)),1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Uh[0]||=Ph=>Bh.value=Ph,class:`w-full px-2 py-1 text-xs font-mono border border-gray-300 rounded focus:outline-none focus:border-blue-400`,placeholder:unref(Fh)(`settingsReferenceDirs.pathPlaceholder`),"data-testid":`reference-dir-path-input`,onKeydown:[withKeys(Kh,[`enter`]),Uh[1]||=withModifiers(()=>{},[`stop`])]},null,40,_hoisted_15$2),[[vModelText,Bh.value]]),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":Uh[2]||=Ph=>Vh.value=Ph,class:`w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-400`,placeholder:unref(Fh)(`settingsReferenceDirs.labelPlaceholder`),"data-testid":`reference-dir-label-input`,onKeydown:[withKeys(Kh,[`enter`]),Uh[3]||=withModifiers(()=>{},[`stop`])]},null,40,_hoisted_16$1),[[vModelText,Vh.value]]),createBaseVNode(`div`,_hoisted_17$1,[createBaseVNode(`button`,{class:`px-2 py-1 text-xs rounded bg-blue-500 text-white hover:bg-blue-600`,"data-testid":`reference-dir-add-btn`,onClick:Kh},toDisplayString$1(unref(Fh)(`common.add`)),1),Hh.value?(openBlock(),createElementBlock(`span`,_hoisted_18$1,toDisplayString$1(Hh.value),1)):createCommentVNode(``,!0)])]),zh.value?(openBlock(),createElementBlock(`div`,_hoisted_19$1,toDisplayString$1(zh.value),1)):createCommentVNode(``,!0)],64))]))}}),SettingsReferenceDirsTab_default=SettingsReferenceDirsTab_vue_vue_type_script_setup_true_lang_default,_hoisted_1$2={class:`px-5 py-4 border-b border-gray-200 flex items-center justify-between`},_hoisted_2$2={id:`settings-modal-title`,class:`text-base font-semibold text-gray-900`},_hoisted_3$2=[`title`],_hoisted_4$2={class:`flex border-b border-gray-200 px-5`},_hoisted_5$2={class:`px-5 py-4 overflow-y-auto flex-1 space-y-4 text-gray-900`},_hoisted_6$2={key:0,class:`text-sm text-red-700 bg-red-50 border border-red-200 rounded px-3 py-2`,role:`alert`,"data-testid":`settings-load-error`},_hoisted_7$2={key:1,class:`space-y-3`},_hoisted_8$1={class:`rounded border border-yellow-400 bg-yellow-50 p-3 text-sm text-yellow-800`,"data-testid":`settings-gemini-warning`},_hoisted_9$1={key:2,class:`space-y-3`},_hoisted_10$1={class:`block`},_hoisted_11$1={class:`text-xs font-semibold text-gray-700`},_hoisted_12$1={key:0,class:`text-xs text-amber-700`},_hoisted_13$1={class:`flex items-center gap-2`},_hoisted_14$1=[`disabled`,`title`],_hoisted_15$1={key:0,class:`text-xs text-amber-600`,"data-testid":`settings-tools-dirty`},_hoisted_16={key:3,class:`space-y-3`},_hoisted_17={key:0,class:`text-xs text-amber-800 bg-amber-50 border border-amber-200 rounded px-2 py-1`,role:`alert`,"data-testid":`mcp-tools-error`},_hoisted_18={key:0,class:`px-5 py-3 border-t border-gray-200 min-h-[2.75rem] flex items-center gap-3`},_hoisted_19={key:1,class:`text-xs text-gray-500`},SettingsModal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SettingsModal`,props:{open:{type:Boolean},dockerMode:{type:Boolean,default:!1},geminiAvailable:{type:Boolean,default:!0},mcpToolsError:{default:null}},emits:[`update:open`,`saved`,`ask-gemini`],setup(Ph,{emit:Fh}){let{t:Ih}=useI18n(),Lh=Ph,Rh=Fh,zh=ref(null),Bh=ref(`tools`),Vh=ref(``),Hh=ref(``),Uh=ref([]),Wh=ref(``),Gh=ref(``),Kh=ref(!1),qh=ref(!1),Jh=ref(!1),Yh=0,Xh=computed(()=>Vh.value.split(`
4891
4891
  `).map(Ph=>Ph.trim()).filter(Ph=>Ph.length>0)),Zh=computed(()=>Xh.value.join(`