jordium-gantt-vue3
Version:
A Vue 3 Gantt chart component for project management, task scheduling, resource planning, calendar, resource usage and timeline visualization.
304 lines • 1.26 MB
JavaScript
"use strict";var OE=Object.defineProperty;var HE=(n,t,e)=>t in n?OE(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var $r=(n,t,e)=>HE(n,typeof t!="symbol"?t+"":t,e);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),Su=a.defineComponent({name:"TaskListDynamicRenderer",props:{render:{type:Function,required:!0}},render(){return this.render()}}),Fu={"zh-CN":{dateNotSet:"未设置",taskName:"任务名称",resourceName:"资源名称",predecessor:"前置任务",assignee:"分配人",startDate:"开始日期",endDate:"结束日期",plannedStartDate:"预计开始日期",plannedEndDate:"预计结束日期",actualStartDate:"实际开始日期",actualEndDate:"实际结束日期",childrenEarliestStart:"子任务最早开始",childrenLatestEnd:"子任务最晚结束",childrenOverflow:"子任务已超出父级计划范围",estimatedHours:"预计工时(hr)",actualHours:"实际工时(hr)",progress:"进度",type:"类型",description:"描述",csvHeaders:{id:"ID",taskName:"任务名称",predecessor:"前置任务",assignee:"分配人",startDate:"开始日期",endDate:"结束日期",plannedStartDate:"预计开始日期",plannedEndDate:"预计结束日期",actualStartDate:"实际开始日期",actualEndDate:"实际结束日期",estimatedHours:"预计工时(hr)",actualHours:"实际工时(hr)",progress:"进度(%)",type:"类型",description:"描述"},yearMonthFormat:(n,t)=>`${n}年${String(t).padStart(2,"0")}月`,monthFormat:n=>`${n}月`,monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],weekDays:["日","一","二","三","四","五","六"],milestone:"里程碑",targetDate:"目标日期",today:"今天",milestoneDetails:"里程碑详情",milestoneName:"里程碑名称",milestoneDate:"里程碑日期",milestoneIcon:"里程碑图标",diamond:"菱形",rocket:"火箭",enterMilestoneName:"请输入里程碑名称",enterAssignee:"请输入负责人",enterDescription:"请输入描述信息",milestoneNameRequired:"里程碑名称为必填项",milestoneDateRequired:"里程碑日期为必填项",save:"保存",close:"关闭",confirm:"确认",delete:"删除",confirmDelete:"确定要删除这个里程碑吗?",addTask:"新增需求/任务",addMilestone:"新增里程碑",todayLocate:"今日",todayLocateTooltip:"定位到今天",exportCsv:"导出 CSV",exportPdf:"导出 PDF",expandAll:"全部展开",collapseAll:"全部折叠",taskView:"任务视图",calendarView:"日历视图",resourceUsageView:"资源利用率",language:"中文",languageTooltip:"选择语言",lightMode:"明亮模式",darkMode:"暗黑模式",fullscreen:"全屏",exitFullscreen:"退出全屏",githubDocs:"查看Github文档",giteeDocs:"查看Gitee文档",timeScaleHour:"时",timeScaleDay:"日",timeScaleWeek:"周",timeScaleMonth:"月",timeScaleQuarter:"季",timeScaleYear:"年",timeScaleTooltip:"切换时间刻度",halfYearFirst:"上半年",halfYearSecond:"下半年",confirmDialogMessage:"是否需要保留该设置?",newTask:"新建任务",taskNamePlaceholder:"请输入任务名称",assigneePlaceholder:"请输入负责人",progressPlaceholder:"0-100",hoursPlaceholder:"工时",descriptionPlaceholder:"请输入任务描述...",hours:"小时",create:"创建",taskNameRequired:"任务名称不能为空",startDateRequired:"开始日期不能为空",endDateRequired:"结束日期不能为空",endDateInvalid:"结束日期不能早于开始日期",plannedStartDateRequired:"预计开始日期不能为空",plannedEndDateRequired:"预计结束日期不能为空",plannedEndDateInvalid:"预计结束日期不能早于预计开始日期",actualEndDateInvalid:"实际结束日期不能早于实际开始日期",statusPending:"待处理",statusOngoing:"进行中",statusDelayed:"已逾期",statusCompleted:"已完成",newMilestone:"新建里程碑",editMilestone:"编辑里程碑",cancel:"取消",startTimer:"开始计时",stopTimer:"停止计时",timerStarted:"任务计时已开始",timerStopped:"任务计时已停止",addPredecessor:"添加前置任务",addSuccessor:"添加后置任务",pdfExportLoading:"正在生成PDF,请稍候...",pdfExportTitle:"甘特图导出",pdfExportDate:"导出日期",milestoneGroup:"里程碑",collapseTaskList:"收起任务列表",expandTaskList:"展开任务列表",taskType:"任务类型",taskTypeRequired:"请选择任务类型",taskTypeMap:{task:"任务",milestone:"里程碑",story:"需求",epic:"史诗",bug:"缺陷"},editTask:"编辑任务",parentTask:"上级任务",time:"时间",selectTime:"选择时间",hour:"时",minute:"分",selectDate:"请选择日期",to:"至",noParentTask:"无上级任务",update:"更新",taskNameTooLong:"任务名称不能超过50个字符",predecessorPlaceholder:"请选择前置任务",selectPredecessor:"选择前置任务",removePredecessor:"移除前置任务",deleteLinks:"删除链接",noLinks:"无链接",predecessorLink:"前置: {name}",successorLink:"后置: {name}",operationFailed:"操作失败,请重试",taskUpdateSuccess:"任务更新成功",taskCreateSuccess:"任务创建成功",confirmDeleteTask:'确定要删除任务"{name}"吗?此操作不可撤销。',taskDeleteFailed:"删除失败,请重试",confirmDeleteStory:"是否删除该需求{name}及其所有的子任务?该操作不可撤回",storyDeleteYes:"是, 继续",storyDeleteNo:"不,仅删除需求",storyDeleteAllSuccess:"已删除需求【{name}】及其所有子任务",storyDeleteOnlySuccess:"已删除需求【{name}】,{count}个子任务已升级保留",storyNotFound:"未找到要删除的需求,ID:{id}",milestoneDeleteSuccess:"里程碑删除成功",taskDeletedSuccess:"已删除任务",selectAssignee:"请选择负责人",resourceAllocation:"资源分配",selectResource:"选择资源",addResource:"添加资源",resourceCategory:"类别",resourceCategoryHuman:"人力",resourceCategoryDevice:"设备",resourceCategoryOthers:"其他",percentMinError:"最小占比为20%",percentMaxWarning:"占比超过100%将标记为超负荷",customCsvExportCalled:"自定义CSV导出被调用",languageSwitchedTo:"语言切换到:{language}",themeSwitchedTo:"主题切换到:{theme}",lightModeText:"明亮模式",darkModeText:"暗黑模式",taskNotFound:"未找到要更新的任务,ID:{id}",newParentTaskNotFound:"未找到新父任务,ID:{parentId},将作为顶级任务添加",inPlaceUpdateFailed:"就地更新失败,未找到任务,ID:{id}",taskToDeleteNotFound:"未找到要删除的任务,ID:{id}",milestoneIconUpdateNotFound:"未找到要更新图标的里程碑,ID:{id}",overtime:"超",overdue:"逾期",days:"天",timerConfirmPrefix:"即将为任务",timerConfirmSuffix:"计时,若有特殊说明请完善下面的描述",timerConfirmPlaceholder:"请输入计时说明",configDemo:"配置演示",taskListConfig:{title:"TaskList 配置",columns:{title:"列显示(默认渲染模式下生效)",renderMode:"渲染模式",renderModeDefault:"默认(通过 TaskListColumnConfig 设置)",renderModeDeclarative:"声明式(使用 TaskListColumn 设置可见列)"},width:{title:"宽度设置",defaultWidth:"默认宽度",minWidth:"最小宽度",maxWidth:"最大宽度",pixelsModel:"像素 (px)",percentageModel:"百分比 (%)"},collapsible:{title:"展开/收起控制",enableCollapsible:"启用任务列可折叠",enableCollapsibleHint:"启用后任务列可展开/收起",visible:"任务列显示状态",visibleExpanded:"展开",visibleCollapsed:"收起",visibleHint:"通过 prop 控制任务列初始/当前显示状态"}},taskBarConfig:{title:"TaskBar 配置",display:{title:"显示选项",showAvatar:"显示头像 (Avatar)",showTitle:"显示标题 (Title)",showProgress:"显示进度 (Progress)"},mistouch:{title:"防误触配置",dragThreshold:"拖拽阈值 (px)",dragThresholdHint:"移动超过此距离才触发拖拽",resizeHandleWidth:"拉伸手柄宽度 (px)",resizeHandleWidthHint:"调整手柄的可点击宽度 (5-15px)",enableDragDelay:"启用拖拽延迟",enableDragDelayHint:"按住一段时间后才能拖拽",dragDelayTime:"延迟时间 (ms)",dragDelayTimeHint:"延迟启动拖拽的时间",allowDragOnClick:"允许拖拽和拉伸 TaskBar 和 Milestone",allowDragOnClickHint:"控制是否允许拖拽 TaskBar 和 Milestone,以及拉伸 TaskBar 的长度"}},disableTaskbarFocusMode:"关闭聚焦功能",dataSourceAlreadyLoaded:"{name} 已是当前数据源",dataSourceLoadSuccess:"已加载 {name}",dataSourceLoadFailed:"{name} 加载失败",dataSourceSwitch:{title:"数据源切换",subtitle:"对比常规与超大数据集的初始化体验",loading:"数据加载中,请稍候...",alreadyLoaded:"{name} 已是当前数据源",loadSuccess:"已加载 {name}",loadFailed:"{name} 加载失败",sources:{normal:{label:"常规数据源",description:"data.json · 含完整前/后置依赖,适合功能演示",badge:"data.json"},medium:{label:"中等数据源",description:"data-100.json · 含完整前/后置依赖,适合功能演示",badge:"data-100.json"},large:{label:"超大数据源",description:"data-large-1m.json · 百万级任务,验证虚拟渲染性能",badge:"data-large-1m.json"}}},resourceView:{desc:"资源视图",capacity:"利用率",overloaded:"超负荷",duration:"时间周期",overloadWarning:"资源超负荷警告",conflictDuration:"冲突时段",conflictWith:"与",conflictSuffix:"冲突"}},"en-US":{dateNotSet:"Not set",taskName:"Task Name",resourceName:"Resource Name",predecessor:"Predecessor",assignee:"Assignee",startDate:"Start Date",endDate:"End Date",plannedStartDate:"Planned Start Date",plannedEndDate:"Planned End Date",actualStartDate:"Actual Start Date",actualEndDate:"Actual End Date",childrenEarliestStart:"Children Earliest Start",childrenLatestEnd:"Children Latest End",childrenOverflow:"Children exceed parent boundaries",estimatedHours:"Est. Hours",actualHours:"Act. Hours",progress:"Progress",type:"Type",csvHeaders:{id:"ID",taskName:"Task Name",predecessor:"Predecessor",assignee:"Assignee",startDate:"Start Date",endDate:"End Date",plannedStartDate:"Planned Start Date",plannedEndDate:"Planned End Date",actualStartDate:"Actual Start Date",actualEndDate:"Actual End Date",estimatedHours:"Est. Hours",actualHours:"Act. Hours",progress:"Progress (%)",type:"Type",description:"Description"},yearMonthFormat:(n,t)=>`${n}/${String(t).padStart(2,"0")}`,monthFormat:n=>`${String(n).padStart(2,"0")}`,monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],milestone:"Milestone",today:"Today",targetDate:"Target Date",milestoneDetails:"Milestone Details",milestoneName:"Milestone Name",milestoneDate:"Milestone Date",milestoneIcon:"Milestone Icon",diamond:"Diamond",rocket:"Rocket",enterMilestoneName:"Enter milestone name",enterAssignee:"Enter assignee",enterDescription:"Enter description",milestoneNameRequired:"Milestone name is required",milestoneDateRequired:"Milestone date is required",save:"Save",close:"Close",confirm:"Confirm",description:"Description",delete:"Delete",confirmDelete:"Are you sure you want to delete this milestone?",addTask:"Add Requirement/Task",addMilestone:"Add Milestone",todayLocate:"Today",todayLocateTooltip:"Locate to today",exportCsv:"Export CSV",exportPdf:"Export PDF",expandAll:"Expand All",collapseAll:"Collapse All",taskView:"Task View",calendarView:"Calendar View",resourceUsageView:"Resource Utilization",language:"English",languageTooltip:"Select language",lightMode:"Light Mode",darkMode:"Dark Mode",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",githubDocs:"GitHub Docs",giteeDocs:"Gitee Docs",timeScaleHour:"Hour",timeScaleDay:"Day",timeScaleWeek:"Week",timeScaleMonth:"Month",timeScaleQuarter:"Quarter",timeScaleYear:"Year",timeScaleTooltip:"Switch Time Scale",halfYearFirst:"First Half",halfYearSecond:"Second Half",confirmDialogMessage:"Do you want to save this setting?",taskNamePlaceholder:"Enter task name",assigneePlaceholder:"Enter assignee",progressPlaceholder:"0-100",hoursPlaceholder:"Hours",descriptionPlaceholder:"Enter task description...",hours:"Hours",create:"Create",taskNameRequired:"Task name is required",startDateRequired:"Start date is required",endDateRequired:"End date is required",endDateInvalid:"End date cannot be earlier than start date",plannedStartDateRequired:"Planned start date is required",plannedEndDateRequired:"Planned end date is required",plannedEndDateInvalid:"Planned end date cannot be earlier than planned start date",actualEndDateInvalid:"Actual end date cannot be earlier than actual start date",statusPending:"Pending",statusOngoing:"Ongoing",statusDelayed:"Delayed",statusCompleted:"Completed",newMilestone:"New Milestone",editMilestone:"Edit Milestone",cancel:"Cancel",timerStarted:"Timer Started",timerStopped:"Timer Stopped",startTimer:"Start Timer",stopTimer:"Stop Timer",addPredecessor:"Add Predecessor",addSuccessor:"Add Successor",pdfExportLoading:"Generating PDF, please wait...",pdfExportTitle:"Gantt Chart Export",pdfExportDate:"Export Date",milestoneGroup:"Milestone",collapseTaskList:"Collapse Task List",expandTaskList:"Expand Task List",taskType:"Task Type",taskTypeRequired:"Please select task type",taskTypeMap:{task:"Task",milestone:"Milestone",story:"Story",epic:"Epic",bug:"Bug"},editTask:"Edit Task",newTask:"New Task",parentTask:"Parent Task",time:"Time",selectTime:"Select Time",hour:"Hour",minute:"Minute",selectDate:"Select date",to:"to",noParentTask:"No Parent Task",update:"Update",taskNameTooLong:"Task name cannot exceed 50 characters",predecessorPlaceholder:"Select predecessor",selectPredecessor:"Select Predecessor",removePredecessor:"Remove Predecessor",deleteLinks:"Delete Links",noLinks:"No Links",predecessorLink:"Predecessor: {name}",successorLink:"Successor: {name}",operationFailed:"Operation failed, please try again",taskUpdateSuccess:"Task updated successfully",taskCreateSuccess:"Task created successfully",confirmDeleteTask:'Are you sure you want to delete task "{name}"? This action cannot be undone.',taskDeleteFailed:"Delete failed, please try again",confirmDeleteStory:"Do you want to delete the requirement {name} and all its subtasks? This action cannot be undone",storyDeleteYes:"Yes, Continue",storyDeleteNo:"No, Delete Requirement Only",storyDeleteAllSuccess:"Deleted requirement [{name}] and all its subtasks",storyDeleteOnlySuccess:"Deleted requirement [{name}], {count} subtasks have been promoted",storyNotFound:"Requirement not found, ID: {id}",milestoneDeleteSuccess:"Milestone deleted successfully",taskDeletedSuccess:"Task deleted",selectAssignee:"Select assignee",resourceAllocation:"Resource Allocation",selectResource:"Select resource",addResource:"Add Resource",resourceCategory:"Category",resourceCategoryHuman:"Human",resourceCategoryDevice:"Device",resourceCategoryOthers:"Others",percentMinError:"Minimum percentage is 20%",percentMaxWarning:"Percentage over 100% will be marked as overloaded",customCsvExportCalled:"Custom CSV export called",languageSwitchedTo:"Language switched to: {language}",themeSwitchedTo:"Theme switched to: {theme}",lightModeText:"Light Mode",darkModeText:"Dark Mode",taskNotFound:"Task not found for update, ID: {id}",newParentTaskNotFound:"New parent task not found, ID: {parentId}, will be added as top-level task",inPlaceUpdateFailed:"In-place update failed, task not found, ID: {id}",taskToDeleteNotFound:"Task to delete not found, ID: {id}",milestoneIconUpdateNotFound:"Milestone not found for icon update, ID: {id}",overtime:"Over",overdue:"Overdue",days:" days",timerConfirmPrefix:"About to start timing for",timerConfirmSuffix:". If there are special notes, please complete the description below.",timerConfirmPlaceholder:"Please enter timer description",configDemo:"Configuration Demo",taskListConfig:{title:"TaskList Configuration",columns:{title:"Columns(默effective in default render mode)",renderMode:"Render Mode",renderModeDefault:"Default (via TaskListColumnConfig)",renderModeDeclarative:"Declarative (via TaskListColumn)"},width:{title:"Width Settings",defaultWidth:"Default Width",minWidth:"Min Width",maxWidth:"Max Width",pixelsModel:"pixels (px)",percentageModel:"percentage (%)"},collapsible:{title:"Collapsible Control",enableCollapsible:"Enable collapsible task list",enableCollapsibleHint:"Allow task list to expand/collapse when enabled",visible:"Task list visibility",visibleExpanded:"Expanded",visibleCollapsed:"Collapsed",visibleHint:"Controls initial/current visibility state of the task list"}},taskBarConfig:{title:"TaskBar Configuration",display:{title:"Display Options",showAvatar:"Show Avatar",showTitle:"Show Title",showProgress:"Show Progress"},mistouch:{title:"Mistouch Prevention",dragThreshold:"Drag Threshold (px)",dragThresholdHint:"Distance to trigger dragging",resizeHandleWidth:"Resize Handle Width (px)",resizeHandleWidthHint:"Clickable width of resize handle (5-15px)",enableDragDelay:"Enable Drag Delay",enableDragDelayHint:"Hold to drag after a delay",dragDelayTime:"Delay Time (ms)",dragDelayTimeHint:"Delay time before dragging starts",allowDragOnClick:"Allow dragging and resizing of TaskBars and Milestones",allowDragOnClickHint:"Controls whether to allow dragging of TaskBars and Milestones, as well as resizing the length of TaskBars"}},disableTaskbarFocusMode:"Disable Focus Mode",dataSourceAlreadyLoaded:"{name} is already active",dataSourceLoadSuccess:"{name} loaded successfully",dataSourceLoadFailed:"{name} failed to load",dataSourceSwitch:{title:"Data Sources",subtitle:"Compare default vs. mega dataset initialization",loading:"Loading data, please wait…",alreadyLoaded:"{name} is already active",loadSuccess:"{name} loaded successfully",loadFailed:"{name} failed to load",sources:{normal:{label:"Standard Dataset",description:"data.json · Full predecessor graph for feature demos",badge:"data.json"},medium:{label:"Medium Dataset",description:"data-100.json · Full predecessor graph for feature demos",badge:"data-100.json"},large:{label:"Massive Dataset",description:"data-large-1m.json · Million-level tasks to stress virtual rendering",badge:"data-large-1m.json"}}},resourceView:{desc:"Resource View",capacity:"capacity",overloaded:"overLoaded",duration:"duration",overloadWarning:"Overload Warning",conflictDuration:"conflict duration",conflictWith:"conflict with",conflictSuffix:""}}};function Vm(n,t){Fu[n]&&(Fu[n]={...Fu[n],...t},Lu.value===n&&window.dispatchEvent(new CustomEvent("locale-changed",{detail:{locale:n}})))}const PE="gantt-locale",VE=()=>{if(typeof window<"u"){const n=localStorage.getItem(PE);if(n&&(n==="zh-CN"||n==="en-US"))return n}return"zh-CN"},Lu=a.ref(VE());function _s(){const n=a.computed(()=>Fu[Lu.value]),t=(A,l)=>{const c=A.split(".");let u=n.value;for(const h of c)if(u&&typeof u=="object"&&h in u)u=u[h];else return l||A;return typeof u=="string"?u:l||A},e=(A,l)=>{let c=t(A);return Object.keys(l).forEach(u=>{c=c.replace(new RegExp(`{${u}}`,"g"),String(l[u]))}),c},r=A=>{Lu.value=A,window.dispatchEvent(new CustomEvent("locale-changed",{detail:{locale:A}}))},s=a.computed(()=>Lu.value);return{t:n,getTranslation:t,formatTranslation:e,locale:s,setLocale:r,formatYearMonth:(A,l)=>n.value.yearMonthFormat(A,l),formatMonth:A=>n.value.monthFormat(A)}}function Fv(){const n=a.inject("gantt-view-mode",a.ref("task")),t=a.inject("gantt-data-source",a.computed(()=>[])),e=a.inject("gantt-list-config",a.computed(()=>null)),r=a.computed(()=>n.value==="resource"),s=a.computed(()=>n.value==="task");return{viewMode:n,dataSource:t,listConfig:e,isResourceView:r,isTaskView:s}}function WE(n){if(!n)return null;const[t,e,r]=n.split("-").map(Number);return new Date(t,e-1,r)}function vo(n){return n?Array.isArray(n)&&typeof n[0]=="number"?n:Array.isArray(n)?n.filter(t=>t&&t.toString().trim()).map(t=>Number(t.toString().trim())).filter(t=>!isNaN(t)):n.split(",").map(t=>t.trim()).filter(t=>t).map(t=>Number(t)).filter(t=>!isNaN(t)):[]}function Ep(n){const t=vo(n);return t.length>0?t.join(", "):"-"}const KE=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/,$E=15;function qE(n){return typeof n=="string"&&KE.test(n.trim())}function Ka(n,t){const e=qE(n)?new Date(t.getTime()-$E*60*1e3):t;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function sc(n,t,e){const r=n.filter(o=>!o.resources||o.resources.length===0?!0:o.resources.some(i=>String(i.id)===String(t)));if(r.length<2)return[];let s;return r.length>100?s=zE(r,t,e):s=jE(r,t,e),s}function jE(n,t,e){var o;const r=[],s=new Set;for(let i=0;i<n.length;i++)for(let A=i+1;A<n.length;A++){const l=n[i],c=n[A],u=Wm(l,c,e);if(!u)continue;const h=V=>{const L=V.getFullYear(),j=String(V.getMonth()+1).padStart(2,"0"),D=String(V.getDate()).padStart(2,"0"),S=String(V.getHours()).padStart(2,"0"),Q=String(V.getMinutes()).padStart(2,"0");return e==="hour"?`${L}-${j}-${D} ${S}:${Q}`:`${L}-${j}-${D}`},g=n.filter(V=>Wm({startDate:h(u.start),endDate:h(u.end)},V,e)!==null);let d=0;const m=g.map(V=>{var D;const L=(D=V.resources)==null?void 0:D.find(S=>String(S.id)===String(t)),j=!V.resources||V.resources.length===0?100:(L==null?void 0:L.capacity)||0;return d+=j,{id:V.id,name:V.name||"未命名任务",capacity:j}});if(d<=100)continue;const y=g.filter(V=>{var j;if(!V.resources||V.resources.length===0)return!0;const L=(j=V.resources)==null?void 0:j.find(D=>String(D.id)===String(t));return L&&L.capacity&&L.capacity>0}),B=1440*60*1e3,w=e==="hour",E=new Set;for(const V of y){const L=Ts(V.startDate),j=Ts(V.endDate);if(L&&j){const D=Math.max(L.getTime(),u.start.getTime()),S=Math.min(j.getTime(),u.end.getTime());E.add(D),E.add(ki(V.endDate,new Date(S),w))}}const x=Array.from(E).sort((V,L)=>V-L),b=[];for(let V=0;V<x.length-1;V++){const L=x[V],j=x[V+1];let D=0;for(const S of y){const Q=Ts(S.startDate),T=Ts(S.endDate);if(!Q||!T)continue;const oe=ki(S.endDate,T,w);if(Q.getTime()<=L&&oe>L){const X=(o=S.resources)==null?void 0:o.find(M=>String(M.id)===String(t)),F=!S.resources||S.resources.length===0?100:(X==null?void 0:X.capacity)||0;D+=F}}D>100&&b.push({start:L,end:j})}if(b.length===0)continue;const H=b[0].start;let $=b[0].end;for(let V=1;V<b.length;V++)b[V].start===$&&($=b[V].end);$=w?$:$-B;const Y=`${H}-${$}`;s.has(Y)||(s.add(Y),r.push({startDate:new Date(H),endDate:new Date($),totalPercent:d,level:Lv(d),tasks:m}))}return Cb(r)}function Cb(n){if(n.length===0)return[];const t=[...n].sort((s,o)=>s.startDate.getTime()-o.startDate.getTime()),e=[];let r=t[0];for(let s=1;s<t.length;s++){const o=t[s];r.endDate>=o.startDate?r={startDate:r.startDate,endDate:new Date(Math.max(r.endDate.getTime(),o.endDate.getTime())),totalPercent:Math.max(r.totalPercent,o.totalPercent),level:Lv(Math.max(r.totalPercent,o.totalPercent)),tasks:YE(r.tasks,o.tasks)}:(e.push(r),r=o)}return e.push(r),e}function YE(n,t){const e=new Map;for(const r of n)e.set(r.id,r);for(const r of t)if(!e.has(r.id))e.set(r.id,r);else{const s=e.get(r.id);r.capacity>s.capacity&&e.set(r.id,r)}return Array.from(e.values())}function Wm(n,t,e){const r=Ts(n.startDate),s=Ts(n.endDate),o=Ts(t.startDate),i=Ts(t.endDate);if(!r||!s||!o||!i)return null;if(e==="hour"){if(r.getTime()>=i.getTime()||o.getTime()>=s.getTime())return null;const h=new Date(Math.max(r.getTime(),o.getTime())),g=new Date(Math.min(s.getTime(),i.getTime()));return{start:h,end:g}}const A=ki(n.endDate,s,!1),l=ki(t.endDate,i,!1);if(r.getTime()>=l||o.getTime()>=A)return null;const c=new Date(Math.max(r.getTime(),o.getTime())),u=new Date(Math.min(s.getTime(),i.getTime()));return{start:c,end:u}}function Lv(n){return n>150?"severe":n>120?"medium":"light"}function Ts(n){if(!n)return null;if(typeof n=="string"){if(/^\d{4}-\d{2}-\d{2}$/.test(n)){const[e,r,s]=n.split("-").map(Number);return new Date(e,r-1,s)}if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(n)){const[e,r]=n.split(" "),[s,o,i]=e.split("-").map(Number),[A,l]=r.split(":").map(Number);return new Date(s,o-1,i,A,l)}}const t=new Date(n);return isNaN(t.getTime())?null:t}function ki(n,t,e){return e?t.getTime():Ka(n,t).getTime()+1440*60*1e3}class GE{constructor(){$r(this,"root",null)}insert(t){const e=Ts(t.startDate),r=Ts(t.endDate);if(!e||!r)return;const s={start:e.getTime(),end:r.getTime(),max:r.getTime(),task:t,left:null,right:null};this.root?this.insertNode(this.root,s):this.root=s}insertNode(t,e){e.end>t.max&&(t.max=e.end),e.start<t.start?t.left===null?t.left=e:this.insertNode(t.left,e):t.right===null?t.right=e:this.insertNode(t.right,e)}query(t,e){const r=[];return this.queryNode(this.root,t,e,r),r}queryNode(t,e,r,s){t&&(t.start<=r&&t.end>=e&&s.push(t.task),t.left&&t.left.max>=e&&this.queryNode(t.left,e,r,s),t.right&&t.start<=r&&this.queryNode(t.right,e,r,s))}}function zE(n,t,e){var i;const r=new GE;for(const A of n)r.insert(A);const s=[],o=new Set;for(const A of n){const l=Ts(A.startDate),c=Ts(A.endDate);if(!l||!c)continue;const u=r.query(l.getTime(),c.getTime());if(u.length<2)continue;let h=0;const g=u.map($=>{var L;const Y=(L=$.resources)==null?void 0:L.find(j=>String(j.id)===String(t)),V=!$.resources||$.resources.length===0?100:(Y==null?void 0:Y.capacity)||0;return h+=V,{id:$.id,name:$.name||"未命名任务",capacity:V}});if(h<=100)continue;const d=u.filter($=>{var V;if(!$.resources||$.resources.length===0)return!0;const Y=(V=$.resources)==null?void 0:V.find(L=>String(L.id)===String(t));return Y&&Y.capacity&&Y.capacity>0}),m=1440*60*1e3,y=e==="hour",B=new Set;B.add(l.getTime()),B.add(ki(A.endDate,c,y));for(const $ of d){const Y=Ts($.startDate),V=Ts($.endDate);Y&&V&&(B.add(Y.getTime()),B.add(ki($.endDate,V,y)))}const w=Array.from(B).sort(($,Y)=>$-Y),E=[];for(let $=0;$<w.length-1;$++){const Y=w[$],V=w[$+1];let L=0;for(const j of d){const D=Ts(j.startDate),S=Ts(j.endDate);if(!D||!S)continue;const Q=ki(j.endDate,S,y);if(D.getTime()<=Y&&Q>Y){const T=(i=j.resources)==null?void 0:i.find(X=>String(X.id)===String(t)),oe=!j.resources||j.resources.length===0?100:(T==null?void 0:T.capacity)||0;L+=oe}}L>100&&E.push({start:Y,end:V})}if(E.length===0)continue;const x=E[0].start;let b=E[0].end;for(let $=1;$<E.length;$++)E[$].start===b&&(b=E[$].end);b=y?b:b-m;const H=`${x}-${b}`;o.has(H)||(o.add(H),s.push({startDate:new Date(x),endDate:new Date(b),totalPercent:h,level:Lv(h),tasks:g}))}return Cb(s)}function Dp(n){const t={id:n.id,name:n.name,title:n.title,type:n.type??"Human",avatar:n.avatar,description:n.description,department:n.department,skills:n.skills,capacity:n.capacity,color:n.color,tasks:n.tasks||[]};return Object.keys(n).forEach(e=>{e in t||(t[e]=n[e])}),t}function XE(n){return n.tasks.length<2?!1:sc(n.tasks,n.id).length>0}const JE={class:"confirm-timer-dialog-overlay"},ZE={class:"confirm-timer-dialog"},eD={class:"dialog-message"},tD={class:"task-name-highlight"},rD=["placeholder"],nD={class:"dialog-actions"},aD=a.defineComponent({__name:"ConfirmTimerDialog",props:{visible:Boolean,title:{type:String,default:""},message:{type:String,default:""},defaultDesc:{type:String,default:""},placeholder:{type:String,default:""}},emits:["confirm","cancel"],setup(n,{emit:t}){const e=n,r=t,{getTranslation:s}=_s(),o=a.ref(e.defaultDesc);a.watch(()=>e.visible,l=>{l&&(o.value=e.defaultDesc)});const i=()=>r("confirm",o.value),A=a.computed(()=>{if(e.message){const l=e.message.match(/任务([\S\s]+?)计时|Task ([\S\s]+?) timing/);if(l&&(l[1]||l[2]))return l[1]||l[2]}return e.defaultDesc});return(l,c)=>(a.openBlock(),a.createElementBlock("div",JE,[a.createElementVNode("div",ZE,[a.createElementVNode("div",eD,[a.createElementVNode("span",null,a.toDisplayString(a.unref(s)("timerConfirmPrefix")),1),a.createElementVNode("span",tD,a.toDisplayString(A.value),1),a.createElementVNode("span",null,a.toDisplayString(a.unref(s)("timerConfirmSuffix")),1)]),a.withDirectives(a.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),class:"dialog-textarea",placeholder:a.unref(s)("timerConfirmPlaceholder"),rows:"3"},null,8,rD),[[a.vModelText,o.value]]),a.createElementVNode("div",nD,[a.createElementVNode("button",{class:"gantt-btn gantt-btn-default",onClick:c[1]||(c[1]=u=>l.$emit("cancel"))},a.toDisplayString(a.unref(s)("cancel")),1),a.createElementVNode("button",{class:"gantt-btn gantt-btn-confirm",onClick:i},a.toDisplayString(a.unref(s)("startTimer")),1)])])]))}}),un=(n,t)=>{const e=n.__vccOpts||n;for(const[r,s]of t)e[r]=s;return e},kb=un(aD,[["__scopeId","data-v-b12dbe17"]]),sD={class:"gantt-confirm-header"},oD={class:"gantt-confirm-title"},AD={class:"gantt-confirm-content"},iD={class:"gantt-confirm-footer"},lD={class:"gantt-confirm-footer-right"},cD=a.defineComponent({__name:"GanttConfirmDialog",props:{visible:Boolean,title:{type:String,default:"确认"},message:{type:String,default:""},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},yesText:{type:String,default:"是"},noText:{type:String,default:"否"},type:{type:String,default:"confirm-cancel"}},emits:["confirm","cancel","yes","no"],setup(n,{emit:t}){const e=n,r=t,s=()=>r("confirm"),o=()=>r("cancel"),i=()=>r("yes"),A=()=>r("no");return(l,c)=>n.visible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-confirm-overlay",onClick:o},[a.createElementVNode("div",{class:"gantt-confirm-dialog",onClick:c[0]||(c[0]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",sD,[a.createElementVNode("h4",oD,a.toDisplayString(e.title),1)]),a.createElementVNode("div",AD,[a.createElementVNode("p",null,a.toDisplayString(e.message),1)]),a.createElementVNode("div",iD,[e.type==="yes-no-cancel"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-default",onClick:o},a.toDisplayString(e.cancelText),1),a.createElementVNode("div",lD,[a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-warning",onClick:A},a.toDisplayString(e.noText),1),a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-danger",onClick:i},a.toDisplayString(e.yesText),1)])],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-default",onClick:o},a.toDisplayString(e.cancelText),1),c[1]||(c[1]=a.createTextVNode(" ",-1)),a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-danger",onClick:s},a.toDisplayString(e.confirmText),1)],64))])])])):a.createCommentVNode("",!0)}}),Uv=un(cD,[["__scopeId","data-v-096d9bfd"]]),uD=["data-theme"],dD={class:"icon-wrapper"},fD=["onClick"],hD=["innerHTML"],gD=a.defineComponent({__name:"TaskContextMenu",props:{visible:{type:Boolean},position:{},task:{},allTasks:{}},emits:["start-timer","stop-timer","add-predecessor","add-successor","delete","delete-link","close"],setup(n,{expose:t,emit:e}){const r=n,s=e,{t:o}=_s(),i=a.inject("gantt-theme"),A=a.ref(null),l=a.ref({x:0,y:0}),c=a.ref({display:"none",left:"50%",top:"-8px",transform:"rotate(0deg)"}),u=a.ref(!1),h=a.ref(""),g=a.ref(!1),d=a.computed(()=>{var J;return((J=r.task)==null?void 0:J.type)==="story"?"yes-no-cancel":"confirm-cancel"}),m=a.computed(()=>{var J,k,O;return((J=r.task)==null?void 0:J.type)==="story"?o.value.confirmDeleteStory.replace("{name}",((k=r.task)==null?void 0:k.name)||""):o.value.confirmDeleteTask.replace("{name}",((O=r.task)==null?void 0:O.name)||"")});function y(){var J;h.value=((J=r.task)==null?void 0:J.name)||"",u.value=!0}function B(){u.value=!1}function w(J){if(u.value=!1,r.task&&typeof r.task=="object"){s("close");const k=Date.now();Object.assign(r.task,{timerStartDesc:J||"",isTimerRunning:!0,timerStartTime:k,timerElapsedTime:0}),s("start-timer",r.task)}}function E(){g.value=!0}const x=()=>{g.value=!1,r.task&&(s("delete",r.task),s("close"))},b=()=>{g.value=!1},H=()=>{g.value=!1,r.task&&(s("delete",r.task,!0),S())},$=()=>{g.value=!1,r.task&&(s("delete",r.task,!1),S())},Y=a.computed(()=>{var J;return((J=r.task)==null?void 0:J.type)!=="story"}),V=a.ref(!1);let L=null;const j=a.computed(()=>{const J=[];if(!r.task||!r.allTasks)return J;if(r.task.predecessor){const k=vo(r.task.predecessor);for(const O of k){const N=r.allTasks.find(Z=>Z.id===O);N&&J.push({type:"predecessor",taskId:O,taskName:N.name||`任务 ${O}`})}}for(const k of r.allTasks)k.predecessor&&k.id!==r.task.id&&vo(k.predecessor).includes(r.task.id)&&J.push({type:"successor",taskId:k.id,taskName:k.name||`任务 ${k.id}`});return J}),D=a.computed(()=>j.value.length>0);a.watch([()=>r.visible,()=>r.position],([J,k])=>{J&&k&&a.nextTick(()=>{if(A.value){const O=window.innerWidth,N=window.innerHeight,Z=A.value.offsetWidth,se=A.value.offsetHeight;let ge=k.x-Z/2,fe=k.y+10,Ae="50%",Fe="-8px",be="rotate(0deg)";if(ge+Z>O){const Ke=ge+Z-O+5;ge-=Ke,Ae=`calc(50% + ${Ke}px)`}if(ge<5){const Ke=5-ge;ge=5,Ae=`calc(50% - ${Ke}px)`}fe+se>N&&(fe=k.y-se-10,Fe="100%",be="rotate(180deg)"),l.value={x:ge,y:fe},c.value={display:"block",left:Ae,top:Fe,transform:be}}})},{immediate:!0,deep:!0});const S=()=>{s("close")},Q=()=>{var J;(J=r.task)!=null&&J.isTimerRunning?(s("close"),Object.assign(r.task,{isTimerRunning:!1,timerEndTime:Date.now(),timerElapsedTime:(r.task.timerElapsedTime||0)+(Date.now()-(r.task.timerStartTime||Date.now()))}),s("stop-timer",r.task)):y()},T=()=>{r.task&&(s("close"),a.nextTick(()=>{s("add-predecessor",r.task)}))},oe=()=>{r.task&&(s("close"),a.nextTick(()=>{s("add-successor",r.task)}))},X=J=>{L&&(clearTimeout(L),L=null),V.value=!1,s("delete-link",{sourceTaskId:J.type==="predecessor"?J.taskId:r.task.id,targetTaskId:J.type==="predecessor"?r.task.id:J.taskId}),s("close")},F=()=>{L&&(clearTimeout(L),L=null),V.value=!0},M=()=>{L=window.setTimeout(()=>{V.value=!1},200)},R=J=>{A.value&&!A.value.contains(J.target)&&S()},ae=J=>{J.key==="Escape"&&S()};return a.onMounted(()=>{document.addEventListener("mousedown",R),document.addEventListener("keydown",ae)}),a.onUnmounted(()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",ae),L&&clearTimeout(L)}),t({menuRef:A}),(J,k)=>{var O,N,Z,se;return a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[n.visible?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"menuRef",ref:A,class:"task-context-menu","data-theme":a.unref(i),style:a.normalizeStyle({left:`${l.value.x}px`,top:`${l.value.y}px`,zIndex:1e4,position:"fixed"})},[a.createElementVNode("div",{class:"menu-arrow",style:a.normalizeStyle({display:c.value.display,left:c.value.left,top:c.value.top,transform:c.value.transform})},null,4),Y.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"menu-item",onClick:Q},[a.createElementVNode("div",dD,[a.createElementVNode("i",{class:a.normalizeClass(["menu-icon",(O=r.task)!=null&&O.isTimerRunning?"stop-icon":"timer-icon"])},null,2)]),a.createTextVNode(" "+a.toDisplayString((N=r.task)!=null&&N.isTimerRunning?a.unref(o).stopTimer:a.unref(o).startTimer),1)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"menu-item",onClick:T},[k[0]||(k[0]=a.createElementVNode("div",{class:"icon-wrapper"},[a.createElementVNode("i",{class:"menu-icon predecessor-icon"})],-1)),a.createTextVNode(" "+a.toDisplayString(a.unref(o).addPredecessor),1)]),a.createElementVNode("div",{class:"menu-item",onClick:oe},[k[1]||(k[1]=a.createElementVNode("div",{class:"icon-wrapper"},[a.createElementVNode("i",{class:"menu-icon successor-icon"})],-1)),a.createTextVNode(" "+a.toDisplayString(a.unref(o).addSuccessor),1)]),D.value?(a.openBlock(),a.createElementBlock("div",{key:1,class:"menu-item menu-item-with-submenu",onMouseenter:F,onMouseleave:M},[k[2]||(k[2]=a.createElementVNode("div",{class:"icon-wrapper"},[a.createElementVNode("i",{class:"menu-icon link-delete-icon"})],-1)),a.createTextVNode(" "+a.toDisplayString(a.unref(o).deleteLinks)+" ",1),k[3]||(k[3]=a.createElementVNode("i",{class:"submenu-arrow"},"›",-1)),V.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"submenu",onMouseenter:F,onMouseleave:M},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.value,ge=>(a.openBlock(),a.createElementBlock("div",{key:`${ge.type}-${ge.taskId}`,class:"menu-item submenu-item",onClick:a.withModifiers(fe=>X(ge),["stop"])},[a.createElementVNode("span",{innerHTML:ge.type==="predecessor"?a.unref(o).predecessorLink.replace("{name}",ge.taskName):a.unref(o).successorLink.replace("{name}",ge.taskName)},null,8,hD)],8,fD))),128))],32)):a.createCommentVNode("",!0)],32)):a.createCommentVNode("",!0),k[5]||(k[5]=a.createElementVNode("div",{class:"menu-divider"},null,-1)),a.createElementVNode("div",{class:"menu-item menu-item-danger",onClick:E},[k[4]||(k[4]=a.createElementVNode("div",{class:"icon-wrapper"},[a.createElementVNode("i",{class:"menu-icon delete-icon"})],-1)),a.createTextVNode(" "+a.toDisplayString(a.unref(o).delete),1)]),a.createVNode(Uv,{visible:g.value,title:a.unref(o).delete,type:d.value,message:m.value,"confirm-text":a.unref(o).confirm,"cancel-text":a.unref(o).cancel,"yes-text":a.unref(o).storyDeleteYes,"no-text":a.unref(o).storyDeleteNo,onConfirm:x,onYes:H,onNo:$,onCancel:b},null,8,["visible","title","type","message","confirm-text","cancel-text","yes-text","no-text"]),u.value?(a.openBlock(),a.createBlock(kb,{key:2,visible:u.value,title:a.unref(o).startTimer,message:`${a.unref(o).timerConfirmPrefix}${(Z=r.task)==null?void 0:Z.name}${a.unref(o).timerConfirmSuffix}`,"default-desc":((se=r.task)==null?void 0:se.name)||"",onConfirm:w,onCancel:B},null,8,["visible","title","message","default-desc"])):a.createCommentVNode("",!0)],12,uD)):a.createCommentVNode("",!0)])}}}),Eb=un(gD,[["__scopeId","data-v-7a8253df"]]),pD={width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},vD={key:0,points:"9,18 15,12 9,6"},mD={key:1,points:"18,15 12,9 6,15"},wD=a.defineComponent({__name:"TaskRowCollapseButton",props:{collapsed:{type:Boolean},visible:{type:Boolean}},emits:["toggle"],setup(n){return(t,e)=>n.visible?(a.openBlock(),a.createElementBlock("span",{key:0,class:"collapse-btn",onClick:e[0]||(e[0]=a.withModifiers(r=>t.$emit("toggle"),["stop"]))},[(a.openBlock(),a.createElementBlock("svg",pD,[n.collapsed?(a.openBlock(),a.createElementBlock("polyline",vD)):(a.openBlock(),a.createElementBlock("polyline",mD))]))])):a.createCommentVNode("",!0)}}),Km=un(wD,[["__scopeId","data-v-b8f89457"]]),yD={key:0,class:"task-icon"},BD={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"milestone-group-icon"},bD={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},CD={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},kD=a.defineComponent({__name:"TaskRowIcon",props:{isMilestoneGroup:{type:Boolean},isParentTask:{type:Boolean},hasChildren:{type:Boolean},isStoryTask:{type:Boolean},showIcon:{type:Boolean,default:!0}},setup(n){return(t,e)=>n.showIcon?(a.openBlock(),a.createElementBlock("span",yD,[n.isMilestoneGroup?(a.openBlock(),a.createElementBlock("svg",BD,[...e[0]||(e[0]=[a.createElementVNode("polygon",{points:"12,2 22,12 12,22 2,12"},null,-1)])])):n.isStoryTask||n.hasChildren?(a.openBlock(),a.createElementBlock("svg",bD,[...e[1]||(e[1]=[a.createElementVNode("path",{d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-5l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(a.openBlock(),a.createElementBlock("svg",CD,[...e[2]||(e[2]=[a.createStaticVNode('<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" data-v-4f02d5e2></path><polyline points="14,2 14,8 20,8" data-v-4f02d5e2></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-4f02d5e2></line><line x1="16" y1="17" x2="8" y2="17" data-v-4f02d5e2></line><polyline points="10,9 9,9 8,9" data-v-4f02d5e2></polyline>',5)])]))])):a.createCommentVNode("",!0)}}),$m=un(kD,[["__scopeId","data-v-4f02d5e2"]]),ED={key:0,class:"timer-dot"},DD={key:1,class:"status-badge overtime"},TD={key:2,class:"status-badge overdue"},xD=a.defineComponent({__name:"TaskRowBadges",props:{formattedTimer:{},isTimerRunning:{type:Boolean},timerElapsedTime:{},isOvertime:{type:Boolean},overdueDays:{},overtimeText:{},overdueText:{},daysText:{}},setup(n){return(t,e)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[n.isTimerRunning||n.timerElapsedTime?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["timer-badge",{"timer-active":n.isTimerRunning}])},[n.isTimerRunning?(a.openBlock(),a.createElementBlock("span",ED)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(n.formattedTimer),1)],2)):a.createCommentVNode("",!0),n.isOvertime?(a.openBlock(),a.createElementBlock("span",DD,a.toDisplayString(n.overtimeText),1)):a.createCommentVNode("",!0),n.overdueDays>0?(a.openBlock(),a.createElementBlock("span",TD,a.toDisplayString(n.overdueText)+a.toDisplayString(n.overdueDays>0?n.overdueDays+n.daysText:""),1)):a.createCommentVNode("",!0)],64))}}),qm=un(xD,[["__scopeId","data-v-890f023b"]]),SD=["title"],FD=["title"],LD=a.defineComponent({__name:"TaskRowNameContent",props:{task:{},isParentTask:{type:Boolean},hasChildren:{type:Boolean},isStoryTask:{type:Boolean},isMilestoneGroup:{type:Boolean},isMilestoneTask:{type:Boolean},showTaskIcon:{type:Boolean},formattedTimer:{},isOvertime:{type:Boolean},overdueDays:{},overtimeText:{},overdueText:{},daysText:{},hasContentSlot:{type:Boolean},renderColumnSlot:{type:Function},hasColumnSlot:{type:Function}},setup(n){const t=n;return(e,r)=>{var s;return(s=n.hasColumnSlot)!=null&&s.call(n,"name")?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Su)),{key:0,render:()=>{var o;return(o=n.renderColumnSlot)==null?void 0:o.call(n,"name",{task:t.task,column:{key:"name"},value:t.task.name,isParentTask:n.isParentTask,hasChildren:n.hasChildren,isStoryTask:n.isStoryTask,isMilestoneGroup:n.isMilestoneGroup,isMilestoneTask:n.isMilestoneTask,showTaskIcon:n.showTaskIcon,formattedTimer:n.formattedTimer,isOvertime:n.isOvertime,overdueDays:n.overdueDays,overtimeText:n.overtimeText,overdueText:n.overdueText,daysText:n.daysText})}},null,8,["render"])):n.hasContentSlot?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode($m,{"is-milestone-group":n.isMilestoneGroup,"is-parent-task":n.isParentTask,"has-children":n.hasChildren,"is-story-task":n.isStoryTask,"show-icon":n.showTaskIcon},null,8,["is-milestone-group","is-parent-task","has-children","is-story-task","show-icon"]),a.createElementVNode("span",{class:a.normalizeClass(["task-name-text",{"parent-task":n.isParentTask}]),title:n.task.name},[a.renderSlot(e.$slots,"custom-task-content",{},void 0,!0),a.createVNode(qm,{"formatted-timer":n.formattedTimer,"is-timer-running":!!n.task.isTimerRunning,"timer-elapsed-time":n.task.timerElapsedTime,"is-overtime":n.isOvertime,"overdue-days":n.overdueDays,"overtime-text":n.overtimeText,"overdue-text":n.overdueText,"days-text":n.daysText},null,8,["formatted-timer","is-timer-running","timer-elapsed-time","is-overtime","overdue-days","overtime-text","overdue-text","days-text"])],10,SD)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createVNode($m,{"is-milestone-group":n.isMilestoneGroup,"is-parent-task":n.isParentTask,"has-children":n.hasChildren,"is-story-task":n.isStoryTask,"show-icon":n.showTaskIcon},null,8,["is-milestone-group","is-parent-task","has-children","is-story-task","show-icon"]),a.createElementVNode("span",{class:a.normalizeClass(["task-name-text",{"parent-task":n.isParentTask}]),title:n.task.name},[a.createTextVNode(a.toDisplayString(n.task.name)+" ",1),a.createVNode(qm,{"formatted-timer":n.formattedTimer,"is-timer-running":!!n.task.isTimerRunning,"timer-elapsed-time":n.task.timerElapsedTime,"is-overtime":n.isOvertime,"overdue-days":n.overdueDays,"overtime-text":n.overtimeText,"overdue-text":n.overdueText,"days-text":n.daysText},null,8,["formatted-timer","is-timer-running","timer-elapsed-time","is-overtime","overdue-days","overtime-text","overdue-text","days-text"])],10,FD)],64))}}}),UD=un(LD,[["__scopeId","data-v-8579eb14"]]);function ID(n,t,e,r,s){const i=a.computed(()=>{const d=n.value.type,m=n.value.children,y=!!(m&&m.length>0),B=d==="story",w=d==="milestone-group",E=d==="milestone",x=B||y||w;return{indent:`${10+t.value*20}px`,hasChildren:y,isStoryTask:B,isMilestoneGroup:w,isMilestoneTask:E,isParentTask:x}}),A=()=>{const d=n.value.progress||0,m=new Date,y=n.value.endDate?new Date(n.value.endDate):null;return y&&m>y&&d<100?"progress-danger":d>=100?"progress-success":d>0?"progress-warning":""},l=()=>n.value.actualHours&&n.value.estimatedHours&&n.value.actualHours>n.value.estimatedHours,c=()=>{const d=new Date,m=n.value.endDate?new Date(n.value.endDate):null,y=n.value.progress||0;if(m&&d>m&&y<100){const B=new Date(d.getFullYear(),d.getMonth(),d.getDate()),w=new Date(m.getFullYear(),m.getMonth(),m.getDate());return Math.floor((B.getTime()-w.getTime())/(1e3*60*60*24))}return 0},u=a.computed(()=>A()),h=a.computed(()=>r!=null&&r.value?typeof r.value=="function"?r.value(n.value,(e==null?void 0:e.value)??0):r.value:""),g=a.computed(()=>s!=null&&s.value?typeof s.value=="function"?s.value(n.value,(e==null?void 0:e.value)??0):s.value:{});return{indent:a.computed(()=>i.value.indent),hasChildren:a.computed(()=>i.value.hasChildren),isStoryTask:a.computed(()=>i.value.isStoryTask),isMilestoneGroup:a.computed(()=>i.value.isMilestoneGroup),isMilestoneTask:a.computed(()=>i.value.isMilestoneTask),isParentTask:a.computed(()=>i.value.isParentTask),getProgressClass:A,isOvertime:l,overdueDays:c,progressClass:u,customRowClass:h,customRowStyle:g}}function MD(n,t,e,r,s,o,i){const A=u=>u===0;return{isFirstColumn:A,getDeclarativeColumnAlign:u=>({justifyContent:u.align==="center"?"center":u.align==="right"?"flex-end":"flex-start",textAlign:u.align||"left"}),renderDeclarativeColumn:(u,h)=>{if(A(h)){const g=u.prop?n.value[u.prop]:n.value.name;return u.defaultSlot?a.h("div",{class:"task-name-content"},[a.h("span",{class:["task-name-text",{"parent-task":t.value}],title:g},[u.defaultSlot({row:n.value,$index:i.value??-1})])]):a.h("div",{class:"task-name-content"},[o.value!==!1?a.h("span",{class:"task-icon"},e.value?a.h("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,class:"milestone-group-icon"},a.h("polygon",{points:"12,2 22,12 12,22 2,12"})):r.value||s.value?a.h("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2},a.h("path",{d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-5l-2-2H5a2 2 0 00-2 2z"})):a.h("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2},[a.h("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),a.h("polyline",{points:"14,2 14,8 20,8"}),a.h("line",{x1:16,y1:13,x2:8,y2:13}),a.h("line",{x1:16,y1:17,x2:8,y2:17}),a.h("polyline",{points:"10,9 9,9 8,9"})])):null,a.h("span",{class:["task-name-text",{"parent-task":t.value}],title:String(g)},String(g||"-"))])}if(u.defaultSlot)return u.defaultSlot({row:n.value,$index:i.value??-1});if(u.prop){const g=n.value[u.prop];return g??"-"}return"-"}}}function QD(n,t,e){const r=a.ref(!1),s=a.ref({x:0,y:0}),o=a.computed(()=>n.value),i=a.ref(0),A=a.ref(null);let l=null;const c=a.computed(()=>{const B=Math.floor(i.value/1e3),w=Math.floor(B/3600),E=Math.floor(B%3600/60),x=B%60;return`${String(w).padStart(2,"0")}:${String(E).padStart(2,"0")}:${String(x).padStart(2,"0")}`}),u=()=>{if(n.value.isTimerRunning&&n.value.timerStartTime){const B=n.value.timerElapsedTime||0;i.value=Date.now()-n.value.timerStartTime+B}else n.value.timerElapsedTime?i.value=n.value.timerElapsedTime:i.value=0},h=()=>{l||(l=a.watch(()=>[n.value.isTimerRunning,n.value.timerStartTime,n.value.timerElapsedTime],()=>{A.value&&(clearInterval(A.value),A.value=null),n.value.isTimerRunning?(u(),A.value=window.setInterval(u,1e3)):u()},{immediate:!0}))};(n.value.isTimerRunning||n.value.timerElapsedTime)&&h();const g=B=>{window.dispatchEvent(new CustomEvent("close-all-taskbar-menus"));const w=n.value.type||"task";if(w!=="task"&&w!=="story"){B.preventDefault(),r.value=!1;return}B.preventDefault(),r.value=!0,s.value={x:B.clientX,y:B.clientY}},d=()=>{r.value=!1},m=B=>{var x;if(!r.value)return;const w=B.target,E=(x=e==null?void 0:e.value)==null?void 0:x.menuRef;E&&E.contains(w)||d()},y=(B,w)=>{t("delete",B,w),d()};return a.onMounted(()=>{window.addEventListener("close-all-taskbar-menus",d),document.addEventListener("click",m)}),a.onUnmounted(()=>{window.removeEventListener("close-all-taskbar-menus",d),document.removeEventListener("click",m),A.value&&clearInterval(A.value),l&&l()}),{contextMenuVisible:r,contextMenuPosition:s,contextMenuTask:o,handleContextMenu:g,closeContextMenu:d,handleTaskDelete:y,timerElapsed:i,formattedTimer:c}}const oc=new Map;function Db(n){const{taskId:t,event:e}=n.detail,r=oc.get(t);r&&r(e)}function ND(n,t){const e=oc.size===0;oc.set(n,t),e&&window.addEventListener("task-row-drag-over",Db)}function _D(n){oc.delete(n),oc.size===0&&window.removeEventListener("task-row-drag-over",Db)}function RD(n,t,e,r,s,o,i,A,l,c,u){const h=()=>{l&&l("toggle",n.value)},g=()=>{(t.value||e.value)&&!r.value&&l&&l("toggle",n.value)},d=b=>{b.stopPropagation(),l&&l("dblclick",n.value)},m=()=>{s.value||A&&A(n.value.id)},y=()=>{s.value||A&&A(null)},B=()=>{s.value=!0},w=()=>{s.value=!1},E=b=>{if(!i.value)return;const H=b.target;H.tagName==="BUTTON"||H.tagName==="INPUT"||H.tagName==="SELECT"||H.tagName==="TEXTAREA"||H.closest(".collapse-btn")||H.closest(".task-context-menu")||o.value&&c&&c(n.value,o.value,b)},x=b=>{!i.value||!o.value||!u||u(n.value,o.value,b)};return a.onMounted(()=>{window.addEventListener("splitter-drag-start",B),window.addEventListener("splitter-drag-end",w),ND(n.value.id,x)}),a.onUnmounted(()=>{window.removeEventListener("splitter-drag-start",B),window.removeEventListener("splitter-drag-end",w),_D(n.value.id)}),{handleToggle:h,handleRowClick:g,handleTaskRowDoubleClick:d,handleMouseEnter:m,handleMouseLeave:y,handleMouseDown:E}}function OD(){const n=a.inject("gantt-column-slots",{});return{columnSlots:n,hasColumnSlot:r=>{const s=`column-${r}`;return!!n[s]},renderColumnSlot:(r,s)=>{const o=`column-${r}`,i=n[o];return i?i(s):null}}}const HD=["data-task-id"],PD={key:0,class:"milestone-spacer"},VD={key:1,class:"leaf-spacer"},WD={key:0,class:"milestone-spacer"},KD={key:1,class:"leaf-spacer"},$D={key:2,class:"resource-row-name"},qD={key:0,class:"resource-warning-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jD={key:1,class:"resource-avatar"},YD=["src","alt"],GD={class:"resource-name-text"},zD={key:0,class:"milestone-empty-col"},XD={key:4,class:"assignee-info"},JD={class:"assignee-avatars-container"},ZD=["src","alt"],eT={key:1,class:"avatar-text"},tT=["title"],rT=a.defineComponent({__name:"TaskRow",props:{task:{},level:{},rowIndex:{},isHovered:{type:Boolean},hoveredTaskId:{},onHover:{},columns:{},declarativeColumns:{},renderMode:{default:"default"},getColumnWidthStyle:{},disableChildrenRender:{type:Boolean},showTaskIcon:{type:Boolean},enableDrag:{type:Boolean},dragStart:{},dragOver:{},taskListRowClassName:{},taskListRowStyle:{type:[Boolean,null,String,Object,Array,Function]}},emits:["toggle","dblclick","contextmenu","start-timer","stop-timer","add-predecessor","add-successor","delete"],setup(n,{emit:t}){const e=n,r=t,{t:s}=_s(),o=a.computed(()=>{var $e;return(($e=s.value)==null?void 0:$e.overtime)??""}),i=a.computed(()=>{var $e;return(($e=s.value)==null?void 0:$e.overdue)??""}),A=a.computed(()=>{var $e;return(($e=s.value)==null?void 0:$e.days)??""}),l=a.useSlots(),c=a.computed(()=>!!l["custom-task-content"]),{viewMode:u}=Fv(),h=a.inject("resourceTaskLayouts",a.computed(()=>new Map)),g=a.inject("gantt-fixed-column-offsets",a.computed(()=>new Map)),d=$e=>{const Ve=g.value.get($e);return Ve?Ve.side==="left"?{left:`${Ve.baseOffset}px`}:{right:`${Ve.baseOffset}px`}:{}},m=a.computed(()=>u.value==="resource"&&"tasks"in e.task),y=a.computed(()=>{if(!m.value)return!1;const $e=e.task;return XE($e)}),B=a.inject("gantt-row-height",a.computed(()=>51)),w=a.inject("taskRowLayouts",a.computed(()=>({taskHeights:new Map}))),E=a.computed(()=>{if(m.value){const $e=String(e.task.id),Ve=h.value.get($e);return(Ve==null?void 0:Ve.totalHeight)||B.value+5}return w.value.taskHeights.get(e.task.id)||B.value}),x=a.inject("enable-task-list-context-menu",a.computed(()=>!0)),b=a.inject("task-list-context-menu-slot",a.computed(()=>!1)),H=a.inject("declarative-task-list-context-menu",a.computed(()=>null)),$=a.computed(()=>!!x.value),Y=a.computed(()=>x.value?!b.value:!1),V=a.computed(()=>{if(!x.value||!b.value)return!1;const $e=H.value;if(($e==null?void 0:$e.taskType)!==void 0){const Ve=e.task.type||"task";return(Array.isArray($e.taskType)?$e.taskType:[$e.taskType]).includes(Ve)}return!0}),L=a.toRef(e,"task"),j=a.toRef(e,"level"),{indent:D,hasChildren:S,isStoryTask:Q,isMilestoneGroup:T,isMilestoneTask:oe,isParentTask:X,isOvertime:F,overdueDays:M,progressClass:R,customRowClass:ae,customRowStyle:J}=ID(L,j,a.computed(()=>e.rowIndex),a.computed(()=>e.taskListRowClassName),a.computed(()=>e.taskListRowStyle)),{hasColumnSlot:k,renderColumnSlot:O}=OD(),{isFirstColumn:N,getDeclarativeColumnAlign:Z,renderDeclarativeColumn:se}=MD(L,X,T,Q,S,a.computed(()=>e.showTaskIcon),a.computed(()=>e.rowIndex)),ge=a.ref(null),{contextMenuVisible:fe,contextMenuPosition:Ae,contextMenuTask:Fe,handleContextMenu:be,closeContextMenu:Ke,handleTaskDelete:Xe,timerElapsed:xe,formattedTimer:te}=QD(L,r,ge),lt=$e=>{if(!$.value){$e.preventDefault();return}be($e)},Pe=a.ref(null),rt=a.ref(!1),{handleToggle:Te,handleRowClick:Et,handleTaskRowDoubleClick:ot,handleMouseEnter:yt,handleMouseLeave:pt,handleMouseDown:Oe}=RD(L,Q,S,T,rt,Pe,a.computed(()=>e.enableDrag),e.onHover,r,e.dragStart,e.dragOver),it=a.computed(()=>e.renderMode==="declarative"&&e.declarativeColumns?e.declarativeColumns:e.columns),W=a.computed(()=>({isRowContent:!0,task:e.task,level:e.level,indent:D.value,isHovered:e.isHovered??!1,hoveredTaskId:e.hoveredTaskId??null,isParent:X.value,hasChildren:S.value,collapsed:!!e.task.collapsed,formattedTimer:te.value,timerRunning:!!e.task.isTimerRunning,timerElapsed:xe.value,isOvertime:F(),overdueDays:M(),overtimeText:o.value,overdueText:i.value,daysText:A.value,progressClass:R.value})),z=a.computed(()=>{if(m.value){const $e=e.task;if($e.color)return $e.color}return e.task.barColor?e.task.barColor:null}),ye=a.computed(()=>z.value?{"--left-border-color":z.value}:{}),qe=a.computed(()=>{const $e=e.task,Ve=$e.avatar,Mt=$e.assignee;let tt=[];Ve&&(tt=Array.isArray(Ve)?Ve:[Ve]);let _t=[];Mt&&(_t=Array.isArray(Mt)?Mt:[Mt]);const rr=tt.length>0?tt.map(hr=>({type:"image",url:hr})):_t.map(hr=>({type:"text",name:hr})),St=_t.join(`
`)||"-";return{avatars:rr,nameText:St,hasMultiple:rr.length>1}}),ct=a.computed(()=>{const $e=e.task.endDate;if(!$e)return"-";const Ve=new Date($e);if(isNaN(Ve.getTime()))return $e;const Mt=Ka($e,Ve),tt=Mt.getFullYear(),_t=String(Mt.getMonth()+1).padStart(2,"0"),rr=String(Mt.getDate()).padStart(2,"0");return`${tt}-${_t}-${rr}`});return($e,Ve)=>{var Mt;return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",{ref_key:"taskRowRef",ref:Pe,class:a.normalizeClass(["task-row",{"task-row-hovered":n.isHovered,"task-type-resource":m.value,"parent-task":a.unref(X),"milestone-group-row":a.unref(T),"task-type-story":a.unref(Q),"task-type-task":e.task.type==="task","task-type-milestone":a.unref(oe),[a.unref(ae)]:a.unref(ae)}]),"data-task-id":e.task.id,style:a.normalizeStyle([a.unref(J),ye.value,{height:`${E.value}px`}]),onClick:Ve[0]||(Ve[0]=(...tt)=>a.unref(Et)&&a.unref(Et)(...tt)),onDblclick:Ve[1]||(Ve[1]=(...tt)=>a.unref(ot)&&a.unref(ot)(...tt)),onMousedown:Ve[2]||(Ve[2]=(...tt)=>a.unref(Oe)&&a.unref(Oe)(...tt)),onMouseenter:Ve[3]||(Ve[3]=(...tt)=>a.unref(yt)&&a.unref(yt)(...tt)),onMouseleave:Ve[4]||(Ve[4]=(...tt)=>a.unref(pt)&&a.unref(pt)(...tt)),onContextmenu:lt},[n.renderMode==="declarative"&&n.declarativeColumns?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(it.value,(tt,_t)=>(a.openBlock(),a.createElementBlock("div",{key:_t,class:a.normalizeClass(["col",[tt.cssClass,{"col-name":a.unref(N)(_t),"col-fixed":a.unref(N)(_t)||tt.fixed==="left"||tt.fixed===!0,"col-fixed-right":tt.fixed==="right"}]]),style:a.normalizeStyle([n.getColumnWidthStyle?n.getColumnWidthStyle(tt):{},a.unref(Z)(tt),a.unref(N)(_t)?{left:"0px"}:d(tt.prop||tt.key||"")])},[a.unref(N)(_t)?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({paddingLeft:a.unref(D)}),class:"first-col-wrapper"},[a.createVNode(Km,{collapsed:!!e.task.collapsed,visible:(a.unref(Q)||a.unref(S))&&!a.unref(T),onToggle:a.unref(Te)},null,8,["collapsed","visible","onToggle"]),a.unref(T)?(a.openBlock(),a.createElementBlock("span",PD)):a.createCommentVNode("",!0),!a.unref(X)&&!a.unref(T)&&n.showTaskIcon===!1?(a.openBlock(),a.createElementBlock("span",VD)):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Su)),{render:()=>a.unref(se)(tt,_t)},null,8,["render"]))],4)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Su)),{key:1,render:()=>a.unref(se)(tt,_t)},null,8,["render"]))],6))),128)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",{class:"col col-name col-fixed",style:a.normalizeStyle({paddingLeft:a.unref(D),left:"0px"})},[a.createVNode(Km,{collapsed:!!e.task.collapsed,visible:(a.unref(Q)||a.unref(S))&&!a.unref(T),onToggle:a.unref(Te)},null,8,["collapsed","visible","onToggle"]),a.unref(T)?(a.openBlock(),a.createElementBlock("span",WD)):a.createCommentVNode("",!0),!a.unref(X)&&!a.unref(T)&&n.showTaskIcon===!1&&!m.value?(a.openBlock(),a.createElementBlock("span",KD)):a.createCommentVNode("",!0),m.value?(a.openBlock(),a.createElementBlock("div",$D,[y.value?(a.openBlock(),a.createElementBlock("svg",qD,[...Ve[9]||(Ve[9]=[a.createElementVNode("path",{d:"M12 2L2 20h20L12 2z",fill:"var(--gantt-danger, #f56c6c)"},null,-1),a.createElementVNode("path",{d:"M12 8v6M12 16h.01",stroke:"#fff","stroke-width":"2","stroke-linecap":"round"},null,-1)])])):a.createCommentVNode("",!0),e.task.avatar?(a.openBlock(),a.createElementBlock("div",jD,[a.createElementVNode("img",{src:e.task.avatar,alt:e.task.name},null,8,YD)])):a.createCommentVNode("",!0),a.createElementVNode("span",GD,a.toDisplayString(e.task.name||"-"),1)])):(a.openBlock(),a.createBlock(UD,{key:3,task:e.task,"is-parent-task":a.unref(X),"has-children":a.unref(S),"is-story-task":a.unref(Q),"is-milestone-group":a.unref(T),"is-milestone-task":a.unref(oe),"show-task-icon":n.showTaskIcon!==!1,"formatted-timer":a.unref(te),"is-overtime":!!a.unref(F)(),"overdue-days":a.unref(M)(),"overtime-text":o.value,"overdue-text":i.value,"days-text":A.value,"has-content-slot":c.value,"render-column-slot":a.unref(O),"has-column-slot":a.unref(k)},{"custom-task-content":a.withCtx(()=>[a.renderSlot($e.$slots,"custom-task-content",a.mergeProps(W.value,{type:"task-row"}),void 0,!0)]),_:3},8,["task","is-parent-task","has-children","is-story-task","is-milestone-group","is-milestone-task","show-task-icon","formatted-timer","is-overtime","overdue-days","overtime-text","overdue-text","days-text","has-content-slot","render-column-slot","has-column-slot"]))],4),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,tt=>(a.openBlock(),a.createElementBlock("div",{key:tt.key,class:a.normalizeClass(["col",[tt.cssClass||`col-${tt.key}`,{"col-fixed":tt.fixed==="left"||tt.fixed===!0,"col-fixed-right":tt.fixed==="right"}]]),style:a.normalizeStyle([n.getColumnWidthStyle?n.getColumnWidthStyle(tt):void 0,d(tt.key)])},[a.unref(T)?(a.openBlock(),a.createElementBlock("div",zD)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.unref(k)(tt.key)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Su)),{key:0,render:()=>a.unref(O)(tt.key,{task:e.task,column:tt,value:e.task[tt.key]})},null,8,["render"])):tt.formatter?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(tt.formatter(e.task,tt)),1)],64)):m.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode(a.toDisplayString(e.task[tt.key]||"-"),1)],64)):tt.key==="predecessor"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(a.unref(Ep)(e.task.predecessor)),1)],64)):tt.key==="assignee"?(a.openBlock(),a.createElementBlock("div",XD,[a.createElementVNode("div",JD,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(qe.value.avatars,(_t,rr)=>(a.openBlock(),a.createElementBlock("div",{key:rr,class:"avatar",style:a.normalizeStyle({zIndex:rr+1,marginLeft:rr>0?"-8px":"0"})},[_t.type==="image"?(a.openBlock(),a.createElementBlock("img",{key:0,src:_t.url,alt:`avatar-${rr}`},null,8,ZD)):(a.openBlock(),a.createElementBlock("span",eT,a.toDisplayString(_t.name.charAt(0).toUpperCase()),1))],4))),128))]),a.createElementVNode("span",{class:"assignee-name",title:qe.value.nameText},a.toDisplayString(qe.value.nameText),9,tT)])):tt.key==="startDate"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:5},[a.createTextVNode(a.toDisplayString(e.task.startDate||"-"),1)],64)):tt.key==="endDate"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:6},[a.createTextVNode(a.toDisplayString(ct.value),1)],64)):tt.key==="estimatedHours"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:7},[a.createTextVNode(a.toDisplayString(e.task.estimatedHours||"-"),1)],64)):tt.key==="actualHours"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:8},[a.createTextVNode(a.toDisplayString(e.task.actualHours||"-"),1)],64)):tt.key==="progress"?(a.openBlock(),a.createElementBlock("span",{key:9,class:a.normalizeClass(["progress-value",a.unref(R)])},a.toDisplayString(e.task.progress!=null?e.task.progress+"%":"-"),3)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:10},[a.createTextVNode(a.toDisplayString(e.task[tt.key]||"-"),1)],64))],64))],6))),128))],64))],46,HD),Y.value?(a.openBlock(),a.createBlock(Eb,{key:0,ref_key:"taskContextMenuRef",ref:ge,visible:a.unref(fe),task:a.unref(Fe),position:a.unref(Ae),onClose:a.unref(Ke),onStartTimer:Ve[5]||(Ve[5]=tt=>$e.$emit("start-timer",e.task)),onStopTimer:Ve[6]||(Ve[6]=tt=>$e.$emit("stop-timer",e.task)),onAddPredecessor:Ve[7]||(Ve[7]=tt=>$e.$emit("add-predecessor",e.task)),onAddSuccessor:Ve[8]||(Ve[8]=tt=>$e.$emit("add-successor",e.task)),onDelete:a.unref(Xe)},null,8,["visible","task","position","onClose","onDelete"])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[V.value&&a.unref(fe)&&((Mt=a.unref(H))!=null&&Mt.defaultSlot)?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-context-menu-wrapper",style:a.normalizeStyle({position:"fixed",left:`${a.unref(Ae).x}px`,top:`${a.unref(Ae).y}px`,zIndex:9999})},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(H).defaultSlot),{row:a.unref(Fe),$index:e.rowIndex??-1},null,8,["row","$index"]))],4)):a.createCommentVNode("",!0)]))])}}}),Tb=un(rT,[["__scopeId","data-v-c63f6c57"]]),nT=320,jm=280,aT=1160;function il(n,t,e){if(n==null)return e;if(typeof n=="number")return n;if(typeof n=="string"){const r=n.trim();if(r.endsWith("%")){const o=parseFloat(r);if(!isNaN(o))return Math.round(t*o/100)}const s=parseFloat(r);if(!isNaN(s))return s}return e}const Ym=[{type:"name",key:"taskName",label:"任务名称",cssClass:"col-name",visible:!0},{type:"predecessor",key:"predecessor",label:"前置任务",cssClass:"col-pre",visible:!0},{type:"assignee",key:"assignee",label:"负责人",cssClass:"col-assignee",visible:!0},{type:"startDate",key:"startDate",label:"开始日期",cssClass:"col-date",visible:!0},{type:"endDate",key:"endDate",label:"结束日期",cssClass:"col-date",visible:!0},{type:"estimatedHours",key:"estimatedHours",label:"预估工时",cssClass:"col-hours",visible:!0},{type:"actualHours",key:"actualHours",label:"实际工时",cssClass:"col-hours",visible:!0},{type:"progress",key:"progress",label:"进度",cssClass:"col-progress",visible:!0}],sT=320,Gm=280,oT=1160,xb=[{type:"title",key:"title",label:"职务",cssClass:"col-title",visible:!0},{type:"type",key:"type",label:"类别",cssClass:"col-type",visible:!0},{type:"department",key:"department",label:"部门",cssClass:"col-department",visible:!0},{type:"capacity",key:"capacity",label:"利用率",cssClass:"col-capacity",visible:!0,formatter:n=>n.capacity!=null?`${n.capacity}%`:"-"}];function AT(n){const t=n.dragThreshold??5,e=a.ref({isDragging:!1,isPreparing:!1,draggedTask:null,draggedElement:null,ghostElement:null,dropTargetTask:null,dropPosition:null,startX:0,startY:0}),r=(g,d,m)=>{n.enabled&&(g.type==="milestone-group"||g.type==="milestone"||(m.preventDefault(),m.stopPropagation(),e.value.isPreparing=!0,e.value.draggedTask=g,e.value.draggedElement=d,e.value.startX=m.clientX,e.value.startY=m.clientY))},s=g=>{if(!e.value.isPreparing||e.value.isDragging)return;const d=e.value.draggedTask,m=e.value.draggedElement;e.value.isDragging=!0,e.value.isPreparing=!1;const y=m.cloneNode(!0);y.style.position="fixed",y.style.left="-9999px",y.style.top="-9999px",y.style.width=`${m.offsetWidth}px`,y.style.height=`${m.offsetHeight}px`,y.style.opacity="0.6",y.style.pointerEvents="none",y.style.zIndex="999999",y.style.boxShadow="0 8px 24px rgba(0, 0, 0, 0.3)",y.classList.add("task-row-dragging"),(document.querySelector(".gantt-fullscreen")||document.body).appendChild(y),e.value.ghostElement=y,m.style.opacity="0.4",document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",document.body.style.cursor="move",window.dispatchEvent(new CustomEvent("task-row-drag-start",{detail:{task:d}})),n.onDragStart&&n.onDragStart(d),o(g)},o=g=>{if(e.value.ghostElement){const d=e.value.ghostElement;d.style.left=`${g.clientX+10}px`,d.style.top=`${g.clientY-25}px`}},i=(g,d,m)=>{if(!e.value.isDragging||!e.value.draggedTask)return;if(g.id===e.value.draggedTask.id){A();return}if(h(e.value.draggedTask,g)){A();return}m.preventDefault(),m.stopPropagation();const B=g.children&&g.children.length>0?"child":"after";e.value.dropTargetTask=g,e.value.dropPosition=B,document.querySelectorAll(".task-row-drop-target").forEach(w=>{w.classList.remove("task-row-drop-target","drop-after","drop-child")}),d.classList.add("task-row-drop-target"),B==="after"?d.classList.add("drop-after"):d.classList.add("drop-child"),n.onDragOver&&n.onDragOver(g,B)},A=()=>{e.value.dropTargetTask=null,e.value.dropPosition=null,document.querySelectorAll(".task-row-drop-target").forEach(g=>{g.classList.remove("task-row-drop-target","drop-after","drop-child")})},l=()=>{if(e.value.isPreparing&&!e.value.isDragging){e.value.isPreparing=!1,e.value.draggedTask=null,e.value.draggedElement=null;return}if(!e.value.isDragging)return;const g=e.value.draggedTask,d=e.value.dropTargetTask,m=e.value.dropPosition;e.value.draggedElement&&(e.value.draggedElement.style.opacity=""),e.value.ghostElement&&e.value.ghostElement.parentElement&&e.value.ghostElement.parentElement.removeChild(e.value.ghostElement),A(),document.body.style.userSelect="",document.body.style.webkitUserSelect="",document.body.style.cursor="",window.dispatchEvent(new CustomEvent("task-row-drag-end")),g&&d&&m&&n.onDrop&&n.onDrop(g,d,m),e.value={isDragging:!1,isPreparing:!1,draggedTask:null,draggedElement:null,ghostElement:null,dropTargetTask:null,dropPosition:null,startX:0,startY:0}},c=g=>{if(e.value.isPreparing&&!e.value.isDragging){const d=Math.abs(g.clientX-e.value.startX),m=Math.abs(g.clientY-e.value.startY);Math.sqrt(d*d+m*m)>t&&s(g);return}if(e.value.isDragging){o(g);const d=e.value.ghostElement;d&&(d.style.display="none");const m=document.elementFromPoint(g.clientX,g.clientY);if(d&&(d.style.display=""),m){const y=m.closest(".task-row");if(y&&y.dataset.taskId){const B=Number(y.dataset.taskId);window.dispatchEvent(new CustomEvent("task-row-drag-over",{detail:{taskId:B,event:g}}))}}}},u=()=>{(e.value.isDragging||e.value.isPreparing)&&l()},h=(g,d)=>{if(!g.children)return!1;for(const m of g.children)if(m.id===d.id||h(m,d))return!0;return!1};return a.onMounted(()=>{document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)}),a.onUnmounted(()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),e.value.ghostElement&&e.value.ghostElement.parentElement&&e.value.ghostElement.parentElement.removeChild(e.value.ghostElement)}),{dragState:e,startDrag:r,handleDragOver:i,endDrag:l}}function iT(n){let t=!1;if(typeof n.type=="object"){const l=n.type;t=l.name==="TaskListColumn"||l.__name==="TaskListColumn"||l.__file&&l.__file.includes("TaskListColumn")}if(!t)return null;const e=n.props||{},r=n.children,s=r==null?void 0:r.header,o=r==null?void 0:r.default,i=e.fixed;let A;return i===""||i==="true"?A=!0:i==="false"?A=!1:A=i,{prop:e.prop,label:e.label,width:e.width,align:e.align||"left",cssClass:e.cssClass,fixed:A,headerSlot:s,defaultSlot:o}}function Xl(n){var s;const t=(s=n.default)==null?void 0:s.call(n);if(!t||!Array.isArray(t))return[];const e=[],r=o=>{for(const i of o){if(!i)continue;if(typeof i.type=="symbol"){i.children&&Array.isArray(i.children)&&r(i.children);continue}const A=iT(i);A&&e.push(A),i.children&&Array.isArray(i.children)&&r(i.children)}};return r(t),e}function lT(n,t,e){const r=()=>typeof n=="string"?n:n.value,s=a.shallowRef(r()==="declarative"?Xl(t):[]);a.watch(()=>r()==="declarative"?t.default??null:null,()=>{s.value=r()==="declarative"?Xl(t):[]});const o=a.computed(()=>(typeof n=="string"?n:n.value)==="declarative"?s.value:e||[]);return{declarativeColumns:s,finalColumns:o,getColumnWidthStyle:(l,c)=>{if(!l.width)return{};let u;if(typeof l.width=="string"&&l.width.includes("%"))if(c&&c>0){const h=parseFloat(l.width)/100;u=`${Math.floor(c*h)}px`}else return{};else typeof l.width=="number"?u=`${l.width}px`:typeof l.width=="string"?/\d+(px|rem|em|%)/.test(l.width)?u=l.width:u=`${l.width}px`:u=String(l.width);return{flex:`0 0 ${u}`,minWidth:u,maxWidth:u}},getColumnAlignStyle:l=>!l||l==="left"?{}:{justifyContent:l==="center"?"center":"flex-end",textAlign:l}}}const Kc=5;function cT(n){const t=a.ref(0),e=a.ref(0),r=a.inject("gantt-view-mode",a.ref("task")),s=a.inject("gantt-data-source",a.computed(()=>[])),o=a.inject("resourceTaskLayouts",a.computed(()=>new Map)),i=a.inject("gantt-row-height",a.computed(()=>51)),A=a.inject("taskRowLayouts",a.computed(()=>({cumulativeHeights:[0],totalHeight:0,taskHeights:new Map}))),l=(w,E=0)=>{const x=[];for(const b of w)x.push({task:b,level:E}),!(b.type==="milestone-group")&&b.children&&b.children.length>0&&!b.collapsed&&x.push(...l(b.children,E+1));return x},c=a.computed(()=>l(n.value)),u=a.computed(()=>{if(r.value!=="resource")return[];const w=s.value,E=[0];let x=0;return w.forEach(b=>{const H=o.value.get(b.id),$=(H==null?void 0:H.totalHeight)||i.value;x+=$,E.push(x)}),E}),h=w=>{const E=u.value;let x=0,b=E.length-1;for(;x<b;){const H=Math.floor((x+b)/2);E[H]<=w?x=H+1:b=H}return Math.max(0,x-1)},g=a.computed(()=>{const w=t.value,E=e.value||600;if(r.value==="resource"){const x=u.value;if(x.length<=1)return{startIndex:0,endIndex:0};const b=s.value.length;let H=Math.max(0,h(w)-Kc);const $=w+E;let Y=Math.min(x.length-1,h($)+Kc+1);return{startIndex:Math.min(H,b),endIndex:Math.min(Y,b)}}else{const x=A.value.cumulativeHeights,b=c.value.length;if(b===0||x.length<=1)return{startIndex:0,endIndex:0};const H=L=>{let j=0,D=x.length-1;for(;j<D;){const S=Math.floor((j+D)/2);x[S]<=L?j=S+1:D=S}return Math.max(0,j-1)},$=Math.max(0,H(w)-Kc),Y=w+E,V=Math.min(b,H(Y)+Kc+1);return{startIndex:$,endIndex:Math.min(b,Math.max($+1,V))}}}),d=a.computed(()=>{const{startIndex:w,endIndex:E}=g.value;return c.value.slice(w,E).map((b,H)=>({...b,rowIndex:w+H}))}),m=a.computed(()=>{if(r.value==="resource"){const w=u.value;return w.length>0?w[w.length-1]:0}return A.value.totalHeight}),y=a.computed(()=>r.value==="resource"?u.value[g.value.startIndex]||0:A.value.cumulativeHeights[g.value.startIndex]||0),B=a.computed(()=>{if(r.value==="resource"){const x=g.value.endIndex,b=u.value[x]||0;return Math.max(0,m.value-b)}const w=g.value.endIndex,E=A.value.cumulativeHeights[w]||0;return Math.max(0,A.value.totalHeight-E)});return{taskListScrollTop:t,taskListBodyHeight:e,flattenedTasks:c,visibleTaskRange:g,visibleTasks:d,totalContentHeight:m,startSpacerHeight:y,endSpacerHeight:B,getFlattenedVisibleTasks:l}}function uT(n,t,e){const r=a.ref(null),s=a.ref(null),o=a.ref(0);let i=null,A=null;const l=()=>{if(r.value){const h=r.value.offsetWidth;Math.abs(h-o.value)>1&&(o.value=h)}};return a.watch(n,h=>{if(!h&&(l(),s.value)){const g=s.value.clientHeight;Math.abs(g-e.value)>1&&(e.value=g)}}),{taskListRef:r,taskListBodyRef:s,cachedContainerWidth:o,initializeResizeObservers:()=>{r.value&&(i=new ResizeObserver(h=>{if(!n.value)for(const g of h)o.value=g.contentRect.width}),i.observe(r.value)),s.value&&(e.value=s.value.clientHeight,t.value=s.value.scrollTop,A=new ResizeObserver(h=>{if(!n.value)for(const g of h)e.value=g.contentRect.height}),A.observe(s.value))},cleanupResizeObservers:()=>{i&&(i.disconnect(),i=null),A&&(A.disconnect(),A=null)},updateContainerWidth:l}}function dT(n){if(!n.children||n.children.length===0)return{progress:n.progress||0,startDate:n.startDate||"",endDate:n.endDate||""};const t=[],e=u=>{u.forEach(h=>{t.push(h),h.children&&h.children.length>0&&e(h.children)})};e(n.children);const r=t.reduce((u,h)=>u+(h.progress||0),0),s=t.length>0?Math.round(r/t.length):0,o=t.filter(u=>u.startDate&&u.endDate);if(o.length===0)return{progress:s,startDate:n.startDate||"",endDate:n.endDate||""};const i=o.map(u=>new Date(u.startDate)),A=o.map(u=>new Date(u.endDate)),l=new Date(Math.min(...i.map(u=>u.getTime()))),c=new Date(Math.max(...A.map(u=>u.getTime())));return{progress:s,startDate:l.toISOString().split("T")[0],endDate:c.toISOString().split("T")[0]}}function Tp(n,t=!1){if(!n)return;const e=r=>{r.forEach(s=>{if(s.children&&s.children.length>0){e(s.children);const o=dT(s);s.progress=o.progress,t||(s.startDate=o.startDate,s.endDate=o.endDate)}})};e(n)}function fT(n){const t=[],e=r=>{r.forEach(s=>{t.push(s),s.children&&s.children.length>0&&e(s.children)})};return e(n),t}function hT(n){const{tasks:t,hoveredTaskId:e,isSplitterDragging:r,taskListScrollTop:s,taskListBodyRef:o,updateContainerWidth:i,onTaskUpdate:A,enableParentTaskAutoSchedule:l}=n,c=L=>{r.value||(e.value=L,window.dispatchEvent(new CustomEvent("task-list-hover",{detail:L})))},u=L=>{e.value=L.detail},h=L=>{L.type==="milestone"||L.type==="milestone-group"||window.dispatchEvent(new CustomEvent("task-row-double-click",{detail:L}))},g=L=>{if(!t.value)return;const j=S=>{for(const Q of S){if(Q.id===L.id)return Object.assign(Q,L),L.children,!0;if(Q.children&&j(Q.children))return!0}return!1};j(t.value);const D=!((l==null?void 0:l.value)??!0);Tp(t.value,D),A&&A(L)},d=L=>{const j=L.detail;g(j)},m=L=>{const j=L.detail;t.value&&t.value.push(j),Tp(t.value)},y=()=>{const L=fT(t.value);window.dispatchEvent(new CustomEvent("task-list-updated",{detail:L}))},B=L=>{const{milestoneId:j,icon:D}=L.detail,S=Q=>{for(const T of Q){if(T.type==="milestone-group"&&T.children){const oe=T.children.find(X=>X.id===j);if(oe)return oe.icon=D,!0}if(T.children&&S(T.children))return!0}return!1};S(t.value)};let w=!1;const E=L=>{const j=L.target;if(!j)return;const D=j.scrollTop;s.value=D,!w&&(window.dispatchEvent(new CustomEvent("close-all-taskbar-menus")),window.dispatchEvent(new CustomEvent("task-list-vertical-scroll",{detail:{scrollTop:D}})))},x=L=>{const{scrollTop:j}=L.detail,D=o.value;s.value=j,D&&Math.abs(D.scrollTop-j)>1&&(w=!0,D.scrollTop=j,Promise.resolve().then(()=>{w=!1}))},b=L=>{try{window.dispatchEvent(new CustomEvent("context-menu",{detail:L}))}catch(j){console.error("TaskList - Failed to dispatch context-menu event",j)}},H=()=>{r.value=!0},$=()=>{r.value=!1,i()};return{handleTaskRowHover:c,handleTaskRowDoubleClick:h,handleTaskListScroll:E,handleTaskRowContextMenu:b,registerEventListeners:()=>{window.addEventListener("task-updated",d),window.addEventListener("task-added",m),window.addEventListener("request-task-list",y),window.addEventListener("timeline-task-hover",u),window.addEventListener("timeline-vertical-scroll",x),window.addEventListener("milestone-icon-changed",B),window.addEventListener("splitter-drag-start",H),window.addEventListener("splitter-drag-end",$)},unregisterEventListeners:()=>{window.removeEventListener("task-updated",d),window.removeEventListener("task-added",m),window.removeEventListener("request-task-list",y),window.removeEventListener("timeline-task-hover",u),window.removeEventListener("timeline-vertical-scroll",x),window.removeEventListener("milestone-icon-changed",B),window.removeEventListener("splitter-drag-start",H),window.removeEventListener("splitter-drag-end",$)}}}const gT={class:"task-list-header"},pT={class:"task-list-body-inner"},vT=300,mT=a.defineComponent({__name:"TaskList",props:{tasks:{},useDefaultDrawer:{type:Boolean},taskListConfig:{},taskListColumnRenderMode:{default:"default"},enableTaskRowMove:{type:Boolean},taskListRowClassName:{},taskListRowStyle:{type:[Boolean,null,String,Object,Array,Function]},enableParentTaskAutoSchedule:{type:Boolean}},emits:["task-collapse-change","start-timer","stop-timer","add-predecessor","add-successor","delete","task-row-moved","resource-click"],setup(n,{expose:t,emit:e}){const r=n,s=e,o=a.useSlots(),i=a.computed(()=>!!o["custom-task-content"]),{viewMode:A,dataSource:l,listConfig:c}=Fv(),u=a.inject("gantt-column-slots",{}),{t:h}=_s(),g=a.computed(()=>A.value==="resource"?xb:Ym),d=a.computed(()=>{const Pe=c.value||r.taskListConfig;return(Pe==null?void 0:Pe.columns)||g.value}),{declarativeColumns:m,getColumnWidthStyle:y}=lT(a.computed(()=>r.taskListColumnRenderMode||"default"),o,d.value);function B(Pe){return Pe==="left"||Pe===!0?0:Pe==="right"?2:1}const w=a.computed(()=>{var rt;return r.taskListColumnRenderMode==="declarative"?[...m.value].sort((Te,Et)=>B(Te.fixed)-B(Et.fixed)):(((rt=r.taskListConfig)==null?void 0:rt.columns)||Ym).filter(Te=>Te.visible!==!1)}),E=a.computed(()=>r.taskListColumnRenderMode==="declarative"?[]:[...d.value.filter(rt=>rt.visible!==!1)].sort((rt,Te)=>B(rt.fixed)-B(Te.fixed))),x=a.computed(()=>A.value==="resource"?l.value||[]:r.tasks||[]),{taskListScrollTop:b,taskListBodyHeight:H,visibleTasks:$,startSpacerHeight:Y,endSpacerHeight:V}=cT(x),L=a.ref(null);function j(Pe,rt){if(!Pe.width)return 120;if(typeof Pe.width=="number")return Pe.width;const Te=Pe.width.trim();return Te.endsWith("%")?Math.floor(rt*parseFloat(Te)/100):parseFloat(Te)||120}const D=a.computed(()=>{const Pe=new Map,rt=r.taskListColumnRenderMode==="declarative"?w.value:E.value,Te=F.value||0;let ot=r.taskListColumnRenderMode==="declarative"?0:vT;for(const pt of rt)if(pt.fixed==="left"||pt.fixed===!0){const Oe=pt.key||pt.prop||"";Pe.set(Oe,{side:"left",baseOffset:ot}),ot+=j(pt,Te)}let yt=0;for(let pt=rt.length-1;pt>=0;pt--){const Oe=rt[pt];if(Oe.fixed==="right"){const it=Oe.key||Oe.prop||"";Pe.set(it,{side:"right",baseOffset:yt}),yt+=j(Oe,Te)}}return Pe});a.provide("gantt-fixed-column-offsets",D);const S=()=>({position:"sticky",left:"0px",zIndex:20,backgroundColor:"var(--gantt-bg-secondary)"}),Q=Pe=>{if(!Pe.fixed)return{};const rt=Pe.key||Pe.prop||"",Te=D.value.get(rt);return Te?Te.side==="left"?{position:"sticky",left:`${Te.baseOffset}px`,zIndex:20,backgroundColor:"var(--gantt-bg-secondary)"}:{position:"sticky",right:`${Te.baseOffset}px`,zIndex:20,backgroundColor:"var(--gantt-bg-secondary)"}:{}},T=a.ref(!1),{taskListRef:oe,taskListBodyRef:X,cachedContainerWidth:F,initializeResizeObservers:M,cleanupResizeObservers:R,updateContainerWidth:ae}=uT(T,b,H),J=Pe=>{if(r.taskListColumnRenderMode==="declarative")return y(Pe,F.value);if(!Pe.width)return{};let rt;if(typeof Pe.width=="string"&&Pe.width.includes("%")){const Te=F.value||0;if(Te>0){const Et=parseFloat(Pe.width)/100;rt=`${Math.floor(Te*Et)}px`}else return{}}else rt=`${Pe.width}px`;return{flex:`0 0 ${rt}`,minWidth:rt,maxWidth:rt}},{handleTaskRowHover:k,handleTaskRowDoubleClick:O,handleTaskListScroll:N,handleTaskRowContextMenu:Z,registerEventListeners:se,unregisterEventListeners:ge}=hT({tasks:x,hoveredTaskId:L,isSplitterDragging:T,taskListScrollTop:b,taskListBodyRef:X,updateContainerWidth:ae,enableParentTaskAutoSchedule:a.computed(()=>r.enableParentTaskAutoSchedule??!0)});function fe(Pe){Pe.collapsed=!Pe.collapsed,s("task-collapse-change",Pe)}const Ae=Pe=>{s("start-timer",Pe)},Fe=Pe=>{s("stop-timer",Pe)},be=Pe=>{s("add-predecessor",Pe)},Ke=Pe=>{s("add-successor",Pe)},Xe=(Pe,rt)=>{s("delete",Pe,rt)},xe=Pe=>{const{draggedTask:rt,targetTask:Te,position:Et}=Pe;r.tasks&&s("task-row-moved",{draggedTask:rt,targetTask:Te,position:Et,oldParent:null,newParent:null})},{startDrag:te,handleDragOver:lt}=AT({enabled:r.enableTaskRowMove??!1,onDrop:(Pe,rt,Te)=>{xe({draggedTask:Pe,targetTask:rt,position:Te})}});return a.onMounted(async()=>{M(),se(),Tp(r.tasks,!(r.enableParentTaskAutoSchedule??!0))}),a.onUnmounted(()=>{R(),ge()}),t({getHeaderScrollWidth:()=>{var Te;const Pe=(Te=oe.value)==null?void 0:Te.querySelector(".task-list-header");if(!Pe)return null;const rt=Pe.scrollWidth;return rt>0?rt:null}}),(Pe,rt)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"taskListRef",ref:oe,class:"task-list"},[a.createElementVNode("div",{ref_key:"taskListBodyRef",ref:X,class:"task-list-body",onScroll:rt[2]||(rt[2]=(...Te)=>a.unref(N)&&a.unref(N)(...Te))},[a.createElementVNode("div",gT,[n.taskListColumnRenderMode==="declarative"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(w.value,(Te,Et)=>(a.openBlock(),a.createElementBlock("div",{key:Et,class:a.normalizeClass(["col",[Te.cssClass,{"col-fixed":Et===0||Te.fixed==="left"||Te.fixed===!0,"col-fixed-right":Te.fixed==="right"}]]),style:a.normalizeStyle({...J(Te),justifyContent:Te.align==="center"?"center":Te.align==="right"?"flex-end":"flex-start",textAlign:Te.align||"left",...Et===0&&!Te.fixed?{position:"sticky",left:"0px",zIndex:20,backgroundColor:"var(--gantt-bg-secondary)"}:Q(Te)})},[Te.headerSlot?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Te.headerSlot),{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(Te.label),1)],64))],6))),128)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",{class:"col col-name col-fixed",style:a.normalizeStyle(S())},[a.unref(u)["header-name"]?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(u)["header-name"]),{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(A)==="resource"?a.unref(h).resourceName||"资源名称":a.unref(h).taskName||"任务名称"),1)],64))],4),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.value,Te=>(a.openBlock(),a.createElementBlock("div",{key:Te.key,class:a.normalizeClass(["col",[Te.cssClass||`col-${Te.key}`,{"col-fixed":Te.fixed==="left"||Te.fixed===!0,"col-fixed-right":Te.fixed==="right"}]]),style:a.normalizeStyle({...J(Te),...Q(Te)})},[a.unref(u)[`header-${Te.key}`]?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(u)[`header-${Te.key}`]),{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(h)[Te.key]||Te.label),1)],64))],6))),128))],64))]),a.createElementVNode("div",pT,[a.createElementVNode("div",{class:"task-list-body-spacer",style:a.normalizeStyle({height:`${a.unref(Y)}px`})},null,4),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref($),({task:Te,level:Et,rowIndex:ot},yt,pt,Oe)=>{var z;const it=[Te.id,Te.name,Te.collapsed,L.value===Te.id,Te.startDate,Te.endDate,Te.progress];if(Oe&&Oe.el&&Oe.key===Te.id&&a.isMemoSame(Oe,it))return Oe;const W=(a.openBlock(),a.createBlock(Tb,{key:Te.id,task:Te,level:Et,"row-index":ot,"is-hovered":L.value===Te.id,"hovered-task-id":L.value,"on-hover":a.unref(k),columns:n.taskListColumnRenderMode==="declarative"?[]:E.value,"declarative-columns":n.taskListColumnRenderMode==="declarative"?w.value:void 0,"render-mode":n.taskListColumnRenderMode,"get-column-width-style":J,"disable-children-render":!0,"show-task-icon":(z=r.taskListConfig)==null?void 0:z.showTaskIcon,"enable-drag":r.enableTaskRowMove,"drag-start":a.unref(te),"drag-over":a.unref(lt),"task-list-row-class-name":r.taskListRowClassName,"task-list-row-style":r.taskListRowStyle,onToggle:fe,onDblclick:a.unref(O),onContextmenu:a.unref(Z),onStartTimer:Ae,onStopTimer:Fe,onAddPredecessor:be,onAddSuccessor:Ke,onDelete:Xe},a.createSlots({_:2},[i.value?{name:"custom-task-content",fn:a.withCtx(ye=>[a.renderSlot(Pe.$slots,"custom-task-content",a.mergeProps({ref_for:!0},ye),void 0,!0)]),key:"0"}:void 0,a.unref(o)["task-list-context-menu"]?{name:"task-list-context-menu",fn:a.withCtx(ye=>[a.renderSlot(Pe.$slots,"task-list-context-menu",a.mergeProps({ref_for:!0},ye),void 0,!0)]),key:"1"}:void 0]),1032,["task","level","row-index","is-hovered","hovered-task-id","on-hover","columns","declarative-columns","render-mode","show-task-icon","enable-drag","drag-start","drag-over","task-list-row-class-name","task-list-row-style","onDblclick","onContextmenu"]));return W.memo=it,W},rt,0),128)),a.createElementVNode("div",{class:"task-list-body-spacer",style:a.normalizeStyle({height:`${a.unref(V)}px`})},null,4)])],544)],512))}}),Iv=un(mT,[["__scopeId","data-v-2db32195"]]),Ee={HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",QUARTER:"quarter",YEAR:"year"},Gs={hour:{scale:Ee.HOUR,cellWidth:40,minCellWidth:40,maxCellWidth:120,headerLevels:2,formatters:{primary:"yyyy年MM月dd日",secondary:"HH:mm"}},day:{scale:Ee.DAY,cellWidth:30,minCellWidth:30,maxCellWidth:120,headerLevels:2,formatters:{primary:"yyyy年MM月",secondary:"dd"}},week:{scale:Ee.WEEK,cellWidth:60,minCellWidth:60,maxCellWidth:240,headerLevels:2,formatters:{primary:"yyyy年MM月",secondary:"d"}},month:{scale:Ee.MONTH,cellWidth:60,minCellWidth:60,maxCellWidth:180,headerLevels:2,formatters:{primary:"yyyy年",secondary:"MM月"}},quarter:{scale:Ee.QUARTER,cellWidth:60,minCellWidth:60,maxCellWidth:120,headerLevels:2,formatters:{primary:"yyyy年",secondary:"Q季度"}},year:{scale:Ee.YEAR,cellWidth:180,minCellWidth:180,maxCellWidth:720,headerLevels:2,formatters:{primary:"yyyy年",secondary:"上半年|下半年"}}},wT={key:0,class:"anchor-tooltip"},yT=a.defineComponent({__name:"LinkAnchor",props:{type:{},taskId:{},visible:{type:Boolean,default:!1},isDragSource:{type:Boolean,default:!1},isDragTarget:{type:Boolean,default:!1},isValidTarget:{type:Boolean,default:!0},enabled:{type:Boolean,default:!0},globalDragging:{type:Boolean,default:!1}},emits:["drag-start","drag-move","drag-end"],setup(n,{emit:t}){const e=n,r=t,s=a.inject("gantt-view-mode",{value:"task"}),o=a.ref(!1),i=a.computed(()=>s.value==="resource"?!1:e.visible||e.globalDragging||e.isDragSource||e.isDragTarget||o.value);let A=null,l=null,c=!1;function u(m){e.enabled&&(m.stopPropagation(),m.preventDefault(),c=!0,r("drag-start",{taskId:e.taskId,type:e.type,x:m.clientX,y:m.clientY}),A=y=>{c&&r("drag-move",{x:y.clientX,y:y.clientY})},l=()=>{c&&(r("drag-end",{taskId:e.taskId,type:e.type}),d())},document.addEventListener("mousemove",A),document.addEventListener("mouseup",l))}function h(){e.enabled&&(o.value=!0)}function g(){e.enabled&&(o.value=!1)}function d(){c=!1,A&&(document.removeEventListener("mousemove",A),A=null),l&&(document.removeEventListener("mouseup",l),l=null)}return a.onUnmounted(()=>{d()}),(m,y)=>n.enabled&&i.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["link-anchor",{"anchor-predecessor":n.type==="predecessor","anchor-successor":n.type==="successor","drag-source":n.isDragSource,"drag-target":n.isDragTarget,"valid-target":n.isDragTarget&&n.isValidTarget,"invalid-target":n.isDragTarget&&!n.isValidTarget,visible:i.value}]),onMousedown:u,onMouseenter:h,onMouseleave:g},[!n.isDragSource&&!n.isDragTarget&&!n.globalDragging?(a.openBlock(),a.createElementBlock("div",wT,a.toDisplayString(n.type==="predecessor"?"添加前置任务":"添加后置任务"),1)):a.createCommentVNode("",!0)],34)):a.createCommentVNode("",!0)}}),zm=un(yT,[["__scopeId","data-v-9f46aee9"]]),BT={class:"expanded-content"},bT={class:"expanded-title"},CT=["src"],kT={class:"resource-name"},ET={class:"expanded-body"},DT={class:"expanded-row"},TT={class:"info-label"},xT={class:"info-value"},ST={class:"expanded-row"},FT={class:"info-label"},LT={class:"info-value"},UT={key:0,class:"conflict-section"},IT={class:"conflict-header"},MT={class:"conflict-title"},QT={class:"total-overload"},NT={class:"conflict-list-container"},_T={class:"conflict-task-name"},RT={class:"conflict-detail"},OT={class:"conflict-label"},HT={class:"conflict-value"},PT={class:"conflict-detail"},VT={class:"conflict-label"},WT={class:"conflict-value"},KT=50,$T=a.defineComponent({__name:"TaskBarTab",props:{task:{},currentResourceId:{},resourceColor:{},resourceCapacity:{},resourceName:{},taskBarWidth:{default:void 0},taskBarLeft:{default:void 0},scrollLeft:{default:0},containerWidth:{default:0},hasConflict:{type:Boolean,default:!1},conflictTasks:{default:()=>[]},resources:{}},emits:["hover-change"],setup(n,{emit:t}){const e=n,r=t,{t:s}=_s(),o=a.ref(!1),i=a.ref(null);let A=null,l=null;const c=a.computed(()=>`${Math.round(e.resourceCapacity)}%`),u=a.computed(()=>{if(!e.taskBarWidth)return 30;const D=50,S=Math.min(2,e.taskBarWidth*.1);return Math.min(e.taskBarWidth-S,D)}),h=a.computed(()=>{if(e.taskBarLeft===void 0||e.scrollLeft===void 0)return 0;const D=e.taskBarLeft,S=e.scrollLeft;if(D>S+(e.containerWidth||0))return 0;if(D<S){const Q=S-D,T=Math.max(0,(e.taskBarWidth||0)-u.value);return Math.min(Q,T)}return 0}),g=a.computed(()=>({backgroundColor:`${e.resourceColor} !important`,width:`${u.value}px`,left:`${h.value}px`})),d=a.computed(()=>!e.resources||!e.currentResourceId?null:e.resources.find(D=>String(D.id)===String(e.currentResourceId))),m=a.computed(()=>{var D;return((D=d.value)==null?void 0:D.name)||e.resourceName||""}),y=a.computed(()=>{var D;return((D=d.value)==null?void 0:D.avatar)||null}),B=a.computed(()=>m.value.charAt(0).toUpperCase()||"R"),w=a.computed(()=>({backgroundColor:e.resourceColor,color:j(e.resourceColor)})),E=a.computed(()=>{if(!i.value)return{};const D=i.value.getBoundingClientRect(),S=window.innerHeight,Q=120,T=b.value.length*80,oe=Q+T,X=D.top,F=S-D.bottom;return X>=oe||X>F?{position:"fixed",bottom:`${S-D.top+2}px`,left:`${D.left}px`,maxHeight:`${Math.min(X-10,400)}px`,backgroundColor:e.resourceColor}:{position:"fixed",top:`${D.bottom+2}px`,left:`${D.left}px`,maxHeight:`${Math.min(F-10,400)}px`,backgroundColor:e.resourceColor}}),x=a.computed(()=>{if(!e.task.startDate||!e.task.endDate)return"-";const D=new Date(e.task.startDate),S=Ka(e.task.endDate,new Date(e.task.endDate)),Q=T=>{const oe=T.getFullYear(),X=String(T.getMonth()+1).padStart(2,"0"),F=String(T.getDate()).padStart(2,"0");return`${oe}/${X}/${F}`};return`${Q(D)} ~ ${Q(S)}`}),b=a.computed(()=>{if(!e.hasConflict||!e.conflictTasks||e.conflictTasks.length===0)return[];const D=e.task;if(!D.startDate||!D.endDate)return[];const S=new Date(D.startDate).getTime(),Q=new Date(D.endDate).getTime();return e.conflictTasks.map(T=>{if(!T.startDate||!T.endDate)return null;const oe=new Date(T.startDate).getTime(),X=new Date(T.endDate).getTime();let F=100;if(T.resources&&Array.isArray(T.resources)){const O=T.resources.find(N=>String(N.id)===String(e.currentResourceId));O&&O.capacity!==void 0&&(F=Math.max(20,Math.min(100,O.capacity)))}const M=Ka(D.endDate,new Date(Q)).getTime(),R=Ka(T.endDate,new Date(X)).getTime(),ae=Math.max(S,oe),J=Math.min(M,R),k=O=>{const N=new Date(O);return`${N.getFullYear()}/${N.getMonth()+1}/${N.getDate()}`};return{taskName:T.name,overlapStart:k(ae),overlapEnd:k(J),conflictPercent:F}}).filter(Boolean)}),H=a.computed(()=>{if(!e.hasConflict||!e.conflictTasks||e.conflictTasks.length===0)return 0;const D=e.task;if(!D.startDate||!D.endDate)return 0;const S=e.resourceCapacity||100,Q=1440*60*1e3,T=F=>Ka(F.endDate,new Date(F.endDate)).getTime()+Q;let oe=S;const X=[D,...e.conflictTasks];return X.forEach((F,M)=>{if(!F.startDate||!F.endDate)return;const R=new Date(F.startDate).getTime(),ae=T(F);X.forEach((J,k)=>{if(M>=k||!J.startDate||!J.endDate)return;const O=new Date(J.startDate).getTime(),N=T(J);if(R<N&&O<ae){const Z=Math.max(R,O),se=Math.min(ae,N);let ge=0;X.forEach(fe=>{if(!fe.startDate||!fe.endDate)return;const Ae=new Date(fe.startDate).getTime(),Fe=T(fe);if(Ae<se&&Fe>Z){let be=100;if(fe.resources&&Array.isArray(fe.resources)){const Ke=fe.resources.find(Xe=>String(Xe.id)===String(e.currentResourceId));Ke&&Ke.capacity!==void 0&&(be=Ke.capacity)}ge+=be}}),oe=Math.max(oe,ge)}})}),Math.max(0,oe-100)}),$=()=>{A!==null&&(clearTimeout(A),A=null),l!==null&&clearTimeout(l),l=window.setTimeout(()=>{o.value=!0,r("hover-change",!0),l=null},KT)},Y=()=>{l!==null&&(clearTimeout(l),l=null),A=window.setTimeout(()=>{o.value=!1,r("hover-change",!1),A=null},100)},V=()=>{A!==null&&(clearTimeout(A),A=null),o.value=!0},L=()=>{A=window.setTimeout(()=>{o.value=!1,r("hover-change",!1),A=null},100)},j=D=>{const S=D.replace("#",""),Q=parseInt(S.substring(0,2),16),T=parseInt(S.substring(2,4),16),oe=parseInt(S.substring(4,6),16);return(Q*299+T*587+oe*114)/1e3>128?"#333":"#fff"};return a.onUnmounted(()=>{A!==null&&(clearTimeout(A),A=null),l!==null&&(clearTimeout(l),l=null),o.value=!1,r("hover-change",!1)}),(D,S)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"tabElement",ref:i,class:"task-bar-tab",style:a.normalizeStyle(g.value),onMouseenter:$,onMouseleave:Y,onClick:S[0]||(S[0]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[o.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"tab-expanded",style:a.normalizeStyle(E.value),onMouseenter:V,onMouseleave:L},[a.createElementVNode("div",BT,[a.createElementVNode("div",bT,[y.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"resource-avatar",style:a.normalizeStyle(w.value)},[a.createElementVNode("img",{src:y.value,alt:"avatar",class:"avatar-img"},null,8,CT)],4)):(a.openBlock(),a.createElementBlock("div",{key:1,class:"resource-avatar",style:a.normalizeStyle(w.value)},a.toDisplayString(B.value),5)),a.createElementVNode("span",kT,a.toDisplayString(m.value),1)]),a.createElementVNode("div",ET,[a.createElementVNode("div",DT,[a.createElementVNode("span",TT,a.toDisplayString(a.unref(s).resourceView.capacity),1),a.createElementVNode("span",xT,a.toDisplayString(c.value),1)]),a.createElementVNode("div",ST,[a.createElementVNode("span",FT,a.toDisplayString(a.unref(s).resourceView.duration),1),a.createElementVNode("span",LT,a.toDisplayString(x.value),1)]),n.hasConflict&&b.value.length>0?(a.openBlock(),a.createElementBlock("div",UT,[a.createElementVNode("div",IT,[S[1]||(S[1]=a.createElementVNode("svg",{class:"warning-icon",viewBox:"0 0 24 24",width:"14",height:"14"},[a.createElementVNode("path",{fill:"currentColor",d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})],-1)),a.createElementVNode("span",MT,a.toDisplayString(a.unref(s).resourceView.overloadWarning),1),a.createElementVNode("span",QT,"▲ "+a.toDisplayString(H.value)+"%",1)]),a.createElementVNode("div",NT,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,(Q,T)=>(a.openBlock(),a.createElementBlock("div",{key:T,class:"conflict-item"},[a.createElementVNode("div",_T,a.toDisplayString(a.unref(s).resourceView.conflictWith)+"《"+a.toDisplayString(Q?Q.taskName:"")+"》"+a.toDisplayString(a.unref(s).resourceView.conflictSuffix),1),a.createElementVNode("div",RT,[a.createElementVNode("span",OT,a.toDisplayString(a.unref(s).resourceView.conflictDuration)+":",1),a.createElementVNode("span",HT,a.toDisplayString(Q?Q.overlapStart:"")+" ~ "+a.toDisplayString(Q?Q.overlapEnd:""),1)]),a.createElementVNode("div",PT,[a.createElementVNode("span",VT,a.toDisplayString(a.unref(s).resourceView.capacity)+": ",1),a.createElementVNode("span",WT,a.toDisplayString(Q?Q.conflictPercent:"")+"%",1)])]))),128))])])):a.createCommentVNode("",!0)])])],36)):a.createCommentVNode("",!0)]))],36))}}),qT=un($T,[["__scopeId","data-v-5f409683"]]),jT={showAvatar:!0,showTitle:!0,showProgress:!0,dragThreshold:5,resizeHandleWidth:5,enableDragDelay:!1,dragDelayTime:150,titlePosition:"inside"},xp={type:"bezier",color:"#c0c4cc",highlightColor:"#409eff",hoverColor:"#67c23a",width:2,highlightWidth:4,style:"dotted"},YT=["data-task-id"],GT={class:"actual-progress"},zT={key:1,class:"actual-progress-badge"},XT={key:2,class:"actual-bar-trailing"},JT={key:0,class:"actual-avatars-container"},ZT={key:0,class:"avatar-text"},ex=["src","alt"],tx={key:2,class:"avatar-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rx=["innerHTML"],nx=["data-task-id"],ax={key:0,class:"parent-label-inner"},sx={key:1},ox={key:0,class:"avatar-text"},Ax=["src","alt"],ix={key:2,class:"avatar-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lx={key:1,class:"task-name"},cx={class:"tooltip-title"},ux={class:"tooltip-content"},dx={key:0,class:"tooltip-row"},fx={class:"tooltip-label"},hx={class:"tooltip-value"},gx={class:"tooltip-row"},px={class:"tooltip-label"},vx={class:"tooltip-value"},mx={class:"tooltip-row"},wx={class:"tooltip-label"},yx={class:"tooltip-value"},Bx={class:"tooltip-row"},bx={class:"tooltip-label"},Cx={class:"tooltip-value"},kx={class:"tooltip-row"},Ex={class:"tooltip-label"},Dx={class:"tooltip-value"},Tx={class:"tooltip-row"},xx={class:"tooltip-label"},Sx={class:"tooltip-value"},Fx={key:1,class:"tooltip-row tooltip-warning"},Lx={class:"tooltip-label"},Ux={class:"drag-tooltip-content"},Ix={class:"tooltip-row"},Mx={class:"tooltip-label"},Qx={class:"tooltip-value"},Nx={class:"tooltip-row"},_x={class:"tooltip-label"},Rx={class:"tooltip-value"},Ox={class:"drag-preview-content"},Xm=18,Hx=1e3,Px=100,Vx=250,Wx=a.defineComponent({inheritAttrs:!1,__name:"TaskBar",props:{task:{},rowHeight:{},dayWidth:{},startDate:{},isParent:{type:Boolean},onClick:{type:Function},rowIndex:{},scrollLeft:{},containerWidth:{},hideBubbles:{type:Boolean},timelineData:{},currentTimeScale:{},taskBarConfig:{},allowDragAndResize:{type:Boolean},showActualTaskbar:{type:Boolean},enableTaskBarTooltip:{type:Boolean},pendingTaskBackgroundColor:{},delayTaskBackgroundColor:{},completeTaskBackgroundColor:{},ongoingTaskBackgroundColor:{},isHighlighted:{type:Boolean},isPrimaryHighlight:{type:Boolean},isInHighlightMode:{type:Boolean},dragLinkMode:{},isLinkDragSource:{type:Boolean},isValidLinkTarget:{type:Boolean},isInvalidLinkTarget:{type:Boolean},allTasks:{},hasResourceConflict:{type:Boolean},conflictTasks:{},resourceAllocationPercent:{},currentResourceId:{},taskSubRow:{},rowHeights:{},resources:{},enableParentTaskAutoSchedule:{type:Boolean}},emits:["update:task","bar-mounted","click","dblclick","drag-end","resize-end","scroll-to-position","start-timer","stop-timer","add-predecessor","add-successor","delete","delete-link","context-menu","long-press","link-drag-start","link-drag-move","link-drag-end","tooltip-show","tooltip-hide"],setup(n,{emit:t}){const e=n,r=t,s=a.inject("enable-link-anchor",a.computed(()=>!0)),o=a.computed(()=>{if(e.resourceAllocationPercent!==void 0){const pe=Number(e.resourceAllocationPercent);if(Number.isFinite(pe)&&pe>0)return Math.max(0,Math.min(100,pe))}if(c.value==="resource"&&e.currentResourceId&&e.task.resources){const pe=e.task.resources.find(Le=>String(Le.id)===String(e.currentResourceId));if(pe&&pe.capacity!==void 0){const Le=Number(pe.capacity);if(Number.isFinite(Le)&&Le>=0)return Math.max(0,Math.min(100,Le))}}return 100}),i=a.computed(()=>{if(c.value==="resource"&&e.currentResourceId&&e.resources){const pe=e.resources.find(Je=>String(Je.id)===String(e.currentResourceId));return(pe==null?void 0:pe.color)||"#85ce61"}return"#85ce61"}),A=a.computed(()=>{var Le;if(!e.currentResourceId)return"";const pe=(Le=e.resources)==null?void 0:Le.find(Je=>Je.id===e.currentResourceId);return(pe==null?void 0:pe.name)||""}),l=a.useSlots(),c=a.inject("gantt-view-mode",a.ref("task")),u=a.inject("gantt-show-taskbar-tab",a.computed(()=>!0)),h=a.inject("gantt-taskbar-desc-fixed",a.computed(()=>!1)),g=a.inject("resourceRowPositions",a.computed(()=>new Map)),d=a.inject("resourceTaskLayouts",a.computed(()=>new Map)),m=a.inject("positionCache",null),y=a.inject("enable-task-bar-context-menu",a.computed(()=>!0)),B=a.inject("task-bar-context-menu-slot",a.computed(()=>!1)),w=a.inject("declarative-task-bar-context-menu",a.computed(()=>null)),E=a.inject("gantt-has-taskbar-tooltip-slot",a.computed(()=>!1)),x=a.computed(()=>!!y.value),b=a.computed(()=>y.value?!B.value:!1),H=a.computed(()=>{if(!y.value||!B.value)return!1;const pe=w.value;if((pe==null?void 0:pe.taskType)!==void 0){const Le=e.task.type||"task";return(Array.isArray(pe.taskType)?pe.taskType:[pe.taskType]).includes(Le)}return!0}),{getTranslation:$}=_s(),Y=pe=>$(pe),V=a.computed(()=>!!l["custom-task-content"]),L=a.computed(()=>({...jT,...e.taskBarConfig})),j=a.computed(()=>!!(e.task.actualStartDate||e.task.actualEndDate)),D=a.computed(()=>L.value.titlePosition!=="above"?0:c.value==="resource"?Xm:e.showActualTaskbar&&j.value?0:Xm),S=a.computed(()=>e.rowHeight-D.value),Q=pe=>{if(!pe)return null;if(pe instanceof Date)return pe;if(typeof pe=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(pe)){const[Je,Re,mt]=pe.split("-").map(Number);return new Date(Je,Re-1,mt)}if(typeof pe=="string"&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(pe)){const[Je,Re]=pe.split(" "),[mt,kt,at]=Je.split("-").map(Number),[st,Ct]=Re.split(":").map(Number);return new Date(mt,kt-1,at,st,Ct)}const Le=new Date(pe);return isNaN(Le.getTime())?null:Le},T=()=>{const pe=new Date;return new Date(pe.getFullYear(),pe.getMonth(),pe.getDate())},oe=a.ref(T());let X=null;a.onMounted(()=>{X=window.setInterval(()=>{oe.value=T()},6e4)}),a.onUnmounted(()=>{X!==null&&(clearInterval(X),X=null)});const F=pe=>{const Le=pe.getFullYear(),Je=String(pe.getMonth()+1).padStart(2,"0"),Re=String(pe.getDate()).padStart(2,"0");if(e.currentTimeScale===Ee.HOUR){const mt=String(pe.getHours()).padStart(2,"0"),kt=String(pe.getMinutes()).padStart(2,"0");return`${Le}-${Je}-${Re} ${mt}:${kt}`}return`${Le}-${Je}-${Re}`},M=(pe,Le)=>{const Je=new Date(pe);return Je.setDate(Je.getDate()+Le),Je},R=(pe,Le)=>{const Je=new Date(pe);return Je.setMinutes(Je.getMinutes()+Le),Je},ae=(pe,Le)=>Math.round((Le.getTime()-pe.getTime())/(1e3*60)),J=a.computed(()=>e.task.isEditable===!1),k=a.ref(!1),O=a.ref(!1),N=a.ref(!1),Z=a.ref(!1),se=a.ref(0),ge=a.ref(0),fe=a.ref(0),Ae=a.ref(0),Fe=a.ref(0),be=a.ref(0),Ke=a.ref(0),Xe=a.inject("isDraggingTaskBar",a.ref(!1)),xe=a.inject("isDraggingTimeline",a.ref(!1)),te=a.ref(!1),lt=a.ref({x:0,y:0}),Pe=a.ref(0),rt=a.ref(0),Te=a.ref(null),Et=a.ref(null),ot=a.ref(null),yt=a.ref(!1),pt=a.ref(!1),Oe=a.ref(!1),it=a.computed(()=>Oe.value&&c.value==="resource"?i.value:ze.value.borderColor),W=a.computed(()=>L.value.dragThreshold??5),z=a.ref(!1),ye=a.ref(null),qe=a.ref(null),ct=a.ref(!1),$e=a.ref(0),Ve=a.ref(null),Mt=a.ref(null),tt=a.ref(null),_t=a.ref(null),rr=a.ref(0),St=a.computed(()=>{var Dr,Sr;if(Mt.value&&e.currentTimeScale===Ee.QUARTER){const Yt=S.value-10,pr=D.value+(S.value-Yt-4)/2;return{left:`${Mt.value.left??0}px`,width:`${Mt.value.width??100}px`,height:`${Yt}px`,top:`${pr}px`}}const pe=((Dr=Ve.value)==null?void 0:Dr.startDate)||e.task.startDate,Le=((Sr=Ve.value)==null?void 0:Sr.endDate)||e.task.endDate,Je=mr.value,Re=e.isParent&&(e.enableParentTaskAutoSchedule??!0)&&Kt.value!==null,mt=Re&&Kt.value?Kt.value.minStart:Q(pe),kt=Re&&Kt.value?Kt.value.maxEnd:Q(Le);if(!mt&&!kt){const Yt=S.value-10,pr=D.value+(S.value-Yt-4)/2;return{left:"0px",width:"0px",height:`${Yt}px`,top:`${pr}px`}}const at=mt||kt,st=kt||mt,Ct=Je;if(!at||!st||!Ct){const Yt=S.value-10,pr=D.value+(S.value-Yt-4)/2;return{left:"0px",width:"0px",height:`${Yt}px`,top:`${pr}px`}}let Tt=0,Wt=0;if(c.value!=="resource"&&k.value&&Et.value!==null){Tt=Et.value;const Yt=Q(pe),pr=Q(Le);if(Yt&&pr){const Wr=new Date(Yt.getFullYear(),Yt.getMonth(),Yt.getDate()),wr=Ka(Le,pr).getTime()-Wr.getTime(),Br=Math.round(wr/(1e3*60*60*24));Wt=(Br===0?1:Br+1)*e.dayWidth}else Wt=e.dayWidth}else if(c.value==="resource"&&Te.value!==null)if(Tt=Te.value,e.currentTimeScale===Ee.HOUR){const Yt=Q(pe),pr=Q(Le);if(Yt&&pr){const Wr=ae(Yt,pr),Bn=e.dayWidth/1440;Wt=Math.max(4,Wr*Bn)}else Wt=e.dayWidth/24}else{const Yt=Q(pe),pr=Q(Le);if(Yt&&pr){const Wr=new Date(Yt.getFullYear(),Yt.getMonth(),Yt.getDate()),wr=Ka(Le,pr).getTime()-Wr.getTime(),Br=Math.round(wr/(1e3*60*60*24));Wt=(Br===0?1:Br+1)*e.dayWidth}else Wt=e.dayWidth}else if(e.currentTimeScale===Ee.HOUR){const Yt=new Date(Ct);Yt.setHours(0,0,0,0);let pr=at,Wr=st;const Bn=pe||e.task.startDate,wr=Le||e.task.endDate;typeof Bn=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(Bn.trim())&&(pr=new Date(at),pr.setHours(0,0,0,0)),typeof wr=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(wr.trim())&&(Wr=new Date(st),Wr.setDate(Wr.getDate()+1),Wr.setHours(0,0,0,0));const Br=ae(Yt,pr),P=ae(Yt,Wr),ue=e.dayWidth/1440;Tt=Math.max(0,Br*ue),Wt=Math.max(4,(P-Br)*ue)}else{const Yt=new Date(at.getFullYear(),at.getMonth(),at.getDate()),pr=Re&&Kt.value?Kt.value.maxEndRaw:Le,Wr=Ka(pr,st),Bn=new Date(Ct.getFullYear(),Ct.getMonth(),Ct.getDate());if(e.timelineData&&e.currentTimeScale&&(e.currentTimeScale===Ee.WEEK||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)){let wr,Br;if(m){const P=m.getPosition(Yt,e.currentTimeScale);P!==null?wr=P:wr=At(Yt,e.timelineData,e.currentTimeScale);const ue=new Date(Wr);ue.setDate(ue.getDate()+1);const ke=m.getPosition(ue,e.currentTimeScale);ke!==null?Br=ke:Br=At(ue,e.timelineData,e.currentTimeScale)}else{wr=At(Yt,e.timelineData,e.currentTimeScale);const P=new Date(Wr);P.setDate(P.getDate()+1),Br=At(P,e.timelineData,e.currentTimeScale)}Br===wr&&(Br=At(Wr,e.timelineData,e.currentTimeScale)+e.dayWidth),Tt=wr,Wt=Math.max(Br-wr,4)}else if(e.timelineData&&e.currentTimeScale===Ee.DAY){let wr,Br;if(m){const P=m.getPosition(Yt,e.currentTimeScale);P!==null?wr=P:wr=At(Yt,e.timelineData,e.currentTimeScale);const ue=new Date(Wr);ue.setDate(ue.getDate()+1);const ke=m.getPosition(ue,e.currentTimeScale);ke!==null?Br=ke:Br=At(ue,e.timelineData,e.currentTimeScale)}else{wr=At(Yt,e.timelineData,e.currentTimeScale);const P=new Date(Wr);P.setDate(P.getDate()+1),Br=At(P,e.timelineData,e.currentTimeScale)}Br===wr&&(Br=At(Wr,e.timelineData,e.currentTimeScale)+Gs.day.cellWidth),Tt=wr,Wt=Math.max(Br-wr,4)}else{const wr=Math.floor((Yt.getTime()-Bn.getTime())/864e5),Br=Wr.getTime()-Yt.getTime(),P=Math.round(Br/(1e3*60*60*24)),ue=P===0?1:P+1;Tt=wr*e.dayWidth,Wt=ue*e.dayWidth}}const zt=S.value-10;let qt=D.value+(S.value-zt-4)/2;if(c.value==="resource"&&e.taskSubRow!==void 0&&e.rowHeights&&e.rowHeights.length>0){const Yt=e.taskSubRow,pr=e.rowHeights,Bn=(pr[Yt]||51)-D.value;let wr=0;for(let Br=0;Br<Yt;Br++)wr+=pr[Br]||51;Yt===0?qt=wr+D.value+5+(Bn-5-zt-4)/2:qt=wr+D.value+(Bn-zt-4)/2}return{left:`${Tt}px`,width:`${Wt}px`,height:`${zt}px`,top:`${qt}px`}}),hr=a.computed(()=>{const pe=St.value.left;return parseFloat(pe)||0}),Vt=a.ref({left:0,top:0,width:0,height:0,timestamp:0}),Xt=a.computed(()=>Q(e.task.endDate||"")),mr=a.computed(()=>Q(e.startDate)),Kt=a.computed(()=>{var mt;if(!e.isParent||!((mt=e.task.children)!=null&&mt.length))return null;const pe=kt=>{var Tt;let at=null,st=null,Ct;for(const Wt of kt){const tr=Q(Wt.startDate),zt=Q(Wt.endDate);if(tr&&(!at||tr<at)&&(at=tr),zt&&(!st||zt>st)&&(st=zt,Ct=Wt.endDate),(Tt=Wt.children)!=null&&Tt.length){const qt=pe(Wt.children);qt.min&&(!at||qt.min<at)&&(at=qt.min),qt.max&&(!st||qt.max>st)&&(st=qt.max,Ct=qt.maxRaw)}}return{min:at,max:st,maxRaw:Ct}},{min:Le,max:Je,maxRaw:Re}=pe(e.task.children);return Le&&Je?{minStart:Le,maxEnd:Je,maxEndRaw:Re}:null}),jt=a.computed(()=>{var Je,Re;const pe=((Je=Ve.value)==null?void 0:Je.startDate)||e.task.startDate,Le=((Re=Ve.value)==null?void 0:Re.endDate)||e.task.endDate;return!!(pe||Le)}),We=a.computed(()=>{const pe=parseFloat(St.value.width);return isNaN(pe)?0:pe}),ze=a.computed(()=>{if(e.task.barColor){const at=(Tt=>{const Wt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(Tt);return Wt?{r:parseInt(Wt[1],16),g:parseInt(Wt[2],16),b:parseInt(Wt[3],16)}:{r:64,g:158,b:255}})(e.task.barColor);if(e.isParent)return{type:"custom-parent",color:e.task.barColor,bgColor:e.task.barColor,borderColor:e.task.barColor};const st=`rgb(${Math.round(255*.95+at.r*.05)}, ${Math.round(255*.95+at.g*.05)}, ${Math.round(255*.95+at.b*.05)})`,Ct=`rgb(${Math.round(255*.7+at.r*.3)}, ${Math.round(255*.7+at.g*.3)}, ${Math.round(255*.7+at.b*.3)})`;return{type:"custom",color:e.task.barColor,bgColor:st,borderColor:Ct}}if(e.isParent)return{type:"parent",color:"#409eff",bgColor:"#409eff",borderColor:"#409eff"};const pe=kt=>{const st=(Wt=>{const tr=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(Wt);return tr?{r:parseInt(tr[1],16),g:parseInt(tr[2],16),b:parseInt(tr[3],16)}:{r:64,g:158,b:255}})(kt),Ct=`rgb(${Math.round(255*.95+st.r*.05)}, ${Math.round(255*.95+st.g*.05)}, ${Math.round(255*.95+st.b*.05)})`,Tt=`rgb(${Math.round(255*.7+st.r*.3)}, ${Math.round(255*.7+st.g*.3)}, ${Math.round(255*.7+st.b*.3)})`;return{bgColor:Ct,borderColor:Tt}},Le=oe.value,Je=Xt.value,Re=e.task.progress||0,mt=e.task.actualStartDate?new Date(e.task.actualStartDate):null;if(Re>=100){const kt=e.completeTaskBackgroundColor||"#909399",at=pe(kt);return{type:"completed",color:kt,bgColor:at.bgColor,borderColor:at.borderColor}}if(Je&&Je<Le&&Re<100){const kt=e.delayTaskBackgroundColor||"#f56c6c",at=pe(kt);return{type:"delayed",color:kt,bgColor:at.bgColor,borderColor:at.borderColor}}if(mt&&Re<100&&Je&&Je>=Le){const kt=e.ongoingTaskBackgroundColor||"#e6a23c",at=pe(kt);return{type:"ongoing",color:kt,bgColor:at.bgColor,borderColor:at.borderColor}}if(!mt&&(!Je||Je>=Le)){const kt=e.pendingTaskBackgroundColor||"#409eff",at=pe(kt);return{type:"pending",color:kt,bgColor:at.bgColor,borderColor:at.borderColor}}return{type:"default",color:"#409eff",bgColor:"#ecf5ff",borderColor:"#b3d8ff"}}),ft=a.computed(()=>({type:"task-bar",task:e.task,status:ze.value,statusType:ze.value.type,isParent:e.isParent??!1,progress:e.task.progress||0,currentTimeScale:e.currentTimeScale,rowHeight:e.rowHeight,dayWidth:e.dayWidth})),Lt=a.computed(()=>{if(c.value==="resource"&&e.currentResourceId&&e.resources){const Je=e.resources.find(Re=>String(Re.id)===String(e.currentResourceId));if(Je)return Je.avatar?[Je.avatar]:Je.name?[{isText:!0,name:Je.name}]:[]}const pe=e.task.avatar,Le=e.task.assignee;return pe?Array.isArray(pe)?pe:[pe]:Le?(Array.isArray(Le)?Le:[Le]).map(Re=>({isText:!0,name:Re})):[]}),ar=a.computed(()=>(e.task.progress||0)>=100),Rt=a.computed(()=>!!e.showActualTaskbar&&S.value<30),cr=a.computed(()=>Math.max(12,Math.min(22,S.value-8))),qr=a.computed(()=>e.isInHighlightMode&&!e.isHighlighted&&!e.isPrimaryHighlight),Kr=a.computed(()=>{const pe=e.task.progress||0,Le=parseInt(St.value.width);return`${pe/100*Le}px`}),on=a.computed(()=>e.currentTimeScale===Ee.WEEK),Fr=a.computed(()=>parseFloat(St.value.width||"0")<Gs.day.cellWidth),Jr=a.computed(()=>{if(!e.showActualTaskbar||!e.task.actualStartDate||e.isParent)return null;const pe=Q(e.task.actualStartDate),Le=Q(e.task.actualEndDate),Je=Q(e.task.startDate),Re=mr.value;if(!Re)return null;const mt=pe||Je,kt=Le||(pe?T():null);if(!mt||!kt)return null;const at=Le?e.task.actualEndDate:void 0,st=Ka(at,kt);let Ct=0,Tt=100;if(e.timelineData&&e.currentTimeScale&&(e.currentTimeScale===Ee.WEEK||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)){const zt=At(mt,e.timelineData,e.currentTimeScale),qt=new Date(st);qt.setDate(qt.getDate()+1);let Dr=At(qt,e.timelineData,e.currentTimeScale);Dr===zt&&(Dr=At(st,e.timelineData,e.currentTimeScale)+e.dayWidth),Ct=zt,Tt=Math.max(Dr-zt,4)}else if(e.timelineData&&e.currentTimeScale===Ee.DAY){const zt=At(mt,e.timelineData,e.currentTimeScale),qt=new Date(st);qt.setDate(qt.getDate()+1);let Dr=At(qt,e.timelineData,e.currentTimeScale);Dr===zt&&(Dr=At(st,e.timelineData,e.currentTimeScale)+Gs.day.cellWidth),Ct=zt,Tt=Math.max(Dr-zt,4)}else{const zt=Math.floor((mt.getTime()-Re.getTime())/864e5),qt=st.getTime()-mt.getTime(),Dr=Math.round(qt/(1e3*60*60*24)),Sr=Dr===0?1:Dr+1;Ct=zt*e.dayWidth,Tt=Sr*e.dayWidth}const Wt=S.value<30?5:Math.round((S.value-10)/2),tr=D.value+(S.value-Wt)/2;return{left:`${Ct}px`,width:`${Tt}px`,height:`${Wt}px`,top:`${tr}px`}}),An=a.computed(()=>{if(!e.isParent||e.enableParentTaskAutoSchedule!==!1||!Kt.value)return null;const{minStart:pe,maxEnd:Le,maxEndRaw:Je}=Kt.value,Re=Q(e.task.startDate),mt=Q(e.task.endDate);if(!(Re&&pe<Re||mt&&Le>mt))return null;const at=mr.value;if(!at)return null;const st=new Date(pe.getFullYear(),pe.getMonth(),pe.getDate()),Ct=Ka(Je,Le),Tt=new Date(at.getFullYear(),at.getMonth(),at.getDate());let Wt=0,tr=4;if(e.timelineData&&e.currentTimeScale&&(e.currentTimeScale===Ee.WEEK||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)){const Sr=At(st,e.timelineData,e.currentTimeScale),Yt=new Date(Ct);Yt.setDate(Yt.getDate()+1);let pr=At(Yt,e.timelineData,e.currentTimeScale);pr===Sr&&(pr=At(Ct,e.timelineData,e.currentTimeScale)+e.dayWidth),Wt=Sr,tr=Math.max(pr-Sr,4)}else if(e.timelineData&&e.currentTimeScale===Ee.DAY){const Sr=At(st,e.timelineData,e.currentTimeScale),Yt=new Date(Ct);Yt.setDate(Yt.getDate()+1);let pr=At(Yt,e.timelineData,e.currentTimeScale);pr===Sr&&(pr=At(Ct,e.timelineData,e.currentTimeScale)+e.dayWidth),Wt=Sr,tr=Math.max(pr-Sr,4)}else{const Sr=Math.floor((st.getTime()-Tt.getTime())/864e5),Yt=Ct.getTime()-st.getTime(),pr=Math.round(Yt/(1e3*60*60*24)),Wr=pr===0?1:pr+1;Wt=Sr*e.dayWidth,tr=Wr*e.dayWidth}const zt=4,Dr=(e.rowHeight-15)/2-zt;return{left:`${Wt}px`,width:`${tr}px`,height:`${zt}px`,top:`${Dr}px`}}),ta=a.computed(()=>on.value&&Fr.value),ra=(pe,Le)=>{if(xe.value||e.isHighlighted||e.isPrimaryHighlight||e.allowDragAndResize===!1||ar.value||e.isParent||J.value||(pe.preventDefault(),pe.stopPropagation(),Ve.value=null,Et.value=null,z.value=!1,ct.value=!1,ye.value=Le,yt.value=!1,ot.value&&(clearTimeout(ot.value),ot.value=null),Le==="drag"&&(ot.value=window.setTimeout(()=>{!z.value&&!k.value&&!O.value&&!N.value&&(yt.value=!0,r("long-press",e.task.id)),ot.value=null},Hx)),L.value.enableDragDelay&&L.value.dragDelayTime?qe.value=window.setTimeout(()=>{ct.value=!0,qe.value=null},L.value.dragDelayTime):ct.value=!0,!document.querySelector(".timeline")||!tt.value))return;const Re=tt.value.getBoundingClientRect();$e.value=pe.clientX-Re.left,Pe.value=pe.clientX-Re.left,se.value=pe.clientX,ge.value=pe.clientY,fe.value=parseInt(St.value.left),Ae.value=parseInt(St.value.width),(Le==="resize-left"||Le==="resize-right")&&(Fe.value=pe.clientX,be.value=parseInt(St.value.width),Ke.value=parseInt(St.value.left)),window.addEventListener("timeline-auto-scroll",xn),document.addEventListener("mousemove",En),document.addEventListener("mouseup",xa)},xn=pe=>{const{scrollDelta:Le}=pe.detail;k.value?se.value-=Le:(O.value||N.value)&&(Fe.value-=Le)};let Nr=!1;function dn(){Nr||(Nr=!0,requestAnimationFrame(()=>{if(Nr=!1,!tt.value)return;const pe=Date.now();if(pe-Vt.value.timestamp<Px){r("bar-mounted",{id:e.task.id,left:Vt.value.left,top:Vt.value.top,width:Vt.value.width,height:Vt.value.height});return}const Le=tt.value.getBoundingClientRect(),Je={left:Le.left,top:Le.top,width:Le.width,height:Le.height};Vt.value={...Je,timestamp:pe},r("bar-mounted",{id:e.task.id,...Je})}))}const Gn=a.ref(!1),zn=a.ref({x:0,y:0}),ln=a.ref({startDate:"",endDate:""}),En=pe=>{if(c.value==="resource"){window.lastDragMouseY=pe.clientY;const Le=document.querySelector(".timeline-body");let Je=!1;if(Le&&k.value&&z.value&&e.currentResourceId){const Re=Le.getBoundingClientRect(),mt=pe.clientY-Re.top+Le.scrollTop,kt=String(e.currentResourceId),at=g.value.get(kt)||0,st=d.value.get(kt),Ct=(st==null?void 0:st.totalHeight)||51,Tt=at+Ct;Je=mt<at||mt>=Tt,Je?(te.value=!0,lt.value={x:pe.clientX-Pe.value,y:pe.clientY-e.rowHeight/2}):te.value=!1}}if(!(e.isHighlighted||e.isPrimaryHighlight)&&!(L.value.enableDragDelay&&!ct.value)){if(!z.value){const Le=Math.abs(pe.clientX-se.value),Je=Math.abs(pe.clientY-ge.value);if((c.value==="resource"&&ye.value==="drag"?Math.max(Le,Je):Le)<W.value)return;z.value=!0,ye.value==="drag"?k.value=!0:ye.value==="resize-left"?O.value=!0:ye.value==="resize-right"&&(N.value=!0)}if(z.value){if(window.dispatchEvent(new CustomEvent("drag-boundary-check",{detail:{mouseX:pe.clientX,mouseY:pe.clientY,taskId:e.task.id,rowIndex:e.rowIndex,isDragging:k.value||O.value||N.value,isResourceView:c.value==="resource"}})),(k.value||O.value||N.value)&&(Gn.value=!0,zn.value={x:pe.clientX+15,y:pe.clientY-60}),k.value){const Le=pe.clientX-se.value;if(c.value==="resource"){const Je=pe.clientX-Pe.value,Re=document.querySelector(".timeline-body");if(Re){const mt=Re.getBoundingClientRect(),kt=Re.scrollLeft,at=Je-mt.left+kt;if(e.currentTimeScale===Ee.HOUR){const st=e.dayWidth/1440,Ct=st*15,Tt=Math.round(Math.max(0,fe.value+Le)/Ct)*Ct;Te.value=Tt;const Wt=Math.round(Tt/st),tr=new Date(e.startDate);tr.setHours(0,0,0,0);const zt=R(tr,Wt),qt=Q(e.task.startDate)||e.startDate,Dr=Q(e.task.endDate)||e.startDate;let Sr;if(e.task.startDate&&e.task.startDate.includes(" ")||e.task.endDate&&e.task.endDate.includes(" "))Sr=ae(qt,Dr);else{const Wr=Dr.getTime()-qt.getTime();Sr=Math.max(1,Math.round(Wr/(1e3*60*60*24))+1)*24*60}const pr=R(zt,Sr);ln.value={startDate:F(zt),endDate:F(pr)},Ve.value={startDate:F(zt),endDate:F(pr)}}else{Te.value=at;let st=null;e.timelineData&&(e.currentTimeScale===Ee.DAY||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)&&(st=Ot(at,e.timelineData,e.currentTimeScale)),st||(st=M(e.startDate,at/e.dayWidth));const Ct=Q(e.task.startDate)||e.startDate,Tt=Q(e.task.endDate)||e.startDate,Wt=new Date(Ct.getFullYear(),Ct.getMonth(),Ct.getDate()),tr=new Date(Tt.getFullYear(),Tt.getMonth(),Tt.getDate()),zt=Math.round((tr.getTime()-Wt.getTime())/(1e3*60*60*24)),qt=new Date(st);qt.setDate(qt.getDate()+Math.max(0,zt)),ln.value={startDate:F(st),endDate:F(qt)},Ve.value={startDate:F(st),endDate:F(qt)}}}return}if(e.currentTimeScale===Ee.HOUR){const Je=e.dayWidth/1440,Re=Je*15,mt=Math.max(0,fe.value+Le),kt=Math.round(mt/Re)*Re,at=Math.round(kt/Je),st=new Date(e.startDate);st.setHours(0,0,0,0);const Ct=R(st,at),Tt=Q(e.task.startDate)||e.startDate,Wt=Q(e.task.endDate)||e.startDate;let tr;if(e.task.startDate&&e.task.startDate.includes(" ")||e.task.endDate&&e.task.endDate.includes(" "))tr=ae(Tt,Wt);else{const Dr=Wt.getTime()-Tt.getTime();tr=Math.max(1,Math.round(Dr/(1e3*60*60*24))+1)*24*60}const qt=R(Ct,tr);Ve.value={startDate:F(Ct),endDate:F(qt)},ln.value={startDate:F(Ct),endDate:F(qt)}}else if(e.currentTimeScale===Ee.QUARTER){const Je=Math.max(0,fe.value+Le);Mt.value={left:Je,width:Ae.value};const kt=e.dayWidth*90/90,at=Math.round(Le/kt),st=Q(e.task.startDate)||e.startDate,Ct=Q(e.task.endDate)||e.startDate,Tt=new Date(st);Tt.setDate(Tt.getDate()+at);const Wt=Ct.getTime()-st.getTime(),tr=Math.ceil(Wt/(1e3*60*60*24)),zt=new Date(Tt);zt.setDate(zt.getDate()+Math.max(0,tr)),Ve.value={startDate:F(Tt),endDate:F(zt)},ln.value={startDate:F(Tt),endDate:F(zt)}}else{const Je=Math.max(0,fe.value+Le);if(Et.value=Je,(e.currentTimeScale===Ee.DAY||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)&&e.timelineData){const Re=Ot(Je,e.timelineData,e.currentTimeScale);if(Re){const mt=Q(e.task.startDate)||e.startDate,kt=Q(e.task.endDate)||e.startDate,at=new Date(mt.getFullYear(),mt.getMonth(),mt.getDate()),st=new Date(kt.getFullYear(),kt.getMonth(),kt.getDate()),Ct=Math.round((st.getTime()-at.getTime())/(1e3*60*60*24)),Tt=new Date(Re);Tt.setDate(Tt.getDate()+Math.max(0,Ct)),Ve.value={startDate:F(Re),endDate:F(Tt)},ln.value={startDate:F(Re),endDate:F(Tt)}}}else{const Re=M(e.startDate,Je/e.dayWidth),mt=Q(e.task.startDate)||e.startDate,kt=Q(e.task.endDate)||e.startDate,at=new Date(mt.getFullYear(),mt.getMonth(),mt.getDate()),st=new Date(kt.getFullYear(),kt.getMonth(),kt.getDate()),Ct=Math.round((st.getTime()-at.getTime())/(1e3*60*60*24)),Tt=M(Re,Ct);Ve.value={startDate:F(Re),endDate:F(Tt)},ln.value={startDate:F(Re),endDate:F(Tt)}}}}else if(O.value){const Le=pe.clientX-Fe.value;if(e.currentTimeScale===Ee.HOUR){const Je=e.dayWidth/1440,Re=Je*15,mt=Math.max(0,Ke.value+Le),kt=Math.round(mt/Re)*Re,at=Math.round(kt/Je),st=new Date(e.startDate);st.setHours(0,0,0,0);const Ct=R(st,at);Ve.value={startDate:F(Ct),endDate:e.task.endDate},ln.value={startDate:F(Ct),endDate:e.task.endDate||""}}else if(e.currentTimeScale===Ee.QUARTER){const Je=Math.max(0,Ke.value+Le),Re=Math.max(10,be.value-Le);Mt.value={left:Je,width:Re};const at=e.dayWidth*90/90,st=Math.round(Le/at),Ct=Q(e.task.startDate)||e.startDate,Tt=new Date(Ct);Tt.setDate(Tt.getDate()+st),Ve.value={startDate:F(Tt),endDate:e.task.endDate},ln.value={startDate:F(Tt),endDate:e.task.endDate||""}}else{const Je=Ke.value+be.value-e.dayWidth,Re=Math.min(Je,Math.max(0,Ke.value+Le));if((e.currentTimeScale===Ee.DAY||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)&&e.timelineData){const mt=Ot(Re,e.timelineData,e.currentTimeScale);mt&&(Ve.value={startDate:F(mt),endDate:e.task.endDate},ln.value={startDate:F(mt),endDate:e.task.endDate||""})}else{const mt=M(e.startDate,Re/e.dayWidth);Ve.value={startDate:F(mt),endDate:e.task.endDate},ln.value={startDate:F(mt),endDate:e.task.endDate||""}}}}else if(N.value){const Le=pe.clientX-Fe.value;if(e.currentTimeScale===Ee.HOUR){const Je=e.dayWidth/1440,Re=Je*15,mt=Math.max(Re,be.value+Le),kt=Math.round(mt/Re)*Re,at=Math.round(kt/Je),st=Q(e.task.startDate)||e.startDate,Ct=R(st,at);Ve.value={startDate:e.task.startDate,endDate:F(Ct)},ln.value={startDate:e.task.startDate||"",endDate:F(Ct)}}else if(e.currentTimeScale===Ee.QUARTER){const Je=Math.max(10,be.value+Le);Mt.value={left:Ke.value,width:Je};const kt=e.dayWidth*90/90,at=Math.round(Le/kt),st=Q(e.task.endDate)||e.startDate,Ct=new Date(st);Ct.setDate(Ct.getDate()+at),Ve.value={startDate:e.task.startDate,endDate:F(Ct)},ln.value={startDate:e.task.startDate||"",endDate:F(Ct)}}else{const Je=Math.max(e.dayWidth,be.value+Le);if((e.currentTimeScale===Ee.DAY||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)&&e.timelineData){const Re=Ke.value+Je,mt=Ot(Re,e.timelineData,e.currentTimeScale);mt&&(Ve.value={startDate:e.task.startDate,endDate:F(M(mt,-1))},ln.value={startDate:e.task.startDate||"",endDate:F(M(mt,-1))})}else{const Re=Je/e.dayWidth,mt=M(e.startDate,Ke.value/e.dayWidth+Re-1);Ve.value={startDate:e.task.startDate,endDate:F(mt)},ln.value={startDate:e.task.startDate||"",endDate:F(mt)}}}}}}},xa=()=>{var Le,Je,Re;qe.value!==null&&(window.clearTimeout(qe.value),qe.value=null),ot.value!==null&&(clearTimeout(ot.value),ot.value=null),Gn.value=!1,Mt.value=null,window.dispatchEvent(new CustomEvent("drag-boundary-check",{detail:{mouseX:0,isDragging:!1}}));let pe=!1;if(c.value==="resource"&&k.value&&z.value&&e.currentResourceId){rt.value=((Le=window.event)==null?void 0:Le.clientX)||0;const mt=document.querySelector(".timeline-body");if(mt){const kt=mt.getBoundingClientRect(),st=(window.lastDragMouseY||0)-kt.top+mt.scrollTop,Ct=String(e.currentResourceId),Tt=g.value.get(Ct)||0,Wt=d.value.get(Ct),tr=(Wt==null?void 0:Wt.totalHeight)||51,zt=Tt+tr;pe=st<Tt||st>=zt}pe&&window.dispatchEvent(new CustomEvent("resource-taskbar-drop",{detail:{taskId:e.task.id,task:e.task,sourceRowIndex:e.rowIndex,mouseY:window.lastDragMouseY||0,calculatedStartDate:(Je=Ve.value)==null?void 0:Je.startDate,calculatedEndDate:(Re=Ve.value)==null?void 0:Re.endDate}})),te.value=!1}if(z.value&&Ve.value&&!(c.value==="resource"&&pe)){const mt={...e.task,...Ve.value};k.value?r("drag-end",mt):(O.value||N.value)&&r("resize-end",mt),r("update:task",mt),Ve.value=null,a.nextTick(()=>{dn()})}window.removeEventListener("timeline-auto-scroll",xn),(k.value||O.value||N.value)&&(Z.value=!0,setTimeout(()=>{Z.value=!1},200)),k.value=!1,O.value=!1,N.value=!1,z.value=!1,ct.value=!1,ye.value=null,Te.value=null,Et.value=null,document.removeEventListener("mousemove",En),document.removeEventListener("mouseup",xa)};let Ra=null;a.onMounted(()=>{a.nextTick(()=>{dn(),_t.value&&(Ra=new ResizeObserver(Re=>{for(const mt of Re)rr.value=mt.contentRect.width}),Ra.observe(_t.value))});const pe=Re=>{Re.detail.taskId===e.task.id&&(Ve.value=null,Te.value=null)};window.addEventListener("resource-drag-cancel",pe);const Le=()=>{a.nextTick(()=>{dn()})},Je=()=>{a.nextTick(()=>{setTimeout(()=>{dn()},10)})};window.addEventListener("timeline-scale-updated",Le),window.addEventListener("timeline-force-recalculate",Je),window.addEventListener("close-all-taskbar-menus",jr),document.addEventListener("click",wn),a.onUnmounted(()=>{Ra&&(Ra.disconnect(),Ra=null),window.removeEventListener("timeline-scale-updated",Le),window.removeEventListener("timeline-force-recalculate",Je),window.removeEventListener("close-all-taskbar-menus",jr),window.removeEventListener("resource-drag-cancel",pe),document.removeEventListener("click",wn),ot.value!==null&&(clearTimeout(ot.value),ot.value=null),na!==null&&(clearTimeout(na),na=null)})}),a.watch(()=>[e.task.startDate,e.task.endDate],()=>{a.nextTick(()=>{dn()})},{deep:!0}),a.watch(()=>[e.isHighlighted,e.isPrimaryHighlight],([pe,Le])=>{if(pe||Le){const Je=k.value||O.value||N.value;k.value=!1,O.value=!1,N.value=!1,z.value=!1,ct.value=!1,ye.value=null,Gn.value=!1,document.removeEventListener("mousemove",En),document.removeEventListener("mouseup",xa),window.removeEventListener("timeline-auto-scroll",xn),ot.value&&(clearTimeout(ot.value),ot.value=null),qe.value&&(clearTimeout(qe.value),qe.value=null),!Je&&!Z.value&&window.dispatchEvent(new CustomEvent("taskbar-highlighted",{detail:{taskId:e.task.id}}))}});let na=null;const Ss=pe=>{if(!(k.value||O.value||N.value||Z.value)){if(yt.value){yt.value=!1;return}na===null&&(na=window.setTimeout(()=>{na=null,e.onClick&&typeof e.onClick=="function"?e.onClick(e.task,pe):r("click",e.task,pe)},Vx))}},uo=pe=>{pe.stopPropagation(),pe.preventDefault(),na!==null&&(clearTimeout(na),na=null),k.value=!1,O.value=!1,N.value=!1,Ve.value=null,document.removeEventListener("mousemove",En),document.removeEventListener("mouseup",xa),r("dblclick",e.task,pe)},On=a.computed(()=>{const pe=e.scrollLeft||0,Le=e.containerWidth||0;if(h.value)return{nameLeft:"",namePosition:"",nameTop:"",progressLeft:"",progressPosition:"",progressTop:"",avatarLeft:"",avatarPosition:""};if(!pe&&!Le)return{nameLeft:"",namePosition:"",nameTop:"",progressLeft:"",progressPosition:"",progressTop:"",avatarLeft:"",avatarPosition:""};const Je=parseInt(St.value.left),Re=parseInt(St.value.width),mt=Je+Re,kt=Je+Re/2,at=pe,st=pe+Le;let Ct="",Tt="",Wt="",tr="",zt="",qt="",Dr="",Sr="";const Yt=Math.max(rr.value,40),pr=35,Wr=cr.value,Bn=Lt.value.length,wr=Bn>0?Bn===1?Wr:Wr+(Bn-1)*Math.round(Wr*.82):0,Br=Ye.value,P=Br+3,ue=Je+P,ke=Je+P+wr,Ge=ue<at&&mt>at||kt<at&&mt>at,nt=Math.max(Yt,pr),v=ke+nt+15>st&&Je<st;let I=0;if(Ge)Dr=`${at-Je+Br+3}px`,Sr="absolute",I=wr+8;else if(v){const er=Math.max(Yt,pr);Dr=`${st-Je-er-Br-3-wr-15}px`,Sr="absolute",I=-(wr+15)}const q=kt-Yt/2,re=kt+Yt/2,he=L.value.showAvatar;let Me=!1;if(he){const er=q,Ur=wr+15;Me=er<at+Ur&&mt>at}else Me=q<at&&mt>at&&kt<at;const Qe=re>st&&Je<st&&kt>st;if(Me){const er=at-Je,Ur=Ge?I:0;Ct=`${er+Br+3+Ur}px`,Tt="absolute",Wt="2px"}else Qe&&(Ct=`${st-Je-Yt-Br-10}px`,Tt="absolute",Wt="2px");const ut=kt-pr/2,Dt=kt+pr/2;let xt=!1;if(he){const er=ut,Ur=wr+15;xt=er<at+Ur&&mt>at}else xt=ut<at&&mt>at&&kt<at;const Zt=Dt>st&&Je<st&&kt>st;if(xt){const er=at-Je,Ur=Ge?I:0;tr=`${er+Br+3+Ur}px`,zt="absolute",qt="18px"}else Zt&&(tr=`${st-Je-pr-Br-3}px`,zt="absolute",qt="18px");return{nameLeft:Ct,namePosition:Tt,nameTop:Wt,progressLeft:tr,progressPosition:zt,progressTop:qt,avatarLeft:Dr,avatarPosition:Sr}}),Fs=a.computed(()=>{if(L.value.titlePosition!=="above")return{};if(h.value)return{};const pe=e.scrollLeft||0,Le=e.containerWidth||0;if(!Le)return{};const Je=Math.max(rr.value,40),Re=parseInt(St.value.left),mt=parseInt(St.value.width),kt=Re+mt,at=pe,st=pe+Le,Ct=Re+mt/2,Tt=Ct-Je/2,Wt=Ct+Je/2,tr=Tt<at&&kt>at&&Ct<at,zt=Wt>st&&Re<st&&Ct>st;return Re>=at&&kt<=st?{}:tr?{left:`${at-Re+10}px`,transform:"none"}:zt?{left:`${st-Re-10}px`,transform:"translateX(-100%)"}:{}}),Un=a.computed(()=>{const pe=e.scrollLeft||0,Le=e.containerWidth||0;if(!Le||Le<=0)return{show:!1,left:"0px",side:"left",color:"#409eff",animationType:"none"};if(sa.value||Jn.value||e.hideBubbles)return{show:!1,left:"0px",side:"left",color:ze.value.color,animationType:"none"};const Je=parseInt(St.value.left),Re=parseInt(St.value.width),mt=Je+Re,kt=pe,at=pe+Le,st=mt<=kt,Ct=Je>=at;return st?{show:!0,left:`${kt-Je-4}px`,side:"left",color:ze.value.color,animationType:"morphToSemiCircle"}:Ct?{show:!0,left:`${at-Je-8}px`,side:"right",color:ze.value.color,animationType:"morphToSemiCircle"}:{show:!1,left:"0px",side:"left",color:ze.value.color,animationType:"none"}}),Hn=a.ref(!1),aa=a.ref({x:0,y:0});let rn=null;const In=a.ref(!1),_r=a.ref(null),Xn=a.ref(!1),sa=a.ref(!0),nn=a.ref(!1),Jn=a.ref(!1),oa=pe=>{pe.stopPropagation(),pe.preventDefault();const Le=e.scrollLeft||0,Je=e.containerWidth||0;if(!Le&&!Je)return;const Re=parseInt(St.value.left),mt=parseInt(St.value.width),at=Re+mt/2-Je/2;nn.value=!0,Jn.value=!0,Hn.value=!1,r("scroll-to-position",at)};a.watch(()=>[e.scrollLeft,e.containerWidth],(pe,Le)=>{const[Je,Re]=pe,[mt,kt]=Le||[0,0],at=Je||0,st=Re||0,Ct=mt||0,Tt=kt||0;if(Math.abs(st-Tt)>1&&Tt>0){Xn.value=!0,a.nextTick(()=>{}),sa.value&&setTimeout(()=>{sa.value=!1},300),setTimeout(()=>{Xn.value=!1},500);return}sa.value&&at>=0&&st>0&&setTimeout(()=>{sa.value=!1},1e3),at!==Ct&&!Xn.value&&(In.value=!0,_r.value&&clearTimeout(_r.value),_r.value=setTimeout(()=>{In.value=!1,nn.value&&(nn.value=!1,setTimeout(()=>{Jn.value=!1},300))},200))},{immediate:!0}),a.watch(()=>e.hideBubbles,(pe,Le)=>{Le&&!pe&&a.nextTick(()=>{})}),a.watch(()=>Un.value.show,()=>{});const Er=()=>{Xn.value=!0,a.nextTick(()=>{}),setTimeout(()=>{Xn.value=!1},300)};a.onMounted(()=>{window.addEventListener("resize",Er),window.addEventListener("zoom",Er)}),a.onUnmounted(()=>{document.removeEventListener("mousemove",En),document.removeEventListener("mouseup",xa),window.removeEventListener("resize",Er),window.removeEventListener("zoom",Er)});const $a=pe=>{if(pe.stopPropagation(),r("tooltip-hide"),rn&&(window.clearTimeout(rn),rn=null),E.value){const st=pe.currentTarget;r("tooltip-show",{task:e.task,taskStatus:ze.value,resourcePercent:o.value,hasResourceConflict:e.hasResourceConflict??!1,targetRect:st.getBoundingClientRect(),parentAutoSchedule:e.isParent?{enabled:e.enableParentTaskAutoSchedule??!0,childrenRange:Kt.value,hasOverflow:!!An.value}:void 0});return}Hn.value=!0;const Le=Un.value.side==="right",Je=200,Re=document.querySelector(".gantt-panel-right"),mt=Re==null?void 0:Re.getBoundingClientRect();let kt=pe.clientX,at=pe.clientY-10;if(mt){let Ct=kt+(Le?-180:15);const Tt=mt.left,Wt=mt.right;Ct<Tt?Ct=Tt:Ct>Wt&&(Ct=Wt),Ct<Tt&&(Ct=Tt),kt=Ct;const tr=mt.top,zt=mt.bottom-Je;at<tr?at=tr:at>zt&&(at=zt)}else kt=kt+(Le?-180:15);aa.value={x:kt,y:at}},qa=pe=>{pe.stopPropagation(),E.value?r("tooltip-hide"):Hn.value=!1},ja=pe=>{pe.stopPropagation(),Hn.value=!1},ns=pe=>{if(pt.value=!0,!Oe.value&&e.enableTaskBarTooltip!==!1&&!k.value&&!O.value&&!N.value){const Le=pe.currentTarget;rn=window.setTimeout(()=>{const Je=Le.getBoundingClientRect();r("tooltip-show",{task:e.task,taskStatus:ze.value,resourcePercent:o.value,hasResourceConflict:e.hasResourceConflict??!1,targetRect:Je,mouseX:pe.clientX,mouseY:pe.clientY,parentAutoSchedule:e.isParent?{enabled:e.enableParentTaskAutoSchedule??!0,childrenRange:Kt.value,hasOverflow:!!An.value}:void 0})},300)}},Pn=()=>{pt.value=!1,rn&&(clearTimeout(rn),rn=null),r("tooltip-hide")};a.watch([k,O,N],([pe,Le,Je])=>{(pe||Le||Je)&&(r("tooltip-hide"),rn&&(clearTimeout(rn),rn=null));const Re=pe||Le||Je;Xe.value!==Re&&(Xe.value=Re)},{flush:"sync"}),a.watch(Oe,pe=>{pe&&(r("tooltip-hide"),rn&&(clearTimeout(rn),rn=null))});const Sa=pe=>{if(!pe)return Y("dateNotSet");const Le=Q(pe);if(!Le)return Y("dateNotSet");const Je=Le.getFullYear(),Re=String(Le.getMonth()+1).padStart(2,"0"),mt=String(Le.getDate()).padStart(2,"0");return`${Je}-${Re}-${mt}`},Fa=a.computed(()=>{const pe=Q(e.task.startDate),Le=Q(e.task.endDate);let Je=0;if(pe&&Le){const kt=Math.abs(Le.getTime()-pe.getTime());Je=Math.ceil(kt/(1e3*60*60*24))*8}const Re=e.task.progress||0,mt=Math.round(Je*Re/100);return{total:Je,used:mt}}),Mn=a.computed(()=>!0),Hs=()=>{const pe=On.value,Le={};return pe.nameLeft&&(Le.left=pe.nameLeft),pe.namePosition&&(Le.position=pe.namePosition),pe.nameTop&&(Le.top=pe.nameTop),Le},ps=()=>{const pe=On.value,Le={};return pe.progressLeft&&(Le.left=pe.progressLeft),pe.progressPosition&&(Le.position=pe.progressPosition),pe.progressTop&&(Le.top=pe.progressTop),Le},va=()=>{const pe=On.value,Le={};return pe.avatarLeft&&(Le.left=pe.avatarLeft),pe.avatarPosition&&(Le.position=pe.avatarPosition),Le},It=a.computed(()=>parseInt(St.value.width)-10<cr.value),ce=a.computed(()=>({width:`${Math.min(L.value.resizeHandleWidth??5,15)}px`})),Ye=a.computed(()=>Math.min(L.value.resizeHandleWidth??5,15)),At=(pe,Le,Je)=>{var mt;let Re=0;for(const kt of Le)if(Je===Ee.DAY){const at=kt.days||[];for(let st=0;st<at.length;st++){const Ct=at[st],Tt=new Date(Ct.date);if(Tt.getFullYear()===pe.getFullYear()&&Tt.getMonth()===pe.getMonth()&&Tt.getDate()===pe.getDate())return Re+st*e.dayWidth}Re+=at.length*e.dayWidth}else if(Je===Ee.QUARTER){const at=kt.quarters||[];for(const st of at){const Ct=new Date(st.startDate),Tt=new Date(st.endDate);if(pe>=Ct&&pe<=Tt){const Wt=e.dayWidth*90,tr=Math.round((Tt.getTime()-Ct.getTime())/(1e3*60*60*24))+1,zt=Wt/tr,qt=Math.round((pe.getTime()-Ct.getTime())/(1e3*60*60*24));return Re+qt*zt}Re+=e.dayWidth*90}}else if(Je===Ee.WEEK){const at=kt.weeks||[];for(const st of at){const Ct=new Date(st.weekStart),Tt=new Date(st.weekEnd);if(pe>=Ct&&pe<=Tt){const Wt=e.dayWidth*7,tr=st.subDays||[],zt=Wt/7;for(let Dr=0;Dr<tr.length;Dr++){const Sr=tr[Dr],Yt=new Date(Sr.date);if(Yt.getFullYear()===pe.getFullYear()&&Yt.getMonth()===pe.getMonth()&&Yt.getDate()===pe.getDate())return Re+Dr*zt}const qt=pe.getDay();return Re+qt*zt}Re+=e.dayWidth*7}}else if(Je===Ee.MONTH){const at=new Date(kt.startDate),st=new Date(kt.endDate);if(pe>=at&&pe<=st){const Ct=e.dayWidth*30,Tt=((mt=kt.monthData)==null?void 0:mt.dayCount)||30,Wt=Ct/Tt,tr=pe.getDate();return Re+(tr-1)*Wt}Re+=e.dayWidth*30}else if(Je===Ee.YEAR){const at=kt.halfYears||[];for(const st of at){const Ct=new Date(st.startDate),Tt=new Date(st.endDate);if(pe>=Ct&&pe<=Tt){const Wt=e.dayWidth*182.5,tr=Math.round((Tt.getTime()-Ct.getTime())/(1e3*60*60*24))+1,zt=Wt/tr,qt=Math.round((pe.getTime()-Ct.getTime())/(1e3*60*60*24));return Re+qt*zt}Re+=e.dayWidth*(365/2)}}if(Le.length>0){const kt=Le[0],at=Le[Le.length-1],st=new Date(kt.startDate),Ct=new Date(at.endDate);if(pe<st)return-Math.ceil((st.getTime()-pe.getTime())/864e5)*e.dayWidth;if(pe>Ct){const Tt=Math.ceil((pe.getTime()-Ct.getTime())/864e5);return Re+Tt*e.dayWidth}}return Re},Ot=(pe,Le,Je)=>{var mt;if(!Le)return null;let Re=0;if(Je===Ee.DAY)for(const kt of Le){const at=kt.days||[],st=at.length*e.dayWidth;if(pe>=Re&&pe<Re+st){const Ct=pe-Re,Tt=Math.floor(Ct/e.dayWidth);if(Tt>=0&&Tt<at.length)return new Date(at[Tt].date)}Re+=st}else if(Je===Ee.MONTH)for(const kt of Le){const at=e.dayWidth*30;if(pe>=Re&&pe<Re+at){const st=pe-Re,Ct=((mt=kt.monthData)==null?void 0:mt.dayCount)||30,Tt=at/Ct,Wt=Math.floor(st/Tt),tr=Math.min(Wt+1,Ct);return new Date(kt.year,kt.month-1,tr)}Re+=at}else if(Je===Ee.QUARTER)for(const kt of Le){const at=kt.quarters||[];for(const st of at){const Ct=new Date(st.startDate),Tt=new Date(st.endDate),Wt=e.dayWidth*90;if(pe>=Re&&pe<Re+Wt){const tr=pe-Re,zt=Math.ceil((Tt.getTime()-Ct.getTime())/(1e3*60*60*24)),qt=Wt/zt,Dr=Math.floor(tr/qt),Sr=new Date(Ct);return Sr.setDate(Sr.getDate()+Dr),Sr}Re+=Wt}}else if(Je===Ee.YEAR)for(const kt of Le){const at=kt.halfYears||[];for(const st of at){const Ct=new Date(st.startDate),Tt=new Date(st.endDate),Wt=e.dayWidth*(365/2);if(pe>=Re&&pe<Re+Wt){const tr=pe-Re,zt=Math.ceil((Tt.getTime()-Ct.getTime())/(1e3*60*60*24)),qt=Wt/zt,Dr=Math.floor(tr/qt),Sr=new Date(Ct);return Sr.setDate(Sr.getDate()+Dr),Sr}Re+=Wt}}return null},Ht=a.ref(!1),nr=a.ref({x:0,y:0}),Vr=a.computed(()=>e.task);function Sn(pe){if(!x.value){pe.preventDefault();return}if(e.isHighlighted||e.isPrimaryHighlight){pe.preventDefault();return}window.dispatchEvent(new CustomEvent("close-all-taskbar-menus"));const Le=e.task.type||"task";if(Le!=="task"&&Le!=="story"){pe.preventDefault(),Ht.value=!1;return}pe.preventDefault(),rn&&(clearTimeout(rn),rn=null),r("tooltip-hide"),Ht.value=!0,nr.value={x:pe.clientX,y:pe.clientY}}function jr(){Ht.value=!1}function wn(pe){if(!Ht.value)return;const Le=pe.target,Je=document.querySelector(".task-context-menu");Je&&Je.contains(Le)||jr()}const fn=(pe,Le)=>{r("delete",pe,Le),jr()},yn=pe=>{r("delete-link",pe),jr()},Ps=pe=>{r("link-drag-start",pe)},gr=pe=>{r("link-drag-move",pe)},cA=pe=>{r("link-drag-end",pe)},Co=pe=>{const Le={clientX:pe.x,clientY:pe.y};Ps({task:e.task,type:pe.type,mouseEvent:Le})},qo=pe=>{gr({mouseX:pe.x,mouseY:pe.y})},fo=pe=>{cA({task:e.task,type:pe.type})};return(pe,Le)=>{var Je;return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",a.mergeProps({class:"task-bar-wrapper"},pe.$attrs),[Jr.value&&jt.value&&!n.isParent?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["actual-bar",{highlighted:n.isHighlighted,"primary-highlight":n.isPrimaryHighlight,dimmed:qr.value}]),"data-task-id":`actual-${n.task.id}`,style:a.normalizeStyle({...Jr.value,backgroundColor:ze.value.color,filter:"brightness(1.15) saturate(0.9)",boxShadow:`0 6px 20px ${ze.value.color}60, 0 3px 10px ${ze.value.color}40`})},[Rt.value?(a.openBlock(),a.createElementBlock("span",zT,a.toDisplayString(n.task.progress||0)+"%",1)):(a.openBlock(),a.createElementBlock("div",{key:0,class:"actual-bar-content",style:a.normalizeStyle(n.rowHeight<40?{fontSize:"9px"}:{})},[a.createElementVNode("span",GT,a.toDisplayString(n.task.progress||0)+"%",1)],4)),Rt.value?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",XT,[L.value.showAvatar&&a.unref(c)!=="resource"&&Lt.value.length>0?(a.openBlock(),a.createElementBlock("div",JT,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Lt.value,(Re,mt)=>(a.openBlock(),a.createElementBlock("div",{key:mt,class:a.normalizeClass(["actual-task-avatar",{"avatar-default":!Re||typeof Re=="object"&&!Re.isText&&!Re}]),style:a.normalizeStyle({zIndex:mt+1,marginLeft:mt>0?"-8px":"0"})},[Re&&typeof Re=="object"&&Re.isText?(a.openBlock(),a.createElementBlock("span",ZT,a.toDisplayString(Re.name.charAt(0).toUpperCase()),1)):Re&&typeof Re=="string"?(a.openBlock(),a.createElementBlock("img",{key:1,src:Re,alt:`avatar-${mt}`},null,8,ex)):(a.openBlock(),a.createElementBlock("svg",tx,[...Le[8]||(Le[8]=[a.createElementVNode("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",fill:"currentColor"},null,-1)])]))],6))),128))])):a.createCommentVNode("",!0),L.value.showTitle?(a.openBlock(),a.createElementBlock("div",{key:1,class:"actual-task-name-wrapper",style:a.normalizeStyle({fontSize:n.rowHeight<40?"10px":"12px",color:ze.value.color})},[V.value?a.renderSlot(pe.$slots,"custom-task-content",a.normalizeProps(a.mergeProps({key:0},ft.value)),void 0,!0):(a.openBlock(),a.createElementBlock("div",{key:1,class:"actual-task-name",innerHTML:n.task.name},null,8,rx))],4)):a.createCommentVNode("",!0)]))],14,YT)):a.createCommentVNode("",!0),An.value?(a.openBlock(),a.createElementBlock("div",{key:1,class:"parent-overflow-bar",style:a.normalizeStyle({...An.value,backgroundColor:"#f56c6c"})},null,4)):a.createCommentVNode("",!0),jt.value?(a.openBlock(),a.createElementBlock("div",{key:2,ref_key:"barRef",ref:tt,class:a.normalizeClass(["task-bar",{dragging:k.value,resizing:O.value||N.value,completed:ar.value,"parent-task":n.isParent,"week-view":on.value,"short-task-bar":Fr.value,"overflow-effect":ta.value,highlighted:n.isHighlighted,"primary-highlight":n.isPrimaryHighlight,dimmed:qr.value,"has-actual":n.showActualTaskbar&&j.value,"resource-conflict":e.hasResourceConflict,"resource-view":a.unref(c)==="resource","has-bubble":Un.value.show}]),"data-task-id":n.task.id,style:a.normalizeStyle({...St.value,backgroundColor:n.showActualTaskbar&&j.value&&pt.value?"transparent":ze.value.bgColor,borderColor:it.value,...a.unref(c)==="resource"&&n.currentResourceId?{borderTopWidth:"2px",borderTopStyle:"solid",borderTopColor:i.value}:{},color:ze.value.color,cursor:ar.value||n.isParent?"default":"move","--row-height":`${n.rowHeight}px`,"--handle-width":`${Ye.value}px`,"--parent-color":ze.value.color,"--allocation-capacity":Number.isFinite(o.value)?o.value/100:1,"--task-bar-bg-color":ze.value.bgColor,"--task-bar-border-color":it.value,boxShadow:n.isParent?`0 4px 16px ${ze.value.color}40, 0 2px 8px ${ze.value.color}26`:`0 4px 16px ${ze.value.color}40, 0 2px 8px ${ze.value.color}26`}),onClick:Ss,onContextmenu:Sn,onDblclick:uo,onMouseenter:ns,onMouseleave:Pn},[n.isParent&&L.value.titlePosition!=="above"?(a.openBlock(),a.createElementBlock("div",ax,[V.value?a.renderSlot(pe.$slots,"custom-task-content",a.normalizeProps(a.mergeProps({key:0},ft.value)),void 0,!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(n.task.name)+" ("+a.toDisplayString(n.task.progress||0)+"%) ",1)],64))])):a.createCommentVNode("",!0),L.value.showTitle&&L.value.titlePosition==="above"&&!(n.showActualTaskbar&&j.value)?(a.openBlock(),a.createElementBlock("div",{key:1,class:"task-title-above",style:a.normalizeStyle(Fs.value)},[V.value?a.renderSlot(pe.$slots,"custom-task-content",a.normalizeProps(a.mergeProps({key:0},ft.value)),void 0,!0):(a.openBlock(),a.createElementBlock("span",sx,a.toDisplayString(n.task.name)+a.toDisplayString(n.isParent?` (${n.task.progress||0}%)`:""),1))],4)):a.createCommentVNode("",!0),!n.isParent&&n.task.progress&&n.task.progress>0?(a.openBlock(),a.createElementBlock("div",{key:2,class:"progress-bar",style:a.normalizeStyle({width:Kr.value,backgroundColor:ze.value.color})},null,4)):a.createCommentVNode("",!0),a.unref(u)&&a.unref(c)==="resource"&&!n.isParent&&n.currentResourceId?(a.openBlock(),a.createBlock(qT,{key:`tab-${n.task.id}-${n.currentResourceId}`,task:n.task,"current-resource-id":n.currentResourceId,"resource-color":i.value,"resource-capacity":o.value,"resource-name":A.value,"task-bar-width":We.value,"task-bar-left":hr.value,"scroll-left":n.scrollLeft||0,"container-width":n.containerWidth||0,"has-conflict":n.hasResourceConflict,"conflict-tasks":n.conflictTasks,resources:n.resources,onHoverChange:Le[0]||(Le[0]=Re=>Oe.value=Re)},null,8,["task","current-resource-id","resource-color","resource-capacity","resource-name","task-bar-width","task-bar-left","scroll-left","container-width","has-conflict","conflict-tasks","resources"])):a.createCommentVNode("",!0),!ar.value&&!n.isParent&&!J.value&&e.allowDragAndResize!==!1&&!n.isHighlighted&&!n.isPrimaryHighlight?(a.openBlock(),a.createElementBlock("div",{key:4,class:"resize-handle resize-handle-left",style:a.normalizeStyle(ce.value),onMousedown:Le[1]||(Le[1]=Re=>ra(Re,"resize-left"))},null,36)):a.createCommentVNode("",!0),n.isParent?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:5,class:"task-bar-content",style:a.normalizeStyle({cursor:J.value||e.allowDragAndResize===!1||n.isHighlighted||n.isPrimaryHighlight?"grab":"move",...n.rowHeight<40?{flexDirection:"row",gap:"10px",alignItems:"center"}:{}}),onMousedown:Le[2]||(Le[2]=Re=>{n.isHighlighted||n.isPrimaryHighlight||J.value||e.allowDragAndResize===!1||ra(Re,"drag")})},[L.value.showAvatar&&a.unref(c)!=="resource"&&!(n.showActualTaskbar&&j.value)&&Lt.value.length>0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["task-avatars-container",{"avatar-outside":It.value}]),style:a.normalizeStyle(va())},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Lt.value,(Re,mt)=>(a.openBlock(),a.createElementBlock("div",{key:mt,class:a.normalizeClass(["task-avatar",{"avatar-default":!Re||typeof Re=="object"&&!Re.isText&&!Re}]),style:a.normalizeStyle({zIndex:mt+1,width:`${cr.value}px`,height:`${cr.value}px`,marginLeft:mt>0?`-${Math.round(cr.value*.36)}px`:"0"})},[Re&&typeof Re=="object"&&Re.isText?(a.openBlock(),a.createElementBlock("span",ox,a.toDisplayString(Re.name.charAt(0).toUpperCase()),1)):Re&&typeof Re=="string"?(a.openBlock(),a.createElementBlock("img",{key:1,src:Re,alt:`avatar-${mt}`},null,8,Ax)):(a.openBlock(),a.createElementBlock("svg",ix,[...Le[9]||(Le[9]=[a.createElementVNode("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",fill:"currentColor"},null,-1)])]))],6))),128))],6)):a.createCommentVNode("",!0),L.value.showTitle&&!(n.showActualTaskbar&&j.value)&&L.value.titlePosition!=="above"?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"taskBarNameRef",ref:_t,style:a.normalizeStyle({...Hs(),...n.rowHeight<40?{lineHeight:"1",fontSize:"10px"}:{}})},[V.value?a.renderSlot(pe.$slots,"custom-task-content",a.normalizeProps(a.mergeProps({key:0},ft.value)),void 0,!0):(a.openBlock(),a.createElementBlock("div",lx,a.toDisplayString(n.task.name),1))],4)):a.createCommentVNode("",!0),L.value.showProgress&&Mn.value&&!(n.showActualTaskbar&&j.value)?(a.openBlock(),a.createElementBlock("div",{key:2,class:"task-progress",style:a.normalizeStyle({...ps(),...n.rowHeight<40?{lineHeight:"1",fontSize:"9px"}:{}})},a.toDisplayString(n.task.progress||0)+"% ",5)):a.createCommentVNode("",!0)],36)),!ar.value&&!n.isParent&&!J.value&&e.allowDragAndResize!==!1&&!n.isHighlighted&&!n.isPrimaryHighlight?(a.openBlock(),a.createElementBlock("div",{key:6,class:"resize-handle resize-handle-right",style:a.normalizeStyle(ce.value),onMousedown:Le[3]||(Le[3]=Re=>ra(Re,"resize-right"))},null,36)):a.createCommentVNode("",!0),a.unref(s)&&!n.isParent&&!n.isInHighlightMode?(a.openBlock(),a.createBlock(zm,{key:7,type:"predecessor","task-id":n.task.id,visible:pt.value,"is-drag-source":n.isLinkDragSource&&n.dragLinkMode==="predecessor","is-drag-target":n.isValidLinkTarget||n.isInvalidLinkTarget,"is-valid-target":n.isValidLinkTarget,"global-dragging":!!n.dragLinkMode,onDragStart:Co,onDragMove:qo,onDragEnd:fo},null,8,["task-id","visible","is-drag-source","is-drag-target","is-valid-target","global-dragging"])):a.createCommentVNode("",!0),a.unref(s)&&!n.isParent&&!n.isInHighlightMode?(a.openBlock(),a.createBlock(zm,{key:8,type:"successor","task-id":n.task.id,visible:pt.value,"is-drag-source":n.isLinkDragSource&&n.dragLinkMode==="successor","is-drag-target":n.isValidLinkTarget||n.isInvalidLinkTarget,"is-valid-target":n.isValidLinkTarget,"global-dragging":!!n.dragLinkMode,onDragStart:Co,onDragMove:qo,onDragEnd:fo},null,8,["task-id","visible","is-drag-source","is-drag-target","is-valid-target","global-dragging"])):a.createCommentVNode("",!0),Un.value.show&&!n.isParent?(a.openBlock(),a.createElementBlock("div",{key:9,class:a.normalizeClass(["bubble-indicator",[`bubble-${Un.value.side}`,`bubble-animation-${Un.value.animationType}`]]),style:a.normalizeStyle({left:Un.value.left,backgroundColor:Un.value.color,borderColor:Un.value.color}),onMouseenter:a.withModifiers($a,["stop"]),onMouseleave:a.withModifiers(qa,["stop"]),onMousedown:a.withModifiers(ja,["stop"]),onClick:a.withModifiers(oa,["stop"])},null,38)):a.createCommentVNode("",!0),b.value?(a.openBlock(),a.createBlock(Eb,{key:10,visible:Ht.value,task:Vr.value,position:nr.value,"all-tasks":n.allTasks,onClose:jr,onStartTimer:Le[4]||(Le[4]=Re=>pe.$emit("start-timer",e.task)),onStopTimer:Le[5]||(Le[5]=Re=>pe.$emit("stop-timer",e.task)),onAddPredecessor:Le[6]||(Le[6]=Re=>pe.$emit("add-predecessor",e.task)),onAddSuccessor:Le[7]||(Le[7]=Re=>pe.$emit("add-successor",e.task)),onDelete:fn,onDeleteLink:yn},null,8,["visible","task","position","all-tasks"])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[H.value&&Ht.value&&((Je=a.unref(w))!=null&&Je.defaultSlot)?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-context-menu-wrapper",style:a.normalizeStyle({position:"fixed",left:`${nr.value.x}px`,top:`${nr.value.y}px`,zIndex:"var(--gantt-z-overlay)"})},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(w).defaultSlot),{row:Vr.value,$index:e.rowIndex??-1},null,8,["row","$index"]))],4)):a.createCommentVNode("",!0)]))],46,nx)):a.createCommentVNode("",!0)],16),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[Hn.value&&!Oe.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"task-tooltip",style:a.normalizeStyle({left:`${aa.value.x}px`,top:`${aa.value.y}px`})},[Le[10]||(Le[10]=a.createElementVNode("div",{class:"tooltip-arrow"},null,-1)),a.createElementVNode("div",cx,a.toDisplayString(n.task.name),1),a.createElementVNode("div",ux,[a.unref(c)==="resource"&&o.value<100?(a.openBlock(),a.createElementBlock("div",dx,[a.createElementVNode("span",fx,a.toDisplayString(Y("resourceView.capacity")||"利用率")+":",1),a.createElementVNode("span",hx,a.toDisplayString(o.value)+"%",1)])):a.createCommentVNode("",!0),a.createElementVNode("div",gx,[a.createElementVNode("span",px,a.toDisplayString(Y("startDate"))+":",1),a.createElementVNode("span",vx,a.toDisplayString(Sa(n.task.startDate)),1)]),a.createElementVNode("div",mx,[a.createElementVNode("span",wx,a.toDisplayString(Y("endDate"))+":",1),a.createElementVNode("span",yx,a.toDisplayString(Sa(n.task.endDate)),1)]),a.createElementVNode("div",Bx,[a.createElementVNode("span",bx,a.toDisplayString(Y("estimatedHours"))+":",1),a.createElementVNode("span",Cx,a.toDisplayString(Fa.value.total)+"h",1)]),a.createElementVNode("div",kx,[a.createElementVNode("span",Ex,a.toDisplayString(Y("actualHours"))+":",1),a.createElementVNode("span",Dx,a.toDisplayString(Fa.value.used)+"h",1)]),a.createElementVNode("div",Tx,[a.createElementVNode("span",xx,a.toDisplayString(Y("progress"))+":",1),a.createElementVNode("span",Sx,a.toDisplayString(n.task.progress||0)+"%",1)]),e.hasResourceConflict?(a.openBlock(),a.createElementBlock("div",Fx,[a.createElementVNode("span",Lx,"⚠️ "+a.toDisplayString(Y("resourceView.overloaded")||"资源超负荷"),1)])):a.createCommentVNode("",!0)])],4)):a.createCommentVNode("",!0)])),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[Gn.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"drag-tooltip",style:a.normalizeStyle({left:`${zn.value.x}px`,top:`${zn.value.y}px`})},[a.createElementVNode("div",Ux,[a.createElementVNode("div",Ix,[a.createElementVNode("span",Mx,a.toDisplayString(Y("startDate"))+":",1),a.createElementVNode("span",Qx,a.toDisplayString(Sa(ln.value.startDate)),1)]),a.createElementVNode("div",Nx,[a.createElementVNode("span",_x,a.toDisplayString(Y("endDate"))+":",1),a.createElementVNode("span",Rx,a.toDisplayString(Sa(ln.value.endDate)),1)])])],4)):a.createCommentVNode("",!0)])),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[te.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"drag-preview",style:a.normalizeStyle({left:`${lt.value.x}px`,top:`${lt.value.y}px`,width:St.value.width,height:St.value.height,backgroundColor:ze.value.color,borderColor:ze.value.borderColor})},[a.createElementVNode("div",Ox,a.toDisplayString(n.task.name),1)],4)):a.createCommentVNode("",!0)]))],64)}}}),Sp=un(Wx,[["__scopeId","data-v-45b1eadb"]]),Kx=["title"],$x={key:0,transform:"rotate(45 12 12)"},qx=["fill","stroke"],jx={key:1},Yx={key:2,transform:"rotate(45 12 12)"},Gx=["fill","stroke"],zx=a.defineComponent({__name:"MilestonePoint",props:{date:{},milestone:{},task:{},name:{},rowHeight:{},dayWidth:{},startDate:{},timelineStart:{},timelineEnd:{},labelPosition:{},scrollLeft:{},containerWidth:{},milestoneId:{},otherMilestones:{},currentTimeScale:{},timelineData:{},periodWidth:{},isInHighlightMode:{type:Boolean},allowDragAndResize:{type:Boolean}},emits:["milestone-double-click","update:milestone","drag-end","milestone-tooltip-show","milestone-tooltip-hide"],setup(n,{emit:t}){const e=n,r=t,s=a.ref(!1),o=a.ref(0),i=a.ref(0),A=a.ref(null),l=a.ref(null),c=a.ref(null),u=R=>{if(R.preventDefault(),R.stopPropagation(),!(T.value.isSticky||T.value.isPushedOut||!T.value.showIcon))if(s.value=!1,A.value=null,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",w),e.milestone)r("milestone-double-click",e.milestone);else{const ae={name:e.name||"里程碑",startDate:e.date,type:"milestone"};r("milestone-double-click",ae)}},h=(R,ae)=>{const J=new Date(R);return J.setDate(J.getDate()+ae),J},g=R=>{const ae=R.getFullYear(),J=String(R.getMonth()+1).padStart(2,"0"),k=String(R.getDate()).padStart(2,"0");return`${ae}-${J}-${k}`},d=(R,ae,J)=>{var O;if(!ae)return null;let k=0;if(J===Ee.DAY)for(const N of ae){const Z=N.days||[],se=Z.length*e.dayWidth;if(R>=k&&R<k+se){const ge=R-k,fe=Math.floor(ge/e.dayWidth);if(fe>=0&&fe<Z.length)return new Date(Z[fe].date)}k+=se}else if(J===Ee.MONTH)for(const N of ae){const Z=e.dayWidth*30;if(R>=k&&R<k+Z){const se=R-k,ge=((O=N.monthData)==null?void 0:O.dayCount)||30,fe=Z/ge,Ae=Math.floor(se/fe),Fe=Math.min(Ae+1,ge);return new Date(N.year,N.month-1,Fe)}k+=Z}else if(J===Ee.QUARTER)for(const N of ae){const Z=N.quarters||[];for(const se of Z){const ge=new Date(se.startDate),fe=new Date(se.endDate),Ae=e.dayWidth*90;if(R>=k&&R<k+Ae){const Fe=R-k,be=Math.ceil((fe.getTime()-ge.getTime())/(1e3*60*60*24)),Ke=Ae/be,Xe=Math.floor(Fe/Ke),xe=new Date(ge);return xe.setDate(xe.getDate()+Xe),xe}k+=e.dayWidth*90}}else if(J===Ee.YEAR)for(const N of ae){const Z=N.halfYears||[];for(const se of Z){const ge=new Date(se.startDate),fe=new Date(se.endDate),Ae=e.dayWidth*(365/2);if(R>=k&&R<k+Ae){const Fe=R-k,be=Math.round((fe.getTime()-ge.getTime())/(1e3*60*60*24))+1,Ke=Ae/be,Xe=Math.floor(Fe/Ke),xe=new Date(ge);return xe.setDate(xe.getDate()+Xe),xe}k+=Ae}}return null},m=R=>{e.allowDragAndResize===!1||T.value.isSticky||T.value.isPushedOut||!T.value.showIcon||(R.preventDefault(),R.stopPropagation(),!document.querySelector(".timeline"))||(o.value=R.clientX,i.value=parseInt($.value.left),A.value=null,window.addEventListener("timeline-auto-scroll",y),document.addEventListener("mousemove",B),document.addEventListener("mouseup",w))},y=R=>{const{scrollDelta:ae}=R.detail;s.value&&(o.value-=ae)},B=R=>{window.dispatchEvent(new CustomEvent("drag-boundary-check",{detail:{mouseX:R.clientX,isDragging:s.value}}));const ae=R.clientX-o.value;if(Math.abs(ae)>3){s.value=!0;const J=Math.max(0,i.value+ae);let k;if(e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.DAY||e.currentTimeScale===Ee.YEAR)if(e.timelineData&&e.currentTimeScale){const O=d(J,e.timelineData,e.currentTimeScale);O?k=O:k=h(e.startDate,J/e.dayWidth)}else k=h(e.startDate,J/e.dayWidth);else k=h(e.startDate,J/e.dayWidth);A.value={startDate:g(k)}}},w=()=>{if(window.dispatchEvent(new CustomEvent("drag-boundary-check",{detail:{mouseX:0,isDragging:!1}})),s.value&&A.value&&e.milestone){const R={...e.milestone,...A.value};r("update:milestone",R),r("drag-end",R)}window.removeEventListener("timeline-auto-scroll",y),s.value=!1,A.value=null,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",w)},E=R=>{if(R.preventDefault(),R.stopPropagation(),s.value||T.value.isPushedOut||!T.value.showIcon||T.value.isFullyVisible)return;const ae=e.containerWidth||0,J=parseInt($.value.left)+12;if(ae>0){const k=Math.max(0,J-ae/2);window.dispatchEvent(new CustomEvent("milestone-click-locate",{detail:{scrollLeft:k,smooth:!0}}))}},x=a.computed(()=>e.isInHighlightMode===!0),b=a.computed(()=>{var O;const R=((O=A.value)==null?void 0:O.startDate)||e.date,ae=WE(R);if(!e.startDate||!ae||isNaN(ae.getTime()))return null;const J=12;return e.currentTimeScale===Ee.HOUR?F(ae,e.startDate)-J:e.timelineData&&e.currentTimeScale&&(e.currentTimeScale===Ee.WEEK||e.currentTimeScale===Ee.MONTH||e.currentTimeScale===Ee.DAY||e.currentTimeScale===Ee.QUARTER||e.currentTimeScale===Ee.YEAR)?M(ae,e.timelineData,e.currentTimeScale)-J:Math.floor((ae.getTime()-e.startDate.getTime())/(1e3*60*60*24))*e.dayWidth+e.dayWidth/2-J}),H=a.computed(()=>e.currentTimeScale===Ee.YEAR||e.currentTimeScale===Ee.QUARTER?Math.min(e.rowHeight,24):e.currentTimeScale===Ee.MONTH?Math.min(e.rowHeight,20):e.currentTimeScale===Ee.WEEK?Math.min(e.rowHeight,Math.max(e.dayWidth*.8,16),24):Math.min(e.rowHeight,e.dayWidth*1.2,24)),$=a.computed(()=>{if(b.value===null)return{left:"0px",top:"0px",width:"auto",height:"auto"};const R=(j.value==="top"||j.value==="bottom")&&(S.value||!!e.name)&&T.value.showLabel,ae=24,J=16;let k;if(R){const O=(e.rowHeight-(ae+J))/2;k=j.value==="top"?O+J:O}else k=(e.rowHeight-H.value)/2;return{left:`${b.value}px`,top:`${k}px`,width:"auto",height:"auto"}}),Y=a.computed(()=>"var(--gantt-danger, #f56c6c)"),V=a.computed(()=>"var(--gantt-danger-light, #fab6b6)"),L=a.computed(()=>{var R;return((R=e.milestone)==null?void 0:R.icon)||"diamond"}),j=a.computed(()=>e.labelPosition||"right"),D=a.useSlots(),S=a.ref(!!D["custom-milestone-content"]);a.onUpdated(()=>{const R=!!D["custom-milestone-content"];S.value!==R&&(S.value=R)});const Q=a.computed(()=>({milestone:e.milestone,task:e.task??e.milestone,rowHeight:e.rowHeight,dayWidth:e.dayWidth,currentTimeScale:e.currentTimeScale,labelPosition:j.value})),T=a.computed(()=>{const R=e.scrollLeft||0,ae=e.containerWidth||0;if(!ae||ae<=0)return{showIcon:!0,showLabel:!0,isSticky:!1,stickyPosition:"none",iconLeft:"0px",isPushedOut:!1,clipPath:"none",isFullyVisible:!0};const J=(b.value??0)+12,k=R,O=R+ae,N=24,Z=J-N/2,se=J+N/2,ge=e.milestoneId,fe=Z>=k&&se<=O,Ae=e.otherMilestones||[];if(se<=k+N/2){const Fe=Ae.filter(be=>be.id!==ge&&be.stickyPosition==="left"&&be.isSticky);if(Fe.length>0){const be=(b.value??0)+12;if(Fe.some(Xe=>Xe.originalLeft>be))return{showIcon:!1,showLabel:!1,isSticky:!1,stickyPosition:"none",iconLeft:"0px",isPushedOut:!0,clipPath:"none",isFullyVisible:!1}}return{showIcon:!0,showLabel:!1,isSticky:!0,stickyPosition:"left",iconLeft:`${k-(b.value??0)-N/2}px`,isPushedOut:!1,clipPath:"polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%)",isFullyVisible:!1}}if(Z>=O-N/2){const Fe=Ae.filter(be=>be.id!==ge&&be.stickyPosition==="right"&&be.isSticky);if(Fe.length>0){const be=(b.value??0)+12;if(Fe.some(Xe=>Xe.originalLeft<be))return{showIcon:!1,showLabel:!1,isSticky:!1,stickyPosition:"none",iconLeft:"0px",isPushedOut:!0,clipPath:"none",isFullyVisible:!1}}return{showIcon:!0,showLabel:!1,isSticky:!0,stickyPosition:"right",iconLeft:`${O-(b.value??0)-N/2}px`,isPushedOut:!1,clipPath:"polygon(0% 0%, 50% 0%, 50% 100%, 0% 100%)",isFullyVisible:!1}}return{showIcon:!0,showLabel:!0,isSticky:!1,stickyPosition:"none",iconLeft:"0px",isPushedOut:!1,clipPath:"none",isFullyVisible:fe}}),oe=R=>{var O;if(!T.value.showIcon||T.value.isPushedOut)return;const ae=R.currentTarget;let J=(O=l.value)==null?void 0:O.getBoundingClientRect();if(!J){const Z=(c.value??ae).getBoundingClientRect(),se=Math.min(24,Z.width);J=new DOMRect(Z.left,Z.top,se,Z.height)}let k;T.value.isSticky?k=T.value.stickyPosition:k=J.left+J.width/2>window.innerWidth*.6?"right":"left",r("milestone-tooltip-show",{milestone:e.milestone??{name:e.name??"",startDate:e.date,type:"milestone"},milestoneColor:Y.value,targetRect:J,stickyPosition:k})},X=()=>{r("milestone-tooltip-hide")};a.onUnmounted(()=>{s.value=!1,A.value=null,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",w)});const F=(R,ae)=>{const J=new Date(R.getFullYear(),R.getMonth(),R.getDate()),k=new Date(ae.getFullYear(),ae.getMonth(),ae.getDate()),O=J.getTime()-k.getTime(),N=Math.floor(O/(1e3*60*60*24)),Z=e.dayWidth/24,se=N*e.dayWidth,fe=R.getHours()*Z,Fe=R.getMinutes()/60*Z;return se+fe+Fe},M=(R,ae,J)=>{var O;let k=0;for(const N of ae)if(J===Ee.DAY){const Z="days"in N&&N.days?N.days:[];for(let se=0;se<Z.length;se++){const ge=Z[se],fe=new Date(ge.date);if(fe.getFullYear()===R.getFullYear()&&fe.getMonth()===R.getMonth()&&fe.getDate()===R.getDate())return k+se*e.dayWidth+e.dayWidth/2}k+=Z.length*e.dayWidth}else if(J===Ee.QUARTER){const Z="quarters"in N&&N.quarters?N.quarters:[];for(const se of Z){const ge=new Date(se.startDate),fe=new Date(se.endDate);if(R>=ge&&R<=fe){const Ae=e.dayWidth*90,Fe=Math.round((fe.getTime()-ge.getTime())/(1e3*60*60*24))+1,be=Ae/Fe,Ke=Math.round((R.getTime()-ge.getTime())/(1e3*60*60*24));return k+Ke*be+be/2}k+=e.dayWidth*90}}else if(J===Ee.YEAR){const Z="halfYears"in N&&N.halfYears?N.halfYears:[];for(const se of Z){const ge=new Date(se.startDate),fe=new Date(se.endDate);if(R>=ge&&R<=fe){const Ae=e.dayWidth*182.5,Fe=Math.round((fe.getTime()-ge.getTime())/(1e3*60*60*24))+1,be=Ae/Fe,Ke=Math.round((R.getTime()-ge.getTime())/(1e3*60*60*24));return k+Ke*be+be/2}k+=e.dayWidth*(365/2)}}else if(J===Ee.WEEK){const Z="weeks"in N&&N.weeks?N.weeks:[];for(const se of Z){const ge=new Date(se.weekStart),fe=new Date(se.weekEnd);if(R>=ge&&R<=fe){const Ae=e.dayWidth*7,Fe=se.subDays||[],be=Ae/7;for(let xe=0;xe<Fe.length;xe++){const te=Fe[xe],lt=new Date(te.date);if(lt.getFullYear()===R.getFullYear()&<.getMonth()===R.getMonth()&<.getDate()===R.getDate())return k+xe*be+be/2}const Ke=R.getDay(),Xe=Ke===0?6:Ke-1;return k+Xe*be+be/2}k+=e.dayWidth*7}}else if(J===Ee.MONTH){if(!("startDate"in N)||!("endDate"in N))continue;const Z=new Date(N.startDate),se=new Date(N.endDate);if(R>=Z&&R<=se){const ge=e.dayWidth*30,fe="monthData"in N&&((O=N.monthData)==null?void 0:O.dayCount)||30,Ae=ge/fe,Fe=R.getDate();return k+(Fe-1)*Ae+Ae/2}k+=e.dayWidth*30}return k};return(R,ae)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["milestone",{dragging:s.value,"milestone-sticky":T.value.isSticky,"milestone-sticky-left":T.value.stickyPosition==="left","milestone-sticky-right":T.value.stickyPosition==="right","milestone-pushed-out":T.value.isPushedOut,dimmed:x.value,[`milestone-label-position-${j.value}`]:!0}]),style:a.normalizeStyle($.value),title:T.value.isSticky?"":e.name||"里程碑",onClick:a.withModifiers(E,["stop"]),onDblclick:a.withModifiers(u,["stop"]),onMousedown:a.withModifiers(m,["stop"]),onMouseenter:oe,onMouseleave:X},[S.value&&T.value.showIcon?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"customContentRef",ref:c,class:"milestone-custom-content-wrapper",style:a.normalizeStyle({position:T.value.isSticky?"relative":"static",left:T.value.isSticky?T.value.iconLeft:"0px",width:T.value.isSticky?"24px":"auto",overflow:T.value.isSticky?"hidden":"visible",clipPath:T.value.clipPath,zIndex:T.value.isSticky?"var(--gantt-z-milestone-sticky)":"var(--gantt-z-milestone)"})},[a.renderSlot(R.$slots,"custom-milestone-content",a.normalizeProps(a.guardReactiveProps(Q.value)),void 0,!0)],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[T.value.showIcon?(a.openBlock(),a.createElementBlock("svg",{key:0,ref_key:"iconRef",ref:l,width:24,height:24,viewBox:"0 0 24 24",style:a.normalizeStyle([{position:T.value.isSticky?"relative":"static",left:T.value.isSticky?T.value.iconLeft:"0px",clipPath:T.value.clipPath,zIndex:T.value.isSticky?"var(--gantt-z-milestone-sticky)":"var(--gantt-z-milestone)"},{cursor:"pointer"}])},[L.value==="diamond"?(a.openBlock(),a.createElementBlock("g",$x,[a.createElementVNode("rect",{x:"5",y:"5",width:"14",height:"14",rx:"3",ry:"3",fill:Y.value,stroke:V.value,"stroke-width":"2"},null,8,qx)])):L.value==="rocket"?(a.openBlock(),a.createElementBlock("g",jx,[...ae[0]||(ae[0]=[a.createElementVNode("foreignObject",{x:"0",y:"0",width:"24",height:"24"},[a.createElementVNode("div",{class:"rocket-emoji"},"🚀")],-1)])])):(a.openBlock(),a.createElementBlock("g",Yx,[a.createElementVNode("rect",{x:"5",y:"5",width:"14",height:"14",rx:"3",ry:"3",fill:Y.value,stroke:V.value,"stroke-width":"2"},null,8,Gx)]))],4)):a.createCommentVNode("",!0),e.name&&T.value.showLabel?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["milestone-label",`milestone-label-${j.value}`])},a.toDisplayString(e.name),3)):a.createCommentVNode("",!0)],64))],46,Kx))}}),Fp=un(zx,[["__scopeId","data-v-26cd65f4"]]);class Sb{constructor(){$r(this,"cachedCtx",null);$r(this,"cachedWidth",0);$r(this,"cachedHeight",0);$r(this,"isUniApp",!1);this.isUniApp=typeof window<"u"&&!!window.uni}get isUniAppEnvironment(){return this.isUniApp}getContext(t){const{canvas:e,canvasId:r,width:s,height:o,contextOptions:i}=t;if(!this.cachedCtx||this.cachedWidth!==s||this.cachedHeight!==o){let A=null;if(this.isUniApp&&window.uni)A=window.uni.createCanvasContext(r);else{if(!e)return null;const l=window.devicePixelRatio||1;if(A=e.getContext("2d",i||{alpha:!0}),!A)return null;const c=s*l,u=o*l;e.width=c,e.height=u,A.scale(l,l)}if(!A)return null;this.cachedCtx=A,this.cachedWidth=s,this.cachedHeight=o}return this.cachedCtx}clear(t,e){this.cachedCtx&&this.cachedCtx.clearRect(0,0,t,e)}draw(){var t;this.isUniApp&&((t=this.cachedCtx)!=null&&t.draw)&&this.cachedCtx.draw()}reset(){this.cachedCtx=null,this.cachedWidth=0,this.cachedHeight=0}}const Xx=a.defineComponent({__name:"GanttLinks",props:{tasks:{},taskBarPositions:{},width:{},height:{},offsetLeft:{default:0},offsetTop:{default:0},highlightedTaskId:{},highlightedTaskIds:{},hoveredTaskId:{},verticalLines:{default:()=>[]},showVerticalLines:{type:Boolean,default:!0},showLinks:{type:Boolean,default:!0},isScrolling:{type:Boolean,default:!1},linkConfig:{default:void 0}},setup(n,{expose:t}){const e=n,r=a.inject("gantt-theme",a.ref("light")),s=a.ref(null),o=new Sb;let i=null,A=!1,l=!1;const c=a.computed(()=>r.value==="dark"),u=()=>{var X;const B=o.getContext({canvas:s.value,canvasId:"gantt-link-canvas",width:e.width,height:e.height,contextOptions:{alpha:!0}});if(!B){console.error("❌ Canvas context 获取失败,可能是尺寸超限");return}const w=e.width,E=e.height;if(B.clearRect(0,0,w,E),e.showVerticalLines&&e.verticalLines&&e.verticalLines.length>0){B.save();const F=c.value?"#66b1ff":"#409eff";B.strokeStyle=F,B.lineWidth=1,B.setLineDash([4,4]),B.beginPath();for(const M of e.verticalLines){const R=M.left-e.offsetLeft;R>=0&&R<=w&&(B.moveTo(R,0),B.lineTo(R,E))}B.stroke(),B.restore()}if(!e.showLinks)return;const x=new Set;for(const F of e.tasks)x.add(F.id);const b=e.highlightedTaskId!==null,H=e.offsetLeft,$=e.offsetLeft+w,Y=e.offsetTop,V=e.offsetTop+E,L=[],j=[],D=[],S=[];for(const F of e.tasks){if(!F.predecessor||!e.taskBarPositions[F.id])continue;const M=vo(F.predecessor);for(const R of M){const ae=e.taskBarPositions[R],J=e.taskBarPositions[F.id];if(!ae||!J||!x.has(R))continue;const k=e.highlightedTaskId===R,O=e.highlightedTaskId===F.id,N=e.highlightedTaskIds.has(R),Z=e.highlightedTaskIds.has(F.id),se=N&&Z,ge=e.hoveredTaskId===R,fe=e.hoveredTaskId===F.id,Ae=ge||fe,Fe=k?-8:N?-5:0,be=O?-8:Z?-5:0,Ke=ae.left+ae.width,Xe=ae.top+ae.height/2+Fe,xe=J.left,te=J.top+J.height/2+be,lt=Math.min(Ke,xe),Pe=Math.max(Ke,xe),rt=Math.min(Xe,te),Te=Math.max(Xe,te);if(Pe<H||lt>$||Te<Y||rt>V)continue;const Et=Ke-e.offsetLeft,ot=Xe-e.offsetTop,yt=xe-e.offsetLeft,pt=te-e.offsetTop,Oe=yt-Et,it=pt-ot,W=Math.sqrt(Oe*Oe+it*it),z=ae.width,ye=ae.height,qe=Math.abs(Oe)/(W+1),ct=20;let $e=ye/2+ct;qe<.3?$e=Math.max(ye/2+25,45):qe<.6?$e=ye/2+ct:$e=z/3+10;let Ve=0;if(Math.abs(it)>0){const jt=ye/2+12,We=Math.abs(it)-ye,ze=Math.min(We*.5,100);Ve=Math.max(jt,ze)}else Ve=0;const tt=qe<.3?.4:.8,_t=Et+$e,rr=ot+(it>0?Ve:-Ve)*tt,St=yt-$e,hr=pt-(it>0?Ve:-Ve)*tt,Vt=Math.atan2(pt-hr,yt-St);let Xt;if(((X=e.linkConfig)==null?void 0:X.type)==="orthogonal")if(Math.abs(it)<1)Xt=[{x:Et,y:ot},{x:yt,y:pt}];else{const Kt=ae.top+ae.height,jt=J.top,We=J.top+J.height,ze=ae.top;let ft;jt>=Kt?ft=Kt+(jt-Kt)/2:ze>=We?ft=We+(ze-We)/2:ft=(ze+jt)/2;const Lt=ft-e.offsetTop,ar=Math.abs(Oe),Rt=Oe>20?ar/2:15,cr=Et+Rt,qr=yt-Rt;Xt=[{x:Et,y:ot},{x:cr,y:ot},{x:cr,y:Lt},{x:qr,y:Lt},{x:qr,y:pt},{x:yt,y:pt}]}const mr={x1:Et,y1:ot,x2:yt,y2:pt,c1x:_t,c1y:rr,c2x:St,c2y:hr,arrowAngle:Vt,polyPoints:Xt};se?L.push(mr):Ae?j.push(mr):b?S.push(mr):D.push(mr)}}const Q={...xp,...e.linkConfig};Q.style==="dotted"?B.setLineDash([6,4]):B.setLineDash([]);const T=(F,M)=>{switch(Q.type){case"straight":g(F,M);break;case"orthogonal":d(F,M);break;case"bezier":default:h(F,M);break}},oe=F=>{if(Q.type==="straight")return Math.atan2(F.y2-F.y1,F.x2-F.x1);if(Q.type==="orthogonal"){const M=F.polyPoints;if(M&&M.length>=2){const R=M[M.length-1],ae=M[M.length-2];return Math.atan2(R.y-ae.y,R.x-ae.x)}return 0}return F.arrowAngle};if(L.length>0){B.strokeStyle=Q.highlightColor,B.fillStyle=Q.highlightColor,B.lineWidth=Q.highlightWidth,B.globalAlpha=1,B.beginPath();for(const F of L)T(B,F);B.stroke();for(const F of L)m(B,F.x2,F.y2,oe(F))}if(j.length>0){B.strokeStyle=Q.hoverColor,B.fillStyle=Q.hoverColor,B.lineWidth=3,B.globalAlpha=1,B.beginPath();for(const F of j)T(B,F);B.stroke();for(const F of j)m(B,F.x2,F.y2,oe(F))}if(D.length>0){B.strokeStyle=Q.color,B.fillStyle=Q.color,B.lineWidth=Q.width,B.globalAlpha=1,B.beginPath();for(const F of D)T(B,F);B.stroke();for(const F of D)m(B,F.x2,F.y2,oe(F))}if(S.length>0){B.strokeStyle=Q.color,B.fillStyle=Q.color,B.lineWidth=Q.width,B.globalAlpha=.2,B.beginPath();for(const F of S)T(B,F);B.stroke();for(const F of S)m(B,F.x2,F.y2,oe(F));B.globalAlpha=1}o.draw()},h=(B,w)=>{B.moveTo(w.x1,w.y1),B.bezierCurveTo(w.c1x,w.c1y,w.c2x,w.c2y,w.x2,w.y2)},g=(B,w)=>{B.moveTo(w.x1,w.y1),B.lineTo(w.x2,w.y2)},d=(B,w)=>{const E=w.polyPoints;if(!E||E.length<2){B.moveTo(w.x1,w.y1),B.lineTo(w.x2,w.y2);return}B.moveTo(E[0].x,E[0].y);for(let x=1;x<E.length;x++)B.lineTo(E[x].x,E[x].y)},m=(B,w,E,x)=>{B.beginPath(),B.moveTo(w,E),B.lineTo(w-8*Math.cos(x)-4*Math.sin(x),E-8*Math.sin(x)+4*Math.cos(x)),B.lineTo(w-8*Math.cos(x)+4*Math.sin(x),E-8*Math.sin(x)-4*Math.cos(x)),B.closePath(),B.fill()},y=()=>{if(e.isScrolling){l=!0;return}A||(A=!0,i!==null&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{A=!1,i=null,u()}))};return a.watch(()=>e.isScrolling,B=>{!B&&l&&(l=!1,y())}),a.watch([()=>e.taskBarPositions,()=>e.tasks,()=>e.highlightedTaskId,()=>e.highlightedTaskIds,()=>e.hoveredTaskId,()=>e.width,()=>e.height,()=>e.verticalLines,()=>e.showVerticalLines,()=>e.showLinks,()=>e.offsetLeft,()=>e.offsetTop,r,()=>e.linkConfig],()=>{y()},{deep:!1}),a.onMounted(()=>{a.nextTick(()=>{u()})}),a.onUnmounted(()=>{i!==null&&(cancelAnimationFrame(i),i=null)}),t({redraw:u}),(B,w)=>(a.openBlock(),a.createElementBlock("canvas",{ref_key:"canvasRef",ref:s,"canvas-id":"gantt-link-canvas",class:"gantt-links-canvas",type:"2d",hidpi:!0,style:a.normalizeStyle({position:"absolute",left:`${n.offsetLeft}px`,top:`${n.offsetTop}px`,width:`${n.width}px`,height:`${n.height}px`,zIndex:n.highlightedTaskId!==null?"var(--gantt-z-canvas-hl) !important":"var(--gantt-z-canvas) !important",pointerEvents:"none"})},null,4))}}),Jx=un(Xx,[["__scopeId","data-v-09063495"]]),Zx=a.defineComponent({__name:"LinkDragGuide",props:{active:{type:Boolean},width:{},height:{},offsetLeft:{default:0},offsetTop:{default:0}},setup(n,{expose:t}){const e=n,r=a.ref(null),s=new Sb,o=()=>s.getContext({canvas:r.value,canvasId:"link-drag-guide-canvas",width:e.width,height:e.height,contextOptions:{alpha:!0,willReadFrequently:!1}}),i=(l,c,u,h,g=!0,d="")=>{const m=o();if(!m){console.error("[LinkDragGuide] initCanvas returned null");return}const y=e.width,B=e.height;m.clearRect(0,0,y,B);const w=l-e.offsetLeft,E=c-e.offsetTop,x=u-e.offsetLeft,b=h-e.offsetTop,H=100;if(!((w>=-H||x>=-H)&&(w<=y+H||x<=y+H)&&(E>=-H||b>=-H)&&(E<=B+H||b<=B+H)))return;m.save();const Y=g?"#67c23a":"#f56c6c";m.strokeStyle=Y,m.lineWidth=3,m.globalAlpha=.8,m.beginPath(),m.moveTo(w,E),m.lineTo(x,b),m.stroke();const V=Math.atan2(b-E,x-w),L=8,j=4;if(m.fillStyle=Y,m.globalAlpha=1,m.beginPath(),m.moveTo(x,b),m.lineTo(x-L*Math.cos(V)-j*Math.sin(V),b-L*Math.sin(V)+j*Math.cos(V)),m.lineTo(x-L*Math.cos(V)+j*Math.sin(V),b-L*Math.sin(V)-j*Math.cos(V)),m.closePath(),m.fill(),!g&&d){const D=(w+x)/2,S=(E+b)/2-10;m.font="12px Arial, sans-serif";const T=m.measureText(d).width,oe=8;m.fillStyle="rgba(0, 0, 0, 0.75)",m.fillRect(D-T/2-oe,S-12,T+oe*2,24),m.fillStyle="#ffffff",m.textAlign="center",m.textBaseline="middle",m.fillText(d,D,S)}m.restore(),s.draw()},A=()=>{s.clear(e.width,e.height)};return a.watch([()=>e.width,()=>e.height],()=>{s.reset()}),a.watch(()=>e.active,l=>{l||s.reset()}),a.onUnmounted(()=>{s.reset()}),t({draw:i,clear:A}),(l,c)=>n.active?(a.openBlock(),a.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:r,"canvas-id":"link-drag-guide-canvas",class:"link-drag-guide-canvas",type:"2d",hidpi:!0,style:a.normalizeStyle({position:"absolute",left:`${n.offsetLeft}px`,top:`${n.offsetTop}px`,width:`${n.width}px`,height:`${n.height}px`,zIndex:1002,pointerEvents:"none"})},null,4)):a.createCommentVNode("",!0)}}),e4=un(Zx,[["__scopeId","data-v-ad99e089"]]),t4=["width","height"],r4=a.defineComponent({__name:"GanttConflicts",props:{tasks:{},resourceId:{},dayWidth:{},startDate:{},height:{},width:{},topOffset:{},barTopPad:{},timelineData:{},currentTimeScale:{},taskRowMap:{},rowHeights:{},scrollLeft:{},containerWidth:{},renderLimit:{}},setup(n){const t=n,e=a.inject("isDraggingTaskBar",a.ref(!1)),r=a.inject("isSplitBarDragging",a.ref(!1)),s=a.inject("isDraggingTimeline",a.ref(!1)),o=a.inject("lastChangedTaskId",a.ref(null));let i=null;function A(){i!==null&&(typeof cancelIdleCallback<"u"?cancelIdleCallback(i):cancelAnimationFrame(i),i=null)}function l(F,M=500){A(),typeof requestIdleCallback<"u"?i=requestIdleCallback(()=>{i=null,F()},{timeout:M}):i=requestAnimationFrame(()=>{i=null,F()})}const c=a.ref(null),u=a.computed(()=>t.containerWidth||1920),h=a.computed(()=>t.height),g=a.ref([]),d=a.ref(!1),m=new Map,y=a.ref([]),B=a.ref({light:null,medium:null,severe:null}),w=a.computed(()=>({position:"absolute",top:`${t.topOffset||0}px`,left:`${t.scrollLeft||0}px`,pointerEvents:"none",transition:"opacity 0.2s",zIndex:"var(--gantt-z-conflict)",backgroundColor:"transparent"}));a.watch(()=>t.tasks,()=>{e.value?d.value=!0:l(()=>{o.value!==null?(x(o.value),o.value=null):(B.value={light:null,medium:null,severe:null},m.clear(),b())})},{deep:!0}),a.watch(()=>t.renderLimit,()=>{l(b)}),a.watch(e,F=>{!F&&d.value&&l(()=>{o.value!==null?(x(o.value),o.value=null):(B.value={light:null,medium:null,severe:null},m.clear(),b()),d.value=!1})}),a.watch(r,F=>{!F&&d.value&&l(()=>{B.value={light:null,medium:null,severe:null},m.clear(),b(),d.value=!1})}),a.watch(s,F=>{F?(A(),S()):l(b)}),a.watch([u,h],()=>{if(r.value){d.value=!0;return}l(()=>{m.clear(),b()})}),a.watch([()=>t.timelineData,()=>t.currentTimeScale],()=>{m.clear(),B.value={light:null,medium:null,severe:null},l(b)},{deep:!0});let E=null;a.watch(()=>t.scrollLeft,()=>{E&&clearTimeout(E),S(),E=setTimeout(()=>{b(),E=null},50)});function x(F){const M=t.tasks.find(N=>N.id===F);if(!M){b();return}const R=t.tasks.filter(N=>{const Z=N.startDate?new Date(N.startDate):null;if(!Z)return!1;const se=N.endDate?new Date(N.endDate):null;if(!se)return!1;const ge=M.startDate?new Date(M.startDate):null;if(!ge)return!1;const fe=M.endDate?new Date(M.endDate):null;return fe?!(se<ge||Z>fe):!1}),ae=sc(R,t.resourceId,t.currentTimeScale),J=new Set(R.map(N=>N.id)),O=[...y.value.filter(N=>!N.tasks.some(Z=>J.has(Number(Z.id)))).map(N=>({startDate:N.startDate,endDate:N.endDate,tasks:N.tasks,totalPercent:N.totalPercent,level:N.level})),...ae];g.value=O.map(N=>{const Z=`${N.startDate.getTime()}-${N.endDate.getTime()}`;let se,ge;if(m.has(Z)){const Pe=m.get(Z);se=Pe.left,ge=Pe.width}else{const Pe=H(N.startDate,N.endDate);se=Pe.left,ge=Pe.width,m.set(Z,{left:se,width:ge})}const fe=t.scrollLeft||0,Ae=t.containerWidth||1920,Fe=se-fe,be=Fe+ge;if(be<=0||Fe>=Ae)return null;const Ke=Math.max(0,Fe),xe=Math.min(Ae,be)-Ke;let te=0,lt=t.height;if(t.taskRowMap&&t.rowHeights&&N.tasks.length>0){const Pe=[];for(const rt of N.tasks){const Te=t.taskRowMap.get(rt.id);Te!==void 0&&Pe.push(Te)}if(Pe.length>0){const rt=Math.min(...Pe),Te=Math.max(...Pe),Et=t.barTopPad||0,ot=Et+5.5,yt=Et+.5,pt=(t.rowHeights[0]||51)-Et-10;let Oe=0;for(let ye=0;ye<rt;ye++)Oe+=t.rowHeights[ye]||51;const it=Oe+(rt===0?ot:yt);let W=0;for(let ye=0;ye<Te;ye++)W+=t.rowHeights[ye]||51;const z=W+(Te===0?ot:yt)+pt;te=it-ot,lt=z-it}}return{...N,left:Ke,width:xe,top:te,height:lt}}).filter(N=>N!==null),V()}function b(){const F=t.renderLimit!==void 0&&t.renderLimit>0?t.tasks.slice(0,t.renderLimit):t.tasks,M=sc(F,t.resourceId,t.currentTimeScale);g.value=M.map(R=>{const ae=`${R.startDate.getTime()}-${R.endDate.getTime()}`;let J,k;if(m.has(ae)){const Ke=m.get(ae);J=Ke.left,k=Ke.width}else{const Ke=H(R.startDate,R.endDate);J=Ke.left,k=Ke.width,m.set(ae,{left:J,width:k})}const O=t.scrollLeft||0,N=t.containerWidth||1920,Z=J-O,se=Z+k;if(se<=0||Z>=N)return null;const ge=Math.max(0,Z),Ae=Math.min(N,se)-ge;let Fe=0,be=t.height;if(t.taskRowMap&&t.rowHeights&&R.tasks.length>0){const Ke=[];for(const Xe of R.tasks){const xe=t.taskRowMap.get(Xe.id);xe!==void 0&&Ke.push(xe)}if(Ke.length>0){const Xe=Math.min(...Ke),xe=Math.max(...Ke),te=t.barTopPad||0,lt=te+5.5,Pe=te+.5,rt=(t.rowHeights[0]||51)-te-10;let Te=0;for(let pt=0;pt<Xe;pt++)Te+=t.rowHeights[pt]||51;const Et=Te+(Xe===0?lt:Pe);let ot=0;for(let pt=0;pt<xe;pt++)ot+=t.rowHeights[pt]||51;const yt=ot+(xe===0?lt:Pe)+rt;Fe=Et-lt,be=yt-Et}}return{...R,left:ge,width:Ae,top:Fe,height:be}}).filter(R=>R!==null),!B.value.light&&!B.value.medium&&!B.value.severe?D():V()}function H(F,M){let R=0,ae=0;if(t.currentTimeScale===Ee.HOUR){const O=new Date(t.startDate);O.setHours(0,0,0,0);const N=Math.floor((F.getTime()-O.getTime())/(1e3*60)),Z=Math.floor((M.getTime()-O.getTime())/(1e3*60)),se=Gs.hour.cellWidth/60;return R=Math.max(0,N*se),ae=Math.max(4,(Z-N)*se),{left:R,width:ae}}const J=new Date(F.getFullYear(),F.getMonth(),F.getDate()),k=new Date(M.getFullYear(),M.getMonth(),M.getDate());if(t.timelineData&&t.currentTimeScale&&(t.currentTimeScale===Ee.WEEK||t.currentTimeScale===Ee.MONTH||t.currentTimeScale===Ee.QUARTER||t.currentTimeScale===Ee.YEAR)){const O=Y(J,t.timelineData,t.currentTimeScale),N=new Date(k);N.setDate(N.getDate()+1);let Z=Y(N,t.timelineData,t.currentTimeScale);Z===O&&(Z=Y(k,t.timelineData,t.currentTimeScale)+t.dayWidth),R=O,ae=Math.max(Z-O,4)}else if(t.timelineData&&t.currentTimeScale===Ee.DAY){const O=Y(J,t.timelineData,t.currentTimeScale),N=new Date(k);N.setDate(N.getDate()+1);let Z=Y(N,t.timelineData,t.currentTimeScale);Z===O&&(Z=Y(k,t.timelineData,t.currentTimeScale)+t.dayWidth),R=O,ae=Math.max(Z-O,4)}else{const O=Math.floor((J.getTime()-t.startDate.getTime())/864e5),N=k.getTime()-J.getTime(),Z=Math.round(N/(1e3*60*60*24)),se=Z===0?1:Z+1;R=O*t.dayWidth,ae=se*t.dayWidth}return{left:Math.max(0,R),width:Math.max(4,ae)}}function $(F){if(typeof F=="string"){if(/^\d{4}-\d{2}-\d{2}$/.test(F)){const[R,ae,J]=F.split("-").map(Number);return new Date(R,ae-1,J)}if(/^\d{4}-\d{2}-\d{2}T/.test(F)){const R=new Date(F);return new Date(R.getFullYear(),R.getMonth(),R.getDate())}}if(F instanceof Date)return new Date(F.getFullYear(),F.getMonth(),F.getDate());const M=new Date(F);return new Date(M.getFullYear(),M.getMonth(),M.getDate())}function Y(F,M,R){var J;let ae=0;for(const k of M)if(R===Ee.DAY){const O=k.days||[];for(let N=0;N<O.length;N++){const Z=O[N],se=$(Z.date);if(se.getFullYear()===F.getFullYear()&&se.getMonth()===F.getMonth()&&se.getDate()===F.getDate())return ae+N*t.dayWidth}ae+=O.length*t.dayWidth}else if(R===Ee.QUARTER){const O=k.quarters||[];for(const N of O){const Z=$(N.startDate),se=$(N.endDate);if(F>=Z&&F<=se){const ge=t.dayWidth*90,fe=Math.ceil((se.getTime()-Z.getTime())/(1e3*60*60*24)),Ae=ge/fe,Fe=Math.ceil((F.getTime()-Z.getTime())/(1e3*60*60*24));return ae+Fe*Ae}ae+=t.dayWidth*90}}else if(R===Ee.WEEK){const O=k.weeks||[];for(const N of O){const Z=$(N.weekStart),se=$(N.weekEnd);if(F>=Z&&F<=se){const ge=t.dayWidth*7,fe=Math.ceil((se.getTime()-Z.getTime())/(1e3*60*60*24))+1,Ae=ge/fe,Fe=Math.ceil((F.getTime()-Z.getTime())/(1e3*60*60*24));return ae+Fe*Ae}ae+=t.dayWidth*7}}else if(R===Ee.MONTH){const O=new Date(k.year,k.month-1,1),N=new Date(k.year,k.month,0);if(F>=O&&F<=N){const Z=t.dayWidth*30,se=((J=k.monthData)==null?void 0:J.dayCount)||30,ge=Z/se,fe=F.getDate();return ae+(fe-1)*ge}ae+=t.dayWidth*30}else if(R===Ee.YEAR){const O=k.halfYears||[];for(const N of O){const Z=$(N.startDate),se=$(N.endDate);if(F>=Z&&F<=se){const ge=t.dayWidth*182.5,fe=Math.ceil((se.getTime()-Z.getTime())/(1e3*60*60*24))+1,Ae=ge/fe,Fe=Math.ceil((F.getTime()-Z.getTime())/(1e3*60*60*24));return ae+Fe*Ae}ae+=t.dayWidth*(365/2)}}return ae}function V(){const F=c.value;if(!F)return;const M=F.getContext("2d");if(!M)return;const{added:R,removed:ae,changed:J}=L(y.value,g.value),k=g.value.length,O=R.length+ae.length+J.length;if(k===0||O>k*.5){D(),y.value=[...g.value];return}for(const N of ae)N.left!==void 0&&N.width!==void 0&&M.clearRect(N.left-2,0,N.width+4,F.height);for(const N of R)j(M,N);for(const N of J)N.left!==void 0&&N.width!==void 0&&(M.clearRect(N.left-2,0,N.width+4,F.height),j(M,N));y.value=[...g.value]}function L(F,M){const R=[],ae=[],J=[],k=new Map(F.map(N=>[`${N.startDate.getTime()}-${N.endDate.getTime()}`,N])),O=new Map(M.map(N=>[`${N.startDate.getTime()}-${N.endDate.getTime()}`,N]));for(const[N,Z]of O){const se=k.get(N);se?(se.totalPercent!==Z.totalPercent||se.level!==Z.level||se.tasks.length!==Z.tasks.length)&&J.push(Z):R.push(Z)}for(const[N,Z]of k)O.has(N)||ae.push(Z);return{added:R,removed:ae,changed:J}}function j(F,M){if(M.left===void 0||M.width===void 0||M.width<=0)return;const R=c.value;!R||M.left+M.width<0||M.left>R.width||(Q(F,M),oe(F,M),X(F,M))}function D(){const F=c.value;if(!F)return;const M=F.getContext("2d");if(M){M.clearRect(0,0,F.width,F.height);for(const R of g.value)j(M,R);y.value=[...g.value]}}function S(){const F=c.value;if(!F)return;const M=F.getContext("2d");M&&(M.clearRect(0,0,F.width,F.height),y.value=[])}function Q(F,M){const{left:R=0,width:ae=0,top:J=0,height:k=t.height}=M;let O,N;switch(M.level){case"light":O="rgba(255,220,0,",N=.12;break;case"medium":O="rgba(255,165,0,",N=.15;break;case"severe":O="rgba(255,69,0,",N=.18;break}F.save(),F.fillStyle=T(F,M.level)||`${O}${N})`,F.fillRect(R,J,ae,k),F.restore()}function T(F,M){if(B.value[M])return B.value[M];const R=document.createElement("canvas");R.width=10,R.height=10;const ae=R.getContext("2d");if(!ae)return null;let J;switch(M){case"light":J="rgba(255,220,0,0.25)";break;case"medium":J="rgba(255,165,0,0.3)";break;case"severe":J="rgba(255,69,0,0.35)";break}ae.strokeStyle=J,ae.lineWidth=1,ae.beginPath(),ae.moveTo(0,10),ae.lineTo(10,0),ae.stroke();const k=F.createPattern(R,"repeat");return B.value[M]=k,k}function oe(F,M){const{left:R=0,width:ae=0,top:J=0,height:k=t.height}=M;F.save(),F.strokeStyle="#f56c6c",F.lineWidth=2,F.beginPath(),F.moveTo(R,J),F.lineTo(R,J+k),F.stroke(),F.beginPath(),F.moveTo(R+ae,J),F.lineTo(R+ae,J+k),F.stroke(),F.restore()}function X(F,M){const{left:R=0,top:ae=0}=M,J=16,k=4,O=R+k,N=ae+k;F.save(),F.fillStyle="#faad14",F.beginPath(),F.moveTo(O+J/2,N),F.lineTo(O,N+J),F.lineTo(O+J,N+J),F.closePath(),F.fill(),F.fillStyle="#fff",F.font="bold 12px Arial",F.textAlign="center",F.textBaseline="middle",F.fillText("!",O+J/2,N+J*.6),F.restore()}return a.onMounted(()=>{l(b)}),a.onUnmounted(()=>{E&&clearTimeout(E),A(),m.clear(),B.value={light:null,medium:null,severe:null}}),(F,M)=>(a.openBlock(),a.createElementBlock("canvas",{ref_key:"canvasRef",ref:c,class:"gantt-conflicts-canvas",width:u.value,height:h.value,style:a.normalizeStyle(w.value)},null,12,t4))}}),n4=un(r4,[["__scopeId","data-v-d4cd159d"]]);performance.now();class a4{constructor(){$r(this,"marks",new Map);$r(this,"measures",[])}start(t){this.marks.set(t,performance.now())}end(t){const e=this.marks.get(t);if(!e)return 0;const r=performance.now()-e;return this.measures.push({name:t,duration:r,timestamp:Date.now()}),this.marks.delete(t),r}checkpoint(t){this.marks.get(t)}getRecentMeasures(t=10){return this.measures.slice(-t).map(e=>({name:e.name,duration:e.duration}))}clear(){this.marks.clear(),this.measures=[]}report(){console.group("📊 Performance Report");const t=new Map;this.measures.forEach(r=>{t.has(r.name)||t.set(r.name,{count:0,total:0,avg:0,max:0});const s=t.get(r.name);s.count++,s.total+=r.duration,s.max=Math.max(s.max,r.duration)}),t.forEach(r=>{r.avg=r.total/r.count});const e=Array.from(t.entries()).sort((r,s)=>s[1].avg-r[1].avg);console.table(e.map(([r,s])=>({Name:r,Count:s.count,"Avg (ms)":s.avg.toFixed(2),"Max (ms)":s.max.toFixed(2),"Total (ms)":s.total.toFixed(2)}))),console.groupEnd()}}const Zi=new a4;typeof window<"u"&&(window.perfMonitor2=Zi);class s4{constructor(){$r(this,"cache",new Map);$r(this,"timelineDataHash","")}getCacheKey(t,e){const r=t.getFullYear(),s=t.getMonth(),o=t.getDate();return`${e}-${r}-${s}-${o}`}computeHash(t,e,r){var c;if(t.length===0)return"";const s=t[0],o=t[t.length-1];let i,A;if("date"in s)i=s.date;else if("startDate"in s)i=s.startDate;else return"";if("date"in o)A=o.date;else if("endDate"in o)A=o.endDate;else return"";const l=(r==null?void 0:r[e])??((c=Gs[e])==null?void 0:c.cellWidth)??0;return`${e}-${i.getTime()}-${A.getTime()}-${t.length}-cw${l}`}buildCache(t,e,r){var A;const s=this.computeHash(t,e,r);if(s===this.timelineDataHash&&this.cache.size>0)return;this.cache.clear(),this.timelineDataHash=s;const o=l=>{var c;return(r==null?void 0:r[l])??((c=Gs[l])==null?void 0:c.cellWidth)??60};let i=0;for(const l of t)if(e===Ee.HOUR){const c=l.hours||[],u=o("hour");for(let h=0;h<c.length;h++){const g=c[h],d=g.date?new Date(g.date):new Date,m=this.getCacheKey(d,e),y=i+h*u;this.cache.set(m,y)}i+=c.length*u}else if(e===Ee.DAY){const c=l.days||[],u=o("day");for(let h=0;h<c.length;h++){const g=c[h],d=new Date(g.date),m=this.getCacheKey(d,e),y=i+h*u;this.cache.set(m,y)}i+=c.length*u}else if(e===Ee.WEEK){const c=l.weeks||[],u=o("week"),h=u/7;for(const g of c){const d=g.subDays||[];for(let m=0;m<d.length;m++){const y=d[m],B=new Date(y.date),w=this.getCacheKey(B,e),E=i+m*h;this.cache.set(w,E)}i+=u}}else if(e===Ee.MONTH){const c=new Date(l.startDate),u=new Date(l.endDate),h=((A=l.monthData)==null?void 0:A.dayCount)||30,g=o("month"),d=g/h;for(let m=1;m<=h;m++){const y=new Date(c.getFullYear(),c.getMonth(),m);if(y<=u){const B=this.getCacheKey(y,e),w=i+(m-1)*d;this.cache.set(B,w)}}i+=g}else if(e===Ee.QUARTER){const c=l.quarters||[],u=o("quarter");for(const h of c){const g=new Date(h.startDate),d=new Date(h.endDate),m=Math.round((d.getTime()-g.getTime())/(1e3*60*60*24))+1,y=u/m;for(let B=0;B<m;B++){const w=new Date(g);if(w.setDate(g.getDate()+B),w<=d){const E=this.getCacheKey(w,e),x=i+B*y;this.cache.set(E,x)}}i+=u}}else if(e===Ee.YEAR){const c=l.halfYears||[],u=o("year");for(const h of c){const g=new Date(h.startDate),d=new Date(h.endDate),m=u,y=Math.round((d.getTime()-g.getTime())/(1e3*60*60*24))+1,B=m/y;for(let w=0;w<y;w++){const E=new Date(g);if(E.setDate(g.getDate()+w),E<=d){const x=this.getCacheKey(E,e),b=i+w*B;this.cache.set(x,b)}}i+=u}}}getPosition(t,e){const r=this.getCacheKey(t,e),s=this.cache.get(r);return s===void 0?null:s}clear(){this.cache.clear(),this.timelineDataHash=""}getStats(){return{size:this.cache.size,hash:this.timelineDataHash}}}const $d=new s4;function o4(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())),e=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-e);const r=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7)}function Lp(n,t){if(n.includes("|")){const h=n.split("|");return t.getMonth()<6?h[0]:h[1]??h[0]}const e=t.getFullYear().toString(),r=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getMonth()+1),o=String(t.getDate()).padStart(2,"0"),i=String(t.getDate()),A=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),c=String(Math.ceil((t.getMonth()+1)/3)),u=o4(t).toString();return n.replace("yyyy",e).replace("MM",r).replace("dd",o).replace("HH",A).replace("mm",l).replace("M",s).replace("d",i).replace("Q",c).replace("W",u)}const A4=2;function i4(n){return n/1440}function $c(n){if(!n)return null;if(n instanceof Date)return n;if(typeof n=="string"){if(/^\d{4}-\d{2}-\d{2}$/.test(n)){const[e,r,s]=n.split("-").map(Number);return new Date(e,r-1,s)}if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(n)){const[e,r]=n.split(" "),[s,o,i]=e.split("-").map(Number),[A,l]=r.split(":").map(Number);return new Date(s,o-1,i,A,l)}}const t=new Date(n);return isNaN(t.getTime())?null:t}function l4(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())}function c4(n,t,e,r,s,o,i=51){const A=i-10,l=Math.floor((i-A-A4*2)/2),c=t+l;if(e===Ee.HOUR){if(!o)return null;const E=$c(n.startDate||n.endDate),x=$c(n.endDate||n.startDate);if(!E||!x)return null;const b=new Date(o);b.setHours(0,0,0,0);const H=n.startDate,$=n.endDate;let Y=E,V=x;typeof H=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(H)&&(Y=new Date(E),Y.setHours(0,0,0,0)),typeof $=="string"&&/^\d{4}-\d{2}-\d{2}$/.test($)&&(V=new Date(x),V.setDate(V.getDate()+1),V.setHours(0,0,0,0));const L=(Y.getTime()-b.getTime())/(1e3*60),j=(V.getTime()-b.getTime())/(1e3*60),D=i4(s),S=Math.max(0,L*D),Q=Math.max(4,(j-L)*D);return{left:S,top:c,width:Q,height:A}}const u=$c(n.startDate||n.endDate),h=$c(n.endDate||n.startDate);if(!u||!h)return null;const g=l4(u),d=Ka(n.endDate,h),m=r?r.getPosition(g,e):null;if(m===null)return null;const y=new Date(d);y.setDate(y.getDate()+1);const B=r?r.getPosition(y,e):null;let w;if(B!==null)w=Math.max(4,B-m);else{const E=r?r.getPosition(d,e):null;w=E!==null?Math.max(4,E-m+s):Math.max(4,(Math.max(0,Math.round((d.getTime()-u.getTime())/864e5))+1)*s)}return{left:m,top:c,width:w,height:A}}const u4={class:"timeline-header"},d4={class:"timeline-header-row year-row"},f4={class:"year-label"},h4={class:"timeline-header-row half-years-row"},g4={class:"half-year-label"},p4={class:"timeline-header-row year-row"},v4={class:"year-label"},m4={class:"timeline-header-row months-row"},w4={class:"month-label"},y4={class:"timeline-header-row year-row"},B4={class:"year-label"},b4={class:"timeline-header-row quarters-row"},C4={class:"quarter-label"},k4={class:"timeline-header-row date-row"},E4={class:"date-label"},D4={class:"timeline-header-row hours-row"},T4={class:"hour-label"},x4={class:"timeline-header-row year-month-row"},S4={class:"year-month-label"},F4={class:"flag-content"},L4={class:"timeline-header-row days-row"},U4={class:"week-label"},I4={class:"day-label"},M4={class:"quarter-hour-lines"},Q4=["onMouseenter"],N4=["onMouseenter"],_4={key:1,class:"hover-tooltip-content"},R4={class:"hover-tooltip-title"},O4={class:"hover-tooltip-row"},H4={class:"hover-tooltip-label"},P4={class:"hover-tooltip-value"},V4={class:"hover-tooltip-row"},W4={class:"hover-tooltip-label"},K4={class:"hover-tooltip-value"},$4={class:"hover-tooltip-row"},q4={class:"hover-tooltip-label"},j4={class:"hover-tooltip-value"},Y4={class:"hover-tooltip-row"},G4={class:"hover-tooltip-label"},z4={class:"hover-tooltip-value"},X4={class:"hover-tooltip-row hover-tooltip-overflow-warning"},J4={class:"hover-tooltip-label"},Z4={class:"hover-tooltip-row"},eS={class:"hover-tooltip-label"},tS={class:"hover-tooltip-value"},rS={class:"hover-tooltip-row"},nS={class:"hover-tooltip-label"},aS={class:"hover-tooltip-value"},sS={class:"hover-tooltip-row"},oS={class:"hover-tooltip-label"},AS={class:"hover-tooltip-value"},iS={class:"hover-tooltip-row"},lS={class:"hover-tooltip-label"},cS={class:"hover-tooltip-value"},uS={key:1,class:"milestone-sticky-tooltip-content"},dS=18,qc=5,fS=200,hS=8,gS=4,Jm=10,pS=6e4,vS=4,Zm=3,e0=5,mS=8,wS=18,yS=5.5,BS=4.5,t0=50,r0=5,bS=a.defineComponent({__name:"Timeline",props:{tasks:{default:()=>[]},milestones:{default:()=>[]},startDate:{},endDate:{},useDefaultDrawer:{type:Boolean,default:!0},useDefaultMilestoneDialog:{type:Boolean,default:!0},onTaskDelete:{type:Function,default:void 0},onTaskUpdate:{type:Function,default:void 0},onMilestoneDelete:{type:Function,default:void 0},onMilestoneUpdate:{type:Function,default:void 0},onMilestoneSave:{type:Function,default:void 0},workingHours:{default:()=>({morning:{start:8,end:11},afternoon:{start:13,end:17}})},taskBarConfig:{default:void 0},allowDragAndResize:{type:Boolean,default:!0},showActualTaskbar:{type:Boolean,default:!1},enableTaskBarTooltip:{type:Boolean,default:!0},enableMilestoneTooltip:{type:Boolean,default:!0},milestoneLabelPosition:{default:"right"},pendingTaskBackgroundColor:{default:void 0},delayTaskBackgroundColor:{default:void 0},completeTaskBackgroundColor:{default:void 0},ongoingTaskBackgroundColor:{default:void 0},scaleConfigs:{default:void 0},enableParentTaskAutoSchedule:{type:Boolean,default:!0},linkConfig:{}},emits:["timeline-scale-changed","click-task","edit-task","milestone-double-click","start-timer","stop-timer","add-predecessor","add-successor","predecessor-added","successor-added","delete","link-deleted","resource-drag-end"],setup(n,{expose:t,emit:e}){const r=n,s=e,{formatYearMonth:o,formatMonth:i,getTranslation:A}=_s(),l=_=>A(_),{viewMode:c,dataSource:u}=Fv(),h=a.inject("resourceConflicts",a.computed(()=>new Map)),g=a.ref(0),d=(_,G)=>{if(c.value!=="resource")return[];const de=h.value.get(String(_));if(!de||!de.has(Number(G)))return[];const Be=u.value.find(gt=>String(gt.id)===String(_));if(!Be||!Be.tasks)return[];const Ce=Be.tasks.find(gt=>gt.id===G);if(!Ce||!Ce.startDate||!Ce.endDate)return[];const Ue=new Date(Ce.startDate).getTime(),Se=new Date(Ce.endDate),_e=Ka(Ce.endDate,Se).getTime()+1440*60*1e3;return Be.tasks.filter(gt=>{if(gt.id===G||!gt.startDate||!gt.endDate||!de.has(gt.id))return!1;const He=new Date(gt.startDate).getTime(),dt=new Date(gt.endDate),Qt=Ka(gt.endDate,dt).getTime()+1440*60*1e3;return Ue<Qt&&He<_e})},m=a.ref(!1);a.provide("isDraggingTaskBar",m);const y=a.ref(null);a.provide("lastChangedTaskId",y),a.provide("positionCache",$d);const B=a.inject("isSplitBarDragging",a.ref(!1)),w=a.inject("isTaskListToggling",a.ref(!1)),E=a.inject("gantt-show-conflicts",a.computed(()=>!0)),x=a.inject("gantt-row-height",a.computed(()=>51)),b=a.inject("taskRowLayouts",a.computed(()=>({cumulativeHeights:[0],totalHeight:0,taskHeights:new Map}))),H=a.computed(()=>{var G;const _=x.value;return((G=r.taskBarConfig)==null?void 0:G.titlePosition)==="above"?_+dS:_}),$=a.ref(0);let Y=!1;const V=a.ref(!1);let L=null;const j=a.ref(0),D=a.inject("resourceTaskLayouts",a.computed(()=>new Map)),S=a.inject("resourceRowPositions",a.computed(()=>new Map)),Q=a.inject("gantt-task-list-width",a.ref(0)),T=a.reactive({visible:!1,task:null,taskStatus:{color:"#409eff",label:""},resourcePercent:100,hasResourceConflict:!1,parentAutoSchedule:void 0,placement:"above",position:{left:0,top:0},arrowOffset:0}),oe=_=>_?String(_).substring(0,10):l("dateNotSet"),X=_=>{if(!_)return l("dateNotSet");const G=new Date(_);return isNaN(G.getTime())?l("dateNotSet"):F(Ka(_,G))},F=_=>{if(!_)return l("dateNotSet");const G=_.getFullYear(),de=String(_.getMonth()+1).padStart(2,"0"),we=String(_.getDate()).padStart(2,"0");return`${G}-${de}-${we}`},M=(_,G)=>{let de=4;return c.value==="resource"&&_<100&&(de+=1),G&&(de+=1),52+de*22},R=_=>{var ms;if(r.enableTaskBarTooltip===!1)return;const{task:G,taskStatus:de,resourcePercent:we,hasResourceConflict:Be,targetRect:Ce,mouseX:Ue,mouseY:Se}=_;T.task=G,T.taskStatus=de,T.resourcePercent=we,T.hasResourceConflict=Be,T.parentAutoSchedule=_.parentAutoSchedule;const _e=250,ht=M(we,Be),gt=15,He=7,dt=(ms=Xe.value)==null?void 0:ms.getBoundingClientRect(),Qt=dt?dt.left:Q.value,De=dt?dt.right:window.innerWidth,Bt=window.innerHeight,Pt=Ue??Ce.left+Ce.width/2,yr=Se??Ce.top+Ce.height/2,Cr=Pt<Qt+60,vr=Pt>De-60;let pn,en,Zn,os;if(Cr)os="right",pn=Ce.right+gt,en=Math.max(He+ht/2,Math.min(Bt-He-ht/2,yr)),Zn=Math.max(10,Math.min(ht-10,yr-en+ht/2));else if(vr)os="left",pn=Ce.left-_e-gt,en=Math.max(He+ht/2,Math.min(Bt-He-ht/2,yr)),Zn=Math.max(10,Math.min(ht-10,yr-en+ht/2));else{pn=Math.max(Qt+He,Math.min(De-_e-He,Pt-_e/2)),Zn=Math.max(10,Math.min(_e-10,Pt-pn));const go=Ce.top-He,ea=Bt-Ce.bottom-He;go>=ht+gt||go>=ea?(os="above",en=Ce.top-gt):(os="below",en=Ce.bottom+gt)}T.placement=os,T.position={left:pn,top:en},T.arrowOffset=Zn,T.visible=!0},ae=()=>{T.visible=!1},J=a.reactive({visible:!1,milestone:null,milestoneColor:"#f56c6c",position:{x:0,y:0},arrowDirection:"left",arrowOffsetY:0}),k=_=>{if(r.enableMilestoneTooltip===!1)return;const{milestone:G,milestoneColor:de,targetRect:we,stickyPosition:Be}=_;J.milestone=G,J.milestoneColor=de;const Ce=220,Ue=8,Se=8,_e=34,ht=window.innerWidth,gt=window.innerHeight;let He,dt;Be==="left"?(He=we.right+Ue,dt="left"):(He=we.left-Ce-Ue-40,dt="right"),He=Math.max(Se,Math.min(ht-Ce-Se,He));const Qt=we.top+we.height/2;let De=Qt-_e/2;De=Math.max(Se,Math.min(gt-_e-Se,De));const Bt=Math.max(10,Math.min(_e-10,Qt-De));J.position={x:He,y:De},J.arrowDirection=dt,J.arrowOffsetY=Bt,J.visible=!0},O=()=>{J.visible=!1},N=(()=>{const _=new Date,G=new Date(_.getFullYear(),_.getMonth()-6,1),de=new Date(_.getFullYear(),_.getMonth()+6+1,0);return{startDate:G,endDate:de}})(),Z=()=>N,se=a.computed(()=>r.startDate?new Date(r.startDate):Z().startDate),ge=a.computed(()=>r.endDate?new Date(r.endDate):Z().endDate),fe=a.ref({startDate:se.value,endDate:ge.value,zoomLevel:1}),Ae=a.ref(Ee.DAY);a.watch([se,ge],([_,G])=>{if(c.value!=="resource"&&(r.startDate||r.endDate)&&!he){if(_.getTime()===fe.value.startDate.getTime()&&G.getTime()===fe.value.endDate.getTime())return;fe.value.startDate=_,fe.value.endDate=G}});const Fe=[],be=a.computed(()=>c.value==="resource"?u.value||[]:r.tasks??Fe),Ke=a.ref(null),Xe=a.ref(null),xe=a.computed(()=>r.scaleConfigs??Gs);function te(_){if(_==null)return null;const G=Math.ceil(_);return G<0?null:Math.max(1,G)}function lt(_,G){return Lp(_,G)}function Pe(_,G){var Be,Ce;const de=(Be=xe.value[_])==null?void 0:Be.formatters,we=(Ce=Gs[_])==null?void 0:Ce.formatters;return!de||!we?!1:G==="primary"?de.primary!==we.primary:(de.secondary??"")!==(we.secondary??"")}const rt=a.computed(()=>Ae.value===Ee.HOUR?xe.value.hour.cellWidth*24:Ae.value===Ee.WEEK?xe.value.week.cellWidth/7:Ae.value===Ee.MONTH?xe.value.month.cellWidth/30:Ae.value===Ee.QUARTER?xe.value.quarter.cellWidth/90:Ae.value===Ee.YEAR?xe.value.year.cellWidth*2/365:xe.value.day.cellWidth);let Te=null;const Et=()=>{Te=null},ot=()=>{if(!be.value||be.value.length===0)return null;const _=[],G=Be=>{if(Be.startDate&&_.push(new Date(Be.startDate)),Be.endDate&&_.push(new Date(Be.endDate)),Be.children&&Be.children.length>0)for(const Ce of Be.children)G(Ce)};if(c.value==="resource"){for(const Be of be.value)if(Be.tasks&&Array.isArray(Be.tasks))for(const Ce of Be.tasks)G(Ce)}else for(const Be of be.value)G(Be);if(_.length===0)return null;let de=1/0,we=-1/0;for(const Be of _){const Ce=Be.getTime();isNaN(Ce)||(Ce<de&&(de=Ce),Ce>we&&(we=Ce))}return de===1/0||we===-1/0?null:{minDate:new Date(de),maxDate:new Date(we)}},yt=()=>Te||(Te=ot(),Te),pt=()=>{const _=yt(),G=_r.value||1200,de=xe.value.hour.cellWidth,we=xe.value.hour,Be=te(we.preBuffer),Ce=te(we.sufBuffer);if(!_){const De=new Date;De.setHours(0,0,0,0);const Bt=new Date(De);Bt.setDate(Bt.getDate()-1);const Pt=new Date(De);return Pt.setDate(Pt.getDate()+1),Pt.setHours(23,59,59,999),{startDate:Bt,endDate:Pt}}const{minDate:Ue,maxDate:Se}=_,_e=new Date(Ue);_e.setHours(0,0,0,0);const ht=new Date(_e);Be!==null?ht.setDate(ht.getDate()-Be):ht.setDate(ht.getDate()-1);const gt=new Date(Se);gt.setHours(23,59,59,999);const He=new Date(gt);Ce!==null?He.setDate(He.getDate()+Ce):He.setDate(He.getDate()+1);const dt=Math.ceil((He.getTime()-ht.getTime())/(1e3*60*60));if(dt*de<G){const De=Math.ceil(G/de),Bt=Math.ceil((De-dt)/2),Pt=Math.ceil(Bt/24);ht.setDate(ht.getDate()-Pt),He.setDate(He.getDate()+Pt)}return{startDate:ht,endDate:He}},Oe=()=>{const _=yt(),G=_r.value||1200,de=xe.value.day.cellWidth,we=xe.value.day,Be=te(we.preBuffer),Ce=te(we.sufBuffer),{minDate:Ue,maxDate:Se}=_||{minDate:new Date,maxDate:new Date};let _e;Be!==null?_e=new Date(Ue.getFullYear(),Ue.getMonth()-Be,1):_e=new Date(Ue.getFullYear(),Ue.getMonth()-1,1);let ht;Ce!==null?ht=new Date(Se.getFullYear(),Se.getMonth()+Ce+1,0):ht=new Date(Se.getFullYear(),Se.getMonth()+2,0);const gt=Math.ceil((ht.getTime()-_e.getTime())/(1e3*60*60*24));if(gt*de<G){const dt=Math.ceil(G/de),Qt=Math.ceil((dt-gt)/2),De=new Date(_e);De.setDate(De.getDate()-Qt),_e=De;const Bt=new Date(ht);Bt.setDate(Bt.getDate()+Qt),ht=Bt}return{startDate:_e,endDate:ht}},it=()=>{const _=yt(),G=_r.value||1200,de=xe.value.week.cellWidth,we=xe.value.week,Be=te(we.preBuffer),Ce=te(we.sufBuffer);if(!_){const zr=new Date,Or=Math.max(Math.ceil(G/de),20),Dn=new Date(zr);Dn.setDate(Dn.getDate()-Math.floor(Or/2)*7);const ws=new Date(zr);return ws.setDate(ws.getDate()+Math.ceil(Or/2)*7),{startDate:Dn,endDate:ws}}const{minDate:Ue,maxDate:Se}=_;function _e(zr){const Or=new Date(zr),Dn=Or.getDay()||7;return Or.setDate(Or.getDate()-(Dn-1)),Or}function ht(zr,Or){let Dn=1;for(;Dn<=31;){const ws=new Date(zr,Or,Dn);if(ws.getMonth()!==Or)break;const Uo=_e(ws);if(Uo.getMonth()===Or)return Uo;Dn++}return new Date(zr,Or,1)}function gt(zr,Or){const Dn=new Date(zr,Or+1,0).getDate();for(let ws=Dn;ws>=1;ws--){const Uo=new Date(zr,Or,ws),As=_e(Uo);if(As.getMonth()===Or)return As}return new Date(zr,Or,1)}function He(zr,Or){const Dn=[],ws=ht(zr,Or),Uo=gt(zr,Or),As=new Date(ws);for(;As<=Uo;)Dn.push(new Date(As)),As.setDate(As.getDate()+7);return Dn}const dt=_e(Ue),Qt=dt.getFullYear(),De=dt.getMonth(),Bt=De===0?11:De-1,Pt=De===0?Qt-1:Qt,yr=He(Pt,Bt),Cr=_e(Se),vr=Cr.getFullYear(),pn=Cr.getMonth(),en=pn===11?0:pn+1,Zn=pn===11?vr+1:vr,os=He(Zn,en);let ms;if(Be!==null){ms=[];for(let zr=Be;zr>=1;zr--){const Or=new Date(Ue.getFullYear(),Ue.getMonth()-zr,1);ms.push(...He(Or.getFullYear(),Or.getMonth()))}}else ms=yr;let go;if(Ce!==null){go=[];for(let zr=1;zr<=Ce;zr++){const Or=new Date(Se.getFullYear(),Se.getMonth()+zr,1);go.push(...He(Or.getFullYear(),Or.getMonth()))}}else go=os;let ea=[];ea.push(...ms);let Xo=Qt,Jo=De;for(;Xo<vr||Xo===vr&&Jo<=pn;){const zr=He(Xo,Jo);ea.push(...zr),Jo++,Jo>11&&(Jo=0,Xo++)}ea.push(...go);let hA=ea.length*de;for(;hA<G;){const zr=ea[0],Or=zr.getFullYear(),Dn=zr.getMonth(),ws=Dn===0?11:Dn-1,Uo=Dn===0?Or-1:Or;if(ea=[...He(Uo,ws),...ea],hA=ea.length*de,hA>=G)break;const Ls=ea[ea.length-1],Fc=Ls.getFullYear(),xl=Ls.getMonth(),Lc=xl===11?0:xl+1,Uc=xl===11?Fc+1:Fc,Ic=He(Uc,Lc);ea=[...ea,...Ic],hA=ea.length*de}const Zo=new Date(ea[0]),Tl=new Date(ea[ea.length-1]);return Tl.setDate(Tl.getDate()+6),{startDate:Zo,endDate:Tl}},W=()=>{const _=yt(),G=xe.value.month,de=te(G.preBuffer),we=te(G.sufBuffer);if(!_){const Qt=new Date,De=new Date(Qt.getFullYear()-1,0,1),Bt=new Date(Qt.getFullYear()+1,11,31);return{startDate:De,endDate:Bt}}const{minDate:Be,maxDate:Ce}=_,Ue=_r.value||1200;let Se;de!==null?Se=new Date(Be.getFullYear()-de,0,1):Se=new Date(Be.getFullYear()-1,0,1);let _e;we!==null?_e=new Date(Ce.getFullYear()+we,11,31):_e=new Date(Ce.getFullYear()+1,11,31);const gt=(_e.getFullYear()-Se.getFullYear())*12+(_e.getMonth()-Se.getMonth()),He=xe.value.month.cellWidth;if(gt*He<Ue){const Qt=Math.ceil(Ue/He),De=Math.ceil((Qt-gt)/2),Bt=new Date(Se);Bt.setMonth(Bt.getMonth()-De),Se=new Date(Bt.getFullYear(),Bt.getMonth(),1);const Pt=new Date(_e);Pt.setMonth(Pt.getMonth()+De),_e=new Date(Pt.getFullYear(),Pt.getMonth()+1,0)}return{startDate:Se,endDate:_e}},z=()=>{const _=yt();if(!_){const Ue=new Date,Se=_r.value||1200;let _e=3;if(Ae.value===Ee.QUARTER){const De=xe.value.quarter.cellWidth*4;_e=Math.max(Math.ceil(Se/De)+1,5)}else if(Ae.value===Ee.YEAR){const Qt=xe.value.year.cellWidth*2;_e=Math.max(Math.ceil(Se/Qt)+1,5)}const ht=Ue.getFullYear()-Math.floor(_e/2),gt=ht+_e-1,He=new Date(ht,0,1),dt=new Date(gt,11,31);return{startDate:He,endDate:dt}}const{minDate:G,maxDate:de}=_,we=_r.value||1200;if(Ae.value===Ee.QUARTER){const Ue=xe.value.quarter,Se=te(Ue.preBuffer),_e=te(Ue.sufBuffer),gt=xe.value.quarter.cellWidth*4;let He;Se!==null?He=new Date(G.getFullYear()-Se,0,1):He=new Date(G.getFullYear()-1,0,1);let dt;_e!==null?dt=new Date(de.getFullYear()+_e,11,31):dt=new Date(de.getFullYear()+1,11,31);const Qt=dt.getFullYear()-He.getFullYear()+1;if(Qt*gt<we){const Bt=Math.ceil(we/gt),Pt=Math.ceil((Bt-Qt)/2);He=new Date(He.getFullYear()-Pt,0,1),dt=new Date(dt.getFullYear()+Pt,11,31)}return{startDate:He,endDate:dt}}else if(Ae.value===Ee.YEAR){const Ue=xe.value.year,Se=te(Ue.preBuffer),_e=te(Ue.sufBuffer),gt=xe.value.year.cellWidth*2;let He;Se!==null?He=new Date(G.getFullYear()-Se,0,1):He=new Date(G.getFullYear()-1,0,1);let dt;_e!==null?dt=new Date(de.getFullYear()+_e,11,31):dt=new Date(de.getFullYear()+1,11,31);const Qt=dt.getFullYear()-He.getFullYear()+1;if(Qt*gt<we){const Bt=Math.ceil(we/gt),Pt=Math.ceil((Bt-Qt)/2);He=new Date(He.getFullYear()-Pt,0,1),dt=new Date(dt.getFullYear()+Pt,11,31)}return{startDate:He,endDate:dt}}const Be=new Date(G.getFullYear()-1,0,1),Ce=new Date(de.getFullYear()+1,11,31);return{startDate:Be,endDate:Ce}},ye=a.ref(null),qe=a.ref(null),ct=a.ref(new Set),$e=a.computed(()=>qe.value!==null),Ve=()=>{qe.value=null,ct.value.clear()},Mt=_=>{qe.value=_,ct.value.clear(),ct.value.add(_);const G=be.value.find(de=>de.id===_);if(G){if(G.predecessor){const de=vo(G.predecessor);for(const we of de)ct.value.add(we)}for(const de of be.value)de.predecessor&&vo(de.predecessor).includes(_)&&ct.value.add(de.id)}},tt=a.ref(null),_t=a.shallowRef(null),rr=a.shallowRef(null),St=a.ref(!1),hr=a.ref(""),Vt=a.ref(null);let Xt=!1,mr="";const Kt=new Map,jt=_=>{tt.value=_.type,_t.value=_.task,An(_.mouseEvent.clientX,_.mouseEvent.clientY),rr.value=null,St.value=!1,hr.value="",dn=null,Xt=!1,mr="",xa(),document.addEventListener("mousemove",cr),document.addEventListener("mouseup",qr)};let We=null,ze=0,ft=0,Lt=0,ar=0;const Rt=()=>{We=null,An(ze,ft),Gn(ze,ft),Oa.value&&_t.value&&Oa.value.draw(Ss(),uo(),Lt,ar,Xt,mr)},cr=_=>{tt.value&&(ze=_.clientX,ft=_.clientY,We===null&&(We=requestAnimationFrame(Rt)))},qr=()=>{tt.value&&(We!==null&&(cancelAnimationFrame(We),We=null),_t.value&&ra({task:_t.value,type:tt.value}))};let Kr=null,on=0,Fr=!1;const Jr=(_,G)=>{if(!wa.value){Lt=_,ar=G;return}const de=Date.now();(!Kr||Fr||de-on>fS)&&(Kr=wa.value.getBoundingClientRect(),on=de,Fr=!1),Lt=_-Kr.left,ar=G-Kr.top},An=(_,G)=>{Jr(_,G)},ta=_=>{ze=_.mouseX,ft=_.mouseY,We===null&&(We=requestAnimationFrame(Rt))},ra=_=>{var G;Kr=null,document.removeEventListener("mousemove",cr),document.removeEventListener("mouseup",qr),Ra(),(G=Oa.value)==null||G.clear(),rr.value&&St.value&&En(_.task,rr.value,_.type),tt.value=null,_t.value=null,rr.value=null,St.value=!1},xn=(_,G)=>{Kr||(Kr=wa.value.getBoundingClientRect(),on=Date.now());const de=_-Kr.left,we=G-Kr.top,Be=(hS+gS)/2,Ce=Be+10;for(const Ue in Ar.value){const Se=Ar.value[Ue],_e=Number(Ue);if(we<Se.top-Ce||we>Se.top+Se.height+Ce)continue;const ht=Se.top+Se.height/2,gt=Se.left;if(de>=gt-Be&&de<=gt+Be&&we>=ht-Be&&we<=ht+Be)return{taskId:_e,anchorType:"left"};const He=Se.left+Se.width;if(de>=He-Be&&de<=He+Be&&we>=ht-Be&&we<=ht+Be)return{taskId:_e,anchorType:"right"}}return null},Nr=(_,G)=>{const de=(dn==null?void 0:dn.id)??null,we=(_==null?void 0:_.id)??null;if(de!==we)if(dn=_,_&&_t.value){const Be=zn(_t.value,_,tt.value,G);Xt=Be.valid,mr=Be.error||"",St.value=Be.valid,rr.value=_}else Xt=!1,mr="",St.value=!1,rr.value=null};let dn=null;const Gn=(_,G)=>{if(!_t.value||!wa.value)return;const de=xn(_,G),we=de!==null&&Kt.get(de.taskId)||null,Be=de==null?void 0:de.anchorType;Nr(we,Be)},zn=(_,G,de,we)=>{if(we){if(de==="predecessor"&&we!=="right")return{valid:!1,error:"前置任务应连接到右侧触点"};if(de==="successor"&&we!=="left")return{valid:!1,error:"后置任务应连接到左侧触点"}}if(_.id===G.id)return{valid:!1,error:"不能连接到自己"};if(G.isParent||G.type==="milestone")return{valid:!1,error:"不能连接到父级任务或里程碑"};if(de==="predecessor"){if(ln(G.id,_.id))return{valid:!1,error:"会产生循环依赖"}}else if(ln(_.id,G.id))return{valid:!1,error:"会产生循环依赖"};if(de==="predecessor"){if(_.predecessor&&vo(_.predecessor).includes(G.id))return{valid:!1,error:"关系已存在"}}else if(G.predecessor&&vo(G.predecessor).includes(_.id))return{valid:!1,error:"关系已存在"};return{valid:!0}},ln=(_,G)=>{const de=new Set,we=[_];for(;we.length>0;){const Be=we.shift();if(Be===G)return!0;if(de.has(Be))continue;de.add(Be);const Ce=be.value.find(Ue=>Ue.id===Be);if(Ce&&Ce.predecessor){const Ue=vo(Ce.predecessor);we.push(...Ue)}}return!1},En=(_,G,de)=>{if(de==="predecessor"){const we=_.predecessor?vo(_.predecessor):[];we.includes(G.id)||(we.push(G.id),_.predecessor=we,br(_),s("predecessor-added",{targetTask:_,newTask:G}))}else{const we=G.predecessor?vo(G.predecessor):[];we.includes(_.id)||(we.push(_.id),G.predecessor=we,br(G),s("successor-added",{targetTask:G,newTask:_}))}},xa=()=>{Vt.value=window.setInterval(()=>{if(!Ke.value||!wa.value)return;const _=Ke.value,G=la.value;if(!G)return;const de=_.getBoundingClientRect(),we=80,Be=15,Ce=ze,Ue=ft;let Se=!1;if(Ce<de.left+we&&_.scrollLeft>0)_.scrollLeft-=Be,Se=!0;else if(Ce>de.right-we){const _e=_.scrollWidth-_.clientWidth;_.scrollLeft<_e&&(_.scrollLeft+=Be,Se=!0)}if(Ue<de.top+we&&G.scrollTop>0)G.scrollTop-=Be,Se=!0;else if(Ue>de.bottom-we){const _e=G.scrollHeight-G.clientHeight;G.scrollTop<_e&&(G.scrollTop+=Be,Se=!0)}Se&&(Fr=!0,Gn(Ce,Ue),Oa.value&&_t.value&&Oa.value.draw(Ss(),uo(),Lt,ar,Xt,mr))},30)},Ra=()=>{Vt.value!==null&&(clearInterval(Vt.value),Vt.value=null)},na=()=>{var _;Ra(),Kr=null,We!==null&&(cancelAnimationFrame(We),We=null),(_=Oa.value)==null||_.clear(),document.removeEventListener("mousemove",cr),document.removeEventListener("mouseup",qr),tt.value=null,_t.value=null,rr.value=null,St.value=!1},Ss=()=>{if(!_t.value)return 0;const _=Ar.value[_t.value.id];return _?tt.value==="predecessor"?_.left:_.left+_.width:0},uo=()=>{if(!_t.value)return 0;const _=Ar.value[_t.value.id];return _?_.top+_.height/2:0},On=B,Fs=a.ref(!1),Un=a.ref(!1),Hn=a.ref(0),aa=a.ref(!1);let rn=null;const In=a.ref(0),_r=a.ref(0);let Xn=!1,sa=!1;const nn=a.ref(!0),Jn=a.ref(!0);let oa=null;const Er=new Map,$a=a.ref(!0),qa=a.computed(()=>{if(Ae.value!==Ee.HOUR)return{startHour:0,endHour:0};const _=In.value,G=_r.value;if($a.value&&_===0)return{startHour:0,endHour:168};if($a.value){const Ce=new Date,Ue=fe.value.startDate,Se=Math.floor((Ce.getTime()-Ue.getTime())/(1e3*60*60));return{startHour:Math.max(0,Se-168),endHour:Se+168}}const de=xe.value.hour.cellWidth,we=Math.floor(_/de)-Jm,Be=Math.ceil((_+G)/de)+Jm;return{startHour:Math.max(0,we),endHour:Math.max(we+1,Be)}}),ja=a.ref(0),ns=a.ref(0);let Pn=null;a.watch([In,_r],([_,G])=>{Pn&&clearTimeout(Pn),Pn=window.setTimeout(()=>{ja.value=_,ns.value=G,Pn=null},100),ja.value===0&&ns.value===0&&(ja.value=_,ns.value=G)},{immediate:!0});const Sa=a.computed(()=>{const _=ja.value,G=ns.value||_r.value;let de=.3;Ae.value===Ee.WEEK?de=.15:(Ae.value===Ee.MONTH||Ae.value===Ee.QUARTER||Ae.value===Ee.YEAR)&&(de=.05);const we=G*de,Be=Fa(Math.max(0,_-we)),Ce=Fa(_+G+we);return{startDate:Be,endDate:Ce}}),Fa=_=>{var Be;const G=fe.value.startDate,de=fe.value.endDate,we=Ae.value;if(_<=0)return G;if(we===Ee.HOUR){const Ce=_/40;return new Date(G.getTime()+Ce*60*60*1e3)}else if(we===Ee.DAY){const Ce=_/30;return new Date(G.getTime()+Ce*24*60*60*1e3)}else if(we===Ee.WEEK||we===Ee.MONTH||we===Ee.QUARTER||we===Ee.YEAR){const Ce=re.value;if(!Ce||Ce.length===0)return G;let Ue=0;if(we===Ee.WEEK)for(const Se of Ce){const _e=Se.weeks||[];for(const ht of _e){const gt=xe.value.week.cellWidth;if(_>=Ue&&_<Ue+gt){const He=_-Ue,dt=gt/7,Qt=Math.floor(He/dt),De=ht.subDays||[];return Qt<De.length?new Date(De[Qt].date):new Date(ht.weekStart)}Ue+=gt}}else if(we===Ee.MONTH)for(const Se of Ce){const _e=xe.value.month.cellWidth;if(_>=Ue&&_<Ue+_e){const ht=_-Ue,gt=((Be=Se.monthData)==null?void 0:Be.dayCount)||30,He=_e/gt,dt=Math.floor(ht/He);return new Date(Se.year,Se.month-1,dt+1)}Ue+=_e}else if(we===Ee.QUARTER)for(const Se of Ce){const _e=Se.quarters||[];for(const ht of _e){const gt=xe.value.quarter.cellWidth;if(_>=Ue&&_<Ue+gt){const He=_-Ue,dt=new Date(ht.startDate),Qt=new Date(ht.endDate),De=Math.ceil((Qt.getTime()-dt.getTime())/(1e3*60*60*24)),Bt=gt/De,Pt=Math.floor(He/Bt);return new Date(dt.getTime()+Pt*24*60*60*1e3)}Ue+=gt}}else if(we===Ee.YEAR)for(const Se of Ce){const _e=Se.halfYears||[];for(const ht of _e){const gt=xe.value.year.cellWidth;if(_>=Ue&&_<Ue+gt){const He=_-Ue,dt=new Date(ht.startDate),Qt=new Date(ht.endDate),De=Math.ceil((Qt.getTime()-dt.getTime())/(1e3*60*60*24)),Bt=gt/De,Pt=Math.floor(He/Bt);return new Date(dt.getTime()+Pt*24*60*60*1e3)}Ue+=gt}}return console.warn(`[Sprint2-Debug] scrollPosition=${_} exceeds timelineData range (cumulative=${Ue}), returning end date`),de}return G},Mn=a.computed(()=>{var de,we;const _=$.value,G=j.value||600;if(c.value==="resource"){const Be=u.value;let Ce=0,Ue=Be.length;for(let _e=0;_e<Be.length;_e++){const ht=Be[_e].id,gt=((de=S.value)==null?void 0:de.get(ht))||0,He=D.value.get(ht),dt=(He==null?void 0:He.totalHeight)||x.value;if(gt+dt>=_-x.value*qc){Ce=_e;break}}const Se=_+G;for(let _e=Ce;_e<Be.length;_e++){const ht=Be[_e].id;if((((we=S.value)==null?void 0:we.get(ht))||0)>Se+x.value*qc){Ue=_e;break}}return{startIndex:Math.max(0,Ce),endIndex:Math.min(Be.length,Ue)}}else{const Be=b.value.cumulativeHeights,Ce=be.value.length;if(Ce===0||Be.length<=1)return{startIndex:0,endIndex:0};const Ue=gt=>{let He=0,dt=Be.length-1;for(;He<dt;){const Qt=Math.floor((He+dt)/2);Be[Qt]<=gt?He=Qt+1:dt=Qt}return Math.max(0,He-1)},Se=Math.max(0,Ue(_)-qc),_e=_+G,ht=Math.min(Ce,Ue(_e)+qc+1);return{startIndex:Se,endIndex:Math.min(Ce,Math.max(Se+1,ht))}}}),Hs=a.computed(()=>{const{startIndex:_,endIndex:G}=Mn.value;return be.value.slice(_,G).map((we,Be)=>({task:we,originalIndex:_+Be}))}),ps=a.computed(()=>{const{startIndex:_,endIndex:G}=Mn.value;return c.value!=="resource"?[]:u.value.slice(_,G).map((we,Be)=>({resource:we,originalIndex:_+Be}))});let va=null,It=[];const ce=new Set,Ye=a.shallowRef([]);a.watch([Hs,c],([_,G])=>{if(G!=="task"){va!==null&&(cancelAnimationFrame(va),va=null),It=[],ce.clear(),Ye.value=[];return}const de=new Set(_.map(Ue=>Ue.task.id)),we=[];if(ce.forEach(Ue=>{de.has(Ue)||(ce.delete(Ue),we.push(Ue))}),we.length>0){const Ue={...Ar.value};for(const Se of we)delete Ue[Se];Ar.value=Ue}const Be=_.filter(Ue=>!ce.has(Ue.task.id));if(va!==null&&(cancelAnimationFrame(va),va=null),It=Be,It.splice(0,Zm).forEach(Ue=>ce.add(Ue.task.id)),Ye.value=_.filter(Ue=>ce.has(Ue.task.id)),It.length>0){const Ue=()=>{const Se=It.splice(0,Zm);if(Se.length===0){va=null;return}Se.forEach(_e=>ce.add(_e.task.id)),Ye.value=Hs.value.filter(_e=>ce.has(_e.task.id)),va=It.length>0?requestAnimationFrame(Ue):null};va=requestAnimationFrame(Ue)}},{immediate:!0});const At=a.shallowRef(new Map),Ot=a.shallowRef(new Map),Ht=a.shallowRef(new Map),nr=a.ref("visible");let Vr=null;const Sn=a.computed(()=>{var _;return((_=r.taskBarConfig)==null?void 0:_.titlePosition)==="above"?wS:0}),jr=a.computed(()=>Sn.value+yS),wn=_=>_-jr.value-BS,fn=_=>{var G;return(G=D.value.get(_))==null?void 0:G.rowHeights},yn=()=>{Vr!==null&&(cancelAnimationFrame(Vr),Vr=null)},Ps=()=>{yn();const _=()=>{if(c.value!=="resource"){Vr=null;return}const G=performance.now(),de=new Map(Ht.value);let we=!1;Ot.value.forEach((Be,Ce)=>{if(performance.now()-G>mS){we=!0;return}const Ue=de.get(Ce)||0,Se=Be.visibleCount;if(Ue<Se){const _e=Math.min(Se,Ue+e0);de.set(Ce,_e),we=!0}}),we?(Ht.value=de,Vr=requestAnimationFrame(_)):Vr=null};Vr=requestAnimationFrame(_)},gr=()=>{if(c.value!=="resource"){Ot.value=new Map,Ht.value=new Map,nr.value="visible",At.value=new Map,yn();return}const{startDate:_,endDate:G}=Sa.value,de=Ae.value===Ee.HOUR,we=Ae.value,Be=we===Ee.HOUR||we===Ee.DAY||we===Ee.WEEK;let Ce,Ue;if(Be){const dt=In.value,Qt=_r.value,De=fe.value.startDate.getTime();let Bt=0;we===Ee.HOUR?Bt=xe.value.hour.cellWidth/(3600*1e3):we===Ee.DAY?Bt=xe.value.day.cellWidth/(1440*60*1e3):we===Ee.WEEK&&(Bt=xe.value.week.cellWidth/(10080*60*1e3));const yr=Qt*.1,Cr=Math.max(0,dt-yr),vr=dt+Qt+yr;Ce=De+Cr/Bt,Ue=De+vr/Bt}else Ce=_.getTime(),Ue=G.getTime();const Se=new Map,_e=new Map,ht=new Map(At.value),gt=new Map,He=Date.now();ps.value.forEach(({resource:dt})=>{const Qt=dt.id,De=dt.tasks||[],Bt=de?De:De.filter(Cr=>{if(!Cr.startDate||!Cr.endDate)return!1;const vr=new Date(Cr.startDate).getTime();return new Date(Cr.endDate).getTime()>=Ce&&vr<=Ue});De.forEach((Cr,vr)=>{const pn=Cr.id??`idx-${vr}`,en=`${Qt}-${pn}`,Zn=ht.get(en),os=(Zn==null?void 0:Zn.rendered)||!1;gt.set(en,{taskId:pn,resourceId:Qt,rendered:os,timestamp:os&&Zn?Zn.timestamp:He})}),Se.set(Qt,{tasks:Bt,visibleCount:Bt.length,totalCount:Bt.length,originalTasks:De});const Pt=Ht.value.get(Qt);let yr;Pt!==void 0&&Pt>=Bt.length?yr=Math.min(Pt,Bt.length):yr=Math.min(e0,Bt.length),_e.set(Qt,yr)}),Ot.value=Se,Ht.value=_e,nr.value="visible",At.value=gt,Ps()};a.watch(()=>[c.value,Ae.value,Sa.value,ps.value],()=>gr(),{immediate:!0}),a.watch(()=>Ht.value,_=>{if(c.value!=="resource")return;const G=new Map(At.value),de=Date.now();let we=0;Ot.value.forEach((Be,Ce)=>{const Ue=_.get(Ce)||0;Be.tasks.slice(0,Ue).forEach((_e,ht)=>{const gt=_e.id??`idx-${ht}`,He=`${Ce}-${gt}`,dt=G.get(He);dt&&!dt.rendered&&(dt.rendered=!0,dt.timestamp=de,we++)})}),we>0&&(At.value=G)},{deep:!1});const cA=a.computed(()=>{if(c.value!=="resource")return[];const{startDate:_,endDate:G}=Sa.value,de=Ae.value===Ee.HOUR;let we=0,Be=0;return ps.value.map(({resource:Ue,originalIndex:Se})=>{const _e=Ue.tasks||[];we+=_e.length;const ht=Ot.value.get(Ue.id),gt=Ht.value.get(Ue.id);let He;if(ht){const dt=gt??ht.visibleCount;He=ht.tasks.slice(0,dt)}else He=de?_e:_e.filter(dt=>{if(!dt.startDate||!dt.endDate)return!1;const Qt=new Date(dt.startDate);return new Date(dt.endDate)>=_&&Qt<=G});return Be+=He.length,{resource:{...Ue,tasks:He,allTasks:_e},originalIndex:Se}})}),Co=(_,G)=>{let de=null;return((...we)=>{const Be=()=>{de=null,_(...we)};de&&clearTimeout(de),de=window.setTimeout(Be,G)})},qo=Co(()=>{st()},200),fo=Co(()=>{as()},200),pe=()=>{const _=Ae.value,G=fe.value.startDate.getTime(),de=fe.value.endDate.getTime(),we=`${_}-${G}-${de}`,Be=Er.get(we);if(Be&&Date.now()-Be.timestamp<pS)return Be.data;let Ce;if(_===Ee.HOUR?Ce=ue():_===Ee.WEEK?Ce=ke():_===Ee.MONTH?Ce=Tc():_===Ee.QUARTER?Ce=xc():_===Ee.YEAR?Ce=El():Ce=Br(),Er.set(we,{data:Ce,timestamp:Date.now(),scale:_}),Er.size>vS){let Ue=null,Se=Date.now();Er.forEach((_e,ht)=>{_e.timestamp<Se&&(Se=_e.timestamp,Ue=ht)}),Ue&&Er.delete(Ue)}return Ce},Le=a.computed(()=>{const _=pe();if(Ae.value===Ee.HOUR&&Array.isArray(_)){const{startHour:G,endHour:de}=qa.value,we=[],Be=new Date(fe.value.startDate);Be.setHours(0,0,0,0);const Ce=Be.getTime(),Ue=1e3*60*60*24;for(const Se of _){const _e=new Date(Se.year,Se.month-1,Se.day);_e.setHours(0,0,0,0);const gt=Math.floor((_e.getTime()-Ce)/Ue)*24,He=Math.max(0,G-gt),dt=Math.min(Se.hours.length,de-gt);He<dt&&we.push({...Se,hours:Se.hours.slice(He,dt),hourOffset:gt+He,visibleHourStart:He,_debug:{totalHourOffset:gt,dayStartHour:He,dayEndHour:dt,visibleRange:{startHour:G,endHour:de}}})}return we}return _}),Je=a.computed(()=>{var we,Be;const _=pe();if(!Array.isArray(_))return 0;const G=Ae.value;if(G===Ee.HOUR){let Ce=0;for(const Ue of _)Ce+=Ue.hours.length;return Ce*xe.value.hour.cellWidth}if(G===Ee.QUARTER){let Ce=0;for(const Ue of _)Ce+=Ue.quarters.length;return Ce*xe.value.quarter.cellWidth}if(G===Ee.WEEK){let Ce=0;for(const Ue of _)Ce+=((we=Ue.weeks)==null?void 0:we.length)||0;return Ce*xe.value.week.cellWidth}if(G===Ee.MONTH)return _.length*xe.value.month.cellWidth;if(G===Ee.YEAR)return _.length*xe.value.year.cellWidth*2;let de=0;for(const Ce of _)de+=((Be=Ce.days)==null?void 0:Be.length)||0;return de*xe.value.day.cellWidth});let Re=null,mt=null,kt=null;const at=a.ref(new Map),st=()=>{const _=new Map,G=fe.value.startDate.getTime(),de=In.value,we=de+_r.value;for(const Be of be.value)if(Be.type==="milestone-group"&&Be.children)for(const Ce of Be.children){const Ue=new Date(Ce.startDate||"");if(!isNaN(Ue.getTime())){const _e=Math.floor((Ue.getTime()-G)/864e5)*xe.value.day.cellWidth+xe.value.day.cellWidth/2-12,ht=_e-12,gt=_e+12;let He=!1,dt="none";gt<=de+12?(He=!0,dt="left"):ht>=we-12&&(He=!0,dt="right"),_.set(Ce.id,{left:_e,originalLeft:_e,isSticky:He,stickyPosition:dt})}}else if(Be.type==="milestone"){const Ce=new Date(Be.startDate||"");if(!isNaN(Ce.getTime())){const Ue=(Ce.getTime()-G)/864e5,_e=Math.floor(Ue)*rt.value+rt.value/2-12,ht=_e-12,gt=_e+12;let He=!1,dt="none";gt<=de+12?(He=!0,dt="left"):ht>=we-12&&(He=!0,dt="right"),_.set(Be.id,{left:_e,originalLeft:_e,isSticky:He,stickyPosition:dt})}}at.value=_},Ct=_=>{const G=[];return at.value.forEach((de,we)=>{we!==_&&G.push({id:we,left:de.left,originalLeft:de.originalLeft,isSticky:de.isSticky,stickyPosition:de.stickyPosition,priority:de.originalLeft})}),G};a.watch(B,_=>{if(!_){if(Ke.value){const G=Ke.value.clientWidth;Math.abs(G-_r.value)>1&&(Xn=!0,_r.value=G,a.nextTick(()=>{Xn=!1}))}if(la.value){const G=la.value.clientHeight;Math.abs(G-j.value)>1&&(j.value=G)}nn.value=!0,setTimeout(()=>{nn.value=!1},300)}});const Tt=()=>{},Wt=()=>{};a.watch(w,_=>{if(!_&&Ke.value){const G=Ke.value.clientWidth;Math.abs(G-_r.value)>1&&(Xn=!0,_r.value=G,a.nextTick(()=>{Xn=!1}))}});const tr=()=>{nn.value=!0,Ar.value={},g.value++,Kr=null,oa&&clearTimeout(oa),oa=setTimeout(()=>{nn.value=!1,oa=null,as()},300)},zt=_=>{On.value||za.value||(ye.value=_,window.dispatchEvent(new CustomEvent("timeline-task-hover",{detail:_})))},qt=a.computed(()=>{if(c.value==="resource"){const de=u.value;let we=0;return de.forEach(Be=>{const Ce=D.value.get(Be.id);we+=(Ce==null?void 0:Ce.totalHeight)||x.value}),Math.max(we,400,j.value)}const G=b.value.totalHeight;return Math.max(G,400,j.value)}),Dr=_=>{za.value||(ye.value=_.detail)},Sr=_=>{const G=_.detail;Tr(G)},Yt=()=>{re.value=Bn()},pr=_=>{$e.value||s("milestone-double-click",_)},Wr=_=>{r.onMilestoneSave&&typeof r.onMilestoneSave=="function"&&r.onMilestoneSave(_),window.dispatchEvent(new CustomEvent("milestone-data-updated",{detail:{milestone:_}}))},Bn=()=>pe(),wr=()=>{Er.clear()},Br=()=>{const _=[],G=new Date(fe.value.startDate);for(;G<=fe.value.endDate;){const de=G.getFullYear(),we=G.getMonth()+1,Be=[],Ce=new Date(de,we,0).getDate();for(let Ue=1;Ue<=Ce;Ue++){const Se=new Date(de,we-1,Ue),_e=Se.getDay(),ht=_e===0||_e===6;Be.push({day:Ue,date:Se,label:String(Ue).padStart(2,"0"),isToday:q(Se),isWeekend:ht})}_.push({year:de,month:we,yearMonthLabel:o(de,we),startDate:new Date(G),endDate:new Date(de,we,0),days:Be}),G.setMonth(G.getMonth()+1)}return _},P=(_,G)=>{if(G===0||G===6)return!1;const de=r.workingHours;if(!de)return!1;if(de.morning){const{start:we,end:Be}=de.morning;if(_>=we&&_<=Be)return!0}if(de.afternoon){const{start:we,end:Be}=de.afternoon;if(_>=we&&_<=Be)return!0}return!1},ue=()=>{const _=[],G=new Date(fe.value.startDate);for(;G<=fe.value.endDate;){const de=G.getFullYear(),we=G.getMonth()+1,Be=G.getDate(),Ce=[],Ue=G.getDay();for(let Se=0;Se<24;Se++){const _e=new Date(de,we-1,Be,Se);Ce.push({hour:Se,label:`${String(Se).padStart(2,"0")}:00`,shortLabel:String(Se).padStart(2,"0"),date:_e,isToday:q(_e)&&Se===new Date().getHours(),isWorkingHour:P(Se,Ue),isWeekend:Ue===0||Ue===6})}_.push({year:de,month:we,day:Be,date:new Date(G),dateLabel:`${de}/${String(we).padStart(2,"0")}/${String(Be).padStart(2,"0")}`,isToday:q(G),hours:Ce}),G.setDate(G.getDate()+1)}return _},ke=()=>{const _=[],G=new Date(fe.value.startDate),de=new Date(fe.value.endDate),we=new Date(G),Be=we.getDay()||7;we.setDate(we.getDate()-(Be-1));const Ce=new Date(we);for(;Ce<=de;){const _e=new Date(Ce);_e.setDate(_e.getDate()+6),_.push({weekStart:new Date(Ce),weekEnd:new Date(_e),label:`${Ce.getDate()}`,isToday:nt(Ce,_e),subDays:Ge(Ce),belongsToYear:Ce.getFullYear(),belongsToMonth:Ce.getMonth()+1}),Ce.setDate(Ce.getDate()+7)}const Ue=new Map;for(const _e of _){const ht=_e,gt=ht.belongsToYear,He=ht.belongsToMonth,dt=`${gt}-${He}`;Ue.has(dt)||Ue.set(dt,{year:gt,month:He,yearMonthLabel:o(gt,He),startDate:new Date(gt,He-1,1),endDate:new Date(gt,He,0),weeks:[],isWeekView:!0}),Ue.get(dt).weeks.push(_e)}return Array.from(Ue.values()).sort((_e,ht)=>_e.year!==ht.year?_e.year-ht.year:_e.month-ht.month)},Ge=_=>{const G=[];for(let de=0;de<7;de++){const we=new Date(_);we.setDate(we.getDate()+de),G.push({date:new Date(we),dayOfWeek:we.getDay()})}return G},nt=(_,G)=>{const de=new Date;return de.setHours(0,0,0,0),de>=_&&de<=G},v=(_,G)=>{let de=0;for(let we=0;we<_;we++){const Be=re.value[we];Be&&Be.isWeekView&&Be.weeks?de+=Be.weeks.length*xe.value.week.cellWidth:Be&&Be.days&&(de+=Be.days.length*xe.value.day.cellWidth)}return de+=G*xe.value.week.cellWidth,de},I=_=>{if(Zi.start(`updateTimeScale-${_}`),Ae.value=_,$a.value=!0,wr(),_===Ee.HOUR){const G=pt();he=!0,fe.value={...fe.value,startDate:G.startDate,endDate:G.endDate},he=!1}else if(_===Ee.DAY){const G=Oe();he=!0,fe.value={...fe.value,startDate:G.startDate,endDate:G.endDate},he=!1}if(_===Ee.WEEK){const G=it();he=!0,fe.value={...fe.value,startDate:G.startDate,endDate:G.endDate},he=!1}if(_===Ee.MONTH){const G=W();he=!0,fe.value={...fe.value,startDate:G.startDate,endDate:G.endDate},he=!1}if(_===Ee.QUARTER){const G=z();he=!0,fe.value={...fe.value,startDate:G.startDate,endDate:G.endDate},he=!1}if(_===Ee.YEAR){const G=z();he=!0,fe.value={...fe.value,startDate:G.startDate,endDate:G.endDate},he=!1}re.value=Bn(),a.nextTick(()=>{s("timeline-scale-changed",_),window.dispatchEvent(new CustomEvent("timeline-scale-updated")),setTimeout(()=>{window.dispatchEvent(new CustomEvent("timeline-force-recalculate")),setTimeout(()=>{ut(),Zi.end(`updateTimeScale-${_}`),Zi.report()},100)},50)})},q=_=>{const G=new Date;return _.getDate()===G.getDate()&&_.getMonth()===G.getMonth()&&_.getFullYear()===G.getFullYear()},re=a.shallowRef(Bn());let he=!1;a.watch(()=>[fe.value.startDate,fe.value.endDate],()=>{he||(wr(),re.value=Bn())}),a.watch([re,Ae],([_,G])=>{if(_&&G){const de=Object.fromEntries(Object.entries(xe.value).map(([we,Be])=>[we,Be.cellWidth]));$d.buildCache(_,G,de)}},{immediate:!0});let Me=!1,Qe=null;a.watch(()=>[re.value,fe.value.startDate,fe.value.endDate],()=>{Me||(Qe&&clearTimeout(Qe),Qe=setTimeout(()=>{Qe=null,!Me&&(Me=!0,a.nextTick(()=>{ut()}))},120))});const ut=(_=0)=>{nn.value=!0,Jn.value=!0;const G=new Date,de=fe.value.startDate,we=new Date(G.getFullYear(),G.getMonth(),G.getDate());let Be;if(Ae.value===Ee.YEAR||Ae.value===Ee.QUARTER){const He=z();Be=new Date(He.startDate.getFullYear(),He.startDate.getMonth(),He.startDate.getDate())}else if(Ae.value===Ee.MONTH){const He=W();Be=new Date(He.startDate.getFullYear(),He.startDate.getMonth(),He.startDate.getDate())}else Be=new Date(de.getFullYear(),de.getMonth(),de.getDate());const Ce=we.getTime()-Be.getTime(),Ue=Math.floor(Ce/(1e3*60*60*24));let Se;if(Ae.value===Ee.HOUR){const He=G.getHours(),dt=G.getMinutes(),Qt=Ue*rt.value,De=He*xe.value.hour.cellWidth,Bt=dt/60*xe.value.hour.cellWidth;Se=Qt+De+Bt}else if(Ae.value===Ee.QUARTER){const He=we.getFullYear(),dt=Be.getFullYear(),Qt=xe.value.quarter.cellWidth,De=Qt*4;Se=(He-dt)*De;const Pt=we.getMonth()+1;let yr=1;Pt>=1&&Pt<=3||(Pt>=4&&Pt<=6?yr=2:Pt>=7&&Pt<=9?yr=3:yr=4),Se+=(yr-1)*Qt;let Cr,vr;yr===1?(Cr=new Date(He,0,1),vr=new Date(He,2,31)):yr===2?(Cr=new Date(He,3,1),vr=new Date(He,5,30)):yr===3?(Cr=new Date(He,6,1),vr=new Date(He,8,30)):(Cr=new Date(He,9,1),vr=new Date(He,11,31));const pn=Math.floor((we.getTime()-Cr.getTime())/(1e3*60*60*24)),en=Math.floor((vr.getTime()-Cr.getTime())/(1e3*60*60*24))+1,Zn=pn/en*Qt;Se+=Zn}else if(Ae.value===Ee.MONTH){const He=we.getFullYear(),dt=we.getMonth()+1,Qt=Be.getFullYear(),De=Be.getMonth()+1,Bt=(He-Qt)*12+(dt-De),Pt=xe.value.month.cellWidth;Se=Bt*Pt;const yr=we.getDate(),Cr=new Date(He,dt,0).getDate(),vr=yr/Cr*Pt;Se+=vr}else if(Ae.value===Ee.YEAR){const He=re.value;let dt=0;const Qt=xe.value.year.cellWidth;let De=!1;for(const Bt of He){const Pt=Bt.halfYears||[];for(const yr of Pt){const Cr=new Date(yr.startDate),vr=new Date(yr.endDate);if(Cr.setHours(0,0,0,0),vr.setHours(0,0,0,0),we<Cr){De=!0;break}if(we>=Cr&&we<=vr){const pn=vr.getTime()-Cr.getTime(),Zn=(we.getTime()-Cr.getTime())/pn;dt+=Zn*Qt,De=!0;break}dt+=Qt}if(De)break}Se=dt}else Se=Ue*rt.value;const _e=Ke.value;if(!_e){_<10&&setTimeout(()=>ut(_+1),60);return}const ht=_e.clientWidth;if(ht===0&&_<10){setTimeout(()=>ut(_+1),60);return}const gt=Se-ht/2+15;typeof _e.scrollTo=="function"?_e.scrollTo({left:Math.max(0,gt),behavior:"smooth"}):_e.scrollLeft=Math.max(0,gt),setTimeout(()=>{Jn.value=!1,Ae.value===Ee.HOUR&&($a.value=!1),setTimeout(()=>{nn.value=!1},300)},1500)},Dt=a.computed(()=>{if(Ae.value!==Ee.YEAR)return-1;const _=new Date;_.setHours(0,0,0,0);const G=re.value;if(!G||G.length===0)return-1;let de=0;const we=xe.value.year.cellWidth;for(const Be of G){const Ce=Be.halfYears||[];for(const Ue of Ce){const Se=new Date(Ue.startDate),_e=new Date(Ue.endDate);if(Se.setHours(0,0,0,0),_e.setHours(0,0,0,0),_<Se)return de;if(_>=Se&&_<=_e){const ht=_e.getTime()-Se.getTime(),He=(_.getTime()-Se.getTime())/ht;return de+He*we}de+=we}}return de}),xt=a.computed(()=>{if(Ae.value!==Ee.YEAR)return!1;const _=new Date,G=new Date(_.getFullYear(),_.getMonth(),_.getDate()),de=z(),we=de.startDate,Be=de.endDate;return G>=we&&G<=Be}),Zt=()=>{if(be.value.length===0){er();return}const _=[];for(const gt of be.value)gt.startDate&&_.push(new Date(gt.startDate));if(_.length===0){er();return}let G=1/0;for(const gt of _){const He=gt.getTime();He<G&&(G=He)}const de=new Date(G),we=de.getFullYear(),Be=de.getMonth(),Ce=de.getDate();let Ue=0;for(let gt=0;gt<Be;gt++)Ue+=new Date(we,gt+1,0).getDate();Ue+=Ce;const Se=Xe.value,_e=Se==null?void 0:Se.clientWidth,ht=(Ue-1)*30-(_e?_e/2:200);Ke.value&&(Ke.value.scrollLeft=Math.max(0,ht))},er=()=>{const _=new Date,G=fe.value.startDate,de=new Date(_.getFullYear(),_.getMonth(),_.getDate()),we=new Date(G.getFullYear(),G.getMonth(),G.getDate()),Be=de.getTime()-we.getTime(),Ce=Math.floor(Be/(1e3*60*60*24));if(Ce<0||de>fe.value.endDate)return;const Ue=Ce*30,Se=Ke.value;if(!Se)return;const _e=Se.clientWidth,ht=Ue-_e/2+15;Se.scrollTo({left:Math.max(0,ht),behavior:"smooth"}),setTimeout(()=>{const gt=document.querySelectorAll(".day-column.today");for(const He of gt)He.classList.add("today-highlight"),setTimeout(()=>{He.classList.remove("today-highlight")},2e3)},500)},Ur=_=>{const G=typeof _=="string"?new Date(_):_,de=fe.value.startDate,we=new Date(G.getFullYear(),G.getMonth(),G.getDate());let Be;if(Ae.value===Ee.YEAR||Ae.value===Ee.QUARTER){const He=z();Be=new Date(He.startDate.getFullYear(),He.startDate.getMonth(),He.startDate.getDate())}else if(Ae.value===Ee.MONTH){const He=W();Be=new Date(He.startDate.getFullYear(),He.startDate.getMonth(),He.startDate.getDate())}else Be=new Date(de.getFullYear(),de.getMonth(),de.getDate());const Ce=we.getTime()-Be.getTime(),Ue=Math.floor(Ce/(1e3*60*60*24));let Se;if(Ae.value===Ee.HOUR){const He=G.getHours(),dt=G.getMinutes(),Qt=Ue*rt.value,De=He*xe.value.hour.cellWidth,Bt=dt/60*xe.value.hour.cellWidth;Se=Qt+De+Bt}else if(Ae.value===Ee.QUARTER){const He=we.getFullYear(),dt=Be.getFullYear(),Qt=xe.value.quarter.cellWidth,De=Qt*4;Se=(He-dt)*De;const Pt=Math.floor(we.getMonth()/3);Se+=Pt*Qt;const yr=Pt*3,Cr=new Date(He,yr,1),vr=Math.floor((we.getTime()-Cr.getTime())/(1e3*60*60*24));Se+=vr/91*Qt}else if(Ae.value===Ee.YEAR){const He=we.getFullYear(),dt=Be.getFullYear(),Qt=xe.value.year.cellWidth*2;Se=(He-dt)*Qt;const Bt=new Date(He,0,1),Pt=Math.floor((we.getTime()-Bt.getTime())/(1e3*60*60*24));Se+=Pt/365*Qt}else if(Ae.value===Ee.MONTH){const He=we.getFullYear(),dt=we.getMonth(),Qt=Be.getFullYear(),De=Be.getMonth(),Bt=xe.value.month.cellWidth;Se=((He-Qt)*12+(dt-De))*Bt;const yr=we.getDate(),Cr=new Date(He,dt+1,0).getDate();Se+=yr/Cr*Bt}else if(Ae.value===Ee.WEEK){const He=xe.value.week.cellWidth;Se=Ue/7*He}else Se=Ue*rt.value;const _e=Ke.value;if(!_e)return;const ht=_e.clientWidth,gt=Se-ht/2;_e.scrollTo({left:Math.max(0,gt),behavior:"smooth"})},br=_=>{Zi.start("updateTask"),window.dispatchEvent(new CustomEvent("task-updated",{detail:_})),Zi.end("updateTask")},Tr=_=>{$e.value||s("edit-task",_)},Yr=(_,G)=>{$e.value||s("click-task",_,G)},Ar=a.shallowRef({}),xr=a.shallowRef({});let Zr=null,La=null,Ua=0,Ir=!1,Gr="",Qn=30,ma=null;function Ya(){Zr!==null&&(typeof cancelIdleCallback<"u"?cancelIdleCallback(Zr):cancelAnimationFrame(Zr),Zr=null),La=null}function Ia(_){const G=La;if(!G)return;const de=Gr,we=Qn,Be=ma,Ce={},Ue=Date.now();for(;Ua<G.length&&!(_?_.timeRemaining()<1:Date.now()-Ue>4);){const Se=G[Ua];if(!Ir&&xr.value[Se.id]){Ua++;continue}const _e=b.value,ht=_e.cumulativeHeights[Ua]||0,gt=_e.taskHeights.get(Se.id)??x.value,He=c4(Se,ht,de,$d,we,Be,gt);He&&(Ce[Se.id]=He),Ua++}Object.keys(Ce).length>0&&(xr.value={...Ce,...xr.value}),Ua<G.length?typeof requestIdleCallback<"u"?Zr=requestIdleCallback(Ia,{timeout:1e3}):Zr=requestAnimationFrame(()=>Ia()):(La=null,Zr=null)}function Aa(_){Ya(),!(be.value.length===0||c.value!=="task")&&(La=[...be.value],Ua=0,Ir=_,Gr=Ae.value,Qn=rt.value,ma=se.value,typeof requestIdleCallback<"u"?Zr=requestIdleCallback(Ia,{timeout:1e3}):Zr=requestAnimationFrame(()=>Ia()))}const wa=a.ref(null),Oa=a.ref(null),uA=a.ref(0),Vs=a.ref(0),ia=a.ref(0),UA=a.ref(0),jo=a.ref(0),IA=a.ref(0);function Ws(){const _=Math.max(_r.value,300),G=Math.max(j.value,300);return{width:Math.min(Math.max(_*3,2e3),8e3),height:Math.min(Math.max(G*3,1200),4e3)}}function as(){if(wa.value){const _=wa.value.offsetWidth,G=qt.value,de=In.value,we=$.value,{width:Be,height:Ce}=Ws();ia.value=Be;const Ue=Be/3;let Se=Math.max(0,de-Ue);if(_<=Be)Se=0;else{const He=_-Be;Se=Math.min(Se,He)}jo.value=Se;const _e=Math.min(G,Ce);UA.value=_e,uA.value=ia.value,Vs.value=_e;const ht=_e/3;let gt=Math.max(0,we-ht);if(G<=_e)gt=0;else{const He=G-_e;gt=Math.min(gt,He)}IA.value=gt}}const vs={};let ko=!1;function Yo(_){if(!wa.value)return;(!Kr||Fr)&&(Kr=wa.value.getBoundingClientRect(),on=Date.now(),Fr=!1);const G=Kr;if(vs[_.id]={left:_.left-G.left,top:_.top-G.top,width:_.width,height:_.height},!ko){if(V.value)return;ko=!0,Promise.resolve().then(()=>{ko=!1,Ar.value={...Ar.value,...vs},xr.value={...xr.value,...vs};for(const de in vs)delete vs[de];setTimeout(()=>as(),200)})}}a.watch(V,_=>{if(!_&&Object.keys(vs).length!==0){ko=!1,Ar.value={...Ar.value,...vs},xr.value={...xr.value,...vs};for(const G in vs)delete vs[G];setTimeout(()=>as(),200)}});const MA=_=>{if(c.value==="resource"&&u.value){for(const G of u.value)if(G.tasks){const de=G.tasks.findIndex(we=>we.id===_.id);if(de!==-1){G.tasks[de]={...G.tasks[de],..._};break}}}y.value=_.id,window.dispatchEvent(new CustomEvent("taskbar-drag-end",{detail:_}))},Ga=_=>{if(c.value==="resource"&&u.value){for(const G of u.value)if(G.tasks){const de=G.tasks.findIndex(we=>we.id===_.id);if(de!==-1){G.tasks[de]={...G.tasks[de],..._};break}}}y.value=_.id,window.dispatchEvent(new CustomEvent("taskbar-resize-end",{detail:_}))},ss=_=>{window.dispatchEvent(new CustomEvent("context-menu",{detail:_}))},dA=_=>{if(Rr.value){nn.value=!0;const G=Rr.value.scrollWidth-Rr.value.clientWidth,de=Math.max(0,Math.min(_,G));Rr.value.scrollTo({left:de,behavior:"smooth"}),setTimeout(()=>{nn.value=!1},1e3)}},Eo=_=>{window.dispatchEvent(new CustomEvent("milestone-drag-end",{detail:_}))};a.onMounted(()=>{a.nextTick(()=>{setTimeout(()=>{ut()},60)}),window.addEventListener("task-row-double-click",Sr),window.addEventListener("task-list-hover",Dr),window.addEventListener("task-list-vertical-scroll",Do),window.addEventListener("locale-changed",Yt),window.addEventListener("splitter-drag-start",Tt),window.addEventListener("splitter-drag-end",Wt),window.addEventListener("timeline-container-resized",tr),window.addEventListener("milestone-click-locate",kl),window.addEventListener("drag-boundary-check",bn),window.addEventListener("taskbar-highlighted",fA),window.addEventListener("resource-taskbar-drop",xo),a.nextTick(()=>{const _=document.querySelector(".timeline-body"),G=document.querySelector(".timeline"),de=document.querySelector(".gantt-panel-right");if(la.value=_,Ke.value=G,Xe.value=de,_&&(j.value=_.clientHeight,Re=new ResizeObserver(we=>{if(!B.value)for(const Be of we)j.value=Be.contentRect.height}),Re.observe(_)),G){In.value=G.scrollLeft,_r.value=G.clientWidth;const we=new ResizeObserver(Be=>{if(!B.value&&!w.value)for(const Ce of Be){const Ue=Ce.contentRect.width;Math.abs(Ue-_r.value)>1&&(_r.value=Ue,nn.value=!0,oa&&clearTimeout(oa),oa=setTimeout(()=>{nn.value=!1,oa=null},300))}});we.observe(G),Re||(Re=we)}}),setTimeout(()=>{ut(),as()},200),mt=()=>{Fr=!0,as()},window.addEventListener("resize",mt),kt=()=>{document.visibilityState==="visible"&&(Fr=!0,as())},document.addEventListener("visibilitychange",kt)});const Do=_=>{const{scrollTop:G}=_.detail;$.value=G,fo(),la.value&&Math.abs(la.value.scrollTop-G)>1&&(Y=!0,la.value.scrollTop=G,Promise.resolve().then(()=>{Y=!1}))},QA=_=>{const G=_.target;if(!G)return;const de=G.scrollTop;$.value=de,Fr=!0,V.value=!0,L!==null&&clearTimeout(L),L=setTimeout(()=>{L=null,V.value=!1},150),fo(),!za.value&&(Y||de>=0&&window.dispatchEvent(new CustomEvent("timeline-vertical-scroll",{detail:{scrollTop:de}})))};a.watch(()=>{var _;return(_=be.value)==null?void 0:_.length},(_,G)=>{Et(),st(),G===0&&_>0&&(Me=!1,c.value==="resource"&&(sa=!0),zo(50)),a.nextTick(()=>{as()})},{immediate:!0}),a.watch(be,_=>{Kt.clear();const G=de=>{Kt.set(de.id,de),de.children&&de.children.length>0&&de.children.forEach(G)};_.forEach(G)},{immediate:!0});const za=a.ref(!1);a.provide("isDraggingTimeline",za);const Kn=a.ref(0),Ri=a.ref(0),Ks=a.ref(0),$s=a.ref(0),Rr=a.ref(null),la=a.ref(null);let Zs=null;const To=a.ref(!1);let ho=null;const fA=()=>{const _=G=>{var we;if(m.value){document.removeEventListener("mousemove",_);return}const de=document.elementFromPoint(G.clientX,G.clientY);if(de){const Be=de.closest(".task-bar"),Ce=de.closest(".resize-handle-left, .resize-handle-right"),Ue=de.closest("button, input, select, textarea, .custom-task-content");if(Be||Ce||Ue){document.removeEventListener("mousemove",_);return}}G.buttons===1&&(za.value=!0,Kn.value=G.pageX,Ks.value=((we=Rr.value)==null?void 0:we.scrollLeft)||0,Rr.value&&(Rr.value.style.cursor="grabbing",Rr.value.style.userSelect="none"),document.addEventListener("mousemove",eo),document.addEventListener("mouseup",Fo)),document.removeEventListener("mousemove",_)};document.addEventListener("mousemove",_),setTimeout(()=>{document.removeEventListener("mousemove",_)},5e3)},xo=_=>{const G=_,{task:de,sourceRowIndex:we,mouseY:Be}=G.detail,Ce=la.value;if(!Ce)return;const Ue=Ce.getBoundingClientRect(),Se=Be-Ue.top+Ce.scrollTop,_e=u.value;let ht=-1,gt=1/0;for(let Qt=0;Qt<_e.length;Qt++){const De=_e[Qt],Bt=String(De.id),Pt=S.value.get(Bt)||0,yr=D.value.get(Bt),Cr=(yr==null?void 0:yr.totalHeight)||x.value,vr=Pt+Cr/2,pn=Math.abs(Se-vr);pn<gt&&(gt=pn,ht=Qt)}ht===-1&&_e.length>0&&(Se<0?ht=0:ht=_e.length-1);const He=G.detail.calculatedStartDate,dt=G.detail.calculatedEndDate;if(ht!==we&&ht>=0&&ht<_e.length){const Qt=_e[ht];s("resource-drag-end",{task:de,sourceResourceIndex:we,targetResourceIndex:ht,targetResource:Qt,newStartDate:He,newEndDate:dt})}},So=_=>{var Be,Ce;const G=_.target,de=G.closest(".timeline-header"),we=G.closest(".timeline-body");if(!(!de&&!we)){if(we){if(G.closest(".resize-handle-left, .resize-handle-right"))return;const Se=G.closest(".task-bar");if(Se){const _e=Se.classList.contains("highlighted"),ht=Se.classList.contains("primary-highlight");if(!_e&&!ht)return}else if([".milestone","button","input","select","textarea",".custom-task-content",".progress-bar",".task-name",".task-controls"].some(gt=>G.closest(gt)))return}za.value=!0,Kn.value=_.pageX,Ri.value=_.pageY,Ks.value=((Be=Rr.value)==null?void 0:Be.scrollLeft)||0,!la.value&&Rr.value&&(la.value=Rr.value.querySelector(".timeline-body")),$s.value=((Ce=la.value)==null?void 0:Ce.scrollTop)||0,Rr.value&&(Rr.value.style.cursor="grabbing",Rr.value.style.userSelect="none"),_.preventDefault(),document.addEventListener("mousemove",eo),document.addEventListener("mouseup",Fo)}},eo=_=>{!za.value||!Rr.value||(_.preventDefault(),Zs!==null&&cancelAnimationFrame(Zs),Zs=requestAnimationFrame(()=>{if(!Rr.value)return;const G=_.pageX,de=_.pageY,we=(G-Kn.value)*1.5,Be=(de-Ri.value)*1.5;if(Rr.value.scrollLeft=Ks.value-we,la.value){const Ce=$s.value-Be;la.value.scrollTop=Ce;const Ue=document.querySelector(".task-list-body");Ue&&(Ue.scrollTop=Ce)}Zs=null}))},Fo=()=>{za.value&&(za.value=!1,Zs!==null&&(cancelAnimationFrame(Zs),Zs=null),Rr.value&&(Rr.value.style.cursor="grab",Rr.value.style.userSelect="auto"),ye.value=null,document.removeEventListener("mousemove",eo),document.removeEventListener("mouseup",Fo))},Xa=_=>{var Ue;const G=_.target;if(!G)return;const de=G.scrollLeft;if(In.value=de,window.dispatchEvent(new CustomEvent("close-all-taskbar-menus")),Fr=!0,_r.value===0&&(_r.value=G.clientWidth),$a.value&&de>0&&($a.value=!1),fo(),za.value)return;if(Ae.value===Ee.HOUR){aa.value=!0,rn&&clearTimeout(rn),rn=setTimeout(()=>{aa.value=!1},200);return}const we=G.scrollWidth,Be=G.clientWidth,Ce=we-Be;Hn.value=Ce>0?de/Ce:0,Fs.value=de>20,Un.value=de<Ce-20,aa.value=!0,(Ue=G.classList)==null||Ue.add("scrolling"),qo(),rn&&clearTimeout(rn),rn=setTimeout(()=>{var Se;aa.value=!1,(Se=G.classList)==null||Se.remove("scrolling")},500)},to=_=>{if(To.value||!Rr.value)return;To.value=!0;const G=()=>{if(!Rr.value||!To.value)return;const de=Rr.value.scrollLeft,we=Rr.value.scrollWidth-Rr.value.clientWidth;let Be;if(_==="left"?Be=Math.max(0,de-r0):Be=Math.min(we,de+r0),Be===de){gn();return}Rr.value.scrollLeft=Be,window.dispatchEvent(new CustomEvent("timeline-auto-scroll",{detail:{scrollDelta:Be-de}})),ho=window.setTimeout(G,16)};G()},gn=()=>{To.value=!1,ho&&(clearTimeout(ho),ho=null)},bn=_=>{const{mouseX:G,mouseY:de,isDragging:we,isResourceView:Be,taskId:Ce,rowIndex:Ue}=_.detail;if(!we||!Rr.value){gn();return}const Se=Rr.value.getBoundingClientRect(),_e=G-Se.left;if(Be&&de&&la.value){const ht=la.value.getBoundingClientRect(),gt=de-ht.top+la.value.scrollTop,He=u.value;let dt=-1,Qt=1/0;for(let De=0;De<He.length;De++){const Bt=He[De],Pt=String(Bt.id),yr=S.value.get(Pt)||0,Cr=D.value.get(Pt),vr=(Cr==null?void 0:Cr.totalHeight)||x.value,pn=yr+vr/2,en=Math.abs(gt-pn);en<Qt&&(Qt=en,dt=De)}dt!==-1&&dt!==Ue&&window.dispatchEvent(new CustomEvent("resource-drag-over",{detail:{taskId:Ce,sourceRowIndex:Ue,targetRowIndex:dt,mouseY:gt}}))}_e<=t0&&Rr.value.scrollLeft>0?to("left"):_e>=Se.width-t0&&Rr.value.scrollLeft<Rr.value.scrollWidth-Rr.value.clientWidth?to("right"):gn()};a.onUnmounted(()=>{gn(),Ya(),na(),window.removeEventListener("task-row-double-click",Sr),window.removeEventListener("task-list-hover",Dr),window.removeEventListener("task-list-vertical-scroll",Do),window.removeEventListener("locale-changed",Yt),window.removeEventListener("splitter-drag-start",Tt),window.removeEventListener("splitter-drag-end",Wt),window.removeEventListener("timeline-container-resized",tr),window.removeEventListener("milestone-click-locate",kl),window.removeEventListener("drag-boundary-check",bn),window.removeEventListener("resource-taskbar-drop",xo),Re&&(Re.disconnect(),Re=null),mt&&(window.removeEventListener("resize",mt),mt=null),kt&&(document.removeEventListener("visibilitychange",kt),kt=null),document.removeEventListener("mousemove",eo),document.removeEventListener("mouseup",Fo)});const $n=(_,G)=>{s("delete",_,G)},ca=_=>{const G=be.value.find(Ce=>Ce.id===_.targetTaskId);if(!G||!G.predecessor)return;const we=vo(G.predecessor).filter(Ce=>Ce!==_.sourceTaskId),Be={...G,predecessor:we.length>0?we:void 0};s("link-deleted",{sourceTaskId:_.sourceTaskId,targetTaskId:_.targetTaskId,updatedTask:Be}),br(Be),wr()},Lo=a.computed(()=>{if(Ae.value!==Ee.MONTH)return{};const _={},G=re.value;for(const de of G){const Be=de.year;_[Be]||(_[Be]=[]),_[Be].push(de)}return _}),ii=a.computed(()=>{if(Ae.value!==Ee.WEEK)return[];const _=[],G=re.value;for(let de=0;de<G.length;de++){const we=G[de];if(!(!we.isWeekView||!we.weeks))for(let Be=0;Be<we.weeks.length;Be++){const Ue=we.weeks[Be].subDays||[];for(let Se=0;Se<Ue.length;Se++){const _e=Ue[Se];_e.date&&_e.date.getDate()===1&&_.push({left:v(de,Be)+Se*(xe.value.week.cellWidth/7),date:_e.date.getDate()})}}}return _}),NA=a.computed(()=>{if(Ae.value!==Ee.WEEK)return[];const _=[],G=re.value;for(let de=0;de<G.length;de++){const we=G[de];if(!(!we.isWeekView||!we.weeks))for(let Be=0;Be<we.weeks.length;Be++){const Ue=we.weeks[Be].subDays||[];for(let Se=0;Se<Ue.length;Se++){const _e=Ue[Se];_e.date&&_e.date.getDate()===1&&_.push({left:v(de,Be)+Se*(xe.value.week.cellWidth/7)})}}}return _}),Go=a.computed(()=>{if(Ae.value!==Ee.YEAR)return[];try{const _=El();return Array.isArray(_)?_:[]}catch{return[]}});t({scrollToTasks:Zt,scrollToToday:er,scrollToTodayCenter:ut,scrollToDate:Ur,timelineConfig:fe,updateTimeScale:I,highlightedTaskId:qe,clearHighlight:Ve});const Bl=_=>{s("start-timer",_)},bl=_=>{s("stop-timer",_)},Cl=_=>{const G=_.startDate||_.endDate||"";return{..._,type:"milestone",startDate:G,endDate:_.startDate||_.endDate}};let li=null;const zo=(_=50)=>{li&&clearTimeout(li),li=setTimeout(()=>{Dc(),li=null},_)},Dc=()=>{if(c.value==="resource"&&!sa)return;sa=!1;let _=null;Ae.value===Ee.HOUR?_=pt():Ae.value===Ee.DAY?_=Oe():Ae.value===Ee.WEEK?_=it():Ae.value===Ee.MONTH?_=W():(Ae.value===Ee.QUARTER||Ae.value===Ee.YEAR)&&(_=z()),_&&(wr(),he=!0,fe.value.startDate=_.startDate,fe.value.endDate=_.endDate,he=!1,re.value=Bn())};a.watch(_r,(_,G)=>{On.value||Xn||(!G||G===0||Math.abs(_-G)>50)&&_>0&&zo(100)},{immediate:!0});let ci=null;a.watch([re,_r],()=>{On.value||(ci&&clearTimeout(ci),ci=setTimeout(()=>{Fr=!0,Ar.value={},xr.value={},Aa(!0),g.value++,a.nextTick(()=>{setTimeout(()=>{as()},200)}),ci=null},100))}),a.watch([c,u],([_,G],[de,we])=>{Et(),_==="task"?(Me=!1,zo()):_==="resource"&&(_!==de||G!==we)&&(Me=!1,sa=!0,zo())}),a.watch(()=>be.value,_=>{Et(),Fr=!0;const G=new Set;for(const Be of _)G.add(String(Be.id));const de={};for(const Be in Ar.value)G.has(Be)&&(de[Be]=Ar.value[Be]);Ar.value=de;const we={};for(const Be in xr.value)G.has(Be)&&(we[Be]=xr.value[Be]);xr.value=we,Aa(!1)});const kl=_=>{const{scrollLeft:G,smooth:de}=_.detail,we=document.querySelector(".timeline"),Be=document.querySelector(".timeline-body");let Ce=null;if(we&&we.scrollWidth>we.clientWidth?Ce=we:Be&&Be.scrollWidth>Be.clientWidth&&(Ce=Be),Ce){const Ue=Ce.scrollWidth-Ce.clientWidth,Se=Math.min(Math.max(0,G),Ue);de?Ce.scrollTo({left:Se,behavior:"smooth"}):Ce.scrollLeft=Se}},Tc=()=>{let _,G;if(Ae.value===Ee.MONTH){const Ue=W();_=Ue.startDate,G=Ue.endDate}else _=new Date(fe.value.startDate),G=new Date(fe.value.endDate);const de={},we=new Date(_);for(we.setDate(1);we<=G;){const Ue=we.getFullYear(),Se=we.getMonth()+1,ht=new Date(Ue,Se,0).getDate(),gt=new Date,He=Ue===gt.getFullYear()&&Se===gt.getMonth()+1;de[Ue]||(de[Ue]={year:Ue,yearLabel:`${Ue}年`,months:[]}),de[Ue].months.push({year:Ue,month:Se,monthLabel:i(Se),startDate:new Date(Ue,Se-1,1),endDate:new Date(Ue,Se,0),isToday:He,dayCount:ht}),we.setMonth(we.getMonth()+1)}const Be=[];let Ce=0;for(const Ue of Object.values(de))for(const Se of Ue.months){const _e=[];for(let dt=1;dt<=Se.dayCount;dt++){const Qt=new Date(Se.year,Se.month-1,dt);_e.push({day:dt,date:new Date(Qt),dayOfWeek:Qt.getDay(),isToday:q(Qt),isWeekend:Qt.getDay()===0||Qt.getDay()===6})}const ht=xe.value.month.cellWidth,gt=Ce,He=Ce+ht;Be.push({year:Se.year,month:Se.month,yearMonthLabel:o(Se.year,Se.month),startDate:Se.startDate,endDate:Se.endDate,isMonthView:!0,monthData:{monthLabel:Se.monthLabel,isToday:Se.isToday,dayCount:Se.dayCount},subDays:_e,days:_e.map(dt=>({day:dt.day,date:dt.date,label:String(dt.day).padStart(2,"0"),isToday:dt.isToday,isWeekend:dt.isWeekend})),_debugInfo:{monthStartPosition:gt,monthEndPosition:He,monthWidth:ht}}),Ce+=ht}return Be},xc=()=>{const _=fe.value.startDate,G=fe.value.endDate,de=[],we=_.getFullYear(),Be=G.getFullYear();for(let Ce=we;Ce<=Be;Ce++){const Ue=[];for(let Se=1;Se<=4;Se++){const _e=(Se-1)*3,ht=new Date(Ce,_e,1),gt=_e+2,He=new Date(Ce,gt+1,0);Ue.push({quarter:Se,label:`Q${Se}`,fullLabel:`${Ce}年第${Se}季度`,startDate:ht,endDate:He,isToday:Sc(ht,He),year:Ce})}de.push({year:Ce,yearLabel:String(Ce),startDate:new Date(Ce,0,1),endDate:new Date(Ce,11,31),quarters:Ue})}return de},Sc=(_,G)=>{const de=new Date;return de.setHours(0,0,0,0),de>=_&&de<=G},El=()=>{const _=fe.value.startDate,G=fe.value.endDate,de=[],we=_.getFullYear(),Be=G.getFullYear();for(let Ce=we;Ce<=Be;Ce++){const Ue=[{label:l("halfYearFirst"),startDate:new Date(Ce,0,1),endDate:new Date(Ce,6,0),width:xe.value.year.cellWidth},{label:l("halfYearSecond"),startDate:new Date(Ce,6,1),endDate:new Date(Ce,11,31),width:xe.value.year.cellWidth}];de.push({year:Ce,startDate:new Date(Ce,0,1),endDate:new Date(Ce,11,31),halfYears:Ue,width:xe.value.year.cellWidth*2})}return de},Dl=_=>{s("add-predecessor",_)},Oi=_=>{s("add-successor",_)};return(_,G)=>{var de,we,Be,Ce,Ue,Se,_e,ht,gt,He,dt,Qt;return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{ref_key:"timelineContainer",ref:Rr,class:"timeline",style:a.normalizeStyle({"--gantt-day-cell-width":xe.value.day.cellWidth+"px","--gantt-week-cell-width":xe.value.week.cellWidth+"px"}),onMousedown:So,onScroll:Xa},[a.createElementVNode("div",u4,[Ae.value===a.unref(Ee).YEAR&&Go.value&&Go.value.length>0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",d4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Go.value,De=>(a.openBlock(),a.createElementBlock("div",{key:`year-${De.year}`,class:"timeline-year",style:a.normalizeStyle({width:xe.value.year.cellWidth*2+"px"})},[a.createElementVNode("div",f4,a.toDisplayString(Pe("year","primary")?lt(xe.value.year.formatters.primary,new Date(De.year,0,1)):De.year),1)],4))),128))]),a.createElementVNode("div",h4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Go.value,De=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`halfyear-${De.year}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.halfYears||[],Bt=>(a.openBlock(),a.createElementBlock("div",{key:`halfyear-${De.year}-${Bt.label}`,class:"timeline-half-year-item",style:a.normalizeStyle({width:xe.value.year.cellWidth+"px"})},[a.createElementVNode("div",g4,a.toDisplayString(Pe("year","secondary")?lt(xe.value.year.formatters.secondary,Bt.startDate):Bt.label),1)],4))),128))],64))),128))])],64)):Ae.value===a.unref(Ee).MONTH?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",p4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Lo.value,(De,Bt)=>(a.openBlock(),a.createElementBlock("div",{key:`year-${Bt}`,class:"timeline-year",style:a.normalizeStyle({width:De.length*xe.value.month.cellWidth+"px"})},[a.createElementVNode("div",v4,a.toDisplayString(Pe("month","primary")?lt(xe.value.month.formatters.primary,new Date(Number(Bt),0,1)):Bt),1)],4))),128))]),a.createElementVNode("div",m4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(re.value,De=>{var Bt,Pt;return a.openBlock(),a.createElementBlock("div",{key:`month-${De.year}-${De.month}`,class:a.normalizeClass(["timeline-month-item",{today:(Bt=De.monthData)==null?void 0:Bt.isToday}]),style:a.normalizeStyle({width:xe.value.month.cellWidth+"px"})},[a.createElementVNode("div",w4,a.toDisplayString(Pe("month","secondary")?lt(xe.value.month.formatters.secondary,new Date(De.year,De.month-1,1)):(Pt=De.monthData)==null?void 0:Pt.monthLabel),1)],6)}),128))])],64)):Ae.value===a.unref(Ee).QUARTER?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createElementVNode("div",y4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(re.value,De=>(a.openBlock(),a.createElementBlock("div",{key:`year-${De.year}`,class:"timeline-year",style:a.normalizeStyle({width:xe.value.quarter.cellWidth*4+"px"})},[a.createElementVNode("div",B4,a.toDisplayString(Pe("quarter","primary")?lt(xe.value.quarter.formatters.primary,new Date(De.year,0,1)):De.yearLabel),1)],4))),128))]),a.createElementVNode("div",b4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(re.value,De=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`quarters-${De.year}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.quarters,Bt=>(a.openBlock(),a.createElementBlock("div",{key:`quarter-${De.year}-${Bt.quarter}`,class:a.normalizeClass(["timeline-quarter-item",{today:Bt.isToday}]),style:a.normalizeStyle({width:xe.value.quarter.cellWidth+"px"})},[a.createElementVNode("div",C4,a.toDisplayString(Pe("quarter","secondary")?lt(xe.value.quarter.formatters.secondary,Bt.startDate):Bt.label),1)],6))),128))],64))),128))])],64)):Ae.value===a.unref(Ee).HOUR?(a.openBlock(),a.createElementBlock("div",{key:3,class:"hour-header-container",style:a.normalizeStyle({width:`${Je.value}px`})},[a.createElementVNode("div",k4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Le.value,De=>(a.openBlock(),a.createElementBlock("div",{key:`date-${De.year}-${De.month}-${De.day}`,class:"timeline-day-item",style:a.normalizeStyle({position:"absolute",width:`${De.hours.length*xe.value.hour.cellWidth}px`,left:`${(De.hourOffset||0)*xe.value.hour.cellWidth}px`})},[a.createElementVNode("div",E4,a.toDisplayString(De.dateLabel),1)],4))),128))]),a.createElementVNode("div",D4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Le.value,De=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`hours-${De.year}-${De.month}-${De.day}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.hours,(Bt,Pt)=>(a.openBlock(),a.createElementBlock("div",{key:`hour-${De.year}-${De.month}-${De.day}-${Bt.hour}`,class:a.normalizeClass(["timeline-hour-item",{today:Bt.isToday,"non-working-hour":!Bt.isWorkingHour}]),style:a.normalizeStyle({position:"absolute",width:`${xe.value.hour.cellWidth}px`,left:`${(De.hourOffset+Pt)*xe.value.hour.cellWidth}px`})},[a.createElementVNode("div",T4,a.toDisplayString(Bt.shortLabel),1)],6))),128))],64))),128))])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:4},[a.createElementVNode("div",x4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(re.value,De=>(a.openBlock(),a.createElementBlock("div",{key:`year-month-${De.year}-${De.month}`,class:"timeline-month",style:a.normalizeStyle({width:De.isWeekView?`${(De.weeks||[]).length*xe.value.week.cellWidth}px`:`${(De.days||[]).length*xe.value.day.cellWidth}px`})},[a.createElementVNode("div",S4,a.toDisplayString(Pe(Ae.value,"primary")?lt(xe.value[Ae.value].formatters.primary,new Date(De.year,De.month-1,1)):De.yearMonthLabel),1)],4))),128)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ii.value,(De,Bt)=>(a.openBlock(),a.createElementBlock("div",{key:`flag-${Bt}`,class:"month-first-flag",style:a.normalizeStyle({left:`${De.left}px`,transform:"translateX(-50%)"})},[G[2]||(G[2]=a.createElementVNode("div",{class:"flag-pole"},null,-1)),a.createElementVNode("div",F4,a.toDisplayString(De.date),1)],4))),128))]),a.createElementVNode("div",L4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(re.value,De=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`timeline-${De.year}-${De.month}`},[De.isWeekView&&De.weeks?(a.openBlock(),a.createElementBlock("div",{key:0,class:"timeline-month-weeks",style:a.normalizeStyle({width:`${(De.weeks||[]).length*xe.value.week.cellWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.weeks||[],Bt=>(a.openBlock(),a.createElementBlock("div",{key:`week-${De.year}-${De.month}-${Bt.label}`,class:a.normalizeClass(["timeline-week",{today:Bt.isToday}])},[a.createElementVNode("div",U4,a.toDisplayString(lt(xe.value.week.formatters.secondary??"W周",Bt.weekStart)),1),G[3]||(G[3]=a.createElementVNode("div",{class:"week-sub-days"},null,-1))],2))),128))],4)):(a.openBlock(),a.createElementBlock("div",{key:1,class:"timeline-month-days",style:a.normalizeStyle({width:`${De.days.length*xe.value.day.cellWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.days,Bt=>(a.openBlock(),a.createElementBlock("div",{key:`day-${De.year}-${De.month}-${Bt.day}`,class:a.normalizeClass(["timeline-day",{today:Bt.isToday,weekend:Bt.isWeekend&&!Bt.isToday}])},[a.createElementVNode("div",I4,a.toDisplayString(Pe("day","secondary")?lt(xe.value.day.formatters.secondary,Bt.date):Bt.label),1)],2))),128))],4))],64))),128))])],64))]),a.createElementVNode("div",{class:"timeline-body",onScroll:QA},[a.createElementVNode("div",{ref_key:"bodyContentRef",ref:wa,class:"timeline-body-content"},[a.createVNode(e4,{ref_key:"linkDragGuideRef",ref:Oa,active:!!tt.value&&!!_t.value,width:ia.value,height:UA.value,"offset-left":jo.value,"offset-top":IA.value},null,8,["active","width","height","offset-left","offset-top"]),xt.value&&Dt.value>=0?(a.openBlock(),a.createElementBlock("div",{key:0,class:"today-line-year-view",style:a.normalizeStyle({left:`${Dt.value}px`,height:`${qt.value}px`})},null,4)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"day-columns",style:a.normalizeStyle({height:`${qt.value}px`})},[Ae.value===a.unref(Ee).HOUR?(a.openBlock(),a.createElementBlock("div",{key:0,class:"hour-columns-container",style:a.normalizeStyle({width:`${Je.value}px`,height:`${qt.value}px`,position:"relative"})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Le.value,De=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`day-col-${De.year}-${De.month}-${De.day}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.hours,(Bt,Pt)=>(a.openBlock(),a.createElementBlock("div",{key:`hour-col-${De.year}-${De.month}-${De.day}-${Bt.hour}`,class:a.normalizeClass(["hour-column",{today:Bt.isToday,weekend:Bt.isWeekend,"working-hour":Bt.isWorkingHour,"rest-hour":!Bt.isWorkingHour&&!Bt.isWeekend}]),style:a.normalizeStyle({position:"absolute",width:`${xe.value.hour.cellWidth}px`,height:`${qt.value}px`,left:`${(De.hourOffset+Pt)*xe.value.hour.cellWidth}px`})},[a.createElementVNode("div",M4,[a.createElementVNode("div",{class:"quarter-line",style:a.normalizeStyle({left:`${xe.value.hour.cellWidth/4}px`})},null,4),a.createElementVNode("div",{class:"quarter-line",style:a.normalizeStyle({left:`${xe.value.hour.cellWidth/2}px`})},null,4),a.createElementVNode("div",{class:"quarter-line",style:a.normalizeStyle({left:`${xe.value.hour.cellWidth*3/4}px`})},null,4)])],6))),128))],64))),128))],4)):a.createCommentVNode("",!0),Ae.value===a.unref(Ee).YEAR?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(Go.value,De=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`year-col-${De.year}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.halfYears||[],Bt=>(a.openBlock(),a.createElementBlock("div",{key:`halfyear-col-${De.year}-${Bt.label}`,class:"half-year-column",style:a.normalizeStyle({width:xe.value.year.cellWidth+"px",height:`${qt.value}px`})},null,4))),128))],64))),128)):a.createCommentVNode("",!0),Ae.value===a.unref(Ee).QUARTER?(a.openBlock(),a.createElementBlock("div",{key:2,class:"quarter-columns-container",style:a.normalizeStyle({width:`${Je.value}px`,height:`${qt.value}px`,position:"relative"})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(re.value,(De,Bt)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:`quarter-col-${De.year}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.quarters,(Pt,yr)=>(a.openBlock(),a.createElementBlock("div",{key:`quarter-col-${De.year}-${Pt.quarter}`,class:a.normalizeClass(["quarter-column",{today:Pt.isToday}]),style:a.normalizeStyle({position:"absolute",width:`${xe.value.quarter.cellWidth}px`,height:`${qt.value}px`,left:`${Bt*xe.value.quarter.cellWidth*4+yr*xe.value.quarter.cellWidth}px`})},null,6))),128))],64))),128))],4)):Ae.value!==a.unref(Ee).HOUR&&Ae.value!==a.unref(Ee).YEAR&&Ae.value!==a.unref(Ee).QUARTER?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:3},a.renderList(re.value,De=>{var Bt;return a.openBlock(),a.createElementBlock(a.Fragment,{key:`day-col-${De.year}-${De.month}`},[De.isMonthView?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["month-column",{today:(Bt=De.monthData)==null?void 0:Bt.isToday}]),style:a.normalizeStyle({width:`${xe.value.month.cellWidth}px`,height:`${qt.value}px`})},null,6)):De.isWeekView&&De.weeks?(a.openBlock(),a.createElementBlock("div",{key:1,class:"month-week-columns",style:a.normalizeStyle({width:`${(De.weeks||[]).length*xe.value.week.cellWidth}px`,height:`${qt.value}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.weeks||[],Pt=>(a.openBlock(),a.createElementBlock("div",{key:`week-col-${De.year}-${De.month}-${Pt.label}`,class:a.normalizeClass(["week-column",{today:Pt.isToday}]),style:a.normalizeStyle({height:`${qt.value}px`,width:`${xe.value.week.cellWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Pt.subDays||[],(yr,Cr)=>(a.openBlock(),a.createElementBlock("div",{key:`subday-col-${Cr}`,class:a.normalizeClass(["sub-day-column",{weekend:yr.dayOfWeek===0||yr.dayOfWeek===6,today:q(yr.date)}]),style:a.normalizeStyle({height:`${qt.value}px`,width:`${rt.value}px`})},null,6))),128))],6))),128))],4)):(a.openBlock(),a.createElementBlock("div",{key:2,class:"month-day-columns",style:a.normalizeStyle({width:`${(De.days||[]).length*xe.value.day.cellWidth}px`,height:`${qt.value}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.days||[],Pt=>(a.openBlock(),a.createElementBlock("div",{key:`day-col-${De.year}-${De.month}-${Pt.day}`,class:a.normalizeClass(["day-column",{weekend:Pt.isWeekend,today:Pt.isToday}]),style:a.normalizeStyle({height:`${qt.value}px`})},null,6))),128))],4))],64)}),128)):a.createCommentVNode("",!0)],4),a.createElementVNode("div",{class:"task-bar-container",style:a.normalizeStyle({height:`${qt.value}px`})},[a.unref(c)==="task"||a.unref(c)==="resource"&&Ae.value===a.unref(Ee).WEEK?(a.openBlock(),a.createBlock(Jx,{key:0,tasks:be.value,"task-bar-positions":xr.value,width:ia.value,height:UA.value,"offset-left":jo.value,"offset-top":IA.value,"highlighted-task-id":qe.value,"highlighted-task-ids":ct.value,"hovered-task-id":ye.value,"vertical-lines":NA.value,"show-vertical-lines":Ae.value===a.unref(Ee).WEEK,"show-links":a.unref(c)==="task","is-scrolling":V.value,"link-config":r.linkConfig},null,8,["tasks","task-bar-positions","width","height","offset-left","offset-top","highlighted-task-id","highlighted-task-ids","hovered-task-id","vertical-lines","show-vertical-lines","show-links","is-scrolling","link-config"])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"task-rows",style:a.normalizeStyle({height:`${qt.value}px`})},[a.unref(c)==="task"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(Ye.value,({task:De,originalIndex:Bt})=>{var Pt,yr,Cr;return a.openBlock(),a.createElementBlock("div",{key:De.id,class:a.normalizeClass(["task-row",{"task-row-hovered":ye.value===De.id}]),style:a.normalizeStyle({top:`${a.unref(b).cumulativeHeights[Bt]}px`,height:`${(a.unref(b).cumulativeHeights[Bt+1]??a.unref(b).cumulativeHeights[Bt])-a.unref(b).cumulativeHeights[Bt]}px`}),onMouseenter:vr=>zt(De.id),onMouseleave:G[0]||(G[0]=vr=>zt(null))},[De.type==="milestone-group"&&De.children?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(De.children,vr=>(a.openBlock(),a.createBlock(Fp,{key:vr.id,date:vr.startDate||"","row-height":a.unref(b).taskHeights.get(De.id)||a.unref(x),"day-width":rt.value,"start-date":Ae.value===a.unref(Ee).YEAR||Ae.value===a.unref(Ee).QUARTER?z().startDate:Ae.value===a.unref(Ee).MONTH?W().startDate:fe.value.startDate,"timeline-start":fe.value.startDate,"timeline-end":fe.value.endDate,"period-width":rt.value,name:vr.name,milestone:Cl(vr),task:vr,"label-position":r.milestoneLabelPosition,"scroll-left":In.value,"container-width":_r.value,"milestone-id":vr.id,"other-milestones":Ct(vr.id),"timeline-data":re.value,"current-time-scale":Ae.value,"allow-drag-and-resize":r.allowDragAndResize&&!$e.value,"is-in-highlight-mode":$e.value,onMilestoneDoubleClick:pr,"onUpdate:milestone":Wr,onDragEnd:Eo,onMilestoneTooltipShow:k,onMilestoneTooltipHide:O},a.createSlots({_:2},[_.$slots["custom-milestone-content"]?{name:"custom-milestone-content",fn:a.withCtx(pn=>[a.renderSlot(_.$slots,"custom-milestone-content",a.mergeProps({ref_for:!0},pn),void 0,!0)]),key:"0"}:void 0]),1032,["date","row-height","day-width","start-date","timeline-start","timeline-end","period-width","name","milestone","task","label-position","scroll-left","container-width","milestone-id","other-milestones","timeline-data","current-time-scale","allow-drag-and-resize","is-in-highlight-mode"]))),128)):De.type==="milestone"?(a.openBlock(),a.createBlock(Fp,{key:De.id,date:De.startDate||"","row-height":a.unref(b).taskHeights.get(De.id)||a.unref(x),"day-width":rt.value,"start-date":Ae.value===a.unref(Ee).YEAR||Ae.value===a.unref(Ee).QUARTER?z().startDate:Ae.value===a.unref(Ee).MONTH?W().startDate:fe.value.startDate,"timeline-start":fe.value.startDate,"timeline-end":fe.value.endDate,"period-width":rt.value,name:De.name,milestone:Cl(De),task:De,"label-position":r.milestoneLabelPosition,"scroll-left":In.value,"container-width":_r.value,"milestone-id":De.id,"other-milestones":Ct(De.id),"timeline-data":re.value,"current-time-scale":Ae.value,"allow-drag-and-resize":r.allowDragAndResize&&!$e.value,"is-in-highlight-mode":$e.value,onMilestoneDoubleClick:pr,"onUpdate:milestone":Wr,onDragEnd:Eo,onMilestoneTooltipShow:k,onMilestoneTooltipHide:O},a.createSlots({_:2},[_.$slots["custom-milestone-content"]?{name:"custom-milestone-content",fn:a.withCtx(vr=>[a.renderSlot(_.$slots,"custom-milestone-content",a.mergeProps({ref_for:!0},vr),void 0,!0)]),key:"0"}:void 0]),1032,["date","row-height","day-width","start-date","timeline-start","timeline-end","period-width","name","milestone","task","label-position","scroll-left","container-width","milestone-id","other-milestones","timeline-data","current-time-scale","allow-drag-and-resize","is-in-highlight-mode"])):De.type!=="milestone-group"&&De.type!=="milestone"?(a.openBlock(),a.createBlock(Sp,{key:`taskbar-${De.id}-${g.value}`,task:De,"row-index":Bt,"row-height":a.unref(b).taskHeights.get(De.id)||a.unref(x),"day-width":rt.value,"start-date":Ae.value===a.unref(Ee).YEAR?z().startDate:Ae.value===a.unref(Ee).MONTH?W().startDate:fe.value.startDate,"is-parent":De.isParent,"scroll-left":In.value,"container-width":_r.value,"hide-bubbles":nn.value,"timeline-data":Ae.value===a.unref(Ee).HOUR?Le.value:re.value,"current-time-scale":Ae.value,"task-bar-config":r.taskBarConfig,"allow-drag-and-resize":r.allowDragAndResize&&!$e.value,"show-actual-taskbar":r.showActualTaskbar,"enable-task-bar-tooltip":r.enableTaskBarTooltip,"pending-task-background-color":r.pendingTaskBackgroundColor,"delay-task-background-color":r.delayTaskBackgroundColor,"complete-task-background-color":r.completeTaskBackgroundColor,"ongoing-task-background-color":r.ongoingTaskBackgroundColor,"enable-parent-task-auto-schedule":r.enableParentTaskAutoSchedule,"is-highlighted":ct.value.has(De.id),"is-primary-highlight":qe.value===De.id,"is-in-highlight-mode":$e.value,"drag-link-mode":tt.value,"is-link-drag-source":((Pt=_t.value)==null?void 0:Pt.id)===De.id,"is-valid-link-target":((yr=rr.value)==null?void 0:yr.id)===De.id&&St.value===!0,"is-invalid-link-target":((Cr=rr.value)==null?void 0:Cr.id)===De.id&&St.value===!1,"all-tasks":be.value,"onUpdate:task":br,onBarMounted:Yo,onClick:vr=>Yr(De,vr),onDblclick:vr=>Tr(De),onDragEnd:MA,onResizeEnd:Ga,onScrollToPosition:dA,onContextMenu:ss,onStartTimer:Bl,onStopTimer:bl,onAddPredecessor:Dl,onAddSuccessor:Oi,onDelete:$n,onDeleteLink:ca,onLongPress:Mt,onLinkDragStart:jt,onLinkDragMove:ta,onLinkDragEnd:ra,onTooltipShow:R,onTooltipHide:ae},a.createSlots({_:2},[_.$slots["custom-task-content"]?{name:"custom-task-content",fn:a.withCtx(vr=>[a.renderSlot(_.$slots,"custom-task-content",a.mergeProps({ref_for:!0},vr),void 0,!0)]),key:"0"}:void 0,_.$slots["task-bar-context-menu"]?{name:"task-bar-context-menu",fn:a.withCtx(vr=>[a.renderSlot(_.$slots,"task-bar-context-menu",a.mergeProps({ref_for:!0},vr),void 0,!0)]),key:"1"}:void 0]),1032,["task","row-index","row-height","day-width","start-date","is-parent","scroll-left","container-width","hide-bubbles","timeline-data","current-time-scale","task-bar-config","allow-drag-and-resize","show-actual-taskbar","enable-task-bar-tooltip","pending-task-background-color","delay-task-background-color","complete-task-background-color","ongoing-task-background-color","enable-parent-task-auto-schedule","is-highlighted","is-primary-highlight","is-in-highlight-mode","drag-link-mode","is-link-drag-source","is-valid-link-target","is-invalid-link-target","all-tasks","onClick","onDblclick"])):a.createCommentVNode("",!0)],46,Q4)}),128)):a.unref(c)==="resource"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(cA.value,({resource:De,originalIndex:Bt})=>{var Pt,yr,Cr,vr,pn;return a.openBlock(),a.createElementBlock("div",{key:De.id,class:a.normalizeClass(["task-row resource-row",{"task-row-hovered":ye.value===De.id}]),style:a.normalizeStyle({top:`${((Pt=a.unref(S))==null?void 0:Pt.get(De.id))||0}px`,height:`${((Cr=(yr=a.unref(D))==null?void 0:yr.get(De.id))==null?void 0:Cr.totalHeight)||a.unref(x)}px`}),onMouseenter:en=>zt(De.id),onMouseleave:G[1]||(G[1]=en=>zt(null))},[De.tasks&&De.tasks.length>0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(De.tasks,en=>{var Zn,os,ms,go,ea,Xo,Jo,hA;return a.openBlock(),a.createBlock(Sp,{key:`taskbar-${en.id}-${g.value}`,task:en,"row-index":Bt,"row-height":H.value,"task-sub-row":((os=(Zn=a.unref(D))==null?void 0:Zn.get(De.id))==null?void 0:os.taskRowMap.get(en.id))||0,"row-heights":((go=(ms=a.unref(D))==null?void 0:ms.get(De.id))==null?void 0:go.rowHeights)||[H.value],"day-width":rt.value,"start-date":Ae.value===a.unref(Ee).YEAR?z().startDate:Ae.value===a.unref(Ee).MONTH?W().startDate:fe.value.startDate,"scroll-left":In.value,"container-width":_r.value,"hide-bubbles":nn.value,"timeline-data":Ae.value===a.unref(Ee).HOUR?Le.value:re.value,"current-time-scale":Ae.value,"task-bar-config":r.taskBarConfig,"allow-drag-and-resize":r.allowDragAndResize&&!$e.value,"show-actual-taskbar":r.showActualTaskbar,"enable-task-bar-tooltip":r.enableTaskBarTooltip,"pending-task-background-color":r.pendingTaskBackgroundColor,"delay-task-background-color":r.delayTaskBackgroundColor,"complete-task-background-color":r.completeTaskBackgroundColor,"ongoing-task-background-color":r.ongoingTaskBackgroundColor,"is-highlighted":ct.value.has(en.id),"is-primary-highlight":qe.value===en.id,"is-in-highlight-mode":$e.value,"drag-link-mode":tt.value,"is-link-drag-source":((ea=_t.value)==null?void 0:ea.id)===en.id,"is-valid-link-target":((Xo=rr.value)==null?void 0:Xo.id)===en.id&&St.value===!0,"is-invalid-link-target":((Jo=rr.value)==null?void 0:Jo.id)===en.id&&St.value===!1,"all-tasks":be.value,"has-resource-conflict":((hA=a.unref(h).get(String(De.id)))==null?void 0:hA.has(en.id))||!1,"conflict-tasks":d(De.id,en.id),"current-resource-id":De.id,resources:a.unref(u),"onUpdate:task":br,onBarMounted:Yo,onClick:Zo=>Yr(en,Zo),onDblclick:Zo=>Tr(en),onDragEnd:MA,onResizeEnd:Ga,onScrollToPosition:dA,onContextMenu:ss,onStartTimer:Bl,onStopTimer:bl,onAddPredecessor:Dl,onAddSuccessor:Oi,onDelete:$n,onDeleteLink:ca,onLongPress:Mt,onLinkDragStart:jt,onLinkDragMove:ta,onLinkDragEnd:ra,onTooltipShow:R,onTooltipHide:ae},a.createSlots({_:2},[_.$slots["custom-task-content"]?{name:"custom-task-content",fn:a.withCtx(Zo=>[a.renderSlot(_.$slots,"custom-task-content",a.mergeProps({ref_for:!0},Zo),void 0,!0)]),key:"0"}:void 0,_.$slots["task-bar-context-menu"]?{name:"task-bar-context-menu",fn:a.withCtx(Zo=>[a.renderSlot(_.$slots,"task-bar-context-menu",a.mergeProps({ref_for:!0},Zo),void 0,!0)]),key:"1"}:void 0]),1032,["task","row-index","row-height","task-sub-row","row-heights","day-width","start-date","scroll-left","container-width","hide-bubbles","timeline-data","current-time-scale","task-bar-config","allow-drag-and-resize","show-actual-taskbar","enable-task-bar-tooltip","pending-task-background-color","delay-task-background-color","complete-task-background-color","ongoing-task-background-color","is-highlighted","is-primary-highlight","is-in-highlight-mode","drag-link-mode","is-link-drag-source","is-valid-link-target","is-invalid-link-target","all-tasks","has-resource-conflict","conflict-tasks","current-resource-id","resources","onClick","onDblclick"])}),128)),a.unref(E)?(a.openBlock(),a.createBlock(n4,{key:0,tasks:De.tasks,"resource-id":De.id,"day-width":rt.value,"start-date":Ae.value===a.unref(Ee).YEAR?z().startDate:Ae.value===a.unref(Ee).MONTH?W().startDate:fe.value.startDate,"top-offset":jr.value,height:wn(((vr=a.unref(D).get(De.id))==null?void 0:vr.totalHeight)||a.unref(x)),"bar-top-pad":Sn.value,width:Je.value,"timeline-data":re.value,"current-time-scale":Ae.value,"task-row-map":(pn=a.unref(D).get(De.id))==null?void 0:pn.taskRowMap,"row-heights":fn(De.id),"scroll-left":In.value,"container-width":_r.value,"render-limit":Ht.value.get(De.id)},null,8,["tasks","resource-id","day-width","start-date","top-offset","height","bar-top-pad","width","timeline-data","current-time-scale","task-row-map","row-heights","scroll-left","container-width","render-limit"])):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],46,N4)}),128)):a.createCommentVNode("",!0)],4)],4)],512)],32)],36),r.enableTaskBarTooltip!==!1?(a.openBlock(),a.createBlock(a.Teleport,{key:0,to:"body"},[T.visible?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["task-hover-tooltip",[`placement-${T.placement}`,{"tooltip-custom-slot":_.$slots["taskbar-tooltip"]}]]),style:a.normalizeStyle({left:`${T.position.left}px`,top:`${T.position.top}px`,"--arrow-offset":`${T.arrowOffset}px`,"--tt-color":T.taskStatus.color})},[_.$slots["taskbar-tooltip"]?a.renderSlot(_.$slots,"taskbar-tooltip",{key:0,task:T.task,taskStatus:T.taskStatus,resourcePercent:T.resourcePercent},void 0,!0):(a.openBlock(),a.createElementBlock("div",_4,[a.createElementVNode("div",R4,a.toDisplayString((de=T.task)==null?void 0:de.name),1),(we=T.parentAutoSchedule)!=null&&we.enabled&&((Be=T.parentAutoSchedule)!=null&&Be.childrenRange)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",O4,[a.createElementVNode("span",H4,a.toDisplayString(l("childrenEarliestStart"))+":",1),a.createElementVNode("span",P4,a.toDisplayString(F(T.parentAutoSchedule.childrenRange.minStart)),1)]),a.createElementVNode("div",V4,[a.createElementVNode("span",W4,a.toDisplayString(l("childrenLatestEnd"))+":",1),a.createElementVNode("span",K4,a.toDisplayString(F(a.unref(Ka)(T.parentAutoSchedule.childrenRange.maxEndRaw,T.parentAutoSchedule.childrenRange.maxEnd))),1)])],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",$4,[a.createElementVNode("span",q4,a.toDisplayString(l("plannedStartDate"))+":",1),a.createElementVNode("span",j4,a.toDisplayString(oe((Ce=T.task)==null?void 0:Ce.startDate)),1)]),a.createElementVNode("div",Y4,[a.createElementVNode("span",G4,a.toDisplayString(l("plannedEndDate"))+":",1),a.createElementVNode("span",z4,a.toDisplayString(X((Ue=T.task)==null?void 0:Ue.endDate)),1)]),((Se=T.parentAutoSchedule)==null?void 0:Se.enabled)===!1&&((_e=T.parentAutoSchedule)!=null&&_e.hasOverflow)&&((ht=T.parentAutoSchedule)!=null&&ht.childrenRange)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",X4,[a.createElementVNode("span",J4,"⚠ "+a.toDisplayString(l("childrenOverflow")),1)]),a.createElementVNode("div",Z4,[a.createElementVNode("span",eS,a.toDisplayString(l("childrenEarliestStart"))+":",1),a.createElementVNode("span",tS,a.toDisplayString(F(T.parentAutoSchedule.childrenRange.minStart)),1)]),a.createElementVNode("div",rS,[a.createElementVNode("span",nS,a.toDisplayString(l("childrenLatestEnd"))+":",1),a.createElementVNode("span",aS,a.toDisplayString(F(a.unref(Ka)(T.parentAutoSchedule.childrenRange.maxEndRaw,T.parentAutoSchedule.childrenRange.maxEnd))),1)])],64)):a.createCommentVNode("",!0)],64)),T.parentAutoSchedule?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createElementVNode("div",sS,[a.createElementVNode("span",oS,a.toDisplayString(l("actualStartDate"))+":",1),a.createElementVNode("span",AS,a.toDisplayString((gt=T.task)!=null&>.actualStartDate?oe(T.task.actualStartDate):"-"),1)]),a.createElementVNode("div",iS,[a.createElementVNode("span",lS,a.toDisplayString(l("actualEndDate"))+":",1),a.createElementVNode("span",cS,a.toDisplayString((He=T.task)!=null&&He.actualEndDate?X(T.task.actualEndDate):"-"),1)])],64))])),G[4]||(G[4]=a.createElementVNode("span",{class:"tt-arrow"},null,-1))],6)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),r.enableMilestoneTooltip!==!1?(a.openBlock(),a.createBlock(a.Teleport,{key:1,to:"body"},[J.visible?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["milestone-sticky-tooltip",[`arrow-${J.arrowDirection}`,{"milestone-tooltip-custom":_.$slots["milestone-tooltip"]}]]),style:a.normalizeStyle({left:`${J.position.x+(_.$slots["milestone-tooltip"]||J.arrowDirection==="left"?0:50)}px`,top:`${J.position.y}px`,"--ms-color":J.milestoneColor,maxWidth:`${_.$slots["milestone-tooltip"]?"280px":"180px"}`})},[_.$slots["milestone-tooltip"]?a.renderSlot(_.$slots,"milestone-tooltip",{key:0,milestone:J.milestone},void 0,!0):(a.openBlock(),a.createElementBlock("div",uS,a.toDisplayString((dt=J.milestone)==null?void 0:dt.name)+" – "+a.toDisplayString(oe((Qt=J.milestone)==null?void 0:Qt.startDate))+'" ',1)),a.createElementVNode("span",{class:"ms-arrow",style:a.normalizeStyle({top:`${J.arrowOffsetY}px`})},null,4)],6)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)}}}),Fb=un(bS,[["__scopeId","data-v-9540f9cf"]]),CS={class:"gantt-toolbar"},kS={class:"toolbar-left"},ES={key:0,class:"gantt-btn-group gantt-add-btn-group"},DS=["title"],TS=["title"],xS={key:1,class:"gantt-view-mode-control"},SS={class:"view-mode-track"},FS=["title","onClick"],LS={key:0,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},US={key:1,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},IS={key:2,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},MS={key:3,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},QS={key:2,class:"gantt-btn-group gantt-expand-collapse-btn-group"},NS=["title"],_S=["title"],RS={key:3,class:"gantt-btn-group"},OS=["title"],HS=["title"],PS={class:"toolbar-right"},VS={key:0,class:"segmented-control time-scale-segmented"},WS={class:"segmented-track"},KS=["title","onClick"],$S={key:1,class:"language-dropdown"},qS=["title"],jS={class:"lang-text"},YS={key:0,class:"language-menu"},GS=["onClick"],zS={class:"option-text"},XS={key:0,class:"check-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},JS=["title"],ZS=["title"],eF={key:0,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},tF={key:1,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},rF={class:"icon-fallback"},nF=["title"],aF={key:0,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},sF={key:1,class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},oF={class:"icon-fallback"},AF=["data-theme"],iF={class:"dialog-content"},lF={class:"dialog-message"},cF={class:"dialog-actions"},n0="gantt-theme",uF="gantt-locale",dF=a.defineComponent({__name:"GanttToolbar",props:{config:{default:()=>({})},timeScale:{default:void 0},theme:{default:void 0},fullscreen:{type:Boolean,default:void 0},expandAll:{type:Boolean,default:void 0},viewMode:{default:"task"},availableViewModes:{default:()=>["task","resource"]},onAddTask:{type:Function,default:void 0},onAddMilestone:{type:Function,default:void 0},onTodayLocate:{type:Function,default:void 0},onExportCsv:{type:Function,default:void 0},onExportPdf:{type:Function,default:void 0},onLanguageChange:{type:Function,default:void 0},onThemeChange:{type:Function,default:void 0},onFullscreenChange:{type:Function,default:void 0},onTimeScaleChange:{type:Function,default:void 0},onExpandAll:{type:Function,default:void 0},onCollapseAll:{type:Function,default:void 0},onViewModeChange:{type:Function,default:void 0},onSettingsConfirm:{type:Function,default:void 0}},emits:["add-task","add-milestone","today-locate","export-csv","export-pdf","language-change","theme-change","fullscreen-change","time-scale-change","expand-all","collapse-all","view-mode-change"],setup(n,{emit:t}){const e=["task","resource"],r={task:"taskView",resource:"resourceView.desc",calendar:"calendarView","resource-usage":"resourceUsageView"},s={task:"任务视图",resource:"资源视图",calendar:"日历视图","resource-usage":"资源利用率"},o=n,i=t,A={zh:"zh-CN",en:"en-US"},l=()=>{if(typeof window<"u"){const W=localStorage.getItem(n0);return W!==null?W==="dark":window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}return!1},{locale:c,setLocale:u,getTranslation:h}=_s(),g=a.ref("zh"),d=a.ref(l()),m=a.ref(!1),y=a.ref(!1),B=a.ref(Ee.DAY),w=a.ref("task"),E=new Map,x=a.ref({}),b=W=>z=>{z instanceof HTMLElement?E.set(W,z):E.delete(W)};let H=null;const $=()=>{const W={};E.forEach((z,ye)=>{W[ye]=z.offsetWidth}),x.value=W},Y=()=>{H?H.disconnect():H=new ResizeObserver(()=>{$()}),E.forEach(W=>{H.observe(W)}),$()},V=a.computed(()=>{const W=o.availableViewModes??e,z=x.value,ye=W.indexOf(w.value);if(!W.every($e=>(z[$e]??0)>0))return{transform:`translateX(${W.length>1?Math.max(ye,0)/(W.length-1)*100:0}%)`,width:`${100/Math.max(W.length,1)}%`};let ct=0;for(const $e of W){if($e===w.value)break;ct+=z[$e]??0}return{transform:`translateX(${ct}px)`,width:`${z[w.value]??0}px`}});a.watch(()=>o.viewMode,W=>{W&&W!==w.value&&(w.value=W)},{immediate:!0}),a.watch(()=>o.availableViewModes,async()=>{await a.nextTick(),Y()}),a.watch(()=>o.timeScale,W=>{W&&W!==B.value&&(B.value=W)},{immediate:!0}),a.watch(()=>o.theme,W=>{if(W){const z=W==="dark";d.value!==z&&(d.value=z)}},{immediate:!0}),a.watch(()=>o.fullscreen,W=>{W!==void 0&&m.value!==W&&(m.value=W)},{immediate:!0});const L=W=>h(W),j=a.computed(()=>L("language")),D=a.ref(!1),S=a.ref(null),Q=a.ref(null),T=()=>{o.onAddTask&&typeof o.onAddTask=="function"?o.onAddTask():i("add-task")},oe=()=>{o.onAddMilestone&&typeof o.onAddMilestone=="function"?o.onAddMilestone():i("add-milestone")},X=()=>{o.onTodayLocate&&typeof o.onTodayLocate=="function"?o.onTodayLocate():i("today-locate")},F=()=>{o.onExportCsv&&typeof o.onExportCsv=="function"?o.onExportCsv():i("export-csv")},M=()=>{o.onExportPdf&&typeof o.onExportPdf=="function"?o.onExportPdf():i("export-pdf")},R=()=>{o.onExpandAll&&typeof o.onExpandAll=="function"?o.onExpandAll():i("expand-all")},ae=()=>{o.onCollapseAll&&typeof o.onCollapseAll=="function"?o.onCollapseAll():i("collapse-all")},J=W=>{w.value!==W&&(w.value=W,o.onViewModeChange&&typeof o.onViewModeChange=="function"&&o.onViewModeChange(W))},k=()=>{y.value=!y.value},O=W=>{y.value=!1,Q.value=A[W],S.value="language",D.value=!0},N=async()=>{if(!S.value||Q.value===null){fe();return}if(o.onSettingsConfirm&&typeof o.onSettingsConfirm=="function")try{if(!await o.onSettingsConfirm(S.value,Q.value)){fe();return}}catch{fe();return}if(S.value==="theme"){const W=Q.value;d.value=W,o.onThemeChange&&typeof o.onThemeChange=="function"?o.onThemeChange(W):i("theme-change",W),Z()}else if(S.value==="language"){const W=Q.value;g.value=W==="zh-CN"?"zh":"en",u(W),o.onLanguageChange&&typeof o.onLanguageChange=="function"?o.onLanguageChange(W):i("language-change",W),se()}fe()},Z=()=>{typeof window<"u"&&typeof Q.value=="boolean"&&localStorage.setItem(n0,Q.value?"dark":"light")},se=()=>{typeof window<"u"&&typeof Q.value=="string"&&localStorage.setItem(uF,Q.value)},ge=()=>{fe()},fe=()=>{D.value=!1,S.value=null,Q.value=null},Ae=()=>{const z=(o.theme||(d.value?"dark":"light"))!=="dark";Q.value=z,S.value="theme",D.value=!0},Fe=()=>{m.value=!m.value,window.dispatchEvent(new CustomEvent("fullscreen-toggle",{detail:m.value})),o.onFullscreenChange&&typeof o.onFullscreenChange=="function"?o.onFullscreenChange(m.value):i("fullscreen-change",m.value)},be={hour:{value:Ee.HOUR,label:()=>L("timeScaleHour")},day:{value:Ee.DAY,label:()=>L("timeScaleDay")},week:{value:Ee.WEEK,label:()=>L("timeScaleWeek")},month:{value:Ee.MONTH,label:()=>L("timeScaleMonth")},quarter:{value:Ee.QUARTER,label:()=>L("timeScaleQuarter")},year:{value:Ee.YEAR,label:()=>L("timeScaleYear")}},Ke=["hour","day","week","month","quarter","year"],Xe=a.computed(()=>{var ye;const z=(((ye=o.config)==null?void 0:ye.timeScaleDimensions)??Ke).filter(qe=>qe in be);return z.length>0?z:[...Ke]}),xe=a.computed(()=>{var ye;const W=Xe.value,z=(ye=o.config)==null?void 0:ye.defaultTimeScale;return z&&W.includes(z)?z:W.includes("day")?"day":W[0]??"day"}),te=W=>{B.value=W,o.onTimeScaleChange&&typeof o.onTimeScaleChange=="function"?o.onTimeScaleChange(W):i("time-scale-change",W)};let lt=!1;a.watch(()=>xe.value,W=>{const z=be[W].value;(B.value!==z||!lt)&&(lt=!0,te(z))},{immediate:!0});const Pe=a.computed(()=>Xe.value.find(z=>be[z].value===B.value)??xe.value),rt=a.ref(new Map),Te=a.ref({}),Et=(W,z)=>{z instanceof HTMLElement?rt.value.set(W,z):rt.value.delete(W)},ot=()=>{const W={};rt.value.forEach((z,ye)=>{W[ye]=z.offsetWidth}),Te.value=W};let yt=null;const pt=()=>{yt&&yt.disconnect(),yt=new ResizeObserver(()=>{ot()}),rt.value.forEach(W=>{yt.observe(W)}),ot()},Oe=a.computed(()=>{const W=Xe.value,z=Pe.value,ye=W.findIndex(Ve=>Ve===z);if(ye<0)return{transform:"translateX(0px)",width:"0px"};const qe=Te.value,ct=qe[z];let $e=0;for(let Ve=0;Ve<ye;Ve++)$e+=qe[W[Ve]]||0;if(!ct){const Ve=100/W.length;return{transform:`translateX(${ye*100}%)`,width:`${Ve}%`}}return{transform:`translateX(${$e}px)`,width:`${ct}px`}}),it=W=>{!W.target.closest(".language-dropdown")&&y.value&&(y.value=!1)};return a.onMounted(()=>{const W=c.value;g.value=W==="zh-CN"?"zh":"en",document.addEventListener("click",it),Y(),pt()}),a.watch(Xe,()=>{pt()}),a.onUnmounted(()=>{document.removeEventListener("click",it),H&&(H.disconnect(),H=null),yt&&(yt.disconnect(),yt=null)}),(W,z)=>(a.openBlock(),a.createElementBlock("div",CS,[a.createElementVNode("div",kS,[n.config.showAddTask!==!1||n.config.showAddMilestone!==!1?(a.openBlock(),a.createElementBlock("div",ES,[n.config.showAddTask!==!1?(a.openBlock(),a.createElementBlock("button",{key:0,class:"gantt-btn-group-item",title:L("addTask"),onClick:T},[z[0]||(z[0]=a.createElementVNode("svg",{class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),a.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)),a.createTextVNode(" "+a.toDisplayString(L("addTask")),1)],8,DS)):a.createCommentVNode("",!0),n.config.showAddMilestone!==!1?(a.openBlock(),a.createElementBlock("button",{key:1,class:"gantt-btn-group-item",title:L("addMilestone"),onClick:oe},[z[1]||(z[1]=a.createStaticVNode('<svg class="gantt-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-c8427546><g transform="rotate(45 12 12)" data-v-c8427546><rect x="4" y="4" width="16" height="16" rx="4" ry="4" fill="none" stroke="currentColor" data-v-c8427546></rect></g><line x1="12" y1="8" x2="12" y2="16" data-v-c8427546></line><line x1="8" y1="12" x2="16" y2="12" data-v-c8427546></line></svg>',1)),a.createTextVNode(" "+a.toDisplayString(L("addMilestone")),1)],8,TS)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),n.config.showViewMode!==!1?(a.openBlock(),a.createElementBlock("div",xS,[a.createElementVNode("div",SS,[a.createElementVNode("div",{class:"view-mode-thumb",style:a.normalizeStyle(V.value)},null,4)]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.availableViewModes??e,ye=>(a.openBlock(),a.createElementBlock("button",{key:ye,ref_for:!0,ref:b(ye),class:a.normalizeClass(["view-mode-item",{active:w.value===ye}]),title:L(r[ye])||s[ye],onClick:qe=>J(ye)},[ye==="task"?(a.openBlock(),a.createElementBlock("svg",LS,[...z[2]||(z[2]=[a.createElementVNode("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"},null,-1),a.createElementVNode("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"},null,-1),a.createElementVNode("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"},null,-1),a.createElementVNode("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"},null,-1)])])):ye==="resource"?(a.openBlock(),a.createElementBlock("svg",US,[...z[3]||(z[3]=[a.createElementVNode("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},null,-1),a.createElementVNode("circle",{cx:"9",cy:"7",r:"4"},null,-1),a.createElementVNode("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"},null,-1),a.createElementVNode("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"},null,-1)])])):ye==="calendar"?(a.openBlock(),a.createElementBlock("svg",IS,[...z[4]||(z[4]=[a.createElementVNode("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"},null,-1),a.createElementVNode("line",{x1:"16",y1:"2",x2:"16",y2:"6"},null,-1),a.createElementVNode("line",{x1:"8",y1:"2",x2:"8",y2:"6"},null,-1),a.createElementVNode("line",{x1:"3",y1:"10",x2:"21",y2:"10"},null,-1)])])):(a.openBlock(),a.createElementBlock("svg",MS,[...z[5]||(z[5]=[a.createElementVNode("line",{x1:"18",y1:"20",x2:"18",y2:"10"},null,-1),a.createElementVNode("line",{x1:"12",y1:"20",x2:"12",y2:"4"},null,-1),a.createElementVNode("line",{x1:"6",y1:"20",x2:"6",y2:"14"},null,-1)])])),a.createTextVNode(" "+a.toDisplayString(L(r[ye])||s[ye]),1)],10,FS))),128))])):a.createCommentVNode("",!0),n.config.showExpandCollapse!==!1?(a.openBlock(),a.createElementBlock("div",QS,[a.createElementVNode("button",{class:"gantt-btn-group-item",title:L("expandAll"),onClick:R},[z[6]||(z[6]=a.createElementVNode("svg",{class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1)),a.createTextVNode(" "+a.toDisplayString(L("expandAll")),1)],8,NS),a.createElementVNode("button",{class:"gantt-btn-group-item",title:L("collapseAll"),onClick:ae},[z[7]||(z[7]=a.createElementVNode("svg",{class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("polyline",{points:"18 15 12 9 6 15"})],-1)),a.createTextVNode(" "+a.toDisplayString(L("collapseAll")),1)],8,_S)])):a.createCommentVNode("",!0),n.config.showExportCsv!==!1||n.config.showExportPdf!==!1?(a.openBlock(),a.createElementBlock("div",RS,[n.config.showExportCsv!==!1?(a.openBlock(),a.createElementBlock("button",{key:0,class:"gantt-btn-group-item",title:L("exportCsv"),onClick:F},[z[8]||(z[8]=a.createStaticVNode('<svg class="gantt-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-c8427546><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" data-v-c8427546></path><polyline points="14,2 14,8 20,8" data-v-c8427546></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-c8427546></line><line x1="16" y1="17" x2="8" y2="17" data-v-c8427546></line><polyline points="10,9 9,9 8,9" data-v-c8427546></polyline></svg>',1)),a.createTextVNode(" "+a.toDisplayString(L("exportCsv")),1)],8,OS)):a.createCommentVNode("",!0),n.config.showExportPdf!==!1?(a.openBlock(),a.createElementBlock("button",{key:1,class:"gantt-btn-group-item",title:L("exportPdf"),onClick:M},[z[9]||(z[9]=a.createStaticVNode('<svg class="gantt-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-c8427546><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" data-v-c8427546></path><polyline points="14,2 14,8 20,8" data-v-c8427546></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-c8427546></line><line x1="16" y1="17" x2="8" y2="17" data-v-c8427546></line><line x1="12" y1="13" x2="12" y2="17" data-v-c8427546></line></svg>',1)),a.createTextVNode(" "+a.toDisplayString(L("exportPdf")),1)],8,HS)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),a.createElementVNode("div",PS,[n.config.showTimeScale!==!1?(a.openBlock(),a.createElementBlock("div",VS,[a.createElementVNode("div",WS,[a.createElementVNode("div",{class:"segmented-thumb",style:a.normalizeStyle(Oe.value)},null,4)]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Xe.value,ye=>(a.openBlock(),a.createElementBlock("button",{key:ye,ref_for:!0,ref:qe=>Et(ye,qe),class:a.normalizeClass(["segmented-item",{active:Pe.value===ye}]),title:L("timeScaleTooltip"),onClick:qe=>te(be[ye].value)},a.toDisplayString(be[ye].label()),11,KS))),128))])):a.createCommentVNode("",!0),n.config.showLanguage!==!1?(a.openBlock(),a.createElementBlock("div",$S,[a.createElementVNode("button",{class:"toolbar-lang-btn",title:L("languageTooltip"),onClick:k},[z[10]||(z[10]=a.createElementVNode("svg",{class:"gantt-btn-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),a.createElementVNode("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),a.createElementVNode("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})],-1)),a.createElementVNode("span",jS,a.toDisplayString(j.value),1),z[11]||(z[11]=a.createElementVNode("svg",{class:"dropdown-arrow",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("polyline",{points:"6,9 12,15 18,9"})],-1))],8,qS),y.value?(a.openBlock(),a.createElementBlock("div",YS,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(["zh","en"],ye=>a.createElementVNode("div",{key:ye,class:a.normalizeClass(["language-option",{active:g.value===ye}]),onClick:qe=>O(ye)},[a.createElementVNode("span",zS,a.toDisplayString(ye==="zh"?"中文":"English"),1),g.value===ye?(a.openBlock(),a.createElementBlock("svg",XS,[...z[12]||(z[12]=[a.createElementVNode("polyline",{points:"20,6 9,17 4,12"},null,-1)])])):a.createCommentVNode("",!0)],10,GS)),64))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),n.config.showTodayLocate!==!1?(a.openBlock(),a.createElementBlock("button",{key:2,class:"toolbar-icon-btn today-locate-btn",title:L("todayLocateTooltip"),onClick:X},[...z[13]||(z[13]=[a.createStaticVNode('<svg class="gantt-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-c8427546><rect x="3" y="4" width="18" height="18" rx="2" ry="2" data-v-c8427546></rect><line x1="16" y1="2" x2="16" y2="6" data-v-c8427546></line><line x1="8" y1="2" x2="8" y2="6" data-v-c8427546></line><line x1="3" y1="10" x2="21" y2="10" data-v-c8427546></line><circle cx="12" cy="16" r="1" data-v-c8427546></circle></svg>',1)])],8,JS)):a.createCommentVNode("",!0),n.config.showTheme!==!1?(a.openBlock(),a.createElementBlock("button",{key:3,class:"toolbar-icon-btn",title:L(d.value?"lightMode":"darkMode"),onClick:Ae},[d.value?(a.openBlock(),a.createElementBlock("svg",eF,[...z[14]||(z[14]=[a.createStaticVNode('<circle cx="12" cy="12" r="5" data-v-c8427546></circle><line x1="12" y1="1" x2="12" y2="3" data-v-c8427546></line><line x1="12" y1="21" x2="12" y2="23" data-v-c8427546></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-c8427546></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-c8427546></line><line x1="1" y1="12" x2="3" y2="12" data-v-c8427546></line><line x1="21" y1="12" x2="23" y2="12" data-v-c8427546></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-c8427546></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-c8427546></line>',9)])])):(a.openBlock(),a.createElementBlock("svg",tF,[...z[15]||(z[15]=[a.createElementVNode("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),a.createElementVNode("span",rF,a.toDisplayString(d.value?"☀️":"🌙"),1)],8,ZS)):a.createCommentVNode("",!0),n.config.showFullscreen!==!1?(a.openBlock(),a.createElementBlock("button",{key:4,class:"toolbar-icon-btn",title:L(m.value?"exitFullscreen":"fullscreen"),onClick:Fe},[m.value?(a.openBlock(),a.createElementBlock("svg",aF,[...z[16]||(z[16]=[a.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)])])):(a.openBlock(),a.createElementBlock("svg",sF,[...z[17]||(z[17]=[a.createElementVNode("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3"},null,-1)])])),a.createElementVNode("span",oF,a.toDisplayString(m.value?"⇲":"⇱"),1)],8,nF)):a.createCommentVNode("",!0)]),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[D.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-settings-confirm-dialog","data-theme":o.theme},[a.createElementVNode("div",iF,[a.createElementVNode("p",lF,a.toDisplayString(L("confirmDialogMessage")),1),a.createElementVNode("div",cF,[a.createElementVNode("button",{class:"gantt-btn gantt-btn-default",onClick:ge},a.toDisplayString(L("cancel")),1),a.createElementVNode("button",{class:"gantt-btn gantt-btn-primary",onClick:N},a.toDisplayString(L("confirm")),1)])])],8,AF)):a.createCommentVNode("",!0)]))]))}}),fF=un(dF,[["__scopeId","data-v-c8427546"]]),hF={success:"#67c23a",warning:"#e6a23c",error:"#f56c6c",info:"#909399"};let vi=null;function gF(){return vi||(vi=document.createElement("div"),vi.className="message-container",vi.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 12px;
pointer-events: none;
`,document.body.appendChild(vi)),vi}const jc=new Map,a0=1e3;function Mv(){return{showMessage:(t,e="success",r)=>{const s=Date.now(),o=`${e}:${t}`,i=jc.get(o);if(!(r!=null&&r.allowDuplicate)&&i&&s-i<a0)return;jc.set(o,s);for(const[m,y]of jc.entries())s-y>a0*2&&jc.delete(m);const A=document.createElement("div");A.className=`message ${e}`,A.textContent=t,A.style.cssText=`
min-width: 180px;
max-width: 360px;
margin: 0;
padding: 12px 20px 12px 20px;
border-radius: 4px;
color: white;
font-size: 14px;
background: ${hF[e]};
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
pointer-events: auto;
opacity: 0;
display: flex;
align-items: center;
gap: 12px;
transform: translateY(-20px);
transition: opacity 0.25s, transform 0.25s;
position: relative;
`;let l=!1;const c=(r==null?void 0:r.closable)??!1;if(c){const m=document.createElement("button");m.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',m.style.cssText=`
background: transparent;
border: none;
color: white;
cursor: pointer;
margin-left: 8px;
padding: 0;
display: flex;
align-items: center;
opacity: 0.7;
transition: opacity 0.2s;
`,m.onmouseenter=()=>m.style.opacity="1",m.onmouseleave=()=>m.style.opacity="0.7",m.onclick=()=>d(),A.appendChild(m)}const u=gF();u.appendChild(A),setTimeout(()=>{A.style.opacity="0.98",A.style.transform="translateY(0)"},10);const h=(r==null?void 0:r.duration)??(c?0:3e3);let g;!c&&h>0&&(g=window.setTimeout(()=>d(),h));function d(){l||(l=!0,A.style.opacity="0",A.style.transform="translateY(-20px)",g&&clearTimeout(g),setTimeout(()=>{A.parentNode&&(u.removeChild(A),u.childElementCount===0&&(u.remove(),vi=null))},250))}}}}const pF={class:"el-input__wrapper"},vF={class:"el-input__inner"},mF=["value","placeholder","disabled"],wF={class:"el-input__suffix"},yF={class:"el-input__suffix-inner"},BF={key:1,class:"el-input__icon"},bF={class:"el-time-picker-header"},CF={class:"el-time-picker-title"},kF={class:"el-time-picker-content"},EF={class:"el-time-column"},DF={class:"el-time-column-header"},TF=["onClick"],xF={class:"el-time-column"},SF={class:"el-time-column-header"},FF=["onClick"],LF={class:"el-time-picker-footer"},UF={key:0,class:"el-year-picker"},IF={class:"el-year-picker__header"},MF={class:"el-year-picker__header-label"},QF={class:"el-year-picker__content"},NF=["onClick"],_F={key:1,class:"el-month-picker"},RF={class:"el-month-picker__header"},OF={class:"el-month-picker__content"},HF=["onClick"],PF={key:2,class:"el-date-picker__content-wrapper"},VF={class:"el-date-picker__header"},WF={class:"el-date-picker__header-label"},KF={class:"el-date-picker__content"},$F={class:"el-date-table__header"},qF={class:"el-date-table__body"},jF=["onClick"],YF={class:"el-date-table__cell-inner"},GF={key:0,class:"el-time-picker-input"},zF={class:"el-time-picker-label",for:"time-input"},XF=["value","placeholder"],JF={key:1,class:"el-date-picker-footer"},ZF=a.defineComponent({__name:"DatePicker",props:{modelValue:{default:""},type:{default:"date"},placeholder:{},startPlaceholder:{},endPlaceholder:{},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},size:{default:"default"},format:{default:"YYYY-MM-DD"},valueFormat:{default:"YYYY-MM-DD"},rangeSeparator:{}},emits:["update:modelValue","change","focus","blur"],setup(n,{emit:t}){const e=n,r=t,{t:s}=_s(),o=a.computed(()=>e.placeholder??s.value.selectDate),i=a.computed(()=>e.startPlaceholder??s.value.startDate),A=a.computed(()=>e.endPlaceholder??s.value.endDate),l=a.computed(()=>e.rangeSeparator??s.value.to),c=a.ref(!1),u=a.ref(!1),h=a.ref(!1),g=a.ref(!1),d=a.ref(!1),m=a.ref(!1),y=a.ref(),B=a.ref(),w=a.ref(),E=a.ref(),x=a.ref(),b=a.ref(),H=a.ref(null),$=a.ref(0),Y=a.ref(""),V=a.ref("12:00"),L=a.ref(""),j=a.ref(""),D=a.ref(new Date().getFullYear()),S=a.ref(new Date().getMonth()),Q=a.ref(Math.floor(new Date().getFullYear()/10)*10),T=a.ref(""),oe=a.ref(""),X=a.ref(""),F=a.ref("start"),M=a.ref("12:00"),R=a.ref(12),ae=a.ref(0),J=(We,ze)=>{if(!We)return"";const ft=new Date(We);if(isNaN(ft.getTime()))return"";const Lt=e.format.includes("-")?"-":"/",ar=`${ft.getFullYear()}${Lt}${String(ft.getMonth()+1).padStart(2,"0")}${Lt}${String(ft.getDate()).padStart(2,"0")}`;return e.type==="datetime"&&ze?`${ar} ${ze}`:ar},k=a.computed(()=>{if(e.type==="daterange"){const We=oe.value?J(oe.value,M.value):"",ze=X.value?J(X.value,M.value):"";return We&&ze?`${We} ${l.value} ${ze}`:We||ze||""}return T.value?J(T.value,M.value):""}),O=We=>{if(!We)return{dateStr:"",timeStr:"12:00"};const ze=We.trim().split(" ");if(ze.length>=2){const Lt=ze[0],ar=ze[1],Rt=Lt.split("/");return Rt.length===3?{dateStr:`${Rt[0]}-${Rt[1].padStart(2,"0")}-${Rt[2].padStart(2,"0")}`,timeStr:ar}:{dateStr:Lt,timeStr:ar}}const ft=ze[0];if(ft.includes("/")){const Lt=ft.split("/");if(Lt.length===3)return{dateStr:`${Lt[0]}-${Lt[1].padStart(2,"0")}-${Lt[2].padStart(2,"0")}`,timeStr:"12:00"}}return{dateStr:ft,timeStr:"12:00"}};a.watch(()=>e.modelValue,We=>{if(e.type==="daterange")if(Array.isArray(We)&&We.length===2){const ze=O(We[0]||""),ft=O(We[1]||"");oe.value=ze.dateStr,X.value=ft.dateStr,ze.timeStr!=="12:00"&&(M.value=ze.timeStr)}else oe.value="",X.value="",M.value="12:00";else{const ze=O(We||"");T.value=ze.dateStr,M.value=ze.timeStr}},{immediate:!0});const N=()=>{e.type==="daterange"?(oe.value="",X.value="",r("update:modelValue",["",""]),r("change",["",""])):(T.value="",r("update:modelValue",""),r("change","")),h.value=!1},Z=()=>{if(!e.disabled&&(h.value=!h.value,h.value)){e.type==="daterange"?(L.value=oe.value,j.value=X.value):(Y.value=T.value,V.value=M.value),Pe.x=window.scrollX,Pe.y=window.scrollY,$.value++;let We;if(e.type==="daterange"){const ze=oe.value||X.value;We=ze?new Date(ze):new Date}else We=T.value?new Date(T.value):new Date;isNaN(We.getTime())?(We=new Date,D.value=We.getFullYear(),S.value=We.getMonth()):(D.value=We.getFullYear(),S.value=We.getMonth())}},se=()=>{e.type==="datetime"&&h.value?(T.value=Y.value,M.value=V.value):e.type==="daterange"&&h.value&&(oe.value=L.value,X.value=j.value),h.value=!1,g.value=!1,d.value=!1,m.value=!1,c.value=!1,H.value&&(clearTimeout(H.value),H.value=null)},ge=We=>{if(We&&(We.preventDefault(),We.stopPropagation()),m.value)return;H.value&&(clearTimeout(H.value),H.value=null),m.value=!0;const[ze,ft]=M.value.split(":").map(Number);R.value=ze,ae.value=ft,a.nextTick(()=>{fe()})},fe=()=>{if(x.value){const We=x.value.querySelectorAll(".el-time-item"),ze=R.value;if(We[ze]){const ar=Math.max(0,ze*28-80+14);x.value.scrollTop=ar}}if(b.value){const We=b.value.querySelectorAll(".el-time-item"),ft=[0,15,30,45].indexOf(ae.value);if(ft>=0&&We[ft]){const Rt=Math.max(0,ft*28-80+14);b.value.scrollTop=Rt}}},Ae=()=>{m.value=!1},Fe=()=>{M.value=`${String(R.value).padStart(2,"0")}:${String(ae.value).padStart(2,"0")}`,Ae()},be=a.computed(()=>Array.from({length:24},(We,ze)=>ze)),Ke=a.computed(()=>[0,15,30,45]),Xe=We=>{R.value=We},xe=We=>{ae.value=We},te=()=>{if(e.type==="daterange"){if(oe.value&&X.value){const We=ar=>{const Rt=new Date(ar),cr=e.valueFormat.includes("-")?"-":"/",qr=`${Rt.getFullYear()}${cr}${String(Rt.getMonth()+1).padStart(2,"0")}${cr}${String(Rt.getDate()).padStart(2,"0")}`;return M.value?`${qr} ${M.value}`:qr},ze=We(oe.value),ft=We(X.value),Lt=[ze,ft];r("update:modelValue",Lt),r("change",Lt),L.value=oe.value,j.value=X.value}}else if(T.value){const We=new Date(T.value),ze=e.valueFormat.includes("-")?"-":"/",ft=`${We.getFullYear()}${ze}${String(We.getMonth()+1).padStart(2,"0")}${ze}${String(We.getDate()).padStart(2,"0")}`,Lt=M.value?`${ft} ${M.value}`:ft;r("update:modelValue",Lt),r("change",Lt),Y.value=T.value,V.value=M.value}setTimeout(()=>{se()},150)},lt=We=>{var Rt,cr,qr;const ze=We.target,ft=(Rt=y.value)==null?void 0:Rt.contains(ze),Lt=(cr=B.value)==null?void 0:cr.contains(ze),ar=(qr=w.value)==null?void 0:qr.contains(ze);!ft&&!Lt&&!ar?se():!ar&&m.value&&!Lt&&Ae()},Pe={x:0,y:0},rt=()=>{if(h.value){const We=window.scrollX,ze=window.scrollY,ft=Math.abs(We-Pe.x),Lt=Math.abs(ze-Pe.y);ft<50&&Lt<50?$.value++:se(),Pe.x=We,Pe.y=ze}},Te=()=>{h.value&&$.value++},Et=a.computed(()=>{const We=new Date(D.value,S.value,1),ze=new Date(We);ze.setDate(ze.getDate()-We.getDay());const ft=[];for(let Lt=0;Lt<42;Lt++){const ar=new Date(ze);ar.setDate(ze.getDate()+Lt);const Rt=`${ar.getFullYear()}-${String(ar.getMonth()+1).padStart(2,"0")}-${String(ar.getDate()).padStart(2,"0")}`,cr=ar.getMonth()===S.value,qr=Rt===new Date().toISOString().split("T")[0],Kr=e.type==="daterange"?Rt===oe.value||Rt===X.value:Rt===T.value,on=e.type==="daterange"&&oe.value&&X.value?Rt>=oe.value&&Rt<=X.value:!1;ft.push({date:ar,dateStr:Rt,day:ar.getDate(),isCurrentMonth:cr,isToday:qr,isSelected:Kr,isInRange:on})}return ft}),ot=We=>{if(e.type==="daterange")F.value==="start"||!oe.value||oe.value&&X.value?(oe.value=We,X.value="",F.value="end"):(We<oe.value?(X.value=oe.value,oe.value=We):X.value=We,F.value="start");else if(T.value=We,e.type==="date"){const ze=new Date(We),ft=e.valueFormat.includes("-")?"-":"/",Lt=`${ze.getFullYear()}${ft}${String(ze.getMonth()+1).padStart(2,"0")}${ft}${String(ze.getDate()).padStart(2,"0")}`;r("update:modelValue",Lt),r("change",Lt),Y.value=T.value,setTimeout(()=>{se()},150)}},yt=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),S.value===0?(S.value=11,D.value--):S.value--},pt=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),S.value===11?(S.value=0,D.value++):S.value++},Oe=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),D.value--},it=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),D.value++},W=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),g.value=!0,d.value=!1,Q.value=Math.floor(D.value/10)*10},z=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),d.value=!0,g.value=!1},ye=(We,ze)=>{ze&&(ze.preventDefault(),ze.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),D.value=We,g.value=!1,d.value=!0},qe=(We,ze)=>{ze&&(ze.preventDefault(),ze.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),S.value=We,d.value=!1},ct=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),Q.value-=10},$e=We=>{We&&(We.preventDefault(),We.stopPropagation()),H.value&&(clearTimeout(H.value),H.value=null),Q.value+=10},Ve=a.computed(()=>{const We=[];for(let ze=0;ze<10;ze++)We.push(Q.value+ze);return We});a.onMounted(()=>{document.addEventListener("click",lt),window.addEventListener("scroll",rt,!0),window.addEventListener("resize",Te),Pe.x=window.scrollX,Pe.y=window.scrollY}),a.onUnmounted(()=>{document.removeEventListener("click",lt),window.removeEventListener("scroll",rt,!0),window.removeEventListener("resize",Te),H.value&&(clearTimeout(H.value),H.value=null)});const Mt=We=>{H.value&&(clearTimeout(H.value),H.value=null),c.value=!0,r("focus",We)},tt=We=>{H.value=setTimeout(()=>{c.value=!1,se(),r("blur",We)},150)},_t=()=>{H.value&&(clearTimeout(H.value),H.value=null)},rr=()=>{m.value||(H.value=setTimeout(()=>{se()},150))},St=()=>{H.value=setTimeout(()=>{Ae()},150)},hr=()=>{u.value=!0},Vt=()=>{u.value=!1},Xt=a.computed(()=>["el-date-picker",`el-date-picker--${e.size}`,{"is-disabled":e.disabled,"is-focused":c.value,"is-range":e.type==="daterange"}]),mr=a.computed(()=>!e.clearable||e.disabled?!1:e.type==="daterange"?(oe.value||X.value)&&u.value:T.value&&u.value),Kt=a.computed(()=>{if(!y.value||!h.value)return{};const We=y.value.getBoundingClientRect(),ze=280,ft=300,Lt=4,ar=window.innerWidth,Rt=window.innerHeight,cr={position:"fixed",zIndex:"10000"},qr=Rt-We.bottom,Kr=We.top;qr>=ft+Lt||qr>=Kr?cr.top=`${We.bottom+Lt}px`:cr.top=`${We.top-ft-Lt}px`;const on=ar-We.left,Fr=We.right;if(on>=ze)cr.left=`${We.left}px`;else if(Fr>=ze)cr.left=`${We.right-ze}px`;else{const ta=We.left+(We.width-ze)/2,ra=Lt,xn=ar-ze-Lt;cr.left=`${Math.max(ra,Math.min(ta,xn))}px`}const Jr=parseFloat(cr.top),An=parseFloat(cr.left);return Jr<Lt?cr.top=`${Lt}px`:Jr+ft>Rt-Lt&&(cr.top=`${Rt-ft-Lt}px`),An<Lt?cr.left=`${Lt}px`:An+ze>ar-Lt&&(cr.left=`${ar-ze-Lt}px`),cr}),jt=a.computed(()=>{if(!E.value||!m.value)return{};const We=E.value.getBoundingClientRect(),ze=180,ft=300,Lt=4,ar=window.innerWidth,Rt=window.innerHeight,cr={position:"fixed",zIndex:"10002"};ar-We.left>=ze?cr.left=`${We.left}px`:cr.left=`${Math.max(Lt,ar-ze-Lt)}px`,We.top>=ft+Lt?cr.top=`${We.top-ft-Lt}px`:cr.top=`${We.bottom+Lt}px`;const on=parseFloat(cr.top);return on<Lt?cr.top=`${Lt}px`:on+ft>Rt-Lt&&(cr.top=`${Rt-ft-Lt}px`),cr});return(We,ze)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(Xt.value),onMouseenter:hr,onMouseleave:Vt},[a.createElementVNode("div",{ref_key:"inputRef",ref:y,class:"el-input",onClick:Z},[a.createElementVNode("div",pF,[a.createElementVNode("div",vF,[a.createElementVNode("input",{value:k.value,type:"text",class:"el-input__inner-input",placeholder:n.type==="daterange"?`${i.value} ${l.value} ${A.value}`:o.value,disabled:n.disabled,readonly:"",onFocus:Mt,onBlur:tt},null,40,mF)]),a.createElementVNode("div",wF,[a.createElementVNode("div",yF,[mr.value?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"el-input__clear",onClick:a.withModifiers(N,["stop"])},[...ze[12]||(ze[12]=[a.createElementVNode("svg",{class:"el-icon",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1)])])):(a.openBlock(),a.createElementBlock("span",BF,[...ze[13]||(ze[13]=[a.createElementVNode("svg",{class:"el-icon",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M128 384v512h768V384H128zm-32-64h832a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32z"}),a.createElementVNode("path",{fill:"currentColor",d:"M288 128a32 32 0 0 1 64 0v192a32 32 0 0 1-64 0V128zm384 0a32 32 0 0 1 64 0v192a32 32 0 0 1-64 0V128z"}),a.createElementVNode("path",{fill:"currentColor",d:"M96 320h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32z"})],-1)])]))])])])],512),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createVNode(a.Transition,{name:"picker-fade"},{default:a.withCtx(()=>[m.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"timePickerRef",ref:w,class:"el-time-picker-panel",style:a.normalizeStyle(jt.value),tabindex:"-1",onClick:ze[4]||(ze[4]=a.withModifiers(()=>{},["stop"])),onMousedown:ze[5]||(ze[5]=a.withModifiers(()=>{},["prevent"])),onFocus:_t,onBlur:St},[a.createElementVNode("div",bF,[a.createElementVNode("span",CF,a.toDisplayString(a.unref(s).selectTime),1)]),a.createElementVNode("div",kF,[a.createElementVNode("div",EF,[a.createElementVNode("div",DF,a.toDisplayString(a.unref(s).hour),1),a.createElementVNode("div",{ref_key:"hourListRef",ref:x,class:"el-time-column-list"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(be.value,ft=>(a.openBlock(),a.createElementBlock("div",{key:ft,class:a.normalizeClass(["el-time-item",{"is-active":ft===R.value}]),onClick:a.withModifiers(Lt=>Xe(ft),["stop"]),onMousedown:ze[0]||(ze[0]=a.withModifiers(()=>{},["prevent"]))},a.toDisplayString(String(ft).padStart(2,"0")),43,TF))),128))],512)]),a.createElementVNode("div",xF,[a.createElementVNode("div",SF,a.toDisplayString(a.unref(s).minute),1),a.createElementVNode("div",{ref_key:"minuteListRef",ref:b,class:"el-time-column-list"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ke.value,ft=>(a.openBlock(),a.createElementBlock("div",{key:ft,class:a.normalizeClass(["el-time-item",{"is-active":ft===ae.value}]),onClick:a.withModifiers(Lt=>xe(ft),["stop"]),onMousedown:ze[1]||(ze[1]=a.withModifiers(()=>{},["prevent"]))},a.toDisplayString(String(ft).padStart(2,"0")),43,FF))),128))],512)])]),a.createElementVNode("div",LF,[a.createElementVNode("button",{class:"el-time-picker-btn el-time-picker-btn--cancel",onClick:a.withModifiers(Ae,["stop"]),onMousedown:ze[2]||(ze[2]=a.withModifiers(()=>{},["prevent"]))},a.toDisplayString(a.unref(s).cancel),33),a.createElementVNode("button",{class:"el-time-picker-btn el-time-picker-btn--confirm",onClick:a.withModifiers(Fe,["stop"]),onMousedown:ze[3]||(ze[3]=a.withModifiers(()=>{},["prevent"]))},a.toDisplayString(a.unref(s).confirm),33)])],36)):a.createCommentVNode("",!0)]),_:1})])),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createVNode(a.Transition,{name:"picker-fade"},{default:a.withCtx(()=>[h.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:B,class:"el-picker-panel",style:a.normalizeStyle(Kt.value),tabindex:"-1",onFocus:_t,onBlur:rr},[g.value?(a.openBlock(),a.createElementBlock("div",UF,[a.createElementVNode("div",IF,[a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:ct}," << "),a.createElementVNode("span",MF,a.toDisplayString(Q.value)+" - "+a.toDisplayString(Q.value+9),1),a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:$e}," >> ")]),a.createElementVNode("div",QF,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ve.value,ft=>(a.openBlock(),a.createElementBlock("div",{key:ft,class:a.normalizeClass(["el-year-picker__item",{"is-current":ft===D.value}]),onClick:Lt=>ye(ft,Lt)},a.toDisplayString(ft),11,NF))),128))])])):d.value?(a.openBlock(),a.createElementBlock("div",_F,[a.createElementVNode("div",RF,[a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:Oe}," << "),a.createElementVNode("span",{class:"el-month-picker__header-label",onClick:ze[6]||(ze[6]=ft=>W(ft))},a.toDisplayString(D.value),1),a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:it}," >> ")]),a.createElementVNode("div",OF,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s).monthNames,(ft,Lt)=>(a.openBlock(),a.createElementBlock("div",{key:Lt,class:a.normalizeClass(["el-month-picker__item",{"is-current":Lt===S.value}]),onClick:ar=>qe(Lt,ar)},a.toDisplayString(ft),11,HF))),128))])])):(a.openBlock(),a.createElementBlock("div",PF,[a.createElementVNode("div",VF,[a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:Oe}," << "),a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:yt}," < "),a.createElementVNode("span",WF,[a.createElementVNode("span",{class:"el-date-picker__header-year",onClick:ze[7]||(ze[7]=ft=>W(ft))},a.toDisplayString(D.value),1),a.createElementVNode("span",{class:"el-date-picker__header-month",onClick:ze[8]||(ze[8]=ft=>z(ft))},a.toDisplayString(a.unref(s).monthNames[S.value]),1)]),a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:pt}," > "),a.createElementVNode("button",{type:"button",class:"el-picker-panel__icon-btn",onClick:it}," >> ")]),a.createElementVNode("div",KF,[a.createElementVNode("div",$F,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s).weekDays,ft=>(a.openBlock(),a.createElementBlock("div",{key:ft,class:"el-date-table__header-cell"},a.toDisplayString(ft),1))),128))]),a.createElementVNode("div",qF,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Et.value,ft=>(a.openBlock(),a.createElementBlock("div",{key:`${ft.date.getTime()}`,class:a.normalizeClass(["el-date-table__cell",{"is-other-month":!ft.isCurrentMonth,"is-today":ft.isToday,"is-selected":ft.isSelected,"is-in-range":ft.isInRange,"is-range-start":n.type==="daterange"&&ft.dateStr===oe.value,"is-range-end":n.type==="daterange"&&ft.dateStr===X.value}]),onClick:Lt=>ot(ft.dateStr)},[a.createElementVNode("div",YF,a.toDisplayString(ft.day),1)],10,jF))),128))])]),n.type==="datetime"?(a.openBlock(),a.createElementBlock("div",GF,[a.createElementVNode("label",zF,a.toDisplayString(a.unref(s).time)+":",1),a.createElementVNode("input",{id:"time-input",ref_key:"timeInputRef",ref:E,type:"text",class:"el-time-input",value:M.value,placeholder:a.unref(s).selectTime,readonly:"",onClick:ze[9]||(ze[9]=ft=>ge(ft)),onMousedown:ze[10]||(ze[10]=a.withModifiers(()=>{},["prevent"]))},null,40,XF)])):a.createCommentVNode("",!0),n.type==="datetime"?(a.openBlock(),a.createElementBlock("div",JF,[a.createElementVNode("button",{class:"el-date-picker-btn el-date-picker-btn--confirm",onClick:a.withModifiers(te,["stop"]),onMousedown:ze[11]||(ze[11]=a.withModifiers(()=>{},["prevent"]))},a.toDisplayString(a.unref(s).confirm),33)])):a.createCommentVNode("",!0)]))],36)):a.createCommentVNode("",!0)]),_:1})]))],34))}}),sl=un(ZF,[["__scopeId","data-v-fdd5e5b4"]]),e3={class:"multi-select-predecessor"},t3={class:"form-label",for:"predecessor-select"},r3={class:"predecessor-selector"},n3={key:0,class:"selected-tags"},a3=["onClick"],s3={class:"select-wrapper"},o3={value:""},A3=["value"],i3=a.defineComponent({__name:"MultiSelectPredecessor",props:{modelValue:{default:()=>[]},tasks:{},currentTaskId:{default:void 0},label:{default:"前置任务"},placeholder:{default:"请选择前置任务"}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,r=t,s=a.ref(""),o=a.computed(()=>e.modelValue||[]),i=a.computed(()=>o.value.map(u=>e.tasks.find(h=>h.id===u)).filter(u=>u)),A=a.computed(()=>e.tasks.filter(u=>u.type==="task"&&u.id!==e.currentTaskId&&!o.value.includes(u.id))),l=()=>{if(s.value){const u=Number(s.value);if(!o.value.includes(u)){const h=[...o.value,u];r("update:modelValue",h)}s.value=""}},c=u=>{const h=o.value.filter(g=>g!==u);r("update:modelValue",h)};return a.watch(()=>e.modelValue,()=>{s.value=""},{immediate:!0}),(u,h)=>(a.openBlock(),a.createElementBlock("div",e3,[a.createElementVNode("label",t3,a.toDisplayString(n.label),1),a.createElementVNode("div",r3,[i.value.length>0?(a.openBlock(),a.createElementBlock("div",n3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,g=>(a.openBlock(),a.createElementBlock("span",{key:g.id,class:"predecessor-tag"},[a.createTextVNode(a.toDisplayString(g.name)+" ("+a.toDisplayString(g.id)+") ",1),a.createElementVNode("button",{type:"button",class:"remove-tag-btn",onClick:d=>c(g.id)}," × ",8,a3)]))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",s3,[a.withDirectives(a.createElementVNode("select",{id:"predecessor-select","onUpdate:modelValue":h[0]||(h[0]=g=>s.value=g),class:"form-select",onChange:l},[a.createElementVNode("option",o3,a.toDisplayString(n.placeholder),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(A.value,g=>(a.openBlock(),a.createElementBlock("option",{key:g.id,value:g.id},a.toDisplayString(g.name)+" (ID: "+a.toDisplayString(g.id)+") ",9,A3))),128))],544),[[a.vModelSelect,s.value]])])])]))}}),l3=un(i3,[["__scopeId","data-v-bc7f35cb"]]),c3=["placeholder"],u3={key:0,class:"ras-dropdown"},d3=["onClick"],f3={key:0,class:"ras-option ras-empty"},h3=a.defineComponent({__name:"ResourceAssigneeSelect",props:{modelValue:{default:""},options:{default:()=>[]},placeholder:{default:"选择资源"}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,r=t,s=a.ref(!1),o=a.ref(""),i=a.ref(null),A=a.ref(null),l=a.computed(()=>e.options.find(B=>B.value===e.modelValue)),c=a.computed(()=>{const B=o.value.trim().toLowerCase();return B?e.options.filter(w=>w.label.toLowerCase().includes(B)):e.options}),u=()=>{s.value||(s.value=!0,o.value="",a.nextTick(()=>{var B;return(B=A.value)==null?void 0:B.focus()}))},h=()=>{s.value=!1,o.value=""},g=()=>{s.value?h():u()},d=B=>{r("update:modelValue",B.value),h()},m=()=>{r("update:modelValue",""),h()},y=B=>{i.value&&!i.value.contains(B.target)&&h()};return a.watch(s,B=>{B?document.addEventListener("mousedown",y):document.removeEventListener("mousedown",y)}),a.watch(()=>e.options,()=>{h()}),(B,w)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapperRef",ref:i,class:a.normalizeClass(["resource-assignee-select",{"is-open":s.value}])},[a.createElementVNode("div",{class:"ras-control",onClick:g},[s.value?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,ref_key:"searchInputRef",ref:A,"onUpdate:modelValue":w[0]||(w[0]=E=>o.value=E),type:"text",class:"ras-search-input",placeholder:n.placeholder,onClick:w[1]||(w[1]=a.withModifiers(()=>{},["stop"])),onKeydown:a.withKeys(h,["esc"])},null,40,c3)),[[a.vModelText,o.value]]):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["ras-value",{"ras-placeholder":!l.value}])},a.toDisplayString(l.value?l.value.label:n.placeholder),3)),w[2]||(w[2]=a.createElementVNode("svg",{class:"ras-arrow",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none"},[a.createElementVNode("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))]),s.value?(a.openBlock(),a.createElementBlock("ul",u3,[a.createElementVNode("li",{class:"ras-option ras-option-empty",onClick:m},a.toDisplayString(n.placeholder),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,E=>(a.openBlock(),a.createElementBlock("li",{key:E.key??E.value,class:a.normalizeClass(["ras-option",{active:E.value===n.modelValue}]),onClick:x=>d(E)},a.toDisplayString(E.label),11,d3))),128)),c.value.length===0?(a.openBlock(),a.createElementBlock("li",f3,"无匹配资源")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],2))}}),g3=un(h3,[["__scopeId","data-v-65ec3c48"]]),p3=["data-theme"],v3={class:"drawer-header",style:{display:"flex","align-items":"center","justify-content":"flex-start",gap:"8px"}},m3={class:"drawer-title",style:{margin:"0"}},w3={key:0,class:"drawer-timer",style:{display:"flex","align-items":"center",gap:"6px","margin-left":"8px"}},y3={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{display:"block",margin:"0 auto"}},B3={key:0,class:"timer-dot",style:{background:"#67c23a",width:"7px",height:"7px","border-radius":"50%","margin-right":"5px",animation:"pulse 1s infinite"}},b3={class:"close-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",style:{"vertical-align":"middle"}},C3={class:"drawer-body"},k3={class:"form-group"},E3={class:"form-label",for:"task-name"},D3=["placeholder"],T3={key:0,class:"error-text"},x3={class:"form-group"},S3={class:"form-label",for:"task-type"},F3={value:"story"},L3={value:"task"},U3={value:"bug"},I3={key:0,class:"error-text"},M3={class:"form-group"},Q3={class:"form-label"},N3={class:"resource-list"},_3={class:"resource-header"},R3={key:0,class:"resource-header-label resource-header-label-type"},O3=["onUpdate:modelValue","onChange"],H3=["value"],P3=["onUpdate:modelValue","onChange"],V3=["onClick"],W3={class:"form-group"},K3={class:"form-label",for:"task-parent"},$3={value:void 0},q3=["value"],j3={class:"form-row"},Y3={class:"form-group"},G3={class:"form-label",for:"task-start-date"},z3={key:0,class:"error-text"},X3={class:"form-group"},J3={class:"form-label",for:"task-end-date"},Z3={key:0,class:"error-text"},eL={class:"form-row"},tL={class:"form-group"},rL={class:"form-label",for:"task-actual-start-date"},nL={key:0,class:"error-text"},aL={class:"form-group"},sL={class:"form-label",for:"task-actual-end-date"},oL={key:0,class:"error-text"},AL={class:"form-row"},iL={class:"form-group"},lL={class:"form-label",for:"task-estimated-hours"},cL={class:"form-group"},uL={class:"form-label",for:"task-actual-hours"},dL={class:"form-group"},fL={class:"form-label",for:"task-progress"},hL={class:"progress-container"},gL={class:"progress-input-group"},pL={class:"form-group"},vL={class:"form-label",for:"task-description"},mL=["placeholder"],wL={class:"drawer-footer"},yL={class:"footer-left"},BL=["disabled"],bL={key:0,class:"loading-spinner"},CL={class:"footer-right"},kL=["disabled"],EL={key:0,class:"loading-spinner"},DL=a.defineComponent({__name:"TaskDrawer",props:{visible:{type:Boolean,default:!1},task:{default:null},isEdit:{type:Boolean,default:!1},onDelete:{type:Function,default:void 0},assigneeOptions:{default:()=>[{value:"zhangsan",label:"张三"},{value:"lisi",label:"李四"},{value:"wangwu",label:"王五"},{value:"zhaoliu",label:"赵六"},{value:"qianqi",label:"钱七"}]},resourceTypeOptions:{default:()=>[]},showResourceTypeOption:{type:Boolean,default:!0},pendingTaskBackgroundColor:{default:"#c0c4cc"},delayTaskBackgroundColor:{default:"#f56c6c"},completeTaskBackgroundColor:{default:"#67c23a"},ongoingTaskBackgroundColor:{default:"#409eff"},enableCloseOnOverlayClick:{type:Boolean,default:!0}},emits:["update:visible","submit","close","delete","start-timer","stop-timer"],setup(n,{emit:t}){const e=n,r=t,{t:s}=_s(),{showMessage:o}=Mv(),i=a.inject("gantt-theme"),A=a.ref(!1),l=a.ref(e.visible),c=a.ref(!1),u=a.ref(0),h=a.ref(null),g=a.computed(()=>{var W;return(W=e.task)==null?void 0:W.isTimerRunning}),d=a.computed(()=>{var W;return(W=e.task)==null?void 0:W.timerStartTime}),m=a.computed(()=>{var W;return((W=e.task)==null?void 0:W.timerElapsedTime)||0}),y=a.computed(()=>{const W=Math.floor(u.value/1e3),z=Math.floor(W/3600),ye=Math.floor(W%3600/60),qe=W%60;return`${String(z).padStart(2,"0")}:${String(ye).padStart(2,"0")}:${String(qe).padStart(2,"0")}`}),B=()=>{g.value&&d.value?u.value=Date.now()-d.value+m.value:u.value=m.value};a.watch(()=>{var W,z,ye;return[(W=e.task)==null?void 0:W.isTimerRunning,(z=e.task)==null?void 0:z.timerStartTime,(ye=e.task)==null?void 0:ye.timerElapsedTime]},()=>{B()});const w=a.ref(!1);a.watch(()=>{var W;return(W=e.task)==null?void 0:W.isTimerRunning},W=>{w.value=!!W,!W&&h.value&&(clearInterval(h.value),h.value=null)},{immediate:!0}),a.watch([w,d,m],()=>{h.value&&(clearInterval(h.value),h.value=null),w.value&&d.value?(B(),h.value=window.setInterval(B,1e3)):B()},{immediate:!0}),a.onUnmounted(()=>{h.value&&clearInterval(h.value)});const E=a.computed(()=>{var W;return((W=e.task)==null?void 0:W.type)==="story"?"yes-no-cancel":"confirm-cancel"}),x=a.computed(()=>{var W,z,ye;return((W=e.task)==null?void 0:W.type)==="story"?s.value.confirmDeleteStory.replace("{name}",((z=e.task)==null?void 0:z.name)||""):s.value.confirmDeleteTask.replace("{name}",((ye=e.task)==null?void 0:ye.name)||"")}),b=a.reactive({id:0,name:"",type:"task",assignee:"",startDate:"",endDate:"",actualStartDate:"",actualEndDate:"",predecessor:[],estimatedHours:0,actualHours:0,progress:0,description:"",parentId:void 0,isTimerRunning:!1,timerStartTime:void 0,timerEndTime:void 0,timerElapsedTime:0,children:void 0,resources:[]}),H=a.ref([]),$=a.computed(()=>H.value.filter(W=>{var z;return W.id!==((z=e.task)==null?void 0:z.id)&&(W.type==="story"||W.type==="task")}).map(W=>({...W,displayName:`${W.name} (${Y(W.type||"task")})`}))),Y=W=>{var z;return((z=s.value.taskTypeMap)==null?void 0:z[W])||W},V=a.computed(()=>({"--progress-capacity":`${b.progress||0}%`})),L=a.ref("0"),j=W=>{const z=W.target;let ye=z.value;ye=ye.replace(/[^\d]/g,""),z.value=ye,L.value=ye},D=()=>{const W=L.value;let z=parseInt(W)||0;z<0||isNaN(z)?z=0:z>100&&(z=100),b.progress=z,L.value=z.toString()},S=W=>{const z=W.target;let ye=parseFloat(z.value);isNaN(ye)||ye<0?ye=0:ye>99999&&(ye=99999),b.estimatedHours=Math.round(ye*100)/100},Q=W=>{const z=W.target;let ye=parseFloat(z.value);isNaN(ye)||ye<0?ye=0:ye>99999&&(ye=99999),b.actualHours=Math.round(ye*100)/100},T=W=>{const z=W.target;setTimeout(()=>{z.select()},0)},oe=W=>{const z=W.key,ye=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Control","Meta","Alt","Shift"],qe=/^\d$/.test(z),ct=ye.includes(z);W.ctrlKey||W.metaKey||!qe&&!ct&&W.preventDefault()},X=(W,z)=>{if(!W)return"";if(typeof W=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(W.trim())){if(z==="start")return`${W} 00:00`;if(z==="end"){const[ye,qe,ct]=W.split("-").map(Number),$e=new Date(ye,qe-1,ct);$e.setDate($e.getDate()+1);const Ve=$e.getFullYear(),Mt=String($e.getMonth()+1).padStart(2,"0"),tt=String($e.getDate()).padStart(2,"0");return`${Ve}-${Mt}-${tt} 00:00`}}return W},F=a.reactive({name:"",type:"",startDate:"",endDate:"",actualStartDate:"",actualEndDate:""});a.watch(()=>e.visible,W=>{if(l.value=W,W){if(e.task&&e.isEdit){M();const z={...e.task};z.startDate=X(z.startDate,"start"),z.endDate=X(z.endDate,"end"),a.nextTick(()=>{Object.assign(b,z),pt(),Te()})}else e.task&&!e.isEdit?(M(),b.parentId=e.task.parentId??void 0,b.predecessor=e.task.predecessor??[],e.task.startDate&&(b.startDate=X(e.task.startDate,"start")),e.task.endDate&&(b.endDate=X(e.task.endDate,"end")),e.task.resources&&e.task.resources.length>0&&(b.resources=e.task.resources.map(z=>({...z})),Te())):M();window.dispatchEvent(new CustomEvent("request-task-list"))}}),a.watch(l,W=>{r("update:visible",W)}),a.watch(()=>e.task,W=>{W&&!e.isEdit&&(b.parentId=W.parentId??void 0)},{immediate:!0});const M=()=>{Object.assign(b,{name:"",type:"task",assignee:"",startDate:"",endDate:"",actualStartDate:"",actualEndDate:"",predecessor:[],estimatedHours:0,actualHours:0,progress:0,description:"",parentId:void 0,isTimerRunning:!1,timerStartTime:void 0,timerEndTime:void 0,timerElapsedTime:0,children:void 0,bgColor:void 0,avatar:void 0,barColor:void 0,resources:[]}),Object.keys(F).forEach(W=>{F[W]=""})},R=()=>{var z;let W=!0;return Object.keys(F).forEach(ye=>{F[ye]=""}),(z=b.name)!=null&&z.trim()?b.name.length>50&&(F.name=s.value.taskNameTooLong,W=!1):(F.name=s.value.taskNameRequired,W=!1),b.type||(F.type=s.value.taskTypeRequired,W=!1),b.startDate||(F.startDate=s.value.plannedStartDateRequired,W=!1),b.endDate?b.startDate&&new Date(b.endDate)<new Date(b.startDate)&&(F.endDate=s.value.plannedEndDateInvalid,W=!1):(F.endDate=s.value.plannedEndDateRequired,W=!1),b.actualStartDate&&b.actualEndDate&&new Date(b.actualEndDate)<new Date(b.actualStartDate)&&(F.actualEndDate=s.value.actualEndDateInvalid,W=!1),W},ae=()=>{l.value=!1,r("close")},J=()=>{e.enableCloseOnOverlayClick&&ae()},k=async()=>{if(R())try{A.value=!0,Oe();const W={...b,id:e.isEdit&&e.task?e.task.id:Date.now(),resources:b.resources};r("submit",W),ae()}catch{}finally{A.value=!1}},O=()=>{c.value=!0},N=W=>{let z="";W&&typeof W=="object"&&"message"in W&&typeof W.message=="string"?z=W.message:z=String(W),o(z,"error",{closable:!0})},Z=()=>{if(c.value=!1,e.task&&e.isEdit)try{A.value=!0,r("delete",e.task),ae()}catch(W){N(W)}finally{A.value=!1}},se=()=>{c.value=!1},ge=()=>{if(c.value=!1,e.task&&e.isEdit)try{A.value=!0,r("delete",e.task,!0),ae()}catch(W){N(W)}finally{A.value=!1}},fe=()=>{if(c.value=!1,e.task&&e.isEdit)try{A.value=!0,r("delete",e.task,!1),ae()}catch(W){N(W)}finally{A.value=!1}},Ae=W=>{H.value=W.detail||[]};a.onMounted(()=>{window.addEventListener("task-list-updated",Ae),window.dispatchEvent(new CustomEvent("request-task-list"))}),a.onUnmounted(()=>{window.removeEventListener("task-list-updated",Ae)}),a.watch(()=>b.progress,W=>{L.value=(W||0).toString()},{immediate:!0}),a.watch(()=>e.visible,W=>{W&&e.task&&e.task.type!=="story"&&(u.value=e.task.timerElapsedTime||0,e.task.isTimerRunning||h.value&&(clearInterval(h.value),h.value=null))},{immediate:!0});const Fe=W=>{const z=Date.now();e.task&&typeof e.task=="object"&&(Object.assign(e.task,{timerStartTime:z,isTimerRunning:!0,timerElapsedTime:0,timerStartDesc:W||""}),r("start-timer",e.task)),u.value=0,w.value=!0,B(),h.value&&(clearInterval(h.value),h.value=null),window.dispatchEvent(new CustomEvent("start-timer",{detail:e.task}))},be=()=>{e.task&&typeof e.task=="object"&&r("stop-timer",e.task),w.value=!1,h.value&&(clearInterval(h.value),h.value=null),B(),window.dispatchEvent(new CustomEvent("stop-timer",{detail:e.task}))},Ke=a.ref(!1),Xe=a.ref("");function xe(){var W;Xe.value=((W=e.task)==null?void 0:W.name)||"",Ke.value=!0}function te(){Ke.value=!1}function lt(W){Ke.value=!1,Fe(W)}const Pe=()=>{b.resources||(b.resources=[]),b.resources.push(Dp({id:"",name:"",type:"Human",capacity:100,tasks:[]}))},rt=W=>{b.resources&&b.resources.length>W&&b.resources.splice(W,1)},Te=()=>{!b.resources||b.resources.length===0||b.resources.forEach(W=>{W.type||(W.type="Human")})},Et=W=>{const z=e.assigneeOptions||[];return W.type?z.filter(ye=>(ye.type||"Human")===W.type):z},ot=a.computed(()=>e.resourceTypeOptions&&e.resourceTypeOptions.length>0?e.resourceTypeOptions:[{value:"Human",label:s.value.resourceCategoryHuman||"人力"},{value:"Device",label:s.value.resourceCategoryDevice||"设备"},{value:"Others",label:s.value.resourceCategoryOthers||"其他"}]),yt=(W,z,ye)=>{var qe;if(!(!b.resources||!b.resources[W]))if(z==="id"){const ct=(qe=e.assigneeOptions)==null?void 0:qe.find($e=>$e.value===ye);ct?(b.resources[W].id=ct.value,b.resources[W].name=ct.label,b.resources[W].type=ct.type||"Human"):(b.resources[W].id="",b.resources[W].name="")}else if(z==="capacity"){let ct=typeof ye=="string"?parseInt(ye):ye;ct<20&&(ct=20),ct>100&&(ct=100),b.resources[W].capacity=ct}else z==="type"&&(b.resources[W].type=String(ye)||"Human",b.resources[W].id="",b.resources[W].name="")},pt=()=>{if(b.resources||(b.resources=[]),b.resources&&b.resources.length>0)return;const W=Array.isArray(b.assignee)?b.assignee:b.assignee?[b.assignee]:[];b.resources=W.map(z=>{var qe;const ye=(qe=e.assigneeOptions)==null?void 0:qe.find(ct=>ct.value===z);return Dp({id:z,name:(ye==null?void 0:ye.label)||String(z),type:(ye==null?void 0:ye.type)||"Human",capacity:100,tasks:[]})})},Oe=()=>{if(!b.resources||b.resources.length===0){b.assignee="",b.avatar="";return}const W=b.resources.map(ye=>String(ye.id)).filter(ye=>ye);b.assignee=W.length>1?W:W[0]||"";const z=b.resources.map(ye=>{var ct;const qe=(ct=e.assigneeOptions)==null?void 0:ct.find($e=>$e.value===ye.id);return(qe==null?void 0:qe.avatar)||""}).filter(ye=>ye);b.avatar=z.length>1?z:z[0]||""},it=a.computed(()=>{if(!e.task)return{text:"",color:"",bgColor:"",borderColor:""};const W=e.task,z=W.progress||0,ye=new Date,qe=W.endDate?new Date(W.endDate):null,ct=W.startDate?new Date(W.startDate):null;if(!W.actualStartDate&&z===0){const Mt=e.pendingTaskBackgroundColor;return{text:s.value.statusPending,color:Mt,bgColor:`${Mt}20`,borderColor:Mt}}if(z>=100){const Mt=e.completeTaskBackgroundColor;return{text:s.value.statusCompleted,color:Mt,bgColor:`${Mt}20`,borderColor:Mt}}if(qe&&ye>qe&&z<100){const Mt=e.delayTaskBackgroundColor;return{text:s.value.statusDelayed,color:Mt,bgColor:`${Mt}20`,borderColor:Mt}}if(ct&&ye>=ct&&z<100){const Mt=e.ongoingTaskBackgroundColor;return{text:s.value.statusOngoing,color:Mt,bgColor:`${Mt}20`,borderColor:Mt}}const Ve=e.pendingTaskBackgroundColor;return{text:s.value.statusPending,color:Ve,bgColor:`${Ve}20`,borderColor:Ve}});return(W,z)=>{var ye,qe,ct,$e;return a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[l.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"drawer-overlay","data-theme":a.unref(i),onClick:J},[a.createElementVNode("div",{class:"drawer-container",onClick:z[13]||(z[13]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",v3,[a.createElementVNode("h3",m3,a.toDisplayString(n.isEdit?a.unref(s).editTask:a.unref(s).newTask),1),((ye=e.task)==null?void 0:ye.type)!=="story"&&n.isEdit?(a.openBlock(),a.createElementBlock("div",w3,[w.value?(a.openBlock(),a.createElementBlock("button",{key:1,class:"timer-btn stop minimal",title:"停止计时",style:{width:"24px",height:"24px",background:"#f44336",border:"none",padding:"0",margin:"0","box-shadow":"none",cursor:"pointer","border-radius":"50%",display:"flex","align-items":"center","justify-content":"center",transition:"background 0.2s"},onClick:a.withModifiers(be,["stop"])},[...z[15]||(z[15]=[a.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[a.createElementVNode("circle",{cx:"12",cy:"12",r:"11",stroke:"#f44336","stroke-width":"2",fill:"#f44336"}),a.createElementVNode("rect",{x:"7",y:"7",width:"10",height:"10",fill:"#fff",rx:"1.5"})],-1)])])):(a.openBlock(),a.createElementBlock("button",{key:0,class:"timer-btn start minimal",title:"开始计时",style:{width:"24px",height:"24px",background:"#4caf50",border:"none",padding:"0",margin:"0","box-shadow":"none",cursor:"pointer","border-radius":"50%",display:"flex","align-items":"center","justify-content":"center",transition:"background 0.2s"},onClick:a.withModifiers(xe,["stop"])},[(a.openBlock(),a.createElementBlock("svg",y3,[...z[14]||(z[14]=[a.createElementVNode("circle",{cx:"12",cy:"12",r:"11",stroke:"#4caf50","stroke-width":"2",fill:"#4caf50"},null,-1),a.createElementVNode("polygon",{points:"9,7 18,12 9,17",fill:"#fff"},null,-1)])]))])),w.value?(a.openBlock(),a.createElementBlock("span",{key:2,class:a.normalizeClass(["timer-badge",{"timer-active":w.value}]),style:{"margin-left":"8px","font-size":"13px","font-weight":"700",padding:"2px 10px","border-radius":"10px",background:"#fffbe6",color:"#e6a23c","box-shadow":"0 0 0 1px #ffe58f",display:"inline-flex","align-items":"center","min-width":"80px","justify-content":"center"}},[w.value?(a.openBlock(),a.createElementBlock("span",B3)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(y.value),1)],2)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),z[17]||(z[17]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),n.isEdit&&e.task?(a.openBlock(),a.createElementBlock("div",{key:1,class:"status-badge",style:a.normalizeStyle({backgroundColor:it.value.bgColor,color:it.value.color,border:`1px solid ${it.value.borderColor}`})},a.toDisplayString(it.value.text),5)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:"drawer-close-btn",type:"button",onClick:ae},[(a.openBlock(),a.createElementBlock("svg",b3,[...z[16]||(z[16]=[a.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),a.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)])]))])]),a.createElementVNode("div",C3,[a.createElementVNode("form",{class:"task-form",onSubmit:a.withModifiers(k,["prevent"])},[a.createElementVNode("div",k3,[a.createElementVNode("label",E3,[a.createTextVNode(a.toDisplayString(a.unref(s).taskName)+" ",1),z[18]||(z[18]=a.createElementVNode("span",{class:"required"},"*",-1))]),a.withDirectives(a.createElementVNode("input",{id:"task-name","onUpdate:modelValue":z[0]||(z[0]=Ve=>b.name=Ve),type:"text",class:a.normalizeClass(["form-input",{error:F.name}]),placeholder:a.unref(s).taskNamePlaceholder},null,10,D3),[[a.vModelText,b.name]]),F.name?(a.openBlock(),a.createElementBlock("span",T3,a.toDisplayString(F.name),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",x3,[a.createElementVNode("label",S3,[a.createTextVNode(a.toDisplayString(a.unref(s).taskType)+" ",1),z[19]||(z[19]=a.createElementVNode("span",{class:"required"},"*",-1))]),a.withDirectives(a.createElementVNode("select",{id:"task-type","onUpdate:modelValue":z[1]||(z[1]=Ve=>b.type=Ve),class:a.normalizeClass(["form-select",{error:F.type}])},[a.createElementVNode("option",F3,a.toDisplayString(a.unref(s).taskTypeMap.story),1),a.createElementVNode("option",L3,a.toDisplayString(a.unref(s).taskTypeMap.task),1),a.createElementVNode("option",U3,a.toDisplayString(a.unref(s).taskTypeMap.bug),1)],2),[[a.vModelSelect,b.type]]),F.type?(a.openBlock(),a.createElementBlock("span",I3,a.toDisplayString(F.type),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",M3,[a.createElementVNode("label",Q3,a.toDisplayString(a.unref(s).resourceAllocation||"资源分配"),1),a.createElementVNode("div",N3,[a.createElementVNode("div",_3,[z[20]||(z[20]=a.createElementVNode("span",{class:"resource-header-label resource-header-label-name"},"资源名称",-1)),e.showResourceTypeOption?(a.openBlock(),a.createElementBlock("span",R3,a.toDisplayString(a.unref(s).resourceCategory||"类别"),1)):a.createCommentVNode("",!0),z[21]||(z[21]=a.createElementVNode("span",{class:"resource-header-label resource-header-label-capacity"},"占用比例",-1)),z[22]||(z[22]=a.createElementVNode("span",{class:"resource-header-action"},null,-1))]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.resources,(Ve,Mt)=>(a.openBlock(),a.createElementBlock("div",{key:Mt,class:"resource-item"},[a.createVNode(g3,{"model-value":Ve.id,options:Et(Ve),placeholder:a.unref(s).selectResource||"选择资源","onUpdate:modelValue":tt=>yt(Mt,"id",tt)},null,8,["model-value","options","placeholder","onUpdate:modelValue"]),e.showResourceTypeOption?a.withDirectives((a.openBlock(),a.createElementBlock("select",{key:0,"onUpdate:modelValue":tt=>Ve.type=tt,class:"form-select type-select",onChange:tt=>yt(Mt,"type",tt.target.value)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ot.value,tt=>(a.openBlock(),a.createElementBlock("option",{key:tt.value,value:tt.value},a.toDisplayString(tt.label),9,H3))),128))],40,O3)),[[a.vModelSelect,Ve.type]]):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("select",{"onUpdate:modelValue":tt=>Ve.capacity=tt,class:"form-select capacity-select",onChange:tt=>yt(Mt,"capacity",tt.target.value)},[...z[23]||(z[23]=[a.createElementVNode("option",{value:25},"25%",-1),a.createElementVNode("option",{value:50},"50%",-1),a.createElementVNode("option",{value:75},"75%",-1),a.createElementVNode("option",{value:100},"100%",-1)])],40,P3),[[a.vModelSelect,Ve.capacity,void 0,{number:!0}]]),a.createElementVNode("button",{type:"button",class:"btn-remove-resource",title:"删除资源",onClick:tt=>rt(Mt)},[...z[24]||(z[24]=[a.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("polyline",{points:"3 6 5 6 21 6"}),a.createElementVNode("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),a.createElementVNode("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),a.createElementVNode("line",{x1:"14",y1:"11",x2:"14",y2:"17"})],-1)])],8,V3)]))),128)),a.createElementVNode("button",{type:"button",class:"btn-add-resource",onClick:Pe}," + "+a.toDisplayString(a.unref(s).addResource||"添加资源"),1)])]),a.createElementVNode("div",W3,[a.createElementVNode("label",K3,a.toDisplayString(a.unref(s).parentTask),1),a.withDirectives(a.createElementVNode("select",{id:"task-parent","onUpdate:modelValue":z[2]||(z[2]=Ve=>b.parentId=Ve),class:"form-select"},[a.createElementVNode("option",$3,a.toDisplayString(a.unref(s).noParentTask),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList($.value,Ve=>(a.openBlock(),a.createElementBlock("option",{key:Ve.id,value:Ve.id},a.toDisplayString(Ve.displayName),9,q3))),128))],512),[[a.vModelSelect,b.parentId]])]),a.createElementVNode("div",j3,[a.createElementVNode("div",Y3,[a.createElementVNode("label",G3,[a.createTextVNode(a.toDisplayString(a.unref(s).plannedStartDate)+" ",1),z[25]||(z[25]=a.createElementVNode("span",{class:"required"},"*",-1))]),a.createVNode(sl,{id:"task-start-date",modelValue:b.startDate,"onUpdate:modelValue":z[3]||(z[3]=Ve=>b.startDate=Ve),type:"datetime","value-format":"YYYY-MM-DD HH:mm",placeholder:a.unref(s).plannedStartDateRequired,class:a.normalizeClass({error:F.startDate})},null,8,["modelValue","placeholder","class"]),F.startDate?(a.openBlock(),a.createElementBlock("span",z3,a.toDisplayString(F.startDate),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",X3,[a.createElementVNode("label",J3,[a.createTextVNode(a.toDisplayString(a.unref(s).plannedEndDate)+" ",1),z[26]||(z[26]=a.createElementVNode("span",{class:"required"},"*",-1))]),a.createVNode(sl,{id:"task-end-date",modelValue:b.endDate,"onUpdate:modelValue":z[4]||(z[4]=Ve=>b.endDate=Ve),type:"datetime","value-format":"YYYY-MM-DD HH:mm",placeholder:a.unref(s).plannedEndDateRequired,class:a.normalizeClass({error:F.endDate})},null,8,["modelValue","placeholder","class"]),F.endDate?(a.openBlock(),a.createElementBlock("span",Z3,a.toDisplayString(F.endDate),1)):a.createCommentVNode("",!0)])]),a.createElementVNode("div",eL,[a.createElementVNode("div",tL,[a.createElementVNode("label",rL,a.toDisplayString(a.unref(s).actualStartDate),1),a.createVNode(sl,{id:"task-actual-start-date",modelValue:b.actualStartDate,"onUpdate:modelValue":z[5]||(z[5]=Ve=>b.actualStartDate=Ve),type:"datetime","value-format":"YYYY-MM-DD HH:mm",placeholder:a.unref(s).actualStartDate,class:a.normalizeClass({error:F.actualStartDate})},null,8,["modelValue","placeholder","class"]),F.actualStartDate?(a.openBlock(),a.createElementBlock("span",nL,a.toDisplayString(F.actualStartDate),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",aL,[a.createElementVNode("label",sL,a.toDisplayString(a.unref(s).actualEndDate),1),a.createVNode(sl,{id:"task-actual-end-date",modelValue:b.actualEndDate,"onUpdate:modelValue":z[6]||(z[6]=Ve=>b.actualEndDate=Ve),type:"datetime","value-format":"YYYY-MM-DD HH:mm",placeholder:a.unref(s).actualEndDate,class:a.normalizeClass({error:F.actualEndDate})},null,8,["modelValue","placeholder","class"]),F.actualEndDate?(a.openBlock(),a.createElementBlock("span",oL,a.toDisplayString(F.actualEndDate),1)):a.createCommentVNode("",!0)])]),a.createVNode(l3,{modelValue:b.predecessor,"onUpdate:modelValue":z[7]||(z[7]=Ve=>b.predecessor=Ve),tasks:H.value,"current-task-id":(qe=e.task)==null?void 0:qe.id,label:a.unref(s).predecessor,placeholder:a.unref(s).predecessorPlaceholder},null,8,["modelValue","tasks","current-task-id","label","placeholder"]),a.createElementVNode("div",AL,[a.createElementVNode("div",iL,[a.createElementVNode("label",lL,a.toDisplayString(a.unref(s).estimatedHours),1),a.withDirectives(a.createElementVNode("input",{id:"task-estimated-hours","onUpdate:modelValue":z[8]||(z[8]=Ve=>b.estimatedHours=Ve),type:"number",class:"form-input",placeholder:"0.00",min:"0",max:"99999",step:"0.01",onInput:S},null,544),[[a.vModelText,b.estimatedHours]])]),a.createElementVNode("div",cL,[a.createElementVNode("label",uL,a.toDisplayString(a.unref(s).actualHours),1),a.withDirectives(a.createElementVNode("input",{id:"task-actual-hours","onUpdate:modelValue":z[9]||(z[9]=Ve=>b.actualHours=Ve),type:"number",class:"form-input",placeholder:"0.00",min:"0",max:"99999",step:"0.01",onInput:Q},null,544),[[a.vModelText,b.actualHours]])])]),a.createElementVNode("div",dL,[a.createElementVNode("label",fL,a.toDisplayString(a.unref(s).progress),1),a.createElementVNode("div",hL,[a.withDirectives(a.createElementVNode("input",{id:"task-progress","onUpdate:modelValue":z[10]||(z[10]=Ve=>b.progress=Ve),type:"range",class:"progress-slider",style:a.normalizeStyle(V.value),min:"0",max:"100",step:"5"},null,4),[[a.vModelText,b.progress,void 0,{number:!0}]]),a.createElementVNode("div",gL,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":z[11]||(z[11]=Ve=>L.value=Ve),type:"text",class:"progress-input",placeholder:"0",maxlength:"3",onBlur:D,onKeyup:a.withKeys(D,["enter"]),onInput:j,onFocus:T,onKeydown:oe},null,544),[[a.vModelText,L.value]]),z[27]||(z[27]=a.createElementVNode("span",{class:"progress-unit"},"%",-1))])])]),a.createElementVNode("div",pL,[a.createElementVNode("label",vL,a.toDisplayString(a.unref(s).description),1),a.withDirectives(a.createElementVNode("textarea",{id:"task-description","onUpdate:modelValue":z[12]||(z[12]=Ve=>b.description=Ve),class:"form-textarea",placeholder:a.unref(s).descriptionPlaceholder,rows:"3"},null,8,mL),[[a.vModelText,b.description]])])],32)]),a.createElementVNode("div",wL,[a.createElementVNode("div",yL,[n.isEdit&&n.task?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"gantt-btn gantt-btn-danger",disabled:A.value,onClick:O},[A.value?(a.openBlock(),a.createElementBlock("span",bL)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(a.unref(s).delete),1)],8,BL)):a.createCommentVNode("",!0),a.createVNode(Uv,{visible:c.value,title:a.unref(s).delete,type:E.value,message:x.value,"confirm-text":a.unref(s).confirm,"cancel-text":a.unref(s).cancel,"yes-text":a.unref(s).storyDeleteYes,"no-text":a.unref(s).storyDeleteNo,onConfirm:Z,onYes:ge,onNo:fe,onCancel:se},null,8,["visible","title","type","message","confirm-text","cancel-text","yes-text","no-text"])]),a.createElementVNode("div",CL,[a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-default",onClick:ae},a.toDisplayString(a.unref(s).cancel),1),a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-primary",disabled:A.value,onClick:k},[A.value?(a.openBlock(),a.createElementBlock("span",EL)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(n.isEdit?a.unref(s).update:a.unref(s).create),1)],8,kL)])])])],8,p3)):a.createCommentVNode("",!0),Ke.value?(a.openBlock(),a.createBlock(kb,{key:1,visible:Ke.value,title:a.unref(s).startTimer,message:`${a.unref(s).timerConfirmPrefix}${(ct=e.task)==null?void 0:ct.name}${a.unref(s).timerConfirmSuffix}`,"default-desc":(($e=e.task)==null?void 0:$e.name)||"",onConfirm:lt,onCancel:te},null,8,["visible","title","message","default-desc"])):a.createCommentVNode("",!0)])}}}),Lb=un(DL,[["__scopeId","data-v-ba960e24"]]),TL=["data-theme"],xL={class:"milestone-dialog-header"},SL={class:"milestone-dialog-title"},FL=["title"],LL={class:"milestone-dialog-content"},UL={class:"milestone-form-row"},IL={class:"milestone-form-item milestone-form-item-full"},ML={class:"milestone-form-label required",for:"milestone-name"},QL=["placeholder"],NL={key:0,class:"milestone-form-error"},_L={class:"milestone-form-row"},RL={class:"milestone-form-item"},OL={class:"milestone-form-label required",for:"milestone-date"},HL={key:0,class:"milestone-form-error"},PL={class:"milestone-form-item"},VL={class:"milestone-form-label",for:"milestone-icon"},WL=["aria-expanded"],KL={class:"selected-icon"},$L={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},qL={key:1,class:"rocket-emoji-mini"},jL={key:0,class:"milestone-icon-options"},YL={class:"milestone-form-row"},GL={class:"milestone-form-item milestone-form-item-full"},zL={class:"milestone-form-label",for:"milestone-description"},XL={class:"textarea-wrapper"},JL=["placeholder"],ZL={class:"textarea-footer"},eU={class:"char-count"},tU={class:"milestone-dialog-footer"},rU={class:"milestone-dialog-footer-left"},nU={class:"milestone-dialog-footer-right"},aU=["disabled"],sU=a.defineComponent({__name:"MilestoneDialog",props:{visible:{type:Boolean},milestone:{}},emits:["update:visible","close","save","delete"],setup(n,{emit:t}){const e=n,r=t,s=a.inject("gantt-theme",a.ref("light")),o=a.reactive({id:void 0,name:"",startDate:"",assignee:"",type:"milestone",icon:"diamond",description:""}),i=a.reactive({name:"",startDate:""}),A=a.ref(!1),l=a.ref(!1),c=a.ref(null),u=()=>{const Y=c.value;Y&&(Y.style.height="auto",Y.style.height=`${Math.min(Y.scrollHeight,120)}px`)};a.watch(()=>e.milestone,Y=>{Y?Object.assign(o,{id:Y.id,name:Y.name||"",startDate:Y.startDate||"",assignee:Y.assignee||"",type:Y.type||"milestone",icon:Y.icon||"diamond",description:Y.description||""}):Object.assign(o,{id:void 0,name:"",startDate:"",assignee:"",type:"milestone",icon:"diamond",description:""}),i.name="",i.startDate=""},{immediate:!0}),a.watch(()=>e.visible,Y=>{Y&&!e.milestone&&(Object.assign(o,{id:void 0,name:"",startDate:"",assignee:"",type:"milestone",icon:"diamond",description:""}),i.name="",i.startDate="")});const h=()=>{i.name="",i.startDate="";let Y=!0;return o.name.trim()||(i.name=$("milestoneNameRequired"),Y=!1),o.startDate||(i.startDate=$("milestoneDateRequired"),Y=!1),Y},g=a.computed(()=>o.name.trim()&&o.startDate),d=Y=>{o.icon=Y,A.value=!1},m=()=>{if(h()){const Y={...o,endDate:o.startDate,id:o.id};r("save",Y),x()}},y=()=>{o.id&&(l.value=!0)},B=()=>{o.id&&(r("delete",o.id),l.value=!1,x())},w=()=>{l.value=!1},E=a.computed(()=>e.milestone&&e.milestone.id),x=()=>{A.value=!1,r("update:visible",!1),r("close")},b=()=>{x()},{t:H}=_s(),$=Y=>H.value[Y]||Y;return(Y,V)=>{var L;return a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[n.visible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"milestone-dialog-overlay","data-theme":a.unref(s),onClick:b},[a.createElementVNode("div",{class:"milestone-dialog",onClick:V[6]||(V[6]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",xL,[a.createElementVNode("h3",SL,[V[7]||(V[7]=a.createElementVNode("svg",{class:"milestone-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("g",{transform:"rotate(45 12 12)"},[a.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4",ry:"4",fill:"currentColor",opacity:"0.1"}),a.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4",ry:"4",stroke:"currentColor",fill:"none"})])],-1)),a.createTextVNode(" "+a.toDisplayString(E.value?a.unref(H).editMilestone:a.unref(H).newMilestone),1)]),a.createElementVNode("button",{class:"milestone-dialog-close",title:$("close"),onClick:x},"×",8,FL)]),a.createElementVNode("div",LL,[a.createElementVNode("form",{class:"milestone-form",onSubmit:a.withModifiers(m,["prevent"])},[a.createElementVNode("div",UL,[a.createElementVNode("div",IL,[a.createElementVNode("label",ML,a.toDisplayString($("milestoneName")),1),a.withDirectives(a.createElementVNode("input",{id:"milestone-name","onUpdate:modelValue":V[0]||(V[0]=j=>o.name=j),type:"text",class:a.normalizeClass(["milestone-form-input",{error:i.name}]),placeholder:$("enterMilestoneName"),required:""},null,10,QL),[[a.vModelText,o.name]]),i.name?(a.openBlock(),a.createElementBlock("span",NL,a.toDisplayString(i.name),1)):a.createCommentVNode("",!0)])]),a.createElementVNode("div",_L,[a.createElementVNode("div",RL,[a.createElementVNode("label",OL,a.toDisplayString($("milestoneDate")),1),a.createVNode(sl,{id:"milestone-date",modelValue:o.startDate,"onUpdate:modelValue":V[1]||(V[1]=j=>o.startDate=j),type:"date","value-format":"YYYY-MM-DD",placeholder:"请选择里程碑日期",class:a.normalizeClass({error:i.startDate})},null,8,["modelValue","class"]),i.startDate?(a.openBlock(),a.createElementBlock("span",HL,a.toDisplayString(i.startDate),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",PL,[a.createElementVNode("label",VL,a.toDisplayString($("milestoneIcon")),1),a.createElementVNode("div",{class:a.normalizeClass(["milestone-icon-dropdown",{active:A.value}])},[a.createElementVNode("button",{id:"milestone-icon",type:"button",class:"milestone-icon-trigger","aria-expanded":A.value,"aria-haspopup":"listbox",onClick:V[2]||(V[2]=j=>A.value=!A.value)},[a.createElementVNode("div",KL,[o.icon==="diamond"?(a.openBlock(),a.createElementBlock("svg",$L,[...V[8]||(V[8]=[a.createElementVNode("g",{transform:"rotate(45 12 12)"},[a.createElementVNode("rect",{x:"6",y:"6",width:"12",height:"12",rx:"3",ry:"3",fill:"currentColor"})],-1)])])):o.icon==="rocket"?(a.openBlock(),a.createElementBlock("div",qL,"🚀")):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString($(o.icon||"diamond")),1)]),V[9]||(V[9]=a.createElementVNode("svg",{class:"dropdown-arrow",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("polyline",{points:"6,9 12,15 18,9"})],-1))],8,WL),A.value?(a.openBlock(),a.createElementBlock("div",jL,[a.createElementVNode("div",{class:a.normalizeClass(["icon-option",{selected:o.icon==="diamond"}]),onClick:V[3]||(V[3]=j=>d("diamond"))},[V[10]||(V[10]=a.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a.createElementVNode("g",{transform:"rotate(45 12 12)"},[a.createElementVNode("rect",{x:"6",y:"6",width:"12",height:"12",rx:"3",ry:"3",fill:"currentColor"})])],-1)),a.createElementVNode("span",null,a.toDisplayString($("diamond")),1)],2),a.createElementVNode("div",{class:a.normalizeClass(["icon-option",{selected:o.icon==="rocket"}]),onClick:V[4]||(V[4]=j=>d("rocket"))},[V[11]||(V[11]=a.createElementVNode("div",{class:"rocket-emoji-option"},"🚀",-1)),a.createElementVNode("span",null,a.toDisplayString($("rocket")),1)],2)])):a.createCommentVNode("",!0)],2)])]),a.createElementVNode("div",YL,[a.createElementVNode("div",GL,[a.createElementVNode("label",zL,a.toDisplayString($("description")),1),a.createElementVNode("div",XL,[a.withDirectives(a.createElementVNode("textarea",{id:"milestone-description",ref_key:"descriptionTextarea",ref:c,"onUpdate:modelValue":V[5]||(V[5]=j=>o.description=j),class:"milestone-form-textarea",placeholder:$("enterDescription"),rows:"4",maxlength:"500",onInput:u},null,40,JL),[[a.vModelText,o.description]]),a.createElementVNode("div",ZL,[a.createElementVNode("span",eU,a.toDisplayString(((L=o.description)==null?void 0:L.length)||0)+"/500",1)])])])])],32)]),a.createElementVNode("div",tU,[a.createElementVNode("div",rU,[E.value?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"gantt-btn gantt-btn-danger",onClick:y},a.toDisplayString(a.unref(H).delete),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",nU,[a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-default",onClick:x},a.toDisplayString(a.unref(H).cancel),1),a.createElementVNode("button",{type:"button",class:"gantt-btn gantt-btn-primary",disabled:!g.value,onClick:m},a.toDisplayString(a.unref(H).confirm),9,aU)])])]),a.createVNode(Uv,{visible:l.value,title:a.unref(H).delete,message:a.unref(H).confirmDelete,"confirm-text":a.unref(H).confirm,"cancel-text":a.unref(H).cancel,onConfirm:B,onCancel:w},null,8,["visible","title","message","confirm-text","cancel-text"])],8,TL)):a.createCommentVNode("",!0)])}}}),Ub=un(sU,[["__scopeId","data-v-528ce102"]]),oU={key:0,class:"gantt-calendar-selection-hint"},AU=a.defineComponent({__name:"CalendarSelectionLayer",props:{rect:{default:null},segments:{default:()=>[]},left:{default:0},width:{default:0},indicatorWidth:{default:4},state:{default:"active"},rejectedText:{default:"该时段不可选择"}},setup(n){const t=n,e=a.computed(()=>({"is-rejected":t.state==="rejected","is-pending":t.state==="pending"})),r=a.computed(()=>t.rect?{top:`${t.rect.top}px`,left:`${t.rect.left}px`,width:`${t.rect.width}px`,height:`${t.rect.height}px`}:{}),s=(o,i)=>{const A=i===0,l=i===t.segments.length-1,c=`${t.indicatorWidth/2}px`;return{top:`${o.indicatorTop}px`,left:`${t.left}px`,width:`${t.indicatorWidth}px`,height:`${o.indicatorHeight}px`,borderTopLeftRadius:A?c:"0",borderTopRightRadius:A?c:"0",borderBottomLeftRadius:l?c:"0",borderBottomRightRadius:l?c:"0"}};return(o,i)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[n.segments&&n.segments.length?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.segments,(A,l)=>(a.openBlock(),a.createElementBlock("div",{key:"slot-"+l,class:a.normalizeClass(["gantt-calendar-selection-slot",e.value]),style:a.normalizeStyle({top:`${A.top}px`,left:`${n.left}px`,width:`${n.width}px`,height:`${A.height}px`})},null,6))),128)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.segments,(A,l)=>(a.openBlock(),a.createElementBlock("div",{key:"indicator-"+l,class:a.normalizeClass(["gantt-calendar-selection-indicator",e.value]),style:a.normalizeStyle(s(A,l))},null,6))),128))],64)):a.createCommentVNode("",!0),n.rect?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["gantt-calendar-selection-layer",e.value]),style:a.normalizeStyle(r.value)},[n.state==="rejected"?(a.openBlock(),a.createElementBlock("span",oU,a.toDisplayString(n.rejectedText),1)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0)],64))}}),Qv=un(AU,[["__scopeId","data-v-1a724565"]]),s0=4;function Nv(n){const t=a.ref(!1),e=a.ref(!1),r=a.ref(!1),s=a.ref(!1),o=a.ref(null);let i=null,A=0,l=0,c=!1;const u=()=>{var w;return!!((w=n.disabled)!=null&&w.value)},h=w=>{u()||w.button===0&&(w.preventDefault(),i=w,A=w.clientX,l=w.clientY,c=!1,r.value=!1,s.value=!1,window.addEventListener("mousemove",g),window.addEventListener("mouseup",m))},g=w=>{if(!i)return;if(w.preventDefault(),!c){const x=Math.abs(w.clientX-A),b=Math.abs(w.clientY-l);if(x<s0&&b<s0)return;c=!0,t.value=!0}const E=n.resolveDraft(w);E&&(o.value=E)},d=()=>{i=null,c=!1,t.value=!1,s.value=!1,o.value=null,window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m)},m=async w=>{var b,H;const E=c,x=E?n.resolveDraft(w)||o.value:null;if(window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m),!E||!x){d();return}if(o.value=x,n.onBeforeSelect){e.value=!0;let $=!1;try{$=await n.onBeforeSelect(x)}catch{$=!1}if(e.value=!1,!$){r.value=!0,t.value=!1,(b=n.onSelectionCancel)==null||b.call(n,"before-hook-rejected"),i=null,c=!1;return}}(H=n.onSelectionComplete)==null||H.call(n,x),t.value=!1,s.value=!0,i=null,c=!1};return{isDragging:t,isPending:e,isRejected:r,isConfirmed:s,draft:o,handleMouseDown:h,cancel:()=>{var w;(w=n.onSelectionCancel)==null||w.call(n,"user-cancelled"),d()},clear:()=>{o.value=null,r.value=!1,t.value=!1,s.value=!1}}}const o0=4;function _v(n){const t=a.ref(!1),e=a.ref(null),r=a.ref({deltaX:0,deltaY:0});let s=null,o=0,i=0,A=!1;const l=()=>{var d;return!!((d=n.disabled)!=null&&d.value)},c=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",h),t.value=!1,e.value=null,r.value={deltaX:0,deltaY:0},A=!1,s=null},u=d=>{var B;if(!s)return;d.preventDefault();const m=d.clientX-o,y=d.clientY-i;if(!A){if(Math.abs(m)<o0&&Math.abs(y)<o0)return;A=!0,t.value=!0,e.value=s.id}r.value={deltaX:m,deltaY:y},(B=n.onDragMove)==null||B.call(n,s,r.value,d)},h=d=>{var w,E;const m=s,y=A,B={...r.value};if(window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",h),!m){c();return}y?(w=n.onDragEnd)==null||w.call(n,m,B,d):(E=n.onClick)==null||E.call(n,m,d),c()};return{isDragging:t,draggingTaskId:e,dragDelta:r,handleMouseDown:(d,m)=>{l()||m.button===0&&(m.preventDefault(),m.stopPropagation(),s=d,o=m.clientX,i=m.clientY,A=!1,r.value={deltaX:0,deltaY:0},window.addEventListener("mousemove",u),window.addEventListener("mouseup",h))}}}function Rv(n){return n===0||n===6}function EA(n,t){return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}function Ib(n){return EA(n,new Date)}function Ov(n){if(!n)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(t){const[,r,s,o]=t;return new Date(Number(r),Number(s)-1,Number(o))}const e=new Date(n);return isNaN(e.getTime())?null:e}function Mb(n){return n.getHours()*60+n.getMinutes()}function iU(n,t,e){const r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),s=new Date(r);return s.setDate(s.getDate()+1),n<s&&t>=r}function lU(n,t,e){if(Rv(t)||!e)return!1;if(e.morning){const{start:r,end:s}=e.morning;if(n>=r&&n<=s)return!0}if(e.afternoon){const{start:r,end:s}=e.afternoon;if(n>=r&&n<=s)return!0}return!1}function Qb(n,t){const e=n.getDay(),r=new Date,s=[];for(let o=0;o<24;o++){const i=new Date(n.getFullYear(),n.getMonth(),n.getDate(),o);s.push({hour:o,label:`${String(o).padStart(2,"0")}:00`,date:i,isWorkingHour:lU(o,e,t),isCurrentHour:EA(n,r)&&o===r.getHours()})}return s}function Nb(n){const t=new Date(n.getFullYear(),n.getMonth(),n.getDate()),e=t.getDay()||7;return t.setDate(t.getDate()-(e-1)),t}function cU(n,t){const e=Nb(n),r=[];for(let s=0;s<7;s++){const o=new Date(e);o.setDate(o.getDate()+s);const i=o.getDay();r.push({date:o,dayOfWeek:i,isWeekend:Rv(i),isToday:Ib(o),hours:Qb(o,t)})}return r}function uU(n){const t=n.getFullYear(),e=n.getMonth(),r=new Date(t,e,1),s=Nb(r),o=[],i=new Date(s);for(let A=0;A<6;A++){const l=[];for(let c=0;c<7;c++){const u=new Date(i);l.push({date:u,isCurrentMonth:u.getMonth()===e,isWeekend:Rv(u.getDay()),isToday:Ib(u)}),i.setDate(i.getDate()+1)}if(o.push(l),i.getMonth()!==e&&i>r&&A>=3){const c=new Date(i);if(c.setDate(c.getDate()+6),c.getMonth()!==e)break}}return o}function Up(n,t){if(t<=0)return new Date(n);const e=new Date(n),r=e.getHours()*60+e.getMinutes(),s=Math.floor(r/t)*t;return e.setHours(Math.floor(s/60),s%60,0,0),e}function qd(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())}function hl(n){const t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0"),s=String(n.getHours()).padStart(2,"0"),o=String(n.getMinutes()).padStart(2,"0");return`${t}-${e}-${r} ${s}:${o}`}function Ku(n,t,e){const r=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),s=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),o=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=n.getHours()===0&&n.getMinutes()===0,A=t.getHours()===0&&t.getMinutes()===0,l=n.getHours()*60+n.getMinutes(),c=t.getHours()*60+t.getMinutes();return r===s?o!==r?{type:"none"}:i&&A?{type:"all-day"}:{type:"timed",startMinutes:l,endMinutes:c}:o===r?i?{type:"all-day"}:{type:"timed",startMinutes:l,endMinutes:1440}:o===s?A?{type:"all-day"}:{type:"timed",startMinutes:0,endMinutes:c}:o>r&&o<s?{type:"all-day"}:{type:"none"}}function A0(n){const t=Math.max(0,Math.min(n,1440));if(t===1440)return"24:00";const e=Math.floor(t/60),r=t%60;return`${String(e).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function _b(n,t,e){return`${n} - ${A0(t)} ~ ${A0(e)}`}function Rb(n,t,e,r=30){const s=Math.min(n,t),o=Math.max(n,t);if(r<=0||e<=0)return[];const i=e/60,A=[];let l=Math.floor(s/r)*r;do{const c=l+r,u=Math.max(s,l),h=Math.min(o,c),g=Math.max(h-u,0);A.push({slotTop:l*i,slotHeight:r*i,indicatorTop:u*i,indicatorHeight:Math.max(g*i,3)}),l+=r}while(l<o);return A}function Ob(n){const t=n.map(()=>({column:0,columnCount:1})),e=n.map((A,l)=>l).sort((A,l)=>n[A].start-n[l].start||n[A].end-n[l].end);let r=[],s=[],o=-1/0;const i=()=>{if(r.length===0)return;const A=s.length;for(const l of r)t[l].columnCount=A;r=[],s=[],o=-1/0};for(const A of e){const{start:l,end:c}=n[A];l>=o&&i();let u=-1;for(let h=0;h<s.length;h++)if(s[h]<=l){s[h]=c,u=h;break}u===-1&&(u=s.length,s.push(c)),t[A].column=u,r.push(A),o=Math.max(o,c)}return i(),t}const dU={class:"gantt-calendar-day-view"},fU={key:0,class:"gantt-calendar-allday-row"},hU={class:"gantt-calendar-allday-label"},gU={class:"gantt-calendar-allday-chips"},pU=["title","onClick"],vU={class:"gantt-calendar-hour-label"},mU=["data-hour"],wU=["title","onMousedown"],yU={class:"gantt-calendar-task-card-title"},BU={key:0,class:"gantt-calendar-task-card-desc"},vA=48,di=64,bU=a.defineComponent({__name:"CalendarDayView",props:{date:{},tasks:{default:()=>[]},workingHours:{},resourceId:{},selectionMinuteStep:{default:15},disabled:{type:Boolean,default:!1},allDayLabel:{default:"全天"},taskCardOpacity:{default:.18},taskAccentWidth:{default:5},onBeforeSelect:{}},emits:["selection-complete","selection-cancel","task-click","task-move"],setup(n,{expose:t,emit:e}){const r=n,s=e,o=a.ref(),i=a.computed(()=>Qb(r.date,r.workingHours)),A=a.computed(()=>EA(r.date,new Date)?Mb(new Date)/60*vA:null),l=Ov,c=a.computed(()=>r.tasks.filter(S=>{const Q=l(S.startDate),T=l(S.endDate);return!Q||!T?!1:Ku(Q,T,r.date).type==="all-day"})),u=a.computed(()=>{const S=[];for(const Q of r.tasks){const T=l(Q.startDate),oe=l(Q.endDate);if(!T||!oe)continue;const X=Ku(T,oe,r.date);if(X.type!=="timed")continue;const F=X.startMinutes,M=Math.max(X.endMinutes,F+15);S.push({task:Q,startMinutes:F,endMinutes:M})}return S}),h=a.computed(()=>u.value.map(S=>S.task)),g=(S,Q)=>{const T=u.value[Q];return T?_b(S.name,T.startMinutes,T.endMinutes):S.name},d=a.computed(()=>{const S=u.value.map(Q=>({start:Q.startMinutes,end:Q.endMinutes}));return Ob(S)}),m=(S,Q)=>{var se;const T=u.value[Q],oe=(T==null?void 0:T.startMinutes)??0,X=(T==null?void 0:T.endMinutes)??oe+15;let F=oe/60*vA;b.value&&H.value===S.id&&(F+=$.value.deltaY);const M=(X-oe)/60*vA,R=d.value[Q]??{column:0,columnCount:1},ae=((se=o.value)==null?void 0:se.clientWidth)??0,k=Math.max(ae-di-8,0)/R.columnCount,O=di+R.column*k,N=S.barColor||"var(--gantt-primary)",Z=Math.round(Math.min(Math.max(r.taskCardOpacity,0),1)*100);return{top:`${F}px`,height:`${M}px`,left:`${O}px`,width:`${Math.max(k-2,0)}px`,borderLeftWidth:`${r.taskAccentWidth}px`,borderLeftColor:N,backgroundColor:`color-mix(in srgb, ${N} ${Z}%, transparent)`}},y=S=>{const Q=o.value;if(!Q)return null;const T=Q.getBoundingClientRect(),X=Math.min(Math.max(S.clientY-T.top,0),T.height)/vA*60,F=new Date(r.date);F.setHours(0,X,0,0);const M=Up(F,r.selectionMinuteStep);return{startDate:B.value??M,endDate:M,resourceId:r.resourceId,scale:"day"}},B=a.ref(null),w=a.computed(()=>r.disabled),E=Nv({disabled:w,resolveDraft:y,onBeforeSelect:r.onBeforeSelect,onSelectionComplete:S=>s("selection-complete",S),onSelectionCancel:S=>s("selection-cancel",S)}),x=S=>{if(r.disabled)return;const Q=o.value;if(!Q)return;const T=Q.getBoundingClientRect(),X=Math.min(Math.max(S.clientY-T.top,0),T.height)/vA*60,F=new Date(r.date);F.setHours(0,X,0,0),B.value=Up(F,r.selectionMinuteStep),E.handleMouseDown(S)},{isDragging:b,draggingTaskId:H,dragDelta:$,handleMouseDown:Y}=_v({disabled:w,onClick:(S,Q)=>s("task-click",S,Q),onDragEnd:(S,Q)=>{const T=l(S.startDate),oe=l(S.endDate);if(!T||!oe||!EA(T,oe))return;const X=oe.getTime()-T.getTime(),F=Q.deltaY/vA*60,M=Math.round(F/r.selectionMinuteStep)*r.selectionMinuteStep;if(M===0)return;const R=new Date(r.date);R.setHours(0,0,0,0);const ae=1440-X/6e4,J=T.getHours()*60+T.getMinutes(),k=Math.max(0,Math.min(J+M,ae));if(k===J)return;const O=new Date(R);O.setMinutes(k);const N=new Date(O.getTime()+X),Z={...S,startDate:hl(O),endDate:hl(N)};s("task-move",{task:Z,previousStartDate:T,previousEndDate:oe,newStartDate:O,newEndDate:N,resourceId:r.resourceId})}}),V=a.computed(()=>{var R;const S=E.draft.value;if(!S||!E.isDragging.value&&!E.isConfirmed.value)return null;const Q=S.startDate.getHours()*60+S.startDate.getMinutes(),T=S.endDate.getHours()*60+S.endDate.getMinutes(),oe=Math.min(Q,T)/60*vA,X=Math.abs(T-Q)/60*vA||4,F=((R=o.value)==null?void 0:R.clientWidth)??0,M=Math.max(F-di-8,0);return{top:oe,left:di,width:M,height:X}}),L=a.computed(()=>E.isRejected.value?"rejected":E.isPending.value?"pending":"active"),j=a.computed(()=>{if(L.value!=="active")return[];const S=E.draft.value;if(!S||!E.isDragging.value&&!E.isConfirmed.value)return[];const Q=S.startDate.getHours()*60+S.startDate.getMinutes(),T=S.endDate.getHours()*60+S.endDate.getMinutes();return Rb(Q,T,vA,r.selectionMinuteStep).map(oe=>({top:oe.slotTop,height:oe.slotHeight,indicatorTop:oe.indicatorTop,indicatorHeight:oe.indicatorHeight}))}),D=a.computed(()=>{var Q;const S=((Q=o.value)==null?void 0:Q.clientWidth)??0;return Math.max(S-di-8,0)});return t({clearSelection:()=>E.clear()}),(S,Q)=>(a.openBlock(),a.createElementBlock("div",dU,[c.value.length?(a.openBlock(),a.createElementBlock("div",fU,[a.createElementVNode("div",hU,a.toDisplayString(n.allDayLabel),1),a.createElementVNode("div",gU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,T=>(a.openBlock(),a.createElementBlock("div",{key:T.id,class:"gantt-calendar-task-chip",style:a.normalizeStyle({backgroundColor:T.barColor||"var(--gantt-primary)"}),title:`${T.name} - ${n.allDayLabel}`,onClick:oe=>s("task-click",T,oe)},a.toDisplayString(T.name)+" - "+a.toDisplayString(n.allDayLabel),13,pU))),128))])])):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"gridRef",ref:o,class:"gantt-calendar-day-grid",onMousedown:x},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,T=>(a.openBlock(),a.createElementBlock("div",{key:T.hour,class:a.normalizeClass(["gantt-calendar-hour-row",{"is-working-hour":T.isWorkingHour,"is-current-hour":T.isCurrentHour}])},[a.createElementVNode("div",vU,a.toDisplayString(T.label),1),a.createElementVNode("div",{class:"gantt-calendar-hour-cell","data-hour":T.hour},null,8,mU)],2))),128)),A.value!==null?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-calendar-now-line",style:a.normalizeStyle({top:`${A.value}px`,left:`${di}px`,width:`${D.value}px`})},null,4)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(T,oe)=>(a.openBlock(),a.createElementBlock("div",{key:T.id,class:a.normalizeClass(["gantt-calendar-timed-task",{"is-task-dragging":a.unref(H)===T.id}]),style:a.normalizeStyle(m(T,oe)),title:T.name,onMousedown:X=>a.unref(Y)(T,X)},[a.renderSlot(S.$slots,"task-card",{task:T,style:a.normalizeStyle(m(T,oe))},()=>[a.createElementVNode("div",yU,a.toDisplayString(g(T,oe)),1),T.description?(a.openBlock(),a.createElementBlock("div",BU,a.toDisplayString(T.description),1)):a.createCommentVNode("",!0)],!0)],46,wU))),128)),a.createVNode(Qv,{rect:L.value!=="active"?V.value:null,segments:j.value,left:di,width:D.value,"indicator-width":4,state:L.value},null,8,["rect","segments","width","state"])],544)]))}}),CU=un(bU,[["__scopeId","data-v-ff751fe4"]]),kU={class:"gantt-calendar-week-view"},EU={class:"gantt-calendar-week-header"},DU={key:0,class:"gantt-calendar-week-allday-row"},TU={class:"gantt-calendar-hour-label-placeholder gantt-calendar-allday-label"},xU=["title","onClick"],SU={class:"gantt-calendar-hour-label-column"},FU=["data-day-index"],LU=["title","onMousedown"],PA=48,Pi=60,UU=a.defineComponent({__name:"CalendarWeekView",props:{anchorDate:{},tasks:{default:()=>[]},workingHours:{},resourceId:{},selectionMinuteStep:{default:15},disabled:{type:Boolean,default:!1},allDayLabel:{default:"全天"},taskCardOpacity:{default:.18},taskAccentWidth:{default:5}},emits:["selection-complete","selection-cancel","task-click","task-move"],setup(n,{expose:t,emit:e}){const r=n,s=e,o=a.ref(),i=a.computed(()=>cU(r.anchorDate,r.workingHours)),A=X=>`${X.getMonth()+1}/${X.getDate()}`,l=Ov,c=X=>r.tasks.filter(F=>{const M=l(F.startDate),R=l(F.endDate);return!M||!R?!1:Ku(M,R,X).type==="all-day"}),u=a.computed(()=>i.value.some(X=>c(X.date).length>0)),h=X=>{const F=[];for(const M of r.tasks){const R=l(M.startDate),ae=l(M.endDate);if(!R||!ae)continue;const J=Ku(R,ae,X);if(J.type!=="timed")continue;const k=J.startMinutes,O=Math.max(J.endMinutes,k+15);F.push({task:M,startMinutes:k,endMinutes:O})}return F},g=X=>_b(X.task.name,X.startMinutes,X.endMinutes),d=a.computed(()=>{const X=i.value.findIndex(F=>F.isToday);return X===-1?null:Pi+X*w()}),m=a.computed(()=>w()),y=a.computed(()=>d.value===null?null:Mb(new Date)/60*PA),B=a.ref(null),w=()=>{const X=o.value;return X?(X.clientWidth-Pi)/7:0},E=a.computed(()=>{const X=w(),F=[];return i.value.forEach((M,R)=>{const ae=h(M.date),J=ae.map(O=>({start:O.startMinutes,end:O.endMinutes})),k=Ob(J);ae.forEach((O,N)=>{const{start:Z,end:se}=J[N],ge=k[N],fe=Z/60*PA,Ae=(se-Z)/60*PA,Fe=X/ge.columnCount,be=Pi+R*X+ge.column*Fe;F.push({task:O.task,dayIndex:R,top:fe,height:Ae,left:be,width:Math.max(Fe-2,0),startMinutes:O.startMinutes,endMinutes:O.endMinutes})})}),F}),x=X=>{let F=X.top,M=X.left;L.value&&j.value===X.task.id&&(F+=D.value.deltaY,M+=D.value.deltaX);const R=X.task.barColor||"var(--gantt-primary)",ae=Math.round(Math.min(Math.max(r.taskCardOpacity,0),1)*100);return{top:`${F}px`,height:`${X.height}px`,left:`${M}px`,width:`${X.width}px`,borderLeftWidth:`${r.taskAccentWidth}px`,borderLeftColor:R,backgroundColor:`color-mix(in srgb, ${R} ${ae}%, transparent)`}},b=X=>{var se;const F=o.value;if(!F)return null;const M=F.getBoundingClientRect(),R=Math.min(Math.max(X.clientX-M.left-Pi,0),M.width-Pi),ae=Math.min(Math.max(X.clientY-M.top,0),M.height),J=w(),k=J>0?Math.min(Math.floor(R/J),6):0,O=ae/PA*60,N=((se=i.value[k])==null?void 0:se.date)??r.anchorDate,Z=new Date(N);return Z.setHours(0,O,0,0),{dayIndex:k,date:Up(Z,r.selectionMinuteStep)}},H=X=>{const F=b(X);return!F||!B.value?null:{startDate:B.value.date,endDate:F.date,resourceId:r.resourceId,scale:"week"}},$=a.computed(()=>r.disabled),Y=Nv({disabled:$,resolveDraft:H,onSelectionComplete:X=>s("selection-complete",X),onSelectionCancel:X=>s("selection-cancel",X)}),V=X=>{if(r.disabled)return;const F=b(X);F&&(B.value=F,Y.handleMouseDown(X))},{isDragging:L,draggingTaskId:j,dragDelta:D,handleMouseDown:S}=_v({disabled:$,onClick:(X,F)=>s("task-click",X,F),onDragEnd:(X,F)=>{const M=l(X.startDate),R=l(X.endDate);if(!M||!R||!EA(M,R))return;const ae=R.getTime()-M.getTime(),J=w();if(J<=0)return;const k=i.value.findIndex(xe=>EA(xe.date,M));if(k===-1)return;const O=Math.round(F.deltaX/J),N=F.deltaY/PA*60,Z=Math.round(N/r.selectionMinuteStep)*r.selectionMinuteStep,se=Math.max(0,Math.min(k+O,i.value.length-1)),ge=M.getHours()*60+M.getMinutes(),fe=1440-ae/6e4,Ae=Math.max(0,Math.min(ge+Z,fe));if(se===k&&Ae===ge)return;const Fe=i.value[se].date,be=new Date(Fe);be.setHours(0,Ae,0,0);const Ke=new Date(be.getTime()+ae),Xe={...X,startDate:hl(be),endDate:hl(Ke)};s("task-move",{task:Xe,previousStartDate:M,previousEndDate:R,newStartDate:be,newEndDate:Ke,resourceId:r.resourceId})}}),Q=a.computed(()=>{const X=Y.draft.value;if(!X||!Y.isDragging.value&&!Y.isConfirmed.value||!B.value)return null;const F=w(),M=B.value.dayIndex,R=X.startDate.getHours()*60+X.startDate.getMinutes(),ae=X.endDate.getHours()*60+X.endDate.getMinutes(),J=Math.min(R,ae)/60*PA,k=Math.abs(ae-R)/60*PA||4;return{top:J,left:Pi+M*F,width:F,height:k}}),T=a.computed(()=>Y.isRejected.value?"rejected":Y.isPending.value?"pending":"active"),oe=a.computed(()=>{if(T.value!=="active")return[];const X=Y.draft.value;if(!X||!Y.isDragging.value&&!Y.isConfirmed.value)return[];const F=X.startDate.getHours()*60+X.startDate.getMinutes(),M=X.endDate.getHours()*60+X.endDate.getMinutes();return Rb(F,M,PA,r.selectionMinuteStep).map(R=>({top:R.slotTop,height:R.slotHeight,indicatorTop:R.indicatorTop,indicatorHeight:R.indicatorHeight}))});return t({clearSelection:()=>Y.clear()}),(X,F)=>(a.openBlock(),a.createElementBlock("div",kU,[a.createElementVNode("div",EU,[F[0]||(F[0]=a.createElementVNode("div",{class:"gantt-calendar-hour-label-placeholder"},null,-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,M=>(a.openBlock(),a.createElementBlock("div",{key:M.date.toISOString(),class:a.normalizeClass(["gantt-calendar-week-day-header",{"is-today":M.isToday,"is-weekend":M.isWeekend}])},a.toDisplayString(A(M.date)),3))),128))]),u.value?(a.openBlock(),a.createElementBlock("div",DU,[a.createElementVNode("div",TU,a.toDisplayString(n.allDayLabel),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,M=>(a.openBlock(),a.createElementBlock("div",{key:"allday-"+M.date.toISOString(),class:"gantt-calendar-week-allday-col"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c(M.date),R=>(a.openBlock(),a.createElementBlock("div",{key:R.id,class:"gantt-calendar-task-chip",style:a.normalizeStyle({backgroundColor:R.barColor||"var(--gantt-primary)"}),title:R.name,onClick:ae=>s("task-click",R,ae)},a.toDisplayString(R.name)+" - "+a.toDisplayString(n.allDayLabel),13,xU))),128))]))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"gridRef",ref:o,class:"gantt-calendar-week-grid",onMousedown:V},[a.createElementVNode("div",SU,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(24,M=>a.createElementVNode("div",{key:M,class:"gantt-calendar-hour-label"},a.toDisplayString(String(M-1).padStart(2,"0"))+":00 ",1)),64))]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,(M,R)=>(a.openBlock(),a.createElementBlock("div",{key:M.date.toISOString(),class:"gantt-calendar-week-day-column","data-day-index":R},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(M.hours,ae=>(a.openBlock(),a.createElementBlock("div",{key:ae.hour,class:a.normalizeClass(["gantt-calendar-hour-cell",{"is-working-hour":ae.isWorkingHour,"is-current-hour":ae.isCurrentHour}])},null,2))),128))],8,FU))),128)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.value,(M,R)=>(a.openBlock(),a.createElementBlock("div",{key:"timed-"+M.task.id+"-"+R,class:a.normalizeClass(["gantt-calendar-timed-task",{"is-task-dragging":a.unref(j)===M.task.id}]),style:a.normalizeStyle(x(M)),title:M.task.name,onMousedown:ae=>a.unref(S)(M.task,ae)},[a.renderSlot(X.$slots,"task-card",{task:M.task,style:a.normalizeStyle(x(M))},()=>[a.createTextVNode(a.toDisplayString(g(M)),1)],!0)],46,LU))),128)),a.createVNode(Qv,{rect:T.value!=="active"?Q.value:null,segments:oe.value,left:Q.value?Q.value.left:0,width:Q.value?Q.value.width:0,"indicator-width":4,state:T.value},null,8,["rect","segments","left","width","state"]),y.value!==null&&d.value!==null?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-calendar-now-line",style:a.normalizeStyle({top:`${y.value}px`,left:`${d.value}px`,width:`${m.value}px`})},null,4)):a.createCommentVNode("",!0)],544)]))}}),IU=un(UU,[["__scopeId","data-v-339c2261"]]),MU={class:"gantt-calendar-more-popover-header"},QU={class:"gantt-calendar-more-popover-body"},NU=["onClick"],_U=a.defineComponent({__name:"CalendarMoreTasksPopover",props:{date:{},tasks:{},anchor:{}},emits:["close","task-click"],setup(n){const t=n,e=a.computed(()=>`${t.date.getFullYear()}/${t.date.getMonth()+1}/${t.date.getDate()}`),r=a.computed(()=>{if(!t.anchor)return{};const s=t.anchor.getBoundingClientRect();return{position:"fixed",top:`${s.bottom+4}px`,left:`${s.left}px`}});return(s,o)=>(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createElementVNode("div",{class:"gantt-calendar-more-popover-mask",onClick:o[2]||(o[2]=i=>s.$emit("close"))},[a.createElementVNode("div",{class:"gantt-calendar-more-popover",style:a.normalizeStyle(r.value),onClick:o[1]||(o[1]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",MU,[a.createElementVNode("span",null,a.toDisplayString(e.value),1),a.createElementVNode("button",{type:"button",class:"gantt-calendar-more-popover-close",onClick:o[0]||(o[0]=i=>s.$emit("close"))}," × ")]),a.createElementVNode("div",QU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.tasks,i=>(a.openBlock(),a.createElementBlock("div",{key:i.id,class:"gantt-calendar-more-popover-item",style:a.normalizeStyle({borderLeftColor:i.barColor||"var(--gantt-primary)"}),onClick:A=>s.$emit("task-click",i,A)},a.toDisplayString(i.name),13,NU))),128))])],4)])]))}}),RU=un(_U,[["__scopeId","data-v-4f568a1a"]]),OU={class:"gantt-calendar-month-view"},HU={class:"gantt-calendar-month-header"},PU=["data-week-index","data-day-index"],VU={class:"gantt-calendar-month-day-number"},WU={class:"gantt-calendar-month-tasks"},KU=["title","onMousedown"],$U=["onClick"],qU=a.defineComponent({__name:"CalendarMonthView",props:{anchorDate:{},tasks:{default:()=>[]},resourceId:{},disabled:{type:Boolean,default:!1}},emits:["selection-complete","selection-cancel","task-click","task-move"],setup(n,{expose:t,emit:e}){const r=n,s=e,o=["一","二","三","四","五","六","日"],i=a.ref(),A=a.computed(()=>uU(r.anchorDate)),l=a.ref(null),c=(j,D)=>{l.value={date:j,anchor:D.currentTarget}},u=Ov,h=j=>r.tasks.filter(D=>{const S=u(D.startDate),Q=u(D.endDate);return!S||!Q?!1:iU(S,Q,j)}),g=a.ref(null),d=j=>{var oe,X;const D=(oe=j.target)==null?void 0:oe.closest(".gantt-calendar-month-day");if(!D)return null;const S=Number(D.dataset.weekIndex),Q=Number(D.dataset.dayIndex),T=(X=A.value[S])==null?void 0:X[Q];return T?qd(T.date):null},m=j=>{const D=d(j);return!D||!g.value?null:{startDate:g.value,endDate:D,resourceId:r.resourceId,scale:"month"}},y=a.computed(()=>r.disabled),B=Nv({disabled:y,resolveDraft:m,onSelectionComplete:j=>s("selection-complete",j),onSelectionCancel:j=>s("selection-cancel",j)}),w=j=>{if(r.disabled)return;const D=d(j);D&&(g.value=D,B.handleMouseDown(j))},E=a.ref(null),x=a.ref(null),b=(j,D)=>{var F;const S=document.elementFromPoint(j,D),Q=S==null?void 0:S.closest(".gantt-calendar-month-day");if(!Q)return null;const T=Number(Q.dataset.weekIndex),oe=Number(Q.dataset.dayIndex),X=(F=A.value[T])==null?void 0:F[oe];return X?X.date:null},{draggingTaskId:H,handleMouseDown:$}=_v({disabled:y,onClick:(j,D)=>s("task-click",j,D),onDragMove:(j,D,S)=>{x.value=b(S.clientX,S.clientY)},onDragEnd:(j,D,S)=>{x.value=null;const Q=b(S.clientX,S.clientY),T=E.value;if(E.value=null,!Q||!T||EA(Q,T))return;const oe=u(j.startDate),X=u(j.endDate);if(!oe||!X)return;const F=qd(Q).getTime()-qd(T).getTime(),M=new Date(oe.getTime()+F),R=new Date(X.getTime()+F),ae={...j,startDate:hl(M),endDate:hl(R)};s("task-move",{task:ae,previousStartDate:oe,previousEndDate:X,newStartDate:M,newEndDate:R,resourceId:r.resourceId})}}),Y=(j,D,S)=>{E.value=D,$(j,S)},V=a.computed(()=>{const j=B.draft.value;if(!j||!B.isDragging.value&&!B.isConfirmed.value)return null;const D=i.value,S=D==null?void 0:D.querySelector("[data-week-index] .gantt-calendar-month-day");if(!D||!S)return null;const Q=O=>{for(let N=0;N<A.value.length;N++)for(let Z=0;Z<7;Z++)if(EA(A.value[N][Z].date,O))return D.querySelector(`[data-week-index="${N}"][data-day-index="${Z}"]`);return null},T=Q(j.startDate),oe=Q(j.endDate);if(!T||!oe)return null;const X=D.getBoundingClientRect(),F=T.getBoundingClientRect(),M=oe.getBoundingClientRect(),R=Math.min(F.top,M.top)-X.top,ae=Math.min(F.left,M.left)-X.left,J=Math.max(F.right,M.right)-X.left,k=Math.max(F.bottom,M.bottom)-X.top;return{top:R,left:ae,width:J-ae,height:k-R}}),L=a.computed(()=>B.isRejected.value?"rejected":B.isPending.value?"pending":"active");return t({clearSelection:()=>B.clear()}),(j,D)=>(a.openBlock(),a.createElementBlock("div",OU,[a.createElementVNode("div",HU,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(o,S=>a.createElementVNode("div",{key:S,class:"gantt-calendar-month-weekday"},a.toDisplayString(S),1)),64))]),a.createElementVNode("div",{ref_key:"gridRef",ref:i,class:"gantt-calendar-month-grid",onMousedown:w},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(A.value,(S,Q)=>(a.openBlock(),a.createElementBlock("div",{key:Q,class:"gantt-calendar-month-week"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S,(T,oe)=>(a.openBlock(),a.createElementBlock("div",{key:oe,class:a.normalizeClass(["gantt-calendar-month-day",{"is-other-month":!T.isCurrentMonth,"is-weekend":T.isWeekend,"is-today":T.isToday,"is-drop-target":x.value&&a.unref(EA)(x.value,T.date)}]),"data-week-index":Q,"data-day-index":oe},[a.createElementVNode("div",VU,a.toDisplayString(T.date.getDate()),1),a.createElementVNode("div",WU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h(T.date).slice(0,3),X=>(a.openBlock(),a.createElementBlock("div",{key:X.id,class:a.normalizeClass(["gantt-calendar-task-chip",{"is-task-dragging":a.unref(H)===X.id}]),style:a.normalizeStyle({backgroundColor:X.barColor||"var(--gantt-primary)"}),title:X.name,onMousedown:F=>Y(X,T.date,F)},a.toDisplayString(X.name),47,KU))),128)),h(T.date).length>3?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"gantt-calendar-more-trigger",onClick:a.withModifiers(X=>c(T.date,X),["stop"])}," +"+a.toDisplayString(h(T.date).length-3)+" 更多 ",9,$U)):a.createCommentVNode("",!0)])],10,PU))),128))]))),128)),a.createVNode(Qv,{rect:V.value,state:L.value},null,8,["rect","state"])],544),l.value?(a.openBlock(),a.createBlock(RU,{key:0,date:l.value.date,tasks:h(l.value.date),anchor:l.value.anchor,onClose:D[0]||(D[0]=S=>l.value=null),onTaskClick:D[1]||(D[1]=(S,Q)=>s("task-click",S,Q))},null,8,["date","tasks","anchor"])):a.createCommentVNode("",!0)]))}}),jU=un(qU,[["__scopeId","data-v-74c52bf5"]]),YU=["disabled"],GU={key:0,class:"gantt-resource-filter-avatar"},zU=["src","alt"],XU={key:1,class:"gantt-resource-filter-avatar-fallback"},JU={class:"gantt-resource-filter-label"},ZU=["onClick"],eI={class:"gantt-resource-filter-avatar"},tI=["src","alt"],rI={key:1,class:"gantt-resource-filter-avatar-fallback"},nI={class:"gantt-resource-filter-option-name"},aI=a.defineComponent({__name:"ResourceFilterSelect",props:{resources:{default:()=>[]},modelValue:{default:null},placeholder:{default:"请选择资源"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(n,{emit:t}){const e=n,r=t,s=a.ref(!1),o=a.ref(null),i=a.ref(null),A=a.ref(!1),l=(y,B)=>B!=null&&String(y)===String(B),c=a.computed(()=>e.resources.find(y=>l(y.id,e.modelValue))??null),u=y=>y?y.trim().slice(0,1).toUpperCase():"?",h=async()=>{await a.nextTick();const y=o.value,B=i.value;if(!y||!B)return;const w=y.getBoundingClientRect(),E=B.offsetWidth;A.value=w.left+E>window.innerWidth},g=()=>{e.disabled||(s.value=!s.value,s.value&&h())},d=y=>{const B=e.modelValue??null;s.value=!1,String(y??"")!==String(B??"")&&(r("update:modelValue",y),r("change",{next:y,prev:B}))},m=y=>{s.value&&o.value&&!o.value.contains(y.target)&&(s.value=!1)};return a.onMounted(()=>document.addEventListener("click",m)),a.onBeforeUnmount(()=>document.removeEventListener("click",m)),(y,B)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"rootRef",ref:o,class:a.normalizeClass(["gantt-resource-filter-select",{"is-disabled":n.disabled,"is-open":s.value}])},[a.createElementVNode("button",{type:"button",class:"gantt-resource-filter-trigger",disabled:n.disabled,onClick:g},[c.value?(a.openBlock(),a.createElementBlock("span",GU,[c.value.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,src:c.value.avatar,alt:c.value.name},null,8,zU)):(a.openBlock(),a.createElementBlock("span",XU,a.toDisplayString(u(c.value.name)),1))])):a.createCommentVNode("",!0),a.createElementVNode("span",JU,a.toDisplayString(c.value?c.value.name:n.placeholder),1),B[1]||(B[1]=a.createElementVNode("span",{class:"gantt-resource-filter-arrow"},"▾",-1))],8,YU),s.value?(a.openBlock(),a.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:i,class:a.normalizeClass(["gantt-resource-filter-menu",{"align-right":A.value}])},[a.createElementVNode("li",{class:a.normalizeClass(["gantt-resource-filter-option",{"is-active":n.modelValue===null||n.modelValue===void 0}]),onClick:B[0]||(B[0]=w=>d(null))},a.toDisplayString(n.placeholder),3),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.resources,w=>(a.openBlock(),a.createElementBlock("li",{key:w.id,class:a.normalizeClass(["gantt-resource-filter-option",{"is-active":l(w.id,n.modelValue)}]),onClick:E=>d(w.id)},[a.createElementVNode("span",eI,[w.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,src:w.avatar,alt:w.name},null,8,tI)):(a.openBlock(),a.createElementBlock("span",rI,a.toDisplayString(u(w.name)),1))]),a.createElementVNode("span",nI,a.toDisplayString(w.name),1)],10,ZU))),128))],2)):a.createCommentVNode("",!0)],2))}}),Hb=un(aI,[["__scopeId","data-v-dfb0d5c5"]]),sI={class:"gantt-calendar-toolbar"},oI={class:"gantt-calendar-nav"},AI=["title"],iI=["title"],lI=["title"],cI={class:"gantt-calendar-controls"},uI={class:"gantt-calendar-body"},dI=a.defineComponent({__name:"CalendarView",props:{tasks:{},resources:{default:()=>[]},scale:{},defaultScale:{default:"day"},currentDate:{},selectedResourceId:{},workingHours:{default:()=>({morning:{start:8,end:11},afternoon:{start:13,end:17}})},selectionMinuteStep:{default:15},disabled:{type:Boolean,default:!1},locale:{default:"zh-CN"},onBeforeSelect:{},onBeforeResourceChange:{},onBeforeViewChange:{},onSelectionComplete:{},onResourceChange:{},onTaskClick:{},onTaskMove:{},allDayLabel:{default:"全天"},taskCardOpacity:{default:.18},taskAccentWidth:{default:5}},emits:["selection-complete","selection-cancel","resource-change","view-change","date-change","task-click","task-move"],setup(n,{expose:t,emit:e}){const r=n,s=e,o=a.computed(()=>l.value==="day"?"上一天":l.value==="week"?"上一周":"上一月"),i=a.computed(()=>l.value==="day"?"下一天":l.value==="week"?"下一周":"下一月"),A=a.ref(r.defaultScale),l=a.computed(()=>r.scale??A.value),c=M=>M?M instanceof Date?M:new Date(M):new Date,u=a.ref(c(r.currentDate)),h=a.computed(()=>r.currentDate?c(r.currentDate):u.value);a.watch(()=>r.currentDate,M=>{M&&(u.value=c(M))});const g=a.ref(r.selectedResourceId??null),d=a.computed(()=>r.selectedResourceId!==void 0?r.selectedResourceId:g.value),m=(M,R)=>{var k;if((k=M.resources)!=null&&k.some(O=>String(O.id)===String(R.id)))return!0;const ae=M.assignee;return ae?(Array.isArray(ae)?ae:[ae]).some(O=>O===R.name||String(O)===String(R.id)):!1},y=a.computed(()=>{const M=d.value;if(M==null||M==="")return[];const R=r.resources.find(k=>String(k.id)===String(M));if(!R)return[];const ae=[],J=k=>{if(k)for(const O of k)m(O,R)&&ae.push(O),O.children&&O.children.length>0&&J(O.children)};return J(r.tasks),ae}),B=a.computed(()=>{const M=h.value;return l.value==="month"?`${M.getFullYear()}年${M.getMonth()+1}月`:`${M.getFullYear()}/${M.getMonth()+1}/${M.getDate()}`}),w=a.computed(()=>{const M=h.value;return`${M.getFullYear()}-${String(M.getMonth()+1).padStart(2,"0")}-${String(M.getDate()).padStart(2,"0")}`}),E=a.ref(null),x=M=>{const R=h.value;r.currentDate===void 0&&(u.value=M),s("date-change",{next:M,prev:R})},b=()=>x(new Date),H=M=>x(c(M)),$=M=>{const R=Array.isArray(M)?M[0]:M;R&&H(R)},Y=()=>{const M=new Date(h.value);l.value==="day"?M.setDate(M.getDate()-1):l.value==="week"?M.setDate(M.getDate()-7):M.setMonth(M.getMonth()-1),x(M)},V=()=>{const M=new Date(h.value);l.value==="day"?M.setDate(M.getDate()+1):l.value==="week"?M.setDate(M.getDate()+7):M.setMonth(M.getMonth()+1),x(M)},L=M=>{const R=l.value;r.scale===void 0&&(A.value=M),s("view-change",{next:M,prev:R})},j=async M=>{const R=l.value;M===R||r.disabled||r.onBeforeViewChange&&!await r.onBeforeViewChange(M,R)||L(M)},D=M=>{j(M)},S=async M=>{var J;const{next:R,prev:ae}=M;r.onBeforeResourceChange&&!await r.onBeforeResourceChange(R,ae)||(r.selectedResourceId===void 0&&(g.value=R),(J=r.onResourceChange)==null||J.call(r,R,ae),s("resource-change",{next:R,prev:ae}))},Q=M=>{var R;(R=r.onSelectionComplete)==null||R.call(r,M),s("selection-complete",M)},T=M=>{s("selection-cancel",{reason:M})},oe=(M,R)=>{var ae;(ae=r.onTaskClick)==null||ae.call(r,M,R),s("task-click",M,R)},X=M=>{var R;(R=r.onTaskMove)==null||R.call(r,M),s("task-move",M)};return t({goToToday:b,goToDate:H,clearSelection:()=>{var M;(M=E.value)==null||M.clearSelection()},setScale:D}),(M,R)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gantt-calendar-view",{"is-disabled":n.disabled}])},[a.createElementVNode("div",sI,[a.createElementVNode("div",oI,[a.createElementVNode("button",{type:"button",class:"gantt-calendar-nav-btn",title:o.value,onClick:Y}," ‹ ",8,AI),a.createElementVNode("button",{type:"button",class:"gantt-calendar-today-btn",onClick:b},"今天"),a.createElementVNode("button",{type:"button",class:"gantt-calendar-nav-btn",title:i.value,onClick:V}," › ",8,iI),a.renderSlot(M.$slots,"date-picker",{date:h.value,onChange:$},()=>[a.createElementVNode("div",{class:"gantt-calendar-date-picker-wrapper",title:B.value},[a.createVNode(sl,{"model-value":w.value,type:"date",clearable:!1,"onUpdate:modelValue":$},null,8,["model-value"])],8,lI)],!0)]),a.createElementVNode("div",cI,[n.resources&&n.resources.length?(a.openBlock(),a.createBlock(Hb,{key:0,class:"gantt-calendar-resource-select",resources:n.resources,"model-value":d.value,disabled:n.disabled,onChange:S},null,8,["resources","model-value","disabled"])):a.createCommentVNode("",!0)])]),a.createElementVNode("div",uI,[l.value==="day"?(a.openBlock(),a.createBlock(CU,{key:0,ref_key:"subViewRef",ref:E,date:h.value,tasks:y.value,"working-hours":n.workingHours,"resource-id":d.value??void 0,"selection-minute-step":n.selectionMinuteStep,disabled:n.disabled,"all-day-label":n.allDayLabel,"task-card-opacity":n.taskCardOpacity,"task-accent-width":n.taskAccentWidth,"on-before-select":n.onBeforeSelect,onSelectionComplete:Q,onSelectionCancel:T,onTaskClick:oe,onTaskMove:X},a.createSlots({_:2},[M.$slots["task-card"]?{name:"task-card",fn:a.withCtx(ae=>[a.renderSlot(M.$slots,"task-card",a.normalizeProps(a.guardReactiveProps(ae)),void 0,!0)]),key:"0"}:void 0]),1032,["date","tasks","working-hours","resource-id","selection-minute-step","disabled","all-day-label","task-card-opacity","task-accent-width","on-before-select"])):l.value==="week"?(a.openBlock(),a.createBlock(IU,{key:1,ref_key:"subViewRef",ref:E,"anchor-date":h.value,tasks:y.value,"working-hours":n.workingHours,"resource-id":d.value??void 0,"selection-minute-step":n.selectionMinuteStep,disabled:n.disabled,"all-day-label":n.allDayLabel,"task-card-opacity":n.taskCardOpacity,"task-accent-width":n.taskAccentWidth,onSelectionComplete:Q,onSelectionCancel:T,onTaskClick:oe,onTaskMove:X},a.createSlots({_:2},[M.$slots["task-card"]?{name:"task-card",fn:a.withCtx(ae=>[a.renderSlot(M.$slots,"task-card",a.normalizeProps(a.guardReactiveProps(ae)),void 0,!0)]),key:"0"}:void 0]),1032,["anchor-date","tasks","working-hours","resource-id","selection-minute-step","disabled","all-day-label","task-card-opacity","task-accent-width"])):(a.openBlock(),a.createBlock(jU,{key:2,ref_key:"subViewRef",ref:E,"anchor-date":h.value,tasks:y.value,"resource-id":d.value??void 0,disabled:n.disabled,onSelectionComplete:Q,onSelectionCancel:T,onTaskClick:oe,onTaskMove:X},null,8,["anchor-date","tasks","resource-id","disabled"]))])],2))}}),Pb=un(dI,[["__scopeId","data-v-b9c7fc28"]]),fI={class:"gantt-resource-usage-hours"},hI={class:"gantt-resource-usage-percent"},gI={key:1,class:"gantt-resource-usage-empty"},pI=["data-theme"],vI={class:"gantt-resource-usage-tooltip-title"},mI={class:"gantt-resource-usage-tooltip-list"},wI=["onClick"],yI={class:"gantt-resource-usage-tooltip-task-name"},BI={class:"gantt-resource-usage-tooltip-task-hours"},i0=260,bI=30,CI=30,kI=200,EI=a.defineComponent({__name:"ResourceUsageCell",props:{cell:{},resourceId:{},overloadThreshold:{default:100},underloadThreshold:{default:60},overloadColor:{},normalColor:{},underloadColor:{},weekendColor:{},height:{}},emits:["click","hover","task-detail-click"],setup(n,{emit:t}){const e=n,r=t,s=a.ref(!1),o=a.ref(null),i=a.ref({}),A=a.ref({}),l=a.ref("top"),c=a.inject("gantt-theme",a.ref("light")),u=()=>{var L;const E=o.value;if(!E)return;const x=E.getBoundingClientRect(),b=((L=e.cell)==null?void 0:L.taskBreakdown.length)??0,H=CI+Math.min(b*bI,kI),$={position:"fixed",minWidth:"160px",maxWidth:`${i0}px`},Y=Math.max(x.width/2,10),V={};x.left+i0>window.innerWidth?($.right=`${Math.max(window.innerWidth-x.right,0)}px`,V.right=`${Y}px`,V.transform="translateX(50%)"):($.left=`${x.left}px`,V.left=`${Y}px`,V.transform="translateX(-50%)"),x.bottom+H>window.innerHeight?($.bottom=`${Math.max(window.innerHeight-x.top,0)}px`,l.value="bottom"):($.top=`${x.bottom}px`,l.value="top"),i.value=$,A.value=V},h=a.computed(()=>e.cell?Math.round(e.cell.totalHours*10)/10:0),g=a.computed(()=>{var x;if((x=e.cell)!=null&&x.isWeekend)return"is-weekend";if(!e.cell)return"is-empty";const E=e.cell.totalPercent;return E>e.overloadThreshold?"is-overloaded":E<e.underloadThreshold?"is-underloaded":"is-normal"}),d=a.computed(()=>{const E={};e.height!==void 0&&(E.height=`${e.height}px`);const x=(()=>{switch(g.value){case"is-weekend":return e.weekendColor;case"is-overloaded":return e.overloadColor;case"is-underloaded":return e.underloadColor;case"is-normal":return e.normalColor;default:return}})();return x&&(E.backgroundColor=x),E}),m=()=>{r("click",{resourceId:e.resourceId,cell:e.cell})},y=()=>{s.value=!0,u(),r("hover",e.cell?{resourceId:e.resourceId,cell:e.cell}:null)},B=()=>{s.value=!1,r("hover",null)},w=E=>{r("task-detail-click",{resourceId:e.resourceId,taskId:E.taskId,taskName:E.taskName})};return(E,x)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"cellRef",ref:o,class:a.normalizeClass(["gantt-resource-usage-cell",g.value]),style:a.normalizeStyle(d.value),onClick:m,onMouseenter:y,onMouseleave:B},[n.cell?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("span",fI,a.toDisplayString(h.value)+"h",1),a.createElementVNode("span",hI,a.toDisplayString(Math.round(n.cell.totalPercent))+"%",1)],64)):(a.openBlock(),a.createElementBlock("span",gI,"-")),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[n.cell&&s.value&&n.cell.taskBreakdown.length?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-resource-usage-tooltip","data-theme":a.unref(c),style:a.normalizeStyle(i.value),onClick:x[0]||(x[0]=a.withModifiers(()=>{},["stop"])),onMouseenter:y,onMouseleave:B},[a.createElementVNode("div",{class:a.normalizeClass(["gantt-resource-usage-tooltip-arrow",l.value==="top"?"is-arrow-top":"is-arrow-bottom"]),style:a.normalizeStyle(A.value)},null,6),a.createElementVNode("div",vI,a.toDisplayString(h.value)+"h · "+a.toDisplayString(Math.round(n.cell.totalPercent))+"% ",1),a.createElementVNode("ul",mI,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.cell.taskBreakdown,b=>(a.openBlock(),a.createElementBlock("li",{key:b.taskId,class:"gantt-resource-usage-tooltip-item",onClick:H=>w(b)},[a.createElementVNode("span",yI,a.toDisplayString(b.taskName),1),a.createElementVNode("span",BI,a.toDisplayString(Math.round(b.hours*10)/10)+"h",1)],8,wI))),128))])],44,pI)):a.createCommentVNode("",!0)]))],38))}}),DI=un(EI,[["__scopeId","data-v-2caa38b6"]]),l0=8,Vb=n=>{const t=n.getDay();return t===0||t===6},$u=n=>{const t=new Date(n);return t.setHours(0,0,0,0),t};function c0(n,t){const e=[],r=$u(n),s=$u(t);for(;r.getTime()<=s.getTime();)Vb(r)||e.push(new Date(r)),r.setDate(r.getDate()+1);return e}const u0=n=>{if(!n)return null;const t=new Date(n);return isNaN(t.getTime())?null:t};function TI(n,t){if(!n.resources||n.resources.length===0)return 100;const e=n.resources.find(r=>String(r.id)===String(t));return e?e.capacity??100:100}function xI(n,t,e){const r=[],s=$u(n),o=$u(t);if(e==="day"){const A=new Date(s);for(;A.getTime()<=o.getTime();){const l=new Date(A);l.setHours(23,59,59,999),r.push({start:new Date(A),end:l}),A.setDate(A.getDate()+1)}return r}if(e==="week"){const A=new Date(s),l=A.getDay()||7;for(A.setDate(A.getDate()-(l-1));A.getTime()<=o.getTime();){const c=new Date(A);c.setDate(c.getDate()+6),c.setHours(23,59,59,999),r.push({start:new Date(A),end:c}),A.setDate(A.getDate()+7)}return r}const i=new Date(s.getFullYear(),s.getMonth(),1);for(;i.getTime()<=o.getTime();){const A=new Date(i.getFullYear(),i.getMonth()+1,0,23,59,59,999);r.push({start:new Date(i),end:A}),i.setMonth(i.getMonth()+1)}return r}function SI(n){return{cellsByResource:a.computed(()=>{var o;const e=new Map,r=((o=n.overloadThreshold)==null?void 0:o.value)??100,s=xI(n.dateRange.value.start,n.dateRange.value.end,n.scale.value);for(const i of n.resources.value){const A=new Map;for(const u of i.tasks??[]){const h=u0(u.startDate),g=u0(u.endDate);if(!h||!g)continue;const d=c0(h,g);if(d.length===0)continue;const y=TI(u,i.id)/100;let B;typeof u.estimatedHours=="number"&&u.estimatedHours>0?B=y*u.estimatedHours/d.length:B=y*l0;for(const w of d){const E=w.getTime();A.has(E)||A.set(E,new Map);const x=A.get(E),b=x.get(u.id)??{name:u.name,hours:0};b.hours+=B,x.set(u.id,b)}}const l=n.scale.value,c=s.map(u=>{const h=c0(u.start,u.end),g=new Map;let d=0;for(const w of h){const E=A.get(w.getTime());if(E)for(const[x,b]of E){d+=b.hours;const H=g.get(x)??{name:b.name,hours:0};H.hours+=b.hours,g.set(x,H)}}const m=h.length*l0,y=m>0?d/m*100:0,B=Array.from(g.entries()).map(([w,E])=>({taskId:w,taskName:E.name,hours:E.hours,percent:m>0?E.hours/m*100:0}));return{resourceId:i.id,periodStart:u.start,periodEnd:u.end,totalHours:d,totalPercent:y,isOverloaded:y>r,isWeekend:l==="day"?Vb(u.start):!1,taskBreakdown:B}});e.set(i.id,c)}return e})}}const FI={class:"gantt-resource-usage-body"},LI={class:"gantt-resource-usage-grid-panel"},UI={class:"gantt-resource-usage-grid-header"},II={class:"gantt-resource-usage-grid-header-row major-row"},MI={class:"gantt-resource-usage-grid-header-row minor-row"},QI=["onMouseenter"],d0=5,f0=5,NI=a.defineComponent({__name:"ResourceUsageView",props:{resources:{},scale:{},defaultScale:{default:"week"},dateRange:{},resourceListConfig:{},columnRenderMode:{default:"default"},scaleConfigs:{},overloadThreshold:{default:100},underloadThreshold:{default:60},overloadColor:{},normalColor:{},underloadColor:{},weekendColor:{},rowHeight:{default:51},columnWidth:{},disabled:{type:Boolean,default:!1},onBeforeScaleChange:{},onCellClick:{},onTaskDetailClick:{}},emits:["scale-change","cell-click","cell-hover","overload-detected","task-detail-click"],setup(n,{expose:t,emit:e}){const r=n,s=a.useSlots();a.provide("gantt-view-mode",a.ref("resource")),a.provide("gantt-data-source",a.computed(()=>r.resources)),a.provide("gantt-list-config",a.computed(()=>r.resourceListConfig??null)),a.provide("gantt-row-height",a.computed(()=>Math.max(0,r.rowHeight-5))),a.provide("resourceTaskLayouts",a.computed(()=>{const W=new Map;for(const z of r.resources)W.set(String(z.id),{taskRowMap:new Map,rowHeights:[r.rowHeight],totalHeight:r.rowHeight});return W}));const o=e,i=a.ref(r.defaultScale),A=a.computed(()=>r.scale??i.value),l=()=>{const W=new Date;W.setDate(1);const z=new Date(W);return z.setMonth(z.getMonth()+1),z.setDate(0),{start:W,end:z}},c=a.computed(()=>r.dateRange??l()),u=a.computed(()=>r.overloadThreshold),h=a.computed(()=>A.value),{cellsByResource:g}=SI({resources:a.computed(()=>r.resources),scale:h,dateRange:c,overloadThreshold:u}),d=a.computed(()=>{const W=r.resources[0];return W?g.value.get(W.id)??[]:[]}),m=(W,z)=>{var ye;return((ye=g.value.get(W))==null?void 0:ye[z])??null},y=a.computed(()=>(r.scaleConfigs??Gs)[A.value]??Gs[A.value]),B=W=>{const z=y.value.formatters.secondary;return z?Lp(z,W):A.value==="month"?`${W.getFullYear()}/${W.getMonth()+1}`:`${W.getMonth()+1}/${W.getDate()}`},w=a.computed(()=>{var z;return(((z=r.resourceListConfig)==null?void 0:z.columns)??xb).filter(ye=>ye.visible!==!1)}),E=(W,z)=>{if(!W.width)return 120;if(typeof W.width=="number")return W.width;const ye=W.width.trim();return ye.endsWith("%")?Math.floor(z*parseFloat(ye)/100):parseFloat(ye)||120},x=a.computed(()=>w.value.reduce((W,z)=>W+E(z,k.value),0)),b=async W=>{const z=A.value;W===z||r.disabled||r.onBeforeScaleChange&&!await r.onBeforeScaleChange(W,z)||(r.scale===void 0&&(i.value=W),o("scale-change",{next:W,prev:z}))},H=W=>{b(W)};a.watch(()=>r.scale,(W,z)=>{W!==void 0&&z!==void 0&&W!==z&&o("scale-change",{next:W,prev:z})});const $=()=>{},Y=W=>{var z;(z=r.onCellClick)==null||z.call(r,W),o("cell-click",W)},V=W=>{o("cell-hover",W)},L=W=>{var z;(z=r.onTaskDetailClick)==null||z.call(r,W),o("task-detail-click",W)};a.watch(g,W=>{for(const[z,ye]of W){const qe=ye.filter(ct=>ct.isOverloaded);qe.length>0&&o("overload-detected",{resourceId:z,periods:qe})}},{immediate:!0});const j=a.computed(()=>r.rowHeight),D=a.ref(null),S=a.computed(()=>r.resources.length*j.value),Q=a.computed(()=>r.columnWidth?r.columnWidth:A.value==="month"?100:A.value==="week"?80:56),T=a.computed(()=>d.value.length*Q.value),oe=a.computed(()=>{const W=[],z=A.value,ye=y.value.formatters.primary;let qe=0;for(const ct of d.value){const $e=ct.periodStart,Ve=z==="month"?`${$e.getFullYear()}`:`${$e.getFullYear()}-${$e.getMonth()}`,Mt=Lp(ye,$e),tt=W[W.length-1];tt&&tt.key===Ve?tt.width+=Q.value:W.push({key:Ve,label:Mt,left:qe,width:Q.value}),qe+=Q.value}return W}),X=a.ref(null),F=a.ref(0),M=a.ref(null),R=a.computed(()=>{var qe;const W=il((qe=r.resourceListConfig)==null?void 0:qe.minWidth,F.value,Gm),z=Math.max(W,Gm),ye=x.value;return ye>0&&z>=ye?ye:z}),ae=a.computed(()=>{var qe,ct,$e;const W=il((qe=r.resourceListConfig)==null?void 0:qe.maxWidth,F.value,oT),z=(($e=(ct=M.value)==null?void 0:ct.getHeaderScrollWidth)==null?void 0:$e.call(ct))??null;if(z&&z>0)return Math.min(W,Math.max(z,R.value));const ye=x.value;return ye>0?Math.min(W,Math.max(ye,R.value)):W}),J=()=>{var W;return il((W=r.resourceListConfig)==null?void 0:W.defaultWidth,F.value,sT)},k=a.ref(J()),O=W=>W<R.value?R.value:W>ae.value?ae.value:Math.max(R.value,W);let N=0,Z=0;const se=W=>{const z=W.clientX-N;k.value=O(Z+z)},ge=()=>{document.removeEventListener("mousemove",se),document.removeEventListener("mouseup",ge),window.dispatchEvent(new CustomEvent("splitter-drag-end"))},fe=W=>{N=W.clientX,Z=k.value,document.addEventListener("mousemove",se),document.addEventListener("mouseup",ge),window.dispatchEvent(new CustomEvent("splitter-drag-start")),W.preventDefault()},Ae=a.ref(null),Fe=a.ref(0),be=a.ref(0),Ke=a.ref(0),Xe=a.ref(0),xe=a.computed(()=>{const W=r.resources.length;if(W===0||j.value<=0)return{start:0,end:-1};const z=Math.max(0,Math.floor(Fe.value/j.value)-d0),ye=Math.ceil((Xe.value||0)/j.value),qe=Math.min(W-1,z+ye+d0*2);return{start:z,end:qe}}),te=a.computed(()=>{const W=d.value.length;if(W===0||Q.value<=0)return{start:0,end:-1};const z=Math.max(0,Math.floor(be.value/Q.value)-f0),ye=Math.ceil((Ke.value||0)/Q.value),qe=Math.min(W-1,z+ye+f0*2);return{start:z,end:qe}}),lt=a.computed(()=>{const{start:W,end:z}=xe.value,ye=[];for(let qe=W;qe<=z;qe++){const ct=r.resources[qe];ct&&ye.push({resource:ct,top:qe*j.value})}return ye}),Pe=a.computed(()=>{const{start:W,end:z}=te.value,ye=[];for(let qe=W;qe<=z;qe++){const ct=d.value[qe];ct&&ye.push({index:qe,period:ct,left:qe*Q.value,isWeekend:!!ct.isWeekend})}return ye});let rt=!1;const Te=W=>{const{scrollTop:z}=W.detail;Fe.value=z,Ae.value&&Math.abs(Ae.value.scrollTop-z)>1&&(rt=!0,Ae.value.scrollTop=z,Promise.resolve().then(()=>{rt=!1}))},Et=W=>{D.value=W.detail},ot=W=>{D.value=W,window.dispatchEvent(new CustomEvent("timeline-task-hover",{detail:W}))},yt=()=>{D.value=null,window.dispatchEvent(new CustomEvent("timeline-task-hover",{detail:null}))},pt=W=>{const z=W.target;Fe.value=z.scrollTop,be.value=z.scrollLeft,!rt&&window.dispatchEvent(new CustomEvent("timeline-vertical-scroll",{detail:{scrollTop:z.scrollTop}}))};let Oe=null,it=null;return a.onMounted(()=>{window.addEventListener("task-list-vertical-scroll",Te),window.addEventListener("task-list-hover",Et),a.nextTick(()=>{Ae.value&&(Ke.value=Ae.value.clientWidth,Xe.value=Ae.value.clientHeight,Oe=new ResizeObserver(W=>{for(const z of W)Ke.value=z.contentRect.width,Xe.value=z.contentRect.height}),Oe.observe(Ae.value)),X.value&&(F.value=X.value.clientWidth,it=new ResizeObserver(W=>{for(const z of W)F.value=z.contentRect.width}),it.observe(X.value))})}),a.onUnmounted(()=>{Oe==null||Oe.disconnect(),it==null||it.disconnect(),document.removeEventListener("mousemove",se),document.removeEventListener("mouseup",ge),window.removeEventListener("task-list-vertical-scroll",Te),window.removeEventListener("task-list-hover",Et)}),t({refreshAggregation:$,setScale:H}),(W,z)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"rootRef",ref:X,class:a.normalizeClass(["gantt-resource-usage-view",{"is-disabled":n.disabled}])},[a.createElementVNode("div",FI,[a.createElementVNode("div",{class:"gantt-resource-usage-list-panel",style:a.normalizeStyle({width:k.value+"px"})},[a.createVNode(Iv,{ref_key:"taskListRef",ref:M,class:"gantt-resource-usage-embedded-list","task-list-column-render-mode":n.columnRenderMode},a.createSlots({_:2},[a.unref(s).default?{name:"default",fn:a.withCtx(()=>[a.renderSlot(W.$slots,"default",{},void 0,!0)]),key:"0"}:void 0]),1032,["task-list-column-render-mode"])],4),a.createElementVNode("div",{class:"gantt-resource-usage-splitter",onMousedown:fe},null,32),a.createElementVNode("div",LI,[a.createElementVNode("div",UI,[a.createElementVNode("div",{class:"gantt-resource-usage-grid-header-track",style:a.normalizeStyle({width:T.value+"px",transform:`translateX(${-be.value}px)`})},[a.createElementVNode("div",II,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(oe.value,ye=>(a.openBlock(),a.createElementBlock("div",{key:ye.key,class:"gantt-resource-usage-grid-major-cell",style:a.normalizeStyle({left:ye.left+"px",width:ye.width+"px"})},a.toDisplayString(ye.label),5))),128))]),a.createElementVNode("div",MI,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Pe.value,ye=>(a.openBlock(),a.createElementBlock("div",{key:ye.index,class:a.normalizeClass(["gantt-resource-usage-grid-header-cell",{"is-weekend":ye.isWeekend}]),style:a.normalizeStyle({left:ye.left+"px",width:Q.value+"px"})},a.toDisplayString(B(ye.period.periodStart)),7))),128))])],4)]),a.createElementVNode("div",{ref_key:"gridScrollRef",ref:Ae,class:"gantt-resource-usage-grid-scroll",onScroll:pt},[a.createElementVNode("div",{class:"gantt-resource-usage-grid-inner",style:a.normalizeStyle({width:T.value+"px",height:S.value+"px"})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(lt.value,ye=>(a.openBlock(),a.createElementBlock("div",{key:ye.resource.id,class:a.normalizeClass(["gantt-resource-usage-grid-row",{"is-hover":D.value===ye.resource.id}]),style:a.normalizeStyle({top:ye.top+"px",height:j.value+"px",width:T.value+"px"}),onMouseenter:qe=>ot(ye.resource.id),onMouseleave:yt},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Pe.value,qe=>(a.openBlock(),a.createBlock(DI,{key:qe.index,class:"gantt-resource-usage-grid-cell",style:a.normalizeStyle({left:qe.left+"px",width:Q.value+"px"}),cell:m(ye.resource.id,qe.index),"resource-id":ye.resource.id,"overload-threshold":n.overloadThreshold,"underload-threshold":n.underloadThreshold,"overload-color":n.overloadColor,"normal-color":n.normalColor,"underload-color":n.underloadColor,"weekend-color":n.weekendColor,height:j.value,onClick:Y,onHover:V,onTaskDetailClick:L},null,8,["style","cell","resource-id","overload-threshold","underload-threshold","overload-color","normal-color","underload-color","weekend-color","height"]))),128))],46,QI))),128))],4)],544)])])],2))}}),Wb=un(NI,[["__scopeId","data-v-833c2d3f"]]);function Ip(n,t,e=null){for(const r of n){if(r.id===t)return e;if(r.children&&r.children.length>0){const s=Ip(r.children,t,r);if(s!==null)return s}}return null}function Kb(n,t){for(let e=0;e<n.length;e++){if(n[e].id===t)return n.splice(e,1)[0];if(n[e].children&&n[e].children.length>0){const r=Kb(n[e].children,t);if(r)return r}}return null}function $b(n,t,e,r){for(let s=0;s<n.length;s++){if(n[s].id===t)return r==="after"||n[s].type==="milestone-group"?(e.parentId=n[s].parentId,n.splice(s+1,0,e)):(e.parentId=t,n[s].children||(n[s].children=[]),n[s].children.unshift(e)),!0;if(n[s].children&&n[s].children.length>0&&$b(n[s].children,t,e,r))return!0}return!1}function _I(n,t,e,r){const s=Ip(n,t),o=Kb(n,t);if(!o)return null;if(!$b(n,e,o,r))return s&&s.children?s.children.push(o):n.push(o),null;const A=Ip(n,t);return{movedTask:o,oldParent:s,newParent:A}}const VA=900*1e3;function RI(n,t,e){const r=n.startDate?new Date(n.startDate):null,s=n.endDate?new Date(n.endDate):null,o=t.startDate?new Date(t.startDate):null,i=t.endDate?new Date(t.endDate):null;if(!r||!s||!o||!i)return!1;const A=r.getTime(),l=s.getTime(),c=o.getTime(),u=i.getTime();if(e==="hour"){const d=Math.floor(A/VA)*VA,m=Math.ceil(l/VA)*VA,y=Math.floor(c/VA)*VA,B=Math.ceil(u/VA)*VA;return m>y&&B>d}const h=Ka(n.endDate,s).getTime()+1440*60*1e3,g=Ka(t.endDate,i).getTime()+1440*60*1e3;return h>c&&g>A}function h0(n,t=51,e,r=!0){const s=new Map,o=[];if(!n||n.length===0)return{taskRowMap:s,rowHeights:o,totalHeight:t};const i=[...n].sort((u,h)=>{const g=u.startDate?new Date(u.startDate).getTime():0,d=h.startDate?new Date(h.startDate).getTime():0;return g-d});if(!r){const u=t-10;i.forEach((g,d)=>{s.set(g.id,d);const m=d===0?5+u+5:u+5;o.push(m)});const h=o.reduce((g,d)=>g+d,0);return{taskRowMap:s,rowHeights:o,totalHeight:h}}const A=[];for(const u of i){let h=-1;for(let g=0;g<A.length;g++){const d=A[g];let m=!1;for(const y of d)if(RI(u,y,e)){m=!0;break}if(!m){h=g,A[g].push(u);break}}h===-1&&(h=A.length,A.push([u])),s.set(u.id,h)}const l=t-10;for(let u=0;u<A.length;u++){const h=u===0?5+l+5:l+5;o.push(h)}const c=o.reduce((u,h)=>u+h,0);return{taskRowMap:s,rowHeights:o,totalHeight:c}}function hn(n){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(n)}var Oo=Uint8Array,co=Uint16Array,Hv=Int32Array,Pv=new Oo([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Vv=new Oo([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),g0=new Oo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qb=function(n,t){for(var e=new co(31),r=0;r<31;++r)e[r]=t+=1<<n[r-1];for(var s=new Hv(e[30]),r=1;r<30;++r)for(var o=e[r];o<e[r+1];++o)s[o]=o-e[r]<<5|r;return{b:e,r:s}},jb=qb(Pv,2),OI=jb.b,Mp=jb.r;OI[28]=258,Mp[258]=28;var HI=qb(Vv,0),p0=HI.r,Qp=new co(32768);for(var Wn=0;Wn<32768;++Wn){var WA=(Wn&43690)>>1|(Wn&21845)<<1;WA=(WA&52428)>>2|(WA&13107)<<2,WA=(WA&61680)>>4|(WA&3855)<<4,Qp[Wn]=((WA&65280)>>8|(WA&255)<<8)>>1}var Jl=(function(n,t,e){for(var r=n.length,s=0,o=new co(t);s<r;++s)n[s]&&++o[n[s]-1];var i=new co(t);for(s=1;s<t;++s)i[s]=i[s-1]+o[s-1]<<1;var A;if(e){A=new co(1<<t);var l=15-t;for(s=0;s<r;++s)if(n[s])for(var c=s<<4|n[s],u=t-n[s],h=i[n[s]-1]++<<u,g=h|(1<<u)-1;h<=g;++h)A[Qp[h]>>l]=c}else for(A=new co(r),s=0;s<r;++s)n[s]&&(A[s]=Qp[i[n[s]-1]++]>>15-n[s]);return A}),Si=new Oo(288);for(var Wn=0;Wn<144;++Wn)Si[Wn]=8;for(var Wn=144;Wn<256;++Wn)Si[Wn]=9;for(var Wn=256;Wn<280;++Wn)Si[Wn]=7;for(var Wn=280;Wn<288;++Wn)Si[Wn]=8;var qu=new Oo(32);for(var Wn=0;Wn<32;++Wn)qu[Wn]=5;var PI=Jl(Si,9,0),VI=Jl(qu,5,0),Yb=function(n){return(n+7)/8|0},WI=function(n,t,e){return(e==null||e>n.length)&&(e=n.length),new Oo(n.subarray(t,e))},mA=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8},Il=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8,n[r+2]|=e>>16},jd=function(n,t){for(var e=[],r=0;r<n.length;++r)n[r]&&e.push({s:r,f:n[r]});var s=e.length,o=e.slice();if(!s)return{t:zb,l:0};if(s==1){var i=new Oo(e[0].s+1);return i[e[0].s]=1,{t:i,l:1}}e.sort(function(H,$){return H.f-$.f}),e.push({s:-1,f:25001});var A=e[0],l=e[1],c=0,u=1,h=2;for(e[0]={s:-1,f:A.f+l.f,l:A,r:l};u!=s-1;)A=e[e[c].f<e[h].f?c++:h++],l=e[c!=u&&e[c].f<e[h].f?c++:h++],e[u++]={s:-1,f:A.f+l.f,l:A,r:l};for(var g=o[0].s,r=1;r<s;++r)o[r].s>g&&(g=o[r].s);var d=new co(g+1),m=Np(e[u-1],d,0);if(m>t){var r=0,y=0,B=m-t,w=1<<B;for(o.sort(function($,Y){return d[Y.s]-d[$.s]||$.f-Y.f});r<s;++r){var E=o[r].s;if(d[E]>t)y+=w-(1<<m-d[E]),d[E]=t;else break}for(y>>=B;y>0;){var x=o[r].s;d[x]<t?y-=1<<t-d[x]++-1:++r}for(;r>=0&&y;--r){var b=o[r].s;d[b]==t&&(--d[b],++y)}m=t}return{t:new Oo(d),l:m}},Np=function(n,t,e){return n.s==-1?Math.max(Np(n.l,t,e+1),Np(n.r,t,e+1)):t[n.s]=e},v0=function(n){for(var t=n.length;t&&!n[--t];);for(var e=new co(++t),r=0,s=n[0],o=1,i=function(l){e[r++]=l},A=1;A<=t;++A)if(n[A]==s&&A!=t)++o;else{if(!s&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(s),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(s);o=1,s=n[A]}return{c:e.subarray(0,r),n:t}},Ml=function(n,t){for(var e=0,r=0;r<t.length;++r)e+=n[r]*t[r];return e},Gb=function(n,t,e){var r=e.length,s=Yb(t+2);n[s]=r&255,n[s+1]=r>>8,n[s+2]=n[s]^255,n[s+3]=n[s+1]^255;for(var o=0;o<r;++o)n[s+o+4]=e[o];return(s+4+r)*8},m0=function(n,t,e,r,s,o,i,A,l,c,u){mA(t,u++,e),++s[256];for(var h=jd(s,15),g=h.t,d=h.l,m=jd(o,15),y=m.t,B=m.l,w=v0(g),E=w.c,x=w.n,b=v0(y),H=b.c,$=b.n,Y=new co(19),V=0;V<E.length;++V)++Y[E[V]&31];for(var V=0;V<H.length;++V)++Y[H[V]&31];for(var L=jd(Y,7),j=L.t,D=L.l,S=19;S>4&&!j[g0[S-1]];--S);var Q=c+5<<3,T=Ml(s,Si)+Ml(o,qu)+i,oe=Ml(s,g)+Ml(o,y)+i+14+3*S+Ml(Y,j)+2*Y[16]+3*Y[17]+7*Y[18];if(l>=0&&Q<=T&&Q<=oe)return Gb(t,u,n.subarray(l,l+c));var X,F,M,R;if(mA(t,u,1+(oe<T)),u+=2,oe<T){X=Jl(g,d,0),F=g,M=Jl(y,B,0),R=y;var ae=Jl(j,D,0);mA(t,u,x-257),mA(t,u+5,$-1),mA(t,u+10,S-4),u+=14;for(var V=0;V<S;++V)mA(t,u+3*V,j[g0[V]]);u+=3*S;for(var J=[E,H],k=0;k<2;++k)for(var O=J[k],V=0;V<O.length;++V){var N=O[V]&31;mA(t,u,ae[N]),u+=j[N],N>15&&(mA(t,u,O[V]>>5&127),u+=O[V]>>12)}}else X=PI,F=Si,M=VI,R=qu;for(var V=0;V<A;++V){var Z=r[V];if(Z>255){var N=Z>>18&31;Il(t,u,X[N+257]),u+=F[N+257],N>7&&(mA(t,u,Z>>23&31),u+=Pv[N]);var se=Z&31;Il(t,u,M[se]),u+=R[se],se>3&&(Il(t,u,Z>>5&8191),u+=Vv[se])}else Il(t,u,X[Z]),u+=F[Z]}return Il(t,u,X[256]),u+F[256]},KI=new Hv([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),zb=new Oo(0),$I=function(n,t,e,r,s,o){var i=o.z||n.length,A=new Oo(r+i+5*(1+Math.ceil(i/7e3))+s),l=A.subarray(r,A.length-s),c=o.l,u=(o.r||0)&7;if(t){u&&(l[0]=o.r>>3);for(var h=KI[t-1],g=h>>13,d=h&8191,m=(1<<e)-1,y=o.p||new co(32768),B=o.h||new co(m+1),w=Math.ceil(e/3),E=2*w,x=function(xe){return(n[xe]^n[xe+1]<<w^n[xe+2]<<E)&m},b=new Hv(25e3),H=new co(288),$=new co(32),Y=0,V=0,L=o.i||0,j=0,D=o.w||0,S=0;L+2<i;++L){var Q=x(L),T=L&32767,oe=B[Q];if(y[T]=oe,B[Q]=T,D<=L){var X=i-L;if((Y>7e3||j>24576)&&(X>423||!c)){u=m0(n,l,0,b,H,$,V,j,S,L-S,u),j=Y=V=0,S=L;for(var F=0;F<286;++F)H[F]=0;for(var F=0;F<30;++F)$[F]=0}var M=2,R=0,ae=d,J=T-oe&32767;if(X>2&&Q==x(L-J))for(var k=Math.min(g,X)-1,O=Math.min(32767,L),N=Math.min(258,X);J<=O&&--ae&&T!=oe;){if(n[L+M]==n[L+M-J]){for(var Z=0;Z<N&&n[L+Z]==n[L+Z-J];++Z);if(Z>M){if(M=Z,R=J,Z>k)break;for(var se=Math.min(J,Z-2),ge=0,F=0;F<se;++F){var fe=L-J+F&32767,Ae=y[fe],Fe=fe-Ae&32767;Fe>ge&&(ge=Fe,oe=fe)}}}T=oe,oe=y[T],J+=T-oe&32767}if(R){b[j++]=268435456|Mp[M]<<18|p0[R];var be=Mp[M]&31,Ke=p0[R]&31;V+=Pv[be]+Vv[Ke],++H[257+be],++$[Ke],D=L+M,++Y}else b[j++]=n[L],++H[n[L]]}}for(L=Math.max(L,D);L<i;++L)b[j++]=n[L],++H[n[L]];u=m0(n,l,c,b,H,$,V,j,S,L-S,u),c||(o.r=u&7|l[u/8|0]<<3,u-=7,o.h=B,o.p=y,o.i=L,o.w=D)}else{for(var L=o.w||0;L<i+c;L+=65535){var Xe=L+65535;Xe>=i&&(l[u/8|0]=c,Xe=i),u=Gb(l,u+1,n.subarray(L,Xe))}o.i=i}return WI(A,0,r+Yb(u)+s)},Xb=function(){var n=1,t=0;return{p:function(e){for(var r=n,s=t,o=e.length|0,i=0;i!=o;){for(var A=Math.min(i+2655,o);i<A;++i)s+=r+=e[i];r=(r&65535)+15*(r>>16),s=(s&65535)+15*(s>>16)}n=r,t=s},d:function(){return n%=65521,t%=65521,(n&255)<<24|(n&65280)<<8|(t&255)<<8|t>>8}}},qI=function(n,t,e,r,s){if(!s&&(s={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),i=new Oo(o.length+n.length);i.set(o),i.set(n,o.length),n=i,s.w=o.length}return $I(n,t.level==null?6:t.level,t.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+t.mem,e,r,s)},Jb=function(n,t,e){for(;e;++t)n[t]=e,e>>>=8},jI=function(n,t){var e=t.level,r=e==0?0:e<6?1:e==9?3:2;if(n[0]=120,n[1]=r<<6|(t.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,t.dictionary){var s=Xb();s.p(t.dictionary),Jb(n,2,s.d())}};function _p(n,t){t||(t={});var e=Xb();e.p(n);var r=qI(n,t,t.dictionary?6:2,4);return jI(r,t),Jb(r,r.length-4,e.d()),r}var YI=typeof TextDecoder<"u"&&new TextDecoder,GI=0;try{YI.decode(zb,{stream:!0}),GI=1}catch{}function zI(n){if(Array.isArray(n))return n}function XI(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,s,o,i,A=[],l=!0,c=!1;try{if(o=(e=e.call(n)).next,t!==0)for(;!(l=(r=o.call(e)).done)&&(A.push(r.value),A.length!==t);l=!0);}catch(u){c=!0,s=u}finally{try{if(!l&&e.return!=null&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw s}}return A}}function w0(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function JI(n,t){if(n){if(typeof n=="string")return w0(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?w0(n,t):void 0}}function ZI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y0(n,t){return zI(n)||XI(n,t)||JI(n,t)||ZI()}function B0(n,t="utf8"){return new TextDecoder(t).decode(n)}const eM=new TextEncoder;function tM(n){return eM.encode(n)}const rM=1024*8,nM=(()=>{const n=new Uint8Array(4),t=new Uint32Array(n.buffer);return!((t[0]=1)&n[0])})(),Yd={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Wv{constructor(t=rM,e={}){$r(this,"buffer");$r(this,"byteLength");$r(this,"byteOffset");$r(this,"length");$r(this,"offset");$r(this,"lastWrittenByte");$r(this,"littleEndian");$r(this,"_data");$r(this,"_mark");$r(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const s=e.offset?e.offset>>>0:0,o=t.byteLength-s;let i=s;(ArrayBuffer.isView(t)||t instanceof Wv)&&(t.byteLength!==t.buffer.byteLength&&(i=t.byteOffset+s),t=t.buffer),r?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=i,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,i,o),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,s=new Uint8Array(r);s.set(new Uint8Array(this.buffer)),this.buffer=s.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=Yd[e].BYTES_PER_ELEMENT*t,s=this.byteOffset+this.offset,o=this.buffer.slice(s,s+r);if(this.littleEndian===nM&&e!=="uint8"&&e!=="int8"){const A=new Uint8Array(this.buffer.slice(s,s+r));A.reverse();const l=new Yd[e](A.buffer);return this.offset+=r,l.reverse(),l}const i=new Yd[e](o);return this.offset+=r,i}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;r<t;r++)e+=this.readChar();return e}readUtf8(t=1){return B0(this.readBytes(t))}decodeText(t=1,e="utf8"){return B0(this.readBytes(t),e)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let e=0;e<t.length;e++)this._data.setUint8(this.offset++,t[e]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let e=0;e<t.length;e++)this.writeUint8(t.charCodeAt(e));return this}writeUtf8(t){return this.writeBytes(tM(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function pl(n){let t=n.length;for(;--t>=0;)n[t]=0}const aM=3,sM=258,Zb=29,oM=256,AM=oM+1+Zb,eC=30,iM=512,lM=new Array((AM+2)*2);pl(lM);const cM=new Array(eC*2);pl(cM);const uM=new Array(iM);pl(uM);const dM=new Array(sM-aM+1);pl(dM);const fM=new Array(Zb);pl(fM);const hM=new Array(eC);pl(hM);const gM=(n,t,e,r)=>{let s=n&65535|0,o=n>>>16&65535|0,i=0;for(;e!==0;){i=e>2e3?2e3:e,e-=i;do s=s+t[r++]|0,o=o+s|0;while(--i);s%=65521,o%=65521}return s|o<<16|0};var Rp=gM;const pM=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},vM=new Uint32Array(pM()),mM=(n,t,e,r)=>{const s=vM,o=r+e;n^=-1;for(let i=r;i<o;i++)n=n>>>8^s[(n^t[i])&255];return n^-1};var eA=mM,Op={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},tC={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const wM=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var yM=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)wM(e,r)&&(n[r]=e[r])}}return n},BM=n=>{let t=0;for(let r=0,s=n.length;r<s;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,s=0,o=n.length;r<o;r++){let i=n[r];e.set(i,s),s+=i.length}return e},rC={assign:yM,flattenChunks:BM};let nC=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{nC=!1}const Ac=new Uint8Array(256);for(let n=0;n<256;n++)Ac[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;Ac[254]=Ac[254]=1;var bM=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,s,o,i=n.length,A=0;for(s=0;s<i;s++)e=n.charCodeAt(s),(e&64512)===55296&&s+1<i&&(r=n.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),A+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(A),o=0,s=0;o<A;s++)e=n.charCodeAt(s),(e&64512)===55296&&s+1<i&&(r=n.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?t[o++]=e:e<2048?(t[o++]=192|e>>>6,t[o++]=128|e&63):e<65536?(t[o++]=224|e>>>12,t[o++]=128|e>>>6&63,t[o++]=128|e&63):(t[o++]=240|e>>>18,t[o++]=128|e>>>12&63,t[o++]=128|e>>>6&63,t[o++]=128|e&63);return t};const CM=(n,t)=>{if(t<65534&&n.subarray&&nC)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var kM=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,s;const o=new Array(e*2);for(s=0,r=0;r<e;){let i=n[r++];if(i<128){o[s++]=i;continue}let A=Ac[i];if(A>4){o[s++]=65533,r+=A-1;continue}for(i&=A===2?31:A===3?15:7;A>1&&r<e;)i=i<<6|n[r++]&63,A--;if(A>1){o[s++]=65533;continue}i<65536?o[s++]=i:(i-=65536,o[s++]=55296|i>>10&1023,o[s++]=56320|i&1023)}return CM(o,s)},EM=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+Ac[n[e]]>t?e:t},Hp={string2buf:bM,buf2string:kM,utf8border:EM};function DM(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var TM=DM;const Yc=16209,xM=16191;var SM=function(t,e){let r,s,o,i,A,l,c,u,h,g,d,m,y,B,w,E,x,b,H,$,Y,V,L,j;const D=t.state;r=t.next_in,L=t.input,s=r+(t.avail_in-5),o=t.next_out,j=t.output,i=o-(e-t.avail_out),A=o+(t.avail_out-257),l=D.dmax,c=D.wsize,u=D.whave,h=D.wnext,g=D.window,d=D.hold,m=D.bits,y=D.lencode,B=D.distcode,w=(1<<D.lenbits)-1,E=(1<<D.distbits)-1;e:do{m<15&&(d+=L[r++]<<m,m+=8,d+=L[r++]<<m,m+=8),x=y[d&w];t:for(;;){if(b=x>>>24,d>>>=b,m-=b,b=x>>>16&255,b===0)j[o++]=x&65535;else if(b&16){H=x&65535,b&=15,b&&(m<b&&(d+=L[r++]<<m,m+=8),H+=d&(1<<b)-1,d>>>=b,m-=b),m<15&&(d+=L[r++]<<m,m+=8,d+=L[r++]<<m,m+=8),x=B[d&E];r:for(;;){if(b=x>>>24,d>>>=b,m-=b,b=x>>>16&255,b&16){if($=x&65535,b&=15,m<b&&(d+=L[r++]<<m,m+=8,m<b&&(d+=L[r++]<<m,m+=8)),$+=d&(1<<b)-1,$>l){t.msg="invalid distance too far back",D.mode=Yc;break e}if(d>>>=b,m-=b,b=o-i,$>b){if(b=$-b,b>u&&D.sane){t.msg="invalid distance too far back",D.mode=Yc;break e}if(Y=0,V=g,h===0){if(Y+=c-b,b<H){H-=b;do j[o++]=g[Y++];while(--b);Y=o-$,V=j}}else if(h<b){if(Y+=c+h-b,b-=h,b<H){H-=b;do j[o++]=g[Y++];while(--b);if(Y=0,h<H){b=h,H-=b;do j[o++]=g[Y++];while(--b);Y=o-$,V=j}}}else if(Y+=h-b,b<H){H-=b;do j[o++]=g[Y++];while(--b);Y=o-$,V=j}for(;H>2;)j[o++]=V[Y++],j[o++]=V[Y++],j[o++]=V[Y++],H-=3;H&&(j[o++]=V[Y++],H>1&&(j[o++]=V[Y++]))}else{Y=o-$;do j[o++]=j[Y++],j[o++]=j[Y++],j[o++]=j[Y++],H-=3;while(H>2);H&&(j[o++]=j[Y++],H>1&&(j[o++]=j[Y++]))}}else if((b&64)===0){x=B[(x&65535)+(d&(1<<b)-1)];continue r}else{t.msg="invalid distance code",D.mode=Yc;break e}break}}else if((b&64)===0){x=y[(x&65535)+(d&(1<<b)-1)];continue t}else if(b&32){D.mode=xM;break e}else{t.msg="invalid literal/length code",D.mode=Yc;break e}break}}while(r<s&&o<A);H=m>>3,r-=H,m-=H<<3,d&=(1<<m)-1,t.next_in=r,t.next_out=o,t.avail_in=r<s?5+(s-r):5-(r-s),t.avail_out=o<A?257+(A-o):257-(o-A),D.hold=d,D.bits=m};const Vi=15,b0=852,C0=592,k0=0,Gd=1,E0=2,FM=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),LM=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),UM=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),IM=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),MM=(n,t,e,r,s,o,i,A)=>{const l=A.bits;let c=0,u=0,h=0,g=0,d=0,m=0,y=0,B=0,w=0,E=0,x,b,H,$,Y,V=null,L;const j=new Uint16Array(Vi+1),D=new Uint16Array(Vi+1);let S=null,Q,T,oe;for(c=0;c<=Vi;c++)j[c]=0;for(u=0;u<r;u++)j[t[e+u]]++;for(d=l,g=Vi;g>=1&&j[g]===0;g--);if(d>g&&(d=g),g===0)return s[o++]=1<<24|64<<16|0,s[o++]=1<<24|64<<16|0,A.bits=1,0;for(h=1;h<g&&j[h]===0;h++);for(d<h&&(d=h),B=1,c=1;c<=Vi;c++)if(B<<=1,B-=j[c],B<0)return-1;if(B>0&&(n===k0||g!==1))return-1;for(D[1]=0,c=1;c<Vi;c++)D[c+1]=D[c]+j[c];for(u=0;u<r;u++)t[e+u]!==0&&(i[D[t[e+u]]++]=u);if(n===k0?(V=S=i,L=20):n===Gd?(V=FM,S=LM,L=257):(V=UM,S=IM,L=0),E=0,u=0,c=h,Y=o,m=d,y=0,H=-1,w=1<<d,$=w-1,n===Gd&&w>b0||n===E0&&w>C0)return 1;for(;;){Q=c-y,i[u]+1<L?(T=0,oe=i[u]):i[u]>=L?(T=S[i[u]-L],oe=V[i[u]-L]):(T=96,oe=0),x=1<<c-y,b=1<<m,h=b;do b-=x,s[Y+(E>>y)+b]=Q<<24|T<<16|oe|0;while(b!==0);for(x=1<<c-1;E&x;)x>>=1;if(x!==0?(E&=x-1,E+=x):E=0,u++,--j[c]===0){if(c===g)break;c=t[e+i[u]]}if(c>d&&(E&$)!==H){for(y===0&&(y=d),Y+=h,m=c-y,B=1<<m;m+y<g&&(B-=j[m+y],!(B<=0));)m++,B<<=1;if(w+=1<<m,n===Gd&&w>b0||n===E0&&w>C0)return 1;H=E&$,s[H]=d<<24|m<<16|Y-o|0}}return E!==0&&(s[Y+E]=c-y<<24|64<<16|0),A.bits=d,0};var Zl=MM;const QM=0,aC=1,sC=2,{Z_FINISH:D0,Z_BLOCK:NM,Z_TREES:Gc,Z_OK:Fi,Z_STREAM_END:_M,Z_NEED_DICT:RM,Z_STREAM_ERROR:Bo,Z_DATA_ERROR:oC,Z_MEM_ERROR:AC,Z_BUF_ERROR:OM,Z_DEFLATED:T0}=tC,Ad=16180,x0=16181,S0=16182,F0=16183,L0=16184,U0=16185,I0=16186,M0=16187,Q0=16188,N0=16189,ju=16190,wA=16191,zd=16192,_0=16193,Xd=16194,R0=16195,O0=16196,H0=16197,P0=16198,zc=16199,Xc=16200,V0=16201,W0=16202,K0=16203,$0=16204,q0=16205,Jd=16206,j0=16207,Y0=16208,qn=16209,iC=16210,lC=16211,HM=852,PM=592,VM=15,WM=VM,G0=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function KM(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ui=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<Ad||t.mode>lC?1:0},cC=n=>{if(Ui(n))return Bo;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=Ad,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(HM),t.distcode=t.distdyn=new Int32Array(PM),t.sane=1,t.back=-1,Fi},uC=n=>{if(Ui(n))return Bo;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,cC(n)},dC=(n,t)=>{let e;if(Ui(n))return Bo;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Bo:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,uC(n))},fC=(n,t)=>{if(!n)return Bo;const e=new KM;n.state=e,e.strm=n,e.window=null,e.mode=Ad;const r=dC(n,t);return r!==Fi&&(n.state=null),r},$M=n=>fC(n,WM);let z0=!0,Zd,ef;const qM=n=>{if(z0){Zd=new Int32Array(512),ef=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(Zl(aC,n.lens,0,288,Zd,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;Zl(sC,n.lens,0,32,ef,0,n.work,{bits:5}),z0=!1}n.lencode=Zd,n.lenbits=9,n.distcode=ef,n.distbits=5},hC=(n,t,e,r)=>{let s;const o=n.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(e-o.wsize,e),0),o.wnext=0,o.whave=o.wsize):(s=o.wsize-o.wnext,s>r&&(s=r),o.window.set(t.subarray(e-r,e-r+s),o.wnext),r-=s,r?(o.window.set(t.subarray(e-r,e),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0},jM=(n,t)=>{let e,r,s,o,i,A,l,c,u,h,g,d,m,y,B=0,w,E,x,b,H,$,Y,V;const L=new Uint8Array(4);let j,D;const S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ui(n)||!n.output||!n.input&&n.avail_in!==0)return Bo;e=n.state,e.mode===wA&&(e.mode=zd),i=n.next_out,s=n.output,l=n.avail_out,o=n.next_in,r=n.input,A=n.avail_in,c=e.hold,u=e.bits,h=A,g=l,V=Fi;e:for(;;)switch(e.mode){case Ad:if(e.wrap===0){e.mode=zd;break}for(;u<16;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(e.wrap&2&&c===35615){e.wbits===0&&(e.wbits=15),e.check=0,L[0]=c&255,L[1]=c>>>8&255,e.check=eA(e.check,L,2,0),c=0,u=0,e.mode=x0;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((c&255)<<8)+(c>>8))%31){n.msg="incorrect header check",e.mode=qn;break}if((c&15)!==T0){n.msg="unknown compression method",e.mode=qn;break}if(c>>>=4,u-=4,Y=(c&15)+8,e.wbits===0&&(e.wbits=Y),Y>15||Y>e.wbits){n.msg="invalid window size",e.mode=qn;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=c&512?N0:wA,c=0,u=0;break;case x0:for(;u<16;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(e.flags=c,(e.flags&255)!==T0){n.msg="unknown compression method",e.mode=qn;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=qn;break}e.head&&(e.head.text=c>>8&1),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,e.check=eA(e.check,L,2,0)),c=0,u=0,e.mode=S0;case S0:for(;u<32;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}e.head&&(e.head.time=c),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,L[2]=c>>>16&255,L[3]=c>>>24&255,e.check=eA(e.check,L,4,0)),c=0,u=0,e.mode=F0;case F0:for(;u<16;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}e.head&&(e.head.xflags=c&255,e.head.os=c>>8),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,e.check=eA(e.check,L,2,0)),c=0,u=0,e.mode=L0;case L0:if(e.flags&1024){for(;u<16;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}e.length=c,e.head&&(e.head.extra_len=c),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,e.check=eA(e.check,L,2,0)),c=0,u=0}else e.head&&(e.head.extra=null);e.mode=U0;case U0:if(e.flags&1024&&(d=e.length,d>A&&(d=A),d&&(e.head&&(Y=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(o,o+d),Y)),e.flags&512&&e.wrap&4&&(e.check=eA(e.check,r,d,o)),A-=d,o+=d,e.length-=d),e.length))break e;e.length=0,e.mode=I0;case I0:if(e.flags&2048){if(A===0)break e;d=0;do Y=r[o+d++],e.head&&Y&&e.length<65536&&(e.head.name+=String.fromCharCode(Y));while(Y&&d<A);if(e.flags&512&&e.wrap&4&&(e.check=eA(e.check,r,d,o)),A-=d,o+=d,Y)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=M0;case M0:if(e.flags&4096){if(A===0)break e;d=0;do Y=r[o+d++],e.head&&Y&&e.length<65536&&(e.head.comment+=String.fromCharCode(Y));while(Y&&d<A);if(e.flags&512&&e.wrap&4&&(e.check=eA(e.check,r,d,o)),A-=d,o+=d,Y)break e}else e.head&&(e.head.comment=null);e.mode=Q0;case Q0:if(e.flags&512){for(;u<16;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(e.wrap&4&&c!==(e.check&65535)){n.msg="header crc mismatch",e.mode=qn;break}c=0,u=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=wA;break;case N0:for(;u<32;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}n.adler=e.check=G0(c),c=0,u=0,e.mode=ju;case ju:if(e.havedict===0)return n.next_out=i,n.avail_out=l,n.next_in=o,n.avail_in=A,e.hold=c,e.bits=u,RM;n.adler=e.check=1,e.mode=wA;case wA:if(t===NM||t===Gc)break e;case zd:if(e.last){c>>>=u&7,u-=u&7,e.mode=Jd;break}for(;u<3;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}switch(e.last=c&1,c>>>=1,u-=1,c&3){case 0:e.mode=_0;break;case 1:if(qM(e),e.mode=zc,t===Gc){c>>>=2,u-=2;break e}break;case 2:e.mode=O0;break;case 3:n.msg="invalid block type",e.mode=qn}c>>>=2,u-=2;break;case _0:for(c>>>=u&7,u-=u&7;u<32;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){n.msg="invalid stored block lengths",e.mode=qn;break}if(e.length=c&65535,c=0,u=0,e.mode=Xd,t===Gc)break e;case Xd:e.mode=R0;case R0:if(d=e.length,d){if(d>A&&(d=A),d>l&&(d=l),d===0)break e;s.set(r.subarray(o,o+d),i),A-=d,o+=d,l-=d,i+=d,e.length-=d;break}e.mode=wA;break;case O0:for(;u<14;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(e.nlen=(c&31)+257,c>>>=5,u-=5,e.ndist=(c&31)+1,c>>>=5,u-=5,e.ncode=(c&15)+4,c>>>=4,u-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=qn;break}e.have=0,e.mode=H0;case H0:for(;e.have<e.ncode;){for(;u<3;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}e.lens[S[e.have++]]=c&7,c>>>=3,u-=3}for(;e.have<19;)e.lens[S[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,j={bits:e.lenbits},V=Zl(QM,e.lens,0,19,e.lencode,0,e.work,j),e.lenbits=j.bits,V){n.msg="invalid code lengths set",e.mode=qn;break}e.have=0,e.mode=P0;case P0:for(;e.have<e.nlen+e.ndist;){for(;B=e.lencode[c&(1<<e.lenbits)-1],w=B>>>24,E=B>>>16&255,x=B&65535,!(w<=u);){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(x<16)c>>>=w,u-=w,e.lens[e.have++]=x;else{if(x===16){for(D=w+2;u<D;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(c>>>=w,u-=w,e.have===0){n.msg="invalid bit length repeat",e.mode=qn;break}Y=e.lens[e.have-1],d=3+(c&3),c>>>=2,u-=2}else if(x===17){for(D=w+3;u<D;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}c>>>=w,u-=w,Y=0,d=3+(c&7),c>>>=3,u-=3}else{for(D=w+7;u<D;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}c>>>=w,u-=w,Y=0,d=11+(c&127),c>>>=7,u-=7}if(e.have+d>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=qn;break}for(;d--;)e.lens[e.have++]=Y}}if(e.mode===qn)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=qn;break}if(e.lenbits=9,j={bits:e.lenbits},V=Zl(aC,e.lens,0,e.nlen,e.lencode,0,e.work,j),e.lenbits=j.bits,V){n.msg="invalid literal/lengths set",e.mode=qn;break}if(e.distbits=6,e.distcode=e.distdyn,j={bits:e.distbits},V=Zl(sC,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,j),e.distbits=j.bits,V){n.msg="invalid distances set",e.mode=qn;break}if(e.mode=zc,t===Gc)break e;case zc:e.mode=Xc;case Xc:if(A>=6&&l>=258){n.next_out=i,n.avail_out=l,n.next_in=o,n.avail_in=A,e.hold=c,e.bits=u,SM(n,g),i=n.next_out,s=n.output,l=n.avail_out,o=n.next_in,r=n.input,A=n.avail_in,c=e.hold,u=e.bits,e.mode===wA&&(e.back=-1);break}for(e.back=0;B=e.lencode[c&(1<<e.lenbits)-1],w=B>>>24,E=B>>>16&255,x=B&65535,!(w<=u);){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(E&&(E&240)===0){for(b=w,H=E,$=x;B=e.lencode[$+((c&(1<<b+H)-1)>>b)],w=B>>>24,E=B>>>16&255,x=B&65535,!(b+w<=u);){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}c>>>=b,u-=b,e.back+=b}if(c>>>=w,u-=w,e.back+=w,e.length=x,E===0){e.mode=q0;break}if(E&32){e.back=-1,e.mode=wA;break}if(E&64){n.msg="invalid literal/length code",e.mode=qn;break}e.extra=E&15,e.mode=V0;case V0:if(e.extra){for(D=e.extra;u<D;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}e.length+=c&(1<<e.extra)-1,c>>>=e.extra,u-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=W0;case W0:for(;B=e.distcode[c&(1<<e.distbits)-1],w=B>>>24,E=B>>>16&255,x=B&65535,!(w<=u);){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if((E&240)===0){for(b=w,H=E,$=x;B=e.distcode[$+((c&(1<<b+H)-1)>>b)],w=B>>>24,E=B>>>16&255,x=B&65535,!(b+w<=u);){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}c>>>=b,u-=b,e.back+=b}if(c>>>=w,u-=w,e.back+=w,E&64){n.msg="invalid distance code",e.mode=qn;break}e.offset=x,e.extra=E&15,e.mode=K0;case K0:if(e.extra){for(D=e.extra;u<D;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}e.offset+=c&(1<<e.extra)-1,c>>>=e.extra,u-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=qn;break}e.mode=$0;case $0:if(l===0)break e;if(d=g-l,e.offset>d){if(d=e.offset-d,d>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=qn;break}d>e.wnext?(d-=e.wnext,m=e.wsize-d):m=e.wnext-d,d>e.length&&(d=e.length),y=e.window}else y=s,m=i-e.offset,d=e.length;d>l&&(d=l),l-=d,e.length-=d;do s[i++]=y[m++];while(--d);e.length===0&&(e.mode=Xc);break;case q0:if(l===0)break e;s[i++]=e.length,l--,e.mode=Xc;break;case Jd:if(e.wrap){for(;u<32;){if(A===0)break e;A--,c|=r[o++]<<u,u+=8}if(g-=l,n.total_out+=g,e.total+=g,e.wrap&4&&g&&(n.adler=e.check=e.flags?eA(e.check,s,g,i-g):Rp(e.check,s,g,i-g)),g=l,e.wrap&4&&(e.flags?c:G0(c))!==e.check){n.msg="incorrect data check",e.mode=qn;break}c=0,u=0}e.mode=j0;case j0:if(e.wrap&&e.flags){for(;u<32;){if(A===0)break e;A--,c+=r[o++]<<u,u+=8}if(e.wrap&4&&c!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=qn;break}c=0,u=0}e.mode=Y0;case Y0:V=_M;break e;case qn:V=oC;break e;case iC:return AC;case lC:default:return Bo}return n.next_out=i,n.avail_out=l,n.next_in=o,n.avail_in=A,e.hold=c,e.bits=u,(e.wsize||g!==n.avail_out&&e.mode<qn&&(e.mode<Jd||t!==D0))&&hC(n,n.output,n.next_out,g-n.avail_out),h-=n.avail_in,g-=n.avail_out,n.total_in+=h,n.total_out+=g,e.total+=g,e.wrap&4&&g&&(n.adler=e.check=e.flags?eA(e.check,s,g,n.next_out-g):Rp(e.check,s,g,n.next_out-g)),n.data_type=e.bits+(e.last?64:0)+(e.mode===wA?128:0)+(e.mode===zc||e.mode===Xd?256:0),(h===0&&g===0||t===D0)&&V===Fi&&(V=OM),V},YM=n=>{if(Ui(n))return Bo;let t=n.state;return t.window&&(t.window=null),n.state=null,Fi},GM=(n,t)=>{if(Ui(n))return Bo;const e=n.state;return(e.wrap&2)===0?Bo:(e.head=t,t.done=!1,Fi)},zM=(n,t)=>{const e=t.length;let r,s,o;return Ui(n)||(r=n.state,r.wrap!==0&&r.mode!==ju)?Bo:r.mode===ju&&(s=1,s=Rp(s,t,e,0),s!==r.check)?oC:(o=hC(n,t,e,e),o?(r.mode=iC,AC):(r.havedict=1,Fi))};var XM=uC,JM=dC,ZM=cC,eQ=$M,tQ=fC,rQ=jM,nQ=YM,aQ=GM,sQ=zM,oQ="pako inflate (from Nodeca project)",kA={inflateReset:XM,inflateReset2:JM,inflateResetKeep:ZM,inflateInit:eQ,inflateInit2:tQ,inflate:rQ,inflateEnd:nQ,inflateGetHeader:aQ,inflateSetDictionary:sQ,inflateInfo:oQ};function AQ(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var iQ=AQ;const gC=Object.prototype.toString,{Z_NO_FLUSH:lQ,Z_FINISH:cQ,Z_OK:ic,Z_STREAM_END:tf,Z_NEED_DICT:rf,Z_STREAM_ERROR:uQ,Z_DATA_ERROR:X0,Z_MEM_ERROR:dQ}=tC;function dc(n){this.options=rC.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new TM,this.strm.avail_out=0;let e=kA.inflateInit2(this.strm,t.windowBits);if(e!==ic)throw new Error(Op[e]);if(this.header=new iQ,kA.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Hp.string2buf(t.dictionary):gC.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=kA.inflateSetDictionary(this.strm,t.dictionary),e!==ic)))throw new Error(Op[e])}dc.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,s=this.options.dictionary;let o,i,A;if(this.ended)return!1;for(t===~~t?i=t:i=t===!0?cQ:lQ,gC.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),o=kA.inflate(e,i),o===rf&&s&&(o=kA.inflateSetDictionary(e,s),o===ic?o=kA.inflate(e,i):o===X0&&(o=rf));e.avail_in>0&&o===tf&&e.state.wrap>0&&n[e.next_in]!==0;)kA.inflateReset(e),o=kA.inflate(e,i);switch(o){case uQ:case X0:case rf:case dQ:return this.onEnd(o),this.ended=!0,!1}if(A=e.avail_out,e.next_out&&(e.avail_out===0||o===tf))if(this.options.to==="string"){let l=Hp.utf8border(e.output,e.next_out),c=e.next_out-l,u=Hp.buf2string(e.output,l);e.next_out=c,e.avail_out=r-c,c&&e.output.set(e.output.subarray(l,l+c),0),this.onData(u)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(o===ic&&A===0)){if(o===tf)return o=kA.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};dc.prototype.onData=function(n){this.chunks.push(n)};dc.prototype.onEnd=function(n){n===ic&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=rC.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function fQ(n,t){const e=new dc(t);if(e.push(n),e.err)throw e.msg||Op[e.err];return e.result}var hQ=dc,gQ=fQ,pQ={Inflate:hQ,inflate:gQ};const{Inflate:vQ,inflate:mQ}=pQ;var J0=vQ,wQ=mQ;const pC=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t=t>>>1;pC[n]=t}const Z0=4294967295;function yQ(n,t,e){let r=n;for(let s=0;s<e;s++)r=pC[(r^t[s])&255]^r>>>8;return r}function BQ(n,t){return(yQ(Z0,n,t)^Z0)>>>0}function e1(n,t,e){const r=n.readUint32(),s=BQ(new Uint8Array(n.buffer,n.byteOffset+n.offset-t-4,t),t);if(s!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${s}`)}function vC(n,t,e){for(let r=0;r<e;r++)t[r]=n[r]}function mC(n,t,e,r){let s=0;for(;s<r;s++)t[s]=n[s];for(;s<e;s++)t[s]=n[s]+t[s-r]&255}function wC(n,t,e,r){let s=0;if(e.length===0)for(;s<r;s++)t[s]=n[s];else for(;s<r;s++)t[s]=n[s]+e[s]&255}function yC(n,t,e,r,s){let o=0;if(e.length===0){for(;o<s;o++)t[o]=n[o];for(;o<r;o++)t[o]=n[o]+(t[o-s]>>1)&255}else{for(;o<s;o++)t[o]=n[o]+(e[o]>>1)&255;for(;o<r;o++)t[o]=n[o]+(t[o-s]+e[o]>>1)&255}}function BC(n,t,e,r,s){let o=0;if(e.length===0){for(;o<s;o++)t[o]=n[o];for(;o<r;o++)t[o]=n[o]+t[o-s]&255}else{for(;o<s;o++)t[o]=n[o]+e[o]&255;for(;o<r;o++)t[o]=n[o]+bQ(t[o-s],e[o],e[o-s])&255}}function bQ(n,t,e){const r=n+t-e,s=Math.abs(r-n),o=Math.abs(r-t),i=Math.abs(r-e);return s<=o&&s<=i?n:o<=i?t:e}function CQ(n,t,e,r,s,o){switch(n){case 0:vC(t,e,s);break;case 1:mC(t,e,s,o);break;case 2:wC(t,e,r,s);break;case 3:yC(t,e,r,s,o);break;case 4:BC(t,e,r,s,o);break;default:throw new Error(`Unsupported filter: ${n}`)}}const kQ=new Uint16Array([255]),EQ=new Uint8Array(kQ.buffer),DQ=EQ[0]===255;function TQ(n){const{data:t,width:e,height:r,channels:s,depth:o}=n,i=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],A=Math.ceil(o/8)*s,l=new Uint8Array(r*e*A);let c=0;for(let u=0;u<7;u++){const h=i[u],g=Math.ceil((e-h.x)/h.xStep),d=Math.ceil((r-h.y)/h.yStep);if(g<=0||d<=0)continue;const m=g*A,y=new Uint8Array(m);for(let B=0;B<d;B++){const w=t[c++],E=t.subarray(c,c+m);c+=m;const x=new Uint8Array(m);CQ(w,E,x,y,m,A),y.set(x);for(let b=0;b<g;b++){const H=h.x+b*h.xStep,$=h.y+B*h.yStep;if(!(H>=e||$>=r))for(let Y=0;Y<A;Y++)l[($*e+H)*A+Y]=x[b*A+Y]}}}if(o===16){const u=new Uint16Array(l.buffer);if(DQ)for(let h=0;h<u.length;h++)u[h]=xQ(u[h]);return u}else return l}function xQ(n){return(n&255)<<8|n>>8&255}const SQ=new Uint16Array([255]),FQ=new Uint8Array(SQ.buffer),LQ=FQ[0]===255,UQ=new Uint8Array(0);function t1(n){const{data:t,width:e,height:r,channels:s,depth:o}=n,i=Math.ceil(o/8)*s,A=Math.ceil(o/8*s*e),l=new Uint8Array(r*A);let c=UQ,u=0,h,g;for(let d=0;d<r;d++){switch(h=t.subarray(u+1,u+1+A),g=l.subarray(d*A,(d+1)*A),t[u]){case 0:vC(h,g,A);break;case 1:mC(h,g,A,i);break;case 2:wC(h,g,c,A);break;case 3:yC(h,g,c,A,i);break;case 4:BC(h,g,c,A,i);break;default:throw new Error(`Unsupported filter: ${t[u]}`)}c=g,u+=A+1}if(o===16){const d=new Uint16Array(l.buffer);if(LQ)for(let m=0;m<d.length;m++)d[m]=IQ(d[m]);return d}else return l}function IQ(n){return(n&255)<<8|n>>8&255}const Uu=Uint8Array.of(137,80,78,71,13,10,26,10);function r1(n){if(!MQ(n.readBytes(Uu.length)))throw new Error("wrong PNG signature")}function MQ(n){if(n.length<Uu.length)return!1;for(let t=0;t<Uu.length;t++)if(n[t]!==Uu[t])return!1;return!0}const QQ="tEXt",NQ=0,bC=new TextDecoder("latin1");function _Q(n){if(OQ(n),n.length===0||n.length>79)throw new Error("keyword length must be between 1 and 79")}const RQ=/^[\u0000-\u00FF]*$/;function OQ(n){if(!RQ.test(n))throw new Error("invalid latin1 text")}function HQ(n,t,e){const r=CC(t);n[r]=PQ(t,e-r.length-1)}function CC(n){for(n.mark();n.readByte()!==NQ;);const t=n.offset;n.reset();const e=bC.decode(n.readBytes(t-n.offset-1));return n.skip(1),_Q(e),e}function PQ(n,t){return bC.decode(n.readBytes(t))}const Ao={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},nf={UNKNOWN:-1,DEFLATE:0},n1={UNKNOWN:-1,ADAPTIVE:0},af={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Jc={NONE:0,BACKGROUND:1,PREVIOUS:2},sf={SOURCE:0,OVER:1};class VQ extends Wv{constructor(e,r={}){super(e);$r(this,"_checkCrc");$r(this,"_inflator");$r(this,"_png");$r(this,"_apng");$r(this,"_end");$r(this,"_hasPalette");$r(this,"_palette");$r(this,"_hasTransparency");$r(this,"_transparency");$r(this,"_compressionMethod");$r(this,"_filterMethod");$r(this,"_interlaceMethod");$r(this,"_colorType");$r(this,"_isAnimated");$r(this,"_numberOfFrames");$r(this,"_numberOfPlays");$r(this,"_frames");$r(this,"_writingDataChunks");const{checkCrc:s=!1}=r;this._checkCrc=s,this._inflator=new J0,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=nf.UNKNOWN,this._filterMethod=n1.UNKNOWN,this._interlaceMethod=af.UNKNOWN,this._colorType=Ao.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(r1(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeChunk(e,r)}return this.decodeImage(),this._png}decodeApng(){for(r1(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(e,r)}return this.decodeApngImage(),this._apng}decodeChunk(e,r){const s=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case QQ:HQ(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-s!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?e1(this,e+4,r):this.skip(4)}decodeApngChunk(e,r){const s=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,r),this.offset=s+e;break}if(this.offset-s!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?e1(this,e+4,r):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=WQ(this.readUint8());const r=this.readUint8();this._colorType=r;let s;switch(r){case Ao.GREYSCALE:s=1;break;case Ao.TRUECOLOUR:s=3;break;case Ao.INDEXED_COLOUR:s=1;break;case Ao.GREYSCALE_ALPHA:s=2;break;case Ao.TRUECOLOUR_ALPHA:s=4;break;case Ao.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=s,this._compressionMethod=this.readUint8(),this._compressionMethod!==nf.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const r=e/3;this._hasPalette=!0;const s=[];this._palette=s;for(let o=0;o<r;o++)s.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const r=e,s=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,s,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let r=e,s=this.offset+this.byteOffset;if(s+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,s,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case Ao.GREYSCALE:case Ao.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let r=0;r<e/2;r++)this._transparency[r]=this.readUint16();break}case Ao.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let r=0;for(;r<e;r++){const s=this.readByte();this._palette[r].push(s)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case Ao.UNKNOWN:case Ao.GREYSCALE_ALPHA:case Ao.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const r=CC(this),s=this.readUint8();if(s!==nf.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${s}`);const o=this.readBytes(e-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:wQ(o)}}decodepHYs(){const e=this.readUint32(),r=this.readUint32(),s=this.readByte();this._png.resolution={x:e,y:r,unit:s}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const r={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},s=this._frames.at(e);if(s){if(s.data=t1({data:s.data,width:s.width,height:s.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||s.xOffset===0&&s.yOffset===0&&s.width===this._png.width&&s.height===this._png.height)r.data=s.data;else{const o=this._apng.frames.at(e-1);this.disposeFrame(s,o,r),this.addFrameDataToCanvas(r,s)}this._apng.frames.push(r)}}return this._apng}disposeFrame(e,r,s){switch(e.disposeOp){case Jc.NONE:break;case Jc.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let i=0;i<this._png.width;i++){const A=(o*e.width+i)*this._png.channels;for(let l=0;l<this._png.channels;l++)s.data[A+l]=0}break;case Jc.PREVIOUS:s.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,r){const s=1<<this._png.depth,o=(i,A)=>{const l=((i+r.yOffset)*this._png.width+r.xOffset+A)*this._png.channels,c=(i*r.width+A)*this._png.channels;return{index:l,frameIndex:c}};switch(r.blendOp){case sf.SOURCE:for(let i=0;i<r.height;i++)for(let A=0;A<r.width;A++){const{index:l,frameIndex:c}=o(i,A);for(let u=0;u<this._png.channels;u++)e.data[l+u]=r.data[c+u]}break;case sf.OVER:for(let i=0;i<r.height;i++)for(let A=0;A<r.width;A++){const{index:l,frameIndex:c}=o(i,A);for(let u=0;u<this._png.channels;u++){const h=r.data[c+this._png.channels-1]/s,g=u%(this._png.channels-1)===0?1:r.data[c+u],d=Math.floor(h*g+(1-h)*e.data[l+u]);e.data[l+u]+=d}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==n1.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===af.NO_INTERLACE)this._png.data=t1({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===af.ADAM7)this._png.data=TQ({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,r=this._frames.at(-1);r?r.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Jc.NONE,blendOp:sf.SOURCE,data:e}),this._inflator=new J0,this._writingDataChunks=!1}}function WQ(n){if(n!==1&&n!==2&&n!==4&&n!==8&&n!==16)throw new Error(`invalid bit depth: ${n}`);return n}var a1;(function(n){n[n.UNKNOWN=0]="UNKNOWN",n[n.METRE=1]="METRE"})(a1||(a1={}));function KQ(n,t){return new VQ(n,t).decode()}/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 4.2.1 Built on 2026-03-17T11:11:27.057Z
* CommitID 00000000
*
* Copyright (c) 2010-2025 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
* 2015-2025 yWorks GmbH, http://www.yworks.com
* 2015-2025 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
* 2010 Aaron Spike, https://github.com/acspike
* 2012 Willow Systems Corporation, https://github.com/willowsystems
* 2012 Pablo Hess, https://github.com/pablohess
* 2012 Florian Jenett, https://github.com/fjenett
* 2013 Warren Weckesser, https://github.com/warrenweckesser
* 2013 Youssef Beddad, https://github.com/lifof
* 2013 Lee Driscoll, https://github.com/lsdriscoll
* 2013 Stefan Slonevskiy, https://github.com/stefslon
* 2013 Jeremy Morel, https://github.com/jmorel
* 2013 Christoph Hartmann, https://github.com/chris-rock
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
* 2014 James Makes, https://github.com/dollaruw
* 2014 Diego Casorran, https://github.com/diegocr
* 2014 Steven Spungin, https://github.com/Flamenco
* 2014 Kenneth Glassey, https://github.com/Gavvers
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Contributor(s):
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
* kim3er, mfo, alnorth, Flamenco
*/var kr=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function of(){kr.console&&typeof kr.console.log=="function"&&kr.console.log.apply(kr.console,arguments)}var Ln={log:of,warn:function(n){kr.console&&(typeof kr.console.warn=="function"?kr.console.warn.apply(kr.console,arguments):of.call(null,arguments))},error:function(n){kr.console&&(typeof kr.console.error=="function"?kr.console.error.apply(kr.console,arguments):of(n))}};function Af(n,t,e){var r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){mi(r.response,t,e)},r.onerror=function(){Ln.error("could not download file")},r.send()}function s1(n){var t=new XMLHttpRequest;t.open("HEAD",n,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Zc(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(t)}}var mi=kr.saveAs||((typeof window>"u"?"undefined":hn(window))!=="object"||window!==kr?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,t,e){var r=kr.URL||kr.webkitURL,s=document.createElement("a");t=t||n.name||"download",s.download=t,s.rel="noopener",typeof n=="string"?(s.href=n,s.origin!==location.origin?s1(s.href)?Af(n,t,e):Zc(s,s.target="_blank"):Zc(s)):(s.href=r.createObjectURL(n),setTimeout(function(){r.revokeObjectURL(s.href)},4e4),setTimeout(function(){Zc(s)},0))}:"msSaveOrOpenBlob"in navigator?function(n,t,e){if(t=t||n.name||"download",typeof n=="string")if(s1(n))Af(n,t,e);else{var r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){Zc(r)})}else navigator.msSaveOrOpenBlob((function(s,o){return o===void 0?o={autoBom:!1}:hn(o)!=="object"&&(Ln.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s})(n,e),t)}:function(n,t,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return Af(n,t,e);var s=n.type==="application/octet-stream",o=/constructor/i.test(kr.HTMLElement)||kr.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&o)&&(typeof FileReader>"u"?"undefined":hn(FileReader))==="object"){var A=new FileReader;A.onloadend=function(){var u=A.result;u=i?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=u:location=u,r=null},A.readAsDataURL(n)}else{var l=kr.URL||kr.webkitURL,c=l.createObjectURL(n);r?r.location=c:location.href=c,r=null,setTimeout(function(){l.revokeObjectURL(c)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function kC(n){var t;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(A){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(A){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}}],r=0;r<e.length;r++){var s=e[r].re,o=e[r].process,i=s.exec(n);i&&(t=o(i),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var A=this.r.toString(16),l=this.g.toString(16),c=this.b.toString(16);return A.length==1&&(A="0"+A),l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),"#"+A+l+c}}var Iu=kr.atob.bind(kr),o1=kr.btoa.bind(kr);/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function lf(n,t){var e=n[0],r=n[1],s=n[2],o=n[3];e=Bs(e,r,s,o,t[0],7,-680876936),o=Bs(o,e,r,s,t[1],12,-389564586),s=Bs(s,o,e,r,t[2],17,606105819),r=Bs(r,s,o,e,t[3],22,-1044525330),e=Bs(e,r,s,o,t[4],7,-176418897),o=Bs(o,e,r,s,t[5],12,1200080426),s=Bs(s,o,e,r,t[6],17,-1473231341),r=Bs(r,s,o,e,t[7],22,-45705983),e=Bs(e,r,s,o,t[8],7,1770035416),o=Bs(o,e,r,s,t[9],12,-1958414417),s=Bs(s,o,e,r,t[10],17,-42063),r=Bs(r,s,o,e,t[11],22,-1990404162),e=Bs(e,r,s,o,t[12],7,1804603682),o=Bs(o,e,r,s,t[13],12,-40341101),s=Bs(s,o,e,r,t[14],17,-1502002290),e=bs(e,r=Bs(r,s,o,e,t[15],22,1236535329),s,o,t[1],5,-165796510),o=bs(o,e,r,s,t[6],9,-1069501632),s=bs(s,o,e,r,t[11],14,643717713),r=bs(r,s,o,e,t[0],20,-373897302),e=bs(e,r,s,o,t[5],5,-701558691),o=bs(o,e,r,s,t[10],9,38016083),s=bs(s,o,e,r,t[15],14,-660478335),r=bs(r,s,o,e,t[4],20,-405537848),e=bs(e,r,s,o,t[9],5,568446438),o=bs(o,e,r,s,t[14],9,-1019803690),s=bs(s,o,e,r,t[3],14,-187363961),r=bs(r,s,o,e,t[8],20,1163531501),e=bs(e,r,s,o,t[13],5,-1444681467),o=bs(o,e,r,s,t[2],9,-51403784),s=bs(s,o,e,r,t[7],14,1735328473),e=Cs(e,r=bs(r,s,o,e,t[12],20,-1926607734),s,o,t[5],4,-378558),o=Cs(o,e,r,s,t[8],11,-2022574463),s=Cs(s,o,e,r,t[11],16,1839030562),r=Cs(r,s,o,e,t[14],23,-35309556),e=Cs(e,r,s,o,t[1],4,-1530992060),o=Cs(o,e,r,s,t[4],11,1272893353),s=Cs(s,o,e,r,t[7],16,-155497632),r=Cs(r,s,o,e,t[10],23,-1094730640),e=Cs(e,r,s,o,t[13],4,681279174),o=Cs(o,e,r,s,t[0],11,-358537222),s=Cs(s,o,e,r,t[3],16,-722521979),r=Cs(r,s,o,e,t[6],23,76029189),e=Cs(e,r,s,o,t[9],4,-640364487),o=Cs(o,e,r,s,t[12],11,-421815835),s=Cs(s,o,e,r,t[15],16,530742520),e=ks(e,r=Cs(r,s,o,e,t[2],23,-995338651),s,o,t[0],6,-198630844),o=ks(o,e,r,s,t[7],10,1126891415),s=ks(s,o,e,r,t[14],15,-1416354905),r=ks(r,s,o,e,t[5],21,-57434055),e=ks(e,r,s,o,t[12],6,1700485571),o=ks(o,e,r,s,t[3],10,-1894986606),s=ks(s,o,e,r,t[10],15,-1051523),r=ks(r,s,o,e,t[1],21,-2054922799),e=ks(e,r,s,o,t[8],6,1873313359),o=ks(o,e,r,s,t[15],10,-30611744),s=ks(s,o,e,r,t[6],15,-1560198380),r=ks(r,s,o,e,t[13],21,1309151649),e=ks(e,r,s,o,t[4],6,-145523070),o=ks(o,e,r,s,t[11],10,-1120210379),s=ks(s,o,e,r,t[2],15,718787259),r=ks(r,s,o,e,t[9],21,-343485551),n[0]=XA(e,n[0]),n[1]=XA(r,n[1]),n[2]=XA(s,n[2]),n[3]=XA(o,n[3])}function id(n,t,e,r,s,o){return t=XA(XA(t,n),XA(r,o)),XA(t<<s|t>>>32-s,e)}function Bs(n,t,e,r,s,o,i){return id(t&e|~t&r,n,t,s,o,i)}function bs(n,t,e,r,s,o,i){return id(t&r|e&~r,n,t,s,o,i)}function Cs(n,t,e,r,s,o,i){return id(t^e^r,n,t,s,o,i)}function ks(n,t,e,r,s,o,i){return id(e^(t|~r),n,t,s,o,i)}function EC(n){var t,e=n.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=n.length;t+=64)lf(r,$Q(n.substring(t-64,t)));n=n.substring(t-64);var s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<n.length;t++)s[t>>2]|=n.charCodeAt(t)<<(t%4<<3);if(s[t>>2]|=128<<(t%4<<3),t>55)for(lf(r,s),t=0;t<16;t++)s[t]=0;return s[14]=8*e,lf(r,s),r}function $Q(n){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=n.charCodeAt(t)+(n.charCodeAt(t+1)<<8)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+3)<<24);return e}var A1="0123456789abcdef".split("");function qQ(n){for(var t="",e=0;e<4;e++)t+=A1[n>>8*e+4&15]+A1[n>>8*e&15];return t}function jQ(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function Pp(n){return EC(n).map(jQ).join("")}var YQ=(function(n){for(var t=0;t<n.length;t++)n[t]=qQ(n[t]);return n.join("")})(EC("hello"))!="5d41402abc4b2a76b9719d911017c592";function XA(n,t){if(YQ){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}return n+t&4294967295}/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function Vp(n,t){var e,r,s,o;if(n!==e){for(var i=(s=n,o=1+(256/n.length|0),new Array(o+1).join(s)),A=[],l=0;l<256;l++)A[l]=l;var c=0;for(l=0;l<256;l++){var u=A[l];c=(c+u+i.charCodeAt(l))%256,A[l]=A[c],A[c]=u}e=n,r=A}else A=r;var h=t.length,g=0,d=0,m="";for(l=0;l<h;l++)d=(d+(u=A[g=(g+1)%256]))%256,A[g]=A[d],A[d]=u,i=A[(A[g]+A[d])%256],m+=String.fromCharCode(t.charCodeAt(l)^i);return m}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var i1={print:4,modify:8,copy:16,"annot-forms":32};function el(n,t,e,r){this.v=1,this.r=2;var s=192;n.forEach(function(A){if(i1.perm!==void 0)throw new Error("Invalid permission: "+A);s+=i1[A]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var o=(t+this.padding).substr(0,32),i=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,i),this.P=-(1+(255^s)),this.encryptionKey=Pp(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=Vp(this.encryptionKey,this.padding)}function tl(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var t="",e=n.length,r=0;r<e;r++){var s=n.charCodeAt(r);t+=s<33||s===35||s===37||s===40||s===41||s===47||s===60||s===62||s===91||s===93||s===123||s===125||s>126?"#"+("0"+s.toString(16)).slice(-2):n[r]}return t}function l1(n){if(hn(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,s){if(s=s||!1,typeof e!="string"||typeof r!="function"||typeof s!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var o=Math.random().toString(35);return t[e][o]=[r,!!s],o},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),s=[];for(var o in t[e]){var i=t[e][o];try{i[0].apply(n,r)}catch(A){kr.console&&Ln.error("jsPDF PubSub Error",A.message,A)}i[1]&&s.push(o)}s.length&&s.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function Yu(n){if(!(this instanceof Yu))return new Yu(n);var t="opacity,stroke-opacity".split(",");for(var e in n)n.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=n[e]);this.id="",this.objectNumber=-1}function DC(n,t){this.gState=n,this.matrix=t,this.id="",this.objectNumber=-1}function yi(n,t,e,r,s){if(!(this instanceof yi))return new yi(n,t,e,r,s);this.type=n==="axial"?2:3,this.coords=t,this.colors=e,DC.call(this,r,s)}function ol(n,t,e,r,s){if(!(this instanceof ol))return new ol(n,t,e,r,s);this.boundingBox=n,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,DC.call(this,r,s)}function dr(n){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],s=arguments[2],o=arguments[3],i=[],A=1,l=16,c="S",u=null;hn(n=n||{})==="object"&&(e=n.orientation,r=n.unit||r,s=n.format||s,o=n.compress||n.compressPdf||o,(u=n.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),A=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(t=n.precision),n.floatPrecision!==void 0&&(l=n.floatPrecision),c=n.defaultPathOperation||"S"),i=n.filters||(o===!0?["FlateEncode"]:i),r=r||"mm",e=(""+(e||"P")).toLowerCase();var h=n.putOnlyUsedFonts||!1,g={},d={internal:{},__private__:{}};d.__private__.PubSub=l1;var m="1.3",y=d.__private__.getPdfVersion=function(){return m};d.__private__.setPdfVersion=function(v){m=v};var B={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]};d.__private__.getPageFormats=function(){return B};var w=d.__private__.getPageFormat=function(v){return B[v]};s=s||"a4";var E="compat",x="advanced",b=E;function H(){this.saveGraphicsState(),te(new Rt(ct,0,0,-ct,0,Ge()*ct).toString()+" cm"),this.setFontSize(this.getFontSize()/ct),c="n",b=x}function $(){this.restoreGraphicsState(),c="S",b=E}var Y=d.__private__.combineFontStyleAndFontWeight=function(v,I){if(v=="bold"&&I=="normal"||v=="bold"&&I==400||v=="normal"&&I=="italic"||v=="bold"&&I=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return I&&(v=I==400||I==="normal"?v==="italic"?"italic":"normal":I!=700&&I!=="bold"||v!=="normal"?(I==700?"bold":I)+""+v:"bold"),v};d.advancedAPI=function(v){var I=b===E;return I&&H.call(this),typeof v!="function"||(v(this),I&&$.call(this)),this},d.compatAPI=function(v){var I=b===x;return I&&$.call(this),typeof v!="function"||(v(this),I&&H.call(this)),this},d.isAdvancedAPI=function(){return b===x};var V,L=function(v){if(b!==x)throw new Error(v+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},j=d.roundToPrecision=d.__private__.roundToPrecision=function(v,I){var q=t||I;if(isNaN(v)||isNaN(q))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return v.toFixed(q).replace(/0+$/,"")};V=d.hpf=d.__private__.hpf=typeof l=="number"?function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.hpf");return j(v,l)}:l==="smart"?function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.hpf");return j(v,v>-1&&v<1?16:5)}:function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.hpf");return j(v,16)};var D=d.f2=d.__private__.f2=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.f2");return j(v,2)},S=d.__private__.f3=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.f3");return j(v,3)},Q=d.scale=d.__private__.scale=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.scale");return b===E?v*ct:b===x?v:void 0},T=function(v){return Q((function(I){return b===E?Ge()-I:b===x?I:void 0})(v))};d.__private__.setPrecision=d.setPrecision=function(v){typeof parseInt(v,10)=="number"&&(t=parseInt(v,10))};var oe,X="00000000000000000000000000000000",F=d.__private__.getFileId=function(){return X},M=d.__private__.setFileId=function(v){return X=v!==void 0&&/^[a-fA-F0-9]{32}$/.test(v)?v.toUpperCase():X.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(Mn=new el(u.userPermissions,u.userPassword,u.ownerPassword,X)),X};d.setFileId=function(v){return M(v),this},d.getFileId=function(){return F()};var R=d.__private__.convertDateToPDFDate=function(v){var I=v.getTimezoneOffset(),q=I<0?"+":"-",re=Math.floor(Math.abs(I/60)),he=Math.abs(I%60),Me=[q,N(re),"'",N(he),"'"].join("");return["D:",v.getFullYear(),N(v.getMonth()+1),N(v.getDate()),N(v.getHours()),N(v.getMinutes()),N(v.getSeconds()),Me].join("")},ae=d.__private__.convertPDFDateToDate=function(v){var I=parseInt(v.substr(2,4),10),q=parseInt(v.substr(6,2),10)-1,re=parseInt(v.substr(8,2),10),he=parseInt(v.substr(10,2),10),Me=parseInt(v.substr(12,2),10),Qe=parseInt(v.substr(14,2),10);return new Date(I,q,re,he,Me,Qe,0)},J=d.__private__.setCreationDate=function(v){var I;if(v===void 0&&(v=new Date),v instanceof Date)I=R(v);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(v))throw new Error("Invalid argument passed to jsPDF.setCreationDate");I=v}return oe=I},k=d.__private__.getCreationDate=function(v){var I=oe;return v==="jsDate"&&(I=ae(oe)),I};d.setCreationDate=function(v){return J(v),this},d.getCreationDate=function(v){return k(v)};var O,N=d.__private__.padd2=function(v){return("0"+parseInt(v)).slice(-2)},Z=d.__private__.padd2Hex=function(v){return("00"+(v=v.toString())).substr(v.length)},se=0,ge=[],fe=[],Ae=0,Fe=[],be=[],Ke=!1,Xe=fe;d.__private__.setCustomOutputDestination=function(v){Ke=!0,Xe=v};var xe=function(v){Ke||(Xe=v)};d.__private__.resetCustomOutputDestination=function(){Ke=!1,Xe=fe};var te=d.__private__.out=function(v){return v=v.toString(),Ae+=v.length+1,Xe.push(v),Xe},lt=d.__private__.write=function(v){return te(arguments.length===1?v.toString():Array.prototype.join.call(arguments," "))},Pe=d.__private__.getArrayBuffer=function(v){for(var I=v.length,q=new ArrayBuffer(I),re=new Uint8Array(q);I--;)re[I]=v.charCodeAt(I);return q},rt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return rt};var Te=n.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(v){return Te=b===x?v/ct:v,this};var Et,ot=d.__private__.getFontSize=d.getFontSize=function(){return b===E?Te:Te*ct},yt=n.R2L||!1;d.__private__.setR2L=d.setR2L=function(v){return yt=v,this},d.__private__.getR2L=d.getR2L=function(){return yt};var pt,Oe=d.__private__.setZoomMode=function(v){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(v))Et=v;else if(isNaN(v)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(v)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+v+'" is not recognized.');Et=v}else Et=parseInt(v,10)};d.__private__.getZoomMode=function(){return Et};var it,W=d.__private__.setPageMode=function(v){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(v)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+v+'" is not recognized.');pt=v};d.__private__.getPageMode=function(){return pt};var z=d.__private__.setLayoutMode=function(v){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(v)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+v+'" is not recognized.');it=v};d.__private__.getLayoutMode=function(){return it},d.__private__.setDisplayMode=d.setDisplayMode=function(v,I,q){return Oe(v),z(I),W(q),this};var ye={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(v){if(Object.keys(ye).indexOf(v)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ye[v]},d.__private__.getDocumentProperties=function(){return ye},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(v){for(var I in ye)ye.hasOwnProperty(I)&&v[I]&&(ye[I]=v[I]);return this},d.__private__.setDocumentProperty=function(v,I){if(Object.keys(ye).indexOf(v)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ye[v]=I};var qe,ct,$e,Ve,Mt,tt={},_t={},rr=[],St={},hr={},Vt={},Xt={},mr=null,Kt=0,jt=[],We=new l1(d),ze=n.hotfixes||[],ft={},Lt={},ar=[],Rt=function v(I,q,re,he,Me,Qe){if(!(this instanceof v))return new v(I,q,re,he,Me,Qe);isNaN(I)&&(I=1),isNaN(q)&&(q=0),isNaN(re)&&(re=0),isNaN(he)&&(he=1),isNaN(Me)&&(Me=0),isNaN(Qe)&&(Qe=0),this._matrix=[I,q,re,he,Me,Qe]};Object.defineProperty(Rt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(v){this._matrix[0]=v}}),Object.defineProperty(Rt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(v){this._matrix[1]=v}}),Object.defineProperty(Rt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(v){this._matrix[2]=v}}),Object.defineProperty(Rt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(v){this._matrix[3]=v}}),Object.defineProperty(Rt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(v){this._matrix[4]=v}}),Object.defineProperty(Rt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(v){this._matrix[5]=v}}),Object.defineProperty(Rt.prototype,"a",{get:function(){return this._matrix[0]},set:function(v){this._matrix[0]=v}}),Object.defineProperty(Rt.prototype,"b",{get:function(){return this._matrix[1]},set:function(v){this._matrix[1]=v}}),Object.defineProperty(Rt.prototype,"c",{get:function(){return this._matrix[2]},set:function(v){this._matrix[2]=v}}),Object.defineProperty(Rt.prototype,"d",{get:function(){return this._matrix[3]},set:function(v){this._matrix[3]=v}}),Object.defineProperty(Rt.prototype,"e",{get:function(){return this._matrix[4]},set:function(v){this._matrix[4]=v}}),Object.defineProperty(Rt.prototype,"f",{get:function(){return this._matrix[5]},set:function(v){this._matrix[5]=v}}),Object.defineProperty(Rt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Rt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Rt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Rt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Rt.prototype.join=function(v){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(V).join(v)},Rt.prototype.multiply=function(v){var I=v.sx*this.sx+v.shy*this.shx,q=v.sx*this.shy+v.shy*this.sy,re=v.shx*this.sx+v.sy*this.shx,he=v.shx*this.shy+v.sy*this.sy,Me=v.tx*this.sx+v.ty*this.shx+this.tx,Qe=v.tx*this.shy+v.ty*this.sy+this.ty;return new Rt(I,q,re,he,Me,Qe)},Rt.prototype.decompose=function(){var v=this.sx,I=this.shy,q=this.shx,re=this.sy,he=this.tx,Me=this.ty,Qe=Math.sqrt(v*v+I*I),ut=(v/=Qe)*q+(I/=Qe)*re;q-=v*ut,re-=I*ut;var Dt=Math.sqrt(q*q+re*re);return ut/=Dt,v*(re/=Dt)<I*(q/=Dt)&&(v=-v,I=-I,ut=-ut,Qe=-Qe),{scale:new Rt(Qe,0,0,Dt,0,0),translate:new Rt(1,0,0,1,he,Me),rotate:new Rt(v,I,-I,v,0,0),skew:new Rt(1,0,ut,1,0,0)}},Rt.prototype.toString=function(v){return this.join(" ")},Rt.prototype.inversed=function(){var v=this.sx,I=this.shy,q=this.shx,re=this.sy,he=this.tx,Me=this.ty,Qe=1/(v*re-I*q),ut=re*Qe,Dt=-I*Qe,xt=-q*Qe,Zt=v*Qe;return new Rt(ut,Dt,xt,Zt,-ut*he-xt*Me,-Dt*he-Zt*Me)},Rt.prototype.applyToPoint=function(v){var I=v.x*this.sx+v.y*this.shx+this.tx,q=v.x*this.shy+v.y*this.sy+this.ty;return new Dr(I,q)},Rt.prototype.applyToRectangle=function(v){var I=this.applyToPoint(v),q=this.applyToPoint(new Dr(v.x+v.w,v.y+v.h));return new Sr(I.x,I.y,q.x-I.x,q.y-I.y)},Rt.prototype.clone=function(){var v=this.sx,I=this.shy,q=this.shx,re=this.sy,he=this.tx,Me=this.ty;return new Rt(v,I,q,re,he,Me)},d.Matrix=Rt;var cr=d.matrixMult=function(v,I){return I.multiply(v)},qr=new Rt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=qr;var Kr=function(v,I){if(!hr[v]){var q=(I instanceof yi?"Sh":"P")+(Object.keys(St).length+1).toString(10);I.id=q,hr[v]=q,St[q]=I,We.publish("addPattern",I)}};d.ShadingPattern=yi,d.TilingPattern=ol,d.addShadingPattern=function(v,I){return L("addShadingPattern()"),Kr(v,I),this},d.beginTilingPattern=function(v){L("beginTilingPattern()"),pr(v.boundingBox[0],v.boundingBox[1],v.boundingBox[2]-v.boundingBox[0],v.boundingBox[3]-v.boundingBox[1],v.matrix)},d.endTilingPattern=function(v,I){L("endTilingPattern()"),I.stream=be[O].join(`
`),Kr(v,I),We.publish("endTilingPattern",I),ar.pop().restore()};var on,Fr=d.__private__.newObject=function(){var v=Jr();return An(v,!0),v},Jr=d.__private__.newObjectDeferred=function(){return se++,ge[se]=function(){return Ae},se},An=function(v,I){return I=typeof I=="boolean"&&I,ge[v]=Ae,I&&te(v+" 0 obj"),v},ta=d.__private__.newAdditionalObject=function(){var v={objId:Jr(),content:""};return Fe.push(v),v},ra=Jr(),xn=Jr(),Nr=d.__private__.decodeColorString=function(v){var I=v.split(" ");if(I.length!==2||I[1]!=="g"&&I[1]!=="G")I.length!==5||I[4]!=="k"&&I[4]!=="K"||(I=[(1-I[0])*(1-I[3]),(1-I[1])*(1-I[3]),(1-I[2])*(1-I[3]),"r"]);else{var q=parseFloat(I[0]);I=[q,q,q,"r"]}for(var re="#",he=0;he<3;he++)re+=("0"+Math.floor(255*parseFloat(I[he])).toString(16)).slice(-2);return re},dn=d.__private__.encodeColorString=function(v){var I;typeof v=="string"&&(v={ch1:v});var q=v.ch1,re=v.ch2,he=v.ch3,Me=v.ch4,Qe=v.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof q=="string"&&q.charAt(0)!=="#"){var ut=new kC(q);if(ut.ok)q=ut.toHex();else if(!/^\d*\.?\d*$/.test(q))throw new Error('Invalid color "'+q+'" passed to jsPDF.encodeColorString.')}if(typeof q=="string"&&/^#[0-9A-Fa-f]{3}$/.test(q)&&(q="#"+q[1]+q[1]+q[2]+q[2]+q[3]+q[3]),typeof q=="string"&&/^#[0-9A-Fa-f]{6}$/.test(q)){var Dt=parseInt(q.substr(1),16);q=Dt>>16&255,re=Dt>>8&255,he=255&Dt}if(re===void 0||Me===void 0&&q===re&&re===he)I=typeof q=="string"?q+" "+Qe[0]:v.precision===2?D(q/255)+" "+Qe[0]:S(q/255)+" "+Qe[0];else if(Me===void 0||hn(Me)==="object"){if(Me&&!isNaN(Me.a)&&Me.a===0)return["1.","1.","1.",Qe[1]].join(" ");I=typeof q=="string"?[q,re,he,Qe[1]].join(" "):v.precision===2?[D(q/255),D(re/255),D(he/255),Qe[1]].join(" "):[S(q/255),S(re/255),S(he/255),Qe[1]].join(" ")}else I=typeof q=="string"?[q,re,he,Me,Qe[2]].join(" "):v.precision===2?[D(q),D(re),D(he),D(Me),Qe[2]].join(" "):[S(q),S(re),S(he),S(Me),Qe[2]].join(" ");return I},Gn=d.__private__.getFilters=function(){return i},zn=d.__private__.putStream=function(v){var I=(v=v||{}).data||"",q=v.filters||Gn(),re=v.alreadyAppliedFilters||[],he=v.addLength1||!1,Me=I.length,Qe=v.objectId,ut=function(Yr){return Yr};if(u!==null&&Qe===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(ut=Mn.encryptor(Qe,0));var Dt={};q===!0&&(q=["FlateEncode"]);var xt=v.additionalKeyValues||[],Zt=(Dt=dr.API.processDataByFilters!==void 0?dr.API.processDataByFilters(I,q):{data:I,reverseChain:[]}).reverseChain+(Array.isArray(re)?re.join(" "):re.toString());if(Dt.data.length!==0&&(xt.push({key:"Length",value:Dt.data.length}),he===!0&&xt.push({key:"Length1",value:Me})),Zt.length!=0)if(Zt.split("/").length-1==1)xt.push({key:"Filter",value:Zt});else{xt.push({key:"Filter",value:"["+Zt+"]"});for(var er=0;er<xt.length;er+=1)if(xt[er].key==="DecodeParms"){for(var Ur=[],br=0;br<Dt.reverseChain.split("/").length-1;br+=1)Ur.push("null");Ur.push(xt[er].value),xt[er].value="["+Ur.join(" ")+"]"}}te("<<");for(var Tr=0;Tr<xt.length;Tr++)te("/"+xt[Tr].key+" "+xt[Tr].value);te(">>"),Dt.data.length!==0&&(te("stream"),te(ut(Dt.data)),te("endstream"))},ln=d.__private__.putPage=function(v){var I=v.number,q=v.data,re=v.objId,he=v.contentsObjId;An(re,!0),te("<</Type /Page"),te("/Parent "+v.rootDictionaryObjId+" 0 R"),te("/Resources "+v.resourceDictionaryObjId+" 0 R"),te("/MediaBox ["+parseFloat(V(v.mediaBox.bottomLeftX))+" "+parseFloat(V(v.mediaBox.bottomLeftY))+" "+V(v.mediaBox.topRightX)+" "+V(v.mediaBox.topRightY)+"]"),v.cropBox!==null&&te("/CropBox ["+V(v.cropBox.bottomLeftX)+" "+V(v.cropBox.bottomLeftY)+" "+V(v.cropBox.topRightX)+" "+V(v.cropBox.topRightY)+"]"),v.bleedBox!==null&&te("/BleedBox ["+V(v.bleedBox.bottomLeftX)+" "+V(v.bleedBox.bottomLeftY)+" "+V(v.bleedBox.topRightX)+" "+V(v.bleedBox.topRightY)+"]"),v.trimBox!==null&&te("/TrimBox ["+V(v.trimBox.bottomLeftX)+" "+V(v.trimBox.bottomLeftY)+" "+V(v.trimBox.topRightX)+" "+V(v.trimBox.topRightY)+"]"),v.artBox!==null&&te("/ArtBox ["+V(v.artBox.bottomLeftX)+" "+V(v.artBox.bottomLeftY)+" "+V(v.artBox.topRightX)+" "+V(v.artBox.topRightY)+"]"),typeof v.userUnit=="number"&&v.userUnit!==1&&te("/UserUnit "+v.userUnit),We.publish("putPage",{objId:re,pageContext:jt[I],pageNumber:I,page:q}),te("/Contents "+he+" 0 R"),te(">>"),te("endobj");var Me=q.join(`
`);return b===x&&(Me+=`
Q`),An(he,!0),zn({data:Me,filters:Gn(),objectId:he}),te("endobj"),re},En=d.__private__.putPages=function(){var v,I,q=[];for(v=1;v<=Kt;v++)jt[v].objId=Jr(),jt[v].contentsObjId=Jr();for(v=1;v<=Kt;v++)q.push(ln({number:v,data:be[v],objId:jt[v].objId,contentsObjId:jt[v].contentsObjId,mediaBox:jt[v].mediaBox,cropBox:jt[v].cropBox,bleedBox:jt[v].bleedBox,trimBox:jt[v].trimBox,artBox:jt[v].artBox,userUnit:jt[v].userUnit,rootDictionaryObjId:ra,resourceDictionaryObjId:xn}));An(ra,!0),te("<</Type /Pages");var re="/Kids [";for(I=0;I<Kt;I++)re+=q[I]+" 0 R ";te(re+"]"),te("/Count "+Kt),te(">>"),te("endobj"),We.publish("postPutPages")},xa=function(v){We.publish("putFont",{font:v,out:te,newObject:Fr,putStream:zn}),v.isAlreadyPutted!==!0&&(v.objectNumber=Fr(),te("<<"),te("/Type /Font"),te("/BaseFont /"+tl(v.postScriptName)),te("/Subtype /Type1"),typeof v.encoding=="string"&&te("/Encoding /"+v.encoding),te("/FirstChar 32"),te("/LastChar 255"),te(">>"),te("endobj"))},Ra=function(v){v.objectNumber=Fr();var I=[];I.push({key:"Type",value:"/XObject"}),I.push({key:"Subtype",value:"/Form"}),I.push({key:"BBox",value:"["+[V(v.x),V(v.y),V(v.x+v.width),V(v.y+v.height)].join(" ")+"]"}),I.push({key:"Matrix",value:"["+v.matrix.toString()+"]"});var q=v.pages[1].join(`
`);zn({data:q,additionalKeyValues:I,objectId:v.objectNumber}),te("endobj")},na=function(v,I){I||(I=21);var q=Fr(),re=(function(Qe,ut){var Dt,xt=[],Zt=1/(ut-1);for(Dt=0;Dt<1;Dt+=Zt)xt.push(Dt);if(xt.push(1),Qe[0].offset!=0){var er={offset:0,color:Qe[0].color};Qe.unshift(er)}if(Qe[Qe.length-1].offset!=1){var Ur={offset:1,color:Qe[Qe.length-1].color};Qe.push(Ur)}for(var br="",Tr=0,Yr=0;Yr<xt.length;Yr++){for(Dt=xt[Yr];Dt>Qe[Tr+1].offset;)Tr++;var Ar=Qe[Tr].offset,xr=(Dt-Ar)/(Qe[Tr+1].offset-Ar),Zr=Qe[Tr].color,La=Qe[Tr+1].color;br+=Z(Math.round((1-xr)*Zr[0]+xr*La[0]).toString(16))+Z(Math.round((1-xr)*Zr[1]+xr*La[1]).toString(16))+Z(Math.round((1-xr)*Zr[2]+xr*La[2]).toString(16))}return br.trim()})(v.colors,I),he=[];he.push({key:"FunctionType",value:"0"}),he.push({key:"Domain",value:"[0.0 1.0]"}),he.push({key:"Size",value:"["+I+"]"}),he.push({key:"BitsPerSample",value:"8"}),he.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),he.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),zn({data:re,additionalKeyValues:he,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:q}),te("endobj"),v.objectNumber=Fr(),te("<< /ShadingType "+v.type),te("/ColorSpace /DeviceRGB");var Me="/Coords ["+V(parseFloat(v.coords[0]))+" "+V(parseFloat(v.coords[1]))+" ";v.type===2?Me+=V(parseFloat(v.coords[2]))+" "+V(parseFloat(v.coords[3])):Me+=V(parseFloat(v.coords[2]))+" "+V(parseFloat(v.coords[3]))+" "+V(parseFloat(v.coords[4]))+" "+V(parseFloat(v.coords[5])),te(Me+="]"),v.matrix&&te("/Matrix ["+v.matrix.toString()+"]"),te("/Function "+q+" 0 R"),te("/Extend [true true]"),te(">>"),te("endobj")},Ss=function(v,I){var q=Jr(),re=Fr();I.push({resourcesOid:q,objectOid:re}),v.objectNumber=re;var he=[];he.push({key:"Type",value:"/Pattern"}),he.push({key:"PatternType",value:"1"}),he.push({key:"PaintType",value:"1"}),he.push({key:"TilingType",value:"1"}),he.push({key:"BBox",value:"["+v.boundingBox.map(V).join(" ")+"]"}),he.push({key:"XStep",value:V(v.xStep)}),he.push({key:"YStep",value:V(v.yStep)}),he.push({key:"Resources",value:q+" 0 R"}),v.matrix&&he.push({key:"Matrix",value:"["+v.matrix.toString()+"]"}),zn({data:v.stream,additionalKeyValues:he,objectId:v.objectNumber}),te("endobj")},uo=function(v){for(var I in v.objectNumber=Fr(),te("<<"),v)switch(I){case"opacity":te("/ca "+D(v[I]));break;case"stroke-opacity":te("/CA "+D(v[I]))}te(">>"),te("endobj")},On=function(v){An(v.resourcesOid,!0),te("<<"),te("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var I in te("/Font <<"),tt)tt.hasOwnProperty(I)&&(h===!1||h===!0&&g.hasOwnProperty(I))&&te("/"+I+" "+tt[I].objectNumber+" 0 R");te(">>")})(),(function(){if(Object.keys(St).length>0){for(var I in te("/Shading <<"),St)St.hasOwnProperty(I)&&St[I]instanceof yi&&St[I].objectNumber>=0&&te("/"+I+" "+St[I].objectNumber+" 0 R");We.publish("putShadingPatternDict"),te(">>")}})(),(function(I){if(Object.keys(St).length>0){for(var q in te("/Pattern <<"),St)St.hasOwnProperty(q)&&St[q]instanceof d.TilingPattern&&St[q].objectNumber>=0&&St[q].objectNumber<I&&te("/"+q+" "+St[q].objectNumber+" 0 R");We.publish("putTilingPatternDict"),te(">>")}})(v.objectOid),(function(){if(Object.keys(Vt).length>0){var I;for(I in te("/ExtGState <<"),Vt)Vt.hasOwnProperty(I)&&Vt[I].objectNumber>=0&&te("/"+I+" "+Vt[I].objectNumber+" 0 R");We.publish("putGStateDict"),te(">>")}})(),(function(){for(var I in te("/XObject <<"),ft)ft.hasOwnProperty(I)&&ft[I].objectNumber>=0&&te("/"+I+" "+ft[I].objectNumber+" 0 R");We.publish("putXobjectDict"),te(">>")})(),te(">>"),te("endobj")},Fs=function(v){_t[v.fontName]=_t[v.fontName]||{},_t[v.fontName][v.fontStyle]=v.id},Un=function(v,I,q,re,he){var Me={id:"F"+(Object.keys(tt).length+1).toString(10),postScriptName:v,fontName:I,fontStyle:q,encoding:re,isStandardFont:he||!1,metadata:{}};return We.publish("addFont",{font:Me,instance:this}),tt[Me.id]=Me,Fs(Me),Me.id},Hn=d.__private__.pdfEscape=d.pdfEscape=function(v,I){return(function(q,re){var he,Me,Qe,ut,Dt,xt,Zt,er,Ur;if(Qe=(re=re||{}).sourceEncoding||"Unicode",Dt=re.outputEncoding,(re.autoencode||Dt)&&tt[qe].metadata&&tt[qe].metadata[Qe]&&tt[qe].metadata[Qe].encoding&&(ut=tt[qe].metadata[Qe].encoding,!Dt&&tt[qe].encoding&&(Dt=tt[qe].encoding),!Dt&&ut.codePages&&(Dt=ut.codePages[0]),typeof Dt=="string"&&(Dt=ut[Dt]),Dt)){for(Zt=!1,xt=[],he=0,Me=q.length;he<Me;he++)(er=Dt[q.charCodeAt(he)])?xt.push(String.fromCharCode(er)):xt.push(q[he]),xt[he].charCodeAt(0)>>8&&(Zt=!0);q=xt.join("")}for(he=q.length;Zt===void 0&&he!==0;)q.charCodeAt(he-1)>>8&&(Zt=!0),he--;if(!Zt)return q;for(xt=re.noBOM?[]:[254,255],he=0,Me=q.length;he<Me;he++){if((Ur=(er=q.charCodeAt(he))>>8)>>8)throw new Error("Character at position "+he+" of string '"+q+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");xt.push(Ur),xt.push(er-(Ur<<8))}return String.fromCharCode.apply(void 0,xt)})(v,I).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},aa=d.__private__.beginPage=function(v){be[++Kt]=[],jt[Kt]={objId:0,contentsObjId:0,userUnit:Number(A),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(v[0]),topRightY:Number(v[1])}},_r(Kt),xe(be[O])},rn=function(v,I){var q,re,he;switch(e=I||e,typeof v=="string"&&(q=w(v.toLowerCase()),Array.isArray(q)&&(re=q[0],he=q[1])),Array.isArray(v)&&(re=v[0]*ct,he=v[1]*ct),isNaN(re)&&(re=s[0],he=s[1]),(re>14400||he>14400)&&(Ln.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),re=Math.min(14400,re),he=Math.min(14400,he)),s=[re,he],e.substr(0,1)){case"l":he>re&&(s=[he,re]);break;case"p":re>he&&(s=[he,re])}aa(s),Co(gr),te(kt),tr!==0&&te(tr+" J"),zt!==0&&te(zt+" j"),We.publish("addPage",{pageNumber:Kt})},In=function(v){v>0&&v<=Kt&&(be.splice(v,1),jt.splice(v,1),Kt--,O>Kt&&(O=Kt),this.setPage(O))},_r=function(v){v>0&&v<=Kt&&(O=v)},Xn=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return be.length-1},sa=function(v,I,q){var re,he=void 0;return q=q||{},v=v!==void 0?v:tt[qe].fontName,I=I!==void 0?I:tt[qe].fontStyle,re=v.toLowerCase(),_t[re]!==void 0&&_t[re][I]!==void 0?he=_t[re][I]:_t[v]!==void 0&&_t[v][I]!==void 0?he=_t[v][I]:q.disableWarning===!1&&Ln.warn("Unable to look up font label for font '"+v+"', '"+I+"'. Refer to getFontList() for available fonts."),he||q.noFallback||(he=_t.times[I])==null&&(he=_t.times.normal),he},nn=d.__private__.putInfo=function(){var v=Fr(),I=function(re){return re};for(var q in u!==null&&(I=Mn.encryptor(v,0)),te("<<"),te("/Producer ("+Hn(I("jsPDF "+dr.version))+")"),ye)ye.hasOwnProperty(q)&&ye[q]&&te("/"+q.substr(0,1).toUpperCase()+q.substr(1)+" ("+Hn(I(ye[q]))+")");te("/CreationDate ("+Hn(I(oe))+")"),te(">>"),te("endobj")},Jn=d.__private__.putCatalog=function(v){var I=(v=v||{}).rootDictionaryObjId||ra;switch(Fr(),te("<<"),te("/Type /Catalog"),te("/Pages "+I+" 0 R"),Et||(Et="fullwidth"),Et){case"fullwidth":te("/OpenAction [3 0 R /FitH null]");break;case"fullheight":te("/OpenAction [3 0 R /FitV null]");break;case"fullpage":te("/OpenAction [3 0 R /Fit]");break;case"original":te("/OpenAction [3 0 R /XYZ null null 1]");break;default:var q=""+Et;q.substr(q.length-1)==="%"&&(Et=parseInt(Et)/100),typeof Et=="number"&&te("/OpenAction [3 0 R /XYZ null null "+D(Et)+"]")}switch(it||(it="continuous"),it){case"continuous":te("/PageLayout /OneColumn");break;case"single":te("/PageLayout /SinglePage");break;case"two":case"twoleft":te("/PageLayout /TwoColumnLeft");break;case"tworight":te("/PageLayout /TwoColumnRight")}pt&&te("/PageMode /"+pt),We.publish("putCatalog"),te(">>"),te("endobj")},oa=d.__private__.putTrailer=function(){te("trailer"),te("<<"),te("/Size "+(se+1)),te("/Root "+se+" 0 R"),te("/Info "+(se-1)+" 0 R"),u!==null&&te("/Encrypt "+Mn.oid+" 0 R"),te("/ID [ <"+X+"> <"+X+"> ]"),te(">>")},Er=d.__private__.putHeader=function(){te("%PDF-"+m),te("%ºß¬à")},$a=d.__private__.putXRef=function(){var v="0000000000";te("xref"),te("0 "+(se+1)),te("0000000000 65535 f ");for(var I=1;I<=se;I++)typeof ge[I]=="function"?te((v+ge[I]()).slice(-10)+" 00000 n "):ge[I]!==void 0?te((v+ge[I]).slice(-10)+" 00000 n "):te("0000000000 00000 n ")},qa=d.__private__.buildDocument=function(){var v;se=0,Ae=0,fe=[],ge=[],Fe=[],ra=Jr(),xn=Jr(),xe(fe),We.publish("buildDocument"),Er(),En(),(function(){We.publish("putAdditionalObjects");for(var q=0;q<Fe.length;q++){var re=Fe[q];An(re.objId,!0),te(re.content),te("endobj")}We.publish("postPutAdditionalObjects")})(),v=[],(function(){for(var q in tt)tt.hasOwnProperty(q)&&(h===!1||h===!0&&g.hasOwnProperty(q))&&xa(tt[q])})(),(function(){var q;for(q in Vt)Vt.hasOwnProperty(q)&&uo(Vt[q])})(),(function(){for(var q in ft)ft.hasOwnProperty(q)&&Ra(ft[q])})(),(function(q){var re;for(re in St)St.hasOwnProperty(re)&&(St[re]instanceof yi?na(St[re]):St[re]instanceof ol&&Ss(St[re],q))})(v),We.publish("putResources"),v.forEach(On),On({resourcesOid:xn,objectOid:Number.MAX_SAFE_INTEGER}),We.publish("postPutResources"),u!==null&&(Mn.oid=Fr(),te("<<"),te("/Filter /Standard"),te("/V "+Mn.v),te("/R "+Mn.r),te("/U <"+Mn.toHexString(Mn.U)+">"),te("/O <"+Mn.toHexString(Mn.O)+">"),te("/P "+Mn.P),te(">>"),te("endobj")),nn(),Jn();var I=Ae;return $a(),oa(),te("startxref"),te(""+I),te("%%EOF"),xe(be[O]),fe.join(`
`)},ja=d.__private__.getBlob=function(v){return new Blob([Pe(v)],{type:"application/pdf"})},ns=function(v){for(;v.firstChild;)v.removeChild(v.firstChild)},Pn=function(v){var I,q=v.document,re=q.documentElement,he=q.head,Me=q.body;return he||(he=q.createElement("head"),re.appendChild(he)),Me||(Me=q.createElement("body"),re.appendChild(Me)),ns(he),ns(Me),(I=q.createElement("style")).appendChild(q.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),he.appendChild(I),{document:q,body:Me}},Sa=d.output=d.__private__.output=(on=function(v,I){switch(typeof(I=I||{})=="string"?I={filename:I}:I.filename=I.filename||"generated.pdf",v){case void 0:return qa();case"save":d.save(I.filename);break;case"arraybuffer":return Pe(qa());case"blob":return ja(qa());case"bloburi":case"bloburl":if(kr.URL!==void 0&&typeof kr.URL.createObjectURL=="function")return kr.URL&&kr.URL.createObjectURL(ja(qa()))||void 0;Ln.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var q="",re=qa();try{q=o1(re)}catch{q=o1(unescape(encodeURIComponent(re)))}return"data:application/pdf;filename="+encodeURIComponent(I.filename)+";base64,"+q;case"pdfobjectnewwindow":if(Object.prototype.toString.call(kr)==="[object Window]"){var he="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Me=!I.pdfObjectUrl;Me||(he=I.pdfObjectUrl);var Qe=kr.open();if(Qe!==null){var ut=Pn(Qe),Dt=ut.document.createElement("script"),xt=this;Dt.src=he,Me&&(Dt.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Dt.crossOrigin="anonymous"),Dt.onload=function(){Qe.PDFObject.embed(xt.output("dataurlstring"),I)},ut.body.appendChild(Dt)}return Qe}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(kr)==="[object Window]"){var Zt=I.pdfJsUrl||"examples/PDF.js/web/viewer.html",er=kr.open();if(er!==null){var Ur=Pn(er),br=Ur.document.createElement("iframe"),Tr=Zt.indexOf("?")===-1?"?":"&";xt=this,br.id="pdfViewer",br.width="500px",br.height="400px",br.src=Zt+Tr+"file=&downloadName="+encodeURIComponent(I.filename),br.onload=function(){er.document.title=I.filename,br.contentWindow.PDFViewerApplication.open(xt.output("bloburl"))},Ur.body.appendChild(br)}return er}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(kr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Yr=kr.open();if(Yr!==null){var Ar=Pn(Yr),xr=Ar.document.createElement("iframe");xr.src=this.output("datauristring",I),Ar.body.appendChild(xr),Yr.document.title=I.filename}if(Yr||typeof safari>"u")return Yr;break;case"datauri":case"dataurl":return kr.document.location.href=this.output("datauristring",I);default:return null}},on.foo=function(){try{return on.apply(this,arguments)}catch(q){var v=q.stack||"";~v.indexOf(" at ")&&(v=v.split(" at ")[1]);var I="Error in function "+v.split(`
`)[0].split("<")[0]+": "+q.message;if(!kr.console)throw new Error(I);kr.console.error(I,q),kr.alert&&alert(I)}},on.foo.bar=on,on.foo),Fa=function(v){return Array.isArray(ze)===!0&&ze.indexOf(v)>-1};switch(r){case"pt":ct=1;break;case"mm":ct=72/25.4;break;case"cm":ct=72/2.54;break;case"in":ct=72;break;case"px":ct=Fa("px_scaling")==1?.75:96/72;break;case"pc":case"em":ct=12;break;case"ex":ct=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ct=r}var Mn=null;J(),M();var Hs=d.__private__.getPageInfo=d.getPageInfo=function(v){if(isNaN(v)||v%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:jt[v].objId,pageNumber:v,pageContext:jt[v]}},ps=d.__private__.getPageInfoByObjId=function(v){if(isNaN(v)||v%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var I in jt)if(jt[I].objId===v)break;return Hs(I)},va=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:jt[O].objId,pageNumber:O,pageContext:jt[O]}};d.addPage=function(){return rn.apply(this,arguments),this},d.setPage=function(){return _r.apply(this,arguments),xe.call(this,be[O]),this},d.insertPage=function(v){return this.addPage(),this.movePage(O,v),this},d.movePage=function(v,I){var q,re;if(v>I){q=be[v],re=jt[v];for(var he=v;he>I;he--)be[he]=be[he-1],jt[he]=jt[he-1];be[I]=q,jt[I]=re,this.setPage(I)}else if(v<I){q=be[v],re=jt[v];for(var Me=v;Me<I;Me++)be[Me]=be[Me+1],jt[Me]=jt[Me+1];be[I]=q,jt[I]=re,this.setPage(I)}return this},d.deletePage=function(){return In.apply(this,arguments),this},d.__private__.text=d.text=function(v,I,q,re,he){var Me,Qe,ut,Dt,xt,Zt,er,Ur,br,Tr=(re=re||{}).scope||this;if(typeof v=="number"&&typeof I=="number"&&(typeof q=="string"||Array.isArray(q))){var Yr=q;q=I,I=v,v=Yr}if(arguments[3]instanceof Rt==0?(ut=arguments[4],Dt=arguments[5],hn(er=arguments[3])==="object"&&er!==null||(typeof ut=="string"&&(Dt=ut,ut=null),typeof er=="string"&&(Dt=er,er=null),typeof er=="number"&&(ut=er,er=null),re={flags:er,angle:ut,align:Dt})):(L("The transform parameter of text() with a Matrix value"),br=he),isNaN(I)||isNaN(q)||v==null)throw new Error("Invalid arguments passed to jsPDF.text");if(v.length===0)return Tr;var Ar,xr="",Zr=typeof re.lineHeightFactor=="number"?re.lineHeightFactor:Ps,La=Tr.internal.scaleFactor;function Ua(gn){return gn=gn.split(" ").join(Array(re.TabLen||9).join(" ")),Hn(gn,er)}function Ir(gn){for(var bn,$n=gn.concat(),ca=[],Lo=$n.length;Lo--;)typeof(bn=$n.shift())=="string"?ca.push(bn):Array.isArray(gn)&&(bn.length===1||bn[1]===void 0&&bn[2]===void 0)?ca.push(bn[0]):ca.push([bn[0],bn[1],bn[2]]);return ca}function Gr(gn,bn){var $n;if(typeof gn=="string")$n=bn(gn)[0];else if(Array.isArray(gn)){for(var ca,Lo,ii=gn.concat(),NA=[],Go=ii.length;Go--;)typeof(ca=ii.shift())=="string"?NA.push(bn(ca)[0]):Array.isArray(ca)&&typeof ca[0]=="string"&&(Lo=bn(ca[0],ca[1],ca[2]),NA.push([Lo[0],Lo[1],Lo[2]]));$n=NA}return $n}var Qn=!1,ma=!0;if(typeof v=="string")Qn=!0;else if(Array.isArray(v)){var Ya=v.concat();Qe=[];for(var Ia,Aa=Ya.length;Aa--;)(typeof(Ia=Ya.shift())!="string"||Array.isArray(Ia)&&typeof Ia[0]!="string")&&(ma=!1);Qn=ma}if(Qn===!1)throw new Error('Type of text must be string or Array. "'+v+'" is not recognized.');typeof v=="string"&&(v=v.match(/[\r?\n]/)?v.split(/\r\n|\r|\n/g):[v]);var wa=Te/Tr.internal.scaleFactor,Oa=wa*(Zr-1);switch(re.baseline){case"bottom":q-=Oa;break;case"top":q+=wa-Oa;break;case"hanging":q+=wa-2*Oa;break;case"middle":q+=wa/2-Oa}if((Zt=re.maxWidth||0)>0&&(typeof v=="string"?v=Tr.splitTextToSize(v,Zt):Object.prototype.toString.call(v)==="[object Array]"&&(v=v.reduce(function(gn,bn){return gn.concat(Tr.splitTextToSize(bn,Zt))},[]))),Me={text:v,x:I,y:q,options:re,mutex:{pdfEscape:Hn,activeFontKey:qe,fonts:tt,activeFontSize:Te}},We.publish("preProcessText",Me),v=Me.text,ut=(re=Me.options).angle,br instanceof Rt==0&&ut&&typeof ut=="number"){ut*=Math.PI/180,re.rotationDirection===0&&(ut=-ut),b===x&&(ut=-ut);var uA=Math.cos(ut),Vs=Math.sin(ut);br=new Rt(uA,Vs,-Vs,uA,0,0)}else ut&&ut instanceof Rt&&(br=ut);b!==x||br||(br=qr),(xt=re.charSpace||Tt)!==void 0&&(xr+=V(Q(xt))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Ur=re.horizontalScale)!==void 0&&(xr+=V(100*Ur)+` Tz
`),re.lang;var ia=-1,UA=re.renderingMode!==void 0?re.renderingMode:re.stroke,jo=Tr.internal.getCurrentPageInfo().pageContext;switch(UA){case 0:case!1:case"fill":ia=0;break;case 1:case!0:case"stroke":ia=1;break;case 2:case"fillThenStroke":ia=2;break;case 3:case"invisible":ia=3;break;case 4:case"fillAndAddForClipping":ia=4;break;case 5:case"strokeAndAddPathForClipping":ia=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":ia=6;break;case 7:case"addToPathForClipping":ia=7}var IA=jo.usedRenderingMode!==void 0?jo.usedRenderingMode:-1;ia!==-1?xr+=ia+` Tr
`:IA!==-1&&(xr+=`0 Tr
`),ia!==-1&&(jo.usedRenderingMode=ia),Dt=re.align||"left";var Ws,as=Te*Zr,vs=Tr.internal.pageSize.getWidth(),ko=tt[qe];xt=re.charSpace||Tt,Zt=re.maxWidth||0,er=Object.assign({autoencode:!0,noBOM:!0},re.flags);var Yo=[],MA=function(gn){return Tr.getStringUnitWidth(gn,{font:ko,charSpace:xt,fontSize:Te,doKerning:!1})*Te/La};if(Object.prototype.toString.call(v)==="[object Array]"){var Ga;Qe=Ir(v),Dt!=="left"&&(Ws=Qe.map(MA));var ss,dA=0;if(Dt==="right"){I-=Ws[0],v=[],Aa=Qe.length;for(var Eo=0;Eo<Aa;Eo++)Eo===0?(ss=Le(I),Ga=Je(q)):(ss=Q(dA-Ws[Eo]),Ga=-as),v.push([Qe[Eo],ss,Ga]),dA=Ws[Eo]}else if(Dt==="center"){I-=Ws[0]/2,v=[],Aa=Qe.length;for(var Do=0;Do<Aa;Do++)Do===0?(ss=Le(I),Ga=Je(q)):(ss=Q((dA-Ws[Do])/2),Ga=-as),v.push([Qe[Do],ss,Ga]),dA=Ws[Do]}else if(Dt==="left"){v=[],Aa=Qe.length;for(var QA=0;QA<Aa;QA++)v.push(Qe[QA])}else if(Dt==="justify"&&ko.encoding==="Identity-H"){v=[],Aa=Qe.length,Zt=Zt!==0?Zt:vs;for(var za=0,Kn=0;Kn<Aa;Kn++)if(Ga=Kn===0?Je(q):-as,ss=Kn===0?Le(I):za,Kn<Aa-1){var Ri=Q((Zt-Ws[Kn])/(Qe[Kn].split(" ").length-1)),Ks=Qe[Kn].split(" ");v.push([Ks[0]+" ",ss,Ga]),za=0;for(var $s=1;$s<Ks.length;$s++){var Rr=(MA(Ks[$s-1]+" "+Ks[$s])-MA(Ks[$s]))*La+Ri;$s==Ks.length-1?v.push([Ks[$s],Rr,0]):v.push([Ks[$s]+" ",Rr,0]),za-=Rr}}else v.push([Qe[Kn],ss,Ga]);v.push(["",za,0])}else{if(Dt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(v=[],Aa=Qe.length,Zt=Zt!==0?Zt:vs,Kn=0;Kn<Aa;Kn++){Ga=Kn===0?Je(q):-as,ss=Kn===0?Le(I):0;var la=Qe[Kn].split(" ").length-1,Zs=la>0?(Zt-Ws[Kn])/la:0;Kn<Aa-1?Yo.push(V(Q(Zs))):Yo.push(0),v.push([Qe[Kn],ss,Ga])}}}(typeof re.R2L=="boolean"?re.R2L:yt)===!0&&(v=Gr(v,function(gn,bn,$n){return[gn.split("").reverse().join(""),bn,$n]})),Me={text:v,x:I,y:q,options:re,mutex:{pdfEscape:Hn,activeFontKey:qe,fonts:tt,activeFontSize:Te}},We.publish("postProcessText",Me),v=Me.text,Ar=Me.mutex.isHex||!1;var To=tt[qe].encoding;To!=="WinAnsiEncoding"&&To!=="StandardEncoding"||(v=Gr(v,function(gn,bn,$n){return[Ua(gn),bn,$n]})),Qe=Ir(v),v=[];for(var ho,fA,xo,So=Array.isArray(Qe[0])?1:0,eo="",Fo=function(gn,bn,$n){var ca="";return $n instanceof Rt?($n=typeof re.angle=="number"?cr($n,new Rt(1,0,0,1,gn,bn)):cr(new Rt(1,0,0,1,gn,bn),$n),b===x&&($n=cr(new Rt(1,0,0,-1,0,0),$n)),ca=$n.join(" ")+` Tm
`):ca=V(gn)+" "+V(bn)+` Td
`,ca},Xa=0;Xa<Qe.length;Xa++){switch(eo="",So){case 1:xo=(Ar?"<":"(")+Qe[Xa][0]+(Ar?">":")"),ho=parseFloat(Qe[Xa][1]),fA=parseFloat(Qe[Xa][2]);break;case 0:xo=(Ar?"<":"(")+Qe[Xa]+(Ar?">":")"),ho=Le(I),fA=Je(q)}Yo!==void 0&&Yo[Xa]!==void 0&&(eo=Yo[Xa]+` Tw
`),Xa===0?v.push(eo+Fo(ho,fA,br)+xo):So===0?v.push(eo+xo):So===1&&v.push(eo+Fo(ho,fA,br)+xo)}v=So===0?v.join(` Tj
T* `):v.join(` Tj
`),v+=` Tj
`;var to=`BT
/`;return to+=qe+" "+Te+` Tf
`,to+=V(Te*Zr)+` TL
`,to+=st+`
`,to+=xr,to+=v,te(to+="ET"),g[qe]=!0,Tr};var It=d.__private__.clip=d.clip=function(v){return te(v==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return It("evenodd")},d.__private__.discardPath=d.discardPath=function(){return te("n"),this};var ce=d.__private__.isValidStyle=function(v){var I=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(v)!==-1&&(I=!0),I};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(v){return ce(v)&&(c=v),this};var Ye=d.__private__.getStyle=d.getStyle=function(v){var I=c;switch(v){case"D":case"S":I="S";break;case"F":I="f";break;case"FD":case"DF":I="B";break;case"f":case"f*":case"B":case"B*":I=v}return I},At=d.close=function(){return te("h"),this};d.stroke=function(){return te("S"),this},d.fill=function(v){return Ot("f",v),this},d.fillEvenOdd=function(v){return Ot("f*",v),this},d.fillStroke=function(v){return Ot("B",v),this},d.fillStrokeEvenOdd=function(v){return Ot("B*",v),this};var Ot=function(v,I){hn(I)==="object"?Vr(I,v):te(v)},Ht=function(v){v===null||b===x&&v===void 0||(v=Ye(v),te(v))};function nr(v,I,q,re,he){var Me=new ol(I||this.boundingBox,q||this.xStep,re||this.yStep,this.gState,he||this.matrix);Me.stream=this.stream;var Qe=v+"$$"+this.cloneIndex+++"$$";return Kr(Qe,Me),Me}var Vr=function(v,I){var q=hr[v.key],re=St[q];if(re instanceof yi)te("q"),te(Sn(I)),re.gState&&d.setGState(re.gState),te(v.matrix.toString()+" cm"),te("/"+q+" sh"),te("Q");else if(re instanceof ol){var he=new Rt(1,0,0,-1,0,Ge());v.matrix&&(he=he.multiply(v.matrix||qr),q=nr.call(re,v.key,v.boundingBox,v.xStep,v.yStep,he).id),te("q"),te("/Pattern cs"),te("/"+q+" scn"),re.gState&&d.setGState(re.gState),te(I),te("Q")}},Sn=function(v){switch(v){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},jr=d.moveTo=function(v,I){return te(V(Q(v))+" "+V(T(I))+" m"),this},wn=d.lineTo=function(v,I){return te(V(Q(v))+" "+V(T(I))+" l"),this},fn=d.curveTo=function(v,I,q,re,he,Me){return te([V(Q(v)),V(T(I)),V(Q(q)),V(T(re)),V(Q(he)),V(T(Me)),"c"].join(" ")),this};d.__private__.line=d.line=function(v,I,q,re,he){if(isNaN(v)||isNaN(I)||isNaN(q)||isNaN(re)||!ce(he))throw new Error("Invalid arguments passed to jsPDF.line");return b===E?this.lines([[q-v,re-I]],v,I,[1,1],he||"S"):this.lines([[q-v,re-I]],v,I,[1,1]).stroke()},d.__private__.lines=d.lines=function(v,I,q,re,he,Me){var Qe,ut,Dt,xt,Zt,er,Ur,br,Tr,Yr,Ar,xr;if(typeof v=="number"&&(xr=q,q=I,I=v,v=xr),re=re||[1,1],Me=Me||!1,isNaN(I)||isNaN(q)||!Array.isArray(v)||!Array.isArray(re)||!ce(he)||typeof Me!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(jr(I,q),Qe=re[0],ut=re[1],xt=v.length,Yr=I,Ar=q,Dt=0;Dt<xt;Dt++)(Zt=v[Dt]).length===2?(Yr=Zt[0]*Qe+Yr,Ar=Zt[1]*ut+Ar,wn(Yr,Ar)):(er=Zt[0]*Qe+Yr,Ur=Zt[1]*ut+Ar,br=Zt[2]*Qe+Yr,Tr=Zt[3]*ut+Ar,Yr=Zt[4]*Qe+Yr,Ar=Zt[5]*ut+Ar,fn(er,Ur,br,Tr,Yr,Ar));return Me&&At(),Ht(he),this},d.path=function(v){for(var I=0;I<v.length;I++){var q=v[I],re=q.c;switch(q.op){case"m":jr(re[0],re[1]);break;case"l":wn(re[0],re[1]);break;case"c":fn.apply(this,re);break;case"h":At()}}return this},d.__private__.rect=d.rect=function(v,I,q,re,he){if(isNaN(v)||isNaN(I)||isNaN(q)||isNaN(re)||!ce(he))throw new Error("Invalid arguments passed to jsPDF.rect");return b===E&&(re=-re),te([V(Q(v)),V(T(I)),V(Q(q)),V(Q(re)),"re"].join(" ")),Ht(he),this},d.__private__.triangle=d.triangle=function(v,I,q,re,he,Me,Qe){if(isNaN(v)||isNaN(I)||isNaN(q)||isNaN(re)||isNaN(he)||isNaN(Me)||!ce(Qe))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[q-v,re-I],[he-q,Me-re],[v-he,I-Me]],v,I,[1,1],Qe,!0),this},d.__private__.roundedRect=d.roundedRect=function(v,I,q,re,he,Me,Qe){if(isNaN(v)||isNaN(I)||isNaN(q)||isNaN(re)||isNaN(he)||isNaN(Me)||!ce(Qe))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ut=4/3*(Math.SQRT2-1);return he=Math.min(he,.5*q),Me=Math.min(Me,.5*re),this.lines([[q-2*he,0],[he*ut,0,he,Me-Me*ut,he,Me],[0,re-2*Me],[0,Me*ut,-he*ut,Me,-he,Me],[2*he-q,0],[-he*ut,0,-he,-Me*ut,-he,-Me],[0,2*Me-re],[0,-Me*ut,he*ut,-Me,he,-Me]],v+he,I,[1,1],Qe,!0),this},d.__private__.ellipse=d.ellipse=function(v,I,q,re,he){if(isNaN(v)||isNaN(I)||isNaN(q)||isNaN(re)||!ce(he))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Me=4/3*(Math.SQRT2-1)*q,Qe=4/3*(Math.SQRT2-1)*re;return jr(v+q,I),fn(v+q,I-Qe,v+Me,I-re,v,I-re),fn(v-Me,I-re,v-q,I-Qe,v-q,I),fn(v-q,I+Qe,v-Me,I+re,v,I+re),fn(v+Me,I+re,v+q,I+Qe,v+q,I),Ht(he),this},d.__private__.circle=d.circle=function(v,I,q,re){if(isNaN(v)||isNaN(I)||isNaN(q)||!ce(re))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(v,I,q,q,re)},d.setFont=function(v,I,q){return q&&(I=Y(I,q)),qe=sa(v,I,{disableWarning:!1}),this};var yn=d.__private__.getFont=d.getFont=function(){return tt[sa.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var v,I,q={};for(v in _t)if(_t.hasOwnProperty(v))for(I in q[v]=[],_t[v])_t[v].hasOwnProperty(I)&&q[v].push(I);return q},d.addFont=function(v,I,q,re,he){var Me=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Me.indexOf(arguments[3])!==-1?he=arguments[3]:arguments[3]&&Me.indexOf(arguments[3])==-1&&(q=Y(q,re)),Un.call(this,v,I,q,he=he||"Identity-H")};var Ps,gr=n.lineWidth||.200025,cA=d.__private__.getLineWidth=d.getLineWidth=function(){return gr},Co=d.__private__.setLineWidth=d.setLineWidth=function(v){return gr=v,te(V(Q(v))+" w"),this};d.__private__.setLineDash=dr.API.setLineDash=dr.API.setLineDashPattern=function(v,I){if(v=v||[],I=I||0,isNaN(I)||!Array.isArray(v))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return v=v.map(function(q){return V(Q(q))}).join(" "),I=V(Q(I)),te("["+v+"] "+I+" d"),this};var qo=d.__private__.getLineHeight=d.getLineHeight=function(){return Te*Ps};d.__private__.getLineHeight=d.getLineHeight=function(){return Te*Ps};var fo=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(v){return typeof(v=v||1.15)=="number"&&(Ps=v),this},pe=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Ps};fo(n.lineHeight);var Le=d.__private__.getHorizontalCoordinate=function(v){return Q(v)},Je=d.__private__.getVerticalCoordinate=function(v){return b===x?v:jt[O].mediaBox.topRightY-jt[O].mediaBox.bottomLeftY-Q(v)},Re=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(v){return V(Le(v))},mt=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(v){return V(Je(v))},kt=n.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Nr(kt)},d.__private__.setStrokeColor=d.setDrawColor=function(v,I,q,re){return kt=dn({ch1:v,ch2:I,ch3:q,ch4:re,pdfColorType:"draw",precision:2}),te(kt),this};var at=n.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Nr(at)},d.__private__.setFillColor=d.setFillColor=function(v,I,q,re){return at=dn({ch1:v,ch2:I,ch3:q,ch4:re,pdfColorType:"fill",precision:2}),te(at),this};var st=n.textColor||"0 g",Ct=d.__private__.getTextColor=d.getTextColor=function(){return Nr(st)};d.__private__.setTextColor=d.setTextColor=function(v,I,q,re){return st=dn({ch1:v,ch2:I,ch3:q,ch4:re,pdfColorType:"text",precision:3}),this};var Tt=n.charSpace,Wt=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(Tt||0)};d.__private__.setCharSpace=d.setCharSpace=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Tt=v,this};var tr=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(v){var I=d.CapJoinStyles[v];if(I===void 0)throw new Error("Line cap style of '"+v+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return tr=I,te(I+" J"),this};var zt=0;d.__private__.setLineJoin=d.setLineJoin=function(v){var I=d.CapJoinStyles[v];if(I===void 0)throw new Error("Line join style of '"+v+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return zt=I,te(I+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(v){if(v=v||0,isNaN(v))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return te(V(Q(v))+" M"),this},d.GState=Yu,d.setGState=function(v){(v=typeof v=="string"?Vt[Xt[v]]:qt(null,v)).equals(mr)||(te("/"+v.id+" gs"),mr=v)};var qt=function(v,I){if(!v||!Xt[v]){var q=!1;for(var re in Vt)if(Vt.hasOwnProperty(re)&&Vt[re].equals(I)){q=!0;break}if(q)I=Vt[re];else{var he="GS"+(Object.keys(Vt).length+1).toString(10);Vt[he]=I,I.id=he}return v&&(Xt[v]=I.id),We.publish("addGState",I),I}};d.addGState=function(v,I){return qt(v,I),this},d.saveGraphicsState=function(){return te("q"),rr.push({key:qe,size:Te,color:st}),this},d.restoreGraphicsState=function(){te("Q");var v=rr.pop();return qe=v.key,Te=v.size,st=v.color,mr=null,this},d.setCurrentTransformationMatrix=function(v){return te(v.toString()+" cm"),this},d.comment=function(v){return te("#"+v),this};var Dr=function(v,I){var q=v||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return q},set:function(Me){isNaN(Me)||(q=parseFloat(Me))}});var re=I||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return re},set:function(Me){isNaN(Me)||(re=parseFloat(Me))}});var he="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return he},set:function(Me){he=Me.toString()}}),this},Sr=function(v,I,q,re){Dr.call(this,v,I),this.type="rect";var he=q||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return he},set:function(Qe){isNaN(Qe)||(he=parseFloat(Qe))}});var Me=re||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Me},set:function(Qe){isNaN(Qe)||(Me=parseFloat(Qe))}}),this},Yt=function(){this.page=Kt,this.currentPage=O,this.pages=be.slice(0),this.pagesContext=jt.slice(0),this.x=$e,this.y=Ve,this.matrix=Mt,this.width=Bn(O),this.height=Br(O),this.outputDestination=Xe,this.id="",this.objectNumber=-1};Yt.prototype.restore=function(){Kt=this.page,O=this.currentPage,jt=this.pagesContext,be=this.pages,$e=this.x,Ve=this.y,Mt=this.matrix,wr(O,this.width),P(O,this.height),Xe=this.outputDestination};var pr=function(v,I,q,re,he){ar.push(new Yt),Kt=O=0,be=[],$e=v,Ve=I,Mt=he,aa([q,re])};for(var Wr in d.beginFormObject=function(v,I,q,re,he){return pr(v,I,q,re,he),this},d.endFormObject=function(v){return(function(I){if(Lt[I])ar.pop().restore();else{var q=new Yt,re="Xo"+(Object.keys(ft).length+1).toString(10);q.id=re,Lt[I]=re,ft[re]=q,We.publish("addFormObject",q),ar.pop().restore()}})(v),this},d.doFormObject=function(v,I){var q=ft[Lt[v]];return te("q"),te(I.toString()+" cm"),te("/"+q.id+" Do"),te("Q"),this},d.getFormObject=function(v){var I=ft[Lt[v]];return{x:I.x,y:I.y,width:I.width,height:I.height,matrix:I.matrix}},d.save=function(v,I){return v=v||"generated.pdf",(I=I||{}).returnPromise=I.returnPromise||!1,I.returnPromise===!1?(mi(ja(qa()),v),typeof mi.unload=="function"&&kr.setTimeout&&setTimeout(mi.unload,911),this):new Promise(function(q,re){try{var he=mi(ja(qa()),v);typeof mi.unload=="function"&&kr.setTimeout&&setTimeout(mi.unload,911),q(he)}catch(Me){re(Me.message)}})},dr.API)dr.API.hasOwnProperty(Wr)&&(Wr==="events"&&dr.API.events.length?(function(v,I){var q,re,he;for(he=I.length-1;he!==-1;he--)q=I[he][0],re=I[he][1],v.subscribe.apply(v,[q].concat(typeof re=="function"?[re]:re))})(We,dr.API.events):d[Wr]=dr.API[Wr]);function Bn(v){return jt[v].mediaBox.topRightX-jt[v].mediaBox.bottomLeftX}function wr(v,I){jt[v].mediaBox.topRightX=I+jt[v].mediaBox.bottomLeftX}function Br(v){return jt[v].mediaBox.topRightY-jt[v].mediaBox.bottomLeftY}function P(v,I){jt[v].mediaBox.topRightY=I+jt[v].mediaBox.bottomLeftY}var ue=d.getPageWidth=function(v){return Bn(v=v||O)/ct},ke=d.setPageWidth=function(v,I){wr(v,I*ct)},Ge=d.getPageHeight=function(v){return Br(v=v||O)/ct},nt=d.setPageHeight=function(v,I){P(v,I*ct)};return d.internal={pdfEscape:Hn,getStyle:Ye,getFont:yn,getFontSize:ot,getCharSpace:Wt,getTextColor:Ct,getLineHeight:qo,getLineHeightFactor:pe,getLineWidth:cA,write:lt,getHorizontalCoordinate:Le,getVerticalCoordinate:Je,getCoordinateString:Re,getVerticalCoordinateString:mt,collections:{},newObject:Fr,newAdditionalObject:ta,newObjectDeferred:Jr,newObjectDeferredBegin:An,getFilters:Gn,putStream:zn,events:We,scaleFactor:ct,pageSize:{getWidth:function(){return ue(O)},setWidth:function(v){ke(O,v)},getHeight:function(){return Ge(O)},setHeight:function(v){nt(O,v)}},encryptionOptions:u,encryption:Mn,getEncryptor:function(v){return u!==null?Mn.encryptor(v,0):function(I){return I}},output:Sa,getNumberOfPages:Xn,get pages(){return be},out:te,f2:D,f3:S,getPageInfo:Hs,getPageInfoByObjId:ps,getCurrentPageInfo:va,getPDFVersion:y,Point:Dr,Rectangle:Sr,Matrix:Rt,hasHotfix:Fa},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return ue(O)},set:function(v){ke(O,v)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return Ge(O)},set:function(v){nt(O,v)},enumerable:!0,configurable:!0}),(function(v){for(var I=0,q=rt.length;I<q;I++){var re=Un.call(this,v[I][0],v[I][1],v[I][2],rt[I][3],!0);h===!1&&(g[re]=!0);var he=v[I][0].split("-");Fs({id:re,fontName:he[0],fontStyle:he[1]||""})}We.publish("addFonts",{fonts:tt,dictionary:_t})}).call(d,rt),qe="F1",rn(s,e),We.publish("initialized"),d}el.prototype.lsbFirstWord=function(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)},el.prototype.toHexString=function(n){return n.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},el.prototype.hexToBytes=function(n){for(var t=[],e=0;e<n.length;e+=2)t.push(String.fromCharCode(parseInt(n.substr(e,2),16)));return t.join("")},el.prototype.processOwnerPassword=function(n,t){return Vp(Pp(t).substr(0,5),n)},el.prototype.encryptor=function(n,t){var e=Pp(this.encryptionKey+String.fromCharCode(255&n,n>>8&255,n>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return Vp(e,r)}},Yu.prototype.equals=function(n){var t,e="id,objectNumber,equals";if(!n||hn(n)!==hn(this))return!1;var r=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!n.hasOwnProperty(t)||this[t]!==n[t])return!1;r++}for(t in n)n.hasOwnProperty(t)&&e.indexOf(t)<0&&r--;return r===0},dr.API={events:[]},dr.version="4.2.1";var fa=dr.API,Kv=1,Ii=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Wi=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Li=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},Lr=function(n){return n.toFixed(2)},KA=function(n){return n.toFixed(5)};fa.__acroform__={};var Xs=function(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n},c1=function(n){return n*Kv},rA=function(n){var t=new xC,e=or.internal.getHeight(n)||0,r=or.internal.getWidth(n)||0;return t.BBox=[0,0,Number(Lr(r)),Number(Lr(e))],t},GQ=fa.__acroform__.setBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<<t},zQ=fa.__acroform__.clearBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return n&~(1<<t)},XQ=fa.__acroform__.getBit=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return n&1<<t?1:0},ka=fa.__acroform__.getBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return XQ(n,t-1)},Ea=fa.__acroform__.setBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return GQ(n,t-1)},Da=fa.__acroform__.clearBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return zQ(n,t-1)},JQ=fa.__acroform__.calculateCoordinates=function(n,t){var e=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,s=n[0],o=n[1],i=n[2],A=n[3],l={};return l.lowerLeft_X=e(s)||0,l.lowerLeft_Y=r(o+A)||0,l.upperRight_X=e(s+i)||0,l.upperRight_Y=r(o)||0,[Number(Lr(l.lowerLeft_X)),Number(Lr(l.lowerLeft_Y)),Number(Lr(l.upperRight_X)),Number(Lr(l.upperRight_Y))]},ZQ=function(n){if(n.appearanceStreamContent)return n.appearanceStreamContent;if(n.V||n.DV){var t=[],e=n._V||n.DV,r=Wp(n,e),s=n.scope.internal.getFont(n.fontName,n.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(n.scope.__private__.encodeColorString(n.color)),t.push("/"+s+" "+Lr(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var o=rA(n);return o.scope=n.scope,o.stream=t.join(`
`),o}},Wp=function(n,t){var e=n.fontSize===0?n.maxFontSize:n.fontSize,r={text:"",fontSize:""},s=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");s=n.multiline?s.map(function(D){return D.split(`
`)}):s.map(function(D){return[D]});var o=e,i=or.internal.getHeight(n)||0;i=i<0?-i:i;var A=or.internal.getWidth(n)||0;A=A<0?-A:A;var l=function(D,S,Q){if(D+1<s.length){var T=S+" "+s[D+1][0];return eu(T,n,Q).width<=A-4}return!1};o++;e:for(;o>0;){t="",o--;var c,u,h=eu("3",n,o).height,g=n.multiline?i-o:(i-h)/2,d=g+=2,m=0,y=0,B=0;if(o<=0){t=`(...) Tj
`,t+="% Width of Text: "+eu(t,n,o=12).width+", FieldWidth:"+A+`
`;break}for(var w="",E=0,x=0;x<s.length;x++)if(s.hasOwnProperty(x)){var b=!1;if(s[x].length!==1&&B!==s[x].length-1){if((h+2)*(E+2)+2>i)continue e;w+=s[x][B],b=!0,y=x,x--}else{w=(w+=s[x][B]+" ").substr(w.length-1)==" "?w.substr(0,w.length-1):w;var H=parseInt(x),$=l(H,w,o),Y=x>=s.length-1;if($&&!Y){w+=" ",B=0;continue}if($||Y){if(Y)y=H;else if(n.multiline&&(h+2)*(E+2)+2>i)continue e}else{if(!n.multiline||(h+2)*(E+2)+2>i)continue e;y=H}}for(var V="",L=m;L<=y;L++){var j=s[L];if(n.multiline){if(L===y){V+=j[B]+" ",B=(B+1)%j.length;continue}if(L===m){V+=j[j.length-1]+" ";continue}}V+=j[0]+" "}switch(V=V.substr(V.length-1)==" "?V.substr(0,V.length-1):V,u=eu(V,n,o).width,n.textAlign){case"right":c=A-u-2;break;case"center":c=(A-u)/2;break;default:c=2}t+=Lr(c)+" "+Lr(d)+` Td
`,t+="("+Ii(V)+`) Tj
`,t+=-Lr(c)+` 0 Td
`,d=-(o+2),u=0,m=b?y:y+1,E++,w=""}break}return r.text=t,r.fontSize=o,r},eu=function(n,t,e){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),s=t.scope.getStringUnitWidth(n,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:s}},eN={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},tN=function(n,t){var e={type:"reference",object:n};t.internal.getPageInfo(n.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&t.internal.getPageInfo(n.page).pageContext.annotations.push(e)},rN=function(n,t){if(t.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(Ho.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(eN)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Kv=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new SC,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var s in r)if(r.hasOwnProperty(s)){var o=r[s];o.objId=void 0,o.hasAnnotation&&tN(o,e)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(e){(function(r,s){var o=!r;for(var i in r||(s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||s.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(i)){var A=r[i],l=[],c=A.Rect;if(A.Rect&&(A.Rect=JQ(A.Rect,s)),s.internal.newObjectDeferredBegin(A.objId,!0),A.DA=or.createDefaultAppearanceStream(A),hn(A)==="object"&&typeof A.getKeyValueListForStream=="function"&&(l=A.getKeyValueListForStream()),A.Rect=c,A.hasAppearanceStream&&!A.appearanceStreamContent){var u=ZQ(A);l.push({key:"AP",value:"<</N "+u+">>"}),s.internal.acroformPlugin.xForms.push(u)}if(A.appearanceStreamContent){var h="";for(var g in A.appearanceStreamContent)if(A.appearanceStreamContent.hasOwnProperty(g)){var d=A.appearanceStreamContent[g];if(h+="/"+g+" ",h+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var i in d)if(d.hasOwnProperty(i)){var m=d[i];typeof m=="function"&&(m=m.call(s,A)),h+="/"+i+" "+m+" ",s.internal.acroformPlugin.xForms.indexOf(m)>=0||s.internal.acroformPlugin.xForms.push(m)}}else typeof(m=d)=="function"&&(m=m.call(s,A)),h+="/"+i+" "+m,s.internal.acroformPlugin.xForms.indexOf(m)>=0||s.internal.acroformPlugin.xForms.push(m);h+=">>"}l.push({key:"AP",value:`<<
`+h+">>"})}s.internal.putStream({additionalKeyValues:l,objectId:A.objId}),s.internal.out("endobj")}o&&(function(y,B){for(var w in y)if(y.hasOwnProperty(w)){var E=w,x=y[w];B.internal.newObjectDeferredBegin(x.objId,!0),hn(x)==="object"&&typeof x.putStream=="function"&&x.putStream(),delete y[E]}})(s.internal.acroformPlugin.xForms,s)})(e,n)}),n.internal.acroformPlugin.isInitialized=!0}},TC=fa.__acroform__.arrayToPdfArray=function(n,t,e){var r=function(i){return i};if(Array.isArray(n)){for(var s="[",o=0;o<n.length;o++)switch(o!==0&&(s+=" "),hn(n[o])){case"boolean":case"number":case"object":s+=n[o].toString();break;case"string":n[o].substr(0,1)==="/"?s+="/"+Li(n[o].substr(1)):(t!==void 0&&e&&(r=e.internal.getEncryptor(t)),s+="("+Ii(r(n[o].toString()))+")")}return s+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},cf=function(n,t,e){var r=function(s){return s};return t!==void 0&&e&&(r=e.internal.getEncryptor(t)),(n=n||"").toString(),"("+Ii(r(n))+")"},aA=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(n){this._objId=n}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};aA.prototype.toString=function(){return this.objId+" 0 R"},aA.prototype.putStream=function(){var n=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:n,objectId:this.objId}),this.scope.internal.out("endobj")},aA.prototype.getKeyValueListForStream=function(){var n=[],t=Object.getOwnPropertyNames(this).filter(function(o){return o!="content"&&o!="appearanceStreamContent"&&o!="scope"&&o!="objId"&&o.substring(0,1)!="_"});for(var e in t)if(Object.getOwnPropertyDescriptor(this,t[e]).configurable===!1){var r=t[e],s=this[r];s&&(Array.isArray(s)?n.push({key:r,value:TC(s,this.objId,this.scope)}):s instanceof aA?(s.scope=this.scope,n.push({key:r,value:s.objId+" 0 R"})):typeof s!="function"&&n.push({key:r,value:s}))}return n};var xC=function(){aA.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var n,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){n=e.trim()},get:function(){return n||null}})};Xs(xC,aA);var SC=function(){aA.call(this);var n,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(n){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Ii(e(n))+")"}},set:function(e){n=e}})};Xs(SC,aA);var Ho=function n(){aA.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute F supplied.');t=w}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!ka(t,3)},set:function(w){w?this.F=Ea(t,3):this.F=Da(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute Ff supplied.');e=w}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(w){r=w!==void 0?w:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(w){r[0]=w}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(w){r[1]=w}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(w){r[2]=w}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(w){r[3]=w}});var s="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return s},set:function(w){switch(w){case"/Btn":case"/Tx":case"/Ch":case"/Sig":s=w;break;default:throw new Error('Invalid value "'+w+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof Gu)return;o="FieldObject"+n.FieldNum++}var w=function(E){return E};return this.scope&&(w=this.scope.internal.getEncryptor(this.objId)),"("+Ii(w(o))+")"},set:function(w){o=w.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(w){o=w}});var i="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return i},set:function(w){i=w}});var A="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return A},set:function(w){A=w}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(w){l=w}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return c===void 0?50/Kv:c},set:function(w){c=w}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(w){u=w}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof Gu||this instanceof Ei))return cf(h,this.objId,this.scope)},set:function(w){w=w.toString(),h=w}});var g=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof ts==0?cf(g,this.objId,this.scope):g},set:function(w){w=w.toString(),g=this instanceof ts==0?w.substr(0,1)==="("?Wi(w.substr(1,w.length-2)):Wi(w):w}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ts==1?Wi(g.substr(1,g.length-1)):g},set:function(w){w=w.toString(),g=this instanceof ts==1?"/"+Li(w):w}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(w){this.V=w}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof ts==0?cf(d,this.objId,this.scope):d},set:function(w){w=w.toString(),d=this instanceof ts==0?w.substr(0,1)==="("?Wi(w.substr(1,w.length-2)):Wi(w):w}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ts==1?Wi(d.substr(1,d.length-1)):d},set:function(w){w=w.toString(),d=this instanceof ts==1?"/"+Li(w):w}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var m,y=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return y},set:function(w){w=!!w,y=w}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(m)return m},set:function(w){m=w}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,1)},set:function(w){w?this.Ff=Ea(this.Ff,1):this.Ff=Da(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,2)},set:function(w){w?this.Ff=Ea(this.Ff,2):this.Ff=Da(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,3)},set:function(w){w?this.Ff=Ea(this.Ff,3):this.Ff=Da(this.Ff,3)}});var B=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(B!==null)return B},set:function(w){if([0,1,2].indexOf(w)===-1)throw new Error('Invalid value "'+w+'" for attribute Q supplied.');B=w}}),Object.defineProperty(this,"textAlign",{get:function(){var w;switch(B){case 0:default:w="left";break;case 1:w="center";break;case 2:w="right"}return w},configurable:!0,enumerable:!0,set:function(w){switch(w){case"right":case 2:B=2;break;case"center":case 1:B=1;break;default:B=0}}})};Xs(Ho,aA);var ll=function(){Ho.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){n=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return TC(t,this.objId,this.scope)},set:function(e){var r,s;s=[],typeof(r=e)=="string"&&(s=(function(o,i,A){A||(A=1);for(var l,c=[];l=i.exec(o);)c.push(l[A]);return c})(r,/\((.*?)\)/g)),t=s}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,18)},set:function(e){e?this.Ff=Ea(this.Ff,18):this.Ff=Da(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=Ea(this.Ff,19):this.Ff=Da(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,20)},set:function(e){e?(this.Ff=Ea(this.Ff,20),t.sort()):this.Ff=Da(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,22)},set:function(e){e?this.Ff=Ea(this.Ff,22):this.Ff=Da(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,23)},set:function(e){e?this.Ff=Ea(this.Ff,23):this.Ff=Da(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,27)},set:function(e){e?this.Ff=Ea(this.Ff,27):this.Ff=Da(this.Ff,27)}}),this.hasAppearanceStream=!1};Xs(ll,Ho);var cl=function(){ll.call(this),this.fontName="helvetica",this.combo=!1};Xs(cl,ll);var ul=function(){cl.call(this),this.combo=!0};Xs(ul,cl);var Mu=function(){ul.call(this),this.edit=!0};Xs(Mu,ul);var ts=function(){Ho.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,15)},set:function(e){e?this.Ff=Ea(this.Ff,15):this.Ff=Da(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,16)},set:function(e){e?this.Ff=Ea(this.Ff,16):this.Ff=Da(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,17)},set:function(e){e?this.Ff=Ea(this.Ff,17):this.Ff=Da(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,26)},set:function(e){e?this.Ff=Ea(this.Ff,26):this.Ff=Da(this.Ff,26)}});var n,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(o){return o};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,s=[];for(r in s.push("<<"),t)s.push("/"+r+" ("+Ii(e(t[r]))+")");return s.push(">>"),s.join(`
`)}},set:function(e){hn(e)==="object"&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){typeof e=="string"&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),n="/"+Li(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+Li(e)}})};Xs(ts,Ho);var Qu=function(){ts.call(this),this.pushButton=!0};Xs(Qu,ts);var dl=function(){ts.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t!==void 0?t:[]}})};Xs(dl,ts);var Gu=function(){var n,t;Ho.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(s){n=s}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(s){t=s}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var s=function(A){return A};this.scope&&(s=this.scope.internal.getEncryptor(this.objId));var o,i=[];for(o in i.push("<<"),r)i.push("/"+o+" ("+Ii(s(r[o]))+")");return i.push(">>"),i.join(`
`)},set:function(s){hn(s)==="object"&&(r=s)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(s){typeof s=="string"&&(r.CA=s)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(s){var o=s==null?"":s.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),e="/"+Li(o)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(s){var o=s==null?"":s.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),e="/"+Li(o)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=or.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Xs(Gu,Ho),dl.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=n.createAppearanceStream(e.optionName),e.caption=n.getCA()}},dl.prototype.createOption=function(n){var t=new Gu;return t.Parent=this,t.optionName=n,this.Kids.push(t),nN.call(this.scope,t),t};var Nu=function(){ts.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=or.CheckBox.createAppearanceStream()};Xs(Nu,ts);var Ei=function(){Ho.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,13)},set:function(t){t?this.Ff=Ea(this.Ff,13):this.Ff=Da(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,21)},set:function(t){t?this.Ff=Ea(this.Ff,21):this.Ff=Da(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,23)},set:function(t){t?this.Ff=Ea(this.Ff,23):this.Ff=Da(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,24)},set:function(t){t?this.Ff=Ea(this.Ff,24):this.Ff=Da(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,25)},set:function(t){t?this.Ff=Ea(this.Ff,25):this.Ff=Da(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,26)},set:function(t){t?this.Ff=Ea(this.Ff,26):this.Ff=Da(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){Number.isInteger(t)&&(n=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Xs(Ei,Ho);var _u=function(){Ei.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!ka(this.Ff,14)},set:function(n){n?this.Ff=Ea(this.Ff,14):this.Ff=Da(this.Ff,14)}}),this.password=!0};Xs(_u,Ei);var or={CheckBox:{createAppearanceStream:function(){return{N:{On:or.CheckBox.YesNormal},D:{On:or.CheckBox.YesPushDown,Off:or.CheckBox.OffPushDown}}},YesPushDown:function(n){var t=rA(n);t.scope=n.scope;var e=[],r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,s=n.scope.__private__.encodeColorString(n.color),o=Wp(n,n.caption);return e.push("0.749023 g"),e.push("0 0 "+Lr(or.internal.getWidth(n))+" "+Lr(or.internal.getHeight(n))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+Lr(o.fontSize)+" Tf "+s),e.push("BT"),e.push(o.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(`
`),t},YesNormal:function(n){var t=rA(n);t.scope=n.scope;var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,r=n.scope.__private__.encodeColorString(n.color),s=[],o=or.internal.getHeight(n),i=or.internal.getWidth(n),A=Wp(n,n.caption);return s.push("1 g"),s.push("0 0 "+Lr(i)+" "+Lr(o)+" re"),s.push("f"),s.push("q"),s.push("0 0 1 rg"),s.push("0 0 "+Lr(i-1)+" "+Lr(o-1)+" re"),s.push("W"),s.push("n"),s.push("0 g"),s.push("BT"),s.push("/"+e+" "+Lr(A.fontSize)+" Tf "+r),s.push(A.text),s.push("ET"),s.push("Q"),t.stream=s.join(`
`),t},OffPushDown:function(n){var t=rA(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Lr(or.internal.getWidth(n))+" "+Lr(or.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(n){var t={D:{Off:or.RadioButton.Circle.OffPushDown},N:{}};return t.N[n]=or.RadioButton.Circle.YesNormal,t.D[n]=or.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(n){var t=rA(n);t.scope=n.scope;var e=[],r=or.internal.getWidth(n)<=or.internal.getHeight(n)?or.internal.getWidth(n)/4:or.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var s=or.internal.Bezier_C,o=Number((r*s).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+KA(or.internal.getWidth(n)/2)+" "+KA(or.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),e.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),e.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),e.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
`),t},YesPushDown:function(n){var t=rA(n);t.scope=n.scope;var e=[],r=or.internal.getWidth(n)<=or.internal.getHeight(n)?or.internal.getWidth(n)/4:or.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var s=Number((2*r).toFixed(5)),o=Number((s*or.internal.Bezier_C).toFixed(5)),i=Number((r*or.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+KA(or.internal.getWidth(n)/2)+" "+KA(or.internal.getHeight(n)/2)+" cm"),e.push(s+" 0 m"),e.push(s+" "+o+" "+o+" "+s+" 0 "+s+" c"),e.push("-"+o+" "+s+" -"+s+" "+o+" -"+s+" 0 c"),e.push("-"+s+" -"+o+" -"+o+" -"+s+" 0 -"+s+" c"),e.push(o+" -"+s+" "+s+" -"+o+" "+s+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+KA(or.internal.getWidth(n)/2)+" "+KA(or.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),e.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),e.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),e.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
`),t},OffPushDown:function(n){var t=rA(n);t.scope=n.scope;var e=[],r=or.internal.getWidth(n)<=or.internal.getHeight(n)?or.internal.getWidth(n)/4:or.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var s=Number((2*r).toFixed(5)),o=Number((s*or.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+KA(or.internal.getWidth(n)/2)+" "+KA(or.internal.getHeight(n)/2)+" cm"),e.push(s+" 0 m"),e.push(s+" "+o+" "+o+" "+s+" 0 "+s+" c"),e.push("-"+o+" "+s+" -"+s+" "+o+" -"+s+" 0 c"),e.push("-"+s+" -"+o+" -"+o+" -"+s+" 0 -"+s+" c"),e.push(o+" -"+s+" "+s+" -"+o+" "+s+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
`),t}},Cross:{createAppearanceStream:function(n){var t={D:{Off:or.RadioButton.Cross.OffPushDown},N:{}};return t.N[n]=or.RadioButton.Cross.YesNormal,t.D[n]=or.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(n){var t=rA(n);t.scope=n.scope;var e=[],r=or.internal.calculateCross(n);return e.push("q"),e.push("1 1 "+Lr(or.internal.getWidth(n)-2)+" "+Lr(or.internal.getHeight(n)-2)+" re"),e.push("W"),e.push("n"),e.push(Lr(r.x1.x)+" "+Lr(r.x1.y)+" m"),e.push(Lr(r.x2.x)+" "+Lr(r.x2.y)+" l"),e.push(Lr(r.x4.x)+" "+Lr(r.x4.y)+" m"),e.push(Lr(r.x3.x)+" "+Lr(r.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(`
`),t},YesPushDown:function(n){var t=rA(n);t.scope=n.scope;var e=or.internal.calculateCross(n),r=[];return r.push("0.749023 g"),r.push("0 0 "+Lr(or.internal.getWidth(n))+" "+Lr(or.internal.getHeight(n))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Lr(or.internal.getWidth(n)-2)+" "+Lr(or.internal.getHeight(n)-2)+" re"),r.push("W"),r.push("n"),r.push(Lr(e.x1.x)+" "+Lr(e.x1.y)+" m"),r.push(Lr(e.x2.x)+" "+Lr(e.x2.y)+" l"),r.push(Lr(e.x4.x)+" "+Lr(e.x4.y)+" m"),r.push(Lr(e.x3.x)+" "+Lr(e.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
`),t},OffPushDown:function(n){var t=rA(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Lr(or.internal.getWidth(n))+" "+Lr(or.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(`
`),t}}},createDefaultAppearanceStream:function(n){var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,e=n.scope.__private__.encodeColorString(n.color);return"/"+t+" "+n.fontSize+" Tf "+e}};or.internal={Bezier_C:.551915024494,calculateCross:function(n){var t=or.internal.getWidth(n),e=or.internal.getHeight(n),r=Math.min(t,e);return{x1:{x:(t-r)/2,y:(e-r)/2+r},x2:{x:(t-r)/2+r,y:(e-r)/2},x3:{x:(t-r)/2,y:(e-r)/2},x4:{x:(t-r)/2+r,y:(e-r)/2+r}}}},or.internal.getWidth=function(n){var t=0;return hn(n)==="object"&&(t=c1(n.Rect[2])),t},or.internal.getHeight=function(n){var t=0;return hn(n)==="object"&&(t=c1(n.Rect[3])),t};var nN=fa.addField=function(n){if(rN(this,n),!(n instanceof Ho))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=n).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};fa.AcroFormChoiceField=ll,fa.AcroFormListBox=cl,fa.AcroFormComboBox=ul,fa.AcroFormEditBox=Mu,fa.AcroFormButton=ts,fa.AcroFormPushButton=Qu,fa.AcroFormRadioButton=dl,fa.AcroFormCheckBox=Nu,fa.AcroFormTextField=Ei,fa.AcroFormPasswordField=_u,fa.AcroFormAppearance=or,fa.AcroForm={ChoiceField:ll,ListBox:cl,ComboBox:ul,EditBox:Mu,Button:ts,PushButton:Qu,RadioButton:dl,CheckBox:Nu,TextField:Ei,PasswordField:_u,Appearance:or},dr.AcroForm={ChoiceField:ll,ListBox:cl,ComboBox:ul,EditBox:Mu,Button:ts,PushButton:Qu,RadioButton:dl,CheckBox:Nu,TextField:Ei,PasswordField:_u,Appearance:or};dr.AcroForm;function FC(n){return n.reduce(function(t,e,r){return t[e]=r,t},{})}(function(n){var t="addImage_";n.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},s=n.__addimage__.getImageFileTypeByImageData=function(D,S){var Q,T,oe,X,F,M=e;if((S=S||e)==="RGBA"||D.data!==void 0&&D.data instanceof Uint8ClampedArray&&"height"in D&&"width"in D)return"RGBA";if($(D))for(F in r)for(oe=r[F],Q=0;Q<oe.length;Q+=1){for(X=!0,T=0;T<oe[Q].length;T+=1)if(oe[Q][T]!==void 0&&oe[Q][T]!==D[T]){X=!1;break}if(X===!0){M=F;break}}else for(F in r)for(oe=r[F],Q=0;Q<oe.length;Q+=1){for(X=!0,T=0;T<oe[Q].length;T+=1)if(oe[Q][T]!==void 0&&oe[Q][T]!==D.charCodeAt(T)){X=!1;break}if(X===!0){M=F;break}}return M===e&&S!==e&&(M=S),M},o=function D(S){for(var Q=this.internal.write,T=this.internal.putStream,oe=(0,this.internal.getFilters)();oe.indexOf("FlateEncode")!==-1;)oe.splice(oe.indexOf("FlateEncode"),1);S.objectId=this.internal.newObject();var X=[];if(X.push({key:"Type",value:"/XObject"}),X.push({key:"Subtype",value:"/Image"}),X.push({key:"Width",value:S.width}),X.push({key:"Height",value:S.height}),S.colorSpace===w.INDEXED?X.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(S.palette.length/3-1)+" "+("sMask"in S&&S.sMask!==void 0?S.objectId+2:S.objectId+1)+" 0 R]"}):(X.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===w.DEVICE_CMYK&&X.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),X.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&X.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)&&S.transparency.length>0){for(var F="",M=0,R=S.transparency.length;M<R;M++)F+=S.transparency[M]+" "+S.transparency[M]+" ";X.push({key:"Mask",value:"["+F+"]"})}S.sMask!==void 0&&X.push({key:"SMask",value:S.objectId+1+" 0 R"});var ae=S.filter!==void 0?["/"+S.filter]:void 0;if(T({data:S.data,additionalKeyValues:X,alreadyAppliedFilters:ae,objectId:S.objectId}),Q("endobj"),"sMask"in S&&S.sMask!==void 0){var J,k=(J=S.sMaskBitsPerComponent)!==null&&J!==void 0?J:S.bitsPerComponent,O={width:S.width,height:S.height,colorSpace:"DeviceGray",bitsPerComponent:k,data:S.sMask};"filter"in S&&(O.decodeParameters="/Predictor ".concat(S.predictor," /Colors 1 /BitsPerComponent ").concat(k," /Columns ").concat(S.width),O.filter=S.filter),D.call(this,O)}if(S.colorSpace===w.INDEXED){var N=this.internal.newObject();T({data:V(new Uint8Array(S.palette)),objectId:N}),Q("endobj")}},i=function(){var D=this.internal.collections[t+"images"];for(var S in D)o.call(this,D[S])},A=function(){var D,S=this.internal.collections[t+"images"],Q=this.internal.write;for(var T in S)Q("/I"+(D=S[T]).index,D.objectId,"0","R")},l=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",i),this.internal.events.subscribe("putXobjectDict",A))},c=function(){var D=this.internal.collections[t+"images"];return l.call(this),D},u=function(){return Object.keys(this.internal.collections[t+"images"]).length},h=function(D){return typeof n["process"+D.toUpperCase()]=="function"},g=function(D){return hn(D)==="object"&&D.nodeType===1},d=function(D,S){if(D.nodeName==="IMG"&&D.hasAttribute("src")){var Q=""+D.getAttribute("src");if(Q.indexOf("data:image/")===0)return Iu(unescape(Q).split("base64,").pop());var T=n.loadFile(Q,!0);if(T!==void 0)return T}if(D.nodeName==="CANVAS"){if(D.width===0||D.height===0)throw new Error("Given canvas must have data. Canvas width: "+D.width+", height: "+D.height);var oe;switch(S){case"PNG":oe="image/png";break;case"WEBP":oe="image/webp";break;default:oe="image/jpeg"}return Iu(D.toDataURL(oe,1).split("base64,").pop())}},m=function(D){var S=this.internal.collections[t+"images"];if(S){for(var Q in S)if(D===S[Q].alias)return S[Q]}},y=function(D,S,Q){return D||S||(D=-96,S=-96),D<0&&(D=-1*Q.width*72/D/this.internal.scaleFactor),S<0&&(S=-1*Q.height*72/S/this.internal.scaleFactor),D===0&&(D=S*Q.width/Q.height),S===0&&(S=D*Q.height/Q.width),[D,S]},B=function(D,S,Q,T,oe,X){var F=y.call(this,Q,T,oe),M=this.internal.getCoordinateString,R=this.internal.getVerticalCoordinateString,ae=c.call(this);if(Q=F[0],T=F[1],ae[oe.index]=oe,X){X*=Math.PI/180;var J=Math.cos(X),k=Math.sin(X),O=function(Z){return Z.toFixed(4)},N=[O(J),O(k),O(-1*k),O(J),0,0,"cm"]}this.internal.write("q"),X?(this.internal.write([1,"0","0",1,M(D),R(S+T),"cm"].join(" ")),this.internal.write(N.join(" ")),this.internal.write([M(Q),"0","0",M(T),"0","0","cm"].join(" "))):this.internal.write([M(Q),"0","0",M(T),M(D),R(S+T),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+oe.index+" Do"),this.internal.write("Q")},w=n.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"};n.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 E=n.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},x=n.__addimage__.sHashCode=function(D){var S,Q,T=0;if(typeof D=="string")for(Q=D.length,S=0;S<Q;S++)T=(T<<5)-T+D.charCodeAt(S),T|=0;else if($(D))for(Q=D.byteLength/2,S=0;S<Q;S++)T=(T<<5)-T+D[S],T|=0;return T},b=n.__addimage__.validateStringAsBase64=function(D){(D=D||"").toString().trim();var S=!0;return D.length===0&&(S=!1),D.length%4!=0&&(S=!1),/^[A-Za-z0-9+/]+$/.test(D.substr(0,D.length-2))===!1&&(S=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(D.substr(-2))===!1&&(S=!1),S},H=n.__addimage__.extractImageFromDataUrl=function(D){if(D==null||!(D=D.trim()).startsWith("data:"))return null;var S=D.indexOf(",");return S<0?null:D.substring(0,S).trim().endsWith("base64")?D.substring(S+1):null};n.__addimage__.isArrayBuffer=function(D){return D instanceof ArrayBuffer};var $=n.__addimage__.isArrayBufferView=function(D){return D instanceof Int8Array||D instanceof Uint8Array||D instanceof Uint8ClampedArray||D instanceof Int16Array||D instanceof Uint16Array||D instanceof Int32Array||D instanceof Uint32Array||D instanceof Float32Array||D instanceof Float64Array},Y=n.__addimage__.binaryStringToUint8Array=function(D){for(var S=D.length,Q=new Uint8Array(S),T=0;T<S;T++)Q[T]=D.charCodeAt(T);return Q},V=n.__addimage__.arrayBufferToBinaryString=function(D){for(var S="",Q=$(D)?D:new Uint8Array(D),T=0;T<Q.length;T+=8192)S+=String.fromCharCode.apply(null,Q.subarray(T,T+8192));return S};n.addImage=function(){var D,S,Q,T,oe,X,F,M,R;if(typeof arguments[1]=="number"?(S=e,Q=arguments[1],T=arguments[2],oe=arguments[3],X=arguments[4],F=arguments[5],M=arguments[6],R=arguments[7]):(S=arguments[1],Q=arguments[2],T=arguments[3],oe=arguments[4],X=arguments[5],F=arguments[6],M=arguments[7],R=arguments[8]),hn(D=arguments[0])==="object"&&!g(D)&&"imageData"in D){var ae=D;D=ae.imageData,S=ae.format||S||e,Q=ae.x||Q||0,T=ae.y||T||0,oe=ae.w||ae.width||oe,X=ae.h||ae.height||X,F=ae.alias||F,M=ae.compression||M,R=ae.rotation||ae.angle||R}var J=this.internal.getFilters();if(M===void 0&&J.indexOf("FlateEncode")!==-1&&(M="SLOW"),isNaN(Q)||isNaN(T))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var k=L.call(this,D,S,F,M);return B.call(this,Q,T,oe,X,k,R),this};var L=function(D,S,Q,T){var oe,X,F;if(typeof D=="string"&&s(D)===e){D=unescape(D);var M=j(D,!1);(M!==""||(M=n.loadFile(D,!0))!==void 0)&&(D=M)}if(g(D)&&(D=d(D,S)),S=s(D,S),!h(S))throw new Error("addImage does not support files of type '"+S+"', please ensure that a plugin for '"+S+"' support is added.");if(((F=Q)==null||F.length===0)&&(Q=(function(R){return typeof R=="string"||$(R)?x(R):$(R.data)?x(R.data):null})(D)),(oe=m.call(this,Q))||(D instanceof Uint8Array||S==="RGBA"||(X=D,D=Y(D)),oe=this["process"+S.toUpperCase()](D,u.call(this),Q,(function(R){return R&&typeof R=="string"&&(R=R.toUpperCase()),R in n.image_compression?R:E.NONE})(T),X)),!oe)throw new Error("An unknown error occurred whilst processing the image.");return oe},j=n.__addimage__.convertBase64ToBinaryString=function(D,S){S=typeof S!="boolean"||S;var Q,T="";if(typeof D=="string"){var oe;Q=(oe=H(D))!==null&&oe!==void 0?oe:D;try{T=Iu(Q)}catch(X){if(S)throw b(Q)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+X.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return T};n.getImageProperties=function(D){var S,Q,T="";if(g(D)&&(D=d(D)),typeof D=="string"&&s(D)===e&&((T=j(D,!1))===""&&(T=n.loadFile(D)||""),D=T),Q=s(D),!h(Q))throw new Error("addImage does not support files of type '"+Q+"', please ensure that a plugin for '"+Q+"' support is added.");if(D instanceof Uint8Array||(D=Y(D)),!(S=this["process"+Q.toUpperCase()](D)))throw new Error("An unknown error occurred whilst processing the image");return S.fileType=Q,S}})(dr.API),(function(n){var t=function(e){if(e!==void 0&&e!="")return!0};dr.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),n.events.push(["putPage",function(e){for(var r,s,o,i=this.internal.getCoordinateString,A=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(e.objId),c=e.pageContext.annotations,u=!1,h=0;h<c.length&&!u;h++)switch((r=c[h]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(u!=0){this.internal.write("/Annots [");for(var g=0;g<c.length;g++){r=c[g];var d=this.internal.pdfEscape,m=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var y=this.internal.newAdditionalObject(),B=this.internal.newAdditionalObject(),w=this.internal.getEncryptor(y.objId),E=r.title||"Note";o="<</Type /Annot /Subtype /Text "+(s="/Rect ["+i(r.bounds.x)+" "+A(r.bounds.y+r.bounds.h)+" "+i(r.bounds.x+r.bounds.w)+" "+A(r.bounds.y)+"] ")+"/Contents ("+d(w(r.contents))+")",o+=" /Popup "+B.objId+" 0 R",o+=" /P "+l.objId+" 0 R",o+=" /T ("+d(w(E))+") >>",y.content=o;var x=y.objId+" 0 R";o="<</Type /Annot /Subtype /Popup "+(s="/Rect ["+i(r.bounds.x+30)+" "+A(r.bounds.y+r.bounds.h)+" "+i(r.bounds.x+r.bounds.w+30)+" "+A(r.bounds.y)+"] ")+" /Parent "+x,r.open&&(o+=" /Open true"),o+=" >>",B.content=o,this.internal.write(y.objId,"0 R",B.objId,"0 R");break;case"freetext":s="/Rect ["+i(r.bounds.x)+" "+A(r.bounds.y)+" "+i(r.bounds.x+r.bounds.w)+" "+A(r.bounds.y+r.bounds.h)+"] ";var b="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");o="<</Type /Annot /Subtype /FreeText "+s+"/Contents ("+d(m(r.contents))+")",o+=" /DS("+d(m(b))+")",o+=" /Border [0 0 0]",o+=" >>",this.internal.write(o);break;case"link":if(r.options.name){var H=this.annotations._nameMap[r.options.name];r.options.pageNumber=H.page,r.options.top=H.y}else r.options.top||(r.options.top=0);if(s="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",o="",r.options.url)o="<</Type /Annot /Subtype /Link "+s+"/Border [0 0 0] /A <</S /URI /URI ("+d(m(r.options.url))+") >>";else if(r.options.pageNumber)switch(o="<</Type /Annot /Subtype /Link "+s+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":o+=" /Fit]";break;case"FitH":o+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,o+=" /FitV "+r.options.left+"]";break;default:var $=A(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),o+=" /XYZ "+r.options.left+" "+$+" "+r.options.zoom+"]"}o!=""&&(o+=" >>",this.internal.write(o))}}this.internal.write("]")}}]),n.createAnnotation=function(e){var r=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":r.pageContext.annotations.push(e)}},n.link=function(e,r,s,o,i){var A=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;A.pageContext.annotations.push({finalBounds:{x:l(e),y:c(r),w:l(e+s),h:c(r+o)},options:i,type:"link"})},n.textWithLink=function(e,r,s,o){var i,A,l=this.getTextWidth(e),c=this.internal.getLineHeight()/this.internal.scaleFactor;if(o.maxWidth!==void 0){A=o.maxWidth;var u=this.splitTextToSize(e,A).length;i=Math.ceil(c*u)}else A=l,i=c;return this.text(e,r,s,o),s+=.2*c,o.align==="center"&&(r-=l/2),o.align==="right"&&(r-=l),this.link(r,s-c,A,i,o),l},n.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}})(dr.API),(function(n){var t={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]},e={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}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},s=[1570,1571,1573,1575];n.__arabicParser__={};var o=n.__arabicParser__.isInArabicSubstitutionA=function(y){return t[y.charCodeAt(0)]!==void 0},i=n.__arabicParser__.isArabicLetter=function(y){return typeof y=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(y)},A=n.__arabicParser__.isArabicEndLetter=function(y){return i(y)&&o(y)&&t[y.charCodeAt(0)].length<=2},l=n.__arabicParser__.isArabicAlfLetter=function(y){return i(y)&&s.indexOf(y.charCodeAt(0))>=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(y){return i(y)&&o(y)&&t[y.charCodeAt(0)].length>=1};var c=n.__arabicParser__.arabicLetterHasFinalForm=function(y){return i(y)&&o(y)&&t[y.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(y){return i(y)&&o(y)&&t[y.charCodeAt(0)].length>=3};var u=n.__arabicParser__.arabicLetterHasMedialForm=function(y){return i(y)&&o(y)&&t[y.charCodeAt(0)].length==4},h=n.__arabicParser__.resolveLigatures=function(y){var B=0,w=e,E="",x=0;for(B=0;B<y.length;B+=1)w[y.charCodeAt(B)]!==void 0?(x++,typeof(w=w[y.charCodeAt(B)])=="number"&&(E+=String.fromCharCode(w),w=e,x=0),B===y.length-1&&(w=e,E+=y.charAt(B-(x-1)),B-=x-1,x=0)):(w=e,E+=y.charAt(B-x),B-=x,x=0);return E};n.__arabicParser__.isArabicDiacritic=function(y){return y!==void 0&&r[y.charCodeAt(0)]!==void 0};var g=n.__arabicParser__.getCorrectForm=function(y,B,w){return i(y)?o(y)===!1?-1:!c(y)||!i(B)&&!i(w)||!i(w)&&A(B)||A(y)&&!i(B)||A(y)&&l(B)||A(y)&&A(B)?0:u(y)&&i(B)&&!A(B)&&i(w)&&c(w)?3:A(y)||!i(w)?1:2:-1},d=function(y){var B=0,w=0,E=0,x="",b="",H="",$=(y=y||"").split("\\s+"),Y=[];for(B=0;B<$.length;B+=1){for(Y.push(""),w=0;w<$[B].length;w+=1)x=$[B][w],b=$[B][w-1],H=$[B][w+1],i(x)?(E=g(x,b,H),Y[B]+=E!==-1?String.fromCharCode(t[x.charCodeAt(0)][E]):x):Y[B]+=x;Y[B]=h(Y[B])}return Y.join(" ")},m=n.__arabicParser__.processArabic=n.processArabic=function(){var y,B=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,w=[];if(Array.isArray(B)){var E=0;for(w=[],E=0;E<B.length;E+=1)Array.isArray(B[E])?w.push([d(B[E][0]),B[E][1],B[E][2]]):w.push([d(B[E])]);y=w}else y=d(B);return typeof arguments[0]=="string"?y:(arguments[0].text=y,arguments[0])};n.events.push(["preProcessText",m])})(dr.API),dr.API.autoPrint=function(n){var t;return(n=n||{}).variant=n.variant||"non-conform",n.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=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 "+t+" 0 R")})),this},(function(n){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(A){e=A}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(A){r=isNaN(A)||Number.isInteger(A)===!1||A<0?150:A,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var s=300;Object.defineProperty(this,"height",{get:function(){return s},set:function(A){s=isNaN(A)||Number.isInteger(A)===!1||A<0?300:A,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=s+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(A){o=A}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(A){i=A}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,r){var s;if((e=e||"2d")!=="2d")return null;for(s in r)this.pdf.context2d.hasOwnProperty(s)&&(this.pdf.context2d[s]=r[s]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(dr.API),(function(n){var t={left:0,top:0,bottom:0,right:0},e=!1,r=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({},t),this.internal.__cell__.margins.width=this.getPageWidth(),s.call(this))},s=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(y){l=y}});var c=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return c},set:function(y){c=y}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(y){u=y}});var h=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return h},set:function(y){h=y}});var g=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return g},set:function(y){g=y}});var d=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return d},set:function(y){d=y}});var m=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return m},set:function(y){m=y}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(l){return r.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},n.getTextDimensions=function(l,c){r.call(this);var u=(c=c||{}).fontSize||this.getFontSize(),h=c.font||this.getFont(),g=c.scaleFactor||this.internal.scaleFactor,d=0,m=0,y=0,B=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var w=c.maxWidth;w>0?typeof l=="string"?l=this.splitTextToSize(l,w):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(x,b){return x.concat(B.splitTextToSize(b,w))},[])):l=Array.isArray(l)?l:[l];for(var E=0;E<l.length;E++)d<(y=this.getStringUnitWidth(l[E],{font:h})*u)&&(d=y);return d!==0&&(m=l.length),{w:d/=g,h:Math.max((m*u*this.getLineHeightFactor()-u*(this.getLineHeightFactor()-1))/g,0)}},n.cellAddPage=function(){r.call(this),this.addPage();var l=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new o(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var i=n.cell=function(){var l;l=arguments[0]instanceof o?arguments[0]:new o(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var c=this.internal.__cell__.lastCell,u=this.internal.__cell__.padding,h=this.internal.__cell__.margins||t,g=this.internal.__cell__.tableHeaderRow,d=this.internal.__cell__.printHeaders;return c.lineNumber!==void 0&&(c.lineNumber===l.lineNumber?(l.x=(c.x||0)+(c.width||0),l.y=c.y||0):c.y+c.height+l.height+h.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=h.top,d&&g&&(this.printHeaderRow(l.lineNumber,!0),l.y+=g[0].height)):l.y=c.y+c.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,e===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-u,l.y+u,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+u,{align:"center",baseline:"top",maxWidth:l.width-u-u}):this.text(l.text,l.x+u,l.y+u,{align:"left",baseline:"top",maxWidth:l.width-u-u})),this.internal.__cell__.lastCell=l,this};n.table=function(l,c,u,h,g){if(r.call(this),!u)throw new Error("No data for PDF table.");var d,m,y,B,w=[],E=[],x=[],b={},H={},$=[],Y=[],V=(g=g||{}).autoSize||!1,L=g.printHeaders!==!1,j=g.css&&g.css["font-size"]!==void 0?16*g.css["font-size"]:g.fontSize||12,D=g.margins||Object.assign({width:this.getPageWidth()},t),S=typeof g.padding=="number"?g.padding:3,Q=g.headerBackgroundColor||"#c8c8c8",T=g.headerTextColor||"#000";if(s.call(this),this.internal.__cell__.printHeaders=L,this.internal.__cell__.margins=D,this.internal.__cell__.table_font_size=j,this.internal.__cell__.padding=S,this.internal.__cell__.headerBackgroundColor=Q,this.internal.__cell__.headerTextColor=T,this.setFontSize(j),h==null)E=w=Object.keys(u[0]),x=w.map(function(){return"left"});else if(Array.isArray(h)&&hn(h[0])==="object")for(w=h.map(function(ae){return ae.name}),E=h.map(function(ae){return ae.prompt||ae.name||""}),x=h.map(function(ae){return ae.align||"left"}),d=0;d<h.length;d+=1)H[h[d].name]=.7499990551181103*h[d].width;else Array.isArray(h)&&typeof h[0]=="string"&&(E=w=h,x=w.map(function(){return"left"}));if(V||Array.isArray(h)&&typeof h[0]=="string")for(d=0;d<w.length;d+=1){for(b[B=w[d]]=u.map(function(ae){return ae[B]}),this.setFont(void 0,"bold"),$.push(this.getTextDimensions(E[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),m=b[B],this.setFont(void 0,"normal"),y=0;y<m.length;y+=1)$.push(this.getTextDimensions(m[y],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);H[B]=Math.max.apply(null,$)+S+S,$=[]}if(L){var oe={};for(d=0;d<w.length;d+=1)oe[w[d]]={},oe[w[d]].text=E[d],oe[w[d]].align=x[d];var X=A.call(this,oe,H);Y=w.map(function(ae){return new o(l,c,H[ae],X,oe[ae].text,void 0,oe[ae].align)}),this.setTableHeaderRow(Y),this.printHeaderRow(1,!1)}var F=h.reduce(function(ae,J){return ae[J.name]=J.align,ae},{});for(d=0;d<u.length;d+=1){"rowStart"in g&&g.rowStart instanceof Function&&g.rowStart({row:d,data:u[d]},this);var M=A.call(this,u[d],H);for(y=0;y<w.length;y+=1){var R=u[d][w[y]];"cellStart"in g&&g.cellStart instanceof Function&&g.cellStart({row:d,col:y,data:R},this),i.call(this,new o(l,c,H[w[y]],M,R,d+2,F[w[y]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=c,this};var A=function(l,c){var u=this.internal.__cell__.padding,h=this.internal.__cell__.table_font_size,g=this.internal.scaleFactor;return Object.keys(l).map(function(d){var m=l[d];return this.splitTextToSize(m.hasOwnProperty("text")?m.text:m,c[d]-u-u)},this).map(function(d){return this.getLineHeightFactor()*d.length*h/g+u+u},this).reduce(function(d,m){return Math.max(d,m)},0)};n.setTableHeaderRow=function(l){r.call(this),this.internal.__cell__.tableHeaderRow=l},n.printHeaderRow=function(l,c){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var u;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var h=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(h[0],h[1],h[2],h[3],void 0,-1)}this.setFont(void 0,"bold");for(var g=[],d=0;d<this.internal.__cell__.tableHeaderRow.length;d+=1){u=this.internal.__cell__.tableHeaderRow[d].clone(),c&&(u.y=this.internal.__cell__.margins.top||0,g.push(u)),u.lineNumber=l;var m=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),i.call(this,u),this.setTextColor(m)}g.length>0&&this.setTableHeaderRow(g),this.setFont(void 0,"normal"),e=!1}})(dr.API);var LC={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},UC=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Kp=FC(UC),IC=[100,200,300,400,500,600,700,800,900],aN=FC(IC);function uf(n){var t=n.family.replace(/"|'/g,"").toLowerCase(),e=(function(o){return LC[o=o||"normal"]?o:"normal"})(n.style),r=(function(o){return o?typeof o=="number"?o>=100&&o<=900&&o%100==0?o:400:/^\d00$/.test(o)?parseInt(o):o==="bold"?700:400:400})(n.weight),s=(function(o){return typeof Kp[o=o||"normal"]=="number"?o:"normal"})(n.stretch);return{family:t,style:e,weight:r,stretch:s,src:n.src||[],ref:n.ref||{name:t,style:[s,e,r].join(" ")}}}function u1(n,t,e,r){var s;for(s=e;s>=0&&s<t.length;s+=r)if(n[t[s]])return n[t[s]];for(s=e;s>=0&&s<t.length;s-=r)if(n[t[s]])return n[t[s]]}var sN={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},d1={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function f1(n){return[n.stretch,n.style,n.weight,n.family].join(" ")}function h1(n){return n.trimLeft()}function oN(n,t){for(var e=0;e<n.length;){if(n.charAt(e)===t)return[n.substring(0,e),n.substring(e+1)];e+=1}return null}function AN(n){var t=n.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],n.substring(t[0].length)]}var Ki,tu,g1,p1,v1,df=["times"];function m1(n,t,e,r,s){var o=4,i=y1;switch(s){case dr.API.image_compression.FAST:o=1,i=w1;break;case dr.API.image_compression.MEDIUM:o=6,i=B1;break;case dr.API.image_compression.SLOW:o=9,i=b1}n=(function(l,c,u,h){for(var g,d=l.length/c,m=new Uint8Array(l.length+d),y=[iN,w1,y1,B1,b1],B=0;B<d;B+=1){var w=B*c,E=l.subarray(w,w+c);if(h)m.set(h(E,u,g),w+B);else{for(var x=y.length,b=[],H=0;H<x;H+=1)b[H]=y[H](E,u,g);var $=cN(b.concat());m.set(b[$],w+B)}g=E}return m})(n,t,Math.ceil(e*r/8),i);var A=_p(n,{level:o});return dr.API.__addimage__.arrayBufferToBinaryString(A)}function iN(n){var t=Array.apply([],n);return t.unshift(0),t}function w1(n,t){var e=n.length,r=[];r[0]=1;for(var s=0;s<e;s+=1){var o=n[s-t]||0;r[s+1]=n[s]-o+256&255}return r}function y1(n,t,e){var r=n.length,s=[];s[0]=2;for(var o=0;o<r;o+=1){var i=e&&e[o]||0;s[o+1]=n[o]-i+256&255}return s}function B1(n,t,e){var r=n.length,s=[];s[0]=3;for(var o=0;o<r;o+=1){var i=n[o-t]||0,A=e&&e[o]||0;s[o+1]=n[o]+256-(i+A>>>1)&255}return s}function b1(n,t,e){var r=n.length,s=[];s[0]=4;for(var o=0;o<r;o+=1){var i=lN(n[o-t]||0,e&&e[o]||0,e&&e[o-t]||0);s[o+1]=n[o]-i+256&255}return s}function lN(n,t,e){if(n===t&&t===e)return n;var r=Math.abs(t-e),s=Math.abs(n-e),o=Math.abs(n+t-e-e);return r<=s&&r<=o?n:s<=o?t:e}function cN(n){var t=n.map(function(e){return e.reduce(function(r,s){return r+Math.abs(s)},0)});return t.indexOf(Math.min.apply(null,t))}function ff(n,t,e){var r=t*e,s=Math.floor(r/8),o=16-(r-8*s+e),i=(1<<e)-1;return MC(n,s)>>o&i}function C1(n,t,e,r){var s=e*r,o=Math.floor(s/8),i=16-(s-8*o+r),A=(1<<r)-1,l=(t&A)<<i;(function(c,u,h){if(u+1<c.byteLength)c.setUint16(u,h,!1);else{var g=h>>8&255;c.setUint8(u,g)}})(n,o,MC(n,o)&~(A<<i)&65535|l)}function MC(n,t){return t+1<n.byteLength?n.getUint16(t,!1):n.getUint8(t)<<8}function uN(n){var t=0;if(n[t++]!==71||n[t++]!==73||n[t++]!==70||n[t++]!==56||(n[t++]+1&253)!=56||n[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=n[t++]|n[t++]<<8,r=n[t++]|n[t++]<<8,s=n[t++],o=s>>7,i=1<<1+(7&s);n[t++],n[t++];var A=null,l=null;o&&(A=t,l=i,t+=3*i);var c=!0,u=[],h=0,g=null,d=0,m=null;for(this.width=e,this.height=r;c&&t<n.length;)switch(n[t++]){case 33:switch(n[t++]){case 255:if(n[t]!==11||n[t+1]==78&&n[t+2]==69&&n[t+3]==84&&n[t+4]==83&&n[t+5]==67&&n[t+6]==65&&n[t+7]==80&&n[t+8]==69&&n[t+9]==50&&n[t+10]==46&&n[t+11]==48&&n[t+12]==3&&n[t+13]==1&&n[t+16]==0)t+=14,m=n[t++]|n[t++]<<8,t++;else for(t+=12;;){if(!((D=n[t++])>=0))throw Error("Invalid block size");if(D===0)break;t+=D}break;case 249:if(n[t++]!==4||n[t+4]!==0)throw new Error("Invalid graphics extension block.");var y=n[t++];h=n[t++]|n[t++]<<8,g=n[t++],1&y||(g=null),d=y>>2&7,t++;break;case 254:for(;;){if(!((D=n[t++])>=0))throw Error("Invalid block size");if(D===0)break;t+=D}break;default:throw new Error("Unknown graphic control label: 0x"+n[t-1].toString(16))}break;case 44:var B=n[t++]|n[t++]<<8,w=n[t++]|n[t++]<<8,E=n[t++]|n[t++]<<8,x=n[t++]|n[t++]<<8,b=n[t++],H=b>>6&1,$=1<<1+(7&b),Y=A,V=l,L=!1;b>>7&&(L=!0,Y=t,V=$,t+=3*$);var j=t;for(t++;;){var D;if(!((D=n[t++])>=0))throw Error("Invalid block size");if(D===0)break;t+=D}u.push({x:B,y:w,width:E,height:x,has_local_palette:L,palette_offset:Y,palette_size:V,data_offset:j,data_length:t-j,transparent_index:g,interlaced:!!H,delay:h,disposal:d});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+n[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return m},this.frameInfo=function(S){if(S<0||S>=u.length)throw new Error("Frame index out of range.");return u[S]},this.decodeAndBlitFrameBGRA=function(S,Q){var T=this.frameInfo(S),oe=T.width*T.height;if(oe>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var X=new Uint8Array(oe);k1(n,T.data_offset,X,oe);var F=T.palette_offset,M=T.transparent_index;M===null&&(M=256);var R=T.width,ae=e-R,J=R,k=4*(T.y*e+T.x),O=4*((T.y+T.height)*e+T.x),N=k,Z=4*ae;T.interlaced===!0&&(Z+=4*e*7);for(var se=8,ge=0,fe=X.length;ge<fe;++ge){var Ae=X[ge];if(J===0&&(J=R,(N+=Z)>=O&&(Z=4*ae+4*e*(se-1),N=k+(R+ae)*(se<<1),se>>=1)),Ae===M)N+=4;else{var Fe=n[F+3*Ae],be=n[F+3*Ae+1],Ke=n[F+3*Ae+2];Q[N++]=Ke,Q[N++]=be,Q[N++]=Fe,Q[N++]=255}--J}},this.decodeAndBlitFrameRGBA=function(S,Q){var T=this.frameInfo(S),oe=T.width*T.height;if(oe>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var X=new Uint8Array(oe);k1(n,T.data_offset,X,oe);var F=T.palette_offset,M=T.transparent_index;M===null&&(M=256);var R=T.width,ae=e-R,J=R,k=4*(T.y*e+T.x),O=4*((T.y+T.height)*e+T.x),N=k,Z=4*ae;T.interlaced===!0&&(Z+=4*e*7);for(var se=8,ge=0,fe=X.length;ge<fe;++ge){var Ae=X[ge];if(J===0&&(J=R,(N+=Z)>=O&&(Z=4*ae+4*e*(se-1),N=k+(R+ae)*(se<<1),se>>=1)),Ae===M)N+=4;else{var Fe=n[F+3*Ae],be=n[F+3*Ae+1],Ke=n[F+3*Ae+2];Q[N++]=Fe,Q[N++]=be,Q[N++]=Ke,Q[N++]=255}--J}}}function k1(n,t,e,r){for(var s=n[t++],o=1<<s,i=o+1,A=i+1,l=s+1,c=(1<<l)-1,u=0,h=0,g=0,d=n[t++],m=new Int32Array(4096),y=null;;){for(;u<16&&d!==0;)h|=n[t++]<<u,u+=8,d===1?d=n[t++]:--d;if(u<l)break;var B=h&c;if(h>>=l,u-=l,B!==o){if(B===i)break;for(var w=B<A?B:y,E=0,x=w;x>o;)x=m[x]>>8,++E;var b=x;if(g+E+(w!==B?1:0)>r)return void Ln.log("Warning, gif stream longer than expected.");e[g++]=b;var H=g+=E;for(w!==B&&(e[g++]=b),x=w;E--;)x=m[x],e[--H]=255&x,x>>=8;y!==null&&A<4096&&(m[A++]=y<<8|b,A>=c+1&&l<12&&(++l,c=c<<1|1)),y=B}else A=i+1,c=(1<<(l=s+1))-1,y=null}return g!==r&&Ln.log("Warning, gif stream shorter than expected."),e}/**
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function hf(n){var t,e,r,s,o,i=Math.floor,A=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),h=new Array(65535),g=new Array(65535),d=new Array(64),m=new Array(64),y=[],B=0,w=7,E=new Array(64),x=new Array(64),b=new Array(64),H=new Array(256),$=new Array(2048),Y=[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],V=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[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],S=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Q=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],oe=[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 X(k,O){for(var N=0,Z=0,se=new Array,ge=1;ge<=16;ge++){for(var fe=1;fe<=k[ge];fe++)se[O[Z]]=[],se[O[Z]][0]=N,se[O[Z]][1]=ge,Z++,N++;N*=2}return se}function F(k){for(var O=k[0],N=k[1]-1;N>=0;)O&1<<N&&(B|=1<<w),N--,--w<0&&(B==255?(M(255),M(0)):M(B),w=7,B=0)}function M(k){y.push(k)}function R(k){M(k>>8&255),M(255&k)}function ae(k,O,N,Z,se){for(var ge,fe=se[0],Ae=se[240],Fe=(function(Te,Et){var ot,yt,pt,Oe,it,W,z,ye,qe,ct,$e=0;for(qe=0;qe<8;++qe){ot=Te[$e],yt=Te[$e+1],pt=Te[$e+2],Oe=Te[$e+3],it=Te[$e+4],W=Te[$e+5],z=Te[$e+6];var Ve=ot+(ye=Te[$e+7]),Mt=ot-ye,tt=yt+z,_t=yt-z,rr=pt+W,St=pt-W,hr=Oe+it,Vt=Oe-it,Xt=Ve+hr,mr=Ve-hr,Kt=tt+rr,jt=tt-rr;Te[$e]=Xt+Kt,Te[$e+4]=Xt-Kt;var We=.707106781*(jt+mr);Te[$e+2]=mr+We,Te[$e+6]=mr-We;var ze=.382683433*((Xt=Vt+St)-(jt=_t+Mt)),ft=.5411961*Xt+ze,Lt=1.306562965*jt+ze,ar=.707106781*(Kt=St+_t),Rt=Mt+ar,cr=Mt-ar;Te[$e+5]=cr+ft,Te[$e+3]=cr-ft,Te[$e+1]=Rt+Lt,Te[$e+7]=Rt-Lt,$e+=8}for($e=0,qe=0;qe<8;++qe){ot=Te[$e],yt=Te[$e+8],pt=Te[$e+16],Oe=Te[$e+24],it=Te[$e+32],W=Te[$e+40],z=Te[$e+48];var qr=ot+(ye=Te[$e+56]),Kr=ot-ye,on=yt+z,Fr=yt-z,Jr=pt+W,An=pt-W,ta=Oe+it,ra=Oe-it,xn=qr+ta,Nr=qr-ta,dn=on+Jr,Gn=on-Jr;Te[$e]=xn+dn,Te[$e+32]=xn-dn;var zn=.707106781*(Gn+Nr);Te[$e+16]=Nr+zn,Te[$e+48]=Nr-zn;var ln=.382683433*((xn=ra+An)-(Gn=Fr+Kr)),En=.5411961*xn+ln,xa=1.306562965*Gn+ln,Ra=.707106781*(dn=An+Fr),na=Kr+Ra,Ss=Kr-Ra;Te[$e+40]=Ss+En,Te[$e+24]=Ss-En,Te[$e+8]=na+xa,Te[$e+56]=na-xa,$e++}for(qe=0;qe<64;++qe)ct=Te[qe]*Et[qe],d[qe]=ct>0?ct+.5|0:ct-.5|0;return d})(k,O),be=0;be<64;++be)m[Y[be]]=Fe[be];var Ke=m[0]-N;N=m[0],Ke==0?F(Z[0]):(F(Z[g[ge=32767+Ke]]),F(h[ge]));for(var Xe=63;Xe>0&&m[Xe]==0;)Xe--;if(Xe==0)return F(fe),N;for(var xe,te=1;te<=Xe;){for(var lt=te;m[te]==0&&te<=Xe;)++te;var Pe=te-lt;if(Pe>=16){xe=Pe>>4;for(var rt=1;rt<=xe;++rt)F(Ae);Pe&=15}ge=32767+m[te],F(se[(Pe<<4)+g[ge]]),F(h[ge]),te++}return Xe!=63&&F(fe),N}function J(k){k=Math.min(Math.max(k,1),100),o!=k&&((function(O){for(var N=[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],Z=0;Z<64;Z++){var se=i((N[Z]*O+50)/100);se=Math.min(Math.max(se,1),255),A[Y[Z]]=se}for(var ge=[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],fe=0;fe<64;fe++){var Ae=i((ge[fe]*O+50)/100);Ae=Math.min(Math.max(Ae,1),255),l[Y[fe]]=Ae}for(var Fe=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],be=0,Ke=0;Ke<8;Ke++)for(var Xe=0;Xe<8;Xe++)c[be]=1/(A[Y[be]]*Fe[Ke]*Fe[Xe]*8),u[be]=1/(l[Y[be]]*Fe[Ke]*Fe[Xe]*8),be++})(k<50?Math.floor(5e3/k):Math.floor(200-2*k)),o=k)}this.encode=function(k,O){O&&J(O),y=new Array,B=0,w=7,R(65496),R(65504),R(16),M(74),M(70),M(73),M(70),M(0),M(1),M(1),M(0),R(1),R(1),M(0),M(0),(function(){R(65499),R(132),M(0);for(var yt=0;yt<64;yt++)M(A[yt]);M(1);for(var pt=0;pt<64;pt++)M(l[pt])})(),(function(yt,pt){R(65472),R(17),M(8),R(pt),R(yt),M(3),M(1),M(17),M(0),M(2),M(17),M(1),M(3),M(17),M(1)})(k.width,k.height),(function(){R(65476),R(418),M(0);for(var yt=0;yt<16;yt++)M(V[yt+1]);for(var pt=0;pt<=11;pt++)M(L[pt]);M(16);for(var Oe=0;Oe<16;Oe++)M(j[Oe+1]);for(var it=0;it<=161;it++)M(D[it]);M(1);for(var W=0;W<16;W++)M(S[W+1]);for(var z=0;z<=11;z++)M(Q[z]);M(17);for(var ye=0;ye<16;ye++)M(T[ye+1]);for(var qe=0;qe<=161;qe++)M(oe[qe])})(),R(65498),R(12),M(3),M(1),M(0),M(2),M(17),M(3),M(17),M(0),M(63),M(0);var N=0,Z=0,se=0;B=0,w=7,this.encode.displayName="_encode_";for(var ge,fe,Ae,Fe,be,Ke,Xe,xe,te,lt=k.data,Pe=k.width,rt=k.height,Te=4*Pe,Et=0;Et<rt;){for(ge=0;ge<Te;){for(be=Te*Et+ge,Xe=-1,xe=0,te=0;te<64;te++)Ke=be+(xe=te>>3)*Te+(Xe=4*(7&te)),Et+xe>=rt&&(Ke-=Te*(Et+1+xe-rt)),ge+Xe>=Te&&(Ke-=ge+Xe-Te+4),fe=lt[Ke++],Ae=lt[Ke++],Fe=lt[Ke++],E[te]=($[fe]+$[Ae+256|0]+$[Fe+512|0]>>16)-128,x[te]=($[fe+768|0]+$[Ae+1024|0]+$[Fe+1280|0]>>16)-128,b[te]=($[fe+1280|0]+$[Ae+1536|0]+$[Fe+1792|0]>>16)-128;N=ae(E,c,N,t,r),Z=ae(x,u,Z,e,s),se=ae(b,u,se,e,s),ge+=32}Et+=8}if(w>=0){var ot=[];ot[1]=w+1,ot[0]=(1<<w+1)-1,F(ot)}return R(65497),new Uint8Array(y)},n=n||50,(function(){for(var k=String.fromCharCode,O=0;O<256;O++)H[O]=k(O)})(),t=X(V,L),e=X(S,Q),r=X(j,D),s=X(T,oe),(function(){for(var k=1,O=2,N=1;N<=15;N++){for(var Z=k;Z<O;Z++)g[32767+Z]=N,h[32767+Z]=[],h[32767+Z][1]=N,h[32767+Z][0]=Z;for(var se=-(O-1);se<=-k;se++)g[32767+se]=N,h[32767+se]=[],h[32767+se][1]=N,h[32767+se][0]=O-1+se;k<<=1,O<<=1}})(),(function(){for(var k=0;k<256;k++)$[k]=19595*k,$[k+256|0]=38470*k,$[k+512|0]=7471*k+32768,$[k+768|0]=-11059*k,$[k+1024|0]=-21709*k,$[k+1280|0]=32768*k+8421375,$[k+1536|0]=-27439*k,$[k+1792|0]=-5329*k})(),J(n)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function Qo(n,t){if(this.pos=0,this.buffer=n,this.datav=new DataView(n.buffer),this.is_with_alpha=!!t,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 new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function E1(n){function t(L){if(!L)throw Error("assert :P")}function e(L,j,D){for(var S=0;4>S;S++)if(L[j+S]!=D.charCodeAt(S))return!0;return!1}function r(L,j,D,S,Q){for(var T=0;T<Q;T++)L[j+T]=D[S+T]}function s(L,j,D,S){for(var Q=0;Q<S;Q++)L[j+Q]=D}function o(L){return new Int32Array(L)}function i(L,j){for(var D=[],S=0;S<L;S++)D.push(new j);return D}function A(L,j){var D=[];return(function S(Q,T,oe){for(var X=oe[T],F=0;F<X&&(Q.push(oe.length>T+1?[]:new j),!(oe.length<T+1));F++)S(Q[F],T+1,oe)})(D,0,L),D}var l=function(){var L=this;function j(f,p){for(var C=1<<p-1>>>0;f&C;)C>>>=1;return C?(f&C-1)+C:f}function D(f,p,C,U,K){t(!(U%C));do f[p+(U-=C)]=K;while(0<U)}function S(f,p,C,U,K){if(t(2328>=K),512>=K)var ee=o(512);else if((ee=o(K))==null)return 0;return(function(ne,ie,le,ve,Ie,et){var me,Ne,je=ie,vt=1<<le,Ze=o(16),wt=o(16);for(t(Ie!=0),t(ve!=null),t(ne!=null),t(0<le),Ne=0;Ne<Ie;++Ne){if(15<ve[Ne])return 0;++Ze[ve[Ne]]}if(Ze[0]==Ie)return 0;for(wt[1]=0,me=1;15>me;++me){if(Ze[me]>1<<me)return 0;wt[me+1]=wt[me]+Ze[me]}for(Ne=0;Ne<Ie;++Ne)me=ve[Ne],0<ve[Ne]&&(et[wt[me]++]=Ne);if(wt[15]==1)return(ve=new Q).g=0,ve.value=et[0],D(ne,je,1,vt,ve),vt;var bt,Nt=-1,Ft=vt-1,ur=0,sr=1,Hr=1,ir=1<<le;for(Ne=0,me=1,Ie=2;me<=le;++me,Ie<<=1){if(sr+=Hr<<=1,0>(Hr-=Ze[me]))return 0;for(;0<Ze[me];--Ze[me])(ve=new Q).g=me,ve.value=et[Ne++],D(ne,je+ur,Ie,ir,ve),ur=j(ur,me)}for(me=le+1,Ie=2;15>=me;++me,Ie<<=1){if(sr+=Hr<<=1,0>(Hr-=Ze[me]))return 0;for(;0<Ze[me];--Ze[me]){if(ve=new Q,(ur&Ft)!=Nt){for(je+=ir,bt=1<<(Nt=me)-le;15>Nt&&!(0>=(bt-=Ze[Nt]));)++Nt,bt<<=1;vt+=ir=1<<(bt=Nt-le),ne[ie+(Nt=ur&Ft)].g=bt+le,ne[ie+Nt].value=je-ie-Nt}ve.g=me-le,ve.value=et[Ne++],D(ne,je+(ur>>le),Ie,ir,ve),ur=j(ur,me)}}return sr!=2*wt[15]-1?0:vt})(f,p,C,U,K,ee)}function Q(){this.value=this.g=0}function T(){this.value=this.g=0}function oe(){this.G=i(5,Q),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=i(ko,T)}function X(f,p,C,U){t(f!=null),t(p!=null),t(2147483648>U),f.Ca=254,f.I=0,f.b=-8,f.Ka=0,f.oa=p,f.pa=C,f.Jd=p,f.Yc=C+U,f.Zc=4<=U?C+U-4+1:C,fe(f)}function F(f,p){for(var C=0;0<p--;)C|=Fe(f,128)<<p;return C}function M(f,p){var C=F(f,p);return Ae(f)?-C:C}function R(f,p,C,U){var K,ee=0;for(t(f!=null),t(p!=null),t(4294967288>U),f.Sb=U,f.Ra=0,f.u=0,f.h=0,4<U&&(U=4),K=0;K<U;++K)ee+=p[C+K]<<8*K;f.Ra=ee,f.bb=U,f.oa=p,f.pa=C}function ae(f){for(;8<=f.u&&f.bb<f.Sb;)f.Ra>>>=8,f.Ra+=f.oa[f.pa+f.bb]<<Ga-8>>>0,++f.bb,f.u-=8;Z(f)&&(f.h=1,f.u=0)}function J(f,p){if(t(0<=p),!f.h&&p<=MA){var C=N(f)&Yo[p];return f.u+=p,ae(f),C}return f.h=1,f.u=0}function k(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function O(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function N(f){return f.Ra>>>(f.u&Ga-1)>>>0}function Z(f){return t(f.bb<=f.Sb),f.h||f.bb==f.Sb&&f.u>Ga}function se(f,p){f.u=p,f.h=Z(f)}function ge(f){f.u>=ss&&(t(f.u>=ss),ae(f))}function fe(f){t(f!=null&&f.oa!=null),f.pa<f.Zc?(f.I=(f.oa[f.pa++]|f.I<<8)>>>0,f.b+=8):(t(f!=null&&f.oa!=null),f.pa<f.Yc?(f.b+=8,f.I=f.oa[f.pa++]|f.I<<8):f.Ka?f.b=0:(f.I<<=8,f.b+=8,f.Ka=1))}function Ae(f){return F(f,1)}function Fe(f,p){var C=f.Ca;0>f.b&&fe(f);var U=f.b,K=C*p>>>8,ee=(f.I>>>U>K)+0;for(ee?(C-=K,f.I-=K+1<<U>>>0):C=K+1,U=C,K=0;256<=U;)K+=8,U>>=8;return U=7^K+dA[U],f.b-=U,f.Ca=(C<<U)-1,ee}function be(f,p,C){f[p+0]=C>>24&255,f[p+1]=C>>16&255,f[p+2]=C>>8&255,f[p+3]=255&C}function Ke(f,p){return f[p+0]|f[p+1]<<8}function Xe(f,p){return Ke(f,p)|f[p+2]<<16}function xe(f,p){return Ke(f,p)|Ke(f,p+2)<<16}function te(f,p){var C=1<<p;return t(f!=null),t(0<p),f.X=o(C),f.X==null?0:(f.Mb=32-p,f.Xa=p,1)}function lt(f,p){t(f!=null),t(p!=null),t(f.Xa==p.Xa),r(p.X,0,f.X,0,1<<p.Xa)}function Pe(){this.X=[],this.Xa=this.Mb=0}function rt(f,p,C,U){t(C!=null),t(U!=null);var K=C[0],ee=U[0];return K==0&&(K=(f*ee+p/2)/p),ee==0&&(ee=(p*K+f/2)/f),0>=K||0>=ee?0:(C[0]=K,U[0]=ee,1)}function Te(f,p){return f+(1<<p)-1>>>p}function Et(f,p){return((4278255360&f)+(4278255360&p)>>>0&4278255360)+((16711935&f)+(16711935&p)>>>0&16711935)>>>0}function ot(f,p){L[p]=function(C,U,K,ee,ne,ie,le){var ve;for(ve=0;ve<ne;++ve){var Ie=L[f](ie[le+ve-1],K,ee+ve);ie[le+ve]=Et(C[U+ve],Ie)}}}function yt(){this.ud=this.hd=this.jd=0}function pt(f,p){return((4278124286&(f^p))>>>1)+(f&p)>>>0}function Oe(f){return 0<=f&&256>f?f:0>f?0:255<f?255:void 0}function it(f,p){return Oe(f+(f-p+.5>>1))}function W(f,p,C){return Math.abs(p-C)-Math.abs(f-C)}function z(f,p,C,U,K,ee,ne){for(U=ee[ne-1],C=0;C<K;++C)ee[ne+C]=U=Et(f[p+C],U)}function ye(f,p,C,U,K){var ee;for(ee=0;ee<C;++ee){var ne=f[p+ee],ie=ne>>8&255,le=16711935&(le=(le=16711935&ne)+((ie<<16)+ie));U[K+ee]=(4278255360&ne)+le>>>0}}function qe(f,p){p.jd=255&f,p.hd=f>>8&255,p.ud=f>>16&255}function ct(f,p,C,U,K,ee){var ne;for(ne=0;ne<U;++ne){var ie=p[C+ne],le=ie>>>8,ve=ie,Ie=255&(Ie=(Ie=ie>>>16)+((f.jd<<24>>24)*(le<<24>>24)>>>5));ve=255&(ve=(ve+=(f.hd<<24>>24)*(le<<24>>24)>>>5)+((f.ud<<24>>24)*(Ie<<24>>24)>>>5)),K[ee+ne]=(4278255360&ie)+(Ie<<16)+ve}}function $e(f,p,C,U,K){L[p]=function(ee,ne,ie,le,ve,Ie,et,me,Ne){for(le=et;le<me;++le)for(et=0;et<Ne;++et)ve[Ie++]=K(ie[U(ee[ne++])])},L[f]=function(ee,ne,ie,le,ve,Ie,et){var me=8>>ee.b,Ne=ee.Ea,je=ee.K[0],vt=ee.w;if(8>me)for(ee=(1<<ee.b)-1,vt=(1<<me)-1;ne<ie;++ne){var Ze,wt=0;for(Ze=0;Ze<Ne;++Ze)Ze&ee||(wt=U(le[ve++])),Ie[et++]=K(je[wt&vt]),wt>>=me}else L["VP8LMapColor"+C](le,ve,je,vt,Ie,et,ne,ie,Ne)}}function Ve(f,p,C,U,K){for(C=p+C;p<C;){var ee=f[p++];U[K++]=ee>>16&255,U[K++]=ee>>8&255,U[K++]=255&ee}}function Mt(f,p,C,U,K){for(C=p+C;p<C;){var ee=f[p++];U[K++]=ee>>16&255,U[K++]=ee>>8&255,U[K++]=255&ee,U[K++]=ee>>24&255}}function tt(f,p,C,U,K){for(C=p+C;p<C;){var ee=(ne=f[p++])>>16&240|ne>>12&15,ne=240&ne|ne>>28&15;U[K++]=ee,U[K++]=ne}}function _t(f,p,C,U,K){for(C=p+C;p<C;){var ee=(ne=f[p++])>>16&248|ne>>13&7,ne=ne>>5&224|ne>>3&31;U[K++]=ee,U[K++]=ne}}function rr(f,p,C,U,K){for(C=p+C;p<C;){var ee=f[p++];U[K++]=255&ee,U[K++]=ee>>8&255,U[K++]=ee>>16&255}}function St(f,p,C,U,K,ee){if(ee==0)for(C=p+C;p<C;)be(U,((ee=f[p++])[0]>>24|ee[1]>>8&65280|ee[2]<<8&16711680|ee[3]<<24)>>>0),K+=32;else r(U,K,f,p,C)}function hr(f,p){L[p][0]=L[f+"0"],L[p][1]=L[f+"1"],L[p][2]=L[f+"2"],L[p][3]=L[f+"3"],L[p][4]=L[f+"4"],L[p][5]=L[f+"5"],L[p][6]=L[f+"6"],L[p][7]=L[f+"7"],L[p][8]=L[f+"8"],L[p][9]=L[f+"9"],L[p][10]=L[f+"10"],L[p][11]=L[f+"11"],L[p][12]=L[f+"12"],L[p][13]=L[f+"13"],L[p][14]=L[f+"0"],L[p][15]=L[f+"0"]}function Vt(f){return f==gt||f==He||f==dt||f==Qt}function Xt(){this.eb=[],this.size=this.A=this.fb=0}function mr(){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 Kt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Xt,this.f.kb=new mr,this.sd=null}function jt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function We(){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 ze(f){return alert("todo:WebPSamplerProcessPlane"),f.T}function ft(f,p){var C=f.T,U=p.ba.f.RGBA,K=U.eb,ee=U.fb+f.ka*U.A,ne=Ls[p.ba.S],ie=f.y,le=f.O,ve=f.f,Ie=f.N,et=f.ea,me=f.W,Ne=p.cc,je=p.dc,vt=p.Mc,Ze=p.Nc,wt=f.ka,bt=f.ka+f.T,Nt=f.U,Ft=Nt+1>>1;for(wt==0?ne(ie,le,null,null,ve,Ie,et,me,ve,Ie,et,me,K,ee,null,null,Nt):(ne(p.ec,p.fc,ie,le,Ne,je,vt,Ze,ve,Ie,et,me,K,ee-U.A,K,ee,Nt),++C);wt+2<bt;wt+=2)Ne=ve,je=Ie,vt=et,Ze=me,Ie+=f.Rc,me+=f.Rc,ee+=2*U.A,ne(ie,(le+=2*f.fa)-f.fa,ie,le,Ne,je,vt,Ze,ve,Ie,et,me,K,ee-U.A,K,ee,Nt);return le+=f.fa,f.j+bt<f.o?(r(p.ec,p.fc,ie,le,Nt),r(p.cc,p.dc,ve,Ie,Ft),r(p.Mc,p.Nc,et,me,Ft),C--):1&bt||ne(ie,le,null,null,ve,Ie,et,me,ve,Ie,et,me,K,ee+U.A,null,null,Nt),C}function Lt(f,p,C){var U=f.F,K=[f.J];if(U!=null){var ee=f.U,ne=p.ba.S,ie=ne==Se||ne==dt;p=p.ba.f.RGBA;var le=[0],ve=f.ka;le[0]=f.T,f.Kb&&(ve==0?--le[0]:(--ve,K[0]-=f.width),f.j+f.ka+f.T==f.o&&(le[0]=f.o-f.j-ve));var Ie=p.eb;ve=p.fb+ve*p.A,f=ci(U,K[0],f.width,ee,le,Ie,ve+(ie?0:3),p.A),t(C==le),f&&Vt(ne)&&zo(Ie,ve,ie,ee,le,p.A)}return 0}function ar(f){var p=f.ma,C=p.ba.S,U=11>C,K=C==Be||C==Ue||C==Se||C==_e||C==12||Vt(C);if(p.memory=null,p.Ib=null,p.Jb=null,p.Nd=null,!Ws(p.Oa,f,K?11:12))return 0;if(K&&Vt(C)&&La(),f.da)alert("todo:use_scaling");else{if(U){if(p.Ib=ze,f.Kb){if(C=f.U+1>>1,p.memory=o(f.U+2*C),p.memory==null)return 0;p.ec=p.memory,p.fc=0,p.cc=p.ec,p.dc=p.fc+f.U,p.Mc=p.cc,p.Nc=p.dc+C,p.Ib=ft,La()}}else alert("todo:EmitYUV");K&&(p.Jb=Lt,U&&xr())}if(U&&!xm){for(f=0;256>f;++f)yE[f]=89858*(f-128)+Qc>>Mc,CE[f]=-22014*(f-128)+Qc,bE[f]=-45773*(f-128),BE[f]=113618*(f-128)+Qc>>Mc;for(f=Sl;f<Nd;++f)p=76283*(f-16)+Qc>>Mc,kE[f-Sl]=nn(p,255),EE[f-Sl]=nn(p+8>>4,15);xm=1}return 1}function Rt(f){var p=f.ma,C=f.U,U=f.T;return t(!(1&f.ka)),0>=C||0>=U?0:(C=p.Ib(f,p),p.Jb!=null&&p.Jb(f,p,C),p.Dc+=C,1)}function cr(f){f.ma.memory=null}function qr(f,p,C,U){return J(f,8)!=47?0:(p[0]=J(f,14)+1,C[0]=J(f,14)+1,U[0]=J(f,1),J(f,3)!=0?0:!f.h)}function Kr(f,p){if(4>f)return f+1;var C=f-2>>1;return(2+(1&f)<<C)+J(p,C)+1}function on(f,p){return 120<p?p-120:1<=(C=((C=vr[p-1])>>4)*f+(8-(15&C)))?C:1;var C}function Fr(f,p,C){var U=N(C),K=f[p+=255&U].g-8;return 0<K&&(se(C,C.u+8),U=N(C),p+=f[p].value,p+=U&(1<<K)-1),se(C,C.u+f[p].g),f[p].value}function Jr(f,p,C){return C.g+=f.g,C.value+=f.value<<p>>>0,t(8>=C.g),f.g}function An(f,p,C){var U=f.xc;return t((p=U==0?0:f.vc[f.md*(C>>U)+(p>>U)])<f.Wb),f.Ya[p]}function ta(f,p,C,U){var K=f.ab,ee=f.c*p,ne=f.C;p=ne+p;var ie=C,le=U;for(U=f.Ta,C=f.Ua;0<K--;){var ve=f.gc[K],Ie=ne,et=p,me=ie,Ne=le,je=(le=U,ie=C,ve.Ea);switch(t(Ie<et),t(et<=ve.nc),ve.hc){case 2:QA(me,Ne,(et-Ie)*je,le,ie);break;case 0:var vt=Ie,Ze=et,wt=le,bt=ie,Nt=(ir=ve).Ea;vt==0&&(Eo(me,Ne,null,null,1,wt,bt),z(me,Ne+1,0,0,Nt-1,wt,bt+1),Ne+=Nt,bt+=Nt,++vt);for(var Ft=1<<ir.b,ur=Ft-1,sr=Te(Nt,ir.b),Hr=ir.K,ir=ir.w+(vt>>ir.b)*sr;vt<Ze;){var tn=Hr,Ha=ir,Pr=1;for(Do(me,Ne,wt,bt-Nt,1,wt,bt);Pr<Nt;){var lr=(Pr&~ur)+Ft;lr>Nt&&(lr=Nt),(0,$s[tn[Ha++]>>8&15])(me,Ne+ +Pr,wt,bt+Pr-Nt,lr-Pr,wt,bt+Pr),Pr=lr}Ne+=Nt,bt+=Nt,++vt&ur||(ir+=sr)}et!=ve.nc&&r(le,ie-je,le,ie+(et-Ie-1)*je,je);break;case 1:for(je=me,Ze=Ne,Nt=(me=ve.Ea)-(bt=me&~(wt=(Ne=1<<ve.b)-1)),vt=Te(me,ve.b),Ft=ve.K,ve=ve.w+(Ie>>ve.b)*vt;Ie<et;){for(ur=Ft,sr=ve,Hr=new yt,ir=Ze+bt,tn=Ze+me;Ze<ir;)qe(ur[sr++],Hr),Rr(Hr,je,Ze,Ne,le,ie),Ze+=Ne,ie+=Ne;Ze<tn&&(qe(ur[sr++],Hr),Rr(Hr,je,Ze,Nt,le,ie),Ze+=Nt,ie+=Nt),++Ie&wt||(ve+=vt)}break;case 3:if(me==le&&Ne==ie&&0<ve.b){for(Ze=le,me=je=ie+(et-Ie)*je-(bt=(et-Ie)*Te(ve.Ea,ve.b)),Ne=le,wt=ie,vt=[],bt=(Nt=bt)-1;0<=bt;--bt)vt[bt]=Ne[wt+bt];for(bt=Nt-1;0<=bt;--bt)Ze[me+bt]=vt[bt];za(ve,Ie,et,le,je,le,ie)}else za(ve,Ie,et,me,Ne,le,ie)}ie=U,le=C}le!=C&&r(U,C,ie,le,ee)}function ra(f,p){var C=f.V,U=f.Ba+f.c*f.C,K=p-f.C;if(t(p<=f.l.o),t(16>=K),0<K){var ee=f.l,ne=f.Ta,ie=f.Ua,le=ee.width;if(ta(f,K,C,U),K=ie=[ie],t((C=f.C)<(U=p)),t(ee.v<ee.va),U>ee.o&&(U=ee.o),C<ee.j){var ve=ee.j-C;C=ee.j,K[0]+=ve*le}if(C>=U?C=0:(K[0]+=4*ee.v,ee.ka=C-ee.j,ee.U=ee.va-ee.v,ee.T=U-C,C=1),C){if(ie=ie[0],11>(C=f.ca).S){var Ie=C.f.RGBA,et=(U=C.S,K=ee.U,ee=ee.T,ve=Ie.eb,Ie.A),me=ee;for(Ie=Ie.fb+f.Ma*Ie.A;0<me--;){var Ne=ne,je=ie,vt=K,Ze=ve,wt=Ie;switch(U){case we:la(Ne,je,vt,Ze,wt);break;case Be:Zs(Ne,je,vt,Ze,wt);break;case gt:Zs(Ne,je,vt,Ze,wt),zo(Ze,wt,0,vt,1,0);break;case Ce:fA(Ne,je,vt,Ze,wt);break;case Ue:St(Ne,je,vt,Ze,wt,1);break;case He:St(Ne,je,vt,Ze,wt,1),zo(Ze,wt,0,vt,1,0);break;case Se:St(Ne,je,vt,Ze,wt,0);break;case dt:St(Ne,je,vt,Ze,wt,0),zo(Ze,wt,1,vt,1,0);break;case _e:To(Ne,je,vt,Ze,wt);break;case Qt:To(Ne,je,vt,Ze,wt),Dc(Ze,wt,vt,1,0);break;case ht:ho(Ne,je,vt,Ze,wt);break;default:t(0)}ie+=le,Ie+=et}f.Ma+=ee}else alert("todo:EmitRescaledRowsYUVA");t(f.Ma<=C.height)}}f.C=p,t(f.C<=f.i)}function xn(f){var p;if(0<f.ua)return 0;for(p=0;p<f.Wb;++p){var C=f.Ya[p].G,U=f.Ya[p].H;if(0<C[1][U[1]+0].g||0<C[2][U[2]+0].g||0<C[3][U[3]+0].g)return 0}return 1}function Nr(f,p,C,U,K,ee){if(f.Z!=0){var ne=f.qd,ie=f.rd;for(t(As[f.Z]!=null);p<C;++p)As[f.Z](ne,ie,U,K,U,K,ee),ne=U,ie=K,K+=ee;f.qd=ne,f.rd=ie}}function dn(f,p){var C=f.l.ma,U=C.Z==0||C.Z==1?f.l.j:f.C;if(U=f.C<U?U:f.C,t(p<=f.l.o),p>U){var K=f.l.width,ee=C.ca,ne=C.tb+K*U,ie=f.V,le=f.Ba+f.c*U,ve=f.gc;t(f.ab==1),t(ve[0].hc==3),Ri(ve[0],U,p,ie,le,ee,ne),Nr(C,U,p,ee,ne,K)}f.C=f.Ma=p}function Gn(f,p,C,U,K,ee,ne){var ie=f.$/U,le=f.$%U,ve=f.m,Ie=f.s,et=C+f.$,me=et;K=C+U*K;var Ne=C+U*ee,je=280+Ie.ua,vt=f.Pb?ie:16777216,Ze=0<Ie.ua?Ie.Wa:null,wt=Ie.wc,bt=et<Ne?An(Ie,le,ie):null;t(f.C<ee),t(Ne<=K);var Nt=!1;e:for(;;){for(;Nt||et<Ne;){var Ft=0;if(ie>=vt){var ur=et-C;t((vt=f).Pb),vt.wd=vt.m,vt.xd=ur,0<vt.s.ua&<(vt.s.Wa,vt.s.vb),vt=ie+en}if(le&wt||(bt=An(Ie,le,ie)),t(bt!=null),bt.Qb&&(p[et]=bt.qb,Nt=!0),!Nt)if(ge(ve),bt.jc){Ft=ve,ur=p;var sr=et,Hr=bt.pd[N(Ft)&ko-1];t(bt.jc),256>Hr.g?(se(Ft,Ft.u+Hr.g),ur[sr]=Hr.value,Ft=0):(se(Ft,Ft.u+Hr.g-256),t(256<=Hr.value),Ft=Hr.value),Ft==0&&(Nt=!0)}else Ft=Fr(bt.G[0],bt.H[0],ve);if(ve.h)break;if(Nt||256>Ft){if(!Nt)if(bt.nd)p[et]=(bt.qb|Ft<<8)>>>0;else{if(ge(ve),Nt=Fr(bt.G[1],bt.H[1],ve),ge(ve),ur=Fr(bt.G[2],bt.H[2],ve),sr=Fr(bt.G[3],bt.H[3],ve),ve.h)break;p[et]=(sr<<24|Nt<<16|Ft<<8|ur)>>>0}if(Nt=!1,++et,++le>=U&&(le=0,++ie,ne!=null&&ie<=ee&&!(ie%16)&&ne(f,ie),Ze!=null))for(;me<et;)Ft=p[me++],Ze.X[(506832829*Ft&4294967295)>>>Ze.Mb]=Ft}else if(280>Ft){if(Ft=Kr(Ft-256,ve),ur=Fr(bt.G[4],bt.H[4],ve),ge(ve),ur=on(U,ur=Kr(ur,ve)),ve.h)break;if(et-C<ur||K-et<Ft)break e;for(sr=0;sr<Ft;++sr)p[et+sr]=p[et+sr-ur];for(et+=Ft,le+=Ft;le>=U;)le-=U,++ie,ne!=null&&ie<=ee&&!(ie%16)&&ne(f,ie);if(t(et<=K),le&wt&&(bt=An(Ie,le,ie)),Ze!=null)for(;me<et;)Ft=p[me++],Ze.X[(506832829*Ft&4294967295)>>>Ze.Mb]=Ft}else{if(!(Ft<je))break e;for(Nt=Ft-280,t(Ze!=null);me<et;)Ft=p[me++],Ze.X[(506832829*Ft&4294967295)>>>Ze.Mb]=Ft;Ft=et,t(!(Nt>>>(ur=Ze).Xa)),p[Ft]=ur.X[Nt],Nt=!0}Nt||t(ve.h==Z(ve))}if(f.Pb&&ve.h&&et<K)t(f.m.h),f.a=5,f.m=f.wd,f.$=f.xd,0<f.s.ua&<(f.s.vb,f.s.Wa);else{if(ve.h)break e;ne!=null&&ne(f,ie>ee?ee:ie),f.a=0,f.$=et-C}return 1}return f.a=3,0}function zn(f){t(f!=null),f.vc=null,f.yc=null,f.Ya=null;var p=f.Wa;p!=null&&(p.X=null),f.vb=null,t(f!=null)}function ln(){var f=new ut;return f==null?null:(f.a=0,f.xb=Uo,hr("Predictor","VP8LPredictors"),hr("Predictor","VP8LPredictors_C"),hr("PredictorAdd","VP8LPredictorsAdd"),hr("PredictorAdd","VP8LPredictorsAdd_C"),QA=ye,Rr=ct,la=Ve,Zs=Mt,To=tt,ho=_t,fA=rr,L.VP8LMapColor32b=Kn,L.VP8LMapColor8b=Ks,f)}function En(f,p,C,U,K){var ee=1,ne=[f],ie=[p],le=U.m,ve=U.s,Ie=null,et=0;e:for(;;){if(C)for(;ee&&J(le,1);){var me=ne,Ne=ie,je=U,vt=1,Ze=je.m,wt=je.gc[je.ab],bt=J(Ze,2);if(je.Oc&1<<bt)ee=0;else{switch(je.Oc|=1<<bt,wt.hc=bt,wt.Ea=me[0],wt.nc=Ne[0],wt.K=[null],++je.ab,t(4>=je.ab),bt){case 0:case 1:wt.b=J(Ze,3)+2,vt=En(Te(wt.Ea,wt.b),Te(wt.nc,wt.b),0,je,wt.K),wt.K=wt.K[0];break;case 3:var Nt,Ft=J(Ze,8)+1,ur=16<Ft?0:4<Ft?1:2<Ft?2:3;if(me[0]=Te(wt.Ea,ur),wt.b=ur,Nt=vt=En(Ft,1,0,je,wt.K)){var sr,Hr=Ft,ir=wt,tn=1<<(8>>ir.b),Ha=o(tn);if(Ha==null)Nt=0;else{var Pr=ir.K[0],lr=ir.w;for(Ha[0]=ir.K[0][0],sr=1;sr<1*Hr;++sr)Ha[sr]=Et(Pr[lr+sr],Ha[sr-1]);for(;sr<4*tn;++sr)Ha[sr]=0;ir.K[0]=null,ir.K[0]=Ha,Nt=1}}vt=Nt;break;case 2:break;default:t(0)}ee=vt}}if(ne=ne[0],ie=ie[0],ee&&J(le,1)&&!(ee=1<=(et=J(le,4))&&11>=et)){U.a=3;break e}var $t;if($t=ee)t:{var ya,Mr,an,Vn=U,is=ne,Us=ie,ua=et,ys=C,Is=Vn.m,Pa=Vn.s,cn=[null],Cn=1,da=0,kn=pn[ua];r:for(;;){if(ys&&J(Is,1)){var ls=J(Is,3)+2,Io=Te(is,ls),Ba=Te(Us,ls),qs=Io*Ba;if(!En(Io,Ba,0,Vn,cn))break r;for(cn=cn[0],Pa.xc=ls,ya=0;ya<qs;++ya){var Fn=cn[ya]>>8&65535;cn[ya]=Fn,Fn>=Cn&&(Cn=Fn+1)}}if(Is.h)break r;for(Mr=0;5>Mr;++Mr){var Va=Pt[Mr];!Mr&&0<ua&&(Va+=1<<ua),da<Va&&(da=Va)}var ro=i(Cn*kn,Q),Ms=Cn,no=i(Ms,oe);if(no==null)var ao=null;else t(65536>=Ms),ao=no;var js=o(da);if(ao==null||js==null||ro==null){Vn.a=1;break r}var so=ro;for(ya=an=0;ya<Cn;++ya){var Nn=ao[ya],oo=Nn.G,Mo=Nn.H,ui=0,gA=1,cs=0;for(Mr=0;5>Mr;++Mr){Va=Pt[Mr],oo[Mr]=so,Mo[Mr]=an,!Mr&&0<ua&&(Va+=1<<ua);a:{var _c,_d=Va,Rc=Vn,Fl=js,xE=so,SE=an,Rd=0,_A=Rc.m,FE=J(_A,1);if(s(Fl,0,0,_d),FE){var LE=J(_A,1)+1,UE=J(_A,1),Lm=J(_A,UE==0?1:8);Fl[Lm]=1,LE==2&&(Fl[Lm=J(_A,8)]=1);var Oc=1}else{var Um=o(19),Im=J(_A,4)+4;if(19<Im){Rc.a=3;var Hc=0;break a}for(_c=0;_c<Im;++_c)Um[Cr[_c]]=J(_A,3);var Od=void 0,Ll=void 0,Mm=Rc,IE=Um,Pc=_d,Qm=Fl,Hd=0,RA=Mm.m,Nm=8,_m=i(128,Q);n:for(;S(_m,0,7,IE,19);){if(J(RA,1)){var ME=2+2*J(RA,3);if((Od=2+J(RA,ME))>Pc)break n}else Od=Pc;for(Ll=0;Ll<Pc&&Od--;){ge(RA);var Rm=_m[0+(127&N(RA))];se(RA,RA.u+Rm.g);var Hi=Rm.value;if(16>Hi)Qm[Ll++]=Hi,Hi!=0&&(Nm=Hi);else{var QE=Hi==16,Om=Hi-16,NE=Bt[Om],Hm=J(RA,De[Om])+NE;if(Ll+Hm>Pc)break n;for(var _E=QE?Nm:0;0<Hm--;)Qm[Ll++]=_E}}Hd=1;break n}Hd||(Mm.a=3),Oc=Hd}(Oc=Oc&&!_A.h)&&(Rd=S(xE,SE,8,Fl,_d)),Oc&&Rd!=0?Hc=Rd:(Rc.a=3,Hc=0)}if(Hc==0)break r;if(gA&&yr[Mr]==1&&(gA=so[an].g==0),ui+=so[an].g,an+=Hc,3>=Mr){var Ul,Pd=js[0];for(Ul=1;Ul<Va;++Ul)js[Ul]>Pd&&(Pd=js[Ul]);cs+=Pd}}if(Nn.nd=gA,Nn.Qb=0,gA&&(Nn.qb=(oo[3][Mo[3]+0].value<<24|oo[1][Mo[1]+0].value<<16|oo[2][Mo[2]+0].value)>>>0,ui==0&&256>oo[0][Mo[0]+0].value&&(Nn.Qb=1,Nn.qb+=oo[0][Mo[0]+0].value<<8)),Nn.jc=!Nn.Qb&&6>cs,Nn.jc){var Vc,pA=Nn;for(Vc=0;Vc<ko;++Vc){var OA=Vc,HA=pA.pd[OA],Wc=pA.G[0][pA.H[0]+OA];256<=Wc.value?(HA.g=Wc.g+256,HA.value=Wc.value):(HA.g=0,HA.value=0,OA>>=Jr(Wc,8,HA),OA>>=Jr(pA.G[1][pA.H[1]+OA],16,HA),OA>>=Jr(pA.G[2][pA.H[2]+OA],0,HA),Jr(pA.G[3][pA.H[3]+OA],24,HA))}}}Pa.vc=cn,Pa.Wb=Cn,Pa.Ya=ao,Pa.yc=ro,$t=1;break t}$t=0}if(!(ee=$t)){U.a=3;break e}if(0<et){if(ve.ua=1<<et,!te(ve.Wa,et)){U.a=1,ee=0;break e}}else ve.ua=0;var Vd=U,Pm=ne,RE=ie,Wd=Vd.s,Kd=Wd.xc;if(Vd.c=Pm,Vd.i=RE,Wd.md=Te(Pm,Kd),Wd.wc=Kd==0?-1:(1<<Kd)-1,C){U.xb=ws;break e}if((Ie=o(ne*ie))==null){U.a=1,ee=0;break e}ee=(ee=Gn(U,Ie,0,ne,ie,ie,null))&&!le.h;break e}return ee?(K!=null?K[0]=Ie:(t(Ie==null),t(C)),U.$=0,C||zn(ve)):zn(ve),ee}function xa(f,p){var C=f.c*f.i,U=C+p+16*p;return t(f.c<=p),f.V=o(U),f.V==null?(f.Ta=null,f.Ua=0,f.a=1,0):(f.Ta=f.V,f.Ua=f.Ba+C+p,1)}function Ra(f,p){var C=f.C,U=p-C,K=f.V,ee=f.Ba+f.c*C;for(t(p<=f.l.o);0<U;){var ne=16<U?16:U,ie=f.l.ma,le=f.l.width,ve=le*ne,Ie=ie.ca,et=ie.tb+le*C,me=f.Ta,Ne=f.Ua;ta(f,ne,K,ee),kl(me,Ne,Ie,et,ve),Nr(ie,C,C+ne,Ie,et,le),U-=ne,K+=ne*f.c,C+=ne}t(C==p),f.C=f.Ma=p}function na(){this.ub=this.yd=this.td=this.Rb=0}function Ss(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function uo(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function On(){this.Yb=(function(){var f=[];return(function p(C,U,K){for(var ee=K[U],ne=0;ne<ee&&(C.push(K.length>U+1?[]:0),!(K.length<U+1));ne++)p(C[ne],U+1,K)})(f,0,[3,11]),f})()}function Fs(){this.jb=o(3),this.Wc=A([4,8],On),this.Xc=A([4,17],On)}function Un(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function Hn(){this.ld=this.La=this.dd=this.tc=0}function aa(){this.Na=this.la=0}function rn(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function In(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function _r(){this.uc=this.M=this.Nb=0,this.wa=Array(new Hn),this.Y=0,this.ya=Array(new In),this.aa=0,this.l=new Jn}function Xn(){this.y=o(16),this.f=o(8),this.ea=o(8)}function sa(){this.cb=this.a=0,this.sc="",this.m=new k,this.Od=new na,this.Kc=new Ss,this.ed=new Un,this.Qa=new uo,this.Ic=this.$c=this.Aa=0,this.D=new _r,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=i(8,k),this.ia=0,this.pb=i(4,rn),this.Pa=new Fs,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Xn),this.Hd=0,this.rb=Array(new aa),this.sb=0,this.wa=Array(new Hn),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 In),this.L=this.aa=0,this.gd=A([4,2],Hn),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 nn(f,p){return 0>f?0:f>p?p:f}function Jn(){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 oa(){var f=new sa;return f!=null&&(f.a=0,f.sc="OK",f.cb=0,f.Xb=0,ms||(ms=ja)),f}function Er(f,p,C){return f.a==0&&(f.a=p,f.sc=C,f.cb=0),0}function $a(f,p,C){return 3<=C&&f[p+0]==157&&f[p+1]==1&&f[p+2]==42}function qa(f,p){if(f==null)return 0;if(f.a=0,f.sc="OK",p==null)return Er(f,2,"null VP8Io passed to VP8GetHeaders()");var C=p.data,U=p.w,K=p.ha;if(4>K)return Er(f,7,"Truncated header.");var ee=C[U+0]|C[U+1]<<8|C[U+2]<<16,ne=f.Od;if(ne.Rb=!(1&ee),ne.td=ee>>1&7,ne.yd=ee>>4&1,ne.ub=ee>>5,3<ne.td)return Er(f,3,"Incorrect keyframe parameters.");if(!ne.yd)return Er(f,4,"Frame not displayable.");U+=3,K-=3;var ie=f.Kc;if(ne.Rb){if(7>K)return Er(f,7,"cannot parse picture header");if(!$a(C,U,K))return Er(f,3,"Bad code word");ie.c=16383&(C[U+4]<<8|C[U+3]),ie.Td=C[U+4]>>6,ie.i=16383&(C[U+6]<<8|C[U+5]),ie.Ud=C[U+6]>>6,U+=7,K-=7,f.za=ie.c+15>>4,f.Ub=ie.i+15>>4,p.width=ie.c,p.height=ie.i,p.Da=0,p.j=0,p.v=0,p.va=p.width,p.o=p.height,p.da=0,p.ib=p.width,p.hb=p.height,p.U=p.width,p.T=p.height,s((ee=f.Pa).jb,0,255,ee.jb.length),t((ee=f.Qa)!=null),ee.Cb=0,ee.Bb=0,ee.Fb=1,s(ee.Zb,0,0,ee.Zb.length),s(ee.Lb,0,0,ee.Lb)}if(ne.ub>K)return Er(f,7,"bad partition length");X(ee=f.m,C,U,ne.ub),U+=ne.ub,K-=ne.ub,ne.Rb&&(ie.Ld=Ae(ee),ie.Kd=Ae(ee)),ie=f.Qa;var le,ve=f.Pa;if(t(ee!=null),t(ie!=null),ie.Cb=Ae(ee),ie.Cb){if(ie.Bb=Ae(ee),Ae(ee)){for(ie.Fb=Ae(ee),le=0;4>le;++le)ie.Zb[le]=Ae(ee)?M(ee,7):0;for(le=0;4>le;++le)ie.Lb[le]=Ae(ee)?M(ee,6):0}if(ie.Bb)for(le=0;3>le;++le)ve.jb[le]=Ae(ee)?F(ee,8):255}else ie.Bb=0;if(ee.Ka)return Er(f,3,"cannot parse segment header");if((ie=f.ed).zd=Ae(ee),ie.Tb=F(ee,6),ie.wb=F(ee,3),ie.Pc=Ae(ee),ie.Pc&&Ae(ee)){for(ve=0;4>ve;++ve)Ae(ee)&&(ie.vd[ve]=M(ee,6));for(ve=0;4>ve;++ve)Ae(ee)&&(ie.od[ve]=M(ee,6))}if(f.L=ie.Tb==0?0:ie.zd?1:2,ee.Ka)return Er(f,3,"cannot parse filter header");var Ie=K;if(K=le=U,U=le+Ie,ie=Ie,f.Xb=(1<<F(f.m,2))-1,Ie<3*(ve=f.Xb))C=7;else{for(le+=3*ve,ie-=3*ve,Ie=0;Ie<ve;++Ie){var et=C[K+0]|C[K+1]<<8|C[K+2]<<16;et>ie&&(et=ie),X(f.Jc[+Ie],C,le,et),le+=et,ie-=et,K+=3}X(f.Jc[+ve],C,le,ie),C=le<U?0:5}if(C!=0)return Er(f,C,"cannot parse partitions");for(C=F(le=f.m,7),K=Ae(le)?M(le,4):0,U=Ae(le)?M(le,4):0,ie=Ae(le)?M(le,4):0,ve=Ae(le)?M(le,4):0,le=Ae(le)?M(le,4):0,Ie=f.Qa,et=0;4>et;++et){if(Ie.Cb){var me=Ie.Zb[et];Ie.Fb||(me+=C)}else{if(0<et){f.pb[et]=f.pb[0];continue}me=C}var Ne=f.pb[et];Ne.Sc[0]=Zn[nn(me+K,127)],Ne.Sc[1]=os[nn(me+0,127)],Ne.Eb[0]=2*Zn[nn(me+U,127)],Ne.Eb[1]=101581*os[nn(me+ie,127)]>>16,8>Ne.Eb[1]&&(Ne.Eb[1]=8),Ne.Qc[0]=Zn[nn(me+ve,117)],Ne.Qc[1]=os[nn(me+le,127)],Ne.lc=me+le}if(!ne.Rb)return Er(f,4,"Not a key frame.");for(Ae(ee),ne=f.Pa,C=0;4>C;++C){for(K=0;8>K;++K)for(U=0;3>U;++U)for(ie=0;11>ie;++ie)ve=Fe(ee,Zo[C][K][U][ie])?F(ee,8):Jo[C][K][U][ie],ne.Wc[C][K].Yb[U][ie]=ve;for(K=0;17>K;++K)ne.Xc[C][K]=ne.Wc[C][Tl[K]]}return f.kc=Ae(ee),f.kc&&(f.Bd=F(ee,8)),f.cb=1}function ja(f,p,C,U,K,ee,ne){var ie=p[K].Yb[C];for(C=0;16>K;++K){if(!Fe(f,ie[C+0]))return K;for(;!Fe(f,ie[C+1]);)if(ie=p[++K].Yb[0],C=0,K==16)return 16;var le=p[K+1].Yb;if(Fe(f,ie[C+2])){var ve=f,Ie=0;if(Fe(ve,(me=ie)[(et=C)+3]))if(Fe(ve,me[et+6])){for(ie=0,et=2*(Ie=Fe(ve,me[et+8]))+(me=Fe(ve,me[et+9+Ie])),Ie=0,me=go[et];me[ie];++ie)Ie+=Ie+Fe(ve,me[ie]);Ie+=3+(8<<et)}else Fe(ve,me[et+7])?(Ie=7+2*Fe(ve,165),Ie+=Fe(ve,145)):Ie=5+Fe(ve,159);else Ie=Fe(ve,me[et+4])?3+Fe(ve,me[et+5]):2;ie=le[2]}else Ie=1,ie=le[1];le=ne+ea[K],0>(ve=f).b&&fe(ve);var et,me=ve.b,Ne=(et=ve.Ca>>1)-(ve.I>>me)>>31;--ve.b,ve.Ca+=Ne,ve.Ca|=1,ve.I-=(et+1&Ne)<<me,ee[le]=((Ie^Ne)-Ne)*U[(0<K)+0]}return 16}function ns(f){var p=f.rb[f.sb-1];p.la=0,p.Na=0,s(f.zc,0,0,f.zc.length),f.ja=0}function Pn(f,p,C,U,K){K=f[p+C+32*U]+(K>>3),f[p+C+32*U]=-256&K?0>K?0:255:K}function Sa(f,p,C,U,K,ee){Pn(f,p,0,C,U+K),Pn(f,p,1,C,U+ee),Pn(f,p,2,C,U-ee),Pn(f,p,3,C,U-K)}function Fa(f){return(20091*f>>16)+f}function Mn(f,p,C,U){var K,ee=0,ne=o(16);for(K=0;4>K;++K){var ie=f[p+0]+f[p+8],le=f[p+0]-f[p+8],ve=(35468*f[p+4]>>16)-Fa(f[p+12]),Ie=Fa(f[p+4])+(35468*f[p+12]>>16);ne[ee+0]=ie+Ie,ne[ee+1]=le+ve,ne[ee+2]=le-ve,ne[ee+3]=ie-Ie,ee+=4,p++}for(K=ee=0;4>K;++K)ie=(f=ne[ee+0]+4)+ne[ee+8],le=f-ne[ee+8],ve=(35468*ne[ee+4]>>16)-Fa(ne[ee+12]),Pn(C,U,0,0,ie+(Ie=Fa(ne[ee+4])+(35468*ne[ee+12]>>16))),Pn(C,U,1,0,le+ve),Pn(C,U,2,0,le-ve),Pn(C,U,3,0,ie-Ie),ee++,U+=32}function Hs(f,p,C,U){var K=f[p+0]+4,ee=35468*f[p+4]>>16,ne=Fa(f[p+4]),ie=35468*f[p+1]>>16;Sa(C,U,0,K+ne,f=Fa(f[p+1]),ie),Sa(C,U,1,K+ee,f,ie),Sa(C,U,2,K-ee,f,ie),Sa(C,U,3,K-ne,f,ie)}function ps(f,p,C,U,K){Mn(f,p,C,U),K&&Mn(f,p+16,C,U+4)}function va(f,p,C,U){So(f,p+0,C,U,1),So(f,p+32,C,U+128,1)}function It(f,p,C,U){var K;for(f=f[p+0]+4,K=0;4>K;++K)for(p=0;4>p;++p)Pn(C,U,p,K,f)}function ce(f,p,C,U){f[p+0]&&Xa(f,p+0,C,U),f[p+16]&&Xa(f,p+16,C,U+4),f[p+32]&&Xa(f,p+32,C,U+128),f[p+48]&&Xa(f,p+48,C,U+128+4)}function Ye(f,p,C,U){var K,ee=o(16);for(K=0;4>K;++K){var ne=f[p+0+K]+f[p+12+K],ie=f[p+4+K]+f[p+8+K],le=f[p+4+K]-f[p+8+K],ve=f[p+0+K]-f[p+12+K];ee[0+K]=ne+ie,ee[8+K]=ne-ie,ee[4+K]=ve+le,ee[12+K]=ve-le}for(K=0;4>K;++K)ne=(f=ee[0+4*K]+3)+ee[3+4*K],ie=ee[1+4*K]+ee[2+4*K],le=ee[1+4*K]-ee[2+4*K],ve=f-ee[3+4*K],C[U+0]=ne+ie>>3,C[U+16]=ve+le>>3,C[U+32]=ne-ie>>3,C[U+48]=ve-le>>3,U+=64}function At(f,p,C){var U,K=p-32,ee=G,ne=255-f[K-1];for(U=0;U<C;++U){var ie,le=ee,ve=ne+f[p-1];for(ie=0;ie<C;++ie)f[p+ie]=le[ve+f[K+ie]];p+=32}}function Ot(f,p){At(f,p,4)}function Ht(f,p){At(f,p,8)}function nr(f,p){At(f,p,16)}function Vr(f,p){var C;for(C=0;16>C;++C)r(f,p+32*C,f,p-32,16)}function Sn(f,p){var C;for(C=16;0<C;--C)s(f,p,f[p-1],16),p+=32}function jr(f,p,C){var U;for(U=0;16>U;++U)s(p,C+32*U,f,16)}function wn(f,p){var C,U=16;for(C=0;16>C;++C)U+=f[p-1+32*C]+f[p+C-32];jr(U>>5,f,p)}function fn(f,p){var C,U=8;for(C=0;16>C;++C)U+=f[p-1+32*C];jr(U>>4,f,p)}function yn(f,p){var C,U=8;for(C=0;16>C;++C)U+=f[p+C-32];jr(U>>4,f,p)}function Ps(f,p){jr(128,f,p)}function gr(f,p,C){return f+2*p+C+2>>2}function cA(f,p){var C,U=p-32;for(U=new Uint8Array([gr(f[U-1],f[U+0],f[U+1]),gr(f[U+0],f[U+1],f[U+2]),gr(f[U+1],f[U+2],f[U+3]),gr(f[U+2],f[U+3],f[U+4])]),C=0;4>C;++C)r(f,p+32*C,U,0,U.length)}function Co(f,p){var C=f[p-1],U=f[p-1+32],K=f[p-1+64],ee=f[p-1+96];be(f,p+0,16843009*gr(f[p-1-32],C,U)),be(f,p+32,16843009*gr(C,U,K)),be(f,p+64,16843009*gr(U,K,ee)),be(f,p+96,16843009*gr(K,ee,ee))}function qo(f,p){var C,U=4;for(C=0;4>C;++C)U+=f[p+C-32]+f[p-1+32*C];for(U>>=3,C=0;4>C;++C)s(f,p+32*C,U,4)}function fo(f,p){var C=f[p-1+0],U=f[p-1+32],K=f[p-1+64],ee=f[p-1-32],ne=f[p+0-32],ie=f[p+1-32],le=f[p+2-32],ve=f[p+3-32];f[p+0+96]=gr(U,K,f[p-1+96]),f[p+1+96]=f[p+0+64]=gr(C,U,K),f[p+2+96]=f[p+1+64]=f[p+0+32]=gr(ee,C,U),f[p+3+96]=f[p+2+64]=f[p+1+32]=f[p+0+0]=gr(ne,ee,C),f[p+3+64]=f[p+2+32]=f[p+1+0]=gr(ie,ne,ee),f[p+3+32]=f[p+2+0]=gr(le,ie,ne),f[p+3+0]=gr(ve,le,ie)}function pe(f,p){var C=f[p+1-32],U=f[p+2-32],K=f[p+3-32],ee=f[p+4-32],ne=f[p+5-32],ie=f[p+6-32],le=f[p+7-32];f[p+0+0]=gr(f[p+0-32],C,U),f[p+1+0]=f[p+0+32]=gr(C,U,K),f[p+2+0]=f[p+1+32]=f[p+0+64]=gr(U,K,ee),f[p+3+0]=f[p+2+32]=f[p+1+64]=f[p+0+96]=gr(K,ee,ne),f[p+3+32]=f[p+2+64]=f[p+1+96]=gr(ee,ne,ie),f[p+3+64]=f[p+2+96]=gr(ne,ie,le),f[p+3+96]=gr(ie,le,le)}function Le(f,p){var C=f[p-1+0],U=f[p-1+32],K=f[p-1+64],ee=f[p-1-32],ne=f[p+0-32],ie=f[p+1-32],le=f[p+2-32],ve=f[p+3-32];f[p+0+0]=f[p+1+64]=ee+ne+1>>1,f[p+1+0]=f[p+2+64]=ne+ie+1>>1,f[p+2+0]=f[p+3+64]=ie+le+1>>1,f[p+3+0]=le+ve+1>>1,f[p+0+96]=gr(K,U,C),f[p+0+64]=gr(U,C,ee),f[p+0+32]=f[p+1+96]=gr(C,ee,ne),f[p+1+32]=f[p+2+96]=gr(ee,ne,ie),f[p+2+32]=f[p+3+96]=gr(ne,ie,le),f[p+3+32]=gr(ie,le,ve)}function Je(f,p){var C=f[p+0-32],U=f[p+1-32],K=f[p+2-32],ee=f[p+3-32],ne=f[p+4-32],ie=f[p+5-32],le=f[p+6-32],ve=f[p+7-32];f[p+0+0]=C+U+1>>1,f[p+1+0]=f[p+0+64]=U+K+1>>1,f[p+2+0]=f[p+1+64]=K+ee+1>>1,f[p+3+0]=f[p+2+64]=ee+ne+1>>1,f[p+0+32]=gr(C,U,K),f[p+1+32]=f[p+0+96]=gr(U,K,ee),f[p+2+32]=f[p+1+96]=gr(K,ee,ne),f[p+3+32]=f[p+2+96]=gr(ee,ne,ie),f[p+3+64]=gr(ne,ie,le),f[p+3+96]=gr(ie,le,ve)}function Re(f,p){var C=f[p-1+0],U=f[p-1+32],K=f[p-1+64],ee=f[p-1+96];f[p+0+0]=C+U+1>>1,f[p+2+0]=f[p+0+32]=U+K+1>>1,f[p+2+32]=f[p+0+64]=K+ee+1>>1,f[p+1+0]=gr(C,U,K),f[p+3+0]=f[p+1+32]=gr(U,K,ee),f[p+3+32]=f[p+1+64]=gr(K,ee,ee),f[p+3+64]=f[p+2+64]=f[p+0+96]=f[p+1+96]=f[p+2+96]=f[p+3+96]=ee}function mt(f,p){var C=f[p-1+0],U=f[p-1+32],K=f[p-1+64],ee=f[p-1+96],ne=f[p-1-32],ie=f[p+0-32],le=f[p+1-32],ve=f[p+2-32];f[p+0+0]=f[p+2+32]=C+ne+1>>1,f[p+0+32]=f[p+2+64]=U+C+1>>1,f[p+0+64]=f[p+2+96]=K+U+1>>1,f[p+0+96]=ee+K+1>>1,f[p+3+0]=gr(ie,le,ve),f[p+2+0]=gr(ne,ie,le),f[p+1+0]=f[p+3+32]=gr(C,ne,ie),f[p+1+32]=f[p+3+64]=gr(U,C,ne),f[p+1+64]=f[p+3+96]=gr(K,U,C),f[p+1+96]=gr(ee,K,U)}function kt(f,p){var C;for(C=0;8>C;++C)r(f,p+32*C,f,p-32,8)}function at(f,p){var C;for(C=0;8>C;++C)s(f,p,f[p-1],8),p+=32}function st(f,p,C){var U;for(U=0;8>U;++U)s(p,C+32*U,f,8)}function Ct(f,p){var C,U=8;for(C=0;8>C;++C)U+=f[p+C-32]+f[p-1+32*C];st(U>>4,f,p)}function Tt(f,p){var C,U=4;for(C=0;8>C;++C)U+=f[p+C-32];st(U>>3,f,p)}function Wt(f,p){var C,U=4;for(C=0;8>C;++C)U+=f[p-1+32*C];st(U>>3,f,p)}function tr(f,p){st(128,f,p)}function zt(f,p,C){var U=f[p-C],K=f[p+0],ee=3*(K-U)+Oi[1020+f[p-2*C]-f[p+C]],ne=_[112+(ee+4>>3)];f[p-C]=G[255+U+_[112+(ee+3>>3)]],f[p+0]=G[255+K-ne]}function qt(f,p,C,U){var K=f[p+0],ee=f[p+C];return de[255+f[p-2*C]-f[p-C]]>U||de[255+ee-K]>U}function Dr(f,p,C,U){return 4*de[255+f[p-C]-f[p+0]]+de[255+f[p-2*C]-f[p+C]]<=U}function Sr(f,p,C,U,K){var ee=f[p-3*C],ne=f[p-2*C],ie=f[p-C],le=f[p+0],ve=f[p+C],Ie=f[p+2*C],et=f[p+3*C];return 4*de[255+ie-le]+de[255+ne-ve]>U?0:de[255+f[p-4*C]-ee]<=K&&de[255+ee-ne]<=K&&de[255+ne-ie]<=K&&de[255+et-Ie]<=K&&de[255+Ie-ve]<=K&&de[255+ve-le]<=K}function Yt(f,p,C,U){var K=2*U+1;for(U=0;16>U;++U)Dr(f,p+U,C,K)&&zt(f,p+U,C)}function pr(f,p,C,U){var K=2*U+1;for(U=0;16>U;++U)Dr(f,p+U*C,1,K)&&zt(f,p+U*C,1)}function Wr(f,p,C,U){var K;for(K=3;0<K;--K)Yt(f,p+=4*C,C,U)}function Bn(f,p,C,U){var K;for(K=3;0<K;--K)pr(f,p+=4,C,U)}function wr(f,p,C,U,K,ee,ne,ie){for(ee=2*ee+1;0<K--;){if(Sr(f,p,C,ee,ne))if(qt(f,p,C,ie))zt(f,p,C);else{var le=f,ve=p,Ie=C,et=le[ve-2*Ie],me=le[ve-Ie],Ne=le[ve+0],je=le[ve+Ie],vt=le[ve+2*Ie],Ze=27*(bt=Oi[1020+3*(Ne-me)+Oi[1020+et-je]])+63>>7,wt=18*bt+63>>7,bt=9*bt+63>>7;le[ve-3*Ie]=G[255+le[ve-3*Ie]+bt],le[ve-2*Ie]=G[255+et+wt],le[ve-Ie]=G[255+me+Ze],le[ve+0]=G[255+Ne-Ze],le[ve+Ie]=G[255+je-wt],le[ve+2*Ie]=G[255+vt-bt]}p+=U}}function Br(f,p,C,U,K,ee,ne,ie){for(ee=2*ee+1;0<K--;){if(Sr(f,p,C,ee,ne))if(qt(f,p,C,ie))zt(f,p,C);else{var le=f,ve=p,Ie=C,et=le[ve-Ie],me=le[ve+0],Ne=le[ve+Ie],je=_[112+(4+(vt=3*(me-et))>>3)],vt=_[112+(vt+3>>3)],Ze=je+1>>1;le[ve-2*Ie]=G[255+le[ve-2*Ie]+Ze],le[ve-Ie]=G[255+et+vt],le[ve+0]=G[255+me-je],le[ve+Ie]=G[255+Ne-Ze]}p+=U}}function P(f,p,C,U,K,ee){wr(f,p,C,1,16,U,K,ee)}function ue(f,p,C,U,K,ee){wr(f,p,1,C,16,U,K,ee)}function ke(f,p,C,U,K,ee){var ne;for(ne=3;0<ne;--ne)Br(f,p+=4*C,C,1,16,U,K,ee)}function Ge(f,p,C,U,K,ee){var ne;for(ne=3;0<ne;--ne)Br(f,p+=4,1,C,16,U,K,ee)}function nt(f,p,C,U,K,ee,ne,ie){wr(f,p,K,1,8,ee,ne,ie),wr(C,U,K,1,8,ee,ne,ie)}function v(f,p,C,U,K,ee,ne,ie){wr(f,p,1,K,8,ee,ne,ie),wr(C,U,1,K,8,ee,ne,ie)}function I(f,p,C,U,K,ee,ne,ie){Br(f,p+4*K,K,1,8,ee,ne,ie),Br(C,U+4*K,K,1,8,ee,ne,ie)}function q(f,p,C,U,K,ee,ne,ie){Br(f,p+4,1,K,8,ee,ne,ie),Br(C,U+4,1,K,8,ee,ne,ie)}function re(){this.ba=new Kt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new We,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function he(){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 Me(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Qe(){this.ua=0,this.Wa=new Pe,this.vb=new Pe,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new oe,this.yc=new Q}function ut(){this.xb=this.a=0,this.l=new Jn,this.ca=new Kt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new O,this.Pb=0,this.wd=new O,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Qe,this.ab=0,this.gc=i(4,Me),this.Oc=0}function Dt(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Jn,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function xt(f,p,C,U,K,ee,ne){for(f=f==null?0:f[p+0],p=0;p<ne;++p)K[ee+p]=f+C[U+p]&255,f=K[ee+p]}function Zt(f,p,C,U,K,ee,ne){var ie;if(f==null)xt(null,null,C,U,K,ee,ne);else for(ie=0;ie<ne;++ie)K[ee+ie]=f[p+ie]+C[U+ie]&255}function er(f,p,C,U,K,ee,ne){if(f==null)xt(null,null,C,U,K,ee,ne);else{var ie,le=f[p+0],ve=le,Ie=le;for(ie=0;ie<ne;++ie)ve=Ie+(le=f[p+ie])-ve,Ie=C[U+ie]+(-256&ve?0>ve?0:255:ve)&255,ve=le,K[ee+ie]=Ie}}function Ur(f,p,C,U){var K=p.width,ee=p.o;if(t(f!=null&&p!=null),0>C||0>=U||C+U>ee)return null;if(!f.Cc){if(f.ga==null){var ne;if(f.ga=new Dt,(ne=f.ga==null)||(ne=p.width*p.o,t(f.Gb.length==0),f.Gb=o(ne),f.Uc=0,f.Gb==null?ne=0:(f.mb=f.Gb,f.nb=f.Uc,f.rc=null,ne=1),ne=!ne),!ne){ne=f.ga;var ie=f.Fa,le=f.P,ve=f.qc,Ie=f.mb,et=f.nb,me=le+1,Ne=ve-1,je=ne.l;if(t(ie!=null&&Ie!=null&&p!=null),As[0]=null,As[1]=xt,As[2]=Zt,As[3]=er,ne.ca=Ie,ne.tb=et,ne.c=p.width,ne.i=p.height,t(0<ne.c&&0<ne.i),1>=ve)p=0;else if(ne.$a=3&ie[le+0],ne.Z=ie[le+0]>>2&3,ne.Lc=ie[le+0]>>4&3,le=ie[le+0]>>6&3,0>ne.$a||1<ne.$a||4<=ne.Z||1<ne.Lc||le)p=0;else if(je.put=Rt,je.ac=ar,je.bc=cr,je.ma=ne,je.width=p.width,je.height=p.height,je.Da=p.Da,je.v=p.v,je.va=p.va,je.j=p.j,je.o=p.o,ne.$a)e:{t(ne.$a==1),p=ln();t:for(;;){if(p==null){p=0;break e}if(t(ne!=null),ne.mc=p,p.c=ne.c,p.i=ne.i,p.l=ne.l,p.l.ma=ne,p.l.width=ne.c,p.l.height=ne.i,p.a=0,R(p.m,ie,me,Ne),!En(ne.c,ne.i,1,p,null)||(p.ab==1&&p.gc[0].hc==3&&xn(p.s)?(ne.ic=1,ie=p.c*p.i,p.Ta=null,p.Ua=0,p.V=o(ie),p.Ba=0,p.V==null?(p.a=1,p=0):p=1):(ne.ic=0,p=xa(p,ne.c)),!p))break t;p=1;break e}ne.mc=null,p=0}else p=Ne>=ne.c*ne.i;ne=!p}if(ne)return null;f.ga.Lc!=1?f.Ga=0:U=ee-C}t(f.ga!=null),t(C+U<=ee);e:{if(p=(ie=f.ga).c,ee=ie.l.o,ie.$a==0){if(me=f.rc,Ne=f.Vc,je=f.Fa,le=f.P+1+C*p,ve=f.mb,Ie=f.nb+C*p,t(le<=f.P+f.qc),ie.Z!=0)for(t(As[ie.Z]!=null),ne=0;ne<U;++ne)As[ie.Z](me,Ne,je,le,ve,Ie,p),me=ve,Ne=Ie,Ie+=p,le+=p;else for(ne=0;ne<U;++ne)r(ve,Ie,je,le,p),me=ve,Ne=Ie,Ie+=p,le+=p;f.rc=me,f.Vc=Ne}else{if(t(ie.mc!=null),p=C+U,t((ne=ie.mc)!=null),t(p<=ne.i),ne.C>=p)p=1;else if(ie.ic||xr(),ie.ic){ie=ne.V,me=ne.Ba,Ne=ne.c;var vt=ne.i,Ze=(je=1,le=ne.$/Ne,ve=ne.$%Ne,Ie=ne.m,et=ne.s,ne.$),wt=Ne*vt,bt=Ne*p,Nt=et.wc,Ft=Ze<bt?An(et,ve,le):null;t(Ze<=wt),t(p<=vt),t(xn(et));t:for(;;){for(;!Ie.h&&Ze<bt;){if(ve&Nt||(Ft=An(et,ve,le)),t(Ft!=null),ge(Ie),256>(vt=Fr(Ft.G[0],Ft.H[0],Ie)))ie[me+Ze]=vt,++Ze,++ve>=Ne&&(ve=0,++le<=p&&!(le%16)&&dn(ne,le));else{if(!(280>vt)){je=0;break t}vt=Kr(vt-256,Ie);var ur,sr=Fr(Ft.G[4],Ft.H[4],Ie);if(ge(Ie),!(Ze>=(sr=on(Ne,sr=Kr(sr,Ie)))&&wt-Ze>=vt)){je=0;break t}for(ur=0;ur<vt;++ur)ie[me+Ze+ur]=ie[me+Ze+ur-sr];for(Ze+=vt,ve+=vt;ve>=Ne;)ve-=Ne,++le<=p&&!(le%16)&&dn(ne,le);Ze<bt&&ve&Nt&&(Ft=An(et,ve,le))}t(Ie.h==Z(Ie))}dn(ne,le>p?p:le);break t}!je||Ie.h&&Ze<wt?(je=0,ne.a=Ie.h?5:3):ne.$=Ze,p=je}else p=Gn(ne,ne.V,ne.Ba,ne.c,ne.i,p,Ra);if(!p){U=0;break e}}C+U>=ee&&(f.Cc=1),U=1}if(!U)return null;if(f.Cc&&((U=f.ga)!=null&&(U.mc=null),f.ga=null,0<f.Ga))return alert("todo:WebPDequantizeLevels"),null}return f.nb+C*K}function br(f,p,C,U,K,ee){for(;0<K--;){var ne,ie=f,le=p+(C?1:0),ve=f,Ie=p+(C?0:3);for(ne=0;ne<U;++ne){var et=ve[Ie+4*ne];et!=255&&(et*=32897,ie[le+4*ne+0]=ie[le+4*ne+0]*et>>23,ie[le+4*ne+1]=ie[le+4*ne+1]*et>>23,ie[le+4*ne+2]=ie[le+4*ne+2]*et>>23)}p+=ee}}function Tr(f,p,C,U,K){for(;0<U--;){var ee;for(ee=0;ee<C;++ee){var ne=f[p+2*ee+0],ie=15&(ve=f[p+2*ee+1]),le=4369*ie,ve=(240&ve|ve>>4)*le>>16;f[p+2*ee+0]=(240&ne|ne>>4)*le>>16&240|(15&ne|ne<<4)*le>>16>>4&15,f[p+2*ee+1]=240&ve|ie}p+=K}}function Yr(f,p,C,U,K,ee,ne,ie){var le,ve,Ie=255;for(ve=0;ve<K;++ve){for(le=0;le<U;++le){var et=f[p+le];ee[ne+4*le]=et,Ie&=et}p+=C,ne+=ie}return Ie!=255}function Ar(f,p,C,U,K){var ee;for(ee=0;ee<K;++ee)C[U+ee]=f[p+ee]>>8}function xr(){zo=br,Dc=Tr,ci=Yr,kl=Ar}function Zr(f,p,C){L[f]=function(U,K,ee,ne,ie,le,ve,Ie,et,me,Ne,je,vt,Ze,wt,bt,Nt){var Ft,ur=Nt-1>>1,sr=ie[le+0]|ve[Ie+0]<<16,Hr=et[me+0]|Ne[je+0]<<16;t(U!=null);var ir=3*sr+Hr+131074>>2;for(p(U[K+0],255&ir,ir>>16,vt,Ze),ee!=null&&(ir=3*Hr+sr+131074>>2,p(ee[ne+0],255&ir,ir>>16,wt,bt)),Ft=1;Ft<=ur;++Ft){var tn=ie[le+Ft]|ve[Ie+Ft]<<16,Ha=et[me+Ft]|Ne[je+Ft]<<16,Pr=sr+tn+Hr+Ha+524296,lr=Pr+2*(tn+Hr)>>3;ir=lr+sr>>1,sr=(Pr=Pr+2*(sr+Ha)>>3)+tn>>1,p(U[K+2*Ft-1],255&ir,ir>>16,vt,Ze+(2*Ft-1)*C),p(U[K+2*Ft-0],255&sr,sr>>16,vt,Ze+(2*Ft-0)*C),ee!=null&&(ir=Pr+Hr>>1,sr=lr+Ha>>1,p(ee[ne+2*Ft-1],255&ir,ir>>16,wt,bt+(2*Ft-1)*C),p(ee[ne+2*Ft+0],255&sr,sr>>16,wt,bt+(2*Ft+0)*C)),sr=tn,Hr=Ha}1&Nt||(ir=3*sr+Hr+131074>>2,p(U[K+Nt-1],255&ir,ir>>16,vt,Ze+(Nt-1)*C),ee!=null&&(ir=3*Hr+sr+131074>>2,p(ee[ne+Nt-1],255&ir,ir>>16,wt,bt+(Nt-1)*C)))}}function La(){Ls[we]=Fc,Ls[Be]=Lc,Ls[Ce]=xl,Ls[Ue]=Uc,Ls[Se]=Ic,Ls[_e]=Tm,Ls[ht]=mE,Ls[gt]=Lc,Ls[He]=Uc,Ls[dt]=Ic,Ls[Qt]=Tm}function Ua(f){return f&-16384?0>f?0:255:f>>wE}function Ir(f,p){return Ua((19077*f>>8)+(26149*p>>8)-14234)}function Gr(f,p,C){return Ua((19077*f>>8)-(6419*p>>8)-(13320*C>>8)+8708)}function Qn(f,p){return Ua((19077*f>>8)+(33050*p>>8)-17685)}function ma(f,p,C,U,K){U[K+0]=Ir(f,C),U[K+1]=Gr(f,p,C),U[K+2]=Qn(f,p)}function Ya(f,p,C,U,K){U[K+0]=Qn(f,p),U[K+1]=Gr(f,p,C),U[K+2]=Ir(f,C)}function Ia(f,p,C,U,K){var ee=Gr(f,p,C);p=ee<<3&224|Qn(f,p)>>3,U[K+0]=248&Ir(f,C)|ee>>5,U[K+1]=p}function Aa(f,p,C,U,K){var ee=240&Qn(f,p)|15;U[K+0]=240&Ir(f,C)|Gr(f,p,C)>>4,U[K+1]=ee}function wa(f,p,C,U,K){U[K+0]=255,ma(f,p,C,U,K+1)}function Oa(f,p,C,U,K){Ya(f,p,C,U,K),U[K+3]=255}function uA(f,p,C,U,K){ma(f,p,C,U,K),U[K+3]=255}function Vs(f,p,C){L[f]=function(U,K,ee,ne,ie,le,ve,Ie,et){for(var me=Ie+(-2&et)*C;Ie!=me;)p(U[K+0],ee[ne+0],ie[le+0],ve,Ie),p(U[K+1],ee[ne+0],ie[le+0],ve,Ie+C),K+=2,++ne,++le,Ie+=2*C;1&et&&p(U[K+0],ee[ne+0],ie[le+0],ve,Ie)}}function ia(f,p,C){return C==0?f==0?p==0?6:5:p==0?4:0:C}function UA(f,p,C,U,K){switch(f>>>30){case 3:So(p,C,U,K,0);break;case 2:eo(p,C,U,K);break;case 1:Xa(p,C,U,K)}}function jo(f,p){var C,U,K=p.M,ee=p.Nb,ne=f.oc,ie=f.pc+40,le=f.oc,ve=f.pc+584,Ie=f.oc,et=f.pc+600;for(C=0;16>C;++C)ne[ie+32*C-1]=129;for(C=0;8>C;++C)le[ve+32*C-1]=129,Ie[et+32*C-1]=129;for(0<K?ne[ie-1-32]=le[ve-1-32]=Ie[et-1-32]=129:(s(ne,ie-32-1,127,21),s(le,ve-32-1,127,9),s(Ie,et-32-1,127,9)),U=0;U<f.za;++U){var me=p.ya[p.aa+U];if(0<U){for(C=-1;16>C;++C)r(ne,ie+32*C-4,ne,ie+32*C+12,4);for(C=-1;8>C;++C)r(le,ve+32*C-4,le,ve+32*C+4,4),r(Ie,et+32*C-4,Ie,et+32*C+4,4)}var Ne=f.Gd,je=f.Hd+U,vt=me.ad,Ze=me.Hc;if(0<K&&(r(ne,ie-32,Ne[je].y,0,16),r(le,ve-32,Ne[je].f,0,8),r(Ie,et-32,Ne[je].ea,0,8)),me.Za){var wt=ne,bt=ie-32+16;for(0<K&&(U>=f.za-1?s(wt,bt,Ne[je].y[15],4):r(wt,bt,Ne[je+1].y,0,4)),C=0;4>C;C++)wt[bt+128+C]=wt[bt+256+C]=wt[bt+384+C]=wt[bt+0+C];for(C=0;16>C;++C,Ze<<=2)wt=ne,bt=ie+Sm[C],Or[me.Ob[C]](wt,bt),UA(Ze,vt,16*+C,wt,bt)}else if(wt=ia(U,K,me.Ob[0]),zr[wt](ne,ie),Ze!=0)for(C=0;16>C;++C,Ze<<=2)UA(Ze,vt,16*+C,ne,ie+Sm[C]);for(C=me.Gc,wt=ia(U,K,me.Dd),Dn[wt](le,ve),Dn[wt](Ie,et),Ze=vt,wt=le,bt=ve,255&(me=0|C)&&(170&me?Fo(Ze,256,wt,bt):to(Ze,256,wt,bt)),me=Ie,Ze=et,255&(C>>=8)&&(170&C?Fo(vt,320,me,Ze):to(vt,320,me,Ze)),K<f.Ub-1&&(r(Ne[je].y,0,ne,ie+480,16),r(Ne[je].f,0,le,ve+224,8),r(Ne[je].ea,0,Ie,et+224,8)),C=8*ee*f.B,Ne=f.sa,je=f.ta+16*U+16*ee*f.R,vt=f.qa,me=f.ra+8*U+C,Ze=f.Ha,wt=f.Ia+8*U+C,C=0;16>C;++C)r(Ne,je+C*f.R,ne,ie+32*C,16);for(C=0;8>C;++C)r(vt,me+C*f.B,le,ve+32*C,8),r(Ze,wt+C*f.B,Ie,et+32*C,8)}}function IA(f,p,C,U,K,ee,ne,ie,le){var ve=[0],Ie=[0],et=0,me=le!=null?le.kd:0,Ne=le??new he;if(f==null||12>C)return 7;Ne.data=f,Ne.w=p,Ne.ha=C,p=[p],C=[C],Ne.gb=[Ne.gb];e:{var je=p,vt=C,Ze=Ne.gb;if(t(f!=null),t(vt!=null),t(Ze!=null),Ze[0]=0,12<=vt[0]&&!e(f,je[0],"RIFF")){if(e(f,je[0]+8,"WEBP")){Ze=3;break e}var wt=xe(f,je[0]+4);if(12>wt||4294967286<wt){Ze=3;break e}if(me&&wt>vt[0]-8){Ze=7;break e}Ze[0]=wt,je[0]+=12,vt[0]-=12}Ze=0}if(Ze!=0)return Ze;for(wt=0<Ne.gb[0],C=C[0];;){e:{var bt=f;vt=p,Ze=C;var Nt=ve,Ft=Ie,ur=je=[0];if((ir=et=[et])[0]=0,8>Ze[0])Ze=7;else{if(!e(bt,vt[0],"VP8X")){if(xe(bt,vt[0]+4)!=10){Ze=3;break e}if(18>Ze[0]){Ze=7;break e}var sr=xe(bt,vt[0]+8),Hr=1+Xe(bt,vt[0]+12);if(2147483648<=Hr*(bt=1+Xe(bt,vt[0]+15))){Ze=3;break e}ur!=null&&(ur[0]=sr),Nt!=null&&(Nt[0]=Hr),Ft!=null&&(Ft[0]=bt),vt[0]+=18,Ze[0]-=18,ir[0]=1}Ze=0}}if(et=et[0],je=je[0],Ze!=0)return Ze;if(vt=!!(2&je),!wt&&et)return 3;if(ee!=null&&(ee[0]=!!(16&je)),ne!=null&&(ne[0]=vt),ie!=null&&(ie[0]=0),ne=ve[0],je=Ie[0],et&&vt&&le==null){Ze=0;break}if(4>C){Ze=7;break}if(wt&&et||!wt&&!et&&!e(f,p[0],"ALPH")){C=[C],Ne.na=[Ne.na],Ne.P=[Ne.P],Ne.Sa=[Ne.Sa];e:{sr=f,Ze=p,wt=C;var ir=Ne.gb;Nt=Ne.na,Ft=Ne.P,ur=Ne.Sa,Hr=22,t(sr!=null),t(wt!=null),bt=Ze[0];var tn=wt[0];for(t(Nt!=null),t(ur!=null),Nt[0]=null,Ft[0]=null,ur[0]=0;;){if(Ze[0]=bt,wt[0]=tn,8>tn){Ze=7;break e}var Ha=xe(sr,bt+4);if(4294967286<Ha){Ze=3;break e}var Pr=8+Ha+1&-2;if(Hr+=Pr,0<ir&&Hr>ir){Ze=3;break e}if(!e(sr,bt,"VP8 ")||!e(sr,bt,"VP8L")){Ze=0;break e}if(tn[0]<Pr){Ze=7;break e}e(sr,bt,"ALPH")||(Nt[0]=sr,Ft[0]=bt+8,ur[0]=Ha),bt+=Pr,tn-=Pr}}if(C=C[0],Ne.na=Ne.na[0],Ne.P=Ne.P[0],Ne.Sa=Ne.Sa[0],Ze!=0)break}C=[C],Ne.Ja=[Ne.Ja],Ne.xa=[Ne.xa];e:if(ir=f,Ze=p,wt=C,Nt=Ne.gb[0],Ft=Ne.Ja,ur=Ne.xa,sr=Ze[0],bt=!e(ir,sr,"VP8 "),Hr=!e(ir,sr,"VP8L"),t(ir!=null),t(wt!=null),t(Ft!=null),t(ur!=null),8>wt[0])Ze=7;else{if(bt||Hr){if(ir=xe(ir,sr+4),12<=Nt&&ir>Nt-12){Ze=3;break e}if(me&&ir>wt[0]-8){Ze=7;break e}Ft[0]=ir,Ze[0]+=8,wt[0]-=8,ur[0]=Hr}else ur[0]=5<=wt[0]&&ir[sr+0]==47&&!(ir[sr+4]>>5),Ft[0]=wt[0];Ze=0}if(C=C[0],Ne.Ja=Ne.Ja[0],Ne.xa=Ne.xa[0],p=p[0],Ze!=0)break;if(4294967286<Ne.Ja)return 3;if(ie==null||vt||(ie[0]=Ne.xa?2:1),ne=[ne],je=[je],Ne.xa){if(5>C){Ze=7;break}ie=ne,me=je,vt=ee,f==null||5>C?f=0:5<=C&&f[p+0]==47&&!(f[p+4]>>5)?(wt=[0],ir=[0],Nt=[0],R(Ft=new O,f,p,C),qr(Ft,wt,ir,Nt)?(ie!=null&&(ie[0]=wt[0]),me!=null&&(me[0]=ir[0]),vt!=null&&(vt[0]=Nt[0]),f=1):f=0):f=0}else{if(10>C){Ze=7;break}ie=je,f==null||10>C||!$a(f,p+3,C-3)?f=0:(me=f[p+0]|f[p+1]<<8|f[p+2]<<16,vt=16383&(f[p+7]<<8|f[p+6]),f=16383&(f[p+9]<<8|f[p+8]),1&me||3<(me>>1&7)||!(me>>4&1)||me>>5>=Ne.Ja||!vt||!f?f=0:(ne&&(ne[0]=vt),ie&&(ie[0]=f),f=1))}if(!f||(ne=ne[0],je=je[0],et&&(ve[0]!=ne||Ie[0]!=je)))return 3;le!=null&&(le[0]=Ne,le.offset=p-le.w,t(4294967286>p-le.w),t(le.offset==le.ha-C));break}return Ze==0||Ze==7&&et&&le==null?(ee!=null&&(ee[0]|=Ne.na!=null&&0<Ne.na.length),U!=null&&(U[0]=ne),K!=null&&(K[0]=je),0):Ze}function Ws(f,p,C){var U=p.width,K=p.height,ee=0,ne=0,ie=U,le=K;if(p.Da=f!=null&&0<f.Da,p.Da&&(ie=f.cd,le=f.bd,ee=f.v,ne=f.j,11>C||(ee&=-2,ne&=-2),0>ee||0>ne||0>=ie||0>=le||ee+ie>U||ne+le>K))return 0;if(p.v=ee,p.j=ne,p.va=ee+ie,p.o=ne+le,p.U=ie,p.T=le,p.da=f!=null&&0<f.da,p.da){if(!rt(ie,le,C=[f.ib],ee=[f.hb]))return 0;p.ib=C[0],p.hb=ee[0]}return p.ob=f!=null&&f.ob,p.Kb=f==null||!f.Sd,p.da&&(p.ob=p.ib<3*U/4&&p.hb<3*K/4,p.Kb=0),1}function as(f){if(f==null)return 2;if(11>f.S){var p=f.f.RGBA;p.fb+=(f.height-1)*p.A,p.A=-p.A}else p=f.f.kb,f=f.height,p.O+=(f-1)*p.fa,p.fa=-p.fa,p.N+=(f-1>>1)*p.Ab,p.Ab=-p.Ab,p.W+=(f-1>>1)*p.Db,p.Db=-p.Db,p.F!=null&&(p.J+=(f-1)*p.lb,p.lb=-p.lb);return 0}function vs(f,p,C,U){if(U==null||0>=f||0>=p)return 2;if(C!=null){if(C.Da){var K=C.cd,ee=C.bd,ne=-2&C.v,ie=-2&C.j;if(0>ne||0>ie||0>=K||0>=ee||ne+K>f||ie+ee>p)return 2;f=K,p=ee}if(C.da){if(!rt(f,p,K=[C.ib],ee=[C.hb]))return 2;f=K[0],p=ee[0]}}U.width=f,U.height=p;e:{var le=U.width,ve=U.height;if(f=U.S,0>=le||0>=ve||!(f>=we&&13>f))f=2;else{if(0>=U.Rd&&U.sd==null){ne=ee=K=p=0;var Ie=(ie=le*Fm[f])*ve;if(11>f||(ee=(ve+1)/2*(p=(le+1)/2),f==12&&(ne=(K=le)*ve)),(ve=o(Ie+2*ee+ne))==null){f=1;break e}U.sd=ve,11>f?((le=U.f.RGBA).eb=ve,le.fb=0,le.A=ie,le.size=Ie):((le=U.f.kb).y=ve,le.O=0,le.fa=ie,le.Fd=Ie,le.f=ve,le.N=0+Ie,le.Ab=p,le.Cd=ee,le.ea=ve,le.W=0+Ie+ee,le.Db=p,le.Ed=ee,f==12&&(le.F=ve,le.J=0+Ie+2*ee),le.Tc=ne,le.lb=K)}if(p=1,K=U.S,ee=U.width,ne=U.height,K>=we&&13>K)if(11>K)f=U.f.RGBA,p&=(ie=Math.abs(f.A))*(ne-1)+ee<=f.size,p&=ie>=ee*Fm[K],p&=f.eb!=null;else{f=U.f.kb,ie=(ee+1)/2,Ie=(ne+1)/2,le=Math.abs(f.fa),ve=Math.abs(f.Ab);var et=Math.abs(f.Db),me=Math.abs(f.lb),Ne=me*(ne-1)+ee;p&=le*(ne-1)+ee<=f.Fd,p&=ve*(Ie-1)+ie<=f.Cd,p=(p&=et*(Ie-1)+ie<=f.Ed)&le>=ee&ve>=ie&et>=ie,p&=f.y!=null,p&=f.f!=null,p&=f.ea!=null,K==12&&(p&=me>=ee,p&=Ne<=f.Tc,p&=f.F!=null)}else p=0;f=p?0:2}}return f!=0||C!=null&&C.fd&&(f=as(U)),f}var ko=64,Yo=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],MA=24,Ga=32,ss=8,dA=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,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];ot("Predictor0","PredictorAdd0"),L.Predictor0=function(){return 4278190080},L.Predictor1=function(f){return f},L.Predictor2=function(f,p,C){return p[C+0]},L.Predictor3=function(f,p,C){return p[C+1]},L.Predictor4=function(f,p,C){return p[C-1]},L.Predictor5=function(f,p,C){return pt(pt(f,p[C+1]),p[C+0])},L.Predictor6=function(f,p,C){return pt(f,p[C-1])},L.Predictor7=function(f,p,C){return pt(f,p[C+0])},L.Predictor8=function(f,p,C){return pt(p[C-1],p[C+0])},L.Predictor9=function(f,p,C){return pt(p[C+0],p[C+1])},L.Predictor10=function(f,p,C){return pt(pt(f,p[C-1]),pt(p[C+0],p[C+1]))},L.Predictor11=function(f,p,C){var U=p[C+0];return 0>=W(U>>24&255,f>>24&255,(p=p[C-1])>>24&255)+W(U>>16&255,f>>16&255,p>>16&255)+W(U>>8&255,f>>8&255,p>>8&255)+W(255&U,255&f,255&p)?U:f},L.Predictor12=function(f,p,C){var U=p[C+0];return(Oe((f>>24&255)+(U>>24&255)-((p=p[C-1])>>24&255))<<24|Oe((f>>16&255)+(U>>16&255)-(p>>16&255))<<16|Oe((f>>8&255)+(U>>8&255)-(p>>8&255))<<8|Oe((255&f)+(255&U)-(255&p)))>>>0},L.Predictor13=function(f,p,C){var U=p[C-1];return(it((f=pt(f,p[C+0]))>>24&255,U>>24&255)<<24|it(f>>16&255,U>>16&255)<<16|it(f>>8&255,U>>8&255)<<8|it(255&f,255&U))>>>0};var Eo=L.PredictorAdd0;L.PredictorAdd1=z,ot("Predictor2","PredictorAdd2"),ot("Predictor3","PredictorAdd3"),ot("Predictor4","PredictorAdd4"),ot("Predictor5","PredictorAdd5"),ot("Predictor6","PredictorAdd6"),ot("Predictor7","PredictorAdd7"),ot("Predictor8","PredictorAdd8"),ot("Predictor9","PredictorAdd9"),ot("Predictor10","PredictorAdd10"),ot("Predictor11","PredictorAdd11"),ot("Predictor12","PredictorAdd12"),ot("Predictor13","PredictorAdd13");var Do=L.PredictorAdd2;$e("ColorIndexInverseTransform","MapARGB","32b",function(f){return f>>8&255},function(f){return f}),$e("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(f){return f},function(f){return f>>8&255});var QA,za=L.ColorIndexInverseTransform,Kn=L.MapARGB,Ri=L.VP8LColorIndexInverseTransformAlpha,Ks=L.MapAlpha,$s=L.VP8LPredictorsAdd=[];$s.length=16,(L.VP8LPredictors=[]).length=16,(L.VP8LPredictorsAdd_C=[]).length=16,(L.VP8LPredictors_C=[]).length=16;var Rr,la,Zs,To,ho,fA,xo,So,eo,Fo,Xa,to,gn,bn,$n,ca,Lo,ii,NA,Go,Bl,bl,Cl,li,zo,Dc,ci,kl,Tc=o(511),xc=o(2041),Sc=o(225),El=o(767),Dl=0,Oi=xc,_=Sc,G=El,de=Tc,we=0,Be=1,Ce=2,Ue=3,Se=4,_e=5,ht=6,gt=7,He=8,dt=9,Qt=10,De=[2,3,7],Bt=[3,3,11],Pt=[280,256,256,256,40],yr=[0,1,1,1,0],Cr=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],vr=[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],pn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],en=8,Zn=[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],os=[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],ms=null,go=[[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]],ea=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Xo=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Jo=[[[[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]]]],hA=[[[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]]],Zo=[[[[255,255,255,255,255,255,255,255,255,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]]]],Tl=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],zr=[],Or=[],Dn=[],ws=1,Uo=2,As=[],Ls=[];Zr("UpsampleRgbLinePair",ma,3),Zr("UpsampleBgrLinePair",Ya,3),Zr("UpsampleRgbaLinePair",uA,4),Zr("UpsampleBgraLinePair",Oa,4),Zr("UpsampleArgbLinePair",wa,4),Zr("UpsampleRgba4444LinePair",Aa,2),Zr("UpsampleRgb565LinePair",Ia,2);var Fc=L.UpsampleRgbLinePair,xl=L.UpsampleBgrLinePair,Lc=L.UpsampleRgbaLinePair,Uc=L.UpsampleBgraLinePair,Ic=L.UpsampleArgbLinePair,Tm=L.UpsampleRgba4444LinePair,mE=L.UpsampleRgb565LinePair,Mc=16,Qc=1<<Mc-1,Sl=-227,Nd=482,wE=6,xm=0,yE=o(256),BE=o(256),bE=o(256),CE=o(256),kE=o(Nd-Sl),EE=o(Nd-Sl);Vs("YuvToRgbRow",ma,3),Vs("YuvToBgrRow",Ya,3),Vs("YuvToRgbaRow",uA,4),Vs("YuvToBgraRow",Oa,4),Vs("YuvToArgbRow",wa,4),Vs("YuvToRgba4444Row",Aa,2),Vs("YuvToRgb565Row",Ia,2);var Sm=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Nc=[0,2,8],DE=[8,7,6,4,4,2,2,2,1,1,1,1],TE=1;this.WebPDecodeRGBA=function(f,p,C,U,K){var ee=Be,ne=new re,ie=new Kt;ne.ba=ie,ie.S=ee,ie.width=[ie.width],ie.height=[ie.height];var le=ie.width,ve=ie.height,Ie=new jt;if(Ie==null||f==null)var et=2;else t(Ie!=null),et=IA(f,p,C,Ie.width,Ie.height,Ie.Pd,Ie.Qd,Ie.format,null);if(et!=0?le=0:(le!=null&&(le[0]=Ie.width[0]),ve!=null&&(ve[0]=Ie.height[0]),le=1),le){ie.width=ie.width[0],ie.height=ie.height[0],U!=null&&(U[0]=ie.width),K!=null&&(K[0]=ie.height);e:{if(U=new Jn,(K=new he).data=f,K.w=p,K.ha=C,K.kd=1,p=[0],t(K!=null),((f=IA(K.data,K.w,K.ha,null,null,null,p,null,K))==0||f==7)&&p[0]&&(f=4),(p=f)==0){if(t(ne!=null),U.data=K.data,U.w=K.w+K.offset,U.ha=K.ha-K.offset,U.put=Rt,U.ac=ar,U.bc=cr,U.ma=ne,K.xa){if((f=ln())==null){ne=1;break e}if((function(me,Ne){var je=[0],vt=[0],Ze=[0];t:for(;;){if(me==null)return 0;if(Ne==null)return me.a=2,0;if(me.l=Ne,me.a=0,R(me.m,Ne.data,Ne.w,Ne.ha),!qr(me.m,je,vt,Ze)){me.a=3;break t}if(me.xb=Uo,Ne.width=je[0],Ne.height=vt[0],!En(je[0],vt[0],1,me,null))break t;return 1}return t(me.a!=0),0})(f,U)){if(U=(p=vs(U.width,U.height,ne.Oa,ne.ba))==0){t:{U=f;r:for(;;){if(U==null){U=0;break t}if(t(U.s.yc!=null),t(U.s.Ya!=null),t(0<U.s.Wb),t((C=U.l)!=null),t((K=C.ma)!=null),U.xb!=0){if(U.ca=K.ba,U.tb=K.tb,t(U.ca!=null),!Ws(K.Oa,C,Ue)){U.a=2;break r}if(!xa(U,C.width)||C.da)break r;if((C.da||Vt(U.ca.S))&&xr(),11>U.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),U.ca.f.kb.F!=null&&xr()),U.Pb&&0<U.s.ua&&U.s.vb.X==null&&!te(U.s.vb,U.s.Wa.Xa)){U.a=1;break r}U.xb=0}if(!Gn(U,U.V,U.Ba,U.c,U.i,C.o,ra))break r;K.Dc=U.Ma,U=1;break t}t(U.a!=0),U=0}U=!U}U&&(p=f.a)}else p=f.a}else{if((f=new oa)==null){ne=1;break e}if(f.Fa=K.na,f.P=K.P,f.qc=K.Sa,qa(f,U)){if((p=vs(U.width,U.height,ne.Oa,ne.ba))==0){if(f.Aa=0,C=ne.Oa,t((K=f)!=null),C!=null){if(0<(le=0>(le=C.Md)?0:100<le?255:255*le/100)){for(ve=Ie=0;4>ve;++ve)12>(et=K.pb[ve]).lc&&(et.ia=le*DE[0>et.lc?0:et.lc]>>3),Ie|=et.ia;Ie&&(alert("todo:VP8InitRandom"),K.ia=1)}K.Ga=C.Id,100<K.Ga?K.Ga=100:0>K.Ga&&(K.Ga=0)}(function(me,Ne){if(me==null)return 0;if(Ne==null)return Er(me,2,"NULL VP8Io parameter in VP8Decode().");if(!me.cb&&!qa(me,Ne))return 0;if(t(me.cb),Ne.ac==null||Ne.ac(Ne)){Ne.ob&&(me.L=0);var je=Nc[me.L];if(me.L==2?(me.yb=0,me.zb=0):(me.yb=Ne.v-je>>4,me.zb=Ne.j-je>>4,0>me.yb&&(me.yb=0),0>me.zb&&(me.zb=0)),me.Va=Ne.o+15+je>>4,me.Hb=Ne.va+15+je>>4,me.Hb>me.za&&(me.Hb=me.za),me.Va>me.Ub&&(me.Va=me.Ub),0<me.L){var vt=me.ed;for(je=0;4>je;++je){var Ze;if(me.Qa.Cb){var wt=me.Qa.Lb[je];me.Qa.Fb||(wt+=vt.Tb)}else wt=vt.Tb;for(Ze=0;1>=Ze;++Ze){var bt=me.gd[je][Ze],Nt=wt;if(vt.Pc&&(Nt+=vt.vd[0],Ze&&(Nt+=vt.od[0])),0<(Nt=0>Nt?0:63<Nt?63:Nt)){var Ft=Nt;0<vt.wb&&(Ft=4<vt.wb?Ft>>2:Ft>>1)>9-vt.wb&&(Ft=9-vt.wb),1>Ft&&(Ft=1),bt.dd=Ft,bt.tc=2*Nt+Ft,bt.ld=40<=Nt?2:15<=Nt?1:0}else bt.tc=0;bt.La=Ze}}}je=0}else Er(me,6,"Frame setup failed"),je=me.a;if(je=je==0){if(je){me.$c=0,0<me.Aa||(me.Ic=TE);t:{je=me.Ic,vt=4*(Ft=me.za);var ur=32*Ft,sr=Ft+1,Hr=0<me.L?Ft*(0<me.Aa?2:1):0,ir=(me.Aa==2?2:1)*Ft;if((bt=vt+832+(Ze=3*(16*je+Nc[me.L])/2*ur)+(wt=me.Fa!=null&&0<me.Fa.length?me.Kc.c*me.Kc.i:0))!=bt)je=0;else{if(bt>me.Vb){if(me.Vb=0,me.Ec=o(bt),me.Fc=0,me.Ec==null){je=Er(me,1,"no memory during frame initialization.");break t}me.Vb=bt}bt=me.Ec,Nt=me.Fc,me.Ac=bt,me.Bc=Nt,Nt+=vt,me.Gd=i(ur,Xn),me.Hd=0,me.rb=i(sr+1,aa),me.sb=1,me.wa=Hr?i(Hr,Hn):null,me.Y=0,me.D.Nb=0,me.D.wa=me.wa,me.D.Y=me.Y,0<me.Aa&&(me.D.Y+=Ft),t(!0),me.oc=bt,me.pc=Nt,Nt+=832,me.ya=i(ir,In),me.aa=0,me.D.ya=me.ya,me.D.aa=me.aa,me.Aa==2&&(me.D.aa+=Ft),me.R=16*Ft,me.B=8*Ft,Ft=(ur=Nc[me.L])*me.R,ur=ur/2*me.B,me.sa=bt,me.ta=Nt+Ft,me.qa=me.sa,me.ra=me.ta+16*je*me.R+ur,me.Ha=me.qa,me.Ia=me.ra+8*je*me.B+ur,me.$c=0,Nt+=Ze,me.mb=wt?bt:null,me.nb=wt?Nt:null,t(Nt+wt<=me.Fc+me.Vb),ns(me),s(me.Ac,me.Bc,0,vt),je=1}}if(je){if(Ne.ka=0,Ne.y=me.sa,Ne.O=me.ta,Ne.f=me.qa,Ne.N=me.ra,Ne.ea=me.Ha,Ne.Vd=me.Ia,Ne.fa=me.R,Ne.Rc=me.B,Ne.F=null,Ne.J=0,!Dl){for(je=-255;255>=je;++je)Tc[255+je]=0>je?-je:je;for(je=-1020;1020>=je;++je)xc[1020+je]=-128>je?-128:127<je?127:je;for(je=-112;112>=je;++je)Sc[112+je]=-16>je?-16:15<je?15:je;for(je=-255;510>=je;++je)El[255+je]=0>je?0:255<je?255:je;Dl=1}xo=Ye,So=ps,Fo=va,Xa=It,to=ce,eo=Hs,gn=P,bn=ue,$n=nt,ca=v,Lo=ke,ii=Ge,NA=I,Go=q,Bl=Yt,bl=pr,Cl=Wr,li=Bn,Or[0]=qo,Or[1]=Ot,Or[2]=cA,Or[3]=Co,Or[4]=fo,Or[5]=Le,Or[6]=pe,Or[7]=Je,Or[8]=mt,Or[9]=Re,zr[0]=wn,zr[1]=nr,zr[2]=Vr,zr[3]=Sn,zr[4]=fn,zr[5]=yn,zr[6]=Ps,Dn[0]=Ct,Dn[1]=Ht,Dn[2]=kt,Dn[3]=at,Dn[4]=Wt,Dn[5]=Tt,Dn[6]=tr,je=1}else je=0}je&&(je=(function(tn,Ha){for(tn.M=0;tn.M<tn.Va;++tn.M){var Pr,lr=tn.Jc[tn.M&tn.Xb],$t=tn.m,ya=tn;for(Pr=0;Pr<ya.za;++Pr){var Mr=$t,an=ya,Vn=an.Ac,is=an.Bc+4*Pr,Us=an.zc,ua=an.ya[an.aa+Pr];if(an.Qa.Bb?ua.$b=Fe(Mr,an.Pa.jb[0])?2+Fe(Mr,an.Pa.jb[2]):Fe(Mr,an.Pa.jb[1]):ua.$b=0,an.kc&&(ua.Ad=Fe(Mr,an.Bd)),ua.Za=!Fe(Mr,145)+0,ua.Za){var ys=ua.Ob,Is=0;for(an=0;4>an;++an){var Pa,cn=Us[0+an];for(Pa=0;4>Pa;++Pa){cn=hA[Vn[is+Pa]][cn];for(var Cn=Xo[Fe(Mr,cn[0])];0<Cn;)Cn=Xo[2*Cn+Fe(Mr,cn[Cn])];cn=-Cn,Vn[is+Pa]=cn}r(ys,Is,Vn,is,4),Is+=4,Us[0+an]=cn}}else cn=Fe(Mr,156)?Fe(Mr,128)?1:3:Fe(Mr,163)?2:0,ua.Ob[0]=cn,s(Vn,is,cn,4),s(Us,0,cn,4);ua.Dd=Fe(Mr,142)?Fe(Mr,114)?Fe(Mr,183)?1:3:2:0}if(ya.m.Ka)return Er(tn,7,"Premature end-of-partition0 encountered.");for(;tn.ja<tn.za;++tn.ja){if(ya=lr,Mr=($t=tn).rb[$t.sb-1],Vn=$t.rb[$t.sb+$t.ja],Pr=$t.ya[$t.aa+$t.ja],is=$t.kc?Pr.Ad:0)Mr.la=Vn.la=0,Pr.Za||(Mr.Na=Vn.Na=0),Pr.Hc=0,Pr.Gc=0,Pr.ia=0;else{var da,kn;if(Mr=Vn,Vn=ya,is=$t.Pa.Xc,Us=$t.ya[$t.aa+$t.ja],ua=$t.pb[Us.$b],an=Us.ad,ys=0,Is=$t.rb[$t.sb-1],cn=Pa=0,s(an,ys,0,384),Us.Za)var ls=0,Io=is[3];else{Cn=o(16);var Ba=Mr.Na+Is.Na;if(Ba=ms(Vn,is[1],Ba,ua.Eb,0,Cn,0),Mr.Na=Is.Na=(0<Ba)+0,1<Ba)xo(Cn,0,an,ys);else{var qs=Cn[0]+3>>3;for(Cn=0;256>Cn;Cn+=16)an[ys+Cn]=qs}ls=1,Io=is[0]}var Fn=15&Mr.la,Va=15&Is.la;for(Cn=0;4>Cn;++Cn){var ro=1&Va;for(qs=kn=0;4>qs;++qs)Fn=Fn>>1|(ro=(Ba=ms(Vn,Io,Ba=ro+(1&Fn),ua.Sc,ls,an,ys))>ls)<<7,kn=kn<<2|(3<Ba?3:1<Ba?2:an[ys+0]!=0),ys+=16;Fn>>=4,Va=Va>>1|ro<<7,Pa=(Pa<<8|kn)>>>0}for(Io=Fn,ls=Va>>4,da=0;4>da;da+=2){for(kn=0,Fn=Mr.la>>4+da,Va=Is.la>>4+da,Cn=0;2>Cn;++Cn){for(ro=1&Va,qs=0;2>qs;++qs)Ba=ro+(1&Fn),Fn=Fn>>1|(ro=0<(Ba=ms(Vn,is[2],Ba,ua.Qc,0,an,ys)))<<3,kn=kn<<2|(3<Ba?3:1<Ba?2:an[ys+0]!=0),ys+=16;Fn>>=2,Va=Va>>1|ro<<5}cn|=kn<<4*da,Io|=Fn<<4<<da,ls|=(240&Va)<<da}Mr.la=Io,Is.la=ls,Us.Hc=Pa,Us.Gc=cn,Us.ia=43690&cn?0:ua.ia,is=!(Pa|cn)}if(0<$t.L&&($t.wa[$t.Y+$t.ja]=$t.gd[Pr.$b][Pr.Za],$t.wa[$t.Y+$t.ja].La|=!is),ya.Ka)return Er(tn,7,"Premature end-of-file encountered.")}if(ns(tn),$t=Ha,ya=1,Pr=(lr=tn).D,Mr=0<lr.L&&lr.M>=lr.zb&&lr.M<=lr.Va,lr.Aa==0)t:{if(Pr.M=lr.M,Pr.uc=Mr,jo(lr,Pr),ya=1,Pr=(kn=lr.D).Nb,Mr=(cn=Nc[lr.L])*lr.R,Vn=cn/2*lr.B,Cn=16*Pr*lr.R,qs=8*Pr*lr.B,is=lr.sa,Us=lr.ta-Mr+Cn,ua=lr.qa,an=lr.ra-Vn+qs,ys=lr.Ha,Is=lr.Ia-Vn+qs,Va=(Fn=kn.M)==0,Pa=Fn>=lr.Va-1,lr.Aa==2&&jo(lr,kn),kn.uc)for(ro=(Ba=lr).D.M,t(Ba.D.uc),kn=Ba.yb;kn<Ba.Hb;++kn){ls=kn,Io=ro;var Ms=(no=(cs=Ba).D).Nb;da=cs.R;var no=no.wa[no.Y+ls],ao=cs.sa,js=cs.ta+16*Ms*da+16*ls,so=no.dd,Nn=no.tc;if(Nn!=0)if(t(3<=Nn),cs.L==1)0<ls&&bl(ao,js,da,Nn+4),no.La&&li(ao,js,da,Nn),0<Io&&Bl(ao,js,da,Nn+4),no.La&&Cl(ao,js,da,Nn);else{var oo=cs.B,Mo=cs.qa,ui=cs.ra+8*Ms*oo+8*ls,gA=cs.Ha,cs=cs.Ia+8*Ms*oo+8*ls;Ms=no.ld,0<ls&&(bn(ao,js,da,Nn+4,so,Ms),ca(Mo,ui,gA,cs,oo,Nn+4,so,Ms)),no.La&&(ii(ao,js,da,Nn,so,Ms),Go(Mo,ui,gA,cs,oo,Nn,so,Ms)),0<Io&&(gn(ao,js,da,Nn+4,so,Ms),$n(Mo,ui,gA,cs,oo,Nn+4,so,Ms)),no.La&&(Lo(ao,js,da,Nn,so,Ms),NA(Mo,ui,gA,cs,oo,Nn,so,Ms))}}if(lr.ia&&alert("todo:DitherRow"),$t.put!=null){if(kn=16*Fn,Fn=16*(Fn+1),Va?($t.y=lr.sa,$t.O=lr.ta+Cn,$t.f=lr.qa,$t.N=lr.ra+qs,$t.ea=lr.Ha,$t.W=lr.Ia+qs):(kn-=cn,$t.y=is,$t.O=Us,$t.f=ua,$t.N=an,$t.ea=ys,$t.W=Is),Pa||(Fn-=cn),Fn>$t.o&&(Fn=$t.o),$t.F=null,$t.J=null,lr.Fa!=null&&0<lr.Fa.length&&kn<Fn&&($t.J=Ur(lr,$t,kn,Fn-kn),$t.F=lr.mb,$t.F==null&&$t.F.length==0)){ya=Er(lr,3,"Could not decode alpha data.");break t}kn<$t.j&&(cn=$t.j-kn,kn=$t.j,t(!(1&cn)),$t.O+=lr.R*cn,$t.N+=lr.B*(cn>>1),$t.W+=lr.B*(cn>>1),$t.F!=null&&($t.J+=$t.width*cn)),kn<Fn&&($t.O+=$t.v,$t.N+=$t.v>>1,$t.W+=$t.v>>1,$t.F!=null&&($t.J+=$t.v),$t.ka=kn-$t.j,$t.U=$t.va-$t.v,$t.T=Fn-kn,ya=$t.put($t))}Pr+1!=lr.Ic||Pa||(r(lr.sa,lr.ta-Mr,is,Us+16*lr.R,Mr),r(lr.qa,lr.ra-Vn,ua,an+8*lr.B,Vn),r(lr.Ha,lr.Ia-Vn,ys,Is+8*lr.B,Vn))}if(!ya)return Er(tn,6,"Output aborted.")}return 1})(me,Ne)),Ne.bc!=null&&Ne.bc(Ne),je&=1}return je?(me.cb=0,je):0})(f,U)||(p=f.a)}}else p=f.a}p==0&&ne.Oa!=null&&ne.Oa.fd&&(p=as(ne.ba))}ne=p}ee=ne!=0?null:11>ee?ie.f.RGBA.eb:ie.f.kb.y}else ee=null;return ee};var Fm=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(L,j){for(var D="",S=0;S<4;S++)D+=String.fromCharCode(L[j++]);return D}function u(L,j){return L[j+0]|L[j+1]<<8}function h(L,j){return(L[j+0]|L[j+1]<<8|L[j+2]<<16)>>>0}function g(L,j){return(L[j+0]|L[j+1]<<8|L[j+2]<<16|L[j+3]<<24)>>>0}new l;var d=[0],m=[0],y=[],B=new l,w=n,E=(function(L,j){var D={},S=0,Q=!1,T=0,oe=0;if(D.frames=[],!(function(k,O){for(var N=0;N<4;N++)if(k[O+N]!="RIFF".charCodeAt(N))return!0;return!1})(L,j)){for(g(L,j+=4),j+=8;j<L.length;){var X=c(L,j),F=g(L,j+=4);j+=4;var M=F+(1&F);switch(X){case"VP8 ":case"VP8L":D.frames[S]===void 0&&(D.frames[S]={}),(J=D.frames[S]).src_off=Q?oe:j-8,J.src_size=T+F+8,S++,Q&&(Q=!1,T=0,oe=0);break;case"VP8X":(J=D.header={}).feature_flags=L[j];var R=j+4;J.canvas_width=1+h(L,R),R+=3,J.canvas_height=1+h(L,R),R+=3;break;case"ALPH":Q=!0,T=M+8,oe=j-8;break;case"ANIM":(J=D.header).bgcolor=g(L,j),R=j+4,J.loop_count=u(L,R),R+=2;break;case"ANMF":var ae,J;(J=D.frames[S]={}).offset_x=2*h(L,j),j+=3,J.offset_y=2*h(L,j),j+=3,J.width=1+h(L,j),j+=3,J.height=1+h(L,j),j+=3,J.duration=h(L,j),j+=3,ae=L[j++],J.dispose=1&ae,J.blend=ae>>1&1}X!="ANMF"&&(j+=M)}return D}})(w,0);E.response=w,E.rgbaoutput=!0,E.dataurl=!1;var x=E.header?E.header:null,b=E.frames?E.frames:null;if(x){x.loop_counter=x.loop_count,d=[x.canvas_height],m=[x.canvas_width];for(var H=0;H<b.length&&b[H].blend!=0;H++);}var $=b[0],Y=B.WebPDecodeRGBA(w,$.src_off,$.src_size,m,d);$.rgba=Y,$.imgwidth=m[0],$.imgheight=d[0];for(var V=0;V<m[0]*d[0]*4;V++)y[V]=Y[V];return this.width=m,this.height=d,this.data=y,this}/** ====================================================================
* @license
* jsPDF XMP metadata plugin
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/function dN(){var n,t=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(t));n=this.internal.__metadata__.rawXml?e:'<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>'+e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function fN(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var t,e,r,s,o,i,A,l,c,u=function(k){return k=k||{},this.isStrokeTransparent=k.isStrokeTransparent||!1,this.strokeOpacity=k.strokeOpacity||1,this.strokeStyle=k.strokeStyle||"#000000",this.fillStyle=k.fillStyle||"#000000",this.isFillTransparent=k.isFillTransparent||!1,this.fillOpacity=k.fillOpacity||1,this.font=k.font||"10px sans-serif",this.textBaseline=k.textBaseline||"alphabetic",this.textAlign=k.textAlign||"left",this.lineWidth=k.lineWidth||1,this.lineJoin=k.lineJoin||"miter",this.lineCap=k.lineCap||"butt",this.path=k.path||[],this.transform=k.transform!==void 0?k.transform.clone():new l,this.globalCompositeOperation=k.globalCompositeOperation||"normal",this.globalAlpha=k.globalAlpha||1,this.clip_path=k.clip_path||[],this.currentPoint=k.currentPoint||new i,this.miterLimit=k.miterLimit||10,this.lastPoint=k.lastPoint||new i,this.lineDashOffset=k.lineDashOffset||0,this.lineDash=k.lineDash||[],this.margin=k.margin||[0,0,0,0],this.prevPageLastElemOffset=k.prevPageLastElemOffset||0,this.ignoreClearRect=typeof k.ignoreClearRect!="boolean"||k.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new h(this),t=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,s=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,i=this.internal.Point,A=this.internal.Rectangle,l=this.internal.Matrix,c=new u}]);var h=function(k){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var O=k;Object.defineProperty(this,"pdf",{get:function(){return O}});var N=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return N},set:function(te){N=!!te}});var Z=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return Z},set:function(te){Z=!!te}});var se=0;Object.defineProperty(this,"posX",{get:function(){return se},set:function(te){isNaN(te)||(se=te)}});var ge=0;Object.defineProperty(this,"posY",{get:function(){return ge},set:function(te){isNaN(te)||(ge=te)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(te){var lt;typeof te=="number"?lt=[te,te,te,te]:((lt=new Array(4))[0]=te[0],lt[1]=te.length>=2?te[1]:lt[0],lt[2]=te.length>=3?te[2]:lt[0],lt[3]=te.length>=4?te[3]:lt[1]),c.margin=lt}});var fe=!1;Object.defineProperty(this,"autoPaging",{get:function(){return fe},set:function(te){fe=te}});var Ae=0;Object.defineProperty(this,"lastBreak",{get:function(){return Ae},set:function(te){Ae=te}});var Fe=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Fe},set:function(te){Fe=te}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(te){te instanceof u&&(c=te)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(te){c.path=te}});var be=[];Object.defineProperty(this,"ctxStack",{get:function(){return be},set:function(te){be=te}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(te){var lt;lt=g(te),this.ctx.fillStyle=lt.style,this.ctx.isFillTransparent=lt.a===0,this.ctx.fillOpacity=lt.a,this.pdf.setFillColor(lt.r,lt.g,lt.b,{a:lt.a}),this.pdf.setTextColor(lt.r,lt.g,lt.b,{a:lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(te){var lt=g(te);this.ctx.strokeStyle=lt.style,this.ctx.isStrokeTransparent=lt.a===0,this.ctx.strokeOpacity=lt.a,lt.a===0?this.pdf.setDrawColor(255,255,255):(lt.a,this.pdf.setDrawColor(lt.r,lt.g,lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(te){["butt","round","square"].indexOf(te)!==-1&&(this.ctx.lineCap=te,this.pdf.setLineCap(te))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(te){isNaN(te)||(this.ctx.lineWidth=te,this.pdf.setLineWidth(te))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(te){["bevel","round","miter"].indexOf(te)!==-1&&(this.ctx.lineJoin=te,this.pdf.setLineJoin(te))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(te){isNaN(te)||(this.ctx.miterLimit=te,this.pdf.setMiterLimit(te))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(te){this.ctx.textBaseline=te}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(te){["right","end","center","left","start"].indexOf(te)!==-1&&(this.ctx.textAlign=te)}});var Ke=null,Xe=null,xe=null;Object.defineProperty(this,"fontFaces",{get:function(){return xe},set:function(te){Ke=null,Xe=null,xe=te}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(te){var lt;if(this.ctx.font=te,(lt=/^\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(te))!==null){var Pe=lt[1];lt[2];var rt=lt[3],Te=lt[4];lt[5];var Et=lt[6],ot=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Te)[2];Te=Math.floor(ot==="px"?parseFloat(Te)*this.pdf.internal.scaleFactor:ot==="em"?parseFloat(Te)*this.pdf.getFontSize():parseFloat(Te)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Te);var yt=(function($e){var Ve,Mt,tt=[],_t=$e.trim();if(_t==="")return df;if(_t in d1)return[d1[_t]];for(;_t!=="";){switch(Mt=null,Ve=(_t=h1(_t)).charAt(0)){case'"':case"'":Mt=oN(_t.substring(1),Ve);break;default:Mt=AN(_t)}if(Mt===null||(tt.push(Mt[0]),(_t=h1(Mt[1]))!==""&&_t.charAt(0)!==","))return df;_t=_t.replace(/^,/,"")}return tt})(Et);if(this.fontFaces){var pt=(function($e,Ve){var Mt=$e.getFontList(),tt=JSON.stringify(Mt);if(Ke===null||Xe!==tt){var _t=(function(rr){var St=[];return Object.keys(rr).forEach(function(hr){rr[hr].forEach(function(Vt){var Xt=null;switch(Vt){case"bold":Xt={family:hr,weight:"bold"};break;case"italic":Xt={family:hr,style:"italic"};break;case"bolditalic":Xt={family:hr,weight:"bold",style:"italic"};break;case"":case"normal":Xt={family:hr}}Xt!==null&&(Xt.ref={name:hr,style:Vt},St.push(Xt))})}),St})(Mt);Ke=(function(rr){for(var St={},hr=0;hr<rr.length;++hr){var Vt=uf(rr[hr]),Xt=Vt.family,mr=Vt.stretch,Kt=Vt.style,jt=Vt.weight;St[Xt]=St[Xt]||{},St[Xt][mr]=St[Xt][mr]||{},St[Xt][mr][Kt]=St[Xt][mr][Kt]||{},St[Xt][mr][Kt][jt]=Vt}return St})(_t.concat(Ve)),Xe=tt}return Ke})(this.pdf,this.fontFaces),Oe=yt.map(function($e){return{family:$e,stretch:"normal",weight:rt,style:Pe}}),it=(function($e,Ve,Mt){for(var tt=(Mt=Mt||{}).defaultFontFamily||"times",_t=Object.assign({},sN,Mt.genericFontFamilies||{}),rr=null,St=null,hr=0;hr<Ve.length;++hr)if(_t[(rr=uf(Ve[hr])).family]&&(rr.family=_t[rr.family]),$e.hasOwnProperty(rr.family)){St=$e[rr.family];break}if(!(St=St||$e[tt]))throw new Error("Could not find a font-family for the rule '"+f1(rr)+"' and default family '"+tt+"'.");if(St=(function(Vt,Xt){if(Xt[Vt])return Xt[Vt];var mr=Kp[Vt],Kt=mr<=Kp.normal?-1:1,jt=u1(Xt,UC,mr,Kt);if(!jt)throw new Error("Could not find a matching font-stretch value for "+Vt);return jt})(rr.stretch,St),St=(function(Vt,Xt){if(Xt[Vt])return Xt[Vt];for(var mr=LC[Vt],Kt=0;Kt<mr.length;++Kt)if(Xt[mr[Kt]])return Xt[mr[Kt]];throw new Error("Could not find a matching font-style for "+Vt)})(rr.style,St),!(St=(function(Vt,Xt){if(Xt[Vt])return Xt[Vt];if(Vt===400&&Xt[500])return Xt[500];if(Vt===500&&Xt[400])return Xt[400];var mr=aN[Vt],Kt=u1(Xt,IC,mr,Vt<400?-1:1);if(!Kt)throw new Error("Could not find a matching font-weight for value "+Vt);return Kt})(rr.weight,St)))throw new Error("Failed to resolve a font for the rule '"+f1(rr)+"'.");return St})(pt,Oe);this.pdf.setFont(it.ref.name,it.ref.style)}else{var W="";(rt==="bold"||parseInt(rt,10)>=700||Pe==="bold")&&(W="bold"),Pe==="italic"&&(W+="italic"),W.length===0&&(W="normal");for(var z="",ye={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"},qe=0;qe<yt.length;qe++){if(this.pdf.internal.getFont(yt[qe],W,{noFallback:!0,disableWarning:!0})!==void 0){z=yt[qe];break}if(W==="bolditalic"&&this.pdf.internal.getFont(yt[qe],"bold",{noFallback:!0,disableWarning:!0})!==void 0)z=yt[qe],W="bold";else if(this.pdf.internal.getFont(yt[qe],"normal",{noFallback:!0,disableWarning:!0})!==void 0){z=yt[qe],W="normal";break}}if(z===""){for(var ct=0;ct<yt.length;ct++)if(ye[yt[ct]]){z=ye[yt[ct]];break}}z=z===""?"Times":z,this.pdf.setFont(z,W)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(te){this.ctx.globalCompositeOperation=te}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(te){this.ctx.globalAlpha=te}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(te){this.ctx.lineDashOffset=te,J.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(te){this.ctx.lineDash=te,J.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(te){this.ctx.ignoreClearRect=!!te}})};h.prototype.setLineDash=function(k){this.lineDash=k},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){b.call(this,"fill",!1)},h.prototype.stroke=function(){b.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(k,O){if(isNaN(k)||isNaN(O))throw Ln.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var N=this.ctx.transform.applyToPoint(new i(k,O));this.path.push({type:"mt",x:N.x,y:N.y}),this.ctx.lastPoint=new i(k,O)},h.prototype.closePath=function(){var k=new i(0,0),O=0;for(O=this.path.length-1;O!==-1;O--)if(this.path[O].type==="begin"&&hn(this.path[O+1])==="object"&&typeof this.path[O+1].x=="number"){k=new i(this.path[O+1].x,this.path[O+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new i(k.x,k.y)},h.prototype.lineTo=function(k,O){if(isNaN(k)||isNaN(O))throw Ln.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var N=this.ctx.transform.applyToPoint(new i(k,O));this.path.push({type:"lt",x:N.x,y:N.y}),this.ctx.lastPoint=new i(N.x,N.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),b.call(this,null,!0)},h.prototype.quadraticCurveTo=function(k,O,N,Z){if(isNaN(N)||isNaN(Z)||isNaN(k)||isNaN(O))throw Ln.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var se=this.ctx.transform.applyToPoint(new i(N,Z)),ge=this.ctx.transform.applyToPoint(new i(k,O));this.path.push({type:"qct",x1:ge.x,y1:ge.y,x:se.x,y:se.y}),this.ctx.lastPoint=new i(se.x,se.y)},h.prototype.bezierCurveTo=function(k,O,N,Z,se,ge){if(isNaN(se)||isNaN(ge)||isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z))throw Ln.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var fe=this.ctx.transform.applyToPoint(new i(se,ge)),Ae=this.ctx.transform.applyToPoint(new i(k,O)),Fe=this.ctx.transform.applyToPoint(new i(N,Z));this.path.push({type:"bct",x1:Ae.x,y1:Ae.y,x2:Fe.x,y2:Fe.y,x:fe.x,y:fe.y}),this.ctx.lastPoint=new i(fe.x,fe.y)},h.prototype.arc=function(k,O,N,Z,se,ge){if(isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z)||isNaN(se))throw Ln.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ge=!!ge,!this.ctx.transform.isIdentity){var fe=this.ctx.transform.applyToPoint(new i(k,O));k=fe.x,O=fe.y;var Ae=this.ctx.transform.applyToPoint(new i(0,N)),Fe=this.ctx.transform.applyToPoint(new i(0,0));N=Math.sqrt(Math.pow(Ae.x-Fe.x,2)+Math.pow(Ae.y-Fe.y,2))}Math.abs(se-Z)>=2*Math.PI&&(Z=0,se=2*Math.PI),this.path.push({type:"arc",x:k,y:O,radius:N,startAngle:Z,endAngle:se,counterclockwise:ge})},h.prototype.arcTo=function(k,O,N,Z,se){throw new Error("arcTo not implemented.")},h.prototype.rect=function(k,O,N,Z){if(isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z))throw Ln.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(k,O),this.lineTo(k+N,O),this.lineTo(k+N,O+Z),this.lineTo(k,O+Z),this.lineTo(k,O),this.lineTo(k+N,O),this.lineTo(k,O)},h.prototype.fillRect=function(k,O,N,Z){if(isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z))throw Ln.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!d.call(this)){var se={};this.lineCap!=="butt"&&(se.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(se.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(k,O,N,Z),this.fill(),se.hasOwnProperty("lineCap")&&(this.lineCap=se.lineCap),se.hasOwnProperty("lineJoin")&&(this.lineJoin=se.lineJoin)}},h.prototype.strokeRect=function(k,O,N,Z){if(isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z))throw Ln.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");m.call(this)||(this.beginPath(),this.rect(k,O,N,Z),this.stroke())},h.prototype.clearRect=function(k,O,N,Z){if(isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z))throw Ln.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(k,O,N,Z))},h.prototype.save=function(k){k=typeof k!="boolean"||k;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,N=0;N<this.pdf.internal.getNumberOfPages();N++)this.pdf.setPage(N+1),this.pdf.internal.out("q");if(this.pdf.setPage(O),k){this.ctx.fontSize=this.pdf.internal.getFontSize();var Z=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=Z}},h.prototype.restore=function(k){k=typeof k!="boolean"||k;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,N=0;N<this.pdf.internal.getNumberOfPages();N++)this.pdf.setPage(N+1),this.pdf.internal.out("Q");this.pdf.setPage(O),k&&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)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=function(k){var O,N,Z,se;if(k.isCanvasGradient===!0&&(k=k.getColor()),!k)return{r:0,g:0,b:0,a:0,style:k};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(k))O=0,N=0,Z=0,se=0;else{var ge=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(k);if(ge!==null)O=parseInt(ge[1]),N=parseInt(ge[2]),Z=parseInt(ge[3]),se=1;else if((ge=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(k))!==null)O=parseInt(ge[1]),N=parseInt(ge[2]),Z=parseInt(ge[3]),se=parseFloat(ge[4]);else{if(se=1,typeof k=="string"&&k.charAt(0)!=="#"){var fe=new kC(k);k=fe.ok?fe.toHex():"#000000"}k.length===4?(O=k.substring(1,2),O+=O,N=k.substring(2,3),N+=N,Z=k.substring(3,4),Z+=Z):(O=k.substring(1,3),N=k.substring(3,5),Z=k.substring(5,7)),O=parseInt(O,16),N=parseInt(N,16),Z=parseInt(Z,16)}}return{r:O,g:N,b:Z,a:se,style:k}},d=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},m=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};h.prototype.fillText=function(k,O,N,Z){if(isNaN(O)||isNaN(N)||typeof k!="string")throw Ln.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(Z=isNaN(Z)?void 0:Z,!d.call(this)){var se=M(this.ctx.transform.rotation),ge=this.ctx.transform.scaleX;S.call(this,{text:k,x:O,y:N,scale:ge,angle:se,align:this.textAlign,maxWidth:Z})}},h.prototype.strokeText=function(k,O,N,Z){if(isNaN(O)||isNaN(N)||typeof k!="string")throw Ln.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!m.call(this)){Z=isNaN(Z)?void 0:Z;var se=M(this.ctx.transform.rotation),ge=this.ctx.transform.scaleX;S.call(this,{text:k,x:O,y:N,scale:ge,renderingMode:"stroke",angle:se,align:this.textAlign,maxWidth:Z})}},h.prototype.measureText=function(k){if(typeof k!="string")throw Ln.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var O=this.pdf,N=this.pdf.internal.scaleFactor,Z=O.internal.getFontSize(),se=O.getStringUnitWidth(k)*Z/O.internal.scaleFactor;return new function(ge){var fe=(ge=ge||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return fe}}),this}({width:se*=Math.round(96*N/72*1e4)/1e4})},h.prototype.scale=function(k,O){if(isNaN(k)||isNaN(O))throw Ln.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var N=new l(k,0,0,O,0,0);this.ctx.transform=this.ctx.transform.multiply(N)},h.prototype.rotate=function(k){if(isNaN(k))throw Ln.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var O=new l(Math.cos(k),Math.sin(k),-Math.sin(k),Math.cos(k),0,0);this.ctx.transform=this.ctx.transform.multiply(O)},h.prototype.translate=function(k,O){if(isNaN(k)||isNaN(O))throw Ln.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var N=new l(1,0,0,1,k,O);this.ctx.transform=this.ctx.transform.multiply(N)},h.prototype.transform=function(k,O,N,Z,se,ge){if(isNaN(k)||isNaN(O)||isNaN(N)||isNaN(Z)||isNaN(se)||isNaN(ge))throw Ln.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var fe=new l(k,O,N,Z,se,ge);this.ctx.transform=this.ctx.transform.multiply(fe)},h.prototype.setTransform=function(k,O,N,Z,se,ge){k=isNaN(k)?1:k,O=isNaN(O)?0:O,N=isNaN(N)?0:N,Z=isNaN(Z)?1:Z,se=isNaN(se)?0:se,ge=isNaN(ge)?0:ge,this.ctx.transform=new l(k,O,N,Z,se,ge)};var y=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function(k,O,N,Z,se,ge,fe,Ae,Fe){var be=this.pdf.getImageProperties(k),Ke=1,Xe=1,xe=1,te=1;Z!==void 0&&Ae!==void 0&&(xe=Ae/Z,te=Fe/se,Ke=be.width/Z*Ae/Z,Xe=be.height/se*Fe/se),ge===void 0&&(ge=O,fe=N,O=0,N=0),Z!==void 0&&Ae===void 0&&(Ae=Z,Fe=se),Z===void 0&&Ae===void 0&&(Ae=be.width,Fe=be.height);var lt=this.ctx.transform.decompose(),Pe=M(lt.rotate.shx),rt=new l,Te=(rt=(rt=(rt=rt.multiply(lt.translate)).multiply(lt.skew)).multiply(lt.scale)).applyToRectangle(new A(ge-O*xe,fe-N*te,Z*Ke,se*Xe));if(this.autoPaging){for(var Et,ot=B.call(this,Te),yt=[],pt=0;pt<ot.length;pt+=1)yt.indexOf(ot[pt])===-1&&yt.push(ot[pt]);x(yt);for(var Oe=yt[0],it=yt[yt.length-1],W=Oe;W<it+1;W++){this.pdf.setPage(W);var z=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ye=W===1?this.posY+this.margin[0]:this.margin[0],qe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ct=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],$e=W===1?0:qe+(W-2)*ct;if(this.ctx.clip_path.length!==0){var Ve=this.path;Et=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=E(Et,this.posX+this.margin[3],-$e+ye+this.ctx.prevPageLastElemOffset),H.call(this,"fill",!0),this.path=Ve}var Mt=JSON.parse(JSON.stringify(Te));Mt=E([Mt],this.posX+this.margin[3],-$e+ye+this.ctx.prevPageLastElemOffset)[0];var tt=(W>Oe||W<it)&&y.call(this);tt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],z,ct,null).clip().discardPath()),this.pdf.addImage(k,"JPEG",Mt.x,Mt.y,Mt.w,Mt.h,null,null,Pe),tt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(k,"JPEG",Te.x,Te.y,Te.w,Te.h,null,null,Pe)};var B=function(k,O,N){var Z=[];O=O||this.pdf.internal.pageSize.width,N=N||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var se=this.posY+this.ctx.prevPageLastElemOffset;switch(k.type){default:case"mt":case"lt":Z.push(Math.floor((k.y+se)/N)+1);break;case"arc":Z.push(Math.floor((k.y+se-k.radius)/N)+1),Z.push(Math.floor((k.y+se+k.radius)/N)+1);break;case"qct":var ge=R(this.ctx.lastPoint.x,this.ctx.lastPoint.y,k.x1,k.y1,k.x,k.y);Z.push(Math.floor((ge.y+se)/N)+1),Z.push(Math.floor((ge.y+ge.h+se)/N)+1);break;case"bct":var fe=ae(this.ctx.lastPoint.x,this.ctx.lastPoint.y,k.x1,k.y1,k.x2,k.y2,k.x,k.y);Z.push(Math.floor((fe.y+se)/N)+1),Z.push(Math.floor((fe.y+fe.h+se)/N)+1);break;case"rect":Z.push(Math.floor((k.y+se)/N)+1),Z.push(Math.floor((k.y+k.h+se)/N)+1)}for(var Ae=0;Ae<Z.length;Ae+=1)for(;this.pdf.internal.getNumberOfPages()<Z[Ae];)w.call(this);return Z},w=function(){var k=this.fillStyle,O=this.strokeStyle,N=this.font,Z=this.lineCap,se=this.lineWidth,ge=this.lineJoin;this.pdf.addPage(),this.fillStyle=k,this.strokeStyle=O,this.font=N,this.lineCap=Z,this.lineWidth=se,this.lineJoin=ge},E=function(k,O,N){for(var Z=0;Z<k.length;Z++)switch(k[Z].type){case"bct":k[Z].x2+=O,k[Z].y2+=N;case"qct":k[Z].x1+=O,k[Z].y1+=N;default:k[Z].x+=O,k[Z].y+=N}return k},x=function(k){return k.sort(function(O,N){return O-N})},b=function(k,O){var N=this.fillStyle,Z=this.strokeStyle,se=this.lineCap,ge=this.lineWidth,fe=Math.abs(ge*this.ctx.transform.scaleX),Ae=this.lineJoin;if(this.autoPaging){for(var Fe,be,Ke=JSON.parse(JSON.stringify(this.path)),Xe=JSON.parse(JSON.stringify(this.path)),xe=[],te=0;te<Xe.length;te++)if(Xe[te].x!==void 0)for(var lt=B.call(this,Xe[te]),Pe=0;Pe<lt.length;Pe+=1)xe.indexOf(lt[Pe])===-1&&xe.push(lt[Pe]);for(var rt=0;rt<xe.length;rt++)for(;this.pdf.internal.getNumberOfPages()<xe[rt];)w.call(this);x(xe);for(var Te=xe[0],Et=xe[xe.length-1],ot=Te;ot<Et+1;ot++){this.pdf.setPage(ot),this.fillStyle=N,this.strokeStyle=Z,this.lineCap=se,this.lineWidth=fe,this.lineJoin=Ae;var yt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],pt=ot===1?this.posY+this.margin[0]:this.margin[0],Oe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],it=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],W=ot===1?0:Oe+(ot-2)*it;if(this.ctx.clip_path.length!==0){var z=this.path;Fe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=E(Fe,this.posX+this.margin[3],-W+pt+this.ctx.prevPageLastElemOffset),H.call(this,k,!0),this.path=z}if(be=JSON.parse(JSON.stringify(Ke)),this.path=E(be,this.posX+this.margin[3],-W+pt+this.ctx.prevPageLastElemOffset),O===!1||ot===0){var ye=(ot>Te||ot<Et)&&y.call(this);ye&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],yt,it,null).clip().discardPath()),H.call(this,k,O),ye&&this.pdf.restoreGraphicsState()}this.lineWidth=ge}this.path=Ke}else this.lineWidth=fe,H.call(this,k,O),this.lineWidth=ge},H=function(k,O){if((k!=="stroke"||O||!m.call(this))&&(k==="stroke"||O||!d.call(this))){for(var N,Z,se=[],ge=this.path,fe=0;fe<ge.length;fe++){var Ae=ge[fe];switch(Ae.type){case"begin":se.push({begin:!0});break;case"close":se.push({close:!0});break;case"mt":se.push({start:Ae,deltas:[],abs:[]});break;case"lt":var Fe=se.length;if(ge[fe-1]&&!isNaN(ge[fe-1].x)&&(N=[Ae.x-ge[fe-1].x,Ae.y-ge[fe-1].y],Fe>0)){for(;Fe>=0;Fe--)if(se[Fe-1].close!==!0&&se[Fe-1].begin!==!0){se[Fe-1].deltas.push(N),se[Fe-1].abs.push(Ae);break}}break;case"bct":N=[Ae.x1-ge[fe-1].x,Ae.y1-ge[fe-1].y,Ae.x2-ge[fe-1].x,Ae.y2-ge[fe-1].y,Ae.x-ge[fe-1].x,Ae.y-ge[fe-1].y],se[se.length-1].deltas.push(N);break;case"qct":var be=ge[fe-1].x+2/3*(Ae.x1-ge[fe-1].x),Ke=ge[fe-1].y+2/3*(Ae.y1-ge[fe-1].y),Xe=Ae.x+2/3*(Ae.x1-Ae.x),xe=Ae.y+2/3*(Ae.y1-Ae.y),te=Ae.x,lt=Ae.y;N=[be-ge[fe-1].x,Ke-ge[fe-1].y,Xe-ge[fe-1].x,xe-ge[fe-1].y,te-ge[fe-1].x,lt-ge[fe-1].y],se[se.length-1].deltas.push(N);break;case"arc":se.push({deltas:[],abs:[],arc:!0}),Array.isArray(se[se.length-1].abs)&&se[se.length-1].abs.push(Ae)}}Z=O?null:k==="stroke"?"stroke":"fill";for(var Pe=!1,rt=0;rt<se.length;rt++)if(se[rt].arc)for(var Te=se[rt].abs,Et=0;Et<Te.length;Et++){var ot=Te[Et];ot.type==="arc"?V.call(this,ot.x,ot.y,ot.radius,ot.startAngle,ot.endAngle,ot.counterclockwise,void 0,O,!Pe):Q.call(this,ot.x,ot.y),Pe=!0}else if(se[rt].close===!0)this.pdf.internal.out("h"),Pe=!1;else if(se[rt].begin!==!0){var yt=se[rt].start.x,pt=se[rt].start.y;T.call(this,se[rt].deltas,yt,pt),Pe=!0}Z&&L.call(this,Z),O&&j.call(this)}},$=function(k){var O=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,N=O*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return k-N;case"top":return k+O-N;case"hanging":return k+O-2*N;case"middle":return k+O/2-N;default:return k}},Y=function(k){return k+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var k=function(){};return k.colorStops=[],k.addColorStop=function(O,N){this.colorStops.push([O,N])},k.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},k.isCanvasGradient=!0,k},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var V=function(k,O,N,Z,se,ge,fe,Ae,Fe){for(var be=X.call(this,N,Z,se,ge),Ke=0;Ke<be.length;Ke++){var Xe=be[Ke];Ke===0&&(Fe?D.call(this,Xe.x1+k,Xe.y1+O):Q.call(this,Xe.x1+k,Xe.y1+O)),oe.call(this,k,O,Xe.x2,Xe.y2,Xe.x3,Xe.y3,Xe.x4,Xe.y4)}Ae?j.call(this):L.call(this,fe)},L=function(k){switch(k){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},j=function(){this.pdf.clip(),this.pdf.discardPath()},D=function(k,O){this.pdf.internal.out(e(k)+" "+r(O)+" m")},S=function(k){var O;switch(k.align){case"right":case"end":O="right";break;case"center":O="center";break;default:O="left"}var N,Z,se,ge=this.pdf.getTextDimensions(k.text),fe=$.call(this,k.y),Ae=Y.call(this,fe)-ge.h,Fe=this.ctx.transform.applyToPoint(new i(k.x,fe));if(this.autoPaging){var be=this.ctx.transform.decompose(),Ke=new l;Ke=(Ke=(Ke=Ke.multiply(be.translate)).multiply(be.skew)).multiply(be.scale);for(var Xe=this.ctx.transform.applyToRectangle(new A(k.x,fe,ge.w,ge.h)),xe=Ke.applyToRectangle(new A(k.x,Ae,ge.w,ge.h)),te=B.call(this,xe),lt=[],Pe=0;Pe<te.length;Pe+=1)lt.indexOf(te[Pe])===-1&<.push(te[Pe]);x(lt);for(var rt=lt[0],Te=lt[lt.length-1],Et=rt;Et<Te+1;Et++){this.pdf.setPage(Et);var ot=Et===1?this.posY+this.margin[0]:this.margin[0],yt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],pt=this.pdf.internal.pageSize.height-this.margin[2],Oe=pt-this.margin[0],it=this.pdf.internal.pageSize.width-this.margin[1],W=it-this.margin[3],z=Et===1?0:yt+(Et-2)*Oe;if(this.ctx.clip_path.length!==0){var ye=this.path;N=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=E(N,this.posX+this.margin[3],-1*z+ot),H.call(this,"fill",!0),this.path=ye}var qe=E([JSON.parse(JSON.stringify(xe))],this.posX+this.margin[3],-z+ot+this.ctx.prevPageLastElemOffset)[0];k.scale>=.01&&(Z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Z*k.scale),se=this.lineWidth,this.lineWidth=se*k.scale);var ct=this.autoPaging!=="text";if(ct||qe.y+qe.h<=pt){if(ct||qe.y>=ot&&qe.x<=it){var $e=ct?k.text:this.pdf.splitTextToSize(k.text,k.maxWidth||it-qe.x)[0],Ve=E([JSON.parse(JSON.stringify(Xe))],this.posX+this.margin[3],-z+ot+this.ctx.prevPageLastElemOffset)[0],Mt=ct&&(Et>rt||Et<Te)&&y.call(this);Mt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],W,Oe,null).clip().discardPath()),this.pdf.text($e,Ve.x,Ve.y,{angle:k.angle,align:O,renderingMode:k.renderingMode}),Mt&&this.pdf.restoreGraphicsState()}}else qe.y<pt&&(this.ctx.prevPageLastElemOffset+=pt-qe.y);k.scale>=.01&&(this.pdf.setFontSize(Z),this.lineWidth=se)}}else k.scale>=.01&&(Z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Z*k.scale),se=this.lineWidth,this.lineWidth=se*k.scale),this.pdf.text(k.text,Fe.x+this.posX,Fe.y+this.posY,{angle:k.angle,align:O,renderingMode:k.renderingMode,maxWidth:k.maxWidth}),k.scale>=.01&&(this.pdf.setFontSize(Z),this.lineWidth=se)},Q=function(k,O,N,Z){N=N||0,Z=Z||0,this.pdf.internal.out(e(k+N)+" "+r(O+Z)+" l")},T=function(k,O,N){return this.pdf.lines(k,O,N,null,null)},oe=function(k,O,N,Z,se,ge,fe,Ae){this.pdf.internal.out([t(s(N+k)),t(o(Z+O)),t(s(se+k)),t(o(ge+O)),t(s(fe+k)),t(o(Ae+O)),"c"].join(" "))},X=function(k,O,N,Z){for(var se=2*Math.PI,ge=Math.PI/2;O>N;)O-=se;var fe=Math.abs(N-O);fe<se&&Z&&(fe=se-fe);for(var Ae=[],Fe=Z?-1:1,be=O;fe>1e-5;){var Ke=be+Fe*Math.min(fe,ge);Ae.push(F.call(this,k,be,Ke)),fe-=Math.abs(Ke-be),be=Ke}return Ae},F=function(k,O,N){var Z=(N-O)/2,se=k*Math.cos(Z),ge=k*Math.sin(Z),fe=se,Ae=-ge,Fe=fe*fe+Ae*Ae,be=Fe+fe*se+Ae*ge,Ke=4/3*(Math.sqrt(2*Fe*be)-be)/(fe*ge-Ae*se),Xe=fe-Ke*Ae,xe=Ae+Ke*fe,te=Xe,lt=-xe,Pe=Z+O,rt=Math.cos(Pe),Te=Math.sin(Pe);return{x1:k*Math.cos(O),y1:k*Math.sin(O),x2:Xe*rt-xe*Te,y2:Xe*Te+xe*rt,x3:te*rt-lt*Te,y3:te*Te+lt*rt,x4:k*Math.cos(N),y4:k*Math.sin(N)}},M=function(k){return 180*k/Math.PI},R=function(k,O,N,Z,se,ge){var fe=k+.5*(N-k),Ae=O+.5*(Z-O),Fe=se+.5*(N-se),be=ge+.5*(Z-ge),Ke=Math.min(k,se,fe,Fe),Xe=Math.max(k,se,fe,Fe),xe=Math.min(O,ge,Ae,be),te=Math.max(O,ge,Ae,be);return new A(Ke,xe,Xe-Ke,te-xe)},ae=function(k,O,N,Z,se,ge,fe,Ae){var Fe,be,Ke,Xe,xe,te,lt,Pe,rt,Te,Et,ot,yt,pt,Oe=N-k,it=Z-O,W=se-N,z=ge-Z,ye=fe-se,qe=Ae-ge;for(be=0;be<41;be++)rt=(lt=(Ke=k+(Fe=be/40)*Oe)+Fe*((xe=N+Fe*W)-Ke))+Fe*(xe+Fe*(se+Fe*ye-xe)-lt),Te=(Pe=(Xe=O+Fe*it)+Fe*((te=Z+Fe*z)-Xe))+Fe*(te+Fe*(ge+Fe*qe-te)-Pe),be==0?(Et=rt,ot=Te,yt=rt,pt=Te):(Et=Math.min(Et,rt),ot=Math.min(ot,Te),yt=Math.max(yt,rt),pt=Math.max(pt,Te));return new A(Math.round(Et),Math.round(ot),Math.round(yt-Et),Math.round(pt-ot))},J=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var k,O,N=(k=this.ctx.lineDash,O=this.ctx.lineDashOffset,JSON.stringify({lineDash:k,lineDashOffset:O}));this.prevLineDash!==N&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=N)}}})(dr.API),(function(n){var t=function(i){var A,l,c,u,h,g,d,m,y,B;for(l=[],c=0,u=(i+=A="\0\0\0\0".slice(i.length%4||4)).length;u>c;c+=4)(h=(i.charCodeAt(c)<<24)+(i.charCodeAt(c+1)<<16)+(i.charCodeAt(c+2)<<8)+i.charCodeAt(c+3))!==0?(g=(h=((h=((h=((h=(h-(B=h%85))/85)-(y=h%85))/85)-(m=h%85))/85)-(d=h%85))/85)%85,l.push(g+33,d+33,m+33,y+33,B+33)):l.push(122);return(function(w,E){for(var x=E;x>0;x--)w.pop()})(l,A.length),String.fromCharCode.apply(String,l)+"~>"},e=function(i){var A,l,c,u,h,g=String,d="length",m=255,y="charCodeAt",B="slice",w="replace";for(i[B](-2),i=i[B](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),c=[],u=0,h=(i+=A="uuuuu"[B](i[d]%5||5))[d];h>u;u+=5)l=52200625*(i[y](u)-33)+614125*(i[y](u+1)-33)+7225*(i[y](u+2)-33)+85*(i[y](u+3)-33)+(i[y](u+4)-33),c.push(m&l>>24,m&l>>16,m&l>>8,m&l);return(function(E,x){for(var b=x;b>0;b--)E.pop()})(c,A[d]),g.fromCharCode.apply(g,c)},r=function(i){return i.split("").map(function(A){return("0"+A.charCodeAt().toString(16)).slice(-2)}).join("")+">"},s=function(i){var A=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((i=i.replace(/\s/g,"")).indexOf(">")!==-1&&(i=i.substr(0,i.indexOf(">"))),i.length%2&&(i+="0"),A.test(i)===!1)return"";for(var l="",c=0;c<i.length;c+=2)l+=String.fromCharCode("0x"+(i[c]+i[c+1]));return l},o=function(i){for(var A=new Uint8Array(i.length),l=i.length;l--;)A[l]=i.charCodeAt(l);return(A=_p(A)).reduce(function(c,u){return c+String.fromCharCode(u)},"")};n.processDataByFilters=function(i,A){var l=0,c=i||"",u=[];for(typeof(A=A||[])=="string"&&(A=[A]),l=0;l<A.length;l+=1)switch(A[l]){case"ASCII85Decode":case"/ASCII85Decode":c=e(c),u.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":c=t(c),u.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":c=s(c),u.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":c=r(c),u.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":c=o(c),u.push("/FlateDecode");break;default:throw new Error('The filter: "'+A[l]+'" is not implemented')}return{data:c,reverseChain:u.reverse().join(" ")}}})(dr.API),(function(n){n.loadFile=function(t,e,r){return(function(s,o,i){o=o!==!1,i=typeof i=="function"?i:function(){};var A=void 0;try{A=(function(l,c,u){var h=new XMLHttpRequest,g=0,d=function(m){var y=m.length,B=[],w=String.fromCharCode;for(g=0;g<y;g+=1)B.push(w(255&m.charCodeAt(g)));return B.join("")};if(h.open("GET",l,!c),h.overrideMimeType("text/plain; charset=x-user-defined"),c===!1&&(h.onload=function(){h.status===200?u(d(this.responseText)):u(void 0)}),h.send(null),c&&h.status===200)return d(h.responseText)})(s,o,i)}catch{}return A})(t,e,r)},n.allowFsRead=void 0,n.loadImageFile=n.loadFile})(dr.API),(function(n){function t(){return(kr.html2canvas?Promise.resolve(kr.html2canvas):Promise.resolve().then(()=>ZH)).catch(function(A){return Promise.reject(new Error("Could not load html2canvas: "+A))}).then(function(A){return A.default?A.default:A})}function e(){return(kr.DOMPurify?Promise.resolve(kr.DOMPurify):Promise.resolve().then(()=>j8)).catch(function(A){return Promise.reject(new Error("Could not load dompurify: "+A))}).then(function(A){return A.default?A.default:A})}var r=function(A){var l=hn(A);return l==="undefined"?"undefined":l==="string"||A instanceof String?"string":l==="number"||A instanceof Number?"number":l==="function"||A instanceof Function?"function":A&&A.constructor===Array?"array":A&&A.nodeType===1?"element":l==="object"?"object":"unknown"},s=function(A,l){var c=document.createElement(A);for(var u in l.className&&(c.className=l.className),l.innerHTML&&l.dompurify&&(c.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)c.style[u]=l.style[u];return c},o=function A(l,c){for(var u=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),h=l.firstChild;h;h=h.nextSibling)c!==!0&&h.nodeType===1&&h.nodeName==="SCRIPT"||u.appendChild(A(h,c));return l.nodeType===1&&(l.nodeName==="CANVAS"?(u.width=l.width,u.height=l.height,u.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(u.value=l.value),u.addEventListener("load",function(){u.scrollTop=l.scrollTop,u.scrollLeft=l.scrollLeft},!0)),u},i=function A(l){var c=Object.assign(A.convert(Promise.resolve()),JSON.parse(JSON.stringify(A.template))),u=A.convert(Promise.resolve(),c);return(u=u.setProgress(1,A,1,[A])).set(l)};(i.prototype=Object.create(Promise.prototype)).constructor=i,i.convert=function(A,l){return A.__proto__=l||i.prototype,A},i.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"}},i.prototype.from=function(A,l){return this.then(function(){switch(l=l||(function(c){switch(r(c)){case"string":return"string";case"element":return c.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(A),l){case"string":return this.then(e).then(function(c){return this.set({src:s("div",{innerHTML:A,dompurify:c})})});case"element":return this.set({src:A});case"canvas":return this.set({canvas:A});case"img":return this.set({img:A});default:return this.error("Unknown source type.")}})},i.prototype.to=function(A){switch(A){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.")}},i.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 A={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},l=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(A.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:A}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(s("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"})},i.prototype.toCanvas=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then(t).then(function(l){var c=Object.assign({},this.opt.html2canvas);return delete c.onrendered,l(this.prop.container,c)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},i.prototype.toContext2d=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then(t).then(function(l){var c=this.opt.jsPDF,u=this.opt.fontFaces,h=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,g=Object.assign({async:!0,allowTaint:!0,scale:h,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 g.onrendered,c.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,c.context2d.posX=this.opt.x,c.context2d.posY=this.opt.y,c.context2d.margin=this.opt.margin,c.context2d.fontFaces=u,u)for(var d=0;d<u.length;++d){var m=u[d],y=m.src.find(function(B){return B.format==="truetype"});y&&c.addFont(y.url,m.ref.name,m.ref.style)}return g.windowHeight=g.windowHeight||0,g.windowHeight=g.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):g.windowHeight,c.context2d.save(!0),l(this.prop.container,g)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},i.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var A=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=A})},i.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},i.prototype.output=function(A,l,c){return(c=c||"pdf").toLowerCase()==="img"||c.toLowerCase()==="image"?this.outputImg(A,l):this.outputPdf(A,l)},i.prototype.outputPdf=function(A,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(A,l)})},i.prototype.outputImg=function(A){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(A){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 "'+A+'" is not supported.'}})},i.prototype.save=function(A){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(A?{filename:A}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},i.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},i.prototype.set=function(A){if(r(A)!=="object")return this;var l=Object.keys(A||{}).map(function(c){if(c in i.template.prop)return function(){this.prop[c]=A[c]};switch(c){case"margin":return this.setMargin.bind(this,A.margin);case"jsPDF":return function(){return this.opt.jsPDF=A.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,A.pageSize);default:return function(){this.opt[c]=A[c]}}},this);return this.then(function(){return this.thenList(l)})},i.prototype.get=function(A,l){return this.then(function(){var c=A in i.template.prop?this.prop[A]:this.opt[A];return l?l(c):c})},i.prototype.setMargin=function(A){return this.then(function(){switch(r(A)){case"number":A=[A,A,A,A];case"array":if(A.length===2&&(A=[A[0],A[1],A[0],A[1]]),A.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=A}).then(this.setPageSize)},i.prototype.setPageSize=function(A){function l(c,u){return Math.floor(c*u/72*96)}return this.then(function(){(A=A||dr.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(A.inner={width:A.width-this.opt.margin[1]-this.opt.margin[3],height:A.height-this.opt.margin[0]-this.opt.margin[2]},A.inner.px={width:l(A.inner.width,A.k),height:l(A.inner.height,A.k)},A.inner.ratio=A.inner.height/A.inner.width),this.prop.pageSize=A})},i.prototype.setProgress=function(A,l,c,u){return A!=null&&(this.progress.val=A),l!=null&&(this.progress.state=l),c!=null&&(this.progress.n=c),u!=null&&(this.progress.stack=u),this.progress.ratio=this.progress.val/this.progress.state,this},i.prototype.updateProgress=function(A,l,c,u){return this.setProgress(A?this.progress.val+A:null,l||null,c?this.progress.n+c:null,u?this.progress.stack.concat(u):null)},i.prototype.then=function(A,l){var c=this;return this.thenCore(A,l,function(u,h){return c.updateProgress(null,null,1,[u]),Promise.prototype.then.call(this,function(g){return c.updateProgress(null,u),g}).then(u,h).then(function(g){return c.updateProgress(1),g})})},i.prototype.thenCore=function(A,l,c){c=c||Promise.prototype.then;var u=this;A&&(A=A.bind(u)),l&&(l=l.bind(u));var h=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?u:i.convert(Object.assign({},u),Promise.prototype),g=c.call(h,A,l);return i.convert(g,u.__proto__)},i.prototype.thenExternal=function(A,l){return Promise.prototype.then.call(this,A,l)},i.prototype.thenList=function(A){var l=this;return A.forEach(function(c){l=l.thenCore(c)}),l},i.prototype.catch=function(A){A&&(A=A.bind(this));var l=Promise.prototype.catch.call(this,A);return i.convert(l,this)},i.prototype.catchExternal=function(A){return Promise.prototype.catch.call(this,A)},i.prototype.error=function(A){return this.then(function(){throw new Error(A)})},i.prototype.using=i.prototype.set,i.prototype.saveAs=i.prototype.save,i.prototype.export=i.prototype.output,i.prototype.run=i.prototype.then,dr.getPageSize=function(A,l,c){if(hn(A)==="object"){var u=A;A=u.orientation,l=u.unit||l,c=u.format||c}l=l||"mm",c=c||"a4",A=(""+(A||"P")).toLowerCase();var h,g=(""+c).toLowerCase(),d={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(l){case"pt":h=1;break;case"mm":h=72/25.4;break;case"cm":h=72/2.54;break;case"in":h=72;break;case"px":h=.75;break;case"pc":case"em":h=12;break;case"ex":h=6;break;default:throw"Invalid unit: "+l}var m,y=0,B=0;if(d.hasOwnProperty(g))y=d[g][1]/h,B=d[g][0]/h;else try{y=c[1],B=c[0]}catch{throw new Error("Invalid format: "+c)}if(A==="p"||A==="portrait")A="p",B>y&&(m=B,B=y,y=m);else{if(A!=="l"&&A!=="landscape")throw"Invalid orientation: "+A;A="l",y>B&&(m=B,B=y,y=m)}return{width:B,height:y,unit:l,k:h,orientation:A}},n.html=function(A,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(uf):null;var c=new i(l);return l.worker?c:c.from(A).doCallback()}})(dr.API),dr.API.addJS=function(n){var t,e,r=(function(s){for(var o="",i=0;i<s.length;i++){var A=s[i];if(A==="("||A===")"){for(var l=0,c=i-1;c>=0&&s[c]==="\\";c--)l++;o+=l%2==0?"\\"+A:A}else o+=A}return o})(n);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&e!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},(function(n){var t;n.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var s=e.outline.render().split(/\r\n/),o=0;o<s.length;o++){var i=s[o],A=r.exec(i);if(A!=null){var l=A[1];e.internal.newObjectDeferredBegin(l,!1)}e.internal.write(i)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,u=[];for(o=0;o<c;o++){var h=e.internal.newObject();u.push(h);var g=e.internal.getPageInfo(o+1);e.internal.write("<< /D["+g.objId+" 0 R /XYZ null null null]>> endobj")}var d=e.internal.newObject();for(e.internal.write("<< /Names [ "),o=0;o<u.length;o++)e.internal.write("(page_"+(o+1)+")"+u[o]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+d+" 0 R"),e.internal.write(">>","endobj")}}]),n.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),n.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,s,o){var i={title:s,options:o,children:[]};return r==null&&(r=this.root),r.children.push(i),i},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(r){r.id=e.internal.newObjectDeferred();for(var s=0;s<r.children.length;s++)this.genIds_r(r.children[s])},e.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var s=this.ctx.pdf.internal.getVerticalCoordinateString,o=0;o<r.children.length;o++){var i=r.children[o];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(r)),o>0&&this.line("/Prev "+this.makeRef(r.children[o-1])),o<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[o+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var A=this.count=this.count_r({count:0},i);if(A>0&&this.line("/Count "+A),i.options&&i.options.pageNumber){var l=e.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+s(0)+" 0]")}this.objEnd()}for(var c=0;c<r.children.length;c++)this.renderItems(r.children[c])},e.outline.line=function(r){this.ctx.val+=r+`\r
`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r
`+r.id+` 0 obj\r
<<\r
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},e.outline.count_r=function(r,s){for(var o=0;o<s.children.length;o++)r.count++,this.count_r(r,s.children[o]);return r.count}}])})(dr.API),(function(n){var t=[192,193,194,195,196,197,198,199];n.processJPEG=function(e,r,s,o,i,A){var l,c=this.decode.DCT_DECODE,u=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=i||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,l=(function(h){for(var g,d=256*h.charCodeAt(4)+h.charCodeAt(5),m=h.length,y={width:0,height:0,numcomponents:1},B=4;B<m;B+=2){if(B+=d,t.indexOf(h.charCodeAt(B+1))!==-1){g=256*h.charCodeAt(B+5)+h.charCodeAt(B+6),y={width:256*h.charCodeAt(B+7)+h.charCodeAt(B+8),height:g,numcomponents:h.charCodeAt(B+9)};break}d=256*h.charCodeAt(B+2)+h.charCodeAt(B+3)}return y})(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),l.numcomponents){case 1:A=this.color_spaces.DEVICE_GRAY;break;case 4:A=this.color_spaces.DEVICE_CMYK;break;case 3:A=this.color_spaces.DEVICE_RGB}u={data:e,width:l.width,height:l.height,colorSpace:A,bitsPerComponent:8,filter:c,index:r,alias:s}}return u}})(dr.API),dr.API.processPNG=function(n,t,e,r){if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){var s,o=KQ(n,{checkCrc:!0}),i=o.width,A=o.height,l=o.channels,c=o.palette,u=o.depth;s=c&&l===1?(function(V){for(var L=V.width,j=V.height,D=V.data,S=V.palette,Q=V.depth,T=!1,oe=[],X=[],F=void 0,M=!1,R=0,ae=0;ae<S.length;ae++){var J=y0(S[ae],4),k=J[0],O=J[1],N=J[2],Z=J[3];oe.push(k,O,N),Z!=null&&(Z===0?(R++,X.length<1&&X.push(ae)):Z<255&&(M=!0))}if(M||R>1){T=!0,X=void 0;var se=L*j;F=new Uint8Array(se);for(var ge=new DataView(D.buffer),fe=0;fe<se;fe++){var Ae=ff(ge,fe,Q),Fe=y0(S[Ae],4)[3];F[fe]=Fe}}else R===0&&(X=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:T?8:void 0,colorBytes:D,alphaBytes:F,needSMask:T,palette:oe,mask:X}})(o):l===2||l===4?(function(V){for(var L=V.data,j=V.width,D=V.height,S=V.channels,Q=V.depth,T=S===2?"DeviceGray":"DeviceRGB",oe=S-1,X=j*D,F=oe,M=X*F,R=1*X,ae=Math.ceil(M*Q/8),J=Math.ceil(R*Q/8),k=new Uint8Array(ae),O=new Uint8Array(J),N=new DataView(L.buffer),Z=new DataView(k.buffer),se=new DataView(O.buffer),ge=!1,fe=0;fe<X;fe++){for(var Ae=fe*S,Fe=0;Fe<F;Fe++)C1(Z,ff(N,Ae+Fe,Q),fe*F+Fe,Q);var be=ff(N,Ae+F,Q);be<(1<<Q)-1&&(ge=!0),C1(se,be,1*fe,Q)}return{colorSpace:T,colorsPerPixel:oe,sMaskBitsPerComponent:ge?Q:void 0,colorBytes:k,alphaBytes:O,needSMask:ge}})(o):(function(V){var L=V.data,j=V.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:j,colorsPerPixel:j==="DeviceGray"?1:3,colorBytes:L instanceof Uint16Array?(function(D){for(var S=D.length,Q=new Uint8Array(2*S),T=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),oe=0;oe<S;oe++)T.setUint16(2*oe,D[oe],!1);return Q})(L):L,needSMask:!1}})(o);var h,g,d,m=s,y=m.colorSpace,B=m.colorsPerPixel,w=m.sMaskBitsPerComponent,E=m.colorBytes,x=m.alphaBytes,b=m.needSMask,H=m.palette,$=m.mask,Y=null;return r!==dr.API.image_compression.NONE&&typeof _p=="function"?(Y=(function(V){var L;switch(V){case dr.API.image_compression.FAST:L=11;break;case dr.API.image_compression.MEDIUM:L=13;break;case dr.API.image_compression.SLOW:L=14;break;default:L=12}return L})(r),h=this.decode.FLATE_DECODE,g="/Predictor ".concat(Y," /Colors ").concat(B," /BitsPerComponent ").concat(u," /Columns ").concat(i),n=m1(E,Math.ceil(i*B*u/8),B,u,r),b&&(d=m1(x,Math.ceil(i*w/8),1,w,r))):(h=void 0,g=void 0,n=E,b&&(d=x)),(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(d&&this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),{alias:e,data:n,index:t,filter:h,decodeParameters:g,transparency:$,palette:H,sMask:d,predictor:Y,width:i,height:A,bitsPerComponent:u,sMaskBitsPerComponent:w,colorSpace:y}}},(function(n){n.processGIF89A=function(t,e,r,s){var o=new uN(t),i=o.width,A=o.height,l=[];o.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:i,height:A},u=new hf(100).encode(c,100);return n.processJPEG.call(this,u,e,r,s)},n.processGIF87A=n.processGIF89A})(dr.API),Qo.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 n=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(n);for(var t=0;t<n;t++){var e=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:s,green:r,blue:e,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Qo.prototype.parseBGR=function(){this.pos=this.offset;var n="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[n]()}catch(e){Ln.log("bit decode error:"+e)}},Qo.prototype.bit1=function(){var n,t=Math.ceil(this.width/8),e=t%4;for(n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,s=0;s<t;s++)for(var o=this.datav.getUint8(this.pos++,!0),i=r*this.width*4+8*s*4,A=0;A<8&&8*s+A<this.width;A++){var l=this.palette[o>>7-A&1];this.data[i+4*A]=l.blue,this.data[i+4*A+1]=l.green,this.data[i+4*A+2]=l.red,this.data[i+4*A+3]=255}e!==0&&(this.pos+=4-e)}},Qo.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),t=n%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,s=0;s<n;s++){var o=this.datav.getUint8(this.pos++,!0),i=r*this.width*4+2*s*4,A=o>>4,l=15&o,c=this.palette[A];if(this.data[i]=c.blue,this.data[i+1]=c.green,this.data[i+2]=c.red,this.data[i+3]=255,2*s+1>=this.width)break;c=this.palette[l],this.data[i+4]=c.blue,this.data[i+4+1]=c.green,this.data[i+4+2]=c.red,this.data[i+4+3]=255}t!==0&&(this.pos+=4-t)}},Qo.prototype.bit8=function(){for(var n=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var s=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*r;if(s<this.palette.length){var i=this.palette[s];this.data[o]=i.red,this.data[o+1]=i.green,this.data[o+2]=i.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}n!==0&&(this.pos+=4-n)}},Qo.prototype.bit15=function(){for(var n=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,s=0;s<this.width;s++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var i=(o&t)/t*255|0,A=(o>>5&t)/t*255|0,l=(o>>10&t)/t*255|0,c=o>>15?255:0,u=r*this.width*4+4*s;this.data[u]=l,this.data[u+1]=A,this.data[u+2]=i,this.data[u+3]=c}this.pos+=n}},Qo.prototype.bit16=function(){for(var n=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var s=this.bottom_up?r:this.height-1-r,o=0;o<this.width;o++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var A=(i&t)/t*255|0,l=(i>>5&e)/e*255|0,c=(i>>11)/t*255|0,u=s*this.width*4+4*o;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=A,this.data[u+3]=255}this.pos+=n}},Qo.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),i=t*this.width*4+4*e;this.data[i]=o,this.data[i+1]=s,this.data[i+2]=r,this.data[i+3]=255}this.pos+=this.width%4}},Qo.prototype.bit32=function(){for(var n=this.height-1;n>=0;n--)for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),A=t*this.width*4+4*e;this.data[A]=o,this.data[A+1]=s,this.data[A+2]=r,this.data[A+3]=i}},Qo.prototype.getData=function(){return this.data},(function(n){n.processBMP=function(t,e,r,s){var o=new Qo(t,!1),i=o.width,A=o.height,l={data:o.getData(),width:i,height:A},c=new hf(100).encode(l,100);return n.processJPEG.call(this,c,e,r,s)}})(dr.API),E1.prototype.getData=function(){return this.data},(function(n){n.processWEBP=function(t,e,r,s){var o=new E1(t),i=o.width,A=o.height,l={data:o.getData(),width:i,height:A},c=new hf(100).encode(l,100);return n.processJPEG.call(this,c,e,r,s)}})(dr.API),dr.API.processRGBA=function(n,t,e){for(var r=n.data,s=r.length,o=new Uint8Array(s/4*3),i=new Uint8Array(s/4),A=0,l=0,c=0;c<s;c+=4){var u=r[c],h=r[c+1],g=r[c+2],d=r[c+3];o[A++]=u,o[A++]=h,o[A++]=g,i[l++]=d}var m=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(i),data:m,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:n.width,height:n.height}},dr.API.setLanguage=function(n){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"}[n]!==void 0&&(this.internal.languageSettings.languageCode=n,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ki=dr.API,tu=Ki.getCharWidthsArray=function(n,t){var e,r,s=(t=t||{}).font||this.internal.getFont(),o=t.fontSize||this.internal.getFontSize(),i=t.charSpace||this.internal.getCharSpace(),A=t.widths?t.widths:s.metadata.Unicode.widths,l=A.fof?A.fof:1,c=t.kerning?t.kerning:s.metadata.Unicode.kerning,u=c.fof?c.fof:1,h=t.doKerning!==!1,g=0,d=n.length,m=0,y=A[0]||l,B=[];for(e=0;e<d;e++)r=n.charCodeAt(e),typeof s.metadata.widthOfString=="function"?B.push((s.metadata.widthOfGlyph(s.metadata.characterToGlyph(r))+i*(1e3/o)||0)/1e3):(g=h&&hn(c[r])==="object"&&!isNaN(parseInt(c[r][m],10))?c[r][m]/u:0,B.push((A[r]||y)/l+g)),m=r;return B},g1=Ki.getStringUnitWidth=function(n,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),s=t.charSpace||this.internal.getCharSpace();return Ki.processArabic&&(n=Ki.processArabic(n)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(n,e,s)/e:tu.apply(this,arguments).reduce(function(o,i){return o+i},0)},p1=function(n,t,e,r){for(var s=[],o=0,i=n.length,A=0;o!==i&&A+t[o]<e;)A+=t[o],o++;s.push(n.slice(0,o));var l=o;for(A=0;o!==i;)A+t[o]>r&&(s.push(n.slice(l,o)),A=0,l=o),A+=t[o],o++;return l!==o&&s.push(n.slice(l,o)),s},v1=function(n,t,e){e||(e={});var r,s,o,i,A,l,c,u=[],h=[u],g=e.textIndent||0,d=0,m=0,y=n.split(" "),B=tu.apply(this,[" ",e])[0];if(l=e.lineIndent===-1?y[0].length+2:e.lineIndent||0){var w=Array(l).join(" "),E=[];y.map(function(b){(b=b.split(/\s*\n/)).length>1?E=E.concat(b.map(function(H,$){return($&&H.length?`
`:"")+H})):E.push(b[0])}),y=E,l=g1.apply(this,[w,e])}for(o=0,i=y.length;o<i;o++){var x=0;if(r=y[o],l&&r[0]==`
`&&(r=r.substr(1),x=1),g+d+(m=(s=tu.apply(this,[r,e])).reduce(function(b,H){return b+H},0))>t||x){if(m>t){for(A=p1.apply(this,[r,s,t-(g+d),t]),u.push(A.shift()),u=[A.pop()];A.length;)h.push([A.shift()]);m=s.slice(r.length-(u[0]?u[0].length:0)).reduce(function(b,H){return b+H},0)}else u=[r];h.push(u),g=m+l,d=B}else u.push(r),g+=d+m,d=B}return c=l?function(b,H){return(H?w:"")+b.join(" ")}:function(b){return b.join(" ")},h.map(c)},Ki.splitTextToSize=function(n,t,e){var r,s=(e=e||{}).fontSize||this.internal.getFontSize(),o=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var h=this.internal.getFont(u.fontName,u.fontStyle),g="Unicode";return h.metadata[g]?{widths:h.metadata[g].widths||{0:1},kerning:h.metadata[g].kerning||{}}:{font:h.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);r=Array.isArray(n)?n:String(n).split(/\r?\n/);var i=1*this.internal.scaleFactor*t/s;o.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/s:0,o.lineIndent=e.lineIndent;var A,l,c=[];for(A=0,l=r.length;A<l;A++)c=c.concat(v1.apply(this,[r[A],i,o]));return c},(function(n){n.__fontmetrics__=n.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",r={},s={},o=0;o<16;o++)r[e[o]]=t[o],s[t[o]]=e[o];var i=function(g){return"0x"+parseInt(g,10).toString(16)},A=n.__fontmetrics__.compress=function(g){var d,m,y,B,w=["{"];for(var E in g){if(d=g[E],isNaN(parseInt(E,10))?m="'"+E+"'":(E=parseInt(E,10),m=(m=i(E).slice(2)).slice(0,-1)+s[m.slice(-1)]),typeof d=="number")d<0?(y=i(d).slice(3),B="-"):(y=i(d).slice(2),B=""),y=B+y.slice(0,-1)+s[y.slice(-1)];else{if(hn(d)!=="object")throw new Error("Don't know what to do with value type "+hn(d)+".");y=A(d)}w.push(m+y)}return w.push("}"),w.join("")},l=n.__fontmetrics__.uncompress=function(g){if(typeof g!="string")throw new Error("Invalid argument passed to uncompress.");for(var d,m,y,B,w={},E=1,x=w,b=[],H="",$="",Y=g.length-1,V=1;V<Y;V+=1)(B=g[V])=="'"?d?(y=d.join(""),d=void 0):d=[]:d?d.push(B):B=="{"?(b.push([x,y]),x={},y=void 0):B=="}"?((m=b.pop())[0][m[1]]=x,y=void 0,x=m[0]):B=="-"?E=-1:y===void 0?r.hasOwnProperty(B)?(H+=r[B],y=parseInt(H,16)*E,E=1,H=""):H+=B:r.hasOwnProperty(B)?($+=r[B],x[y]=parseInt($,16)*E,E=1,y=void 0,$=""):$+=B;return w},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},h={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'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":l("{'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:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'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:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'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":l("{'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:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'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":l("{'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":l("{'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}}}")}};n.events.push(["addFont",function(g){var d=g.font,m=h.Unicode[d.postScriptName];m&&(d.metadata.Unicode={},d.metadata.Unicode.widths=m.widths,d.metadata.Unicode.kerning=m.kerning);var y=u.Unicode[d.postScriptName];y&&(d.metadata.Unicode.encoding=y,d.encoding=y.codePages[0])}])})(dr.API),(function(n){var t=function(e){for(var r=e.length,s=new Uint8Array(r),o=0;o<r;o++)s[o]=e.charCodeAt(o);return s};n.API.events.push(["addFont",function(e){var r=void 0,s=e.font,o=e.instance;if(!s.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");if(typeof(r=o.existsFileInVFS(s.postScriptName)===!1?o.loadFile(s.postScriptName):o.getFileFromVFS(s.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");(function(i,A){A=/^\x00\x01\x00\x00/.test(A)?t(A):t(Iu(A)),i.metadata=n.API.TTFFont.open(A),i.metadata.Unicode=i.metadata.Unicode||{encoding:{},kerning:{},widths:[]},i.metadata.glyIdsUsed=[0]})(s,r)}}])})(dr),dr.API.addSvgAsImage=function(n,t,e,r,s,o,i,A){if(isNaN(t)||isNaN(e))throw Ln.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(s))throw Ln.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=s;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return(kr.canvg?Promise.resolve(kr.canvg):Promise.resolve().then(()=>eV)).catch(function(g){return Promise.reject(new Error("Could not load canvg: "+g))}).then(function(g){return g.default?g.default:g}).then(function(g){return g.fromString(c,n,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(g){return g.render(u)}).then(function(){h.addImage(l.toDataURL("image/jpeg",1),t,e,r,s,i,A)})},dr.API.putTotalPages=function(n){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(n,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var s=0;s<this.internal.pages[r].length;s++)this.internal.pages[r][s]=this.internal.pages[r][s].replace(t,e);return this},dr.API.viewerPreferences=function(n,t){var e;n=n||{},t=t||!1;var r,s,o,i={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}},A=Object.keys(i),l=[],c=0,u=0,h=0;function g(m,y){var B,w=!1;for(B=0;B<m.length;B+=1)m[B]===y&&(w=!0);return w}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(i)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,n==="reset"||t===!0){var d=A.length;for(h=0;h<d;h+=1)e[A[h]].value=e[A[h]].defaultValue,e[A[h]].explicitSet=!1}if(hn(n)==="object"){for(s in n)if(o=n[s],g(A,s)&&o!==void 0){if(e[s].type==="boolean"&&typeof o=="boolean")e[s].value=o;else if(e[s].type==="name"&&g(e[s].valueSet,o))e[s].value=o;else if(e[s].type==="integer"&&Number.isInteger(o))e[s].value=o;else if(e[s].type==="array"){for(c=0;c<o.length;c+=1)if(r=!0,o[c].length===1&&typeof o[c][0]=="number")l.push(String(o[c]-1));else if(o[c].length>1){for(u=0;u<o[c].length;u+=1)typeof o[c][u]!="number"&&(r=!1);r===!0&&l.push([o[c][0]-1,o[c][1]-1].join(" "))}e[s].value="["+l.join(" ")+"]"}else e[s].value=e[s].defaultValue;e[s].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var m,y=[];for(m in e)e[m].explicitSet===!0&&(e[m].type==="name"?y.push("/"+m+" /"+e[m].value):y.push("/"+m+" "+e[m].value));y.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+y.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},dr.API.addMetadata=function(n,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",fN),this.internal.events.subscribe("postPutResources",dN)),this},(function(n){var t=n.API,e=t.pdfEscape16=function(o,i){for(var A,l=i.metadata.Unicode.widths,c=["","0","00","000","0000"],u=[""],h=0,g=o.length;h<g;++h){if(A=i.metadata.characterToGlyph(o.charCodeAt(h)),i.metadata.glyIdsUsed.push(A),i.metadata.toUnicode[A]=o.charCodeAt(h),l.indexOf(A)==-1&&(l.push(A),l.push([parseInt(i.metadata.widthOfGlyph(A),10)])),A=="0")return u.join("");A=A.toString(16),u.push(c[4-A.length],A)}return u.join("")},r=function(o){var i,A,l,c,u,h,g;for(u=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,l=[],h=0,g=(A=Object.keys(o).sort(function(d,m){return d-m})).length;h<g;h++)i=A[h],l.length>=100&&(u+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar`,l=[]),o[i]!==void 0&&o[i]!==null&&typeof o[i].toString=="function"&&(c=("0000"+o[i].toString(16)).slice(-4),i=("0000"+(+i).toString(16)).slice(-4),l.push("<"+i+"><"+c+">"));return l.length&&(u+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar
`),u+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(o){(function(i){var A=i.font,l=i.out,c=i.newObject,u=i.putStream;if(A.metadata instanceof n.API.TTFFont&&A.encoding==="Identity-H"){for(var h=A.metadata.Unicode.widths,g=A.metadata.subset.encode(A.metadata.glyIdsUsed,1),d="",m=0;m<g.length;m++)d+=String.fromCharCode(g[m]);var y=c();u({data:d,addLength1:!0,objectId:y}),l("endobj");var B=c();u({data:r(A.metadata.toUnicode),addLength1:!0,objectId:B}),l("endobj");var w=c();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+tl(A.fontName)),l("/FontFile2 "+y+" 0 R"),l("/FontBBox "+n.API.PDFObject.convert(A.metadata.bbox)),l("/Flags "+A.metadata.flags),l("/StemV "+A.metadata.stemV),l("/ItalicAngle "+A.metadata.italicAngle),l("/Ascent "+A.metadata.ascender),l("/Descent "+A.metadata.decender),l("/CapHeight "+A.metadata.capHeight),l(">>"),l("endobj");var E=c();l("<<"),l("/Type /Font"),l("/BaseFont /"+tl(A.fontName)),l("/FontDescriptor "+w+" 0 R"),l("/W "+n.API.PDFObject.convert(h)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+A.encoding+")"),l(">>"),l(">>"),l("endobj"),A.objectNumber=c(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+B+" 0 R"),l("/BaseFont /"+tl(A.fontName)),l("/Encoding /"+A.encoding),l("/DescendantFonts ["+E+" 0 R]"),l(">>"),l("endobj"),A.isAlreadyPutted=!0}})(o)}]),t.events.push(["putFont",function(o){(function(i){var A=i.font,l=i.out,c=i.newObject,u=i.putStream;if(A.metadata instanceof n.API.TTFFont&&A.encoding==="WinAnsiEncoding"){for(var h=A.metadata.rawData,g="",d=0;d<h.length;d++)g+=String.fromCharCode(h[d]);var m=c();u({data:g,addLength1:!0,objectId:m}),l("endobj");var y=c();u({data:r(A.metadata.toUnicode),addLength1:!0,objectId:y}),l("endobj");var B=c();l("<<"),l("/Descent "+A.metadata.decender),l("/CapHeight "+A.metadata.capHeight),l("/StemV "+A.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+m+" 0 R"),l("/Flags 96"),l("/FontBBox "+n.API.PDFObject.convert(A.metadata.bbox)),l("/FontName /"+tl(A.fontName)),l("/ItalicAngle "+A.metadata.italicAngle),l("/Ascent "+A.metadata.ascender),l(">>"),l("endobj"),A.objectNumber=c();for(var w=0;w<A.metadata.hmtx.widths.length;w++)A.metadata.hmtx.widths[w]=parseInt(A.metadata.hmtx.widths[w]*(1e3/A.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+y+" 0 R/BaseFont/"+tl(A.fontName)+"/FontDescriptor "+B+" 0 R/Encoding/"+A.encoding+" /FirstChar 29 /LastChar 255 /Widths "+n.API.PDFObject.convert(A.metadata.hmtx.widths)+">>"),l("endobj"),A.isAlreadyPutted=!0}})(o)}]);var s=function(o){var i,A=o.text||"",l=o.x,c=o.y,u=o.options||{},h=o.mutex||{},g=h.pdfEscape,d=h.activeFontKey,m=h.fonts,y=d,B="",w=0,E="",x=m[y].encoding;if(m[y].encoding!=="Identity-H")return{text:A,x:l,y:c,options:u,mutex:h};for(E=A,y=d,Array.isArray(A)&&(E=A[0]),w=0;w<E.length;w+=1)m[y].metadata.hasOwnProperty("cmap")&&(i=m[y].metadata.cmap.unicode.codeMap[E[w].charCodeAt(0)]),i||E[w].charCodeAt(0)<256&&m[y].metadata.hasOwnProperty("Unicode")?B+=E[w]:B+="";var b="";return parseInt(y.slice(1))<14||x==="WinAnsiEncoding"?b=g(B,y).split("").map(function(H){return H.charCodeAt(0).toString(16)}).join(""):x==="Identity-H"&&(b=e(B,m[y])),h.isHex=!0,{text:b,x:l,y:c,options:u,mutex:h}};t.events.push(["postProcessText",function(o){var i=o.text||"",A=[],l={text:i,x:o.x,y:o.y,options:o.options,mutex:o.mutex};if(Array.isArray(i)){var c=0;for(c=0;c<i.length;c+=1)Array.isArray(i[c])&&i[c].length===3?A.push([s(Object.assign({},l,{text:i[c][0]})).text,i[c][1],i[c][2]]):A.push(s(Object.assign({},l,{text:i[c]})).text);o.text=A}else o.text=s(Object.assign({},l,{text:i})).text}])})(dr),(function(n){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};n.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},n.addFileToVFS=function(e,r){return t.call(this),this.internal.vFS[e]=r,this},n.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}})(dr.API),(function(n){n.__bidiEngine__=n.prototype.__bidiEngine__=function(r){var s,o,i,A,l,c,u,h=t,g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],m={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},y={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},B=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),E=!1,x=0;this.__bidiEngine__={};var b=function(D){var S=D.charCodeAt(),Q=S>>8,T=y[Q];return T!==void 0?h[256*T+(255&S)]:Q===252||Q===253?"AL":w.test(Q)?"L":Q===8?"R":"N"},H=function(D){for(var S,Q=0;Q<D.length;Q++){if((S=b(D.charAt(Q)))==="L")return!1;if(S==="R")return!0}return!1},$=function(D,S,Q,T){var oe,X,F,M,R=S[T];switch(R){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":E=!1;break;case"N":case"AN":break;case"EN":E&&(R="AN");break;case"AL":E=!0,R="R";break;case"WS":case"BN":R="N";break;case"CS":T<1||T+1>=S.length||(oe=Q[T-1])!=="EN"&&oe!=="AN"||(X=S[T+1])!=="EN"&&X!=="AN"?R="N":E&&(X="AN"),R=X===oe?X:"N";break;case"ES":R=(oe=T>0?Q[T-1]:"B")==="EN"&&T+1<S.length&&S[T+1]==="EN"?"EN":"N";break;case"ET":if(T>0&&Q[T-1]==="EN"){R="EN";break}if(E){R="N";break}for(F=T+1,M=S.length;F<M&&S[F]==="ET";)F++;R=F<M&&S[F]==="EN"?"EN":"N";break;case"NSM":if(i&&!A){for(M=S.length,F=T+1;F<M&&S[F]==="NSM";)F++;if(F<M){var ae=D[T],J=ae>=1425&&ae<=2303||ae===64286;if(oe=S[F],J&&(oe==="R"||oe==="AL")){R="R";break}}}R=T<1||(oe=S[T-1])==="B"?"N":Q[T-1];break;case"B":E=!1,s=!0,R=x;break;case"S":o=!0,R="N"}return R},Y=function(D,S,Q){var T=D.split("");return Q&&V(T,Q,{hiLevel:x}),T.reverse(),S&&S.reverse(),T.join("")},V=function(D,S,Q){var T,oe,X,F,M,R=-1,ae=D.length,J=0,k=[],O=x?d:g,N=[];for(E=!1,s=!1,o=!1,oe=0;oe<ae;oe++)N[oe]=b(D[oe]);for(X=0;X<ae;X++){if(M=J,k[X]=$(D,N,k,X),T=240&(J=O[M][m[k[X]]]),J&=15,S[X]=F=O[J][5],T>0)if(T===16){for(oe=R;oe<X;oe++)S[oe]=1;R=-1}else R=-1;if(O[J][6])R===-1&&(R=X);else if(R>-1){for(oe=R;oe<X;oe++)S[oe]=F;R=-1}N[X]==="B"&&(S[X]=0),Q.hiLevel|=F}o&&(function(Z,se,ge){for(var fe=0;fe<ge;fe++)if(Z[fe]==="S"){se[fe]=x;for(var Ae=fe-1;Ae>=0&&Z[Ae]==="WS";Ae--)se[Ae]=x}})(N,S,ae)},L=function(D,S,Q,T,oe){if(!(oe.hiLevel<D)){if(D===1&&x===1&&!s)return S.reverse(),void(Q&&Q.reverse());for(var X,F,M,R,ae=S.length,J=0;J<ae;){if(T[J]>=D){for(M=J+1;M<ae&&T[M]>=D;)M++;for(R=J,F=M-1;R<F;R++,F--)X=S[R],S[R]=S[F],S[F]=X,Q&&(X=Q[R],Q[R]=Q[F],Q[F]=X);J=M}J++}}},j=function(D,S,Q){var T=D.split(""),oe={hiLevel:x};return Q||(Q=[]),V(T,Q,oe),(function(X,F,M){if(M.hiLevel!==0&&u)for(var R,ae=0;ae<X.length;ae++)F[ae]===1&&(R=B.indexOf(X[ae]))>=0&&(X[ae]=B[R+1])})(T,Q,oe),L(2,T,S,Q,oe),L(1,T,S,Q,oe),T.join("")};return this.__bidiEngine__.doBidiReorder=function(D,S,Q){if((function(oe,X){if(X)for(var F=0;F<oe.length;F++)X[F]=F;A===void 0&&(A=H(oe)),c===void 0&&(c=H(oe))})(D,S),i||!l||c)if(i&&l&&A^c)x=A?1:0,D=Y(D,S,Q);else if(!i&&l&&c)x=A?1:0,D=j(D,S,Q),D=Y(D,S);else if(!i||A||l||c){if(i&&!l&&A^c)D=Y(D,S),A?(x=0,D=j(D,S,Q)):(x=1,D=j(D,S,Q),D=Y(D,S));else if(i&&A&&!l&&c)x=1,D=j(D,S,Q),D=Y(D,S);else if(!i&&!l&&A^c){var T=u;A?(x=1,D=j(D,S,Q),x=0,u=!1,D=j(D,S,Q),u=T):(x=0,D=j(D,S,Q),D=Y(D,S),x=1,u=!1,D=j(D,S,Q),u=T,D=Y(D,S))}}else x=0,D=j(D,S,Q);else x=A?1:0,D=j(D,S,Q);return D},this.__bidiEngine__.setOptions=function(D){D&&(i=D.isInputVisual,l=D.isOutputVisual,A=D.isInputRtl,c=D.isOutputRtl,u=D.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new n.__bidiEngine__({isInputVisual:!0});n.API.events.push(["postProcessText",function(r){var s=r.text;r.x,r.y;var o=r.options||{};r.mutex,o.lang;var i=[];if(o.isInputVisual=typeof o.isInputVisual!="boolean"||o.isInputVisual,e.setOptions(o),Object.prototype.toString.call(s)==="[object Array]"){var A=0;for(i=[],A=0;A<s.length;A+=1)Object.prototype.toString.call(s[A])==="[object Array]"?i.push([e.doBidiReorder(s[A][0]),s[A][1],s[A][2]]):i.push([e.doBidiReorder(s[A])]);r.text=i}else r.text=e.doBidiReorder(s);e.setOptions({isInputVisual:!0})}])})(dr),dr.API.TTFFont=(function(){function n(t){var e;if(this.rawData=t,e=this.contents=new ni(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new xN(this),this.registerTTF()}return n.open=function(t){return new n(t)},n.prototype.parse=function(){return this.directory=new hN(this.contents),this.head=new pN(this),this.name=new BN(this),this.cmap=new QC(this),this.toUnicode={},this.hhea=new vN(this),this.maxp=new bN(this),this.hmtx=new CN(this),this.post=new wN(this),this.os2=new mN(this),this.loca=new TN(this),this.glyf=new kN(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},n.prototype.registerTTF=function(){var t,e,r,s,o;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var i,A,l,c;for(c=[],i=0,A=(l=this.bbox).length;i<A;i++)t=l[i],c.push(Math.round(t*this.scaleFactor));return c}).call(this),this.stemV=0,this.post.exists?(r=255&(s=this.post.italic_angle),32768&(e=s>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(o=this.familyClass)===1||o===2||o===3||o===4||o===5||o===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},n.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},n.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},n.prototype.widthOfString=function(t,e,r){var s,o,i,A;for(i=0,o=0,A=(t=""+t).length;0<=A?o<A:o>A;o=0<=A?++o:--o)s=t.charCodeAt(o),i+=this.widthOfGlyph(this.characterToGlyph(s))+r*(1e3/e)||0;return i*(e/1e3)},n.prototype.lineHeight=function(t,e){var r;return e==null&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},n})();var Po,ni=(function(){function n(t){this.data=t??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(t){return this.data[this.pos++]=t},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},n.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},n.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},n.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(t){var e,r,s;for(s=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)s.push(this.writeByte(t.charCodeAt(e)));return s},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(t){return this.writeInt16(t)},n.prototype.readLongLong=function(){var t,e,r,s,o,i,A,l;return t=this.readByte(),e=this.readByte(),r=this.readByte(),s=this.readByte(),o=this.readByte(),i=this.readByte(),A=this.readByte(),l=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^s)+16777216*(255^o)+65536*(255^i)+256*(255^A)+(255^l)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*s+16777216*o+65536*i+256*A+l},n.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(t){return this.writeInt32(t)},n.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},n.prototype.write=function(t){var e,r,s,o;for(o=[],r=0,s=t.length;r<s;r++)e=t[r],o.push(this.writeByte(e));return o},n})(),hN=(function(){var n;function t(e){var r,s,o;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},s=0,o=this.tableCount;0<=o?s<o:s>o;s=0<=o?++s:--s)r={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(e){var r,s,o,i,A,l,c,u,h,g,d,m,y;for(y in d=Object.keys(e).length,l=Math.log(2),h=16*Math.floor(Math.log(d)/l),i=Math.floor(h/l),u=16*d-h,(s=new ni).writeInt(this.scalarType),s.writeShort(d),s.writeShort(h),s.writeShort(i),s.writeShort(u),o=16*d,c=s.pos+o,A=null,m=[],e)for(g=e[y],s.writeString(y),s.writeInt(n(g)),s.writeInt(c),s.writeInt(g.length),m=m.concat(g),y==="head"&&(A=c),c+=g.length;c%4;)m.push(0),c++;return s.write(m),r=2981146554-n(s.data),s.pos=A+8,s.writeUInt32(r),s.data},n=function(e){var r,s,o,i;for(e=NC.call(e);e.length%4;)e.push(0);for(o=new ni(e),s=0,r=0,i=e.length;r<i;r=r+=4)s+=o.readUInt32();return 4294967295&s},t})(),gN={}.hasOwnProperty,sA=function(n,t){for(var e in t)gN.call(t,e)&&(n[e]=t[e]);function r(){this.constructor=n}return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};Po=(function(){function n(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return n.prototype.parse=function(){},n.prototype.encode=function(){},n.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},n})();var pN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="head",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},n.prototype.encode=function(t){var e;return(e=new ni).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},n})(),D1=(function(){function n(t,e){var r,s,o,i,A,l,c,u,h,g,d,m,y,B,w,E,x;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),h=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=t.readByte();break;case 4:for(d=t.readUInt16(),g=d/2,t.pos+=6,o=(function(){var b,H;for(H=[],l=b=0;0<=g?b<g:b>g;l=0<=g?++b:--b)H.push(t.readUInt16());return H})(),t.pos+=2,y=(function(){var b,H;for(H=[],l=b=0;0<=g?b<g:b>g;l=0<=g?++b:--b)H.push(t.readUInt16());return H})(),c=(function(){var b,H;for(H=[],l=b=0;0<=g?b<g:b>g;l=0<=g?++b:--b)H.push(t.readUInt16());return H})(),u=(function(){var b,H;for(H=[],l=b=0;0<=g?b<g:b>g;l=0<=g?++b:--b)H.push(t.readUInt16());return H})(),s=(this.length-t.pos+this.offset)/2,A=(function(){var b,H;for(H=[],l=b=0;0<=s?b<s:b>s;l=0<=s?++b:--b)H.push(t.readUInt16());return H})(),l=w=0,x=o.length;w<x;l=++w)for(B=o[l],r=E=m=y[l];m<=B?E<=B:E>=B;r=m<=B?++E:--E)u[l]===0?i=r+c[l]:(i=A[u[l]/2+(r-m)-(g-l)]||0)!==0&&(i+=c[l]),this.codeMap[r]=65535&i}t.pos=h}return n.encode=function(t,e){var r,s,o,i,A,l,c,u,h,g,d,m,y,B,w,E,x,b,H,$,Y,V,L,j,D,S,Q,T,oe,X,F,M,R,ae,J,k,O,N,Z,se,ge,fe,Ae,Fe,be,Ke;switch(T=new ni,i=Object.keys(t).sort(function(Xe,xe){return Xe-xe}),e){case"macroman":for(y=0,B=(function(){var Xe=[];for(m=0;m<256;++m)Xe.push(0);return Xe})(),E={0:0},o={},oe=0,R=i.length;oe<R;oe++)E[Ae=t[s=i[oe]]]==null&&(E[Ae]=++y),o[s]={old:t[s],new:E[t[s]]},B[s]=E[t[s]];return T.writeUInt16(1),T.writeUInt16(0),T.writeUInt32(12),T.writeUInt16(0),T.writeUInt16(262),T.writeUInt16(0),T.write(B),{charMap:o,subtable:T.data,maxGlyphID:y+1};case"unicode":for(S=[],h=[],x=0,E={},r={},w=c=null,X=0,ae=i.length;X<ae;X++)E[H=t[s=i[X]]]==null&&(E[H]=++x),r[s]={old:H,new:E[H]},A=E[H]-s,w!=null&&A===c||(w&&h.push(w),S.push(s),c=A),w=s;for(w&&h.push(w),h.push(65535),S.push(65535),j=2*(L=S.length),V=2*Math.pow(Math.log(L)/Math.LN2,2),g=Math.log(V/2)/Math.LN2,Y=2*L-V,l=[],$=[],d=[],m=F=0,J=S.length;F<J;m=++F){if(D=S[m],u=h[m],D===65535){l.push(0),$.push(0);break}if(D-(Q=r[D].new)>=32768)for(l.push(0),$.push(2*(d.length+L-m)),s=M=D;D<=u?M<=u:M>=u;s=D<=u?++M:--M)d.push(r[s].new);else l.push(Q-D),$.push(0)}for(T.writeUInt16(3),T.writeUInt16(1),T.writeUInt32(12),T.writeUInt16(4),T.writeUInt16(16+8*L+2*d.length),T.writeUInt16(0),T.writeUInt16(j),T.writeUInt16(V),T.writeUInt16(g),T.writeUInt16(Y),ge=0,k=h.length;ge<k;ge++)s=h[ge],T.writeUInt16(s);for(T.writeUInt16(0),fe=0,O=S.length;fe<O;fe++)s=S[fe],T.writeUInt16(s);for(Fe=0,N=l.length;Fe<N;Fe++)A=l[Fe],T.writeUInt16(A);for(be=0,Z=$.length;be<Z;be++)b=$[be],T.writeUInt16(b);for(Ke=0,se=d.length;Ke<se;Ke++)y=d[Ke],T.writeUInt16(y);return{charMap:r,subtable:T.data,maxGlyphID:x+1}}},n})(),QC=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="cmap",n.prototype.parse=function(t){var e,r,s;for(t.pos=this.offset,this.version=t.readUInt16(),s=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=s?r<s:r>s;r=0<=s?++r:--r)e=new D1(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},n.encode=function(t,e){var r,s;return e==null&&(e="macroman"),r=D1.encode(t,e),(s=new ni).writeUInt16(0),s.writeUInt16(1),r.table=s.data.concat(r.subtable),r},n})(),vN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="hhea",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},n})(),mN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="OS/2",n.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r})(),this.charRange=(function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},n})(),wN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="post",n.prototype.parse=function(t){var e,r,s;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var o;for(r=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=r?o<r:o>r;o=0<=r?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],s=[];t.pos<this.offset+this.length;)e=t.readByte(),s.push(this.names.push(t.readString(e)));return s;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var i,A,l;for(l=[],o=i=0,A=this.file.maxp.numGlyphs;0<=A?i<A:i>A;o=0<=A?++i:--i)l.push(t.readUInt32());return l}).call(this)}},n})(),yN=function(n,t){this.raw=n,this.length=n.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},BN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="name",n.prototype.parse=function(t){var e,r,s,o,i,A,l,c,u,h,g;for(t.pos=this.offset,t.readShort(),e=t.readShort(),A=t.readShort(),r=[],o=0;0<=e?o<e:o>e;o=0<=e?++o:--o)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+A+t.readShort()});for(l={},o=u=0,h=r.length;u<h;o=++u)s=r[o],t.pos=s.offset,c=t.readString(s.length),i=new yN(c,s),l[g=s.nameID]==null&&(l[g]=[]),l[s.nameID].push(i);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},n})(),bN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="maxp",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},n})(),CN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="hmtx",n.prototype.parse=function(t){var e,r,s,o,i,A,l;for(t.pos=this.offset,this.metrics=[],e=0,A=this.file.hhea.numberOfMetrics;0<=A?e<A:e>A;e=0<=A?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(s=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var c,u;for(u=[],e=c=0;0<=s?c<s:c>s;e=0<=s?++c:--c)u.push(t.readInt16());return u})(),this.widths=(function(){var c,u,h,g;for(g=[],c=0,u=(h=this.metrics).length;c<u;c++)o=h[c],g.push(o.advance);return g}).call(this),r=this.widths[this.widths.length-1],l=[],e=i=0;0<=s?i<s:i>s;e=0<=s?++i:--i)l.push(this.widths.push(r));return l},n.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},n})(),NC=[].slice,kN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(t){var e,r,s,o,i,A,l,c,u,h;return t in this.cache?this.cache[t]:(o=this.file.loca,e=this.file.contents,r=o.indexOf(t),(s=o.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+r,i=(A=new ni(e.read(s))).readShort(),c=A.readShort(),h=A.readShort(),l=A.readShort(),u=A.readShort(),this.cache[t]=i===-1?new DN(A,c,h,l,u):new EN(A,i,c,h,l,u),this.cache[t]))},n.prototype.encode=function(t,e,r){var s,o,i,A,l;for(i=[],o=[],A=0,l=e.length;A<l;A++)s=t[e[A]],o.push(i.length),s&&(i=i.concat(s.encode(r)));return o.push(i.length),{table:i,offsets:o}},n})(),EN=(function(){function n(t,e,r,s,o,i){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=s,this.xMax=o,this.yMax=i,this.compound=!1}return n.prototype.encode=function(){return this.raw.data},n})(),DN=(function(){function n(t,e,r,s,o){var i,A;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=s,this.yMax=o,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],i=this.raw;A=i.readShort(),this.glyphOffsets.push(i.pos),this.glyphIDs.push(i.readUInt16()),32&A;)i.pos+=1&A?4:2,128&A?i.pos+=8:64&A?i.pos+=4:8&A&&(i.pos+=2)}return n.prototype.encode=function(){var t,e,r;for(e=new ni(NC.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},n})(),TN=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return sA(n,Po),n.prototype.tag="loca",n.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?(function(){var s,o;for(o=[],r=0,s=this.length;r<s;r+=2)o.push(2*t.readUInt16());return o}).call(this):(function(){var s,o;for(o=[],r=0,s=this.length;r<s;r+=4)o.push(t.readUInt32());return o}).call(this)},n.prototype.indexOf=function(t){return this.offsets[t]},n.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},n.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),s=0,o=0,i=0;i<r.length;++i)if(r[i]=s,o<e.length&&e[o]==i){++o,r[i]=s;var A=this.offsets[i],l=this.offsets[i+1]-A;l>0&&(s+=l)}for(var c=new Array(4*r.length),u=0;u<r.length;++u)c[4*u+3]=255&r[u],c[4*u+2]=(65280&r[u])>>8,c[4*u+1]=(16711680&r[u])>>16,c[4*u]=(4278190080&r[u])>>24;return c},n})(),xN=(function(){function n(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var t,e,r,s,o;for(e in s=this.font.cmap.tables[0].codeMap,t={},o=this.subset)r=o[e],t[e]=s[r];return t},n.prototype.glyphsFor=function(t){var e,r,s,o,i,A,l;for(s={},i=0,A=t.length;i<A;i++)s[o=t[i]]=this.font.glyf.glyphFor(o);for(o in e=[],s)(r=s[o])!=null&&r.compound&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(o in l=this.glyphsFor(e))r=l[o],s[o]=r;return s},n.prototype.encode=function(t,e){var r,s,o,i,A,l,c,u,h,g,d,m,y,B,w;for(s in r=QC.encode(this.generateCmap(),"unicode"),i=this.glyphsFor(t),d={0:0},w=r.charMap)d[(l=w[s]).old]=l.new;for(m in g=r.maxGlyphID,i)m in d||(d[m]=g++);return u=(function(E){var x,b;for(x in b={},E)b[E[x]]=x;return b})(d),h=Object.keys(u).sort(function(E,x){return E-x}),y=(function(){var E,x,b;for(b=[],E=0,x=h.length;E<x;E++)A=h[E],b.push(u[A]);return b})(),o=this.font.glyf.encode(i,y,d),c=this.font.loca.encode(o.offsets,y),B={cmap:this.font.cmap.raw(),glyf:o.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(B["OS/2"]=this.font.os2.raw()),this.font.directory.encode(B)},n})();dr.API.PDFObject=(function(){var n;function t(){}return n=function(e,r){return(Array(r+1).join("0")+e).slice(-r)},t.convert=function(e){var r,s,o,i;if(Array.isArray(e))return"["+(function(){var A,l,c;for(c=[],A=0,l=e.length;A<l;A++)r=e[A],c.push(t.convert(r));return c})().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+n(e.getUTCFullYear(),4)+n(e.getUTCMonth(),2)+n(e.getUTCDate(),2)+n(e.getUTCHours(),2)+n(e.getUTCMinutes(),2)+n(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(s in o=["<<"],e)i=e[s],o.push("/"+s+" "+t.convert(i));return o.push(">>"),o.join(`
`)}return""+e},t})();/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var $p=function(n,t){return $p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},$p(n,t)};function Vo(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$p(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var qp=function(){return qp=Object.assign||function(t){for(var e,r=1,s=arguments.length;r<s;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},qp.apply(this,arguments)};function Ns(n,t,e,r){function s(o){return o instanceof e?o:new e(function(i){i(o)})}return new(e||(e=Promise))(function(o,i){function A(u){try{c(r.next(u))}catch(h){i(h)}}function l(u){try{c(r.throw(u))}catch(h){i(h)}}function c(u){u.done?o(u.value):s(u.value).then(A,l)}c((r=r.apply(n,[])).next())})}function Es(n,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,i;return i={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function A(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,s&&(o=c[0]&2?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,s=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){e.label=c[1];break}if(c[0]===6&&e.label<o[1]){e.label=o[1],o=c;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(c);break}o[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(n,e)}catch(u){c=[6,u],s=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ru(n,t,e){if(arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||t)}var xA=(function(){function n(t,e,r,s){this.left=t,this.top=e,this.width=r,this.height=s}return n.prototype.add=function(t,e,r,s){return new n(this.left+t,this.top+e,this.width+r,this.height+s)},n.fromClientRect=function(t,e){return new n(e.left+t.windowBounds.left,e.top+t.windowBounds.top,e.width,e.height)},n.fromDOMRectList=function(t,e){var r=Array.from(e).find(function(s){return s.width!==0});return r?new n(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):n.EMPTY},n.EMPTY=new n(0,0,0,0),n})(),ld=function(n,t){return xA.fromClientRect(n,t.getBoundingClientRect())},SN=function(n){var t=n.body,e=n.documentElement;if(!t||!e)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,e.scrollWidth),Math.max(t.offsetWidth,e.offsetWidth),Math.max(t.clientWidth,e.clientWidth)),s=Math.max(Math.max(t.scrollHeight,e.scrollHeight),Math.max(t.offsetHeight,e.offsetHeight),Math.max(t.clientHeight,e.clientHeight));return new xA(0,0,r,s)},cd=function(n){for(var t=[],e=0,r=n.length;e<r;){var s=n.charCodeAt(e++);if(s>=55296&&s<=56319&&e<r){var o=n.charCodeAt(e++);(o&64512)===56320?t.push(((s&1023)<<10)+(o&1023)+65536):(t.push(s),e--)}else t.push(s)}return t},Ca=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var e=n.length;if(!e)return"";for(var r=[],s=-1,o="";++s<e;){var i=n[s];i<=65535?r.push(i):(i-=65536,r.push((i>>10)+55296,i%1024+56320)),(s+1===e||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},T1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var nu=0;nu<T1.length;nu++)FN[T1.charCodeAt(nu)]=nu;var x1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var au=0;au<x1.length;au++)Wl[x1.charCodeAt(au)]=au;var LN=function(n){var t=n.length*.75,e=n.length,r,s=0,o,i,A,l;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var c=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),u=Array.isArray(c)?c:new Uint8Array(c);for(r=0;r<e;r+=4)o=Wl[n.charCodeAt(r)],i=Wl[n.charCodeAt(r+1)],A=Wl[n.charCodeAt(r+2)],l=Wl[n.charCodeAt(r+3)],u[s++]=o<<2|i>>4,u[s++]=(i&15)<<4|A>>2,u[s++]=(A&3)<<6|l&63;return c},UN=function(n){for(var t=n.length,e=[],r=0;r<t;r+=2)e.push(n[r+1]<<8|n[r]);return e},IN=function(n){for(var t=n.length,e=[],r=0;r<t;r+=4)e.push(n[r+3]<<24|n[r+2]<<16|n[r+1]<<8|n[r]);return e},Di=5,$v=11,gf=2,MN=$v-Di,_C=65536>>Di,QN=1<<Di,pf=QN-1,NN=1024>>Di,_N=_C+NN,RN=_N,ON=32,HN=RN+ON,PN=65536>>$v,VN=1<<MN,WN=VN-1,S1=function(n,t,e){return n.slice?n.slice(t,e):new Uint16Array(Array.prototype.slice.call(n,t,e))},KN=function(n,t,e){return n.slice?n.slice(t,e):new Uint32Array(Array.prototype.slice.call(n,t,e))},$N=function(n,t){var e=LN(n),r=Array.isArray(e)?IN(e):new Uint32Array(e),s=Array.isArray(e)?UN(e):new Uint16Array(e),o=24,i=S1(s,o/2,r[4]/2),A=r[5]===2?S1(s,(o+r[4])/2):KN(r,Math.ceil((o+r[4])/4));return new qN(r[0],r[1],r[2],r[3],i,A)},qN=(function(){function n(t,e,r,s,o,i){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=s,this.index=o,this.data=i}return n.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>Di],e=(e<<gf)+(t&pf),this.data[e];if(t<=65535)return e=this.index[_C+(t-55296>>Di)],e=(e<<gf)+(t&pf),this.data[e];if(t<this.highStart)return e=HN-PN+(t>>$v),e=this.index[e],e+=t>>Di&WN,e=this.index[e],e=(e<<gf)+(t&pf),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},n})(),F1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var su=0;su<F1.length;su++)jN[F1.charCodeAt(su)]=su;var YN="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",L1=50,GN=1,RC=2,OC=3,zN=4,XN=5,U1=7,HC=8,I1=9,JA=10,jp=11,M1=12,Yp=13,JN=14,Kl=15,Gp=16,ou=17,Ql=18,ZN=19,Q1=20,zp=21,Nl=22,vf=23,$i=24,lo=25,$l=26,ql=27,qi=28,e6=29,Bi=30,t6=31,Au=32,iu=33,Xp=34,Jp=35,Zp=36,lc=37,ev=38,Ru=39,Ou=40,mf=41,PC=42,r6=43,n6=[9001,65288],VC="!",Xr="×",lu="÷",tv=$N(YN),yA=[Bi,Zp],rv=[GN,RC,OC,XN],WC=[JA,HC],N1=[ql,$l],a6=rv.concat(WC),_1=[ev,Ru,Ou,Xp,Jp],s6=[Kl,Yp],o6=function(n,t){t===void 0&&(t="strict");var e=[],r=[],s=[];return n.forEach(function(o,i){var A=tv.get(o);if(A>L1?(s.push(!0),A-=L1):s.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(o)!==-1)return r.push(i),e.push(Gp);if(A===zN||A===jp){if(i===0)return r.push(i),e.push(Bi);var l=e[i-1];return a6.indexOf(l)===-1?(r.push(r[i-1]),e.push(l)):(r.push(i),e.push(Bi))}if(r.push(i),A===t6)return e.push(t==="strict"?zp:lc);if(A===PC||A===e6)return e.push(Bi);if(A===r6)return o>=131072&&o<=196605||o>=196608&&o<=262141?e.push(lc):e.push(Bi);e.push(A)}),[r,e,s]},wf=function(n,t,e,r){var s=r[e];if(Array.isArray(n)?n.indexOf(s)!==-1:n===s)for(var o=e;o<=r.length;){o++;var i=r[o];if(i===t)return!0;if(i!==JA)break}if(s===JA)for(var o=e;o>0;){o--;var A=r[o];if(Array.isArray(n)?n.indexOf(A)!==-1:n===A)for(var l=e;l<=r.length;){l++;var i=r[l];if(i===t)return!0;if(i!==JA)break}if(A!==JA)break}return!1},R1=function(n,t){for(var e=n;e>=0;){var r=t[e];if(r===JA)e--;else return r}return 0},A6=function(n,t,e,r,s){if(e[r]===0)return Xr;var o=r-1;if(Array.isArray(s)&&s[o]===!0)return Xr;var i=o-1,A=o+1,l=t[o],c=i>=0?t[i]:0,u=t[A];if(l===RC&&u===OC)return Xr;if(rv.indexOf(l)!==-1)return VC;if(rv.indexOf(u)!==-1||WC.indexOf(u)!==-1)return Xr;if(R1(o,t)===HC)return lu;if(tv.get(n[o])===jp||(l===Au||l===iu)&&tv.get(n[A])===jp||l===U1||u===U1||l===I1||[JA,Yp,Kl].indexOf(l)===-1&&u===I1||[ou,Ql,ZN,$i,qi].indexOf(u)!==-1||R1(o,t)===Nl||wf(vf,Nl,o,t)||wf([ou,Ql],zp,o,t)||wf(M1,M1,o,t))return Xr;if(l===JA)return lu;if(l===vf||u===vf)return Xr;if(u===Gp||l===Gp)return lu;if([Yp,Kl,zp].indexOf(u)!==-1||l===JN||c===Zp&&s6.indexOf(l)!==-1||l===qi&&u===Zp||u===Q1||yA.indexOf(u)!==-1&&l===lo||yA.indexOf(l)!==-1&&u===lo||l===ql&&[lc,Au,iu].indexOf(u)!==-1||[lc,Au,iu].indexOf(l)!==-1&&u===$l||yA.indexOf(l)!==-1&&N1.indexOf(u)!==-1||N1.indexOf(l)!==-1&&yA.indexOf(u)!==-1||[ql,$l].indexOf(l)!==-1&&(u===lo||[Nl,Kl].indexOf(u)!==-1&&t[A+1]===lo)||[Nl,Kl].indexOf(l)!==-1&&u===lo||l===lo&&[lo,qi,$i].indexOf(u)!==-1)return Xr;if([lo,qi,$i,ou,Ql].indexOf(u)!==-1)for(var h=o;h>=0;){var g=t[h];if(g===lo)return Xr;if([qi,$i].indexOf(g)!==-1)h--;else break}if([ql,$l].indexOf(u)!==-1)for(var h=[ou,Ql].indexOf(l)!==-1?i:o;h>=0;){var g=t[h];if(g===lo)return Xr;if([qi,$i].indexOf(g)!==-1)h--;else break}if(ev===l&&[ev,Ru,Xp,Jp].indexOf(u)!==-1||[Ru,Xp].indexOf(l)!==-1&&[Ru,Ou].indexOf(u)!==-1||[Ou,Jp].indexOf(l)!==-1&&u===Ou||_1.indexOf(l)!==-1&&[Q1,$l].indexOf(u)!==-1||_1.indexOf(u)!==-1&&l===ql||yA.indexOf(l)!==-1&&yA.indexOf(u)!==-1||l===$i&&yA.indexOf(u)!==-1||yA.concat(lo).indexOf(l)!==-1&&u===Nl&&n6.indexOf(n[A])===-1||yA.concat(lo).indexOf(u)!==-1&&l===Ql)return Xr;if(l===mf&&u===mf){for(var d=e[o],m=1;d>0&&(d--,t[d]===mf);)m++;if(m%2!==0)return Xr}return l===Au&&u===iu?Xr:lu},i6=function(n,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var e=o6(n,t.lineBreak),r=e[0],s=e[1],o=e[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(s=s.map(function(A){return[lo,Bi,PC].indexOf(A)!==-1?lc:A}));var i=t.wordBreak==="keep-all"?o.map(function(A,l){return A&&n[l]>=19968&&n[l]<=40959}):void 0;return[r,s,i]},l6=(function(){function n(t,e,r,s){this.codePoints=t,this.required=e===VC,this.start=r,this.end=s}return n.prototype.slice=function(){return Ca.apply(void 0,this.codePoints.slice(this.start,this.end))},n})(),c6=function(n,t){var e=cd(n),r=i6(e,t),s=r[0],o=r[1],i=r[2],A=e.length,l=0,c=0;return{next:function(){if(c>=A)return{done:!0,value:null};for(var u=Xr;c<A&&(u=A6(e,o,s,++c,i))===Xr;);if(u!==Xr||c===A){var h=new l6(e,u,l,c);return l=c,{value:h,done:!1}}return{done:!0,value:null}}}},u6=1,d6=2,fc=4,O1=8,zu=10,H1=47,ec=92,f6=9,h6=32,cu=34,_l=61,g6=35,p6=36,v6=37,uu=39,du=40,Rl=41,m6=95,Ys=45,w6=33,y6=60,B6=62,b6=64,C6=91,k6=93,E6=61,D6=123,fu=63,T6=125,P1=124,x6=126,S6=128,V1=65533,yf=42,bi=43,F6=44,L6=58,U6=59,cc=46,I6=0,M6=8,Q6=11,N6=14,_6=31,R6=127,tA=-1,KC=48,$C=97,qC=101,O6=102,H6=117,P6=122,jC=65,YC=69,GC=70,V6=85,W6=90,Ds=function(n){return n>=KC&&n<=57},K6=function(n){return n>=55296&&n<=57343},ji=function(n){return Ds(n)||n>=jC&&n<=GC||n>=$C&&n<=O6},$6=function(n){return n>=$C&&n<=P6},q6=function(n){return n>=jC&&n<=W6},j6=function(n){return $6(n)||q6(n)},Y6=function(n){return n>=S6},hu=function(n){return n===zu||n===f6||n===h6},Xu=function(n){return j6(n)||Y6(n)||n===m6},W1=function(n){return Xu(n)||Ds(n)||n===Ys},G6=function(n){return n>=I6&&n<=M6||n===Q6||n>=N6&&n<=_6||n===R6},YA=function(n,t){return n!==ec?!1:t!==zu},gu=function(n,t,e){return n===Ys?Xu(t)||YA(t,e):Xu(n)?!0:!!(n===ec&&YA(n,t))},Bf=function(n,t,e){return n===bi||n===Ys?Ds(t)?!0:t===cc&&Ds(e):Ds(n===cc?t:n)},z6=function(n){var t=0,e=1;(n[t]===bi||n[t]===Ys)&&(n[t]===Ys&&(e=-1),t++);for(var r=[];Ds(n[t]);)r.push(n[t++]);var s=r.length?parseInt(Ca.apply(void 0,r),10):0;n[t]===cc&&t++;for(var o=[];Ds(n[t]);)o.push(n[t++]);var i=o.length,A=i?parseInt(Ca.apply(void 0,o),10):0;(n[t]===YC||n[t]===qC)&&t++;var l=1;(n[t]===bi||n[t]===Ys)&&(n[t]===Ys&&(l=-1),t++);for(var c=[];Ds(n[t]);)c.push(n[t++]);var u=c.length?parseInt(Ca.apply(void 0,c),10):0;return e*(s+A*Math.pow(10,-i))*Math.pow(10,l*u)},X6={type:2},J6={type:3},Z6={type:4},e_={type:13},t_={type:8},r_={type:21},n_={type:9},a_={type:10},s_={type:11},o_={type:12},A_={type:14},pu={type:23},i_={type:1},l_={type:25},c_={type:24},u_={type:26},d_={type:27},f_={type:28},h_={type:29},g_={type:31},nv={type:32},zC=(function(){function n(){this._value=[]}return n.prototype.write=function(t){this._value=this._value.concat(cd(t))},n.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==nv;)t.push(e),e=this.consumeToken();return t},n.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case cu:return this.consumeStringToken(cu);case g6:var e=this.peekCodePoint(0),r=this.peekCodePoint(1),s=this.peekCodePoint(2);if(W1(e)||YA(r,s)){var o=gu(e,r,s)?d6:u6,i=this.consumeName();return{type:5,value:i,flags:o}}break;case p6:if(this.peekCodePoint(0)===_l)return this.consumeCodePoint(),e_;break;case uu:return this.consumeStringToken(uu);case du:return X6;case Rl:return J6;case yf:if(this.peekCodePoint(0)===_l)return this.consumeCodePoint(),A_;break;case bi:if(Bf(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case F6:return Z6;case Ys:var A=t,l=this.peekCodePoint(0),c=this.peekCodePoint(1);if(Bf(A,l,c))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(gu(A,l,c))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(l===Ys&&c===B6)return this.consumeCodePoint(),this.consumeCodePoint(),c_;break;case cc:if(Bf(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case H1:if(this.peekCodePoint(0)===yf)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===yf&&(u=this.consumeCodePoint(),u===H1))return this.consumeToken();if(u===tA)return this.consumeToken()}break;case L6:return u_;case U6:return d_;case y6:if(this.peekCodePoint(0)===w6&&this.peekCodePoint(1)===Ys&&this.peekCodePoint(2)===Ys)return this.consumeCodePoint(),this.consumeCodePoint(),l_;break;case b6:var h=this.peekCodePoint(0),g=this.peekCodePoint(1),d=this.peekCodePoint(2);if(gu(h,g,d)){var i=this.consumeName();return{type:7,value:i}}break;case C6:return f_;case ec:if(YA(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case k6:return h_;case E6:if(this.peekCodePoint(0)===_l)return this.consumeCodePoint(),t_;break;case D6:return s_;case T6:return o_;case H6:case V6:var m=this.peekCodePoint(0),y=this.peekCodePoint(1);return m===bi&&(ji(y)||y===fu)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case P1:if(this.peekCodePoint(0)===_l)return this.consumeCodePoint(),n_;if(this.peekCodePoint(0)===P1)return this.consumeCodePoint(),r_;break;case x6:if(this.peekCodePoint(0)===_l)return this.consumeCodePoint(),a_;break;case tA:return nv}return hu(t)?(this.consumeWhiteSpace(),g_):Ds(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):Xu(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:Ca(t)}},n.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},n.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},n.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},n.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();ji(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var r=!1;e===fu&&t.length<6;)t.push(e),e=this.consumeCodePoint(),r=!0;if(r){var s=parseInt(Ca.apply(void 0,t.map(function(l){return l===fu?KC:l})),16),o=parseInt(Ca.apply(void 0,t.map(function(l){return l===fu?GC:l})),16);return{type:30,start:s,end:o}}var i=parseInt(Ca.apply(void 0,t),16);if(this.peekCodePoint(0)===Ys&&ji(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var A=[];ji(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();var o=parseInt(Ca.apply(void 0,A),16);return{type:30,start:i,end:o}}else return{type:30,start:i,end:i}},n.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===du?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===du?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},n.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===tA)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===uu||e===cu){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===tA||this.peekCodePoint(0)===Rl)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),pu)}for(;;){var s=this.consumeCodePoint();if(s===tA||s===Rl)return{type:22,value:Ca.apply(void 0,t)};if(hu(s))return this.consumeWhiteSpace(),this.peekCodePoint(0)===tA||this.peekCodePoint(0)===Rl?(this.consumeCodePoint(),{type:22,value:Ca.apply(void 0,t)}):(this.consumeBadUrlRemnants(),pu);if(s===cu||s===uu||s===du||G6(s))return this.consumeBadUrlRemnants(),pu;if(s===ec)if(YA(s,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),pu;else t.push(s)}},n.prototype.consumeWhiteSpace=function(){for(;hu(this.peekCodePoint(0));)this.consumeCodePoint()},n.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===Rl||t===tA)return;YA(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},n.prototype.consumeStringSlice=function(t){for(var e=5e4,r="";t>0;){var s=Math.min(e,t);r+=Ca.apply(void 0,this._value.splice(0,s)),t-=s}return this._value.shift(),r},n.prototype.consumeStringToken=function(t){var e="",r=0;do{var s=this._value[r];if(s===tA||s===void 0||s===t)return e+=this.consumeStringSlice(r),{type:0,value:e};if(s===zu)return this._value.splice(0,r),i_;if(s===ec){var o=this._value[r+1];o!==tA&&o!==void 0&&(o===zu?(e+=this.consumeStringSlice(r),r=-1,this._value.shift()):YA(s,o)&&(e+=this.consumeStringSlice(r),e+=Ca(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},n.prototype.consumeNumber=function(){var t=[],e=fc,r=this.peekCodePoint(0);for((r===bi||r===Ys)&&t.push(this.consumeCodePoint());Ds(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0);var s=this.peekCodePoint(1);if(r===cc&&Ds(s))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=O1;Ds(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0),s=this.peekCodePoint(1);var o=this.peekCodePoint(2);if((r===YC||r===qC)&&((s===bi||s===Ys)&&Ds(o)||Ds(s)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=O1;Ds(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[z6(t),e]},n.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],r=t[1],s=this.peekCodePoint(0),o=this.peekCodePoint(1),i=this.peekCodePoint(2);if(gu(s,o,i)){var A=this.consumeName();return{type:15,number:e,flags:r,unit:A}}return s===v6?(this.consumeCodePoint(),{type:16,number:e,flags:r}):{type:17,number:e,flags:r}},n.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(ji(t)){for(var e=Ca(t);ji(this.peekCodePoint(0))&&e.length<6;)e+=Ca(this.consumeCodePoint());hu(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(e,16);return r===0||K6(r)||r>1114111?V1:r}return t===tA?V1:t},n.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(W1(e))t+=Ca(e);else if(YA(e,this.peekCodePoint(0)))t+=Ca(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),t}},n})(),XC=(function(){function n(t){this._tokens=t}return n.create=function(t){var e=new zC;return e.write(t),new n(e.read())},n.parseValue=function(t){return n.create(t).parseComponentValue()},n.parseValues=function(t){return n.create(t).parseComponentValues()},n.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},n.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(e.type===32)return t;t.push(e),t.push()}},n.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},n.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},r=this.consumeToken();;){if(r.type===32||v_(r,t))return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue()),r=this.consumeToken()}},n.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue())}},n.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?nv:t},n.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},n})(),hc=function(n){return n.type===15},vl=function(n){return n.type===17},Tn=function(n){return n.type===20},p_=function(n){return n.type===0},av=function(n,t){return Tn(n)&&n.value===t},JC=function(n){return n.type!==31},gl=function(n){return n.type!==31&&n.type!==4},oA=function(n){var t=[],e=[];return n.forEach(function(r){if(r.type===4){if(e.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(e),e=[];return}r.type!==31&&e.push(r)}),e.length&&t.push(e),t},v_=function(n,t){return t===11&&n.type===12||t===28&&n.type===29?!0:t===2&&n.type===3},ai=function(n){return n.type===17||n.type===15},Na=function(n){return n.type===16||ai(n)},ZC=function(n){return n.length>1?[n[0],n[1]]:[n[0]]},ds={type:17,number:0,flags:fc},qv={type:16,number:50,flags:fc},ZA={type:16,number:100,flags:fc},jl=function(n,t,e){var r=n[0],s=n[1];return[_n(r,t),_n(typeof s<"u"?s:r,e)]},_n=function(n,t){if(n.type===16)return n.number/100*t;if(hc(n))switch(n.unit){case"rem":case"em":return 16*n.number;case"px":default:return n.number}return n.number},e5="deg",t5="grad",r5="rad",n5="turn",ud={name:"angle",parse:function(n,t){if(t.type===15)switch(t.unit){case e5:return Math.PI*t.number/180;case t5:return Math.PI/200*t.number;case r5:return t.number;case n5:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},a5=function(n){return n.type===15&&(n.unit===e5||n.unit===t5||n.unit===r5||n.unit===n5)},s5=function(n){var t=n.filter(Tn).map(function(e){return e.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ds,ds];case"to top":case"bottom":return wo(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ds,ZA];case"to right":case"left":return wo(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ZA,ZA];case"to bottom":case"top":return wo(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ZA,ds];case"to left":case"right":return wo(270)}return 0},wo=function(n){return Math.PI*n/180},ti={name:"color",parse:function(n,t){if(t.type===18){var e=m_[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return e(n,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),s=t.value.substring(1,2),o=t.value.substring(2,3);return ei(parseInt(r+r,16),parseInt(s+s,16),parseInt(o+o,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),s=t.value.substring(1,2),o=t.value.substring(2,3),i=t.value.substring(3,4);return ei(parseInt(r+r,16),parseInt(s+s,16),parseInt(o+o,16),parseInt(i+i,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),s=t.value.substring(2,4),o=t.value.substring(4,6);return ei(parseInt(r,16),parseInt(s,16),parseInt(o,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),s=t.value.substring(2,4),o=t.value.substring(4,6),i=t.value.substring(6,8);return ei(parseInt(r,16),parseInt(s,16),parseInt(o,16),parseInt(i,16)/255)}}if(t.type===20){var A=DA[t.value.toUpperCase()];if(typeof A<"u")return A}return DA.TRANSPARENT}},ri=function(n){return(255&n)===0},Ja=function(n){var t=255&n,e=255&n>>8,r=255&n>>16,s=255&n>>24;return t<255?"rgba("+s+","+r+","+e+","+t/255+")":"rgb("+s+","+r+","+e+")"},ei=function(n,t,e,r){return(n<<24|t<<16|e<<8|Math.round(r*255)<<0)>>>0},K1=function(n,t){if(n.type===17)return n.number;if(n.type===16){var e=t===3?1:255;return t===3?n.number/100*e:Math.round(n.number/100*e)}return 0},$1=function(n,t){var e=t.filter(gl);if(e.length===3){var r=e.map(K1),s=r[0],o=r[1],i=r[2];return ei(s,o,i,1)}if(e.length===4){var A=e.map(K1),s=A[0],o=A[1],i=A[2],l=A[3];return ei(s,o,i,l)}return 0};function bf(n,t,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(t-n)*e*6+n:e<1/2?t:e<2/3?(t-n)*6*(2/3-e)+n:n}var q1=function(n,t){var e=t.filter(gl),r=e[0],s=e[1],o=e[2],i=e[3],A=(r.type===17?wo(r.number):ud.parse(n,r))/(Math.PI*2),l=Na(s)?s.number/100:0,c=Na(o)?o.number/100:0,u=typeof i<"u"&&Na(i)?_n(i,1):1;if(l===0)return ei(c*255,c*255,c*255,1);var h=c<=.5?c*(l+1):c+l-c*l,g=c*2-h,d=bf(g,h,A+1/3),m=bf(g,h,A),y=bf(g,h,A-1/3);return ei(d*255,m*255,y*255,u)},m_={hsl:q1,hsla:q1,rgb:$1,rgba:$1},tc=function(n,t){return ti.parse(n,XC.create(t).parseComponentValue())},DA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},w_={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(n,t){return t.map(function(e){if(Tn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},y_={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},dd=function(n,t){var e=ti.parse(n,t[0]),r=t[1];return r&&Na(r)?{color:e,stop:r}:{color:e,stop:null}},j1=function(n,t){var e=n[0],r=n[n.length-1];e.stop===null&&(e.stop=ds),r.stop===null&&(r.stop=ZA);for(var s=[],o=0,i=0;i<n.length;i++){var A=n[i].stop;if(A!==null){var l=_n(A,t);l>o?s.push(l):s.push(o),o=l}else s.push(null)}for(var c=null,i=0;i<s.length;i++){var u=s[i];if(u===null)c===null&&(c=i);else if(c!==null){for(var h=i-c,g=s[c-1],d=(u-g)/(h+1),m=1;m<=h;m++)s[c+m-1]=d*m;c=null}}return n.map(function(y,B){var w=y.color;return{color:w,stop:Math.max(Math.min(1,s[B]/t),0)}})},B_=function(n,t,e){var r=t/2,s=e/2,o=_n(n[0],t)-r,i=s-_n(n[1],e);return(Math.atan2(i,o)+Math.PI*2)%(Math.PI*2)},b_=function(n,t,e){var r=typeof n=="number"?n:B_(n,t,e),s=Math.abs(t*Math.sin(r))+Math.abs(e*Math.cos(r)),o=t/2,i=e/2,A=s/2,l=Math.sin(r-Math.PI/2)*A,c=Math.cos(r-Math.PI/2)*A;return[s,o-c,o+c,i-l,i+l]},_o=function(n,t){return Math.sqrt(n*n+t*t)},Y1=function(n,t,e,r,s){var o=[[0,0],[0,t],[n,0],[n,t]];return o.reduce(function(i,A){var l=A[0],c=A[1],u=_o(e-l,r-c);return(s?u<i.optimumDistance:u>i.optimumDistance)?{optimumCorner:A,optimumDistance:u}:i},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},C_=function(n,t,e,r,s){var o=0,i=0;switch(n.size){case 0:n.shape===0?o=i=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-s)):n.shape===1&&(o=Math.min(Math.abs(t),Math.abs(t-r)),i=Math.min(Math.abs(e),Math.abs(e-s)));break;case 2:if(n.shape===0)o=i=Math.min(_o(t,e),_o(t,e-s),_o(t-r,e),_o(t-r,e-s));else if(n.shape===1){var A=Math.min(Math.abs(e),Math.abs(e-s))/Math.min(Math.abs(t),Math.abs(t-r)),l=Y1(r,s,t,e,!0),c=l[0],u=l[1];o=_o(c-t,(u-e)/A),i=A*o}break;case 1:n.shape===0?o=i=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-s)):n.shape===1&&(o=Math.max(Math.abs(t),Math.abs(t-r)),i=Math.max(Math.abs(e),Math.abs(e-s)));break;case 3:if(n.shape===0)o=i=Math.max(_o(t,e),_o(t,e-s),_o(t-r,e),_o(t-r,e-s));else if(n.shape===1){var A=Math.max(Math.abs(e),Math.abs(e-s))/Math.max(Math.abs(t),Math.abs(t-r)),h=Y1(r,s,t,e,!1),c=h[0],u=h[1];o=_o(c-t,(u-e)/A),i=A*o}break}return Array.isArray(n.size)&&(o=_n(n.size[0],r),i=n.size.length===2?_n(n.size[1],s):o),[o,i]},k_=function(n,t){var e=wo(180),r=[];return oA(t).forEach(function(s,o){if(o===0){var i=s[0];if(i.type===20&&i.value==="to"){e=s5(s);return}else if(a5(i)){e=ud.parse(n,i);return}}var A=dd(n,s);r.push(A)}),{angle:e,stops:r,type:1}},vu=function(n,t){var e=wo(180),r=[];return oA(t).forEach(function(s,o){if(o===0){var i=s[0];if(i.type===20&&["top","left","right","bottom"].indexOf(i.value)!==-1){e=s5(s);return}else if(a5(i)){e=(ud.parse(n,i)+wo(270))%wo(360);return}}var A=dd(n,s);r.push(A)}),{angle:e,stops:r,type:1}},E_=function(n,t){var e=wo(180),r=[],s=1,o=0,i=3,A=[];return oA(t).forEach(function(l,c){var u=l[0];if(c===0){if(Tn(u)&&u.value==="linear"){s=1;return}else if(Tn(u)&&u.value==="radial"){s=2;return}}if(u.type===18){if(u.name==="from"){var h=ti.parse(n,u.values[0]);r.push({stop:ds,color:h})}else if(u.name==="to"){var h=ti.parse(n,u.values[0]);r.push({stop:ZA,color:h})}else if(u.name==="color-stop"){var g=u.values.filter(gl);if(g.length===2){var h=ti.parse(n,g[1]),d=g[0];vl(d)&&r.push({stop:{type:16,number:d.number*100,flags:d.flags},color:h})}}}}),s===1?{angle:(e+wo(180))%wo(360),stops:r,type:s}:{size:i,shape:o,stops:r,position:A,type:s}},o5="closest-side",A5="farthest-side",i5="closest-corner",l5="farthest-corner",c5="circle",u5="ellipse",d5="cover",f5="contain",D_=function(n,t){var e=0,r=3,s=[],o=[];return oA(t).forEach(function(i,A){var l=!0;if(A===0){var c=!1;l=i.reduce(function(h,g){if(c)if(Tn(g))switch(g.value){case"center":return o.push(qv),h;case"top":case"left":return o.push(ds),h;case"right":case"bottom":return o.push(ZA),h}else(Na(g)||ai(g))&&o.push(g);else if(Tn(g))switch(g.value){case c5:return e=0,!1;case u5:return e=1,!1;case"at":return c=!0,!1;case o5:return r=0,!1;case d5:case A5:return r=1,!1;case f5:case i5:return r=2,!1;case l5:return r=3,!1}else if(ai(g)||Na(g))return Array.isArray(r)||(r=[]),r.push(g),!1;return h},l)}if(l){var u=dd(n,i);s.push(u)}}),{size:r,shape:e,stops:s,position:o,type:2}},mu=function(n,t){var e=0,r=3,s=[],o=[];return oA(t).forEach(function(i,A){var l=!0;if(A===0?l=i.reduce(function(u,h){if(Tn(h))switch(h.value){case"center":return o.push(qv),!1;case"top":case"left":return o.push(ds),!1;case"right":case"bottom":return o.push(ZA),!1}else if(Na(h)||ai(h))return o.push(h),!1;return u},l):A===1&&(l=i.reduce(function(u,h){if(Tn(h))switch(h.value){case c5:return e=0,!1;case u5:return e=1,!1;case f5:case o5:return r=0,!1;case A5:return r=1,!1;case i5:return r=2,!1;case d5:case l5:return r=3,!1}else if(ai(h)||Na(h))return Array.isArray(r)||(r=[]),r.push(h),!1;return u},l)),l){var c=dd(n,i);s.push(c)}}),{size:r,shape:e,stops:s,position:o,type:2}},T_=function(n){return n.type===1},x_=function(n){return n.type===2},jv={name:"image",parse:function(n,t){if(t.type===22){var e={url:t.value,type:0};return n.cache.addImage(t.value),e}if(t.type===18){var r=h5[t.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(n,t.values)}throw new Error("Unsupported image type "+t.type)}};function S_(n){return!(n.type===20&&n.value==="none")&&(n.type!==18||!!h5[n.name])}var h5={"linear-gradient":k_,"-moz-linear-gradient":vu,"-ms-linear-gradient":vu,"-o-linear-gradient":vu,"-webkit-linear-gradient":vu,"radial-gradient":D_,"-moz-radial-gradient":mu,"-ms-radial-gradient":mu,"-o-radial-gradient":mu,"-webkit-radial-gradient":mu,"-webkit-gradient":E_},F_={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(n,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t.filter(function(r){return gl(r)&&S_(r)}).map(function(r){return jv.parse(n,r)})}},L_={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(n,t){return t.map(function(e){if(Tn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},U_={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(n,t){return oA(t).map(function(e){return e.filter(Na)}).map(ZC)}},I_={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(n,t){return oA(t).map(function(e){return e.filter(Tn).map(function(r){return r.value}).join(" ")}).map(M_)}},M_=function(n){switch(n){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},fl;(function(n){n.AUTO="auto",n.CONTAIN="contain",n.COVER="cover"})(fl||(fl={}));var Q_={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(n,t){return oA(t).map(function(e){return e.filter(N_)})}},N_=function(n){return Tn(n)||Na(n)},fd=function(n){return{name:"border-"+n+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},__=fd("top"),R_=fd("right"),O_=fd("bottom"),H_=fd("left"),hd=function(n){return{name:"border-radius-"+n,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return ZC(e.filter(Na))}}},P_=hd("top-left"),V_=hd("top-right"),W_=hd("bottom-right"),K_=hd("bottom-left"),gd=function(n){return{name:"border-"+n+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},$_=gd("top"),q_=gd("right"),j_=gd("bottom"),Y_=gd("left"),pd=function(n){return{name:"border-"+n+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return hc(e)?e.number:0}}},G_=pd("top"),z_=pd("right"),X_=pd("bottom"),J_=pd("left"),Z_={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},eR={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(n,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},tR={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(n,t){return t.filter(Tn).reduce(function(e,r){return e|rR(r.value)},0)}},rR=function(n){switch(n){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},nR={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},aR={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(n,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},Ju;(function(n){n.NORMAL="normal",n.STRICT="strict"})(Ju||(Ju={}));var sR={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"strict":return Ju.STRICT;case"normal":default:return Ju.NORMAL}}},oR={name:"line-height",initialValue:"normal",prefix:!1,type:4},G1=function(n,t){return Tn(n)&&n.value==="normal"?1.2*t:n.type===17?t*n.number:Na(n)?_n(n,t):t},AR={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(n,t){return t.type===20&&t.value==="none"?null:jv.parse(n,t)}},iR={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(n,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},sv={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},vd=function(n){return{name:"margin-"+n,initialValue:"0",prefix:!1,type:4}},lR=vd("top"),cR=vd("right"),uR=vd("bottom"),dR=vd("left"),fR={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(n,t){return t.filter(Tn).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},hR={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},md=function(n){return{name:"padding-"+n,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},gR=md("top"),pR=md("right"),vR=md("bottom"),mR=md("left"),wR={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(n,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},yR={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(n,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},BR={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.length===1&&av(t[0],"none")?[]:oA(t).map(function(e){for(var r={color:DA.TRANSPARENT,offsetX:ds,offsetY:ds,blur:ds},s=0,o=0;o<e.length;o++){var i=e[o];ai(i)?(s===0?r.offsetX=i:s===1?r.offsetY=i:r.blur=i,s++):r.color=ti.parse(n,i)}return r})}},bR={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},CR={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(n,t){if(t.type===20&&t.value==="none")return null;if(t.type===18){var e=DR[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return e(t.values)}return null}},kR=function(n){var t=n.filter(function(e){return e.type===17}).map(function(e){return e.number});return t.length===6?t:null},ER=function(n){var t=n.filter(function(l){return l.type===17}).map(function(l){return l.number}),e=t[0],r=t[1];t[2],t[3];var s=t[4],o=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var i=t[12],A=t[13];return t[14],t[15],t.length===16?[e,r,s,o,i,A]:null},DR={matrix:kR,matrix3d:ER},z1={type:16,number:50,flags:fc},TR=[z1,z1],xR={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(n,t){var e=t.filter(Na);return e.length!==2?TR:[e[0],e[1]]}},SR={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},rc;(function(n){n.NORMAL="normal",n.BREAK_ALL="break-all",n.KEEP_ALL="keep-all"})(rc||(rc={}));var FR={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"break-all":return rc.BREAK_ALL;case"keep-all":return rc.KEEP_ALL;case"normal":default:return rc.NORMAL}}},LR={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(n,t){if(t.type===20)return{auto:!0,order:0};if(vl(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},g5={name:"time",parse:function(n,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},UR={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(n,t){return vl(t)?t.number:1}},IR={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},MR={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(n,t){return t.filter(Tn).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return e!==0})}},QR={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(n,t){var e=[],r=[];return t.forEach(function(s){switch(s.type){case 20:case 0:e.push(s.value);break;case 17:e.push(s.number.toString());break;case 4:r.push(e.join(" ")),e.length=0;break}}),e.length&&r.push(e.join(" ")),r.map(function(s){return s.indexOf(" ")===-1?s:"'"+s+"'"})}},NR={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},_R={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(n,t){if(vl(t))return t.number;if(Tn(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},RR={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.filter(Tn).map(function(e){return e.value})}},OR={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Wa=function(n,t){return(n&t)!==0},HR={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(n,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t}},PR={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;for(var r=[],s=t.filter(JC),o=0;o<s.length;o++){var i=s[o],A=s[o+1];if(i.type===20){var l=A&&vl(A)?A.number:1;r.push({counter:i.value,increment:l})}}return r}},VR={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return[];for(var e=[],r=t.filter(JC),s=0;s<r.length;s++){var o=r[s],i=r[s+1];if(Tn(o)&&o.value!=="none"){var A=i&&vl(i)?i.number:0;e.push({counter:o.value,reset:A})}}return e}},WR={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(n,t){return t.filter(hc).map(function(e){return g5.parse(n,e)})}},KR={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;var r=[],s=t.filter(p_);if(s.length%2!==0)return null;for(var o=0;o<s.length;o+=2){var i=s[o].value,A=s[o+1].value;r.push({open:i,close:A})}return r}},X1=function(n,t,e){if(!n)return"";var r=n[Math.min(t,n.length-1)];return r?e?r.open:r.close:""},$R={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.length===1&&av(t[0],"none")?[]:oA(t).map(function(e){for(var r={color:255,offsetX:ds,offsetY:ds,blur:ds,spread:ds,inset:!1},s=0,o=0;o<e.length;o++){var i=e[o];av(i,"inset")?r.inset=!0:ai(i)?(s===0?r.offsetX=i:s===1?r.offsetY=i:s===2?r.blur=i:r.spread=i,s++):r.color=ti.parse(n,i)}return r})}},qR={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(n,t){var e=[0,1,2],r=[];return t.filter(Tn).forEach(function(s){switch(s.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),e.forEach(function(s){r.indexOf(s)===-1&&r.push(s)}),r}},jR={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},YR={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(n,t){return hc(t)?t.number:0}},GR=(function(){function n(t,e){var r,s;this.animationDuration=Jt(t,WR,e.animationDuration),this.backgroundClip=Jt(t,w_,e.backgroundClip),this.backgroundColor=Jt(t,y_,e.backgroundColor),this.backgroundImage=Jt(t,F_,e.backgroundImage),this.backgroundOrigin=Jt(t,L_,e.backgroundOrigin),this.backgroundPosition=Jt(t,U_,e.backgroundPosition),this.backgroundRepeat=Jt(t,I_,e.backgroundRepeat),this.backgroundSize=Jt(t,Q_,e.backgroundSize),this.borderTopColor=Jt(t,__,e.borderTopColor),this.borderRightColor=Jt(t,R_,e.borderRightColor),this.borderBottomColor=Jt(t,O_,e.borderBottomColor),this.borderLeftColor=Jt(t,H_,e.borderLeftColor),this.borderTopLeftRadius=Jt(t,P_,e.borderTopLeftRadius),this.borderTopRightRadius=Jt(t,V_,e.borderTopRightRadius),this.borderBottomRightRadius=Jt(t,W_,e.borderBottomRightRadius),this.borderBottomLeftRadius=Jt(t,K_,e.borderBottomLeftRadius),this.borderTopStyle=Jt(t,$_,e.borderTopStyle),this.borderRightStyle=Jt(t,q_,e.borderRightStyle),this.borderBottomStyle=Jt(t,j_,e.borderBottomStyle),this.borderLeftStyle=Jt(t,Y_,e.borderLeftStyle),this.borderTopWidth=Jt(t,G_,e.borderTopWidth),this.borderRightWidth=Jt(t,z_,e.borderRightWidth),this.borderBottomWidth=Jt(t,X_,e.borderBottomWidth),this.borderLeftWidth=Jt(t,J_,e.borderLeftWidth),this.boxShadow=Jt(t,$R,e.boxShadow),this.color=Jt(t,Z_,e.color),this.direction=Jt(t,eR,e.direction),this.display=Jt(t,tR,e.display),this.float=Jt(t,nR,e.cssFloat),this.fontFamily=Jt(t,QR,e.fontFamily),this.fontSize=Jt(t,NR,e.fontSize),this.fontStyle=Jt(t,OR,e.fontStyle),this.fontVariant=Jt(t,RR,e.fontVariant),this.fontWeight=Jt(t,_R,e.fontWeight),this.letterSpacing=Jt(t,aR,e.letterSpacing),this.lineBreak=Jt(t,sR,e.lineBreak),this.lineHeight=Jt(t,oR,e.lineHeight),this.listStyleImage=Jt(t,AR,e.listStyleImage),this.listStylePosition=Jt(t,iR,e.listStylePosition),this.listStyleType=Jt(t,sv,e.listStyleType),this.marginTop=Jt(t,lR,e.marginTop),this.marginRight=Jt(t,cR,e.marginRight),this.marginBottom=Jt(t,uR,e.marginBottom),this.marginLeft=Jt(t,dR,e.marginLeft),this.opacity=Jt(t,UR,e.opacity);var o=Jt(t,fR,e.overflow);this.overflowX=o[0],this.overflowY=o[o.length>1?1:0],this.overflowWrap=Jt(t,hR,e.overflowWrap),this.paddingTop=Jt(t,gR,e.paddingTop),this.paddingRight=Jt(t,pR,e.paddingRight),this.paddingBottom=Jt(t,vR,e.paddingBottom),this.paddingLeft=Jt(t,mR,e.paddingLeft),this.paintOrder=Jt(t,qR,e.paintOrder),this.position=Jt(t,yR,e.position),this.textAlign=Jt(t,wR,e.textAlign),this.textDecorationColor=Jt(t,IR,(r=e.textDecorationColor)!==null&&r!==void 0?r:e.color),this.textDecorationLine=Jt(t,MR,(s=e.textDecorationLine)!==null&&s!==void 0?s:e.textDecoration),this.textShadow=Jt(t,BR,e.textShadow),this.textTransform=Jt(t,bR,e.textTransform),this.transform=Jt(t,CR,e.transform),this.transformOrigin=Jt(t,xR,e.transformOrigin),this.visibility=Jt(t,SR,e.visibility),this.webkitTextStrokeColor=Jt(t,jR,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=Jt(t,YR,e.webkitTextStrokeWidth),this.wordBreak=Jt(t,FR,e.wordBreak),this.zIndex=Jt(t,LR,e.zIndex)}return n.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},n.prototype.isTransparent=function(){return ri(this.backgroundColor)},n.prototype.isTransformed=function(){return this.transform!==null},n.prototype.isPositioned=function(){return this.position!==0},n.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},n.prototype.isFloating=function(){return this.float!==0},n.prototype.isInlineLevel=function(){return Wa(this.display,4)||Wa(this.display,33554432)||Wa(this.display,268435456)||Wa(this.display,536870912)||Wa(this.display,67108864)||Wa(this.display,134217728)},n})(),zR=(function(){function n(t,e){this.content=Jt(t,HR,e.content),this.quotes=Jt(t,KR,e.quotes)}return n})(),J1=(function(){function n(t,e){this.counterIncrement=Jt(t,PR,e.counterIncrement),this.counterReset=Jt(t,VR,e.counterReset)}return n})(),Jt=function(n,t,e){var r=new zC,s=e!==null&&typeof e<"u"?e.toString():t.initialValue;r.write(s);var o=new XC(r.read());switch(t.type){case 2:var i=o.parseComponentValue();return t.parse(n,Tn(i)?i.value:t.initialValue);case 0:return t.parse(n,o.parseComponentValue());case 1:return t.parse(n,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return ud.parse(n,o.parseComponentValue());case"color":return ti.parse(n,o.parseComponentValue());case"image":return jv.parse(n,o.parseComponentValue());case"length":var A=o.parseComponentValue();return ai(A)?A:ds;case"length-percentage":var l=o.parseComponentValue();return Na(l)?l:ds;case"time":return g5.parse(n,o.parseComponentValue())}break}},XR="data-html2canvas-debug",JR=function(n){var t=n.getAttribute(XR);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ov=function(n,t){var e=JR(n);return e===1||t===e},AA=(function(){function n(t,e){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,ov(e,3))debugger;this.styles=new GR(t,window.getComputedStyle(e,null)),lv(e)&&(this.styles.animationDuration.some(function(r){return r>0})&&(e.style.animationDuration="0s"),this.styles.transform!==null&&(e.style.transform="none")),this.bounds=ld(this.context,e),ov(e,4)&&(this.flags|=16)}return n})(),ZR="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Z1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var wu=0;wu<Z1.length;wu++)Yl[Z1.charCodeAt(wu)]=wu;var eO=function(n){var t=n.length*.75,e=n.length,r,s=0,o,i,A,l;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var c=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),u=Array.isArray(c)?c:new Uint8Array(c);for(r=0;r<e;r+=4)o=Yl[n.charCodeAt(r)],i=Yl[n.charCodeAt(r+1)],A=Yl[n.charCodeAt(r+2)],l=Yl[n.charCodeAt(r+3)],u[s++]=o<<2|i>>4,u[s++]=(i&15)<<4|A>>2,u[s++]=(A&3)<<6|l&63;return c},tO=function(n){for(var t=n.length,e=[],r=0;r<t;r+=2)e.push(n[r+1]<<8|n[r]);return e},rO=function(n){for(var t=n.length,e=[],r=0;r<t;r+=4)e.push(n[r+3]<<24|n[r+2]<<16|n[r+1]<<8|n[r]);return e},Ti=5,Yv=11,Cf=2,nO=Yv-Ti,p5=65536>>Ti,aO=1<<Ti,kf=aO-1,sO=1024>>Ti,oO=p5+sO,AO=oO,iO=32,lO=AO+iO,cO=65536>>Yv,uO=1<<nO,dO=uO-1,ew=function(n,t,e){return n.slice?n.slice(t,e):new Uint16Array(Array.prototype.slice.call(n,t,e))},fO=function(n,t,e){return n.slice?n.slice(t,e):new Uint32Array(Array.prototype.slice.call(n,t,e))},hO=function(n,t){var e=eO(n),r=Array.isArray(e)?rO(e):new Uint32Array(e),s=Array.isArray(e)?tO(e):new Uint16Array(e),o=24,i=ew(s,o/2,r[4]/2),A=r[5]===2?ew(s,(o+r[4])/2):fO(r,Math.ceil((o+r[4])/4));return new gO(r[0],r[1],r[2],r[3],i,A)},gO=(function(){function n(t,e,r,s,o,i){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=s,this.index=o,this.data=i}return n.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>Ti],e=(e<<Cf)+(t&kf),this.data[e];if(t<=65535)return e=this.index[p5+(t-55296>>Ti)],e=(e<<Cf)+(t&kf),this.data[e];if(t<this.highStart)return e=lO-cO+(t>>Yv),e=this.index[e],e+=t>>Ti&dO,e=this.index[e],e=(e<<Cf)+(t&kf),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},n})(),tw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pO=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var yu=0;yu<tw.length;yu++)pO[tw.charCodeAt(yu)]=yu;var vO=1,Ef=2,Df=3,rw=4,nw=5,mO=7,aw=8,Tf=9,xf=10,sw=11,ow=12,Aw=13,iw=14,Sf=15,wO=function(n){for(var t=[],e=0,r=n.length;e<r;){var s=n.charCodeAt(e++);if(s>=55296&&s<=56319&&e<r){var o=n.charCodeAt(e++);(o&64512)===56320?t.push(((s&1023)<<10)+(o&1023)+65536):(t.push(s),e--)}else t.push(s)}return t},yO=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var e=n.length;if(!e)return"";for(var r=[],s=-1,o="";++s<e;){var i=n[s];i<=65535?r.push(i):(i-=65536,r.push((i>>10)+55296,i%1024+56320)),(s+1===e||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},BO=hO(ZR),po="×",Ff="÷",bO=function(n){return BO.get(n)},CO=function(n,t,e){var r=e-2,s=t[r],o=t[e-1],i=t[e];if(o===Ef&&i===Df)return po;if(o===Ef||o===Df||o===rw||i===Ef||i===Df||i===rw)return Ff;if(o===aw&&[aw,Tf,sw,ow].indexOf(i)!==-1||(o===sw||o===Tf)&&(i===Tf||i===xf)||(o===ow||o===xf)&&i===xf||i===Aw||i===nw||i===mO||o===vO)return po;if(o===Aw&&i===iw){for(;s===nw;)s=t[--r];if(s===iw)return po}if(o===Sf&&i===Sf){for(var A=0;s===Sf;)A++,s=t[--r];if(A%2===0)return po}return Ff},kO=function(n){var t=wO(n),e=t.length,r=0,s=0,o=t.map(bO);return{next:function(){if(r>=e)return{done:!0,value:null};for(var i=po;r<e&&(i=CO(t,o,++r))===po;);if(i!==po||r===e){var A=yO.apply(null,t.slice(s,r));return s=r,{value:A,done:!1}}return{done:!0,value:null}}}},EO=function(n){for(var t=kO(n),e=[],r;!(r=t.next()).done;)r.value&&e.push(r.value.slice());return e},DO=function(n){var t=123;if(n.createRange){var e=n.createRange();if(e.getBoundingClientRect){var r=n.createElement("boundtest");r.style.height=t+"px",r.style.display="block",n.body.appendChild(r),e.selectNode(r);var s=e.getBoundingClientRect(),o=Math.round(s.height);if(n.body.removeChild(r),o===t)return!0}}return!1},TO=function(n){var t=n.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",n.body.appendChild(t);var e=n.createRange();t.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var r=t.firstChild,s=cd(r.data).map(function(l){return Ca(l)}),o=0,i={},A=s.every(function(l,c){e.setStart(r,o),e.setEnd(r,o+l.length);var u=e.getBoundingClientRect();o+=l.length;var h=u.x>i.x||u.y>i.y;return i=u,c===0?!0:h});return n.body.removeChild(t),A},xO=function(){return typeof new Image().crossOrigin<"u"},SO=function(){return typeof new XMLHttpRequest().responseType=="string"},FO=function(n){var t=new Image,e=n.createElement("canvas"),r=e.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),e.toDataURL()}catch{return!1}return!0},lw=function(n){return n[0]===0&&n[1]===255&&n[2]===0&&n[3]===255},LO=function(n){var t=n.createElement("canvas"),e=100;t.width=e,t.height=e;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,e,e);var s=new Image,o=t.toDataURL();s.src=o;var i=Av(e,e,0,0,s);return r.fillStyle="red",r.fillRect(0,0,e,e),cw(i).then(function(A){r.drawImage(A,0,0);var l=r.getImageData(0,0,e,e).data;r.fillStyle="red",r.fillRect(0,0,e,e);var c=n.createElement("div");return c.style.backgroundImage="url("+o+")",c.style.height=e+"px",lw(l)?cw(Av(e,e,0,0,c)):Promise.reject(!1)}).then(function(A){return r.drawImage(A,0,0),lw(r.getImageData(0,0,e,e).data)}).catch(function(){return!1})},Av=function(n,t,e,r,s){var o="http://www.w3.org/2000/svg",i=document.createElementNS(o,"svg"),A=document.createElementNS(o,"foreignObject");return i.setAttributeNS(null,"width",n.toString()),i.setAttributeNS(null,"height",t.toString()),A.setAttributeNS(null,"width","100%"),A.setAttributeNS(null,"height","100%"),A.setAttributeNS(null,"x",e.toString()),A.setAttributeNS(null,"y",r.toString()),A.setAttributeNS(null,"externalResourcesRequired","true"),i.appendChild(A),A.appendChild(s),i},cw=function(n){return new Promise(function(t,e){var r=new Image;r.onload=function(){return t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(n))})},us={get SUPPORT_RANGE_BOUNDS(){var n=DO(document);return Object.defineProperty(us,"SUPPORT_RANGE_BOUNDS",{value:n}),n},get SUPPORT_WORD_BREAKING(){var n=us.SUPPORT_RANGE_BOUNDS&&TO(document);return Object.defineProperty(us,"SUPPORT_WORD_BREAKING",{value:n}),n},get SUPPORT_SVG_DRAWING(){var n=FO(document);return Object.defineProperty(us,"SUPPORT_SVG_DRAWING",{value:n}),n},get SUPPORT_FOREIGNOBJECT_DRAWING(){var n=typeof Array.from=="function"&&typeof window.fetch=="function"?LO(document):Promise.resolve(!1);return Object.defineProperty(us,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:n}),n},get SUPPORT_CORS_IMAGES(){var n=xO();return Object.defineProperty(us,"SUPPORT_CORS_IMAGES",{value:n}),n},get SUPPORT_RESPONSE_TYPE(){var n=SO();return Object.defineProperty(us,"SUPPORT_RESPONSE_TYPE",{value:n}),n},get SUPPORT_CORS_XHR(){var n="withCredentials"in new XMLHttpRequest;return Object.defineProperty(us,"SUPPORT_CORS_XHR",{value:n}),n},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var n=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(us,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:n}),n}},nc=(function(){function n(t,e){this.text=t,this.bounds=e}return n})(),UO=function(n,t,e,r){var s=QO(t,e),o=[],i=0;return s.forEach(function(A){if(e.textDecorationLine.length||A.trim().length>0)if(us.SUPPORT_RANGE_BOUNDS){var l=uw(r,i,A.length).getClientRects();if(l.length>1){var c=Gv(A),u=0;c.forEach(function(g){o.push(new nc(g,xA.fromDOMRectList(n,uw(r,u+i,g.length).getClientRects()))),u+=g.length})}else o.push(new nc(A,xA.fromDOMRectList(n,l)))}else{var h=r.splitText(A.length);o.push(new nc(A,IO(n,r))),r=h}else us.SUPPORT_RANGE_BOUNDS||(r=r.splitText(A.length));i+=A.length}),o},IO=function(n,t){var e=t.ownerDocument;if(e){var r=e.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var s=t.parentNode;if(s){s.replaceChild(r,t);var o=ld(n,r);return r.firstChild&&s.replaceChild(r.firstChild,r),o}}return xA.EMPTY},uw=function(n,t,e){var r=n.ownerDocument;if(!r)throw new Error("Node has no owner document");var s=r.createRange();return s.setStart(n,t),s.setEnd(n,t+e),s},Gv=function(n){if(us.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(n)).map(function(e){return e.segment})}return EO(n)},MO=function(n,t){if(us.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(n)).map(function(r){return r.segment})}return _O(n,t)},QO=function(n,t){return t.letterSpacing!==0?Gv(n):MO(n,t)},NO=[32,160,4961,65792,65793,4153,4241],_O=function(n,t){for(var e=c6(n,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),r=[],s,o=function(){if(s.value){var i=s.value.slice(),A=cd(i),l="";A.forEach(function(c){NO.indexOf(c)===-1?l+=Ca(c):(l.length&&r.push(l),r.push(Ca(c)),l="")}),l.length&&r.push(l)}};!(s=e.next()).done;)o();return r},RO=(function(){function n(t,e,r){this.text=OO(e.data,r.textTransform),this.textBounds=UO(t,this.text,r,e)}return n})(),OO=function(n,t){switch(t){case 1:return n.toLowerCase();case 3:return n.replace(HO,PO);case 2:return n.toUpperCase();default:return n}},HO=/(^|\s|:|-|\(|\))([a-z])/g,PO=function(n,t,e){return n.length>0?t+e.toUpperCase():n},v5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.src=r.currentSrc||r.src,s.intrinsicWidth=r.naturalWidth,s.intrinsicHeight=r.naturalHeight,s.context.cache.addImage(s.src),s}return t})(AA),m5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.canvas=r,s.intrinsicWidth=r.width,s.intrinsicHeight=r.height,s}return t})(AA),w5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this,o=new XMLSerializer,i=ld(e,r);return r.setAttribute("width",i.width+"px"),r.setAttribute("height",i.height+"px"),s.svg="data:image/svg+xml,"+encodeURIComponent(o.serializeToString(r)),s.intrinsicWidth=r.width.baseVal.value,s.intrinsicHeight=r.height.baseVal.value,s.context.cache.addImage(s.svg),s}return t})(AA),y5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.value=r.value,s}return t})(AA),iv=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.start=r.start,s.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,s}return t})(AA),VO=[{type:15,flags:0,unit:"px",number:3}],WO=[{type:16,flags:0,number:50}],KO=function(n){return n.width>n.height?new xA(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new xA(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n},$O=function(n){var t=n.type===qO?new Array(n.value.length+1).join("•"):n.value;return t.length===0?n.placeholder||"":t},Zu="checkbox",ed="radio",qO="password",dw=707406591,zv=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;switch(s.type=r.type.toLowerCase(),s.checked=r.checked,s.value=$O(r),(s.type===Zu||s.type===ed)&&(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=1,s.styles.backgroundClip=[0],s.styles.backgroundOrigin=[0],s.bounds=KO(s.bounds)),s.type){case Zu:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=VO;break;case ed:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=WO;break}return s}return t})(AA),B5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this,o=r.options[r.selectedIndex||0];return s.value=o&&o.text||"",s}return t})(AA),b5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.value=r.value,s}return t})(AA),C5=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;s.src=r.src,s.width=parseInt(r.width,10)||0,s.height=parseInt(r.height,10)||0,s.backgroundColor=s.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){s.tree=E5(e,r.contentWindow.document.documentElement);var o=r.contentWindow.document.documentElement?tc(e,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):DA.TRANSPARENT,i=r.contentWindow.document.body?tc(e,getComputedStyle(r.contentWindow.document.body).backgroundColor):DA.TRANSPARENT;s.backgroundColor=ri(o)?ri(i)?s.styles.backgroundColor:i:o}}catch{}return s}return t})(AA),jO=["OL","UL","MENU"],Hu=function(n,t,e,r){for(var s=t.firstChild,o=void 0;s;s=o)if(o=s.nextSibling,D5(s)&&s.data.trim().length>0)e.textNodes.push(new RO(n,s,e.styles));else if(Al(s))if(F5(s)&&s.assignedNodes)s.assignedNodes().forEach(function(A){return Hu(n,A,e,r)});else{var i=k5(n,s);i.styles.isVisible()&&(YO(s,i,r)?i.flags|=4:GO(i.styles)&&(i.flags|=2),jO.indexOf(s.tagName)!==-1&&(i.flags|=8),e.elements.push(i),s.slot,s.shadowRoot?Hu(n,s.shadowRoot,i,r):!td(s)&&!T5(s)&&!rd(s)&&Hu(n,s,i,r))}},k5=function(n,t){return cv(t)?new v5(n,t):x5(t)?new m5(n,t):T5(t)?new w5(n,t):zO(t)?new y5(n,t):XO(t)?new iv(n,t):JO(t)?new zv(n,t):rd(t)?new B5(n,t):td(t)?new b5(n,t):S5(t)?new C5(n,t):new AA(n,t)},E5=function(n,t){var e=k5(n,t);return e.flags|=4,Hu(n,t,e,e),e},YO=function(n,t,e){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Xv(n)&&e.styles.isTransparent()},GO=function(n){return n.isPositioned()||n.isFloating()},D5=function(n){return n.nodeType===Node.TEXT_NODE},Al=function(n){return n.nodeType===Node.ELEMENT_NODE},lv=function(n){return Al(n)&&typeof n.style<"u"&&!Pu(n)},Pu=function(n){return typeof n.className=="object"},zO=function(n){return n.tagName==="LI"},XO=function(n){return n.tagName==="OL"},JO=function(n){return n.tagName==="INPUT"},ZO=function(n){return n.tagName==="HTML"},T5=function(n){return n.tagName==="svg"},Xv=function(n){return n.tagName==="BODY"},x5=function(n){return n.tagName==="CANVAS"},fw=function(n){return n.tagName==="VIDEO"},cv=function(n){return n.tagName==="IMG"},S5=function(n){return n.tagName==="IFRAME"},hw=function(n){return n.tagName==="STYLE"},eH=function(n){return n.tagName==="SCRIPT"},td=function(n){return n.tagName==="TEXTAREA"},rd=function(n){return n.tagName==="SELECT"},F5=function(n){return n.tagName==="SLOT"},gw=function(n){return n.tagName.indexOf("-")>0},tH=(function(){function n(){this.counters={}}return n.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},n.prototype.getCounterValues=function(t){var e=this.counters[t];return e||[]},n.prototype.pop=function(t){var e=this;t.forEach(function(r){return e.counters[r].pop()})},n.prototype.parse=function(t){var e=this,r=t.counterIncrement,s=t.counterReset,o=!0;r!==null&&r.forEach(function(A){var l=e.counters[A.counter];l&&A.increment!==0&&(o=!1,l.length||l.push(1),l[Math.max(0,l.length-1)]+=A.increment)});var i=[];return o&&s.forEach(function(A){var l=e.counters[A.counter];i.push(A.counter),l||(l=e.counters[A.counter]=[]),l.push(A.reset)}),i},n})(),pw={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},vw={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},rH={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},nH={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Yi=function(n,t,e,r,s,o){return n<t||n>e?uc(n,s,o.length>0):r.integers.reduce(function(i,A,l){for(;n>=A;)n-=A,i+=r.values[l];return i},"")+o},L5=function(n,t,e,r){var s="";do e||n--,s=r(n)+s,n/=t;while(n*t>=t);return s},ba=function(n,t,e,r,s){var o=e-t+1;return(n<0?"-":"")+(L5(Math.abs(n),o,r,function(i){return Ca(Math.floor(i%o)+t)})+s)},fi=function(n,t,e){e===void 0&&(e=". ");var r=t.length;return L5(Math.abs(n),r,!1,function(s){return t[Math.floor(s%r)]})+e},rl=1,qA=2,jA=4,Gl=8,BA=function(n,t,e,r,s,o){if(n<-9999||n>9999)return uc(n,4,s.length>0);var i=Math.abs(n),A=s;if(i===0)return t[0]+A;for(var l=0;i>0&&l<=4;l++){var c=i%10;c===0&&Wa(o,rl)&&A!==""?A=t[c]+A:c>1||c===1&&l===0||c===1&&l===1&&Wa(o,qA)||c===1&&l===1&&Wa(o,jA)&&n>100||c===1&&l>1&&Wa(o,Gl)?A=t[c]+(l>0?e[l-1]:"")+A:c===1&&l>0&&(A=e[l-1]+A),i=Math.floor(i/10)}return(n<0?r:"")+A},mw="十百千萬",ww="拾佰仟萬",yw="マイナス",Lf="마이너스",uc=function(n,t,e){var r=e?". ":"",s=e?"、":"",o=e?", ":"",i=e?" ":"";switch(t){case 0:return"•"+i;case 1:return"◦"+i;case 2:return"◾"+i;case 5:var A=ba(n,48,57,!0,r);return A.length<4?"0"+A:A;case 4:return fi(n,"〇一二三四五六七八九",s);case 6:return Yi(n,1,3999,pw,3,r).toLowerCase();case 7:return Yi(n,1,3999,pw,3,r);case 8:return ba(n,945,969,!1,r);case 9:return ba(n,97,122,!1,r);case 10:return ba(n,65,90,!1,r);case 11:return ba(n,1632,1641,!0,r);case 12:case 49:return Yi(n,1,9999,vw,3,r);case 35:return Yi(n,1,9999,vw,3,r).toLowerCase();case 13:return ba(n,2534,2543,!0,r);case 14:case 30:return ba(n,6112,6121,!0,r);case 15:return fi(n,"子丑寅卯辰巳午未申酉戌亥",s);case 16:return fi(n,"甲乙丙丁戊己庚辛壬癸",s);case 17:case 48:return BA(n,"零一二三四五六七八九",mw,"負",s,qA|jA|Gl);case 47:return BA(n,"零壹貳參肆伍陸柒捌玖",ww,"負",s,rl|qA|jA|Gl);case 42:return BA(n,"零一二三四五六七八九",mw,"负",s,qA|jA|Gl);case 41:return BA(n,"零壹贰叁肆伍陆柒捌玖",ww,"负",s,rl|qA|jA|Gl);case 26:return BA(n,"〇一二三四五六七八九","十百千万",yw,s,0);case 25:return BA(n,"零壱弐参四伍六七八九","拾百千万",yw,s,rl|qA|jA);case 31:return BA(n,"영일이삼사오육칠팔구","십백천만",Lf,o,rl|qA|jA);case 33:return BA(n,"零一二三四五六七八九","十百千萬",Lf,o,0);case 32:return BA(n,"零壹貳參四五六七八九","拾百千",Lf,o,rl|qA|jA);case 18:return ba(n,2406,2415,!0,r);case 20:return Yi(n,1,19999,nH,3,r);case 21:return ba(n,2790,2799,!0,r);case 22:return ba(n,2662,2671,!0,r);case 22:return Yi(n,1,10999,rH,3,r);case 23:return fi(n,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return fi(n,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return ba(n,3302,3311,!0,r);case 28:return fi(n,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case 29:return fi(n,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case 34:return ba(n,3792,3801,!0,r);case 37:return ba(n,6160,6169,!0,r);case 38:return ba(n,4160,4169,!0,r);case 39:return ba(n,2918,2927,!0,r);case 40:return ba(n,1776,1785,!0,r);case 43:return ba(n,3046,3055,!0,r);case 44:return ba(n,3174,3183,!0,r);case 45:return ba(n,3664,3673,!0,r);case 46:return ba(n,3872,3881,!0,r);case 3:default:return ba(n,48,57,!0,r)}},U5="data-html2canvas-ignore",Bw=(function(){function n(t,e,r){if(this.context=t,this.options=r,this.scrolledElements=[],this.referenceElement=e,this.counters=new tH,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return n.prototype.toIFrame=function(t,e){var r=this,s=aH(t,e);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var o=t.defaultView.pageXOffset,i=t.defaultView.pageYOffset,A=s.contentWindow,l=A.document,c=AH(s).then(function(){return Ns(r,void 0,void 0,function(){var u,h;return Es(this,function(g){switch(g.label){case 0:return this.scrolledElements.forEach(uH),A&&(A.scrollTo(e.left,e.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(A.scrollY!==e.top||A.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(A.scrollX-e.left,A.scrollY-e.top,0,0))),u=this.options.onclone,h=this.clonedReferenceElement,typeof h>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:g.sent(),g.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,oH(l)]:[3,4];case 3:g.sent(),g.label=4;case 4:return typeof u=="function"?[2,Promise.resolve().then(function(){return u(l,h)}).then(function(){return s})]:[2,s]}})})});return l.open(),l.write(lH(document.doctype)+"<html></html>"),cH(this.referenceElement.ownerDocument,o,i),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),c},n.prototype.createElementClone=function(t){if(ov(t,2))debugger;if(x5(t))return this.createCanvasClone(t);if(fw(t))return this.createVideoClone(t);if(hw(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return cv(e)&&(cv(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),gw(e)?this.createCustomElementClone(e):e},n.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return Uf(t.style,e),e},n.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var r=[].slice.call(e.cssRules,0).reduce(function(o,i){return i&&typeof i.cssText=="string"?o+i.cssText:o},""),s=t.cloneNode(!1);return s.textContent=r,s}}catch(o){if(this.context.logger.error("Unable to access cssRules property",o),o.name!=="SecurityError")throw o}return t.cloneNode(!1)},n.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var r=t.ownerDocument.createElement("img");try{return r.src=t.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var s=t.cloneNode(!1);try{s.width=t.width,s.height=t.height;var o=t.getContext("2d"),i=s.getContext("2d");if(i)if(!this.options.allowTaint&&o)i.putImageData(o.getImageData(0,0,t.width,t.height),0,0);else{var A=(e=t.getContext("webgl2"))!==null&&e!==void 0?e:t.getContext("webgl");if(A){var l=A.getContextAttributes();(l==null?void 0:l.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}i.drawImage(t,0,0)}return s}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return s},n.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var r=e.getContext("2d");try{return r&&(r.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||r.getImageData(0,0,e.width,e.height)),e}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var s=t.ownerDocument.createElement("canvas");return s.width=t.offsetWidth,s.height=t.offsetHeight,s},n.prototype.appendChildNode=function(t,e,r){(!Al(e)||!eH(e)&&!e.hasAttribute(U5)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!Al(e)||!hw(e))&&t.appendChild(this.cloneNode(e,r))},n.prototype.cloneChildNodes=function(t,e,r){for(var s=this,o=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;o;o=o.nextSibling)if(Al(o)&&F5(o)&&typeof o.assignedNodes=="function"){var i=o.assignedNodes();i.length&&i.forEach(function(A){return s.appendChildNode(e,A,r)})}else this.appendChildNode(e,o,r)},n.prototype.cloneNode=function(t,e){if(D5(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var r=t.ownerDocument.defaultView;if(r&&Al(t)&&(lv(t)||Pu(t))){var s=this.createElementClone(t);s.style.transitionProperty="none";var o=r.getComputedStyle(t),i=r.getComputedStyle(t,":before"),A=r.getComputedStyle(t,":after");this.referenceElement===t&&lv(s)&&(this.clonedReferenceElement=s),Xv(s)&&hH(s);var l=this.counters.parse(new J1(this.context,o)),c=this.resolvePseudoContent(t,s,i,ac.BEFORE);gw(t)&&(e=!0),fw(t)||this.cloneChildNodes(t,s,e),c&&s.insertBefore(c,s.firstChild);var u=this.resolvePseudoContent(t,s,A,ac.AFTER);return u&&s.appendChild(u),this.counters.pop(l),(o&&(this.options.copyStyles||Pu(t))&&!S5(t)||e)&&Uf(o,s),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([s,t.scrollLeft,t.scrollTop]),(td(t)||rd(t))&&(td(s)||rd(s))&&(s.value=t.value),s}return t.cloneNode(!1)},n.prototype.resolvePseudoContent=function(t,e,r,s){var o=this;if(r){var i=r.content,A=e.ownerDocument;if(!(!A||!i||i==="none"||i==="-moz-alt-content"||r.display==="none")){this.counters.parse(new J1(this.context,r));var l=new zR(this.context,r),c=A.createElement("html2canvaspseudoelement");Uf(r,c),l.content.forEach(function(h){if(h.type===0)c.appendChild(A.createTextNode(h.value));else if(h.type===22){var g=A.createElement("img");g.src=h.value,g.style.opacity="1",c.appendChild(g)}else if(h.type===18){if(h.name==="attr"){var d=h.values.filter(Tn);d.length&&c.appendChild(A.createTextNode(t.getAttribute(d[0].value)||""))}else if(h.name==="counter"){var m=h.values.filter(gl),y=m[0],B=m[1];if(y&&Tn(y)){var w=o.counters.getCounterValue(y.value),E=B&&Tn(B)?sv.parse(o.context,B.value):3;c.appendChild(A.createTextNode(uc(w,E,!1)))}}else if(h.name==="counters"){var x=h.values.filter(gl),y=x[0],b=x[1],B=x[2];if(y&&Tn(y)){var H=o.counters.getCounterValues(y.value),$=B&&Tn(B)?sv.parse(o.context,B.value):3,Y=b&&b.type===0?b.value:"",V=H.map(function(D){return uc(D,$,!1)}).join(Y);c.appendChild(A.createTextNode(V))}}}else if(h.type===20)switch(h.value){case"open-quote":c.appendChild(A.createTextNode(X1(l.quotes,o.quoteDepth++,!0)));break;case"close-quote":c.appendChild(A.createTextNode(X1(l.quotes,--o.quoteDepth,!1)));break;default:c.appendChild(A.createTextNode(h.value))}}),c.className=uv+" "+dv;var u=s===ac.BEFORE?" "+uv:" "+dv;return Pu(e)?e.className.baseValue+=u:e.className+=u,c}}},n.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},n})(),ac;(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"})(ac||(ac={}));var aH=function(n,t){var e=n.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=t.width.toString(),e.height=t.height.toString(),e.scrolling="no",e.setAttribute(U5,"true"),n.body.appendChild(e),e},sH=function(n){return new Promise(function(t){if(n.complete){t();return}if(!n.src){t();return}n.onload=t,n.onerror=t})},oH=function(n){return Promise.all([].slice.call(n.images,0).map(sH))},AH=function(n){return new Promise(function(t,e){var r=n.contentWindow;if(!r)return e("No window assigned for iframe");var s=r.document;r.onload=n.onload=function(){r.onload=n.onload=null;var o=setInterval(function(){s.body.childNodes.length>0&&s.readyState==="complete"&&(clearInterval(o),t(n))},50)}})},iH=["all","d","content"],Uf=function(n,t){for(var e=n.length-1;e>=0;e--){var r=n.item(e);iH.indexOf(r)===-1&&t.style.setProperty(r,n.getPropertyValue(r))}return t},lH=function(n){var t="";return n&&(t+="<!DOCTYPE ",n.name&&(t+=n.name),n.internalSubset&&(t+=n.internalSubset),n.publicId&&(t+='"'+n.publicId+'"'),n.systemId&&(t+='"'+n.systemId+'"'),t+=">"),t},cH=function(n,t,e){n&&n.defaultView&&(t!==n.defaultView.pageXOffset||e!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(t,e)},uH=function(n){var t=n[0],e=n[1],r=n[2];t.scrollLeft=e,t.scrollTop=r},dH=":before",fH=":after",uv="___html2canvas___pseudoelement_before",dv="___html2canvas___pseudoelement_after",bw=`{
content: "" !important;
display: none !important;
}`,hH=function(n){gH(n,"."+uv+dH+bw+`
.`+dv+fH+bw)},gH=function(n,t){var e=n.ownerDocument;if(e){var r=e.createElement("style");r.textContent=t,n.appendChild(r)}},I5=(function(){function n(){}return n.getOrigin=function(t){var e=n._link;return e?(e.href=t,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},n.isSameOrigin=function(t){return n.getOrigin(t)===n._origin},n.setContext=function(t){n._link=t.document.createElement("a"),n._origin=n.getOrigin(t.location.href)},n._origin="about:blank",n})(),pH=(function(){function n(t,e){this.context=t,this._options=e,this._cache={}}return n.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)||(Mf(t)||yH(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),e},n.prototype.match=function(t){return this._cache[t]},n.prototype.loadImage=function(t){return Ns(this,void 0,void 0,function(){var e,r,s,o,i=this;return Es(this,function(A){switch(A.label){case 0:return e=I5.isSameOrigin(t),r=!If(t)&&this._options.useCORS===!0&&us.SUPPORT_CORS_IMAGES&&!e,s=!If(t)&&!e&&!Mf(t)&&typeof this._options.proxy=="string"&&us.SUPPORT_CORS_XHR&&!r,!e&&this._options.allowTaint===!1&&!If(t)&&!Mf(t)&&!s&&!r?[2]:(o=t,s?[4,this.proxy(o)]:[3,2]);case 1:o=A.sent(),A.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(l,c){var u=new Image;u.onload=function(){return l(u)},u.onerror=c,(BH(o)||r)&&(u.crossOrigin="anonymous"),u.src=o,u.complete===!0&&setTimeout(function(){return l(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,A.sent()]}})})},n.prototype.has=function(t){return typeof this._cache[t]<"u"},n.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},n.prototype.proxy=function(t){var e=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var s=t.substring(0,256);return new Promise(function(o,i){var A=us.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(A==="text")o(l.response);else{var h=new FileReader;h.addEventListener("load",function(){return o(h.result)},!1),h.addEventListener("error",function(g){return i(g)},!1),h.readAsDataURL(l.response)}else i("Failed to proxy resource "+s+" with status code "+l.status)},l.onerror=i;var c=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+c+"url="+encodeURIComponent(t)+"&responseType="+A),A!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=A),e._options.imageTimeout){var u=e._options.imageTimeout;l.timeout=u,l.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+s)}}l.send()})},n})(),vH=/^data:image\/svg\+xml/i,mH=/^data:image\/.*;base64,/i,wH=/^data:image\/.*/i,yH=function(n){return us.SUPPORT_SVG_DRAWING||!bH(n)},If=function(n){return wH.test(n)},BH=function(n){return mH.test(n)},Mf=function(n){return n.substr(0,4)==="blob"},bH=function(n){return n.substr(-3).toLowerCase()==="svg"||vH.test(n)},Gt=(function(){function n(t,e){this.type=0,this.x=t,this.y=e}return n.prototype.add=function(t,e){return new n(this.x+t,this.y+e)},n})(),Gi=function(n,t,e){return new Gt(n.x+(t.x-n.x)*e,n.y+(t.y-n.y)*e)},Bu=(function(){function n(t,e,r,s){this.type=1,this.start=t,this.startControl=e,this.endControl=r,this.end=s}return n.prototype.subdivide=function(t,e){var r=Gi(this.start,this.startControl,t),s=Gi(this.startControl,this.endControl,t),o=Gi(this.endControl,this.end,t),i=Gi(r,s,t),A=Gi(s,o,t),l=Gi(i,A,t);return e?new n(this.start,r,i,l):new n(l,A,o,this.end)},n.prototype.add=function(t,e){return new n(this.start.add(t,e),this.startControl.add(t,e),this.endControl.add(t,e),this.end.add(t,e))},n.prototype.reverse=function(){return new n(this.end,this.endControl,this.startControl,this.start)},n})(),mo=function(n){return n.type===1},CH=(function(){function n(t){var e=t.styles,r=t.bounds,s=jl(e.borderTopLeftRadius,r.width,r.height),o=s[0],i=s[1],A=jl(e.borderTopRightRadius,r.width,r.height),l=A[0],c=A[1],u=jl(e.borderBottomRightRadius,r.width,r.height),h=u[0],g=u[1],d=jl(e.borderBottomLeftRadius,r.width,r.height),m=d[0],y=d[1],B=[];B.push((o+l)/r.width),B.push((m+h)/r.width),B.push((i+y)/r.height),B.push((c+g)/r.height);var w=Math.max.apply(Math,B);w>1&&(o/=w,i/=w,l/=w,c/=w,h/=w,g/=w,m/=w,y/=w);var E=r.width-l,x=r.height-g,b=r.width-h,H=r.height-y,$=e.borderTopWidth,Y=e.borderRightWidth,V=e.borderBottomWidth,L=e.borderLeftWidth,j=_n(e.paddingTop,t.bounds.width),D=_n(e.paddingRight,t.bounds.width),S=_n(e.paddingBottom,t.bounds.width),Q=_n(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=o>0||i>0?jn(r.left+L/3,r.top+$/3,o-L/3,i-$/3,vn.TOP_LEFT):new Gt(r.left+L/3,r.top+$/3),this.topRightBorderDoubleOuterBox=o>0||i>0?jn(r.left+E,r.top+$/3,l-Y/3,c-$/3,vn.TOP_RIGHT):new Gt(r.left+r.width-Y/3,r.top+$/3),this.bottomRightBorderDoubleOuterBox=h>0||g>0?jn(r.left+b,r.top+x,h-Y/3,g-V/3,vn.BOTTOM_RIGHT):new Gt(r.left+r.width-Y/3,r.top+r.height-V/3),this.bottomLeftBorderDoubleOuterBox=m>0||y>0?jn(r.left+L/3,r.top+H,m-L/3,y-V/3,vn.BOTTOM_LEFT):new Gt(r.left+L/3,r.top+r.height-V/3),this.topLeftBorderDoubleInnerBox=o>0||i>0?jn(r.left+L*2/3,r.top+$*2/3,o-L*2/3,i-$*2/3,vn.TOP_LEFT):new Gt(r.left+L*2/3,r.top+$*2/3),this.topRightBorderDoubleInnerBox=o>0||i>0?jn(r.left+E,r.top+$*2/3,l-Y*2/3,c-$*2/3,vn.TOP_RIGHT):new Gt(r.left+r.width-Y*2/3,r.top+$*2/3),this.bottomRightBorderDoubleInnerBox=h>0||g>0?jn(r.left+b,r.top+x,h-Y*2/3,g-V*2/3,vn.BOTTOM_RIGHT):new Gt(r.left+r.width-Y*2/3,r.top+r.height-V*2/3),this.bottomLeftBorderDoubleInnerBox=m>0||y>0?jn(r.left+L*2/3,r.top+H,m-L*2/3,y-V*2/3,vn.BOTTOM_LEFT):new Gt(r.left+L*2/3,r.top+r.height-V*2/3),this.topLeftBorderStroke=o>0||i>0?jn(r.left+L/2,r.top+$/2,o-L/2,i-$/2,vn.TOP_LEFT):new Gt(r.left+L/2,r.top+$/2),this.topRightBorderStroke=o>0||i>0?jn(r.left+E,r.top+$/2,l-Y/2,c-$/2,vn.TOP_RIGHT):new Gt(r.left+r.width-Y/2,r.top+$/2),this.bottomRightBorderStroke=h>0||g>0?jn(r.left+b,r.top+x,h-Y/2,g-V/2,vn.BOTTOM_RIGHT):new Gt(r.left+r.width-Y/2,r.top+r.height-V/2),this.bottomLeftBorderStroke=m>0||y>0?jn(r.left+L/2,r.top+H,m-L/2,y-V/2,vn.BOTTOM_LEFT):new Gt(r.left+L/2,r.top+r.height-V/2),this.topLeftBorderBox=o>0||i>0?jn(r.left,r.top,o,i,vn.TOP_LEFT):new Gt(r.left,r.top),this.topRightBorderBox=l>0||c>0?jn(r.left+E,r.top,l,c,vn.TOP_RIGHT):new Gt(r.left+r.width,r.top),this.bottomRightBorderBox=h>0||g>0?jn(r.left+b,r.top+x,h,g,vn.BOTTOM_RIGHT):new Gt(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=m>0||y>0?jn(r.left,r.top+H,m,y,vn.BOTTOM_LEFT):new Gt(r.left,r.top+r.height),this.topLeftPaddingBox=o>0||i>0?jn(r.left+L,r.top+$,Math.max(0,o-L),Math.max(0,i-$),vn.TOP_LEFT):new Gt(r.left+L,r.top+$),this.topRightPaddingBox=l>0||c>0?jn(r.left+Math.min(E,r.width-Y),r.top+$,E>r.width+Y?0:Math.max(0,l-Y),Math.max(0,c-$),vn.TOP_RIGHT):new Gt(r.left+r.width-Y,r.top+$),this.bottomRightPaddingBox=h>0||g>0?jn(r.left+Math.min(b,r.width-L),r.top+Math.min(x,r.height-V),Math.max(0,h-Y),Math.max(0,g-V),vn.BOTTOM_RIGHT):new Gt(r.left+r.width-Y,r.top+r.height-V),this.bottomLeftPaddingBox=m>0||y>0?jn(r.left+L,r.top+Math.min(H,r.height-V),Math.max(0,m-L),Math.max(0,y-V),vn.BOTTOM_LEFT):new Gt(r.left+L,r.top+r.height-V),this.topLeftContentBox=o>0||i>0?jn(r.left+L+Q,r.top+$+j,Math.max(0,o-(L+Q)),Math.max(0,i-($+j)),vn.TOP_LEFT):new Gt(r.left+L+Q,r.top+$+j),this.topRightContentBox=l>0||c>0?jn(r.left+Math.min(E,r.width+L+Q),r.top+$+j,E>r.width+L+Q?0:l-L+Q,c-($+j),vn.TOP_RIGHT):new Gt(r.left+r.width-(Y+D),r.top+$+j),this.bottomRightContentBox=h>0||g>0?jn(r.left+Math.min(b,r.width-(L+Q)),r.top+Math.min(x,r.height+$+j),Math.max(0,h-(Y+D)),g-(V+S),vn.BOTTOM_RIGHT):new Gt(r.left+r.width-(Y+D),r.top+r.height-(V+S)),this.bottomLeftContentBox=m>0||y>0?jn(r.left+L+Q,r.top+H,Math.max(0,m-(L+Q)),y-(V+S),vn.BOTTOM_LEFT):new Gt(r.left+L+Q,r.top+r.height-(V+S))}return n})(),vn;(function(n){n[n.TOP_LEFT=0]="TOP_LEFT",n[n.TOP_RIGHT=1]="TOP_RIGHT",n[n.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",n[n.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(vn||(vn={}));var jn=function(n,t,e,r,s){var o=4*((Math.sqrt(2)-1)/3),i=e*o,A=r*o,l=n+e,c=t+r;switch(s){case vn.TOP_LEFT:return new Bu(new Gt(n,c),new Gt(n,c-A),new Gt(l-i,t),new Gt(l,t));case vn.TOP_RIGHT:return new Bu(new Gt(n,t),new Gt(n+i,t),new Gt(l,c-A),new Gt(l,c));case vn.BOTTOM_RIGHT:return new Bu(new Gt(l,t),new Gt(l,t+A),new Gt(n+i,c),new Gt(n,c));case vn.BOTTOM_LEFT:default:return new Bu(new Gt(l,c),new Gt(l-i,c),new Gt(n,t+A),new Gt(n,t))}},nd=function(n){return[n.topLeftBorderBox,n.topRightBorderBox,n.bottomRightBorderBox,n.bottomLeftBorderBox]},kH=function(n){return[n.topLeftContentBox,n.topRightContentBox,n.bottomRightContentBox,n.bottomLeftContentBox]},ad=function(n){return[n.topLeftPaddingBox,n.topRightPaddingBox,n.bottomRightPaddingBox,n.bottomLeftPaddingBox]},EH=(function(){function n(t,e,r){this.offsetX=t,this.offsetY=e,this.matrix=r,this.type=0,this.target=6}return n})(),bu=(function(){function n(t,e){this.path=t,this.target=e,this.type=1}return n})(),DH=(function(){function n(t){this.opacity=t,this.type=2,this.target=6}return n})(),TH=function(n){return n.type===0},M5=function(n){return n.type===1},xH=function(n){return n.type===2},Cw=function(n,t){return n.length===t.length?n.some(function(e,r){return e===t[r]}):!1},SH=function(n,t,e,r,s){return n.map(function(o,i){switch(i){case 0:return o.add(t,e);case 1:return o.add(t+r,e);case 2:return o.add(t+r,e+s);case 3:return o.add(t,e+s)}return o})},Q5=(function(){function n(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return n})(),N5=(function(){function n(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new CH(this.container),this.container.styles.opacity<1&&this.effects.push(new DH(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,s=this.container.bounds.top+this.container.styles.transformOrigin[1].number,o=this.container.styles.transform;this.effects.push(new EH(r,s,o))}if(this.container.styles.overflowX!==0){var i=nd(this.curves),A=ad(this.curves);Cw(i,A)?this.effects.push(new bu(i,6)):(this.effects.push(new bu(i,2)),this.effects.push(new bu(A,4)))}}return n.prototype.getEffects=function(t){for(var e=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,s=this.effects.slice(0);r;){var o=r.effects.filter(function(l){return!M5(l)});if(e||r.container.styles.position!==0||!r.parent){if(s.unshift.apply(s,o),e=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=nd(r.curves),A=ad(r.curves);Cw(i,A)||s.unshift(new bu(A,6))}}else s.unshift.apply(s,o);r=r.parent}return s.filter(function(l){return Wa(l.target,t)})},n})(),fv=function(n,t,e,r){n.container.elements.forEach(function(s){var o=Wa(s.flags,4),i=Wa(s.flags,2),A=new N5(s,n);Wa(s.styles.display,2048)&&r.push(A);var l=Wa(s.flags,8)?[]:r;if(o||i){var c=o||s.styles.isPositioned()?e:t,u=new Q5(A);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var h=s.styles.zIndex.order;if(h<0){var g=0;c.negativeZIndex.some(function(m,y){return h>m.element.container.styles.zIndex.order?(g=y,!1):g>0}),c.negativeZIndex.splice(g,0,u)}else if(h>0){var d=0;c.positiveZIndex.some(function(m,y){return h>=m.element.container.styles.zIndex.order?(d=y+1,!1):d>0}),c.positiveZIndex.splice(d,0,u)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else s.styles.isFloating()?c.nonPositionedFloats.push(u):c.nonPositionedInlineLevel.push(u);fv(A,u,o?u:e,l)}else s.styles.isInlineLevel()?t.inlineLevel.push(A):t.nonInlineLevel.push(A),fv(A,t,e,l);Wa(s.flags,8)&&_5(s,l)})},_5=function(n,t){for(var e=n instanceof iv?n.start:1,r=n instanceof iv?n.reversed:!1,s=0;s<t.length;s++){var o=t[s];o.container instanceof y5&&typeof o.container.value=="number"&&o.container.value!==0&&(e=o.container.value),o.listValue=uc(e,o.container.styles.listStyleType,!0),e+=r?-1:1}},FH=function(n){var t=new N5(n,null),e=new Q5(t),r=[];return fv(t,e,e,r),_5(t.container,r),e},kw=function(n,t){switch(t){case 0:return yo(n.topLeftBorderBox,n.topLeftPaddingBox,n.topRightBorderBox,n.topRightPaddingBox);case 1:return yo(n.topRightBorderBox,n.topRightPaddingBox,n.bottomRightBorderBox,n.bottomRightPaddingBox);case 2:return yo(n.bottomRightBorderBox,n.bottomRightPaddingBox,n.bottomLeftBorderBox,n.bottomLeftPaddingBox);case 3:default:return yo(n.bottomLeftBorderBox,n.bottomLeftPaddingBox,n.topLeftBorderBox,n.topLeftPaddingBox)}},LH=function(n,t){switch(t){case 0:return yo(n.topLeftBorderBox,n.topLeftBorderDoubleOuterBox,n.topRightBorderBox,n.topRightBorderDoubleOuterBox);case 1:return yo(n.topRightBorderBox,n.topRightBorderDoubleOuterBox,n.bottomRightBorderBox,n.bottomRightBorderDoubleOuterBox);case 2:return yo(n.bottomRightBorderBox,n.bottomRightBorderDoubleOuterBox,n.bottomLeftBorderBox,n.bottomLeftBorderDoubleOuterBox);case 3:default:return yo(n.bottomLeftBorderBox,n.bottomLeftBorderDoubleOuterBox,n.topLeftBorderBox,n.topLeftBorderDoubleOuterBox)}},UH=function(n,t){switch(t){case 0:return yo(n.topLeftBorderDoubleInnerBox,n.topLeftPaddingBox,n.topRightBorderDoubleInnerBox,n.topRightPaddingBox);case 1:return yo(n.topRightBorderDoubleInnerBox,n.topRightPaddingBox,n.bottomRightBorderDoubleInnerBox,n.bottomRightPaddingBox);case 2:return yo(n.bottomRightBorderDoubleInnerBox,n.bottomRightPaddingBox,n.bottomLeftBorderDoubleInnerBox,n.bottomLeftPaddingBox);case 3:default:return yo(n.bottomLeftBorderDoubleInnerBox,n.bottomLeftPaddingBox,n.topLeftBorderDoubleInnerBox,n.topLeftPaddingBox)}},IH=function(n,t){switch(t){case 0:return Cu(n.topLeftBorderStroke,n.topRightBorderStroke);case 1:return Cu(n.topRightBorderStroke,n.bottomRightBorderStroke);case 2:return Cu(n.bottomRightBorderStroke,n.bottomLeftBorderStroke);case 3:default:return Cu(n.bottomLeftBorderStroke,n.topLeftBorderStroke)}},Cu=function(n,t){var e=[];return mo(n)?e.push(n.subdivide(.5,!1)):e.push(n),mo(t)?e.push(t.subdivide(.5,!0)):e.push(t),e},yo=function(n,t,e,r){var s=[];return mo(n)?s.push(n.subdivide(.5,!1)):s.push(n),mo(e)?s.push(e.subdivide(.5,!0)):s.push(e),mo(r)?s.push(r.subdivide(.5,!0).reverse()):s.push(r),mo(t)?s.push(t.subdivide(.5,!1).reverse()):s.push(t),s},R5=function(n){var t=n.bounds,e=n.styles;return t.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},sd=function(n){var t=n.styles,e=n.bounds,r=_n(t.paddingLeft,e.width),s=_n(t.paddingRight,e.width),o=_n(t.paddingTop,e.width),i=_n(t.paddingBottom,e.width);return e.add(r+t.borderLeftWidth,o+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+s),-(t.borderTopWidth+t.borderBottomWidth+o+i))},MH=function(n,t){return n===0?t.bounds:n===2?sd(t):R5(t)},QH=function(n,t){return n===0?t.bounds:n===2?sd(t):R5(t)},Qf=function(n,t,e){var r=MH(nl(n.styles.backgroundOrigin,t),n),s=QH(nl(n.styles.backgroundClip,t),n),o=NH(nl(n.styles.backgroundSize,t),e,r),i=o[0],A=o[1],l=jl(nl(n.styles.backgroundPosition,t),r.width-i,r.height-A),c=_H(nl(n.styles.backgroundRepeat,t),l,o,r,s),u=Math.round(r.left+l[0]),h=Math.round(r.top+l[1]);return[c,u,h,i,A]},zi=function(n){return Tn(n)&&n.value===fl.AUTO},ku=function(n){return typeof n=="number"},NH=function(n,t,e){var r=t[0],s=t[1],o=t[2],i=n[0],A=n[1];if(!i)return[0,0];if(Na(i)&&A&&Na(A))return[_n(i,e.width),_n(A,e.height)];var l=ku(o);if(Tn(i)&&(i.value===fl.CONTAIN||i.value===fl.COVER)){if(ku(o)){var c=e.width/e.height;return c<o!=(i.value===fl.COVER)?[e.width,e.width/o]:[e.height*o,e.height]}return[e.width,e.height]}var u=ku(r),h=ku(s),g=u||h;if(zi(i)&&(!A||zi(A))){if(u&&h)return[r,s];if(!l&&!g)return[e.width,e.height];if(g&&l){var d=u?r:s*o,m=h?s:r/o;return[d,m]}var y=u?r:e.width,B=h?s:e.height;return[y,B]}if(l){var w=0,E=0;return Na(i)?w=_n(i,e.width):Na(A)&&(E=_n(A,e.height)),zi(i)?w=E*o:(!A||zi(A))&&(E=w/o),[w,E]}var x=null,b=null;if(Na(i)?x=_n(i,e.width):A&&Na(A)&&(b=_n(A,e.height)),x!==null&&(!A||zi(A))&&(b=u&&h?x/r*s:e.height),b!==null&&zi(i)&&(x=u&&h?b/s*r:e.width),x!==null&&b!==null)return[x,b];throw new Error("Unable to calculate background-size for element")},nl=function(n,t){var e=n[t];return typeof e>"u"?n[0]:e},_H=function(n,t,e,r,s){var o=t[0],i=t[1],A=e[0],l=e[1];switch(n){case 2:return[new Gt(Math.round(r.left),Math.round(r.top+i)),new Gt(Math.round(r.left+r.width),Math.round(r.top+i)),new Gt(Math.round(r.left+r.width),Math.round(l+r.top+i)),new Gt(Math.round(r.left),Math.round(l+r.top+i))];case 3:return[new Gt(Math.round(r.left+o),Math.round(r.top)),new Gt(Math.round(r.left+o+A),Math.round(r.top)),new Gt(Math.round(r.left+o+A),Math.round(r.height+r.top)),new Gt(Math.round(r.left+o),Math.round(r.height+r.top))];case 1:return[new Gt(Math.round(r.left+o),Math.round(r.top+i)),new Gt(Math.round(r.left+o+A),Math.round(r.top+i)),new Gt(Math.round(r.left+o+A),Math.round(r.top+i+l)),new Gt(Math.round(r.left+o),Math.round(r.top+i+l))];default:return[new Gt(Math.round(s.left),Math.round(s.top)),new Gt(Math.round(s.left+s.width),Math.round(s.top)),new Gt(Math.round(s.left+s.width),Math.round(s.height+s.top)),new Gt(Math.round(s.left),Math.round(s.height+s.top))]}},RH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ew="Hidden Text",OH=(function(){function n(t){this._data={},this._document=t}return n.prototype.parseMetrics=function(t,e){var r=this._document.createElement("div"),s=this._document.createElement("img"),o=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=e,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),s.src=RH,s.width=1,s.height=1,s.style.margin="0",s.style.padding="0",s.style.verticalAlign="baseline",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin="0",o.style.padding="0",o.appendChild(this._document.createTextNode(Ew)),r.appendChild(o),r.appendChild(s);var A=s.offsetTop-o.offsetTop+2;r.removeChild(o),r.appendChild(this._document.createTextNode(Ew)),r.style.lineHeight="normal",s.style.verticalAlign="super";var l=s.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:A,middle:l}},n.prototype.getMetrics=function(t,e){var r=t+" "+e;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,e)),this._data[r]},n})(),O5=(function(){function n(t,e){this.context=t,this.options=e}return n})(),HH=1e4,PH=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s._activeEffects=[],s.canvas=r.canvas?r.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),r.canvas||(s.canvas.width=Math.floor(r.width*r.scale),s.canvas.height=Math.floor(r.height*r.scale),s.canvas.style.width=r.width+"px",s.canvas.style.height=r.height+"px"),s.fontMetrics=new OH(document),s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-r.x,-r.y),s.ctx.textBaseline="bottom",s._activeEffects=[],s.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),s}return t.prototype.applyEffects=function(e){for(var r=this;this._activeEffects.length;)this.popEffect();e.forEach(function(s){return r.applyEffect(s)})},t.prototype.applyEffect=function(e){this.ctx.save(),xH(e)&&(this.ctx.globalAlpha=e.opacity),TH(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),M5(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return Ns(this,void 0,void 0,function(){var r;return Es(this,function(s){switch(s.label){case 0:return r=e.element.container.styles,r.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return Ns(this,void 0,void 0,function(){return Es(this,function(r){switch(r.label){case 0:if(Wa(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(e)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,r,s){var o=this;if(r===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+s);else{var i=Gv(e.text);i.reduce(function(A,l){return o.ctx.fillText(l,A,e.bounds.top+s),A+o.ctx.measureText(l).width},e.bounds.left)}},t.prototype.createFontStyle=function(e){var r=e.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),s=qH(e.fontFamily).join(", "),o=hc(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,r,e.fontWeight,o,s].join(" "),s,o]},t.prototype.renderTextNode=function(e,r){return Ns(this,void 0,void 0,function(){var s,o,i,A,l,c,u,h,g=this;return Es(this,function(d){return s=this.createFontStyle(r),o=s[0],i=s[1],A=s[2],this.ctx.font=o,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(i,A),c=l.baseline,u=l.middle,h=r.paintOrder,e.textBounds.forEach(function(m){h.forEach(function(y){switch(y){case 0:g.ctx.fillStyle=Ja(r.color),g.renderTextWithLetterSpacing(m,r.letterSpacing,c);var B=r.textShadow;B.length&&m.text.trim().length&&(B.slice(0).reverse().forEach(function(w){g.ctx.shadowColor=Ja(w.color),g.ctx.shadowOffsetX=w.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=w.offsetY.number*g.options.scale,g.ctx.shadowBlur=w.blur.number,g.renderTextWithLetterSpacing(m,r.letterSpacing,c)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=Ja(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:g.ctx.fillRect(m.bounds.left,Math.round(m.bounds.top+c),m.bounds.width,1);break;case 2:g.ctx.fillRect(m.bounds.left,Math.round(m.bounds.top),m.bounds.width,1);break;case 3:g.ctx.fillRect(m.bounds.left,Math.ceil(m.bounds.top+u),m.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&m.text.trim().length&&(g.ctx.strokeStyle=Ja(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(m.text,m.bounds.left,m.bounds.top+c)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(e,r,s){if(s&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var o=sd(e),i=ad(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,e.intrinsicWidth,e.intrinsicHeight,o.left,o.top,o.width,o.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return Ns(this,void 0,void 0,function(){var r,s,o,i,A,l,E,E,c,u,h,g,b,d,m,H,y,B,w,E,x,b,H;return Es(this,function($){switch($.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,s=e.curves,o=r.styles,i=0,A=r.textNodes,$.label=1;case 1:return i<A.length?(l=A[i],[4,this.renderTextNode(l,o)]):[3,4];case 2:$.sent(),$.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof v5))return[3,8];$.label=5;case 5:return $.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return E=$.sent(),this.renderReplacedElement(r,s,E),[3,8];case 7:return $.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof m5&&this.renderReplacedElement(r,s,r.canvas),!(r instanceof w5))return[3,12];$.label=9;case 9:return $.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return E=$.sent(),this.renderReplacedElement(r,s,E),[3,12];case 11:return $.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof C5&&r.tree?(c=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,c.render(r.tree)]):[3,14];case 13:u=$.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),$.label=14;case 14:if(r instanceof zv&&(h=Math.min(r.bounds.width,r.bounds.height),r.type===Zu?r.checked&&(this.ctx.save(),this.path([new Gt(r.bounds.left+h*.39363,r.bounds.top+h*.79),new Gt(r.bounds.left+h*.16,r.bounds.top+h*.5549),new Gt(r.bounds.left+h*.27347,r.bounds.top+h*.44071),new Gt(r.bounds.left+h*.39694,r.bounds.top+h*.5649),new Gt(r.bounds.left+h*.72983,r.bounds.top+h*.23),new Gt(r.bounds.left+h*.84,r.bounds.top+h*.34085),new Gt(r.bounds.left+h*.39363,r.bounds.top+h*.79)]),this.ctx.fillStyle=Ja(dw),this.ctx.fill(),this.ctx.restore()):r.type===ed&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+h/2,r.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=Ja(dw),this.ctx.fill(),this.ctx.restore())),VH(r)&&r.value.length){switch(g=this.createFontStyle(o),b=g[0],d=g[1],m=this.fontMetrics.getMetrics(b,d).baseline,this.ctx.font=b,this.ctx.fillStyle=Ja(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=KH(r.styles.textAlign),H=sd(r),y=0,r.styles.textAlign){case 1:y+=H.width/2;break;case 2:y+=H.width;break}B=H.add(y,0,0,-H.height/2+1),this.ctx.save(),this.path([new Gt(H.left,H.top),new Gt(H.left+H.width,H.top),new Gt(H.left+H.width,H.top+H.height),new Gt(H.left,H.top+H.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new nc(r.value,B),o.letterSpacing,m),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Wa(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];E=void 0,x=w.url,$.label=15;case 15:return $.trys.push([15,17,,18]),[4,this.context.cache.match(x)];case 16:return E=$.sent(),this.ctx.drawImage(E,r.bounds.left-(E.width+10),r.bounds.top),[3,18];case 17:return $.sent(),this.context.logger.error("Error loading list-style-image "+x),[3,18];case 18:return[3,20];case 19:e.listValue&&r.styles.listStyleType!==-1&&(b=this.createFontStyle(o)[0],this.ctx.font=b,this.ctx.fillStyle=Ja(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",H=new xA(r.bounds.left,r.bounds.top+_n(r.styles.paddingTop,r.bounds.width),r.bounds.width,G1(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new nc(e.listValue,H),o.letterSpacing,G1(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),$.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return Ns(this,void 0,void 0,function(){var r,s,w,o,i,w,A,l,w,c,u,w,h,g,w,d,m,w,y,B,w;return Es(this,function(E){switch(E.label){case 0:if(Wa(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:E.sent(),r=0,s=e.negativeZIndex,E.label=2;case 2:return r<s.length?(w=s[r],[4,this.renderStack(w)]):[3,5];case 3:E.sent(),E.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:E.sent(),o=0,i=e.nonInlineLevel,E.label=7;case 7:return o<i.length?(w=i[o],[4,this.renderNode(w)]):[3,10];case 8:E.sent(),E.label=9;case 9:return o++,[3,7];case 10:A=0,l=e.nonPositionedFloats,E.label=11;case 11:return A<l.length?(w=l[A],[4,this.renderStack(w)]):[3,14];case 12:E.sent(),E.label=13;case 13:return A++,[3,11];case 14:c=0,u=e.nonPositionedInlineLevel,E.label=15;case 15:return c<u.length?(w=u[c],[4,this.renderStack(w)]):[3,18];case 16:E.sent(),E.label=17;case 17:return c++,[3,15];case 18:h=0,g=e.inlineLevel,E.label=19;case 19:return h<g.length?(w=g[h],[4,this.renderNode(w)]):[3,22];case 20:E.sent(),E.label=21;case 21:return h++,[3,19];case 22:d=0,m=e.zeroOrAutoZIndexOrTransformedOrOpacity,E.label=23;case 23:return d<m.length?(w=m[d],[4,this.renderStack(w)]):[3,26];case 24:E.sent(),E.label=25;case 25:return d++,[3,23];case 26:y=0,B=e.positiveZIndex,E.label=27;case 27:return y<B.length?(w=B[y],[4,this.renderStack(w)]):[3,30];case 28:E.sent(),E.label=29;case 29:return y++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var r=this;e.forEach(function(s,o){var i=mo(s)?s.start:s;o===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),mo(s)&&r.ctx.bezierCurveTo(s.startControl.x,s.startControl.y,s.endControl.x,s.endControl.y,s.end.x,s.end.y)})},t.prototype.renderRepeat=function(e,r,s,o){this.path(e),this.ctx.fillStyle=r,this.ctx.translate(s,o),this.ctx.fill(),this.ctx.translate(-s,-o)},t.prototype.resizeImage=function(e,r,s){var o;if(e.width===r&&e.height===s)return e;var i=(o=this.canvas.ownerDocument)!==null&&o!==void 0?o:document,A=i.createElement("canvas");A.width=Math.max(1,r),A.height=Math.max(1,s);var l=A.getContext("2d");return l.drawImage(e,0,0,e.width,e.height,0,0,r,s),A},t.prototype.renderBackgroundImage=function(e){return Ns(this,void 0,void 0,function(){var r,s,o,i,A,l;return Es(this,function(c){switch(c.label){case 0:r=e.styles.backgroundImage.length-1,s=function(u){var h,g,d,j,X,F,Q,T,V,m,j,X,F,Q,T,y,B,w,E,x,b,H,$,Y,V,L,j,D,S,Q,T,oe,X,F,M,R,ae,J,k,O,N,Z;return Es(this,function(se){switch(se.label){case 0:if(u.type!==0)return[3,5];h=void 0,g=u.url,se.label=1;case 1:return se.trys.push([1,3,,4]),[4,o.context.cache.match(g)];case 2:return h=se.sent(),[3,4];case 3:return se.sent(),o.context.logger.error("Error loading background-image "+g),[3,4];case 4:return h&&(d=Qf(e,r,[h.width,h.height,h.width/h.height]),j=d[0],X=d[1],F=d[2],Q=d[3],T=d[4],V=o.ctx.createPattern(o.resizeImage(h,Q,T),"repeat"),o.renderRepeat(j,V,X,F)),[3,6];case 5:T_(u)?(m=Qf(e,r,[null,null,null]),j=m[0],X=m[1],F=m[2],Q=m[3],T=m[4],y=b_(u.angle,Q,T),B=y[0],w=y[1],E=y[2],x=y[3],b=y[4],H=document.createElement("canvas"),H.width=Q,H.height=T,$=H.getContext("2d"),Y=$.createLinearGradient(w,x,E,b),j1(u.stops,B).forEach(function(ge){return Y.addColorStop(ge.stop,Ja(ge.color))}),$.fillStyle=Y,$.fillRect(0,0,Q,T),Q>0&&T>0&&(V=o.ctx.createPattern(H,"repeat"),o.renderRepeat(j,V,X,F))):x_(u)&&(L=Qf(e,r,[null,null,null]),j=L[0],D=L[1],S=L[2],Q=L[3],T=L[4],oe=u.position.length===0?[qv]:u.position,X=_n(oe[0],Q),F=_n(oe[oe.length-1],T),M=C_(u,X,F,Q,T),R=M[0],ae=M[1],R>0&&ae>0&&(J=o.ctx.createRadialGradient(D+X,S+F,0,D+X,S+F,R),j1(u.stops,R*2).forEach(function(ge){return J.addColorStop(ge.stop,Ja(ge.color))}),o.path(j),o.ctx.fillStyle=J,R!==ae?(k=e.bounds.left+.5*e.bounds.width,O=e.bounds.top+.5*e.bounds.height,N=ae/R,Z=1/N,o.ctx.save(),o.ctx.translate(k,O),o.ctx.transform(1,0,0,N,0,0),o.ctx.translate(-k,-O),o.ctx.fillRect(D,Z*(S-O)+O,Q,T*Z),o.ctx.restore()):o.ctx.fill())),se.label=6;case 6:return r--,[2]}})},o=this,i=0,A=e.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return i<A.length?(l=A[i],[5,s(l)]):[3,4];case 2:c.sent(),c.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,r,s){return Ns(this,void 0,void 0,function(){return Es(this,function(o){return this.path(kw(s,r)),this.ctx.fillStyle=Ja(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,r,s,o){return Ns(this,void 0,void 0,function(){var i,A;return Es(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(e,s,o)]:[3,2];case 1:return l.sent(),[2];case 2:return i=LH(o,s),this.path(i),this.ctx.fillStyle=Ja(e),this.ctx.fill(),A=UH(o,s),this.path(A),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return Ns(this,void 0,void 0,function(){var r,s,o,i,A,l,c,u,h=this;return Es(this,function(g){switch(g.label){case 0:return this.applyEffects(e.getEffects(2)),r=e.container.styles,s=!ri(r.backgroundColor)||r.backgroundImage.length,o=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=WH(nl(r.backgroundClip,0),e.curves),s||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),ri(r.backgroundColor)||(this.ctx.fillStyle=Ja(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(d){h.ctx.save();var m=nd(e.curves),y=d.inset?0:HH,B=SH(m,-y+(d.inset?1:-1)*d.spread.number,(d.inset?1:-1)*d.spread.number,d.spread.number*(d.inset?-2:2),d.spread.number*(d.inset?-2:2));d.inset?(h.path(m),h.ctx.clip(),h.mask(B)):(h.mask(m),h.ctx.clip(),h.path(B)),h.ctx.shadowOffsetX=d.offsetX.number+y,h.ctx.shadowOffsetY=d.offsetY.number,h.ctx.shadowColor=Ja(d.color),h.ctx.shadowBlur=d.blur.number,h.ctx.fillStyle=d.inset?Ja(d.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),g.label=2;case 2:A=0,l=0,c=o,g.label=3;case 3:return l<c.length?(u=c[l],u.style!==0&&!ri(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,A,e.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,A,e.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,A,e.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,A,e.curves)];case 10:g.sent(),g.label=11;case 11:A++,g.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,r,s,o,i){return Ns(this,void 0,void 0,function(){var A,l,c,u,h,g,d,m,y,B,w,E,x,b,H,$,H,$;return Es(this,function(Y){return this.ctx.save(),A=IH(o,s),l=kw(o,s),i===2&&(this.path(l),this.ctx.clip()),mo(l[0])?(c=l[0].start.x,u=l[0].start.y):(c=l[0].x,u=l[0].y),mo(l[1])?(h=l[1].end.x,g=l[1].end.y):(h=l[1].x,g=l[1].y),s===0||s===2?d=Math.abs(c-h):d=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(A):this.formatPath(l.slice(0,2)),m=r<3?r*3:r*2,y=r<3?r*2:r,i===3&&(m=r,y=r),B=!0,d<=m*2?B=!1:d<=m*2+y?(w=d/(2*m+y),m*=w,y*=w):(E=Math.floor((d+y)/(m+y)),x=(d-E*m)/(E-1),b=(d-(E+1)*m)/E,y=b<=0||Math.abs(y-x)<Math.abs(y-b)?x:b),B&&(i===3?this.ctx.setLineDash([0,m+y]):this.ctx.setLineDash([m,y])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Ja(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(mo(l[0])&&(H=l[3],$=l[0],this.ctx.beginPath(),this.formatPath([new Gt(H.end.x,H.end.y),new Gt($.start.x,$.start.y)]),this.ctx.stroke()),mo(l[1])&&(H=l[1],$=l[2],this.ctx.beginPath(),this.formatPath([new Gt(H.end.x,H.end.y),new Gt($.start.x,$.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return Ns(this,void 0,void 0,function(){var r;return Es(this,function(s){switch(s.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Ja(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=FH(e),[4,this.renderStack(r)];case 1:return s.sent(),this.applyEffects([]),[2,this.canvas]}})})},t})(O5),VH=function(n){return n instanceof b5||n instanceof B5?!0:n instanceof zv&&n.type!==ed&&n.type!==Zu},WH=function(n,t){switch(n){case 0:return nd(t);case 2:return kH(t);case 1:default:return ad(t)}},KH=function(n){switch(n){case 1:return"center";case 2:return"right";case 0:default:return"left"}},$H=["-apple-system","system-ui"],qH=function(n){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?n.filter(function(t){return $H.indexOf(t)===-1}):n},jH=(function(n){Vo(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.canvas=r.canvas?r.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),s.options=r,s.canvas.width=Math.floor(r.width*r.scale),s.canvas.height=Math.floor(r.height*r.scale),s.canvas.style.width=r.width+"px",s.canvas.style.height=r.height+"px",s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-r.x,-r.y),s.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),s}return t.prototype.render=function(e){return Ns(this,void 0,void 0,function(){var r,s;return Es(this,function(o){switch(o.label){case 0:return r=Av(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,YH(r)];case 1:return s=o.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Ja(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(s,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t})(O5),YH=function(n){return new Promise(function(t,e){var r=new Image;r.onload=function(){t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(n))})},GH=(function(){function n(t){var e=t.id,r=t.enabled;this.id=e,this.enabled=r,this.start=Date.now()}return n.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ru([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.prototype.getTime=function(){return Date.now()-this.start},n.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ru([this.id,this.getTime()+"ms"],t))},n.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ru([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,ru([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.instances={},n})(),zH=(function(){function n(t,e){var r;this.windowBounds=e,this.instanceName="#"+n.instanceCount++,this.logger=new GH({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new pH(this,t)}return n.instanceCount=1,n})(),hv=function(n,t){return t===void 0&&(t={}),XH(n,t)};typeof window<"u"&&I5.setContext(window);var XH=function(n,t){return Ns(void 0,void 0,void 0,function(){var e,r,s,o,i,A,l,c,u,h,g,d,m,y,B,w,E,x,b,H,Y,$,Y,V,L,j,D,S,Q,T,oe,X,F,M,R,ae,J,k,O,N;return Es(this,function(Z){switch(Z.label){case 0:if(!n||typeof n!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=n.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(r=e.defaultView,!r)throw new Error("Document is not attached to a Window");return s={allowTaint:(V=t.allowTaint)!==null&&V!==void 0?V:!1,imageTimeout:(L=t.imageTimeout)!==null&&L!==void 0?L:15e3,proxy:t.proxy,useCORS:(j=t.useCORS)!==null&&j!==void 0?j:!1},o=qp({logging:(D=t.logging)!==null&&D!==void 0?D:!0,cache:t.cache},s),i={windowWidth:(S=t.windowWidth)!==null&&S!==void 0?S:r.innerWidth,windowHeight:(Q=t.windowHeight)!==null&&Q!==void 0?Q:r.innerHeight,scrollX:(T=t.scrollX)!==null&&T!==void 0?T:r.pageXOffset,scrollY:(oe=t.scrollY)!==null&&oe!==void 0?oe:r.pageYOffset},A=new xA(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),l=new zH(o,A),c=(X=t.foreignObjectRendering)!==null&&X!==void 0?X:!1,u={allowTaint:(F=t.allowTaint)!==null&&F!==void 0?F:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:c,copyStyles:c},l.logger.debug("Starting document clone with size "+A.width+"x"+A.height+" scrolled to "+-A.left+","+-A.top),h=new Bw(l,n,u),g=h.clonedReferenceElement,g?[4,h.toIFrame(e,A)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=Z.sent(),m=Xv(g)||ZO(g)?SN(g.ownerDocument):ld(l,g),y=m.width,B=m.height,w=m.left,E=m.top,x=JH(l,g,t.backgroundColor),b={canvas:t.canvas,backgroundColor:x,scale:(R=(M=t.scale)!==null&&M!==void 0?M:r.devicePixelRatio)!==null&&R!==void 0?R:1,x:((ae=t.x)!==null&&ae!==void 0?ae:0)+w,y:((J=t.y)!==null&&J!==void 0?J:0)+E,width:(k=t.width)!==null&&k!==void 0?k:Math.ceil(y),height:(O=t.height)!==null&&O!==void 0?O:Math.ceil(B)},c?(l.logger.debug("Document cloned, using foreign object rendering"),Y=new jH(l,b),[4,Y.render(g)]):[3,3];case 2:return H=Z.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+w+","+E+" with size "+y+"x"+B+" using computed rendering"),l.logger.debug("Starting DOM parsing"),$=E5(l,g),x===$.styles.backgroundColor&&($.styles.backgroundColor=DA.TRANSPARENT),l.logger.debug("Starting renderer for element at "+b.x+","+b.y+" with size "+b.width+"x"+b.height),Y=new PH(l,b),[4,Y.render($)];case 4:H=Z.sent(),Z.label=5;case 5:return(!((N=t.removeContainer)!==null&&N!==void 0)||N)&&(Bw.destroy(d)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,H]}})})},JH=function(n,t,e){var r=t.ownerDocument,s=r.documentElement?tc(n,getComputedStyle(r.documentElement).backgroundColor):DA.TRANSPARENT,o=r.body?tc(n,getComputedStyle(r.body).backgroundColor):DA.TRANSPARENT,i=typeof e=="string"?tc(n,e):e===null?DA.TRANSPARENT:4294967295;return t===r.documentElement?ri(s)?ri(o)?i:o:s:i};const ZH=Object.freeze(Object.defineProperty({__proto__:null,default:hv},Symbol.toStringTag,{value:"Module"}));function e8(n){let t=!1;if(typeof n.type=="object"){const o=n.type;t=o.name==="TaskListContextMenu"||o.__name==="TaskListContextMenu"||o.__file!==void 0&&o.__file.includes("TaskListContextMenu")}if(!t)return null;const e=n.props||{},r=n.children,s=r==null?void 0:r.default;return s?{defaultSlot:s,taskType:e.taskType||e["task-type"]}:null}function t8(n){var r;const t=(r=n.default)==null?void 0:r.call(n);if(!t||!Array.isArray(t))return null;const e=s=>{for(const o of s){if(!o)continue;if(typeof o.type=="symbol"){if(o.children&&Array.isArray(o.children)){const A=e(o.children);if(A)return A}continue}const i=e8(o);if(i)return i;if(o.children&&Array.isArray(o.children)){const A=e(o.children);if(A)return A}}return null};return e(t)}function r8(n){const t=a.computed(()=>t8(n)),e=a.computed(()=>!!t.value);return{declarativeContextMenu:t,hasDeclarativeContextMenu:e}}function n8(n){let t=!1;if(typeof n.type=="object"){const o=n.type;t=o.name==="TaskBarContextMenu"||o.__name==="TaskBarContextMenu"||o.__file!==void 0&&o.__file.includes("TaskBarContextMenu")}if(!t)return null;const e=n.props||{},r=n.children,s=r==null?void 0:r.default;return s?{defaultSlot:s,taskType:e.taskType||e["task-type"]}:null}function a8(n){var r;const t=(r=n.default)==null?void 0:r.call(n);if(!t||!Array.isArray(t))return null;const e=s=>{for(const o of s){if(!o)continue;if(typeof o.type=="symbol"){if(o.children&&Array.isArray(o.children)){const A=e(o.children);if(A)return A}continue}const i=n8(o);if(i)return i;if(o.children&&Array.isArray(o.children)){const A=e(o.children);if(A)return A}}return null};return e(t)}function s8(n){const t=a.computed(()=>a8(n)),e=a.computed(()=>!!t.value);return{declarativeContextMenu:t,hasDeclarativeContextMenu:e}}const o8={class:"gantt-body"},A8=["title"],i8={width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},l8={key:0,points:"15,18 9,12 15,6"},c8={key:1,points:"9,18 15,12 9,6"},u8={class:"close-text"},Nf=18,d8=a.defineComponent({__name:"GanttChart",props:{tasks:{default:()=>[]},milestones:{default:()=>[]},resources:{default:()=>[]},viewMode:{default:"task"},availableViewModes:{},useDefaultDrawer:{type:Boolean,default:!0},useDefaultMilestoneDialog:{type:Boolean,default:!0},toolbarConfig:{default:()=>({})},showToolbar:{type:Boolean,default:!0},onTodayLocate:{type:Function,default:void 0},onExportCsv:{type:Function,default:void 0},onExportPdf:{type:Function,default:void 0},onLanguageChange:{type:Function,default:void 0},onThemeChange:{type:Function,default:void 0},onFullscreenChange:{type:Function,default:void 0},onSettingsConfirm:{type:Function,default:void 0},onExpandAll:{type:Function,default:void 0},onCollapseAll:{type:Function,default:void 0},localeMessages:{default:void 0},workingHours:{default:()=>({morning:{start:8,end:11},afternoon:{start:13,end:17}})},taskListConfig:{default:void 0},resourceListConfig:{default:void 0},calendarProps:{},resourceUsageProps:{},taskListColumnRenderMode:{default:"default"},taskBarConfig:{default:void 0},autoSortByStartDate:{type:Boolean,default:!1},allowDragAndResize:{type:Boolean,default:!0},enableTaskRowMove:{type:Boolean,default:!1},assigneeOptions:{default:()=>[]},resourceTypeOptions:{default:()=>[]},showResourceTypeOption:{type:Boolean,default:!0},taskListRowClassName:{type:[String,Function],default:void 0},taskListRowStyle:{type:[Boolean,null,String,Object,Array,Function],default:void 0},enableTaskListContextMenu:{type:Boolean,default:!0},enableTaskBarContextMenu:{type:Boolean,default:!0},enableLinkAnchor:{type:Boolean,default:!0},enableTaskBarTooltip:{type:Boolean,default:!0},enableMilestoneTooltip:{type:Boolean,default:!0},milestoneLabelPosition:{default:"right"},showActualTaskbar:{type:Boolean,default:!1},showConflicts:{type:Boolean,default:!0},showTaskbarTab:{type:Boolean,default:!0},taskbarDescFixed:{type:Boolean,default:!1},pendingTaskBackgroundColor:{},delayTaskBackgroundColor:{},completeTaskBackgroundColor:{},ongoingTaskBackgroundColor:{},fullscreen:{type:Boolean,default:!1},expandAll:{type:Boolean,default:!0},locale:{default:"zh-CN"},timeScale:{default:"week"},theme:{default:void 0},enableTaskListCollapsible:{type:Boolean,default:!0},taskListVisible:{type:Boolean,default:!0},enableTaskDrawerAutoClose:{type:Boolean,default:!0},scaleConfigs:{default:void 0},rowHeight:{default:51},enableParentTaskAutoSchedule:{type:Boolean,default:!0},enableResourceLaneStacking:{type:Boolean,default:!0},linkConfig:{}},emits:["task-click","task-double-click","taskbar-drag-end","taskbar-resize-end","milestone-drag-end","milestone-double-click","timer-started","timer-stopped","predecessor-added","successor-added","task-deleted","task-added","task-updated","task-collapse-change","link-deleted","view-mode-changed","add-task","add-milestone","milestone-saved","milestone-deleted","milestone-icon-changed","add-predecessor","add-successor","task-row-moved","taskbar-resource-change","resource-drag-end","calendar-selection-complete","calendar-selection-cancel","calendar-resource-change","calendar-view-change","calendar-date-change","calendar-task-click","calendar-task-move","resource-usage-scale-change","resource-usage-cell-click","resource-usage-cell-hover","resource-usage-overload-detected","resource-usage-task-detail-click"],setup(n,{expose:t,emit:e}){const r=n,s=e,o=a.ref(r.linkConfig||{});a.watch(()=>r.linkConfig,P=>{o.value=P||{}});const i=a.computed(()=>({...xp,...o.value})),A=a.ref(),l=a.ref(null),{showMessage:c}=Mv(),u=a.useSlots(),h=a.ref(r.viewMode||"task"),g=a.computed(()=>h.value==="resource"?r.resources:r.tasks),d=a.computed(()=>h.value==="resource"?r.resourceListConfig:r.taskListConfig);a.provide("gantt-view-mode",h),a.provide("gantt-data-source",g),a.provide("gantt-list-config",d),a.provide("gantt-show-conflicts",a.computed(()=>r.showConflicts)),a.provide("gantt-show-taskbar-tab",a.computed(()=>r.showTaskbarTab)),a.provide("gantt-taskbar-desc-fixed",a.computed(()=>r.taskbarDescFixed)),a.provide("gantt-row-height",a.computed(()=>Math.min(60,Math.max(30,r.rowHeight??51))));const m=new Map,y=new Map,B=P=>P.map(ue=>`${ue.id}-${ue.startDate||""}-${ue.endDate||""}`).join("|"),w=a.computed(()=>{var ue;const P=new Map;if(h.value==="resource"){const ke=g.value,Ge=Math.min(60,Math.max(30,r.rowHeight??51))+(((ue=r.taskBarConfig)==null?void 0:ue.titlePosition)==="above"?Nf:0);if(be.value>=0){const nt=Xe.value;nt.size>0&&nt.size<ke.length*.3?(m.forEach((I,q)=>{P.set(q,I.layout)}),nt.forEach(I=>{const q=ke.find(xt=>String(xt.id)===String(I));if(!q)return;const re=String(q.id),he=q.tasks||[];if(he.length===0){P.set(re,{taskRowMap:new Map,rowHeights:[Ge],totalHeight:Ge}),m.set(re,{layout:P.get(re),hash:""});return}const Me=B(he),Qe=r.enableResourceLaneStacking!==!1?"1":"0",ut=`${Pe.value}:${Qe}:${Me}`,Dt=m.get(re);if(Dt&&Dt.hash===ut)P.set(re,Dt.layout);else{const xt=h0(he,Ge,Pe.value,r.enableResourceLaneStacking!==!1);P.set(re,xt),m.set(re,{layout:xt,hash:ut})}})):ke.forEach(I=>{const q=String(I.id),re=I.tasks||[];if(re.length===0){P.set(q,{taskRowMap:new Map,rowHeights:[Ge],totalHeight:Ge});return}const he=B(re),Me=r.enableResourceLaneStacking!==!1?"1":"0",Qe=`${Pe.value}:${Me}:${he}`,ut=m.get(q);if(ut&&ut.hash===Qe)P.set(q,ut.layout);else{const Dt=h0(re,Ge,Pe.value,r.enableResourceLaneStacking!==!1);P.set(q,Dt),m.set(q,{layout:Dt,hash:Qe})}})}}return P}),E=a.computed(()=>{const P=new Map;if(h.value==="resource"){const ue=g.value;let ke=0;ue.forEach(Ge=>{var q;const nt=String(Ge.id);P.set(nt,ke);const v=w.value.get(nt),I=(v==null?void 0:v.totalHeight)||Math.min(60,Math.max(30,r.rowHeight??51))+(((q=r.taskBarConfig)==null?void 0:q.titlePosition)==="above"?Nf:0);ke+=I})}return P}),x=a.computed(()=>{if(h.value!=="resource")return new Map;const P=g.value,ue=new Map;if(be.value>=0){const ke=Xe.value;ke.size>0&&ke.size<P.length*.3?(y.forEach((nt,v)=>{nt.conflicts.size>0&&ue.set(v,nt.conflicts)}),ke.forEach(nt=>{const v=P.find(Qe=>String(Qe.id)===String(nt));if(!v)return;const I=v.tasks||[];if(I.length<2)return;const q=String(v.id),re=B(I),he=`${Pe.value}:${re}`,Me=y.get(q);if(Me&&Me.hash===he)Me.conflicts.size>0&&ue.set(q,Me.conflicts);else{const Qe=sc(I,v.id,Pe.value);if(Qe.length>0){const ut=new Set;Qe.forEach(Dt=>{Dt.tasks.forEach(xt=>{ut.add(xt.id)})}),ut.size>0&&ue.set(q,ut),y.set(q,{conflicts:ut,hash:he})}else y.set(q,{conflicts:new Set,hash:he})}})):P.forEach(nt=>{const v=nt.tasks||[];if(v.length<2)return;const I=String(nt.id),q=B(v),re=`${Pe.value}:${q}`,he=y.get(I);if(he&&he.hash===re)he.conflicts.size>0&&ue.set(I,he.conflicts);else{const Me=sc(v,nt.id,Pe.value);if(Me.length>0){const Qe=new Set;Me.forEach(ut=>{ut.tasks.forEach(Dt=>{Qe.add(Dt.id)})}),Qe.size>0&&ue.set(I,Qe),y.set(I,{conflicts:Qe,hash:re})}else y.set(I,{conflicts:new Set,hash:re})}})}return ue});a.provide("resourceTaskLayouts",w),a.provide("resourceRowPositions",E),a.provide("resourceConflicts",x),a.provide("gantt-column-slots",u),a.provide("gantt-has-taskbar-tooltip-slot",a.computed(()=>!!u["taskbar-tooltip"])),a.provide("enable-task-list-context-menu",a.computed(()=>r.enableTaskListContextMenu)),a.provide("enable-task-bar-context-menu",a.computed(()=>r.enableTaskBarContextMenu)),a.provide("enable-link-anchor",a.computed(()=>r.enableLinkAnchor));const b=()=>typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",H=a.ref("light");a.provide("gantt-theme",H);const{hasDeclarativeContextMenu:$,declarativeContextMenu:Y}=r8(u),{hasDeclarativeContextMenu:V,declarativeContextMenu:L}=s8(u),j=a.computed(()=>$.value);a.provide("task-list-context-menu-slot",j),a.provide("declarative-task-list-context-menu",Y);const D=a.computed(()=>V.value);a.provide("task-bar-context-menu-slot",D),a.provide("declarative-task-bar-context-menu",L);const S=a.ref(1920),Q=(P,ue)=>{let ke=0,Ge=null;return((...nt)=>{const v=Date.now(),I=ue-(v-ke);Ge&&clearTimeout(Ge),I<=0?(ke=v,P(...nt)):Ge=window.setTimeout(()=>{ke=Date.now(),P(...nt),Ge=null},I)})},T=async()=>{await a.nextTick(),k.value=M(),J.value=R(),N.value=R(),Z.value=R(),O.value=M();const P=ge(se.value);P!==se.value&&(se.value=P)},oe=()=>{if(A.value){const P=A.value.clientWidth;P!==S.value&&(S.value=P,T())}},X=Q(oe,100);a.onMounted(()=>{oe(),T(),window.addEventListener("resize",X),a.nextTick(()=>{if(A.value){const P=r.theme??b();A.value.setAttribute("data-theme",P),H.value=P}})}),a.onUnmounted(()=>{window.removeEventListener("resize",X)});const F=()=>{var Ge;let P;if(r.taskListColumnRenderMode==="declarative")P=Xl(u);else{const nt=(Ge=r.taskListConfig)==null?void 0:Ge.columns;if(!nt||nt.length===0)return null;P=nt.filter(v=>v.visible!==!1)}if(P.length===0||P.some(nt=>nt.width==null))return null;let ue=0,ke=0;for(const nt of P){const v=nt.width;if(typeof v=="number")ue+=v;else{const I=v.trim();if(I.endsWith("%"))ke+=parseFloat(I)/100;else{const q=parseFloat(I);if(isNaN(q))return null;ue+=q}}}return ke>=1?null:ke>0?Math.round(ue/(1-ke)):ue},M=()=>{var Ge;const P=il((Ge=r.taskListConfig)==null?void 0:Ge.minWidth,S.value,jm),ue=Math.max(P,jm),ke=F();return ke!==null&&ue>=ke?ke:ue},R=()=>{var Ge,nt;const P=il((Ge=r.taskListConfig)==null?void 0:Ge.maxWidth,S.value,aT),ue=((nt=l.value)==null?void 0:nt.getHeaderScrollWidth())??null;if(ue!==null&&ue>0)return Math.min(P,ue);const ke=F();return ke!==null?Math.min(P,ke):P},ae=()=>{var P;return il((P=r.taskListConfig)==null?void 0:P.defaultWidth,S.value,nT)},J=a.ref(R()),k=a.ref(M()),O=a.ref(M()),N=a.ref(R()),Z=a.ref(R()),se=a.ref(ae());a.provide("gantt-task-list-width",se);const ge=P=>P<k.value?k.value:P>Z.value?Z.value:Math.max(k.value,P);a.watch(()=>r.taskListConfig,P=>{P&&(P.defaultWidth!==void 0&&(se.value=ae()),T())},{immediate:!1,deep:!0});const fe=a.shallowRef(r.taskListColumnRenderMode==="declarative"?Xl(u).map(P=>`${P.width??"?"}`).join(","):null);a.watch(()=>r.taskListColumnRenderMode!=="declarative"?null:u.default??null,()=>{if(r.taskListColumnRenderMode!=="declarative"){fe.value=null;return}const P=Xl(u);fe.value=P.map(ue=>`${ue.width??"?"}`).join(",")}),a.watch(fe,()=>{fe.value!==null&&T()});const Ae=a.ref(null),Fe=a.ref(0),be=a.ref(0),Ke=a.ref(null),Xe=a.ref(new Set),xe=()=>{Ke.value=null,Xe.value=new Set,be.value++},te=new Map,lt=(P,ue)=>{te.clear();const ke=Ge=>{for(const nt of Ge)nt.children&&nt.children.length>0&&(te.set(nt.id,{startDate:nt.startDate||"",endDate:nt.endDate||""}),ke(nt.children))};P&&ke(P)};r.tasks&<(r.tasks),a.watch(()=>r.tasks,P=>{P&<(P),xe(),r.expandAll===!1&&a.nextTick(()=>hr())}),a.watch(()=>r.enableParentTaskAutoSchedule,(P,ue)=>{if(ue!==!1&&P===!1&&r.tasks){const ke=Ge=>{for(const nt of Ge)if(nt.children&&nt.children.length>0){const v=te.get(nt.id);v&&(nt.startDate=v.startDate,nt.endDate=v.endDate),ke(nt.children)}};ke(r.tasks),xe()}}),a.watch(()=>r.resources,()=>{xe()}),a.watch(()=>{var P;return(P=r.resources)==null?void 0:P.map(ue=>ue.tasks.length)},()=>{xe()});const Pe=a.ref(Ee.DAY),rt=a.computed(()=>{if(!r.scaleConfigs)return Gs;const P={};for(const ue of Object.keys(Gs)){const ke=r.scaleConfigs[ue];if(!ke)P[ue]=Gs[ue];else{const Ge=Gs[ue],nt=ke.cellWidth??Ge.cellWidth,v=Math.min(Ge.maxCellWidth??1/0,Math.max(Ge.minCellWidth??0,nt));P[ue]={...Ge,cellWidth:v,...ke.preBuffer!=null?{preBuffer:ke.preBuffer}:{},...ke.sufBuffer!=null?{sufBuffer:ke.sufBuffer}:{},formatters:ke.formatter?{...Ge.formatters,...ke.formatter}:Ge.formatters,headerLevels:2}}}return P}),Te=P=>{h.value!==P&&(h.value=P,s("view-mode-changed",P))};a.watch(()=>r.viewMode,P=>{P&&h.value!==P&&(h.value=P,s("view-mode-changed",P))}),a.watch(h,()=>{T()});const Et=a.computed(()=>{var ue;const P=(ue=Ae.value)==null?void 0:ue.highlightedTaskId;return P!=null});a.watch(()=>Ae.value,P=>{P&&P.updateTimeScale(Pe.value)},{once:!0});const ot=a.ref(!1);a.provide("isSplitBarDragging",ot);const yt=a.ref(!1);a.provide("isTaskListToggling",yt);function pt(P){if(P.target.closest(".task-list-toggle"))return;P.preventDefault(),P.stopPropagation(),ot.value=!0;const ke=P.clientX,Ge=se.value,nt=document.querySelector(".task-list-body");if(!nt)return;const v=nt.getBoundingClientRect();J.value=v.width,N.value=window.innerWidth*.8-6,Z.value=Math.min(N.value,Z.value),window.dispatchEvent(new CustomEvent("splitter-drag-start")),document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",document.body.style.cursor="col-resize",document.body.style.pointerEvents="none";const I=Qe=>{Qe.type!=="mousemove"&&Qe.type!=="mouseup"&&(Qe.preventDefault(),Qe.stopPropagation(),Qe.stopImmediatePropagation())};document.addEventListener("mousedown",I,{capture:!0}),document.addEventListener("click",I,{capture:!0}),document.addEventListener("dblclick",I,{capture:!0}),document.addEventListener("mouseover",I,{capture:!0}),document.addEventListener("mouseout",I,{capture:!0}),document.addEventListener("mouseenter",I,{capture:!0}),document.addEventListener("mouseleave",I,{capture:!0}),document.addEventListener("wheel",I,{capture:!0,passive:!1}),document.addEventListener("contextmenu",I,{capture:!0});let q=null,re=null;function he(Qe){if(!ot.value)return;Qe.preventDefault(),Qe.stopPropagation(),Qe.stopImmediatePropagation();const ut=Qe.clientX-ke,Dt=Ge+ut;re=ge(Dt),q===null&&(q=requestAnimationFrame(()=>{re!==null&&(se.value=re,re=null),q=null}))}function Me(){ot.value=!1,q!==null&&(cancelAnimationFrame(q),q=null,re!==null&&(se.value=re,re=null)),document.removeEventListener("mousedown",I,{capture:!0}),document.removeEventListener("click",I,{capture:!0}),document.removeEventListener("dblclick",I,{capture:!0}),document.removeEventListener("mouseover",I,{capture:!0}),document.removeEventListener("mouseout",I,{capture:!0}),document.removeEventListener("mouseenter",I,{capture:!0}),document.removeEventListener("mouseleave",I,{capture:!0}),document.removeEventListener("wheel",I,{capture:!0}),document.removeEventListener("contextmenu",I,{capture:!0}),window.dispatchEvent(new CustomEvent("splitter-drag-end")),document.body.style.userSelect="",document.body.style.webkitUserSelect="",document.body.style.cursor="",document.body.style.pointerEvents="",J.value=R(),k.value=M(),N.value=R(),Z.value=R(),O.value=M(),window.removeEventListener("mousemove",he),window.removeEventListener("mouseup",Me)}window.addEventListener("mousemove",he),window.addEventListener("mouseup",Me)}const Oe=a.ref(r.enableTaskListCollapsible?r.taskListVisible??!0:!1);a.watch(()=>r.taskListVisible,P=>{r.enableTaskListCollapsible&&(Oe.value=P??!0)}),a.watch(()=>r.enableTaskListCollapsible,P=>{P?Oe.value=r.taskListVisible??!0:Oe.value=!1});const it=a.ref(!1),W=a.ref(""),z=()=>{r.enableTaskListCollapsible&&(it.value||(yt.value=!0,it.value=!0,Oe.value?W.value="impact-left":W.value="impact-right",setTimeout(()=>{Oe.value=!Oe.value},200),setTimeout(()=>{it.value=!1,W.value="",yt.value=!1,a.nextTick(()=>{window.dispatchEvent(new CustomEvent("timeline-container-resized",{detail:{source:"manual-task-list-toggle"}}))})},400)))},ye=P=>{yt.value=!0,Oe.value=P.detail,a.nextTick(()=>{yt.value=!1,window.dispatchEvent(new CustomEvent("timeline-container-resized",{detail:{source:"task-list-toggle"}}))})};function qe(P){const ue=P.detail;tr(ue,!0),be.value++,s("taskbar-drag-end",ue)}function ct(P){const ue=P.detail;tr(ue,!0),be.value++,s("taskbar-resize-end",ue)}function $e(P){const ue=P.detail;be.value++,s("milestone-drag-end",ue)}let Ve=null;a.onMounted(()=>{window.addEventListener("taskbar-drag-end",qe),window.addEventListener("taskbar-resize-end",ct),window.addEventListener("milestone-drag-end",$e),a.nextTick(()=>{const P=document.querySelector(".gantt-body");P&&(Fe.value=P.clientWidth,Ve=new ResizeObserver(ue=>{for(const ke of ue)Fe.value=ke.contentRect.width}),Ve.observe(P))})}),a.onUnmounted(()=>{window.removeEventListener("taskbar-drag-end",qe),window.removeEventListener("taskbar-resize-end",ct),window.removeEventListener("milestone-drag-end",$e),Ve&&(Ve.disconnect(),Ve=null)});const Mt=P=>{const ue=(ke,Ge,nt)=>{for(const v of ke){if(v.id===Ge)return v.collapsed=nt,!0;if(v.children&&v.children.length>0&&ue(v.children,Ge,nt))return!0}return!1};r.tasks&&ue(r.tasks,P.id,P.collapsed??!1),be.value++,s("task-collapse-change",P)},tt=()=>{if(r.onExpandAll&&typeof r.onExpandAll=="function")r.onExpandAll();else{const P=ue=>{ue.forEach(ke=>{ke.children&&ke.children.length>0&&(ke.collapsed=!1,P(ke.children))})};r.tasks&&(P(r.tasks),be.value++)}},_t=P=>{const{draggedTask:ue,targetTask:ke,position:Ge}=P;if(!r.tasks)return;const nt=_I(r.tasks,ue.id,ke.id,Ge);nt&&(be.value++,a.nextTick(()=>{window.dispatchEvent(new CustomEvent("task-updated",{detail:nt.movedTask}))}),s("task-row-moved",{draggedTask:nt.movedTask,targetTask:ke,position:Ge,oldParent:nt.oldParent,newParent:nt.newParent}))},rr=()=>{if(r.onCollapseAll&&typeof r.onCollapseAll=="function")r.onCollapseAll();else{const P=ue=>{ue.forEach(ke=>{ke.children&&ke.children.length>0&&(ke.collapsed=!0,P(ke.children))})};r.tasks&&(P(r.tasks),be.value++)}},St=()=>{tt()},hr=()=>{rr()},Vt=()=>{const P=ue=>{for(const ke of ue)if(ke.children&&ke.children.length>0&&(ke.collapsed||!P(ke.children)))return!1;return!0};r.tasks&&(P(r.tasks)?hr():St())},Xt=()=>{if(!r.tasks||r.tasks.length===0)return!0;const P=ue=>{for(const ke of ue)if(ke.children&&ke.children.length>0&&(ke.collapsed||!P(ke.children)))return!1;return!0};return P(r.tasks)};a.watch(()=>r.expandAll,P=>{P!==void 0&&(P?St():hr())},{immediate:!0});const mr=()=>{const P=[],ue=ke=>{ke.forEach(Ge=>{P.push(Ge),Ge.children&&Ge.children.length>0&&ue(Ge.children)})};r.tasks&&ue(r.tasks),r.milestones&&P.push(...r.milestones),window.dispatchEvent(new CustomEvent("task-list-updated",{detail:P}))},Kt=()=>{mr()};a.watch([()=>r.tasks,()=>r.milestones],()=>{a.nextTick(()=>{Kt()})},{immediate:!0}),a.onMounted(()=>{window.addEventListener("toggle-task-list",ye),window.addEventListener("fullscreen-toggle",Hn),window.addEventListener("milestone-icon-changed",Jn),window.addEventListener("milestone-deleted",Er),window.addEventListener("milestone-data-changed",$a),window.addEventListener("request-task-list",mr),window.addEventListener("resize",It),window.addEventListener("context-menu",Ps),a.nextTick(()=>{Ae.value&&typeof Ae.value.scrollToTodayCenter=="function"&&Ae.value.scrollToTodayCenter()})}),a.onUnmounted(()=>{ot.value=!1,window.removeEventListener("toggle-task-list",ye),window.removeEventListener("fullscreen-toggle",Hn),window.removeEventListener("milestone-icon-changed",Jn),window.removeEventListener("milestone-deleted",Er),window.removeEventListener("milestone-data-changed",$a),window.removeEventListener("request-task-list",mr),window.removeEventListener("resize",It),window.removeEventListener("context-menu",Ps)});const jt=P=>{const ue=P||"dark";H.value=ue,A.value&&A.value.setAttribute("data-theme",ue)},We=()=>H.value;if(a.watch(()=>r.theme,P=>{if(!A.value)return;const ue=P??b();ue!==H.value&&jt(ue)}),typeof window<"u"&&window.matchMedia){const P=window.matchMedia("(prefers-color-scheme: dark)"),ue=ke=>{if(!r.theme){const Ge=ke.matches?"dark":"light";jt(Ge)}};P.addEventListener("change",ue),a.onUnmounted(()=>{P.removeEventListener("change",ue)})}const ze=a.ref(!1),{t:ft,locale:Lt}=_s(),ar=a.computed(()=>ft.value.collapseTaskList),Rt=a.computed(()=>ft.value.expandTaskList),cr=a.computed(()=>{be.value>=0;const P=[];if(r.milestones&&r.milestones.length>0){const ue={id:-1,name:ft.value.milestoneGroup,startDate:"",endDate:"",type:"milestone-group",children:r.milestones,isParent:!0,collapsed:!1};P.push(ue)}if(r.tasks&&r.tasks.length>0)if(r.autoSortByStartDate){const ue=Ge=>[...Ge].map(nt=>{const v={...nt};return nt.children&&nt.children.length>0&&(v.children=ue(nt.children)),v}).sort((nt,v)=>{const I=Me=>{if(Me.children&&Me.children.length>0){const Qe=Me.children.map(ut=>I(ut)).filter(ut=>ut.getTime()>0);if(Qe.length>0)return new Date(Math.min(...Qe.map(ut=>ut.getTime())))}return Me.startDate?new Date(Me.startDate):new Date("9999-12-31")},q=I(nt),re=I(v),he=q.getTime()-re.getTime();return he!==0?he:nt.id-v.id}),ke=ue(r.tasks);P.push(...ke)}else P.push(...r.tasks);return P}),qr=a.computed(()=>{be.value>=0;const P=[];if(r.milestones&&r.milestones.length>0){const ue={id:-1,name:ft.value.milestoneGroup,startDate:"",endDate:"",type:"milestone-group",children:r.milestones,isParent:!0,collapsed:!1};P.push(ue)}if(r.tasks&&r.tasks.length>0){const ue=re=>{const he=[],Me=[];return re.forEach(Qe=>{if(Qe.startDate&&he.push(Qe.startDate),Qe.endDate&&Me.push(Qe.endDate),Qe.children&&Qe.children.length>0){const ut=ue(Qe.children);he.push(...ut.starts),Me.push(...ut.ends)}}),{starts:he,ends:Me}},ke=re=>{if(!re.children||re.children.length===0)return{startDate:re.startDate||"",endDate:re.endDate||""};const{starts:he,ends:Me}=ue(re.children);if(he.length===0||Me.length===0)return{startDate:re.startDate||"",endDate:re.endDate||""};const Qe=he.reduce((Dt,xt)=>new Date(xt)<new Date(Dt)?xt:Dt),ut=Me.reduce((Dt,xt)=>new Date(xt)>new Date(Dt)?xt:Dt);return{startDate:Qe,endDate:ut}},Ge=re=>re.map(he=>{if(!he.children||he.children.length===0)return he;const Me=Ge(he.children),Qe=he.type==="story"||!0;if(!r.enableParentTaskAutoSchedule)return{...he,children:Me,isParent:Qe};const ut={...he,children:Me},{startDate:Dt,endDate:xt}=ke(ut);return{...he,children:Me,isParent:Qe,startDate:Dt,endDate:xt}}),nt=(re,he=0)=>{const Me=[];return re.forEach(Qe=>{const ut={...Qe,level:he};if(Me.push(ut),Qe.children&&Qe.children.length>0&&!Qe.collapsed){const Dt=nt(Qe.children,he+1);Me.push(...Dt)}}),Me},v=cr.value.filter(re=>re.type!=="milestone-group"),I=Ge(v),q=nt(I);P.push(...q)}return P});function Kr(P){var ke;const ue=Math.min(60,Math.max(30,r.rowHeight??51));return((ke=r.taskBarConfig)==null?void 0:ke.titlePosition)!=="above"||P.type==="milestone"||P.type==="milestone-group"||r.showActualTaskbar&&(P.actualStartDate||P.actualEndDate)?ue:ue+Nf}const on=a.computed(()=>{const P=qr.value,ue=[0],ke=new Map;let Ge=0;for(const nt of P){const v=Kr(nt);Ge+=v,ue.push(Ge),ke.set(nt.id,v)}return{cumulativeHeights:ue,totalHeight:Ge,taskHeights:ke}});a.provide("taskRowLayouts",on);const Fr=a.computed(()=>(be.value>=0,r.milestones?r.milestones.filter(ue=>!!ue.startDate).map(ue=>({id:ue.id,name:ue.name,startDate:ue.startDate,endDate:ue.endDate,assignee:ue.assignee,assigneeName:ue.assigneeName,avatar:ue.avatar,type:ue.type||"milestone",icon:ue.icon,description:ue.description})):[])),Jr=a.computed(()=>{be.value;const P=xt=>{let Zt=[];return xt.forEach(er=>{Zt.push(er),er.children&&er.children.length>0&&(Zt=Zt.concat(P(er.children)))}),Zt};let ue=[];if((h.value==="resource"||h.value==="resource-usage")&&r.resources)for(const xt of r.resources)xt.tasks&&Array.isArray(xt.tasks)&&(ue=ue.concat(P(xt.tasks)));else ue=ue.concat(P(qr.value));const ke=ue.map(xt=>xt.startDate).filter(Boolean).map(xt=>new Date(xt)),Ge=ue.map(xt=>xt.endDate).filter(Boolean).map(xt=>new Date(xt));if(ke.length===0||Ge.length===0){const xt=new Date,Zt=new Date(xt.getFullYear(),xt.getMonth()-6,1),er=new Date(xt.getFullYear(),xt.getMonth()+6+1,0);return{min:Zt,max:er}}const nt=new Date(Math.min(...ke.map(xt=>xt.getTime()))),v=new Date(Math.max(...Ge.map(xt=>xt.getTime()))),I=Fe.value||1200,q=rt.value[Pe.value].cellWidth,re=Math.ceil(I/q),he=rt.value[Pe.value],Me=An(he.preBuffer),Qe=An(he.sufBuffer),{min:ut,max:Dt}=ta(nt,v,Pe.value,re,q,Me,Qe);return{min:ut,max:Dt}});function An(P){if(P==null)return null;const ue=Math.ceil(P);return ue<0?null:Math.max(1,ue)}function ta(P,ue,ke,Ge,nt,v=null,I=null){let q,re;switch(ke){case Ee.HOUR:{const he=v!==null?v:24,Me=I!==null?I:24;q=new Date(P.getTime()-he*60*60*1e3),re=new Date(ue.getTime()+Me*60*60*1e3);const Qe=Math.ceil((re.getTime()-q.getTime())/(1e3*60*60));if(Qe<Ge){const ut=Ge-Qe,Dt=Math.ceil(ut/2);q=new Date(q.getTime()-Dt*60*60*1e3),re=new Date(re.getTime()+Dt*60*60*1e3)}break}case Ee.DAY:{const he=v!==null?v:1,Me=I!==null?I:1;q=new Date(P.getFullYear(),P.getMonth()-he,1),re=new Date(ue.getFullYear(),ue.getMonth()+Me+1,0);const Qe=Math.ceil((re.getTime()-q.getTime())/(1e3*60*60*24));if(Qe<Ge){const ut=Ge-Qe,Dt=Math.ceil(ut/30),xt=q.getMonth()-Dt,Zt=q.getFullYear()+Math.floor(xt/12),er=(xt%12+12)%12;q=new Date(Zt,er,1);const Ur=re.getMonth()+Dt+1,br=re.getFullYear()+Math.floor(Ur/12),Tr=(Ur%12+12)%12;re=new Date(br,Tr,0)}break}case Ee.WEEK:{const he=Ir=>{const Gr=new Date(Ir),Qn=Gr.getDay()||7;return Gr.setDate(Gr.getDate()-(Qn-1)),Gr},Me=(Ir,Gr)=>{let Qn=1;for(;Qn<=31;){const ma=new Date(Ir,Gr,Qn);if(ma.getMonth()!==Gr)break;const Ya=he(ma);if(Ya.getMonth()===Gr)return Ya;Qn++}return new Date(Ir,Gr,1)},Qe=(Ir,Gr)=>{const Qn=new Date(Ir,Gr+1,0).getDate();for(let ma=Qn;ma>=1;ma--){const Ya=new Date(Ir,Gr,ma),Ia=he(Ya);if(Ia.getMonth()===Gr)return Ia}return new Date(Ir,Gr,1)},ut=(Ir,Gr)=>{const Qn=[],ma=Me(Ir,Gr),Ya=Qe(Ir,Gr),Ia=new Date(ma);for(;Ia<=Ya;)Qn.push(new Date(Ia)),Ia.setDate(Ia.getDate()+7);return Qn},Dt=he(P),xt=Dt.getFullYear(),Zt=Dt.getMonth();let er;if(v!==null){const Ir=new Date(Dt);Ir.setDate(Ir.getDate()-v*7),er=[Ir]}else{const Ir=Zt===0?11:Zt-1,Gr=Zt===0?xt-1:xt;er=ut(Gr,Ir)}const Ur=he(ue),br=Ur.getFullYear(),Tr=Ur.getMonth();let Yr;if(I!==null){const Ir=new Date(Ur);Ir.setDate(Ir.getDate()+I*7),Yr=[Ir]}else{const Ir=Tr===11?0:Tr+1,Gr=Tr===11?br+1:br;Yr=ut(Gr,Ir)}let Ar=[];Ar.push(...er);let xr=xt,Zr=Zt;for(;xr<br||xr===br&&Zr<=Tr;){const Ir=ut(xr,Zr);Ar.push(...Ir),Zr++,Zr>11&&(Zr=0,xr++)}Ar.push(...Yr);const La=60;let Ua=Ar.length*La;for(;Ua<Ge*nt;){const Ir=Ar[0],Gr=Ir.getFullYear(),Qn=Ir.getMonth(),ma=Qn===0?11:Qn-1,Ya=Qn===0?Gr-1:Gr;if(Ar=[...ut(Ya,ma),...Ar],Ua=Ar.length*La,Ua>=Ge*nt)break;const Aa=Ar[Ar.length-1],wa=Aa.getFullYear(),Oa=Aa.getMonth(),uA=Oa===11?0:Oa+1,Vs=Oa===11?wa+1:wa,ia=ut(Vs,uA);Ar=[...Ar,...ia],Ua=Ar.length*La}q=new Date(Ar[0]),re=new Date(Ar[Ar.length-1]),re.setDate(re.getDate()+6);break}case Ee.MONTH:{const he=v!==null?v:12,Me=I!==null?I:12;q=new Date(P.getFullYear(),P.getMonth()-he,1),re=new Date(ue.getFullYear(),ue.getMonth()+Me+1,0);const Qe=(re.getFullYear()-q.getFullYear())*12+(re.getMonth()-q.getMonth());if(Qe<Ge){const ut=Ge-Qe,Dt=Math.ceil(ut/2);q=new Date(q.getFullYear(),q.getMonth()-Dt,1),re=new Date(re.getFullYear(),re.getMonth()+Dt+1,0)}break}case Ee.QUARTER:{if(v!==null||I!==null){const Me=v!==null?v:0,Qe=I!==null?I:0,ut=Me*3,Dt=Qe*3,xt=P.getMonth()-ut,Zt=P.getFullYear()+Math.floor(xt/12),er=(xt%12+12)%12,Ur=Math.floor(er/3)*3;q=new Date(Zt,Ur,1);const br=ue.getMonth()+Dt,Tr=ue.getFullYear()+Math.floor(br/12),Yr=(br%12+12)%12,Ar=Math.floor(Yr/3)*3+2;re=new Date(Tr,Ar+1,0)}else{const Qe=new Date().getFullYear(),ut=P.getFullYear(),Dt=ue.getFullYear();q=new Date(Math.min(Qe-2,ut-2),0,1),re=new Date(Math.max(Qe+2,Dt+2),11,31)}const he=(re.getFullYear()-q.getFullYear()+1)*4;if(he<Ge){const Me=Ge-he,Qe=Math.ceil(Me/4),ut=Math.ceil(Qe/2);q=new Date(q.getFullYear()-ut,0,1),re=new Date(re.getFullYear()+ut,11,31)}break}case Ee.YEAR:{if(v!==null||I!==null){const Me=v!==null?v:0,Qe=I!==null?I:0;q=new Date(P.getFullYear()-Me,0,1),re=new Date(ue.getFullYear()+Qe,11,31)}else{const Qe=new Date().getFullYear(),ut=P.getFullYear(),Dt=ue.getFullYear();q=new Date(Math.min(Qe-2,ut-2),0,1),re=new Date(Math.max(Qe+2,Dt+2),11,31)}const he=(re.getFullYear()-q.getFullYear()+1)*2;if(he<Ge){const Me=Ge-he,Qe=Math.ceil(Me/2),ut=Math.ceil(Qe/2);q=new Date(q.getFullYear()-ut,0,1),re=new Date(re.getFullYear()+ut,11,31)}break}default:q=P,re=ue}return{min:q,max:re}}const ra=()=>{if(r.onExportCsv&&typeof r.onExportCsv=="function"){r.onExportCsv()===!1&&On();return}On()},xn=P=>{Pe.value=P,Ae.value&&Ae.value.updateTimeScale(P)},Nr=a.computed(()=>Pe.value===Ee.WEEK?"week":Pe.value===Ee.MONTH?"month":"day"),dn=a.computed(()=>Pe.value===Ee.WEEK?"week":Pe.value===Ee.MONTH?"month":"day"),Gn=a.computed(()=>({start:Jr.value.min,end:Jr.value.max})),zn=P=>{a.nextTick(()=>{const ue=new CustomEvent("timeline-scale-updated",{detail:P});window.dispatchEvent(ue)})},ln=P=>{var ke;jt(P?"dark":"light"),(ke=r.onThemeChange)==null||ke.call(r,P)},En=["hour","day","week","month","quarter","year"],xa=P=>{const ue=P||"week";En.includes(ue)&&xn(ue)},Ra=()=>{const P=En.indexOf(Pe.value);if(P>0){const ue=En[P-1];xn(ue)}},na=()=>{const P=En.indexOf(Pe.value);if(P<En.length-1){const ue=En[P+1];xn(ue)}},Ss=()=>Pe.value;a.watch(()=>r.timeScale,P=>{P&&P!==Pe.value&&xn(P)},{immediate:!0});const uo=()=>{var P;(P=Ae.value)!=null&&P.clearHighlight&&Ae.value.clearHighlight()},On=()=>{try{const P=[];r.tasks&&r.tasks.length>0&&P.push(...r.tasks),r.milestones&&r.milestones.length>0&&P.push(...r.milestones);const Ge="\uFEFF"+Fs(P),nt=new Blob([Ge],{type:"text/csv;charset=utf-8;"}),v=document.createElement("a"),I=URL.createObjectURL(nt),re=`gantt-tasks-${new Date().toISOString().split("T")[0]}.csv`;v.setAttribute("href",I),v.setAttribute("download",re),v.style.visibility="hidden",document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(I)}catch(P){console.error("CSV导出失败:",P),c("CSV导出失败","error",{closable:!1})}},Fs=P=>{const ue=ft.value.csvHeaders,ke=[ue.id,ue.taskName,ue.predecessor,ue.assignee,ue.startDate,ue.endDate,ue.estimatedHours,ue.actualHours,ue.progress,ue.type,ue.description],Ge=q=>{if(q==null)return"";const re=String(q);return re.includes(",")||re.includes('"')||re.includes(`
`)||re.includes("\r")?`"${re.replace(/"/g,'""')}"`:re},nt=q=>{const re=[];return q.forEach(he=>{re.push({id:he.id,name:he.name||"",predecessor:Ep(he.predecessor),assignee:he.assignee||"",startDate:he.startDate||"",endDate:he.endDate||"",estimatedHours:he.estimatedHours||"",actualHours:he.actualHours||"",progress:he.progress!==void 0?`${he.progress}%`:"",type:he.type||"",description:he.description||""}),he.children&&he.children.length>0&&re.push(...nt(he.children))}),re},v=nt(P);return[ke.map(q=>Ge(q)).join(","),...v.map(q=>[Ge(q.id),Ge(q.name),Ge(Ep(q.predecessor)),Ge(q.assignee),Ge(q.startDate),Ge(q.endDate),Ge(q.estimatedHours),Ge(q.actualHours),Ge(q.progress),Ge(q.type),Ge(q.description)].join(","))].join(`
`)},Un=async()=>{try{const P=ft.value.pdfExportLoading,ue=ft.value.pdfExportTitle,ke=ft.value.pdfExportDate,Ge=document.createElement("div");Ge.style.cssText=`
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0,0,0,0.5); display: flex; align-items: center;
justify-content: center; z-index: 10000; color: white; font-size: 16px;
`,Ge.textContent=P,document.body.appendChild(Ge);const nt=document.querySelector(".gantt-body");if(!nt)throw new Error("找不到甘特图元素");const v={overflow:nt.style.overflow,height:nt.style.height};nt.style.overflow="visible",nt.style.height="auto";const I=new Date().toLocaleDateString(Lt.value),q=document.createElement("div");q.style.cssText=["position: fixed","left: -9999px","top: 0",`width: ${Math.max(nt.scrollWidth,800)}px`,"background: #ffffff","padding: 10px 16px","display: flex","justify-content: space-between","align-items: center","font-family: sans-serif","box-sizing: border-box"].join("; ");const re=document.createElement("span");re.style.cssText="font-size: 20px; font-weight: bold; flex: 1; text-align: center;",re.textContent=ue;const he=document.createElement("span");he.style.cssText="font-size: 12px; white-space: nowrap;",he.textContent=`${ke}: ${I}`,q.appendChild(re),q.appendChild(he),document.body.appendChild(q);const[Me,Qe]=await Promise.all([hv(q,{allowTaint:!0,useCORS:!0,scale:2,backgroundColor:"#ffffff"}),hv(nt,{allowTaint:!0,useCORS:!0,scale:2,width:nt.scrollWidth,height:nt.scrollHeight,backgroundColor:"#ffffff"})]);document.body.removeChild(q),nt.style.overflow=v.overflow,nt.style.height=v.height;const ut=Me.toDataURL("image/png"),Dt=Qe.toDataURL("image/png"),xt=new dr({orientation:"landscape",unit:"mm",format:"a4"}),Zt=xt.internal.pageSize.getWidth(),er=xt.internal.pageSize.getHeight(),Ur=Me.height/Me.width*Zt;xt.addImage(ut,"PNG",0,0,Zt,Ur);const br=Ur+2,Tr=er-br,Yr=Qe.height/Qe.width,Ar=Math.min(Zt,Tr/Yr),xr=Ar*Yr,Zr=(Zt-Ar)/2;if(xt.addImage(Dt,"PNG",Zr,br,Ar,xr),xr>Tr){const Ua=Math.ceil(xr/Tr);for(let Ir=1;Ir<Ua;Ir++){xt.addPage();const Gr=-Ir*Tr;xt.addImage(Dt,"PNG",Zr,br+Gr,Ar,xr)}}const La=`gantt-chart-${new Date().toISOString().split("T")[0]}.pdf`;xt.save(La),Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge)}catch(P){const ue=document.querySelector('[style*="position: fixed"]');ue&&ue.parentNode&&ue.parentNode.removeChild(ue),console.error("PDF导出失败:",P),alert("PDF导出失败")}},Hn=P=>{ze.value=P.detail,r.onFullscreenChange&&typeof r.onFullscreenChange=="function"&&r.onFullscreenChange(ze.value),setTimeout(()=>{window.dispatchEvent(new CustomEvent("timeline-container-resized",{detail:{source:"fullscreen-toggle"}}))},500)},aa=()=>{ze.value||(ze.value=!0,r.onFullscreenChange&&typeof r.onFullscreenChange=="function"&&r.onFullscreenChange(!0),setTimeout(()=>{window.dispatchEvent(new CustomEvent("timeline-container-resized",{detail:{source:"fullscreen-toggle"}}))},500))},rn=()=>{ze.value&&(ze.value=!1,r.onFullscreenChange&&typeof r.onFullscreenChange=="function"&&r.onFullscreenChange(!1),setTimeout(()=>{window.dispatchEvent(new CustomEvent("timeline-container-resized",{detail:{source:"fullscreen-toggle"}}))},500))},In=()=>{ze.value?rn():aa()},_r=()=>ze.value;a.watch(()=>r.fullscreen,P=>{P!==void 0&&P!==ze.value&&(P?aa():rn())},{immediate:!0});const Xn=(P,ue)=>{const ke=P.findIndex(Ge=>Ge.id===ue.id);return ke!==-1?(P.splice(ke,1,{...P[ke],...ue}),!0):(P.push(ue),!0)},sa=P=>{P.id||(P.id=Date.now()),P.type="milestone",r.milestones&&Xn(r.milestones,P),s("milestone-saved",P),be.value++,jr.value&&wr()},nn=(P,ue,ke)=>{const Ge=P.findIndex(nt=>nt.id===ue);return Ge!==-1?(P.splice(Ge,1,{...P[Ge],icon:ke}),!0):!1},Jn=P=>{const{milestoneId:ue,icon:ke}=P.detail;r.milestones&&nn(r.milestones,ue,ke),s("milestone-icon-changed",{milestoneId:ue,icon:ke}),be.value++},oa=(P,ue)=>{const ke=P.findIndex(Ge=>Ge.id===ue);return ke!==-1?(P.splice(ke,1),!0):!1},Er=()=>{be.value++},$a=()=>{be.value++,a.nextTick(()=>{})};a.onMounted(()=>{a.nextTick(()=>{Ae.value&&typeof Ae.value.scrollToTodayCenter=="function"&&Ae.value.scrollToTodayCenter()})});const qa=()=>{if(r.onTodayLocate&&typeof r.onTodayLocate=="function"){r.onTodayLocate();return}if(Ae.value&&typeof Ae.value.scrollToTodayCenter=="function"){Ae.value.scrollToTodayCenter();return}Pn()},ja=()=>{s("add-milestone"),r.useDefaultMilestoneDialog&&ns()},ns=()=>{wn.value=null,jr.value=!0},Pn=()=>{if(Ae.value&&typeof Ae.value.scrollToToday=="function"){Ae.value.scrollToToday();return}const P=new Date,ue=P.getMonth(),ke=P.getDate();let Ge=0;for(let re=0;re<ue;re++)Ge+=new Date(P.getFullYear(),re+1,0).getDate();Ge+=ke;const nt=document.querySelector(".gantt-panel-right"),v=nt==null?void 0:nt.clientWidth,I=v?v/2:200,q=(Ge-1)*30-I;nt&&(nt.scrollLeft=Math.max(0,q))},Sa=()=>{Ae.value&&typeof Ae.value.scrollToTodayCenter=="function"?Ae.value.scrollToTodayCenter():Pn()},Fa=P=>{const ue=(ke,Ge)=>{for(const nt of ke){if(nt.id===Ge||String(nt.id)===String(Ge))return nt;if(nt.children&&nt.children.length>0){const v=ue(nt.children,Ge);if(v)return v}}return null};if(r.tasks){const ke=ue(r.tasks,P);ke&&ke.startDate&&Ae.value&&typeof Ae.value.scrollToDate=="function"&&Ae.value.scrollToDate(ke.startDate)}},Mn=P=>{Ae.value&&typeof Ae.value.scrollToDate=="function"&&Ae.value.scrollToDate(P)},Hs=P=>{s("resource-usage-task-detail-click",P),Te("task"),a.nextTick(()=>{Fa(P.taskId)})},ps=()=>Lt.value,va=P=>{const{setLocale:ue}=_s();ue(P)};a.watch(()=>r.locale,P=>{if(P&&P!==Lt.value){const{setLocale:ue}=_s();ue(P)}},{immediate:!0});const It=()=>{const P=ge(se.value);P!==se.value&&(se.value=P)};r.localeMessages&&Object.keys(r.localeMessages).forEach(P=>{const ue=r.localeMessages[P];ue&&Vm(P,ue)}),a.watch(()=>r.localeMessages,P=>{P&&Object.keys(P).forEach(ue=>{const ke=P[ue];ke&&Vm(ue,ke)})},{deep:!0});const ce=a.ref({x:0,y:0}),Ye=a.ref(!1),At=a.ref(null),Ot=a.ref(!1),Ht=a.ref(null),nr=a.ref(!1),Vr=a.ref(null);a.watch(Ot,P=>{var ue;P||(ue=Vr.value)==null||ue.clearSelection()});const Sn=a.computed(()=>{const P=[...r.tasks||[]];if(r.milestones&&r.milestones.length>0&&P.push(...r.milestones),r.resources&&r.resources.length>0){const ue=new Set(P.map(ke=>ke.id));for(const ke of r.resources)if(!(!ke.tasks||!Array.isArray(ke.tasks)))for(const Ge of ke.tasks)ue.has(Ge.id)||(ue.add(Ge.id),P.push(Ge))}return P}),jr=a.ref(!1),wn=a.ref(null),fn=a.ref(null),yn=a.ref(null),Ps=P=>{const{task:ue,position:ke}=P.detail;At.value=ue,ce.value=ke,Ye.value=!0},gr=()=>{Ye.value=!1};function cA(){if(s("add-task"),r.useDefaultDrawer){const P={id:Date.now(),name:"",type:"task",assignee:"",startDate:"",endDate:"",predecessor:[],estimatedHours:0,actualHours:0,progress:0,description:"",parentId:void 0,children:[],resources:[]};Ht.value=P,nr.value=!1,Ot.value=!0}}function Co(P){if(s("calendar-selection-complete",P),r.useDefaultDrawer){const ue=nt=>{const v=nt.getFullYear(),I=String(nt.getMonth()+1).padStart(2,"0"),q=String(nt.getDate()).padStart(2,"0"),re=String(nt.getHours()).padStart(2,"0"),he=String(nt.getMinutes()).padStart(2,"0");return`${v}-${I}-${q} ${re}:${he}`},ke=P.resourceId?(r.resources??[]).find(nt=>String(nt.id)===String(P.resourceId)):void 0,Ge={id:Date.now(),name:"",type:"task",assignee:"",startDate:ue(P.startDate),endDate:ue(P.endDate),predecessor:[],estimatedHours:0,actualHours:0,progress:0,description:"",parentId:void 0,children:[],resources:ke?[{id:ke.id,name:ke.name,capacity:100,tasks:[]}]:[]};Ht.value=Ge,nr.value=!1,Ot.value=!0}}function qo(P,ue){s("calendar-task-click",P,ue),r.useDefaultDrawer&&Re(P)&&typeof P.id=="number"&&(Ht.value=P,nr.value=!0,Ot.value=!0)}function fo(P){tr(P.task,!0),be.value++,s("calendar-task-move",P)}const pe=P=>{qt(P.id,ue=>{ue.isTimerRunning=!0,ue.timerStartTime=P.timerStartTime||Date.now(),ue.timerEndTime=void 0,ue.timerElapsedTime=0}),gr(),s("timer-started",P)},Le=P=>{qt(P.id,ue=>{if(ue.isTimerRunning&&ue.timerStartTime!==void 0){const ke=ue.timerElapsedTime||0;ue.timerElapsedTime=ke+(Date.now()-ue.timerStartTime),ue.timerEndTime=Date.now()}ue.isTimerRunning=!1,Ot.value&&Ht.value&&Ht.value.id===P.id&&(Ht.value.isTimerRunning=!1,Ht.value.timerEndTime=Date.now())}),gr(),s("timer-stopped",P)};function Je(P,ue){s("task-click",P,ue)}function Re(P){return P&&typeof P=="object"&&!("tasks"in P&&Array.isArray(P.tasks)&&!("resources"in P))}function mt(P){s("task-double-click",P),r.useDefaultDrawer&&Re(P)&&typeof P.id=="number"&&(Ht.value=P,nr.value=!0,Ot.value=!0)}function kt(P){if(!P)return;s("add-predecessor",P),fn.value=P;const ue={id:Date.now(),name:"",type:"task",assignee:"",startDate:"",endDate:"",predecessor:[],estimatedHours:0,actualHours:0,progress:0,description:"",parentId:P.parentId,children:[],resources:[],isTimerRunning:!1,timerStartTime:void 0,timerEndTime:void 0,timerElapsedTime:0};Ht.value=ue,nr.value=!1,Ot.value=!0}function at(P){if(!P)return;s("add-successor",P),yn.value=P;const ue={id:Date.now(),name:"",type:"task",assignee:"",startDate:"",endDate:"",predecessor:[P.id],estimatedHours:0,actualHours:0,progress:0,description:"",parentId:P.parentId,children:[],resources:[],isTimerRunning:!1,timerStartTime:void 0,timerEndTime:void 0,timerElapsedTime:0};Ht.value=ue,nr.value=!1,Ot.value=!0}function st(P){s("predecessor-added",P)}function Ct(P){s("successor-added",P)}const Tt=(P,ue)=>{if(!ue.parentId)return P.push(ue),!0;for(const ke of P){if(ke.id===ue.parentId)return ke.children||(ke.children=[]),ke.children.push(ue),!0;if(ke.children&&ke.children.length>0&&Tt(ke.children,ue))return!0}return!1},Wt=(P,ue)=>{for(let ke=0;ke<P.length;ke++){if(P[ke].id===ue.id)return P[ke]={...P[ke],...ue},!0;if(P[ke].children&&P[ke].children.length>0&&Wt(P[ke].children,ue))return!0}return!1},tr=(P,ue=!1)=>{Ke.value=P.id;const ke=new Set;if(r.tasks&&Wt(r.tasks,P),(h.value==="resource"||h.value==="calendar"||h.value==="resource-usage")&&r.resources&&r.resources){let nt=null,v=null,I=-1;for(const q of r.resources){const re=q.tasks.findIndex(he=>he.id===P.id);if(re!==-1){nt=q.id,v=q,I=re,ke.add(q.id);break}}if(v&&I!==-1)if(!ue&&P.assignee&&P.assignee!==nt){v.tasks.splice(I,1);const q=r.resources.find(re=>re.id===P.assignee);q&&(q.tasks.push({...P}),ke.add(q.id))}else v.tasks[I]={...v.tasks[I],...P};else if(P.assignee){const q=r.resources.find(re=>re.id===P.assignee);q&&(q.tasks.push({...P}),ke.add(q.id))}}Xe.value=ke},zt=P=>{if(!(!(h.value==="resource"||h.value==="calendar"||h.value==="resource-usage")||!r.resources)){if(P.resources&&P.resources.length>0)P.resources.forEach(ke=>{const Ge=r.resources.find(nt=>nt.id===ke.id);Ge&&(Ge.tasks.find(v=>v.id===P.id)||Ge.tasks.push({...P}))});else if(P.assignee){const ke=Array.isArray(P.assignee)?P.assignee[0]:P.assignee,Ge=r.resources.find(nt=>nt.id===ke);Ge&&(Ge.tasks.find(v=>v.id===P.id)||Ge.tasks.push({...P}))}}},qt=(P,ue)=>{const ke=nt=>{var v;for(let I=0;I<nt.length;I++){if(nt[I].id===P)return ue(nt[I]),!0;if((v=nt[I].children)!=null&&v.length&&ke(nt[I].children))return!0}return!1};let Ge=!1;return r.tasks&&(Ge=ke(r.tasks)),Ge&&h.value==="resource"&&r.resources&&r.resources.forEach(nt=>{const v=nt.tasks.find(I=>I.id===P);v&&ue(v)}),Ge};function Dr(P){nr.value?(tr(P),be.value++,s("task-updated",{task:P})):(r.tasks&&Tt(r.tasks,P),zt(P),be.value++,s("task-added",{task:P}),fn.value&&(fn.value.predecessor||(fn.value.predecessor=[]),fn.value.predecessor.push(P.id),s("predecessor-added",{targetTask:fn.value,newTask:P}),fn.value=null),yn.value&&(s("successor-added",{targetTask:yn.value,newTask:P}),yn.value=null))}function Sr(P,ue,ke){for(let Ge=0;Ge<P.length;Ge++){if(P[Ge].id===ue){if(ke)P.splice(Ge,1);else{const nt=P[Ge].children||[];P.splice(Ge,1,...nt)}return!0}if(P[Ge].children&&P[Ge].children.length>0&&Sr(P[Ge].children,ue,ke))return!0}return!1}function Yt(P,ue){r.tasks&&Sr(r.tasks,P.id,ue),h.value==="resource"&&r.resources&&r.resources.forEach(ke=>{const Ge=ke.tasks.findIndex(nt=>nt.id===P.id);Ge!==-1&&ke.tasks.splice(Ge,1)}),Ot.value=!1,Ht.value=null,s("task-deleted",{task:P})}function pr(P){if(r.tasks){const ue=ke=>{for(let Ge=0;Ge<ke.length;Ge++){if(ke[Ge].id===P.targetTaskId)return ke[Ge]={...ke[Ge],predecessor:P.updatedTask.predecessor},!0;if(ke[Ge].children&&ke[Ge].children.length>0&&ue(ke[Ge].children))return!0}return!1};ue(r.tasks)}s("task-updated",{task:P.updatedTask}),s("link-deleted",P)}function Wr(P){s("resource-drag-end",P)}function Bn(P){s("milestone-double-click",P),r.useDefaultMilestoneDialog&&(wn.value=P,jr.value=!0)}function wr(){jr.value=!1,wn.value=null}function Br(P){r.milestones&&oa(r.milestones,P),s("milestone-deleted",{milestoneId:P}),be.value++,wr()}return t({enterFullscreen:aa,exitFullscreen:rn,toggleFullscreen:In,isFullscreen:_r,expandAll:St,collapseAll:hr,toggleExpandAll:Vt,isExpandAll:Xt,scrollToToday:Sa,scrollToTask:Fa,scrollToDate:Mn,setLocale:va,currentLocale:ps,setTimeScale:xa,zoomIn:Ra,zoomOut:na,currentScale:Ss,setTheme:jt,currentTheme:We,getTaskListVisible:()=>Oe.value,setTaskListVisible:P=>{r.enableTaskListCollapsible&&(Oe.value=P)},toggleTaskList:z,setLinkConfig:P=>{o.value={...o.value,...P}},getLinkConfig:()=>({...xp,...o.value})}),(P,ue)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"ganttRootRef",ref:A,class:a.normalizeClass(["gantt-root",{"gantt-fullscreen":ze.value,"splitter-dragging":ot.value}])},[r.showToolbar?(a.openBlock(),a.createBlock(fF,{key:0,config:r.toolbarConfig,"time-scale":Pe.value,theme:H.value,fullscreen:ze.value,"expand-all":Xt(),"view-mode":h.value,"available-view-modes":r.availableViewModes,"on-today-locate":qa,"on-export-csv":ra,"on-export-pdf":Un,"on-language-change":r.onLanguageChange,"on-fullscreen-change":r.onFullscreenChange,"on-settings-confirm":r.onSettingsConfirm,"on-time-scale-change":xn,"on-expand-all":tt,"on-collapse-all":rr,"on-view-mode-change":Te,onAddTask:cA,onAddMilestone:ja,onExpandAll:tt,onCollapseAll:rr,onThemeChange:ln},null,8,["config","time-scale","theme","fullscreen","expand-all","view-mode","available-view-modes","on-language-change","on-fullscreen-change","on-settings-confirm"])):a.createCommentVNode("",!0),a.createElementVNode("div",o8,[h.value==="calendar"?(a.openBlock(),a.createBlock(Pb,a.mergeProps({key:0,ref_key:"calendarViewRef",ref:Vr,class:"gantt-panel-full-view",tasks:Sn.value,resources:r.resources,"working-hours":r.workingHours,scale:Nr.value},r.calendarProps,{onSelectionComplete:Co,onSelectionCancel:ue[0]||(ue[0]=ke=>s("calendar-selection-cancel",ke)),onResourceChange:ue[1]||(ue[1]=ke=>s("calendar-resource-change",ke)),onViewChange:ue[2]||(ue[2]=ke=>s("calendar-view-change",ke)),onDateChange:ue[3]||(ue[3]=ke=>s("calendar-date-change",ke)),onTaskClick:qo,onTaskMove:fo}),null,16,["tasks","resources","working-hours","scale"])):h.value==="resource-usage"?(a.openBlock(),a.createBlock(Wb,a.mergeProps({key:1,class:"gantt-panel-full-view",resources:r.resources,"resource-list-config":r.resourceListConfig,"column-render-mode":r.taskListColumnRenderMode,scale:dn.value,"date-range":Gn.value,"scale-configs":rt.value},r.resourceUsageProps,{onScaleChange:ue[4]||(ue[4]=ke=>s("resource-usage-scale-change",ke)),onCellClick:ue[5]||(ue[5]=ke=>s("resource-usage-cell-click",ke)),onCellHover:ue[6]||(ue[6]=ke=>s("resource-usage-cell-hover",ke)),onOverloadDetected:ue[7]||(ue[7]=ke=>s("resource-usage-overload-detected",ke)),onTaskDetailClick:Hs}),a.createSlots({_:2},[P.$slots.default?{name:"default",fn:a.withCtx(()=>[a.renderSlot(P.$slots,"default",{},void 0,!0)]),key:"0"}:void 0]),1040,["resources","resource-list-config","column-render-mode","scale","date-range","scale-configs"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[Oe.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gantt-panel gantt-panel-left",style:a.normalizeStyle({width:se.value+"px"})},[a.createVNode(Iv,{ref_key:"taskListComponentRef",ref:l,tasks:cr.value,"use-default-drawer":r.useDefaultDrawer,"task-list-config":r.taskListConfig,"task-list-column-render-mode":r.taskListColumnRenderMode,"enable-task-row-move":r.enableTaskRowMove,"task-list-row-class-name":r.taskListRowClassName,"task-list-row-style":r.taskListRowStyle,"enable-parent-task-auto-schedule":r.enableParentTaskAutoSchedule,onTaskCollapseChange:Mt,onStartTimer:pe,onStopTimer:Le,onAddPredecessor:kt,onAddSuccessor:at,onDelete:Yt,onTaskRowMoved:_t},a.createSlots({_:2},[P.$slots.default?{name:"default",fn:a.withCtx(()=>[a.renderSlot(P.$slots,"default",{},void 0,!0)]),key:"0"}:void 0,P.$slots["custom-task-content"]?{name:"custom-task-content",fn:a.withCtx(ke=>[a.renderSlot(P.$slots,"custom-task-content",a.normalizeProps(a.guardReactiveProps(ke)),void 0,!0)]),key:"1"}:void 0]),1032,["tasks","use-default-drawer","task-list-config","task-list-column-render-mode","enable-task-row-move","task-list-row-class-name","task-list-row-style","enable-parent-task-auto-schedule"])],4)):a.createCommentVNode("",!0),r.enableTaskListCollapsible?(a.openBlock(),a.createElementBlock("div",{key:1,class:"gantt-splitter",onMousedown:pt},[a.createElementVNode("div",{class:a.normalizeClass(["task-list-toggle",{collapsed:!Oe.value,[W.value]:it.value}]),title:Oe.value?ar.value:Rt.value,onClick:a.withModifiers(z,["stop"])},[(a.openBlock(),a.createElementBlock("svg",i8,[Oe.value?(a.openBlock(),a.createElementBlock("polyline",l8)):(a.openBlock(),a.createElementBlock("polyline",c8))]))],10,A8)],32)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["gantt-panel gantt-panel-right",{"full-width":!Oe.value}])},[a.createVNode(Fb,{ref_key:"timelineRef",ref:Ae,tasks:qr.value,milestones:Fr.value,"start-date":Jr.value.min,"end-date":Jr.value.max,"scale-configs":rt.value,"working-hours":r.workingHours,"task-bar-config":r.taskBarConfig,"allow-drag-and-resize":r.allowDragAndResize,"show-actual-taskbar":r.showActualTaskbar,"enable-task-bar-tooltip":r.enableTaskBarTooltip,"enable-milestone-tooltip":r.enableMilestoneTooltip,"milestone-label-position":r.milestoneLabelPosition,"enable-parent-task-auto-schedule":r.enableParentTaskAutoSchedule,"link-config":i.value,"pending-task-background-color":r.pendingTaskBackgroundColor,"delay-task-background-color":r.delayTaskBackgroundColor,"complete-task-background-color":r.completeTaskBackgroundColor,"ongoing-task-background-color":r.ongoingTaskBackgroundColor,"use-default-drawer":r.useDefaultDrawer,"use-default-milestone-dialog":r.useDefaultMilestoneDialog,"on-milestone-save":sa,onTimelineScaleChanged:zn,onClickTask:Je,onEditTask:mt,onMilestoneDoubleClick:Bn,onStartTimer:pe,onStopTimer:Le,onAddPredecessor:kt,onAddSuccessor:at,onPredecessorAdded:st,onSuccessorAdded:Ct,onDelete:Yt,onLinkDeleted:pr,onResourceDragEnd:Wr},a.createSlots({_:2},[P.$slots["custom-task-content"]?{name:"custom-task-content",fn:a.withCtx(ke=>[a.renderSlot(P.$slots,"custom-task-content",a.normalizeProps(a.guardReactiveProps(ke)),void 0,!0)]),key:"0"}:void 0,P.$slots["taskbar-tooltip"]?{name:"taskbar-tooltip",fn:a.withCtx(ke=>[a.renderSlot(P.$slots,"taskbar-tooltip",a.normalizeProps(a.guardReactiveProps(ke)),void 0,!0)]),key:"1"}:void 0,P.$slots["milestone-tooltip"]?{name:"milestone-tooltip",fn:a.withCtx(ke=>[a.renderSlot(P.$slots,"milestone-tooltip",a.normalizeProps(a.guardReactiveProps(ke)),void 0,!0)]),key:"2"}:void 0,P.$slots["custom-milestone-content"]?{name:"custom-milestone-content",fn:a.withCtx(ke=>[a.renderSlot(P.$slots,"custom-milestone-content",a.normalizeProps(a.guardReactiveProps(ke)),void 0,!0)]),key:"3"}:void 0]),1032,["tasks","milestones","start-date","end-date","scale-configs","working-hours","task-bar-config","allow-drag-and-resize","show-actual-taskbar","enable-task-bar-tooltip","enable-milestone-tooltip","milestone-label-position","enable-parent-task-auto-schedule","link-config","pending-task-background-color","delay-task-background-color","complete-task-background-color","ongoing-task-background-color","use-default-drawer","use-default-milestone-dialog"]),Et.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"focus-close-button",onClick:a.withModifiers(uo,["stop"])},[ue[11]||(ue[11]=a.createElementVNode("svg",{class:"close-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),a.createElementVNode("span",u8,a.toDisplayString(a.unref(ft).disableTaskbarFocusMode),1)])):a.createCommentVNode("",!0)],2)],64))]),r.useDefaultDrawer?(a.openBlock(),a.createBlock(Lb,{key:1,visible:Ot.value,"onUpdate:visible":ue[8]||(ue[8]=ke=>Ot.value=ke),task:Ht.value,"is-edit":nr.value,"assignee-options":r.assigneeOptions,"resource-type-options":r.resourceTypeOptions,"show-resource-type-option":r.showResourceTypeOption,"pending-task-background-color":r.pendingTaskBackgroundColor,"delay-task-background-color":r.delayTaskBackgroundColor,"complete-task-background-color":r.completeTaskBackgroundColor,"ongoing-task-background-color":r.ongoingTaskBackgroundColor,"enable-close-on-overlay-click":r.enableTaskDrawerAutoClose,onSubmit:Dr,onClose:ue[9]||(ue[9]=ke=>Ot.value=!1),onStartTimer:pe,onStopTimer:Le,onDelete:Yt},null,8,["visible","task","is-edit","assignee-options","resource-type-options","show-resource-type-option","pending-task-background-color","delay-task-background-color","complete-task-background-color","ongoing-task-background-color","enable-close-on-overlay-click"])):a.createCommentVNode("",!0),r.useDefaultMilestoneDialog?(a.openBlock(),a.createBlock(Ub,{key:2,visible:jr.value,"onUpdate:visible":ue[10]||(ue[10]=ke=>jr.value=ke),milestone:wn.value,onClose:wr,onSave:sa,onDelete:Br},null,8,["visible","milestone"])):a.createCommentVNode("",!0)],2))}}),H5=un(d8,[["__scopeId","data-v-8ae83c7c"]]),P5=a.defineComponent({name:"TaskListColumn",__name:"TaskListColumn",props:{prop:{},label:{},width:{},align:{default:"left"},cssClass:{},fixed:{type:[String,Boolean]}},setup(n){return(t,e)=>null}}),V5=a.defineComponent({name:"TaskListContextMenu",__name:"TaskListContextMenu",props:{taskType:{}},setup(n){return(t,e)=>null}}),W5=a.defineComponent({name:"TaskBarContextMenu",__name:"TaskBarContextMenu",props:{taskType:{}},setup(n){return(t,e)=>null}}),K5=n=>{n.component("GanttChart",H5),n.component("TaskListColumn",P5),n.component("TaskListContextMenu",V5),n.component("TaskBarContextMenu",W5)},f8={install:K5};/*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */function Dw(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function h8(n){if(Array.isArray(n))return n}function g8(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,s,o,i,A=[],l=!0,c=!1;try{if(o=(e=e.call(n)).next,t!==0)for(;!(l=(r=o.call(e)).done)&&(A.push(r.value),A.length!==t);l=!0);}catch(u){c=!0,s=u}finally{try{if(!l&&e.return!=null&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw s}}return A}}function p8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v8(n,t){return h8(n)||g8(n,t)||m8(n,t)||p8()}function m8(n,t){if(n){if(typeof n=="string")return Dw(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Dw(n,t):void 0}}const $5=Object.entries,Tw=Object.setPrototypeOf,w8=Object.isFrozen,y8=Object.getPrototypeOf,B8=Object.getOwnPropertyDescriptor;let fs=Object.freeze,hs=Object.seal,al=Object.create,q5=typeof Reflect<"u"&&Reflect,gv=q5.apply,pv=q5.construct;fs||(fs=function(t){return t});hs||(hs=function(t){return t});gv||(gv=function(t,e){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return t.apply(e,s)});pv||(pv=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),s=1;s<e;s++)r[s-1]=arguments[s];return new t(...r)});const Xi=_a(Array.prototype.forEach),b8=_a(Array.prototype.lastIndexOf),xw=_a(Array.prototype.pop),Ji=_a(Array.prototype.push),C8=_a(Array.prototype.splice),zA=Array.isArray,zl=_a(String.prototype.toLowerCase),_f=_a(String.prototype.toString),Sw=_a(String.prototype.match),Ol=_a(String.prototype.replace),Fw=_a(String.prototype.indexOf),k8=_a(String.prototype.trim),E8=_a(Number.prototype.toString),D8=_a(Boolean.prototype.toString),Lw=typeof BigInt>"u"?null:_a(BigInt.prototype.toString),Uw=typeof Symbol>"u"?null:_a(Symbol.prototype.toString),es=_a(Object.prototype.hasOwnProperty),Hl=_a(Object.prototype.toString),Za=_a(RegExp.prototype.test),hi=T8(TypeError);function _a(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),s=1;s<e;s++)r[s-1]=arguments[s];return gv(n,t,r)}}function T8(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return pv(n,e)}}function sn(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zl;if(Tw&&Tw(n,null),!zA(t))return n;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const o=e(s);o!==s&&(w8(t)||(t[r]=o),s=o)}n[s]=!0}return n}function x8(n){for(let t=0;t<n.length;t++)es(n,t)||(n[t]=null);return n}function Qs(n){const t=al(null);for(const r of $5(n)){var e=v8(r,2);const s=e[0],o=e[1];es(n,s)&&(zA(o)?t[s]=x8(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=Qs(o):t[s]=o)}return t}function S8(n){switch(typeof n){case"string":return n;case"number":return E8(n);case"boolean":return D8(n);case"bigint":return Lw?Lw(n):"0";case"symbol":return Uw?Uw(n):"Symbol()";case"undefined":return Hl(n);case"function":case"object":{if(n===null)return Hl(n);const t=n,e=nA(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:Hl(r)}return Hl(n)}default:return Hl(n)}}function nA(n,t){for(;n!==null;){const r=B8(n,t);if(r){if(r.get)return _a(r.get);if(typeof r.value=="function")return _a(r.value)}n=y8(n)}function e(){return null}return e}function F8(n){try{return Za(n,""),!0}catch{return!1}}const Iw=fs(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Rf=fs(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Of=fs(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L8=fs(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Hf=fs(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),U8=fs(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mw=fs(["#text"]),Qw=fs(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Pf=fs(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nw=fs(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Eu=fs(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),I8=hs(/{{[\w\W]*|^[\w\W]*}}/g),M8=hs(/<%[\w\W]*|^[\w\W]*%>/g),Q8=hs(/\${[\w\W]*/g),N8=hs(/^data-[\-\w.\u00B7-\uFFFF]+$/),_8=hs(/^aria-[\-\w]+$/),_w=hs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),R8=hs(/^(?:\w+script|data):/i),O8=hs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H8=hs(/^html$/i),P8=hs(/^[a-z][.\w]*(-[.\w]+)+$/i),Rw=hs(/<[/\w!]/g),Ow=hs(/<[/\w]/g),V8=hs(/<\/no(script|embed|frames)/i),W8=hs(/\/>/i),io={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},K8=function(){return typeof window>"u"?null:window},$8=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(r=e.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Hw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},$A=function(t,e,r,s){return es(t,e)&&zA(t[e])?sn(s.base?Qs(s.base):{},t[e],s.transform):r};function j5(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K8();const t=It=>j5(It);if(t.version="3.4.12",t.removed=[],!n||!n.document||n.document.nodeType!==io.document||!n.Element)return t.isSupported=!1,t;let e=n.document;const r=e,s=r.currentScript;n.DocumentFragment;const o=n.HTMLTemplateElement,i=n.Node,A=n.Element,l=n.NodeFilter,c=n.NamedNodeMap;c===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const u=n.DOMParser,h=n.trustedTypes,g=A.prototype,d=nA(g,"cloneNode"),m=nA(g,"remove"),y=nA(g,"nextSibling"),B=nA(g,"childNodes"),w=nA(g,"parentNode"),E=nA(g,"shadowRoot"),x=nA(g,"attributes"),b=i&&i.prototype?nA(i.prototype,"nodeType"):null,H=i&&i.prototype?nA(i.prototype,"nodeName"):null;if(typeof o=="function"){const It=e.createElement("template");It.content&&It.content.ownerDocument&&(e=It.content.ownerDocument)}let $,Y="",V,L=!1,j=0;const D=function(){if(j>0)throw hi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},S=function(ce){D(),j++;try{return $.createHTML(ce)}finally{j--}},Q=function(ce){D(),j++;try{return $.createScriptURL(ce)}finally{j--}},T=function(){return L||(V=$8(h,s),L=!0),V},oe=e,X=oe.implementation,F=oe.createNodeIterator,M=oe.createDocumentFragment,R=oe.getElementsByTagName,ae=r.importNode;let J=Hw();t.isSupported=typeof $5=="function"&&typeof w=="function"&&X&&X.createHTMLDocument!==void 0;const k=I8,O=M8,N=Q8,Z=N8,se=_8,ge=R8,fe=O8,Ae=P8;let Fe=_w,be=null;const Ke=sn({},[...Iw,...Rf,...Of,...Hf,...Mw]);let Xe=null;const xe=sn({},[...Qw,...Pf,...Nw,...Eu]);let te=Object.seal(al(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),lt=null,Pe=null;const rt=Object.seal(al(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,Et=!0,ot=!1,yt=!0,pt=!1,Oe=!0,it=!1,W=!1,z=null,ye=null,qe=!1,ct=!1,$e=!1,Ve=!1,Mt=!0,tt=!1;const _t="user-content-";let rr=!0,St=!1,hr={},Vt=null;const Xt=sn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let mr=null;const Kt=sn({},["audio","video","img","source","image","track"]);let jt=null;const We=sn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let ar=Lt,Rt=!1,cr=null;const qr=sn({},[ze,ft,Lt],_f),Kr=fs(["mi","mo","mn","ms","mtext"]);let on=sn({},Kr);const Fr=fs(["annotation-xml"]);let Jr=sn({},Fr);const An=sn({},["title","style","font","a","script"]);let ta=null;const ra=["application/xhtml+xml","text/html"],xn="text/html";let Nr=null,dn=null;const Gn=e.createElement("form"),zn=function(ce){return ce instanceof RegExp||ce instanceof Function},ln=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(dn&&dn===ce)return;(!ce||typeof ce!="object")&&(ce={}),ce=Qs(ce),ta=ra.indexOf(ce.PARSER_MEDIA_TYPE)===-1?xn:ce.PARSER_MEDIA_TYPE,Nr=ta==="application/xhtml+xml"?_f:zl,be=$A(ce,"ALLOWED_TAGS",Ke,{transform:Nr}),Xe=$A(ce,"ALLOWED_ATTR",xe,{transform:Nr}),cr=$A(ce,"ALLOWED_NAMESPACES",qr,{transform:_f}),jt=$A(ce,"ADD_URI_SAFE_ATTR",We,{transform:Nr,base:We}),mr=$A(ce,"ADD_DATA_URI_TAGS",Kt,{transform:Nr,base:Kt}),Vt=$A(ce,"FORBID_CONTENTS",Xt,{transform:Nr}),lt=$A(ce,"FORBID_TAGS",Qs({}),{transform:Nr}),Pe=$A(ce,"FORBID_ATTR",Qs({}),{transform:Nr}),hr=es(ce,"USE_PROFILES")?ce.USE_PROFILES&&typeof ce.USE_PROFILES=="object"?Qs(ce.USE_PROFILES):ce.USE_PROFILES:!1,Te=ce.ALLOW_ARIA_ATTR!==!1,Et=ce.ALLOW_DATA_ATTR!==!1,ot=ce.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pt=ce.SAFE_FOR_TEMPLATES||!1,Oe=ce.SAFE_FOR_XML!==!1,it=ce.WHOLE_DOCUMENT||!1,ct=ce.RETURN_DOM||!1,$e=ce.RETURN_DOM_FRAGMENT||!1,Ve=ce.RETURN_TRUSTED_TYPE||!1,qe=ce.FORCE_BODY||!1,Mt=ce.SANITIZE_DOM!==!1,tt=ce.SANITIZE_NAMED_PROPS||!1,rr=ce.KEEP_CONTENT!==!1,St=ce.IN_PLACE||!1,Fe=F8(ce.ALLOWED_URI_REGEXP)?ce.ALLOWED_URI_REGEXP:_w,ar=typeof ce.NAMESPACE=="string"?ce.NAMESPACE:Lt,on=es(ce,"MATHML_TEXT_INTEGRATION_POINTS")&&ce.MATHML_TEXT_INTEGRATION_POINTS&&typeof ce.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qs(ce.MATHML_TEXT_INTEGRATION_POINTS):sn({},Kr),Jr=es(ce,"HTML_INTEGRATION_POINTS")&&ce.HTML_INTEGRATION_POINTS&&typeof ce.HTML_INTEGRATION_POINTS=="object"?Qs(ce.HTML_INTEGRATION_POINTS):sn({},Fr);const Ye=es(ce,"CUSTOM_ELEMENT_HANDLING")&&ce.CUSTOM_ELEMENT_HANDLING&&typeof ce.CUSTOM_ELEMENT_HANDLING=="object"?Qs(ce.CUSTOM_ELEMENT_HANDLING):al(null);if(te=al(null),es(Ye,"tagNameCheck")&&zn(Ye.tagNameCheck)&&(te.tagNameCheck=Ye.tagNameCheck),es(Ye,"attributeNameCheck")&&zn(Ye.attributeNameCheck)&&(te.attributeNameCheck=Ye.attributeNameCheck),es(Ye,"allowCustomizedBuiltInElements")&&typeof Ye.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=Ye.allowCustomizedBuiltInElements),hs(te),pt&&(Et=!1),$e&&(ct=!0),hr&&(be=sn({},Mw),Xe=al(null),hr.html===!0&&(sn(be,Iw),sn(Xe,Qw)),hr.svg===!0&&(sn(be,Rf),sn(Xe,Pf),sn(Xe,Eu)),hr.svgFilters===!0&&(sn(be,Of),sn(Xe,Pf),sn(Xe,Eu)),hr.mathMl===!0&&(sn(be,Hf),sn(Xe,Nw),sn(Xe,Eu))),rt.tagCheck=null,rt.attributeCheck=null,es(ce,"ADD_TAGS")&&(typeof ce.ADD_TAGS=="function"?rt.tagCheck=ce.ADD_TAGS:zA(ce.ADD_TAGS)&&(be===Ke&&(be=Qs(be)),sn(be,ce.ADD_TAGS,Nr))),es(ce,"ADD_ATTR")&&(typeof ce.ADD_ATTR=="function"?rt.attributeCheck=ce.ADD_ATTR:zA(ce.ADD_ATTR)&&(Xe===xe&&(Xe=Qs(Xe)),sn(Xe,ce.ADD_ATTR,Nr))),es(ce,"ADD_URI_SAFE_ATTR")&&zA(ce.ADD_URI_SAFE_ATTR)&&sn(jt,ce.ADD_URI_SAFE_ATTR,Nr),es(ce,"FORBID_CONTENTS")&&zA(ce.FORBID_CONTENTS)&&(Vt===Xt&&(Vt=Qs(Vt)),sn(Vt,ce.FORBID_CONTENTS,Nr)),es(ce,"ADD_FORBID_CONTENTS")&&zA(ce.ADD_FORBID_CONTENTS)&&(Vt===Xt&&(Vt=Qs(Vt)),sn(Vt,ce.ADD_FORBID_CONTENTS,Nr)),rr&&(be["#text"]=!0),it&&sn(be,["html","head","body"]),be.table&&(sn(be,["tbody"]),delete lt.tbody),ce.TRUSTED_TYPES_POLICY){if(typeof ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw hi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw hi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const At=$;$=ce.TRUSTED_TYPES_POLICY;try{Y=S("")}catch(Ot){throw $=At,Ot}}else ce.TRUSTED_TYPES_POLICY===null?($=void 0,Y=""):($===void 0&&($=T()),$&&typeof Y=="string"&&(Y=S("")));fs&&fs(ce),dn=ce},En=sn({},[...Rf,...Of,...L8]),xa=sn({},[...Hf,...U8]),Ra=function(ce,Ye,At){return Ye.namespaceURI===Lt?ce==="svg":Ye.namespaceURI===ze?ce==="svg"&&(At==="annotation-xml"||on[At]):!!En[ce]},na=function(ce,Ye,At){return Ye.namespaceURI===Lt?ce==="math":Ye.namespaceURI===ft?ce==="math"&&Jr[At]:!!xa[ce]},Ss=function(ce,Ye,At){return Ye.namespaceURI===ft&&!Jr[At]||Ye.namespaceURI===ze&&!on[At]?!1:!xa[ce]&&(An[ce]||!En[ce])},uo=function(ce){let Ye=w(ce);(!Ye||!Ye.tagName)&&(Ye={namespaceURI:ar,tagName:"template"});const At=zl(ce.tagName),Ot=zl(Ye.tagName);return cr[ce.namespaceURI]?ce.namespaceURI===ft?Ra(At,Ye,Ot):ce.namespaceURI===ze?na(At,Ye,Ot):ce.namespaceURI===Lt?Ss(At,Ye,Ot):!!(ta==="application/xhtml+xml"&&cr[ce.namespaceURI]):!1},On=function(ce){Ji(t.removed,{element:ce});try{w(ce).removeChild(ce)}catch{if(m(ce),!w(ce))throw hi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Fs=function(ce){aa(ce);const Ye=B(ce);if(Ye){const Ot=[];Xi(Ye,Ht=>{Ji(Ot,Ht)}),Xi(Ot,Ht=>{try{m(Ht)}catch{}})}const At=x(ce);if(At)for(let Ot=At.length-1;Ot>=0;--Ot){const Ht=At[Ot],nr=Ht&&Ht.name;if(typeof nr=="string")try{ce.removeAttribute(nr)}catch{}}},Un=function(ce,Ye){try{Ji(t.removed,{attribute:Ye.getAttributeNode(ce),from:Ye})}catch{Ji(t.removed,{attribute:null,from:Ye})}if(Ye.removeAttribute(ce),ce==="is")if(ct||$e)try{On(Ye)}catch{}else try{Ye.setAttribute(ce,"")}catch{}},Hn=function(ce){const Ye=x(ce);if(Ye)for(let At=Ye.length-1;At>=0;--At){const Ot=Ye[At],Ht=Ot&&Ot.name;if(!(typeof Ht!="string"||Xe[Nr(Ht)]))try{ce.removeAttribute(Ht)}catch{}}},aa=function(ce){const Ye=[ce];for(;Ye.length>0;){const At=Ye.pop();(b?b(At):At.nodeType)===io.element&&Hn(At);const Ht=B(At);if(Ht)for(let nr=Ht.length-1;nr>=0;--nr)Ye.push(Ht[nr])}},rn=function(ce){if(!Oe)return;const Ye=[ce];for(;Ye.length>0;){const At=Ye.pop(),Ot=b?b(At):At.nodeType;if(Ot===io.processingInstruction||Ot===io.comment&&Za(Ow,At.data)){try{m(At)}catch{}continue}if(Ot===io.element){const nr=At,Vr=Nr(H?H(At):At.nodeName);try{nr.hasAttribute&&nr.hasAttribute("patchsrc")&&nr.removeAttribute("patchsrc"),nr.hasAttribute&&nr.hasAttribute("for")&&Vr!=="label"&&Vr!=="output"&&nr.removeAttribute("for")}catch{}}const Ht=B(At);if(Ht)for(let nr=Ht.length-1;nr>=0;--nr)Ye.push(Ht[nr])}},In=function(ce){let Ye=null,At=null;if(qe)ce="<remove></remove>"+ce;else{const nr=Sw(ce,/^[\r\n\t ]+/);At=nr&&nr[0]}ta==="application/xhtml+xml"&&ar===Lt&&(ce='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ce+"</body></html>");const Ot=$?S(ce):ce;if(ar===Lt)try{Ye=new u().parseFromString(Ot,ta)}catch{}if(!Ye||!Ye.documentElement){Ye=X.createDocument(ar,"template",null);try{Ye.documentElement.innerHTML=Rt?Y:Ot}catch{}}const Ht=Ye.body||Ye.documentElement;return ce&&At&&Ht.insertBefore(e.createTextNode(At),Ht.childNodes[0]||null),ar===Lt?R.call(Ye,it?"html":"body")[0]:it?Ye.documentElement:Ht},_r=function(ce){return F.call(ce.ownerDocument||ce,ce,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Xn=function(ce){return ce=Ol(ce,k," "),ce=Ol(ce,O," "),ce=Ol(ce,N," "),ce},sa=function(ce){var Ye;ce.normalize();const At=F.call(ce.ownerDocument||ce,ce,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Ot=At.nextNode();for(;Ot;)Ot.data=Xn(Ot.data),Ot=At.nextNode();const Ht=(Ye=ce.querySelectorAll)===null||Ye===void 0?void 0:Ye.call(ce,"template");Ht&&Xi(Ht,nr=>{Jn(nr.content)&&sa(nr.content)})},nn=function(ce){const Ye=H?H(ce):null;return typeof Ye!="string"||Nr(Ye)!=="form"?!1:typeof ce.nodeName!="string"||typeof ce.textContent!="string"||typeof ce.removeChild!="function"||ce.attributes!==x(ce)||typeof ce.removeAttribute!="function"||typeof ce.setAttribute!="function"||typeof ce.namespaceURI!="string"||typeof ce.insertBefore!="function"||typeof ce.hasChildNodes!="function"||ce.nodeType!==b(ce)||ce.childNodes!==B(ce)},Jn=function(ce){if(!b||typeof ce!="object"||ce===null)return!1;try{return b(ce)===io.documentFragment}catch{return!1}},oa=function(ce){if(!b||typeof ce!="object"||ce===null)return!1;try{return typeof b(ce)=="number"}catch{return!1}};function Er(It,ce,Ye){It.length!==0&&Xi(It,At=>{At.call(t,ce,Ye,dn)})}const $a=function(ce,Ye){return!!(Oe&&ce.hasChildNodes()&&!oa(ce.firstElementChild)&&Za(Rw,ce.textContent)&&Za(Rw,ce.innerHTML)||Oe&&ce.namespaceURI===Lt&&Ye==="style"&&oa(ce.firstElementChild)||ce.nodeType===io.processingInstruction||Oe&&ce.nodeType===io.comment&&Za(Ow,ce.data))},qa=function(ce,Ye){if(!lt[Ye]&&Sa(Ye)&&(te.tagNameCheck instanceof RegExp&&Za(te.tagNameCheck,Ye)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Ye)))return!1;if(rr&&!Vt[Ye]){const At=w(ce),Ot=B(ce);if(Ot&&At){const Ht=Ot.length;for(let nr=Ht-1;nr>=0;--nr){const Vr=St?Ot[nr]:d(Ot[nr],!0);At.insertBefore(Vr,y(ce))}}}return On(ce),!0},ja=function(ce,Ye){if(Er(J.beforeSanitizeElements,ce,null),ce!==Ye&&w(ce)===null)return!0;if(nn(ce))return On(ce),!0;const At=Nr(H?H(ce):ce.nodeName);if(Er(J.uponSanitizeElement,ce,{tagName:At,allowedTags:be}),ce!==Ye&&w(ce)===null)return!0;if($a(ce,At))return On(ce),!0;if(lt[At]||!(rt.tagCheck instanceof Function&&rt.tagCheck(At))&&!be[At]){const Ht=qa(ce,At);return Ht===!1&&Er(J.afterSanitizeElements,ce,null),Ht}if((b?b(ce):ce.nodeType)===io.element&&!uo(ce)||(At==="noscript"||At==="noembed"||At==="noframes")&&Za(V8,ce.innerHTML))return On(ce),!0;if(pt&&ce.nodeType===io.text){const Ht=Xn(ce.textContent);ce.textContent!==Ht&&(Ji(t.removed,{element:ce.cloneNode()}),ce.textContent=Ht)}return Er(J.afterSanitizeElements,ce,null),!1},ns=function(ce,Ye,At){if(Pe[Ye]||Oe&&Ye==="patchsrc"||Oe&&Ye==="for"&&ce!=="label"&&ce!=="output"||Mt&&(Ye==="id"||Ye==="name")&&(At in e||At in Gn))return!1;const Ot=Xe[Ye]||rt.attributeCheck instanceof Function&&rt.attributeCheck(Ye,ce);if(!(Et&&Za(Z,Ye))){if(!(Te&&Za(se,Ye))){if(Ot){if(!jt[Ye]){if(!Za(Fe,Ol(At,fe,""))){if(!((Ye==="src"||Ye==="xlink:href"||Ye==="href")&&ce!=="script"&&Fw(At,"data:")===0&&mr[ce])){if(!(ot&&!Za(ge,Ol(At,fe,"")))){if(At)return!1}}}}}else if(!(Sa(ce)&&(te.tagNameCheck instanceof RegExp&&Za(te.tagNameCheck,ce)||te.tagNameCheck instanceof Function&&te.tagNameCheck(ce))&&(te.attributeNameCheck instanceof RegExp&&Za(te.attributeNameCheck,Ye)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(Ye,ce))||Ye==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&Za(te.tagNameCheck,At)||te.tagNameCheck instanceof Function&&te.tagNameCheck(At))))return!1}}return!0},Pn=sn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Sa=function(ce){return!Pn[zl(ce)]&&Za(Ae,ce)},Fa=function(ce,Ye,At,Ot){if($&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!At)switch(h.getAttributeType(ce,Ye)){case"TrustedHTML":return S(Ot);case"TrustedScriptURL":return Q(Ot)}return Ot},Mn=function(ce,Ye,At,Ot){try{At?ce.setAttributeNS(At,Ye,Ot):ce.setAttribute(Ye,Ot),nn(ce)?On(ce):xw(t.removed)}catch{Un(Ye,ce)}},Hs=function(ce){Er(J.beforeSanitizeAttributes,ce,null);const Ye=ce.attributes;if(!Ye||nn(ce))return;const At={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Xe,forceKeepAttr:void 0};let Ot=Ye.length;const Ht=Nr(ce.nodeName);for(;Ot--;){const nr=Ye[Ot],Vr=nr.name,Sn=nr.namespaceURI,jr=nr.value,wn=Nr(Vr),fn=jr;let yn=Vr==="value"?fn:k8(fn);if(At.attrName=wn,At.attrValue=yn,At.keepAttr=!0,At.forceKeepAttr=void 0,Er(J.uponSanitizeAttribute,ce,At),yn=At.attrValue,tt&&(wn==="id"||wn==="name")&&Fw(yn,_t)!==0&&(Un(Vr,ce),yn=_t+yn),Oe&&Za(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yn)){Un(Vr,ce);continue}if(wn==="attributename"&&Sw(yn,"href")){Un(Vr,ce);continue}if(!At.forceKeepAttr){if(!At.keepAttr){Un(Vr,ce);continue}if(!yt&&Za(W8,yn)){Un(Vr,ce);continue}if(pt&&(yn=Xn(yn)),!ns(Ht,wn,yn)){Un(Vr,ce);continue}yn=Fa(Ht,wn,Sn,yn),yn!==fn&&Mn(ce,Vr,Sn,yn)}}Er(J.afterSanitizeAttributes,ce,null)},ps=function(ce){let Ye=null;const At=_r(ce);for(Er(J.beforeSanitizeShadowDOM,ce,null);Ye=At.nextNode();)if(Er(J.uponSanitizeShadowNode,Ye,null),ja(Ye,ce),Hs(Ye),Jn(Ye.content)&&ps(Ye.content),(b?b(Ye):Ye.nodeType)===io.element){const Ht=E(Ye);Jn(Ht)&&(va(Ht),ps(Ht))}Er(J.afterSanitizeShadowDOM,ce,null)},va=function(ce){const Ye=[{node:ce,shadow:null}];for(;Ye.length>0;){const At=Ye.pop();if(At.shadow){ps(At.shadow);continue}const Ot=At.node,nr=(b?b(Ot):Ot.nodeType)===io.element,Vr=B(Ot);if(Vr)for(let Sn=Vr.length-1;Sn>=0;--Sn)Ye.push({node:Vr[Sn],shadow:null});if(nr){const Sn=H?H(Ot):null;if(typeof Sn=="string"&&Nr(Sn)==="template"){const jr=Ot.content;Jn(jr)&&Ye.push({node:jr,shadow:null})}}if(nr){const Sn=E(Ot);Jn(Sn)&&Ye.push({node:null,shadow:Sn},{node:Sn,shadow:null})}}};return t.sanitize=function(It){let ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ye=null,At=null,Ot=null,Ht=null;if(Rt=!It,Rt&&(It="<!-->"),typeof It!="string"&&!oa(It)&&(It=S8(It),typeof It!="string"))throw hi("dirty is not a string, aborting");if(!t.isSupported)return It;W?(be=z,Xe=ye):ln(ce),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(be=Qs(be)),J.uponSanitizeAttribute.length>0&&(Xe=Qs(Xe)),t.removed=[];const nr=St&&typeof It!="string"&&oa(It);if(nr){rn(It);const wn=H?H(It):It.nodeName;if(typeof wn=="string"){const fn=Nr(wn);if(!be[fn]||lt[fn])throw Fs(It),hi("root node is forbidden and cannot be sanitized in-place")}if(nn(It))throw Fs(It),hi("root node is clobbered and cannot be sanitized in-place");try{va(It)}catch(fn){throw Fs(It),fn}}else if(oa(It))Ye=In("<!---->"),At=Ye.ownerDocument.importNode(It,!0),At.nodeType===io.element&&At.nodeName==="BODY"||At.nodeName==="HTML"?Ye=At:Ye.appendChild(At),va(At);else{if(!ct&&!pt&&!it&&It.indexOf("<")===-1)return $&&Ve?S(It):It;if(Ye=In(It),!Ye)return ct?null:Ve?Y:""}Ye&&qe&&On(Ye.firstChild);const Vr=nr?It:Ye,Sn=_r(Vr);try{for(;Ot=Sn.nextNode();)ja(Ot,Vr),Hs(Ot),Jn(Ot.content)&&ps(Ot.content)}catch(wn){throw nr&&(Fs(It),Xi(t.removed,fn=>{fn.element&&aa(fn.element)})),wn}if(nr)return Xi(t.removed,wn=>{wn.element&&aa(wn.element)}),pt&&sa(It),It;if(ct){if(pt&&sa(Ye),$e)for(Ht=M.call(Ye.ownerDocument);Ye.firstChild;)Ht.appendChild(Ye.firstChild);else Ht=Ye;return(Xe.shadowroot||Xe.shadowrootmode)&&(Ht=ae.call(r,Ht,!0)),Ht}let jr=it?Ye.outerHTML:Ye.innerHTML;return it&&be["!doctype"]&&Ye.ownerDocument&&Ye.ownerDocument.doctype&&Ye.ownerDocument.doctype.name&&Za(H8,Ye.ownerDocument.doctype.name)&&(jr="<!DOCTYPE "+Ye.ownerDocument.doctype.name+`>
`+jr),pt&&(jr=Xn(jr)),$&&Ve?S(jr):jr},t.setConfig=function(){let It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ln(It),W=!0,z=be,ye=Xe},t.clearConfig=function(){dn=null,W=!1,z=null,ye=null,$=V,Y=""},t.isValidAttribute=function(It,ce,Ye){dn||ln({});const At=Nr(It),Ot=Nr(ce);return ns(At,Ot,Ye)},t.addHook=function(It,ce){typeof ce=="function"&&es(J,It)&&Ji(J[It],ce)},t.removeHook=function(It,ce){if(es(J,It)){if(ce!==void 0){const Ye=b8(J[It],ce);return Ye===-1?void 0:C8(J[It],Ye,1)[0]}return xw(J[It])}},t.removeHooks=function(It){es(J,It)&&(J[It]=[])},t.removeAllHooks=function(){J=Hw()},t}var q8=j5();const j8=Object.freeze(Object.defineProperty({__proto__:null,default:q8},Symbol.toStringTag,{value:"Module"}));var vv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y5(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pw={},Vw={},Pl,Ww;function Yn(){if(Ww)return Pl;Ww=1;var n=function(t){return t&&t.Math===Math&&t};return Pl=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof vv=="object"&&vv)||n(typeof Pl=="object"&&Pl)||(function(){return this})()||Function("return this")(),Pl}var Vf={},Wf,Kw;function ga(){return Kw||(Kw=1,Wf=function(n){try{return!!n()}catch{return!0}}),Wf}var Kf,$w;function Wo(){if($w)return Kf;$w=1;var n=ga();return Kf=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Kf}var $f,qw;function wd(){if(qw)return $f;qw=1;var n=ga();return $f=!n(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),$f}var qf,jw;function gs(){if(jw)return qf;jw=1;var n=wd(),t=Function.prototype.call;return qf=n?t.bind(t):function(){return t.apply(t,arguments)},qf}var jf={},Yw;function Y8(){if(Yw)return jf;Yw=1;var n={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,e=t&&!n.call({1:2},1);return jf.f=e?function(s){var o=t(this,s);return!!o&&o.enumerable}:n,jf}var Yf,Gw;function Jv(){return Gw||(Gw=1,Yf=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}}),Yf}var Gf,zw;function pa(){if(zw)return Gf;zw=1;var n=wd(),t=Function.prototype,e=t.call,r=n&&t.bind.bind(e,e);return Gf=n?r:function(s){return function(){return e.apply(s,arguments)}},Gf}var zf,Xw;function Mi(){if(Xw)return zf;Xw=1;var n=pa(),t=n({}.toString),e=n("".slice);return zf=function(r){return e(t(r),8,-1)},zf}var Xf,Jw;function G5(){if(Jw)return Xf;Jw=1;var n=pa(),t=ga(),e=Mi(),r=Object,s=n("".split);return Xf=t(function(){return!r("z").propertyIsEnumerable(0)})?function(o){return e(o)==="String"?s(o,""):r(o)}:r,Xf}var Jf,Zw;function yd(){return Zw||(Zw=1,Jf=function(n){return n==null}),Jf}var Zf,ey;function Ko(){if(ey)return Zf;ey=1;var n=yd(),t=TypeError;return Zf=function(e){if(n(e))throw new t("Can't call method on "+e);return e},Zf}var eh,ty;function gc(){if(ty)return eh;ty=1;var n=G5(),t=Ko();return eh=function(e){return n(t(e))},eh}var th,ry;function Ta(){if(ry)return th;ry=1;var n=typeof document=="object"&&document.all;return th=typeof n>"u"&&n!==void 0?function(t){return typeof t=="function"||t===n}:function(t){return typeof t=="function"},th}var rh,ny;function Js(){if(ny)return rh;ny=1;var n=Ta();return rh=function(t){return typeof t=="object"?t!==null:n(t)},rh}var nh,ay;function Qi(){if(ay)return nh;ay=1;var n=Yn(),t=Ta(),e=function(r){return t(r)?r:void 0};return nh=function(r,s){return arguments.length<2?e(n[r]):n[r]&&n[r][s]},nh}var ah,sy;function Bd(){if(sy)return ah;sy=1;var n=pa();return ah=n({}.isPrototypeOf),ah}var sh,oy;function pc(){if(oy)return sh;oy=1;var n=Yn(),t=n.navigator,e=t&&t.userAgent;return sh=e?String(e):"",sh}var oh,Ay;function Zv(){if(Ay)return oh;Ay=1;var n=Yn(),t=pc(),e=n.process,r=n.Deno,s=e&&e.versions||r&&r.version,o=s&&s.v8,i,A;return o&&(i=o.split("."),A=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!A&&t&&(i=t.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=t.match(/Chrome\/(\d+)/),i&&(A=+i[1]))),oh=A,oh}var Ah,iy;function z5(){if(iy)return Ah;iy=1;var n=Zv(),t=ga(),e=Yn(),r=e.String;return Ah=!!Object.getOwnPropertySymbols&&!t(function(){var s=Symbol("symbol detection");return!r(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&n&&n<41}),Ah}var ih,ly;function X5(){if(ly)return ih;ly=1;var n=z5();return ih=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ih}var lh,cy;function J5(){if(cy)return lh;cy=1;var n=Qi(),t=Ta(),e=Bd(),r=X5(),s=Object;return lh=r?function(o){return typeof o=="symbol"}:function(o){var i=n("Symbol");return t(i)&&e(i.prototype,s(o))},lh}var ch,uy;function bd(){if(uy)return ch;uy=1;var n=String;return ch=function(t){try{return n(t)}catch{return"Object"}},ch}var uh,dy;function LA(){if(dy)return uh;dy=1;var n=Ta(),t=bd(),e=TypeError;return uh=function(r){if(n(r))return r;throw new e(t(r)+" is not a function")},uh}var dh,fy;function ml(){if(fy)return dh;fy=1;var n=LA(),t=yd();return dh=function(e,r){var s=e[r];return t(s)?void 0:n(s)},dh}var fh,hy;function G8(){if(hy)return fh;hy=1;var n=gs(),t=Ta(),e=Js(),r=TypeError;return fh=function(s,o){var i,A;if(o==="string"&&t(i=s.toString)&&!e(A=n(i,s))||t(i=s.valueOf)&&!e(A=n(i,s))||o!=="string"&&t(i=s.toString)&&!e(A=n(i,s)))return A;throw new r("Can't convert object to primitive value")},fh}var hh={exports:{}},gh,gy;function iA(){return gy||(gy=1,gh=!1),gh}var ph,py;function em(){if(py)return ph;py=1;var n=Yn(),t=Object.defineProperty;return ph=function(e,r){try{t(n,e,{value:r,configurable:!0,writable:!0})}catch{n[e]=r}return r},ph}var vy;function tm(){if(vy)return hh.exports;vy=1;var n=iA(),t=Yn(),e=em(),r="__core-js_shared__",s=hh.exports=t[r]||e(r,{});return(s.versions||(s.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),hh.exports}var vh,my;function rm(){if(my)return vh;my=1;var n=tm();return vh=function(t,e){return n[t]||(n[t]=e||{})},vh}var mh,wy;function Cd(){if(wy)return mh;wy=1;var n=Ko(),t=Object;return mh=function(e){return t(n(e))},mh}var wh,yy;function $o(){if(yy)return wh;yy=1;var n=pa(),t=Cd(),e=n({}.hasOwnProperty);return wh=Object.hasOwn||function(s,o){return e(t(s),o)},wh}var yh,By;function Z5(){if(By)return yh;By=1;var n=pa(),t=0,e=Math.random(),r=n(1.1.toString);return yh=function(s){return"Symbol("+(s===void 0?"":s)+")_"+r(++t+e,36)},yh}var Bh,by;function rs(){if(by)return Bh;by=1;var n=Yn(),t=rm(),e=$o(),r=Z5(),s=z5(),o=X5(),i=n.Symbol,A=t("wks"),l=o?i.for||i:i&&i.withoutSetter||r;return Bh=function(c){return e(A,c)||(A[c]=s&&e(i,c)?i[c]:l("Symbol."+c)),A[c]},Bh}var bh,Cy;function z8(){if(Cy)return bh;Cy=1;var n=gs(),t=Js(),e=J5(),r=ml(),s=G8(),o=rs(),i=TypeError,A=o("toPrimitive");return bh=function(l,c){if(!t(l)||e(l))return l;var u=r(l,A),h;if(u){if(c===void 0&&(c="default"),h=n(u,l,c),!t(h)||e(h))return h;throw new i("Can't convert object to primitive value")}return c===void 0&&(c="number"),s(l,c)},bh}var Ch,ky;function ek(){if(ky)return Ch;ky=1;var n=z8(),t=J5();return Ch=function(e){var r=n(e,"string");return t(r)?r:r+""},Ch}var kh,Ey;function kd(){if(Ey)return kh;Ey=1;var n=Yn(),t=Js(),e=n.document,r=t(e)&&t(e.createElement);return kh=function(s){return r?e.createElement(s):{}},kh}var Eh,Dy;function tk(){if(Dy)return Eh;Dy=1;var n=Wo(),t=ga(),e=kd();return Eh=!n&&!t(function(){return Object.defineProperty(e("div"),"a",{get:function(){return 7}}).a!==7}),Eh}var Ty;function Ed(){if(Ty)return Vf;Ty=1;var n=Wo(),t=gs(),e=Y8(),r=Jv(),s=gc(),o=ek(),i=$o(),A=tk(),l=Object.getOwnPropertyDescriptor;return Vf.f=n?l:function(u,h){if(u=s(u),h=o(h),A)try{return l(u,h)}catch{}if(i(u,h))return r(!t(e.f,u,h),u[h])},Vf}var Dh={},Th,xy;function rk(){if(xy)return Th;xy=1;var n=Wo(),t=ga();return Th=n&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Th}var xh,Sy;function Rs(){if(Sy)return xh;Sy=1;var n=Js(),t=String,e=TypeError;return xh=function(r){if(n(r))return r;throw new e(t(r)+" is not an object")},xh}var Fy;function oi(){if(Fy)return Dh;Fy=1;var n=Wo(),t=tk(),e=rk(),r=Rs(),s=ek(),o=TypeError,i=Object.defineProperty,A=Object.getOwnPropertyDescriptor,l="enumerable",c="configurable",u="writable";return Dh.f=n?e?function(g,d,m){if(r(g),d=s(d),r(m),typeof g=="function"&&d==="prototype"&&"value"in m&&u in m&&!m[u]){var y=A(g,d);y&&y[u]&&(g[d]=m.value,m={configurable:c in m?m[c]:y[c],enumerable:l in m?m[l]:y[l],writable:!1})}return i(g,d,m)}:i:function(g,d,m){if(r(g),d=s(d),r(m),t)try{return i(g,d,m)}catch{}if("get"in m||"set"in m)throw new o("Accessors not supported");return"value"in m&&(g[d]=m.value),g},Dh}var Sh,Ly;function vc(){if(Ly)return Sh;Ly=1;var n=Wo(),t=oi(),e=Jv();return Sh=n?function(r,s,o){return t.f(r,s,e(1,o))}:function(r,s,o){return r[s]=o,r},Sh}var Fh={exports:{}},Lh,Uy;function Dd(){if(Uy)return Lh;Uy=1;var n=Wo(),t=$o(),e=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,s=t(e,"name"),o=s&&(function(){}).name==="something",i=s&&(!n||n&&r(e,"name").configurable);return Lh={EXISTS:s,PROPER:o,CONFIGURABLE:i},Lh}var Uh,Iy;function nm(){if(Iy)return Uh;Iy=1;var n=pa(),t=Ta(),e=tm(),r=n(Function.toString);return t(e.inspectSource)||(e.inspectSource=function(s){return r(s)}),Uh=e.inspectSource,Uh}var Ih,My;function X8(){if(My)return Ih;My=1;var n=Yn(),t=Ta(),e=n.WeakMap;return Ih=t(e)&&/native code/.test(String(e)),Ih}var Mh,Qy;function am(){if(Qy)return Mh;Qy=1;var n=rm(),t=Z5(),e=n("keys");return Mh=function(r){return e[r]||(e[r]=t(r))},Mh}var Qh,Ny;function sm(){return Ny||(Ny=1,Qh={}),Qh}var Nh,_y;function Td(){if(_y)return Nh;_y=1;var n=X8(),t=Yn(),e=Js(),r=vc(),s=$o(),o=tm(),i=am(),A=sm(),l="Object already initialized",c=t.TypeError,u=t.WeakMap,h,g,d,m=function(E){return d(E)?g(E):h(E,{})},y=function(E){return function(x){var b;if(!e(x)||(b=g(x)).type!==E)throw new c("Incompatible receiver, "+E+" required");return b}};if(n||o.state){var B=o.state||(o.state=new u);B.get=B.get,B.has=B.has,B.set=B.set,h=function(E,x){if(B.has(E))throw new c(l);return x.facade=E,B.set(E,x),x},g=function(E){return B.get(E)||{}},d=function(E){return B.has(E)}}else{var w=i("state");A[w]=!0,h=function(E,x){if(s(E,w))throw new c(l);return x.facade=E,r(E,w,x),x},g=function(E){return s(E,w)?E[w]:{}},d=function(E){return s(E,w)}}return Nh={set:h,get:g,has:d,enforce:m,getterFor:y},Nh}var Ry;function nk(){if(Ry)return Fh.exports;Ry=1;var n=pa(),t=ga(),e=Ta(),r=$o(),s=Wo(),o=Dd().CONFIGURABLE,i=nm(),A=Td(),l=A.enforce,c=A.get,u=String,h=Object.defineProperty,g=n("".slice),d=n("".replace),m=n([].join),y=s&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),B=String(String).split("String"),w=Fh.exports=function(E,x,b){g(u(x),0,7)==="Symbol("&&(x="["+d(u(x),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),b&&b.getter&&(x="get "+x),b&&b.setter&&(x="set "+x),(!r(E,"name")||o&&E.name!==x)&&(s?h(E,"name",{value:x,configurable:!0}):E.name=x),y&&b&&r(b,"arity")&&E.length!==b.arity&&h(E,"length",{value:b.arity});try{b&&r(b,"constructor")&&b.constructor?s&&h(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var H=l(E);return r(H,"source")||(H.source=m(B,typeof x=="string"?x:"")),E};return Function.prototype.toString=w(function(){return e(this)&&c(this).source||i(this)},"toString"),Fh.exports}var _h,Oy;function Ni(){if(Oy)return _h;Oy=1;var n=Ta(),t=oi(),e=nk(),r=em();return _h=function(s,o,i,A){A||(A={});var l=A.enumerable,c=A.name!==void 0?A.name:o;if(n(i)&&e(i,c,A),A.global)l?s[o]=i:r(o,i);else{try{A.unsafe?s[o]&&(l=!0):delete s[o]}catch{}l?s[o]=i:t.f(s,o,{value:i,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return s},_h}var Rh={},Oh,Hy;function J8(){if(Hy)return Oh;Hy=1;var n=Math.ceil,t=Math.floor;return Oh=Math.trunc||function(r){var s=+r;return(s>0?t:n)(s)},Oh}var Hh,Py;function xd(){if(Py)return Hh;Py=1;var n=J8();return Hh=function(t){var e=+t;return e!==e||e===0?0:n(e)},Hh}var Ph,Vy;function Z8(){if(Vy)return Ph;Vy=1;var n=xd(),t=Math.max,e=Math.min;return Ph=function(r,s){var o=n(r);return o<0?t(o+s,0):e(o,s)},Ph}var Vh,Wy;function wl(){if(Wy)return Vh;Wy=1;var n=xd(),t=Math.min;return Vh=function(e){var r=n(e);return r>0?t(r,9007199254740991):0},Vh}var Wh,Ky;function om(){if(Ky)return Wh;Ky=1;var n=wl();return Wh=function(t){return n(t.length)},Wh}var Kh,$y;function ak(){if($y)return Kh;$y=1;var n=gc(),t=Z8(),e=om(),r=function(s){return function(o,i,A){var l=n(o),c=e(l);if(c===0)return!s&&-1;var u=t(A,c),h;if(s&&i!==i){for(;c>u;)if(h=l[u++],h!==h)return!0}else for(;c>u;u++)if((s||u in l)&&l[u]===i)return s||u||0;return!s&&-1}};return Kh={includes:r(!0),indexOf:r(!1)},Kh}var $h,qy;function sk(){if(qy)return $h;qy=1;var n=pa(),t=$o(),e=gc(),r=ak().indexOf,s=sm(),o=n([].push);return $h=function(i,A){var l=e(i),c=0,u=[],h;for(h in l)!t(s,h)&&t(l,h)&&o(u,h);for(;A.length>c;)t(l,h=A[c++])&&(~r(u,h)||o(u,h));return u},$h}var qh,jy;function Am(){return jy||(jy=1,qh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),qh}var Yy;function eP(){if(Yy)return Rh;Yy=1;var n=sk(),t=Am(),e=t.concat("length","prototype");return Rh.f=Object.getOwnPropertyNames||function(s){return n(s,e)},Rh}var jh={},Gy;function tP(){return Gy||(Gy=1,jh.f=Object.getOwnPropertySymbols),jh}var Yh,zy;function rP(){if(zy)return Yh;zy=1;var n=Qi(),t=pa(),e=eP(),r=tP(),s=Rs(),o=t([].concat);return Yh=n("Reflect","ownKeys")||function(A){var l=e.f(s(A)),c=r.f;return c?o(l,c(A)):l},Yh}var Gh,Xy;function nP(){if(Xy)return Gh;Xy=1;var n=$o(),t=rP(),e=Ed(),r=oi();return Gh=function(s,o,i){for(var A=t(o),l=r.f,c=e.f,u=0;u<A.length;u++){var h=A[u];!n(s,h)&&!(i&&n(i,h))&&l(s,h,c(o,h))}},Gh}var zh,Jy;function ok(){if(Jy)return zh;Jy=1;var n=ga(),t=Ta(),e=/#|\.prototype\./,r=function(l,c){var u=o[s(l)];return u===A?!0:u===i?!1:t(c)?n(c):!!c},s=r.normalize=function(l){return String(l).replace(e,".").toLowerCase()},o=r.data={},i=r.NATIVE="N",A=r.POLYFILL="P";return zh=r,zh}var Xh,Zy;function Os(){if(Zy)return Xh;Zy=1;var n=Yn(),t=Ed().f,e=vc(),r=Ni(),s=em(),o=nP(),i=ok();return Xh=function(A,l){var c=A.target,u=A.global,h=A.stat,g,d,m,y,B,w;if(u?d=n:h?d=n[c]||s(c,{}):d=n[c]&&n[c].prototype,d)for(m in l){if(B=l[m],A.dontCallGetSet?(w=t(d,m),y=w&&w.value):y=d[m],g=i(u?m:c+(h?".":"#")+m,A.forced),!g&&y!==void 0){if(typeof B==typeof y)continue;o(B,y)}(A.sham||y&&y.sham)&&e(B,"sham",!0),r(d,m,B,A)}},Xh}var Jh,e2;function Ak(){if(e2)return Jh;e2=1;var n=Yn(),t=pc(),e=Mi(),r=function(s){return t.slice(0,s.length)===s};return Jh=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":e(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),Jh}var Zh,t2;function Sd(){if(t2)return Zh;t2=1;var n=Ak();return Zh=n==="NODE",Zh}var eg,r2;function aP(){if(r2)return eg;r2=1;var n=Yn();return eg=n,eg}var tg,n2;function sP(){if(n2)return tg;n2=1;var n=pa(),t=LA();return tg=function(e,r,s){try{return n(t(Object.getOwnPropertyDescriptor(e,r)[s]))}catch{}},tg}var rg,a2;function oP(){if(a2)return rg;a2=1;var n=Js();return rg=function(t){return n(t)||t===null},rg}var ng,s2;function AP(){if(s2)return ng;s2=1;var n=oP(),t=String,e=TypeError;return ng=function(r){if(n(r))return r;throw new e("Can't set "+t(r)+" as a prototype")},ng}var ag,o2;function ik(){if(o2)return ag;o2=1;var n=sP(),t=Js(),e=Ko(),r=AP();return ag=Object.setPrototypeOf||("__proto__"in{}?(function(){var s=!1,o={},i;try{i=n(Object.prototype,"__proto__","set"),i(o,[]),s=o instanceof Array}catch{}return function(l,c){return e(l),r(c),t(l)&&(s?i(l,c):l.__proto__=c),l}})():void 0),ag}var sg,A2;function Fd(){if(A2)return sg;A2=1;var n=oi().f,t=$o(),e=rs(),r=e("toStringTag");return sg=function(s,o,i){s&&!i&&(s=s.prototype),s&&!t(s,r)&&n(s,r,{configurable:!0,value:o})},sg}var og,i2;function iP(){if(i2)return og;i2=1;var n=nk(),t=oi();return og=function(e,r,s){return s.get&&n(s.get,r,{getter:!0}),s.set&&n(s.set,r,{setter:!0}),t.f(e,r,s)},og}var Ag,l2;function lP(){if(l2)return Ag;l2=1;var n=Qi(),t=iP(),e=rs(),r=Wo(),s=e("species");return Ag=function(o){var i=n(o);r&&i&&!i[s]&&t(i,s,{configurable:!0,get:function(){return this}})},Ag}var ig,c2;function cP(){if(c2)return ig;c2=1;var n=Bd(),t=TypeError;return ig=function(e,r){if(n(r,e))return e;throw new t("Incorrect invocation")},ig}var lg,u2;function uP(){if(u2)return lg;u2=1;var n=rs(),t=n("toStringTag"),e={};return e[t]="z",lg=String(e)==="[object z]",lg}var cg,d2;function im(){if(d2)return cg;d2=1;var n=uP(),t=Ta(),e=Mi(),r=rs(),s=r("toStringTag"),o=Object,i=e((function(){return arguments})())==="Arguments",A=function(l,c){try{return l[c]}catch{}};return cg=n?e:function(l){var c,u,h;return l===void 0?"Undefined":l===null?"Null":typeof(u=A(c=o(l),s))=="string"?u:i?e(c):(h=e(c))==="Object"&&t(c.callee)?"Arguments":h},cg}var ug,f2;function dP(){if(f2)return ug;f2=1;var n=pa(),t=ga(),e=Ta(),r=im(),s=Qi(),o=nm(),i=function(){},A=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,c=n(l.exec),u=!l.test(i),h=function(m){if(!e(m))return!1;try{return A(i,[],m),!0}catch{return!1}},g=function(m){if(!e(m))return!1;switch(r(m)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!c(l,o(m))}catch{return!0}};return g.sham=!0,ug=!A||t(function(){var d;return h(h.call)||!h(Object)||!h(function(){d=!0})||d})?g:h,ug}var dg,h2;function fP(){if(h2)return dg;h2=1;var n=dP(),t=bd(),e=TypeError;return dg=function(r){if(n(r))return r;throw new e(t(r)+" is not a constructor")},dg}var fg,g2;function lk(){if(g2)return fg;g2=1;var n=Rs(),t=fP(),e=yd(),r=rs(),s=r("species");return fg=function(o,i){var A=n(o).constructor,l;return A===void 0||e(l=n(A)[s])?i:t(l)},fg}var hg,p2;function ck(){if(p2)return hg;p2=1;var n=wd(),t=Function.prototype,e=t.apply,r=t.call;return hg=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(e):function(){return r.apply(e,arguments)}),hg}var gg,v2;function Ld(){if(v2)return gg;v2=1;var n=Mi(),t=pa();return gg=function(e){if(n(e)==="Function")return t(e)},gg}var pg,m2;function lm(){if(m2)return pg;m2=1;var n=Ld(),t=LA(),e=wd(),r=n(n.bind);return pg=function(s,o){return t(s),o===void 0?s:e?r(s,o):function(){return s.apply(o,arguments)}},pg}var vg,w2;function uk(){if(w2)return vg;w2=1;var n=Qi();return vg=n("document","documentElement"),vg}var mg,y2;function hP(){if(y2)return mg;y2=1;var n=pa();return mg=n([].slice),mg}var wg,B2;function gP(){if(B2)return wg;B2=1;var n=TypeError;return wg=function(t,e){if(t<e)throw new n("Not enough arguments");return t},wg}var yg,b2;function dk(){if(b2)return yg;b2=1;var n=pc();return yg=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n),yg}var Bg,C2;function fk(){if(C2)return Bg;C2=1;var n=Yn(),t=ck(),e=lm(),r=Ta(),s=$o(),o=ga(),i=uk(),A=hP(),l=kd(),c=gP(),u=dk(),h=Sd(),g=n.setImmediate,d=n.clearImmediate,m=n.process,y=n.Dispatch,B=n.Function,w=n.MessageChannel,E=n.String,x=0,b={},H="onreadystatechange",$,Y,V,L;o(function(){$=n.location});var j=function(T){if(s(b,T)){var oe=b[T];delete b[T],oe()}},D=function(T){return function(){j(T)}},S=function(T){j(T.data)},Q=function(T){n.postMessage(E(T),$.protocol+"//"+$.host)};return(!g||!d)&&(g=function(oe){c(arguments.length,1);var X=r(oe)?oe:B(oe),F=A(arguments,1);return b[++x]=function(){t(X,void 0,F)},Y(x),x},d=function(oe){delete b[oe]},h?Y=function(T){m.nextTick(D(T))}:y&&y.now?Y=function(T){y.now(D(T))}:w&&!u?(V=new w,L=V.port2,V.port1.onmessage=S,Y=e(L.postMessage,L)):n.addEventListener&&r(n.postMessage)&&!n.importScripts&&$&&$.protocol!=="file:"&&!o(Q)?(Y=Q,n.addEventListener("message",S,!1)):H in l("script")?Y=function(T){i.appendChild(l("script"))[H]=function(){i.removeChild(this),j(T)}}:Y=function(T){setTimeout(D(T),0)}),Bg={set:g,clear:d},Bg}var bg,k2;function pP(){if(k2)return bg;k2=1;var n=Yn(),t=Wo(),e=Object.getOwnPropertyDescriptor;return bg=function(r){if(!t)return n[r];var s=e(n,r);return s&&s.value},bg}var Cg,E2;function hk(){if(E2)return Cg;E2=1;var n=function(){this.head=null,this.tail=null};return n.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}},Cg=n,Cg}var kg,D2;function vP(){if(D2)return kg;D2=1;var n=pc();return kg=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<"u",kg}var Eg,T2;function mP(){if(T2)return Eg;T2=1;var n=pc();return Eg=/web0s(?!.*chrome)/i.test(n),Eg}var Dg,x2;function wP(){if(x2)return Dg;x2=1;var n=Yn(),t=pP(),e=lm(),r=fk().set,s=hk(),o=dk(),i=vP(),A=mP(),l=Sd(),c=n.MutationObserver||n.WebKitMutationObserver,u=n.document,h=n.process,g=n.Promise,d=t("queueMicrotask"),m,y,B,w,E;if(!d){var x=new s,b=function(){var H,$;for(l&&(H=h.domain)&&H.exit();$=x.get();)try{$()}catch(Y){throw x.head&&m(),Y}H&&H.enter()};!o&&!l&&!A&&c&&u?(y=!0,B=u.createTextNode(""),new c(b).observe(B,{characterData:!0}),m=function(){B.data=y=!y}):!i&&g&&g.resolve?(w=g.resolve(void 0),w.constructor=g,E=e(w.then,w),m=function(){E(b)}):l?m=function(){h.nextTick(b)}:(r=e(r,n),m=function(){r(b)}),d=function(H){x.head||m(),x.add(H)}}return Dg=d,Dg}var Tg,S2;function yP(){return S2||(S2=1,Tg=function(n,t){try{arguments.length===1?console.error(n):console.error(n,t)}catch{}}),Tg}var xg,F2;function cm(){return F2||(F2=1,xg=function(n){try{return{error:!1,value:n()}}catch(t){return{error:!0,value:t}}}),xg}var Sg,L2;function mc(){if(L2)return Sg;L2=1;var n=Yn();return Sg=n.Promise,Sg}var Fg,U2;function wc(){if(U2)return Fg;U2=1;var n=Yn(),t=mc(),e=Ta(),r=ok(),s=nm(),o=rs(),i=Ak(),A=iA(),l=Zv(),c=t&&t.prototype,u=o("species"),h=!1,g=e(n.PromiseRejectionEvent),d=r("Promise",function(){var m=s(t),y=m!==String(t);if(!y&&l===66||A&&!(c.catch&&c.finally))return!0;if(!l||l<51||!/native code/.test(m)){var B=new t(function(x){x(1)}),w=function(x){x(function(){},function(){})},E=B.constructor={};if(E[u]=w,h=B.then(function(){})instanceof w,!h)return!0}return!y&&(i==="BROWSER"||i==="DENO")&&!g});return Fg={CONSTRUCTOR:d,REJECTION_EVENT:g,SUBCLASSING:h},Fg}var Lg={},I2;function yc(){if(I2)return Lg;I2=1;var n=LA(),t=TypeError,e=function(r){var s,o;this.promise=new r(function(i,A){if(s!==void 0||o!==void 0)throw new t("Bad Promise constructor");s=i,o=A}),this.resolve=n(s),this.reject=n(o)};return Lg.f=function(r){return new e(r)},Lg}var M2;function BP(){if(M2)return Vw;M2=1;var n=Os(),t=iA(),e=Sd(),r=Yn(),s=aP(),o=gs(),i=Ni(),A=ik(),l=Fd(),c=lP(),u=LA(),h=Ta(),g=Js(),d=cP(),m=lk(),y=fk().set,B=wP(),w=yP(),E=cm(),x=hk(),b=Td(),H=mc(),$=wc(),Y=yc(),V="Promise",L=$.CONSTRUCTOR,j=$.REJECTION_EVENT,D=$.SUBCLASSING,S=b.getterFor(V),Q=b.set,T=H&&H.prototype,oe=H,X=T,F=r.TypeError,M=r.document,R=r.process,ae=Y.f,J=ae,k=!!(M&&M.createEvent&&r.dispatchEvent),O="unhandledrejection",N="rejectionhandled",Z=0,se=1,ge=2,fe=1,Ae=2,Fe,be,Ke,Xe,xe=function(Oe){var it;return g(Oe)&&h(it=Oe.then)?it:!1},te=function(Oe,it){var W=it.value,z=it.state===se,ye=z?Oe.ok:Oe.fail,qe=Oe.resolve,ct=Oe.reject,$e=Oe.domain,Ve,Mt,tt;try{ye?(z||(it.rejection===Ae&&Et(it),it.rejection=fe),ye===!0?Ve=W:($e&&$e.enter(),Ve=ye(W),$e&&($e.exit(),tt=!0)),Ve===Oe.promise?ct(new F("Promise-chain cycle")):(Mt=xe(Ve))?o(Mt,Ve,qe,ct):qe(Ve)):ct(W)}catch(_t){$e&&!tt&&$e.exit(),ct(_t)}},lt=function(Oe,it){Oe.notified||(Oe.notified=!0,B(function(){for(var W=Oe.reactions,z;z=W.get();)te(z,Oe);Oe.notified=!1,it&&!Oe.rejection&&rt(Oe)}))},Pe=function(Oe,it,W){var z,ye;k?(z=M.createEvent("Event"),z.promise=it,z.reason=W,z.initEvent(Oe,!1,!0),r.dispatchEvent(z)):z={promise:it,reason:W},!j&&(ye=r["on"+Oe])?ye(z):Oe===O&&w("Unhandled promise rejection",W)},rt=function(Oe){o(y,r,function(){var it=Oe.facade,W=Oe.value,z=Te(Oe),ye;if(z&&(ye=E(function(){e?R.emit("unhandledRejection",W,it):Pe(O,it,W)}),Oe.rejection=e||Te(Oe)?Ae:fe,ye.error))throw ye.value})},Te=function(Oe){return Oe.rejection!==fe&&!Oe.parent},Et=function(Oe){o(y,r,function(){var it=Oe.facade;e?R.emit("rejectionHandled",it):Pe(N,it,Oe.value)})},ot=function(Oe,it,W){return function(z){Oe(it,z,W)}},yt=function(Oe,it,W){Oe.done||(Oe.done=!0,W&&(Oe=W),Oe.value=it,Oe.state=ge,lt(Oe,!0))},pt=function(Oe,it,W){if(!Oe.done){Oe.done=!0,W&&(Oe=W);try{if(Oe.facade===it)throw new F("Promise can't be resolved itself");var z=xe(it);z?B(function(){var ye={done:!1};try{o(z,it,ot(pt,ye,Oe),ot(yt,ye,Oe))}catch(qe){yt(ye,qe,Oe)}}):(Oe.value=it,Oe.state=se,lt(Oe,!1))}catch(ye){yt({done:!1},ye,Oe)}}};if(L&&(oe=function(it){d(this,X),u(it),o(Fe,this);var W=S(this);try{it(ot(pt,W),ot(yt,W))}catch(z){yt(W,z)}},X=oe.prototype,Fe=function(it){Q(this,{type:V,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:Z,value:null})},Fe.prototype=i(X,"then",function(it,W){var z=S(this),ye=ae(m(this,oe));return z.parent=!0,ye.ok=h(it)?it:!0,ye.fail=h(W)&&W,ye.domain=e?R.domain:void 0,z.state===Z?z.reactions.add(ye):B(function(){te(ye,z)}),ye.promise}),be=function(){var Oe=new Fe,it=S(Oe);this.promise=Oe,this.resolve=ot(pt,it),this.reject=ot(yt,it)},Y.f=ae=function(Oe){return Oe===oe||Oe===Ke?new be(Oe):J(Oe)},!t&&h(H)&&T!==Object.prototype)){Xe=T.then,D||i(T,"then",function(it,W){var z=this;return new oe(function(ye,qe){o(Xe,z,ye,qe)}).then(it,W)},{unsafe:!0});try{delete T.constructor}catch{}A&&A(T,X)}return n({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:oe}),Ke=s.Promise,l(oe,V,!1,!0),c(V),Vw}var Q2={},Ug,N2;function Bc(){return N2||(N2=1,Ug={}),Ug}var Ig,_2;function bP(){if(_2)return Ig;_2=1;var n=rs(),t=Bc(),e=n("iterator"),r=Array.prototype;return Ig=function(s){return s!==void 0&&(t.Array===s||r[e]===s)},Ig}var Mg,R2;function gk(){if(R2)return Mg;R2=1;var n=im(),t=ml(),e=yd(),r=Bc(),s=rs(),o=s("iterator");return Mg=function(i){if(!e(i))return t(i,o)||t(i,"@@iterator")||r[n(i)]},Mg}var Qg,O2;function CP(){if(O2)return Qg;O2=1;var n=gs(),t=LA(),e=Rs(),r=bd(),s=gk(),o=TypeError;return Qg=function(i,A){var l=arguments.length<2?s(i):A;if(t(l))return e(n(l,i));throw new o(r(i)+" is not iterable")},Qg}var Ng,H2;function kP(){if(H2)return Ng;H2=1;var n=gs(),t=Rs(),e=ml();return Ng=function(r,s,o){var i,A;t(r);try{if(i=e(r,"return"),!i){if(s==="throw")throw o;return o}i=n(i,r)}catch(l){A=!0,i=l}if(s==="throw")throw o;if(A)throw i;return t(i),o},Ng}var _g,P2;function pk(){if(P2)return _g;P2=1;var n=lm(),t=gs(),e=Rs(),r=bd(),s=bP(),o=om(),i=Bd(),A=CP(),l=gk(),c=kP(),u=TypeError,h=function(d,m){this.stopped=d,this.result=m},g=h.prototype;return _g=function(d,m,y){var B=y&&y.that,w=!!(y&&y.AS_ENTRIES),E=!!(y&&y.IS_RECORD),x=!!(y&&y.IS_ITERATOR),b=!!(y&&y.INTERRUPTED),H=n(m,B),$,Y,V,L,j,D,S,Q=function(X){var F=$;return $=void 0,F&&c(F,"normal"),new h(!0,X)},T=function(X){return w?(e(X),b?H(X[0],X[1],Q):H(X[0],X[1])):b?H(X,Q):H(X)};if(E)$=d.iterator;else if(x)$=d;else{if(Y=l(d),!Y)throw new u(r(d)+" is not iterable");if(s(Y)){for(V=0,L=o(d);L>V;V++)if(j=T(d[V]),j&&i(g,j))return j;return new h(!1)}$=A(d,Y)}for(D=E?d.next:$.next;!(S=t(D,$)).done;){var oe=S.value;try{j=T(oe)}catch(X){if($)c($,"throw",X);else throw X}if(typeof j=="object"&&j&&i(g,j))return j}return new h(!1)},_g}var Rg,V2;function EP(){if(V2)return Rg;V2=1;var n=rs(),t=n("iterator"),e=!1;try{var r=0,s={next:function(){return{done:!!r++}},return:function(){e=!0}};s[t]=function(){return this},Array.from(s,function(){throw 2})}catch{}return Rg=function(o,i){try{if(!i&&!e)return!1}catch{return!1}var A=!1;try{var l={};l[t]=function(){return{next:function(){return{done:A=!0}}}},o(l)}catch{}return A},Rg}var Og,W2;function vk(){if(W2)return Og;W2=1;var n=mc(),t=EP(),e=wc().CONSTRUCTOR;return Og=e||!t(function(r){n.all(r).then(void 0,function(){})}),Og}var K2;function DP(){if(K2)return Q2;K2=1;var n=Os(),t=gs(),e=LA(),r=yc(),s=cm(),o=pk(),i=vk();return n({target:"Promise",stat:!0,forced:i},{all:function(l){var c=this,u=r.f(c),h=u.resolve,g=u.reject,d=s(function(){var m=e(c.resolve),y=[],B=0,w=1;o(l,function(E){var x=B++,b=!1;w++,t(m,c,E).then(function(H){b||(b=!0,y[x]=H,--w||h(y))},g)}),--w||h(y)});return d.error&&g(d.value),u.promise}}),Q2}var $2={},q2;function TP(){if(q2)return $2;q2=1;var n=Os(),t=iA(),e=wc().CONSTRUCTOR,r=mc(),s=Qi(),o=Ta(),i=Ni(),A=r&&r.prototype;if(n({target:"Promise",proto:!0,forced:e,real:!0},{catch:function(c){return this.then(void 0,c)}}),!t&&o(r)){var l=s("Promise").prototype.catch;A.catch!==l&&i(A,"catch",l,{unsafe:!0})}return $2}var j2={},Y2;function xP(){if(Y2)return j2;Y2=1;var n=Os(),t=gs(),e=LA(),r=yc(),s=cm(),o=pk(),i=vk();return n({target:"Promise",stat:!0,forced:i},{race:function(l){var c=this,u=r.f(c),h=u.reject,g=s(function(){var d=e(c.resolve);o(l,function(m){t(d,c,m).then(u.resolve,h)})});return g.error&&h(g.value),u.promise}}),j2}var G2={},z2;function SP(){if(z2)return G2;z2=1;var n=Os(),t=yc(),e=wc().CONSTRUCTOR;return n({target:"Promise",stat:!0,forced:e},{reject:function(s){var o=t.f(this),i=o.reject;return i(s),o.promise}}),G2}var X2={},Hg,J2;function FP(){if(J2)return Hg;J2=1;var n=Rs(),t=Js(),e=yc();return Hg=function(r,s){if(n(r),t(s)&&s.constructor===r)return s;var o=e.f(r),i=o.resolve;return i(s),o.promise},Hg}var Z2;function LP(){if(Z2)return X2;Z2=1;var n=Os(),t=Qi(),e=iA(),r=mc(),s=wc().CONSTRUCTOR,o=FP(),i=t("Promise"),A=e&&!s;return n({target:"Promise",stat:!0,forced:e||s},{resolve:function(c){return o(A&&this===i?r:this,c)}}),X2}var eB;function UP(){return eB||(eB=1,BP(),DP(),TP(),xP(),SP(),LP()),Pw}UP();function tB(n,t,e,r,s,o,i){try{var A=n[o](i),l=A.value}catch(c){return void e(c)}A.done?t(l):Promise.resolve(l).then(r,s)}function SA(n){return function(){var t=this,e=arguments;return new Promise(function(r,s){var o=n.apply(t,e);function i(l){tB(o,r,s,i,A,"next",l)}function A(l){tB(o,r,s,i,A,"throw",l)}i(void 0)})}}var rB={},nB={},Pg,aB;function lA(){if(aB)return Pg;aB=1;var n=im(),t=String;return Pg=function(e){if(n(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(e)},Pg}var Vg,sB;function mk(){if(sB)return Vg;sB=1;var n=Rs();return Vg=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Vg}var Wg,oB;function wk(){if(oB)return Wg;oB=1;var n=ga(),t=Yn(),e=t.RegExp,r=n(function(){var i=e("a","y");return i.lastIndex=2,i.exec("abcd")!==null}),s=r||n(function(){return!e("a","y").sticky}),o=r||n(function(){var i=e("^r","gy");return i.lastIndex=2,i.exec("str")!==null});return Wg={BROKEN_CARET:o,MISSED_STICKY:s,UNSUPPORTED_Y:r},Wg}var Kg={},$g,AB;function IP(){if(AB)return $g;AB=1;var n=sk(),t=Am();return $g=Object.keys||function(r){return n(r,t)},$g}var iB;function MP(){if(iB)return Kg;iB=1;var n=Wo(),t=rk(),e=oi(),r=Rs(),s=gc(),o=IP();return Kg.f=n&&!t?Object.defineProperties:function(A,l){r(A);for(var c=s(l),u=o(l),h=u.length,g=0,d;h>g;)e.f(A,d=u[g++],c[d]);return A},Kg}var qg,lB;function Ud(){if(lB)return qg;lB=1;var n=Rs(),t=MP(),e=Am(),r=sm(),s=uk(),o=kd(),i=am(),A=">",l="<",c="prototype",u="script",h=i("IE_PROTO"),g=function(){},d=function(E){return l+u+A+E+l+"/"+u+A},m=function(E){E.write(d("")),E.close();var x=E.parentWindow.Object;return E=null,x},y=function(){var E=o("iframe"),x="java"+u+":",b;return E.style.display="none",s.appendChild(E),E.src=String(x),b=E.contentWindow.document,b.open(),b.write(d("document.F=Object")),b.close(),b.F},B,w=function(){try{B=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&B?m(B):y():m(B);for(var E=e.length;E--;)delete w[c][e[E]];return w()};return r[h]=!0,qg=Object.create||function(x,b){var H;return x!==null?(g[c]=n(x),H=new g,g[c]=null,H[h]=x):H=w(),b===void 0?H:t.f(H,b)},qg}var jg,cB;function QP(){if(cB)return jg;cB=1;var n=ga(),t=Yn(),e=t.RegExp;return jg=n(function(){var r=e(".","s");return!(r.dotAll&&r.test(`
`)&&r.flags==="s")}),jg}var Yg,uB;function NP(){if(uB)return Yg;uB=1;var n=ga(),t=Yn(),e=t.RegExp;return Yg=n(function(){var r=e("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),Yg}var Gg,dB;function um(){if(dB)return Gg;dB=1;var n=gs(),t=pa(),e=lA(),r=mk(),s=wk(),o=rm(),i=Ud(),A=Td().get,l=QP(),c=NP(),u=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,g=h,d=t("".charAt),m=t("".indexOf),y=t("".replace),B=t("".slice),w=(function(){var $=/a/,Y=/b*/g;return n(h,$,"a"),n(h,Y,"a"),$.lastIndex!==0||Y.lastIndex!==0})(),E=s.BROKEN_CARET,x=/()??/.exec("")[1]!==void 0,b=w||x||E||l||c,H=function($,Y){for(var V=$.groups=i(null),L=0;L<Y.length;L++){var j=Y[L];V[j[0]]=$[j[1]]}};return b&&(g=function(Y){var V=this,L=A(V),j=e(Y),D=L.raw,S,Q,T;if(D)return D.lastIndex=V.lastIndex,S=n(g,D,j),V.lastIndex=D.lastIndex,S&&L.groups&&H(S,L.groups),S;var oe=L.groups,X=E&&V.sticky,F=n(r,V),M=V.source,R=0,ae=j;if(X){F=y(F,"y",""),m(F,"g")===-1&&(F+="g"),ae=B(j,V.lastIndex);var J=V.lastIndex>0&&d(j,V.lastIndex-1);V.lastIndex>0&&(!V.multiline||V.multiline&&J!==`
`&&J!=="\r"&&J!=="\u2028"&&J!=="\u2029")&&(M="(?: (?:"+M+"))",ae=" "+ae,R++),Q=new RegExp("^(?:"+M+")",F)}x&&(Q=new RegExp("^"+M+"$(?!\\s)",F)),w&&(T=V.lastIndex);var k=n(h,X?Q:V,ae);return X?k?(k.input=j,k[0]=B(k[0],R),k.index=V.lastIndex,V.lastIndex+=k[0].length):V.lastIndex=0:w&&k&&(V.lastIndex=V.global?k.index+k[0].length:T),x&&k&&k.length>1&&n(u,k[0],Q,function(){for(var O=1;O<arguments.length-2;O++)arguments[O]===void 0&&(k[O]=void 0)}),k&&oe&&H(k,oe),k}),Gg=g,Gg}var fB;function _P(){if(fB)return nB;fB=1;var n=Os(),t=um();return n({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),nB}var zg,hB;function dm(){if(hB)return zg;hB=1,_P();var n=gs(),t=Ni(),e=um(),r=ga(),s=rs(),o=vc(),i=s("species"),A=RegExp.prototype;return zg=function(l,c,u,h){var g=s(l),d=!r(function(){var w={};return w[g]=function(){return 7},""[l](w)!==7}),m=d&&!r(function(){var w=!1,E=/a/;if(l==="split"){var x={};x[i]=function(){return E},E={constructor:x,flags:""},E[g]=/./[g]}return E.exec=function(){return w=!0,null},E[g](""),!w});if(!d||!m||u){var y=/./[g],B=c(g,""[l],function(w,E,x,b,H){var $=E.exec;return $===e||$===A.exec?d&&!H?{done:!0,value:n(y,E,x,b)}:{done:!0,value:n(w,x,E,b)}:{done:!1}});t(String.prototype,l,B[0]),t(A,g,B[1])}h&&o(A[g],"sham",!0)},zg}var Xg,gB;function RP(){if(gB)return Xg;gB=1;var n=pa(),t=xd(),e=lA(),r=Ko(),s=n("".charAt),o=n("".charCodeAt),i=n("".slice),A=function(l){return function(c,u){var h=e(r(c)),g=t(u),d=h.length,m,y;return g<0||g>=d?l?"":void 0:(m=o(h,g),m<55296||m>56319||g+1===d||(y=o(h,g+1))<56320||y>57343?l?s(h,g):m:l?i(h,g,g+2):(m-55296<<10)+(y-56320)+65536)}};return Xg={codeAt:A(!1),charAt:A(!0)},Xg}var Jg,pB;function fm(){if(pB)return Jg;pB=1;var n=RP().charAt;return Jg=function(t,e,r){return e+(r&&n(t,e).length||1)},Jg}var Zg,vB;function OP(){if(vB)return Zg;vB=1;var n=Yn(),t=ga(),e=n.RegExp,r=!t(function(){var s=!0;try{e(".","d")}catch{s=!1}var o={},i="",A=s?"dgimsy":"gimsy",l=function(g,d){Object.defineProperty(o,g,{get:function(){return i+=d,!0}})},c={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};s&&(c.hasIndices="d");for(var u in c)l(u,c[u]);var h=Object.getOwnPropertyDescriptor(e.prototype,"flags").get.call(o);return h!==A||i!==A});return Zg={correct:r},Zg}var ep,mB;function Id(){if(mB)return ep;mB=1;var n=gs(),t=$o(),e=Bd(),r=OP(),s=mk(),o=RegExp.prototype;return ep=r.correct?function(i){return i.flags}:function(i){return!r.correct&&e(o,i)&&!t(i,"flags")?n(s,i):i.flags},ep}var tp,wB;function hm(){if(wB)return tp;wB=1;var n=gs(),t=Rs(),e=Ta(),r=Mi(),s=um(),o=TypeError;return tp=function(i,A){var l=i.exec;if(e(l)){var c=n(l,i,A);return c!==null&&t(c),c}if(r(i)==="RegExp")return n(s,i,A);throw new o("RegExp#exec called on incompatible receiver")},tp}var yB;function HP(){if(yB)return rB;yB=1;var n=gs(),t=pa(),e=dm(),r=Rs(),s=Js(),o=wl(),i=lA(),A=Ko(),l=ml(),c=fm(),u=Id(),h=hm(),g=t("".indexOf);return e("match",function(d,m,y){return[function(w){var E=A(this),x=s(w)?l(w,d):void 0;return x?n(x,w,E):new RegExp(w)[d](i(E))},function(B){var w=r(this),E=i(B),x=y(m,w,E);if(x.done)return x.value;var b=i(u(w));if(!~g(b,"g"))return h(w,E);var H=!!~g(b,"u")||!!~g(b,"v");w.lastIndex=0;for(var $=[],Y=0,V;(V=h(w,E))!==null;){var L=i(V[0]);$[Y]=L,L===""&&(w.lastIndex=c(E,o(w.lastIndex),H)),Y++}return Y===0?null:$}]}),rB}HP();var BB={},rp,bB;function PP(){if(bB)return rp;bB=1;var n=pa(),t=Cd(),e=Math.floor,r=n("".charAt),s=n("".replace),o=n("".slice),i=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,A=/\$([$&'`]|\d{1,2})/g;return rp=function(l,c,u,h,g,d){var m=u+l.length,y=h.length,B=A;return g!==void 0&&(g=t(g),B=i),s(d,B,function(w,E){var x;switch(r(E,0)){case"$":return"$";case"&":return l;case"`":return o(c,0,u);case"'":return o(c,m);case"<":x=g[o(E,1,-1)];break;default:var b=+E;if(b===0)return w;if(b>y){var H=e(b/10);return H===0?w:H<=y?h[H-1]===void 0?r(E,1):h[H-1]+r(E,1):w}x=h[b-1]}return x===void 0?"":x})},rp}var CB;function VP(){if(CB)return BB;CB=1;var n=ck(),t=gs(),e=pa(),r=dm(),s=ga(),o=Rs(),i=Ta(),A=Js(),l=xd(),c=wl(),u=lA(),h=Ko(),g=fm(),d=ml(),m=PP(),y=Id(),B=hm(),w=rs(),E=w("replace"),x=Math.max,b=Math.min,H=e([].concat),$=e([].push),Y=e("".indexOf),V=e("".slice),L=function(Q){return Q===void 0?Q:String(Q)},j=(function(){return"a".replace(/./,"$0")==="$0"})(),D=(function(){return/./[E]?/./[E]("a","$0")==="":!1})(),S=!s(function(){var Q=/./;return Q.exec=function(){var T=[];return T.groups={a:"7"},T},"".replace(Q,"$<a>")!=="7"});return r("replace",function(Q,T,oe){var X=D?"$":"$0";return[function(M,R){var ae=h(this),J=A(M)?d(M,E):void 0;return J?t(J,M,ae,R):t(T,u(ae),M,R)},function(F,M){var R=o(this),ae=u(F),J=i(M);J||(M=u(M));var k=u(y(R));if(typeof M=="string"&&!~Y(M,X)&&!~Y(M,"$<")&&!~Y(k,"y")){var O=oe(T,R,ae,M);if(O.done)return O.value}var N=!!~Y(k,"g"),Z;N&&(Z=!!~Y(k,"u")||!!~Y(k,"v"),R.lastIndex=0);for(var se=[],ge;ge=B(R,ae),!(ge===null||($(se,ge),!N));){var fe=u(ge[0]);fe===""&&(R.lastIndex=g(ae,c(R.lastIndex),Z))}for(var Ae="",Fe=0,be=0;be<se.length;be++){ge=se[be];for(var Ke=u(ge[0]),Xe=x(b(l(ge.index),ae.length),0),xe=[],te,lt=1;lt<ge.length;lt++)$(xe,L(ge[lt]));var Pe=ge.groups;if(J){var rt=H([Ke],xe,Xe,ae);Pe!==void 0&&$(rt,Pe),te=u(n(M,void 0,rt))}else te=m(Ke,ae,Xe,xe,Pe,M);Xe>=Fe&&(Ae+=V(ae,Fe,Xe)+te,Fe=Xe+Ke.length)}return Ae+V(ae,Fe)}]},!S||!j||D),BB}VP();var kB={},np,EB;function WP(){if(EB)return np;EB=1;var n=Js(),t=Mi(),e=rs(),r=e("match");return np=function(s){var o;return n(s)&&((o=s[r])!==void 0?!!o:t(s)==="RegExp")},np}var ap,DB;function gm(){if(DB)return ap;DB=1;var n=WP(),t=TypeError;return ap=function(e){if(n(e))throw new t("The method doesn't accept regular expressions");return e},ap}var sp,TB;function pm(){if(TB)return sp;TB=1;var n=rs(),t=n("match");return sp=function(e){var r=/./;try{"/./"[e](r)}catch{try{return r[t]=!1,"/./"[e](r)}catch{}}return!1},sp}var xB;function KP(){if(xB)return kB;xB=1;var n=Os(),t=Ld(),e=Ed().f,r=wl(),s=lA(),o=gm(),i=Ko(),A=pm(),l=iA(),c=t("".slice),u=Math.min,h=A("startsWith"),g=!l&&!h&&!!(function(){var d=e(String.prototype,"startsWith");return d&&!d.writable})();return n({target:"String",proto:!0,forced:!g&&!h},{startsWith:function(m){var y=s(i(this));o(m);var B=s(m),w=r(u(arguments.length>1?arguments[1]:void 0,y.length));return c(y,w,w+B.length)===B}}),kB}KP();var op,SB;function $P(){if(SB)return op;SB=1;var n=rs(),t=Ud(),e=oi().f,r=n("unscopables"),s=Array.prototype;return s[r]===void 0&&e(s,r,{configurable:!0,value:t(null)}),op=function(o){s[r][o]=!0},op}var Ap,FB;function qP(){if(FB)return Ap;FB=1;var n=ga();return Ap=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Ap}var ip,LB;function yk(){if(LB)return ip;LB=1;var n=$o(),t=Ta(),e=Cd(),r=am(),s=qP(),o=r("IE_PROTO"),i=Object,A=i.prototype;return ip=s?i.getPrototypeOf:function(l){var c=e(l);if(n(c,o))return c[o];var u=c.constructor;return t(u)&&c instanceof u?u.prototype:c instanceof i?A:null},ip}var lp,UB;function Bk(){if(UB)return lp;UB=1;var n=ga(),t=Ta(),e=Js(),r=Ud(),s=yk(),o=Ni(),i=rs(),A=iA(),l=i("iterator"),c=!1,u,h,g;[].keys&&(g=[].keys(),"next"in g?(h=s(s(g)),h!==Object.prototype&&(u=h)):c=!0);var d=!e(u)||n(function(){var m={};return u[l].call(m)!==m});return d?u={}:A&&(u=r(u)),t(u[l])||o(u,l,function(){return this}),lp={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:c},lp}var cp,IB;function jP(){if(IB)return cp;IB=1;var n=Bk().IteratorPrototype,t=Ud(),e=Jv(),r=Fd(),s=Bc(),o=function(){return this};return cp=function(i,A,l,c){var u=A+" Iterator";return i.prototype=t(n,{next:e(+!c,l)}),r(i,u,!1,!0),s[u]=o,i},cp}var up,MB;function YP(){if(MB)return up;MB=1;var n=Os(),t=gs(),e=iA(),r=Dd(),s=Ta(),o=jP(),i=yk(),A=ik(),l=Fd(),c=vc(),u=Ni(),h=rs(),g=Bc(),d=Bk(),m=r.PROPER,y=r.CONFIGURABLE,B=d.IteratorPrototype,w=d.BUGGY_SAFARI_ITERATORS,E=h("iterator"),x="keys",b="values",H="entries",$=function(){return this};return up=function(Y,V,L,j,D,S,Q){o(L,V,j);var T=function(N){if(N===D&&R)return R;if(!w&&N&&N in F)return F[N];switch(N){case x:return function(){return new L(this,N)};case b:return function(){return new L(this,N)};case H:return function(){return new L(this,N)}}return function(){return new L(this)}},oe=V+" Iterator",X=!1,F=Y.prototype,M=F[E]||F["@@iterator"]||D&&F[D],R=!w&&M||T(D),ae=V==="Array"&&F.entries||M,J,k,O;if(ae&&(J=i(ae.call(new Y)),J!==Object.prototype&&J.next&&(!e&&i(J)!==B&&(A?A(J,B):s(J[E])||u(J,E,$)),l(J,oe,!0,!0),e&&(g[oe]=$))),m&&D===b&&M&&M.name!==b&&(!e&&y?c(F,"name",b):(X=!0,R=function(){return t(M,this)})),D)if(k={values:T(b),keys:S?R:T(x),entries:T(H)},Q)for(O in k)(w||X||!(O in F))&&u(F,O,k[O]);else n({target:V,proto:!0,forced:w||X},k);return(!e||Q)&&F[E]!==R&&u(F,E,R,{name:D}),g[V]=R,k},up}var dp,QB;function GP(){return QB||(QB=1,dp=function(n,t){return{value:n,done:t}}),dp}var fp,NB;function bk(){if(NB)return fp;NB=1;var n=gc(),t=$P(),e=Bc(),r=Td(),s=oi().f,o=YP(),i=GP(),A=iA(),l=Wo(),c="Array Iterator",u=r.set,h=r.getterFor(c);fp=o(Array,"Array",function(d,m){u(this,{type:c,target:n(d),index:0,kind:m})},function(){var d=h(this),m=d.target,y=d.index++;if(!m||y>=m.length)return d.target=null,i(void 0,!0);switch(d.kind){case"keys":return i(y,!1);case"values":return i(m[y],!1)}return i([y,m[y]],!1)},"values");var g=e.Arguments=e.Array;if(t("keys"),t("values"),t("entries"),!A&&l&&g.name!=="values")try{s(g,"name",{value:"values"})}catch{}return fp}bk();var _B={},hp,RB;function zP(){return RB||(RB=1,hp={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}),hp}var gp,OB;function XP(){if(OB)return gp;OB=1;var n=kd(),t=n("span").classList,e=t&&t.constructor&&t.constructor.prototype;return gp=e===Object.prototype?void 0:e,gp}var HB;function JP(){if(HB)return _B;HB=1;var n=Yn(),t=zP(),e=XP(),r=bk(),s=vc(),o=Fd(),i=rs(),A=i("iterator"),l=r.values,c=function(h,g){if(h){if(h[A]!==l)try{s(h,A,l)}catch{h[A]=l}if(o(h,g,!0),t[g]){for(var d in r)if(h[d]!==r[d])try{s(h,d,r[d])}catch{h[d]=r[d]}}}};for(var u in t)c(n[u]&&n[u].prototype,u);return c(e,"DOMTokenList"),_B}JP();function ZP(n,t){if(hn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var r=e.call(n,t);if(hn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function e7(n){var t=ZP(n,"string");return hn(t)=="symbol"?t:t+""}function vm(n,t,e){return(t=e7(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var PB={},pp,VB;function t7(){if(VB)return pp;VB=1;var n=LA(),t=Cd(),e=G5(),r=om(),s=TypeError,o="Reduce of empty array with no initial value",i=function(A){return function(l,c,u,h){var g=t(l),d=e(g),m=r(g);if(n(c),m===0&&u<2)throw new s(o);var y=A?m-1:0,B=A?-1:1;if(u<2)for(;;){if(y in d){h=d[y],y+=B;break}if(y+=B,A?y<0:m<=y)throw new s(o)}for(;A?y>=0:m>y;y+=B)y in d&&(h=c(h,d[y],y,g));return h}};return pp={left:i(!1),right:i(!0)},pp}var vp,WB;function Ck(){if(WB)return vp;WB=1;var n=ga();return vp=function(t,e){var r=[][t];return!!r&&n(function(){r.call(null,e||function(){return 1},1)})},vp}var KB;function r7(){if(KB)return PB;KB=1;var n=Os(),t=t7().left,e=Ck(),r=Zv(),s=Sd(),o=!s&&r>79&&r<83,i=o||!e("reduce");return n({target:"Array",proto:!0,forced:i},{reduce:function(l){var c=arguments.length;return t(this,l,c,c>1?arguments[1]:void 0)}}),PB}r7();var $B={},qB;function n7(){if(qB)return $B;qB=1;var n=Os(),t=Ld(),e=Ed().f,r=wl(),s=lA(),o=gm(),i=Ko(),A=pm(),l=iA(),c=t("".slice),u=Math.min,h=A("endsWith"),g=!l&&!h&&!!(function(){var d=e(String.prototype,"endsWith");return d&&!d.writable})();return n({target:"String",proto:!0,forced:!g&&!h},{endsWith:function(m){var y=s(i(this));o(m);var B=s(m),w=arguments.length>1?arguments[1]:void 0,E=y.length,x=w===void 0?E:u(r(w),E);return c(y,x-B.length,x)===B}}),$B}n7();var jB={},YB;function a7(){if(YB)return jB;YB=1;var n=gs(),t=pa(),e=dm(),r=Rs(),s=Js(),o=Ko(),i=lk(),A=fm(),l=wl(),c=lA(),u=ml(),h=Id(),g=hm(),d=wk(),m=ga(),y=d.UNSUPPORTED_Y,B=4294967295,w=Math.min,E=t([].push),x=t("".slice),b=t("".indexOf),H=!m(function(){var Y=/(?:)/,V=Y.exec;Y.exec=function(){return V.apply(this,arguments)};var L="ab".split(Y);return L.length!==2||L[0]!=="a"||L[1]!=="b"}),$="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return e("split",function(Y,V,L){var j="0".split(void 0,0).length?function(D,S){return D===void 0&&S===0?[]:n(V,this,D,S)}:V;return[function(S,Q){var T=o(this),oe=s(S)?u(S,Y):void 0;return oe?n(oe,S,T,Q):n(j,c(T),S,Q)},function(D,S){var Q=r(this),T=c(D);if(!$){var oe=L(j,Q,T,S,j!==V);if(oe.done)return oe.value}var X=i(Q,RegExp),F=c(h(Q)),M=!!~b(F,"u")||!!~b(F,"v");y?~b(F,"g")||(F+="g"):~b(F,"y")||(F+="y");var R=new X(y?"^(?:"+Q.source+")":Q,F),ae=S===void 0?B:S>>>0;if(ae===0)return[];if(T.length===0)return g(R,T)===null?[T]:[];for(var J=0,k=0,O=[];k<T.length;){R.lastIndex=y?0:k;var N=g(R,y?x(T,k):T),Z;if(N===null||(Z=w(l(R.lastIndex+(y?k:0)),T.length))===J)k=A(T,k,M);else{if(E(O,x(T,J,k)),O.length===ae)return O;for(var se=1;se<=N.length-1;se++)if(E(O,N[se]),O.length===ae)return O;k=J=Z}}return E(O,x(T,J)),O}]},$||!H,y),jB}a7();var Vl={exports:{}},wi={exports:{}},s7=wi.exports,GB;function o7(){return GB||(GB=1,(function(){var n,t,e,r,s,o;typeof performance<"u"&&performance!==null&&performance.now?wi.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(wi.exports=function(){return(n()-s)/1e6},t=process.hrtime,n=function(){var i;return i=t(),i[0]*1e9+i[1]},r=n(),o=process.uptime()*1e9,s=r-o):Date.now?(wi.exports=function(){return Date.now()-e},e=Date.now()):(wi.exports=function(){return new Date().getTime()-e},e=new Date().getTime())}).call(s7)),wi.exports}var zB;function A7(){if(zB)return Vl.exports;zB=1;for(var n=o7(),t=typeof window>"u"?vv:window,e=["moz","webkit"],r="AnimationFrame",s=t["request"+r],o=t["cancel"+r]||t["cancelRequest"+r],i=0;!s&&i<e.length;i++)s=t[e[i]+"Request"+r],o=t[e[i]+"Cancel"+r]||t[e[i]+"CancelRequest"+r];if(!s||!o){var A=0,l=0,c=[],u=1e3/60;s=function(h){if(c.length===0){var g=n(),d=Math.max(0,u-(g-A));A=d+g,setTimeout(function(){var m=c.slice(0);c.length=0;for(var y=0;y<m.length;y++)if(!m[y].cancelled)try{m[y].callback(A)}catch(B){setTimeout(function(){throw B},0)}},Math.round(d))}return c.push({handle:++l,callback:h,cancelled:!1}),l},o=function(h){for(var g=0;g<c.length;g++)c[g].handle===h&&(c[g].cancelled=!0)}}return Vl.exports=function(h){return s.call(t,h)},Vl.exports.cancel=function(){o.apply(t,arguments)},Vl.exports.polyfill=function(h){h||(h=t),h.requestAnimationFrame=s,h.cancelAnimationFrame=o},Vl.exports}var i7=A7();const mp=Y5(i7);var XB={},wp,JB;function kk(){return JB||(JB=1,wp=`
\v\f\r \u2028\u2029\uFEFF`),wp}var yp,ZB;function l7(){if(ZB)return yp;ZB=1;var n=pa(),t=Ko(),e=lA(),r=kk(),s=n("".replace),o=RegExp("^["+r+"]+"),i=RegExp("(^|[^"+r+"])["+r+"]+$"),A=function(l){return function(c){var u=e(t(c));return l&1&&(u=s(u,o,"")),l&2&&(u=s(u,i,"$1")),u}};return yp={start:A(1),end:A(2),trim:A(3)},yp}var Bp,eb;function c7(){if(eb)return Bp;eb=1;var n=Dd().PROPER,t=ga(),e=kk(),r="
";return Bp=function(s){return t(function(){return!!e[s]()||r[s]()!==r||n&&e[s].name!==s})},Bp}var tb;function u7(){if(tb)return XB;tb=1;var n=Os(),t=l7().trim,e=c7();return n({target:"String",proto:!0,forced:e("trim")},{trim:function(){return t(this)}}),XB}u7();var bp,rb;function d7(){return rb||(rb=1,bp=function(n){this.ok=!1,this.alpha=1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n=n.replace(/ /g,""),n=n.toLowerCase();var t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};n=t[n]||n;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3]),parseFloat(l[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],r=0;r<e.length;r++){var s=e[r].re,o=e[r].process,i=s.exec(n);if(i){var A=o(i);this.r=A[0],this.g=A[1],this.b=A[2],A.length>3&&(this.alpha=A[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var l=this.r.toString(16),c=this.g.toString(16),u=this.b.toString(16);return l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),"#"+l+c+u},this.getHelpXML=function(){for(var l=new Array,c=0;c<e.length;c++)for(var u=e[c].example,h=0;h<u.length;h++)l[l.length]=u[h];for(var g in t)l[l.length]=g;var d=document.createElement("ul");d.setAttribute("id","rgbcolor-examples");for(var c=0;c<l.length;c++)try{var m=document.createElement("li"),y=new RGBColor(l[c]),B=document.createElement("div");B.style.cssText="margin: 3px; border: 1px solid black; background:"+y.toHex()+"; color:"+y.toHex(),B.appendChild(document.createTextNode("test"));var w=document.createTextNode(" "+l[c]+" -> "+y.toRGB()+" -> "+y.toHex());m.appendChild(B),m.appendChild(w),d.appendChild(m)}catch{}return d}}),bp}var f7=d7();const mv=Y5(f7);var nb={},ab;function h7(){if(ab)return nb;ab=1;var n=Os(),t=Ld(),e=ak().indexOf,r=Ck(),s=t([].indexOf),o=!!s&&1/s([1],1,-0)<0,i=o||!r("indexOf");return n({target:"Array",proto:!0,forced:i},{indexOf:function(l){var c=arguments.length>1?arguments[1]:void 0;return o?s(this,l,c)||0:e(this,l,c)}}),nb}h7();var sb={},ob;function g7(){if(ob)return sb;ob=1;var n=Os(),t=pa(),e=gm(),r=Ko(),s=lA(),o=pm(),i=t("".indexOf);return n({target:"String",proto:!0,forced:!o("includes")},{includes:function(l){return!!~i(s(r(this)),s(e(l)),arguments.length>1?arguments[1]:void 0)}}),sb}g7();var Ab={},Cp,ib;function p7(){if(ib)return Cp;ib=1;var n=Mi();return Cp=Array.isArray||function(e){return n(e)==="Array"},Cp}var lb;function v7(){if(lb)return Ab;lb=1;var n=Os(),t=pa(),e=p7(),r=t([].reverse),s=[1,2];return n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return e(this)&&(this.length=this.length),r(this)}}),Ab}v7();/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ek=function(n,t){return(Ek=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])})(n,t)};function Dk(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}Ek(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function m7(n){var t="";Array.isArray(n)||(n=[n]);for(var e=0;e<n.length;e++){var r=n[e];if(r.type===Ut.CLOSE_PATH)t+="z";else if(r.type===Ut.HORIZ_LINE_TO)t+=(r.relative?"h":"H")+r.x;else if(r.type===Ut.VERT_LINE_TO)t+=(r.relative?"v":"V")+r.y;else if(r.type===Ut.MOVE_TO)t+=(r.relative?"m":"M")+r.x+" "+r.y;else if(r.type===Ut.LINE_TO)t+=(r.relative?"l":"L")+r.x+" "+r.y;else if(r.type===Ut.CURVE_TO)t+=(r.relative?"c":"C")+r.x1+" "+r.y1+" "+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===Ut.SMOOTH_CURVE_TO)t+=(r.relative?"s":"S")+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===Ut.QUAD_TO)t+=(r.relative?"q":"Q")+r.x1+" "+r.y1+" "+r.x+" "+r.y;else if(r.type===Ut.SMOOTH_QUAD_TO)t+=(r.relative?"t":"T")+r.x+" "+r.y;else{if(r.type!==Ut.ARC)throw new Error('Unexpected command type "'+r.type+'" at index '+e+".");t+=(r.relative?"a":"A")+r.rX+" "+r.rY+" "+r.xRot+" "+ +r.lArcFlag+" "+ +r.sweepFlag+" "+r.x+" "+r.y}}return t}function wv(n,t){var e=n[0],r=n[1];return[e*Math.cos(t)-r*Math.sin(t),e*Math.sin(t)+r*Math.cos(t)]}function Ro(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=0;e<n.length;e++)if(typeof n[e]!="number")throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof n[e]+" == typeof "+n[e]);return!0}var GA=Math.PI;function kp(n,t,e){n.lArcFlag=n.lArcFlag===0?0:1,n.sweepFlag=n.sweepFlag===0?0:1;var r=n.rX,s=n.rY,o=n.x,i=n.y;r=Math.abs(n.rX),s=Math.abs(n.rY);var A=wv([(t-o)/2,(e-i)/2],-n.xRot/180*GA),l=A[0],c=A[1],u=Math.pow(l,2)/Math.pow(r,2)+Math.pow(c,2)/Math.pow(s,2);1<u&&(r*=Math.sqrt(u),s*=Math.sqrt(u)),n.rX=r,n.rY=s;var h=Math.pow(r,2)*Math.pow(c,2)+Math.pow(s,2)*Math.pow(l,2),g=(n.lArcFlag!==n.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(s,2)-h)/h)),d=r*c/s*g,m=-s*l/r*g,y=wv([d,m],n.xRot/180*GA);n.cX=y[0]+(t+o)/2,n.cY=y[1]+(e+i)/2,n.phi1=Math.atan2((c-m)/s,(l-d)/r),n.phi2=Math.atan2((-c-m)/s,(-l-d)/r),n.sweepFlag===0&&n.phi2>n.phi1&&(n.phi2-=2*GA),n.sweepFlag===1&&n.phi2<n.phi1&&(n.phi2+=2*GA),n.phi1*=180/GA,n.phi2*=180/GA}function cb(n,t,e){Ro(n,t,e);var r=n*n+t*t-e*e;if(0>r)return[];if(r===0)return[[n*e/(n*n+t*t),t*e/(n*n+t*t)]];var s=Math.sqrt(r);return[[(n*e+t*s)/(n*n+t*t),(t*e-n*s)/(n*n+t*t)],[(n*e-t*s)/(n*n+t*t),(t*e+n*s)/(n*n+t*t)]]}var Qa,bA=Math.PI/180;function ub(n,t,e){return(1-e)*n+e*t}function db(n,t,e,r){return n+Math.cos(r/180*GA)*t+Math.sin(r/180*GA)*e}function fb(n,t,e,r){var s=1e-6,o=t-n,i=e-t,A=3*o+3*(r-e)-6*i,l=6*(i-o),c=3*o;return Math.abs(A)<s?[-c/l]:(function(u,h,g){var d=u*u/4-h;if(d<-g)return[];if(d<=g)return[-u/2];var m=Math.sqrt(d);return[-u/2-m,-u/2+m]})(l/A,c/A,s)}function hb(n,t,e,r,s){var o=1-s;return n*(o*o*o)+t*(3*o*o*s)+e*(3*o*s*s)+r*(s*s*s)}(function(n){function t(){return s((function(A,l,c){return A.relative&&(A.x1!==void 0&&(A.x1+=l),A.y1!==void 0&&(A.y1+=c),A.x2!==void 0&&(A.x2+=l),A.y2!==void 0&&(A.y2+=c),A.x!==void 0&&(A.x+=l),A.y!==void 0&&(A.y+=c),A.relative=!1),A}))}function e(){var A=NaN,l=NaN,c=NaN,u=NaN;return s((function(h,g,d){return h.type&Ut.SMOOTH_CURVE_TO&&(h.type=Ut.CURVE_TO,A=isNaN(A)?g:A,l=isNaN(l)?d:l,h.x1=h.relative?g-A:2*g-A,h.y1=h.relative?d-l:2*d-l),h.type&Ut.CURVE_TO?(A=h.relative?g+h.x2:h.x2,l=h.relative?d+h.y2:h.y2):(A=NaN,l=NaN),h.type&Ut.SMOOTH_QUAD_TO&&(h.type=Ut.QUAD_TO,c=isNaN(c)?g:c,u=isNaN(u)?d:u,h.x1=h.relative?g-c:2*g-c,h.y1=h.relative?d-u:2*d-u),h.type&Ut.QUAD_TO?(c=h.relative?g+h.x1:h.x1,u=h.relative?d+h.y1:h.y1):(c=NaN,u=NaN),h}))}function r(){var A=NaN,l=NaN;return s((function(c,u,h){if(c.type&Ut.SMOOTH_QUAD_TO&&(c.type=Ut.QUAD_TO,A=isNaN(A)?u:A,l=isNaN(l)?h:l,c.x1=c.relative?u-A:2*u-A,c.y1=c.relative?h-l:2*h-l),c.type&Ut.QUAD_TO){A=c.relative?u+c.x1:c.x1,l=c.relative?h+c.y1:c.y1;var g=c.x1,d=c.y1;c.type=Ut.CURVE_TO,c.x1=((c.relative?0:u)+2*g)/3,c.y1=((c.relative?0:h)+2*d)/3,c.x2=(c.x+2*g)/3,c.y2=(c.y+2*d)/3}else A=NaN,l=NaN;return c}))}function s(A){var l=0,c=0,u=NaN,h=NaN;return function(g){if(isNaN(u)&&!(g.type&Ut.MOVE_TO))throw new Error("path must start with moveto");var d=A(g,l,c,u,h);return g.type&Ut.CLOSE_PATH&&(l=u,c=h),g.x!==void 0&&(l=g.relative?l+g.x:g.x),g.y!==void 0&&(c=g.relative?c+g.y:g.y),g.type&Ut.MOVE_TO&&(u=l,h=c),d}}function o(A,l,c,u,h,g){return Ro(A,l,c,u,h,g),s((function(d,m,y,B){var w=d.x1,E=d.x2,x=d.relative&&!isNaN(B),b=d.x!==void 0?d.x:x?0:m,H=d.y!==void 0?d.y:x?0:y;function $(k){return k*k}d.type&Ut.HORIZ_LINE_TO&&l!==0&&(d.type=Ut.LINE_TO,d.y=d.relative?0:y),d.type&Ut.VERT_LINE_TO&&c!==0&&(d.type=Ut.LINE_TO,d.x=d.relative?0:m),d.x!==void 0&&(d.x=d.x*A+H*c+(x?0:h)),d.y!==void 0&&(d.y=b*l+d.y*u+(x?0:g)),d.x1!==void 0&&(d.x1=d.x1*A+d.y1*c+(x?0:h)),d.y1!==void 0&&(d.y1=w*l+d.y1*u+(x?0:g)),d.x2!==void 0&&(d.x2=d.x2*A+d.y2*c+(x?0:h)),d.y2!==void 0&&(d.y2=E*l+d.y2*u+(x?0:g));var Y=A*u-l*c;if(d.xRot!==void 0&&(A!==1||l!==0||c!==0||u!==1))if(Y===0)delete d.rX,delete d.rY,delete d.xRot,delete d.lArcFlag,delete d.sweepFlag,d.type=Ut.LINE_TO;else{var V=d.xRot*Math.PI/180,L=Math.sin(V),j=Math.cos(V),D=1/$(d.rX),S=1/$(d.rY),Q=$(j)*D+$(L)*S,T=2*L*j*(D-S),oe=$(L)*D+$(j)*S,X=Q*u*u-T*l*u+oe*l*l,F=T*(A*u+l*c)-2*(Q*c*u+oe*A*l),M=Q*c*c-T*A*c+oe*A*A,R=(Math.atan2(F,X-M)+Math.PI)%Math.PI/2,ae=Math.sin(R),J=Math.cos(R);d.rX=Math.abs(Y)/Math.sqrt(X*$(J)+F*ae*J+M*$(ae)),d.rY=Math.abs(Y)/Math.sqrt(X*$(ae)-F*ae*J+M*$(J)),d.xRot=180*R/Math.PI}return d.sweepFlag!==void 0&&0>Y&&(d.sweepFlag=+!d.sweepFlag),d}))}function i(){return function(A){var l={};for(var c in A)l[c]=A[c];return l}}n.ROUND=function(A){function l(c){return Math.round(c*A)/A}return A===void 0&&(A=1e13),Ro(A),function(c){return c.x1!==void 0&&(c.x1=l(c.x1)),c.y1!==void 0&&(c.y1=l(c.y1)),c.x2!==void 0&&(c.x2=l(c.x2)),c.y2!==void 0&&(c.y2=l(c.y2)),c.x!==void 0&&(c.x=l(c.x)),c.y!==void 0&&(c.y=l(c.y)),c.rX!==void 0&&(c.rX=l(c.rX)),c.rY!==void 0&&(c.rY=l(c.rY)),c}},n.TO_ABS=t,n.TO_REL=function(){return s((function(A,l,c){return A.relative||(A.x1!==void 0&&(A.x1-=l),A.y1!==void 0&&(A.y1-=c),A.x2!==void 0&&(A.x2-=l),A.y2!==void 0&&(A.y2-=c),A.x!==void 0&&(A.x-=l),A.y!==void 0&&(A.y-=c),A.relative=!0),A}))},n.NORMALIZE_HVZ=function(A,l,c){return A===void 0&&(A=!0),l===void 0&&(l=!0),c===void 0&&(c=!0),s((function(u,h,g,d,m){if(isNaN(d)&&!(u.type&Ut.MOVE_TO))throw new Error("path must start with moveto");return l&&u.type&Ut.HORIZ_LINE_TO&&(u.type=Ut.LINE_TO,u.y=u.relative?0:g),c&&u.type&Ut.VERT_LINE_TO&&(u.type=Ut.LINE_TO,u.x=u.relative?0:h),A&&u.type&Ut.CLOSE_PATH&&(u.type=Ut.LINE_TO,u.x=u.relative?d-h:d,u.y=u.relative?m-g:m),u.type&Ut.ARC&&(u.rX===0||u.rY===0)&&(u.type=Ut.LINE_TO,delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag),u}))},n.NORMALIZE_ST=e,n.QT_TO_C=r,n.INFO=s,n.SANITIZE=function(A){A===void 0&&(A=0),Ro(A);var l=NaN,c=NaN,u=NaN,h=NaN;return s((function(g,d,m,y,B){var w=Math.abs,E=!1,x=0,b=0;if(g.type&Ut.SMOOTH_CURVE_TO&&(x=isNaN(l)?0:d-l,b=isNaN(c)?0:m-c),g.type&(Ut.CURVE_TO|Ut.SMOOTH_CURVE_TO)?(l=g.relative?d+g.x2:g.x2,c=g.relative?m+g.y2:g.y2):(l=NaN,c=NaN),g.type&Ut.SMOOTH_QUAD_TO?(u=isNaN(u)?d:2*d-u,h=isNaN(h)?m:2*m-h):g.type&Ut.QUAD_TO?(u=g.relative?d+g.x1:g.x1,h=g.relative?m+g.y1:g.y2):(u=NaN,h=NaN),g.type&Ut.LINE_COMMANDS||g.type&Ut.ARC&&(g.rX===0||g.rY===0||!g.lArcFlag)||g.type&Ut.CURVE_TO||g.type&Ut.SMOOTH_CURVE_TO||g.type&Ut.QUAD_TO||g.type&Ut.SMOOTH_QUAD_TO){var H=g.x===void 0?0:g.relative?g.x:g.x-d,$=g.y===void 0?0:g.relative?g.y:g.y-m;x=isNaN(u)?g.x1===void 0?x:g.relative?g.x:g.x1-d:u-d,b=isNaN(h)?g.y1===void 0?b:g.relative?g.y:g.y1-m:h-m;var Y=g.x2===void 0?0:g.relative?g.x:g.x2-d,V=g.y2===void 0?0:g.relative?g.y:g.y2-m;w(H)<=A&&w($)<=A&&w(x)<=A&&w(b)<=A&&w(Y)<=A&&w(V)<=A&&(E=!0)}return g.type&Ut.CLOSE_PATH&&w(d-y)<=A&&w(m-B)<=A&&(E=!0),E?[]:g}))},n.MATRIX=o,n.ROTATE=function(A,l,c){l===void 0&&(l=0),c===void 0&&(c=0),Ro(A,l,c);var u=Math.sin(A),h=Math.cos(A);return o(h,u,-u,h,l-l*h+c*u,c-l*u-c*h)},n.TRANSLATE=function(A,l){return l===void 0&&(l=0),Ro(A,l),o(1,0,0,1,A,l)},n.SCALE=function(A,l){return l===void 0&&(l=A),Ro(A,l),o(A,0,0,l,0,0)},n.SKEW_X=function(A){return Ro(A),o(1,0,Math.atan(A),1,0,0)},n.SKEW_Y=function(A){return Ro(A),o(1,Math.atan(A),0,1,0,0)},n.X_AXIS_SYMMETRY=function(A){return A===void 0&&(A=0),Ro(A),o(-1,0,0,1,A,0)},n.Y_AXIS_SYMMETRY=function(A){return A===void 0&&(A=0),Ro(A),o(1,0,0,-1,0,A)},n.A_TO_C=function(){return s((function(A,l,c){return Ut.ARC===A.type?(function(u,h,g){var d,m,y,B;u.cX||kp(u,h,g);for(var w=Math.min(u.phi1,u.phi2),E=Math.max(u.phi1,u.phi2)-w,x=Math.ceil(E/90),b=new Array(x),H=h,$=g,Y=0;Y<x;Y++){var V=ub(u.phi1,u.phi2,Y/x),L=ub(u.phi1,u.phi2,(Y+1)/x),j=L-V,D=4/3*Math.tan(j*bA/4),S=[Math.cos(V*bA)-D*Math.sin(V*bA),Math.sin(V*bA)+D*Math.cos(V*bA)],Q=S[0],T=S[1],oe=[Math.cos(L*bA),Math.sin(L*bA)],X=oe[0],F=oe[1],M=[X+D*Math.sin(L*bA),F-D*Math.cos(L*bA)],R=M[0],ae=M[1];b[Y]={relative:u.relative,type:Ut.CURVE_TO};var J=function(k,O){var N=wv([k*u.rX,O*u.rY],u.xRot),Z=N[0],se=N[1];return[u.cX+Z,u.cY+se]};d=J(Q,T),b[Y].x1=d[0],b[Y].y1=d[1],m=J(R,ae),b[Y].x2=m[0],b[Y].y2=m[1],y=J(X,F),b[Y].x=y[0],b[Y].y=y[1],u.relative&&(b[Y].x1-=H,b[Y].y1-=$,b[Y].x2-=H,b[Y].y2-=$,b[Y].x-=H,b[Y].y-=$),H=(B=[b[Y].x,b[Y].y])[0],$=B[1]}return b})(A,A.relative?0:l,A.relative?0:c):A}))},n.ANNOTATE_ARCS=function(){return s((function(A,l,c){return A.relative&&(l=0,c=0),Ut.ARC===A.type&&kp(A,l,c),A}))},n.CLONE=i,n.CALCULATE_BOUNDS=function(){var A=function(g){var d={};for(var m in g)d[m]=g[m];return d},l=t(),c=r(),u=e(),h=s((function(g,d,m){var y=u(c(l(A(g))));function B(ae){ae>h.maxX&&(h.maxX=ae),ae<h.minX&&(h.minX=ae)}function w(ae){ae>h.maxY&&(h.maxY=ae),ae<h.minY&&(h.minY=ae)}if(y.type&Ut.DRAWING_COMMANDS&&(B(d),w(m)),y.type&Ut.HORIZ_LINE_TO&&B(y.x),y.type&Ut.VERT_LINE_TO&&w(y.y),y.type&Ut.LINE_TO&&(B(y.x),w(y.y)),y.type&Ut.CURVE_TO){B(y.x),w(y.y);for(var E=0,x=fb(d,y.x1,y.x2,y.x);E<x.length;E++)0<(R=x[E])&&1>R&&B(hb(d,y.x1,y.x2,y.x,R));for(var b=0,H=fb(m,y.y1,y.y2,y.y);b<H.length;b++)0<(R=H[b])&&1>R&&w(hb(m,y.y1,y.y2,y.y,R))}if(y.type&Ut.ARC){B(y.x),w(y.y),kp(y,d,m);for(var $=y.xRot/180*Math.PI,Y=Math.cos($)*y.rX,V=Math.sin($)*y.rX,L=-Math.sin($)*y.rY,j=Math.cos($)*y.rY,D=y.phi1<y.phi2?[y.phi1,y.phi2]:-180>y.phi2?[y.phi2+360,y.phi1+360]:[y.phi2,y.phi1],S=D[0],Q=D[1],T=function(ae){var J=ae[0],k=ae[1],O=180*Math.atan2(k,J)/Math.PI;return O<S?O+360:O},oe=0,X=cb(L,-Y,0).map(T);oe<X.length;oe++)(R=X[oe])>S&&R<Q&&B(db(y.cX,Y,L,R));for(var F=0,M=cb(j,-V,0).map(T);F<M.length;F++){var R;(R=M[F])>S&&R<Q&&w(db(y.cY,V,j,R))}}return g}));return h.minX=1/0,h.maxX=-1/0,h.minY=1/0,h.maxY=-1/0,h}})(Qa||(Qa={}));var No,Tk=(function(){function n(){}return n.prototype.round=function(t){return this.transform(Qa.ROUND(t))},n.prototype.toAbs=function(){return this.transform(Qa.TO_ABS())},n.prototype.toRel=function(){return this.transform(Qa.TO_REL())},n.prototype.normalizeHVZ=function(t,e,r){return this.transform(Qa.NORMALIZE_HVZ(t,e,r))},n.prototype.normalizeST=function(){return this.transform(Qa.NORMALIZE_ST())},n.prototype.qtToC=function(){return this.transform(Qa.QT_TO_C())},n.prototype.aToC=function(){return this.transform(Qa.A_TO_C())},n.prototype.sanitize=function(t){return this.transform(Qa.SANITIZE(t))},n.prototype.translate=function(t,e){return this.transform(Qa.TRANSLATE(t,e))},n.prototype.scale=function(t,e){return this.transform(Qa.SCALE(t,e))},n.prototype.rotate=function(t,e,r){return this.transform(Qa.ROTATE(t,e,r))},n.prototype.matrix=function(t,e,r,s,o,i){return this.transform(Qa.MATRIX(t,e,r,s,o,i))},n.prototype.skewX=function(t){return this.transform(Qa.SKEW_X(t))},n.prototype.skewY=function(t){return this.transform(Qa.SKEW_Y(t))},n.prototype.xSymmetry=function(t){return this.transform(Qa.X_AXIS_SYMMETRY(t))},n.prototype.ySymmetry=function(t){return this.transform(Qa.Y_AXIS_SYMMETRY(t))},n.prototype.annotateArcs=function(){return this.transform(Qa.ANNOTATE_ARCS())},n})(),w7=function(n){return n===" "||n===" "||n==="\r"||n===`
`},gb=function(n){return 48<=n.charCodeAt(0)&&n.charCodeAt(0)<=57},y7=(function(n){function t(){var e=n.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return Dk(t,n),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,r){var s=this;r===void 0&&(r=[]);for(var o=function(h){r.push(h),s.curArgs.length=0,s.canParseCommandOrComma=!0},i=0;i<e.length;i++){var A=e[i],l=!(this.curCommandType!==Ut.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),c=gb(A)&&(this.curNumber==="0"&&A==="0"||l);if(!gb(A)||c)if(A!=="e"&&A!=="E")if(A!=="-"&&A!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(A!=="."||this.curNumberHasExp||this.curNumberHasDecimal||l){if(this.curNumber&&this.curCommandType!==-1){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===Ut.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+i+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"')}this.curArgs.push(u),this.curArgs.length===B7[this.curCommandType]&&(Ut.HORIZ_LINE_TO===this.curCommandType?o({type:Ut.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):Ut.VERT_LINE_TO===this.curCommandType?o({type:Ut.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===Ut.MOVE_TO||this.curCommandType===Ut.LINE_TO||this.curCommandType===Ut.SMOOTH_QUAD_TO?(o({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Ut.MOVE_TO===this.curCommandType&&(this.curCommandType=Ut.LINE_TO)):this.curCommandType===Ut.CURVE_TO?o({type:Ut.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Ut.SMOOTH_CURVE_TO?o({type:Ut.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Ut.QUAD_TO?o({type:Ut.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Ut.ARC&&o({type:Ut.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!w7(A))if(A===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(A!=="+"&&A!=="-"&&A!==".")if(c)this.curNumber=A,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+A+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,A!=="z"&&A!=="Z")if(A==="h"||A==="H")this.curCommandType=Ut.HORIZ_LINE_TO,this.curCommandRelative=A==="h";else if(A==="v"||A==="V")this.curCommandType=Ut.VERT_LINE_TO,this.curCommandRelative=A==="v";else if(A==="m"||A==="M")this.curCommandType=Ut.MOVE_TO,this.curCommandRelative=A==="m";else if(A==="l"||A==="L")this.curCommandType=Ut.LINE_TO,this.curCommandRelative=A==="l";else if(A==="c"||A==="C")this.curCommandType=Ut.CURVE_TO,this.curCommandRelative=A==="c";else if(A==="s"||A==="S")this.curCommandType=Ut.SMOOTH_CURVE_TO,this.curCommandRelative=A==="s";else if(A==="q"||A==="Q")this.curCommandType=Ut.QUAD_TO,this.curCommandRelative=A==="q";else if(A==="t"||A==="T")this.curCommandType=Ut.SMOOTH_QUAD_TO,this.curCommandRelative=A==="t";else{if(A!=="a"&&A!=="A")throw new SyntaxError('Unexpected character "'+A+'" at index '+i+".");this.curCommandType=Ut.ARC,this.curCommandRelative=A==="a"}else r.push({type:Ut.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=A,this.curNumberHasDecimal=A==="."}else this.curNumber+=A,this.curNumberHasDecimal=!0;else this.curNumber+=A;else this.curNumber+=A,this.curNumberHasExp=!0;else this.curNumber+=A,this.curNumberHasExpDigits=this.curNumberHasExp}return r},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(r,s){s===void 0&&(s=[]);for(var o=0,i=Object.getPrototypeOf(this).parse.call(this,r);o<i.length;o++){var A=i[o],l=e(A);Array.isArray(l)?s.push.apply(s,l):s.push(l)}return s}}})},t})(Tk),Ut=(function(n){function t(e){var r=n.call(this)||this;return r.commands=typeof e=="string"?t.parse(e):e,r}return Dk(t,n),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=Qa.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var r=[],s=0,o=this.commands;s<o.length;s++){var i=e(o[s]);Array.isArray(i)?r.push.apply(r,i):r.push(i)}return this.commands=r,this},t.encode=function(e){return m7(e)},t.parse=function(e){var r=new y7,s=[];return r.parse(e,s),r.finish(s),s},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t})(Tk),B7=((No={})[Ut.MOVE_TO]=2,No[Ut.LINE_TO]=2,No[Ut.HORIZ_LINE_TO]=1,No[Ut.VERT_LINE_TO]=1,No[Ut.CLOSE_PATH]=0,No[Ut.QUAD_TO]=4,No[Ut.SMOOTH_QUAD_TO]=2,No[Ut.CURVE_TO]=6,No[Ut.SMOOTH_CURVE_TO]=4,No[Ut.ARC]=7,No),pb={},vb;function b7(){if(vb)return pb;vb=1;var n=Dd().PROPER,t=Ni(),e=Rs(),r=lA(),s=ga(),o=Id(),i="toString",A=RegExp.prototype,l=A[i],c=s(function(){return l.call({source:"a",flags:"b"})!=="/a/b"}),u=n&&l.name!==i;return(c||u)&&t(A,i,function(){var g=e(this),d=r(g.source),m=r(o(g));return"/"+d+"/"+m},{unsafe:!0}),pb}b7();function Vu(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vu=function(t){return typeof t}:Vu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(n)}function C7(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var k7=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],E7=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function D7(n,t,e,r,s){if(typeof n=="string"&&(n=document.getElementById(n)),!n||Vu(n)!=="object"||!("getContext"in n))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var o=n.getContext("2d");try{return o.getImageData(t,e,r,s)}catch(i){throw new Error("unable to access image data: "+i)}}function T7(n,t,e,r,s,o){if(!(isNaN(o)||o<1)){o|=0;var i=D7(n,t,e,r,s);i=x7(i,t,e,r,s,o),n.getContext("2d").putImageData(i,t,e)}}function x7(n,t,e,r,s,o){for(var i=n.data,A=2*o+1,l=r-1,c=s-1,u=o+1,h=u*(u+1)/2,g=new mb,d=g,m,y=1;y<A;y++)d=d.next=new mb,y===u&&(m=d);d.next=g;for(var B=null,w=null,E=0,x=0,b=k7[o],H=E7[o],$=0;$<s;$++){d=g;for(var Y=i[x],V=i[x+1],L=i[x+2],j=i[x+3],D=0;D<u;D++)d.r=Y,d.g=V,d.b=L,d.a=j,d=d.next;for(var S=0,Q=0,T=0,oe=0,X=u*Y,F=u*V,M=u*L,R=u*j,ae=h*Y,J=h*V,k=h*L,O=h*j,N=1;N<u;N++){var Z=x+((l<N?l:N)<<2),se=i[Z],ge=i[Z+1],fe=i[Z+2],Ae=i[Z+3],Fe=u-N;ae+=(d.r=se)*Fe,J+=(d.g=ge)*Fe,k+=(d.b=fe)*Fe,O+=(d.a=Ae)*Fe,S+=se,Q+=ge,T+=fe,oe+=Ae,d=d.next}B=g,w=m;for(var be=0;be<r;be++){var Ke=O*b>>>H;if(i[x+3]=Ke,Ke!==0){var Xe=255/Ke;i[x]=(ae*b>>>H)*Xe,i[x+1]=(J*b>>>H)*Xe,i[x+2]=(k*b>>>H)*Xe}else i[x]=i[x+1]=i[x+2]=0;ae-=X,J-=F,k-=M,O-=R,X-=B.r,F-=B.g,M-=B.b,R-=B.a;var xe=be+o+1;xe=E+(xe<l?xe:l)<<2,S+=B.r=i[xe],Q+=B.g=i[xe+1],T+=B.b=i[xe+2],oe+=B.a=i[xe+3],ae+=S,J+=Q,k+=T,O+=oe,B=B.next;var te=w,lt=te.r,Pe=te.g,rt=te.b,Te=te.a;X+=lt,F+=Pe,M+=rt,R+=Te,S-=lt,Q-=Pe,T-=rt,oe-=Te,w=w.next,x+=4}E+=r}for(var Et=0;Et<r;Et++){x=Et<<2;var ot=i[x],yt=i[x+1],pt=i[x+2],Oe=i[x+3],it=u*ot,W=u*yt,z=u*pt,ye=u*Oe,qe=h*ot,ct=h*yt,$e=h*pt,Ve=h*Oe;d=g;for(var Mt=0;Mt<u;Mt++)d.r=ot,d.g=yt,d.b=pt,d.a=Oe,d=d.next;for(var tt=r,_t=0,rr=0,St=0,hr=0,Vt=1;Vt<=o;Vt++){x=tt+Et<<2;var Xt=u-Vt;qe+=(d.r=ot=i[x])*Xt,ct+=(d.g=yt=i[x+1])*Xt,$e+=(d.b=pt=i[x+2])*Xt,Ve+=(d.a=Oe=i[x+3])*Xt,hr+=ot,_t+=yt,rr+=pt,St+=Oe,d=d.next,Vt<c&&(tt+=r)}x=Et,B=g,w=m;for(var mr=0;mr<s;mr++){var Kt=x<<2;i[Kt+3]=Oe=Ve*b>>>H,Oe>0?(Oe=255/Oe,i[Kt]=(qe*b>>>H)*Oe,i[Kt+1]=(ct*b>>>H)*Oe,i[Kt+2]=($e*b>>>H)*Oe):i[Kt]=i[Kt+1]=i[Kt+2]=0,qe-=it,ct-=W,$e-=z,Ve-=ye,it-=B.r,W-=B.g,z-=B.b,ye-=B.a,Kt=Et+((Kt=mr+u)<c?Kt:c)*r<<2,qe+=hr+=B.r=i[Kt],ct+=_t+=B.g=i[Kt+1],$e+=rr+=B.b=i[Kt+2],Ve+=St+=B.a=i[Kt+3],B=B.next,it+=ot=w.r,W+=yt=w.g,z+=pt=w.b,ye+=Oe=w.a,hr-=ot,_t-=yt,rr-=pt,St-=Oe,w=w.next,x+=r}}return n}var mb=function n(){C7(this,n),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function S7(){var{DOMParser:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:n,createCanvas(e,r){return new OffscreenCanvas(e,r)},createImage(e){return SA(function*(){var r=yield fetch(e),s=yield r.blob(),o=yield createImageBitmap(s);return o})()}};return(typeof DOMParser<"u"||typeof n>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function F7(n){var{DOMParser:t,canvas:e,fetch:r}=n;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:r,createCanvas:e.createCanvas,createImage:e.loadImage}}var L7=Object.freeze({__proto__:null,offscreen:S7,node:F7});function _i(n){return n.replace(/(?!\u3000)\s+/gm," ")}function xk(n){return n.replace(/^[\n \t]+/,"")}function Sk(n){return n.replace(/[\n \t]+$/,"")}function zs(n){var t=(n||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}var U7=/^[A-Z-]+$/;function Fk(n){return U7.test(n)?n.toLowerCase():n}function mm(n){var t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(n)||[];return t[2]||t[3]||t[4]}function Lk(n){if(!n.startsWith("rgb"))return n;var t=3,e=n.replace(/\d+(\.\d+)?/g,(r,s)=>t--&&s?String(Math.round(parseFloat(r))):r);return e}var I7=/(\[[^\]]+\])/g,M7=/(#[^\s+>~.[:]+)/g,Q7=/(\.[^\s+>~.[:]+)/g,N7=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,_7=/(:[\w-]+\([^)]*\))/gi,R7=/(:[^\s+>~.[:]+)/g,O7=/([^\s+>~.[:]+)/g;function gi(n,t){var e=t.exec(n);return e?[n.replace(t," "),e.length]:[n,0]}function Uk(n){var t=[0,0,0],e=n.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[e,r]=gi(e,I7),t[1]+=r,[e,r]=gi(e,M7),t[0]+=r,[e,r]=gi(e,Q7),t[1]+=r,[e,r]=gi(e,N7),t[2]+=r,[e,r]=gi(e,_7),t[1]+=r,[e,r]=gi(e,R7),t[1]+=r,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,r]=gi(e,O7),t[2]+=r,t.join("")}var xi=1e-8;function yv(n){return Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2))}function od(n,t){return(n[0]*t[0]+n[1]*t[1])/(yv(n)*yv(t))}function Bv(n,t){return(n[0]*t[1]<n[1]*t[0]?-1:1)*Math.acos(od(n,t))}function bv(n){return n*n*n}function Cv(n){return 3*n*n*(1-n)}function kv(n){return 3*n*(1-n)*(1-n)}function Ev(n){return(1-n)*(1-n)*(1-n)}function Dv(n){return n*n}function Tv(n){return 2*n*(1-n)}function xv(n){return(1-n)*(1-n)}class fr{constructor(t,e,r){this.document=t,this.name=e,this.value=r,this.isNormalizedColor=!1}static empty(t){return new fr(t,"EMPTY","")}split(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:e,name:r}=this;return _i(this.getString()).trim().split(t).map(s=>new fr(e,r,s))}hasValue(t){var{value:e}=this;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){var{value:e}=this,r=typeof e=="string";return!r||!t?r:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var{value:e}=this,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=Lk(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[r,s]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:o}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(o.computeSize("x"),o.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(o.computeSize("x"),o.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*o.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*o.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&s):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*o.computeSize(r);default:{var i=this.getNumber();return e&&i<1?i*o.computeSize(r):i}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var r=this.getDefinition();if(!r)return null;if(typeof r.createGradient=="function")return r.createGradient(this.document.ctx,t,e);if(typeof r.createPattern=="function"){if(r.getHrefAttribute().hasValue()){var s=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),s.hasValue()&&r.getAttribute("patternTransform",!0).setValue(s.value)}return r.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?fr.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),r=e.length,s=0,o=0;o<r&&(e[o]===","&&s++,s!==3);o++);if(t.hasValue()&&this.isString()&&s!==3){var i=new mv(e);i.ok&&(i.alpha=t.getNumber(),e=i.toRGBA())}return new fr(this.document,this.name,e)}}fr.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class Ik{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class ha{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[r=e,s=e]=zs(t);return new ha(r,s)}static parseScale(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=e,s=r]=zs(t);return new ha(r,s)}static parsePath(t){for(var e=zs(t),r=e.length,s=[],o=0;o<r;o+=2)s.push(new ha(e[o],e[o+1]));return s}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:r}=this,s=e*t[0]+r*t[2]+t[4],o=e*t[1]+r*t[3]+t[5];this.x=s,this.y=o}}class Mk{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:r}=this,s=t.ctx.canvas;s.onclick=e,s.onmousemove=r,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:r}=this,{style:s}=t.ctx.canvas;s&&(s.cursor=""),e.forEach((o,i)=>{for(var{run:A}=o,l=r[i];l;)A(l),l=l.parent}),this.events=[],this.eventElements=[]}}checkPath(t,e){if(!(!this.working||!e)){var{events:r,eventElements:s}=this;r.forEach((o,i)=>{var{x:A,y:l}=o;!s[i]&&e.isPointInPath&&e.isPointInPath(A,l)&&(s[i]=t)})}}checkBoundingBox(t,e){if(!(!this.working||!e)){var{events:r,eventElements:s}=this;r.forEach((o,i)=>{var{x:A,y:l}=o;!s[i]&&e.isPointInBox(A,l)&&(s[i]=t)})}}mapXY(t,e){for(var{window:r,ctx:s}=this.screen,o=new ha(t,e),i=s.canvas;i;)o.x-=i.offsetLeft,o.y-=i.offsetTop,i=i.offsetParent;return r.scrollX&&(o.x+=r.scrollX),r.scrollY&&(o.y+=r.scrollY),o}onClick(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:r,run(s){s.onClick&&s.onClick()}})}onMouseMove(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:r,run(s){s.onMouseMove&&s.onMouseMove()}})}}var Qk=typeof window<"u"?window:null,Nk=typeof fetch<"u"?fetch.bind(void 0):null;class bc{constructor(t){var{fetch:e=Nk,window:r=Qk}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Ik,this.mouse=new Mk(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:r,aspectRatio:s,width:o,desiredWidth:i,height:A,desiredHeight:l,minX:c=0,minY:u=0,refX:h,refY:g,clip:d=!1,clipX:m=0,clipY:y=0}=t,B=_i(s).replace(/^defer\s/,""),[w,E]=B.split(" "),x=w||"xMidYMid",b=E||"meet",H=o/i,$=A/l,Y=Math.min(H,$),V=Math.max(H,$),L=i,j=l;b==="meet"&&(L*=Y,j*=Y),b==="slice"&&(L*=V,j*=V);var D=new fr(e,"refX",h),S=new fr(e,"refY",g),Q=D.hasValue()&&S.hasValue();if(Q&&r.translate(-Y*D.getPixels("x"),-Y*S.getPixels("y")),d){var T=Y*m,oe=Y*y;r.beginPath(),r.moveTo(T,oe),r.lineTo(o,oe),r.lineTo(o,A),r.lineTo(T,A),r.closePath(),r.clip()}if(!Q){var X=b==="meet"&&Y===$,F=b==="slice"&&V===$,M=b==="meet"&&Y===H,R=b==="slice"&&V===H;x.startsWith("xMid")&&(X||F)&&r.translate(o/2-L/2,0),x.endsWith("YMid")&&(M||R)&&r.translate(0,A/2-j/2),x.startsWith("xMax")&&(X||F)&&r.translate(o-L,0),x.endsWith("YMax")&&(M||R)&&r.translate(0,A-j)}switch(!0){case x==="none":r.scale(H,$);break;case b==="meet":r.scale(Y,Y);break;case b==="slice":r.scale(V,V);break}r.translate(-c,-u)}start(t){var{enableRedraw:e=!1,ignoreMouse:r=!1,ignoreAnimation:s=!1,ignoreDimensions:o=!1,ignoreClear:i=!1,forceRedraw:A,scaleWidth:l,scaleHeight:c,offsetX:u,offsetY:h}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:g,mouse:d}=this,m=1e3/g;if(this.frameDuration=m,this.readyPromise=new Promise(x=>{this.resolveReady=x}),this.isReady()&&this.render(t,o,i,l,c,u,h),!!e){var y=Date.now(),B=y,w=0,E=()=>{y=Date.now(),w=y-B,w>=m&&(B=y-w%m,this.shouldUpdate(s,A)&&(this.render(t,o,i,l,c,u,h),d.runEvents())),this.intervalId=mp(E)};r||d.start(),this.intervalId=mp(E)}}stop(){this.intervalId&&(mp.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:r}=this,s=this.animations.reduce((o,i)=>i.update(r)||o,!1);if(s)return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,r,s,o,i,A){var{CLIENT_WIDTH:l,CLIENT_HEIGHT:c,viewPort:u,ctx:h,isFirstRender:g}=this,d=h.canvas;u.clear(),d.width&&d.height?u.setCurrent(d.width,d.height):u.setCurrent(l,c);var m=t.getStyle("width"),y=t.getStyle("height");!e&&(g||typeof s!="number"&&typeof o!="number")&&(m.hasValue()&&(d.width=m.getPixels("x"),d.style&&(d.style.width="".concat(d.width,"px"))),y.hasValue()&&(d.height=y.getPixels("y"),d.style&&(d.style.height="".concat(d.height,"px"))));var B=d.clientWidth||d.width,w=d.clientHeight||d.height;if(e&&m.hasValue()&&y.hasValue()&&(B=m.getPixels("x"),w=y.getPixels("y")),u.setCurrent(B,w),typeof i=="number"&&t.getAttribute("x",!0).setValue(i),typeof A=="number"&&t.getAttribute("y",!0).setValue(A),typeof s=="number"||typeof o=="number"){var E=zs(t.getAttribute("viewBox").getString()),x=0,b=0;if(typeof s=="number"){var H=t.getStyle("width");H.hasValue()?x=H.getPixels("x")/s:isNaN(E[2])||(x=E[2]/s)}if(typeof o=="number"){var $=t.getStyle("height");$.hasValue()?b=$.getPixels("y")/o:isNaN(E[3])||(b=E[3]/o)}x||(x=b),b||(b=x),t.getAttribute("width",!0).setValue(s),t.getAttribute("height",!0).setValue(o);var Y=t.getStyle("transform",!0,!0);Y.setValue("".concat(Y.getString()," scale(").concat(1/x,", ").concat(1/b,")"))}r||h.clearRect(0,0,B,w),t.render(h),g&&(this.isFirstRender=!1)}}bc.defaultWindow=Qk;bc.defaultFetch=Nk;var{defaultFetch:H7}=bc,P7=typeof DOMParser<"u"?DOMParser:null;class Wu{constructor(){var{fetch:t=H7,DOMParser:e=P7}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return SA(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return SA(function*(){var r=yield e.fetch(t),s=yield r.text();return e.parseFromString(s)})()}}class _k{constructor(t,e){this.type="translate",this.point=null,this.point=ha.parse(e)}apply(t){var{x:e,y:r}=this.point;t.translate(e||0,r||0)}unapply(t){var{x:e,y:r}=this.point;t.translate(-1*e||0,-1*r||0)}applyToPoint(t){var{x:e,y:r}=this.point;t.applyTransform([1,0,0,1,e||0,r||0])}}class Rk{constructor(t,e,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var s=zs(e);this.angle=new fr(t,"angle",s[0]),this.originX=r[0],this.originY=r[1],this.cx=s[1]||0,this.cy=s[2]||0}apply(t){var{cx:e,cy:r,originX:s,originY:o,angle:i}=this,A=e+s.getPixels("x"),l=r+o.getPixels("y");t.translate(A,l),t.rotate(i.getRadians()),t.translate(-A,-l)}unapply(t){var{cx:e,cy:r,originX:s,originY:o,angle:i}=this,A=e+s.getPixels("x"),l=r+o.getPixels("y");t.translate(A,l),t.rotate(-1*i.getRadians()),t.translate(-A,-l)}applyToPoint(t){var{cx:e,cy:r,angle:s}=this,o=s.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(o),Math.sin(o),-Math.sin(o),Math.cos(o),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}class Ok{constructor(t,e,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var s=ha.parseScale(e);(s.x===0||s.y===0)&&(s.x=xi,s.y=xi),this.scale=s,this.originX=r[0],this.originY=r[1]}apply(t){var{scale:{x:e,y:r},originX:s,originY:o}=this,i=s.getPixels("x"),A=o.getPixels("y");t.translate(i,A),t.scale(e,r||e),t.translate(-i,-A)}unapply(t){var{scale:{x:e,y:r},originX:s,originY:o}=this,i=s.getPixels("x"),A=o.getPixels("y");t.translate(i,A),t.scale(1/e,1/r||e),t.translate(-i,-A)}applyToPoint(t){var{x:e,y:r}=this.scale;t.applyTransform([e||0,0,0,r||0,0,0])}}class wm{constructor(t,e,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=zs(e),this.originX=r[0],this.originY=r[1]}apply(t){var{originX:e,originY:r,matrix:s}=this,o=e.getPixels("x"),i=r.getPixels("y");t.translate(o,i),t.transform(s[0],s[1],s[2],s[3],s[4],s[5]),t.translate(-o,-i)}unapply(t){var{originX:e,originY:r,matrix:s}=this,o=s[0],i=s[2],A=s[4],l=s[1],c=s[3],u=s[5],h=0,g=0,d=1,m=1/(o*(c*d-u*g)-i*(l*d-u*h)+A*(l*g-c*h)),y=e.getPixels("x"),B=r.getPixels("y");t.translate(y,B),t.transform(m*(c*d-u*g),m*(u*h-l*d),m*(A*g-i*d),m*(o*d-A*h),m*(i*u-A*c),m*(A*l-o*u)),t.translate(-y,-B)}applyToPoint(t){t.applyTransform(this.matrix)}}class ym extends wm{constructor(t,e,r){super(t,e,r),this.type="skew",this.angle=null,this.angle=new fr(t,"angle",e)}}class Hk extends ym{constructor(t,e,r){super(t,e,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Pk extends ym{constructor(t,e,r){super(t,e,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function V7(n){return _i(n).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function W7(n){var[t,e]=n.split("(");return[t.trim(),e.trim().replace(")","")]}class si{constructor(t,e,r){this.document=t,this.transforms=[];var s=V7(e);s.forEach(o=>{if(o!=="none"){var[i,A]=W7(o),l=si.transformTypes[i];typeof l<"u"&&this.transforms.push(new l(this.document,A,r))}})}static fromElement(t,e){var r=e.getStyle("transform",!1,!0),[s,o=s]=e.getStyle("transform-origin",!1,!0).split(),i=[s,o];return r.hasValue()?new si(t,r.getString(),i):null}apply(t){for(var{transforms:e}=this,r=e.length,s=0;s<r;s++)e[s].apply(t)}unapply(t){for(var{transforms:e}=this,r=e.length,s=r-1;s>=0;s--)e[s].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,r=e.length,s=0;s<r;s++)e[s].applyToPoint(t)}}si.transformTypes={translate:_k,rotate:Rk,scale:Ok,matrix:wm,skewX:Hk,skewY:Pk};class Rn{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=t,this.node=e,this.captureTextNodes=r,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!e||e.nodeType!==1)){if(Array.from(e.attributes).forEach(A=>{var l=Fk(A.nodeName);this.attributes[l]=new fr(t,l,A.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var s=this.getAttribute("style").getString().split(";").map(A=>A.trim());s.forEach(A=>{if(A){var[l,c]=A.split(":").map(u=>u.trim());this.styles[l]=new fr(t,l,c)}})}var{definitions:o}=t,i=this.getAttribute("id");i.hasValue()&&(o[i.getString()]||(o[i.getString()]=this)),Array.from(e.childNodes).forEach(A=>{if(A.nodeType===1)this.addChild(A);else if(r&&(A.nodeType===3||A.nodeType===4)){var l=t.createTextNode(A);l.getText().length>0&&this.addChild(l)}})}}getAttribute(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[t];if(!r&&e){var s=new fr(this.document,t,"");return this.attributes[t]=s,s}return r||fr.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return fr.empty(this.document)}getStyle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=this.styles[t];if(s)return s;var o=this.getAttribute(t);if(o!=null&&o.hasValue())return this.styles[t]=o,o;if(!r){var{parent:i}=this;if(i){var A=i.getStyle(t);if(A!=null&&A.hasValue())return A}}if(e){var l=new fr(this.document,t,"");return this.styles[t]=l,l}return s||fr.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=si.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var s=r.getDefinition();s&&s.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){var e=t instanceof Rn?t:this.document.createElement(t);e.parent=this,Rn.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:r}=this;if(typeof r.matches=="function")return r.matches(t);var s=(e=r.getAttribute)===null||e===void 0?void 0:e.call(r,"class");return!s||s===""?!1:s.split(" ").some(o=>".".concat(o)===t)}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var r in t)if(!r.startsWith("@")&&this.matchesSelector(r)){var s=t[r],o=e[r];if(s)for(var i in s){var A=this.stylesSpecificity[i];typeof A>"u"&&(A="000"),o>=A&&(this.styles[i]=s[i],this.stylesSpecificity[i]=o)}}}removeStyles(t,e){var r=e.reduce((s,o)=>{var i=t.getStyle(o);if(!i.hasValue())return s;var A=i.getString();return i.setValue(""),[...s,[o,A]]},[]);return r}restoreStyles(t,e){e.forEach(r=>{var[s,o]=r;t.getStyle(s,!0).setValue(o)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}}Rn.ignoreChildTypes=["title"];class Vk extends Rn{constructor(t,e,r){super(t,e,r)}}function K7(n){var t=n.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function $7(n){return typeof process>"u"?n:n.trim().split(",").map(K7).join(",")}function q7(n){if(!n)return"";var t=n.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function j7(n){if(!n)return"";var t=n.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}class xs{constructor(t,e,r,s,o,i){var A=i?typeof i=="string"?xs.parse(i):i:{};this.fontFamily=o||A.fontFamily,this.fontSize=s||A.fontSize,this.fontStyle=t||A.fontStyle,this.fontWeight=r||A.fontWeight,this.fontVariant=e||A.fontVariant}static parse(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,r="",s="",o="",i="",A="",l=_i(t).trim().split(" "),c={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return l.forEach(u=>{switch(!0){case(!c.fontStyle&&xs.styles.includes(u)):u!=="inherit"&&(r=u),c.fontStyle=!0;break;case(!c.fontVariant&&xs.variants.includes(u)):u!=="inherit"&&(s=u),c.fontStyle=!0,c.fontVariant=!0;break;case(!c.fontWeight&&xs.weights.includes(u)):u!=="inherit"&&(o=u),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0;break;case!c.fontSize:u!=="inherit"&&([i]=u.split("/")),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0,c.fontSize=!0;break;default:u!=="inherit"&&(A+=u)}}),new xs(r,s,o,i,A,e)}toString(){return[q7(this.fontStyle),this.fontVariant,j7(this.fontWeight),this.fontSize,$7(this.fontFamily)].join(" ").trim()}}xs.styles="normal|italic|oblique|inherit";xs.variants="normal|small-caps|inherit";xs.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class bo{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=r,this.y2=s,this.addPoint(t,e),this.addPoint(r,s)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:r,x2:s,y2:o}=t;this.addPoint(e,r),this.addPoint(s,o)}}sumCubic(t,e,r,s,o){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*s+Math.pow(t,3)*o}bezierCurveAdd(t,e,r,s,o){var i=6*e-12*r+6*s,A=-3*e+9*r-9*s+3*o,l=3*r-3*e;if(A===0){if(i===0)return;var c=-l/i;0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,r,s,o)):this.addY(this.sumCubic(c,e,r,s,o)));return}var u=Math.pow(i,2)-4*l*A;if(!(u<0)){var h=(-i+Math.sqrt(u))/(2*A);0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,r,s,o)):this.addY(this.sumCubic(h,e,r,s,o)));var g=(-i-Math.sqrt(u))/(2*A);0<g&&g<1&&(t?this.addX(this.sumCubic(g,e,r,s,o)):this.addY(this.sumCubic(g,e,r,s,o)))}}addBezierCurve(t,e,r,s,o,i,A,l){this.addPoint(t,e),this.addPoint(A,l),this.bezierCurveAdd(!0,t,r,o,A),this.bezierCurveAdd(!1,e,s,i,l)}addQuadraticCurve(t,e,r,s,o,i){var A=t+.6666666666666666*(r-t),l=e+2/3*(s-e),c=A+1/3*(o-t),u=l+1/3*(i-e);this.addBezierCurve(t,e,A,c,l,u,o,i)}isPointInBox(t,e){var{x1:r,y1:s,x2:o,y2:i}=this;return r<=t&&t<=o&&s<=e&&e<=i}}class Qr extends Ut{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new ha(0,0),this.control=new ha(0,0),this.current=new ha(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",r=new ha(this.command[t],this.command[e]);return this.makeAbsolute(r)}getAsControlPoint(t,e){var r=this.getPoint(t,e);return this.control=r,r}getAsCurrentPoint(t,e){var r=this.getPoint(t,e);return this.current=r,r}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==Ut.CURVE_TO&&t!==Ut.SMOOTH_CURVE_TO&&t!==Ut.QUAD_TO&&t!==Ut.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:r},control:{x:s,y:o}}=this,i=new ha(2*e-s,2*r-o);return i}makeAbsolute(t){if(this.command.relative){var{x:e,y:r}=this.current;t.x+=e,t.y+=r}return t}addMarker(t,e,r){var{points:s,angles:o}=this;r&&o.length>0&&!o[o.length-1]&&(o[o.length-1]=s[s.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,r=0;r<e;r++)if(!t[r]){for(var s=r+1;s<e;s++)if(t[s]){t[r]=t[s];break}}return t}}class Ai extends Rn{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){var r=this.getStyle("fill"),s=this.getStyle("fill-opacity"),o=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var A=r.getFillStyleDefinition(this,s);A&&(t.fillStyle=A)}else if(r.hasValue()){r.getString()==="currentColor"&&r.setValue(this.getStyle("color").getColor());var l=r.getColor();l!=="inherit"&&(t.fillStyle=l==="none"?"rgba(0,0,0,0)":l)}if(s.hasValue()){var c=new fr(this.document,"fill",t.fillStyle).addOpacity(s).getColor();t.fillStyle=c}if(o.isUrlDefinition()){var u=o.getFillStyleDefinition(this,i);u&&(t.strokeStyle=u)}else if(o.hasValue()){o.getString()==="currentColor"&&o.setValue(this.getStyle("color").getColor());var h=o.getString();h!=="inherit"&&(t.strokeStyle=h==="none"?"rgba(0,0,0,0)":h)}if(i.hasValue()){var g=new fr(this.document,"stroke",t.strokeStyle).addOpacity(i).getString();t.strokeStyle=g}var d=this.getStyle("stroke-width");if(d.hasValue()){var m=d.getPixels();t.lineWidth=m||xi}var y=this.getStyle("stroke-linecap"),B=this.getStyle("stroke-linejoin"),w=this.getStyle("stroke-miterlimit"),E=this.getStyle("stroke-dasharray"),x=this.getStyle("stroke-dashoffset");if(y.hasValue()&&(t.lineCap=y.getString()),B.hasValue()&&(t.lineJoin=B.getString()),w.hasValue()&&(t.miterLimit=w.getNumber()),E.hasValue()&&E.getString()!=="none"){var b=zs(E.getString());typeof t.setLineDash<"u"?t.setLineDash(b):typeof t.webkitLineDash<"u"?t.webkitLineDash=b:typeof t.mozDash<"u"&&!(b.length===1&&b[0]===0)&&(t.mozDash=b);var H=x.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=H:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=H:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=H)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){var $=this.getStyle("font"),Y=this.getStyle("font-style"),V=this.getStyle("font-variant"),L=this.getStyle("font-weight"),j=this.getStyle("font-size"),D=this.getStyle("font-family"),S=new xs(Y.getString(),V.getString(),L.getString(),j.hasValue()?"".concat(j.getPixels(!0),"px"):"",D.getString(),xs.parse($.getString(),t.font));Y.setValue(S.fontStyle),V.setValue(S.fontVariant),L.setValue(S.fontWeight),j.setValue(S.fontSize),D.setValue(S.fontFamily),t.font=S.toString(),j.isPixels()&&(this.document.emSize=j.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}}class mn extends Ai{constructor(t,e,r){super(t,e,r),this.type="path",this.pathParser=null,this.pathParser=new Qr(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,r=new bo;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Qr.MOVE_TO:this.pathM(t,r);break;case Qr.LINE_TO:this.pathL(t,r);break;case Qr.HORIZ_LINE_TO:this.pathH(t,r);break;case Qr.VERT_LINE_TO:this.pathV(t,r);break;case Qr.CURVE_TO:this.pathC(t,r);break;case Qr.SMOOTH_CURVE_TO:this.pathS(t,r);break;case Qr.QUAD_TO:this.pathQ(t,r);break;case Qr.SMOOTH_QUAD_TO:this.pathT(t,r);break;case Qr.ARC:this.pathA(t,r);break;case Qr.CLOSE_PATH:this.pathZ(t,r);break}return r}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),r=t.getMarkerAngles(),s=e.map((o,i)=>[o,r[i]]);return s}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var s=r.length-1,o=this.getStyle("marker-start"),i=this.getStyle("marker-mid"),A=this.getStyle("marker-end");if(o.isUrlDefinition()){var l=o.getDefinition(),[c,u]=r[0];l.render(t,c,u)}if(i.isUrlDefinition())for(var h=i.getDefinition(),g=1;g<s;g++){var[d,m]=r[g];h.render(t,d,m)}if(A.isUrlDefinition()){var y=A.getDefinition(),[B,w]=r[s];y.render(t,B,w)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:r}=this,{point:s}=mn.pathM(r),{x:o,y:i}=s;r.addMarker(s),e.addPoint(o,i),t&&t.moveTo(o,i)}static pathL(t){var{current:e}=t,r=t.getAsCurrentPoint();return{current:e,point:r}}pathL(t,e){var{pathParser:r}=this,{current:s,point:o}=mn.pathL(r),{x:i,y:A}=o;r.addMarker(o,s),e.addPoint(i,A),t&&t.lineTo(i,A)}static pathH(t){var{current:e,command:r}=t,s=new ha((r.relative?e.x:0)+r.x,e.y);return t.current=s,{current:e,point:s}}pathH(t,e){var{pathParser:r}=this,{current:s,point:o}=mn.pathH(r),{x:i,y:A}=o;r.addMarker(o,s),e.addPoint(i,A),t&&t.lineTo(i,A)}static pathV(t){var{current:e,command:r}=t,s=new ha(e.x,(r.relative?e.y:0)+r.y);return t.current=s,{current:e,point:s}}pathV(t,e){var{pathParser:r}=this,{current:s,point:o}=mn.pathV(r),{x:i,y:A}=o;r.addMarker(o,s),e.addPoint(i,A),t&&t.lineTo(i,A)}static pathC(t){var{current:e}=t,r=t.getPoint("x1","y1"),s=t.getAsControlPoint("x2","y2"),o=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:s,currentPoint:o}}pathC(t,e){var{pathParser:r}=this,{current:s,point:o,controlPoint:i,currentPoint:A}=mn.pathC(r);r.addMarker(A,i,o),e.addBezierCurve(s.x,s.y,o.x,o.y,i.x,i.y,A.x,A.y),t&&t.bezierCurveTo(o.x,o.y,i.x,i.y,A.x,A.y)}static pathS(t){var{current:e}=t,r=t.getReflectedControlPoint(),s=t.getAsControlPoint("x2","y2"),o=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:s,currentPoint:o}}pathS(t,e){var{pathParser:r}=this,{current:s,point:o,controlPoint:i,currentPoint:A}=mn.pathS(r);r.addMarker(A,i,o),e.addBezierCurve(s.x,s.y,o.x,o.y,i.x,i.y,A.x,A.y),t&&t.bezierCurveTo(o.x,o.y,i.x,i.y,A.x,A.y)}static pathQ(t){var{current:e}=t,r=t.getAsControlPoint("x1","y1"),s=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:s}}pathQ(t,e){var{pathParser:r}=this,{current:s,controlPoint:o,currentPoint:i}=mn.pathQ(r);r.addMarker(i,o,o),e.addQuadraticCurve(s.x,s.y,o.x,o.y,i.x,i.y),t&&t.quadraticCurveTo(o.x,o.y,i.x,i.y)}static pathT(t){var{current:e}=t,r=t.getReflectedControlPoint();t.control=r;var s=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:s}}pathT(t,e){var{pathParser:r}=this,{current:s,controlPoint:o,currentPoint:i}=mn.pathT(r);r.addMarker(i,o,o),e.addQuadraticCurve(s.x,s.y,o.x,o.y,i.x,i.y),t&&t.quadraticCurveTo(o.x,o.y,i.x,i.y)}static pathA(t){var{current:e,command:r}=t,{rX:s,rY:o,xRot:i,lArcFlag:A,sweepFlag:l}=r,c=i*(Math.PI/180),u=t.getAsCurrentPoint(),h=new ha(Math.cos(c)*(e.x-u.x)/2+Math.sin(c)*(e.y-u.y)/2,-Math.sin(c)*(e.x-u.x)/2+Math.cos(c)*(e.y-u.y)/2),g=Math.pow(h.x,2)/Math.pow(s,2)+Math.pow(h.y,2)/Math.pow(o,2);g>1&&(s*=Math.sqrt(g),o*=Math.sqrt(g));var d=(A===l?-1:1)*Math.sqrt((Math.pow(s,2)*Math.pow(o,2)-Math.pow(s,2)*Math.pow(h.y,2)-Math.pow(o,2)*Math.pow(h.x,2))/(Math.pow(s,2)*Math.pow(h.y,2)+Math.pow(o,2)*Math.pow(h.x,2)));isNaN(d)&&(d=0);var m=new ha(d*s*h.y/o,d*-o*h.x/s),y=new ha((e.x+u.x)/2+Math.cos(c)*m.x-Math.sin(c)*m.y,(e.y+u.y)/2+Math.sin(c)*m.x+Math.cos(c)*m.y),B=Bv([1,0],[(h.x-m.x)/s,(h.y-m.y)/o]),w=[(h.x-m.x)/s,(h.y-m.y)/o],E=[(-h.x-m.x)/s,(-h.y-m.y)/o],x=Bv(w,E);return od(w,E)<=-1&&(x=Math.PI),od(w,E)>=1&&(x=0),{currentPoint:u,rX:s,rY:o,sweepFlag:l,xAxisRotation:c,centp:y,a1:B,ad:x}}pathA(t,e){var{pathParser:r}=this,{currentPoint:s,rX:o,rY:i,sweepFlag:A,xAxisRotation:l,centp:c,a1:u,ad:h}=mn.pathA(r),g=1-A?1:-1,d=u+g*(h/2),m=new ha(c.x+o*Math.cos(d),c.y+i*Math.sin(d));if(r.addMarkerAngle(m,d-g*Math.PI/2),r.addMarkerAngle(s,d-g*Math.PI),e.addPoint(s.x,s.y),t&&!isNaN(u)&&!isNaN(h)){var y=o>i?o:i,B=o>i?1:o/i,w=o>i?i/o:1;t.translate(c.x,c.y),t.rotate(l),t.scale(B,w),t.arc(0,0,y,u,u+h,!!(1-A)),t.scale(1/B,1/w),t.rotate(-l),t.translate(-c.x,-c.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){mn.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}class Bm extends mn{constructor(t,e,r){super(t,e,r),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class FA extends Ai{constructor(t,e,r){super(t,e,new.target===FA?!0:r),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach((r,s)=>{var o=this.getChildBoundingBox(t,this,this,s);e?e.addBoundingBox(o):e=o}),e}getFontSize(){var{document:t,parent:e}=this,r=xs.parse(t.ctx.font).fontSize,s=e.getStyle("font-size").getNumber(r);return s}getTElementBoundingBox(t){var e=this.getFontSize();return new bo(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,r){var s=e[r],o=null;if(t.isArabic){var i=e.length,A=e[r-1],l=e[r+1],c="isolated";if((r===0||A===" ")&&r<i-1&&l!==" "&&(c="terminal"),r>0&&A!==" "&&r<i-1&&l!==" "&&(c="medial"),r>0&&A!==" "&&(r===i-1||l===" ")&&(c="initial"),typeof t.glyphs[s]<"u"){var u=t.glyphs[s];o=u instanceof Bm?u:u[c]}}else o=t.glyphs[s];return o||(o=t.missingGlyph),o}getText(){return""}getTextFromNode(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),s=r.indexOf(e),o=r.length-1,i=_i(e.textContent||"");return s===0&&(i=xk(i)),s===o&&(i=Sk(i)),i}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((r,s)=>{this.renderChild(t,this,this,s)});var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){var{document:e,parent:r}=this,s=this.getText(),o=r.getStyle("font-family").getDefinition();if(o){for(var{unitsPerEm:i}=o.fontFace,A=xs.parse(e.ctx.font),l=r.getStyle("font-size").getNumber(A.fontSize),c=r.getStyle("font-style").getString(A.fontStyle),u=l/i,h=o.isRTL?s.split("").reverse().join(""):s,g=zs(r.getAttribute("dx").getString()),d=h.length,m=0;m<d;m++){var y=this.getGlyph(o,h,m);t.translate(this.x,this.y),t.scale(u,-u);var B=t.lineWidth;t.lineWidth=t.lineWidth*i/l,c==="italic"&&t.transform(1,0,.4,1,0,0),y.render(t),c==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=B,t.scale(1/u,-1/u),t.translate(-this.x,-this.y),this.x+=l*(y.horizAdvX||o.horizAdvX)/i,typeof g[m]<"u"&&!isNaN(g[m])&&(this.x+=g[m])}return}var{x:w,y:E}=this;t.fillStyle&&t.fillText(s,w,E),t.strokeStyle&&t.strokeText(s,w,E)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r=!1,s=0;e==="start"&&!r||e==="end"&&r?s=t.x-this.minX:e==="end"&&!r||e==="start"&&r?s=t.x-this.maxX:s=t.x-(this.minX+this.maxX)/2;for(var o=this.textChunkStart;o<this.leafTexts.length;o++)this.leafTexts[o].x+=s;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach((e,r)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,r,s){var o=r.children[s];o.children.length>0?o.children.forEach((i,A)=>{e.adjustChildCoordinatesRecursiveCore(t,e,o,A)}):this.adjustChildCoordinates(t,e,r,s)}adjustChildCoordinates(t,e,r,s){var o=r.children[s];if(typeof o.measureText!="function")return o;t.save(),o.setContext(t,!0);var i=o.getAttribute("x"),A=o.getAttribute("y"),l=o.getAttribute("dx"),c=o.getAttribute("dy"),u=o.getStyle("font-family").getDefinition(),h=!!u&&u.isRTL;s===0&&(i.hasValue()||i.setValue(o.getInheritedAttribute("x")),A.hasValue()||A.setValue(o.getInheritedAttribute("y")),l.hasValue()||l.setValue(o.getInheritedAttribute("dx")),c.hasValue()||c.setValue(o.getInheritedAttribute("dy")));var g=o.measureText(t);return h&&(e.x-=g),i.hasValue()?(e.applyAnchoring(),o.x=i.getPixels("x"),l.hasValue()&&(o.x+=l.getPixels("x"))):(l.hasValue()&&(e.x+=l.getPixels("x")),o.x=e.x),e.x=o.x,h||(e.x+=g),A.hasValue()?(o.y=A.getPixels("y"),c.hasValue()&&(o.y+=c.getPixels("y"))):(c.hasValue()&&(e.y+=c.getPixels("y")),o.y=e.y),e.y=o.y,e.leafTexts.push(o),e.minX=Math.min(e.minX,o.x,o.x+g),e.maxX=Math.max(e.maxX,o.x,o.x+g),o.clearContext(t),t.restore(),o}getChildBoundingBox(t,e,r,s){var o=r.children[s];if(typeof o.getBoundingBox!="function")return null;var i=o.getBoundingBox(t);return i?(o.children.forEach((A,l)=>{var c=e.getChildBoundingBox(t,e,o,l);i.addBoundingBox(c)}),i):null}renderChild(t,e,r,s){var o=r.children[s];o.render(t),o.children.forEach((i,A)=>{e.renderChild(t,e,o,A)})}measureText(t){var{measureCache:e}=this;if(~e)return e;var r=this.getText(),s=this.measureTargetText(t,r);return this.measureCache=s,s}measureTargetText(t,e){if(!e.length)return 0;var{parent:r}=this,s=r.getStyle("font-family").getDefinition();if(s){for(var o=this.getFontSize(),i=s.isRTL?e.split("").reverse().join(""):e,A=zs(r.getAttribute("dx").getString()),l=i.length,c=0,u=0;u<l;u++){var h=this.getGlyph(s,i,u);c+=(h.horizAdvX||s.horizAdvX)*o/s.fontFace.unitsPerEm,typeof A[u]<"u"&&!isNaN(A[u])&&(c+=A[u])}return c}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);var{width:g}=t.measureText(e);return this.clearContext(t),t.restore(),g}getInheritedAttribute(t){for(var e=this;e instanceof FA&&e.isFirstChild();){var r=e.parent.getAttribute(t);if(r.hasValue(!0))return r.getValue("0");e=e.parent}return null}}class Cc extends FA{constructor(t,e,r){super(t,e,new.target===Cc?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class Y7 extends Cc{constructor(){super(...arguments),this.type="textNode"}}class yl extends Ai{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:r}=this,{screen:s,window:o}=r,i=t.canvas;if(s.setDefaults(t),i.style&&typeof t.font<"u"&&o&&typeof o.getComputedStyle<"u"){t.font=o.getComputedStyle(i).getPropertyValue("font");var A=new fr(r,"fontSize",xs.parse(t.font).fontSize);A.hasValue()&&(r.rootEmSize=A.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:l,height:c}=s.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var u=this.getAttribute("refX"),h=this.getAttribute("refY"),g=this.getAttribute("viewBox"),d=g.hasValue()?zs(g.getString()):null,m=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",y=0,B=0,w=0,E=0;d&&(y=d[0],B=d[1]),this.root||(l=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y"),this.type==="marker"&&(w=y,E=B,y=0,B=0)),s.viewPort.setCurrent(l,c),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),d&&(l=d[2],c=d[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s.viewPort.width,desiredWidth:l,height:s.viewPort.height,desiredHeight:c,minX:y,minY:B,refX:u.getValue(),refY:h.getValue(),clip:m,clipX:w,clipY:E}),d&&(s.viewPort.removeCurrent(),s.viewPort.setCurrent(l,c))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=this.getAttribute("width",!0),o=this.getAttribute("height",!0),i=this.getAttribute("viewBox"),A=this.getAttribute("style"),l=s.getNumber(0),c=o.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(s.setValue(t),o.setValue(e),i.hasValue()||i.setValue("0 0 ".concat(l||t," ").concat(c||e)),A.hasValue()){var h=this.getStyle("width"),g=this.getStyle("height");h.hasValue()&&h.setValue("".concat(t,"px")),g.hasValue()&&g.setValue("".concat(e,"px"))}}}class bm extends mn{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),s=this.getStyle("width",!1,!0).getPixels("x"),o=this.getStyle("height",!1,!0).getPixels("y"),i=this.getAttribute("rx"),A=this.getAttribute("ry"),l=i.getPixels("x"),c=A.getPixels("y");if(i.hasValue()&&!A.hasValue()&&(c=l),A.hasValue()&&!i.hasValue()&&(l=c),l=Math.min(l,s/2),c=Math.min(c,o/2),t){var u=4*((Math.sqrt(2)-1)/3);t.beginPath(),o>0&&s>0&&(t.moveTo(e+l,r),t.lineTo(e+s-l,r),t.bezierCurveTo(e+s-l+u*l,r,e+s,r+c-u*c,e+s,r+c),t.lineTo(e+s,r+o-c),t.bezierCurveTo(e+s,r+o-c+u*c,e+s-l+u*l,r+o,e+s-l,r+o),t.lineTo(e+l,r+o),t.bezierCurveTo(e+l-u*l,r+o,e,r+o-c+u*c,e,r+o-c),t.lineTo(e,r+c),t.bezierCurveTo(e,r+c-u*c,e+l-u*l,r,e+l,r),t.closePath())}return new bo(e,r,e+s,r+o)}getMarkers(){return null}}class Wk extends mn{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),s=this.getAttribute("r").getPixels();return t&&s>0&&(t.beginPath(),t.arc(e,r,s,0,Math.PI*2,!1),t.closePath()),new bo(e-s,r-s,e+s,r+s)}getMarkers(){return null}}class Kk extends mn{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=4*((Math.sqrt(2)-1)/3),r=this.getAttribute("rx").getPixels("x"),s=this.getAttribute("ry").getPixels("y"),o=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y");return t&&r>0&&s>0&&(t.beginPath(),t.moveTo(o+r,i),t.bezierCurveTo(o+r,i+e*s,o+e*r,i+s,o,i+s),t.bezierCurveTo(o-e*r,i+s,o-r,i+e*s,o-r,i),t.bezierCurveTo(o-r,i-e*s,o-e*r,i-s,o,i-s),t.bezierCurveTo(o+e*r,i-s,o+r,i-e*s,o+r,i),t.closePath()),new bo(o-r,i-s,o+r,i+s)}getMarkers(){return null}}class $k extends mn{constructor(){super(...arguments),this.type="line"}getPoints(){return[new ha(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new ha(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:r},{x:s,y:o}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,r),t.lineTo(s,o)),new bo(e,r,s,o)}getMarkers(){var[t,e]=this.getPoints(),r=t.angleTo(e);return[[t,r],[e,r]]}}class Cm extends mn{constructor(t,e,r){super(t,e,r),this.type="polyline",this.points=[],this.points=ha.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:r,y:s}]=e,o=new bo(r,s);return t&&(t.beginPath(),t.moveTo(r,s)),e.forEach(i=>{var{x:A,y:l}=i;o.addPoint(A,l),t&&t.lineTo(A,l)}),o}getMarkers(){var{points:t}=this,e=t.length-1,r=[];return t.forEach((s,o)=>{o!==e&&r.push([s,s.angleTo(t[o+1])])}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}class qk extends Cm{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:r,y:s}]=this.points;return t&&(t.lineTo(r,s),t.closePath()),e}}class jk extends Rn{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,r){var s=this.getStyle("width").getPixels("x",!0),o=this.getStyle("height").getPixels("y",!0),i=new yl(this.document,null);i.attributes.viewBox=new fr(this.document,"viewBox",this.getAttribute("viewBox").getValue()),i.attributes.width=new fr(this.document,"width","".concat(s,"px")),i.attributes.height=new fr(this.document,"height","".concat(o,"px")),i.attributes.transform=new fr(this.document,"transform",this.getAttribute("patternTransform").getValue()),i.children=this.children;var A=this.document.createCanvas(s,o),l=A.getContext("2d"),c=this.getAttribute("x"),u=this.getAttribute("y");c.hasValue()&&u.hasValue()&&l.translate(c.getPixels("x",!0),u.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var h=-1;h<=1;h++)for(var g=-1;g<=1;g++)l.save(),i.attributes.x=new fr(this.document,"x",h*A.width),i.attributes.y=new fr(this.document,"y",g*A.height),i.render(l),l.restore();var d=t.createPattern(A,"repeat");return d}}class Yk extends Rn{constructor(){super(...arguments),this.type="marker"}render(t,e,r){if(e){var{x:s,y:o}=e,i=this.getAttribute("orient").getString("auto"),A=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(s,o),i==="auto"&&t.rotate(r),A==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();var l=new yl(this.document,null);l.type=this.type,l.attributes.viewBox=new fr(this.document,"viewBox",this.getAttribute("viewBox").getValue()),l.attributes.refX=new fr(this.document,"refX",this.getAttribute("refX").getValue()),l.attributes.refY=new fr(this.document,"refY",this.getAttribute("refY").getValue()),l.attributes.width=new fr(this.document,"width",this.getAttribute("markerWidth").getValue()),l.attributes.height=new fr(this.document,"height",this.getAttribute("markerHeight").getValue()),l.attributes.overflow=new fr(this.document,"overflow",this.getAttribute("overflow").getValue()),l.attributes.fill=new fr(this.document,"fill",this.getAttribute("fill").getColor("black")),l.attributes.stroke=new fr(this.document,"stroke",this.getAttribute("stroke").getValue("none")),l.children=this.children,l.render(t),t.restore(),A==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),i==="auto"&&t.rotate(-r),t.translate(-s,-o)}}}class Gk extends Rn{constructor(){super(...arguments),this.type="defs"}render(){}}class Md extends Ai{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new bo;return this.children.forEach(r=>{e.addBoundingBox(r.getBoundingBox(t))}),e}}class km extends Rn{constructor(t,e,r){super(t,e,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:s,children:o}=this;o.forEach(i=>{i.type==="stop"&&s.push(i)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,r){var s=this;this.getHrefAttribute().hasValue()&&(s=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(s));var{stops:o}=s,i=this.getGradient(t,e);if(!i)return this.addParentOpacity(r,o[o.length-1].color);if(o.forEach(B=>{i.addColorStop(B.offset,this.addParentOpacity(r,B.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:A}=this,{MAX_VIRTUAL_PIXELS:l,viewPort:c}=A.screen,[u]=c.viewPorts,h=new bm(A,null);h.attributes.x=new fr(A,"x",-l/3),h.attributes.y=new fr(A,"y",-l/3),h.attributes.width=new fr(A,"width",l),h.attributes.height=new fr(A,"height",l);var g=new Md(A,null);g.attributes.transform=new fr(A,"transform",this.getAttribute("gradientTransform").getValue()),g.children=[h];var d=new yl(A,null);d.attributes.x=new fr(A,"x",0),d.attributes.y=new fr(A,"y",0),d.attributes.width=new fr(A,"width",u.width),d.attributes.height=new fr(A,"height",u.height),d.children=[g];var m=A.createCanvas(u.width,u.height),y=m.getContext("2d");return y.fillStyle=i,d.render(y),y.createPattern(m,"no-repeat")}return i}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){if(t.hasValue()){var r=new fr(this.document,"color",e);return r.addOpacity(t).getColor()}return e}}class zk extends km{constructor(t,e,r){super(t,e,r),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",s=r?e.getBoundingBox(t):null;if(r&&!s)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var o=r?s.x+s.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),i=r?s.y+s.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),A=r?s.x+s.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),l=r?s.y+s.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return o===A&&i===l?null:t.createLinearGradient(o,i,A,l)}}class Xk extends km{constructor(t,e,r){super(t,e,r),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",s=e.getBoundingBox(t);if(r&&!s)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var o=r?s.x+s.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),i=r?s.y+s.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),A=o,l=i;this.getAttribute("fx").hasValue()&&(A=r?s.x+s.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(l=r?s.y+s.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var c=r?(s.width+s.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return t.createRadialGradient(A,l,u,o,i,c)}}class Jk extends Rn{constructor(t,e,r){super(t,e,r),this.type="stop";var s=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),o=this.getStyle("stop-opacity"),i=this.getStyle("stop-color",!0);i.getString()===""&&i.setValue("#000"),o.hasValue()&&(i=i.addOpacity(o)),this.offset=s,this.color=i.getColor()}}class Qd extends Rn{constructor(t,e,r){super(t,e,r),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new fr(t,"values",null);var s=this.getAttribute("values");s.hasValue()&&this.values.setValue(s.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:r,to:s}=this.getProgress(),o=r.getNumber()+(s.getNumber()-r.getNumber())*e;return t==="%"&&(o*=100),"".concat(o).concat(t)}update(t){var{parent:e}=this,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var s=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(s==="freeze"&&!this.frozen)this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();else if(s==="remove"&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;var o=!1;if(this.begin<this.duration){var i=this.calcValue(),A=this.getAttribute("type");if(A.hasValue()){var l=A.getString();i="".concat(l,"(").concat(i,")")}r.setValue(i),o=!0}return o}getProgress(){var{document:t,values:e}=this,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var s=r.progress*(e.getValue().length-1),o=Math.floor(s),i=Math.ceil(s);r.from=new fr(t,"from",parseFloat(e.getValue()[o])),r.to=new fr(t,"to",parseFloat(e.getValue()[i])),r.progress=(s-o)/(i-o)}else r.from=this.from,r.to=this.to;return r}}class Zk extends Qd{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),s=new mv(e.getColor()),o=new mv(r.getColor());if(s.ok&&o.ok){var i=s.r+(o.r-s.r)*t,A=s.g+(o.g-s.g)*t,l=s.b+(o.b-s.b)*t;return"rgb(".concat(Math.floor(i),", ").concat(Math.floor(A),", ").concat(Math.floor(l),")")}return this.getAttribute("from").getColor()}}class eE extends Qd{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),s=zs(e.getString()),o=zs(r.getString()),i=s.map((A,l)=>{var c=o[l];return A+(c-A)*t}).join(" ");return i}}class tE extends Rn{constructor(t,e,r){super(t,e,r),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:s}=t,{children:o}=this;for(var i of o)switch(i.type){case"font-face":{this.fontFace=i;var A=i.getStyle("font-family");A.hasValue()&&(s[A.getString()]=this);break}case"missing-glyph":this.missingGlyph=i;break;case"glyph":{var l=i;l.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[l.unicode]>"u"&&(this.glyphs[l.unicode]=Object.create(null)),this.glyphs[l.unicode][l.arabicForm]=l):this.glyphs[l.unicode]=l;break}}}render(){}}class rE extends Rn{constructor(t,e,r){super(t,e,r),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class nE extends mn{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class aE extends FA{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}class sE extends FA{constructor(t,e,r){super(t,e,r),this.type="a";var{childNodes:s}=e,o=s[0],i=s.length>0&&Array.from(s).every(A=>A.nodeType===3);this.hasText=i,this.text=i?this.getTextFromNode(o):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:r,y:s}=this,{mouse:o}=e.screen,i=new fr(e,"fontSize",xs.parse(e.ctx.font).fontSize);o.isWorking()&&o.checkBoundingBox(this,new bo(r,s-i.getPixels("y"),r+this.measureText(t),s))}else if(this.children.length>0){var A=new Md(this.document,null);A.children=this.children,A.parent=this,A.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}}function wb(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,r)}return e}function Du(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?wb(Object(e),!0).forEach(function(r){vm(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):wb(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}class oE extends FA{constructor(t,e,r){super(t,e,r),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var s=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(s)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach(r=>{var{type:s,points:o}=r;switch(s){case Qr.LINE_TO:t&&t.lineTo(o[0],o[1]);break;case Qr.MOVE_TO:t&&t.moveTo(o[0],o[1]);break;case Qr.CURVE_TO:t&&t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case Qr.QUAD_TO:t&&t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case Qr.ARC:{var[i,A,l,c,u,h,g,d]=o,m=l>c?l:c,y=l>c?1:l/c,B=l>c?c/l:1;t&&(t.translate(i,A),t.rotate(g),t.scale(y,B),t.arc(0,0,m,u,u+h,!!(1-d)),t.scale(1/y,1/B),t.rotate(-g),t.translate(-i,-A));break}case Qr.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),{glyphInfo:s}=this,o=t.fillStyle;e==="underline"&&t.beginPath(),s.forEach((i,A)=>{var{p0:l,p1:c,rotation:u,text:h}=i;t.save(),t.translate(l.x,l.y),t.rotate(u),t.fillStyle&&t.fillText(h,0,0),t.strokeStyle&&t.strokeText(h,0,0),t.restore(),e==="underline"&&(A===0&&t.moveTo(l.x,l.y+r/8),t.lineTo(c.x,c.y+r/5))}),e==="underline"&&(t.lineWidth=r/20,t.strokeStyle=o,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,r,s,o,i,A,l,c){var u=i,h=this.measureText(t,l);l===" "&&e==="justify"&&r<s&&(h+=(s-r)/o),c>-1&&(u+=this.getLetterSpacingAt(c));var g=this.textHeight/20,d=this.getEquidistantPointOnPath(u,g,0),m=this.getEquidistantPointOnPath(u+h,g,0),y={p0:d,p1:m},B=d&&m?Math.atan2(m.y-d.y,m.x-d.x):0;if(A){var w=Math.cos(Math.PI/2+B)*A,E=Math.cos(-B)*A;y.p0=Du(Du({},d),{},{x:d.x+w,y:d.y+E}),y.p1=Du(Du({},m),{},{x:m.x+w,y:m.y+E})}return u+=h,{offset:u,segment:y,rotation:B}}measureText(t,e){var{measuresCache:r}=this,s=e||this.getText();if(r.has(s))return r.get(s);var o=this.measureTargetText(t,s);return r.set(s,o),o}setTextData(t){if(!this.glyphInfo){var e=this.getText(),r=e.split(""),s=e.split(" ").length-1,o=this.parent.getAttribute("dx").split().map(b=>b.getPixels("x")),i=this.parent.getAttribute("dy").getPixels("y"),A=this.parent.getStyle("text-anchor").getString("start"),l=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing"),u=0;!l.hasValue()||l.getValue()==="inherit"?u=c.getPixels():l.hasValue()&&l.getValue()!=="initial"&&l.getValue()!=="unset"&&(u=l.getPixels());var h=[],g=e.length;this.letterSpacingCache=h;for(var d=0;d<g;d++)h.push(typeof o[d]<"u"?o[d]:u);var m=h.reduce((b,H,$)=>$===0?0:b+H||0,0),y=this.measureText(t),B=Math.max(y+m,0);this.textWidth=y,this.textHeight=this.getFontSize(),this.glyphInfo=[];var w=this.getPathLength(),E=this.getStyle("startOffset").getNumber(0)*w,x=0;(A==="middle"||A==="center")&&(x=-B/2),(A==="end"||A==="right")&&(x=-B),x+=E,r.forEach((b,H)=>{var{offset:$,segment:Y,rotation:V}=this.findSegmentToFitChar(t,A,B,w,s,x,i,b,H);x=$,!(!Y.p0||!Y.p1)&&this.glyphInfo.push({text:r[H],p0:Y.p0,p1:Y.p1,rotation:V})})}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:r}=t;for(r.reset();!r.isEnd();){var{current:s}=r,o=s?s.x:0,i=s?s.y:0,A=r.next(),l=A.type,c=[];switch(A.type){case Qr.MOVE_TO:this.pathM(r,c);break;case Qr.LINE_TO:l=this.pathL(r,c);break;case Qr.HORIZ_LINE_TO:l=this.pathH(r,c);break;case Qr.VERT_LINE_TO:l=this.pathV(r,c);break;case Qr.CURVE_TO:this.pathC(r,c);break;case Qr.SMOOTH_CURVE_TO:l=this.pathS(r,c);break;case Qr.QUAD_TO:this.pathQ(r,c);break;case Qr.SMOOTH_QUAD_TO:l=this.pathT(r,c);break;case Qr.ARC:c=this.pathA(r);break;case Qr.CLOSE_PATH:mn.pathZ(r);break}A.type!==Qr.CLOSE_PATH?e.push({type:l,points:c,start:{x:o,y:i},pathLength:this.calcLength(o,i,l,c)}):e.push({type:Qr.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:r,y:s}=mn.pathM(t).point;e.push(r,s)}pathL(t,e){var{x:r,y:s}=mn.pathL(t).point;return e.push(r,s),Qr.LINE_TO}pathH(t,e){var{x:r,y:s}=mn.pathH(t).point;return e.push(r,s),Qr.LINE_TO}pathV(t,e){var{x:r,y:s}=mn.pathV(t).point;return e.push(r,s),Qr.LINE_TO}pathC(t,e){var{point:r,controlPoint:s,currentPoint:o}=mn.pathC(t);e.push(r.x,r.y,s.x,s.y,o.x,o.y)}pathS(t,e){var{point:r,controlPoint:s,currentPoint:o}=mn.pathS(t);return e.push(r.x,r.y,s.x,s.y,o.x,o.y),Qr.CURVE_TO}pathQ(t,e){var{controlPoint:r,currentPoint:s}=mn.pathQ(t);e.push(r.x,r.y,s.x,s.y)}pathT(t,e){var{controlPoint:r,currentPoint:s}=mn.pathT(t);return e.push(r.x,r.y,s.x,s.y),Qr.QUAD_TO}pathA(t){var{rX:e,rY:r,sweepFlag:s,xAxisRotation:o,centp:i,a1:A,ad:l}=mn.pathA(t);return s===0&&l>0&&(l-=2*Math.PI),s===1&&l<0&&(l+=2*Math.PI),[i.x,i.y,e,r,A,l,o,s]}calcLength(t,e,r,s){var o=0,i=null,A=null,l=0;switch(r){case Qr.LINE_TO:return this.getLineLength(t,e,s[0],s[1]);case Qr.CURVE_TO:for(o=0,i=this.getPointOnCubicBezier(0,t,e,s[0],s[1],s[2],s[3],s[4],s[5]),l=.01;l<=1;l+=.01)A=this.getPointOnCubicBezier(l,t,e,s[0],s[1],s[2],s[3],s[4],s[5]),o+=this.getLineLength(i.x,i.y,A.x,A.y),i=A;return o;case Qr.QUAD_TO:for(o=0,i=this.getPointOnQuadraticBezier(0,t,e,s[0],s[1],s[2],s[3]),l=.01;l<=1;l+=.01)A=this.getPointOnQuadraticBezier(l,t,e,s[0],s[1],s[2],s[3]),o+=this.getLineLength(i.x,i.y,A.x,A.y),i=A;return o;case Qr.ARC:{o=0;var c=s[4],u=s[5],h=s[4]+u,g=Math.PI/180;if(Math.abs(c-h)<g&&(g=Math.abs(c-h)),i=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],c,0),u<0)for(l=c-g;l>h;l-=g)A=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],l,0),o+=this.getLineLength(i.x,i.y,A.x,A.y),i=A;else for(l=c+g;l<h;l+=g)A=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],l,0),o+=this.getLineLength(i.x,i.y,A.x,A.y),i=A;return A=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],h,0),o+=this.getLineLength(i.x,i.y,A.x,A.y),o}}return 0}getPointOnLine(t,e,r,s,o){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,A=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,l=(o-r)/(s-e+xi),c=Math.sqrt(t*t/(1+l*l));s<e&&(c*=-1);var u=l*c,h=null;if(s===e)h={x:i,y:A+u};else if((A-r)/(i-e+xi)===l)h={x:i+c,y:A+u};else{var g=0,d=0,m=this.getLineLength(e,r,s,o);if(m<xi)return null;var y=(i-e)*(s-e)+(A-r)*(o-r);y/=m*m,g=e+y*(s-e),d=r+y*(o-r);var B=this.getLineLength(i,A,g,d),w=Math.sqrt(t*t-B*B);c=Math.sqrt(w*w/(1+l*l)),s<e&&(c*=-1),u=l*c,h={x:g+c,y:d+u}}return h}getPointOnPath(t){var e=this.getPathLength(),r=0,s=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:o}=this;for(var i of o){if(i&&(i.pathLength<5e-5||r+i.pathLength+5e-5<t)){r+=i.pathLength;continue}var A=t-r,l=0;switch(i.type){case Qr.LINE_TO:s=this.getPointOnLine(A,i.start.x,i.start.y,i.points[0],i.points[1],i.start.x,i.start.y);break;case Qr.ARC:{var c=i.points[4],u=i.points[5],h=i.points[4]+u;if(l=c+A/i.pathLength*u,u<0&&l<h||u>=0&&l>h)break;s=this.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],l,i.points[6]);break}case Qr.CURVE_TO:l=A/i.pathLength,l>1&&(l=1),s=this.getPointOnCubicBezier(l,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3],i.points[4],i.points[5]);break;case Qr.QUAD_TO:l=A/i.pathLength,l>1&&(l=1),s=this.getPointOnQuadraticBezier(l,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3]);break}if(s)return s;break}return null}getLineLength(t,e,r,s){return Math.sqrt((r-t)*(r-t)+(s-e)*(s-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,r,s,o,i,A,l,c){var u=l*bv(t)+i*Cv(t)+s*kv(t)+e*Ev(t),h=c*bv(t)+A*Cv(t)+o*kv(t)+r*Ev(t);return{x:u,y:h}}getPointOnQuadraticBezier(t,e,r,s,o,i,A){var l=i*Dv(t)+s*Tv(t)+e*xv(t),c=A*Dv(t)+o*Tv(t)+r*xv(t);return{x:l,y:c}}getPointOnEllipticalArc(t,e,r,s,o,i){var A=Math.cos(i),l=Math.sin(i),c={x:r*Math.cos(o),y:s*Math.sin(o)};return{x:t+(c.x*A-c.y*l),y:e+(c.x*l+c.y*A)}}buildEquidistantCache(t,e){var r=this.getPathLength(),s=e||.25,o=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==o||this.equidistantCache.precision!==s){this.equidistantCache={step:o,precision:s,points:[]};for(var i=0,A=0;A<=r;A+=s){var l=this.getPointOnPath(A),c=this.getPointOnPath(A+s);!l||!c||(i+=this.getLineLength(l.x,l.y,c.x,c.y),i>=o&&(this.equidistantCache.points.push({x:l.x,y:l.y,distance:A}),i-=o))}}}getEquidistantPointOnPath(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var s=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[s]||null}}var G7=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class AE extends Ai{constructor(t,e,r){super(t,e,r),this.type="image",this.loaded=!1;var s=this.getHrefAttribute().getString();if(s){var o=s.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(s);t.images.push(this),o?this.loadSvg(s):this.loadImage(s),this.isSvg=o}}loadImage(t){var e=this;return SA(function*(){try{var r=yield e.document.createImage(t);e.image=r}catch(s){console.error('Error while loading image "'.concat(t,'":'),s)}e.loaded=!0})()}loadSvg(t){var e=this;return SA(function*(){var r=G7.exec(t);if(r){var s=r[5];r[4]==="base64"?e.image=atob(s):e.image=decodeURIComponent(s)}else try{var o=yield e.document.fetch(t),i=yield o.text();e.image=i}catch(A){console.error('Error while loading image "'.concat(t,'":'),A)}e.loaded=!0})()}renderChildren(t){var{document:e,image:r,loaded:s}=this,o=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y");if(!(!s||!r||!A||!l)){if(t.save(),t.translate(o,i),this.isSvg){var c=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:A,scaleHeight:l});c.document.documentElement.parent=this,c.render()}else{var u=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:A,desiredWidth:u.width,height:l,desiredHeight:u.height}),this.loaded&&(typeof u.complete>"u"||u.complete)&&t.drawImage(u,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");return new bo(t,e,t+r,e+s)}}class iE extends Ai{constructor(){super(...arguments),this.type="symbol"}render(t){}}class lE{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var r=this;return SA(function*(){try{var{document:s}=r,o=yield s.canvg.parser.load(e),i=o.getElementsByTagName("font");Array.from(i).forEach(A=>{var l=s.createElement(A);s.definitions[t]=l})}catch(A){console.error('Error while loading font "'.concat(e,'":'),A)}r.loaded=!0})()}}class Em extends Rn{constructor(t,e,r){super(t,e,r),this.type="style";var s=_i(Array.from(e.childNodes).map(i=>i.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),o=s.split("}");o.forEach(i=>{var A=i.trim();if(A){var l=A.split("{"),c=l[0].split(","),u=l[1].split(";");c.forEach(h=>{var g=h.trim();if(g){var d=t.styles[g]||{};if(u.forEach(B=>{var w=B.indexOf(":"),E=B.substr(0,w).trim(),x=B.substr(w+1,B.length-w).trim();E&&x&&(d[E]=new fr(t,E,x))}),t.styles[g]=d,t.stylesSpecificity[g]=Uk(g),g==="@font-face"){var m=d["font-family"].getString().replace(/"|'/g,""),y=d.src.getString().split(",");y.forEach(B=>{if(B.indexOf('format("svg")')>0){var w=mm(B);w&&new lE(t).load(m,w)}})}}})}})}}Em.parseExternalUrl=mm;class cE extends Ai{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),r=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),r.hasValue()&&t.translate(0,r.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:r}=this;if(r){var s=r;if(r.type==="symbol"&&(s=new yl(e,null),s.attributes.viewBox=new fr(e,"viewBox",r.getAttribute("viewBox").getString()),s.attributes.preserveAspectRatio=new fr(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),s.attributes.overflow=new fr(e,"overflow",r.getAttribute("overflow").getString()),s.children=r.children,r.styles.opacity=new fr(e,"opacity",this.calculateOpacity())),s.type==="svg"){var o=this.getStyle("width",!1,!0),i=this.getStyle("height",!1,!0);o.hasValue()&&(s.attributes.width=new fr(e,"width",o.getString())),i.hasValue()&&(s.attributes.height=new fr(e,"height",i.getString()))}var A=s.parent;s.parent=this,s.render(t),s.parent=A}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return si.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Tu(n,t,e,r,s,o){return n[e*r*4+t*4+o]}function xu(n,t,e,r,s,o,i){n[e*r*4+t*4+o]=i}function Ma(n,t,e){var r=n[t];return r*e}function CA(n,t,e,r){return t+Math.cos(n)*e+Math.sin(n)*r}class Dm extends Rn{constructor(t,e,r){super(t,e,r),this.type="feColorMatrix";var s=zs(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var o=s[0];s=[.213+.787*o,.715-.715*o,.072-.072*o,0,0,.213-.213*o,.715+.285*o,.072-.072*o,0,0,.213-.213*o,.715-.715*o,.072+.928*o,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var i=s[0]*Math.PI/180;s=[CA(i,.213,.787,-.213),CA(i,.715,-.715,-.715),CA(i,.072,-.072,.928),0,0,CA(i,.213,-.213,.143),CA(i,.715,.285,.14),CA(i,.072,-.072,-.283),0,0,CA(i,.213,-.213,-.787),CA(i,.715,-.715,.715),CA(i,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=s,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,r,s,o){for(var{includeOpacity:i,matrix:A}=this,l=t.getImageData(0,0,s,o),c=0;c<o;c++)for(var u=0;u<s;u++){var h=Tu(l.data,u,c,s,o,0),g=Tu(l.data,u,c,s,o,1),d=Tu(l.data,u,c,s,o,2),m=Tu(l.data,u,c,s,o,3),y=Ma(A,0,h)+Ma(A,1,g)+Ma(A,2,d)+Ma(A,3,m)+Ma(A,4,1),B=Ma(A,5,h)+Ma(A,6,g)+Ma(A,7,d)+Ma(A,8,m)+Ma(A,9,1),w=Ma(A,10,h)+Ma(A,11,g)+Ma(A,12,d)+Ma(A,13,m)+Ma(A,14,1),E=Ma(A,15,h)+Ma(A,16,g)+Ma(A,17,d)+Ma(A,18,m)+Ma(A,19,1);i&&(y=0,B=0,w=0,E*=m/255),xu(l.data,u,c,s,o,0,y),xu(l.data,u,c,s,o,1,B),xu(l.data,u,c,s,o,2,w),xu(l.data,u,c,s,o,3,E)}t.clearRect(0,0,s,o),t.putImageData(l,0,0)}}class kc extends Rn{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:r}=this,s=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),A=this.getStyle("height").getPixels("y");if(!i&&!A){var l=new bo;this.children.forEach(m=>{l.addBoundingBox(m.getBoundingBox(t))}),s=Math.floor(l.x1),o=Math.floor(l.y1),i=Math.floor(l.width),A=Math.floor(l.height)}var c=this.removeStyles(e,kc.ignoreStyles),u=r.createCanvas(s+i,o+A),h=u.getContext("2d");r.screen.setDefaults(h),this.renderChildren(h),new Dm(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(h,0,0,s+i,o+A);var g=r.createCanvas(s+i,o+A),d=g.getContext("2d");r.screen.setDefaults(d),e.render(d),d.globalCompositeOperation="destination-in",d.fillStyle=h.createPattern(u,"no-repeat"),d.fillRect(0,0,s+i,o+A),t.fillStyle=d.createPattern(g,"no-repeat"),t.fillRect(0,0,s+i,o+A),this.restoreStyles(e,c)}render(t){}}kc.ignoreStyles=["mask","transform","clip-path"];var yb=()=>{};class uE extends Rn{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,r=Reflect.getPrototypeOf(t),{beginPath:s,closePath:o}=t;r&&(r.beginPath=yb,r.closePath=yb),Reflect.apply(s,t,[]),this.children.forEach(i=>{if(!(typeof i.path>"u")){var A=typeof i.elementTransform<"u"?i.elementTransform():null;A||(A=si.fromElement(e,i)),A&&A.apply(t),i.path(t),r&&(r.closePath=o),A&&A.unapply(t)}}),Reflect.apply(o,t,[]),t.clip(),r&&(r.beginPath=s,r.closePath=o)}render(t){}}class Ec extends Rn{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:r,children:s}=this,o=e.getBoundingBox(t);if(o){var i=0,A=0;s.forEach(w=>{var E=w.extraFilterDistance||0;i=Math.max(i,E),A=Math.max(A,E)});var l=Math.floor(o.width),c=Math.floor(o.height),u=l+2*i,h=c+2*A;if(!(u<1||h<1)){var g=Math.floor(o.x),d=Math.floor(o.y),m=this.removeStyles(e,Ec.ignoreStyles),y=r.createCanvas(u,h),B=y.getContext("2d");r.screen.setDefaults(B),B.translate(-g+i,-d+A),e.render(B),s.forEach(w=>{typeof w.apply=="function"&&w.apply(B,0,0,u,h)}),t.drawImage(y,0,0,u,h,g-i,d-A,u,h),this.restoreStyles(e,m)}}}render(t){}}Ec.ignoreStyles=["filter","transform","clip-path"];class dE extends Rn{constructor(t,e,r){super(t,e,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,r,s,o){}}class fE extends Rn{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,r,s,o){}}class hE extends Rn{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,r,s,o){}}class gE extends Rn{constructor(t,e,r){super(t,e,r),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,r,s,o){var{document:i,blurRadius:A}=this,l=i.window?i.window.document.body:null,c=t.canvas;c.id=i.getUniqueId(),l&&(c.style.display="none",l.appendChild(c)),T7(c,e,r,s,o,A),l&&l.removeChild(c)}}class pE extends Rn{constructor(){super(...arguments),this.type="title"}}class vE extends Rn{constructor(){super(...arguments),this.type="desc"}}var z7={svg:yl,rect:bm,circle:Wk,ellipse:Kk,line:$k,polyline:Cm,polygon:qk,path:mn,pattern:jk,marker:Yk,defs:Gk,linearGradient:zk,radialGradient:Xk,stop:Jk,animate:Qd,animateColor:Zk,animateTransform:eE,font:tE,"font-face":rE,"missing-glyph":nE,glyph:Bm,text:FA,tspan:Cc,tref:aE,a:sE,textPath:oE,image:AE,g:Md,symbol:iE,style:Em,use:cE,mask:kc,clipPath:uE,filter:Ec,feDropShadow:dE,feMorphology:fE,feComposite:hE,feColorMatrix:Dm,feGaussianBlur:gE,title:pE,desc:vE};function Bb(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,r)}return e}function X7(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(e),!0).forEach(function(r){vm(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Bb(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function J7(n,t){var e=document.createElement("canvas");return e.width=n,e.height=t,e}function Z7(n){return Sv.apply(this,arguments)}function Sv(){return Sv=SA(function*(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((r,s)=>{e.onload=()=>{r(e)},e.onerror=(o,i,A,l,c)=>{s(c)},e.src=n})}),Sv.apply(this,arguments)}class TA{constructor(t){var{rootEmSize:e=12,emSize:r=12,createCanvas:s=TA.createCanvas,createImage:o=TA.createImage,anonymousCrossOrigin:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=t,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=r,this.createCanvas=s,this.createImage=this.bindCreateImage(o,i),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return typeof e=="boolean"?(r,s)=>t(r,typeof s=="boolean"?s:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),r=TA.elementTypes[e];return typeof r<"u"?new r(this,t):new Vk(this,t)}createTextNode(t){return new Y7(this,t)}setViewBox(t){this.screen.setViewBox(X7({document:this},t))}}TA.createCanvas=J7;TA.createImage=Z7;TA.elementTypes=z7;function bb(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,r)}return e}function pi(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?bb(Object(e),!0).forEach(function(r){vm(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):bb(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}class Ci{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Wu(r),this.screen=new bc(t,r),this.options=r;var s=new TA(this,r),o=s.createDocumentElement(e);this.document=s,this.documentElement=o}static from(t,e){var r=arguments;return SA(function*(){var s=r.length>2&&r[2]!==void 0?r[2]:{},o=new Wu(s),i=yield o.parse(e);return new Ci(t,i,s)})()}static fromString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=new Wu(r),o=s.parseFromString(e);return new Ci(t,o,r)}fork(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ci.from(t,e,pi(pi({},this.options),r))}forkString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ci.fromString(t,e,pi(pi({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return SA(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:{};e.start(pi({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},r)),yield e.ready(),e.stop()})()}start(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:e,screen:r,options:s}=this;r.start(e,pi(pi({enableRedraw:!0},s),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,r)}}const eV=Object.freeze(Object.defineProperty({__proto__:null,AElement:sE,AnimateColorElement:Zk,AnimateElement:Qd,AnimateTransformElement:eE,BoundingBox:bo,CB1:bv,CB2:Cv,CB3:kv,CB4:Ev,Canvg:Ci,CircleElement:Wk,ClipPathElement:uE,DefsElement:Gk,DescElement:vE,Document:TA,Element:Rn,EllipseElement:Kk,FeColorMatrixElement:Dm,FeCompositeElement:hE,FeDropShadowElement:dE,FeGaussianBlurElement:gE,FeMorphologyElement:fE,FilterElement:Ec,Font:xs,FontElement:tE,FontFaceElement:rE,GElement:Md,GlyphElement:Bm,GradientElement:km,ImageElement:AE,LineElement:$k,LinearGradientElement:zk,MarkerElement:Yk,MaskElement:kc,Matrix:wm,MissingGlyphElement:nE,Mouse:Mk,PSEUDO_ZERO:xi,Parser:Wu,PathElement:mn,PathParser:Qr,PatternElement:jk,Point:ha,PolygonElement:qk,PolylineElement:Cm,Property:fr,QB1:Dv,QB2:Tv,QB3:xv,RadialGradientElement:Xk,RectElement:bm,RenderedElement:Ai,Rotate:Rk,SVGElement:yl,SVGFontLoader:lE,Scale:Ok,Screen:bc,Skew:ym,SkewX:Hk,SkewY:Pk,StopElement:Jk,StyleElement:Em,SymbolElement:iE,TRefElement:aE,TSpanElement:Cc,TextElement:FA,TextPathElement:oE,TitleElement:pE,Transform:si,Translate:_k,UnknownElement:Vk,UseElement:cE,ViewPort:Ik,compressSpaces:_i,default:Ci,getSelectorSpecificity:Uk,normalizeAttributeName:Fk,normalizeColor:Lk,parseExternalUrl:mm,presets:L7,toNumbers:zs,trimLeft:xk,trimRight:Sk,vectorMagnitude:yv,vectorsAngle:Bv,vectorsRatio:od},Symbol.toStringTag,{value:"Module"}));exports.CalendarView=Pb;exports.GanttChart=H5;exports.MilestoneDialog=Ub;exports.MilestonePoint=Fp;exports.ResourceFilterSelect=Hb;exports.ResourceUsageView=Wb;exports.TaskBar=Sp;exports.TaskBarContextMenu=W5;exports.TaskDrawer=Lb;exports.TaskList=Iv;exports.TaskListColumn=P5;exports.TaskListContextMenu=V5;exports.TaskRow=Tb;exports.Timeline=Fb;exports.createResource=Dp;exports.default=f8;exports.install=K5;exports.useI18n=_s;exports.useMessage=Mv;