From c89d26d177590c761dd67160c2844054bc7e3dd1 Mon Sep 17 00:00:00 2001 From: njdaoyehu Date: Wed, 23 Apr 2025 11:00:11 +0800 Subject: [PATCH] fixed --- detect.device/DeviceClientSocket.cs | 4 +-- .../Embedded/dist/assets/drawer-7740e10f.js | 1 - .../Embedded/dist/assets/drawer-8318451d.js | 1 + .../Embedded/dist/assets/index-1773ff73.css | 1 + .../Embedded/dist/assets/index-41d79c03.js | 12 +++++++ .../Embedded/dist/assets/index-b51a6013.js | 12 ------- .../{index-12c490c2.js => index-ce2144ce.js} | 2 +- .../Embedded/dist/assets/index-dc7c3222.css | 1 - .../{index-9ac8985b.js => index-efaa1ab1.js} | 2 +- detect.gui/Embedded/dist/assets/index.js | 6 ++-- detect.gui/Services/DeviceClientService.cs | 8 +++-- detect.gui/Services/OCRService.cs | 35 ++++++++++++++----- detect.sln.DotSettings.user | 1 + 13 files changed, 53 insertions(+), 33 deletions(-) delete mode 100644 detect.gui/Embedded/dist/assets/drawer-7740e10f.js create mode 100644 detect.gui/Embedded/dist/assets/drawer-8318451d.js create mode 100644 detect.gui/Embedded/dist/assets/index-1773ff73.css create mode 100644 detect.gui/Embedded/dist/assets/index-41d79c03.js delete mode 100644 detect.gui/Embedded/dist/assets/index-b51a6013.js rename detect.gui/Embedded/dist/assets/{index-12c490c2.js => index-ce2144ce.js} (98%) delete mode 100644 detect.gui/Embedded/dist/assets/index-dc7c3222.css rename detect.gui/Embedded/dist/assets/{index-9ac8985b.js => index-efaa1ab1.js} (97%) diff --git a/detect.device/DeviceClientSocket.cs b/detect.device/DeviceClientSocket.cs index 2f22f83..309da13 100644 --- a/detect.device/DeviceClientSocket.cs +++ b/detect.device/DeviceClientSocket.cs @@ -15,8 +15,8 @@ public class DeviceClientSocket : TcpClient, IDeviceClient public DeviceClientSocket(string address, int port = 13000) : base(address, port) { - OptionSendBufferSize = 1024 * 1024 * 2; - OptionReceiveBufferSize = 1024 * 1024 * 2; + OptionSendBufferSize = 1024 * 1024 * 64; + OptionReceiveBufferSize = 1024 * 1024 * 64; } public bool Connected() diff --git a/detect.gui/Embedded/dist/assets/drawer-7740e10f.js b/detect.gui/Embedded/dist/assets/drawer-7740e10f.js deleted file mode 100644 index 3dd2398..0000000 --- a/detect.gui/Embedded/dist/assets/drawer-7740e10f.js +++ /dev/null @@ -1 +0,0 @@ -var O=Object.defineProperty,j=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var h=(e,t,a)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,n=(e,t)=>{for(var a in t||(t={}))b.call(t,a)&&h(e,a,t[a]);if(m)for(var a of m(t))F.call(t,a)&&h(e,a,t[a]);return e},I=(e,t)=>j(e,L(t));var _=(e,t)=>{var a={};for(var s in e)b.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&m)for(var s of m(e))t.indexOf(s)<0&&F.call(e,s)&&(a[s]=e[s]);return a};var x=(e,t,a)=>new Promise((s,i)=>{var f=r=>{try{d(a.next(r))}catch(p){i(p)}},v=r=>{try{d(a.throw(r))}catch(p){i(p)}},d=r=>r.done?s(r.value):Promise.resolve(r.value).then(f,v);d((a=a.apply(e,t)).next())});import{u as U,B as N}from"./useForm-baba730a.js";import{a as z,B as G}from"./index-679d8a0a.js";import{a as W,u as Z}from"./deviceApi-260fcde9.js";import{d as $,f as M,c as E,u as l,Z as H,a4 as J,a5 as K,k as Q,a9 as X}from"./vue-72a104e4.js";import{_ as ee}from"./index.js";const c={xs:{span:24},sm:{span:24},lg:{span:6}},te={span:24},u={model:"Device",viewInPage:!1,properties:[{field:"id",label:"ID系统自动生成",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"ID系统自动生成"},colProps:c,component:"InputNumber",rules:[{required:!0,message:"请输入ID系统自动生成!"}]},table:{}},{field:"name",label:"设备名称",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"设备名称"},colProps:c,component:"Input",rules:[{required:!0,message:"请输入设备名称!"}]},table:{}},{field:"deviceSn",label:"设备序列号",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"设备序列号"},colProps:c,component:"Input"},table:{}},{field:"deviceIp",label:"设备IP地址",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"设备IP地址"},colProps:c,component:"Input"},table:{}},{field:"createTime",label:"创建时间",defaultValue:void 0,form:{colProps:c,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入CreateTime!"}]},table:{}},{field:"updateTime",label:"更新时间",defaultValue:void 0,form:{colProps:c,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入UpdateTime!"}]},table:{}}]},B=["name","deviceSn","deviceIp"],T=["name","deviceSn","deviceIp"],C=["name","deviceSn","deviceIp","createTime","updateTime"],V=["name","deviceSn","deviceIp","createTime","updateTime"],P=new Map(B.map((e,t)=>[e,t])),pe=u.properties.filter(e=>B.includes(e.field)).map(s=>{var{field:e,label:t,form:i}=s,a=_(i,[]);return I(n({field:e,label:t,defaultValue:void 0},a),{required:!1,rules:[{required:!1}]})}).sort((e,t)=>{const a=P.get(e.field),s=P.get(t.field);return a-s}),Y=new Map(T.map((e,t)=>[e,t])),ae=u.properties.filter(e=>T.includes(e.field)).map(({field:e,label:t,defaultValue:a,form:s})=>I(n({field:e,label:t,defaultValue:a},s),{colProps:te})).sort((e,t)=>{const a=Y.get(e.field),s=Y.get(t.field);return a-s}),S=new Map(C.map((e,t)=>[e,t])),me=u.properties.filter(e=>C.includes(e.field)).map(({field:e,label:t,table:a})=>n({dataIndex:e,title:t},a)).sort((e,t)=>{const a=S.get(e.dataIndex),s=S.get(t.dataIndex);return a-s}),y=new Map(V.map((e,t)=>[e,t]));u.properties.filter(e=>V.includes(e.field)).map(({field:e,label:t,table:a})=>n({dataIndex:e,title:t},a)).sort((e,t)=>{const a=y.get(e.dataIndex),s=y.get(t.dataIndex);return a-s});const se=$({__name:"drawer",emits:["success","register"],setup(e,{emit:t}){const a=t,s=M(!0),i=M(),[f,{resetFields:v,setFieldsValue:d,validate:r}]=U({labelWidth:100,schemas:ae,showActionButtonGroup:!1}),[p,{setDrawerProps:g,closeDrawer:q}]=z(o=>x(this,null,function*(){yield v(),g({confirmLoading:!1}),s.value=!!(o!=null&&o.isUpdate),i.value=o==null?void 0:o.record,l(s)&&(yield d(n({},o.record)))})),k=E(()=>l(s)?"编辑":"新增");function R(){return x(this,null,function*(){try{const o=yield r();g({confirmLoading:!0});const w=_(o,[]),A=l(s)?Z:W,D=l(s)?Object.assign({},n(n({},l(i)),w)):n({},w);yield A(D),DeviceClientService.refreshDeviceClientBySn(D.deviceSn),q(),a("success")}catch(o){}finally{g({confirmLoading:!1})}})}return(o,w)=>(H(),J(l(G),X(o.$attrs,{onRegister:l(p),showFooter:"",title:k.value,width:"600px",onOk:R}),{default:K(()=>[Q(l(N),{onRegister:l(f)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const oe=ee(se,[["__scopeId","data-v-0394e0d0"]]),ue=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"}));export{oe as D,me as c,ue as d,pe as s}; diff --git a/detect.gui/Embedded/dist/assets/drawer-8318451d.js b/detect.gui/Embedded/dist/assets/drawer-8318451d.js new file mode 100644 index 0000000..b80cd05 --- /dev/null +++ b/detect.gui/Embedded/dist/assets/drawer-8318451d.js @@ -0,0 +1 @@ +var O=Object.defineProperty,j=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var h=(e,t,a)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,n=(e,t)=>{for(var a in t||(t={}))b.call(t,a)&&h(e,a,t[a]);if(m)for(var a of m(t))F.call(t,a)&&h(e,a,t[a]);return e},I=(e,t)=>j(e,L(t));var _=(e,t)=>{var a={};for(var s in e)b.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&m)for(var s of m(e))t.indexOf(s)<0&&F.call(e,s)&&(a[s]=e[s]);return a};var x=(e,t,a)=>new Promise((s,i)=>{var f=o=>{try{d(a.next(o))}catch(p){i(p)}},v=o=>{try{d(a.throw(o))}catch(p){i(p)}},d=o=>o.done?s(o.value):Promise.resolve(o.value).then(f,v);d((a=a.apply(e,t)).next())});import{u as U,B as N}from"./useForm-baba730a.js";import{a as z,B as G}from"./index-679d8a0a.js";import{a as W,u as Z}from"./deviceApi-260fcde9.js";import{d as $,f as M,c as E,u as l,Z as H,a4 as J,a5 as K,k as Q,a9 as X}from"./vue-72a104e4.js";import{_ as ee}from"./index.js";const c={xs:{span:24},sm:{span:24},lg:{span:6}},te={span:24},u={model:"Device",viewInPage:!1,properties:[{field:"id",label:"ID系统自动生成",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"ID系统自动生成"},colProps:c,component:"InputNumber",rules:[{required:!0,message:"请输入ID系统自动生成!"}]},table:{}},{field:"name",label:"设备名称",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"设备名称"},colProps:c,component:"Input",rules:[{required:!0,message:"请输入设备名称!"}]},table:{}},{field:"deviceSn",label:"设备序列号",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"设备序列号"},colProps:c,component:"Input",rules:[{required:!0,message:"请输入设备序列号!"}]},table:{}},{field:"deviceIp",label:"设备IP地址",defaultValue:void 0,form:{componentProps:{allowClear:!0,placeholder:"设备IP地址"},colProps:c,component:"Input"},table:{}},{field:"createTime",label:"创建时间",defaultValue:void 0,form:{colProps:c,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入CreateTime!"}]},table:{}},{field:"updateTime",label:"更新时间",defaultValue:void 0,form:{colProps:c,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入UpdateTime!"}]},table:{}}]},B=["name","deviceSn","deviceIp"],T=["name","deviceSn","deviceIp"],C=["name","deviceSn","deviceIp","createTime","updateTime"],q=["name","deviceSn","deviceIp","createTime","updateTime"],P=new Map(B.map((e,t)=>[e,t])),pe=u.properties.filter(e=>B.includes(e.field)).map(s=>{var{field:e,label:t,form:i}=s,a=_(i,[]);return I(n({field:e,label:t,defaultValue:void 0},a),{required:!1,rules:[{required:!1}]})}).sort((e,t)=>{const a=P.get(e.field),s=P.get(t.field);return a-s}),Y=new Map(T.map((e,t)=>[e,t])),ae=u.properties.filter(e=>T.includes(e.field)).map(({field:e,label:t,defaultValue:a,form:s})=>I(n({field:e,label:t,defaultValue:a},s),{colProps:te})).sort((e,t)=>{const a=Y.get(e.field),s=Y.get(t.field);return a-s}),S=new Map(C.map((e,t)=>[e,t])),me=u.properties.filter(e=>C.includes(e.field)).map(({field:e,label:t,table:a})=>n({dataIndex:e,title:t},a)).sort((e,t)=>{const a=S.get(e.dataIndex),s=S.get(t.dataIndex);return a-s}),y=new Map(q.map((e,t)=>[e,t]));u.properties.filter(e=>q.includes(e.field)).map(({field:e,label:t,table:a})=>n({dataIndex:e,title:t},a)).sort((e,t)=>{const a=y.get(e.dataIndex),s=y.get(t.dataIndex);return a-s});const se=$({__name:"drawer",emits:["success","register"],setup(e,{emit:t}){const a=t,s=M(!0),i=M(),[f,{resetFields:v,setFieldsValue:d,validate:o}]=U({labelWidth:100,schemas:ae,showActionButtonGroup:!1}),[p,{setDrawerProps:g,closeDrawer:V}]=z(r=>x(this,null,function*(){yield v(),g({confirmLoading:!1}),s.value=!!(r!=null&&r.isUpdate),i.value=r==null?void 0:r.record,l(s)&&(yield d(n({},r.record)))})),k=E(()=>l(s)?"编辑":"新增");function R(){return x(this,null,function*(){try{const r=yield o();g({confirmLoading:!0});const w=_(r,[]),A=l(s)?Z:W,D=l(s)?Object.assign({},n(n({},l(i)),w)):n({},w);yield A(D),DeviceClientService.refreshDeviceClientBySn(D.deviceSn),V(),a("success")}catch(r){}finally{g({confirmLoading:!1})}})}return(r,w)=>(H(),J(l(G),X(r.$attrs,{onRegister:l(p),showFooter:"",title:k.value,width:"600px",onOk:R}),{default:K(()=>[Q(l(N),{onRegister:l(f)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const re=ee(se,[["__scopeId","data-v-0394e0d0"]]),ue=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));export{re as D,me as c,ue as d,pe as s}; diff --git a/detect.gui/Embedded/dist/assets/index-1773ff73.css b/detect.gui/Embedded/dist/assets/index-1773ff73.css new file mode 100644 index 0000000..f4bc1e5 --- /dev/null +++ b/detect.gui/Embedded/dist/assets/index-1773ff73.css @@ -0,0 +1 @@ +.box[data-v-ac028922]{position:absolute;left:0;top:0;width:100vw;height:100vh;background-color:#0d1540;z-index:9999}.box .pdf-viewer[data-v-ac028922]{text-align:center;position:absolute;left:0;top:0;width:100vw;height:100vh;background-color:#0d1540;overflow:auto}.box .pdf-viewer .selection-box[data-v-ac028922]{position:absolute;border:2px dashed red}.box .btn[data-v-ac028922]{position:absolute;border-radius:0;left:0;top:0}.tool-box[data-v-ac028922]{position:absolute;top:5px;right:20px;margin-right:20px;padding:5px;background:rgba(45,119,243,.5);display:flex;justify-content:space-around;align-items:center;border-radius:5px}.tool-box .tool-button[data-v-ac028922]{border-radius:100px;padding:5px;width:36px;height:36px}.tool-box>span[data-v-ac028922]{padding-left:10px;padding-right:10px;color:#fff}.header[data-v-41e992c4]{padding:5px 20px;height:50px;display:flex;background-color:#2d77f333;align-items:center}.header .title[data-v-41e992c4]{font-family:Noto Sans SC,serif;font-size:14px;color:#fff;padding-left:10px}[data-v-41e992c4] .ant-form{background-color:transparent;padding:0;margin:10px 20px 2px 10px}[data-v-41e992c4] .ant-table-wrapper{background:transparent}[data-v-41e992c4] .ant-pagination-total-text{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-pagination.ant-pagination-mini .ant-pagination-item{min-width:28px;height:28px;margin:0;line-height:26px}[data-v-41e992c4] .ant-pagination .ant-pagination-item-active:hover{border-color:#2d77f34d!important;background:rgba(45,119,243,.2)!important}[data-v-41e992c4] .ant-pagination .ant-pagination-item-active{font-weight:700;border-color:#2d77f366!important;background:rgba(45,119,243,.3)!important}[data-v-41e992c4] .ant-pagination .ant-pagination-item a{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-pagination.ant-pagination-mini .ant-pagination-prev,[data-v-41e992c4] .ant-pagination.ant-pagination-mini .ant-pagination-next{width:28px;height:28px;padding-top:2px;color:#fff}[data-v-41e992c4] .ant-pagination.ant-pagination-mini .ant-pagination-options-quick-jumper{height:28px;line-height:28px;font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-select-selector{border:1px solid rgba(45,119,243,.3)!important;background-color:#2d77f333!important;height:36px!important}[data-v-41e992c4] .ant-pagination-options .ant-select-selector{height:28px!important}[data-v-41e992c4] .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector{border:1px solid rgba(45,119,243,.4)!important;background-color:#2d77f34d!important}[data-v-41e992c4] .ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector{width:100%;height:36px;padding:1px 11px 0}[data-v-41e992c4] .ant-select .ant-select-selection-placeholder{font-family:Noto Sans SC,serif;font-size:14px;color:#aaa;line-height:34px}[data-v-41e992c4] .ant-select-selector .ant-select-selection-item,[data-v-41e992c4] .ant-select-selection-item{font-family:Noto Sans SC,serif;font-size:14px;color:#fff;line-height:34px}[data-v-41e992c4] .ant-select-open .ant-select-selection-item{color:#aaa}[data-v-41e992c4] .ant-select .ant-select-arrow{padding-top:2px;color:#fff}[data-v-41e992c4] .ant-select-dropdown{border-radius:6px!important;border:1px solid #183171!important;background-color:#13265a!important}[data-v-41e992c4] .ant-select-item-option-content{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-select-item-option-active{background-color:#92d6ed4d!important}[data-v-41e992c4] .ant-select-item-option-selected{font-weight:400!important;background-color:#92d6ed66!important}[data-v-41e992c4] .ant-empty-description{color:#999}[data-v-41e992c4] .ant-pagination-options-quick-jumper>input{font-family:Noto Sans SC,serif;font-size:14px;color:#fff;height:26px!important;line-height:26px;background-color:#2d77f333;border:1px solid rgba(45,119,243,.3)}[data-v-41e992c4] .ant-pagination-options-quick-jumper>input:hover,[data-v-41e992c4] .ant-pagination-options-quick-jumper>input:focus{background-color:#2d77f34d;border:1px solid rgba(45,119,243,.4)}[data-v-41e992c4] .ant-input-clear-icon,[data-v-41e992c4] .ant-input-password-icon{color:#fff!important}[data-v-41e992c4] .ant-select-clear{color:#fff!important;background:transparent!important}[data-v-41e992c4] .vben-basic-table-action button:disabled{color:#999!important}[data-v-41e992c4] .vben-tree{border-radius:6px!important;border:1px solid #183171!important;background-color:#13265a!important}[data-v-41e992c4] .vben-tree-header{border-bottom:1px solid #183171}[data-v-41e992c4] .vben-basic-title{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-tree-list{background:#13265a!important}[data-v-41e992c4] .vben-tree__title{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-tree-switcher-icon{color:#fff!important}[data-v-41e992c4] .ant-dropdown-trigger{padding-top:2px;color:#fff!important}[data-v-41e992c4] .ant-tree-treenode .ant-tree-treenode-switcher-close .ant-tree-treenode-selected{background-color:#92d6ed4d!important}[data-v-41e992c4] .ant-popover-inner{border:1px solid #183171!important;background-color:#13265a!important}[data-v-41e992c4] .ant-popconfirm-message-title{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-picker,[data-v-41e992c4] .ant-picker-range{height:36px;border-color:#2d77f34d;background:rgba(45,119,243,.2)}[data-v-41e992c4] .ant-picker:hover{border-color:#2d77f366;background:rgba(45,119,243,.3)}[data-v-41e992c4] .ant-picker-focused,[data-v-41e992c4] .ant-picker-range:hover,[data-v-41e992c4] .ant-picker-range:focus{border-color:#2d77f366;background:rgba(45,119,243,.3)}[data-v-41e992c4] .vben-basic-table .ant-picker-range{width:100%}[data-v-41e992c4] .ant-picker-input>input{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-41e992c4] .ant-picker-input>input::placeholder{font-family:Noto Sans SC,serif;font-size:14px;color:#aaa}[data-v-41e992c4] .anticon{color:#fff}[data-v-41e992c4] .ant-picker-panel-layout{border:1px solid #183171!important;background-color:#13265a!important}[data-v-41e992c4] .ant-picker-cell{font-family:Noto Sans SC,serif;font-size:14px;color:#999}[data-v-41e992c4] .ant-picker-cell-in-view{color:#fff!important}[data-v-41e992c4] .ant-picker-content th,[data-v-41e992c4] .ant-picker-header-super-prev-btn,[data-v-41e992c4] .ant-picker-header-prev-btn,[data-v-41e992c4] .ant-picker-header-super-next-btn,[data-v-41e992c4] .ant-picker-header-next-btn,[data-v-41e992c4] .ant-picker-year-btn,[data-v-41e992c4] .ant-picker-month-btn,[data-v-41e992c4] .ant-picker-decade-btn,[data-v-41e992c4] .ant-picker-header-view,[data-v-41e992c4] .ant-picker-time-panel-cell-inner{font-family:Noto Sans SC,serif;font-size:14px;color:#fff!important}[data-v-41e992c4] .ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner{background-color:#92d6ed4d!important}[data-v-41e992c4] .ant-card{border:1px solid #183171!important;background-color:#13265a!important}[data-v-41e992c4] .ant-card-body{padding:0!important}[data-v-41e992c4] .ant-page-header-heading-title{font-family:Noto Sans SC,serif;font-size:20px;font-weight:400;color:#fff!important}[data-v-41e992c4] .ant-descriptions-view{border:1px solid #183171!important}[data-v-41e992c4] .ant-descriptions-row{border-bottom:1px solid #183171!important}[data-v-41e992c4] .ant-descriptions-item-label{background-color:#92d6ed0d!important}[data-v-41e992c4] .ant-descriptions-item-label,[data-v-41e992c4] .ant-descriptions-item-content{font-family:Noto Sans SC,serif;font-size:14px;color:#fff!important;border-inline-end:1px solid #183171!important}[data-v-41e992c4] .CodeMirror{border-radius:6px;border:1px solid rgba(45,119,243,.3)!important;background-color:#13265a!important}[data-v-41e992c4] .CodeMirror-lines{font-family:Noto Sans SC,serif;font-size:14px;color:#fff!important}[data-v-41e992c4] .CodeMirror-gutters{border-right:1px solid rgba(45,119,243,.3)!important}[data-v-41e992c4] .CodeMirror-cursor{border-left:1px solid white}[data-v-41e992c4] .cm-string{color:#ff8c00!important}[data-v-41e992c4] .ant-descriptions-item-label{width:120px}[data-v-41e992c4] .ant-spin-dot-item{background-color:#5ca0ff!important}[data-v-41e992c4] .ant-spin-text{color:#5ca0ff!important} diff --git a/detect.gui/Embedded/dist/assets/index-41d79c03.js b/detect.gui/Embedded/dist/assets/index-41d79c03.js new file mode 100644 index 0000000..d690e56 --- /dev/null +++ b/detect.gui/Embedded/dist/assets/index-41d79c03.js @@ -0,0 +1,12 @@ +var eb=Object.defineProperty,sb=Object.defineProperties;var ib=Object.getOwnPropertyDescriptors;var tc=Object.getOwnPropertySymbols,nb=Object.getPrototypeOf,Tp=Object.prototype.hasOwnProperty,Pp=Object.prototype.propertyIsEnumerable,rb=Reflect.get;var fo=Math.pow,Nu=(d,t,e)=>t in d?eb(d,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[t]=e,vs=(d,t)=>{for(var e in t||(t={}))Tp.call(t,e)&&Nu(d,e,t[e]);if(tc)for(var e of tc(t))Pp.call(t,e)&&Nu(d,e,t[e]);return d},_r=(d,t)=>sb(d,ib(t));var Rp=(d,t)=>{var e={};for(var s in d)Tp.call(d,s)&&t.indexOf(s)<0&&(e[s]=d[s]);if(d!=null&&tc)for(var s of tc(d))t.indexOf(s)<0&&Pp.call(d,s)&&(e[s]=d[s]);return e};var B=(d,t,e)=>(Nu(d,typeof t!="symbol"?t+"":t,e),e),Ou=(d,t,e)=>{if(!t.has(d))throw TypeError("Cannot "+e)};var n=(d,t,e)=>(Ou(d,t,"read from private field"),e?e.call(d):t.get(d)),u=(d,t,e)=>{if(t.has(d))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(d):t.set(d,e)},p=(d,t,e,s)=>(Ou(d,t,"write to private field"),s?s.call(d,e):t.set(d,e),e);var Yt=(d,t,e,s)=>({set _(i){p(d,t,i,e)},get _(){return n(d,t,s)}}),b=(d,t,e)=>(Ou(d,t,"access private method"),e),ji=(d,t,e)=>rb(nb(d),e,t);var I=(d,t,e)=>new Promise((s,i)=>{var r=l=>{try{o(e.next(l))}catch(h){i(h)}},a=l=>{try{o(e.throw(l))}catch(h){i(h)}},o=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,a);o((e=e.apply(d,t)).next())});import{k as ab,_ as Jp,l as ob,S as lb,m as hb,L as cb,j as db}from"./index.js";import{u as ub,B as fb}from"./useTable-e949a6b7.js";import{T as pb}from"./useForm-baba730a.js";import{O as gb,N as Zp,Q as mb,R as bb,U as Ab,V as yb,W as wb,j as Bu}from"./antd-0679333d.js";import{T as vb,r as _b,s as Sb,c as Eb,a as kp}from"./drawer-20246748.js";import{u as Cb}from"./index-679d8a0a.js";import{l as Ao,a6 as tg,m as Hu,A as zu,Z as Fc,_ as qu,$ as As,ad as Mp,a8 as eg,k as le,a0 as xb,a5 as ii,G as kr,d as Tb,f as Wi,c as Pb,o as Rb,b as kb,u as ce,a4 as Mb}from"./vue-72a104e4.js";import{u as Lb}from"./index-8a6826ba.js";import Ib from"./result-f5f59bf1.js";import"./useWindowSizeFn-1db11f4f.js";import"./onMountedOrActivated-ee461833.js";import"./sortable.esm-15c0a34e.js";import"./copyTextToClipboard-3ca69a78.js";import"./deviceApi-260fcde9.js";import"./modal-62c07bbb.js";var Fo={};Fo.d=(d,t)=>{for(var e in t)Fo.o(t,e)&&!Fo.o(d,e)&&Object.defineProperty(d,e,{enumerable:!0,get:t[e]})};Fo.o=(d,t)=>Object.prototype.hasOwnProperty.call(d,t);var z=globalThis.pdfjsLib={};Fo.d(z,{AbortException:()=>Gi,AnnotationEditorLayer:()=>np,AnnotationEditorParamsType:()=>J,AnnotationEditorType:()=>V,AnnotationEditorUIManager:()=>Ar,AnnotationLayer:()=>Py,AnnotationMode:()=>ni,ColorPicker:()=>$c,DOMSVGFactory:()=>Ap,DrawLayer:()=>op,FeatureTest:()=>ee,GlobalWorkerOptions:()=>ei,ImageKind:()=>rc,InvalidPDFException:()=>Ku,MissingPDFException:()=>No,OPS:()=>Fe,OutputScale:()=>Ju,PDFDataRangeTransport:()=>im,PDFDateString:()=>pp,PDFWorker:()=>Dr,PasswordResponses:()=>Ob,PermissionFlag:()=>Nb,PixelsPerInch:()=>Vi,RenderingCancelledException:()=>up,TextLayer:()=>Oo,TouchManager:()=>Hc,UnexpectedResponseException:()=>Nc,Util:()=>N,VerbosityLevel:()=>Pu,XfaLayer:()=>rm,build:()=>ly,createValidAbsoluteUrl:()=>$b,fetchData:()=>Lu,getDocument:()=>ZA,getFilenameFromUrl:()=>Kb,getPdfFilenameFromUrl:()=>Qb,getXfaPageViewport:()=>Jb,isDataScheme:()=>Iu,isPdfFile:()=>fp,noContextMenu:()=>Ke,normalizeUnicode:()=>Xb,setLayerDimensions:()=>br,shadow:()=>q,stopEvent:()=>Ee,version:()=>oy});const Xt=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),sg=[1,0,0,1,0,0],Yu=[.001,0,0,.001,0,0],Db=1e7,$u=1.35,Se={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ni={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Fb="pdfjs_internal_editor_",V={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},J={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},Nb={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ht={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},rc={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},vt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},po={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Pu={ERRORS:0,WARNINGS:1,INFOS:5},Fe={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},Ob={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let Ru=Pu.WARNINGS;function Bb(d){Number.isInteger(d)&&(Ru=d)}function Hb(){return Ru}function ku(d){Ru>=Pu.INFOS}function U(d){Ru>=Pu.WARNINGS}function rt(d){throw new Error(d)}function wt(d,t){d||rt(t)}function zb(d){switch(d==null?void 0:d.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function $b(d,t=null,e=null){if(!d)return null;try{if(e&&typeof d=="string"){if(e.addDefaultProtocol&&d.startsWith("www.")){const i=d.match(/\./g);(i==null?void 0:i.length)>=2&&(d=`http://${d}`)}if(e.tryConvertEncoding)try{d=Wb(d)}catch(i){}}const s=t?new URL(d,t):new URL(d);if(zb(s))return s}catch(s){}return null}function q(d,t,e,s=!1){return Object.defineProperty(d,t,{value:e,enumerable:!s,configurable:!0,writable:!1}),e}const Ui=function(){function t(e,s){this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();class Lp extends Ui{constructor(t,e){super(t,"PasswordException"),this.code=e}}class Gu extends Ui{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Ku extends Ui{constructor(t){super(t,"InvalidPDFException")}}class No extends Ui{constructor(t){super(t,"MissingPDFException")}}class Nc extends Ui{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}}class Gb extends Ui{constructor(t){super(t,"FormatError")}}class Gi extends Ui{constructor(t){super(t,"AbortException")}}function ig(d){(typeof d!="object"||(d==null?void 0:d.length)===void 0)&&rt("Invalid argument for bytesToString");const t=d.length,e=8192;if(t>24&255,d>>16&255,d>>8&255,d&255)}function cp(d){const t=Object.create(null);for(const[e,s]of d)t[e]=s;return t}function Ub(){const d=new Uint8Array(4);return d[0]=1,new Uint32Array(d.buffer,0,1)[0]===1}function jb(){try{return new Function(""),!0}catch(d){return!1}}class ee{static get isLittleEndian(){return q(this,"isLittleEndian",Ub())}static get isEvalSupported(){return q(this,"isEvalSupported",jb())}static get isOffscreenCanvasSupported(){return q(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas!="undefined")}static get isImageDecoderSupported(){return q(this,"isImageDecoderSupported",typeof ImageDecoder!="undefined")}static get platform(){return typeof navigator!="undefined"&&typeof(navigator==null?void 0:navigator.platform)=="string"?q(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):q(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var t,e;return q(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}}const Vu=Array.from(Array(256).keys(),d=>d.toString(16).padStart(2,"0"));var Fr,ac,Ho,Qu;class N{static makeHexColor(t,e,s){return`#${Vu[t]}${Vu[e]}${Vu[s]}`}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[1],e[1]=s,s=e[2],e[2]=e[3],e[3]=s,t[1]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){const s=t[0]*e[0]+t[1]*e[2]+e[4],i=t[0]*e[1]+t[1]*e[3]+e[5];return[s,i]}static applyInverseTransform(t,e){const s=e[0]*e[3]-e[1]*e[2],i=(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/s,r=(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/s;return[i,r]}static getAxialAlignedBoundingBox(t,e){const s=this.applyTransform(t,e),i=this.applyTransform(t.slice(2,4),e),r=this.applyTransform([t[0],t[3]],e),a=this.applyTransform([t[2],t[1]],e);return[Math.min(s[0],i[0],r[0],a[0]),Math.min(s[1],i[1],r[1],a[1]),Math.max(s[0],i[0],r[0],a[0]),Math.max(s[1],i[1],r[1],a[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],s=t[0]*e[0]+t[1]*e[2],i=t[0]*e[1]+t[1]*e[3],r=t[2]*e[0]+t[3]*e[2],a=t[2]*e[1]+t[3]*e[3],o=(s+a)/2,l=Math.sqrt(fo(s+a,2)-4*(s*a-r*i))/2,h=o+l||1,c=o-l||1;return[Math.sqrt(h),Math.sqrt(c)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>a?null:[s,r,i,a]}static bezierBoundingBox(t,e,s,i,r,a,o,l,h){return h?(h[0]=Math.min(h[0],t,o),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,o),h[3]=Math.max(h[3],e,l)):h=[Math.min(t,o),Math.min(e,l),Math.max(t,o),Math.max(e,l)],b(this,Ho,Qu).call(this,t,s,r,o,e,i,a,l,3*(-t+3*(s-r)+o),6*(t-2*s+r),3*(s-t),h),b(this,Ho,Qu).call(this,t,s,r,o,e,i,a,l,3*(-e+3*(i-a)+l),6*(e-2*i+a),3*(i-e),h),h}}Fr=new WeakSet,ac=function(t,e,s,i,r,a,o,l,h,c){if(h<=0||h>=1)return;const f=1-h,g=h*h,m=g*h,A=f*(f*(f*t+3*h*e)+3*g*s)+m*i,y=f*(f*(f*r+3*h*a)+3*g*o)+m*l;c[0]=Math.min(c[0],A),c[1]=Math.min(c[1],y),c[2]=Math.max(c[2],A),c[3]=Math.max(c[3],y)},Ho=new WeakSet,Qu=function(t,e,s,i,r,a,o,l,h,c,f,g){if(Math.abs(h)<1e-12){Math.abs(c)>=1e-12&&b(this,Fr,ac).call(this,t,e,s,i,r,a,o,l,-f/c,g);return}const m=fo(c,2)-4*f*h;if(m<0)return;const A=Math.sqrt(m),y=2*h;b(this,Fr,ac).call(this,t,e,s,i,r,a,o,l,(-c+A)/y,g),b(this,Fr,ac).call(this,t,e,s,i,r,a,o,l,(-c-A)/y,g)},u(N,Fr),u(N,Ho);function Wb(d){return decodeURIComponent(escape(d))}let Uu=null,Ip=null;function Xb(d){return Uu||(Uu=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Ip=new Map([["ſt","ſt"]])),d.replaceAll(Uu,(t,e,s)=>e?e.normalize("NFKC"):Ip.get(s))}function qb(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const d=new Uint8Array(32);return crypto.getRandomValues(d),ig(d)}const dp="pdfjs_internal_id_";function Yb(d){return Uint8Array.prototype.toBase64?d.toBase64():btoa(ig(d))}typeof Promise.try!="function"&&(Promise.try=function(d,...t){return new Promise(e=>{e(d(...t))})});const _s="http://www.w3.org/2000/svg",Ki=class Ki{};B(Ki,"CSS",96),B(Ki,"PDF",72),B(Ki,"PDF_TO_CSS_UNITS",Ki.CSS/Ki.PDF);let Vi=Ki;function Lu(d,t="text"){return I(this,null,function*(){if(yo(d,document.baseURI)){const e=yield fetch(d);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,s)=>{const i=new XMLHttpRequest;i.open("GET",d,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(i.response);return}e(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})})}class Qh{constructor({viewBox:t,userUnit:e,scale:s,rotation:i,offsetX:r=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=e,this.scale=s,this.rotation=i,this.offsetX=r,this.offsetY=a,s*=e;const l=(t[2]+t[0])/2,h=(t[3]+t[1])/2;let c,f,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,f=0,g=0,m=1;break;case 90:c=0,f=1,g=1,m=0;break;case 270:c=0,f=-1,g=-1,m=0;break;case 0:c=1,f=0,g=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(g=-g,m=-m);let A,y,v,w;c===0?(A=Math.abs(h-t[1])*s+r,y=Math.abs(l-t[0])*s+a,v=(t[3]-t[1])*s,w=(t[2]-t[0])*s):(A=Math.abs(l-t[0])*s+r,y=Math.abs(h-t[1])*s+a,v=(t[2]-t[0])*s,w=(t[3]-t[1])*s),this.transform=[c*s,f*s,g*s,m*s,A-c*s*l-g*s*h,y-f*s*l-m*s*h],this.width=v,this.height=w}get rawDims(){const{userUnit:t,viewBox:e}=this,s=e.map(i=>i*t);return q(this,"rawDims",{pageWidth:s[2]-s[0],pageHeight:s[3]-s[1],pageX:s[0],pageY:s[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}={}){return new Qh({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){return N.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=N.applyTransform([t[0],t[1]],this.transform),s=N.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){return N.applyInverseTransform([t,e],this.transform)}}class up extends Ui{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function Iu(d){const t=d.length;let e=0;for(;e=1&&i<=12?i-1:0;let r=parseInt(e[3],10);r=r>=1&&r<=31?r:1;let a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(e[6],10);l=l>=0&&l<=59?l:0;const h=e[7]||"Z";let c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;let f=parseInt(e[9],10)||0;return f=f>=0&&f<=59?f:0,h==="-"?(a+=c,o+=f):h==="+"&&(a-=c,o-=f),new Date(Date.UTC(s,i,r,a,o,l))}}zo=new WeakMap,u(pp,zo,void 0);function Jb(d,{scale:t=1,rotation:e=0}){const{width:s,height:i}=d.attributes.style,r=[0,0,parseInt(s),parseInt(i)];return new Qh({viewBox:r,userUnit:1,scale:t,rotation:e})}function gp(d){if(d.startsWith("#")){const t=parseInt(d.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return d.startsWith("rgb(")?d.slice(4,-1).split(",").map(t=>parseInt(t)):d.startsWith("rgba(")?d.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(U(`Not a valid color format: "${d}"`),[0,0,0])}function Zb(d){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const e of d.keys()){t.style.color=e;const s=window.getComputedStyle(t).color;d.set(e,gp(s))}t.remove()}function ht(d){const{a:t,b:e,c:s,d:i,e:r,f:a}=d.getTransform();return[t,e,s,i,r,a]}function Qe(d){const{a:t,b:e,c:s,d:i,e:r,f:a}=d.getTransform().invertSelf();return[t,e,s,i,r,a]}function br(d,t,e=!1,s=!0){if(t instanceof Qh){const{pageWidth:i,pageHeight:r}=t.rawDims,{style:a}=d,o=ee.isCSSRoundSupported,l=`var(--scale-factor) * ${i}px`,h=`var(--scale-factor) * ${r}px`,c=o?`round(down, ${l}, var(--scale-round-x, 1px))`:`calc(${l})`,f=o?`round(down, ${h}, var(--scale-round-y, 1px))`:`calc(${h})`;!e||t.rotation%180===0?(a.width=c,a.height=f):(a.width=f,a.height=c)}s&&d.setAttribute("data-main-rotation",t.rotation)}class Ju{constructor(){const t=window.devicePixelRatio||1;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}}var ri,Zi,Ne,tn,$o,Go,Uc,ng,jc,rg,Wc,ag,Nr,oc,Xc,og,Vo,tf;const Cs=class Cs{constructor(t){u(this,jc);u(this,Wc);u(this,Nr);u(this,Xc);u(this,Vo);u(this,ri,null);u(this,Zi,null);u(this,Ne,void 0);u(this,tn,null);u(this,$o,null);p(this,Ne,t),n(Cs,Go)||p(Cs,Go,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const t=p(this,ri,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=n(this,Ne)._uiManager._signal;t.addEventListener("contextmenu",Ke,{signal:e}),t.addEventListener("pointerdown",b(Cs,Uc,ng),{signal:e});const s=p(this,tn,document.createElement("div"));s.className="buttons",t.append(s);const i=n(this,Ne).toolbarPosition;if(i){const{style:r}=t,a=n(this,Ne)._uiManager.direction==="ltr"?1-i[0]:i[0];r.insetInlineEnd=`${100*a}%`,r.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return b(this,Xc,og).call(this),t}get div(){return n(this,ri)}hide(){var t;n(this,ri).classList.add("hidden"),(t=n(this,Zi))==null||t.hideDropdown()}show(){var t;n(this,ri).classList.remove("hidden"),(t=n(this,$o))==null||t.shown()}addAltText(t){return I(this,null,function*(){const e=yield t.render();b(this,Nr,oc).call(this,e),n(this,tn).prepend(e,n(this,Vo,tf)),p(this,$o,t)})}addColorPicker(t){p(this,Zi,t);const e=t.renderButton();b(this,Nr,oc).call(this,e),n(this,tn).prepend(e,n(this,Vo,tf))}remove(){var t;n(this,ri).remove(),(t=n(this,Zi))==null||t.destroy(),p(this,Zi,null)}};ri=new WeakMap,Zi=new WeakMap,Ne=new WeakMap,tn=new WeakMap,$o=new WeakMap,Go=new WeakMap,Uc=new WeakSet,ng=function(t){t.stopPropagation()},jc=new WeakSet,rg=function(t){n(this,Ne)._focusEventsAllowed=!1,Ee(t)},Wc=new WeakSet,ag=function(t){n(this,Ne)._focusEventsAllowed=!0,Ee(t)},Nr=new WeakSet,oc=function(t){const e=n(this,Ne)._uiManager._signal;t.addEventListener("focusin",b(this,jc,rg).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",b(this,Wc,ag).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",Ke,{signal:e})},Xc=new WeakSet,og=function(){const{editorType:t,_uiManager:e}=n(this,Ne),s=document.createElement("button");s.className="delete",s.tabIndex=0,s.setAttribute("data-l10n-id",n(Cs,Go)[t]),b(this,Nr,oc).call(this,s),s.addEventListener("click",i=>{e.delete()},{signal:e._signal}),n(this,tn).append(s)},Vo=new WeakSet,tf=function(){const t=document.createElement("div");return t.className="divider",t},u(Cs,Uc),u(Cs,Go,null);let Zu=Cs;var Uo,en,sn,qc,lg,Yc,hg,Kc,cg;class tA{constructor(t){u(this,qc);u(this,Yc);u(this,Kc);u(this,Uo,null);u(this,en,null);u(this,sn,void 0);p(this,sn,t)}show(t,e,s){const[i,r]=b(this,Yc,hg).call(this,e,s),{style:a}=n(this,en)||p(this,en,b(this,qc,lg).call(this));t.append(n(this,en)),a.insetInlineEnd=`${100*i}%`,a.top=`calc(${100*r}% + var(--editor-toolbar-vert-offset))`}hide(){n(this,en).remove()}}Uo=new WeakMap,en=new WeakMap,sn=new WeakMap,qc=new WeakSet,lg=function(){const t=p(this,en,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",Ke,{signal:n(this,sn)._signal});const e=p(this,Uo,document.createElement("div"));return e.className="buttons",t.append(e),b(this,Kc,cg).call(this),t},Yc=new WeakSet,hg=function(t,e){let s=0,i=0;for(const r of t){const a=r.y+r.height;if(as){i=o,s=a;continue}e?o>i&&(i=o):o{n(this,sn).highlightSelection("floating_button")},{signal:s}),n(this,Uo).append(t)};function Oc(d,t,e){for(const s of e)t.addEventListener(s,d[s].bind(d))}var Qc;class eA{constructor(){u(this,Qc,0)}get id(){return`${Fb}${Yt(this,Qc)._++}`}}Qc=new WeakMap;var Or,jo,Gt,Br,lc;const wp=class wp{constructor(){u(this,Br);u(this,Or,qb());u(this,jo,0);u(this,Gt,null)}static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,',s=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=t;const r=i.decode().then(()=>(s.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(s.getImageData(0,0,1,1).data.buffer)[0]===0));return q(this,"_isSVGFittingCanvas",r)}getFromFile(t){return I(this,null,function*(){const{lastModified:e,name:s,size:i,type:r}=t;return b(this,Br,lc).call(this,`${e}_${s}_${i}_${r}`,t)})}getFromUrl(t){return I(this,null,function*(){return b(this,Br,lc).call(this,t,t)})}getFromBlob(t,e){return I(this,null,function*(){const s=yield e;return b(this,Br,lc).call(this,t,s)})}getFromId(t){return I(this,null,function*(){n(this,Gt)||p(this,Gt,new Map);const e=n(this,Gt).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:s}=e;return delete e.blobPromise,this.getFromBlob(e.id,s)}return this.getFromUrl(e.url)})}getFromCanvas(t,e){n(this,Gt)||p(this,Gt,new Map);let s=n(this,Gt).get(t);if(s!=null&&s.bitmap)return s.refCounter+=1,s;const i=new OffscreenCanvas(e.width,e.height);return i.getContext("2d").drawImage(e,0,0),s={bitmap:i.transferToImageBitmap(),id:`image_${n(this,Or)}_${Yt(this,jo)._++}`,refCounter:1,isSvg:!1},n(this,Gt).set(t,s),n(this,Gt).set(s.id,s),s}getSvgUrl(t){const e=n(this,Gt).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var i;n(this,Gt)||p(this,Gt,new Map);const e=n(this,Gt).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;const{bitmap:s}=e;if(!e.url&&!e.file){const r=new OffscreenCanvas(s.width,s.height);r.getContext("bitmaprenderer").transferFromImageBitmap(s),e.blobPromise=r.convertToBlob()}(i=s.close)==null||i.call(s),e.bitmap=null}isValidId(t){return t.startsWith(`image_${n(this,Or)}_`)}};Or=new WeakMap,jo=new WeakMap,Gt=new WeakMap,Br=new WeakSet,lc=function(t,e){return I(this,null,function*(){n(this,Gt)||p(this,Gt,new Map);let s=n(this,Gt).get(t);if(s===null)return null;if(s!=null&&s.bitmap)return s.refCounter+=1,s;try{s||(s={bitmap:null,id:`image_${n(this,Or)}_${Yt(this,jo)._++}`,refCounter:0,isSvg:!1});let i;if(typeof e=="string"?(s.url=e,i=yield Lu(e,"blob")):e instanceof File?i=s.file=e:e instanceof Blob&&(i=e),i.type==="image/svg+xml"){const r=wp._isSVGFittingCanvas,a=new FileReader,o=new Image,l=new Promise((h,c)=>{o.onload=()=>{s.bitmap=o,s.isSvg=!0,h()},a.onload=()=>I(this,null,function*(){const f=s.svgUrl=a.result;o.src=(yield r)?`${f}#svgView(preserveAspectRatio(none))`:f}),o.onerror=a.onerror=c});a.readAsDataURL(i),yield l}else s.bitmap=yield createImageBitmap(i);s.refCounter=1}catch(i){U(i),s=null}return n(this,Gt).set(t,s),s&&n(this,Gt).set(s.id,s),s})};let ef=wp;var mt,ai,Wo,ct;class sA{constructor(t=128){u(this,mt,[]);u(this,ai,!1);u(this,Wo,void 0);u(this,ct,-1);p(this,Wo,t)}add({cmd:t,undo:e,post:s,mustExec:i,type:r=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(i&&t(),n(this,ai))return;const l={cmd:t,undo:e,post:s,type:r};if(n(this,ct)===-1){n(this,mt).length>0&&(n(this,mt).length=0),p(this,ct,0),n(this,mt).push(l);return}if(a&&n(this,mt)[n(this,ct)].type===r){o&&(l.undo=n(this,mt)[n(this,ct)].undo),n(this,mt)[n(this,ct)]=l;return}const h=n(this,ct)+1;h===n(this,Wo)?n(this,mt).splice(0,1):(p(this,ct,h),h=0;e--)if(n(this,mt)[e].type!==t){n(this,mt).splice(e+1,n(this,ct)-e),p(this,ct,e);return}n(this,mt).length=0,p(this,ct,-1)}}destroy(){p(this,mt,null)}}mt=new WeakMap,ai=new WeakMap,Wo=new WeakMap,ct=new WeakMap;var Jc,dg;class Jh{constructor(t){u(this,Jc);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=ee.platform;for(const[s,i,r={}]of t)for(const a of s){const o=a.startsWith("mac+");e&&o?(this.callbacks.set(a.slice(4),{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1))):!e&&!o&&(this.callbacks.set(a,{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const s=this.callbacks.get(b(this,Jc,dg).call(this,e));if(!s)return;const{callback:i,options:{bubbles:r=!1,args:a=[],checker:o=null}}=s;o&&!o(t,e)||(i.bind(t,...a,e)(),r||Ee(e))}}Jc=new WeakSet,dg=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e};const Zc=class Zc{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return Zb(t),q(this,"_colors",t)}convert(t){const e=gp(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[s,i]of this._colors)if(i.every((r,a)=>r===e[a]))return Zc._colorsMapping.get(s);return e}getHexCode(t){const e=this._colors.get(t);return e?N.makeHexColor(...e):t}};B(Zc,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let sf=Zc;var Hr,de,_t,It,zr,Ts,$r,xe,oi,nn,Gr,rn,ts,Oe,an,Xo,qo,Vr,Yo,es,li,Ur,hi,ss,td,ci,Ko,di,on,Qo,Jo,xt,tt,Ps,ln,Zo,tl,ui,is,Rs,el,Te,jr,hc,sl,nf,ed,ug,sd,fg,Wr,cc,id,pg,nd,gg,rd,mg,il,rf,ad,bg,nl,af,rl,of,od,Ag,Dt,Kt,Be,Ss,ld,yg,hd,wg,al,lf,cd,vg,hn,wo,ol,hf;const Mr=class Mr{constructor(t,e,s,i,r,a,o,l,h,c,f,g,m){u(this,jr);u(this,sl);u(this,ed);u(this,sd);u(this,Wr);u(this,id);u(this,nd);u(this,rd);u(this,il);u(this,ad);u(this,nl);u(this,rl);u(this,od);u(this,Dt);u(this,Be);u(this,ld);u(this,hd);u(this,al);u(this,cd);u(this,hn);u(this,ol);u(this,Hr,new AbortController);u(this,de,null);u(this,_t,new Map);u(this,It,new Map);u(this,zr,null);u(this,Ts,null);u(this,$r,null);u(this,xe,new sA);u(this,oi,null);u(this,nn,null);u(this,Gr,0);u(this,rn,new Set);u(this,ts,null);u(this,Oe,null);u(this,an,new Set);B(this,"_editorUndoBar",null);u(this,Xo,!1);u(this,qo,!1);u(this,Vr,!1);u(this,Yo,null);u(this,es,null);u(this,li,null);u(this,Ur,null);u(this,hi,!1);u(this,ss,null);u(this,td,new eA);u(this,ci,!1);u(this,Ko,!1);u(this,di,null);u(this,on,null);u(this,Qo,null);u(this,Jo,null);u(this,xt,V.NONE);u(this,tt,new Set);u(this,Ps,null);u(this,ln,null);u(this,Zo,null);u(this,tl,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});u(this,ui,[0,0]);u(this,is,null);u(this,Rs,null);u(this,el,null);u(this,Te,null);const A=this._signal=n(this,Hr).signal;p(this,Rs,t),p(this,el,e),p(this,zr,s),this._eventBus=i,i._on("editingaction",this.onEditingAction.bind(this),{signal:A}),i._on("pagechanging",this.onPageChanging.bind(this),{signal:A}),i._on("scalechanging",this.onScaleChanging.bind(this),{signal:A}),i._on("rotationchanging",this.onRotationChanging.bind(this),{signal:A}),i._on("setpreference",this.onSetPreference.bind(this),{signal:A}),i._on("switchannotationeditorparams",y=>this.updateParams(y.type,y.value),{signal:A}),b(this,id,pg).call(this),b(this,od,Ag).call(this),b(this,il,rf).call(this),p(this,Ts,r.annotationStorage),p(this,Yo,r.filterFactory),p(this,ln,a),p(this,Ur,o||null),p(this,Xo,l),p(this,qo,h),p(this,Vr,c),p(this,Jo,f||null),this.viewParameters={realScale:Vi.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=g||null,this._supportsPinchToZoom=m!==!1}static get _keyboardManager(){const t=Mr.prototype,e=a=>n(a,Rs).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&a.hasSomethingToControl(),s=(a,{target:o})=>{if(o instanceof HTMLInputElement){const{type:l}=o;return l!=="text"&&l!=="number"}return!0},i=this.TRANSLATE_SMALL,r=this.TRANSLATE_BIG;return q(this,"_keyboardManager",new Jh([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:s}],[["ctrl+z","mac+meta+z"],t.undo,{checker:s}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:s}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:s}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,Rs).contains(o)&&!a.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,Rs).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}]]))}destroy(){var t,e,s,i,r;(t=n(this,Te))==null||t.resolve(),p(this,Te,null),(e=n(this,Hr))==null||e.abort(),p(this,Hr,null),this._signal=null;for(const a of n(this,It).values())a.destroy();n(this,It).clear(),n(this,_t).clear(),n(this,an).clear(),p(this,de,null),n(this,tt).clear(),n(this,xe).destroy(),(s=n(this,zr))==null||s.destroy(),(i=n(this,ss))==null||i.hide(),p(this,ss,null),n(this,es)&&(clearTimeout(n(this,es)),p(this,es,null)),n(this,is)&&(clearTimeout(n(this,is)),p(this,is,null)),(r=this._editorUndoBar)==null||r.destroy()}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return n(this,Jo)}get useNewAltTextFlow(){return n(this,qo)}get useNewAltTextWhenAddingImage(){return n(this,Vr)}get hcmFilter(){return q(this,"hcmFilter",n(this,ln)?n(this,Yo).addHCMFilter(n(this,ln).foreground,n(this,ln).background):"none")}get direction(){return q(this,"direction",getComputedStyle(n(this,Rs)).direction)}get highlightColors(){return q(this,"highlightColors",n(this,Ur)?new Map(n(this,Ur).split(",").map(t=>t.split("=").map(e=>e.trim()))):null)}get highlightColorNames(){return q(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),p(this,nn,t)}setMainHighlightColorPicker(t){p(this,Qo,t)}editAltText(t,e=!1){var s;(s=n(this,zr))==null||s.editAltText(this,t,e)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":p(this,Vr,e);break}}onPageChanging({pageNumber:t}){p(this,Gr,t-1)}focusMainContainer(){n(this,Rs).focus()}findParent(t,e){for(const s of n(this,It).values()){const{x:i,y:r,width:a,height:o}=s.div.getBoundingClientRect();if(t>=i&&t<=i+a&&e>=r&&e<=r+o)return s}return null}disableUserSelect(t=!1){n(this,el).classList.toggle("noUserSelect",t)}addShouldRescale(t){n(this,an).add(t)}removeShouldRescale(t){n(this,an).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*Vi.PDF_TO_CSS_UNITS;for(const s of n(this,an))s.onScaleChanging();(e=n(this,nn))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t=""){const e=document.getSelection();if(!e||e.isCollapsed)return;const{anchorNode:s,anchorOffset:i,focusNode:r,focusOffset:a}=e,o=e.toString(),h=b(this,jr,hc).call(this,e).closest(".textLayer"),c=this.getSelectionBoxes(h);if(!c)return;e.empty();const f=b(this,sl,nf).call(this,h),g=n(this,xt)===V.NONE,m=()=>{f==null||f.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:c,anchorNode:s,anchorOffset:i,focusNode:r,focusOffset:a,text:o}),g&&this.showAllEditors("highlight",!0,!0)};if(g){this.switchToMode(V.HIGHLIGHT,m);return}m()}addToAnnotationStorage(t){!t.isEmpty()&&n(this,Ts)&&!n(this,Ts).has(t.id)&&n(this,Ts).setValue(t.id,t)}blur(){if(this.isShiftKeyDown=!1,n(this,hi)&&(p(this,hi,!1),b(this,Wr,cc).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of n(this,tt))if(e.div.contains(t)){p(this,on,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!n(this,on))return;const[t,e]=n(this,on);p(this,on,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){b(this,il,rf).call(this),b(this,nl,af).call(this)}removeEditListeners(){b(this,ad,bg).call(this),b(this,rl,of).call(this)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const s of n(this,Oe))if(s.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const s of n(this,Oe))if(s.isHandlingMimeForPasting(e.type)){s.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var s;if(t.preventDefault(),(s=n(this,de))==null||s.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of n(this,tt)){const r=i.serialize(!0);r&&e.push(r)}e.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}paste(t){return I(this,null,function*(){t.preventDefault();const{clipboardData:e}=t;for(const r of e.items)for(const a of n(this,Oe))if(a.isHandlingMimeForPasting(r.type)){a.paste(r,this.currentLayer);return}let s=e.getData("application/pdfjs");if(!s)return;try{s=JSON.parse(s)}catch(r){U(`paste: "${r.message}".`);return}if(!Array.isArray(s))return;this.unselectAll();const i=this.currentLayer;try{const r=[];for(const l of s){const h=yield i.deserialize(l);if(!h)return;r.push(h)}const a=()=>{for(const l of r)b(this,al,lf).call(this,l);b(this,ol,hf).call(this,r)},o=()=>{for(const l of r)l.remove()};this.addCommands({cmd:a,undo:o,mustExec:!0})}catch(r){U(`paste: "${r.message}".`)}})}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),n(this,xt)!==V.NONE&&!this.isEditorHandlingKeyboard&&Mr._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,n(this,hi)&&(p(this,hi,!1),b(this,Wr,cc).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(t){t?(b(this,nd,gg).call(this),b(this,nl,af).call(this),b(this,Dt,Kt).call(this,{isEditing:n(this,xt)!==V.NONE,isEmpty:b(this,hn,wo).call(this),hasSomethingToUndo:n(this,xe).hasSomethingToUndo(),hasSomethingToRedo:n(this,xe).hasSomethingToRedo(),hasSelectedEditor:!1})):(b(this,rd,mg).call(this),b(this,rl,of).call(this),b(this,Dt,Kt).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!n(this,Oe)){p(this,Oe,t);for(const e of n(this,Oe))b(this,Be,Ss).call(this,e.defaultPropertiesToUpdate)}}getId(){return n(this,td).id}get currentLayer(){return n(this,It).get(n(this,Gr))}getLayer(t){return n(this,It).get(t)}get currentPageIndex(){return n(this,Gr)}addLayer(t){n(this,It).set(t.pageIndex,t),n(this,ci)?t.enable():t.disable()}removeLayer(t){n(this,It).delete(t.pageIndex)}updateMode(t,e=null,s=!1){return I(this,null,function*(){var i;if(n(this,xt)!==t&&!(n(this,Te)&&(yield n(this,Te).promise,!n(this,Te)))){if(p(this,Te,Promise.withResolvers()),p(this,xt,t),t===V.NONE){this.setEditingState(!1),b(this,hd,wg).call(this),(i=this._editorUndoBar)==null||i.hide(),n(this,Te).resolve();return}this.setEditingState(!0),yield b(this,ld,yg).call(this),this.unselectAll();for(const r of n(this,It).values())r.updateMode(t);if(!e){s&&this.addNewEditorFromKeyboard(),n(this,Te).resolve();return}for(const r of n(this,_t).values())r.annotationElementId===e?(this.setSelected(r),r.enterInEditMode()):r.unselect();n(this,Te).resolve()}})}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t!==n(this,xt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,e){var s;if(n(this,Oe)){switch(t){case J.CREATE:this.currentLayer.addNewEditor();return;case J.HIGHLIGHT_DEFAULT_COLOR:(s=n(this,Qo))==null||s.updateColor(e);break;case J.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(n(this,Zo)||p(this,Zo,new Map)).set(t,e),this.showAllEditors("highlight",e);break}for(const i of n(this,tt))i.updateParams(t,e);for(const i of n(this,Oe))i.updateDefaultParams(t,e)}}showAllEditors(t,e,s=!1){var r,a;for(const o of n(this,_t).values())o.editorType===t&&o.show(e);((a=(r=n(this,Zo))==null?void 0:r.get(J.HIGHLIGHT_SHOW_ALL))!=null?a:!0)!==e&&b(this,Be,Ss).call(this,[[J.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(n(this,Ko)!==t){p(this,Ko,t);for(const e of n(this,It).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}getEditors(t){const e=[];for(const s of n(this,_t).values())s.pageIndex===t&&e.push(s);return e}getEditor(t){return n(this,_t).get(t)}addEditor(t){n(this,_t).set(t.id,t)}removeEditor(t){var e;t.div.contains(document.activeElement)&&(n(this,es)&&clearTimeout(n(this,es)),p(this,es,setTimeout(()=>{this.focusMainContainer(),p(this,es,null)},0))),n(this,_t).delete(t.id),this.unselect(t),(!t.annotationElementId||!n(this,rn).has(t.annotationElementId))&&((e=n(this,Ts))==null||e.remove(t.id))}addDeletedAnnotationElement(t){n(this,rn).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return n(this,rn).has(t)}removeDeletedAnnotationElement(t){n(this,rn).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){n(this,de)!==t&&(p(this,de,t),t&&b(this,Be,Ss).call(this,t.propertiesToUpdate))}updateUI(t){n(this,cd,vg)===t&&b(this,Be,Ss).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){b(this,Be,Ss).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(n(this,tt).has(t)){n(this,tt).delete(t),t.unselect(),b(this,Dt,Kt).call(this,{hasSelectedEditor:this.hasSelection});return}n(this,tt).add(t),t.select(),b(this,Be,Ss).call(this,t.propertiesToUpdate),b(this,Dt,Kt).call(this,{hasSelectedEditor:!0})}setSelected(t){var e;(e=n(this,nn))==null||e.commitOrRemove();for(const s of n(this,tt))s!==t&&s.unselect();n(this,tt).clear(),n(this,tt).add(t),t.select(),b(this,Be,Ss).call(this,t.propertiesToUpdate),b(this,Dt,Kt).call(this,{hasSelectedEditor:!0})}isSelected(t){return n(this,tt).has(t)}get firstSelectedEditor(){return n(this,tt).values().next().value}unselect(t){t.unselect(),n(this,tt).delete(t),b(this,Dt,Kt).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return n(this,tt).size!==0}get isEnterHandled(){return n(this,tt).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;n(this,xe).undo(),b(this,Dt,Kt).call(this,{hasSomethingToUndo:n(this,xe).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:b(this,hn,wo).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){n(this,xe).redo(),b(this,Dt,Kt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:n(this,xe).hasSomethingToRedo(),isEmpty:b(this,hn,wo).call(this)})}addCommands(t){n(this,xe).add(t),b(this,Dt,Kt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:b(this,hn,wo).call(this)})}cleanUndoStack(t){n(this,xe).cleanType(t)}delete(){var r;this.commitOrRemove();const t=(r=this.currentLayer)==null?void 0:r.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...n(this,tt)],s=()=>{var a;(a=this._editorUndoBar)==null||a.show(i,e.length===1?e[0].editorType:e.length);for(const o of e)o.remove()},i=()=>{for(const a of e)b(this,al,lf).call(this,a)};this.addCommands({cmd:s,undo:i,mustExec:!0})}commitOrRemove(){var t;(t=n(this,de))==null||t.commitOrRemove()}hasSomethingToControl(){return n(this,de)||this.hasSelection}selectAll(){for(const t of n(this,tt))t.commit();b(this,ol,hf).call(this,n(this,_t).values())}unselectAll(){var t;if(!(n(this,de)&&(n(this,de).commitOrRemove(),n(this,xt)!==V.NONE))&&!((t=n(this,nn))!=null&&t.commitOrRemove())&&this.hasSelection){for(const e of n(this,tt))e.unselect();n(this,tt).clear(),b(this,Dt,Kt).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,s=!1){if(s||this.commitOrRemove(),!this.hasSelection)return;n(this,ui)[0]+=t,n(this,ui)[1]+=e;const[i,r]=n(this,ui),a=[...n(this,tt)],o=1e3;n(this,is)&&clearTimeout(n(this,is)),p(this,is,setTimeout(()=>{p(this,is,null),n(this,ui)[0]=n(this,ui)[1]=0,this.addCommands({cmd:()=>{for(const l of a)n(this,_t).has(l.id)&&l.translateInPage(i,r)},undo:()=>{for(const l of a)n(this,_t).has(l.id)&&l.translateInPage(-i,-r)},mustExec:!1})},o));for(const l of a)l.translateInPage(t,e)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),p(this,ts,new Map);for(const t of n(this,tt))n(this,ts).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!n(this,ts))return!1;this.disableUserSelect(!1);const t=n(this,ts);p(this,ts,null);let e=!1;for(const[{x:i,y:r,pageIndex:a},o]of t)o.newX=i,o.newY=r,o.newPageIndex=a,e||(e=i!==o.savedX||r!==o.savedY||a!==o.savedPageIndex);if(!e)return!1;const s=(i,r,a,o)=>{if(n(this,_t).has(i.id)){const l=n(this,It).get(o);l?i._setParentAndPosition(l,r,a):(i.pageIndex=o,i.x=r,i.y=a)}};return this.addCommands({cmd:()=>{for(const[i,{newX:r,newY:a,newPageIndex:o}]of t)s(i,r,a,o)},undo:()=>{for(const[i,{savedX:r,savedY:a,savedPageIndex:o}]of t)s(i,r,a,o)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(n(this,ts))for(const s of n(this,ts).keys())s.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||n(this,tt).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return n(this,de)===t}getActive(){return n(this,de)}getMode(){return n(this,xt)}get imageManager(){return q(this,"imageManager",new ef)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let h=0,c=e.rangeCount;h({x:(c-i)/a,y:1-(h+f-s)/r,width:g/a,height:f/r});break;case"180":o=(h,c,f,g)=>({x:1-(h+f-s)/r,y:1-(c+g-i)/a,width:f/r,height:g/a});break;case"270":o=(h,c,f,g)=>({x:1-(c+g-i)/a,y:(h-s)/r,width:g/a,height:f/r});break;default:o=(h,c,f,g)=>({x:(h-s)/r,y:(c-i)/a,width:f/r,height:g/a});break}const l=[];for(let h=0,c=e.rangeCount;h{g.type==="pointerup"&&g.button!==0||(h.abort(),l==null||l.toggleDrawing(!0),g.type==="pointerup"&&b(this,Wr,cc).call(this,"main_toolbar"))};window.addEventListener("pointerup",f,{signal:c}),window.addEventListener("blur",f,{signal:c})}},Wr=new WeakSet,cc=function(t=""){n(this,xt)===V.HIGHLIGHT?this.highlightSelection(t):n(this,Xo)&&b(this,ed,ug).call(this)},id=new WeakSet,pg=function(){document.addEventListener("selectionchange",b(this,sd,fg).bind(this),{signal:this._signal})},nd=new WeakSet,gg=function(){if(n(this,li))return;p(this,li,new AbortController);const t=this.combinedSignal(n(this,li));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})},rd=new WeakSet,mg=function(){var t;(t=n(this,li))==null||t.abort(),p(this,li,null)},il=new WeakSet,rf=function(){if(n(this,di))return;p(this,di,new AbortController);const t=this.combinedSignal(n(this,di));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})},ad=new WeakSet,bg=function(){var t;(t=n(this,di))==null||t.abort(),p(this,di,null)},nl=new WeakSet,af=function(){if(n(this,oi))return;p(this,oi,new AbortController);const t=this.combinedSignal(n(this,oi));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})},rl=new WeakSet,of=function(){var t;(t=n(this,oi))==null||t.abort(),p(this,oi,null)},od=new WeakSet,Ag=function(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})},Dt=new WeakSet,Kt=function(t){Object.entries(t).some(([s,i])=>n(this,tl)[s]!==i)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(n(this,tl),t)}),n(this,xt)===V.HIGHLIGHT&&t.hasSelectedEditor===!1&&b(this,Be,Ss).call(this,[[J.HIGHLIGHT_FREE,!0]]))},Be=new WeakSet,Ss=function(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})},ld=new WeakSet,yg=function(){return I(this,null,function*(){if(!n(this,ci)){p(this,ci,!0);const t=[];for(const e of n(this,It).values())t.push(e.enable());yield Promise.all(t);for(const e of n(this,_t).values())e.enable()}})},hd=new WeakSet,wg=function(){if(this.unselectAll(),n(this,ci)){p(this,ci,!1);for(const t of n(this,It).values())t.disable();for(const t of n(this,_t).values())t.disable()}},al=new WeakSet,lf=function(t){const e=n(this,It).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))},cd=new WeakSet,vg=function(){let t=null;for(t of n(this,tt));return t},hn=new WeakSet,wo=function(){if(n(this,_t).size===0)return!0;if(n(this,_t).size===1)for(const t of n(this,_t).values())return t.isEmpty();return!1},ol=new WeakSet,hf=function(t){for(const e of n(this,tt))e.unselect();n(this,tt).clear();for(const e of t)e.isEmpty()||(n(this,tt).add(e),e.select());b(this,Dt,Kt).call(this,{hasSelectedEditor:this.hasSelection})},B(Mr,"TRANSLATE_SMALL",1),B(Mr,"TRANSLATE_BIG",10);let Ar=Mr;var Tt,ns,He,Xr,rs,ue,qr,as,re,ks,cn,os,fi,dn,vo,Yr,dc;const Qt=class Qt{constructor(t){u(this,dn);u(this,Yr);u(this,Tt,null);u(this,ns,!1);u(this,He,null);u(this,Xr,null);u(this,rs,null);u(this,ue,null);u(this,qr,!1);u(this,as,null);u(this,re,null);u(this,ks,null);u(this,cn,null);u(this,os,!1);p(this,re,t),p(this,os,t._uiManager.useNewAltTextFlow),n(Qt,fi)||p(Qt,fi,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){var e;(e=Qt._l10n)!=null||(Qt._l10n=t)}render(){return I(this,null,function*(){const t=p(this,He,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=p(this,Xr,document.createElement("span"));t.append(e),n(this,os)?(t.classList.add("new"),t.setAttribute("data-l10n-id",n(Qt,fi).missing),e.setAttribute("data-l10n-id",n(Qt,fi)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const s=n(this,re)._uiManager._signal;t.addEventListener("contextmenu",Ke,{signal:s}),t.addEventListener("pointerdown",r=>r.stopPropagation(),{signal:s});const i=r=>{r.preventDefault(),n(this,re)._uiManager.editAltText(n(this,re)),n(this,os)&&n(this,re)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:n(this,dn,vo)}})};return t.addEventListener("click",i,{capture:!0,signal:s}),t.addEventListener("keydown",r=>{r.target===t&&r.key==="Enter"&&(p(this,qr,!0),i(r))},{signal:s}),yield b(this,Yr,dc).call(this),t})}finish(){n(this,He)&&(n(this,He).focus({focusVisible:n(this,qr)}),p(this,qr,!1))}isEmpty(){return n(this,os)?n(this,Tt)===null:!n(this,Tt)&&!n(this,ns)}hasData(){return n(this,os)?n(this,Tt)!==null||!!n(this,ks):this.isEmpty()}get guessedText(){return n(this,ks)}setGuessedText(t){return I(this,null,function*(){n(this,Tt)===null&&(p(this,ks,t),p(this,cn,yield Qt._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),b(this,Yr,dc).call(this))})}toggleAltTextBadge(t=!1){var e;if(!n(this,os)||n(this,Tt)){(e=n(this,as))==null||e.remove(),p(this,as,null);return}if(!n(this,as)){const s=p(this,as,document.createElement("div"));s.className="noAltTextBadge",n(this,re).div.append(s)}n(this,as).classList.toggle("hidden",!t)}serialize(t){let e=n(this,Tt);return!t&&n(this,ks)===e&&(e=n(this,cn)),{altText:e,decorative:n(this,ns),guessedText:n(this,ks),textWithDisclaimer:n(this,cn)}}get data(){return{altText:n(this,Tt),decorative:n(this,ns)}}set data({altText:t,decorative:e,guessedText:s,textWithDisclaimer:i,cancel:r=!1}){s&&(p(this,ks,s),p(this,cn,i)),!(n(this,Tt)===t&&n(this,ns)===e)&&(r||(p(this,Tt,t),p(this,ns,e)),b(this,Yr,dc).call(this))}toggle(t=!1){n(this,He)&&(!t&&n(this,ue)&&(clearTimeout(n(this,ue)),p(this,ue,null)),n(this,He).disabled=!t)}shown(){n(this,re)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:n(this,dn,vo)}})}destroy(){var t,e;(t=n(this,He))==null||t.remove(),p(this,He,null),p(this,Xr,null),p(this,rs,null),(e=n(this,as))==null||e.remove(),p(this,as,null)}};Tt=new WeakMap,ns=new WeakMap,He=new WeakMap,Xr=new WeakMap,rs=new WeakMap,ue=new WeakMap,qr=new WeakMap,as=new WeakMap,re=new WeakMap,ks=new WeakMap,cn=new WeakMap,os=new WeakMap,fi=new WeakMap,dn=new WeakSet,vo=function(){return n(this,Tt)&&"added"||n(this,Tt)===null&&this.guessedText&&"review"||"missing"},Yr=new WeakSet,dc=function(){return I(this,null,function*(){var i,r,a;const t=n(this,He);if(!t)return;if(n(this,os)){if(t.classList.toggle("done",!!n(this,Tt)),t.setAttribute("data-l10n-id",n(Qt,fi)[n(this,dn,vo)]),(i=n(this,Xr))==null||i.setAttribute("data-l10n-id",n(Qt,fi)[`${n(this,dn,vo)}-label`]),!n(this,Tt)){(r=n(this,rs))==null||r.remove();return}}else{if(!n(this,Tt)&&!n(this,ns)){t.classList.remove("done"),(a=n(this,rs))==null||a.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=n(this,rs);if(!e){p(this,rs,e=document.createElement("span")),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${n(this,re).id}`;const o=100,l=n(this,re)._uiManager._signal;l.addEventListener("abort",()=>{clearTimeout(n(this,ue)),p(this,ue,null)},{once:!0}),t.addEventListener("mouseenter",()=>{p(this,ue,setTimeout(()=>{p(this,ue,null),n(this,rs).classList.add("show"),n(this,re)._reportTelemetry({action:"alt_text_tooltip"})},o))},{signal:l}),t.addEventListener("mouseleave",()=>{var h;n(this,ue)&&(clearTimeout(n(this,ue)),p(this,ue,null)),(h=n(this,rs))==null||h.classList.remove("show")},{signal:l})}n(this,ns)?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=n(this,Tt)),e.parentNode||t.append(e);const s=n(this,re).getImageForAltText();s==null||s.setAttribute("aria-describedby",e.id)})},u(Qt,fi,null),B(Qt,"_l10n",null);let Bc=Qt;var ll,un,hl,cl,dl,ul,fl,Kr,Ms,fn,pi,dd,_g,ud,Sg,pl,cf;const vp=class vp{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:s=null,onPinchStart:i=null,onPinching:r=null,onPinchEnd:a=null,signal:o}){u(this,dd);u(this,ud);u(this,pl);u(this,ll,void 0);u(this,un,!1);u(this,hl,null);u(this,cl,void 0);u(this,dl,void 0);u(this,ul,void 0);u(this,fl,void 0);u(this,Kr,void 0);u(this,Ms,null);u(this,fn,void 0);u(this,pi,null);p(this,ll,t),p(this,hl,s),p(this,cl,e),p(this,dl,i),p(this,ul,r),p(this,fl,a),p(this,fn,new AbortController),p(this,Kr,AbortSignal.any([o,n(this,fn).signal])),t.addEventListener("touchstart",b(this,dd,_g).bind(this),{passive:!1,signal:n(this,Kr)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return q(this,"MIN_TOUCH_DISTANCE_TO_PINCH",35/(window.devicePixelRatio||1))}destroy(){var t;(t=n(this,fn))==null||t.abort(),p(this,fn,null)}};ll=new WeakMap,un=new WeakMap,hl=new WeakMap,cl=new WeakMap,dl=new WeakMap,ul=new WeakMap,fl=new WeakMap,Kr=new WeakMap,Ms=new WeakMap,fn=new WeakMap,pi=new WeakMap,dd=new WeakSet,_g=function(t){var i,r,a;if((i=n(this,cl))!=null&&i.call(this)||t.touches.length<2)return;if(!n(this,pi)){p(this,pi,new AbortController);const o=AbortSignal.any([n(this,Kr),n(this,pi).signal]),l=n(this,ll),h={signal:o,passive:!1};l.addEventListener("touchmove",b(this,ud,Sg).bind(this),h),l.addEventListener("touchend",b(this,pl,cf).bind(this),h),l.addEventListener("touchcancel",b(this,pl,cf).bind(this),h),(r=n(this,dl))==null||r.call(this)}if(Ee(t),t.touches.length!==2||(a=n(this,hl))!=null&&a.call(this)){p(this,Ms,null);return}let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]),p(this,Ms,{touch0X:e.screenX,touch0Y:e.screenY,touch1X:s.screenX,touch1Y:s.screenY})},ud=new WeakSet,Sg=function(t){var S;if(!n(this,Ms)||t.touches.length!==2)return;let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]);const{screenX:i,screenY:r}=e,{screenX:a,screenY:o}=s,l=n(this,Ms),{touch0X:h,touch0Y:c,touch1X:f,touch1Y:g}=l,m=f-h,A=g-c,y=a-i,v=o-r,w=Math.hypot(y,v)||1,_=Math.hypot(m,A)||1;if(!n(this,un)&&Math.abs(_-w)<=vp.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=i,l.touch0Y=r,l.touch1X=a,l.touch1Y=o,t.preventDefault(),!n(this,un)){p(this,un,!0);return}const E=[(i+a)/2,(r+o)/2];(S=n(this,ul))==null||S.call(this,E,_,w)},pl=new WeakSet,cf=function(t){var e;n(this,pi).abort(),p(this,pi,null),(e=n(this,fl))==null||e.call(this),n(this,Ms)&&(t.preventDefault(),p(this,Ms,null),p(this,un,!1))};let Hc=vp;var pn,ze,at,Qr,gi,gl,gn,Ft,mn,Ls,mi,ml,bn,fe,bl,An,Is,ls,Jr,Zr,Pe,yn,Al,fd,yl,df,wl,uf,ta,uc,pd,Eg,gd,Cg,vl,ff,ea,fc,_l,pf,md,xg,bd,Tg,Ad,Pg,Sl,gf,yd,Rg,El,mf,wd,kg,vd,Mg,_d,Lg,Cl,bf,wn,_o;const j=class j{constructor(t){u(this,yl);u(this,ta);u(this,pd);u(this,gd);u(this,vl);u(this,ea);u(this,_l);u(this,md);u(this,bd);u(this,Ad);u(this,Sl);u(this,yd);u(this,El);u(this,wd);u(this,vd);u(this,_d);u(this,Cl);u(this,wn);u(this,pn,null);u(this,ze,null);u(this,at,null);u(this,Qr,!1);u(this,gi,null);u(this,gl,"");u(this,gn,!1);u(this,Ft,null);u(this,mn,null);u(this,Ls,null);u(this,mi,null);u(this,ml,"");u(this,bn,!1);u(this,fe,null);u(this,bl,!1);u(this,An,!1);u(this,Is,!1);u(this,ls,null);u(this,Jr,0);u(this,Zr,0);u(this,Pe,null);u(this,yn,null);B(this,"_editToolbar",null);B(this,"_initialOptions",Object.create(null));B(this,"_initialData",null);B(this,"_isVisible",!0);B(this,"_uiManager",null);B(this,"_focusEventsAllowed",!0);u(this,Al,!1);u(this,fd,j._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:e,rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[r,a];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=j.prototype._resizeWithKeyboard,e=Ar.TRANSLATE_SMALL,s=Ar.TRANSLATE_BIG;return q(this,"_resizerKeyboardManager",new Jh([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-s,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[s,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-s]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,s]}],[["Escape","mac+Escape"],j.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get isDrawer(){return!1}static get _defaultLineColor(){return q(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new iA({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){var i;if((i=j._l10n)!=null||(j._l10n=t),j._l10nResizer||(j._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),j._borderLineWidth!==-1)return;const s=getComputedStyle(document.documentElement);j._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){rt("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return n(this,Al)}set _isDraggable(t){var e;p(this,Al,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=n(this,fd)}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):b(this,wn,_o).call(this),this.parent=t}focusin(t){this._focusEventsAllowed&&(n(this,bn)?p(this,bn,!1):this.parent.setSelected(this))}focusout(t){var s;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(s=this.parent)!=null&&s.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,s,i){const[r,a]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(t+s)/r,this.y=(e+i)/a,this.fixAndSetPosition()}translate(t,e){b(this,yl,df).call(this,this.parentDimensions,t,e)}translateInPage(t,e){n(this,fe)||p(this,fe,[this.x,this.y,this.width,this.height]),b(this,yl,df).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){n(this,fe)||p(this,fe,[this.x,this.y,this.width,this.height]);const{div:s,parentDimensions:[i,r]}=this;if(this.x+=t/i,this.y+=e/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:f,y:g}=this.div.getBoundingClientRect();this.parent.findNewParent(this,f,g)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:a,y:o}=this;const[l,h]=this.getBaseTranslation();a+=l,o+=h;const{style:c}=s;c.left=`${(100*a).toFixed(2)}%`,c.top=`${(100*o).toFixed(2)}%`,this._onTranslating(a,o),s.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!n(this,fe)&&(n(this,fe)[0]!==this.x||n(this,fe)[1]!==this.y)}get _hasBeenResized(){return!!n(this,fe)&&(n(this,fe)[2]!==this.width||n(this,fe)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:s}=j,i=s/t,r=s/e;switch(this.rotation){case 90:return[-i,r];case 180:return[i,r];case 270:return[i,-r];default:return[-i,-r]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[s,i]}=this;let{x:r,y:a,width:o,height:l}=this;if(o*=s,l*=i,r*=s,a*=i,this._mustFixPosition)switch(t){case 0:r=Math.max(0,Math.min(s-o,r)),a=Math.max(0,Math.min(i-l,a));break;case 90:r=Math.max(0,Math.min(s-l,r)),a=Math.min(i,Math.max(o,a));break;case 180:r=Math.min(s,Math.max(o,r)),a=Math.min(i,Math.max(l,a));break;case 270:r=Math.min(s,Math.max(l,r)),a=Math.max(0,Math.min(i-o,a));break}this.x=r/=s,this.y=a/=i;const[h,c]=this.getBaseTranslation();r+=h,a+=c,e.left=`${(100*r).toFixed(2)}%`,e.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var s;return b(s=j,wl,uf).call(s,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var s;return b(s=j,wl,uf).call(s,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,s]}=this;return[e*t,s*t]}setDims(t,e){const[s,i]=this.parentDimensions,{style:r}=this.div;r.width=`${(100*t/s).toFixed(2)}%`,n(this,gn)||(r.height=`${(100*e/i).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:e,width:s}=t,i=s.endsWith("%"),r=!n(this,gn)&&e.endsWith("%");if(i&&r)return;const[a,o]=this.parentDimensions;i||(t.width=`${(100*parseFloat(s)/a).toFixed(2)}%`),!n(this,gn)&&!r&&(t.height=`${(100*parseFloat(e)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=n(this,at))==null||t.finish()}addEditToolbar(){return I(this,null,function*(){return this._editToolbar||n(this,An)?this._editToolbar:(this._editToolbar=new Zu(this),this.div.append(this._editToolbar.render()),n(this,at)&&(yield this._editToolbar.addAltText(n(this,at))),this._editToolbar)})}removeEditToolbar(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(t=n(this,at))==null||t.destroy())}addContainer(t){var s;const e=(s=this._editToolbar)==null?void 0:s.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}addAltTextButton(){return I(this,null,function*(){n(this,at)||(Bc.initialize(j._l10n),p(this,at,new Bc(this)),n(this,pn)&&(n(this,at).data=n(this,pn),p(this,pn,null)),yield this.addEditToolbar())})}get altTextData(){var t;return(t=n(this,at))==null?void 0:t.data}set altTextData(t){n(this,at)&&(n(this,at).data=t)}get guessedAltText(){var t;return(t=n(this,at))==null?void 0:t.guessedText}setGuessedAltText(t){return I(this,null,function*(){var e;yield(e=n(this,at))==null?void 0:e.setGuessedText(t)})}serializeAltText(t){var e;return(e=n(this,at))==null?void 0:e.serialize(t)}hasAltText(){return!!n(this,at)&&!n(this,at).isEmpty()}hasAltTextData(){var t,e;return(e=(t=n(this,at))==null?void 0:t.hasData())!=null?e:!1}render(){var r;this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=n(this,Qr)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),b(this,El,mf).call(this);const[t,e]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*e/t).toFixed(2)}%`,this.div.style.maxHeight=`${(100*t/e).toFixed(2)}%`);const[s,i]=this.getInitialTranslation();return this.translate(s,i),Oc(this,this.div,["pointerdown"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(n(this,yn)||p(this,yn,new Hc({container:this.div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:b(this,md,xg).bind(this),onPinching:b(this,bd,Tg).bind(this),onPinchEnd:b(this,Ad,Pg).bind(this),signal:this._uiManager._signal}))),(r=this._uiManager._editorUndoBar)==null||r.hide(),this.div}pointerdown(t){const{isMac:e}=ee.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(p(this,bn,!0),this._isDraggable){b(this,yd,Rg).call(this,t);return}b(this,Sl,gf).call(this,t)}get isSelected(){return this._uiManager.isSelected(this)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){n(this,ls)&&clearTimeout(n(this,ls)),p(this,ls,setTimeout(()=>{var t;p(this,ls,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,s){t.changeParent(this),this.x=e,this.y=s,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,s=this.rotation){const i=this.parentScale,[r,a]=this.pageDimensions,[o,l]=this.pageTranslation,h=t/i,c=e/i,f=this.x*r,g=this.y*a,m=this.width*r,A=this.height*a;switch(s){case 0:return[f+h+o,a-g-c-A+l,f+h+m+o,a-g-c+l];case 90:return[f+c+o,a-g+h+l,f+c+A+o,a-g+h+m+l];case 180:return[f-h-m+o,a-g+c+l,f-h+o,a-g+c+A+l];case 270:return[f-c-A+o,a-g-h-m+l,f-c+o,a-g-h+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[s,i,r,a]=t,o=r-s,l=a-i;switch(this.rotation){case 0:return[s,e-a,o,l];case 90:return[s,e-i,l,o];case 180:return[r,e-i,o,l];case 270:return[r,e-a,l,o];default:throw new Error("Invalid rotation")}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){p(this,An,!0)}disableEditMode(){p(this,An,!1)}isInEditMode(){return n(this,An)}shouldGetKeyboardEvents(){return n(this,Is)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:s,right:i}=this.getClientDimensions(),{innerHeight:r,innerWidth:a}=window;return e0&&t0}rebuild(){b(this,El,mf).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){rt("An editor must be serializable")}static deserialize(t,e,s){return I(this,null,function*(){const i=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:s});i.rotation=t.rotation,p(i,pn,t.accessibilityData);const[r,a]=i.pageDimensions,[o,l,h,c]=i.getRectInCurrentCoords(t.rect,a);return i.x=o/r,i.y=l/a,i.width=h/r,i.height=c/a,i})}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e;if((t=n(this,mi))==null||t.abort(),p(this,mi,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),n(this,ls)&&(clearTimeout(n(this,ls)),p(this,ls,null)),b(this,wn,_o).call(this),this.removeEditToolbar(),n(this,Pe)){for(const s of n(this,Pe).values())clearTimeout(s);p(this,Pe,null)}this.parent=null,(e=n(this,yn))==null||e.destroy(),p(this,yn,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(b(this,pd,Eg).call(this),n(this,Ft).classList.remove("hidden"),Oc(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),p(this,Ls,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=n(this,Ft).children;if(!n(this,ze)){p(this,ze,Array.from(e));const a=b(this,wd,kg).bind(this),o=b(this,vd,Mg).bind(this),l=this._uiManager._signal;for(const h of n(this,ze)){const c=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",a,{signal:l}),h.addEventListener("blur",o,{signal:l}),h.addEventListener("focus",b(this,_d,Lg).bind(this,c),{signal:l}),h.setAttribute("data-l10n-id",j._l10nResizer[c])}}const s=n(this,ze)[0];let i=0;for(const a of e){if(a===s)break;i++}const r=(360-this.rotation+this.parentRotation)%360/90*(n(this,ze).length/4);if(r!==i){if(ri)for(let o=0;o{var i,r;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((r=this._editToolbar)==null||r.show())});return}(e=this._editToolbar)==null||e.show(),(s=n(this,at))==null||s.toggleAltTextBadge(!1)}unselect(){var t,e,s,i,r;(t=n(this,Ft))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(s=this.div)!=null&&s.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(r=n(this,at))==null||r.toggleAltTextBadge(!0)}updateParams(t,e){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return n(this,bl)}set isEditing(t){p(this,bl,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){p(this,gn,!0);const s=t/e,{style:i}=this.div;i.aspectRatio=s,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){n(this,Pe)||p(this,Pe,new Map);const{action:s}=t;let i=n(this,Pe).get(s);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(t),n(this,Pe).delete(s),n(this,Pe).size===0&&p(this,Pe,null)},j._telemetryTimeout),n(this,Pe).set(s,i);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),p(this,Qr,!1)}disable(){this.div&&(this.div.tabIndex=-1),p(this,Qr,!0)}renderAnnotationElement(t){let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const s=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),s.before(e)}return e}resetAnnotationElement(t){const{firstChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};pn=new WeakMap,ze=new WeakMap,at=new WeakMap,Qr=new WeakMap,gi=new WeakMap,gl=new WeakMap,gn=new WeakMap,Ft=new WeakMap,mn=new WeakMap,Ls=new WeakMap,mi=new WeakMap,ml=new WeakMap,bn=new WeakMap,fe=new WeakMap,bl=new WeakMap,An=new WeakMap,Is=new WeakMap,ls=new WeakMap,Jr=new WeakMap,Zr=new WeakMap,Pe=new WeakMap,yn=new WeakMap,Al=new WeakMap,fd=new WeakMap,yl=new WeakSet,df=function([t,e],s,i){[s,i]=this.screenToPageTranslation(s,i),this.x+=s/t,this.y+=i/e,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},wl=new WeakSet,uf=function(t,e,s){switch(s){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},ta=new WeakSet,uc=function(t){switch(t){case 90:{const[e,s]=this.pageDimensions;return[0,-e/s,s/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,s]=this.pageDimensions;return[0,e/s,-s/e,0]}default:return[1,0,0,1]}},pd=new WeakSet,Eg=function(){if(n(this,Ft))return;p(this,Ft,document.createElement("div")),n(this,Ft).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const s of t){const i=document.createElement("div");n(this,Ft).append(i),i.classList.add("resizer",s),i.setAttribute("data-resizer-name",s),i.addEventListener("pointerdown",b(this,gd,Cg).bind(this,s),{signal:e}),i.addEventListener("contextmenu",Ke,{signal:e}),i.tabIndex=-1}this.div.prepend(n(this,Ft))},gd=new WeakSet,Cg=function(t,e){var c;e.preventDefault();const{isMac:s}=ee.platform;if(e.button!==0||e.ctrlKey&&s)return;(c=n(this,at))==null||c.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,p(this,mn,[e.screenX,e.screenY]);const r=new AbortController,a=this._uiManager.combinedSignal(r);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",b(this,_l,pf).bind(this,t),{passive:!0,capture:!0,signal:a}),window.addEventListener("touchmove",Ee,{passive:!1,signal:a}),window.addEventListener("contextmenu",Ke,{signal:a}),p(this,Ls,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const o=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const h=()=>{var f;r.abort(),this.parent.togglePointerEvents(!0),(f=n(this,at))==null||f.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=o,this.div.style.cursor=l,b(this,ea,fc).call(this)};window.addEventListener("pointerup",h,{signal:a}),window.addEventListener("blur",h,{signal:a})},vl=new WeakSet,ff=function(t,e,s,i){this.width=s,this.height=i,this.x=t,this.y=e;const[r,a]=this.parentDimensions;this.setDims(r*s,a*i),this.fixAndSetPosition(),this._onResized()},ea=new WeakSet,fc=function(){if(!n(this,Ls))return;const{savedX:t,savedY:e,savedWidth:s,savedHeight:i}=n(this,Ls);p(this,Ls,null);const r=this.x,a=this.y,o=this.width,l=this.height;r===t&&a===e&&o===s&&l===i||this.addCommands({cmd:b(this,vl,ff).bind(this,r,a,o,l),undo:b(this,vl,ff).bind(this,t,e,s,i),mustExec:!0})},_l=new WeakSet,pf=function(t,e){const[s,i]=this.parentDimensions,r=this.x,a=this.y,o=this.width,l=this.height,h=j.MIN_SIZE/s,c=j.MIN_SIZE/i,f=b(this,ta,uc).call(this,this.rotation),g=(k,P)=>[f[0]*k+f[2]*P,f[1]*k+f[3]*P],m=b(this,ta,uc).call(this,360-this.rotation),A=(k,P)=>[m[0]*k+m[2]*P,m[1]*k+m[3]*P];let y,v,w=!1,_=!1;switch(t){case"topLeft":w=!0,y=(k,P)=>[0,0],v=(k,P)=>[k,P];break;case"topMiddle":y=(k,P)=>[k/2,0],v=(k,P)=>[k/2,P];break;case"topRight":w=!0,y=(k,P)=>[k,0],v=(k,P)=>[0,P];break;case"middleRight":_=!0,y=(k,P)=>[k,P/2],v=(k,P)=>[0,P/2];break;case"bottomRight":w=!0,y=(k,P)=>[k,P],v=(k,P)=>[0,0];break;case"bottomMiddle":y=(k,P)=>[k/2,P],v=(k,P)=>[k/2,0];break;case"bottomLeft":w=!0,y=(k,P)=>[0,P],v=(k,P)=>[k,0];break;case"middleLeft":_=!0,y=(k,P)=>[0,P/2],v=(k,P)=>[k,P/2];break}const E=y(o,l),S=v(o,l);let C=g(...S);const T=j._round(r+C[0]),x=j._round(a+C[1]);let R=1,O=1,G,H;if(e.fromKeyboard)({deltaX:G,deltaY:H}=e);else{const{screenX:k,screenY:P}=e,[D,Y]=n(this,mn);[G,H]=this.screenToPageTranslation(k-D,P-Y),n(this,mn)[0]=k,n(this,mn)[1]=P}if([G,H]=A(G/s,H/i),w){const k=Math.hypot(o,l);R=O=Math.max(Math.min(Math.hypot(S[0]-E[0]-G,S[1]-E[1]-H)/k,1/o,1/l),h/o,c/l)}else _?R=Math.max(h,Math.min(1,Math.abs(S[0]-E[0]-G)))/o:O=Math.max(c,Math.min(1,Math.abs(S[1]-E[1]-H)))/l;const nt=j._round(o*R),ot=j._round(l*O);C=g(...v(nt,ot));const Z=T-C[0],Et=x-C[1];n(this,fe)||p(this,fe,[this.x,this.y,this.width,this.height]),this.width=nt,this.height=ot,this.x=Z,this.y=Et,this.setDims(s*nt,i*ot),this.fixAndSetPosition(),this._onResizing()},md=new WeakSet,xg=function(){var t;p(this,Ls,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(t=n(this,at))==null||t.toggle(!1),this.parent.togglePointerEvents(!1)},bd=new WeakSet,Tg=function(t,e,s){let r=.7*(s/e)+1-.7;if(r===1)return;const a=b(this,ta,uc).call(this,this.rotation),o=(T,x)=>[a[0]*T+a[2]*x,a[1]*T+a[3]*x],[l,h]=this.parentDimensions,c=this.x,f=this.y,g=this.width,m=this.height,A=j.MIN_SIZE/l,y=j.MIN_SIZE/h;r=Math.max(Math.min(r,1/g,1/m),A/g,y/m);const v=j._round(g*r),w=j._round(m*r);if(v===g&&w===m)return;n(this,fe)||p(this,fe,[c,f,g,m]);const _=o(g/2,m/2),E=j._round(c+_[0]),S=j._round(f+_[1]),C=o(v/2,w/2);this.x=E-C[0],this.y=S-C[1],this.width=v,this.height=w,this.setDims(l*v,h*w),this.fixAndSetPosition(),this._onResizing()},Ad=new WeakSet,Pg=function(){var t;(t=n(this,at))==null||t.toggle(!0),this.parent.togglePointerEvents(!0),b(this,ea,fc).call(this)},Sl=new WeakSet,gf=function(t){const{isMac:e}=ee.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},yd=new WeakSet,Rg=function(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let s=!1;const i=new AbortController,r=this._uiManager.combinedSignal(i),a={capture:!0,passive:!1,signal:r},o=h=>{i.abort(),p(this,gi,null),p(this,bn,!1),this._uiManager.endDragSession()||b(this,Sl,gf).call(this,h),s&&this._onStopDragging()};e&&(p(this,Jr,t.clientX),p(this,Zr,t.clientY),p(this,gi,t.pointerId),p(this,gl,t.pointerType),window.addEventListener("pointermove",h=>{s||(s=!0,this._onStartDragging());const{clientX:c,clientY:f,pointerId:g}=h;if(g!==n(this,gi)){Ee(h);return}const[m,A]=this.screenToPageTranslation(c-n(this,Jr),f-n(this,Zr));p(this,Jr,c),p(this,Zr,f),this._uiManager.dragSelectedEditors(m,A)},a),window.addEventListener("touchmove",Ee,a),window.addEventListener("pointerdown",h=>{h.pointerType===n(this,gl)&&(n(this,yn)||h.isPrimary)&&o(h),Ee(h)},a));const l=h=>{if(!n(this,gi)||n(this,gi)===h.pointerId){o(h);return}Ee(h)};window.addEventListener("pointerup",l,{signal:r}),window.addEventListener("blur",l,{signal:r})},El=new WeakSet,mf=function(){if(n(this,mi)||!this.div)return;p(this,mi,new AbortController);const t=this._uiManager.combinedSignal(n(this,mi));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},wd=new WeakSet,kg=function(t){j._resizerKeyboardManager.exec(this,t)},vd=new WeakSet,Mg=function(t){var e;n(this,Is)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==n(this,Ft)&&b(this,wn,_o).call(this)},_d=new WeakSet,Lg=function(t){p(this,ml,n(this,Is)?t:"")},Cl=new WeakSet,bf=function(t){if(n(this,ze))for(const e of n(this,ze))e.tabIndex=t},wn=new WeakSet,_o=function(){p(this,Is,!1),b(this,Cl,bf).call(this,-1),b(this,ea,fc).call(this)},u(j,wl),B(j,"_l10n",null),B(j,"_l10nResizer",null),B(j,"_borderLineWidth",-1),B(j,"_colorManager",new sf),B(j,"_zIndex",1),B(j,"_telemetryTimeout",1e3);let ut=j;class iA extends ut{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Fp=3285377520,Ce=4294901760,Je=65535;class Ig{constructor(t){this.h1=t?t&4294967295:Fp,this.h2=t?t&4294967295:Fp}update(t){let e,s;if(typeof t=="string"){e=new Uint8Array(t.length*2),s=0;for(let y=0,v=t.length;y>>8,e[s++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),s=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=s>>2,r=s-i*4,a=new Uint32Array(e.buffer,0,i);let o=0,l=0,h=this.h1,c=this.h2;const f=3432918353,g=461845907,m=f&Je,A=g&Je;for(let y=0;y>>17,o=o*g&Ce|o*A&Je,h^=o,h=h<<13|h>>>19,h=h*5+3864292196):(l=a[y],l=l*f&Ce|l*m&Je,l=l<<15|l>>>17,l=l*g&Ce|l*A&Je,c^=l,c=c<<13|c>>>19,c=c*5+3864292196);switch(o=0,r){case 3:o^=e[i*4+2]<<16;case 2:o^=e[i*4+1]<<8;case 1:o^=e[i*4],o=o*f&Ce|o*m&Je,o=o<<15|o>>>17,o=o*g&Ce|o*A&Je,i&1?h^=o:c^=o}this.h1=h,this.h2=c}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&Ce|t*36045&Je,e=e*4283543511&Ce|((e<<16|t>>>16)*2950163797&Ce)>>>16,t^=e>>>1,t=t*444984403&Ce|t*60499&Je,e=e*3301882366&Ce|((e<<16|t>>>16)*3120437893&Ce)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const Af=Object.freeze({map:null,hash:"",transfer:void 0});var vn,_n,Pt,Sd,Dg;class mp{constructor(){u(this,Sd);u(this,vn,!1);u(this,_n,null);u(this,Pt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const s=n(this,Pt).get(t);return s===void 0?e:Object.assign(e,s)}getRawValue(t){return n(this,Pt).get(t)}remove(t){if(n(this,Pt).delete(t),n(this,Pt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const e of n(this,Pt).values())if(e instanceof ut)return;this.onAnnotationEditor(null)}}setValue(t,e){const s=n(this,Pt).get(t);let i=!1;if(s!==void 0)for(const[r,a]of Object.entries(e))s[r]!==a&&(i=!0,s[r]=a);else i=!0,n(this,Pt).set(t,e);i&&b(this,Sd,Dg).call(this),e instanceof ut&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(e.constructor._type)}has(t){return n(this,Pt).has(t)}getAll(){return n(this,Pt).size>0?cp(n(this,Pt)):null}setAll(t){for(const[e,s]of Object.entries(t))this.setValue(e,s)}get size(){return n(this,Pt).size}resetModified(){n(this,vn)&&(p(this,vn,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new Fg(this)}get serializable(){if(n(this,Pt).size===0)return Af;const t=new Map,e=new Ig,s=[],i=Object.create(null);let r=!1;for(const[a,o]of n(this,Pt)){const l=o instanceof ut?o.serialize(!1,i):o;l&&(t.set(a,l),e.update(`${a}:${JSON.stringify(l)}`),r||(r=!!l.bitmap))}if(r)for(const a of t.values())a.bitmap&&s.push(a.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:s}:Af}get editorStats(){var s;let t=null;const e=new Map;for(const i of n(this,Pt).values()){if(!(i instanceof ut))continue;const r=i.telemetryFinalData;if(!r)continue;const{type:a}=r;e.has(a)||e.set(a,Object.getPrototypeOf(i).constructor),t||(t=Object.create(null));const o=t[a]||(t[a]=new Map);for(const[l,h]of Object.entries(r)){if(l==="type")continue;let c=o.get(l);c||(c=new Map,o.set(l,c));const f=(s=c.get(h))!=null?s:0;c.set(h,f+1)}}for(const[i,r]of e)t[i]=r.computeTelemetryFinalData(t[i]);return t}resetModifiedIds(){p(this,_n,null)}get modifiedIds(){if(n(this,_n))return n(this,_n);const t=[];for(const e of n(this,Pt).values())!(e instanceof ut)||!e.annotationElementId||!e.serialize()||t.push(e.annotationElementId);return p(this,_n,{ids:new Set(t),hash:t.join(",")})}}vn=new WeakMap,_n=new WeakMap,Pt=new WeakMap,Sd=new WeakSet,Dg=function(){n(this,vn)||(p(this,vn,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var xl;class Fg extends mp{constructor(e){super();u(this,xl,void 0);const{map:s,hash:i,transfer:r}=e.serializable,a=structuredClone(s,r?{transfer:r}:null);p(this,xl,{map:a,hash:i,transfer:r})}get print(){rt("Should not call PrintAnnotationStorage.print")}get serializable(){return n(this,xl)}get modifiedIds(){return q(this,"modifiedIds",{ids:new Set,hash:""})}}xl=new WeakMap;var sa;class nA{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){u(this,sa,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),n(this,sa).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}loadSystemFont(s){return I(this,arguments,function*({systemFontInfo:t,_inspectFont:e}){if(!(!t||n(this,sa).has(t.loadedName))){if(wt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:r,style:a}=t,o=new FontFace(i,r,a);this.addNativeFontFace(o);try{yield o.load(),n(this,sa).add(i),e==null||e(t)}catch(l){U(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}rt("Not implemented: loadSystemFont without the Font Loading API.")}})}bind(t){return I(this,null,function*(){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){yield this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const s=t.createNativeFontFace();if(s){this.addNativeFontFace(s);try{yield s.loaded}catch(i){throw U(`Failed to load font '${s.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;yield new Promise(s=>{const i=this._queueLoadingCallback(s);this._prepareFontLoadEvent(t,i)})}})}get isFontLoadingAPISupported(){var e;const t=!!((e=this._document)!=null&&e.fonts);return q(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(Xt||typeof navigator!="undefined"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),q(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){function e(){for(wt(!i.done,"completeRequest() cannot be called twice."),i.done=!0;s.length>0&&s[0].done;){const r=s.shift();setTimeout(r.callback,0)}}const{loadingRequests:s}=this,i={done:!1,complete:e,callback:t};return s.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return q(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function s(S,C){return S.charCodeAt(C)<<24|S.charCodeAt(C+1)<<16|S.charCodeAt(C+2)<<8|S.charCodeAt(C+3)&255}function i(S,C,T,x){const R=S.substring(0,C),O=S.substring(C+T);return R+x+O}let r,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function c(S,C){if(++h>30){U("Load test font never loaded."),C();return}if(l.font="30px "+S,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){C();return}setTimeout(c.bind(null,S,C))}const f=`lt${Date.now()}${this.loadTestFontId++}`;let g=this._loadTestFont;g=i(g,976,f.length,f);const A=16,y=1482184792;let v=s(g,A);for(r=0,a=f.length-3;r{E.remove(),e.complete()})}}sa=new WeakMap;class rA{constructor(t,{disableFontFace:e=!1,fontExtraProperties:s=!1,inspectFont:i=null}){this.compiledGlyphs=Object.create(null);for(const r in t)this[r]=t[r];this.disableFontFace=e===!0,this.fontExtraProperties=s===!0,this._inspectFont=i}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const s={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(s.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,s)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var s;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${Yb(this.data)});`;let e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${t}}`}return(s=this._inspectFont)==null||s.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const s=this.loadedName+"_path_"+e;let i;try{i=t.get(s)}catch(a){U(`getPathGenerator - ignoring character: "${a}".`)}const r=new Path2D(i||"");return this.fontExtraProperties||t.delete(s),this.compiledGlyphs[e]=r}}const ec={DATA:1,ERROR:2},yt={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function Np(){}function ie(d){if(d instanceof Gi||d instanceof Ku||d instanceof No||d instanceof Lp||d instanceof Nc||d instanceof Gu)return d;switch(d instanceof Error||typeof d=="object"&&d!==null||rt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),d.name){case"AbortException":return new Gi(d.message);case"InvalidPDFException":return new Ku(d.message);case"MissingPDFException":return new No(d.message);case"PasswordException":return new Lp(d.message,d.code);case"UnexpectedResponseException":return new Nc(d.message,d.status);case"UnknownErrorException":return new Gu(d.message,d.details)}return new Gu(d.message,d.toString())}var ia,Ed,Ng,Cd,Og,xd,Bg,na,pc;class So{constructor(t,e,s){u(this,Ed);u(this,Cd);u(this,xd);u(this,na);u(this,ia,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),s.addEventListener("message",b(this,Ed,Ng).bind(this),{signal:n(this,ia).signal})}on(t,e){const s=this.actionHandler;if(s[t])throw new Error(`There is already an actionName called "${t}"`);s[t]=e}send(t,e,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},s)}sendWithPromise(t,e,s){const i=this.callbackId++,r=Promise.withResolvers();this.callbackCapabilities[i]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},s)}catch(a){r.reject(a)}return r.promise}sendWithStream(t,e,s,i){const r=this.streamId++,a=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:h=>{const c=Promise.withResolvers();return this.streamControllers[r]={controller:h,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:a,targetName:o,action:t,streamId:r,data:e,desiredSize:h.desiredSize},i),c.promise},pull:h=>{const c=Promise.withResolvers();return this.streamControllers[r].pullCall=c,l.postMessage({sourceName:a,targetName:o,stream:yt.PULL,streamId:r,desiredSize:h.desiredSize}),c.promise},cancel:h=>{wt(h instanceof Error,"cancel must have a valid reason");const c=Promise.withResolvers();return this.streamControllers[r].cancelCall=c,this.streamControllers[r].isClosed=!0,l.postMessage({sourceName:a,targetName:o,stream:yt.CANCEL,streamId:r,reason:ie(h)}),c.promise}},s)}destroy(){var t;(t=n(this,ia))==null||t.abort(),p(this,ia,null)}}ia=new WeakMap,Ed=new WeakSet,Ng=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){b(this,xd,Bg).call(this,t);return}if(t.callback){const s=t.callbackId,i=this.callbackCapabilities[s];if(!i)throw new Error(`Cannot resolve callback ${s}`);if(delete this.callbackCapabilities[s],t.callback===ec.DATA)i.resolve(t.data);else if(t.callback===ec.ERROR)i.reject(ie(t.reason));else throw new Error("Unexpected callback case");return}const e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const s=this.sourceName,i=t.sourceName,r=this.comObj;Promise.try(e,t.data).then(function(a){r.postMessage({sourceName:s,targetName:i,callback:ec.DATA,callbackId:t.callbackId,data:a})},function(a){r.postMessage({sourceName:s,targetName:i,callback:ec.ERROR,callbackId:t.callbackId,reason:ie(a)})});return}if(t.streamId){b(this,Cd,Og).call(this,t);return}e(t.data)},Cd=new WeakSet,Og=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this,o=this.actionHandler[t.action],l={enqueue(h,c=1,f){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=c,g>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),r.postMessage({sourceName:s,targetName:i,stream:yt.ENQUEUE,streamId:e,chunk:h},f)},close(){this.isCancelled||(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.CLOSE,streamId:e}),delete a.streamSinks[e])},error(h){wt(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.ERROR,streamId:e,reason:ie(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[e]=l,Promise.try(o,t.data,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,reason:ie(h)})})},xd=new WeakSet,Bg=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this.streamControllers[e],o=this.streamSinks[e];switch(t.stream){case yt.START_COMPLETE:t.success?a.startCall.resolve():a.startCall.reject(ie(t.reason));break;case yt.PULL_COMPLETE:t.success?a.pullCall.resolve():a.pullCall.reject(ie(t.reason));break;case yt.PULL:if(!o){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,Promise.try(o.onPull||Np).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,reason:ie(h)})});break;case yt.ENQUEUE:if(wt(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case yt.CLOSE:if(wt(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),b(this,na,pc).call(this,a,e);break;case yt.ERROR:wt(a,"error should have stream controller"),a.controller.error(ie(t.reason)),b(this,na,pc).call(this,a,e);break;case yt.CANCEL_COMPLETE:t.success?a.cancelCall.resolve():a.cancelCall.reject(ie(t.reason)),b(this,na,pc).call(this,a,e);break;case yt.CANCEL:if(!o)break;const l=ie(t.reason);Promise.try(o.onCancel||Np,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,reason:ie(h)})}),o.sinkCapability.reject(l),o.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},na=new WeakSet,pc=function(t,e){return I(this,null,function*(){var s,i,r;yield Promise.allSettled([(s=t.startCall)==null?void 0:s.promise,(i=t.pullCall)==null?void 0:i.promise,(r=t.cancelCall)==null?void 0:r.promise]),delete this.streamControllers[e]})};var Tl;class Hg{constructor({enableHWA:t=!1}){u(this,Tl,!1);p(this,Tl,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(t,e);return{canvas:s,context:s.getContext("2d",{willReadFrequently:!n(this,Tl)})}}reset(t,e,s){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||s<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=s}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){rt("Abstract method `_createCanvas` called.")}}Tl=new WeakMap;class aA extends Hg{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const s=this._document.createElement("canvas");return s.width=t,s.height=e,s}}class zg{constructor({baseUrl:t=null,isCompressed:e=!0}){this.baseUrl=t,this.isCompressed=e}fetch(e){return I(this,arguments,function*({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const s=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(s).then(i=>({cMapData:i,isCompressed:this.isCompressed})).catch(i=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${s}`)})})}_fetch(t){return I(this,null,function*(){rt("Abstract method `_fetch` called.")})}}class $g extends zg{_fetch(t){return I(this,null,function*(){const e=yield Lu(t,this.isCompressed?"arraybuffer":"text");return e instanceof ArrayBuffer?new Uint8Array(e):Mu(e)})}}class Gg{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,s,i,r){return"none"}destroy(t=!1){}}var Sn,ra,Ds,Fs,Vt,En,Cn,Rt,zt,xn,Eo,bi,Sr,aa,gc,Ai,Er,Td,Vg,Pl,yf,yi,Cr,Tn,Co,Pn,xo,Rl,wf,Rn,To;class oA extends Gg{constructor({docId:e,ownerDocument:s=globalThis.document}){super();u(this,Rt);u(this,xn);u(this,bi);u(this,aa);u(this,Ai);u(this,Td);u(this,Pl);u(this,yi);u(this,Tn);u(this,Pn);u(this,Rl);u(this,Rn);u(this,Sn,void 0);u(this,ra,void 0);u(this,Ds,void 0);u(this,Fs,void 0);u(this,Vt,void 0);u(this,En,void 0);u(this,Cn,0);p(this,Fs,e),p(this,Vt,s)}addFilter(e){if(!e)return"none";let s=n(this,Rt,zt).get(e);if(s)return s;const[i,r,a]=b(this,aa,gc).call(this,e),o=e.length===1?i:`${i}${r}${a}`;if(s=n(this,Rt,zt).get(o),s)return n(this,Rt,zt).set(e,s),s;const l=`g_${n(this,Fs)}_transfer_map_${Yt(this,Cn)._++}`,h=b(this,Ai,Er).call(this,l);n(this,Rt,zt).set(e,h),n(this,Rt,zt).set(o,h);const c=b(this,yi,Cr).call(this,l);return b(this,Pn,xo).call(this,i,r,a,c),h}addHCMFilter(e,s){var A;const i=`${e}-${s}`,r="base";let a=n(this,xn,Eo).get(r);if((a==null?void 0:a.key)===i||(a?((A=a.filter)==null||A.remove(),a.key=i,a.url="none",a.filter=null):(a={key:i,url:"none",filter:null},n(this,xn,Eo).set(r,a)),!e||!s))return a.url;const o=b(this,Rn,To).call(this,e);e=N.makeHexColor(...o);const l=b(this,Rn,To).call(this,s);if(s=N.makeHexColor(...l),n(this,bi,Sr).style.color="",e==="#000000"&&s==="#ffffff"||e===s)return a.url;const h=new Array(256);for(let y=0;y<=255;y++){const v=y/255;h[y]=v<=.03928?v/12.92:fo((v+.055)/1.055,2.4)}const c=h.join(","),f=`g_${n(this,Fs)}_hcm_filter`,g=a.filter=b(this,yi,Cr).call(this,f);b(this,Pn,xo).call(this,c,c,c,g),b(this,Pl,yf).call(this,g);const m=(y,v)=>{const w=o[y]/255,_=l[y]/255,E=new Array(v+1);for(let S=0;S<=v;S++)E[S]=w+S/v*(_-w);return E.join(",")};return b(this,Pn,xo).call(this,m(0,5),m(1,5),m(2,5),g),a.url=b(this,Ai,Er).call(this,f),a.url}addAlphaFilter(e){let s=n(this,Rt,zt).get(e);if(s)return s;const[i]=b(this,aa,gc).call(this,[e]),r=`alpha_${i}`;if(s=n(this,Rt,zt).get(r),s)return n(this,Rt,zt).set(e,s),s;const a=`g_${n(this,Fs)}_alpha_map_${Yt(this,Cn)._++}`,o=b(this,Ai,Er).call(this,a);n(this,Rt,zt).set(e,o),n(this,Rt,zt).set(r,o);const l=b(this,yi,Cr).call(this,a);return b(this,Rl,wf).call(this,i,l),o}addLuminosityFilter(e){let s=n(this,Rt,zt).get(e||"luminosity");if(s)return s;let i,r;if(e?([i]=b(this,aa,gc).call(this,[e]),r=`luminosity_${i}`):r="luminosity",s=n(this,Rt,zt).get(r),s)return n(this,Rt,zt).set(e,s),s;const a=`g_${n(this,Fs)}_luminosity_map_${Yt(this,Cn)._++}`,o=b(this,Ai,Er).call(this,a);n(this,Rt,zt).set(e,o),n(this,Rt,zt).set(r,o);const l=b(this,yi,Cr).call(this,a);return b(this,Td,Vg).call(this,l),e&&b(this,Rl,wf).call(this,i,l),o}addHighlightHCMFilter(e,s,i,r,a){var _;const o=`${s}-${i}-${r}-${a}`;let l=n(this,xn,Eo).get(e);if((l==null?void 0:l.key)===o||(l?((_=l.filter)==null||_.remove(),l.key=o,l.url="none",l.filter=null):(l={key:o,url:"none",filter:null},n(this,xn,Eo).set(e,l)),!s||!i))return l.url;const[h,c]=[s,i].map(b(this,Rn,To).bind(this));let f=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),g=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[m,A]=[r,a].map(b(this,Rn,To).bind(this));g{const T=new Array(256),x=(g-f)/C,R=E/255,O=(S-E)/(255*C);let G=0;for(let H=0;H<=C;H++){const nt=Math.round(f+H*x),ot=R+H*O;for(let Z=G;Z<=nt;Z++)T[Z]=ot;G=nt+1}for(let H=G;H<256;H++)T[H]=T[G-1];return T.join(",")},v=`g_${n(this,Fs)}_hcm_${e}_filter`,w=l.filter=b(this,yi,Cr).call(this,v);return b(this,Pl,yf).call(this,w),b(this,Pn,xo).call(this,y(m[0],A[0],5),y(m[1],A[1],5),y(m[2],A[2],5),w),l.url=b(this,Ai,Er).call(this,v),l.url}destroy(e=!1){var s,i,r,a;e&&((s=n(this,En))!=null&&s.size)||((i=n(this,Ds))==null||i.parentNode.parentNode.remove(),p(this,Ds,null),(r=n(this,ra))==null||r.clear(),p(this,ra,null),(a=n(this,En))==null||a.clear(),p(this,En,null),p(this,Cn,0))}}Sn=new WeakMap,ra=new WeakMap,Ds=new WeakMap,Fs=new WeakMap,Vt=new WeakMap,En=new WeakMap,Cn=new WeakMap,Rt=new WeakSet,zt=function(){return n(this,ra)||p(this,ra,new Map)},xn=new WeakSet,Eo=function(){return n(this,En)||p(this,En,new Map)},bi=new WeakSet,Sr=function(){if(!n(this,Ds)){const e=n(this,Vt).createElement("div"),{style:s}=e;s.visibility="hidden",s.contain="strict",s.width=s.height=0,s.position="absolute",s.top=s.left=0,s.zIndex=-1;const i=n(this,Vt).createElementNS(_s,"svg");i.setAttribute("width",0),i.setAttribute("height",0),p(this,Ds,n(this,Vt).createElementNS(_s,"defs")),e.append(i),i.append(n(this,Ds)),n(this,Vt).body.append(e)}return n(this,Ds)},aa=new WeakSet,gc=function(e){if(e.length===1){const h=e[0],c=new Array(256);for(let g=0;g<256;g++)c[g]=h[g]/255;const f=c.join(",");return[f,f,f]}const[s,i,r]=e,a=new Array(256),o=new Array(256),l=new Array(256);for(let h=0;h<256;h++)a[h]=s[h]/255,o[h]=i[h]/255,l[h]=r[h]/255;return[a.join(","),o.join(","),l.join(",")]},Ai=new WeakSet,Er=function(e){if(n(this,Sn)===void 0){p(this,Sn,"");const s=n(this,Vt).URL;s!==n(this,Vt).baseURI&&(Iu(s)?U('#createUrl: ignore "data:"-URL for performance reasons.'):p(this,Sn,s.split("#",1)[0]))}return`url(${n(this,Sn)}#${e})`},Td=new WeakSet,Vg=function(e){const s=n(this,Vt).createElementNS(_s,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(s)},Pl=new WeakSet,yf=function(e){const s=n(this,Vt).createElementNS(_s,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(s)},yi=new WeakSet,Cr=function(e){const s=n(this,Vt).createElementNS(_s,"filter");return s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("id",e),n(this,bi,Sr).append(s),s},Tn=new WeakSet,Co=function(e,s,i){const r=n(this,Vt).createElementNS(_s,s);r.setAttribute("type","discrete"),r.setAttribute("tableValues",i),e.append(r)},Pn=new WeakSet,xo=function(e,s,i,r){const a=n(this,Vt).createElementNS(_s,"feComponentTransfer");r.append(a),b(this,Tn,Co).call(this,a,"feFuncR",e),b(this,Tn,Co).call(this,a,"feFuncG",s),b(this,Tn,Co).call(this,a,"feFuncB",i)},Rl=new WeakSet,wf=function(e,s){const i=n(this,Vt).createElementNS(_s,"feComponentTransfer");s.append(i),b(this,Tn,Co).call(this,i,"feFuncA",e)},Rn=new WeakSet,To=function(e){return n(this,bi,Sr).style.color=e,gp(getComputedStyle(n(this,bi,Sr)).getPropertyValue("color"))};class Ug{constructor({baseUrl:t=null}){this.baseUrl=t}fetch(e){return I(this,arguments,function*({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const s=`${this.baseUrl}${t}`;return this._fetch(s).catch(i=>{throw new Error(`Unable to load font data at: ${s}`)})})}_fetch(t){return I(this,null,function*(){rt("Abstract method `_fetch` called.")})}}class jg extends Ug{_fetch(t){return I(this,null,function*(){const e=yield Lu(t,"arraybuffer");return new Uint8Array(e)})}}Xt&&U("Please use the `legacy` build in Node.js environments.");function Wg(d){return I(this,null,function*(){const e=yield process.getBuiltinModule("fs").promises.readFile(d);return new Uint8Array(e)})}class lA extends Gg{}class hA extends Hg{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t,e)}}class cA extends zg{_fetch(t){return I(this,null,function*(){return Wg(t)})}}class dA extends Ug{_fetch(t){return I(this,null,function*(){return Wg(t)})}}const Wt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function vf(d,t){if(!t)return;const e=t[2]-t[0],s=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],e,s),d.clip(i)}class bp{getPattern(){rt("Abstract method `getPattern` called.")}}class uA extends bp{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;this._type==="axial"?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const s of this._colorStops)e.addColorStop(s[0],s[1]);return e}getPattern(t,e,s,i){let r;if(i===Wt.STROKE||i===Wt.FILL){const a=e.current.getClippedPathBoundingBox(i,ht(t))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,l=Math.ceil(a[3]-a[1])||1,h=e.cachedCanvases.getCanvas("pattern",o,l),c=h.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-a[0],-a[1]),s=N.transform(s,[1,0,0,1,a[0],a[1]]),c.transform(...e.baseTransform),this.matrix&&c.transform(...this.matrix),vf(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),r=t.createPattern(h.canvas,"no-repeat");const f=new DOMMatrix(s);r.setTransform(f)}else vf(t,this._bbox),r=this._createGradient(t);return r}}function ju(d,t,e,s,i,r,a,o){const l=t.coords,h=t.colors,c=d.data,f=d.width*4;let g;l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g),l[s+1]>l[i+1]&&(g=s,s=i,i=g,g=a,a=o,o=g),l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g);const m=(l[e]+t.offsetX)*t.scaleX,A=(l[e+1]+t.offsetY)*t.scaleY,y=(l[s]+t.offsetX)*t.scaleX,v=(l[s+1]+t.offsetY)*t.scaleY,w=(l[i]+t.offsetX)*t.scaleX,_=(l[i+1]+t.offsetY)*t.scaleY;if(A>=_)return;const E=h[r],S=h[r+1],C=h[r+2],T=h[a],x=h[a+1],R=h[a+2],O=h[o],G=h[o+1],H=h[o+2],nt=Math.round(A),ot=Math.round(_);let Z,Et,k,P,D,Y,W,$;for(let gt=nt;gt<=ot;gt++){if(gt_?K=1:v===_?K=0:K=(v-gt)/(v-_),Z=y-(y-w)*K,Et=T-(T-O)*K,k=x-(x-G)*K,P=R-(R-H)*K}let st;gt_?st=1:st=(A-gt)/(A-_),D=m-(m-w)*st,Y=E-(E-O)*st,W=S-(S-G)*st,$=C-(C-H)*st;const ys=Math.round(Math.min(Z,D)),ws=Math.round(Math.max(Z,D));let Ct=f*gt+ys*4;for(let K=ys;K<=ws;K++)st=(Z-K)/(Z-D),st<0?st=0:st>1&&(st=1),c[Ct++]=Et-(Et-Y)*st|0,c[Ct++]=k-(k-W)*st|0,c[Ct++]=P-(P-$)*st|0,c[Ct++]=255}}function fA(d,t,e){const s=t.coords,i=t.colors;let r,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(s.length/o)-1,h=o-1;for(r=0;r=G?S=l:T=!0,O>=H?C=h:x=!0;const nt=this.getSizeAndScale(S,this.ctx.canvas.width,_),ot=this.getSizeAndScale(C,this.ctx.canvas.height,E),Z=t.cachedCanvases.getCanvas("pattern",nt.size,ot.size),Et=Z.context,k=o.createCanvasGraphics(Et);if(k.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(k,i,a),Et.translate(-nt.scale*c,-ot.scale*f),k.transform(nt.scale,0,0,ot.scale,0,0),Et.save(),this.clipBbox(k,c,f,g,m),k.baseTransform=ht(k.ctx),k.executeOperatorList(s),k.endDrawing(),Et.restore(),T||x){const P=Z.canvas;T&&(S=l),x&&(C=h);const D=this.getSizeAndScale(S,this.ctx.canvas.width,_),Y=this.getSizeAndScale(C,this.ctx.canvas.height,E),W=D.size,$=Y.size,gt=t.cachedCanvases.getCanvas("pattern-workaround",W,$),st=gt.context,ys=T?Math.floor(A/l):0,ws=x?Math.floor(y/h):0;for(let Ct=0;Ct<=ys;Ct++)for(let K=0;K<=ws;K++)st.drawImage(P,W*Ct,$*K,W,$,0,0,W,$);return{canvas:gt.canvas,scaleX:D.scale,scaleY:Y.scale,offsetX:c,offsetY:f}}return{canvas:Z.canvas,scaleX:nt.scale,scaleY:ot.scale,offsetX:c,offsetY:f}}getSizeAndScale(t,e,s){const i=Math.max(Pd.MAX_PATTERN_SIZE,e);let r=Math.ceil(t*s);return r>=i?r=i:s=r/t,{scale:s,size:r}}clipBbox(t,e,s,i,r){const a=i-e,o=r-s;t.ctx.rect(e,s,a,o),t.current.updateRectMinMax(ht(t.ctx),[e,s,i,r]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,s){const i=t.ctx,r=t.current;switch(e){case Op.COLORED:const a=this.ctx;i.fillStyle=a.fillStyle,i.strokeStyle=a.strokeStyle,r.fillColor=a.fillStyle,r.strokeColor=a.strokeStyle;break;case Op.UNCOLORED:const o=N.makeHexColor(s[0],s[1],s[2]);i.fillStyle=o,i.strokeStyle=o,r.fillColor=o,r.strokeColor=o;break;default:throw new Gb(`Unsupported paint type: ${e}`)}}getPattern(t,e,s,i){let r=s;i!==Wt.SHADING&&(r=N.transform(r,e.baseTransform),this.matrix&&(r=N.transform(r,this.matrix)));const a=this.createPatternCanvas(e);let o=new DOMMatrix(r);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return l.setTransform(o),l}};B(Pd,"MAX_PATTERN_SIZE",3e3);let _f=Pd;function bA({src:d,srcPos:t=0,dest:e,width:s,height:i,nonBlackColor:r=4294967295,inverseDecode:a=!1}){const o=ee.isLittleEndian?4278190080:255,[l,h]=a?[r,o]:[o,r],c=s>>3,f=s&7,g=d.length;e=new Uint32Array(e.buffer);let m=0;for(let A=0;A{d.save=d.__originalSave,d.restore=d.__originalRestore,d.rotate=d.__originalRotate,d.scale=d.__originalScale,d.translate=d.__originalTranslate,d.transform=d.__originalTransform,d.setTransform=d.__originalSetTransform,d.resetTransform=d.__originalResetTransform,d.clip=d.__originalClip,d.moveTo=d.__originalMoveTo,d.lineTo=d.__originalLineTo,d.bezierCurveTo=d.__originalBezierCurveTo,d.rect=d.__originalRect,d.closePath=d.__originalClosePath,d.beginPath=d.__originalBeginPath,delete d._removeMirroring},d.save=function(){t.save(),this.__originalSave()},d.restore=function(){t.restore(),this.__originalRestore()},d.translate=function(s,i){t.translate(s,i),this.__originalTranslate(s,i)},d.scale=function(s,i){t.scale(s,i),this.__originalScale(s,i)},d.transform=function(s,i,r,a,o,l){t.transform(s,i,r,a,o,l),this.__originalTransform(s,i,r,a,o,l)},d.setTransform=function(s,i,r,a,o,l){t.setTransform(s,i,r,a,o,l),this.__originalSetTransform(s,i,r,a,o,l)},d.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},d.rotate=function(s){t.rotate(s),this.__originalRotate(s)},d.clip=function(s){t.clip(s),this.__originalClip(s)},d.moveTo=function(e,s){t.moveTo(e,s),this.__originalMoveTo(e,s)},d.lineTo=function(e,s){t.lineTo(e,s),this.__originalLineTo(e,s)},d.bezierCurveTo=function(e,s,i,r,a,o){t.bezierCurveTo(e,s,i,r,a,o),this.__originalBezierCurveTo(e,s,i,r,a,o)},d.rect=function(e,s,i,r){t.rect(e,s,i,r),this.__originalRect(e,s,i,r)},d.closePath=function(){t.closePath(),this.__originalClosePath()},d.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class wA{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,s){let i;return this.cache[t]!==void 0?(i=this.cache[t],this.canvasFactory.reset(i,e,s)):(i=this.canvasFactory.create(e,s),this.cache[t]=i),i}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function sc(d,t,e,s,i,r,a,o,l,h){const[c,f,g,m,A,y]=ht(d);if(f===0&&g===0){const _=a*c+A,E=Math.round(_),S=o*m+y,C=Math.round(S),T=(a+l)*c+A,x=Math.abs(Math.round(T)-E)||1,R=(o+h)*m+y,O=Math.abs(Math.round(R)-C)||1;return d.setTransform(Math.sign(c),0,0,Math.sign(m),E,C),d.drawImage(t,e,s,i,r,0,0,x,O),d.setTransform(c,f,g,m,A,y),[x,O]}if(c===0&&m===0){const _=o*g+A,E=Math.round(_),S=a*f+y,C=Math.round(S),T=(o+h)*g+A,x=Math.abs(Math.round(T)-E)||1,R=(a+l)*f+y,O=Math.abs(Math.round(R)-C)||1;return d.setTransform(0,Math.sign(f),Math.sign(g),0,E,C),d.drawImage(t,e,s,i,r,0,0,O,x),d.setTransform(c,f,g,m,A,y),[O,x]}d.drawImage(t,e,s,i,r,a,o,l,h);const v=Math.hypot(c,f),w=Math.hypot(g,m);return[v*l,w*h]}function vA(d){const{width:t,height:e}=d;if(t>$p||e>$p)return null;const s=1e3,i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),r=t+1;let a=new Uint8Array(r*(e+1)),o,l,h;const c=t+7&-8;let f=new Uint8Array(c*e),g=0;for(const w of d.data){let _=128;for(;_>0;)f[g++]=w&_?0:255,_>>=1}let m=0;for(g=0,f[g]!==0&&(a[0]=1,++m),l=1;l>2)+(f[g+1]?4:0)+(f[g-c+1]?8:0),i[w]&&(a[h+l]=i[w],++m),g++;if(f[g-c]!==f[g]&&(a[h+l]=f[g]?2:4,++m),m>s)return null}for(g=c*(e-1),h=o*r,f[g]!==0&&(a[h]=8,++m),l=1;ls)return null;const A=new Int32Array([0,r,-1,0,-r,0,0,0,1]),y=new Path2D;for(o=0;m&&o<=e;o++){let w=o*r;const _=w+t;for(;w<_&&!a[w];)w++;if(w===_)continue;y.moveTo(w%r,o);const E=w;let S=a[w];do{const C=A[S];do w+=C;while(!a[w]);const T=a[w];T!==5&&T!==10?(S=T,a[w]=0):(S=T&51*S>>4,a[w]&=S>>2|S<<2),y.lineTo(w%r,w/r|0),a[w]||--m}while(E!==w);--o}return f=null,a=null,function(w){w.save(),w.scale(1/t,-1/e),w.translate(0,-e),w.fill(y),w.beginPath(),w.restore()}}class Gp{constructor(t,e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=sg,this.textMatrixScale=1,this.fontMatrix=Yu,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=Ht.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,t,e])}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,e){this.x=t,this.y=e}updatePathMinMax(t,e,s){[e,s]=N.applyTransform([e,s],t),this.minX=Math.min(this.minX,e),this.minY=Math.min(this.minY,s),this.maxX=Math.max(this.maxX,e),this.maxY=Math.max(this.maxY,s)}updateRectMinMax(t,e){const s=N.applyTransform(e,t),i=N.applyTransform(e.slice(2),t),r=N.applyTransform([e[0],e[3]],t),a=N.applyTransform([e[2],e[1]],t);this.minX=Math.min(this.minX,s[0],i[0],r[0],a[0]),this.minY=Math.min(this.minY,s[1],i[1],r[1],a[1]),this.maxX=Math.max(this.maxX,s[0],i[0],r[0],a[0]),this.maxY=Math.max(this.maxY,s[1],i[1],r[1],a[1])}updateScalingPathMinMax(t,e){N.scaleMinMax(t,e),this.minX=Math.min(this.minX,e[0]),this.minY=Math.min(this.minY,e[1]),this.maxX=Math.max(this.maxX,e[2]),this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,s,i,r,a,o,l,h,c){const f=N.bezierBoundingBox(e,s,i,r,a,o,l,h,c);c||this.updateRectMinMax(t,f)}getPathBoundingBox(t=Wt.FILL,e=null){const s=[this.minX,this.minY,this.maxX,this.maxY];if(t===Wt.STROKE){e||rt("Stroke bounding box must include transform.");const i=N.singularValueDecompose2dScale(e),r=i[0]*this.lineWidth/2,a=i[1]*this.lineWidth/2;s[0]-=r,s[1]-=a,s[2]+=r,s[3]+=a}return s}updateClipFromPath(){const t=N.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(t=Wt.FILL,e=null){return N.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function Vp(d,t){if(t instanceof ImageData){d.putImageData(t,0,0);return}const e=t.height,s=t.width,i=e%he,r=(e-i)/he,a=i===0?r:r+1,o=d.createImageData(s,he);let l=0,h;const c=t.data,f=o.data;let g,m,A,y;if(t.kind===rc.GRAYSCALE_1BPP){const v=c.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),_=w.length,E=s+7>>3,S=4294967295,C=ee.isLittleEndian?4278190080:255;for(g=0;gE?s:T*8-7,O=R&-8;let G=0,H=0;for(;x>=1}for(;h<_;)w[h++]=0;d.putImageData(o,0,g*he)}}else if(t.kind===rc.RGBA_32BPP){for(m=0,y=s*he*4,g=0;g=r&&(A=i,y=s*A),h=0,m=y;m--;)f[h++]=c[l++],f[h++]=c[l++],f[h++]=c[l++],f[h++]=255;d.putImageData(o,0,g*he)}else throw new Error(`bad image kind: ${t.kind}`)}function Up(d,t){if(t.bitmap){d.drawImage(t.bitmap,0,0);return}const e=t.height,s=t.width,i=e%he,r=(e-i)/he,a=i===0?r:r+1,o=d.createImageData(s,he);let l=0;const h=t.data,c=o.data;for(let f=0;fzp&&typeof s=="function",c=h?Date.now()+AA:0;let f=0;const g=this.commonObjs,m=this.objs;let A;for(;;){if(i!==void 0&&o===i.nextBreakPoint)return i.breakIt(o,s),o;if(A=a[o],A!==Fe.dependency)this[A].apply(this,r[o]);else for(const y of r[o]){const v=y.startsWith("g_")?g:m;if(!v.has(y))return v.get(y,s),o}if(o++,o===l)return o;if(h&&++f>zp){if(Date.now()>c)return s(),o;f=0}}}endDrawing(){b(this,kl,Sf).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),b(this,Ml,Ef).call(this)}_scaleImage(t,e){var g,m;const s=(g=t.width)!=null?g:t.displayWidth,i=(m=t.height)!=null?m:t.displayHeight;let r=Math.max(Math.hypot(e[0],e[1]),1),a=Math.max(Math.hypot(e[2],e[3]),1),o=s,l=i,h="prescale1",c,f;for(;r>2&&o>1||a>2&&l>1;){let A=o,y=l;r>2&&o>1&&(A=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),r/=o/A),a>2&&l>1&&(y=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,a/=l/y),c=this.cachedCanvases.getCanvas(h,A,y),f=c.context,f.clearRect(0,0,A,y),f.drawImage(t,0,0,o,l,0,0,A,y),t=c.canvas,o=A,l=y,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:o,paintHeight:l}}_createMaskCanvas(t){const e=this.ctx,{width:s,height:i}=t,r=this.current.fillColor,a=this.current.patternFill,o=ht(e);let l,h,c,f;if((t.bitmap||t.data)&&t.count>1){const R=t.bitmap||t.data.buffer;h=JSON.stringify(a?o:[o.slice(0,4),r]),l=this._cachedBitmapsMap.get(R),l||(l=new Map,this._cachedBitmapsMap.set(R,l));const O=l.get(h);if(O&&!a){const G=Math.round(Math.min(o[0],o[2])+o[4]),H=Math.round(Math.min(o[1],o[3])+o[5]);return{canvas:O,offsetX:G,offsetY:H}}c=O}c||(f=this.cachedCanvases.getCanvas("maskCanvas",s,i),Up(f.context,t));let g=N.transform(o,[1/s,0,0,-1/i,0,0]);g=N.transform(g,[1,0,0,1,0,-i]);const[m,A,y,v]=N.getAxialAlignedBoundingBox([0,0,s,i],g),w=Math.round(y-m)||1,_=Math.round(v-A)||1,E=this.cachedCanvases.getCanvas("fillCanvas",w,_),S=E.context,C=m,T=A;S.translate(-C,-T),S.transform(...g),c||(c=this._scaleImage(f.canvas,Qe(S)),c=c.img,l&&a&&l.set(h,c)),S.imageSmoothingEnabled=jp(ht(S),t.interpolate),sc(S,c,0,0,c.width,c.height,0,0,s,i),S.globalCompositeOperation="source-in";const x=N.transform(Qe(S),[1,0,0,1,-C,-T]);return S.fillStyle=a?r.getPattern(e,this,x,Wt.FILL):r,S.fillRect(0,0,s,i),l&&!a&&(this.cachedCanvases.delete("fillCanvas"),l.set(h,E.canvas)),{canvas:E.canvas,offsetX:Math.round(C),offsetY:Math.round(T)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=_A[t]}setLineJoin(t){this.ctx.lineJoin=SA[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){const s=this.ctx;s.setLineDash!==void 0&&(s.setLineDash(t),s.lineDashOffset=e)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,s]of t)switch(e){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s[0],s[1]);break;case"CA":this.current.strokeAlpha=s;break;case"ca":this.current.fillAlpha=s,this.ctx.globalAlpha=s;break;case"BM":this.ctx.globalCompositeOperation=s;break;case"SMask":this.current.activeSMask=s?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(s);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,e=this.ctx.canvas.height,s="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(s,t,e);this.suspendedCtx=this.ctx,this.ctx=i.context;const r=this.ctx;r.setTransform(...ht(this.suspendedCtx)),go(this.suspendedCtx,r),yA(r,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),go(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,s=this.suspendedCtx;this.composeSMask(s,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,s,i){const r=i[0],a=i[1],o=i[2]-r,l=i[3]-a;o===0||l===0||(this.genericComposeSMask(e.context,s,o,l,e.subtype,e.backdrop,e.transferMap,r,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(s.canvas,0,0),t.restore())}genericComposeSMask(t,e,s,i,r,a,o,l,h,c,f){let g=t.canvas,m=l-c,A=h-f;if(a){const v=N.makeHexColor(...a);if(m<0||A<0||m+s>g.width||A+i>g.height){const w=this.cachedCanvases.getCanvas("maskExtension",s,i),_=w.context;_.drawImage(g,-m,-A),_.globalCompositeOperation="destination-atop",_.fillStyle=v,_.fillRect(0,0,s,i),_.globalCompositeOperation="source-over",g=w.canvas,m=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const w=new Path2D;w.rect(m,A,s,i),t.clip(w),t.globalCompositeOperation="destination-atop",t.fillStyle=v,t.fillRect(m,A,s,i),t.restore()}}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),r==="Alpha"&&o?e.filter=this.filterFactory.addAlphaFilter(o):r==="Luminosity"&&(e.filter=this.filterFactory.addLuminosityFilter(o));const y=new Path2D;y.rect(l,h,s,i),e.clip(y),e.globalCompositeOperation="destination-in",e.drawImage(g,m,A,s,i,l,h,s,i),e.restore()}save(){this.inSMaskMode?(go(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),go(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,s,i,r,a){this.ctx.transform(t,e,s,i,r,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,s){const i=this.ctx,r=this.current;let a=r.x,o=r.y,l,h;const c=ht(i),f=c[0]===0&&c[3]===0||c[1]===0&&c[2]===0,g=f?s.slice(0):null;for(let m=0,A=0,y=t.length;mHp&&(h=Hp),this.current.fontSizeScale=e/h,this.ctx.font=`${l} ${o} ${h}px ${a}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}setTextMatrix(t,e,s,i,r,a){this.current.textMatrix=[t,e,s,i,r,a],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,s,i,r){const a=this.ctx,o=this.current,l=o.font,h=o.textRenderingMode,c=o.fontSize/o.fontSizeScale,f=h&Ht.FILL_STROKE_MASK,g=!!(h&Ht.ADD_TO_PATH_FLAG),m=o.patternFill&&!l.missingFile,A=o.patternStroke&&!l.missingFile;let y;if((l.disableFontFace||g||m||A)&&(y=l.getPathGenerator(this.commonObjs,t)),l.disableFontFace||m||A){if(a.save(),a.translate(e,s),a.scale(c,-c),f===Ht.FILL||f===Ht.FILL_STROKE)if(i){const v=a.getTransform();a.setTransform(...i),a.fill(b(this,Ll,Cf).call(this,y,v,i))}else a.fill(y);if(f===Ht.STROKE||f===Ht.FILL_STROKE)if(r){const v=a.getTransform();a.setTransform(...r),a.stroke(b(this,Ll,Cf).call(this,y,v,r))}else a.lineWidth/=c,a.stroke(y);a.restore()}else(f===Ht.FILL||f===Ht.FILL_STROKE)&&a.fillText(t,e,s),(f===Ht.STROKE||f===Ht.FILL_STROKE)&&a.strokeText(t,e,s);g&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:ht(a),x:e,y:s,fontSize:c,path:y})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let s=!1;for(let i=3;i0&&e[i]<255){s=!0;break}return q(this,"isFontSubpixelAAEnabled",s)}showText(t){const e=this.current,s=e.font;if(s.isType3Font)return this.showType3Text(t);const i=e.fontSize;if(i===0)return;const r=this.ctx,a=e.fontSizeScale,o=e.charSpacing,l=e.wordSpacing,h=e.fontDirection,c=e.textHScale*h,f=t.length,g=s.vertical,m=g?1:-1,A=s.defaultVMetrics,y=i*e.fontMatrix[0],v=e.textRenderingMode===Ht.FILL&&!s.disableFontFace&&!e.patternFill;r.save(),r.transform(...e.textMatrix),r.translate(e.x,e.y+e.textRise),h>0?r.scale(c,-1):r.scale(c,1);let w,_;if(e.patternFill){r.save();const x=e.fillColor.getPattern(r,this,Qe(r),Wt.FILL);w=ht(r),r.restore(),r.fillStyle=x}if(e.patternStroke){r.save();const x=e.strokeColor.getPattern(r,this,Qe(r),Wt.STROKE);_=ht(r),r.restore(),r.strokeStyle=x}let E=e.lineWidth;const S=e.textMatrixScale;if(S===0||E===0){const x=e.textRenderingMode&Ht.FILL_STROKE_MASK;(x===Ht.STROKE||x===Ht.FILL_STROKE)&&(E=this.getSinglePixelWidth())}else E/=S;if(a!==1&&(r.scale(a,a),E/=a),r.lineWidth=E,s.isInvalidPDFjsFont){const x=[];let R=0;for(const O of t)x.push(O.unicode),R+=O.width;r.fillText(x.join(""),0,0),e.x+=R*y*c,r.restore(),this.compose();return}let C=0,T;for(T=0;T0){const k=r.measureText(G).width*1e3/i*a;if(Znew _p(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};e=new _f(t,s,this.ctx,r,i)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,s){this.ctx.strokeStyle=this.current.strokeColor=N.makeHexColor(t,e,s),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e,s){this.ctx.fillStyle=this.current.fillColor=N.makeHexColor(t,e,s),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,e=null){let s;return this.cachedPatterns.has(t)?s=this.cachedPatterns.get(t):(s=mA(this.getObject(t)),this.cachedPatterns.set(t,s)),e&&(s.matrix=e),s}shadingFill(t){if(!this.contentVisible)return;const e=this.ctx;this.save();const s=this._getPattern(t);e.fillStyle=s.getPattern(e,this,Qe(e),Wt.SHADING);const i=Qe(e);if(i){const{width:r,height:a}=e.canvas,[o,l,h,c]=N.getAxialAlignedBoundingBox([0,0,r,a],i);this.ctx.fillRect(o,l,h-o,c-l)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){rt("Should not call beginInlineImage")}beginImageData(){rt("Should not call beginImageData")}paintFormXObjectBegin(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=ht(this.ctx),e)){const s=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],s,i),this.current.updateRectMinMax(ht(this.ctx),e),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const e=this.ctx;t.isolated||ku("TODO: Support non-isolated groups."),t.knockout&&U("Knockout groups not supported.");const s=ht(e);if(t.matrix&&e.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let i=N.getAxialAlignedBoundingBox(t.bbox,ht(e));const r=[0,0,e.canvas.width,e.canvas.height];i=N.intersect(i,r)||[0,0,0,0];const a=Math.floor(i[0]),o=Math.floor(i[1]),l=Math.max(Math.ceil(i[2])-a,1),h=Math.max(Math.ceil(i[3])-o,1);this.current.startNewPathAndClipBox([0,0,l,h]);let c="groupAt"+this.groupLevel;t.smask&&(c+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(c,l,h),g=f.context;g.translate(-a,-o),g.transform(...s),t.smask?this.smaskStack.push({canvas:f.canvas,context:g,offsetX:a,offsetY:o,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(a,o),e.save()),go(e,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const e=this.ctx,s=this.groupStack.pop();if(this.ctx=s,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=ht(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const r=N.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],i);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(r)}}beginAnnotation(t,e,s,i,r){if(b(this,kl,Sf).call(this),ic(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),e){const a=e[2]-e[0],o=e[3]-e[1];if(r&&this.annotationCanvasMap){s=s.slice(),s[4]-=e[0],s[5]-=e[1],e=e.slice(),e[0]=e[1]=0,e[2]=a,e[3]=o;const[l,h]=N.singularValueDecompose2dScale(ht(this.ctx)),{viewportScale:c}=this,f=Math.ceil(a*this.outputScaleX*c),g=Math.ceil(o*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(f,g);const{canvas:m,context:A}=this.annotationCanvas;this.annotationCanvasMap.set(t,m),this.annotationCanvas.savedCtx=this.ctx,this.ctx=A,this.ctx.save(),this.ctx.setTransform(l,0,0,-h,0,o*h),ic(this.ctx)}else ic(this.ctx),this.endPath(),this.ctx.rect(e[0],e[1],a,o),this.ctx.clip(),this.ctx.beginPath()}this.current=new Gp(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...s),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),b(this,Ml,Ef).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const e=t.count;t=this.getObject(t.data,t),t.count=e;const s=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=vA(t)),i.compiled)){i.compiled(s);return}const r=this._createMaskCanvas(t),a=r.canvas;s.save(),s.setTransform(1,0,0,1,0,0),s.drawImage(a,r.offsetX,r.offsetY),s.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,s=0,i=0,r,a){if(!this.contentVisible)return;t=this.getObject(t.data,t);const o=this.ctx;o.save();const l=ht(o);o.transform(e,s,i,r,0,0);const h=this._createMaskCanvas(t);o.setTransform(1,0,0,1,h.offsetX-l[4],h.offsetY-l[5]);for(let c=0,f=a.length;cf?c/f:1,o=h>f?h/f:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:e}=this,{lineWidth:s}=this.current,[i,r]=this.getScaleForStroking();if(e.lineWidth=s||1,i===1&&r===1){e.stroke();return}const a=e.getLineDash();if(t&&e.save(),e.scale(i,r),a.length>0){const o=Math.max(i,r);e.setLineDash(a.map(l=>l/o)),e.lineDashOffset/=o}e.stroke(),t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};kl=new WeakSet,Sf=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},Ml=new WeakSet,Ef=function(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}},Ll=new WeakSet,Cf=function(t,e,s){const i=new Path2D;return i.addPath(t,new DOMMatrix(s).invertSelf().multiplySelf(e)),i};let Ir=_p;for(const d in Fe)Ir.prototype[d]!==void 0&&(Ir.prototype[Fe[d]]=Ir.prototype[d]);var Il,Dl;class ei{static get workerPort(){return n(this,Il)}static set workerPort(t){if(!(typeof Worker!="undefined"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");p(this,Il,t)}static get workerSrc(){return n(this,Dl)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");p(this,Dl,t)}}Il=new WeakMap,Dl=new WeakMap,u(ei,Il,null),u(ei,Dl,"");var kn,Fl;class CA{constructor({parsedData:t,rawData:e}){u(this,kn,void 0);u(this,Fl,void 0);p(this,kn,t),p(this,Fl,e)}getRaw(){return n(this,Fl)}get(t){var e;return(e=n(this,kn).get(t))!=null?e:null}getAll(){return cp(n(this,kn))}has(t){return n(this,kn).has(t)}}kn=new WeakMap,Fl=new WeakMap;const xr=Symbol("INTERNAL");var Nl,Ol,Bl,oa;class xA{constructor(t,{name:e,intent:s,usage:i,rbGroups:r}){u(this,Nl,!1);u(this,Ol,!1);u(this,Bl,!1);u(this,oa,!0);p(this,Nl,!!(t&Se.DISPLAY)),p(this,Ol,!!(t&Se.PRINT)),this.name=e,this.intent=s,this.usage=i,this.rbGroups=r}get visible(){if(n(this,Bl))return n(this,oa);if(!n(this,oa))return!1;const{print:t,view:e}=this.usage;return n(this,Nl)?(e==null?void 0:e.viewState)!=="OFF":n(this,Ol)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,s=!1){t!==xr&&rt("Internal method `_setVisible` called."),p(this,Bl,s),p(this,oa,e)}}Nl=new WeakMap,Ol=new WeakMap,Bl=new WeakMap,oa=new WeakMap;var wi,et,la,ha,Hl,xf;class TA{constructor(t,e=Se.DISPLAY){u(this,Hl);u(this,wi,null);u(this,et,new Map);u(this,la,null);u(this,ha,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,p(this,ha,t.order);for(const s of t.groups)n(this,et).set(s.id,new xA(e,s));if(t.baseState==="OFF")for(const s of n(this,et).values())s._setVisible(xr,!1);for(const s of t.on)n(this,et).get(s)._setVisible(xr,!0);for(const s of t.off)n(this,et).get(s)._setVisible(xr,!1);p(this,la,this.getHash())}}isVisible(t){if(n(this,et).size===0)return!0;if(!t)return ku("Optional content group not defined."),!0;if(t.type==="OCG")return n(this,et).has(t.id)?n(this,et).get(t.id).visible:(U(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return b(this,Hl,xf).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!n(this,et).has(e))return U(`Optional content group not found: ${e}`),!0;if(n(this,et).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!n(this,et).has(e))return U(`Optional content group not found: ${e}`),!0;if(!n(this,et).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!n(this,et).has(e))return U(`Optional content group not found: ${e}`),!0;if(!n(this,et).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!n(this,et).has(e))return U(`Optional content group not found: ${e}`),!0;if(n(this,et).get(e).visible)return!1}return!0}return U(`Unknown optional content policy ${t.policy}.`),!0}return U(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,s=!0){var r;const i=n(this,et).get(t);if(!i){U(`Optional content group not found: ${t}`);return}if(s&&e&&i.rbGroups.length)for(const a of i.rbGroups)for(const o of a)o!==t&&((r=n(this,et).get(o))==null||r._setVisible(xr,!1,!0));i._setVisible(xr,!!e,!0),p(this,wi,null)}setOCGState({state:t,preserveRB:e}){let s;for(const i of t){switch(i){case"ON":case"OFF":case"Toggle":s=i;continue}const r=n(this,et).get(i);if(r)switch(s){case"ON":this.setVisibility(i,!0,e);break;case"OFF":this.setVisibility(i,!1,e);break;case"Toggle":this.setVisibility(i,!r.visible,e);break}}p(this,wi,null)}get hasInitialVisibility(){return n(this,la)===null||this.getHash()===n(this,la)}getOrder(){return n(this,et).size?n(this,ha)?n(this,ha).slice():[...n(this,et).keys()]:null}getGroups(){return n(this,et).size>0?cp(n(this,et)):null}getGroup(t){return n(this,et).get(t)||null}getHash(){if(n(this,wi)!==null)return n(this,wi);const t=new Ig;for(const[e,s]of n(this,et))t.update(`${e}:${s.visible}`);return p(this,wi,t.hexdigest())}}wi=new WeakMap,et=new WeakMap,la=new WeakMap,ha=new WeakMap,Hl=new WeakSet,xf=function(t){const e=t.length;if(e<2)return!0;const s=t[0];for(let i=1;i0){const l=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!s,this._isRangeSupported=!e,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((l,h)=>{this._onReceiveData({begin:l,chunk:h})}),t.addProgressListener((l,h)=>{this._onProgress({loaded:l,total:h})}),t.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:e}){const s=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(s):this._queuedChunks.push(s);else{const i=this._rangeReaders.some(function(r){return r._begin!==t?!1:(r._enqueue(s),!0)});wt(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}_onProgress(t){var e,s,i,r;t.total===void 0?(s=(e=this._rangeReaders[0])==null?void 0:e.onProgress)==null||s.call(e,{loaded:t.loaded}):(r=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||r.call(i,{loaded:t.loaded,total:t.total})}_onProgressiveDone(){var t;(t=this._fullRequestReader)==null||t.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){wt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new RA(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new kA(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeReaders.slice(0))s.cancel(t);this._pdfDataRangeTransport.abort()}}class RA{constructor(t,e,s=!1,i=null){this._stream=t,this._done=s||!1,this._filename=fp(i)?i:null,this._queuedChunks=e||[],this._loaded=0;for(const r of this._queuedChunks)this._loaded+=r.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}read(){return I(this,null,function*(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class kA{constructor(t,e,s){this._stream=t,this._begin=e,this._end=s,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){return I(this,null,function*(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function MA(d){let t=!0,e=s("filename\\*","i").exec(d);if(e){e=e[1];let c=o(e);return c=unescape(c),c=l(c),c=h(c),r(c)}if(e=a(d),e){const c=h(e);return r(c)}if(e=s("filename","i").exec(d),e){e=e[1];let c=o(e);return c=h(c),r(c)}function s(c,f){return new RegExp("(?:^|;)\\s*"+c+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',f)}function i(c,f){if(c){if(!/^[\x00-\xFF]+$/.test(f))return f;try{const g=new TextDecoder(c,{fatal:!0}),m=Mu(f);f=g.decode(m),t=!1}catch(g){}}return f}function r(c){return t&&/[\x80-\xff]/.test(c)&&(c=i("utf-8",c),t&&(c=i("iso-8859-1",c))),c}function a(c){const f=[];let g;const m=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(g=m.exec(c))!==null;){let[,y,v,w]=g;if(y=parseInt(y,10),y in f){if(y===0)break;continue}f[y]=[v,w]}const A=[];for(let y=0;y{if(t._responseOrigin=Du(r.url),!Kg(r.status))throw Fu(r.status,i);this._reader=r.body.getReader(),this._headersCapability.resolve();const a=r.headers,{allowRangeRequests:o,suggestedLength:l}=qg({responseHeaders:a,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=Yg(a),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Gi("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;yield this._headersCapability.promise;const{value:t,done:e}=yield this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:Jg(t),done:!1})})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}class IA{constructor(t,e,s){this._stream=t,this._reader=null,this._loaded=0;const i=t.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController;const r=new Headers(t.headers);r.append("Range",`bytes=${e}-${s-1}`);const a=i.url;fetch(a,Qg(r,this._withCredentials,this._abortController)).then(o=>{const l=Du(o.url);if(l!==t._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${t._responseOrigin}".`);if(!Kg(o.status))throw Fu(o.status,a);this._readCapability.resolve(),this._reader=o.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;yield this._readCapability.promise;const{value:t,done:e}=yield this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:Jg(t),done:!1})})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}const Wu=200,Xu=206;function DA(d){const t=d.response;return typeof t!="string"?t:Mu(t).buffer}class FA{constructor({url:t,httpHeaders:e,withCredentials:s}){B(this,"_responseOrigin",null);this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=Xg(this.isHttp,e),this.withCredentials=s||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const e=new XMLHttpRequest,s=this.currXhrId++,i=this.pendingRequests[s]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const[r,a]of this.headers)e.setRequestHeader(r,a);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),i.expectedStatus=Xu):i.expectedStatus=Wu,e.responseType="arraybuffer",wt(t.onError,"Expected `onError` callback to be provided."),e.onerror=()=>{t.onError(e.status)},e.onreadystatechange=this.onStateChange.bind(this,s),e.onprogress=this.onProgress.bind(this,s),i.onHeadersReceived=t.onHeadersReceived,i.onDone=t.onDone,i.onError=t.onError,i.onProgress=t.onProgress,e.send(null),s}onProgress(t,e){var i;const s=this.pendingRequests[t];s&&((i=s.onProgress)==null||i.call(s,e))}onStateChange(t,e){const s=this.pendingRequests[t];if(!s)return;const i=s.xhr;if(i.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),i.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],i.status===0&&this.isHttp){s.onError(i.status);return}const r=i.status||Wu;if(!(r===Wu&&s.expectedStatus===Xu)&&r!==s.expectedStatus){s.onError(i.status);return}const o=DA(i);if(r===Xu){const l=i.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);h?s.onDone({begin:parseInt(h[1],10),chunk:o}):(U('Missing or invalid "Content-Range" header.'),s.onError(0))}else o?s.onDone({begin:0,chunk:o}):s.onError(i.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}class NA{constructor(t){this._source=t,this._manager=new FA(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return wt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new OA(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const s=new BA(this._manager,t,e);return s.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class OA{constructor(t,e){this._manager=t,this._url=e.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t);this._manager._responseOrigin=Du(e.responseURL);const s=e.getAllResponseHeaders(),i=new Headers(s?s.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(o=>{const[l,...h]=o.split(": ");return[l,h.join(": ")]}):[]),{allowRangeRequests:r,suggestedLength:a}=qg({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=Yg(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=Fu(t,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var e;(e=this.onProgress)==null||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}read(){return I(this,null,function*(){if(yield this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class BA{constructor(t,e,s){this._manager=t,this._url=t.url,this._requestId=t.request({begin:e,end:s,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){var e;const t=Du((e=this._manager.getRequestXhr(this._requestId))==null?void 0:e.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){var t;(t=this.onClosed)==null||t.call(this,this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){var e;(e=this._storedError)!=null||(this._storedError=Fu(t,this._url));for(const s of this._requests)s.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var e;this.isStreamingSupported||(e=this.onProgress)==null||e.call(this,{loaded:t.loaded})}get isStreamingSupported(){return!1}read(){return I(this,null,function*(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const HA=/^[a-z][a-z0-9\-+.]+:/i;function zA(d){if(HA.test(d))return new URL(d);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(d))}class $A{constructor(t){this.source=t,this.url=zA(t.url),wt(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}getFullReader(){return wt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new GA(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new VA(this,t,e);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class GA{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const s=process.getBuiltinModule("fs");s.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(s.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=new No(`Missing PDF "${this._url}".`)),this._storedError=i,this._headersCapability.reject(i)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Gi("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class VA{constructor(t,e,s){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=t.source;this._isStreamingSupported=!i.disableStream;const r=process.getBuiltinModule("fs");this._setReadableStream(r.createReadStream(this._url,{start:e,end:s-1}))}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const UA=1e5,se=30,jA=.8;var Qp,vi,ae,zl,$l,Mn,Ns,Gl,Vl,Ln,ca,da,_i,ua,Ul,fa,In,jl,Wl,Dn,Fn,Xl,Si,pa,Rd,Zg,kd,tm,ql,Tf,ga,mc,Yl,Pf,Md,em,Ld,sm;const ft=class ft{constructor({textContentSource:t,container:e,viewport:s}){u(this,Rd);u(this,kd);u(this,ql);u(this,vi,Promise.withResolvers());u(this,ae,null);u(this,zl,!1);u(this,$l,!!((Qp=globalThis.FontInspector)!=null&&Qp.enabled));u(this,Mn,null);u(this,Ns,null);u(this,Gl,0);u(this,Vl,0);u(this,Ln,null);u(this,ca,null);u(this,da,0);u(this,_i,0);u(this,ua,Object.create(null));u(this,Ul,[]);u(this,fa,null);u(this,In,[]);u(this,jl,new WeakMap);u(this,Wl,null);var l;if(t instanceof ReadableStream)p(this,fa,t);else if(typeof t=="object")p(this,fa,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');p(this,ae,p(this,ca,e)),p(this,_i,s.scale*(globalThis.devicePixelRatio||1)),p(this,da,s.rotation),p(this,Ns,{div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:r,pageX:a,pageY:o}=s.rawDims;p(this,Wl,[1,0,0,-1,-a,o+r]),p(this,Vl,i),p(this,Gl,r),b(l=ft,Md,em).call(l),br(e,s),n(this,vi).promise.finally(()=>{n(ft,pa).delete(this),p(this,Ns,null),p(this,ua,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=ee.platform;return q(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{n(this,Ln).read().then(({value:e,done:s})=>{var i;if(s){n(this,vi).resolve();return}(i=n(this,Mn))!=null||p(this,Mn,e.lang),Object.assign(n(this,ua),e.styles),b(this,Rd,Zg).call(this,e.items),t()},n(this,vi).reject)};return p(this,Ln,n(this,fa).getReader()),n(ft,pa).add(this),t(),n(this,vi).promise}update({viewport:t,onBefore:e=null}){var r;const s=t.scale*(globalThis.devicePixelRatio||1),i=t.rotation;if(i!==n(this,da)&&(e==null||e(),p(this,da,i),br(n(this,ca),{rotation:i})),s!==n(this,_i)){e==null||e(),p(this,_i,s);const a={div:null,properties:null,ctx:b(r=ft,ga,mc).call(r,n(this,Mn))};for(const o of n(this,In))a.properties=n(this,jl).get(o),a.div=o,b(this,ql,Tf).call(this,a)}}cancel(){var e;const t=new Gi("TextLayer task cancelled.");(e=n(this,Ln))==null||e.cancel(t).catch(()=>{}),p(this,Ln,null),n(this,vi).reject(t)}get textDivs(){return n(this,In)}get textContentItemsStr(){return n(this,Ul)}static cleanup(){if(!(n(this,pa).size>0)){n(this,Dn).clear();for(const{canvas:t}of n(this,Fn).values())t.remove();n(this,Fn).clear()}}};vi=new WeakMap,ae=new WeakMap,zl=new WeakMap,$l=new WeakMap,Mn=new WeakMap,Ns=new WeakMap,Gl=new WeakMap,Vl=new WeakMap,Ln=new WeakMap,ca=new WeakMap,da=new WeakMap,_i=new WeakMap,ua=new WeakMap,Ul=new WeakMap,fa=new WeakMap,In=new WeakMap,jl=new WeakMap,Wl=new WeakMap,Dn=new WeakMap,Fn=new WeakMap,Xl=new WeakMap,Si=new WeakMap,pa=new WeakMap,Rd=new WeakSet,Zg=function(t){var i,r,a;if(n(this,zl))return;(a=(r=n(this,Ns)).ctx)!=null||(r.ctx=b(i=ft,ga,mc).call(i,n(this,Mn)));const e=n(this,In),s=n(this,Ul);for(const o of t){if(e.length>UA){U("Ignoring additional textDivs for performance reasons."),p(this,zl,!0);return}if(o.str===void 0){if(o.type==="beginMarkedContentProps"||o.type==="beginMarkedContent"){const l=n(this,ae);p(this,ae,document.createElement("span")),n(this,ae).classList.add("markedContent"),o.id!==null&&n(this,ae).setAttribute("id",`${o.id}`),l.append(n(this,ae))}else o.type==="endMarkedContent"&&p(this,ae,n(this,ae).parentNode);continue}s.push(o.str),b(this,kd,tm).call(this,o)}},kd=new WeakSet,tm=function(t){var y;const e=document.createElement("span"),s={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};n(this,In).push(e);const i=N.transform(n(this,Wl),t.transform);let r=Math.atan2(i[1],i[0]);const a=n(this,ua)[t.fontName];a.vertical&&(r+=Math.PI/2);let o=n(this,$l)&&a.fontSubstitution||a.fontFamily;o=ft.fontFamilyMap.get(o)||o;const l=Math.hypot(i[2],i[3]),h=l*b(y=ft,Ld,sm).call(y,o,n(this,Mn));let c,f;r===0?(c=i[4],f=i[5]-h):(c=i[4]+h*Math.sin(r),f=i[5]-h*Math.cos(r));const g="calc(var(--scale-factor)*",m=e.style;n(this,ae)===n(this,ca)?(m.left=`${(100*c/n(this,Vl)).toFixed(2)}%`,m.top=`${(100*f/n(this,Gl)).toFixed(2)}%`):(m.left=`${g}${c.toFixed(2)}px)`,m.top=`${g}${f.toFixed(2)}px)`),m.fontSize=`${g}${(n(ft,Si)*l).toFixed(2)}px)`,m.fontFamily=o,s.fontSize=l,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,n(this,$l)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),r!==0&&(s.angle=r*(180/Math.PI));let A=!1;if(t.str.length>1)A=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const v=Math.abs(t.transform[0]),w=Math.abs(t.transform[3]);v!==w&&Math.max(v,w)/Math.min(v,w)>1.5&&(A=!0)}if(A&&(s.canvasWidth=a.vertical?t.height:t.width),n(this,jl).set(e,s),n(this,Ns).div=e,n(this,Ns).properties=s,b(this,ql,Tf).call(this,n(this,Ns)),s.hasText&&n(this,ae).append(e),s.hasEOL){const v=document.createElement("br");v.setAttribute("role","presentation"),n(this,ae).append(v)}},ql=new WeakSet,Tf=function(t){var o;const{div:e,properties:s,ctx:i}=t,{style:r}=e;let a="";if(n(ft,Si)>1&&(a=`scale(${1/n(ft,Si)})`),s.canvasWidth!==0&&s.hasText){const{fontFamily:l}=r,{canvasWidth:h,fontSize:c}=s;b(o=ft,Yl,Pf).call(o,i,c*n(this,_i),l);const{width:f}=i.measureText(e.textContent);f>0&&(a=`scaleX(${h*n(this,_i)/f}) ${a}`)}s.angle!==0&&(a=`rotate(${s.angle}deg) ${a}`),a.length>0&&(r.transform=a)},ga=new WeakSet,mc=function(t=null){let e=n(this,Fn).get(t||(t=""));if(!e){const s=document.createElement("canvas");s.className="hiddenCanvasElement",s.lang=t,document.body.append(s),e=s.getContext("2d",{alpha:!1,willReadFrequently:!0}),n(this,Fn).set(t,e),n(this,Xl).set(e,{size:0,family:""})}return e},Yl=new WeakSet,Pf=function(t,e,s){const i=n(this,Xl).get(t);e===i.size&&s===i.family||(t.font=`${e}px ${s}`,i.size=e,i.family=s)},Md=new WeakSet,em=function(){if(n(this,Si)!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),p(this,Si,t.getBoundingClientRect().height),t.remove()},Ld=new WeakSet,sm=function(t,e){const s=n(this,Dn).get(t);if(s)return s;const i=b(this,ga,mc).call(this,e);i.canvas.width=i.canvas.height=se,b(this,Yl,Pf).call(this,i,se,t);const r=i.measureText("");let a=r.fontBoundingBoxAscent,o=Math.abs(r.fontBoundingBoxDescent);if(a){const c=a/(a+o);return n(this,Dn).set(t,c),i.canvas.width=i.canvas.height=0,c}i.strokeStyle="red",i.clearRect(0,0,se,se),i.strokeText("g",0,0);let l=i.getImageData(0,0,se,se).data;o=0;for(let c=l.length-1-3;c>=0;c-=4)if(l[c]>0){o=Math.ceil(c/4/se);break}i.clearRect(0,0,se,se),i.strokeText("A",0,se),l=i.getImageData(0,0,se,se).data,a=0;for(let c=0,f=l.length;c0){a=se-Math.floor(c/4/se);break}i.canvas.width=i.canvas.height=0;const h=a?a/(a+o):jA;return n(this,Dn).set(t,h),h},u(ft,ga),u(ft,Yl),u(ft,Md),u(ft,Ld),u(ft,Dn,new Map),u(ft,Fn,new Map),u(ft,Xl,new WeakMap),u(ft,Si,null),u(ft,pa,new Set);let Oo=ft;class Bo{static textContent(t){const e=[],s={items:e,styles:Object.create(null)};function i(r){var l;if(!r)return;let a=null;const o=r.name;if(o==="#text")a=r.value;else if(Bo.shouldBuildText(o))(l=r==null?void 0:r.attributes)!=null&&l.textContent?a=r.attributes.textContent:r.value&&(a=r.value);else return;if(a!==null&&e.push({str:a}),!!r.children)for(const h of r.children)i(h)}return i(t),s}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const WA=65536,XA=100,qA=5e3,YA=Xt?hA:aA,KA=Xt?cA:$g,QA=Xt?lA:oA,JA=Xt?dA:jg;function ZA(d={}){var Ct,K;typeof d=="string"||d instanceof URL?d={url:d}:(d instanceof ArrayBuffer||ArrayBuffer.isView(d))&&(d={data:d});const t=new Rf,{docId:e}=t,s=d.url?ty(d.url):null,i=d.data?ey(d.data):null,r=d.httpHeaders||null,a=d.withCredentials===!0,o=(Ct=d.password)!=null?Ct:null,l=d.range instanceof im?d.range:null,h=Number.isInteger(d.rangeChunkSize)&&d.rangeChunkSize>0?d.rangeChunkSize:WA;let c=d.worker instanceof Dr?d.worker:null;const f=d.verbosity,g=typeof d.docBaseUrl=="string"&&!Iu(d.docBaseUrl)?d.docBaseUrl:null,m=typeof d.cMapUrl=="string"?d.cMapUrl:null,A=d.cMapPacked!==!1,y=d.CMapReaderFactory||KA,v=typeof d.standardFontDataUrl=="string"?d.standardFontDataUrl:null,w=d.StandardFontDataFactory||JA,_=d.stopAtErrors!==!0,E=Number.isInteger(d.maxImageSize)&&d.maxImageSize>-1?d.maxImageSize:-1,S=d.isEvalSupported!==!1,C=typeof d.isOffscreenCanvasSupported=="boolean"?d.isOffscreenCanvasSupported:!Xt,T=typeof d.isImageDecoderSupported=="boolean"?d.isImageDecoderSupported:!Xt&&(ee.platform.isFirefox||!globalThis.chrome),x=Number.isInteger(d.canvasMaxAreaInBytes)?d.canvasMaxAreaInBytes:-1,R=typeof d.disableFontFace=="boolean"?d.disableFontFace:Xt,O=d.fontExtraProperties===!0,G=d.enableXfa===!0,H=d.ownerDocument||globalThis.document,nt=d.disableRange===!0,ot=d.disableStream===!0,Z=d.disableAutoFetch===!0,Et=d.pdfBug===!0,k=d.CanvasFactory||YA,P=d.FilterFactory||QA,D=d.enableHWA===!0,Y=l?l.length:(K=d.length)!=null?K:NaN,W=typeof d.useSystemFonts=="boolean"?d.useSystemFonts:!Xt&&!R,$=typeof d.useWorkerFetch=="boolean"?d.useWorkerFetch:y===$g&&w===jg&&m&&v&&yo(m,document.baseURI)&&yo(v,document.baseURI),gt=null;Bb(f);const st={canvasFactory:new k({ownerDocument:H,enableHWA:D}),filterFactory:new P({docId:e,ownerDocument:H}),cMapReaderFactory:$?null:new y({baseUrl:m,isCompressed:A}),standardFontDataFactory:$?null:new w({baseUrl:v})};if(!c){const qt={verbosity:f,port:ei.workerPort};c=qt.port?Dr.fromPort(qt):new Dr(qt),t._worker=c}const ys={docId:e,apiVersion:"4.10.38",data:i,password:o,disableAutoFetch:Z,rangeChunkSize:h,length:Y,docBaseUrl:g,enableXfa:G,evaluatorOptions:{maxImageSize:E,disableFontFace:R,ignoreErrors:_,isEvalSupported:S,isOffscreenCanvasSupported:C,isImageDecoderSupported:T,canvasMaxAreaInBytes:x,fontExtraProperties:O,useSystemFonts:W,cMapUrl:$?m:null,standardFontDataUrl:$?v:null}},ws={disableFontFace:R,fontExtraProperties:O,ownerDocument:H,pdfBug:Et,styleElement:gt,loadingParams:{disableAutoFetch:Z,enableXfa:G}};return c.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const qt=c.messageHandler.sendWithPromise("GetDocRequest",ys,i?[i.buffer]:null);let uo;if(l)uo=new PA(l,{disableRange:nt,disableStream:ot});else if(!i){if(!s)throw new Error("getDocument - no `url` parameter provided.");let vr;if(Xt)if(yo(s)){if(typeof fetch=="undefined"||typeof Response=="undefined"||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");vr=Xp}else vr=$A;else vr=yo(s)?Xp:NA;uo=new vr({url:s,length:Y,httpHeaders:r,withCredentials:a,rangeChunkSize:h,disableRange:nt,disableStream:ot})}return qt.then(vr=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const xp=new So(e,vr,c.port),tb=new ry(xp,t,uo,ws,st);t._transport=tb,xp.send("Ready",null)})}).catch(t._capability.reject),t}function ty(d){if(d instanceof URL)return d.href;try{return new URL(d,window.location).href}catch(t){if(Xt&&typeof d=="string")return d}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function ey(d){if(Xt&&typeof Buffer!="undefined"&&d instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(d instanceof Uint8Array&&d.byteLength===d.buffer.byteLength)return d;if(typeof d=="string")return Mu(d);if(d instanceof ArrayBuffer||ArrayBuffer.isView(d)||typeof d=="object"&&!isNaN(d==null?void 0:d.length))return new Uint8Array(d);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function qp(d){return typeof d=="object"&&Number.isInteger(d==null?void 0:d.num)&&d.num>=0&&Number.isInteger(d==null?void 0:d.gen)&&d.gen>=0}var Id;const Dd=class Dd{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${Yt(Dd,Id)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}destroy(){return I(this,null,function*(){var t,e,s,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),yield(e=this._transport)==null?void 0:e.destroy()}catch(r){throw(s=this._worker)!=null&&s.port&&delete this._worker._pendingDestroy,r}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null})}};Id=new WeakMap,u(Dd,Id,0);let Rf=Dd;class im{constructor(t,e,s=!1,i=null){this.length=t,this.initialData=e,this.progressiveDone=s,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const s of this._rangeListeners)s(t,e)}onDataProgress(t,e){this._readyCapability.promise.then(()=>{for(const s of this._progressListeners)s(t,e)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const e of this._progressiveReadListeners)e(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){rt("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class sy{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return q(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Ei,Os,Ci,Tr,ma,bc;class iy{constructor(t,e,s,i=!1){u(this,Ci);u(this,ma);u(this,Ei,null);u(this,Os,!1);this._pageIndex=t,this._pageInfo=e,this._transport=s,this._stats=i?new Dp:null,this._pdfBug=i,this.commonObjs=s.commonObjs,this.objs=new nm,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:r=!1}={}){return new Qh({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return q(this,"isPureXfa",!!this._transport._htmlForXfa)}getXfa(){return I(this,null,function*(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null})}render({canvasContext:t,viewport:e,intent:s="display",annotationMode:i=ni.ENABLE,transform:r=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:h=null,printAnnotationStorage:c=null,isEditing:f=!1}){var S,C;(S=this._stats)==null||S.time("Overall");const g=this._transport.getRenderingIntent(s,i,c,f),{renderingIntent:m,cacheKey:A}=g;p(this,Os,!1),b(this,ma,bc).call(this),o||(o=this._transport.getOptionalContentConfig(m));let y=this._intentStates.get(A);y||(y=Object.create(null),this._intentStates.set(A,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const v=!!(m&Se.PRINT);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(C=this._stats)==null||C.time("Page Request"),this._pumpOperatorList(g));const w=T=>{var x;y.renderTasks.delete(_),(this._maybeCleanupAfterRender||v)&&p(this,Os,!0),b(this,Ci,Tr).call(this,!v),T?(_.capability.reject(T),this._abortOperatorList({intentState:y,reason:T instanceof Error?T:new Error(T)})):_.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(x=globalThis.Stats)!=null&&x.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},_=new Mf({callback:w,params:{canvasContext:t,viewport:e,transform:r,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!v,pdfBug:this._pdfBug,pageColors:h});(y.renderTasks||(y.renderTasks=new Set)).add(_);const E=_.task;return Promise.all([y.displayReadyCapability.promise,o]).then(([T,x])=>{var R;if(this.destroyed){w();return}if((R=this._stats)==null||R.time("Rendering"),!(x.renderingIntent&m))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");_.initializeGraphics({transparency:T,optionalContentConfig:x}),_.operatorListChanged()}).catch(w),E}getOperatorList({intent:t="display",annotationMode:e=ni.ENABLE,printAnnotationStorage:s=null,isEditing:i=!1}={}){var h;function r(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}const a=this._transport.getRenderingIntent(t,e,s,i,!0);let o=this._intentStates.get(a.cacheKey);o||(o=Object.create(null),this._intentStates.set(a.cacheKey,o));let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=r,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(h=this._stats)==null||h.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(i){return i.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(s=>Bo.textContent(s));const e=this.streamTextContent(t);return new Promise(function(s,i){function r(){a.read().then(function({value:l,done:h}){var c;if(h){s(o);return}(c=o.lang)!=null||(o.lang=l.lang),Object.assign(o.styles,l.styles),o.items.push(...l.items),r()},i)}const a=e.getReader(),o={items:[],styles:Object.create(null),lang:null};r()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const s of e.renderTasks)t.push(s.completed),s.cancel();return this.objs.clear(),p(this,Os,!1),b(this,ma,bc).call(this),Promise.all(t)}cleanup(t=!1){p(this,Os,!0);const e=b(this,Ci,Tr).call(this,!1);return t&&e&&this._stats&&(this._stats=new Dp),e}_startRenderPage(t,e){var i,r;const s=this._intentStates.get(e);s&&((i=this._stats)==null||i.timeEnd("Page Request"),(r=s.displayReadyCapability)==null||r.resolve(t))}_renderPageChunk(t,e){for(let s=0,i=t.length;s{l.read().then(({value:f,done:g})=>{if(g){h.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(f,h),c())},f=>{if(h.streamReader=null,!this._transport.destroyed){if(h.operatorList){h.operatorList.lastChunk=!0;for(const g of h.renderTasks)g.operatorListChanged();b(this,Ci,Tr).call(this,!0)}if(h.displayReadyCapability)h.displayReadyCapability.reject(f);else if(h.opListReadCapability)h.opListReadCapability.reject(f);else throw f}})};c()}_abortOperatorList({intentState:t,reason:e,force:s=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!s){if(t.renderTasks.size>0)return;if(e instanceof up){let i=XA;e.extraDelay>0&&e.extraDelay<1e3&&(i+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},i);return}}if(t.streamReader.cancel(new Gi(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[i,r]of this._intentStates)if(r===t){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}Ei=new WeakMap,Os=new WeakMap,Ci=new WeakSet,Tr=function(t=!1){if(b(this,ma,bc).call(this),!n(this,Os)||this.destroyed)return!1;if(t)return p(this,Ei,setTimeout(()=>{p(this,Ei,null),b(this,Ci,Tr).call(this,!1)},qA)),!1;for(const{renderTasks:e,operatorList:s}of this._intentStates.values())if(e.size>0||!s.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),p(this,Os,!1),!0},ma=new WeakSet,bc=function(){n(this,Ei)&&(clearTimeout(n(this,Ei)),p(this,Ei,null))};var Bs,Fd;class ny{constructor(){u(this,Bs,new Map);u(this,Fd,Promise.resolve())}postMessage(t,e){const s={data:structuredClone(t,e?{transfer:e}:null)};n(this,Fd).then(()=>{for(const[i]of n(this,Bs))i.call(this,s)})}addEventListener(t,e,s=null){let i=null;if((s==null?void 0:s.signal)instanceof AbortSignal){const{signal:r}=s;if(r.aborted){U("LoopbackPort - cannot use an `aborted` signal.");return}const a=()=>this.removeEventListener(t,e);i=()=>r.removeEventListener("abort",a),r.addEventListener("abort",a)}n(this,Bs).set(e,i)}removeEventListener(t,e){const s=n(this,Bs).get(e);s==null||s(),n(this,Bs).delete(e)}terminate(){for(const[,t]of n(this,Bs))t==null||t();n(this,Bs).clear()}}Bs=new WeakMap,Fd=new WeakMap;var Nd,Nn,On,ba,Ac,Aa,yc;const lt=class lt{constructor({name:t=null,port:e=null,verbosity:s=Hb()}={}){u(this,ba);var i;if(this.name=t,this.destroyed=!1,this.verbosity=s,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,e){if((i=n(lt,On))!=null&&i.has(e))throw new Error("Cannot use more than one PDFWorker per port.");(n(lt,On)||p(lt,On,new WeakMap)).set(e,this),this._initializeFromPort(e);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new So("main","worker",t),this._messageHandler.on("ready",function(){}),b(this,ba,Ac).call(this)}_initialize(){if(n(lt,Nn)||n(lt,Aa,yc)){this._setupFakeWorker();return}let{workerSrc:t}=lt;try{lt._isSameOrigin(window.location.href,t)||(t=lt._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),s=new So("main","worker",e),i=()=>{r.abort(),s.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},r=new AbortController;e.addEventListener("error",()=>{this._webWorker||i()},{signal:r.signal}),s.on("test",o=>{if(r.abort(),this.destroyed||!o){i();return}this._messageHandler=s,this._port=e,this._webWorker=e,b(this,ba,Ac).call(this)}),s.on("ready",o=>{if(r.abort(),this.destroyed){i();return}try{a()}catch(l){this._setupFakeWorker()}});const a=()=>{const o=new Uint8Array;s.send("test",o,[o.buffer])};a();return}catch(e){ku("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){n(lt,Nn)||(U("Setting up fake worker."),p(lt,Nn,!0)),lt._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const e=new ny;this._port=e;const s=`fake${Yt(lt,Nd)._++}`,i=new So(s+"_worker",s,e);t.setup(i,e),this._messageHandler=new So(s,s+"_worker",e),b(this,ba,Ac).call(this)}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){var t,e,s;this.destroyed=!0,(t=this._webWorker)==null||t.terminate(),this._webWorker=null,(e=n(lt,On))==null||e.delete(this._port),this._port=null,(s=this._messageHandler)==null||s.destroy(),this._messageHandler=null}static fromPort(t){var s;if(!(t!=null&&t.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const e=(s=n(this,On))==null?void 0:s.get(t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new lt(t)}static get workerSrc(){if(ei.workerSrc)return ei.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return q(this,"_setupFakeWorkerGlobal",(()=>I(this,null,function*(){return n(this,Aa,yc)?n(this,Aa,yc):(yield ab(()=>import(this.workerSrc),[],import.meta.url)).WorkerMessageHandler}))())}};Nd=new WeakMap,Nn=new WeakMap,On=new WeakMap,ba=new WeakSet,Ac=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Aa=new WeakSet,yc=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch(e){return null}},u(lt,Aa),u(lt,Nd,0),u(lt,Nn,!1),u(lt,On,void 0),Xt&&(p(lt,Nn,!0),ei.workerSrc||(ei.workerSrc="./pdf.worker.mjs")),lt._isSameOrigin=(t,e)=>{let s;try{if(s=new URL(t),!s.origin||s.origin==="null")return!1}catch(r){return!1}const i=new URL(e,s);return s.origin===i.origin},lt._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};let Dr=lt;var Hs,hs,ya,wa,zs,Bn,Po;class ry{constructor(t,e,s,i,r){u(this,Bn);u(this,Hs,new Map);u(this,hs,new Map);u(this,ya,new Map);u(this,wa,new Map);u(this,zs,null);this.messageHandler=t,this.loadingTask=e,this.commonObjs=new nm,this.fontLoader=new nA({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=s,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return q(this,"annotationStorage",new mp)}getRenderingIntent(t,e=ni.ENABLE,s=null,i=!1,r=!1){let a=Se.DISPLAY,o=Af;switch(t){case"any":a=Se.ANY;break;case"display":break;case"print":a=Se.PRINT;break;default:U(`getRenderingIntent - invalid intent: ${t}`)}const l=a&Se.PRINT&&s instanceof Fg?s:this.annotationStorage;switch(e){case ni.DISABLE:a+=Se.ANNOTATIONS_DISABLE;break;case ni.ENABLE:break;case ni.ENABLE_FORMS:a+=Se.ANNOTATIONS_FORMS;break;case ni.ENABLE_STORAGE:a+=Se.ANNOTATIONS_STORAGE,o=l.serializable;break;default:U(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(a+=Se.IS_EDITING),r&&(a+=Se.OPLIST);const{ids:h,hash:c}=l.modifiedIds,f=[a,o.hash,c];return{renderingIntent:a,cacheKey:f.join("_"),annotationStorageSerializable:o,modifiedIds:h}}destroy(){var s;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(s=n(this,zs))==null||s.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of n(this,hs).values())t.push(i._destroy());n(this,hs).clear(),n(this,ya).clear(),n(this,wa).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var i,r;this.commonObjs.clear(),this.fontLoader.clear(),n(this,Hs).clear(),this.filterFactory.destroy(),Oo.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new Gi("Worker was terminated.")),(r=this.messageHandler)==null||r.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(s,i)=>{wt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=r=>{this._lastProgress={loaded:r.loaded,total:r.total}},i.onPull=()=>{this._fullReader.read().then(function({value:r,done:a}){if(a){i.close();return}wt(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(r),1,[r])}).catch(r=>{i.error(r)})},i.onCancel=r=>{this._fullReader.cancel(r),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("ReaderHeadersReady",s=>I(this,null,function*(){var o;yield this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:r,contentLength:a}=this._fullReader;return(!i||!r)&&(this._lastProgress&&((o=e.onProgress)==null||o.call(e,this._lastProgress)),this._fullReader.onProgress=l=>{var h;(h=e.onProgress)==null||h.call(e,{loaded:l.loaded,total:l.total})}),{isStreamingSupported:i,isRangeSupported:r,contentLength:a}})),t.on("GetRangeReader",(s,i)=>{wt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(s.begin,s.end);if(!r){i.close();return}i.onPull=()=>{r.read().then(function({value:a,done:o}){if(o){i.close();return}wt(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{i.error(a)})},i.onCancel=a=>{r.cancel(a),i.ready.catch(o=>{if(!this.destroyed)throw o})}}),t.on("GetDoc",({pdfInfo:s})=>{this._numPages=s.numPages,this._htmlForXfa=s.htmlForXfa,delete s.htmlForXfa,e._capability.resolve(new sy(s,this))}),t.on("DocException",s=>{e._capability.reject(ie(s))}),t.on("PasswordRequest",s=>{p(this,zs,Promise.withResolvers());try{if(!e.onPassword)throw ie(s);const i=r=>{r instanceof Error?n(this,zs).reject(r):n(this,zs).resolve({password:r})};e.onPassword(i,s.code)}catch(i){n(this,zs).reject(i)}return n(this,zs).promise}),t.on("DataLoaded",s=>{var i;(i=e.onProgress)==null||i.call(e,{loaded:s.length,total:s.length}),this.downloadInfoCapability.resolve(s)}),t.on("StartRenderPage",s=>{if(this.destroyed)return;n(this,hs).get(s.pageIndex)._startRenderPage(s.transparency,s.cacheKey)}),t.on("commonobj",([s,i,r])=>{var a;if(this.destroyed||this.commonObjs.has(s))return null;switch(i){case"Font":const{disableFontFace:o,fontExtraProperties:l,pdfBug:h}=this._params;if("error"in r){const m=r.error;U(`Error during font loading: ${m}`),this.commonObjs.resolve(s,m);break}const c=h&&((a=globalThis.FontInspector)!=null&&a.enabled)?(m,A)=>globalThis.FontInspector.fontAdded(m,A):null,f=new rA(r,{disableFontFace:o,fontExtraProperties:l,inspectFont:c});this.fontLoader.bind(f).catch(()=>t.sendWithPromise("FontFallback",{id:s})).finally(()=>{!l&&f.data&&(f.data=null),this.commonObjs.resolve(s,f)});break;case"CopyLocalImage":const{imageRef:g}=r;wt(g,"The imageRef must be defined.");for(const m of n(this,hs).values())for(const[,A]of m.objs)if((A==null?void 0:A.ref)===g)return A.dataLen?(this.commonObjs.resolve(s,structuredClone(A)),A.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(s,r);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),t.on("obj",([s,i,r,a])=>{var l;if(this.destroyed)return;const o=n(this,hs).get(i);if(!o.objs.has(s)){if(o._intentStates.size===0){(l=a==null?void 0:a.bitmap)==null||l.close();return}switch(r){case"Image":o.objs.resolve(s,a),(a==null?void 0:a.dataLen)>Db&&(o._maybeCleanupAfterRender=!0);break;case"Pattern":o.objs.resolve(s,a);break;default:throw new Error(`Got unknown object type ${r}`)}}}),t.on("DocProgress",s=>{var i;this.destroyed||(i=e.onProgress)==null||i.call(e,{loaded:s.loaded,total:s.total})}),t.on("FetchBuiltInCMap",s=>I(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(s)})),t.on("FetchStandardFontData",s=>I(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(s)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var s,i;this.annotationStorage.size<=0&&U("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:(i=(s=this._fullReader)==null?void 0:s.filename)!=null?i:null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,s=n(this,ya).get(e);if(s)return s;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(r=>{if(this.destroyed)throw new Error("Transport destroyed");r.refStr&&n(this,wa).set(r.refStr,t);const a=new iy(e,r,this,this._params.pdfBug);return n(this,hs).set(e,a),a});return n(this,ya).set(e,i),i}getPageIndex(t){return qp(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return b(this,Bn,Po).call(this,"GetFieldObjects")}hasJSActions(){return b(this,Bn,Po).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return b(this,Bn,Po).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return b(this,Bn,Po).call(this,"GetOptionalContentConfig").then(e=>new TA(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=n(this,Hs).get(t);if(e)return e;const s=this.messageHandler.sendWithPromise(t,null).then(i=>{var r,a,o,l;return{info:i[0],metadata:i[1]?new CA(i[1]):null,contentDispositionFilename:(a=(r=this._fullReader)==null?void 0:r.filename)!=null?a:null,contentLength:(l=(o=this._fullReader)==null?void 0:o.contentLength)!=null?l:null}});return n(this,Hs).set(t,s),s}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(t=!1){return I(this,null,function*(){if(!this.destroyed){yield this.messageHandler.sendWithPromise("Cleanup",null);for(const e of n(this,hs).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),n(this,Hs).clear(),this.filterFactory.destroy(!0),Oo.cleanup()}})}cachedPageNumber(t){var s;if(!qp(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return(s=n(this,wa).get(e))!=null?s:null}}Hs=new WeakMap,hs=new WeakMap,ya=new WeakMap,wa=new WeakMap,zs=new WeakMap,Bn=new WeakSet,Po=function(t,e=null){const s=n(this,Hs).get(t);if(s)return s;const i=this.messageHandler.sendWithPromise(t,e);return n(this,Hs).set(t,i),i};const mo=Symbol("INITIAL_DATA");var pe,Kl,kf;class nm{constructor(){u(this,Kl);u(this,pe,Object.create(null))}get(t,e=null){if(e){const i=b(this,Kl,kf).call(this,t);return i.promise.then(()=>e(i.data)),null}const s=n(this,pe)[t];if(!s||s.data===mo)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return s.data}has(t){const e=n(this,pe)[t];return!!e&&e.data!==mo}delete(t){const e=n(this,pe)[t];return!e||e.data===mo?!1:(delete n(this,pe)[t],!0)}resolve(t,e=null){const s=b(this,Kl,kf).call(this,t);s.data=e,s.resolve()}clear(){var t;for(const e in n(this,pe)){const{data:s}=n(this,pe)[e];(t=s==null?void 0:s.bitmap)==null||t.close()}p(this,pe,Object.create(null))}*[Symbol.iterator](){for(const t in n(this,pe)){const{data:e}=n(this,pe)[t];e!==mo&&(yield[t,e])}}}pe=new WeakMap,Kl=new WeakSet,kf=function(t){var e;return(e=n(this,pe))[t]||(e[t]=_r(vs({},Promise.withResolvers()),{data:mo}))};var xi;class ay{constructor(t){u(this,xi,null);p(this,xi,t),this.onContinue=null}get promise(){return n(this,xi).capability.promise}cancel(t=0){n(this,xi).cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=n(this,xi).operatorList;if(!t)return!1;const{annotationCanvasMap:e}=n(this,xi);return t.form||t.canvas&&(e==null?void 0:e.size)>0}}xi=new WeakMap;var Ti,Hn;const Qi=class Qi{constructor({callback:t,params:e,objs:s,commonObjs:i,annotationCanvasMap:r,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:h,useRequestAnimationFrame:c=!1,pdfBug:f=!1,pageColors:g=null}){u(this,Ti,null);this.callback=t,this.params=e,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=r,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=h,this._pdfBug=f,this.pageColors=g,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=c===!0&&typeof window!="undefined",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new ay(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var o,l;if(this.cancelled)return;if(this._canvas){if(n(Qi,Hn).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");n(Qi,Hn).add(this._canvas)}this._pdfBug&&((o=globalThis.StepperManager)!=null&&o.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:s,viewport:i,transform:r,background:a}=this.params;this.gfx=new Ir(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:r,viewport:i,transparency:t,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,(l=this.graphicsReadyCallback)==null||l.call(this)}cancel(t=null,e=0){var s;this.running=!1,this.cancelled=!0,(s=this.gfx)==null||s.endDrawing(),n(this,Ti)&&(window.cancelAnimationFrame(n(this,Ti)),p(this,Ti,null)),n(Qi,Hn).delete(this._canvas),this.callback(t||new up(`Rendering cancelled, page ${this._pageIndex+1}`,e))}operatorListChanged(){var t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?p(this,Ti,window.requestAnimationFrame(()=>{p(this,Ti,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){return I(this,null,function*(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),n(Qi,Hn).delete(this._canvas),this.callback())))})}};Ti=new WeakMap,Hn=new WeakMap,u(Qi,Hn,new WeakSet);let Mf=Qi;const oy="4.10.38",ly="f9bea397f";function Yp(d){return Math.floor(Math.max(0,Math.min(1,d))*255).toString(16).padStart(2,"0")}function bo(d){return Math.max(0,Math.min(255,255*d))}class Kp{static CMYK_G([t,e,s,i]){return["G",1-Math.min(1,.3*t+.59*s+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=bo(t),[t,t,t]}static G_HTML([t]){const e=Yp(t);return`#${e}${e}${e}`}static RGB_G([t,e,s]){return["G",.3*t+.59*e+.11*s]}static RGB_rgb(t){return t.map(bo)}static RGB_HTML(t){return`#${t.map(Yp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,s,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,s+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,s,i]){return[bo(1-Math.min(1,t+i)),bo(1-Math.min(1,s+i)),bo(1-Math.min(1,e+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,s]){const i=1-t,r=1-e,a=1-s,o=Math.min(i,r,a);return["CMYK",i,r,a,o]}}class hy{create(t,e,s=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){rt("Abstract method `_createSVG` called.")}}class Ap extends hy{_createSVG(t){return document.createElementNS(_s,t)}}class rm{static setupStorage(t,e,s,i,r){const a=i.getValue(e,{value:null});switch(s.name){case"textarea":if(a.value!==null&&(t.textContent=a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})});break;case"input":if(s.attributes.type==="radio"||s.attributes.type==="checkbox"){if(a.value===s.attributes.xfaOn?t.setAttribute("checked",!0):a.value===s.attributes.xfaOff&&t.removeAttribute("checked"),r==="print")break;t.addEventListener("change",o=>{i.setValue(e,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&t.setAttribute("value",a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})})}break;case"select":if(a.value!==null){t.setAttribute("value",a.value);for(const o of s.children)o.attributes.value===a.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}t.addEventListener("input",o=>{const l=o.target.options,h=l.selectedIndex===-1?"":l[l.selectedIndex].value;i.setValue(e,{value:h})});break}}static setAttributes({html:t,element:e,storage:s=null,intent:i,linkService:r}){const{attributes:a}=e,o=t instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${i}`);for(const[l,h]of Object.entries(a))if(h!=null)switch(l){case"class":h.length&&t.setAttribute(l,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!o||l!=="href"&&l!=="newWindow")&&t.setAttribute(l,h)}o&&r.addLinkAttributes(t,a.href,a.newWindow),s&&a.dataId&&this.setupStorage(t,a.dataId,e,s)}static render(t){var f,g;const e=t.annotationStorage,s=t.linkService,i=t.xfaHtml,r=t.intent||"display",a=document.createElement(i.name);i.attributes&&this.setAttributes({html:a,element:i,intent:r,linkService:s});const o=r!=="richText",l=t.div;if(l.append(a),t.viewport){const m=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=m}o&&l.setAttribute("class","xfaLayer xfaFont");const h=[];if(i.children.length===0){if(i.value){const m=document.createTextNode(i.value);a.append(m),o&&Bo.shouldBuildText(i.name)&&h.push(m)}return{textDivs:h}}const c=[[i,-1,a]];for(;c.length>0;){const[m,A,y]=c.at(-1);if(A+1===m.children.length){c.pop();continue}const v=m.children[++c.at(-1)[1]];if(v===null)continue;const{name:w}=v;if(w==="#text"){const E=document.createTextNode(v.value);h.push(E),y.append(E);continue}const _=(f=v==null?void 0:v.attributes)!=null&&f.xmlns?document.createElementNS(v.attributes.xmlns,w):document.createElement(w);if(y.append(_),v.attributes&&this.setAttributes({html:_,element:v,storage:e,intent:r,linkService:s}),((g=v.children)==null?void 0:g.length)>0)c.push([v,-1,_]);else if(v.value){const E=document.createTextNode(v.value);o&&Bo.shouldBuildText(w)&&h.push(E),_.append(E)}}for(const m of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))m.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const Zh=1e3,cy=9,yr=new WeakSet;function $i(d){return{width:d[2]-d[0],height:d[3]-d[1]}}class dy{static create(t){switch(t.data.annotationType){case vt.LINK:return new am(t);case vt.TEXT:return new uy(t);case vt.WIDGET:switch(t.data.fieldType){case"Tx":return new fy(t);case"Btn":return t.data.radioButton?new hm(t):t.data.checkBox?new gy(t):new my(t);case"Ch":return new by(t);case"Sig":return new py(t)}return new wr(t);case vt.POPUP:return new If(t);case vt.FREETEXT:return new pm(t);case vt.LINE:return new yy(t);case vt.SQUARE:return new wy(t);case vt.CIRCLE:return new vy(t);case vt.POLYLINE:return new gm(t);case vt.CARET:return new Sy(t);case vt.INK:return new yp(t);case vt.POLYGON:return new _y(t);case vt.HIGHLIGHT:return new mm(t);case vt.UNDERLINE:return new Ey(t);case vt.SQUIGGLY:return new Cy(t);case vt.STRIKEOUT:return new xy(t);case vt.STAMP:return new bm(t);case vt.FILEATTACHMENT:return new Ty(t);default:return new At(t)}}}var zn,va,_a,Ql,Lf;const Sp=class Sp{constructor(t,{isRenderable:e=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}={}){u(this,Ql);u(this,zn,null);u(this,va,!1);u(this,_a,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(s)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:t,contentsObj:e,richText:s}){return!!(t!=null&&t.str||e!=null&&e.str||s!=null&&s.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Sp._hasPopupData(this.data)}updateEdited(t){var s;if(!this.container)return;n(this,zn)||p(this,zn,{rect:this.data.rect.slice(0)});const{rect:e}=t;e&&b(this,Ql,Lf).call(this,e),(s=n(this,_a))==null||s.popup.updateEdited(t)}resetEdited(){var t;n(this,zn)&&(b(this,Ql,Lf).call(this,n(this,zn).rect),(t=n(this,_a))==null||t.popup.resetEdited(),p(this,zn,null))}_createContainer(t){const{data:e,parent:{page:s,viewport:i}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",e.id),this instanceof wr||(r.tabIndex=Zh);const{style:a}=r;if(a.zIndex=this.parent.zIndex++,e.alternativeText&&(r.title=e.alternativeText),e.noRotate&&r.classList.add("norotate"),!e.rect||this instanceof If){const{rotation:y}=e;return!e.hasOwnCanvas&&y!==0&&this.setRotation(y,r),r}const{width:o,height:l}=$i(e.rect);if(!t&&e.borderStyle.width>0){a.borderWidth=`${e.borderStyle.width}px`;const y=e.borderStyle.horizontalCornerRadius,v=e.borderStyle.verticalCornerRadius;if(y>0||v>0){const _=`calc(${y}px * var(--scale-factor)) / calc(${v}px * var(--scale-factor))`;a.borderRadius=_}else if(this instanceof hm){const _=`calc(${o}px * var(--scale-factor)) / calc(${l}px * var(--scale-factor))`;a.borderRadius=_}switch(e.borderStyle.style){case po.SOLID:a.borderStyle="solid";break;case po.DASHED:a.borderStyle="dashed";break;case po.BEVELED:U("Unimplemented border style: beveled");break;case po.INSET:U("Unimplemented border style: inset");break;case po.UNDERLINE:a.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(p(this,va,!0),a.borderColor=N.makeHexColor(w[0]|0,w[1]|0,w[2]|0)):a.borderWidth=0}const h=N.normalizeRect([e.rect[0],s.view[3]-e.rect[1]+s.view[1],e.rect[2],s.view[3]-e.rect[3]+s.view[1]]),{pageWidth:c,pageHeight:f,pageX:g,pageY:m}=i.rawDims;a.left=`${100*(h[0]-g)/c}%`,a.top=`${100*(h[1]-m)/f}%`;const{rotation:A}=e;return e.hasOwnCanvas||A===0?(a.width=`${100*o/c}%`,a.height=`${100*l/f}%`):this.setRotation(A,r),r}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:s,pageHeight:i}=this.parent.viewport.rawDims,{width:r,height:a}=$i(this.data.rect);let o,l;t%180===0?(o=100*r/s,l=100*a/i):(o=100*a/s,l=100*r/i),e.style.width=`${o}%`,e.style.height=`${l}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,s,i)=>{const r=i.detail[e],a=r[0],o=r.slice(1);i.target.style[s]=Kp[`${a}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[s]:Kp[`${a}_rgb`](o)})};return q(this,"_commonActions",{display:e=>{const{display:s}=e.detail,i=s%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:s===1||s===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:s}=e.detail;this.container.style.visibility=s?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:s,noView:s})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const s=e.detail.rotation;this.setRotation(s),this.annotationStorage.setValue(this.data.id,{rotation:s})}})}_dispatchEventFromSandbox(t,e){const s=this._commonActions;for(const i of Object.keys(e.detail)){const r=t[i]||s[i];r==null||r(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const s=this._commonActions;for(const[i,r]of Object.entries(e)){const a=s[i];if(a){const o={detail:{[i]:r},target:t};a(o),delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,s,i,r]=this.data.rect.map(y=>Math.fround(y));if(t.length===8){const[y,v,w,_]=t.subarray(2,6);if(i===y&&r===v&&e===w&&s===_)return}const{style:a}=this.container;let o;if(n(this,va)){const{borderColor:y,borderWidth:v}=a;a.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const l=i-e,h=r-s,{svgFactory:c}=this,f=c.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0);const g=c.createElement("defs");f.append(g);const m=c.createElement("clipPath"),A=`clippath_${this.data.id}`;m.setAttribute("id",A),m.setAttribute("clipPathUnits","objectBoundingBox"),g.append(m);for(let y=2,v=t.length;y`)}n(this,va)&&(o.push("')"),a.backgroundImage=o.join("")),this.container.append(f),this.container.style.clipPath=`url(#${A})`}_createPopup(){const{data:t}=this,e=p(this,_a,new If({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(e.render())}render(){rt("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const s=[];if(this._fieldObjects){const i=this._fieldObjects[t];if(i)for(const{page:r,id:a,exportValues:o}of i){if(r===-1||a===e)continue;const l=typeof o=="string"?o:null,h=document.querySelector(`[data-element-id="${a}"]`);if(h&&!yr.has(h)){U(`_getElementsByName - element not allowed: ${a}`);continue}s.push({id:a,exportValue:l,domElement:h})}return s}for(const i of document.getElementsByName(t)){const{exportValue:r}=i,a=i.getAttribute("data-element-id");a!==e&&yr.has(i)&&s.push({id:a,exportValue:r,domElement:i})}return s}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var s;(s=this.linkService.eventBus)==null||s.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})})}};zn=new WeakMap,va=new WeakMap,_a=new WeakMap,Ql=new WeakSet,Lf=function(t){const{container:{style:e},data:{rect:s,rotation:i},parent:{viewport:{rawDims:{pageWidth:r,pageHeight:a,pageX:o,pageY:l}}}}=this;s==null||s.splice(0,4,...t);const{width:h,height:c}=$i(t);e.left=`${100*(t[0]-o)/r}%`,e.top=`${100*(a-t[3]+l)/a}%`,i===0?(e.width=`${100*h/r}%`,e.height=`${100*c/a}%`):this.setRotation(i)};let At=Sp;var $s,Xi,Od,om,Bd,lm;class am extends At{constructor(e,s=null){super(e,{isRenderable:!0,ignoreBorder:!!(s!=null&&s.ignoreBorder),createQuadrilaterals:!0});u(this,$s);u(this,Od);u(this,Bd);this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:s}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let r=!1;return e.url?(s.addLinkAttributes(i,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(i,e.action),r=!0):e.attachment?(b(this,Od,om).call(this,i,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(b(this,Bd,lm).call(this,i,e.setOCGState),r=!0):e.dest?(this._bindLink(i,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),r=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(i,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(i),this.container}_bindLink(e,s){e.href=this.linkService.getDestinationHash(s),e.onclick=()=>(s&&this.linkService.goToDestination(s),!1),(s||s==="")&&b(this,$s,Xi).call(this)}_bindNamedAction(e,s){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(s),!1),b(this,$s,Xi).call(this)}_bindJSAction(e,s){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(s.actions)){const a=i.get(r);a&&(e[a]=()=>{var o;return(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:s.id,name:r}}),!1})}e.onclick||(e.onclick=()=>!1),b(this,$s,Xi).call(this)}_bindResetFormAction(e,s){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),b(this,$s,Xi).call(this),!this._fieldObjects){U('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(e.onclick=()=>!1);return}e.onclick=()=>{var f;i==null||i();const{fields:r,refs:a,include:o}=s,l=[];if(r.length!==0||a.length!==0){const g=new Set(a);for(const m of r){const A=this._fieldObjects[m]||[];for(const{id:y}of A)g.add(y)}for(const m of Object.values(this._fieldObjects))for(const A of m)g.has(A.id)===o&&l.push(A)}else for(const g of Object.values(this._fieldObjects))l.push(...g);const h=this.annotationStorage,c=[];for(const g of l){const{id:m}=g;switch(c.push(m),g.type){case"text":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}case"checkbox":case"radiobutton":{const y=g.defaultValue===g.exportValues;h.setValue(m,{value:y});break}case"combobox":case"listbox":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}default:continue}const A=document.querySelector(`[data-element-id="${m}"]`);if(A){if(!yr.has(A)){U(`_bindResetFormAction - element not allowed: ${m}`);continue}}else continue;A.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}})),!1}}}$s=new WeakSet,Xi=function(){this.container.setAttribute("data-internal-link","")},Od=new WeakSet,om=function(e,s,i=null){e.href=this.linkService.getAnchorUrl(""),s.description&&(e.title=s.description),e.onclick=()=>{var r;return(r=this.downloadManager)==null||r.openOrDownloadData(s.content,s.filename,i),!1},b(this,$s,Xi).call(this)},Bd=new WeakSet,lm=function(e,s){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(s),!1),b(this,$s,Xi).call(this)};class uy extends At{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class wr extends At{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return ee.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,s,i,r){s.includes("mouse")?t.addEventListener(s,a=>{var o;(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):t.addEventListener(s,a=>{var o;if(s==="blur"){if(!e.focused||!a.relatedTarget)return;e.focused=!1}else if(s==="focus"){if(e.focused)return;e.focused=!0}r&&((o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a)}}))})}_setEventListeners(t,e,s,i){var r,a,o;for(const[l,h]of s)(h==="Action"||(r=this.data.actions)!=null&&r[h])&&((h==="Focus"||h==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,l,h,i),h==="Focus"&&!((a=this.data.actions)!=null&&a.Blur)?this._setEventListener(t,e,"blur","Blur",null):h==="Blur"&&!((o=this.data.actions)!=null&&o.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":N.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:s}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||cy,r=t.style;let a;const o=2,l=h=>Math.round(10*h)/10;if(this.data.multiLine){const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o),c=Math.round(h/($u*i))||1,f=h/c;a=Math.min(i,l(f/$u))}else{const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o);a=Math.min(i,l(h/$u))}r.fontSize=`calc(${a}px * var(--scale-factor))`,r.color=N.makeHexColor(s[0],s[1],s[2]),this.data.textAlignment!==null&&(r.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class fy extends wr{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,s,i){const r=this.annotationStorage;for(const a of this._getElementsByName(t.name,t.id))a.domElement&&(a.domElement[e]=s),r.setValue(a.id,{[i]:s})}render(){var i,r;const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const a=t.getValue(e,{value:this.data.fieldValue});let o=a.value||"";const l=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;l&&o.length>l&&(o=o.slice(0,l));let h=a.formattedValue||((i=this.data.textContent)==null?void 0:i.join(` +`))||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));const c={userValue:o,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=h!=null?h:o,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type="text",s.setAttribute("value",h!=null?h:o),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),yr.add(s),s.setAttribute("data-element-id",e),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=Zh,this._setRequired(s,this.data.required),l&&(s.maxLength=l),s.addEventListener("input",g=>{t.setValue(e,{value:g.target.value}),this.setPropertyOnSiblings(s,"value",g.target.value,"value"),c.formattedValue=null}),s.addEventListener("resetform",g=>{var A;const m=(A=this.data.defaultFieldValue)!=null?A:"";s.value=c.userValue=m,c.formattedValue=null});let f=g=>{const{formattedValue:m}=c;m!=null&&(g.target.value=m),g.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",m=>{var y;if(c.focused)return;const{target:A}=m;c.userValue&&(A.value=c.userValue),c.lastCommittedValue=A.value,c.commitKey=1,(y=this.data.actions)!=null&&y.Focus||(c.focused=!0)}),s.addEventListener("updatefromsandbox",m=>{this.showElementAndHideCanvas(m.target);const A={value(y){var v;c.userValue=(v=y.detail.value)!=null?v:"",t.setValue(e,{value:c.userValue.toString()}),y.target.value=c.userValue},formattedValue(y){const{formattedValue:v}=y.detail;c.formattedValue=v,v!=null&&y.target!==document.activeElement&&(y.target.value=v),t.setValue(e,{formattedValue:v})},selRange(y){y.target.setSelectionRange(...y.detail.selRange)},charLimit:y=>{var E;const{charLimit:v}=y.detail,{target:w}=y;if(v===0){w.removeAttribute("maxLength");return}w.setAttribute("maxLength",v);let _=c.userValue;!_||_.length<=v||(_=_.slice(0,v),w.value=c.userValue=_,t.setValue(e,{value:_}),(E=this.linkService.eventBus)==null||E.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,commitKey:1,selStart:w.selectionStart,selEnd:w.selectionEnd}}))}};this._dispatchEventFromSandbox(A,m)}),s.addEventListener("keydown",m=>{var v;c.commitKey=1;let A=-1;if(m.key==="Escape"?A=0:m.key==="Enter"&&!this.data.multiLine?A=2:m.key==="Tab"&&(c.commitKey=3),A===-1)return;const{value:y}=m.target;c.lastCommittedValue!==y&&(c.lastCommittedValue=y,c.userValue=y,(v=this.linkService.eventBus)==null||v.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:y,willCommit:!0,commitKey:A,selStart:m.target.selectionStart,selEnd:m.target.selectionEnd}}))});const g=f;f=null,s.addEventListener("blur",m=>{var y,v;if(!c.focused||!m.relatedTarget)return;(y=this.data.actions)!=null&&y.Blur||(c.focused=!1);const{value:A}=m.target;c.userValue=A,c.lastCommittedValue!==A&&((v=this.linkService.eventBus)==null||v.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:A,willCommit:!0,commitKey:c.commitKey,selStart:m.target.selectionStart,selEnd:m.target.selectionEnd}})),g(m)}),(r=this.data.actions)!=null&&r.Keystroke&&s.addEventListener("beforeinput",m=>{var C;c.lastCommittedValue=null;const{data:A,target:y}=m,{value:v,selectionStart:w,selectionEnd:_}=y;let E=w,S=_;switch(m.inputType){case"deleteWordBackward":{const T=v.substring(0,w).match(/\w*[^\w]*$/);T&&(E-=T[0].length);break}case"deleteWordForward":{const T=v.substring(w).match(/^[^\w]*\w*/);T&&(S+=T[0].length);break}case"deleteContentBackward":w===_&&(E-=1);break;case"deleteContentForward":w===_&&(S+=1);break}m.preventDefault(),(C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:v,change:A||"",willCommit:!1,selStart:E,selEnd:S}})}),this._setEventListeners(s,c,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],m=>m.target.value)}if(f&&s.addEventListener("blur",f),this.data.comb){const m=(this.data.rect[2]-this.data.rect[0])/l;s.classList.add("comb"),s.style.letterSpacing=`calc(${m}px * var(--scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class py extends wr{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class gy extends wr{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.exportValue===e.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",t.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");return yr.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="checkbox",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.setAttribute("exportValue",e.exportValue),r.tabIndex=Zh,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s)){const c=l&&h.exportValue===e.exportValue;h.domElement&&(h.domElement.checked=c),t.setValue(h.id,{value:c})}t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue||"Off";a.target.checked=o===e.exportValue}),this.enableScripting&&this.hasJSActions&&(r.addEventListener("updatefromsandbox",a=>{const o={value(l){l.target.checked=l.detail.value!=="Off",t.setValue(s,{value:l.target.checked})}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class hm extends wr{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.fieldValue===e.buttonValue}).value;if(typeof i=="string"&&(i=i!==e.buttonValue,t.setValue(s,{value:i})),i)for(const a of this._getElementsByName(e.fieldName,s))t.setValue(a.id,{value:!1});const r=document.createElement("input");if(yr.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="radio",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.tabIndex=Zh,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s))t.setValue(h.id,{value:!1});t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue;a.target.checked=o!=null&&o===e.buttonValue}),this.enableScripting&&this.hasJSActions){const a=e.buttonValue;r.addEventListener("updatefromsandbox",o=>{const l={value:h=>{const c=a===h.detail.value;for(const f of this._getElementsByName(h.target.name)){const g=c&&f.id===s;f.domElement&&(f.domElement.checked=g),t.setValue(f.id,{value:g})}}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}return this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class my extends am{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",s=>{this._dispatchEventFromSandbox({},s)})),t}}class by extends wr{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,s=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");yr.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=Zh;let r=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",c=>{const f=this.data.defaultFieldValue;for(const g of i.options)g.selected=g.value===f});for(const c of this.data.options){const f=document.createElement("option");f.textContent=c.displayValue,f.value=c.exportValue,s.value.includes(c.exportValue)&&(f.setAttribute("selected",!0),r=!1),i.append(f)}let a=null;if(r){const c=document.createElement("option");c.value=" ",c.setAttribute("hidden",!0),c.setAttribute("selected",!0),i.prepend(c),a=()=>{c.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}const o=c=>{const f=c?"value":"textContent",{options:g,multiple:m}=i;return m?Array.prototype.filter.call(g,A=>A.selected).map(A=>A[f]):g.selectedIndex===-1?null:g[g.selectedIndex][f]};let l=o(!1);const h=c=>{const f=c.target.options;return Array.prototype.map.call(f,g=>({displayValue:g.textContent,exportValue:g.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",c=>{const f={value(g){a==null||a();const m=g.detail.value,A=new Set(Array.isArray(m)?m:[m]);for(const y of i.options)y.selected=A.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(g){i.multiple=!0},remove(g){const m=i.options,A=g.detail.remove;m[A].selected=!1,i.remove(A),m.length>0&&Array.prototype.findIndex.call(m,v=>v.selected)===-1&&(m[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},clear(g){for(;i.length!==0;)i.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(g){const{index:m,displayValue:A,exportValue:y}=g.detail.insert,v=i.children[m],w=document.createElement("option");w.textContent=A,w.value=y,v?v.before(w):i.append(w),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},items(g){const{items:m}=g.detail;for(;i.length!==0;)i.remove(0);for(const A of m){const{displayValue:y,exportValue:v}=A,w=document.createElement("option");w.textContent=y,w.value=v,i.append(w)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},indices(g){const m=new Set(g.detail.indices);for(const A of g.target.options)A.selected=m.has(A.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(g){g.target.disabled=!g.detail.editable}};this._dispatchEventFromSandbox(f,c)}),i.addEventListener("input",c=>{var m;const f=o(!0),g=o(!1);t.setValue(e,{value:f}),c.preventDefault(),(m=this.linkService.eventBus)==null||m.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:g,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],c=>c.target.value)):i.addEventListener("input",function(c){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class If extends At{constructor(t){const{data:e,elements:s}=t;super(t,{isRenderable:At._hasPopupData(e)}),this.elements=s,this.popup=null}render(){this.container.classList.add("popupAnnotation");const t=this.popup=new Ay({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),e=[];for(const s of this.elements)s.popup=t,s.container.ariaHasPopup="dialog",e.push(s.data.id),s.addHighlightArea();return this.container.setAttribute("aria-controls",e.map(s=>`${dp}${s}`).join(",")),this.container}}var Sa,Hd,zd,Ea,$n,pt,Gs,Ca,Jl,Zl,xa,Vs,$e,Us,th,js,eh,Gn,Vn,Ta,wc,sh,Df,$d,cm,Gd,dm,Vd,um,Ud,fm,Pa,vc,Ra,_c,ih,Ff;class Ay{constructor({container:t,color:e,elements:s,titleObj:i,modificationDate:r,contentsObj:a,richText:o,parent:l,rect:h,parentRect:c,open:f}){u(this,Ta);u(this,sh);u(this,$d);u(this,Gd);u(this,Vd);u(this,Ud);u(this,Pa);u(this,Ra);u(this,ih);u(this,Sa,b(this,Vd,um).bind(this));u(this,Hd,b(this,ih,Ff).bind(this));u(this,zd,b(this,Ra,_c).bind(this));u(this,Ea,b(this,Pa,vc).bind(this));u(this,$n,null);u(this,pt,null);u(this,Gs,null);u(this,Ca,null);u(this,Jl,null);u(this,Zl,null);u(this,xa,null);u(this,Vs,!1);u(this,$e,null);u(this,Us,null);u(this,th,null);u(this,js,null);u(this,eh,null);u(this,Gn,null);u(this,Vn,!1);var g;p(this,pt,t),p(this,eh,i),p(this,Gs,a),p(this,js,o),p(this,Zl,l),p(this,$n,e),p(this,th,h),p(this,xa,c),p(this,Jl,s),p(this,Ca,pp.toDateObject(r)),this.trigger=s.flatMap(m=>m.getElementsToTriggerPopup());for(const m of this.trigger)m.addEventListener("click",n(this,Ea)),m.addEventListener("mouseenter",n(this,zd)),m.addEventListener("mouseleave",n(this,Hd)),m.classList.add("popupTriggerArea");for(const m of s)(g=m.container)==null||g.addEventListener("keydown",n(this,Sa));n(this,pt).hidden=!0,f&&b(this,Pa,vc).call(this)}render(){if(n(this,$e))return;const t=p(this,$e,document.createElement("div"));if(t.className="popup",n(this,$n)){const r=t.style.outlineColor=N.makeHexColor(...n(this,$n));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?t.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`:t.style.backgroundColor=N.makeHexColor(...n(this,$n).map(o=>Math.floor(.7*(255-o)+o)))}const e=document.createElement("span");e.className="header";const s=document.createElement("h1");if(e.append(s),{dir:s.dir,str:s.textContent}=n(this,eh),t.append(e),n(this,Ca)){const r=document.createElement("span");r.classList.add("popupDate"),r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:n(this,Ca).valueOf()})),e.append(r)}const i=n(this,Ta,wc);if(i)rm.render({xfaHtml:i,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const r=this._formatContents(n(this,Gs));t.append(r)}n(this,pt).append(t)}_formatContents({str:t,dir:e}){const s=document.createElement("p");s.classList.add("popupContent"),s.dir=e;const i=t.split(/(?:\r\n?|\n)/);for(let r=0,a=i.length;r=0&&a.setAttribute("stroke-width",s||1),i)for(let o=0,l=n(this,Un).length;o{a.key==="Enter"&&(r?a.metaKey:a.ctrlKey)&&b(this,dh,Of).call(this)}),!s.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return n(this,ch)}addHighlightArea(){this.container.classList.add("highlightArea")}}ch=new WeakMap,dh=new WeakSet,Of=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};var uh,jn,Wn,fh,jd,Am,ph,Bf;class Py{constructor({div:t,accessibilityManager:e,annotationCanvasMap:s,annotationEditorUIManager:i,page:r,viewport:a,structTreeLayer:o}){u(this,jd);u(this,ph);u(this,uh,null);u(this,jn,null);u(this,Wn,new Map);u(this,fh,null);this.div=t,p(this,uh,e),p(this,jn,s),p(this,fh,o||null),this.page=r,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return n(this,Wn).size>0}render(t){return I(this,null,function*(){var a;const{annotations:e}=t,s=this.div;br(s,this.viewport);const i=new Map,r={data:null,layer:s,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new Ap,annotationStorage:t.annotationStorage||new mp,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of e){if(o.noHTML)continue;const l=o.annotationType===vt.POPUP;if(l){const f=i.get(o.id);if(!f)continue;r.elements=f}else{const{width:f,height:g}=$i(o.rect);if(f<=0||g<=0)continue}r.data=o;const h=dy.create(r);if(!h.isRenderable)continue;if(!l&&o.popupRef){const f=i.get(o.popupRef);f?f.push(h):i.set(o.popupRef,[h])}const c=h.render();o.hidden&&(c.style.visibility="hidden"),yield b(this,jd,Am).call(this,c,o.id),h._isEditable&&(n(this,Wn).set(h.data.id,h),(a=this._annotationEditorUIManager)==null||a.renderAnnotationElement(h))}b(this,ph,Bf).call(this)})}update({viewport:t}){const e=this.div;this.viewport=t,br(e,{rotation:t.rotation}),b(this,ph,Bf).call(this),e.hidden=!1}getEditableAnnotations(){return Array.from(n(this,Wn).values())}getEditableAnnotation(t){return n(this,Wn).get(t)}}uh=new WeakMap,jn=new WeakMap,Wn=new WeakMap,fh=new WeakMap,jd=new WeakSet,Am=function(t,e){return I(this,null,function*(){var a,o;const s=t.firstChild||t,i=s.id=`${dp}${e}`,r=yield(a=n(this,fh))==null?void 0:a.getAriaAttributes(i);if(r)for(const[l,h]of r)s.setAttribute(l,h);this.div.append(t),(o=n(this,uh))==null||o.moveElementInDOM(this.div,t,s,!1)})},ph=new WeakSet,Bf=function(){if(!n(this,jn))return;const t=this.div;for(const[e,s]of n(this,jn)){const i=t.querySelector(`[data-annotation-id="${e}"]`);if(!i)continue;s.className="annotationContent";const{firstChild:r}=i;r?r.nodeName==="CANVAS"?r.replaceWith(s):r.classList.contains("annotationContent")?r.after(s):r.before(s):i.append(s)}n(this,jn).clear()};const nc=/\r\n?|\n/g;var Ge,ge,gh,Xn,me,Wd,ym,Xd,wm,qd,vm,ka,Sc,Ma,Ec,La,Cc,Yd,_m,mh,zf,Kd,Sm;const it=class it extends ut{constructor(e){super(_r(vs({},e),{name:"freeTextEditor"}));u(this,Wd);u(this,Xd);u(this,qd);u(this,ka);u(this,La);u(this,Yd);u(this,Kd);u(this,Ge,void 0);u(this,ge,"");u(this,gh,`${this.id}-editor`);u(this,Xn,null);u(this,me,void 0);p(this,Ge,e.color||it._defaultColor||ut._defaultLineColor),p(this,me,e.fontSize||it._defaultFontSize)}static get _keyboardManager(){const e=it.prototype,s=a=>a.isEmpty(),i=Ar.TRANSLATE_SMALL,r=Ar.TRANSLATE_BIG;return q(this,"_keyboardManager",new Jh([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:s}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:s}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:s}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:s}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:s}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:s}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:s}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:s}]]))}static initialize(e,s){ut.initialize(e,s);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,s){switch(e){case J.FREETEXT_SIZE:it._defaultFontSize=s;break;case J.FREETEXT_COLOR:it._defaultColor=s;break}}updateParams(e,s){switch(e){case J.FREETEXT_SIZE:b(this,Wd,ym).call(this,s);break;case J.FREETEXT_COLOR:b(this,Xd,wm).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[J.FREETEXT_SIZE,it._defaultFontSize],[J.FREETEXT_COLOR,it._defaultColor||ut._defaultLineColor]]}get propertiesToUpdate(){return[[J.FREETEXT_SIZE,n(this,me)],[J.FREETEXT_COLOR,n(this,Ge)]]}_translateEmpty(e,s){this._uiManager.translateSelectedEditors(e,s,!0)}getInitialTranslation(){const e=this.parentScale;return[-it._internalPadding*e,-(it._internalPadding+n(this,me))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(V.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),p(this,Xn,new AbortController);const e=this._uiManager.combinedSignal(n(this,Xn));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){var e;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",n(this,gh)),this._isDraggable=!0,(e=n(this,Xn))==null||e.abort(),p(this,Xn,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){var s;this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),(s=this._initialOptions)!=null&&s.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=n(this,ge),s=p(this,ge,b(this,qd,vm).call(this).trimEnd());if(e===s)return;const i=r=>{if(p(this,ge,r),!r){this.remove();return}b(this,La,Cc).call(this),this._uiManager.rebuild(this),b(this,ka,Sc).call(this)};this.addCommands({cmd:()=>{i(s)},undo:()=>{i(e)},mustExec:!1}),b(this,ka,Sc).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){it._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,s;this.width&&(e=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",n(this,gh)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${n(this,me)}px * var(--scale-factor))`,i.color=n(this,Ge),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),Oc(this,this.div,["dblclick","keydown"]),this.width){const[r,a]=this.parentDimensions;if(this.annotationElementId){const{position:o}=this._initialData;let[l,h]=this.getInitialTranslation();[l,h]=this.pageTranslationToScreen(l,h);const[c,f]=this.pageDimensions,[g,m]=this.pageTranslation;let A,y;switch(this.rotation){case 0:A=e+(o[0]-g)/c,y=s+this.height-(o[1]-m)/f;break;case 90:A=e+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[h,-l];break;case 180:A=e-this.width+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[-l,-h];break;case 270:A=e+(o[0]-g-this.height*f)/c,y=s+(o[1]-m-this.width*c)/f,[l,h]=[-h,l];break}this.setAt(A*r,y*a,l,h)}else this.setAt(e*r,s*a,this.width*r,this.height*a);b(this,La,Cc).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var A,y,v;const s=e.clipboardData||window.clipboardData,{types:i}=s;if(i.length===1&&i[0]==="text/plain")return;e.preventDefault();const r=b(A=it,mh,zf).call(A,s.getData("text")||"").replaceAll(nc,` +`);if(!r)return;const a=window.getSelection();if(!a.rangeCount)return;this.editorDiv.normalize(),a.deleteFromDocument();const o=a.getRangeAt(0);if(!r.includes(` +`)){o.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),a.collapseToStart();return}const{startContainer:l,startOffset:h}=o,c=[],f=[];if(l.nodeType===Node.TEXT_NODE){const w=l.parentElement;if(f.push(l.nodeValue.slice(h).replaceAll(nc,"")),w!==this.editorDiv){let _=c;for(const E of this.editorDiv.childNodes){if(E===w){_=f;continue}_.push(b(y=it,Ma,Ec).call(y,E))}}c.push(l.nodeValue.slice(0,h).replaceAll(nc,""))}else if(l===this.editorDiv){let w=c,_=0;for(const E of this.editorDiv.childNodes)_++===h&&(w=f),w.push(b(v=it,Ma,Ec).call(v,E))}p(this,ge,`${c.join(` +`)}${r}${f.join(` +`)}`),b(this,La,Cc).call(this);const g=new Range;let m=c.reduce((w,_)=>w+_.length,0);for(const{firstChild:w}of this.editorDiv.childNodes)if(w.nodeType===Node.TEXT_NODE){const _=w.nodeValue.length;if(m<=_){g.setStart(w,m),g.setEnd(w,m);break}m-=_}a.removeAllRanges(),a.addRange(g)}get contentDiv(){return this.editorDiv}static deserialize(e,s,i){return I(this,null,function*(){var o;let r=null;if(e instanceof pm){const{data:{defaultAppearanceData:{fontSize:l,fontColor:h},rect:c,rotation:f,id:g,popupRef:m},textContent:A,textPosition:y,parent:{page:{pageNumber:v}}}=e;if(!A||A.length===0)return null;r=e={annotationType:V.FREETEXT,color:Array.from(h),fontSize:l,value:A.join(` +`),position:y,pageIndex:v-1,rect:c.slice(0),rotation:f,id:g,deleted:!1,popupRef:m}}const a=yield ji(it,this,"deserialize").call(this,e,s,i);return p(a,me,e.fontSize),p(a,Ge,N.makeHexColor(...e.color)),p(a,ge,b(o=it,mh,zf).call(o,e.value)),a.annotationElementId=e.id||null,a._initialData=r,a})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const s=it._internalPadding*this.parentScale,i=this.getRect(s,s),r=ut._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:n(this,Ge)),a={annotationType:V.FREETEXT,color:r,fontSize:n(this,me),value:b(this,Yd,_m).call(this),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?a:this.annotationElementId&&!b(this,Kd,Sm).call(this,a)?null:(a.id=this.annotationElementId,a)}renderAnnotationElement(e){const s=super.renderAnnotationElement(e);if(this.deleted)return s;const{style:i}=s;i.fontSize=`calc(${n(this,me)}px * var(--scale-factor))`,i.color=n(this,Ge),s.replaceChildren();for(const a of n(this,ge).split(` +`)){const o=document.createElement("div");o.append(a?document.createTextNode(a):document.createElement("br")),s.append(o)}const r=it._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(r,r),popupContent:n(this,ge)}),s}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};Ge=new WeakMap,ge=new WeakMap,gh=new WeakMap,Xn=new WeakMap,me=new WeakMap,Wd=new WeakSet,ym=function(e){const s=r=>{this.editorDiv.style.fontSize=`calc(${r}px * var(--scale-factor))`,this.translate(0,-(r-n(this,me))*this.parentScale),p(this,me,r),b(this,ka,Sc).call(this)},i=n(this,me);this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:J.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},Xd=new WeakSet,wm=function(e){const s=r=>{p(this,Ge,this.editorDiv.style.color=r)},i=n(this,Ge);this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:J.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},qd=new WeakSet,vm=function(){var i;const e=[];this.editorDiv.normalize();let s=null;for(const r of this.editorDiv.childNodes)(s==null?void 0:s.nodeType)===Node.TEXT_NODE&&r.nodeName==="BR"||(e.push(b(i=it,Ma,Ec).call(i,r)),s=r);return e.join(` +`)},ka=new WeakSet,Sc=function(){const[e,s]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:r,div:a}=this,o=a.style.display,l=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",r.div.append(this.div),i=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",l)}this.rotation%180===this.parentRotation%180?(this.width=i.width/e,this.height=i.height/s):(this.width=i.height/e,this.height=i.width/s),this.fixAndSetPosition()},Ma=new WeakSet,Ec=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(nc,"")},La=new WeakSet,Cc=function(){if(this.editorDiv.replaceChildren(),!!n(this,ge))for(const e of n(this,ge).split(` +`)){const s=document.createElement("div");s.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(s)}},Yd=new WeakSet,_m=function(){return n(this,ge).replaceAll(" "," ")},mh=new WeakSet,zf=function(e){return e.replaceAll(" "," ")},Kd=new WeakSet,Sm=function(e){const{value:s,fontSize:i,color:r,pageIndex:a}=this._initialData;return this._hasBeenMoved||e.value!==s||e.fontSize!==i||e.color.some((o,l)=>o!==r[l])||e.pageIndex!==a},u(it,Ma),u(it,mh),B(it,"_freeTextDefaultContent",""),B(it,"_internalPadding",0),B(it,"_defaultColor",null),B(it,"_defaultFontSize",10),B(it,"_type","freetext"),B(it,"_editorType",V.FREETEXT);let Hf=it;class L{toSVGPath(){rt("Abstract method `toSVGPath` must be implemented.")}get box(){rt("Abstract getter `box` must be implemented.")}serialize(t,e){rt("Abstract method `serialize` must be implemented.")}static _rescale(t,e,s,i,r,a){a||(a=new Float32Array(t.length));for(let o=0,l=t.length;o=6;i-=6)isNaN(e[i])?s.push(`L${e[i+4]} ${e[i+5]}`):s.push(`C${e[i]} ${e[i+1]} ${e[i+2]} ${e[i+3]} ${e[i+4]} ${e[i+5]}`);return b(this,tu,Cm).call(this,s),s.join(" ")}newFreeDrawOutline(t,e,s,i,r,a){return new km(t,e,s,i,r,a)}getOutlines(){var f,g;const t=n(this,cs),e=n(this,Ve),s=n(this,X),[i,r,a,o]=n(this,be),l=new Float32Array(((g=(f=n(this,Pi))==null?void 0:f.length)!=null?g:0)+2);for(let m=0,A=l.length-2;m=6;m-=6)for(let A=0;A<6;A+=2){if(isNaN(e[m+A])){h[c]=h[c+1]=NaN,c+=2;continue}h[c]=e[m+A],h[c+1]=e[m+A+1],c+=2}return b(this,iu,Pm).call(this,h,c),this.newFreeDrawOutline(h,l,n(this,be),n(this,Fa),n(this,Ia),n(this,Da))}};be=new WeakMap,Ve=new WeakMap,Ia=new WeakMap,Da=new WeakMap,cs=new WeakMap,X=new WeakMap,qn=new WeakMap,Yn=new WeakMap,bh=new WeakMap,Ah=new WeakMap,Fa=new WeakMap,Na=new WeakMap,Pi=new WeakMap,yh=new WeakMap,Qd=new WeakMap,Jd=new WeakMap,Kn=new WeakSet,Ro=function(){const t=n(this,X).subarray(4,6),e=n(this,X).subarray(16,18),[s,i,r,a]=n(this,be);return[(n(this,qn)+(t[0]-e[0])/2-s)/r,(n(this,Yn)+(t[1]-e[1])/2-i)/a,(n(this,qn)+(e[0]-t[0])/2-s)/r,(n(this,Yn)+(e[1]-t[1])/2-i)/a]},Zd=new WeakSet,Em=function(){const[t,e,s,i]=n(this,be),[r,a,o,l]=b(this,Kn,Ro).call(this);return`M${(n(this,X)[2]-t)/s} ${(n(this,X)[3]-e)/i} L${(n(this,X)[4]-t)/s} ${(n(this,X)[5]-e)/i} L${r} ${a} L${o} ${l} L${(n(this,X)[16]-t)/s} ${(n(this,X)[17]-e)/i} L${(n(this,X)[14]-t)/s} ${(n(this,X)[15]-e)/i} Z`},tu=new WeakSet,Cm=function(t){const e=n(this,Ve);t.push(`L${e[4]} ${e[5]} Z`)},eu=new WeakSet,xm=function(t){const[e,s,i,r]=n(this,be),a=n(this,X).subarray(4,6),o=n(this,X).subarray(16,18),[l,h,c,f]=b(this,Kn,Ro).call(this);t.push(`L${(a[0]-e)/i} ${(a[1]-s)/r} L${l} ${h} L${c} ${f} L${(o[0]-e)/i} ${(o[1]-s)/r}`)},su=new WeakSet,Tm=function(t){const e=n(this,X),[s,i,r,a]=n(this,be),[o,l,h,c]=b(this,Kn,Ro).call(this),f=new Float32Array(36);return f.set([NaN,NaN,NaN,NaN,(e[2]-s)/r,(e[3]-i)/a,NaN,NaN,NaN,NaN,(e[4]-s)/r,(e[5]-i)/a,NaN,NaN,NaN,NaN,o,l,NaN,NaN,NaN,NaN,h,c,NaN,NaN,NaN,NaN,(e[16]-s)/r,(e[17]-i)/a,NaN,NaN,NaN,NaN,(e[14]-s)/r,(e[15]-i)/a],0),this.newFreeDrawOutline(f,t,n(this,be),n(this,Fa),n(this,Ia),n(this,Da))},iu=new WeakSet,Pm=function(t,e){const s=n(this,Ve);return t.set([NaN,NaN,NaN,NaN,s[4],s[5]],e),e+=6},nu=new WeakSet,Rm=function(t,e){const s=n(this,X).subarray(4,6),i=n(this,X).subarray(16,18),[r,a,o,l]=n(this,be),[h,c,f,g]=b(this,Kn,Ro).call(this);return t.set([NaN,NaN,NaN,NaN,(s[0]-r)/o,(s[1]-a)/l,NaN,NaN,NaN,NaN,h,c,NaN,NaN,NaN,NaN,f,g,NaN,NaN,NaN,NaN,(i[0]-r)/o,(i[1]-a)/l],e),e+=24},u(xs,yh,8),u(xs,Qd,2),u(xs,Jd,n(xs,yh)+n(xs,Qd));let zc=xs;var Oa,Qn,Ws,wh,Ae,vh,bt,ru,Mm;class km extends L{constructor(e,s,i,r,a,o){super();u(this,ru);u(this,Oa,void 0);u(this,Qn,new Float32Array(4));u(this,Ws,void 0);u(this,wh,void 0);u(this,Ae,void 0);u(this,vh,void 0);u(this,bt,void 0);p(this,bt,e),p(this,Ae,s),p(this,Oa,i),p(this,vh,r),p(this,Ws,a),p(this,wh,o),this.lastPoint=[NaN,NaN],b(this,ru,Mm).call(this,o);const[l,h,c,f]=n(this,Qn);for(let g=0,m=e.length;ge[0]-s[0]||e[1]-s[1]||e[2]-s[2]);const t=[];for(const e of n(this,Ri))e[3]?(t.push(...b(this,Eh,Gf).call(this,e)),b(this,ou,Im).call(this,e)):(b(this,lu,Dm).call(this,e),t.push(...b(this,Eh,Gf).call(this,e)));return b(this,au,Lm).call(this,t)}}_h=new WeakMap,Sh=new WeakMap,Ri=new WeakMap,Ue=new WeakMap,au=new WeakSet,Lm=function(t){const e=[],s=new Set;for(const a of t){const[o,l,h]=a;e.push([o,l,a],[o,h,a])}e.sort((a,o)=>a[1]-o[1]||a[0]-o[0]);for(let a=0,o=e.length;a0;){const a=s.values().next().value;let[o,l,h,c,f]=a;s.delete(a);let g=o,m=l;for(r=[o,h],i.push(r);;){let A;if(s.has(c))A=c;else if(s.has(f))A=f;else break;s.delete(A),[o,l,h,c,f]=A,g!==o&&(r.push(g,m,o,m===l?l:h),g=o),m=m===l?h:l}r.push(g,m)}return new Ry(i,n(this,_h),n(this,Sh))},Ba=new WeakSet,xc=function(t){const e=n(this,Ue);let s=0,i=e.length-1;for(;s<=i;){const r=s+i>>1,a=e[r][0];if(a===t)return r;a=0;i--){const[r,a]=n(this,Ue)[i];if(r!==t)break;if(r===t&&a===e){n(this,Ue).splice(i,1);return}}},Eh=new WeakSet,Gf=function(t){const[e,s,i]=t,r=[[e,s,i]],a=b(this,Ba,xc).call(this,i);for(let o=0;o=l){if(m>h)r[c][1]=h;else{if(f===1)return[];r.splice(c,1),c--,f--}continue}r[c][2]=l,m>h&&r.push([e,h,m])}}}return r};var Ch,Ha;class Ry extends L{constructor(e,s,i){super();u(this,Ch,void 0);u(this,Ha,void 0);p(this,Ha,e),p(this,Ch,s),this.lastPoint=i}toSVGPath(){const e=[];for(const s of n(this,Ha)){let[i,r]=s;e.push(`M${i} ${r}`);for(let a=2;a-1?(p(this,Nt,!0),b(this,Xa,Tc).call(this,e),b(this,Ks,Yi).call(this)):n(this,qs)&&(p(this,Va,e.anchorNode),p(this,Ih,e.anchorOffset),p(this,Dh,e.focusNode),p(this,Fh,e.focusOffset),b(this,Oh,Xf).call(this),b(this,Ks,Yi).call(this),this.rotate(this.rotation))}static get _keyboardManager(){const e=Q.prototype;return q(this,"_keyboardManager",new Jh([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:n(this,Nt)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:n(this,ke),methodOfCreation:n(this,Nh)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}static initialize(e,s){var i;ut.initialize(e,s),Q._defaultColor||(Q._defaultColor=((i=s.highlightColors)==null?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(e,s){switch(e){case J.HIGHLIGHT_DEFAULT_COLOR:Q._defaultColor=s;break;case J.HIGHLIGHT_THICKNESS:Q._defaultThickness=s;break}}translateInPage(e,s){}get toolbarPosition(){return n(this,ja)}updateParams(e,s){switch(e){case J.HIGHLIGHT_COLOR:b(this,cu,Nm).call(this,s);break;case J.HIGHLIGHT_THICKNESS:b(this,du,Om).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[J.HIGHLIGHT_DEFAULT_COLOR,Q._defaultColor],[J.HIGHLIGHT_THICKNESS,Q._defaultThickness]]}get propertiesToUpdate(){return[[J.HIGHLIGHT_COLOR,this.color||Q._defaultColor],[J.HIGHLIGHT_THICKNESS,n(this,ke)||Q._defaultThickness],[J.HIGHLIGHT_FREE,n(this,Nt)]]}addEditToolbar(){return I(this,null,function*(){const e=yield ji(Q.prototype,this,"addEditToolbar").call(this);return e?(this._uiManager.highlightColors&&(p(this,Ua,new $c({editor:this})),e.addColorPicker(n(this,Ua))),e):null})}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(b(this,er,ko).call(this))}getBaseTranslation(){return[0,0]}getRect(e,s){return super.getRect(e,s,b(this,er,ko).call(this))}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){b(this,Bh,qf).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(b(this,Ks,Yi).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let s=!1;this.parent&&!e?b(this,Bh,qf).call(this):e&&(b(this,Ks,Yi).call(this,e),s=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),s&&this.select()}rotate(e){var r,a,o;const{drawLayer:s}=this.parent;let i;n(this,Nt)?(e=(e-this.rotation+360)%360,i=b(r=Q,Mi,Pr).call(r,n(this,Re).box,e)):i=b(a=Q,Mi,Pr).call(a,[this.x,this.y,this.width,this.height],e),s.updateProperties(n(this,ye),{bbox:i,root:{"data-main-rotation":e}}),s.updateProperties(n(this,Ut),{bbox:b(o=Q,Mi,Pr).call(o,n(this,oe).box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;const e=super.render();n(this,Wa)&&(e.setAttribute("aria-label",n(this,Wa)),e.setAttribute("role","mark")),n(this,Nt)?e.classList.add("free"):this.div.addEventListener("keydown",b(this,fu,Hm).bind(this),{signal:this._uiManager._signal});const s=p(this,tr,document.createElement("div"));e.append(s),s.setAttribute("aria-hidden","true"),s.className="internal",s.style.clipPath=n(this,Zn);const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),Oc(this,n(this,tr),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{hovered:!0}})}pointerleave(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{hovered:!1}})}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:b(this,qa,Pc).call(this,!0);break;case 1:case 3:b(this,qa,Pc).call(this,!1);break}}select(){var e;super.select(),n(this,Ut)&&((e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var e;super.unselect(),n(this,Ut)&&((e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{selected:!1}}),n(this,Nt)||b(this,qa,Pc).call(this,!1))}get _mustFixPosition(){return!n(this,Nt)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(n(this,ye),{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(n(this,Ut),{rootClass:{hidden:!e}}))}static startHighlighting(e,s,{target:i,x:r,y:a}){const{x:o,y:l,width:h,height:c}=i.getBoundingClientRect(),f=new AbortController,g=e.combinedSignal(f),m=A=>{f.abort(),b(this,bu,Vm).call(this,e,A)};window.addEventListener("blur",m,{signal:g}),window.addEventListener("pointerup",m,{signal:g}),window.addEventListener("pointerdown",Ee,{capture:!0,passive:!1,signal:g}),window.addEventListener("contextmenu",Ke,{signal:g}),i.addEventListener("pointermove",b(this,mu,Gm).bind(this,e),{signal:g}),this._freeHighlight=new Vf({x:r,y:a},[o,l,h,c],e.scale,this._defaultThickness/2,s,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static deserialize(e,s,i){return I(this,null,function*(){var y,v,w,_;let r=null;if(e instanceof mm){const{data:{quadPoints:E,rect:S,rotation:C,id:T,color:x,opacity:R,popupRef:O},parent:{page:{pageNumber:G}}}=e;r=e={annotationType:V.HIGHLIGHT,color:Array.from(x),opacity:R,quadPoints:E,boxes:null,pageIndex:G-1,rect:S.slice(0),rotation:C,id:T,deleted:!1,popupRef:O}}else if(e instanceof yp){const{data:{inkLists:E,rect:S,rotation:C,id:T,color:x,borderStyle:{rawWidth:R},popupRef:O},parent:{page:{pageNumber:G}}}=e;r=e={annotationType:V.HIGHLIGHT,color:Array.from(x),thickness:R,inkLists:E,boxes:null,pageIndex:G-1,rect:S.slice(0),rotation:C,id:T,deleted:!1,popupRef:O}}const{color:a,quadPoints:o,inkLists:l,opacity:h}=e,c=yield ji(Q,this,"deserialize").call(this,e,s,i);c.color=N.makeHexColor(...a),p(c,Ys,h||1),l&&p(c,ke,e.thickness),c.annotationElementId=e.id||null,c._initialData=r;const[f,g]=c.pageDimensions,[m,A]=c.pageTranslation;if(o){const E=p(c,qs,[]);for(let S=0;S=0)p(this,ye,s),p(this,Zn,i),this.parent.drawLayer.finalizeDraw(s,{bbox:e.box,path:{d:e.toSVGPath()}}),p(this,Ut,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:n(this,oe).box,path:{d:n(this,oe).toSVGPath()}},!0));else if(this.parent){const m=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(n(this,ye),{bbox:b(f=Q,Mi,Pr).call(f,n(this,Re).box,(m-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(n(this,Ut),{bbox:b(g=Q,Mi,Pr).call(g,n(this,oe).box,m),path:{d:n(this,oe).toSVGPath()}})}const[a,o,l,h]=e.box;switch(this.rotation){case 0:this.x=a,this.y=o,this.width=l,this.height=h;break;case 90:{const[m,A]=this.parentDimensions;this.x=o,this.y=1-a,this.width=l*A/m,this.height=h*m/A;break}case 180:this.x=1-a,this.y=1-o,this.width=l,this.height=h;break;case 270:{const[m,A]=this.parentDimensions;this.x=1-o,this.y=a,this.width=l*A/m,this.height=h*m/A;break}}const{lastPoint:c}=n(this,oe);p(this,ja,[(c[0]-a)/l,(c[1]-o)/h])},cu=new WeakSet,Nm=function(e){const s=(a,o)=>{var l,h;this.color=a,p(this,Ys,o),(l=this.parent)==null||l.drawLayer.updateProperties(n(this,ye),{root:{fill:a,"fill-opacity":o}}),(h=n(this,Ua))==null||h.updateColor(a)},i=this.color,r=n(this,Ys);this.addCommands({cmd:s.bind(this,e,Q._defaultOpacity),undo:s.bind(this,i,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:J.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)},du=new WeakSet,Om=function(e){const s=n(this,ke),i=r=>{p(this,ke,r),b(this,uu,Bm).call(this,r)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:J.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},uu=new WeakSet,Bm=function(e){if(!n(this,Nt))return;b(this,Xa,Tc).call(this,{highlightOutlines:n(this,Re).getNewOutline(e/2)}),this.fixAndSetPosition();const[s,i]=this.parentDimensions;this.setDims(this.width*s,this.height*i)},Bh=new WeakSet,qf=function(){n(this,ye)===null||!this.parent||(this.parent.drawLayer.remove(n(this,ye)),p(this,ye,null),this.parent.drawLayer.remove(n(this,Ut)),p(this,Ut,null))},Ks=new WeakSet,Yi=function(e=this.parent){n(this,ye)===null&&({id:Yt(this,ye)._,clipPathId:Yt(this,Zn)._}=e.drawLayer.draw({bbox:n(this,Re).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":n(this,Ys)},rootClass:{highlight:!0,free:n(this,Nt)},path:{d:n(this,Re).toSVGPath()}},!1,!0),p(this,Ut,e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:n(this,Nt)},bbox:n(this,oe).box,path:{d:n(this,oe).toSVGPath()}},n(this,Nt))),n(this,tr)&&(n(this,tr).style.clipPath=n(this,Zn)))},Mi=new WeakSet,Pr=function([e,s,i,r],a){switch(a){case 90:return[1-s-r,e,r,i];case 180:return[1-e-i,1-s-r,i,r];case 270:return[s,1-e-i,r,i]}return[e,s,i,r]},fu=new WeakSet,Hm=function(e){Q._keyboardManager.exec(this,e)},qa=new WeakSet,Pc=function(e){if(!n(this,Va))return;const s=window.getSelection();e?s.setPosition(n(this,Va),n(this,Ih)):s.setPosition(n(this,Dh),n(this,Fh))},er=new WeakSet,ko=function(){return n(this,Nt)?this.rotation:0},pu=new WeakSet,zm=function(){if(n(this,Nt))return null;const[e,s]=this.pageDimensions,[i,r]=this.pageTranslation,a=n(this,qs),o=new Float32Array(a.length*8);let l=0;for(const{x:h,y:c,width:f,height:g}of a){const m=h*e+i,A=(1-c)*s+r;o[l]=o[l+4]=m,o[l+1]=o[l+3]=A,o[l+2]=o[l+6]=m+f*e,o[l+5]=o[l+7]=A-g*s,l+=8}return o},gu=new WeakSet,$m=function(e){return n(this,Re).serialize(e,b(this,er,ko).call(this))},mu=new WeakSet,Gm=function(e,s){this._freeHighlight.add(s)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},bu=new WeakSet,Vm=function(e,s){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(s,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},Au=new WeakSet,Um=function(e){const{color:s}=this._initialData;return e.color.some((i,r)=>i!==s[r])},u(Q,Mi),u(Q,mu),u(Q,bu),B(Q,"_defaultColor",null),B(Q,"_defaultOpacity",1),B(Q,"_defaultThickness",12),B(Q,"_type","highlight"),B(Q,"_editorType",V.HIGHLIGHT),B(Q,"_freeHighlightId",-1),B(Q,"_freeHighlight",null),B(Q,"_freeHighlightClipId","");let Gc=Q;var sr;class My{constructor(){u(this,sr,Object.create(null))}updateProperty(t,e){this[t]=e,this.updateSVGProperty(t,e)}updateProperties(t){if(t)for(const[e,s]of Object.entries(t))this.updateProperty(e,s)}updateSVGProperty(t,e){n(this,sr)[t]=e}toSVGProperties(){const t=n(this,sr);return p(this,sr,Object.create(null)),{root:t}}reset(){p(this,sr,Object.create(null))}updateAll(t=this){this.updateProperties(t)}clone(){rt("Not implemented")}}sr=new WeakMap;var we,Ya,kt,ir,nr,Li,Ii,Di,rr,Hh,Kf,zh,Qf,$h,Jf,ar,Mo,yu,jm,Ka,Rc,or,Lo,Fi,Rr;const M=class M extends ut{constructor(e){super(e);u(this,Hh);u(this,zh);u(this,$h);u(this,ar);u(this,yu);u(this,Ka);u(this,or);u(this,Fi);u(this,we,null);u(this,Ya,void 0);B(this,"_drawId",null);p(this,Ya,e.mustBeCommitted||!1),e.drawOutlines&&(b(this,Hh,Kf).call(this,e),b(this,ar,Mo).call(this))}static _mergeSVGProperties(e,s){const i=new Set(Object.keys(e));for(const[r,a]of Object.entries(s))i.has(r)?Object.assign(e[r],a):e[r]=a;return e}static getDefaultDrawingOptions(e){rt("Not implemented")}static get typesMap(){rt("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,s){const i=this.typesMap.get(e);i&&this._defaultDrawingOptions.updateProperty(i,s),this._currentParent&&(n(M,kt).updateProperty(i,s),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,s){const i=this.constructor.typesMap.get(e);i&&this._updateProperty(e,i,s)}static get defaultPropertiesToUpdate(){const e=[],s=this._defaultDrawingOptions;for(const[i,r]of this.typesMap)e.push([i,s[r]]);return e}get propertiesToUpdate(){const e=[],{_drawingOptions:s}=this;for(const[i,r]of this.constructor.typesMap)e.push([i,s[r]]);return e}_updateProperty(e,s,i){const r=this._drawingOptions,a=r[s],o=l=>{var c;r.updateProperty(s,l);const h=n(this,we).updateProperty(s,l);h&&b(this,or,Lo).call(this,h),(c=this.parent)==null||c.drawLayer.updateProperties(this._drawId,r.toSVGProperties())};this.addCommands({cmd:o.bind(this,i),undo:o.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties(n(this,we).getPathResizingSVGProperties(b(this,Ka,Rc).call(this)),{bbox:b(this,Fi,Rr).call(this)}))}_onResized(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties(n(this,we).getPathResizedSVGProperties(b(this,Ka,Rc).call(this)),{bbox:b(this,Fi,Rr).call(this)}))}_onTranslating(e,s){var i;(i=this.parent)==null||i.drawLayer.updateProperties(this._drawId,{bbox:b(this,Fi,Rr).call(this,e,s)})}_onTranslated(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties(n(this,we).getPathTranslatedSVGProperties(b(this,Ka,Rc).call(this),this.parentDimensions),{bbox:b(this,Fi,Rr).call(this)}))}_onStartDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,n(this,Ya)&&(p(this,Ya,!1),this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){b(this,$h,Jf).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(b(this,ar,Mo).call(this),b(this,or,Lo).call(this,n(this,we).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let s=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),b(this,$h,Jf).call(this)):e&&(this._uiManager.addShouldRescale(this),b(this,ar,Mo).call(this,e),s=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),s&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties({bbox:b(this,Fi,Rr).call(this)},n(this,we).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&b(this,or,Lo).call(this,n(this,we).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;const e=super.render();e.classList.add("draw");const s=document.createElement("div");e.append(s),s.setAttribute("aria-hidden","true"),s.className="internal";const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),this._uiManager.addShouldRescale(this),this.disableEditing(),e}static createDrawerInstance(e,s,i,r,a){rt("Not implemented")}static startDrawing(e,s,i,r){var v,w;const{target:a,offsetX:o,offsetY:l,pointerId:h,pointerType:c}=r;if(n(M,Ii)&&n(M,Ii)!==c)return;const{viewport:{rotation:f}}=e,{width:g,height:m}=a.getBoundingClientRect(),A=p(M,ir,new AbortController),y=e.combinedSignal(A);if(n(M,Li)||p(M,Li,h),(v=n(M,Ii))!=null||p(M,Ii,c),window.addEventListener("pointerup",_=>{var E;n(M,Li)===_.pointerId?this._endDraw(_):(E=n(M,Di))==null||E.delete(_.pointerId)},{signal:y}),window.addEventListener("pointercancel",_=>{var E;n(M,Li)===_.pointerId?this._currentParent.endDrawingSession():(E=n(M,Di))==null||E.delete(_.pointerId)},{signal:y}),window.addEventListener("pointerdown",_=>{n(M,Ii)===_.pointerType&&((n(M,Di)||p(M,Di,new Set)).add(_.pointerId),n(M,kt).isCancellable()&&(n(M,kt).removeLastElement(),n(M,kt).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:y}),window.addEventListener("contextmenu",Ke,{signal:y}),a.addEventListener("pointermove",this._drawMove.bind(this),{signal:y}),a.addEventListener("touchmove",_=>{_.timeStamp===n(M,rr)&&Ee(_)},{signal:y}),e.toggleDrawing(),(w=s._editorUndoBar)==null||w.hide(),n(M,kt)){e.drawLayer.updateProperties(this._currentDrawId,n(M,kt).startNew(o,l,g,m,f));return}s.updateUIForDefaultProperties(this),p(M,kt,this.createDrawerInstance(o,l,g,m,f)),p(M,nr,this.getDefaultDrawingOptions()),this._currentParent=e,{id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties(n(M,nr).toSVGProperties(),n(M,kt).defaultSVGProperties),!0,!1)}static _drawMove(e){var a;if(p(M,rr,-1),!n(M,kt))return;const{offsetX:s,offsetY:i,pointerId:r}=e;if(n(M,Li)===r){if(((a=n(M,Di))==null?void 0:a.size)>=1){this._endDraw(e);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,n(M,kt).add(s,i)),p(M,rr,e.timeStamp),Ee(e)}}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,p(M,kt,null),p(M,nr,null),p(M,Ii,null),p(M,rr,NaN)),n(M,ir)&&(n(M,ir).abort(),p(M,ir,null),p(M,Li,NaN),p(M,Di,null))}static _endDraw(e){const s=this._currentParent;if(s){if(s.toggleDrawing(!0),this._cleanup(!1),e&&s.drawLayer.updateProperties(this._currentDrawId,n(M,kt).end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){const i=n(M,kt),r=this._currentDrawId,a=i.getLastElement();s.addCommands({cmd:()=>{s.drawLayer.updateProperties(r,i.setLastElement(a))},undo:()=>{s.drawLayer.updateProperties(r,i.removeLastElement())},mustExec:!1,type:J.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(e){const s=this._currentParent;if(!s)return null;if(s.toggleDrawing(!0),s.cleanUndoStack(J.DRAW_STEP),!n(M,kt).isEmpty()){const{pageDimensions:[i,r],scale:a}=s,o=s.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:n(M,kt).getOutlines(i*a,r*a,a,this._INNER_MARGIN),drawingOptions:n(M,nr),mustBeCommitted:!e});return this._cleanup(!0),o}return s.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,s,i,r,a,o){rt("Not implemented")}static deserialize(e,s,i){return I(this,null,function*(){var f,g;const{rawDims:{pageWidth:r,pageHeight:a,pageX:o,pageY:l}}=s.viewport,h=this.deserializeDraw(o,l,r,a,this._INNER_MARGIN,e),c=yield ji(M,this,"deserialize").call(this,e,s,i);return c.createDrawingOptions(e),b(f=c,Hh,Kf).call(f,{drawOutlines:h}),b(g=c,ar,Mo).call(g),c.onScaleChanging(),c.rotate(),c})}serializeDraw(e){const[s,i]=this.pageTranslation,[r,a]=this.pageDimensions;return n(this,we).serialize([s,i,r,a],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};we=new WeakMap,Ya=new WeakMap,kt=new WeakMap,ir=new WeakMap,nr=new WeakMap,Li=new WeakMap,Ii=new WeakMap,Di=new WeakMap,rr=new WeakMap,Hh=new WeakSet,Kf=function({drawOutlines:e,drawId:s,drawingOptions:i}){p(this,we,e),this._drawingOptions||(this._drawingOptions=i),s>=0?(this._drawId=s,this.parent.drawLayer.finalizeDraw(s,e.defaultProperties)):this._drawId=b(this,zh,Qf).call(this,e,this.parent),b(this,or,Lo).call(this,e.box)},zh=new WeakSet,Qf=function(e,s){const{id:i}=s.drawLayer.draw(M._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return i},$h=new WeakSet,Jf=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},ar=new WeakSet,Mo=function(e=this.parent){if(!(this._drawId!==null&&this.parent===e)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,e.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=b(this,zh,Qf).call(this,n(this,we),e)}},yu=new WeakSet,jm=function([e,s,i,r]){const{parentDimensions:[a,o],rotation:l}=this;switch(l){case 90:return[s,1-e,i*(o/a),r*(a/o)];case 180:return[1-e,1-s,i,r];case 270:return[1-s,e,i*(o/a),r*(a/o)];default:return[e,s,i,r]}},Ka=new WeakSet,Rc=function(){const{x:e,y:s,width:i,height:r,parentDimensions:[a,o],rotation:l}=this;switch(l){case 90:return[1-s,e,i*(a/o),r*(o/a)];case 180:return[1-e,1-s,i,r];case 270:return[s,1-e,i*(a/o),r*(o/a)];default:return[e,s,i,r]}},or=new WeakSet,Lo=function(e){if([this.x,this.y,this.width,this.height]=b(this,yu,jm).call(this,e),this.div){this.fixAndSetPosition();const[s,i]=this.parentDimensions;this.setDims(this.width*s,this.height*i)}this._onResized()},Fi=new WeakSet,Rr=function(){const{x:e,y:s,width:i,height:r,rotation:a,parentRotation:o,parentDimensions:[l,h]}=this;switch((a*4+o)/90){case 1:return[1-s-r,e,r,i];case 2:return[1-e-i,1-s-r,i,r];case 3:return[s,1-e-i,r,i];case 4:return[e,s-i*(l/h),r*(h/l),i*(l/h)];case 5:return[1-s,e,i*(l/h),r*(h/l)];case 6:return[1-e-r*(h/l),1-s,r*(h/l),i*(l/h)];case 7:return[s-i*(l/h),1-e-r*(h/l),i*(l/h),r*(h/l)];case 8:return[e-i,s-r,i,r];case 9:return[1-s,e-i,r,i];case 10:return[1-e,1-s,i,r];case 11:return[s-r,1-e,r,i];case 12:return[e-r*(h/l),s,r*(h/l),i*(l/h)];case 13:return[1-s-i*(l/h),e-r*(h/l),i*(l/h),r*(h/l)];case 14:return[1-e,1-s-i*(l/h),r*(h/l),i*(l/h)];case 15:return[s,1-e,i*(l/h),r*(h/l)];default:return[e,s,i,r]}},B(M,"_currentDrawId",-1),B(M,"_currentParent",null),u(M,kt,null),u(M,ir,null),u(M,nr,null),u(M,Li,NaN),u(M,Ii,null),u(M,Di,null),u(M,rr,NaN),B(M,"_INNER_MARGIN",3);let Yf=M;var us,Mt,Lt,lr,Qa,Jt,Ot,Me,hr,cr,dr,Ja,kc;class Ly{constructor(t,e,s,i,r,a){u(this,Ja);u(this,us,new Float64Array(6));u(this,Mt,void 0);u(this,Lt,void 0);u(this,lr,void 0);u(this,Qa,void 0);u(this,Jt,void 0);u(this,Ot,"");u(this,Me,0);u(this,hr,new Vc);u(this,cr,void 0);u(this,dr,void 0);p(this,cr,s),p(this,dr,i),p(this,lr,r),p(this,Qa,a),[t,e]=b(this,Ja,kc).call(this,t,e);const o=p(this,Mt,[NaN,NaN,NaN,NaN,t,e]);p(this,Jt,[t,e]),p(this,Lt,[{line:o,points:n(this,Jt)}]),n(this,us).set(o,0)}updateProperty(t,e){t==="stroke-width"&&p(this,Qa,e)}isEmpty(){return!n(this,Lt)||n(this,Lt).length===0}isCancellable(){return n(this,Jt).length<=10}add(t,e){[t,e]=b(this,Ja,kc).call(this,t,e);const[s,i,r,a]=n(this,us).subarray(2,6),o=t-r,l=e-a;return Math.hypot(n(this,cr)*o,n(this,dr)*l)<=2?null:(n(this,Jt).push(t,e),isNaN(s)?(n(this,us).set([r,a,t,e],2),n(this,Mt).push(NaN,NaN,NaN,NaN,t,e),{path:{d:this.toSVGPath()}}):(isNaN(n(this,us)[0])&&n(this,Mt).splice(6,6),n(this,us).set([s,i,r,a,t,e],0),n(this,Mt).push(...L.createBezierPoints(s,i,r,a,t,e)),{path:{d:this.toSVGPath()}}))}end(t,e){const s=this.add(t,e);return s||(n(this,Jt).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,e,s,i,r){p(this,cr,s),p(this,dr,i),p(this,lr,r),[t,e]=b(this,Ja,kc).call(this,t,e);const a=p(this,Mt,[NaN,NaN,NaN,NaN,t,e]);p(this,Jt,[t,e]);const o=n(this,Lt).at(-1);return o&&(o.line=new Float32Array(o.line),o.points=new Float32Array(o.points)),n(this,Lt).push({line:a,points:n(this,Jt)}),n(this,us).set(a,0),p(this,Me,0),this.toSVGPath(),null}getLastElement(){return n(this,Lt).at(-1)}setLastElement(t){return n(this,Lt)?(n(this,Lt).push(t),p(this,Mt,t.line),p(this,Jt,t.points),p(this,Me,0),{path:{d:this.toSVGPath()}}):n(this,hr).setLastElement(t)}removeLastElement(){if(!n(this,Lt))return n(this,hr).removeLastElement();n(this,Lt).pop(),p(this,Ot,"");for(let t=0,e=n(this,Lt).length;tS!=null?S:NaN),g,m,A,y),points:v(l[_].map(S=>S!=null?S:NaN),g,m,A,y)});const w=new Ep;return w.build(f,i,r,1,h,c,a),w}get box(){return n(this,Zt)}updateProperty(e,s){return e==="stroke-width"?b(this,_u,qm).call(this,s):null}updateParentDimensions([e,s],i){const[r,a]=b(this,Xe,Es).call(this);p(this,fs,e),p(this,ps,s),p(this,Za,i);const[o,l]=b(this,Xe,Es).call(this),h=o-r,c=l-a,f=n(this,Zt);return f[0]-=h,f[1]-=c,f[2]+=2*h,f[3]+=2*c,f}updateRotation(e){return p(this,Gh,e),{path:{transform:this.rotationTransform}}}get viewBox(){return n(this,Zt).map(L.svgRound).join(" ")}get defaultProperties(){const[e,s]=n(this,Zt);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`}}}get rotationTransform(){const[,,e,s]=n(this,Zt);let i=0,r=0,a=0,o=0,l=0,h=0;switch(n(this,Gh)){case 90:r=s/e,a=-e/s,l=e;break;case 180:i=-1,o=-1,l=e,h=s;break;case 270:r=-s/e,a=e/s,h=s;break;default:return""}return`matrix(${i} ${r} ${a} ${o} ${L.svgRound(l)} ${L.svgRound(h)})`}getPathResizingSVGProperties([e,s,i,r]){const[a,o]=b(this,Xe,Es).call(this),[l,h,c,f]=n(this,Zt);if(Math.abs(c-a)<=L.PRECISION||Math.abs(f-o)<=L.PRECISION){const v=e+i/2-(l+c/2),w=s+r/2-(h+f/2);return{path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`,transform:`${this.rotationTransform} translate(${v} ${w})`}}}const g=(i-2*a)/(c-2*a),m=(r-2*o)/(f-2*o),A=c/i,y=f/r;return{path:{"transform-origin":`${L.svgRound(l)} ${L.svgRound(h)}`,transform:`${this.rotationTransform} scale(${A} ${y}) translate(${L.svgRound(a)} ${L.svgRound(o)}) scale(${g} ${m}) translate(${L.svgRound(-a)} ${L.svgRound(-o)})`}}}getPathResizedSVGProperties([e,s,i,r]){const[a,o]=b(this,Xe,Es).call(this),l=n(this,Zt),[h,c,f,g]=l;if(l[0]=e,l[1]=s,l[2]=i,l[3]=r,Math.abs(f-a)<=L.PRECISION||Math.abs(g-o)<=L.PRECISION){const w=e+i/2-(h+f/2),_=s+r/2-(c+g/2);for(const{line:E,points:S}of n(this,ve))L._translate(E,w,_,E),L._translate(S,w,_,S);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const m=(i-2*a)/(f-2*a),A=(r-2*o)/(g-2*o),y=-m*(h+a)+e+a,v=-A*(c+o)+s+o;if(m!==1||A!==1||y!==0||v!==0)for(const{line:w,points:_}of n(this,ve))L._rescale(w,y,v,m,A,w),L._rescale(_,y,v,m,A,_);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,s],i){const[r,a]=i,o=n(this,Zt),l=e-o[0],h=s-o[1];if(n(this,fs)===r&&n(this,ps)===a)for(const{line:c,points:f}of n(this,ve))L._translate(c,l,h,c),L._translate(f,l,h,f);else{const c=n(this,fs)/r,f=n(this,ps)/a;p(this,fs,r),p(this,ps,a);for(const{line:g,points:m}of n(this,ve))L._rescale(g,l,h,c,f,g),L._rescale(m,l,h,c,f,m);o[2]*=c,o[3]*=f}return o[0]=e,o[1]=s,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`}}}get defaultSVGProperties(){const e=n(this,Zt);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${L.svgRound(e[0])} ${L.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}};Zt=new WeakMap,Gh=new WeakMap,Vh=new WeakMap,ve=new WeakMap,fs=new WeakMap,ps=new WeakMap,Za=new WeakMap,to=new WeakMap,eo=new WeakMap,Xe=new WeakSet,Es=function(e=n(this,eo)){const s=n(this,Vh)+e/2*n(this,Za);return n(this,to)%180===0?[s/n(this,fs),s/n(this,ps)]:[s/n(this,ps),s/n(this,fs)]},wu=new WeakSet,Wm=function(){const[e,s,i,r]=n(this,Zt),[a,o]=b(this,Xe,Es).call(this,0);return[e+a,s+o,i-2*a,r-2*o]},vu=new WeakSet,Xm=function(){const e=p(this,Zt,new Float32Array([1/0,1/0,-1/0,-1/0]));for(const{line:r}of n(this,ve)){if(r.length<=12){for(let l=4,h=r.length;lo!==s[l])||e.thickness!==i||e.opacity!==r||e.pageIndex!==a},B(Ji,"_type","ink"),B(Ji,"_editorType",V.INK),B(Ji,"_defaultDrawingOptions",null);let tp=Ji;var dt,Bt,Ni,Qs,Oi,io,gs,ms,_e,no,ur,Io,fr,Do,ro,Mc,Uh,sp,ao,Lc,jh,ip,oo,Ic,Eu,Km;const Lr=class Lr extends ut{constructor(e){super(_r(vs({},e),{name:"stampEditor"}));u(this,ur);u(this,fr);u(this,ro);u(this,Uh);u(this,ao);u(this,jh);u(this,oo);u(this,Eu);u(this,dt,null);u(this,Bt,null);u(this,Ni,null);u(this,Qs,null);u(this,Oi,null);u(this,io,"");u(this,gs,null);u(this,ms,null);u(this,_e,!1);u(this,no,!1);p(this,Qs,e.bitmapUrl),p(this,Oi,e.bitmapFile)}static initialize(e,s){ut.initialize(e,s)}static get supportedTypes(){return q(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(s=>`image/${s}`))}static get supportedTypesStr(){return q(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,s){s.pasteEditor(V.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var e;return{type:"stamp",hasAltText:!!((e=this.altTextData)!=null&&e.altText)}}static computeTelemetryFinalData(e){var i,r;const s=e.get("hasAltText");return{hasAltText:(i=s.get(!0))!=null?i:0,hasNoAltText:(r=s.get(!1))!=null?r:0}}mlGuessAltText(e=null,s=!0){return I(this,null,function*(){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!(yield i.isEnabledFor("altText")))throw new Error("ML isn't enabled for alt text.");const{data:r,width:a,height:o}=e||this.copyCanvas(null,null,!0).imageData,l=yield i.guess({name:"altText",request:{data:r,width:a,height:o,channels:r.length/(a*o)}});if(!l)throw new Error("No response from the AI service.");if(l.error)throw new Error("Error from the AI service.");if(l.cancel)return null;if(!l.output)throw new Error("No valid response from the AI service.");const h=l.output;return yield this.setGuessedAltText(h),s&&!this.hasAltTextData()&&(this.altTextData={alt:h,decorative:!1}),h})}remove(){var e;n(this,Bt)&&(p(this,dt,null),this._uiManager.imageManager.deleteId(n(this,Bt)),(e=n(this,gs))==null||e.remove(),p(this,gs,null),n(this,ms)&&(clearTimeout(n(this,ms)),p(this,ms,null))),super.remove()}rebuild(){if(!this.parent){n(this,Bt)&&b(this,ro,Mc).call(this);return}super.rebuild(),this.div!==null&&(n(this,Bt)&&n(this,gs)===null&&b(this,ro,Mc).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(n(this,Ni)||n(this,dt)||n(this,Qs)||n(this,Oi)||n(this,Bt))}get isResizable(){return!0}render(){if(this.div)return this.div;let e,s;if(this.width&&(e=this.x,s=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),n(this,dt)?b(this,Uh,sp).call(this):b(this,ro,Mc).call(this),this.width&&!this.annotationElementId){const[i,r]=this.parentDimensions;this.setAt(e*i,s*r,this.width*i,this.height*r)}return this._uiManager.addShouldRescale(this),this.div}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;n(this,ms)!==null&&clearTimeout(n(this,ms)),p(this,ms,setTimeout(()=>{p(this,ms,null),b(this,jh,ip).call(this)},200))}copyCanvas(e,s,i=!1){var m;e||(e=224);const{width:r,height:a}=n(this,dt),o=new Ju;let l=n(this,dt),h=r,c=a,f=null;if(s){if(r>s||a>s){const R=Math.min(s/r,s/a);h=Math.floor(r*R),c=Math.floor(a*R)}f=document.createElement("canvas");const A=f.width=Math.ceil(h*o.sx),y=f.height=Math.ceil(c*o.sy);n(this,_e)||(l=b(this,ao,Lc).call(this,A,y));const v=f.getContext("2d");v.filter=this._uiManager.hcmFilter;let w="white",_="#cfcfd8";this._uiManager.hcmFilter!=="none"?_="black":(m=window.matchMedia)!=null&&m.call(window,"(prefers-color-scheme: dark)").matches&&(w="#8f8f9d",_="#42414d");const E=15,S=E*o.sx,C=E*o.sy,T=new OffscreenCanvas(S*2,C*2),x=T.getContext("2d");x.fillStyle=w,x.fillRect(0,0,S*2,C*2),x.fillStyle=_,x.fillRect(0,0,S,C),x.fillRect(S,C,S,C),v.fillStyle=v.createPattern(T,"repeat"),v.fillRect(0,0,A,y),v.drawImage(l,0,0,l.width,l.height,0,0,A,y)}let g=null;if(i){let A,y;if(o.symmetric&&l.widthe||a>e){const _=Math.min(e/r,e/a);A=Math.floor(r*_),y=Math.floor(a*_),n(this,_e)||(l=b(this,ao,Lc).call(this,A,y))}const w=new OffscreenCanvas(A,y).getContext("2d",{willReadFrequently:!0});w.drawImage(l,0,0,l.width,l.height,0,0,A,y),g={width:A,height:y,data:w.getImageData(0,0,A,y).data}}return{canvas:f,width:h,height:c,imageData:g}}getImageForAltText(){return n(this,gs)}static deserialize(e,s,i){return I(this,null,function*(){var y;let r=null;if(e instanceof bm){const{data:{rect:v,rotation:w,id:_,structParent:E,popupRef:S},container:C,parent:{page:{pageNumber:T}}}=e,x=C.querySelector("canvas"),R=i.imageManager.getFromCanvas(C.id,x);x.remove();const O=((y=yield s._structTree.getAriaAttributes(`${dp}${_}`))==null?void 0:y.get("aria-label"))||"";r=e={annotationType:V.STAMP,bitmapId:R.id,bitmap:R.bitmap,pageIndex:T-1,rect:v.slice(0),rotation:w,id:_,deleted:!1,accessibilityData:{decorative:!1,altText:O},isSvg:!1,structParent:E,popupRef:S}}const a=yield ji(Lr,this,"deserialize").call(this,e,s,i),{rect:o,bitmap:l,bitmapUrl:h,bitmapId:c,isSvg:f,accessibilityData:g}=e;c&&i.imageManager.isValidId(c)?(p(a,Bt,c),l&&p(a,dt,l)):p(a,Qs,h),p(a,_e,f);const[m,A]=a.pageDimensions;return a.width=(o[2]-o[0])/m,a.height=(o[3]-o[1])/A,a.annotationElementId=e.id||null,g&&(a.altTextData=g),a._initialData=r,p(a,no,!!r),a})}serialize(e=!1,s=null){var l;if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i={annotationType:V.STAMP,bitmapId:n(this,Bt),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:n(this,_e),structTreeParentId:this._structTreeParentId};if(e)return i.bitmapUrl=b(this,oo,Ic).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i;const{decorative:r,altText:a}=this.serializeAltText(!1);if(!r&&a&&(i.accessibilityData={type:"Figure",alt:a}),this.annotationElementId){const h=b(this,Eu,Km).call(this,i);if(h.isSame)return null;h.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=(l=this._initialData.structParent)!=null?l:-1}if(i.id=this.annotationElementId,s===null)return i;s.stamps||(s.stamps=new Map);const o=n(this,_e)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(!s.stamps.has(n(this,Bt)))s.stamps.set(n(this,Bt),{area:o,serialized:i}),i.bitmap=b(this,oo,Ic).call(this,!1);else if(n(this,_e)){const h=s.stamps.get(n(this,Bt));o>h.area&&(h.area=o,h.serialized.bitmap.close(),h.serialized.bitmap=b(this,oo,Ic).call(this,!1))}return i}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}};dt=new WeakMap,Bt=new WeakMap,Ni=new WeakMap,Qs=new WeakMap,Oi=new WeakMap,io=new WeakMap,gs=new WeakMap,ms=new WeakMap,_e=new WeakMap,no=new WeakMap,ur=new WeakSet,Io=function(e,s=!1){if(!e){this.remove();return}p(this,dt,e.bitmap),s||(p(this,Bt,e.id),p(this,_e,e.isSvg)),e.file&&p(this,io,e.file.name),b(this,Uh,sp).call(this)},fr=new WeakSet,Do=function(){if(p(this,Ni,null),this._uiManager.enableWaiting(!1),!!n(this,gs)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&n(this,dt)){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&n(this,dt)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch(e){}}this.div.focus()}},ro=new WeakSet,Mc=function(){if(n(this,Bt)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(n(this,Bt)).then(i=>b(this,ur,Io).call(this,i,!0)).finally(()=>b(this,fr,Do).call(this));return}if(n(this,Qs)){const i=n(this,Qs);p(this,Qs,null),this._uiManager.enableWaiting(!0),p(this,Ni,this._uiManager.imageManager.getFromUrl(i).then(r=>b(this,ur,Io).call(this,r)).finally(()=>b(this,fr,Do).call(this)));return}if(n(this,Oi)){const i=n(this,Oi);p(this,Oi,null),this._uiManager.enableWaiting(!0),p(this,Ni,this._uiManager.imageManager.getFromFile(i).then(r=>b(this,ur,Io).call(this,r)).finally(()=>b(this,fr,Do).call(this)));return}const e=document.createElement("input");e.type="file",e.accept=Lr.supportedTypesStr;const s=this._uiManager._signal;p(this,Ni,new Promise(i=>{e.addEventListener("change",()=>I(this,null,function*(){if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const r=yield this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),b(this,ur,Io).call(this,r)}i()}),{signal:s}),e.addEventListener("cancel",()=>{this.remove(),i()},{signal:s})}).finally(()=>b(this,fr,Do).call(this))),e.click()},Uh=new WeakSet,sp=function(){var f;const{div:e}=this;let{width:s,height:i}=n(this,dt);const[r,a]=this.pageDimensions,o=.75;if(this.width)s=this.width*r,i=this.height*a;else if(s>o*r||i>o*a){const g=Math.min(o*r/s,o*a/i);s*=g,i*=g}const[l,h]=this.parentDimensions;this.setDims(s*l/r,i*h/a),this._uiManager.enableWaiting(!1);const c=p(this,gs,document.createElement("canvas"));c.setAttribute("role","img"),this.addContainer(c),this.width=s/r,this.height=i/a,(f=this._initialOptions)!=null&&f.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),b(this,jh,ip).call(this),n(this,no)||(this.parent.addUndoableEditor(this),p(this,no,!0)),this._reportTelemetry({action:"inserted_image"}),n(this,io)&&c.setAttribute("aria-label",n(this,io))},ao=new WeakSet,Lc=function(e,s){const{width:i,height:r}=n(this,dt);let a=i,o=r,l=n(this,dt);for(;a>2*e||o>2*s;){const h=a,c=o;a>2*e&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2)),o>2*s&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2));const f=new OffscreenCanvas(a,o);f.getContext("2d").drawImage(l,0,0,h,c,0,0,a,o),l=f.transferToImageBitmap()}return l},jh=new WeakSet,ip=function(){const[e,s]=this.parentDimensions,{width:i,height:r}=this,a=new Ju,o=Math.ceil(i*e*a.sx),l=Math.ceil(r*s*a.sy),h=n(this,gs);if(!h||h.width===o&&h.height===l)return;h.width=o,h.height=l;const c=n(this,_e)?n(this,dt):b(this,ao,Lc).call(this,o,l),f=h.getContext("2d");f.filter=this._uiManager.hcmFilter,f.drawImage(c,0,0,c.width,c.height,0,0,o,l)},oo=new WeakSet,Ic=function(e){if(e){if(n(this,_e)){const r=this._uiManager.imageManager.getSvgUrl(n(this,Bt));if(r)return r}const s=document.createElement("canvas");return{width:s.width,height:s.height}=n(this,dt),s.getContext("2d").drawImage(n(this,dt),0,0),s.toDataURL()}if(n(this,_e)){const[s,i]=this.pageDimensions,r=Math.round(this.width*s*Vi.PDF_TO_CSS_UNITS),a=Math.round(this.height*i*Vi.PDF_TO_CSS_UNITS),o=new OffscreenCanvas(r,a);return o.getContext("2d").drawImage(n(this,dt),0,0,n(this,dt).width,n(this,dt).height,0,0,r,a),o.transferToImageBitmap()}return structuredClone(n(this,dt))},Eu=new WeakSet,Km=function(e){var o;const{pageIndex:s,accessibilityData:{altText:i}}=this._initialData,r=e.pageIndex===s,a=(((o=e.accessibilityData)==null?void 0:o.alt)||"")===i;return{isSame:!this._hasBeenMoved&&!this._hasBeenResized&&r&&a,isSameAltText:a}},B(Lr,"_type","stamp"),B(Lr,"_editorType",V.STAMP);let ep=Lr;var pr,lo,bs,Bi,Js,Le,Hi,ho,gr,qe,Zs,jt,ti,F,zi,Cu,Qm,Ie,Ze,Wh,rp,Xh,ap,co,Dc;const De=class De{constructor({uiManager:t,pageIndex:e,div:s,structTreeLayer:i,accessibilityManager:r,annotationLayer:a,drawLayer:o,textLayer:l,viewport:h,l10n:c}){u(this,Cu);u(this,Ie);u(this,Wh);u(this,Xh);u(this,co);u(this,pr,void 0);u(this,lo,!1);u(this,bs,null);u(this,Bi,null);u(this,Js,null);u(this,Le,new Map);u(this,Hi,!1);u(this,ho,!1);u(this,gr,!1);u(this,qe,null);u(this,Zs,null);u(this,jt,null);u(this,ti,null);u(this,F,void 0);const f=[...n(De,zi).values()];if(!De._initialized){De._initialized=!0;for(const g of f)g.initialize(c,t)}t.registerEditorTypes(f),p(this,F,t),this.pageIndex=e,this.div=s,p(this,pr,r),p(this,bs,a),this.viewport=h,p(this,jt,l),this.drawLayer=o,this._structTree=i,n(this,F).addLayer(this)}get isEmpty(){return n(this,Le).size===0}get isInvisible(){return this.isEmpty&&n(this,F).getMode()===V.NONE}updateToolbar(t){n(this,F).updateToolbar(t)}updateMode(t=n(this,F).getMode()){switch(b(this,co,Dc).call(this),t){case V.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case V.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case V.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;for(const s of n(De,zi).values())e.toggle(`${s._type}Editing`,t===s._editorType);this.div.hidden=!1}hasTextLayer(t){var e;return t===((e=n(this,jt))==null?void 0:e.div)}setEditingState(t){n(this,F).setEditingState(t)}addCommands(t){n(this,F).addCommands(t)}cleanUndoStack(t){n(this,F).cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){var e;(e=n(this,bs))==null||e.div.classList.toggle("disabled",!t)}enable(){return I(this,null,function*(){p(this,gr,!0),this.div.tabIndex=0,this.togglePointerEvents(!0);const t=new Set;for(const s of n(this,Le).values())s.enableEditing(),s.show(!0),s.annotationElementId&&(n(this,F).removeChangedExistingAnnotation(s),t.add(s.annotationElementId));if(!n(this,bs)){p(this,gr,!1);return}const e=n(this,bs).getEditableAnnotations();for(const s of e){if(s.hide(),n(this,F).isDeletedAnnotationElement(s.data.id)||t.has(s.data.id))continue;const i=yield this.deserialize(s);i&&(this.addOrRebuild(i),i.enableEditing())}p(this,gr,!1)})}disable(){var i;p(this,ho,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const t=new Map,e=new Map;for(const r of n(this,Le).values())if(r.disableEditing(),!!r.annotationElementId){if(r.serialize()!==null){t.set(r.annotationElementId,r);continue}else e.set(r.annotationElementId,r);(i=this.getEditableAnnotation(r.annotationElementId))==null||i.show(),r.remove()}if(n(this,bs)){const r=n(this,bs).getEditableAnnotations();for(const a of r){const{id:o}=a.data;if(n(this,F).isDeletedAnnotationElement(o))continue;let l=e.get(o);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=t.get(o),l&&(n(this,F).addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}b(this,co,Dc).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:s}=this.div;for(const r of n(De,zi).values())s.remove(`${r._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),p(this,ho,!1)}getEditableAnnotation(t){var e;return((e=n(this,bs))==null?void 0:e.getEditableAnnotation(t))||null}setActiveEditor(t){n(this,F).getActive()!==t&&n(this,F).setActiveEditor(t)}enableTextSelection(){var t;if(this.div.tabIndex=-1,(t=n(this,jt))!=null&&t.div&&!n(this,ti)){p(this,ti,new AbortController);const e=n(this,F).combinedSignal(n(this,ti));n(this,jt).div.addEventListener("pointerdown",b(this,Cu,Qm).bind(this),{signal:e}),n(this,jt).div.classList.add("highlighting")}}disableTextSelection(){var t;this.div.tabIndex=0,(t=n(this,jt))!=null&&t.div&&n(this,ti)&&(n(this,ti).abort(),p(this,ti,null),n(this,jt).div.classList.remove("highlighting"))}enableClick(){if(n(this,Bi))return;p(this,Bi,new AbortController);const t=n(this,F).combinedSignal(n(this,Bi));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const e=this.pointerup.bind(this);this.div.addEventListener("pointerup",e,{signal:t}),this.div.addEventListener("pointercancel",e,{signal:t})}disableClick(){var t;(t=n(this,Bi))==null||t.abort(),p(this,Bi,null)}attach(t){n(this,Le).set(t.id,t);const{annotationElementId:e}=t;e&&n(this,F).isDeletedAnnotationElement(e)&&n(this,F).removeDeletedAnnotationElement(t)}detach(t){var e;n(this,Le).delete(t.id),(e=n(this,pr))==null||e.removePointerInTextLayer(t.contentDiv),!n(this,ho)&&t.annotationElementId&&n(this,F).addDeletedAnnotationElement(t)}remove(t){this.detach(t),n(this,F).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(n(this,F).addDeletedAnnotationElement(t.annotationElementId),ut.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),(e=t.parent)==null||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),n(this,F).addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!n(this,gr)),n(this,F).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){var s;if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&!n(this,Js)&&(t._focusEventsAllowed=!1,p(this,Js,setTimeout(()=>{p(this,Js,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:n(this,F)._signal}),e.focus())},0))),t._structTreeParentId=(s=n(this,pr))==null?void 0:s.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const e=()=>t._uiManager.rebuild(t),s=()=>{t.remove()};this.addCommands({cmd:e,undo:s,mustExec:!1})}getNextId(){return n(this,F).getId()}combinedSignal(t){return n(this,F).combinedSignal(t)}canCreateNewEmptyEditor(){var t;return(t=n(this,Ie,Ze))==null?void 0:t.canCreateNewEmptyEditor()}pasteEditor(t,e){n(this,F).updateToolbar(t),n(this,F).updateMode(t);const{offsetX:s,offsetY:i}=b(this,Xh,ap).call(this),r=this.getNextId(),a=b(this,Wh,rp).call(this,vs({parent:this,id:r,x:s,y:i,uiManager:n(this,F),isCentered:!0},e));a&&this.add(a)}deserialize(t){return I(this,null,function*(){var e,s;return(yield(s=n(De,zi).get((e=t.annotationType)!=null?e:t.annotationEditorType))==null?void 0:s.deserialize(t,this,n(this,F)))||null})}createAndAddNewEditor(t,e,s={}){const i=this.getNextId(),r=b(this,Wh,rp).call(this,vs({parent:this,id:i,x:t.offsetX,y:t.offsetY,uiManager:n(this,F),isCentered:e},s));return r&&this.add(r),r}addNewEditor(){this.createAndAddNewEditor(b(this,Xh,ap).call(this),!0)}setSelected(t){n(this,F).setSelected(t)}toggleSelected(t){n(this,F).toggleSelected(t)}unselect(t){n(this,F).unselect(t)}pointerup(t){var s;const{isMac:e}=ee.platform;if(!(t.button!==0||t.ctrlKey&&e)&&t.target===this.div&&n(this,Hi)&&(p(this,Hi,!1),!((s=n(this,Ie,Ze))!=null&&s.isDrawer&&n(this,Ie,Ze).supportMultipleDrawings))){if(!n(this,lo)){p(this,lo,!0);return}if(n(this,F).getMode()===V.STAMP){n(this,F).unselectAll();return}this.createAndAddNewEditor(t,!1)}}pointerdown(t){var i;if(n(this,F).getMode()===V.HIGHLIGHT&&this.enableTextSelection(),n(this,Hi)){p(this,Hi,!1);return}const{isMac:e}=ee.platform;if(t.button!==0||t.ctrlKey&&e||t.target!==this.div)return;if(p(this,Hi,!0),(i=n(this,Ie,Ze))!=null&&i.isDrawer){this.startDrawingSession(t);return}const s=n(this,F).getActive();p(this,lo,!s||s.isEmpty())}startDrawingSession(t){if(this.div.focus(),n(this,qe)){n(this,Ie,Ze).startDrawing(this,n(this,F),!1,t);return}n(this,F).setCurrentDrawingSession(this),p(this,qe,new AbortController);const e=n(this,F).combinedSignal(n(this,qe));this.div.addEventListener("blur",({relatedTarget:s})=>{s&&!this.div.contains(s)&&(p(this,Zs,null),this.commitOrRemove())},{signal:e}),n(this,Ie,Ze).startDrawing(this,n(this,F),!1,t)}pause(t){if(t){const{activeElement:e}=document;this.div.contains(e)&&p(this,Zs,e);return}n(this,Zs)&&setTimeout(()=>{var e;(e=n(this,Zs))==null||e.focus(),p(this,Zs,null)},0)}endDrawingSession(t=!1){return n(this,qe)?(n(this,F).setCurrentDrawingSession(null),n(this,qe).abort(),p(this,qe,null),p(this,Zs,null),n(this,Ie,Ze).endDrawing(t)):null}findNewParent(t,e,s){const i=n(this,F).findParent(e,s);return i===null||i===this?!1:(i.changeParent(t),!0)}commitOrRemove(){return n(this,qe)?(this.endDrawingSession(),!0):!1}onScaleChanging(){n(this,qe)&&n(this,Ie,Ze).onScaleChangingWhenDrawing(this)}destroy(){var t,e;this.commitOrRemove(),((t=n(this,F).getActive())==null?void 0:t.parent)===this&&(n(this,F).commitOrRemove(),n(this,F).setActiveEditor(null)),n(this,Js)&&(clearTimeout(n(this,Js)),p(this,Js,null));for(const s of n(this,Le).values())(e=n(this,pr))==null||e.removePointerInTextLayer(s.contentDiv),s.setParent(null),s.isAttachedToDOM=!1,s.div.remove();this.div=null,n(this,Le).clear(),n(this,F).removeLayer(this)}render({viewport:t}){this.viewport=t,br(this.div,t);for(const e of n(this,F).getEditors(this.pageIndex))this.add(e),e.rebuild();this.updateMode()}update({viewport:t}){n(this,F).commitOrRemove(),b(this,co,Dc).call(this);const e=this.viewport.rotation,s=t.rotation;if(this.viewport=t,br(this.div,{rotation:s}),e!==s)for(const i of n(this,Le).values())i.rotate(s)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return n(this,F).viewParameters.realScale}};pr=new WeakMap,lo=new WeakMap,bs=new WeakMap,Bi=new WeakMap,Js=new WeakMap,Le=new WeakMap,Hi=new WeakMap,ho=new WeakMap,gr=new WeakMap,qe=new WeakMap,Zs=new WeakMap,jt=new WeakMap,ti=new WeakMap,F=new WeakMap,zi=new WeakMap,Cu=new WeakSet,Qm=function(t){n(this,F).unselectAll();const{target:e}=t;if(e===n(this,jt).div||(e.getAttribute("role")==="img"||e.classList.contains("endOfContent"))&&n(this,jt).div.contains(e)){const{isMac:s}=ee.platform;if(t.button!==0||t.ctrlKey&&s)return;n(this,F).showAllEditors("highlight",!0,!0),n(this,jt).div.classList.add("free"),this.toggleDrawing(),Gc.startHighlighting(this,n(this,F).direction==="ltr",{target:n(this,jt).div,x:t.x,y:t.y}),n(this,jt).div.addEventListener("pointerup",()=>{n(this,jt).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:n(this,F)._signal}),t.preventDefault()}},Ie=new WeakSet,Ze=function(){return n(De,zi).get(n(this,F).getMode())},Wh=new WeakSet,rp=function(t){const e=n(this,Ie,Ze);return e?new e.prototype.constructor(t):null},Xh=new WeakSet,ap=function(){const{x:t,y:e,width:s,height:i}=this.div.getBoundingClientRect(),r=Math.max(0,t),a=Math.max(0,e),o=Math.min(window.innerWidth,t+s),l=Math.min(window.innerHeight,e+i),h=(r+o)/2-t,c=(a+l)/2-e,[f,g]=this.viewport.rotation%180===0?[h,c]:[c,h];return{offsetX:f,offsetY:g}},co=new WeakSet,Dc=function(){for(const t of n(this,Le).values())t.isEmpty()&&t.remove()},B(De,"_initialized",!1),u(De,zi,new Map([Hf,tp,ep,Gc].map(t=>[t._editorType,t])));let np=De;var Ye,qh,te,mr,xu,Jm,Yh,lp,Tu,Zm,Kh,hp;const $t=class $t{constructor({pageIndex:t}){u(this,Yh);u(this,Tu);u(this,Kh);u(this,Ye,null);u(this,qh,0);u(this,te,new Map);u(this,mr,new Map);this.pageIndex=t}setParent(t){if(!n(this,Ye)){p(this,Ye,t);return}if(n(this,Ye)!==t){if(n(this,te).size>0)for(const e of n(this,te).values())e.remove(),t.append(e);p(this,Ye,t)}}static get _svgFactory(){return q(this,"_svgFactory",new Ap)}draw(t,e=!1,s=!1){const i=Yt(this,qh)._++,r=b(this,Yh,lp).call(this),a=$t._svgFactory.createElement("defs");r.append(a);const o=$t._svgFactory.createElement("path");a.append(o);const l=`path_p${this.pageIndex}_${i}`;o.setAttribute("id",l),o.setAttribute("vector-effect","non-scaling-stroke"),e&&n(this,mr).set(i,o);const h=s?b(this,Tu,Zm).call(this,a,l):null,c=$t._svgFactory.createElement("use");return r.append(c),c.setAttribute("href",`#${l}`),this.updateProperties(r,t),n(this,te).set(i,r),{id:i,clipPathId:`url(#${h})`}}drawOutline(t,e){const s=Yt(this,qh)._++,i=b(this,Yh,lp).call(this),r=$t._svgFactory.createElement("defs");i.append(r);const a=$t._svgFactory.createElement("path");r.append(a);const o=`path_p${this.pageIndex}_${s}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke");let l;if(e){const f=$t._svgFactory.createElement("mask");r.append(f),l=`mask_p${this.pageIndex}_${s}`,f.setAttribute("id",l),f.setAttribute("maskUnits","objectBoundingBox");const g=$t._svgFactory.createElement("rect");f.append(g),g.setAttribute("width","1"),g.setAttribute("height","1"),g.setAttribute("fill","white");const m=$t._svgFactory.createElement("use");f.append(m),m.setAttribute("href",`#${o}`),m.setAttribute("stroke","none"),m.setAttribute("fill","black"),m.setAttribute("fill-rule","nonzero"),m.classList.add("mask")}const h=$t._svgFactory.createElement("use");i.append(h),h.setAttribute("href",`#${o}`),l&&h.setAttribute("mask",`url(#${l})`);const c=h.cloneNode();return i.append(c),h.classList.add("mainOutline"),c.classList.add("secondaryOutline"),this.updateProperties(i,t),n(this,te).set(s,i),s}finalizeDraw(t,e){n(this,mr).delete(t),this.updateProperties(t,e)}updateProperties(t,e){var l;if(!e)return;const{root:s,bbox:i,rootClass:r,path:a}=e,o=typeof t=="number"?n(this,te).get(t):t;if(o){if(s&&b(this,Kh,hp).call(this,o,s),i&&b(l=$t,xu,Jm).call(l,o,i),r){const{classList:h}=o;for(const[c,f]of Object.entries(r))h.toggle(c,f)}if(a){const c=o.firstChild.firstChild;b(this,Kh,hp).call(this,c,a)}}}updateParent(t,e){if(e===this)return;const s=n(this,te).get(t);s&&(n(e,Ye).append(s),n(this,te).delete(t),n(e,te).set(t,s))}remove(t){n(this,mr).delete(t),n(this,Ye)!==null&&(n(this,te).get(t).remove(),n(this,te).delete(t))}destroy(){p(this,Ye,null);for(const t of n(this,te).values())t.remove();n(this,te).clear(),n(this,mr).clear()}};Ye=new WeakMap,qh=new WeakMap,te=new WeakMap,mr=new WeakMap,xu=new WeakSet,Jm=function(t,[e,s,i,r]){const{style:a}=t;a.top=`${100*s}%`,a.left=`${100*e}%`,a.width=`${100*i}%`,a.height=`${100*r}%`},Yh=new WeakSet,lp=function(){const t=$t._svgFactory.create(1,1,!0);return n(this,Ye).append(t),t.setAttribute("aria-hidden",!0),t},Tu=new WeakSet,Zm=function(t,e){const s=$t._svgFactory.createElement("clipPath");t.append(s);const i=`clip_${e}`;s.setAttribute("id",i),s.setAttribute("clipPathUnits","objectBoundingBox");const r=$t._svgFactory.createElement("use");return s.append(r),r.setAttribute("href",`#${e}`),r.classList.add("clip"),i},Kh=new WeakSet,hp=function(t,e){for(const[s,i]of Object.entries(e))i===null?t.removeAttribute(s):t.setAttribute(s,i)},u($t,xu);let op=$t;globalThis.pdfjsTestingUtils={HighlightOutliner:$f};z.AbortException;z.AnnotationEditorLayer;z.AnnotationEditorParamsType;z.AnnotationEditorType;z.AnnotationEditorUIManager;z.AnnotationLayer;z.AnnotationMode;z.ColorPicker;z.DOMSVGFactory;z.DrawLayer;z.FeatureTest;var Iy=z.GlobalWorkerOptions;z.ImageKind;z.InvalidPDFException;z.MissingPDFException;z.OPS;z.OutputScale;z.PDFDataRangeTransport;z.PDFDateString;z.PDFWorker;z.PasswordResponses;z.PermissionFlag;z.PixelsPerInch;z.RenderingCancelledException;z.TextLayer;z.TouchManager;z.UnexpectedResponseException;z.Util;z.VerbosityLevel;z.XfaLayer;z.build;z.createValidAbsoluteUrl;z.fetchData;var Dy=z.getDocument;z.getFilenameFromUrl;z.getPdfFilenameFromUrl;z.getXfaPageViewport;z.isDataScheme;z.isPdfFile;z.noContextMenu;z.normalizeUnicode;z.setLayerDimensions;z.shadow;z.stopEvent;z.version;Iy.workerSrc="../pdf.worker.mjs";const Fy={name:"PdfViewer",data(){return{open:!1,zoomLevel:1,start:!1,selection:null,startPoint:null,scrollPoint:null,selectionStyle:null,captureButtonStyle:null,captureButtonVisible:!1,pdfData:void 0}},methods:{MinusOutlined:gb,PlusOutlined:Zp,CloseOutlined:mb,ScissorOutlined:bb,h:Ao,loadPdf(){return I(this,null,function*(){const e=yield(yield Dy({data:this.pdfData.slice()}).promise).getPage(1),s=e.getViewport({scale:this.zoomLevel}),i=this.$refs.pdfCanvas,r=i.getContext("2d");i.width=s.width,i.height=s.height,yield e.render({canvasContext:r,viewport:s}).promise})},show(){this.open=!0,this.scrollPoint={x:0,y:0},this.start=!1,this.selection=null,this.startPoint=null,this.selectionStyle=null,this.captureButtonVisible=!1},close(){document.getElementById("scroller").scrollTop=0,document.getElementById("scroller").scrollLeft=0,this.open=!1},startSelection(d){this.start=!0,this.startPoint={x:d.offsetX,y:d.offsetY},this.selection={x:d.offsetX,y:d.offsetY,width:0,height:0},this.selectionStyle=null,this.hideCaptureButton()},updateSelection(d){this.start&&this.startPoint&&(this.selection.width=Math.abs(d.offsetX-this.startPoint.x),this.selection.height=Math.abs(d.offsetY-this.startPoint.y),this.selection.x=Math.min(d.offsetX,this.startPoint.x),this.selection.y=Math.min(d.offsetY,this.startPoint.y),this.selectionStyle={left:`${this.selection.x}px`,top:`${this.selection.y}px`,width:`${this.selection.width}px`,height:`${this.selection.height}px`,position:"absolute",border:"2px dashed red"})},endSelection(){this.start=!1,this.showCaptureButton()},captureSelection(){const d=this.$refs.pdfCanvas;d.getContext("2d");const t=this.$refs.tempCanvas;t.width=this.selection.width,t.height=this.selection.height,t.getContext("2d").drawImage(d,this.selection.x,this.selection.y,this.selection.width,this.selection.height,0,0,t.width,t.height);const s=t.toDataURL("image/png");this.$emit("onCapture",s),this.close()},handleScroll(d){this.scrollPoint={x:d.srcElement.scrollLeft,y:d.srcElement.scrollTop},this.showCaptureButton()},showCaptureButton(){this.selection&&this.selection.width>50&&this.selection.height>30?(this.captureButtonStyle={left:`${this.selection.x-this.scrollPoint.x+1}px`,top:`${this.selection.y-this.scrollPoint.y+1}px`,position:"absolute",borderRadius:0},this.captureButtonVisible=!0):this.captureButtonVisible=!1},hideCaptureButton(){this.captureButtonVisible=!1},zoomIn(){return I(this,null,function*(){this.zoomLevel=Math.min(3,this.zoomLevel+.1),yield this.loadPdf()})},zoomOut(){return I(this,null,function*(){this.zoomLevel=Math.max(.5,this.zoomLevel-.1),yield this.loadPdf()})}}},Ny={class:"box"},Oy={ref:"pdfCanvas"},By={ref:"tempCanvas"},Hy={class:"tool-box"};function zy(d,t,e,s,i,r){const a=tg("a-button");return Hu((Fc(),qu("div",Ny,[As("div",{id:"scroller",class:"pdf-viewer",onMousedown:t[0]||(t[0]=(...o)=>r.startSelection&&r.startSelection(...o)),onMousemove:t[1]||(t[1]=(...o)=>r.updateSelection&&r.updateSelection(...o)),onMouseup:t[2]||(t[2]=(...o)=>r.endSelection&&r.endSelection(...o)),onScroll:t[3]||(t[3]=(...o)=>r.handleScroll&&r.handleScroll(...o))},[As("canvas",Oy,null,512),Hu(As("canvas",By,null,512),[[zu,!1]]),i.selection?(Fc(),qu("div",{key:0,class:"selection-box",style:Mp(i.selectionStyle)},null,4)):eg("",!0)],32),As("div",Hy,[le(a,{type:"primary",class:"tool-button",icon:r.h(r.MinusOutlined),onClick:r.zoomOut},null,8,["icon","onClick"]),As("span",null,xb(Math.round(i.zoomLevel*100))+"%",1),le(a,{type:"primary",class:"tool-button",icon:r.h(r.PlusOutlined),onClick:r.zoomIn},null,8,["icon","onClick"]),le(a,{type:"primary",style:{"border-radius":"8px","margin-left":"10px"},icon:r.h(r.CloseOutlined),onClick:r.close},{default:ii(()=>t[4]||(t[4]=[kr("取 消")])),_:1},8,["icon","onClick"])]),Hu(le(a,{type:"primary",class:"btn",style:Mp(i.captureButtonStyle),icon:r.h(r.ScissorOutlined),onClick:r.captureSelection},{default:ii(()=>t[5]||(t[5]=[kr("截 图")])),_:1},8,["style","icon","onClick"]),[[zu,i.captureButtonVisible]])],512)),[[zu,i.open]])}const $y=Jp(Fy,[["render",zy],["__scopeId","data-v-ac028922"]]),Gy={class:"header"},Vy=Tb({__name:"index",setup(d){const[t,{openModal:e}]=Lb(),s=Wi(),{hasPermission:i}=ob(),r=Wi([]),a=P=>{r.value=P.filter(D=>typeof D!="undefined")},[o,{openDrawer:l}]=Cb(),[h,{reload:c}]=ub({api:P=>Sb(g(P)),columns:Eb,formConfig:{labelWidth:0,schemas:kp,showAdvancedButton:!1},rowSelection:{type:"checkbox",onChange:a,getCheckboxProps:P=>({disabled:P.state!==0})},useSearchForm:!0,showTableSetting:!1,bordered:!0,showIndexColumn:!1,canResize:!1,rowKey:P=>P.id,actionColumn:{width:420,title:"操作",dataIndex:"action",fixed:void 0}}),f=Wi(!1),g=P=>{const ys=P,{pageNum:D,pageSize:Y,field:W="id",order:$="descend"}=ys,gt=Rp(ys,["pageNum","pageSize","field","order"]),st={pageNum:D,pageSize:Y,orderByClause:`${W} ${$==="descend"?"desc":"asc"}`};return Object.keys(gt).forEach(ws=>{const Ct=kp.find(uo=>uo.field===ws),K=P[ws];let qt=ws;Ct?K!==void 0&&K!==""&&(Ct.component==="Input"?st[qt]=`%${K.trim()}%`:["Select","ApiSelect","ApiTreeSelect"].includes(Ct.component)?st[qt]=db(K)?K.value:K:Ct.component==="RangePicker"?(qt==="startTimeQuery"&&(qt="startTime"),st[`${qt}From`]=Bu(K[0]).startOf("d").format("YYYY-MM-DD HH:mm:ss"),st[`${qt}To`]=Bu(K[1]).endOf("d").format("YYYY-MM-DD HH:mm:ss")):Ct.component==="DatePicker"?st[qt]=Bu(K).format(Ct.componentProps.format||"YYYY-MM-DD"):st[qt]=K):st[qt]=K}),st},m=()=>{l(!0,{isUpdate:!1})},A=P=>{l(!0,{record:P,isUpdate:!0})},y=P=>{_b(P.id).then(D=>{c()})},v=()=>{c()},w=(P,D)=>{if(P.indexOf("PT")!==-1){let W=P.split("PT")[0]+"PT";for(let $=0;${const D=JSON.parse(P.paramJson);if(P.results===void 0||P.results===null)return;const Y=JSON.parse(P.results);return D.forEach(W=>{const $=Y.filter(gt=>W.code===gt.code||W.code===w(W.code,gt.code+""));$.length>0&&(W.x1=$[0].x1,W.y1=$[0].y1,W.x2=$[0].x2,W.y2=$[0].y2,W.x3=$[0].x3,W.y3=$[0].y3,W.x4=$[0].x4,W.y4=$[0].y4,W.base=$[0].base,W.actual_value=$[0].actual_value,W.status=$[0].status)}),D},E=P=>{const D=_(P);D&&(P.resultJson1=JSON.stringify(D),e(!0,{record:P}))};let S=null;const C=Wi(),T=P=>{var D;S=P,(D=C.value)==null||D.click()},x=P=>{const D=P.target.files[0];if(D){const Y=new FileReader;Y.onload=W=>{O(W.target.result),C.value.value=""},Y.readAsArrayBuffer(D)}},R=Wi(),O=P=>I(this,null,function*(){R.value.pdfData=P,yield R.value.loadPdf(),R.value.show()});let G=null;const H=P=>{f.value=!0,OCRService.importByOCR(P,G).then(D=>{var W;if(D===""){f.value=!1;return}const Y=JSON.parse(D);if(Y.length===0){f.value=!1;return}if(Y[0].length>5?G=Y[0].code.substring(0,Y.length-5):G=null,S===null){const $={name:"",paramJson:JSON.stringify(Y)};l(!0,{record:$,isUpdate:!1})}else(W=s.value)==null||W.setParamData(Y);WebViewService.setMessage("数据导入成功!","success").then(()=>{}),f.value=!1},D=>{WebViewService.setMessage("数据导入失败!","error").then(()=>{}),f.value=!1})},nt=P=>{const D=[...new Set([...P.id?[P.id]:[],...r.value.map(Y=>Y)])];DeviceClientService.assignTasks(D).then(()=>{WebViewService.setMessage("下发任务成功!","success").then(()=>{})},Y=>{WebViewService.setMessage("下发任务失败!","error").then(()=>{})})},ot=P=>{const D=[...new Set([...P.id?[P.id]:[],...r.value.map(Y=>Y)])];DeviceClientService.syncTasks(D).then(()=>{WebViewService.setMessage("同步任务成功!","success").then(()=>{}),c()},Y=>{WebViewService.setMessage("同步任务失败!","error").then(()=>{})})},Z=Wi([]),Et=Pb(()=>P=>Z.value[P]?Z.value[P]:!1),k=Wi();return Rb(()=>{k.value=setInterval(()=>{DeviceClientService.getDeviceConnected().then(P=>{Z.value=P},P=>{WebViewService.setMessage("获取设备连接出错","error").then(()=>{})})},300),WebViewService.setIsLoading(!1).then(()=>{})}),kb(()=>{clearInterval(k.value)}),(P,D)=>{const Y=tg("a-button");return Fc(),qu("div",null,[As("div",Gy,[le(ce(lb),{size:"19",name:"list"}),D[1]||(D[1]=As("div",{class:"title"},"任务列表",-1))]),le(ce(fb),{onRegister:ce(h)},{toolbar:ii(()=>[le(Y,{type:"primary",onClick:m,icon:Ao(ce(Zp))},{default:ii(()=>D[2]||(D[2]=[kr("新 增")])),_:1},8,["icon"]),D[6]||(D[6]=As("div",{style:{width:"5px"}},null,-1)),le(Y,{type:"default",icon:Ao(ce(Ab)),onClick:D[0]||(D[0]=W=>T(null))},{default:ii(()=>D[3]||(D[3]=[kr("OCR识别")])),_:1},8,["icon"]),As("input",{type:"file",ref_key:"fileInput",ref:C,accept:"application/pdf","aria-hidden":"true",onChange:x,style:{display:"none"}},null,544),D[7]||(D[7]=As("div",{style:{width:"5px"}},null,-1)),le(Y,{type:"default",onClick:nt,icon:Ao(ce(yb)),disabled:r.value.length===0},{default:ii(()=>D[4]||(D[4]=[kr("下发数据")])),_:1},8,["icon","disabled"]),le(Y,{type:"default",onClick:ot,icon:Ao(ce(wb)),disabled:r.value.length===0},{default:ii(()=>D[5]||(D[5]=[kr("同步数据")])),_:1},8,["icon","disabled"])]),bodyCell:ii(({column:W,record:$})=>[W.dataIndex==="action"?(Fc(),Mb(ce(pb),{key:0,actions:[{label:"编辑",icon:"clarity:note-edit-line",onClick:A.bind(null,$),divider:!0,disabled:$.state!==0},{label:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:y.bind(null,$),placement:"topRight"},ifShow:ce(i)("AUTH_DATA_TASK:DELETE"),disabled:$.state!==0,divider:!0},{label:"结果查看",icon:"ant-design:eye-outlined",onClick:E.bind(null,$),divider:!0,disabled:$.endTime===void 0||$.endTime===null},{label:"下发数据",icon:"ant-design:download-outlined",onClick:nt.bind(null,$),divider:!0,disabled:$.state!==0||!Et.value($.deviceSn)},{label:"同步数据",icon:"ant-design:sync-outlined",onClick:ot.bind(null,$),divider:!0,disabled:!Et.value($.deviceSn)}]},null,8,["actions"])):eg("",!0)]),_:1},8,["onRegister"]),le(vb,{ref_key:"taskDrawer",ref:s,onRegister:ce(o),onSuccess:v,onOcrClick:T},null,8,["onRegister"]),le($y,{ref_key:"pdfView",ref:R,onOnCapture:H},null,512),le(Ib,{onRegister:ce(t)},null,8,["onRegister"]),le(ce(cb),{loading:f.value,absolute:!1,tip:"OCR识别中...",size:ce(hb).LARGE,theme:"dark"},null,8,["loading","size"])])}}});const aw=Jp(Vy,[["__scopeId","data-v-41e992c4"]]);export{aw as default}; diff --git a/detect.gui/Embedded/dist/assets/index-b51a6013.js b/detect.gui/Embedded/dist/assets/index-b51a6013.js deleted file mode 100644 index 50642f8..0000000 --- a/detect.gui/Embedded/dist/assets/index-b51a6013.js +++ /dev/null @@ -1,12 +0,0 @@ -var eb=Object.defineProperty,sb=Object.defineProperties;var ib=Object.getOwnPropertyDescriptors;var Zh=Object.getOwnPropertySymbols,nb=Object.getPrototypeOf,Tp=Object.prototype.hasOwnProperty,Pp=Object.prototype.propertyIsEnumerable,rb=Reflect.get;var uo=Math.pow,Nu=(d,t,e)=>t in d?eb(d,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[t]=e,ws=(d,t)=>{for(var e in t||(t={}))Tp.call(t,e)&&Nu(d,e,t[e]);if(Zh)for(var e of Zh(t))Pp.call(t,e)&&Nu(d,e,t[e]);return d},_r=(d,t)=>sb(d,ib(t));var Rp=(d,t)=>{var e={};for(var s in d)Tp.call(d,s)&&t.indexOf(s)<0&&(e[s]=d[s]);if(d!=null&&Zh)for(var s of Zh(d))t.indexOf(s)<0&&Pp.call(d,s)&&(e[s]=d[s]);return e};var O=(d,t,e)=>(Nu(d,typeof t!="symbol"?t+"":t,e),e),Ou=(d,t,e)=>{if(!t.has(d))throw TypeError("Cannot "+e)};var n=(d,t,e)=>(Ou(d,t,"read from private field"),e?e.call(d):t.get(d)),u=(d,t,e)=>{if(t.has(d))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(d):t.set(d,e)},p=(d,t,e,s)=>(Ou(d,t,"write to private field"),s?s.call(d,e):t.set(d,e),e);var qt=(d,t,e,s)=>({set _(i){p(d,t,i,e)},get _(){return n(d,t,s)}}),b=(d,t,e)=>(Ou(d,t,"access private method"),e),ji=(d,t,e)=>rb(nb(d),e,t);var I=(d,t,e)=>new Promise((s,i)=>{var r=l=>{try{o(e.next(l))}catch(h){i(h)}},a=l=>{try{o(e.throw(l))}catch(h){i(h)}},o=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,a);o((e=e.apply(d,t)).next())});import{k as ab,_ as Jp,l as ob,S as lb,m as hb,L as cb,j as db}from"./index.js";import{u as ub,B as fb}from"./useTable-e949a6b7.js";import{T as pb}from"./useForm-baba730a.js";import{O as gb,N as Zp,Q as mb,R as bb,U as Ab,V as yb,W as wb,j as Bu}from"./antd-0679333d.js";import{T as vb,r as _b,s as Sb,c as Eb,a as kp}from"./drawer-20246748.js";import{u as Cb}from"./index-679d8a0a.js";import{l as bo,a6 as tg,m as Hu,A as zu,Z as Dc,_ as qu,$ as ys,ad as Mp,a8 as eg,k as oe,a0 as xb,a5 as si,G as kr,d as Tb,f as Wi,c as Pb,o as Rb,b as kb,u as he,a4 as Mb}from"./vue-72a104e4.js";import{u as Lb}from"./index-8a6826ba.js";import Ib from"./result-f5f59bf1.js";import"./useWindowSizeFn-1db11f4f.js";import"./onMountedOrActivated-ee461833.js";import"./sortable.esm-15c0a34e.js";import"./copyTextToClipboard-3ca69a78.js";import"./deviceApi-260fcde9.js";import"./modal-62c07bbb.js";var Do={};Do.d=(d,t)=>{for(var e in t)Do.o(t,e)&&!Do.o(d,e)&&Object.defineProperty(d,e,{enumerable:!0,get:t[e]})};Do.o=(d,t)=>Object.prototype.hasOwnProperty.call(d,t);var H=globalThis.pdfjsLib={};Do.d(H,{AbortException:()=>$i,AnnotationEditorLayer:()=>np,AnnotationEditorParamsType:()=>K,AnnotationEditorType:()=>G,AnnotationEditorUIManager:()=>Ar,AnnotationLayer:()=>Py,AnnotationMode:()=>ii,ColorPicker:()=>zc,DOMSVGFactory:()=>Ap,DrawLayer:()=>op,FeatureTest:()=>te,GlobalWorkerOptions:()=>ti,ImageKind:()=>nc,InvalidPDFException:()=>Ku,MissingPDFException:()=>Fo,OPS:()=>Fe,OutputScale:()=>Ju,PDFDataRangeTransport:()=>im,PDFDateString:()=>pp,PDFWorker:()=>Dr,PasswordResponses:()=>Ob,PermissionFlag:()=>Nb,PixelsPerInch:()=>Gi,RenderingCancelledException:()=>up,TextLayer:()=>No,TouchManager:()=>Bc,UnexpectedResponseException:()=>Fc,Util:()=>F,VerbosityLevel:()=>Tu,XfaLayer:()=>rm,build:()=>ly,createValidAbsoluteUrl:()=>$b,fetchData:()=>Mu,getDocument:()=>ZA,getFilenameFromUrl:()=>Kb,getPdfFilenameFromUrl:()=>Qb,getXfaPageViewport:()=>Jb,isDataScheme:()=>Lu,isPdfFile:()=>fp,noContextMenu:()=>Ke,normalizeUnicode:()=>Xb,setLayerDimensions:()=>br,shadow:()=>X,stopEvent:()=>Se,version:()=>oy});const Xt=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),sg=[1,0,0,1,0,0],Yu=[.001,0,0,.001,0,0],Db=1e7,$u=1.35,_e={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ii={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Fb="pdfjs_internal_editor_",G={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},K={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},Nb={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ht={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},nc={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},vt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},fo={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Tu={ERRORS:0,WARNINGS:1,INFOS:5},Fe={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},Ob={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let Pu=Tu.WARNINGS;function Bb(d){Number.isInteger(d)&&(Pu=d)}function Hb(){return Pu}function Ru(d){Pu>=Tu.INFOS}function V(d){Pu>=Tu.WARNINGS}function it(d){throw new Error(d)}function wt(d,t){d||it(t)}function zb(d){switch(d==null?void 0:d.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function $b(d,t=null,e=null){if(!d)return null;try{if(e&&typeof d=="string"){if(e.addDefaultProtocol&&d.startsWith("www.")){const i=d.match(/\./g);(i==null?void 0:i.length)>=2&&(d=`http://${d}`)}if(e.tryConvertEncoding)try{d=Wb(d)}catch(i){}}const s=t?new URL(d,t):new URL(d);if(zb(s))return s}catch(s){}return null}function X(d,t,e,s=!1){return Object.defineProperty(d,t,{value:e,enumerable:!s,configurable:!0,writable:!1}),e}const Vi=function(){function t(e,s){this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();class Lp extends Vi{constructor(t,e){super(t,"PasswordException"),this.code=e}}class Gu extends Vi{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Ku extends Vi{constructor(t){super(t,"InvalidPDFException")}}class Fo extends Vi{constructor(t){super(t,"MissingPDFException")}}class Fc extends Vi{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}}class Gb extends Vi{constructor(t){super(t,"FormatError")}}class $i extends Vi{constructor(t){super(t,"AbortException")}}function ig(d){(typeof d!="object"||(d==null?void 0:d.length)===void 0)&&it("Invalid argument for bytesToString");const t=d.length,e=8192;if(t>24&255,d>>16&255,d>>8&255,d&255)}function cp(d){const t=Object.create(null);for(const[e,s]of d)t[e]=s;return t}function Ub(){const d=new Uint8Array(4);return d[0]=1,new Uint32Array(d.buffer,0,1)[0]===1}function jb(){try{return new Function(""),!0}catch(d){return!1}}class te{static get isLittleEndian(){return X(this,"isLittleEndian",Ub())}static get isEvalSupported(){return X(this,"isEvalSupported",jb())}static get isOffscreenCanvasSupported(){return X(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas!="undefined")}static get isImageDecoderSupported(){return X(this,"isImageDecoderSupported",typeof ImageDecoder!="undefined")}static get platform(){return typeof navigator!="undefined"&&typeof(navigator==null?void 0:navigator.platform)=="string"?X(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):X(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var t,e;return X(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}}const Vu=Array.from(Array(256).keys(),d=>d.toString(16).padStart(2,"0"));var Fr,rc,Bo,Qu;class F{static makeHexColor(t,e,s){return`#${Vu[t]}${Vu[e]}${Vu[s]}`}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[1],e[1]=s,s=e[2],e[2]=e[3],e[3]=s,t[1]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){const s=t[0]*e[0]+t[1]*e[2]+e[4],i=t[0]*e[1]+t[1]*e[3]+e[5];return[s,i]}static applyInverseTransform(t,e){const s=e[0]*e[3]-e[1]*e[2],i=(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/s,r=(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/s;return[i,r]}static getAxialAlignedBoundingBox(t,e){const s=this.applyTransform(t,e),i=this.applyTransform(t.slice(2,4),e),r=this.applyTransform([t[0],t[3]],e),a=this.applyTransform([t[2],t[1]],e);return[Math.min(s[0],i[0],r[0],a[0]),Math.min(s[1],i[1],r[1],a[1]),Math.max(s[0],i[0],r[0],a[0]),Math.max(s[1],i[1],r[1],a[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],s=t[0]*e[0]+t[1]*e[2],i=t[0]*e[1]+t[1]*e[3],r=t[2]*e[0]+t[3]*e[2],a=t[2]*e[1]+t[3]*e[3],o=(s+a)/2,l=Math.sqrt(uo(s+a,2)-4*(s*a-r*i))/2,h=o+l||1,c=o-l||1;return[Math.sqrt(h),Math.sqrt(c)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>a?null:[s,r,i,a]}static bezierBoundingBox(t,e,s,i,r,a,o,l,h){return h?(h[0]=Math.min(h[0],t,o),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,o),h[3]=Math.max(h[3],e,l)):h=[Math.min(t,o),Math.min(e,l),Math.max(t,o),Math.max(e,l)],b(this,Bo,Qu).call(this,t,s,r,o,e,i,a,l,3*(-t+3*(s-r)+o),6*(t-2*s+r),3*(s-t),h),b(this,Bo,Qu).call(this,t,s,r,o,e,i,a,l,3*(-e+3*(i-a)+l),6*(e-2*i+a),3*(i-e),h),h}}Fr=new WeakSet,rc=function(t,e,s,i,r,a,o,l,h,c){if(h<=0||h>=1)return;const f=1-h,g=h*h,m=g*h,A=f*(f*(f*t+3*h*e)+3*g*s)+m*i,y=f*(f*(f*r+3*h*a)+3*g*o)+m*l;c[0]=Math.min(c[0],A),c[1]=Math.min(c[1],y),c[2]=Math.max(c[2],A),c[3]=Math.max(c[3],y)},Bo=new WeakSet,Qu=function(t,e,s,i,r,a,o,l,h,c,f,g){if(Math.abs(h)<1e-12){Math.abs(c)>=1e-12&&b(this,Fr,rc).call(this,t,e,s,i,r,a,o,l,-f/c,g);return}const m=uo(c,2)-4*f*h;if(m<0)return;const A=Math.sqrt(m),y=2*h;b(this,Fr,rc).call(this,t,e,s,i,r,a,o,l,(-c+A)/y,g),b(this,Fr,rc).call(this,t,e,s,i,r,a,o,l,(-c-A)/y,g)},u(F,Fr),u(F,Bo);function Wb(d){return decodeURIComponent(escape(d))}let Uu=null,Ip=null;function Xb(d){return Uu||(Uu=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Ip=new Map([["ſt","ſt"]])),d.replaceAll(Uu,(t,e,s)=>e?e.normalize("NFKC"):Ip.get(s))}function qb(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const d=new Uint8Array(32);return crypto.getRandomValues(d),ig(d)}const dp="pdfjs_internal_id_";function Yb(d){return Uint8Array.prototype.toBase64?d.toBase64():btoa(ig(d))}typeof Promise.try!="function"&&(Promise.try=function(d,...t){return new Promise(e=>{e(d(...t))})});const vs="http://www.w3.org/2000/svg",Ki=class Ki{};O(Ki,"CSS",96),O(Ki,"PDF",72),O(Ki,"PDF_TO_CSS_UNITS",Ki.CSS/Ki.PDF);let Gi=Ki;function Mu(d,t="text"){return I(this,null,function*(){if(Ao(d,document.baseURI)){const e=yield fetch(d);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,s)=>{const i=new XMLHttpRequest;i.open("GET",d,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(i.response);return}e(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})})}class Kh{constructor({viewBox:t,userUnit:e,scale:s,rotation:i,offsetX:r=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=e,this.scale=s,this.rotation=i,this.offsetX=r,this.offsetY=a,s*=e;const l=(t[2]+t[0])/2,h=(t[3]+t[1])/2;let c,f,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,f=0,g=0,m=1;break;case 90:c=0,f=1,g=1,m=0;break;case 270:c=0,f=-1,g=-1,m=0;break;case 0:c=1,f=0,g=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(g=-g,m=-m);let A,y,v,w;c===0?(A=Math.abs(h-t[1])*s+r,y=Math.abs(l-t[0])*s+a,v=(t[3]-t[1])*s,w=(t[2]-t[0])*s):(A=Math.abs(l-t[0])*s+r,y=Math.abs(h-t[1])*s+a,v=(t[2]-t[0])*s,w=(t[3]-t[1])*s),this.transform=[c*s,f*s,g*s,m*s,A-c*s*l-g*s*h,y-f*s*l-m*s*h],this.width=v,this.height=w}get rawDims(){const{userUnit:t,viewBox:e}=this,s=e.map(i=>i*t);return X(this,"rawDims",{pageWidth:s[2]-s[0],pageHeight:s[3]-s[1],pageX:s[0],pageY:s[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}={}){return new Kh({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){return F.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=F.applyTransform([t[0],t[1]],this.transform),s=F.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){return F.applyInverseTransform([t,e],this.transform)}}class up extends Vi{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function Lu(d){const t=d.length;let e=0;for(;e=1&&i<=12?i-1:0;let r=parseInt(e[3],10);r=r>=1&&r<=31?r:1;let a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(e[6],10);l=l>=0&&l<=59?l:0;const h=e[7]||"Z";let c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;let f=parseInt(e[9],10)||0;return f=f>=0&&f<=59?f:0,h==="-"?(a+=c,o+=f):h==="+"&&(a-=c,o-=f),new Date(Date.UTC(s,i,r,a,o,l))}}Ho=new WeakMap,u(pp,Ho,void 0);function Jb(d,{scale:t=1,rotation:e=0}){const{width:s,height:i}=d.attributes.style,r=[0,0,parseInt(s),parseInt(i)];return new Kh({viewBox:r,userUnit:1,scale:t,rotation:e})}function gp(d){if(d.startsWith("#")){const t=parseInt(d.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return d.startsWith("rgb(")?d.slice(4,-1).split(",").map(t=>parseInt(t)):d.startsWith("rgba(")?d.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(V(`Not a valid color format: "${d}"`),[0,0,0])}function Zb(d){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const e of d.keys()){t.style.color=e;const s=window.getComputedStyle(t).color;d.set(e,gp(s))}t.remove()}function lt(d){const{a:t,b:e,c:s,d:i,e:r,f:a}=d.getTransform();return[t,e,s,i,r,a]}function Je(d){const{a:t,b:e,c:s,d:i,e:r,f:a}=d.getTransform().invertSelf();return[t,e,s,i,r,a]}function br(d,t,e=!1,s=!0){if(t instanceof Kh){const{pageWidth:i,pageHeight:r}=t.rawDims,{style:a}=d,o=te.isCSSRoundSupported,l=`var(--scale-factor) * ${i}px`,h=`var(--scale-factor) * ${r}px`,c=o?`round(down, ${l}, var(--scale-round-x, 1px))`:`calc(${l})`,f=o?`round(down, ${h}, var(--scale-round-y, 1px))`:`calc(${h})`;!e||t.rotation%180===0?(a.width=c,a.height=f):(a.width=f,a.height=c)}s&&d.setAttribute("data-main-rotation",t.rotation)}class Ju{constructor(){const t=window.devicePixelRatio||1;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}}var ni,Zi,Ne,tn,zo,$o,Vc,ng,Uc,rg,jc,ag,Nr,ac,Wc,og,Go,tf;const Es=class Es{constructor(t){u(this,Uc);u(this,jc);u(this,Nr);u(this,Wc);u(this,Go);u(this,ni,null);u(this,Zi,null);u(this,Ne,void 0);u(this,tn,null);u(this,zo,null);p(this,Ne,t),n(Es,$o)||p(Es,$o,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const t=p(this,ni,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=n(this,Ne)._uiManager._signal;t.addEventListener("contextmenu",Ke,{signal:e}),t.addEventListener("pointerdown",b(Es,Vc,ng),{signal:e});const s=p(this,tn,document.createElement("div"));s.className="buttons",t.append(s);const i=n(this,Ne).toolbarPosition;if(i){const{style:r}=t,a=n(this,Ne)._uiManager.direction==="ltr"?1-i[0]:i[0];r.insetInlineEnd=`${100*a}%`,r.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return b(this,Wc,og).call(this),t}get div(){return n(this,ni)}hide(){var t;n(this,ni).classList.add("hidden"),(t=n(this,Zi))==null||t.hideDropdown()}show(){var t;n(this,ni).classList.remove("hidden"),(t=n(this,zo))==null||t.shown()}addAltText(t){return I(this,null,function*(){const e=yield t.render();b(this,Nr,ac).call(this,e),n(this,tn).prepend(e,n(this,Go,tf)),p(this,zo,t)})}addColorPicker(t){p(this,Zi,t);const e=t.renderButton();b(this,Nr,ac).call(this,e),n(this,tn).prepend(e,n(this,Go,tf))}remove(){var t;n(this,ni).remove(),(t=n(this,Zi))==null||t.destroy(),p(this,Zi,null)}};ni=new WeakMap,Zi=new WeakMap,Ne=new WeakMap,tn=new WeakMap,zo=new WeakMap,$o=new WeakMap,Vc=new WeakSet,ng=function(t){t.stopPropagation()},Uc=new WeakSet,rg=function(t){n(this,Ne)._focusEventsAllowed=!1,Se(t)},jc=new WeakSet,ag=function(t){n(this,Ne)._focusEventsAllowed=!0,Se(t)},Nr=new WeakSet,ac=function(t){const e=n(this,Ne)._uiManager._signal;t.addEventListener("focusin",b(this,Uc,rg).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",b(this,jc,ag).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",Ke,{signal:e})},Wc=new WeakSet,og=function(){const{editorType:t,_uiManager:e}=n(this,Ne),s=document.createElement("button");s.className="delete",s.tabIndex=0,s.setAttribute("data-l10n-id",n(Es,$o)[t]),b(this,Nr,ac).call(this,s),s.addEventListener("click",i=>{e.delete()},{signal:e._signal}),n(this,tn).append(s)},Go=new WeakSet,tf=function(){const t=document.createElement("div");return t.className="divider",t},u(Es,Vc),u(Es,$o,null);let Zu=Es;var Vo,en,sn,Xc,lg,qc,hg,Yc,cg;class tA{constructor(t){u(this,Xc);u(this,qc);u(this,Yc);u(this,Vo,null);u(this,en,null);u(this,sn,void 0);p(this,sn,t)}show(t,e,s){const[i,r]=b(this,qc,hg).call(this,e,s),{style:a}=n(this,en)||p(this,en,b(this,Xc,lg).call(this));t.append(n(this,en)),a.insetInlineEnd=`${100*i}%`,a.top=`calc(${100*r}% + var(--editor-toolbar-vert-offset))`}hide(){n(this,en).remove()}}Vo=new WeakMap,en=new WeakMap,sn=new WeakMap,Xc=new WeakSet,lg=function(){const t=p(this,en,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",Ke,{signal:n(this,sn)._signal});const e=p(this,Vo,document.createElement("div"));return e.className="buttons",t.append(e),b(this,Yc,cg).call(this),t},qc=new WeakSet,hg=function(t,e){let s=0,i=0;for(const r of t){const a=r.y+r.height;if(as){i=o,s=a;continue}e?o>i&&(i=o):o{n(this,sn).highlightSelection("floating_button")},{signal:s}),n(this,Vo).append(t)};function Nc(d,t,e){for(const s of e)t.addEventListener(s,d[s].bind(d))}var Kc;class eA{constructor(){u(this,Kc,0)}get id(){return`${Fb}${qt(this,Kc)._++}`}}Kc=new WeakMap;var Or,Uo,Gt,Br,oc;const wp=class wp{constructor(){u(this,Br);u(this,Or,qb());u(this,Uo,0);u(this,Gt,null)}static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,',s=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=t;const r=i.decode().then(()=>(s.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(s.getImageData(0,0,1,1).data.buffer)[0]===0));return X(this,"_isSVGFittingCanvas",r)}getFromFile(t){return I(this,null,function*(){const{lastModified:e,name:s,size:i,type:r}=t;return b(this,Br,oc).call(this,`${e}_${s}_${i}_${r}`,t)})}getFromUrl(t){return I(this,null,function*(){return b(this,Br,oc).call(this,t,t)})}getFromBlob(t,e){return I(this,null,function*(){const s=yield e;return b(this,Br,oc).call(this,t,s)})}getFromId(t){return I(this,null,function*(){n(this,Gt)||p(this,Gt,new Map);const e=n(this,Gt).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:s}=e;return delete e.blobPromise,this.getFromBlob(e.id,s)}return this.getFromUrl(e.url)})}getFromCanvas(t,e){n(this,Gt)||p(this,Gt,new Map);let s=n(this,Gt).get(t);if(s!=null&&s.bitmap)return s.refCounter+=1,s;const i=new OffscreenCanvas(e.width,e.height);return i.getContext("2d").drawImage(e,0,0),s={bitmap:i.transferToImageBitmap(),id:`image_${n(this,Or)}_${qt(this,Uo)._++}`,refCounter:1,isSvg:!1},n(this,Gt).set(t,s),n(this,Gt).set(s.id,s),s}getSvgUrl(t){const e=n(this,Gt).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var i;n(this,Gt)||p(this,Gt,new Map);const e=n(this,Gt).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;const{bitmap:s}=e;if(!e.url&&!e.file){const r=new OffscreenCanvas(s.width,s.height);r.getContext("bitmaprenderer").transferFromImageBitmap(s),e.blobPromise=r.convertToBlob()}(i=s.close)==null||i.call(s),e.bitmap=null}isValidId(t){return t.startsWith(`image_${n(this,Or)}_`)}};Or=new WeakMap,Uo=new WeakMap,Gt=new WeakMap,Br=new WeakSet,oc=function(t,e){return I(this,null,function*(){n(this,Gt)||p(this,Gt,new Map);let s=n(this,Gt).get(t);if(s===null)return null;if(s!=null&&s.bitmap)return s.refCounter+=1,s;try{s||(s={bitmap:null,id:`image_${n(this,Or)}_${qt(this,Uo)._++}`,refCounter:0,isSvg:!1});let i;if(typeof e=="string"?(s.url=e,i=yield Mu(e,"blob")):e instanceof File?i=s.file=e:e instanceof Blob&&(i=e),i.type==="image/svg+xml"){const r=wp._isSVGFittingCanvas,a=new FileReader,o=new Image,l=new Promise((h,c)=>{o.onload=()=>{s.bitmap=o,s.isSvg=!0,h()},a.onload=()=>I(this,null,function*(){const f=s.svgUrl=a.result;o.src=(yield r)?`${f}#svgView(preserveAspectRatio(none))`:f}),o.onerror=a.onerror=c});a.readAsDataURL(i),yield l}else s.bitmap=yield createImageBitmap(i);s.refCounter=1}catch(i){V(i),s=null}return n(this,Gt).set(t,s),s&&n(this,Gt).set(s.id,s),s})};let ef=wp;var mt,ri,jo,ct;class sA{constructor(t=128){u(this,mt,[]);u(this,ri,!1);u(this,jo,void 0);u(this,ct,-1);p(this,jo,t)}add({cmd:t,undo:e,post:s,mustExec:i,type:r=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(i&&t(),n(this,ri))return;const l={cmd:t,undo:e,post:s,type:r};if(n(this,ct)===-1){n(this,mt).length>0&&(n(this,mt).length=0),p(this,ct,0),n(this,mt).push(l);return}if(a&&n(this,mt)[n(this,ct)].type===r){o&&(l.undo=n(this,mt)[n(this,ct)].undo),n(this,mt)[n(this,ct)]=l;return}const h=n(this,ct)+1;h===n(this,jo)?n(this,mt).splice(0,1):(p(this,ct,h),h=0;e--)if(n(this,mt)[e].type!==t){n(this,mt).splice(e+1,n(this,ct)-e),p(this,ct,e);return}n(this,mt).length=0,p(this,ct,-1)}}destroy(){p(this,mt,null)}}mt=new WeakMap,ri=new WeakMap,jo=new WeakMap,ct=new WeakMap;var Qc,dg;class Qh{constructor(t){u(this,Qc);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=te.platform;for(const[s,i,r={}]of t)for(const a of s){const o=a.startsWith("mac+");e&&o?(this.callbacks.set(a.slice(4),{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1))):!e&&!o&&(this.callbacks.set(a,{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const s=this.callbacks.get(b(this,Qc,dg).call(this,e));if(!s)return;const{callback:i,options:{bubbles:r=!1,args:a=[],checker:o=null}}=s;o&&!o(t,e)||(i.bind(t,...a,e)(),r||Se(e))}}Qc=new WeakSet,dg=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e};const Jc=class Jc{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return Zb(t),X(this,"_colors",t)}convert(t){const e=gp(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[s,i]of this._colors)if(i.every((r,a)=>r===e[a]))return Jc._colorsMapping.get(s);return e}getHexCode(t){const e=this._colors.get(t);return e?F.makeHexColor(...e):t}};O(Jc,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let sf=Jc;var Hr,ce,_t,It,zr,xs,$r,xe,ai,nn,Gr,rn,es,Oe,an,Wo,Xo,Vr,qo,ss,oi,Ur,li,is,Zc,hi,Yo,ci,on,Ko,Qo,Ct,Z,Ts,ln,Jo,Zo,di,ns,Ps,tl,Te,jr,lc,el,nf,td,ug,ed,fg,Wr,hc,sd,pg,id,gg,nd,mg,sl,rf,rd,bg,il,af,nl,of,ad,Ag,Dt,Yt,Be,_s,od,yg,ld,wg,rl,lf,hd,vg,hn,yo,al,hf;const Mr=class Mr{constructor(t,e,s,i,r,a,o,l,h,c,f,g,m){u(this,jr);u(this,el);u(this,td);u(this,ed);u(this,Wr);u(this,sd);u(this,id);u(this,nd);u(this,sl);u(this,rd);u(this,il);u(this,nl);u(this,ad);u(this,Dt);u(this,Be);u(this,od);u(this,ld);u(this,rl);u(this,hd);u(this,hn);u(this,al);u(this,Hr,new AbortController);u(this,ce,null);u(this,_t,new Map);u(this,It,new Map);u(this,zr,null);u(this,xs,null);u(this,$r,null);u(this,xe,new sA);u(this,ai,null);u(this,nn,null);u(this,Gr,0);u(this,rn,new Set);u(this,es,null);u(this,Oe,null);u(this,an,new Set);O(this,"_editorUndoBar",null);u(this,Wo,!1);u(this,Xo,!1);u(this,Vr,!1);u(this,qo,null);u(this,ss,null);u(this,oi,null);u(this,Ur,null);u(this,li,!1);u(this,is,null);u(this,Zc,new eA);u(this,hi,!1);u(this,Yo,!1);u(this,ci,null);u(this,on,null);u(this,Ko,null);u(this,Qo,null);u(this,Ct,G.NONE);u(this,Z,new Set);u(this,Ts,null);u(this,ln,null);u(this,Jo,null);u(this,Zo,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});u(this,di,[0,0]);u(this,ns,null);u(this,Ps,null);u(this,tl,null);u(this,Te,null);const A=this._signal=n(this,Hr).signal;p(this,Ps,t),p(this,tl,e),p(this,zr,s),this._eventBus=i,i._on("editingaction",this.onEditingAction.bind(this),{signal:A}),i._on("pagechanging",this.onPageChanging.bind(this),{signal:A}),i._on("scalechanging",this.onScaleChanging.bind(this),{signal:A}),i._on("rotationchanging",this.onRotationChanging.bind(this),{signal:A}),i._on("setpreference",this.onSetPreference.bind(this),{signal:A}),i._on("switchannotationeditorparams",y=>this.updateParams(y.type,y.value),{signal:A}),b(this,sd,pg).call(this),b(this,ad,Ag).call(this),b(this,sl,rf).call(this),p(this,xs,r.annotationStorage),p(this,qo,r.filterFactory),p(this,ln,a),p(this,Ur,o||null),p(this,Wo,l),p(this,Xo,h),p(this,Vr,c),p(this,Qo,f||null),this.viewParameters={realScale:Gi.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=g||null,this._supportsPinchToZoom=m!==!1}static get _keyboardManager(){const t=Mr.prototype,e=a=>n(a,Ps).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&a.hasSomethingToControl(),s=(a,{target:o})=>{if(o instanceof HTMLInputElement){const{type:l}=o;return l!=="text"&&l!=="number"}return!0},i=this.TRANSLATE_SMALL,r=this.TRANSLATE_BIG;return X(this,"_keyboardManager",new Qh([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:s}],[["ctrl+z","mac+meta+z"],t.undo,{checker:s}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:s}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:s}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,Ps).contains(o)&&!a.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,Ps).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}]]))}destroy(){var t,e,s,i,r;(t=n(this,Te))==null||t.resolve(),p(this,Te,null),(e=n(this,Hr))==null||e.abort(),p(this,Hr,null),this._signal=null;for(const a of n(this,It).values())a.destroy();n(this,It).clear(),n(this,_t).clear(),n(this,an).clear(),p(this,ce,null),n(this,Z).clear(),n(this,xe).destroy(),(s=n(this,zr))==null||s.destroy(),(i=n(this,is))==null||i.hide(),p(this,is,null),n(this,ss)&&(clearTimeout(n(this,ss)),p(this,ss,null)),n(this,ns)&&(clearTimeout(n(this,ns)),p(this,ns,null)),(r=this._editorUndoBar)==null||r.destroy()}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return n(this,Qo)}get useNewAltTextFlow(){return n(this,Xo)}get useNewAltTextWhenAddingImage(){return n(this,Vr)}get hcmFilter(){return X(this,"hcmFilter",n(this,ln)?n(this,qo).addHCMFilter(n(this,ln).foreground,n(this,ln).background):"none")}get direction(){return X(this,"direction",getComputedStyle(n(this,Ps)).direction)}get highlightColors(){return X(this,"highlightColors",n(this,Ur)?new Map(n(this,Ur).split(",").map(t=>t.split("=").map(e=>e.trim()))):null)}get highlightColorNames(){return X(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),p(this,nn,t)}setMainHighlightColorPicker(t){p(this,Ko,t)}editAltText(t,e=!1){var s;(s=n(this,zr))==null||s.editAltText(this,t,e)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":p(this,Vr,e);break}}onPageChanging({pageNumber:t}){p(this,Gr,t-1)}focusMainContainer(){n(this,Ps).focus()}findParent(t,e){for(const s of n(this,It).values()){const{x:i,y:r,width:a,height:o}=s.div.getBoundingClientRect();if(t>=i&&t<=i+a&&e>=r&&e<=r+o)return s}return null}disableUserSelect(t=!1){n(this,tl).classList.toggle("noUserSelect",t)}addShouldRescale(t){n(this,an).add(t)}removeShouldRescale(t){n(this,an).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*Gi.PDF_TO_CSS_UNITS;for(const s of n(this,an))s.onScaleChanging();(e=n(this,nn))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t=""){const e=document.getSelection();if(!e||e.isCollapsed)return;const{anchorNode:s,anchorOffset:i,focusNode:r,focusOffset:a}=e,o=e.toString(),h=b(this,jr,lc).call(this,e).closest(".textLayer"),c=this.getSelectionBoxes(h);if(!c)return;e.empty();const f=b(this,el,nf).call(this,h),g=n(this,Ct)===G.NONE,m=()=>{f==null||f.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:c,anchorNode:s,anchorOffset:i,focusNode:r,focusOffset:a,text:o}),g&&this.showAllEditors("highlight",!0,!0)};if(g){this.switchToMode(G.HIGHLIGHT,m);return}m()}addToAnnotationStorage(t){!t.isEmpty()&&n(this,xs)&&!n(this,xs).has(t.id)&&n(this,xs).setValue(t.id,t)}blur(){if(this.isShiftKeyDown=!1,n(this,li)&&(p(this,li,!1),b(this,Wr,hc).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of n(this,Z))if(e.div.contains(t)){p(this,on,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!n(this,on))return;const[t,e]=n(this,on);p(this,on,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){b(this,sl,rf).call(this),b(this,il,af).call(this)}removeEditListeners(){b(this,rd,bg).call(this),b(this,nl,of).call(this)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const s of n(this,Oe))if(s.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const s of n(this,Oe))if(s.isHandlingMimeForPasting(e.type)){s.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var s;if(t.preventDefault(),(s=n(this,ce))==null||s.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of n(this,Z)){const r=i.serialize(!0);r&&e.push(r)}e.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}paste(t){return I(this,null,function*(){t.preventDefault();const{clipboardData:e}=t;for(const r of e.items)for(const a of n(this,Oe))if(a.isHandlingMimeForPasting(r.type)){a.paste(r,this.currentLayer);return}let s=e.getData("application/pdfjs");if(!s)return;try{s=JSON.parse(s)}catch(r){V(`paste: "${r.message}".`);return}if(!Array.isArray(s))return;this.unselectAll();const i=this.currentLayer;try{const r=[];for(const l of s){const h=yield i.deserialize(l);if(!h)return;r.push(h)}const a=()=>{for(const l of r)b(this,rl,lf).call(this,l);b(this,al,hf).call(this,r)},o=()=>{for(const l of r)l.remove()};this.addCommands({cmd:a,undo:o,mustExec:!0})}catch(r){V(`paste: "${r.message}".`)}})}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),n(this,Ct)!==G.NONE&&!this.isEditorHandlingKeyboard&&Mr._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,n(this,li)&&(p(this,li,!1),b(this,Wr,hc).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(t){t?(b(this,id,gg).call(this),b(this,il,af).call(this),b(this,Dt,Yt).call(this,{isEditing:n(this,Ct)!==G.NONE,isEmpty:b(this,hn,yo).call(this),hasSomethingToUndo:n(this,xe).hasSomethingToUndo(),hasSomethingToRedo:n(this,xe).hasSomethingToRedo(),hasSelectedEditor:!1})):(b(this,nd,mg).call(this),b(this,nl,of).call(this),b(this,Dt,Yt).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!n(this,Oe)){p(this,Oe,t);for(const e of n(this,Oe))b(this,Be,_s).call(this,e.defaultPropertiesToUpdate)}}getId(){return n(this,Zc).id}get currentLayer(){return n(this,It).get(n(this,Gr))}getLayer(t){return n(this,It).get(t)}get currentPageIndex(){return n(this,Gr)}addLayer(t){n(this,It).set(t.pageIndex,t),n(this,hi)?t.enable():t.disable()}removeLayer(t){n(this,It).delete(t.pageIndex)}updateMode(t,e=null,s=!1){return I(this,null,function*(){var i;if(n(this,Ct)!==t&&!(n(this,Te)&&(yield n(this,Te).promise,!n(this,Te)))){if(p(this,Te,Promise.withResolvers()),p(this,Ct,t),t===G.NONE){this.setEditingState(!1),b(this,ld,wg).call(this),(i=this._editorUndoBar)==null||i.hide(),n(this,Te).resolve();return}this.setEditingState(!0),yield b(this,od,yg).call(this),this.unselectAll();for(const r of n(this,It).values())r.updateMode(t);if(!e){s&&this.addNewEditorFromKeyboard(),n(this,Te).resolve();return}for(const r of n(this,_t).values())r.annotationElementId===e?(this.setSelected(r),r.enterInEditMode()):r.unselect();n(this,Te).resolve()}})}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t!==n(this,Ct)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,e){var s;if(n(this,Oe)){switch(t){case K.CREATE:this.currentLayer.addNewEditor();return;case K.HIGHLIGHT_DEFAULT_COLOR:(s=n(this,Ko))==null||s.updateColor(e);break;case K.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(n(this,Jo)||p(this,Jo,new Map)).set(t,e),this.showAllEditors("highlight",e);break}for(const i of n(this,Z))i.updateParams(t,e);for(const i of n(this,Oe))i.updateDefaultParams(t,e)}}showAllEditors(t,e,s=!1){var r,a;for(const o of n(this,_t).values())o.editorType===t&&o.show(e);((a=(r=n(this,Jo))==null?void 0:r.get(K.HIGHLIGHT_SHOW_ALL))!=null?a:!0)!==e&&b(this,Be,_s).call(this,[[K.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(n(this,Yo)!==t){p(this,Yo,t);for(const e of n(this,It).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}getEditors(t){const e=[];for(const s of n(this,_t).values())s.pageIndex===t&&e.push(s);return e}getEditor(t){return n(this,_t).get(t)}addEditor(t){n(this,_t).set(t.id,t)}removeEditor(t){var e;t.div.contains(document.activeElement)&&(n(this,ss)&&clearTimeout(n(this,ss)),p(this,ss,setTimeout(()=>{this.focusMainContainer(),p(this,ss,null)},0))),n(this,_t).delete(t.id),this.unselect(t),(!t.annotationElementId||!n(this,rn).has(t.annotationElementId))&&((e=n(this,xs))==null||e.remove(t.id))}addDeletedAnnotationElement(t){n(this,rn).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return n(this,rn).has(t)}removeDeletedAnnotationElement(t){n(this,rn).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){n(this,ce)!==t&&(p(this,ce,t),t&&b(this,Be,_s).call(this,t.propertiesToUpdate))}updateUI(t){n(this,hd,vg)===t&&b(this,Be,_s).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){b(this,Be,_s).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(n(this,Z).has(t)){n(this,Z).delete(t),t.unselect(),b(this,Dt,Yt).call(this,{hasSelectedEditor:this.hasSelection});return}n(this,Z).add(t),t.select(),b(this,Be,_s).call(this,t.propertiesToUpdate),b(this,Dt,Yt).call(this,{hasSelectedEditor:!0})}setSelected(t){var e;(e=n(this,nn))==null||e.commitOrRemove();for(const s of n(this,Z))s!==t&&s.unselect();n(this,Z).clear(),n(this,Z).add(t),t.select(),b(this,Be,_s).call(this,t.propertiesToUpdate),b(this,Dt,Yt).call(this,{hasSelectedEditor:!0})}isSelected(t){return n(this,Z).has(t)}get firstSelectedEditor(){return n(this,Z).values().next().value}unselect(t){t.unselect(),n(this,Z).delete(t),b(this,Dt,Yt).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return n(this,Z).size!==0}get isEnterHandled(){return n(this,Z).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;n(this,xe).undo(),b(this,Dt,Yt).call(this,{hasSomethingToUndo:n(this,xe).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:b(this,hn,yo).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){n(this,xe).redo(),b(this,Dt,Yt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:n(this,xe).hasSomethingToRedo(),isEmpty:b(this,hn,yo).call(this)})}addCommands(t){n(this,xe).add(t),b(this,Dt,Yt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:b(this,hn,yo).call(this)})}cleanUndoStack(t){n(this,xe).cleanType(t)}delete(){var r;this.commitOrRemove();const t=(r=this.currentLayer)==null?void 0:r.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...n(this,Z)],s=()=>{var a;(a=this._editorUndoBar)==null||a.show(i,e.length===1?e[0].editorType:e.length);for(const o of e)o.remove()},i=()=>{for(const a of e)b(this,rl,lf).call(this,a)};this.addCommands({cmd:s,undo:i,mustExec:!0})}commitOrRemove(){var t;(t=n(this,ce))==null||t.commitOrRemove()}hasSomethingToControl(){return n(this,ce)||this.hasSelection}selectAll(){for(const t of n(this,Z))t.commit();b(this,al,hf).call(this,n(this,_t).values())}unselectAll(){var t;if(!(n(this,ce)&&(n(this,ce).commitOrRemove(),n(this,Ct)!==G.NONE))&&!((t=n(this,nn))!=null&&t.commitOrRemove())&&this.hasSelection){for(const e of n(this,Z))e.unselect();n(this,Z).clear(),b(this,Dt,Yt).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,s=!1){if(s||this.commitOrRemove(),!this.hasSelection)return;n(this,di)[0]+=t,n(this,di)[1]+=e;const[i,r]=n(this,di),a=[...n(this,Z)],o=1e3;n(this,ns)&&clearTimeout(n(this,ns)),p(this,ns,setTimeout(()=>{p(this,ns,null),n(this,di)[0]=n(this,di)[1]=0,this.addCommands({cmd:()=>{for(const l of a)n(this,_t).has(l.id)&&l.translateInPage(i,r)},undo:()=>{for(const l of a)n(this,_t).has(l.id)&&l.translateInPage(-i,-r)},mustExec:!1})},o));for(const l of a)l.translateInPage(t,e)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),p(this,es,new Map);for(const t of n(this,Z))n(this,es).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!n(this,es))return!1;this.disableUserSelect(!1);const t=n(this,es);p(this,es,null);let e=!1;for(const[{x:i,y:r,pageIndex:a},o]of t)o.newX=i,o.newY=r,o.newPageIndex=a,e||(e=i!==o.savedX||r!==o.savedY||a!==o.savedPageIndex);if(!e)return!1;const s=(i,r,a,o)=>{if(n(this,_t).has(i.id)){const l=n(this,It).get(o);l?i._setParentAndPosition(l,r,a):(i.pageIndex=o,i.x=r,i.y=a)}};return this.addCommands({cmd:()=>{for(const[i,{newX:r,newY:a,newPageIndex:o}]of t)s(i,r,a,o)},undo:()=>{for(const[i,{savedX:r,savedY:a,savedPageIndex:o}]of t)s(i,r,a,o)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(n(this,es))for(const s of n(this,es).keys())s.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||n(this,Z).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return n(this,ce)===t}getActive(){return n(this,ce)}getMode(){return n(this,Ct)}get imageManager(){return X(this,"imageManager",new ef)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let h=0,c=e.rangeCount;h({x:(c-i)/a,y:1-(h+f-s)/r,width:g/a,height:f/r});break;case"180":o=(h,c,f,g)=>({x:1-(h+f-s)/r,y:1-(c+g-i)/a,width:f/r,height:g/a});break;case"270":o=(h,c,f,g)=>({x:1-(c+g-i)/a,y:(h-s)/r,width:g/a,height:f/r});break;default:o=(h,c,f,g)=>({x:(h-s)/r,y:(c-i)/a,width:f/r,height:g/a});break}const l=[];for(let h=0,c=e.rangeCount;h{g.type==="pointerup"&&g.button!==0||(h.abort(),l==null||l.toggleDrawing(!0),g.type==="pointerup"&&b(this,Wr,hc).call(this,"main_toolbar"))};window.addEventListener("pointerup",f,{signal:c}),window.addEventListener("blur",f,{signal:c})}},Wr=new WeakSet,hc=function(t=""){n(this,Ct)===G.HIGHLIGHT?this.highlightSelection(t):n(this,Wo)&&b(this,td,ug).call(this)},sd=new WeakSet,pg=function(){document.addEventListener("selectionchange",b(this,ed,fg).bind(this),{signal:this._signal})},id=new WeakSet,gg=function(){if(n(this,oi))return;p(this,oi,new AbortController);const t=this.combinedSignal(n(this,oi));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})},nd=new WeakSet,mg=function(){var t;(t=n(this,oi))==null||t.abort(),p(this,oi,null)},sl=new WeakSet,rf=function(){if(n(this,ci))return;p(this,ci,new AbortController);const t=this.combinedSignal(n(this,ci));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})},rd=new WeakSet,bg=function(){var t;(t=n(this,ci))==null||t.abort(),p(this,ci,null)},il=new WeakSet,af=function(){if(n(this,ai))return;p(this,ai,new AbortController);const t=this.combinedSignal(n(this,ai));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})},nl=new WeakSet,of=function(){var t;(t=n(this,ai))==null||t.abort(),p(this,ai,null)},ad=new WeakSet,Ag=function(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})},Dt=new WeakSet,Yt=function(t){Object.entries(t).some(([s,i])=>n(this,Zo)[s]!==i)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(n(this,Zo),t)}),n(this,Ct)===G.HIGHLIGHT&&t.hasSelectedEditor===!1&&b(this,Be,_s).call(this,[[K.HIGHLIGHT_FREE,!0]]))},Be=new WeakSet,_s=function(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})},od=new WeakSet,yg=function(){return I(this,null,function*(){if(!n(this,hi)){p(this,hi,!0);const t=[];for(const e of n(this,It).values())t.push(e.enable());yield Promise.all(t);for(const e of n(this,_t).values())e.enable()}})},ld=new WeakSet,wg=function(){if(this.unselectAll(),n(this,hi)){p(this,hi,!1);for(const t of n(this,It).values())t.disable();for(const t of n(this,_t).values())t.disable()}},rl=new WeakSet,lf=function(t){const e=n(this,It).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))},hd=new WeakSet,vg=function(){let t=null;for(t of n(this,Z));return t},hn=new WeakSet,yo=function(){if(n(this,_t).size===0)return!0;if(n(this,_t).size===1)for(const t of n(this,_t).values())return t.isEmpty();return!1},al=new WeakSet,hf=function(t){for(const e of n(this,Z))e.unselect();n(this,Z).clear();for(const e of t)e.isEmpty()||(n(this,Z).add(e),e.select());b(this,Dt,Yt).call(this,{hasSelectedEditor:this.hasSelection})},O(Mr,"TRANSLATE_SMALL",1),O(Mr,"TRANSLATE_BIG",10);let Ar=Mr;var xt,rs,He,Xr,as,de,qr,os,ne,Rs,cn,ls,ui,dn,wo,Yr,cc;const Kt=class Kt{constructor(t){u(this,dn);u(this,Yr);u(this,xt,null);u(this,rs,!1);u(this,He,null);u(this,Xr,null);u(this,as,null);u(this,de,null);u(this,qr,!1);u(this,os,null);u(this,ne,null);u(this,Rs,null);u(this,cn,null);u(this,ls,!1);p(this,ne,t),p(this,ls,t._uiManager.useNewAltTextFlow),n(Kt,ui)||p(Kt,ui,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){var e;(e=Kt._l10n)!=null||(Kt._l10n=t)}render(){return I(this,null,function*(){const t=p(this,He,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=p(this,Xr,document.createElement("span"));t.append(e),n(this,ls)?(t.classList.add("new"),t.setAttribute("data-l10n-id",n(Kt,ui).missing),e.setAttribute("data-l10n-id",n(Kt,ui)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const s=n(this,ne)._uiManager._signal;t.addEventListener("contextmenu",Ke,{signal:s}),t.addEventListener("pointerdown",r=>r.stopPropagation(),{signal:s});const i=r=>{r.preventDefault(),n(this,ne)._uiManager.editAltText(n(this,ne)),n(this,ls)&&n(this,ne)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:n(this,dn,wo)}})};return t.addEventListener("click",i,{capture:!0,signal:s}),t.addEventListener("keydown",r=>{r.target===t&&r.key==="Enter"&&(p(this,qr,!0),i(r))},{signal:s}),yield b(this,Yr,cc).call(this),t})}finish(){n(this,He)&&(n(this,He).focus({focusVisible:n(this,qr)}),p(this,qr,!1))}isEmpty(){return n(this,ls)?n(this,xt)===null:!n(this,xt)&&!n(this,rs)}hasData(){return n(this,ls)?n(this,xt)!==null||!!n(this,Rs):this.isEmpty()}get guessedText(){return n(this,Rs)}setGuessedText(t){return I(this,null,function*(){n(this,xt)===null&&(p(this,Rs,t),p(this,cn,yield Kt._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),b(this,Yr,cc).call(this))})}toggleAltTextBadge(t=!1){var e;if(!n(this,ls)||n(this,xt)){(e=n(this,os))==null||e.remove(),p(this,os,null);return}if(!n(this,os)){const s=p(this,os,document.createElement("div"));s.className="noAltTextBadge",n(this,ne).div.append(s)}n(this,os).classList.toggle("hidden",!t)}serialize(t){let e=n(this,xt);return!t&&n(this,Rs)===e&&(e=n(this,cn)),{altText:e,decorative:n(this,rs),guessedText:n(this,Rs),textWithDisclaimer:n(this,cn)}}get data(){return{altText:n(this,xt),decorative:n(this,rs)}}set data({altText:t,decorative:e,guessedText:s,textWithDisclaimer:i,cancel:r=!1}){s&&(p(this,Rs,s),p(this,cn,i)),!(n(this,xt)===t&&n(this,rs)===e)&&(r||(p(this,xt,t),p(this,rs,e)),b(this,Yr,cc).call(this))}toggle(t=!1){n(this,He)&&(!t&&n(this,de)&&(clearTimeout(n(this,de)),p(this,de,null)),n(this,He).disabled=!t)}shown(){n(this,ne)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:n(this,dn,wo)}})}destroy(){var t,e;(t=n(this,He))==null||t.remove(),p(this,He,null),p(this,Xr,null),p(this,as,null),(e=n(this,os))==null||e.remove(),p(this,os,null)}};xt=new WeakMap,rs=new WeakMap,He=new WeakMap,Xr=new WeakMap,as=new WeakMap,de=new WeakMap,qr=new WeakMap,os=new WeakMap,ne=new WeakMap,Rs=new WeakMap,cn=new WeakMap,ls=new WeakMap,ui=new WeakMap,dn=new WeakSet,wo=function(){return n(this,xt)&&"added"||n(this,xt)===null&&this.guessedText&&"review"||"missing"},Yr=new WeakSet,cc=function(){return I(this,null,function*(){var i,r,a;const t=n(this,He);if(!t)return;if(n(this,ls)){if(t.classList.toggle("done",!!n(this,xt)),t.setAttribute("data-l10n-id",n(Kt,ui)[n(this,dn,wo)]),(i=n(this,Xr))==null||i.setAttribute("data-l10n-id",n(Kt,ui)[`${n(this,dn,wo)}-label`]),!n(this,xt)){(r=n(this,as))==null||r.remove();return}}else{if(!n(this,xt)&&!n(this,rs)){t.classList.remove("done"),(a=n(this,as))==null||a.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=n(this,as);if(!e){p(this,as,e=document.createElement("span")),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${n(this,ne).id}`;const o=100,l=n(this,ne)._uiManager._signal;l.addEventListener("abort",()=>{clearTimeout(n(this,de)),p(this,de,null)},{once:!0}),t.addEventListener("mouseenter",()=>{p(this,de,setTimeout(()=>{p(this,de,null),n(this,as).classList.add("show"),n(this,ne)._reportTelemetry({action:"alt_text_tooltip"})},o))},{signal:l}),t.addEventListener("mouseleave",()=>{var h;n(this,de)&&(clearTimeout(n(this,de)),p(this,de,null)),(h=n(this,as))==null||h.classList.remove("show")},{signal:l})}n(this,rs)?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=n(this,xt)),e.parentNode||t.append(e);const s=n(this,ne).getImageForAltText();s==null||s.setAttribute("aria-describedby",e.id)})},u(Kt,ui,null),O(Kt,"_l10n",null);let Oc=Kt;var ol,un,ll,hl,cl,dl,ul,Kr,ks,fn,fi,cd,_g,dd,Sg,fl,cf;const vp=class vp{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:s=null,onPinchStart:i=null,onPinching:r=null,onPinchEnd:a=null,signal:o}){u(this,cd);u(this,dd);u(this,fl);u(this,ol,void 0);u(this,un,!1);u(this,ll,null);u(this,hl,void 0);u(this,cl,void 0);u(this,dl,void 0);u(this,ul,void 0);u(this,Kr,void 0);u(this,ks,null);u(this,fn,void 0);u(this,fi,null);p(this,ol,t),p(this,ll,s),p(this,hl,e),p(this,cl,i),p(this,dl,r),p(this,ul,a),p(this,fn,new AbortController),p(this,Kr,AbortSignal.any([o,n(this,fn).signal])),t.addEventListener("touchstart",b(this,cd,_g).bind(this),{passive:!1,signal:n(this,Kr)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return X(this,"MIN_TOUCH_DISTANCE_TO_PINCH",35/(window.devicePixelRatio||1))}destroy(){var t;(t=n(this,fn))==null||t.abort(),p(this,fn,null)}};ol=new WeakMap,un=new WeakMap,ll=new WeakMap,hl=new WeakMap,cl=new WeakMap,dl=new WeakMap,ul=new WeakMap,Kr=new WeakMap,ks=new WeakMap,fn=new WeakMap,fi=new WeakMap,cd=new WeakSet,_g=function(t){var i,r,a;if((i=n(this,hl))!=null&&i.call(this)||t.touches.length<2)return;if(!n(this,fi)){p(this,fi,new AbortController);const o=AbortSignal.any([n(this,Kr),n(this,fi).signal]),l=n(this,ol),h={signal:o,passive:!1};l.addEventListener("touchmove",b(this,dd,Sg).bind(this),h),l.addEventListener("touchend",b(this,fl,cf).bind(this),h),l.addEventListener("touchcancel",b(this,fl,cf).bind(this),h),(r=n(this,cl))==null||r.call(this)}if(Se(t),t.touches.length!==2||(a=n(this,ll))!=null&&a.call(this)){p(this,ks,null);return}let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]),p(this,ks,{touch0X:e.screenX,touch0Y:e.screenY,touch1X:s.screenX,touch1Y:s.screenY})},dd=new WeakSet,Sg=function(t){var S;if(!n(this,ks)||t.touches.length!==2)return;let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]);const{screenX:i,screenY:r}=e,{screenX:a,screenY:o}=s,l=n(this,ks),{touch0X:h,touch0Y:c,touch1X:f,touch1Y:g}=l,m=f-h,A=g-c,y=a-i,v=o-r,w=Math.hypot(y,v)||1,_=Math.hypot(m,A)||1;if(!n(this,un)&&Math.abs(_-w)<=vp.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=i,l.touch0Y=r,l.touch1X=a,l.touch1Y=o,t.preventDefault(),!n(this,un)){p(this,un,!0);return}const E=[(i+a)/2,(r+o)/2];(S=n(this,dl))==null||S.call(this,E,_,w)},fl=new WeakSet,cf=function(t){var e;n(this,fi).abort(),p(this,fi,null),(e=n(this,ul))==null||e.call(this),n(this,ks)&&(t.preventDefault(),p(this,ks,null),p(this,un,!1))};let Bc=vp;var pn,ze,at,Qr,pi,pl,gn,Ft,mn,Ms,gi,gl,bn,ue,ml,An,Ls,hs,Jr,Zr,Pe,yn,bl,ud,Al,df,yl,uf,ta,dc,fd,Eg,pd,Cg,wl,ff,ea,uc,vl,pf,gd,xg,md,Tg,bd,Pg,_l,gf,Ad,Rg,Sl,mf,yd,kg,wd,Mg,vd,Lg,El,bf,wn,vo;const U=class U{constructor(t){u(this,Al);u(this,ta);u(this,fd);u(this,pd);u(this,wl);u(this,ea);u(this,vl);u(this,gd);u(this,md);u(this,bd);u(this,_l);u(this,Ad);u(this,Sl);u(this,yd);u(this,wd);u(this,vd);u(this,El);u(this,wn);u(this,pn,null);u(this,ze,null);u(this,at,null);u(this,Qr,!1);u(this,pi,null);u(this,pl,"");u(this,gn,!1);u(this,Ft,null);u(this,mn,null);u(this,Ms,null);u(this,gi,null);u(this,gl,"");u(this,bn,!1);u(this,ue,null);u(this,ml,!1);u(this,An,!1);u(this,Ls,!1);u(this,hs,null);u(this,Jr,0);u(this,Zr,0);u(this,Pe,null);u(this,yn,null);O(this,"_editToolbar",null);O(this,"_initialOptions",Object.create(null));O(this,"_initialData",null);O(this,"_isVisible",!0);O(this,"_uiManager",null);O(this,"_focusEventsAllowed",!0);u(this,bl,!1);u(this,ud,U._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:e,rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[r,a];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=U.prototype._resizeWithKeyboard,e=Ar.TRANSLATE_SMALL,s=Ar.TRANSLATE_BIG;return X(this,"_resizerKeyboardManager",new Qh([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-s,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[s,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-s]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,s]}],[["Escape","mac+Escape"],U.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get isDrawer(){return!1}static get _defaultLineColor(){return X(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new iA({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){var i;if((i=U._l10n)!=null||(U._l10n=t),U._l10nResizer||(U._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),U._borderLineWidth!==-1)return;const s=getComputedStyle(document.documentElement);U._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){it("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return n(this,bl)}set _isDraggable(t){var e;p(this,bl,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=n(this,ud)}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):b(this,wn,vo).call(this),this.parent=t}focusin(t){this._focusEventsAllowed&&(n(this,bn)?p(this,bn,!1):this.parent.setSelected(this))}focusout(t){var s;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(s=this.parent)!=null&&s.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,s,i){const[r,a]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(t+s)/r,this.y=(e+i)/a,this.fixAndSetPosition()}translate(t,e){b(this,Al,df).call(this,this.parentDimensions,t,e)}translateInPage(t,e){n(this,ue)||p(this,ue,[this.x,this.y,this.width,this.height]),b(this,Al,df).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){n(this,ue)||p(this,ue,[this.x,this.y,this.width,this.height]);const{div:s,parentDimensions:[i,r]}=this;if(this.x+=t/i,this.y+=e/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:f,y:g}=this.div.getBoundingClientRect();this.parent.findNewParent(this,f,g)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:a,y:o}=this;const[l,h]=this.getBaseTranslation();a+=l,o+=h;const{style:c}=s;c.left=`${(100*a).toFixed(2)}%`,c.top=`${(100*o).toFixed(2)}%`,this._onTranslating(a,o),s.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!n(this,ue)&&(n(this,ue)[0]!==this.x||n(this,ue)[1]!==this.y)}get _hasBeenResized(){return!!n(this,ue)&&(n(this,ue)[2]!==this.width||n(this,ue)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:s}=U,i=s/t,r=s/e;switch(this.rotation){case 90:return[-i,r];case 180:return[i,r];case 270:return[i,-r];default:return[-i,-r]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[s,i]}=this;let{x:r,y:a,width:o,height:l}=this;if(o*=s,l*=i,r*=s,a*=i,this._mustFixPosition)switch(t){case 0:r=Math.max(0,Math.min(s-o,r)),a=Math.max(0,Math.min(i-l,a));break;case 90:r=Math.max(0,Math.min(s-l,r)),a=Math.min(i,Math.max(o,a));break;case 180:r=Math.min(s,Math.max(o,r)),a=Math.min(i,Math.max(l,a));break;case 270:r=Math.min(s,Math.max(l,r)),a=Math.max(0,Math.min(i-o,a));break}this.x=r/=s,this.y=a/=i;const[h,c]=this.getBaseTranslation();r+=h,a+=c,e.left=`${(100*r).toFixed(2)}%`,e.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var s;return b(s=U,yl,uf).call(s,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var s;return b(s=U,yl,uf).call(s,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,s]}=this;return[e*t,s*t]}setDims(t,e){const[s,i]=this.parentDimensions,{style:r}=this.div;r.width=`${(100*t/s).toFixed(2)}%`,n(this,gn)||(r.height=`${(100*e/i).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:e,width:s}=t,i=s.endsWith("%"),r=!n(this,gn)&&e.endsWith("%");if(i&&r)return;const[a,o]=this.parentDimensions;i||(t.width=`${(100*parseFloat(s)/a).toFixed(2)}%`),!n(this,gn)&&!r&&(t.height=`${(100*parseFloat(e)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=n(this,at))==null||t.finish()}addEditToolbar(){return I(this,null,function*(){return this._editToolbar||n(this,An)?this._editToolbar:(this._editToolbar=new Zu(this),this.div.append(this._editToolbar.render()),n(this,at)&&(yield this._editToolbar.addAltText(n(this,at))),this._editToolbar)})}removeEditToolbar(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(t=n(this,at))==null||t.destroy())}addContainer(t){var s;const e=(s=this._editToolbar)==null?void 0:s.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}addAltTextButton(){return I(this,null,function*(){n(this,at)||(Oc.initialize(U._l10n),p(this,at,new Oc(this)),n(this,pn)&&(n(this,at).data=n(this,pn),p(this,pn,null)),yield this.addEditToolbar())})}get altTextData(){var t;return(t=n(this,at))==null?void 0:t.data}set altTextData(t){n(this,at)&&(n(this,at).data=t)}get guessedAltText(){var t;return(t=n(this,at))==null?void 0:t.guessedText}setGuessedAltText(t){return I(this,null,function*(){var e;yield(e=n(this,at))==null?void 0:e.setGuessedText(t)})}serializeAltText(t){var e;return(e=n(this,at))==null?void 0:e.serialize(t)}hasAltText(){return!!n(this,at)&&!n(this,at).isEmpty()}hasAltTextData(){var t,e;return(e=(t=n(this,at))==null?void 0:t.hasData())!=null?e:!1}render(){var r;this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=n(this,Qr)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),b(this,Sl,mf).call(this);const[t,e]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*e/t).toFixed(2)}%`,this.div.style.maxHeight=`${(100*t/e).toFixed(2)}%`);const[s,i]=this.getInitialTranslation();return this.translate(s,i),Nc(this,this.div,["pointerdown"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(n(this,yn)||p(this,yn,new Bc({container:this.div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:b(this,gd,xg).bind(this),onPinching:b(this,md,Tg).bind(this),onPinchEnd:b(this,bd,Pg).bind(this),signal:this._uiManager._signal}))),(r=this._uiManager._editorUndoBar)==null||r.hide(),this.div}pointerdown(t){const{isMac:e}=te.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(p(this,bn,!0),this._isDraggable){b(this,Ad,Rg).call(this,t);return}b(this,_l,gf).call(this,t)}get isSelected(){return this._uiManager.isSelected(this)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){n(this,hs)&&clearTimeout(n(this,hs)),p(this,hs,setTimeout(()=>{var t;p(this,hs,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,s){t.changeParent(this),this.x=e,this.y=s,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,s=this.rotation){const i=this.parentScale,[r,a]=this.pageDimensions,[o,l]=this.pageTranslation,h=t/i,c=e/i,f=this.x*r,g=this.y*a,m=this.width*r,A=this.height*a;switch(s){case 0:return[f+h+o,a-g-c-A+l,f+h+m+o,a-g-c+l];case 90:return[f+c+o,a-g+h+l,f+c+A+o,a-g+h+m+l];case 180:return[f-h-m+o,a-g+c+l,f-h+o,a-g+c+A+l];case 270:return[f-c-A+o,a-g-h-m+l,f-c+o,a-g-h+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[s,i,r,a]=t,o=r-s,l=a-i;switch(this.rotation){case 0:return[s,e-a,o,l];case 90:return[s,e-i,l,o];case 180:return[r,e-i,o,l];case 270:return[r,e-a,l,o];default:throw new Error("Invalid rotation")}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){p(this,An,!0)}disableEditMode(){p(this,An,!1)}isInEditMode(){return n(this,An)}shouldGetKeyboardEvents(){return n(this,Ls)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:s,right:i}=this.getClientDimensions(),{innerHeight:r,innerWidth:a}=window;return e0&&t0}rebuild(){b(this,Sl,mf).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){it("An editor must be serializable")}static deserialize(t,e,s){return I(this,null,function*(){const i=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:s});i.rotation=t.rotation,p(i,pn,t.accessibilityData);const[r,a]=i.pageDimensions,[o,l,h,c]=i.getRectInCurrentCoords(t.rect,a);return i.x=o/r,i.y=l/a,i.width=h/r,i.height=c/a,i})}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e;if((t=n(this,gi))==null||t.abort(),p(this,gi,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),n(this,hs)&&(clearTimeout(n(this,hs)),p(this,hs,null)),b(this,wn,vo).call(this),this.removeEditToolbar(),n(this,Pe)){for(const s of n(this,Pe).values())clearTimeout(s);p(this,Pe,null)}this.parent=null,(e=n(this,yn))==null||e.destroy(),p(this,yn,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(b(this,fd,Eg).call(this),n(this,Ft).classList.remove("hidden"),Nc(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),p(this,Ms,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=n(this,Ft).children;if(!n(this,ze)){p(this,ze,Array.from(e));const a=b(this,yd,kg).bind(this),o=b(this,wd,Mg).bind(this),l=this._uiManager._signal;for(const h of n(this,ze)){const c=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",a,{signal:l}),h.addEventListener("blur",o,{signal:l}),h.addEventListener("focus",b(this,vd,Lg).bind(this,c),{signal:l}),h.setAttribute("data-l10n-id",U._l10nResizer[c])}}const s=n(this,ze)[0];let i=0;for(const a of e){if(a===s)break;i++}const r=(360-this.rotation+this.parentRotation)%360/90*(n(this,ze).length/4);if(r!==i){if(ri)for(let o=0;o{var i,r;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((r=this._editToolbar)==null||r.show())});return}(e=this._editToolbar)==null||e.show(),(s=n(this,at))==null||s.toggleAltTextBadge(!1)}unselect(){var t,e,s,i,r;(t=n(this,Ft))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(s=this.div)!=null&&s.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(r=n(this,at))==null||r.toggleAltTextBadge(!0)}updateParams(t,e){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return n(this,ml)}set isEditing(t){p(this,ml,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){p(this,gn,!0);const s=t/e,{style:i}=this.div;i.aspectRatio=s,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){n(this,Pe)||p(this,Pe,new Map);const{action:s}=t;let i=n(this,Pe).get(s);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(t),n(this,Pe).delete(s),n(this,Pe).size===0&&p(this,Pe,null)},U._telemetryTimeout),n(this,Pe).set(s,i);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),p(this,Qr,!1)}disable(){this.div&&(this.div.tabIndex=-1),p(this,Qr,!0)}renderAnnotationElement(t){let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const s=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),s.before(e)}return e}resetAnnotationElement(t){const{firstChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};pn=new WeakMap,ze=new WeakMap,at=new WeakMap,Qr=new WeakMap,pi=new WeakMap,pl=new WeakMap,gn=new WeakMap,Ft=new WeakMap,mn=new WeakMap,Ms=new WeakMap,gi=new WeakMap,gl=new WeakMap,bn=new WeakMap,ue=new WeakMap,ml=new WeakMap,An=new WeakMap,Ls=new WeakMap,hs=new WeakMap,Jr=new WeakMap,Zr=new WeakMap,Pe=new WeakMap,yn=new WeakMap,bl=new WeakMap,ud=new WeakMap,Al=new WeakSet,df=function([t,e],s,i){[s,i]=this.screenToPageTranslation(s,i),this.x+=s/t,this.y+=i/e,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},yl=new WeakSet,uf=function(t,e,s){switch(s){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},ta=new WeakSet,dc=function(t){switch(t){case 90:{const[e,s]=this.pageDimensions;return[0,-e/s,s/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,s]=this.pageDimensions;return[0,e/s,-s/e,0]}default:return[1,0,0,1]}},fd=new WeakSet,Eg=function(){if(n(this,Ft))return;p(this,Ft,document.createElement("div")),n(this,Ft).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const s of t){const i=document.createElement("div");n(this,Ft).append(i),i.classList.add("resizer",s),i.setAttribute("data-resizer-name",s),i.addEventListener("pointerdown",b(this,pd,Cg).bind(this,s),{signal:e}),i.addEventListener("contextmenu",Ke,{signal:e}),i.tabIndex=-1}this.div.prepend(n(this,Ft))},pd=new WeakSet,Cg=function(t,e){var c;e.preventDefault();const{isMac:s}=te.platform;if(e.button!==0||e.ctrlKey&&s)return;(c=n(this,at))==null||c.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,p(this,mn,[e.screenX,e.screenY]);const r=new AbortController,a=this._uiManager.combinedSignal(r);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",b(this,vl,pf).bind(this,t),{passive:!0,capture:!0,signal:a}),window.addEventListener("touchmove",Se,{passive:!1,signal:a}),window.addEventListener("contextmenu",Ke,{signal:a}),p(this,Ms,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const o=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const h=()=>{var f;r.abort(),this.parent.togglePointerEvents(!0),(f=n(this,at))==null||f.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=o,this.div.style.cursor=l,b(this,ea,uc).call(this)};window.addEventListener("pointerup",h,{signal:a}),window.addEventListener("blur",h,{signal:a})},wl=new WeakSet,ff=function(t,e,s,i){this.width=s,this.height=i,this.x=t,this.y=e;const[r,a]=this.parentDimensions;this.setDims(r*s,a*i),this.fixAndSetPosition(),this._onResized()},ea=new WeakSet,uc=function(){if(!n(this,Ms))return;const{savedX:t,savedY:e,savedWidth:s,savedHeight:i}=n(this,Ms);p(this,Ms,null);const r=this.x,a=this.y,o=this.width,l=this.height;r===t&&a===e&&o===s&&l===i||this.addCommands({cmd:b(this,wl,ff).bind(this,r,a,o,l),undo:b(this,wl,ff).bind(this,t,e,s,i),mustExec:!0})},vl=new WeakSet,pf=function(t,e){const[s,i]=this.parentDimensions,r=this.x,a=this.y,o=this.width,l=this.height,h=U.MIN_SIZE/s,c=U.MIN_SIZE/i,f=b(this,ta,dc).call(this,this.rotation),g=(x,R)=>[f[0]*x+f[2]*R,f[1]*x+f[3]*R],m=b(this,ta,dc).call(this,360-this.rotation),A=(x,R)=>[m[0]*x+m[2]*R,m[1]*x+m[3]*R];let y,v,w=!1,_=!1;switch(t){case"topLeft":w=!0,y=(x,R)=>[0,0],v=(x,R)=>[x,R];break;case"topMiddle":y=(x,R)=>[x/2,0],v=(x,R)=>[x/2,R];break;case"topRight":w=!0,y=(x,R)=>[x,0],v=(x,R)=>[0,R];break;case"middleRight":_=!0,y=(x,R)=>[x,R/2],v=(x,R)=>[0,R/2];break;case"bottomRight":w=!0,y=(x,R)=>[x,R],v=(x,R)=>[0,0];break;case"bottomMiddle":y=(x,R)=>[x/2,R],v=(x,R)=>[x/2,0];break;case"bottomLeft":w=!0,y=(x,R)=>[0,R],v=(x,R)=>[x,0];break;case"middleLeft":_=!0,y=(x,R)=>[0,R/2],v=(x,R)=>[x,R/2];break}const E=y(o,l),S=v(o,l);let C=g(...S);const P=U._round(r+C[0]),T=U._round(a+C[1]);let k=1,N=1,$,B;if(e.fromKeyboard)({deltaX:$,deltaY:B}=e);else{const{screenX:x,screenY:R}=e,[q,j]=n(this,mn);[$,B]=this.screenToPageTranslation(x-q,R-j),n(this,mn)[0]=x,n(this,mn)[1]=R}if([$,B]=A($/s,B/i),w){const x=Math.hypot(o,l);k=N=Math.max(Math.min(Math.hypot(S[0]-E[0]-$,S[1]-E[1]-B)/x,1/o,1/l),h/o,c/l)}else _?k=Math.max(h,Math.min(1,Math.abs(S[0]-E[0]-$)))/o:N=Math.max(c,Math.min(1,Math.abs(S[1]-E[1]-B)))/l;const st=U._round(o*k),nt=U._round(l*N);C=g(...v(st,nt));const Q=P-C[0],Et=T-C[1];n(this,ue)||p(this,ue,[this.x,this.y,this.width,this.height]),this.width=st,this.height=nt,this.x=Q,this.y=Et,this.setDims(s*st,i*nt),this.fixAndSetPosition(),this._onResizing()},gd=new WeakSet,xg=function(){var t;p(this,Ms,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(t=n(this,at))==null||t.toggle(!1),this.parent.togglePointerEvents(!1)},md=new WeakSet,Tg=function(t,e,s){let r=.7*(s/e)+1-.7;if(r===1)return;const a=b(this,ta,dc).call(this,this.rotation),o=(P,T)=>[a[0]*P+a[2]*T,a[1]*P+a[3]*T],[l,h]=this.parentDimensions,c=this.x,f=this.y,g=this.width,m=this.height,A=U.MIN_SIZE/l,y=U.MIN_SIZE/h;r=Math.max(Math.min(r,1/g,1/m),A/g,y/m);const v=U._round(g*r),w=U._round(m*r);if(v===g&&w===m)return;n(this,ue)||p(this,ue,[c,f,g,m]);const _=o(g/2,m/2),E=U._round(c+_[0]),S=U._round(f+_[1]),C=o(v/2,w/2);this.x=E-C[0],this.y=S-C[1],this.width=v,this.height=w,this.setDims(l*v,h*w),this.fixAndSetPosition(),this._onResizing()},bd=new WeakSet,Pg=function(){var t;(t=n(this,at))==null||t.toggle(!0),this.parent.togglePointerEvents(!0),b(this,ea,uc).call(this)},_l=new WeakSet,gf=function(t){const{isMac:e}=te.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},Ad=new WeakSet,Rg=function(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let s=!1;const i=new AbortController,r=this._uiManager.combinedSignal(i),a={capture:!0,passive:!1,signal:r},o=h=>{i.abort(),p(this,pi,null),p(this,bn,!1),this._uiManager.endDragSession()||b(this,_l,gf).call(this,h),s&&this._onStopDragging()};e&&(p(this,Jr,t.clientX),p(this,Zr,t.clientY),p(this,pi,t.pointerId),p(this,pl,t.pointerType),window.addEventListener("pointermove",h=>{s||(s=!0,this._onStartDragging());const{clientX:c,clientY:f,pointerId:g}=h;if(g!==n(this,pi)){Se(h);return}const[m,A]=this.screenToPageTranslation(c-n(this,Jr),f-n(this,Zr));p(this,Jr,c),p(this,Zr,f),this._uiManager.dragSelectedEditors(m,A)},a),window.addEventListener("touchmove",Se,a),window.addEventListener("pointerdown",h=>{h.pointerType===n(this,pl)&&(n(this,yn)||h.isPrimary)&&o(h),Se(h)},a));const l=h=>{if(!n(this,pi)||n(this,pi)===h.pointerId){o(h);return}Se(h)};window.addEventListener("pointerup",l,{signal:r}),window.addEventListener("blur",l,{signal:r})},Sl=new WeakSet,mf=function(){if(n(this,gi)||!this.div)return;p(this,gi,new AbortController);const t=this._uiManager.combinedSignal(n(this,gi));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},yd=new WeakSet,kg=function(t){U._resizerKeyboardManager.exec(this,t)},wd=new WeakSet,Mg=function(t){var e;n(this,Ls)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==n(this,Ft)&&b(this,wn,vo).call(this)},vd=new WeakSet,Lg=function(t){p(this,gl,n(this,Ls)?t:"")},El=new WeakSet,bf=function(t){if(n(this,ze))for(const e of n(this,ze))e.tabIndex=t},wn=new WeakSet,vo=function(){p(this,Ls,!1),b(this,El,bf).call(this,-1),b(this,ea,uc).call(this)},u(U,yl),O(U,"_l10n",null),O(U,"_l10nResizer",null),O(U,"_borderLineWidth",-1),O(U,"_colorManager",new sf),O(U,"_zIndex",1),O(U,"_telemetryTimeout",1e3);let ut=U;class iA extends ut{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Fp=3285377520,Ce=4294901760,Ze=65535;class Ig{constructor(t){this.h1=t?t&4294967295:Fp,this.h2=t?t&4294967295:Fp}update(t){let e,s;if(typeof t=="string"){e=new Uint8Array(t.length*2),s=0;for(let y=0,v=t.length;y>>8,e[s++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),s=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=s>>2,r=s-i*4,a=new Uint32Array(e.buffer,0,i);let o=0,l=0,h=this.h1,c=this.h2;const f=3432918353,g=461845907,m=f&Ze,A=g&Ze;for(let y=0;y>>17,o=o*g&Ce|o*A&Ze,h^=o,h=h<<13|h>>>19,h=h*5+3864292196):(l=a[y],l=l*f&Ce|l*m&Ze,l=l<<15|l>>>17,l=l*g&Ce|l*A&Ze,c^=l,c=c<<13|c>>>19,c=c*5+3864292196);switch(o=0,r){case 3:o^=e[i*4+2]<<16;case 2:o^=e[i*4+1]<<8;case 1:o^=e[i*4],o=o*f&Ce|o*m&Ze,o=o<<15|o>>>17,o=o*g&Ce|o*A&Ze,i&1?h^=o:c^=o}this.h1=h,this.h2=c}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&Ce|t*36045&Ze,e=e*4283543511&Ce|((e<<16|t>>>16)*2950163797&Ce)>>>16,t^=e>>>1,t=t*444984403&Ce|t*60499&Ze,e=e*3301882366&Ce|((e<<16|t>>>16)*3120437893&Ce)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const Af=Object.freeze({map:null,hash:"",transfer:void 0});var vn,_n,Tt,_d,Dg;class mp{constructor(){u(this,_d);u(this,vn,!1);u(this,_n,null);u(this,Tt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const s=n(this,Tt).get(t);return s===void 0?e:Object.assign(e,s)}getRawValue(t){return n(this,Tt).get(t)}remove(t){if(n(this,Tt).delete(t),n(this,Tt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const e of n(this,Tt).values())if(e instanceof ut)return;this.onAnnotationEditor(null)}}setValue(t,e){const s=n(this,Tt).get(t);let i=!1;if(s!==void 0)for(const[r,a]of Object.entries(e))s[r]!==a&&(i=!0,s[r]=a);else i=!0,n(this,Tt).set(t,e);i&&b(this,_d,Dg).call(this),e instanceof ut&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(e.constructor._type)}has(t){return n(this,Tt).has(t)}getAll(){return n(this,Tt).size>0?cp(n(this,Tt)):null}setAll(t){for(const[e,s]of Object.entries(t))this.setValue(e,s)}get size(){return n(this,Tt).size}resetModified(){n(this,vn)&&(p(this,vn,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new Fg(this)}get serializable(){if(n(this,Tt).size===0)return Af;const t=new Map,e=new Ig,s=[],i=Object.create(null);let r=!1;for(const[a,o]of n(this,Tt)){const l=o instanceof ut?o.serialize(!1,i):o;l&&(t.set(a,l),e.update(`${a}:${JSON.stringify(l)}`),r||(r=!!l.bitmap))}if(r)for(const a of t.values())a.bitmap&&s.push(a.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:s}:Af}get editorStats(){var s;let t=null;const e=new Map;for(const i of n(this,Tt).values()){if(!(i instanceof ut))continue;const r=i.telemetryFinalData;if(!r)continue;const{type:a}=r;e.has(a)||e.set(a,Object.getPrototypeOf(i).constructor),t||(t=Object.create(null));const o=t[a]||(t[a]=new Map);for(const[l,h]of Object.entries(r)){if(l==="type")continue;let c=o.get(l);c||(c=new Map,o.set(l,c));const f=(s=c.get(h))!=null?s:0;c.set(h,f+1)}}for(const[i,r]of e)t[i]=r.computeTelemetryFinalData(t[i]);return t}resetModifiedIds(){p(this,_n,null)}get modifiedIds(){if(n(this,_n))return n(this,_n);const t=[];for(const e of n(this,Tt).values())!(e instanceof ut)||!e.annotationElementId||!e.serialize()||t.push(e.annotationElementId);return p(this,_n,{ids:new Set(t),hash:t.join(",")})}}vn=new WeakMap,_n=new WeakMap,Tt=new WeakMap,_d=new WeakSet,Dg=function(){n(this,vn)||(p(this,vn,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var Cl;class Fg extends mp{constructor(e){super();u(this,Cl,void 0);const{map:s,hash:i,transfer:r}=e.serializable,a=structuredClone(s,r?{transfer:r}:null);p(this,Cl,{map:a,hash:i,transfer:r})}get print(){it("Should not call PrintAnnotationStorage.print")}get serializable(){return n(this,Cl)}get modifiedIds(){return X(this,"modifiedIds",{ids:new Set,hash:""})}}Cl=new WeakMap;var sa;class nA{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){u(this,sa,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),n(this,sa).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}loadSystemFont(s){return I(this,arguments,function*({systemFontInfo:t,_inspectFont:e}){if(!(!t||n(this,sa).has(t.loadedName))){if(wt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:r,style:a}=t,o=new FontFace(i,r,a);this.addNativeFontFace(o);try{yield o.load(),n(this,sa).add(i),e==null||e(t)}catch(l){V(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}it("Not implemented: loadSystemFont without the Font Loading API.")}})}bind(t){return I(this,null,function*(){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){yield this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const s=t.createNativeFontFace();if(s){this.addNativeFontFace(s);try{yield s.loaded}catch(i){throw V(`Failed to load font '${s.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;yield new Promise(s=>{const i=this._queueLoadingCallback(s);this._prepareFontLoadEvent(t,i)})}})}get isFontLoadingAPISupported(){var e;const t=!!((e=this._document)!=null&&e.fonts);return X(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(Xt||typeof navigator!="undefined"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),X(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){function e(){for(wt(!i.done,"completeRequest() cannot be called twice."),i.done=!0;s.length>0&&s[0].done;){const r=s.shift();setTimeout(r.callback,0)}}const{loadingRequests:s}=this,i={done:!1,complete:e,callback:t};return s.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return X(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function s(S,C){return S.charCodeAt(C)<<24|S.charCodeAt(C+1)<<16|S.charCodeAt(C+2)<<8|S.charCodeAt(C+3)&255}function i(S,C,P,T){const k=S.substring(0,C),N=S.substring(C+P);return k+T+N}let r,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function c(S,C){if(++h>30){V("Load test font never loaded."),C();return}if(l.font="30px "+S,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){C();return}setTimeout(c.bind(null,S,C))}const f=`lt${Date.now()}${this.loadTestFontId++}`;let g=this._loadTestFont;g=i(g,976,f.length,f);const A=16,y=1482184792;let v=s(g,A);for(r=0,a=f.length-3;r{E.remove(),e.complete()})}}sa=new WeakMap;class rA{constructor(t,{disableFontFace:e=!1,fontExtraProperties:s=!1,inspectFont:i=null}){this.compiledGlyphs=Object.create(null);for(const r in t)this[r]=t[r];this.disableFontFace=e===!0,this.fontExtraProperties=s===!0,this._inspectFont=i}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const s={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(s.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,s)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var s;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${Yb(this.data)});`;let e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${t}}`}return(s=this._inspectFont)==null||s.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const s=this.loadedName+"_path_"+e;let i;try{i=t.get(s)}catch(a){V(`getPathGenerator - ignoring character: "${a}".`)}const r=new Path2D(i||"");return this.fontExtraProperties||t.delete(s),this.compiledGlyphs[e]=r}}const tc={DATA:1,ERROR:2},yt={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function Np(){}function se(d){if(d instanceof $i||d instanceof Ku||d instanceof Fo||d instanceof Lp||d instanceof Fc||d instanceof Gu)return d;switch(d instanceof Error||typeof d=="object"&&d!==null||it('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),d.name){case"AbortException":return new $i(d.message);case"InvalidPDFException":return new Ku(d.message);case"MissingPDFException":return new Fo(d.message);case"PasswordException":return new Lp(d.message,d.code);case"UnexpectedResponseException":return new Fc(d.message,d.status);case"UnknownErrorException":return new Gu(d.message,d.details)}return new Gu(d.message,d.toString())}var ia,Sd,Ng,Ed,Og,Cd,Bg,na,fc;class _o{constructor(t,e,s){u(this,Sd);u(this,Ed);u(this,Cd);u(this,na);u(this,ia,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),s.addEventListener("message",b(this,Sd,Ng).bind(this),{signal:n(this,ia).signal})}on(t,e){const s=this.actionHandler;if(s[t])throw new Error(`There is already an actionName called "${t}"`);s[t]=e}send(t,e,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},s)}sendWithPromise(t,e,s){const i=this.callbackId++,r=Promise.withResolvers();this.callbackCapabilities[i]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},s)}catch(a){r.reject(a)}return r.promise}sendWithStream(t,e,s,i){const r=this.streamId++,a=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:h=>{const c=Promise.withResolvers();return this.streamControllers[r]={controller:h,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:a,targetName:o,action:t,streamId:r,data:e,desiredSize:h.desiredSize},i),c.promise},pull:h=>{const c=Promise.withResolvers();return this.streamControllers[r].pullCall=c,l.postMessage({sourceName:a,targetName:o,stream:yt.PULL,streamId:r,desiredSize:h.desiredSize}),c.promise},cancel:h=>{wt(h instanceof Error,"cancel must have a valid reason");const c=Promise.withResolvers();return this.streamControllers[r].cancelCall=c,this.streamControllers[r].isClosed=!0,l.postMessage({sourceName:a,targetName:o,stream:yt.CANCEL,streamId:r,reason:se(h)}),c.promise}},s)}destroy(){var t;(t=n(this,ia))==null||t.abort(),p(this,ia,null)}}ia=new WeakMap,Sd=new WeakSet,Ng=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){b(this,Cd,Bg).call(this,t);return}if(t.callback){const s=t.callbackId,i=this.callbackCapabilities[s];if(!i)throw new Error(`Cannot resolve callback ${s}`);if(delete this.callbackCapabilities[s],t.callback===tc.DATA)i.resolve(t.data);else if(t.callback===tc.ERROR)i.reject(se(t.reason));else throw new Error("Unexpected callback case");return}const e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const s=this.sourceName,i=t.sourceName,r=this.comObj;Promise.try(e,t.data).then(function(a){r.postMessage({sourceName:s,targetName:i,callback:tc.DATA,callbackId:t.callbackId,data:a})},function(a){r.postMessage({sourceName:s,targetName:i,callback:tc.ERROR,callbackId:t.callbackId,reason:se(a)})});return}if(t.streamId){b(this,Ed,Og).call(this,t);return}e(t.data)},Ed=new WeakSet,Og=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this,o=this.actionHandler[t.action],l={enqueue(h,c=1,f){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=c,g>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),r.postMessage({sourceName:s,targetName:i,stream:yt.ENQUEUE,streamId:e,chunk:h},f)},close(){this.isCancelled||(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.CLOSE,streamId:e}),delete a.streamSinks[e])},error(h){wt(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.ERROR,streamId:e,reason:se(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[e]=l,Promise.try(o,t.data,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,reason:se(h)})})},Cd=new WeakSet,Bg=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this.streamControllers[e],o=this.streamSinks[e];switch(t.stream){case yt.START_COMPLETE:t.success?a.startCall.resolve():a.startCall.reject(se(t.reason));break;case yt.PULL_COMPLETE:t.success?a.pullCall.resolve():a.pullCall.reject(se(t.reason));break;case yt.PULL:if(!o){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,Promise.try(o.onPull||Np).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,reason:se(h)})});break;case yt.ENQUEUE:if(wt(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case yt.CLOSE:if(wt(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),b(this,na,fc).call(this,a,e);break;case yt.ERROR:wt(a,"error should have stream controller"),a.controller.error(se(t.reason)),b(this,na,fc).call(this,a,e);break;case yt.CANCEL_COMPLETE:t.success?a.cancelCall.resolve():a.cancelCall.reject(se(t.reason)),b(this,na,fc).call(this,a,e);break;case yt.CANCEL:if(!o)break;const l=se(t.reason);Promise.try(o.onCancel||Np,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,reason:se(h)})}),o.sinkCapability.reject(l),o.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},na=new WeakSet,fc=function(t,e){return I(this,null,function*(){var s,i,r;yield Promise.allSettled([(s=t.startCall)==null?void 0:s.promise,(i=t.pullCall)==null?void 0:i.promise,(r=t.cancelCall)==null?void 0:r.promise]),delete this.streamControllers[e]})};var xl;class Hg{constructor({enableHWA:t=!1}){u(this,xl,!1);p(this,xl,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(t,e);return{canvas:s,context:s.getContext("2d",{willReadFrequently:!n(this,xl)})}}reset(t,e,s){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||s<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=s}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){it("Abstract method `_createCanvas` called.")}}xl=new WeakMap;class aA extends Hg{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const s=this._document.createElement("canvas");return s.width=t,s.height=e,s}}class zg{constructor({baseUrl:t=null,isCompressed:e=!0}){this.baseUrl=t,this.isCompressed=e}fetch(e){return I(this,arguments,function*({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const s=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(s).then(i=>({cMapData:i,isCompressed:this.isCompressed})).catch(i=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${s}`)})})}_fetch(t){return I(this,null,function*(){it("Abstract method `_fetch` called.")})}}class $g extends zg{_fetch(t){return I(this,null,function*(){const e=yield Mu(t,this.isCompressed?"arraybuffer":"text");return e instanceof ArrayBuffer?new Uint8Array(e):ku(e)})}}class Gg{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,s,i,r){return"none"}destroy(t=!1){}}var Sn,ra,Is,Ds,Vt,En,Cn,Pt,zt,xn,So,mi,Sr,aa,pc,bi,Er,xd,Vg,Tl,yf,Ai,Cr,Tn,Eo,Pn,Co,Pl,wf,Rn,xo;class oA extends Gg{constructor({docId:e,ownerDocument:s=globalThis.document}){super();u(this,Pt);u(this,xn);u(this,mi);u(this,aa);u(this,bi);u(this,xd);u(this,Tl);u(this,Ai);u(this,Tn);u(this,Pn);u(this,Pl);u(this,Rn);u(this,Sn,void 0);u(this,ra,void 0);u(this,Is,void 0);u(this,Ds,void 0);u(this,Vt,void 0);u(this,En,void 0);u(this,Cn,0);p(this,Ds,e),p(this,Vt,s)}addFilter(e){if(!e)return"none";let s=n(this,Pt,zt).get(e);if(s)return s;const[i,r,a]=b(this,aa,pc).call(this,e),o=e.length===1?i:`${i}${r}${a}`;if(s=n(this,Pt,zt).get(o),s)return n(this,Pt,zt).set(e,s),s;const l=`g_${n(this,Ds)}_transfer_map_${qt(this,Cn)._++}`,h=b(this,bi,Er).call(this,l);n(this,Pt,zt).set(e,h),n(this,Pt,zt).set(o,h);const c=b(this,Ai,Cr).call(this,l);return b(this,Pn,Co).call(this,i,r,a,c),h}addHCMFilter(e,s){var A;const i=`${e}-${s}`,r="base";let a=n(this,xn,So).get(r);if((a==null?void 0:a.key)===i||(a?((A=a.filter)==null||A.remove(),a.key=i,a.url="none",a.filter=null):(a={key:i,url:"none",filter:null},n(this,xn,So).set(r,a)),!e||!s))return a.url;const o=b(this,Rn,xo).call(this,e);e=F.makeHexColor(...o);const l=b(this,Rn,xo).call(this,s);if(s=F.makeHexColor(...l),n(this,mi,Sr).style.color="",e==="#000000"&&s==="#ffffff"||e===s)return a.url;const h=new Array(256);for(let y=0;y<=255;y++){const v=y/255;h[y]=v<=.03928?v/12.92:uo((v+.055)/1.055,2.4)}const c=h.join(","),f=`g_${n(this,Ds)}_hcm_filter`,g=a.filter=b(this,Ai,Cr).call(this,f);b(this,Pn,Co).call(this,c,c,c,g),b(this,Tl,yf).call(this,g);const m=(y,v)=>{const w=o[y]/255,_=l[y]/255,E=new Array(v+1);for(let S=0;S<=v;S++)E[S]=w+S/v*(_-w);return E.join(",")};return b(this,Pn,Co).call(this,m(0,5),m(1,5),m(2,5),g),a.url=b(this,bi,Er).call(this,f),a.url}addAlphaFilter(e){let s=n(this,Pt,zt).get(e);if(s)return s;const[i]=b(this,aa,pc).call(this,[e]),r=`alpha_${i}`;if(s=n(this,Pt,zt).get(r),s)return n(this,Pt,zt).set(e,s),s;const a=`g_${n(this,Ds)}_alpha_map_${qt(this,Cn)._++}`,o=b(this,bi,Er).call(this,a);n(this,Pt,zt).set(e,o),n(this,Pt,zt).set(r,o);const l=b(this,Ai,Cr).call(this,a);return b(this,Pl,wf).call(this,i,l),o}addLuminosityFilter(e){let s=n(this,Pt,zt).get(e||"luminosity");if(s)return s;let i,r;if(e?([i]=b(this,aa,pc).call(this,[e]),r=`luminosity_${i}`):r="luminosity",s=n(this,Pt,zt).get(r),s)return n(this,Pt,zt).set(e,s),s;const a=`g_${n(this,Ds)}_luminosity_map_${qt(this,Cn)._++}`,o=b(this,bi,Er).call(this,a);n(this,Pt,zt).set(e,o),n(this,Pt,zt).set(r,o);const l=b(this,Ai,Cr).call(this,a);return b(this,xd,Vg).call(this,l),e&&b(this,Pl,wf).call(this,i,l),o}addHighlightHCMFilter(e,s,i,r,a){var _;const o=`${s}-${i}-${r}-${a}`;let l=n(this,xn,So).get(e);if((l==null?void 0:l.key)===o||(l?((_=l.filter)==null||_.remove(),l.key=o,l.url="none",l.filter=null):(l={key:o,url:"none",filter:null},n(this,xn,So).set(e,l)),!s||!i))return l.url;const[h,c]=[s,i].map(b(this,Rn,xo).bind(this));let f=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),g=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[m,A]=[r,a].map(b(this,Rn,xo).bind(this));g{const P=new Array(256),T=(g-f)/C,k=E/255,N=(S-E)/(255*C);let $=0;for(let B=0;B<=C;B++){const st=Math.round(f+B*T),nt=k+B*N;for(let Q=$;Q<=st;Q++)P[Q]=nt;$=st+1}for(let B=$;B<256;B++)P[B]=P[$-1];return P.join(",")},v=`g_${n(this,Ds)}_hcm_${e}_filter`,w=l.filter=b(this,Ai,Cr).call(this,v);return b(this,Tl,yf).call(this,w),b(this,Pn,Co).call(this,y(m[0],A[0],5),y(m[1],A[1],5),y(m[2],A[2],5),w),l.url=b(this,bi,Er).call(this,v),l.url}destroy(e=!1){var s,i,r,a;e&&((s=n(this,En))!=null&&s.size)||((i=n(this,Is))==null||i.parentNode.parentNode.remove(),p(this,Is,null),(r=n(this,ra))==null||r.clear(),p(this,ra,null),(a=n(this,En))==null||a.clear(),p(this,En,null),p(this,Cn,0))}}Sn=new WeakMap,ra=new WeakMap,Is=new WeakMap,Ds=new WeakMap,Vt=new WeakMap,En=new WeakMap,Cn=new WeakMap,Pt=new WeakSet,zt=function(){return n(this,ra)||p(this,ra,new Map)},xn=new WeakSet,So=function(){return n(this,En)||p(this,En,new Map)},mi=new WeakSet,Sr=function(){if(!n(this,Is)){const e=n(this,Vt).createElement("div"),{style:s}=e;s.visibility="hidden",s.contain="strict",s.width=s.height=0,s.position="absolute",s.top=s.left=0,s.zIndex=-1;const i=n(this,Vt).createElementNS(vs,"svg");i.setAttribute("width",0),i.setAttribute("height",0),p(this,Is,n(this,Vt).createElementNS(vs,"defs")),e.append(i),i.append(n(this,Is)),n(this,Vt).body.append(e)}return n(this,Is)},aa=new WeakSet,pc=function(e){if(e.length===1){const h=e[0],c=new Array(256);for(let g=0;g<256;g++)c[g]=h[g]/255;const f=c.join(",");return[f,f,f]}const[s,i,r]=e,a=new Array(256),o=new Array(256),l=new Array(256);for(let h=0;h<256;h++)a[h]=s[h]/255,o[h]=i[h]/255,l[h]=r[h]/255;return[a.join(","),o.join(","),l.join(",")]},bi=new WeakSet,Er=function(e){if(n(this,Sn)===void 0){p(this,Sn,"");const s=n(this,Vt).URL;s!==n(this,Vt).baseURI&&(Lu(s)?V('#createUrl: ignore "data:"-URL for performance reasons.'):p(this,Sn,s.split("#",1)[0]))}return`url(${n(this,Sn)}#${e})`},xd=new WeakSet,Vg=function(e){const s=n(this,Vt).createElementNS(vs,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(s)},Tl=new WeakSet,yf=function(e){const s=n(this,Vt).createElementNS(vs,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(s)},Ai=new WeakSet,Cr=function(e){const s=n(this,Vt).createElementNS(vs,"filter");return s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("id",e),n(this,mi,Sr).append(s),s},Tn=new WeakSet,Eo=function(e,s,i){const r=n(this,Vt).createElementNS(vs,s);r.setAttribute("type","discrete"),r.setAttribute("tableValues",i),e.append(r)},Pn=new WeakSet,Co=function(e,s,i,r){const a=n(this,Vt).createElementNS(vs,"feComponentTransfer");r.append(a),b(this,Tn,Eo).call(this,a,"feFuncR",e),b(this,Tn,Eo).call(this,a,"feFuncG",s),b(this,Tn,Eo).call(this,a,"feFuncB",i)},Pl=new WeakSet,wf=function(e,s){const i=n(this,Vt).createElementNS(vs,"feComponentTransfer");s.append(i),b(this,Tn,Eo).call(this,i,"feFuncA",e)},Rn=new WeakSet,xo=function(e){return n(this,mi,Sr).style.color=e,gp(getComputedStyle(n(this,mi,Sr)).getPropertyValue("color"))};class Ug{constructor({baseUrl:t=null}){this.baseUrl=t}fetch(e){return I(this,arguments,function*({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const s=`${this.baseUrl}${t}`;return this._fetch(s).catch(i=>{throw new Error(`Unable to load font data at: ${s}`)})})}_fetch(t){return I(this,null,function*(){it("Abstract method `_fetch` called.")})}}class jg extends Ug{_fetch(t){return I(this,null,function*(){const e=yield Mu(t,"arraybuffer");return new Uint8Array(e)})}}Xt&&V("Please use the `legacy` build in Node.js environments.");function Wg(d){return I(this,null,function*(){const e=yield process.getBuiltinModule("fs").promises.readFile(d);return new Uint8Array(e)})}class lA extends Gg{}class hA extends Hg{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t,e)}}class cA extends zg{_fetch(t){return I(this,null,function*(){return Wg(t)})}}class dA extends Ug{_fetch(t){return I(this,null,function*(){return Wg(t)})}}const Wt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function vf(d,t){if(!t)return;const e=t[2]-t[0],s=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],e,s),d.clip(i)}class bp{getPattern(){it("Abstract method `getPattern` called.")}}class uA extends bp{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;this._type==="axial"?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const s of this._colorStops)e.addColorStop(s[0],s[1]);return e}getPattern(t,e,s,i){let r;if(i===Wt.STROKE||i===Wt.FILL){const a=e.current.getClippedPathBoundingBox(i,lt(t))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,l=Math.ceil(a[3]-a[1])||1,h=e.cachedCanvases.getCanvas("pattern",o,l),c=h.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-a[0],-a[1]),s=F.transform(s,[1,0,0,1,a[0],a[1]]),c.transform(...e.baseTransform),this.matrix&&c.transform(...this.matrix),vf(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),r=t.createPattern(h.canvas,"no-repeat");const f=new DOMMatrix(s);r.setTransform(f)}else vf(t,this._bbox),r=this._createGradient(t);return r}}function ju(d,t,e,s,i,r,a,o){const l=t.coords,h=t.colors,c=d.data,f=d.width*4;let g;l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g),l[s+1]>l[i+1]&&(g=s,s=i,i=g,g=a,a=o,o=g),l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g);const m=(l[e]+t.offsetX)*t.scaleX,A=(l[e+1]+t.offsetY)*t.scaleY,y=(l[s]+t.offsetX)*t.scaleX,v=(l[s+1]+t.offsetY)*t.scaleY,w=(l[i]+t.offsetX)*t.scaleX,_=(l[i+1]+t.offsetY)*t.scaleY;if(A>=_)return;const E=h[r],S=h[r+1],C=h[r+2],P=h[a],T=h[a+1],k=h[a+2],N=h[o],$=h[o+1],B=h[o+2],st=Math.round(A),nt=Math.round(_);let Q,Et,x,R,q,j,z,Lt;for(let rt=st;rt<=nt;rt++){if(rt_?J=1:v===_?J=0:J=(v-rt)/(v-_),Q=y-(y-w)*J,Et=P-(P-N)*J,x=T-(T-$)*J,R=k-(k-B)*J}let ft;rt_?ft=1:ft=(A-rt)/(A-_),q=m-(m-w)*ft,j=E-(E-N)*ft,z=S-(S-$)*ft,Lt=C-(C-B)*ft;const Qe=Math.round(Math.min(Q,q)),Ee=Math.round(Math.max(Q,q));let ht=f*rt+Qe*4;for(let J=Qe;J<=Ee;J++)ft=(Q-J)/(Q-q),ft<0?ft=0:ft>1&&(ft=1),c[ht++]=Et-(Et-j)*ft|0,c[ht++]=x-(x-z)*ft|0,c[ht++]=R-(R-Lt)*ft|0,c[ht++]=255}}function fA(d,t,e){const s=t.coords,i=t.colors;let r,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(s.length/o)-1,h=o-1;for(r=0;r=$?S=l:P=!0,N>=B?C=h:T=!0;const st=this.getSizeAndScale(S,this.ctx.canvas.width,_),nt=this.getSizeAndScale(C,this.ctx.canvas.height,E),Q=t.cachedCanvases.getCanvas("pattern",st.size,nt.size),Et=Q.context,x=o.createCanvasGraphics(Et);if(x.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(x,i,a),Et.translate(-st.scale*c,-nt.scale*f),x.transform(st.scale,0,0,nt.scale,0,0),Et.save(),this.clipBbox(x,c,f,g,m),x.baseTransform=lt(x.ctx),x.executeOperatorList(s),x.endDrawing(),Et.restore(),P||T){const R=Q.canvas;P&&(S=l),T&&(C=h);const q=this.getSizeAndScale(S,this.ctx.canvas.width,_),j=this.getSizeAndScale(C,this.ctx.canvas.height,E),z=q.size,Lt=j.size,rt=t.cachedCanvases.getCanvas("pattern-workaround",z,Lt),ft=rt.context,Qe=P?Math.floor(A/l):0,Ee=T?Math.floor(y/h):0;for(let ht=0;ht<=Qe;ht++)for(let J=0;J<=Ee;J++)ft.drawImage(R,z*ht,Lt*J,z,Lt,0,0,z,Lt);return{canvas:rt.canvas,scaleX:q.scale,scaleY:j.scale,offsetX:c,offsetY:f}}return{canvas:Q.canvas,scaleX:st.scale,scaleY:nt.scale,offsetX:c,offsetY:f}}getSizeAndScale(t,e,s){const i=Math.max(Td.MAX_PATTERN_SIZE,e);let r=Math.ceil(t*s);return r>=i?r=i:s=r/t,{scale:s,size:r}}clipBbox(t,e,s,i,r){const a=i-e,o=r-s;t.ctx.rect(e,s,a,o),t.current.updateRectMinMax(lt(t.ctx),[e,s,i,r]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,s){const i=t.ctx,r=t.current;switch(e){case Op.COLORED:const a=this.ctx;i.fillStyle=a.fillStyle,i.strokeStyle=a.strokeStyle,r.fillColor=a.fillStyle,r.strokeColor=a.strokeStyle;break;case Op.UNCOLORED:const o=F.makeHexColor(s[0],s[1],s[2]);i.fillStyle=o,i.strokeStyle=o,r.fillColor=o,r.strokeColor=o;break;default:throw new Gb(`Unsupported paint type: ${e}`)}}getPattern(t,e,s,i){let r=s;i!==Wt.SHADING&&(r=F.transform(r,e.baseTransform),this.matrix&&(r=F.transform(r,this.matrix)));const a=this.createPatternCanvas(e);let o=new DOMMatrix(r);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return l.setTransform(o),l}};O(Td,"MAX_PATTERN_SIZE",3e3);let _f=Td;function bA({src:d,srcPos:t=0,dest:e,width:s,height:i,nonBlackColor:r=4294967295,inverseDecode:a=!1}){const o=te.isLittleEndian?4278190080:255,[l,h]=a?[r,o]:[o,r],c=s>>3,f=s&7,g=d.length;e=new Uint32Array(e.buffer);let m=0;for(let A=0;A{d.save=d.__originalSave,d.restore=d.__originalRestore,d.rotate=d.__originalRotate,d.scale=d.__originalScale,d.translate=d.__originalTranslate,d.transform=d.__originalTransform,d.setTransform=d.__originalSetTransform,d.resetTransform=d.__originalResetTransform,d.clip=d.__originalClip,d.moveTo=d.__originalMoveTo,d.lineTo=d.__originalLineTo,d.bezierCurveTo=d.__originalBezierCurveTo,d.rect=d.__originalRect,d.closePath=d.__originalClosePath,d.beginPath=d.__originalBeginPath,delete d._removeMirroring},d.save=function(){t.save(),this.__originalSave()},d.restore=function(){t.restore(),this.__originalRestore()},d.translate=function(s,i){t.translate(s,i),this.__originalTranslate(s,i)},d.scale=function(s,i){t.scale(s,i),this.__originalScale(s,i)},d.transform=function(s,i,r,a,o,l){t.transform(s,i,r,a,o,l),this.__originalTransform(s,i,r,a,o,l)},d.setTransform=function(s,i,r,a,o,l){t.setTransform(s,i,r,a,o,l),this.__originalSetTransform(s,i,r,a,o,l)},d.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},d.rotate=function(s){t.rotate(s),this.__originalRotate(s)},d.clip=function(s){t.clip(s),this.__originalClip(s)},d.moveTo=function(e,s){t.moveTo(e,s),this.__originalMoveTo(e,s)},d.lineTo=function(e,s){t.lineTo(e,s),this.__originalLineTo(e,s)},d.bezierCurveTo=function(e,s,i,r,a,o){t.bezierCurveTo(e,s,i,r,a,o),this.__originalBezierCurveTo(e,s,i,r,a,o)},d.rect=function(e,s,i,r){t.rect(e,s,i,r),this.__originalRect(e,s,i,r)},d.closePath=function(){t.closePath(),this.__originalClosePath()},d.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class wA{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,s){let i;return this.cache[t]!==void 0?(i=this.cache[t],this.canvasFactory.reset(i,e,s)):(i=this.canvasFactory.create(e,s),this.cache[t]=i),i}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function ec(d,t,e,s,i,r,a,o,l,h){const[c,f,g,m,A,y]=lt(d);if(f===0&&g===0){const _=a*c+A,E=Math.round(_),S=o*m+y,C=Math.round(S),P=(a+l)*c+A,T=Math.abs(Math.round(P)-E)||1,k=(o+h)*m+y,N=Math.abs(Math.round(k)-C)||1;return d.setTransform(Math.sign(c),0,0,Math.sign(m),E,C),d.drawImage(t,e,s,i,r,0,0,T,N),d.setTransform(c,f,g,m,A,y),[T,N]}if(c===0&&m===0){const _=o*g+A,E=Math.round(_),S=a*f+y,C=Math.round(S),P=(o+h)*g+A,T=Math.abs(Math.round(P)-E)||1,k=(a+l)*f+y,N=Math.abs(Math.round(k)-C)||1;return d.setTransform(0,Math.sign(f),Math.sign(g),0,E,C),d.drawImage(t,e,s,i,r,0,0,N,T),d.setTransform(c,f,g,m,A,y),[N,T]}d.drawImage(t,e,s,i,r,a,o,l,h);const v=Math.hypot(c,f),w=Math.hypot(g,m);return[v*l,w*h]}function vA(d){const{width:t,height:e}=d;if(t>$p||e>$p)return null;const s=1e3,i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),r=t+1;let a=new Uint8Array(r*(e+1)),o,l,h;const c=t+7&-8;let f=new Uint8Array(c*e),g=0;for(const w of d.data){let _=128;for(;_>0;)f[g++]=w&_?0:255,_>>=1}let m=0;for(g=0,f[g]!==0&&(a[0]=1,++m),l=1;l>2)+(f[g+1]?4:0)+(f[g-c+1]?8:0),i[w]&&(a[h+l]=i[w],++m),g++;if(f[g-c]!==f[g]&&(a[h+l]=f[g]?2:4,++m),m>s)return null}for(g=c*(e-1),h=o*r,f[g]!==0&&(a[h]=8,++m),l=1;ls)return null;const A=new Int32Array([0,r,-1,0,-r,0,0,0,1]),y=new Path2D;for(o=0;m&&o<=e;o++){let w=o*r;const _=w+t;for(;w<_&&!a[w];)w++;if(w===_)continue;y.moveTo(w%r,o);const E=w;let S=a[w];do{const C=A[S];do w+=C;while(!a[w]);const P=a[w];P!==5&&P!==10?(S=P,a[w]=0):(S=P&51*S>>4,a[w]&=S>>2|S<<2),y.lineTo(w%r,w/r|0),a[w]||--m}while(E!==w);--o}return f=null,a=null,function(w){w.save(),w.scale(1/t,-1/e),w.translate(0,-e),w.fill(y),w.beginPath(),w.restore()}}class Gp{constructor(t,e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=sg,this.textMatrixScale=1,this.fontMatrix=Yu,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=Ht.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,t,e])}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,e){this.x=t,this.y=e}updatePathMinMax(t,e,s){[e,s]=F.applyTransform([e,s],t),this.minX=Math.min(this.minX,e),this.minY=Math.min(this.minY,s),this.maxX=Math.max(this.maxX,e),this.maxY=Math.max(this.maxY,s)}updateRectMinMax(t,e){const s=F.applyTransform(e,t),i=F.applyTransform(e.slice(2),t),r=F.applyTransform([e[0],e[3]],t),a=F.applyTransform([e[2],e[1]],t);this.minX=Math.min(this.minX,s[0],i[0],r[0],a[0]),this.minY=Math.min(this.minY,s[1],i[1],r[1],a[1]),this.maxX=Math.max(this.maxX,s[0],i[0],r[0],a[0]),this.maxY=Math.max(this.maxY,s[1],i[1],r[1],a[1])}updateScalingPathMinMax(t,e){F.scaleMinMax(t,e),this.minX=Math.min(this.minX,e[0]),this.minY=Math.min(this.minY,e[1]),this.maxX=Math.max(this.maxX,e[2]),this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,s,i,r,a,o,l,h,c){const f=F.bezierBoundingBox(e,s,i,r,a,o,l,h,c);c||this.updateRectMinMax(t,f)}getPathBoundingBox(t=Wt.FILL,e=null){const s=[this.minX,this.minY,this.maxX,this.maxY];if(t===Wt.STROKE){e||it("Stroke bounding box must include transform.");const i=F.singularValueDecompose2dScale(e),r=i[0]*this.lineWidth/2,a=i[1]*this.lineWidth/2;s[0]-=r,s[1]-=a,s[2]+=r,s[3]+=a}return s}updateClipFromPath(){const t=F.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(t=Wt.FILL,e=null){return F.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function Vp(d,t){if(t instanceof ImageData){d.putImageData(t,0,0);return}const e=t.height,s=t.width,i=e%le,r=(e-i)/le,a=i===0?r:r+1,o=d.createImageData(s,le);let l=0,h;const c=t.data,f=o.data;let g,m,A,y;if(t.kind===nc.GRAYSCALE_1BPP){const v=c.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),_=w.length,E=s+7>>3,S=4294967295,C=te.isLittleEndian?4278190080:255;for(g=0;gE?s:P*8-7,N=k&-8;let $=0,B=0;for(;T>=1}for(;h<_;)w[h++]=0;d.putImageData(o,0,g*le)}}else if(t.kind===nc.RGBA_32BPP){for(m=0,y=s*le*4,g=0;g=r&&(A=i,y=s*A),h=0,m=y;m--;)f[h++]=c[l++],f[h++]=c[l++],f[h++]=c[l++],f[h++]=255;d.putImageData(o,0,g*le)}else throw new Error(`bad image kind: ${t.kind}`)}function Up(d,t){if(t.bitmap){d.drawImage(t.bitmap,0,0);return}const e=t.height,s=t.width,i=e%le,r=(e-i)/le,a=i===0?r:r+1,o=d.createImageData(s,le);let l=0;const h=t.data,c=o.data;for(let f=0;fzp&&typeof s=="function",c=h?Date.now()+AA:0;let f=0;const g=this.commonObjs,m=this.objs;let A;for(;;){if(i!==void 0&&o===i.nextBreakPoint)return i.breakIt(o,s),o;if(A=a[o],A!==Fe.dependency)this[A].apply(this,r[o]);else for(const y of r[o]){const v=y.startsWith("g_")?g:m;if(!v.has(y))return v.get(y,s),o}if(o++,o===l)return o;if(h&&++f>zp){if(Date.now()>c)return s(),o;f=0}}}endDrawing(){b(this,Rl,Sf).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),b(this,kl,Ef).call(this)}_scaleImage(t,e){var g,m;const s=(g=t.width)!=null?g:t.displayWidth,i=(m=t.height)!=null?m:t.displayHeight;let r=Math.max(Math.hypot(e[0],e[1]),1),a=Math.max(Math.hypot(e[2],e[3]),1),o=s,l=i,h="prescale1",c,f;for(;r>2&&o>1||a>2&&l>1;){let A=o,y=l;r>2&&o>1&&(A=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),r/=o/A),a>2&&l>1&&(y=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,a/=l/y),c=this.cachedCanvases.getCanvas(h,A,y),f=c.context,f.clearRect(0,0,A,y),f.drawImage(t,0,0,o,l,0,0,A,y),t=c.canvas,o=A,l=y,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:o,paintHeight:l}}_createMaskCanvas(t){const e=this.ctx,{width:s,height:i}=t,r=this.current.fillColor,a=this.current.patternFill,o=lt(e);let l,h,c,f;if((t.bitmap||t.data)&&t.count>1){const k=t.bitmap||t.data.buffer;h=JSON.stringify(a?o:[o.slice(0,4),r]),l=this._cachedBitmapsMap.get(k),l||(l=new Map,this._cachedBitmapsMap.set(k,l));const N=l.get(h);if(N&&!a){const $=Math.round(Math.min(o[0],o[2])+o[4]),B=Math.round(Math.min(o[1],o[3])+o[5]);return{canvas:N,offsetX:$,offsetY:B}}c=N}c||(f=this.cachedCanvases.getCanvas("maskCanvas",s,i),Up(f.context,t));let g=F.transform(o,[1/s,0,0,-1/i,0,0]);g=F.transform(g,[1,0,0,1,0,-i]);const[m,A,y,v]=F.getAxialAlignedBoundingBox([0,0,s,i],g),w=Math.round(y-m)||1,_=Math.round(v-A)||1,E=this.cachedCanvases.getCanvas("fillCanvas",w,_),S=E.context,C=m,P=A;S.translate(-C,-P),S.transform(...g),c||(c=this._scaleImage(f.canvas,Je(S)),c=c.img,l&&a&&l.set(h,c)),S.imageSmoothingEnabled=jp(lt(S),t.interpolate),ec(S,c,0,0,c.width,c.height,0,0,s,i),S.globalCompositeOperation="source-in";const T=F.transform(Je(S),[1,0,0,1,-C,-P]);return S.fillStyle=a?r.getPattern(e,this,T,Wt.FILL):r,S.fillRect(0,0,s,i),l&&!a&&(this.cachedCanvases.delete("fillCanvas"),l.set(h,E.canvas)),{canvas:E.canvas,offsetX:Math.round(C),offsetY:Math.round(P)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=_A[t]}setLineJoin(t){this.ctx.lineJoin=SA[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){const s=this.ctx;s.setLineDash!==void 0&&(s.setLineDash(t),s.lineDashOffset=e)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,s]of t)switch(e){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s[0],s[1]);break;case"CA":this.current.strokeAlpha=s;break;case"ca":this.current.fillAlpha=s,this.ctx.globalAlpha=s;break;case"BM":this.ctx.globalCompositeOperation=s;break;case"SMask":this.current.activeSMask=s?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(s);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,e=this.ctx.canvas.height,s="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(s,t,e);this.suspendedCtx=this.ctx,this.ctx=i.context;const r=this.ctx;r.setTransform(...lt(this.suspendedCtx)),po(this.suspendedCtx,r),yA(r,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),po(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,s=this.suspendedCtx;this.composeSMask(s,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,s,i){const r=i[0],a=i[1],o=i[2]-r,l=i[3]-a;o===0||l===0||(this.genericComposeSMask(e.context,s,o,l,e.subtype,e.backdrop,e.transferMap,r,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(s.canvas,0,0),t.restore())}genericComposeSMask(t,e,s,i,r,a,o,l,h,c,f){let g=t.canvas,m=l-c,A=h-f;if(a){const v=F.makeHexColor(...a);if(m<0||A<0||m+s>g.width||A+i>g.height){const w=this.cachedCanvases.getCanvas("maskExtension",s,i),_=w.context;_.drawImage(g,-m,-A),_.globalCompositeOperation="destination-atop",_.fillStyle=v,_.fillRect(0,0,s,i),_.globalCompositeOperation="source-over",g=w.canvas,m=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const w=new Path2D;w.rect(m,A,s,i),t.clip(w),t.globalCompositeOperation="destination-atop",t.fillStyle=v,t.fillRect(m,A,s,i),t.restore()}}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),r==="Alpha"&&o?e.filter=this.filterFactory.addAlphaFilter(o):r==="Luminosity"&&(e.filter=this.filterFactory.addLuminosityFilter(o));const y=new Path2D;y.rect(l,h,s,i),e.clip(y),e.globalCompositeOperation="destination-in",e.drawImage(g,m,A,s,i,l,h,s,i),e.restore()}save(){this.inSMaskMode?(po(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),po(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,s,i,r,a){this.ctx.transform(t,e,s,i,r,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,s){const i=this.ctx,r=this.current;let a=r.x,o=r.y,l,h;const c=lt(i),f=c[0]===0&&c[3]===0||c[1]===0&&c[2]===0,g=f?s.slice(0):null;for(let m=0,A=0,y=t.length;mHp&&(h=Hp),this.current.fontSizeScale=e/h,this.ctx.font=`${l} ${o} ${h}px ${a}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}setTextMatrix(t,e,s,i,r,a){this.current.textMatrix=[t,e,s,i,r,a],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,s,i,r){const a=this.ctx,o=this.current,l=o.font,h=o.textRenderingMode,c=o.fontSize/o.fontSizeScale,f=h&Ht.FILL_STROKE_MASK,g=!!(h&Ht.ADD_TO_PATH_FLAG),m=o.patternFill&&!l.missingFile,A=o.patternStroke&&!l.missingFile;let y;if((l.disableFontFace||g||m||A)&&(y=l.getPathGenerator(this.commonObjs,t)),l.disableFontFace||m||A){if(a.save(),a.translate(e,s),a.scale(c,-c),f===Ht.FILL||f===Ht.FILL_STROKE)if(i){const v=a.getTransform();a.setTransform(...i),a.fill(b(this,Ml,Cf).call(this,y,v,i))}else a.fill(y);if(f===Ht.STROKE||f===Ht.FILL_STROKE)if(r){const v=a.getTransform();a.setTransform(...r),a.stroke(b(this,Ml,Cf).call(this,y,v,r))}else a.lineWidth/=c,a.stroke(y);a.restore()}else(f===Ht.FILL||f===Ht.FILL_STROKE)&&a.fillText(t,e,s),(f===Ht.STROKE||f===Ht.FILL_STROKE)&&a.strokeText(t,e,s);g&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:lt(a),x:e,y:s,fontSize:c,path:y})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let s=!1;for(let i=3;i0&&e[i]<255){s=!0;break}return X(this,"isFontSubpixelAAEnabled",s)}showText(t){const e=this.current,s=e.font;if(s.isType3Font)return this.showType3Text(t);const i=e.fontSize;if(i===0)return;const r=this.ctx,a=e.fontSizeScale,o=e.charSpacing,l=e.wordSpacing,h=e.fontDirection,c=e.textHScale*h,f=t.length,g=s.vertical,m=g?1:-1,A=s.defaultVMetrics,y=i*e.fontMatrix[0],v=e.textRenderingMode===Ht.FILL&&!s.disableFontFace&&!e.patternFill;r.save(),r.transform(...e.textMatrix),r.translate(e.x,e.y+e.textRise),h>0?r.scale(c,-1):r.scale(c,1);let w,_;if(e.patternFill){r.save();const T=e.fillColor.getPattern(r,this,Je(r),Wt.FILL);w=lt(r),r.restore(),r.fillStyle=T}if(e.patternStroke){r.save();const T=e.strokeColor.getPattern(r,this,Je(r),Wt.STROKE);_=lt(r),r.restore(),r.strokeStyle=T}let E=e.lineWidth;const S=e.textMatrixScale;if(S===0||E===0){const T=e.textRenderingMode&Ht.FILL_STROKE_MASK;(T===Ht.STROKE||T===Ht.FILL_STROKE)&&(E=this.getSinglePixelWidth())}else E/=S;if(a!==1&&(r.scale(a,a),E/=a),r.lineWidth=E,s.isInvalidPDFjsFont){const T=[];let k=0;for(const N of t)T.push(N.unicode),k+=N.width;r.fillText(T.join(""),0,0),e.x+=k*y*c,r.restore(),this.compose();return}let C=0,P;for(P=0;P0){const x=r.measureText($).width*1e3/i*a;if(Qnew _p(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};e=new _f(t,s,this.ctx,r,i)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,s){this.ctx.strokeStyle=this.current.strokeColor=F.makeHexColor(t,e,s),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e,s){this.ctx.fillStyle=this.current.fillColor=F.makeHexColor(t,e,s),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,e=null){let s;return this.cachedPatterns.has(t)?s=this.cachedPatterns.get(t):(s=mA(this.getObject(t)),this.cachedPatterns.set(t,s)),e&&(s.matrix=e),s}shadingFill(t){if(!this.contentVisible)return;const e=this.ctx;this.save();const s=this._getPattern(t);e.fillStyle=s.getPattern(e,this,Je(e),Wt.SHADING);const i=Je(e);if(i){const{width:r,height:a}=e.canvas,[o,l,h,c]=F.getAxialAlignedBoundingBox([0,0,r,a],i);this.ctx.fillRect(o,l,h-o,c-l)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){it("Should not call beginInlineImage")}beginImageData(){it("Should not call beginImageData")}paintFormXObjectBegin(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=lt(this.ctx),e)){const s=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],s,i),this.current.updateRectMinMax(lt(this.ctx),e),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const e=this.ctx;t.isolated||Ru("TODO: Support non-isolated groups."),t.knockout&&V("Knockout groups not supported.");const s=lt(e);if(t.matrix&&e.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let i=F.getAxialAlignedBoundingBox(t.bbox,lt(e));const r=[0,0,e.canvas.width,e.canvas.height];i=F.intersect(i,r)||[0,0,0,0];const a=Math.floor(i[0]),o=Math.floor(i[1]),l=Math.max(Math.ceil(i[2])-a,1),h=Math.max(Math.ceil(i[3])-o,1);this.current.startNewPathAndClipBox([0,0,l,h]);let c="groupAt"+this.groupLevel;t.smask&&(c+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(c,l,h),g=f.context;g.translate(-a,-o),g.transform(...s),t.smask?this.smaskStack.push({canvas:f.canvas,context:g,offsetX:a,offsetY:o,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(a,o),e.save()),po(e,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const e=this.ctx,s=this.groupStack.pop();if(this.ctx=s,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=lt(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const r=F.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],i);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(r)}}beginAnnotation(t,e,s,i,r){if(b(this,Rl,Sf).call(this),sc(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),e){const a=e[2]-e[0],o=e[3]-e[1];if(r&&this.annotationCanvasMap){s=s.slice(),s[4]-=e[0],s[5]-=e[1],e=e.slice(),e[0]=e[1]=0,e[2]=a,e[3]=o;const[l,h]=F.singularValueDecompose2dScale(lt(this.ctx)),{viewportScale:c}=this,f=Math.ceil(a*this.outputScaleX*c),g=Math.ceil(o*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(f,g);const{canvas:m,context:A}=this.annotationCanvas;this.annotationCanvasMap.set(t,m),this.annotationCanvas.savedCtx=this.ctx,this.ctx=A,this.ctx.save(),this.ctx.setTransform(l,0,0,-h,0,o*h),sc(this.ctx)}else sc(this.ctx),this.endPath(),this.ctx.rect(e[0],e[1],a,o),this.ctx.clip(),this.ctx.beginPath()}this.current=new Gp(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...s),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),b(this,kl,Ef).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const e=t.count;t=this.getObject(t.data,t),t.count=e;const s=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=vA(t)),i.compiled)){i.compiled(s);return}const r=this._createMaskCanvas(t),a=r.canvas;s.save(),s.setTransform(1,0,0,1,0,0),s.drawImage(a,r.offsetX,r.offsetY),s.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,s=0,i=0,r,a){if(!this.contentVisible)return;t=this.getObject(t.data,t);const o=this.ctx;o.save();const l=lt(o);o.transform(e,s,i,r,0,0);const h=this._createMaskCanvas(t);o.setTransform(1,0,0,1,h.offsetX-l[4],h.offsetY-l[5]);for(let c=0,f=a.length;cf?c/f:1,o=h>f?h/f:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:e}=this,{lineWidth:s}=this.current,[i,r]=this.getScaleForStroking();if(e.lineWidth=s||1,i===1&&r===1){e.stroke();return}const a=e.getLineDash();if(t&&e.save(),e.scale(i,r),a.length>0){const o=Math.max(i,r);e.setLineDash(a.map(l=>l/o)),e.lineDashOffset/=o}e.stroke(),t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};Rl=new WeakSet,Sf=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},kl=new WeakSet,Ef=function(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}},Ml=new WeakSet,Cf=function(t,e,s){const i=new Path2D;return i.addPath(t,new DOMMatrix(s).invertSelf().multiplySelf(e)),i};let Ir=_p;for(const d in Fe)Ir.prototype[d]!==void 0&&(Ir.prototype[Fe[d]]=Ir.prototype[d]);var Ll,Il;class ti{static get workerPort(){return n(this,Ll)}static set workerPort(t){if(!(typeof Worker!="undefined"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");p(this,Ll,t)}static get workerSrc(){return n(this,Il)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");p(this,Il,t)}}Ll=new WeakMap,Il=new WeakMap,u(ti,Ll,null),u(ti,Il,"");var kn,Dl;class CA{constructor({parsedData:t,rawData:e}){u(this,kn,void 0);u(this,Dl,void 0);p(this,kn,t),p(this,Dl,e)}getRaw(){return n(this,Dl)}get(t){var e;return(e=n(this,kn).get(t))!=null?e:null}getAll(){return cp(n(this,kn))}has(t){return n(this,kn).has(t)}}kn=new WeakMap,Dl=new WeakMap;const xr=Symbol("INTERNAL");var Fl,Nl,Ol,oa;class xA{constructor(t,{name:e,intent:s,usage:i,rbGroups:r}){u(this,Fl,!1);u(this,Nl,!1);u(this,Ol,!1);u(this,oa,!0);p(this,Fl,!!(t&_e.DISPLAY)),p(this,Nl,!!(t&_e.PRINT)),this.name=e,this.intent=s,this.usage=i,this.rbGroups=r}get visible(){if(n(this,Ol))return n(this,oa);if(!n(this,oa))return!1;const{print:t,view:e}=this.usage;return n(this,Fl)?(e==null?void 0:e.viewState)!=="OFF":n(this,Nl)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,s=!1){t!==xr&&it("Internal method `_setVisible` called."),p(this,Ol,s),p(this,oa,e)}}Fl=new WeakMap,Nl=new WeakMap,Ol=new WeakMap,oa=new WeakMap;var yi,tt,la,ha,Bl,xf;class TA{constructor(t,e=_e.DISPLAY){u(this,Bl);u(this,yi,null);u(this,tt,new Map);u(this,la,null);u(this,ha,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,p(this,ha,t.order);for(const s of t.groups)n(this,tt).set(s.id,new xA(e,s));if(t.baseState==="OFF")for(const s of n(this,tt).values())s._setVisible(xr,!1);for(const s of t.on)n(this,tt).get(s)._setVisible(xr,!0);for(const s of t.off)n(this,tt).get(s)._setVisible(xr,!1);p(this,la,this.getHash())}}isVisible(t){if(n(this,tt).size===0)return!0;if(!t)return Ru("Optional content group not defined."),!0;if(t.type==="OCG")return n(this,tt).has(t.id)?n(this,tt).get(t.id).visible:(V(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return b(this,Bl,xf).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!n(this,tt).has(e))return V(`Optional content group not found: ${e}`),!0;if(n(this,tt).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!n(this,tt).has(e))return V(`Optional content group not found: ${e}`),!0;if(!n(this,tt).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!n(this,tt).has(e))return V(`Optional content group not found: ${e}`),!0;if(!n(this,tt).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!n(this,tt).has(e))return V(`Optional content group not found: ${e}`),!0;if(n(this,tt).get(e).visible)return!1}return!0}return V(`Unknown optional content policy ${t.policy}.`),!0}return V(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,s=!0){var r;const i=n(this,tt).get(t);if(!i){V(`Optional content group not found: ${t}`);return}if(s&&e&&i.rbGroups.length)for(const a of i.rbGroups)for(const o of a)o!==t&&((r=n(this,tt).get(o))==null||r._setVisible(xr,!1,!0));i._setVisible(xr,!!e,!0),p(this,yi,null)}setOCGState({state:t,preserveRB:e}){let s;for(const i of t){switch(i){case"ON":case"OFF":case"Toggle":s=i;continue}const r=n(this,tt).get(i);if(r)switch(s){case"ON":this.setVisibility(i,!0,e);break;case"OFF":this.setVisibility(i,!1,e);break;case"Toggle":this.setVisibility(i,!r.visible,e);break}}p(this,yi,null)}get hasInitialVisibility(){return n(this,la)===null||this.getHash()===n(this,la)}getOrder(){return n(this,tt).size?n(this,ha)?n(this,ha).slice():[...n(this,tt).keys()]:null}getGroups(){return n(this,tt).size>0?cp(n(this,tt)):null}getGroup(t){return n(this,tt).get(t)||null}getHash(){if(n(this,yi)!==null)return n(this,yi);const t=new Ig;for(const[e,s]of n(this,tt))t.update(`${e}:${s.visible}`);return p(this,yi,t.hexdigest())}}yi=new WeakMap,tt=new WeakMap,la=new WeakMap,ha=new WeakMap,Bl=new WeakSet,xf=function(t){const e=t.length;if(e<2)return!0;const s=t[0];for(let i=1;i0){const l=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!s,this._isRangeSupported=!e,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((l,h)=>{this._onReceiveData({begin:l,chunk:h})}),t.addProgressListener((l,h)=>{this._onProgress({loaded:l,total:h})}),t.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:e}){const s=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(s):this._queuedChunks.push(s);else{const i=this._rangeReaders.some(function(r){return r._begin!==t?!1:(r._enqueue(s),!0)});wt(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}_onProgress(t){var e,s,i,r;t.total===void 0?(s=(e=this._rangeReaders[0])==null?void 0:e.onProgress)==null||s.call(e,{loaded:t.loaded}):(r=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||r.call(i,{loaded:t.loaded,total:t.total})}_onProgressiveDone(){var t;(t=this._fullRequestReader)==null||t.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){wt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new RA(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new kA(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeReaders.slice(0))s.cancel(t);this._pdfDataRangeTransport.abort()}}class RA{constructor(t,e,s=!1,i=null){this._stream=t,this._done=s||!1,this._filename=fp(i)?i:null,this._queuedChunks=e||[],this._loaded=0;for(const r of this._queuedChunks)this._loaded+=r.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}read(){return I(this,null,function*(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class kA{constructor(t,e,s){this._stream=t,this._begin=e,this._end=s,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){return I(this,null,function*(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function MA(d){let t=!0,e=s("filename\\*","i").exec(d);if(e){e=e[1];let c=o(e);return c=unescape(c),c=l(c),c=h(c),r(c)}if(e=a(d),e){const c=h(e);return r(c)}if(e=s("filename","i").exec(d),e){e=e[1];let c=o(e);return c=h(c),r(c)}function s(c,f){return new RegExp("(?:^|;)\\s*"+c+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',f)}function i(c,f){if(c){if(!/^[\x00-\xFF]+$/.test(f))return f;try{const g=new TextDecoder(c,{fatal:!0}),m=ku(f);f=g.decode(m),t=!1}catch(g){}}return f}function r(c){return t&&/[\x80-\xff]/.test(c)&&(c=i("utf-8",c),t&&(c=i("iso-8859-1",c))),c}function a(c){const f=[];let g;const m=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(g=m.exec(c))!==null;){let[,y,v,w]=g;if(y=parseInt(y,10),y in f){if(y===0)break;continue}f[y]=[v,w]}const A=[];for(let y=0;y{if(t._responseOrigin=Iu(r.url),!Kg(r.status))throw Du(r.status,i);this._reader=r.body.getReader(),this._headersCapability.resolve();const a=r.headers,{allowRangeRequests:o,suggestedLength:l}=qg({responseHeaders:a,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=Yg(a),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new $i("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;yield this._headersCapability.promise;const{value:t,done:e}=yield this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:Jg(t),done:!1})})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}class IA{constructor(t,e,s){this._stream=t,this._reader=null,this._loaded=0;const i=t.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController;const r=new Headers(t.headers);r.append("Range",`bytes=${e}-${s-1}`);const a=i.url;fetch(a,Qg(r,this._withCredentials,this._abortController)).then(o=>{const l=Iu(o.url);if(l!==t._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${t._responseOrigin}".`);if(!Kg(o.status))throw Du(o.status,a);this._readCapability.resolve(),this._reader=o.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;yield this._readCapability.promise;const{value:t,done:e}=yield this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:Jg(t),done:!1})})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}const Wu=200,Xu=206;function DA(d){const t=d.response;return typeof t!="string"?t:ku(t).buffer}class FA{constructor({url:t,httpHeaders:e,withCredentials:s}){O(this,"_responseOrigin",null);this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=Xg(this.isHttp,e),this.withCredentials=s||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const e=new XMLHttpRequest,s=this.currXhrId++,i=this.pendingRequests[s]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const[r,a]of this.headers)e.setRequestHeader(r,a);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),i.expectedStatus=Xu):i.expectedStatus=Wu,e.responseType="arraybuffer",wt(t.onError,"Expected `onError` callback to be provided."),e.onerror=()=>{t.onError(e.status)},e.onreadystatechange=this.onStateChange.bind(this,s),e.onprogress=this.onProgress.bind(this,s),i.onHeadersReceived=t.onHeadersReceived,i.onDone=t.onDone,i.onError=t.onError,i.onProgress=t.onProgress,e.send(null),s}onProgress(t,e){var i;const s=this.pendingRequests[t];s&&((i=s.onProgress)==null||i.call(s,e))}onStateChange(t,e){const s=this.pendingRequests[t];if(!s)return;const i=s.xhr;if(i.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),i.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],i.status===0&&this.isHttp){s.onError(i.status);return}const r=i.status||Wu;if(!(r===Wu&&s.expectedStatus===Xu)&&r!==s.expectedStatus){s.onError(i.status);return}const o=DA(i);if(r===Xu){const l=i.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);h?s.onDone({begin:parseInt(h[1],10),chunk:o}):(V('Missing or invalid "Content-Range" header.'),s.onError(0))}else o?s.onDone({begin:0,chunk:o}):s.onError(i.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}class NA{constructor(t){this._source=t,this._manager=new FA(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return wt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new OA(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const s=new BA(this._manager,t,e);return s.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class OA{constructor(t,e){this._manager=t,this._url=e.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t);this._manager._responseOrigin=Iu(e.responseURL);const s=e.getAllResponseHeaders(),i=new Headers(s?s.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(o=>{const[l,...h]=o.split(": ");return[l,h.join(": ")]}):[]),{allowRangeRequests:r,suggestedLength:a}=qg({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=Yg(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=Du(t,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var e;(e=this.onProgress)==null||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}read(){return I(this,null,function*(){if(yield this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class BA{constructor(t,e,s){this._manager=t,this._url=t.url,this._requestId=t.request({begin:e,end:s,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){var e;const t=Iu((e=this._manager.getRequestXhr(this._requestId))==null?void 0:e.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){var t;(t=this.onClosed)==null||t.call(this,this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){var e;(e=this._storedError)!=null||(this._storedError=Du(t,this._url));for(const s of this._requests)s.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var e;this.isStreamingSupported||(e=this.onProgress)==null||e.call(this,{loaded:t.loaded})}get isStreamingSupported(){return!1}read(){return I(this,null,function*(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const HA=/^[a-z][a-z0-9\-+.]+:/i;function zA(d){if(HA.test(d))return new URL(d);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(d))}class $A{constructor(t){this.source=t,this.url=zA(t.url),wt(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}getFullReader(){return wt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new GA(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new VA(this,t,e);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class GA{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const s=process.getBuiltinModule("fs");s.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(s.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=new Fo(`Missing PDF "${this._url}".`)),this._storedError=i,this._headersCapability.reject(i)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new $i("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class VA{constructor(t,e,s){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=t.source;this._isStreamingSupported=!i.disableStream;const r=process.getBuiltinModule("fs");this._setReadableStream(r.createReadStream(this._url,{start:e,end:s-1}))}get isStreamingSupported(){return this._isStreamingSupported}read(){return I(this,null,function*(){var s;if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const UA=1e5,ee=30,jA=.8;var Qp,wi,re,Hl,zl,Mn,Fs,$l,Gl,Ln,ca,da,vi,ua,Vl,fa,In,Ul,jl,Dn,Fn,Wl,_i,pa,Pd,Zg,Rd,tm,Xl,Tf,ga,gc,ql,Pf,kd,em,Md,sm;const pt=class pt{constructor({textContentSource:t,container:e,viewport:s}){u(this,Pd);u(this,Rd);u(this,Xl);u(this,wi,Promise.withResolvers());u(this,re,null);u(this,Hl,!1);u(this,zl,!!((Qp=globalThis.FontInspector)!=null&&Qp.enabled));u(this,Mn,null);u(this,Fs,null);u(this,$l,0);u(this,Gl,0);u(this,Ln,null);u(this,ca,null);u(this,da,0);u(this,vi,0);u(this,ua,Object.create(null));u(this,Vl,[]);u(this,fa,null);u(this,In,[]);u(this,Ul,new WeakMap);u(this,jl,null);var l;if(t instanceof ReadableStream)p(this,fa,t);else if(typeof t=="object")p(this,fa,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');p(this,re,p(this,ca,e)),p(this,vi,s.scale*(globalThis.devicePixelRatio||1)),p(this,da,s.rotation),p(this,Fs,{div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:r,pageX:a,pageY:o}=s.rawDims;p(this,jl,[1,0,0,-1,-a,o+r]),p(this,Gl,i),p(this,$l,r),b(l=pt,kd,em).call(l),br(e,s),n(this,wi).promise.finally(()=>{n(pt,pa).delete(this),p(this,Fs,null),p(this,ua,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=te.platform;return X(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{n(this,Ln).read().then(({value:e,done:s})=>{var i;if(s){n(this,wi).resolve();return}(i=n(this,Mn))!=null||p(this,Mn,e.lang),Object.assign(n(this,ua),e.styles),b(this,Pd,Zg).call(this,e.items),t()},n(this,wi).reject)};return p(this,Ln,n(this,fa).getReader()),n(pt,pa).add(this),t(),n(this,wi).promise}update({viewport:t,onBefore:e=null}){var r;const s=t.scale*(globalThis.devicePixelRatio||1),i=t.rotation;if(i!==n(this,da)&&(e==null||e(),p(this,da,i),br(n(this,ca),{rotation:i})),s!==n(this,vi)){e==null||e(),p(this,vi,s);const a={div:null,properties:null,ctx:b(r=pt,ga,gc).call(r,n(this,Mn))};for(const o of n(this,In))a.properties=n(this,Ul).get(o),a.div=o,b(this,Xl,Tf).call(this,a)}}cancel(){var e;const t=new $i("TextLayer task cancelled.");(e=n(this,Ln))==null||e.cancel(t).catch(()=>{}),p(this,Ln,null),n(this,wi).reject(t)}get textDivs(){return n(this,In)}get textContentItemsStr(){return n(this,Vl)}static cleanup(){if(!(n(this,pa).size>0)){n(this,Dn).clear();for(const{canvas:t}of n(this,Fn).values())t.remove();n(this,Fn).clear()}}};wi=new WeakMap,re=new WeakMap,Hl=new WeakMap,zl=new WeakMap,Mn=new WeakMap,Fs=new WeakMap,$l=new WeakMap,Gl=new WeakMap,Ln=new WeakMap,ca=new WeakMap,da=new WeakMap,vi=new WeakMap,ua=new WeakMap,Vl=new WeakMap,fa=new WeakMap,In=new WeakMap,Ul=new WeakMap,jl=new WeakMap,Dn=new WeakMap,Fn=new WeakMap,Wl=new WeakMap,_i=new WeakMap,pa=new WeakMap,Pd=new WeakSet,Zg=function(t){var i,r,a;if(n(this,Hl))return;(a=(r=n(this,Fs)).ctx)!=null||(r.ctx=b(i=pt,ga,gc).call(i,n(this,Mn)));const e=n(this,In),s=n(this,Vl);for(const o of t){if(e.length>UA){V("Ignoring additional textDivs for performance reasons."),p(this,Hl,!0);return}if(o.str===void 0){if(o.type==="beginMarkedContentProps"||o.type==="beginMarkedContent"){const l=n(this,re);p(this,re,document.createElement("span")),n(this,re).classList.add("markedContent"),o.id!==null&&n(this,re).setAttribute("id",`${o.id}`),l.append(n(this,re))}else o.type==="endMarkedContent"&&p(this,re,n(this,re).parentNode);continue}s.push(o.str),b(this,Rd,tm).call(this,o)}},Rd=new WeakSet,tm=function(t){var y;const e=document.createElement("span"),s={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};n(this,In).push(e);const i=F.transform(n(this,jl),t.transform);let r=Math.atan2(i[1],i[0]);const a=n(this,ua)[t.fontName];a.vertical&&(r+=Math.PI/2);let o=n(this,zl)&&a.fontSubstitution||a.fontFamily;o=pt.fontFamilyMap.get(o)||o;const l=Math.hypot(i[2],i[3]),h=l*b(y=pt,Md,sm).call(y,o,n(this,Mn));let c,f;r===0?(c=i[4],f=i[5]-h):(c=i[4]+h*Math.sin(r),f=i[5]-h*Math.cos(r));const g="calc(var(--scale-factor)*",m=e.style;n(this,re)===n(this,ca)?(m.left=`${(100*c/n(this,Gl)).toFixed(2)}%`,m.top=`${(100*f/n(this,$l)).toFixed(2)}%`):(m.left=`${g}${c.toFixed(2)}px)`,m.top=`${g}${f.toFixed(2)}px)`),m.fontSize=`${g}${(n(pt,_i)*l).toFixed(2)}px)`,m.fontFamily=o,s.fontSize=l,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,n(this,zl)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),r!==0&&(s.angle=r*(180/Math.PI));let A=!1;if(t.str.length>1)A=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const v=Math.abs(t.transform[0]),w=Math.abs(t.transform[3]);v!==w&&Math.max(v,w)/Math.min(v,w)>1.5&&(A=!0)}if(A&&(s.canvasWidth=a.vertical?t.height:t.width),n(this,Ul).set(e,s),n(this,Fs).div=e,n(this,Fs).properties=s,b(this,Xl,Tf).call(this,n(this,Fs)),s.hasText&&n(this,re).append(e),s.hasEOL){const v=document.createElement("br");v.setAttribute("role","presentation"),n(this,re).append(v)}},Xl=new WeakSet,Tf=function(t){var o;const{div:e,properties:s,ctx:i}=t,{style:r}=e;let a="";if(n(pt,_i)>1&&(a=`scale(${1/n(pt,_i)})`),s.canvasWidth!==0&&s.hasText){const{fontFamily:l}=r,{canvasWidth:h,fontSize:c}=s;b(o=pt,ql,Pf).call(o,i,c*n(this,vi),l);const{width:f}=i.measureText(e.textContent);f>0&&(a=`scaleX(${h*n(this,vi)/f}) ${a}`)}s.angle!==0&&(a=`rotate(${s.angle}deg) ${a}`),a.length>0&&(r.transform=a)},ga=new WeakSet,gc=function(t=null){let e=n(this,Fn).get(t||(t=""));if(!e){const s=document.createElement("canvas");s.className="hiddenCanvasElement",s.lang=t,document.body.append(s),e=s.getContext("2d",{alpha:!1,willReadFrequently:!0}),n(this,Fn).set(t,e),n(this,Wl).set(e,{size:0,family:""})}return e},ql=new WeakSet,Pf=function(t,e,s){const i=n(this,Wl).get(t);e===i.size&&s===i.family||(t.font=`${e}px ${s}`,i.size=e,i.family=s)},kd=new WeakSet,em=function(){if(n(this,_i)!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),p(this,_i,t.getBoundingClientRect().height),t.remove()},Md=new WeakSet,sm=function(t,e){const s=n(this,Dn).get(t);if(s)return s;const i=b(this,ga,gc).call(this,e);i.canvas.width=i.canvas.height=ee,b(this,ql,Pf).call(this,i,ee,t);const r=i.measureText("");let a=r.fontBoundingBoxAscent,o=Math.abs(r.fontBoundingBoxDescent);if(a){const c=a/(a+o);return n(this,Dn).set(t,c),i.canvas.width=i.canvas.height=0,c}i.strokeStyle="red",i.clearRect(0,0,ee,ee),i.strokeText("g",0,0);let l=i.getImageData(0,0,ee,ee).data;o=0;for(let c=l.length-1-3;c>=0;c-=4)if(l[c]>0){o=Math.ceil(c/4/ee);break}i.clearRect(0,0,ee,ee),i.strokeText("A",0,ee),l=i.getImageData(0,0,ee,ee).data,a=0;for(let c=0,f=l.length;c0){a=ee-Math.floor(c/4/ee);break}i.canvas.width=i.canvas.height=0;const h=a?a/(a+o):jA;return n(this,Dn).set(t,h),h},u(pt,ga),u(pt,ql),u(pt,kd),u(pt,Md),u(pt,Dn,new Map),u(pt,Fn,new Map),u(pt,Wl,new WeakMap),u(pt,_i,null),u(pt,pa,new Set);let No=pt;class Oo{static textContent(t){const e=[],s={items:e,styles:Object.create(null)};function i(r){var l;if(!r)return;let a=null;const o=r.name;if(o==="#text")a=r.value;else if(Oo.shouldBuildText(o))(l=r==null?void 0:r.attributes)!=null&&l.textContent?a=r.attributes.textContent:r.value&&(a=r.value);else return;if(a!==null&&e.push({str:a}),!!r.children)for(const h of r.children)i(h)}return i(t),s}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const WA=65536,XA=100,qA=5e3,YA=Xt?hA:aA,KA=Xt?cA:$g,QA=Xt?lA:oA,JA=Xt?dA:jg;function ZA(d={}){var ht,J;typeof d=="string"||d instanceof URL?d={url:d}:(d instanceof ArrayBuffer||ArrayBuffer.isView(d))&&(d={data:d});const t=new Rf,{docId:e}=t,s=d.url?ty(d.url):null,i=d.data?ey(d.data):null,r=d.httpHeaders||null,a=d.withCredentials===!0,o=(ht=d.password)!=null?ht:null,l=d.range instanceof im?d.range:null,h=Number.isInteger(d.rangeChunkSize)&&d.rangeChunkSize>0?d.rangeChunkSize:WA;let c=d.worker instanceof Dr?d.worker:null;const f=d.verbosity,g=typeof d.docBaseUrl=="string"&&!Lu(d.docBaseUrl)?d.docBaseUrl:null,m=typeof d.cMapUrl=="string"?d.cMapUrl:null,A=d.cMapPacked!==!1,y=d.CMapReaderFactory||KA,v=typeof d.standardFontDataUrl=="string"?d.standardFontDataUrl:null,w=d.StandardFontDataFactory||JA,_=d.stopAtErrors!==!0,E=Number.isInteger(d.maxImageSize)&&d.maxImageSize>-1?d.maxImageSize:-1,S=d.isEvalSupported!==!1,C=typeof d.isOffscreenCanvasSupported=="boolean"?d.isOffscreenCanvasSupported:!Xt,P=typeof d.isImageDecoderSupported=="boolean"?d.isImageDecoderSupported:!Xt&&(te.platform.isFirefox||!globalThis.chrome),T=Number.isInteger(d.canvasMaxAreaInBytes)?d.canvasMaxAreaInBytes:-1,k=typeof d.disableFontFace=="boolean"?d.disableFontFace:Xt,N=d.fontExtraProperties===!0,$=d.enableXfa===!0,B=d.ownerDocument||globalThis.document,st=d.disableRange===!0,nt=d.disableStream===!0,Q=d.disableAutoFetch===!0,Et=d.pdfBug===!0,x=d.CanvasFactory||YA,R=d.FilterFactory||QA,q=d.enableHWA===!0,j=l?l.length:(J=d.length)!=null?J:NaN,z=typeof d.useSystemFonts=="boolean"?d.useSystemFonts:!Xt&&!k,Lt=typeof d.useWorkerFetch=="boolean"?d.useWorkerFetch:y===$g&&w===jg&&m&&v&&Ao(m,document.baseURI)&&Ao(v,document.baseURI),rt=null;Bb(f);const ft={canvasFactory:new x({ownerDocument:B,enableHWA:q}),filterFactory:new R({docId:e,ownerDocument:B}),cMapReaderFactory:Lt?null:new y({baseUrl:m,isCompressed:A}),standardFontDataFactory:Lt?null:new w({baseUrl:v})};if(!c){const Ui={verbosity:f,port:ti.workerPort};c=Ui.port?Dr.fromPort(Ui):new Dr(Ui),t._worker=c}const Qe={docId:e,apiVersion:"4.10.38",data:i,password:o,disableAutoFetch:Q,rangeChunkSize:h,length:j,docBaseUrl:g,enableXfa:$,evaluatorOptions:{maxImageSize:E,disableFontFace:k,ignoreErrors:_,isEvalSupported:S,isOffscreenCanvasSupported:C,isImageDecoderSupported:P,canvasMaxAreaInBytes:T,fontExtraProperties:N,useSystemFonts:z,cMapUrl:Lt?m:null,standardFontDataUrl:Lt?v:null}},Ee={disableFontFace:k,fontExtraProperties:N,ownerDocument:B,pdfBug:Et,styleElement:rt,loadingParams:{disableAutoFetch:Q,enableXfa:$}};return c.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const Ui=c.messageHandler.sendWithPromise("GetDocRequest",Qe,i?[i.buffer]:null);let Fu;if(l)Fu=new PA(l,{disableRange:st,disableStream:nt});else if(!i){if(!s)throw new Error("getDocument - no `url` parameter provided.");let vr;if(Xt)if(Ao(s)){if(typeof fetch=="undefined"||typeof Response=="undefined"||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");vr=Xp}else vr=$A;else vr=Ao(s)?Xp:NA;Fu=new vr({url:s,length:j,httpHeaders:r,withCredentials:a,rangeChunkSize:h,disableRange:st,disableStream:nt})}return Ui.then(vr=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const xp=new _o(e,vr,c.port),tb=new ry(xp,t,Fu,Ee,ft);t._transport=tb,xp.send("Ready",null)})}).catch(t._capability.reject),t}function ty(d){if(d instanceof URL)return d.href;try{return new URL(d,window.location).href}catch(t){if(Xt&&typeof d=="string")return d}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function ey(d){if(Xt&&typeof Buffer!="undefined"&&d instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(d instanceof Uint8Array&&d.byteLength===d.buffer.byteLength)return d;if(typeof d=="string")return ku(d);if(d instanceof ArrayBuffer||ArrayBuffer.isView(d)||typeof d=="object"&&!isNaN(d==null?void 0:d.length))return new Uint8Array(d);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function qp(d){return typeof d=="object"&&Number.isInteger(d==null?void 0:d.num)&&d.num>=0&&Number.isInteger(d==null?void 0:d.gen)&&d.gen>=0}var Ld;const Id=class Id{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${qt(Id,Ld)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}destroy(){return I(this,null,function*(){var t,e,s,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),yield(e=this._transport)==null?void 0:e.destroy()}catch(r){throw(s=this._worker)!=null&&s.port&&delete this._worker._pendingDestroy,r}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null})}};Ld=new WeakMap,u(Id,Ld,0);let Rf=Id;class im{constructor(t,e,s=!1,i=null){this.length=t,this.initialData=e,this.progressiveDone=s,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const s of this._rangeListeners)s(t,e)}onDataProgress(t,e){this._readyCapability.promise.then(()=>{for(const s of this._progressListeners)s(t,e)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const e of this._progressiveReadListeners)e(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){it("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class sy{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return X(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Si,Ns,Ei,Tr,ma,mc;class iy{constructor(t,e,s,i=!1){u(this,Ei);u(this,ma);u(this,Si,null);u(this,Ns,!1);this._pageIndex=t,this._pageInfo=e,this._transport=s,this._stats=i?new Dp:null,this._pdfBug=i,this.commonObjs=s.commonObjs,this.objs=new nm,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:r=!1}={}){return new Kh({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return X(this,"isPureXfa",!!this._transport._htmlForXfa)}getXfa(){return I(this,null,function*(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null})}render({canvasContext:t,viewport:e,intent:s="display",annotationMode:i=ii.ENABLE,transform:r=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:h=null,printAnnotationStorage:c=null,isEditing:f=!1}){var S,C;(S=this._stats)==null||S.time("Overall");const g=this._transport.getRenderingIntent(s,i,c,f),{renderingIntent:m,cacheKey:A}=g;p(this,Ns,!1),b(this,ma,mc).call(this),o||(o=this._transport.getOptionalContentConfig(m));let y=this._intentStates.get(A);y||(y=Object.create(null),this._intentStates.set(A,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const v=!!(m&_e.PRINT);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(C=this._stats)==null||C.time("Page Request"),this._pumpOperatorList(g));const w=P=>{var T;y.renderTasks.delete(_),(this._maybeCleanupAfterRender||v)&&p(this,Ns,!0),b(this,Ei,Tr).call(this,!v),P?(_.capability.reject(P),this._abortOperatorList({intentState:y,reason:P instanceof Error?P:new Error(P)})):_.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(T=globalThis.Stats)!=null&&T.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},_=new Mf({callback:w,params:{canvasContext:t,viewport:e,transform:r,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!v,pdfBug:this._pdfBug,pageColors:h});(y.renderTasks||(y.renderTasks=new Set)).add(_);const E=_.task;return Promise.all([y.displayReadyCapability.promise,o]).then(([P,T])=>{var k;if(this.destroyed){w();return}if((k=this._stats)==null||k.time("Rendering"),!(T.renderingIntent&m))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");_.initializeGraphics({transparency:P,optionalContentConfig:T}),_.operatorListChanged()}).catch(w),E}getOperatorList({intent:t="display",annotationMode:e=ii.ENABLE,printAnnotationStorage:s=null,isEditing:i=!1}={}){var h;function r(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}const a=this._transport.getRenderingIntent(t,e,s,i,!0);let o=this._intentStates.get(a.cacheKey);o||(o=Object.create(null),this._intentStates.set(a.cacheKey,o));let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=r,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(h=this._stats)==null||h.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(i){return i.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(s=>Oo.textContent(s));const e=this.streamTextContent(t);return new Promise(function(s,i){function r(){a.read().then(function({value:l,done:h}){var c;if(h){s(o);return}(c=o.lang)!=null||(o.lang=l.lang),Object.assign(o.styles,l.styles),o.items.push(...l.items),r()},i)}const a=e.getReader(),o={items:[],styles:Object.create(null),lang:null};r()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const s of e.renderTasks)t.push(s.completed),s.cancel();return this.objs.clear(),p(this,Ns,!1),b(this,ma,mc).call(this),Promise.all(t)}cleanup(t=!1){p(this,Ns,!0);const e=b(this,Ei,Tr).call(this,!1);return t&&e&&this._stats&&(this._stats=new Dp),e}_startRenderPage(t,e){var i,r;const s=this._intentStates.get(e);s&&((i=this._stats)==null||i.timeEnd("Page Request"),(r=s.displayReadyCapability)==null||r.resolve(t))}_renderPageChunk(t,e){for(let s=0,i=t.length;s{l.read().then(({value:f,done:g})=>{if(g){h.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(f,h),c())},f=>{if(h.streamReader=null,!this._transport.destroyed){if(h.operatorList){h.operatorList.lastChunk=!0;for(const g of h.renderTasks)g.operatorListChanged();b(this,Ei,Tr).call(this,!0)}if(h.displayReadyCapability)h.displayReadyCapability.reject(f);else if(h.opListReadCapability)h.opListReadCapability.reject(f);else throw f}})};c()}_abortOperatorList({intentState:t,reason:e,force:s=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!s){if(t.renderTasks.size>0)return;if(e instanceof up){let i=XA;e.extraDelay>0&&e.extraDelay<1e3&&(i+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},i);return}}if(t.streamReader.cancel(new $i(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[i,r]of this._intentStates)if(r===t){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}Si=new WeakMap,Ns=new WeakMap,Ei=new WeakSet,Tr=function(t=!1){if(b(this,ma,mc).call(this),!n(this,Ns)||this.destroyed)return!1;if(t)return p(this,Si,setTimeout(()=>{p(this,Si,null),b(this,Ei,Tr).call(this,!1)},qA)),!1;for(const{renderTasks:e,operatorList:s}of this._intentStates.values())if(e.size>0||!s.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),p(this,Ns,!1),!0},ma=new WeakSet,mc=function(){n(this,Si)&&(clearTimeout(n(this,Si)),p(this,Si,null))};var Os,Dd;class ny{constructor(){u(this,Os,new Map);u(this,Dd,Promise.resolve())}postMessage(t,e){const s={data:structuredClone(t,e?{transfer:e}:null)};n(this,Dd).then(()=>{for(const[i]of n(this,Os))i.call(this,s)})}addEventListener(t,e,s=null){let i=null;if((s==null?void 0:s.signal)instanceof AbortSignal){const{signal:r}=s;if(r.aborted){V("LoopbackPort - cannot use an `aborted` signal.");return}const a=()=>this.removeEventListener(t,e);i=()=>r.removeEventListener("abort",a),r.addEventListener("abort",a)}n(this,Os).set(e,i)}removeEventListener(t,e){const s=n(this,Os).get(e);s==null||s(),n(this,Os).delete(e)}terminate(){for(const[,t]of n(this,Os))t==null||t();n(this,Os).clear()}}Os=new WeakMap,Dd=new WeakMap;var Fd,Nn,On,ba,bc,Aa,Ac;const ot=class ot{constructor({name:t=null,port:e=null,verbosity:s=Hb()}={}){u(this,ba);var i;if(this.name=t,this.destroyed=!1,this.verbosity=s,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,e){if((i=n(ot,On))!=null&&i.has(e))throw new Error("Cannot use more than one PDFWorker per port.");(n(ot,On)||p(ot,On,new WeakMap)).set(e,this),this._initializeFromPort(e);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new _o("main","worker",t),this._messageHandler.on("ready",function(){}),b(this,ba,bc).call(this)}_initialize(){if(n(ot,Nn)||n(ot,Aa,Ac)){this._setupFakeWorker();return}let{workerSrc:t}=ot;try{ot._isSameOrigin(window.location.href,t)||(t=ot._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),s=new _o("main","worker",e),i=()=>{r.abort(),s.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},r=new AbortController;e.addEventListener("error",()=>{this._webWorker||i()},{signal:r.signal}),s.on("test",o=>{if(r.abort(),this.destroyed||!o){i();return}this._messageHandler=s,this._port=e,this._webWorker=e,b(this,ba,bc).call(this)}),s.on("ready",o=>{if(r.abort(),this.destroyed){i();return}try{a()}catch(l){this._setupFakeWorker()}});const a=()=>{const o=new Uint8Array;s.send("test",o,[o.buffer])};a();return}catch(e){Ru("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){n(ot,Nn)||(V("Setting up fake worker."),p(ot,Nn,!0)),ot._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const e=new ny;this._port=e;const s=`fake${qt(ot,Fd)._++}`,i=new _o(s+"_worker",s,e);t.setup(i,e),this._messageHandler=new _o(s,s+"_worker",e),b(this,ba,bc).call(this)}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){var t,e,s;this.destroyed=!0,(t=this._webWorker)==null||t.terminate(),this._webWorker=null,(e=n(ot,On))==null||e.delete(this._port),this._port=null,(s=this._messageHandler)==null||s.destroy(),this._messageHandler=null}static fromPort(t){var s;if(!(t!=null&&t.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const e=(s=n(this,On))==null?void 0:s.get(t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new ot(t)}static get workerSrc(){if(ti.workerSrc)return ti.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return X(this,"_setupFakeWorkerGlobal",(()=>I(this,null,function*(){return n(this,Aa,Ac)?n(this,Aa,Ac):(yield ab(()=>import(this.workerSrc),[],import.meta.url)).WorkerMessageHandler}))())}};Fd=new WeakMap,Nn=new WeakMap,On=new WeakMap,ba=new WeakSet,bc=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Aa=new WeakSet,Ac=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch(e){return null}},u(ot,Aa),u(ot,Fd,0),u(ot,Nn,!1),u(ot,On,void 0),Xt&&(p(ot,Nn,!0),ti.workerSrc||(ti.workerSrc="./pdf.worker.mjs")),ot._isSameOrigin=(t,e)=>{let s;try{if(s=new URL(t),!s.origin||s.origin==="null")return!1}catch(r){return!1}const i=new URL(e,s);return s.origin===i.origin},ot._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};let Dr=ot;var Bs,cs,ya,wa,Hs,Bn,To;class ry{constructor(t,e,s,i,r){u(this,Bn);u(this,Bs,new Map);u(this,cs,new Map);u(this,ya,new Map);u(this,wa,new Map);u(this,Hs,null);this.messageHandler=t,this.loadingTask=e,this.commonObjs=new nm,this.fontLoader=new nA({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=s,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return X(this,"annotationStorage",new mp)}getRenderingIntent(t,e=ii.ENABLE,s=null,i=!1,r=!1){let a=_e.DISPLAY,o=Af;switch(t){case"any":a=_e.ANY;break;case"display":break;case"print":a=_e.PRINT;break;default:V(`getRenderingIntent - invalid intent: ${t}`)}const l=a&_e.PRINT&&s instanceof Fg?s:this.annotationStorage;switch(e){case ii.DISABLE:a+=_e.ANNOTATIONS_DISABLE;break;case ii.ENABLE:break;case ii.ENABLE_FORMS:a+=_e.ANNOTATIONS_FORMS;break;case ii.ENABLE_STORAGE:a+=_e.ANNOTATIONS_STORAGE,o=l.serializable;break;default:V(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(a+=_e.IS_EDITING),r&&(a+=_e.OPLIST);const{ids:h,hash:c}=l.modifiedIds,f=[a,o.hash,c];return{renderingIntent:a,cacheKey:f.join("_"),annotationStorageSerializable:o,modifiedIds:h}}destroy(){var s;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(s=n(this,Hs))==null||s.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of n(this,cs).values())t.push(i._destroy());n(this,cs).clear(),n(this,ya).clear(),n(this,wa).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var i,r;this.commonObjs.clear(),this.fontLoader.clear(),n(this,Bs).clear(),this.filterFactory.destroy(),No.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new $i("Worker was terminated.")),(r=this.messageHandler)==null||r.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(s,i)=>{wt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=r=>{this._lastProgress={loaded:r.loaded,total:r.total}},i.onPull=()=>{this._fullReader.read().then(function({value:r,done:a}){if(a){i.close();return}wt(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(r),1,[r])}).catch(r=>{i.error(r)})},i.onCancel=r=>{this._fullReader.cancel(r),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("ReaderHeadersReady",s=>I(this,null,function*(){var o;yield this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:r,contentLength:a}=this._fullReader;return(!i||!r)&&(this._lastProgress&&((o=e.onProgress)==null||o.call(e,this._lastProgress)),this._fullReader.onProgress=l=>{var h;(h=e.onProgress)==null||h.call(e,{loaded:l.loaded,total:l.total})}),{isStreamingSupported:i,isRangeSupported:r,contentLength:a}})),t.on("GetRangeReader",(s,i)=>{wt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(s.begin,s.end);if(!r){i.close();return}i.onPull=()=>{r.read().then(function({value:a,done:o}){if(o){i.close();return}wt(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{i.error(a)})},i.onCancel=a=>{r.cancel(a),i.ready.catch(o=>{if(!this.destroyed)throw o})}}),t.on("GetDoc",({pdfInfo:s})=>{this._numPages=s.numPages,this._htmlForXfa=s.htmlForXfa,delete s.htmlForXfa,e._capability.resolve(new sy(s,this))}),t.on("DocException",s=>{e._capability.reject(se(s))}),t.on("PasswordRequest",s=>{p(this,Hs,Promise.withResolvers());try{if(!e.onPassword)throw se(s);const i=r=>{r instanceof Error?n(this,Hs).reject(r):n(this,Hs).resolve({password:r})};e.onPassword(i,s.code)}catch(i){n(this,Hs).reject(i)}return n(this,Hs).promise}),t.on("DataLoaded",s=>{var i;(i=e.onProgress)==null||i.call(e,{loaded:s.length,total:s.length}),this.downloadInfoCapability.resolve(s)}),t.on("StartRenderPage",s=>{if(this.destroyed)return;n(this,cs).get(s.pageIndex)._startRenderPage(s.transparency,s.cacheKey)}),t.on("commonobj",([s,i,r])=>{var a;if(this.destroyed||this.commonObjs.has(s))return null;switch(i){case"Font":const{disableFontFace:o,fontExtraProperties:l,pdfBug:h}=this._params;if("error"in r){const m=r.error;V(`Error during font loading: ${m}`),this.commonObjs.resolve(s,m);break}const c=h&&((a=globalThis.FontInspector)!=null&&a.enabled)?(m,A)=>globalThis.FontInspector.fontAdded(m,A):null,f=new rA(r,{disableFontFace:o,fontExtraProperties:l,inspectFont:c});this.fontLoader.bind(f).catch(()=>t.sendWithPromise("FontFallback",{id:s})).finally(()=>{!l&&f.data&&(f.data=null),this.commonObjs.resolve(s,f)});break;case"CopyLocalImage":const{imageRef:g}=r;wt(g,"The imageRef must be defined.");for(const m of n(this,cs).values())for(const[,A]of m.objs)if((A==null?void 0:A.ref)===g)return A.dataLen?(this.commonObjs.resolve(s,structuredClone(A)),A.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(s,r);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),t.on("obj",([s,i,r,a])=>{var l;if(this.destroyed)return;const o=n(this,cs).get(i);if(!o.objs.has(s)){if(o._intentStates.size===0){(l=a==null?void 0:a.bitmap)==null||l.close();return}switch(r){case"Image":o.objs.resolve(s,a),(a==null?void 0:a.dataLen)>Db&&(o._maybeCleanupAfterRender=!0);break;case"Pattern":o.objs.resolve(s,a);break;default:throw new Error(`Got unknown object type ${r}`)}}}),t.on("DocProgress",s=>{var i;this.destroyed||(i=e.onProgress)==null||i.call(e,{loaded:s.loaded,total:s.total})}),t.on("FetchBuiltInCMap",s=>I(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(s)})),t.on("FetchStandardFontData",s=>I(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(s)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var s,i;this.annotationStorage.size<=0&&V("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:(i=(s=this._fullReader)==null?void 0:s.filename)!=null?i:null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,s=n(this,ya).get(e);if(s)return s;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(r=>{if(this.destroyed)throw new Error("Transport destroyed");r.refStr&&n(this,wa).set(r.refStr,t);const a=new iy(e,r,this,this._params.pdfBug);return n(this,cs).set(e,a),a});return n(this,ya).set(e,i),i}getPageIndex(t){return qp(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return b(this,Bn,To).call(this,"GetFieldObjects")}hasJSActions(){return b(this,Bn,To).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return b(this,Bn,To).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return b(this,Bn,To).call(this,"GetOptionalContentConfig").then(e=>new TA(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=n(this,Bs).get(t);if(e)return e;const s=this.messageHandler.sendWithPromise(t,null).then(i=>{var r,a,o,l;return{info:i[0],metadata:i[1]?new CA(i[1]):null,contentDispositionFilename:(a=(r=this._fullReader)==null?void 0:r.filename)!=null?a:null,contentLength:(l=(o=this._fullReader)==null?void 0:o.contentLength)!=null?l:null}});return n(this,Bs).set(t,s),s}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(t=!1){return I(this,null,function*(){if(!this.destroyed){yield this.messageHandler.sendWithPromise("Cleanup",null);for(const e of n(this,cs).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),n(this,Bs).clear(),this.filterFactory.destroy(!0),No.cleanup()}})}cachedPageNumber(t){var s;if(!qp(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return(s=n(this,wa).get(e))!=null?s:null}}Bs=new WeakMap,cs=new WeakMap,ya=new WeakMap,wa=new WeakMap,Hs=new WeakMap,Bn=new WeakSet,To=function(t,e=null){const s=n(this,Bs).get(t);if(s)return s;const i=this.messageHandler.sendWithPromise(t,e);return n(this,Bs).set(t,i),i};const go=Symbol("INITIAL_DATA");var fe,Yl,kf;class nm{constructor(){u(this,Yl);u(this,fe,Object.create(null))}get(t,e=null){if(e){const i=b(this,Yl,kf).call(this,t);return i.promise.then(()=>e(i.data)),null}const s=n(this,fe)[t];if(!s||s.data===go)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return s.data}has(t){const e=n(this,fe)[t];return!!e&&e.data!==go}delete(t){const e=n(this,fe)[t];return!e||e.data===go?!1:(delete n(this,fe)[t],!0)}resolve(t,e=null){const s=b(this,Yl,kf).call(this,t);s.data=e,s.resolve()}clear(){var t;for(const e in n(this,fe)){const{data:s}=n(this,fe)[e];(t=s==null?void 0:s.bitmap)==null||t.close()}p(this,fe,Object.create(null))}*[Symbol.iterator](){for(const t in n(this,fe)){const{data:e}=n(this,fe)[t];e!==go&&(yield[t,e])}}}fe=new WeakMap,Yl=new WeakSet,kf=function(t){var e;return(e=n(this,fe))[t]||(e[t]=_r(ws({},Promise.withResolvers()),{data:go}))};var Ci;class ay{constructor(t){u(this,Ci,null);p(this,Ci,t),this.onContinue=null}get promise(){return n(this,Ci).capability.promise}cancel(t=0){n(this,Ci).cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=n(this,Ci).operatorList;if(!t)return!1;const{annotationCanvasMap:e}=n(this,Ci);return t.form||t.canvas&&(e==null?void 0:e.size)>0}}Ci=new WeakMap;var xi,Hn;const Qi=class Qi{constructor({callback:t,params:e,objs:s,commonObjs:i,annotationCanvasMap:r,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:h,useRequestAnimationFrame:c=!1,pdfBug:f=!1,pageColors:g=null}){u(this,xi,null);this.callback=t,this.params=e,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=r,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=h,this._pdfBug=f,this.pageColors=g,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=c===!0&&typeof window!="undefined",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new ay(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var o,l;if(this.cancelled)return;if(this._canvas){if(n(Qi,Hn).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");n(Qi,Hn).add(this._canvas)}this._pdfBug&&((o=globalThis.StepperManager)!=null&&o.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:s,viewport:i,transform:r,background:a}=this.params;this.gfx=new Ir(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:r,viewport:i,transparency:t,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,(l=this.graphicsReadyCallback)==null||l.call(this)}cancel(t=null,e=0){var s;this.running=!1,this.cancelled=!0,(s=this.gfx)==null||s.endDrawing(),n(this,xi)&&(window.cancelAnimationFrame(n(this,xi)),p(this,xi,null)),n(Qi,Hn).delete(this._canvas),this.callback(t||new up(`Rendering cancelled, page ${this._pageIndex+1}`,e))}operatorListChanged(){var t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?p(this,xi,window.requestAnimationFrame(()=>{p(this,xi,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){return I(this,null,function*(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),n(Qi,Hn).delete(this._canvas),this.callback())))})}};xi=new WeakMap,Hn=new WeakMap,u(Qi,Hn,new WeakSet);let Mf=Qi;const oy="4.10.38",ly="f9bea397f";function Yp(d){return Math.floor(Math.max(0,Math.min(1,d))*255).toString(16).padStart(2,"0")}function mo(d){return Math.max(0,Math.min(255,255*d))}class Kp{static CMYK_G([t,e,s,i]){return["G",1-Math.min(1,.3*t+.59*s+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=mo(t),[t,t,t]}static G_HTML([t]){const e=Yp(t);return`#${e}${e}${e}`}static RGB_G([t,e,s]){return["G",.3*t+.59*e+.11*s]}static RGB_rgb(t){return t.map(mo)}static RGB_HTML(t){return`#${t.map(Yp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,s,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,s+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,s,i]){return[mo(1-Math.min(1,t+i)),mo(1-Math.min(1,s+i)),mo(1-Math.min(1,e+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,s]){const i=1-t,r=1-e,a=1-s,o=Math.min(i,r,a);return["CMYK",i,r,a,o]}}class hy{create(t,e,s=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){it("Abstract method `_createSVG` called.")}}class Ap extends hy{_createSVG(t){return document.createElementNS(vs,t)}}class rm{static setupStorage(t,e,s,i,r){const a=i.getValue(e,{value:null});switch(s.name){case"textarea":if(a.value!==null&&(t.textContent=a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})});break;case"input":if(s.attributes.type==="radio"||s.attributes.type==="checkbox"){if(a.value===s.attributes.xfaOn?t.setAttribute("checked",!0):a.value===s.attributes.xfaOff&&t.removeAttribute("checked"),r==="print")break;t.addEventListener("change",o=>{i.setValue(e,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&t.setAttribute("value",a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})})}break;case"select":if(a.value!==null){t.setAttribute("value",a.value);for(const o of s.children)o.attributes.value===a.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}t.addEventListener("input",o=>{const l=o.target.options,h=l.selectedIndex===-1?"":l[l.selectedIndex].value;i.setValue(e,{value:h})});break}}static setAttributes({html:t,element:e,storage:s=null,intent:i,linkService:r}){const{attributes:a}=e,o=t instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${i}`);for(const[l,h]of Object.entries(a))if(h!=null)switch(l){case"class":h.length&&t.setAttribute(l,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!o||l!=="href"&&l!=="newWindow")&&t.setAttribute(l,h)}o&&r.addLinkAttributes(t,a.href,a.newWindow),s&&a.dataId&&this.setupStorage(t,a.dataId,e,s)}static render(t){var f,g;const e=t.annotationStorage,s=t.linkService,i=t.xfaHtml,r=t.intent||"display",a=document.createElement(i.name);i.attributes&&this.setAttributes({html:a,element:i,intent:r,linkService:s});const o=r!=="richText",l=t.div;if(l.append(a),t.viewport){const m=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=m}o&&l.setAttribute("class","xfaLayer xfaFont");const h=[];if(i.children.length===0){if(i.value){const m=document.createTextNode(i.value);a.append(m),o&&Oo.shouldBuildText(i.name)&&h.push(m)}return{textDivs:h}}const c=[[i,-1,a]];for(;c.length>0;){const[m,A,y]=c.at(-1);if(A+1===m.children.length){c.pop();continue}const v=m.children[++c.at(-1)[1]];if(v===null)continue;const{name:w}=v;if(w==="#text"){const E=document.createTextNode(v.value);h.push(E),y.append(E);continue}const _=(f=v==null?void 0:v.attributes)!=null&&f.xmlns?document.createElementNS(v.attributes.xmlns,w):document.createElement(w);if(y.append(_),v.attributes&&this.setAttributes({html:_,element:v,storage:e,intent:r,linkService:s}),((g=v.children)==null?void 0:g.length)>0)c.push([v,-1,_]);else if(v.value){const E=document.createTextNode(v.value);o&&Oo.shouldBuildText(w)&&h.push(E),_.append(E)}}for(const m of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))m.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const Jh=1e3,cy=9,yr=new WeakSet;function zi(d){return{width:d[2]-d[0],height:d[3]-d[1]}}class dy{static create(t){switch(t.data.annotationType){case vt.LINK:return new am(t);case vt.TEXT:return new uy(t);case vt.WIDGET:switch(t.data.fieldType){case"Tx":return new fy(t);case"Btn":return t.data.radioButton?new hm(t):t.data.checkBox?new gy(t):new my(t);case"Ch":return new by(t);case"Sig":return new py(t)}return new wr(t);case vt.POPUP:return new If(t);case vt.FREETEXT:return new pm(t);case vt.LINE:return new yy(t);case vt.SQUARE:return new wy(t);case vt.CIRCLE:return new vy(t);case vt.POLYLINE:return new gm(t);case vt.CARET:return new Sy(t);case vt.INK:return new yp(t);case vt.POLYGON:return new _y(t);case vt.HIGHLIGHT:return new mm(t);case vt.UNDERLINE:return new Ey(t);case vt.SQUIGGLY:return new Cy(t);case vt.STRIKEOUT:return new xy(t);case vt.STAMP:return new bm(t);case vt.FILEATTACHMENT:return new Ty(t);default:return new At(t)}}}var zn,va,_a,Kl,Lf;const Sp=class Sp{constructor(t,{isRenderable:e=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}={}){u(this,Kl);u(this,zn,null);u(this,va,!1);u(this,_a,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(s)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:t,contentsObj:e,richText:s}){return!!(t!=null&&t.str||e!=null&&e.str||s!=null&&s.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Sp._hasPopupData(this.data)}updateEdited(t){var s;if(!this.container)return;n(this,zn)||p(this,zn,{rect:this.data.rect.slice(0)});const{rect:e}=t;e&&b(this,Kl,Lf).call(this,e),(s=n(this,_a))==null||s.popup.updateEdited(t)}resetEdited(){var t;n(this,zn)&&(b(this,Kl,Lf).call(this,n(this,zn).rect),(t=n(this,_a))==null||t.popup.resetEdited(),p(this,zn,null))}_createContainer(t){const{data:e,parent:{page:s,viewport:i}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",e.id),this instanceof wr||(r.tabIndex=Jh);const{style:a}=r;if(a.zIndex=this.parent.zIndex++,e.alternativeText&&(r.title=e.alternativeText),e.noRotate&&r.classList.add("norotate"),!e.rect||this instanceof If){const{rotation:y}=e;return!e.hasOwnCanvas&&y!==0&&this.setRotation(y,r),r}const{width:o,height:l}=zi(e.rect);if(!t&&e.borderStyle.width>0){a.borderWidth=`${e.borderStyle.width}px`;const y=e.borderStyle.horizontalCornerRadius,v=e.borderStyle.verticalCornerRadius;if(y>0||v>0){const _=`calc(${y}px * var(--scale-factor)) / calc(${v}px * var(--scale-factor))`;a.borderRadius=_}else if(this instanceof hm){const _=`calc(${o}px * var(--scale-factor)) / calc(${l}px * var(--scale-factor))`;a.borderRadius=_}switch(e.borderStyle.style){case fo.SOLID:a.borderStyle="solid";break;case fo.DASHED:a.borderStyle="dashed";break;case fo.BEVELED:V("Unimplemented border style: beveled");break;case fo.INSET:V("Unimplemented border style: inset");break;case fo.UNDERLINE:a.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(p(this,va,!0),a.borderColor=F.makeHexColor(w[0]|0,w[1]|0,w[2]|0)):a.borderWidth=0}const h=F.normalizeRect([e.rect[0],s.view[3]-e.rect[1]+s.view[1],e.rect[2],s.view[3]-e.rect[3]+s.view[1]]),{pageWidth:c,pageHeight:f,pageX:g,pageY:m}=i.rawDims;a.left=`${100*(h[0]-g)/c}%`,a.top=`${100*(h[1]-m)/f}%`;const{rotation:A}=e;return e.hasOwnCanvas||A===0?(a.width=`${100*o/c}%`,a.height=`${100*l/f}%`):this.setRotation(A,r),r}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:s,pageHeight:i}=this.parent.viewport.rawDims,{width:r,height:a}=zi(this.data.rect);let o,l;t%180===0?(o=100*r/s,l=100*a/i):(o=100*a/s,l=100*r/i),e.style.width=`${o}%`,e.style.height=`${l}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,s,i)=>{const r=i.detail[e],a=r[0],o=r.slice(1);i.target.style[s]=Kp[`${a}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[s]:Kp[`${a}_rgb`](o)})};return X(this,"_commonActions",{display:e=>{const{display:s}=e.detail,i=s%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:s===1||s===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:s}=e.detail;this.container.style.visibility=s?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:s,noView:s})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const s=e.detail.rotation;this.setRotation(s),this.annotationStorage.setValue(this.data.id,{rotation:s})}})}_dispatchEventFromSandbox(t,e){const s=this._commonActions;for(const i of Object.keys(e.detail)){const r=t[i]||s[i];r==null||r(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const s=this._commonActions;for(const[i,r]of Object.entries(e)){const a=s[i];if(a){const o={detail:{[i]:r},target:t};a(o),delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,s,i,r]=this.data.rect.map(y=>Math.fround(y));if(t.length===8){const[y,v,w,_]=t.subarray(2,6);if(i===y&&r===v&&e===w&&s===_)return}const{style:a}=this.container;let o;if(n(this,va)){const{borderColor:y,borderWidth:v}=a;a.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const l=i-e,h=r-s,{svgFactory:c}=this,f=c.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0);const g=c.createElement("defs");f.append(g);const m=c.createElement("clipPath"),A=`clippath_${this.data.id}`;m.setAttribute("id",A),m.setAttribute("clipPathUnits","objectBoundingBox"),g.append(m);for(let y=2,v=t.length;y`)}n(this,va)&&(o.push("')"),a.backgroundImage=o.join("")),this.container.append(f),this.container.style.clipPath=`url(#${A})`}_createPopup(){const{data:t}=this,e=p(this,_a,new If({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(e.render())}render(){it("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const s=[];if(this._fieldObjects){const i=this._fieldObjects[t];if(i)for(const{page:r,id:a,exportValues:o}of i){if(r===-1||a===e)continue;const l=typeof o=="string"?o:null,h=document.querySelector(`[data-element-id="${a}"]`);if(h&&!yr.has(h)){V(`_getElementsByName - element not allowed: ${a}`);continue}s.push({id:a,exportValue:l,domElement:h})}return s}for(const i of document.getElementsByName(t)){const{exportValue:r}=i,a=i.getAttribute("data-element-id");a!==e&&yr.has(i)&&s.push({id:a,exportValue:r,domElement:i})}return s}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var s;(s=this.linkService.eventBus)==null||s.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})})}};zn=new WeakMap,va=new WeakMap,_a=new WeakMap,Kl=new WeakSet,Lf=function(t){const{container:{style:e},data:{rect:s,rotation:i},parent:{viewport:{rawDims:{pageWidth:r,pageHeight:a,pageX:o,pageY:l}}}}=this;s==null||s.splice(0,4,...t);const{width:h,height:c}=zi(t);e.left=`${100*(t[0]-o)/r}%`,e.top=`${100*(a-t[3]+l)/a}%`,i===0?(e.width=`${100*h/r}%`,e.height=`${100*c/a}%`):this.setRotation(i)};let At=Sp;var zs,Xi,Nd,om,Od,lm;class am extends At{constructor(e,s=null){super(e,{isRenderable:!0,ignoreBorder:!!(s!=null&&s.ignoreBorder),createQuadrilaterals:!0});u(this,zs);u(this,Nd);u(this,Od);this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:s}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let r=!1;return e.url?(s.addLinkAttributes(i,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(i,e.action),r=!0):e.attachment?(b(this,Nd,om).call(this,i,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(b(this,Od,lm).call(this,i,e.setOCGState),r=!0):e.dest?(this._bindLink(i,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),r=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(i,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(i),this.container}_bindLink(e,s){e.href=this.linkService.getDestinationHash(s),e.onclick=()=>(s&&this.linkService.goToDestination(s),!1),(s||s==="")&&b(this,zs,Xi).call(this)}_bindNamedAction(e,s){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(s),!1),b(this,zs,Xi).call(this)}_bindJSAction(e,s){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(s.actions)){const a=i.get(r);a&&(e[a]=()=>{var o;return(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:s.id,name:r}}),!1})}e.onclick||(e.onclick=()=>!1),b(this,zs,Xi).call(this)}_bindResetFormAction(e,s){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),b(this,zs,Xi).call(this),!this._fieldObjects){V('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(e.onclick=()=>!1);return}e.onclick=()=>{var f;i==null||i();const{fields:r,refs:a,include:o}=s,l=[];if(r.length!==0||a.length!==0){const g=new Set(a);for(const m of r){const A=this._fieldObjects[m]||[];for(const{id:y}of A)g.add(y)}for(const m of Object.values(this._fieldObjects))for(const A of m)g.has(A.id)===o&&l.push(A)}else for(const g of Object.values(this._fieldObjects))l.push(...g);const h=this.annotationStorage,c=[];for(const g of l){const{id:m}=g;switch(c.push(m),g.type){case"text":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}case"checkbox":case"radiobutton":{const y=g.defaultValue===g.exportValues;h.setValue(m,{value:y});break}case"combobox":case"listbox":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}default:continue}const A=document.querySelector(`[data-element-id="${m}"]`);if(A){if(!yr.has(A)){V(`_bindResetFormAction - element not allowed: ${m}`);continue}}else continue;A.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}})),!1}}}zs=new WeakSet,Xi=function(){this.container.setAttribute("data-internal-link","")},Nd=new WeakSet,om=function(e,s,i=null){e.href=this.linkService.getAnchorUrl(""),s.description&&(e.title=s.description),e.onclick=()=>{var r;return(r=this.downloadManager)==null||r.openOrDownloadData(s.content,s.filename,i),!1},b(this,zs,Xi).call(this)},Od=new WeakSet,lm=function(e,s){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(s),!1),b(this,zs,Xi).call(this)};class uy extends At{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class wr extends At{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return te.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,s,i,r){s.includes("mouse")?t.addEventListener(s,a=>{var o;(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):t.addEventListener(s,a=>{var o;if(s==="blur"){if(!e.focused||!a.relatedTarget)return;e.focused=!1}else if(s==="focus"){if(e.focused)return;e.focused=!0}r&&((o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a)}}))})}_setEventListeners(t,e,s,i){var r,a,o;for(const[l,h]of s)(h==="Action"||(r=this.data.actions)!=null&&r[h])&&((h==="Focus"||h==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,l,h,i),h==="Focus"&&!((a=this.data.actions)!=null&&a.Blur)?this._setEventListener(t,e,"blur","Blur",null):h==="Blur"&&!((o=this.data.actions)!=null&&o.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":F.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:s}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||cy,r=t.style;let a;const o=2,l=h=>Math.round(10*h)/10;if(this.data.multiLine){const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o),c=Math.round(h/($u*i))||1,f=h/c;a=Math.min(i,l(f/$u))}else{const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o);a=Math.min(i,l(h/$u))}r.fontSize=`calc(${a}px * var(--scale-factor))`,r.color=F.makeHexColor(s[0],s[1],s[2]),this.data.textAlignment!==null&&(r.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class fy extends wr{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,s,i){const r=this.annotationStorage;for(const a of this._getElementsByName(t.name,t.id))a.domElement&&(a.domElement[e]=s),r.setValue(a.id,{[i]:s})}render(){var i,r;const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const a=t.getValue(e,{value:this.data.fieldValue});let o=a.value||"";const l=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;l&&o.length>l&&(o=o.slice(0,l));let h=a.formattedValue||((i=this.data.textContent)==null?void 0:i.join(` -`))||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));const c={userValue:o,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=h!=null?h:o,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type="text",s.setAttribute("value",h!=null?h:o),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),yr.add(s),s.setAttribute("data-element-id",e),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=Jh,this._setRequired(s,this.data.required),l&&(s.maxLength=l),s.addEventListener("input",g=>{t.setValue(e,{value:g.target.value}),this.setPropertyOnSiblings(s,"value",g.target.value,"value"),c.formattedValue=null}),s.addEventListener("resetform",g=>{var A;const m=(A=this.data.defaultFieldValue)!=null?A:"";s.value=c.userValue=m,c.formattedValue=null});let f=g=>{const{formattedValue:m}=c;m!=null&&(g.target.value=m),g.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",m=>{var y;if(c.focused)return;const{target:A}=m;c.userValue&&(A.value=c.userValue),c.lastCommittedValue=A.value,c.commitKey=1,(y=this.data.actions)!=null&&y.Focus||(c.focused=!0)}),s.addEventListener("updatefromsandbox",m=>{this.showElementAndHideCanvas(m.target);const A={value(y){var v;c.userValue=(v=y.detail.value)!=null?v:"",t.setValue(e,{value:c.userValue.toString()}),y.target.value=c.userValue},formattedValue(y){const{formattedValue:v}=y.detail;c.formattedValue=v,v!=null&&y.target!==document.activeElement&&(y.target.value=v),t.setValue(e,{formattedValue:v})},selRange(y){y.target.setSelectionRange(...y.detail.selRange)},charLimit:y=>{var E;const{charLimit:v}=y.detail,{target:w}=y;if(v===0){w.removeAttribute("maxLength");return}w.setAttribute("maxLength",v);let _=c.userValue;!_||_.length<=v||(_=_.slice(0,v),w.value=c.userValue=_,t.setValue(e,{value:_}),(E=this.linkService.eventBus)==null||E.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,commitKey:1,selStart:w.selectionStart,selEnd:w.selectionEnd}}))}};this._dispatchEventFromSandbox(A,m)}),s.addEventListener("keydown",m=>{var v;c.commitKey=1;let A=-1;if(m.key==="Escape"?A=0:m.key==="Enter"&&!this.data.multiLine?A=2:m.key==="Tab"&&(c.commitKey=3),A===-1)return;const{value:y}=m.target;c.lastCommittedValue!==y&&(c.lastCommittedValue=y,c.userValue=y,(v=this.linkService.eventBus)==null||v.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:y,willCommit:!0,commitKey:A,selStart:m.target.selectionStart,selEnd:m.target.selectionEnd}}))});const g=f;f=null,s.addEventListener("blur",m=>{var y,v;if(!c.focused||!m.relatedTarget)return;(y=this.data.actions)!=null&&y.Blur||(c.focused=!1);const{value:A}=m.target;c.userValue=A,c.lastCommittedValue!==A&&((v=this.linkService.eventBus)==null||v.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:A,willCommit:!0,commitKey:c.commitKey,selStart:m.target.selectionStart,selEnd:m.target.selectionEnd}})),g(m)}),(r=this.data.actions)!=null&&r.Keystroke&&s.addEventListener("beforeinput",m=>{var C;c.lastCommittedValue=null;const{data:A,target:y}=m,{value:v,selectionStart:w,selectionEnd:_}=y;let E=w,S=_;switch(m.inputType){case"deleteWordBackward":{const P=v.substring(0,w).match(/\w*[^\w]*$/);P&&(E-=P[0].length);break}case"deleteWordForward":{const P=v.substring(w).match(/^[^\w]*\w*/);P&&(S+=P[0].length);break}case"deleteContentBackward":w===_&&(E-=1);break;case"deleteContentForward":w===_&&(S+=1);break}m.preventDefault(),(C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:v,change:A||"",willCommit:!1,selStart:E,selEnd:S}})}),this._setEventListeners(s,c,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],m=>m.target.value)}if(f&&s.addEventListener("blur",f),this.data.comb){const m=(this.data.rect[2]-this.data.rect[0])/l;s.classList.add("comb"),s.style.letterSpacing=`calc(${m}px * var(--scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class py extends wr{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class gy extends wr{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.exportValue===e.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",t.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");return yr.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="checkbox",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.setAttribute("exportValue",e.exportValue),r.tabIndex=Jh,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s)){const c=l&&h.exportValue===e.exportValue;h.domElement&&(h.domElement.checked=c),t.setValue(h.id,{value:c})}t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue||"Off";a.target.checked=o===e.exportValue}),this.enableScripting&&this.hasJSActions&&(r.addEventListener("updatefromsandbox",a=>{const o={value(l){l.target.checked=l.detail.value!=="Off",t.setValue(s,{value:l.target.checked})}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class hm extends wr{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.fieldValue===e.buttonValue}).value;if(typeof i=="string"&&(i=i!==e.buttonValue,t.setValue(s,{value:i})),i)for(const a of this._getElementsByName(e.fieldName,s))t.setValue(a.id,{value:!1});const r=document.createElement("input");if(yr.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="radio",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.tabIndex=Jh,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s))t.setValue(h.id,{value:!1});t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue;a.target.checked=o!=null&&o===e.buttonValue}),this.enableScripting&&this.hasJSActions){const a=e.buttonValue;r.addEventListener("updatefromsandbox",o=>{const l={value:h=>{const c=a===h.detail.value;for(const f of this._getElementsByName(h.target.name)){const g=c&&f.id===s;f.domElement&&(f.domElement.checked=g),t.setValue(f.id,{value:g})}}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}return this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class my extends am{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",s=>{this._dispatchEventFromSandbox({},s)})),t}}class by extends wr{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,s=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");yr.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=Jh;let r=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",c=>{const f=this.data.defaultFieldValue;for(const g of i.options)g.selected=g.value===f});for(const c of this.data.options){const f=document.createElement("option");f.textContent=c.displayValue,f.value=c.exportValue,s.value.includes(c.exportValue)&&(f.setAttribute("selected",!0),r=!1),i.append(f)}let a=null;if(r){const c=document.createElement("option");c.value=" ",c.setAttribute("hidden",!0),c.setAttribute("selected",!0),i.prepend(c),a=()=>{c.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}const o=c=>{const f=c?"value":"textContent",{options:g,multiple:m}=i;return m?Array.prototype.filter.call(g,A=>A.selected).map(A=>A[f]):g.selectedIndex===-1?null:g[g.selectedIndex][f]};let l=o(!1);const h=c=>{const f=c.target.options;return Array.prototype.map.call(f,g=>({displayValue:g.textContent,exportValue:g.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",c=>{const f={value(g){a==null||a();const m=g.detail.value,A=new Set(Array.isArray(m)?m:[m]);for(const y of i.options)y.selected=A.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(g){i.multiple=!0},remove(g){const m=i.options,A=g.detail.remove;m[A].selected=!1,i.remove(A),m.length>0&&Array.prototype.findIndex.call(m,v=>v.selected)===-1&&(m[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},clear(g){for(;i.length!==0;)i.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(g){const{index:m,displayValue:A,exportValue:y}=g.detail.insert,v=i.children[m],w=document.createElement("option");w.textContent=A,w.value=y,v?v.before(w):i.append(w),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},items(g){const{items:m}=g.detail;for(;i.length!==0;)i.remove(0);for(const A of m){const{displayValue:y,exportValue:v}=A,w=document.createElement("option");w.textContent=y,w.value=v,i.append(w)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},indices(g){const m=new Set(g.detail.indices);for(const A of g.target.options)A.selected=m.has(A.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(g){g.target.disabled=!g.detail.editable}};this._dispatchEventFromSandbox(f,c)}),i.addEventListener("input",c=>{var m;const f=o(!0),g=o(!1);t.setValue(e,{value:f}),c.preventDefault(),(m=this.linkService.eventBus)==null||m.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:g,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],c=>c.target.value)):i.addEventListener("input",function(c){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class If extends At{constructor(t){const{data:e,elements:s}=t;super(t,{isRenderable:At._hasPopupData(e)}),this.elements=s,this.popup=null}render(){this.container.classList.add("popupAnnotation");const t=this.popup=new Ay({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),e=[];for(const s of this.elements)s.popup=t,s.container.ariaHasPopup="dialog",e.push(s.data.id),s.addHighlightArea();return this.container.setAttribute("aria-controls",e.map(s=>`${dp}${s}`).join(",")),this.container}}var Sa,Bd,Hd,Ea,$n,gt,$s,Ca,Ql,Jl,xa,Gs,$e,Vs,Zl,Us,th,Gn,Vn,Ta,yc,eh,Df,zd,cm,$d,dm,Gd,um,Vd,fm,Pa,wc,Ra,vc,sh,Ff;class Ay{constructor({container:t,color:e,elements:s,titleObj:i,modificationDate:r,contentsObj:a,richText:o,parent:l,rect:h,parentRect:c,open:f}){u(this,Ta);u(this,eh);u(this,zd);u(this,$d);u(this,Gd);u(this,Vd);u(this,Pa);u(this,Ra);u(this,sh);u(this,Sa,b(this,Gd,um).bind(this));u(this,Bd,b(this,sh,Ff).bind(this));u(this,Hd,b(this,Ra,vc).bind(this));u(this,Ea,b(this,Pa,wc).bind(this));u(this,$n,null);u(this,gt,null);u(this,$s,null);u(this,Ca,null);u(this,Ql,null);u(this,Jl,null);u(this,xa,null);u(this,Gs,!1);u(this,$e,null);u(this,Vs,null);u(this,Zl,null);u(this,Us,null);u(this,th,null);u(this,Gn,null);u(this,Vn,!1);var g;p(this,gt,t),p(this,th,i),p(this,$s,a),p(this,Us,o),p(this,Jl,l),p(this,$n,e),p(this,Zl,h),p(this,xa,c),p(this,Ql,s),p(this,Ca,pp.toDateObject(r)),this.trigger=s.flatMap(m=>m.getElementsToTriggerPopup());for(const m of this.trigger)m.addEventListener("click",n(this,Ea)),m.addEventListener("mouseenter",n(this,Hd)),m.addEventListener("mouseleave",n(this,Bd)),m.classList.add("popupTriggerArea");for(const m of s)(g=m.container)==null||g.addEventListener("keydown",n(this,Sa));n(this,gt).hidden=!0,f&&b(this,Pa,wc).call(this)}render(){if(n(this,$e))return;const t=p(this,$e,document.createElement("div"));if(t.className="popup",n(this,$n)){const r=t.style.outlineColor=F.makeHexColor(...n(this,$n));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?t.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`:t.style.backgroundColor=F.makeHexColor(...n(this,$n).map(o=>Math.floor(.7*(255-o)+o)))}const e=document.createElement("span");e.className="header";const s=document.createElement("h1");if(e.append(s),{dir:s.dir,str:s.textContent}=n(this,th),t.append(e),n(this,Ca)){const r=document.createElement("span");r.classList.add("popupDate"),r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:n(this,Ca).valueOf()})),e.append(r)}const i=n(this,Ta,yc);if(i)rm.render({xfaHtml:i,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const r=this._formatContents(n(this,$s));t.append(r)}n(this,gt).append(t)}_formatContents({str:t,dir:e}){const s=document.createElement("p");s.classList.add("popupContent"),s.dir=e;const i=t.split(/(?:\r\n?|\n)/);for(let r=0,a=i.length;r=0&&a.setAttribute("stroke-width",s||1),i)for(let o=0,l=n(this,Un).length;o{a.key==="Enter"&&(r?a.metaKey:a.ctrlKey)&&b(this,ch,Of).call(this)}),!s.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return n(this,hh)}addHighlightArea(){this.container.classList.add("highlightArea")}}hh=new WeakMap,ch=new WeakSet,Of=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};var dh,jn,Wn,uh,Ud,Am,fh,Bf;class Py{constructor({div:t,accessibilityManager:e,annotationCanvasMap:s,annotationEditorUIManager:i,page:r,viewport:a,structTreeLayer:o}){u(this,Ud);u(this,fh);u(this,dh,null);u(this,jn,null);u(this,Wn,new Map);u(this,uh,null);this.div=t,p(this,dh,e),p(this,jn,s),p(this,uh,o||null),this.page=r,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return n(this,Wn).size>0}render(t){return I(this,null,function*(){var a;const{annotations:e}=t,s=this.div;br(s,this.viewport);const i=new Map,r={data:null,layer:s,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new Ap,annotationStorage:t.annotationStorage||new mp,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of e){if(o.noHTML)continue;const l=o.annotationType===vt.POPUP;if(l){const f=i.get(o.id);if(!f)continue;r.elements=f}else{const{width:f,height:g}=zi(o.rect);if(f<=0||g<=0)continue}r.data=o;const h=dy.create(r);if(!h.isRenderable)continue;if(!l&&o.popupRef){const f=i.get(o.popupRef);f?f.push(h):i.set(o.popupRef,[h])}const c=h.render();o.hidden&&(c.style.visibility="hidden"),yield b(this,Ud,Am).call(this,c,o.id),h._isEditable&&(n(this,Wn).set(h.data.id,h),(a=this._annotationEditorUIManager)==null||a.renderAnnotationElement(h))}b(this,fh,Bf).call(this)})}update({viewport:t}){const e=this.div;this.viewport=t,br(e,{rotation:t.rotation}),b(this,fh,Bf).call(this),e.hidden=!1}getEditableAnnotations(){return Array.from(n(this,Wn).values())}getEditableAnnotation(t){return n(this,Wn).get(t)}}dh=new WeakMap,jn=new WeakMap,Wn=new WeakMap,uh=new WeakMap,Ud=new WeakSet,Am=function(t,e){return I(this,null,function*(){var a,o;const s=t.firstChild||t,i=s.id=`${dp}${e}`,r=yield(a=n(this,uh))==null?void 0:a.getAriaAttributes(i);if(r)for(const[l,h]of r)s.setAttribute(l,h);this.div.append(t),(o=n(this,dh))==null||o.moveElementInDOM(this.div,t,s,!1)})},fh=new WeakSet,Bf=function(){if(!n(this,jn))return;const t=this.div;for(const[e,s]of n(this,jn)){const i=t.querySelector(`[data-annotation-id="${e}"]`);if(!i)continue;s.className="annotationContent";const{firstChild:r}=i;r?r.nodeName==="CANVAS"?r.replaceWith(s):r.classList.contains("annotationContent")?r.after(s):r.before(s):i.append(s)}n(this,jn).clear()};const ic=/\r\n?|\n/g;var Ge,pe,ph,Xn,ge,jd,ym,Wd,wm,Xd,vm,ka,_c,Ma,Sc,La,Ec,qd,_m,gh,zf,Yd,Sm;const et=class et extends ut{constructor(e){super(_r(ws({},e),{name:"freeTextEditor"}));u(this,jd);u(this,Wd);u(this,Xd);u(this,ka);u(this,La);u(this,qd);u(this,Yd);u(this,Ge,void 0);u(this,pe,"");u(this,ph,`${this.id}-editor`);u(this,Xn,null);u(this,ge,void 0);p(this,Ge,e.color||et._defaultColor||ut._defaultLineColor),p(this,ge,e.fontSize||et._defaultFontSize)}static get _keyboardManager(){const e=et.prototype,s=a=>a.isEmpty(),i=Ar.TRANSLATE_SMALL,r=Ar.TRANSLATE_BIG;return X(this,"_keyboardManager",new Qh([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:s}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:s}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:s}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:s}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:s}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:s}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:s}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:s}]]))}static initialize(e,s){ut.initialize(e,s);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,s){switch(e){case K.FREETEXT_SIZE:et._defaultFontSize=s;break;case K.FREETEXT_COLOR:et._defaultColor=s;break}}updateParams(e,s){switch(e){case K.FREETEXT_SIZE:b(this,jd,ym).call(this,s);break;case K.FREETEXT_COLOR:b(this,Wd,wm).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[K.FREETEXT_SIZE,et._defaultFontSize],[K.FREETEXT_COLOR,et._defaultColor||ut._defaultLineColor]]}get propertiesToUpdate(){return[[K.FREETEXT_SIZE,n(this,ge)],[K.FREETEXT_COLOR,n(this,Ge)]]}_translateEmpty(e,s){this._uiManager.translateSelectedEditors(e,s,!0)}getInitialTranslation(){const e=this.parentScale;return[-et._internalPadding*e,-(et._internalPadding+n(this,ge))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(G.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),p(this,Xn,new AbortController);const e=this._uiManager.combinedSignal(n(this,Xn));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){var e;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",n(this,ph)),this._isDraggable=!0,(e=n(this,Xn))==null||e.abort(),p(this,Xn,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){var s;this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),(s=this._initialOptions)!=null&&s.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=n(this,pe),s=p(this,pe,b(this,Xd,vm).call(this).trimEnd());if(e===s)return;const i=r=>{if(p(this,pe,r),!r){this.remove();return}b(this,La,Ec).call(this),this._uiManager.rebuild(this),b(this,ka,_c).call(this)};this.addCommands({cmd:()=>{i(s)},undo:()=>{i(e)},mustExec:!1}),b(this,ka,_c).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){et._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,s;this.width&&(e=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",n(this,ph)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${n(this,ge)}px * var(--scale-factor))`,i.color=n(this,Ge),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),Nc(this,this.div,["dblclick","keydown"]),this.width){const[r,a]=this.parentDimensions;if(this.annotationElementId){const{position:o}=this._initialData;let[l,h]=this.getInitialTranslation();[l,h]=this.pageTranslationToScreen(l,h);const[c,f]=this.pageDimensions,[g,m]=this.pageTranslation;let A,y;switch(this.rotation){case 0:A=e+(o[0]-g)/c,y=s+this.height-(o[1]-m)/f;break;case 90:A=e+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[h,-l];break;case 180:A=e-this.width+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[-l,-h];break;case 270:A=e+(o[0]-g-this.height*f)/c,y=s+(o[1]-m-this.width*c)/f,[l,h]=[-h,l];break}this.setAt(A*r,y*a,l,h)}else this.setAt(e*r,s*a,this.width*r,this.height*a);b(this,La,Ec).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var A,y,v;const s=e.clipboardData||window.clipboardData,{types:i}=s;if(i.length===1&&i[0]==="text/plain")return;e.preventDefault();const r=b(A=et,gh,zf).call(A,s.getData("text")||"").replaceAll(ic,` -`);if(!r)return;const a=window.getSelection();if(!a.rangeCount)return;this.editorDiv.normalize(),a.deleteFromDocument();const o=a.getRangeAt(0);if(!r.includes(` -`)){o.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),a.collapseToStart();return}const{startContainer:l,startOffset:h}=o,c=[],f=[];if(l.nodeType===Node.TEXT_NODE){const w=l.parentElement;if(f.push(l.nodeValue.slice(h).replaceAll(ic,"")),w!==this.editorDiv){let _=c;for(const E of this.editorDiv.childNodes){if(E===w){_=f;continue}_.push(b(y=et,Ma,Sc).call(y,E))}}c.push(l.nodeValue.slice(0,h).replaceAll(ic,""))}else if(l===this.editorDiv){let w=c,_=0;for(const E of this.editorDiv.childNodes)_++===h&&(w=f),w.push(b(v=et,Ma,Sc).call(v,E))}p(this,pe,`${c.join(` -`)}${r}${f.join(` -`)}`),b(this,La,Ec).call(this);const g=new Range;let m=c.reduce((w,_)=>w+_.length,0);for(const{firstChild:w}of this.editorDiv.childNodes)if(w.nodeType===Node.TEXT_NODE){const _=w.nodeValue.length;if(m<=_){g.setStart(w,m),g.setEnd(w,m);break}m-=_}a.removeAllRanges(),a.addRange(g)}get contentDiv(){return this.editorDiv}static deserialize(e,s,i){return I(this,null,function*(){var o;let r=null;if(e instanceof pm){const{data:{defaultAppearanceData:{fontSize:l,fontColor:h},rect:c,rotation:f,id:g,popupRef:m},textContent:A,textPosition:y,parent:{page:{pageNumber:v}}}=e;if(!A||A.length===0)return null;r=e={annotationType:G.FREETEXT,color:Array.from(h),fontSize:l,value:A.join(` -`),position:y,pageIndex:v-1,rect:c.slice(0),rotation:f,id:g,deleted:!1,popupRef:m}}const a=yield ji(et,this,"deserialize").call(this,e,s,i);return p(a,ge,e.fontSize),p(a,Ge,F.makeHexColor(...e.color)),p(a,pe,b(o=et,gh,zf).call(o,e.value)),a.annotationElementId=e.id||null,a._initialData=r,a})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const s=et._internalPadding*this.parentScale,i=this.getRect(s,s),r=ut._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:n(this,Ge)),a={annotationType:G.FREETEXT,color:r,fontSize:n(this,ge),value:b(this,qd,_m).call(this),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?a:this.annotationElementId&&!b(this,Yd,Sm).call(this,a)?null:(a.id=this.annotationElementId,a)}renderAnnotationElement(e){const s=super.renderAnnotationElement(e);if(this.deleted)return s;const{style:i}=s;i.fontSize=`calc(${n(this,ge)}px * var(--scale-factor))`,i.color=n(this,Ge),s.replaceChildren();for(const a of n(this,pe).split(` -`)){const o=document.createElement("div");o.append(a?document.createTextNode(a):document.createElement("br")),s.append(o)}const r=et._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(r,r),popupContent:n(this,pe)}),s}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};Ge=new WeakMap,pe=new WeakMap,ph=new WeakMap,Xn=new WeakMap,ge=new WeakMap,jd=new WeakSet,ym=function(e){const s=r=>{this.editorDiv.style.fontSize=`calc(${r}px * var(--scale-factor))`,this.translate(0,-(r-n(this,ge))*this.parentScale),p(this,ge,r),b(this,ka,_c).call(this)},i=n(this,ge);this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:K.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},Wd=new WeakSet,wm=function(e){const s=r=>{p(this,Ge,this.editorDiv.style.color=r)},i=n(this,Ge);this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:K.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Xd=new WeakSet,vm=function(){var i;const e=[];this.editorDiv.normalize();let s=null;for(const r of this.editorDiv.childNodes)(s==null?void 0:s.nodeType)===Node.TEXT_NODE&&r.nodeName==="BR"||(e.push(b(i=et,Ma,Sc).call(i,r)),s=r);return e.join(` -`)},ka=new WeakSet,_c=function(){const[e,s]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:r,div:a}=this,o=a.style.display,l=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",r.div.append(this.div),i=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",l)}this.rotation%180===this.parentRotation%180?(this.width=i.width/e,this.height=i.height/s):(this.width=i.height/e,this.height=i.width/s),this.fixAndSetPosition()},Ma=new WeakSet,Sc=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(ic,"")},La=new WeakSet,Ec=function(){if(this.editorDiv.replaceChildren(),!!n(this,pe))for(const e of n(this,pe).split(` -`)){const s=document.createElement("div");s.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(s)}},qd=new WeakSet,_m=function(){return n(this,pe).replaceAll(" "," ")},gh=new WeakSet,zf=function(e){return e.replaceAll(" "," ")},Yd=new WeakSet,Sm=function(e){const{value:s,fontSize:i,color:r,pageIndex:a}=this._initialData;return this._hasBeenMoved||e.value!==s||e.fontSize!==i||e.color.some((o,l)=>o!==r[l])||e.pageIndex!==a},u(et,Ma),u(et,gh),O(et,"_freeTextDefaultContent",""),O(et,"_internalPadding",0),O(et,"_defaultColor",null),O(et,"_defaultFontSize",10),O(et,"_type","freetext"),O(et,"_editorType",G.FREETEXT);let Hf=et;class L{toSVGPath(){it("Abstract method `toSVGPath` must be implemented.")}get box(){it("Abstract getter `box` must be implemented.")}serialize(t,e){it("Abstract method `serialize` must be implemented.")}static _rescale(t,e,s,i,r,a){a||(a=new Float32Array(t.length));for(let o=0,l=t.length;o=6;i-=6)isNaN(e[i])?s.push(`L${e[i+4]} ${e[i+5]}`):s.push(`C${e[i]} ${e[i+1]} ${e[i+2]} ${e[i+3]} ${e[i+4]} ${e[i+5]}`);return b(this,Zd,Cm).call(this,s),s.join(" ")}newFreeDrawOutline(t,e,s,i,r,a){return new km(t,e,s,i,r,a)}getOutlines(){var f,g;const t=n(this,ds),e=n(this,Ve),s=n(this,W),[i,r,a,o]=n(this,me),l=new Float32Array(((g=(f=n(this,Ti))==null?void 0:f.length)!=null?g:0)+2);for(let m=0,A=l.length-2;m=6;m-=6)for(let A=0;A<6;A+=2){if(isNaN(e[m+A])){h[c]=h[c+1]=NaN,c+=2;continue}h[c]=e[m+A],h[c+1]=e[m+A+1],c+=2}return b(this,su,Pm).call(this,h,c),this.newFreeDrawOutline(h,l,n(this,me),n(this,Fa),n(this,Ia),n(this,Da))}};me=new WeakMap,Ve=new WeakMap,Ia=new WeakMap,Da=new WeakMap,ds=new WeakMap,W=new WeakMap,qn=new WeakMap,Yn=new WeakMap,mh=new WeakMap,bh=new WeakMap,Fa=new WeakMap,Na=new WeakMap,Ti=new WeakMap,Ah=new WeakMap,Kd=new WeakMap,Qd=new WeakMap,Kn=new WeakSet,Po=function(){const t=n(this,W).subarray(4,6),e=n(this,W).subarray(16,18),[s,i,r,a]=n(this,me);return[(n(this,qn)+(t[0]-e[0])/2-s)/r,(n(this,Yn)+(t[1]-e[1])/2-i)/a,(n(this,qn)+(e[0]-t[0])/2-s)/r,(n(this,Yn)+(e[1]-t[1])/2-i)/a]},Jd=new WeakSet,Em=function(){const[t,e,s,i]=n(this,me),[r,a,o,l]=b(this,Kn,Po).call(this);return`M${(n(this,W)[2]-t)/s} ${(n(this,W)[3]-e)/i} L${(n(this,W)[4]-t)/s} ${(n(this,W)[5]-e)/i} L${r} ${a} L${o} ${l} L${(n(this,W)[16]-t)/s} ${(n(this,W)[17]-e)/i} L${(n(this,W)[14]-t)/s} ${(n(this,W)[15]-e)/i} Z`},Zd=new WeakSet,Cm=function(t){const e=n(this,Ve);t.push(`L${e[4]} ${e[5]} Z`)},tu=new WeakSet,xm=function(t){const[e,s,i,r]=n(this,me),a=n(this,W).subarray(4,6),o=n(this,W).subarray(16,18),[l,h,c,f]=b(this,Kn,Po).call(this);t.push(`L${(a[0]-e)/i} ${(a[1]-s)/r} L${l} ${h} L${c} ${f} L${(o[0]-e)/i} ${(o[1]-s)/r}`)},eu=new WeakSet,Tm=function(t){const e=n(this,W),[s,i,r,a]=n(this,me),[o,l,h,c]=b(this,Kn,Po).call(this),f=new Float32Array(36);return f.set([NaN,NaN,NaN,NaN,(e[2]-s)/r,(e[3]-i)/a,NaN,NaN,NaN,NaN,(e[4]-s)/r,(e[5]-i)/a,NaN,NaN,NaN,NaN,o,l,NaN,NaN,NaN,NaN,h,c,NaN,NaN,NaN,NaN,(e[16]-s)/r,(e[17]-i)/a,NaN,NaN,NaN,NaN,(e[14]-s)/r,(e[15]-i)/a],0),this.newFreeDrawOutline(f,t,n(this,me),n(this,Fa),n(this,Ia),n(this,Da))},su=new WeakSet,Pm=function(t,e){const s=n(this,Ve);return t.set([NaN,NaN,NaN,NaN,s[4],s[5]],e),e+=6},iu=new WeakSet,Rm=function(t,e){const s=n(this,W).subarray(4,6),i=n(this,W).subarray(16,18),[r,a,o,l]=n(this,me),[h,c,f,g]=b(this,Kn,Po).call(this);return t.set([NaN,NaN,NaN,NaN,(s[0]-r)/o,(s[1]-a)/l,NaN,NaN,NaN,NaN,h,c,NaN,NaN,NaN,NaN,f,g,NaN,NaN,NaN,NaN,(i[0]-r)/o,(i[1]-a)/l],e),e+=24},u(Cs,Ah,8),u(Cs,Kd,2),u(Cs,Qd,n(Cs,Ah)+n(Cs,Kd));let Hc=Cs;var Oa,Qn,js,yh,be,wh,bt,nu,Mm;class km extends L{constructor(e,s,i,r,a,o){super();u(this,nu);u(this,Oa,void 0);u(this,Qn,new Float32Array(4));u(this,js,void 0);u(this,yh,void 0);u(this,be,void 0);u(this,wh,void 0);u(this,bt,void 0);p(this,bt,e),p(this,be,s),p(this,Oa,i),p(this,wh,r),p(this,js,a),p(this,yh,o),this.lastPoint=[NaN,NaN],b(this,nu,Mm).call(this,o);const[l,h,c,f]=n(this,Qn);for(let g=0,m=e.length;ge[0]-s[0]||e[1]-s[1]||e[2]-s[2]);const t=[];for(const e of n(this,Pi))e[3]?(t.push(...b(this,Sh,Gf).call(this,e)),b(this,au,Im).call(this,e)):(b(this,ou,Dm).call(this,e),t.push(...b(this,Sh,Gf).call(this,e)));return b(this,ru,Lm).call(this,t)}}vh=new WeakMap,_h=new WeakMap,Pi=new WeakMap,Ue=new WeakMap,ru=new WeakSet,Lm=function(t){const e=[],s=new Set;for(const a of t){const[o,l,h]=a;e.push([o,l,a],[o,h,a])}e.sort((a,o)=>a[1]-o[1]||a[0]-o[0]);for(let a=0,o=e.length;a0;){const a=s.values().next().value;let[o,l,h,c,f]=a;s.delete(a);let g=o,m=l;for(r=[o,h],i.push(r);;){let A;if(s.has(c))A=c;else if(s.has(f))A=f;else break;s.delete(A),[o,l,h,c,f]=A,g!==o&&(r.push(g,m,o,m===l?l:h),g=o),m=m===l?h:l}r.push(g,m)}return new Ry(i,n(this,vh),n(this,_h))},Ba=new WeakSet,Cc=function(t){const e=n(this,Ue);let s=0,i=e.length-1;for(;s<=i;){const r=s+i>>1,a=e[r][0];if(a===t)return r;a=0;i--){const[r,a]=n(this,Ue)[i];if(r!==t)break;if(r===t&&a===e){n(this,Ue).splice(i,1);return}}},Sh=new WeakSet,Gf=function(t){const[e,s,i]=t,r=[[e,s,i]],a=b(this,Ba,Cc).call(this,i);for(let o=0;o=l){if(m>h)r[c][1]=h;else{if(f===1)return[];r.splice(c,1),c--,f--}continue}r[c][2]=l,m>h&&r.push([e,h,m])}}}return r};var Eh,Ha;class Ry extends L{constructor(e,s,i){super();u(this,Eh,void 0);u(this,Ha,void 0);p(this,Ha,e),p(this,Eh,s),this.lastPoint=i}toSVGPath(){const e=[];for(const s of n(this,Ha)){let[i,r]=s;e.push(`M${i} ${r}`);for(let a=2;a-1?(p(this,Nt,!0),b(this,Xa,xc).call(this,e),b(this,Ys,Yi).call(this)):n(this,Xs)&&(p(this,Va,e.anchorNode),p(this,Lh,e.anchorOffset),p(this,Ih,e.focusNode),p(this,Dh,e.focusOffset),b(this,Nh,Xf).call(this),b(this,Ys,Yi).call(this),this.rotate(this.rotation))}static get _keyboardManager(){const e=Y.prototype;return X(this,"_keyboardManager",new Qh([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:n(this,Nt)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:n(this,ke),methodOfCreation:n(this,Fh)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}static initialize(e,s){var i;ut.initialize(e,s),Y._defaultColor||(Y._defaultColor=((i=s.highlightColors)==null?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(e,s){switch(e){case K.HIGHLIGHT_DEFAULT_COLOR:Y._defaultColor=s;break;case K.HIGHLIGHT_THICKNESS:Y._defaultThickness=s;break}}translateInPage(e,s){}get toolbarPosition(){return n(this,ja)}updateParams(e,s){switch(e){case K.HIGHLIGHT_COLOR:b(this,hu,Nm).call(this,s);break;case K.HIGHLIGHT_THICKNESS:b(this,cu,Om).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[K.HIGHLIGHT_DEFAULT_COLOR,Y._defaultColor],[K.HIGHLIGHT_THICKNESS,Y._defaultThickness]]}get propertiesToUpdate(){return[[K.HIGHLIGHT_COLOR,this.color||Y._defaultColor],[K.HIGHLIGHT_THICKNESS,n(this,ke)||Y._defaultThickness],[K.HIGHLIGHT_FREE,n(this,Nt)]]}addEditToolbar(){return I(this,null,function*(){const e=yield ji(Y.prototype,this,"addEditToolbar").call(this);return e?(this._uiManager.highlightColors&&(p(this,Ua,new zc({editor:this})),e.addColorPicker(n(this,Ua))),e):null})}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(b(this,er,Ro).call(this))}getBaseTranslation(){return[0,0]}getRect(e,s){return super.getRect(e,s,b(this,er,Ro).call(this))}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){b(this,Oh,qf).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(b(this,Ys,Yi).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let s=!1;this.parent&&!e?b(this,Oh,qf).call(this):e&&(b(this,Ys,Yi).call(this,e),s=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),s&&this.select()}rotate(e){var r,a,o;const{drawLayer:s}=this.parent;let i;n(this,Nt)?(e=(e-this.rotation+360)%360,i=b(r=Y,ki,Pr).call(r,n(this,Re).box,e)):i=b(a=Y,ki,Pr).call(a,[this.x,this.y,this.width,this.height],e),s.updateProperties(n(this,Ae),{bbox:i,root:{"data-main-rotation":e}}),s.updateProperties(n(this,Ut),{bbox:b(o=Y,ki,Pr).call(o,n(this,ae).box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;const e=super.render();n(this,Wa)&&(e.setAttribute("aria-label",n(this,Wa)),e.setAttribute("role","mark")),n(this,Nt)?e.classList.add("free"):this.div.addEventListener("keydown",b(this,uu,Hm).bind(this),{signal:this._uiManager._signal});const s=p(this,tr,document.createElement("div"));e.append(s),s.setAttribute("aria-hidden","true"),s.className="internal",s.style.clipPath=n(this,Zn);const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),Nc(this,n(this,tr),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{hovered:!0}})}pointerleave(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{hovered:!1}})}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:b(this,qa,Tc).call(this,!0);break;case 1:case 3:b(this,qa,Tc).call(this,!1);break}}select(){var e;super.select(),n(this,Ut)&&((e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var e;super.unselect(),n(this,Ut)&&((e=this.parent)==null||e.drawLayer.updateProperties(n(this,Ut),{rootClass:{selected:!1}}),n(this,Nt)||b(this,qa,Tc).call(this,!1))}get _mustFixPosition(){return!n(this,Nt)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(n(this,Ae),{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(n(this,Ut),{rootClass:{hidden:!e}}))}static startHighlighting(e,s,{target:i,x:r,y:a}){const{x:o,y:l,width:h,height:c}=i.getBoundingClientRect(),f=new AbortController,g=e.combinedSignal(f),m=A=>{f.abort(),b(this,mu,Vm).call(this,e,A)};window.addEventListener("blur",m,{signal:g}),window.addEventListener("pointerup",m,{signal:g}),window.addEventListener("pointerdown",Se,{capture:!0,passive:!1,signal:g}),window.addEventListener("contextmenu",Ke,{signal:g}),i.addEventListener("pointermove",b(this,gu,Gm).bind(this,e),{signal:g}),this._freeHighlight=new Vf({x:r,y:a},[o,l,h,c],e.scale,this._defaultThickness/2,s,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static deserialize(e,s,i){return I(this,null,function*(){var y,v,w,_;let r=null;if(e instanceof mm){const{data:{quadPoints:E,rect:S,rotation:C,id:P,color:T,opacity:k,popupRef:N},parent:{page:{pageNumber:$}}}=e;r=e={annotationType:G.HIGHLIGHT,color:Array.from(T),opacity:k,quadPoints:E,boxes:null,pageIndex:$-1,rect:S.slice(0),rotation:C,id:P,deleted:!1,popupRef:N}}else if(e instanceof yp){const{data:{inkLists:E,rect:S,rotation:C,id:P,color:T,borderStyle:{rawWidth:k},popupRef:N},parent:{page:{pageNumber:$}}}=e;r=e={annotationType:G.HIGHLIGHT,color:Array.from(T),thickness:k,inkLists:E,boxes:null,pageIndex:$-1,rect:S.slice(0),rotation:C,id:P,deleted:!1,popupRef:N}}const{color:a,quadPoints:o,inkLists:l,opacity:h}=e,c=yield ji(Y,this,"deserialize").call(this,e,s,i);c.color=F.makeHexColor(...a),p(c,qs,h||1),l&&p(c,ke,e.thickness),c.annotationElementId=e.id||null,c._initialData=r;const[f,g]=c.pageDimensions,[m,A]=c.pageTranslation;if(o){const E=p(c,Xs,[]);for(let S=0;S=0)p(this,Ae,s),p(this,Zn,i),this.parent.drawLayer.finalizeDraw(s,{bbox:e.box,path:{d:e.toSVGPath()}}),p(this,Ut,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:n(this,ae).box,path:{d:n(this,ae).toSVGPath()}},!0));else if(this.parent){const m=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(n(this,Ae),{bbox:b(f=Y,ki,Pr).call(f,n(this,Re).box,(m-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(n(this,Ut),{bbox:b(g=Y,ki,Pr).call(g,n(this,ae).box,m),path:{d:n(this,ae).toSVGPath()}})}const[a,o,l,h]=e.box;switch(this.rotation){case 0:this.x=a,this.y=o,this.width=l,this.height=h;break;case 90:{const[m,A]=this.parentDimensions;this.x=o,this.y=1-a,this.width=l*A/m,this.height=h*m/A;break}case 180:this.x=1-a,this.y=1-o,this.width=l,this.height=h;break;case 270:{const[m,A]=this.parentDimensions;this.x=1-o,this.y=a,this.width=l*A/m,this.height=h*m/A;break}}const{lastPoint:c}=n(this,ae);p(this,ja,[(c[0]-a)/l,(c[1]-o)/h])},hu=new WeakSet,Nm=function(e){const s=(a,o)=>{var l,h;this.color=a,p(this,qs,o),(l=this.parent)==null||l.drawLayer.updateProperties(n(this,Ae),{root:{fill:a,"fill-opacity":o}}),(h=n(this,Ua))==null||h.updateColor(a)},i=this.color,r=n(this,qs);this.addCommands({cmd:s.bind(this,e,Y._defaultOpacity),undo:s.bind(this,i,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:K.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)},cu=new WeakSet,Om=function(e){const s=n(this,ke),i=r=>{p(this,ke,r),b(this,du,Bm).call(this,r)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:K.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},du=new WeakSet,Bm=function(e){if(!n(this,Nt))return;b(this,Xa,xc).call(this,{highlightOutlines:n(this,Re).getNewOutline(e/2)}),this.fixAndSetPosition();const[s,i]=this.parentDimensions;this.setDims(this.width*s,this.height*i)},Oh=new WeakSet,qf=function(){n(this,Ae)===null||!this.parent||(this.parent.drawLayer.remove(n(this,Ae)),p(this,Ae,null),this.parent.drawLayer.remove(n(this,Ut)),p(this,Ut,null))},Ys=new WeakSet,Yi=function(e=this.parent){n(this,Ae)===null&&({id:qt(this,Ae)._,clipPathId:qt(this,Zn)._}=e.drawLayer.draw({bbox:n(this,Re).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":n(this,qs)},rootClass:{highlight:!0,free:n(this,Nt)},path:{d:n(this,Re).toSVGPath()}},!1,!0),p(this,Ut,e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:n(this,Nt)},bbox:n(this,ae).box,path:{d:n(this,ae).toSVGPath()}},n(this,Nt))),n(this,tr)&&(n(this,tr).style.clipPath=n(this,Zn)))},ki=new WeakSet,Pr=function([e,s,i,r],a){switch(a){case 90:return[1-s-r,e,r,i];case 180:return[1-e-i,1-s-r,i,r];case 270:return[s,1-e-i,r,i]}return[e,s,i,r]},uu=new WeakSet,Hm=function(e){Y._keyboardManager.exec(this,e)},qa=new WeakSet,Tc=function(e){if(!n(this,Va))return;const s=window.getSelection();e?s.setPosition(n(this,Va),n(this,Lh)):s.setPosition(n(this,Ih),n(this,Dh))},er=new WeakSet,Ro=function(){return n(this,Nt)?this.rotation:0},fu=new WeakSet,zm=function(){if(n(this,Nt))return null;const[e,s]=this.pageDimensions,[i,r]=this.pageTranslation,a=n(this,Xs),o=new Float32Array(a.length*8);let l=0;for(const{x:h,y:c,width:f,height:g}of a){const m=h*e+i,A=(1-c)*s+r;o[l]=o[l+4]=m,o[l+1]=o[l+3]=A,o[l+2]=o[l+6]=m+f*e,o[l+5]=o[l+7]=A-g*s,l+=8}return o},pu=new WeakSet,$m=function(e){return n(this,Re).serialize(e,b(this,er,Ro).call(this))},gu=new WeakSet,Gm=function(e,s){this._freeHighlight.add(s)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},mu=new WeakSet,Vm=function(e,s){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(s,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},bu=new WeakSet,Um=function(e){const{color:s}=this._initialData;return e.color.some((i,r)=>i!==s[r])},u(Y,ki),u(Y,gu),u(Y,mu),O(Y,"_defaultColor",null),O(Y,"_defaultOpacity",1),O(Y,"_defaultThickness",12),O(Y,"_type","highlight"),O(Y,"_editorType",G.HIGHLIGHT),O(Y,"_freeHighlightId",-1),O(Y,"_freeHighlight",null),O(Y,"_freeHighlightClipId","");let $c=Y;var sr;class My{constructor(){u(this,sr,Object.create(null))}updateProperty(t,e){this[t]=e,this.updateSVGProperty(t,e)}updateProperties(t){if(t)for(const[e,s]of Object.entries(t))this.updateProperty(e,s)}updateSVGProperty(t,e){n(this,sr)[t]=e}toSVGProperties(){const t=n(this,sr);return p(this,sr,Object.create(null)),{root:t}}reset(){p(this,sr,Object.create(null))}updateAll(t=this){this.updateProperties(t)}clone(){it("Not implemented")}}sr=new WeakMap;var ye,Ya,Rt,ir,nr,Mi,Li,Ii,rr,Bh,Kf,Hh,Qf,zh,Jf,ar,ko,Au,jm,Ka,Pc,or,Mo,Di,Rr;const M=class M extends ut{constructor(e){super(e);u(this,Bh);u(this,Hh);u(this,zh);u(this,ar);u(this,Au);u(this,Ka);u(this,or);u(this,Di);u(this,ye,null);u(this,Ya,void 0);O(this,"_drawId",null);p(this,Ya,e.mustBeCommitted||!1),e.drawOutlines&&(b(this,Bh,Kf).call(this,e),b(this,ar,ko).call(this))}static _mergeSVGProperties(e,s){const i=new Set(Object.keys(e));for(const[r,a]of Object.entries(s))i.has(r)?Object.assign(e[r],a):e[r]=a;return e}static getDefaultDrawingOptions(e){it("Not implemented")}static get typesMap(){it("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,s){const i=this.typesMap.get(e);i&&this._defaultDrawingOptions.updateProperty(i,s),this._currentParent&&(n(M,Rt).updateProperty(i,s),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,s){const i=this.constructor.typesMap.get(e);i&&this._updateProperty(e,i,s)}static get defaultPropertiesToUpdate(){const e=[],s=this._defaultDrawingOptions;for(const[i,r]of this.typesMap)e.push([i,s[r]]);return e}get propertiesToUpdate(){const e=[],{_drawingOptions:s}=this;for(const[i,r]of this.constructor.typesMap)e.push([i,s[r]]);return e}_updateProperty(e,s,i){const r=this._drawingOptions,a=r[s],o=l=>{var c;r.updateProperty(s,l);const h=n(this,ye).updateProperty(s,l);h&&b(this,or,Mo).call(this,h),(c=this.parent)==null||c.drawLayer.updateProperties(this._drawId,r.toSVGProperties())};this.addCommands({cmd:o.bind(this,i),undo:o.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties(n(this,ye).getPathResizingSVGProperties(b(this,Ka,Pc).call(this)),{bbox:b(this,Di,Rr).call(this)}))}_onResized(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties(n(this,ye).getPathResizedSVGProperties(b(this,Ka,Pc).call(this)),{bbox:b(this,Di,Rr).call(this)}))}_onTranslating(e,s){var i;(i=this.parent)==null||i.drawLayer.updateProperties(this._drawId,{bbox:b(this,Di,Rr).call(this,e,s)})}_onTranslated(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties(n(this,ye).getPathTranslatedSVGProperties(b(this,Ka,Pc).call(this),this.parentDimensions),{bbox:b(this,Di,Rr).call(this)}))}_onStartDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,n(this,Ya)&&(p(this,Ya,!1),this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){b(this,zh,Jf).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(b(this,ar,ko).call(this),b(this,or,Mo).call(this,n(this,ye).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let s=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),b(this,zh,Jf).call(this)):e&&(this._uiManager.addShouldRescale(this),b(this,ar,ko).call(this,e),s=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),s&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,M._mergeSVGProperties({bbox:b(this,Di,Rr).call(this)},n(this,ye).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&b(this,or,Mo).call(this,n(this,ye).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;const e=super.render();e.classList.add("draw");const s=document.createElement("div");e.append(s),s.setAttribute("aria-hidden","true"),s.className="internal";const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),this._uiManager.addShouldRescale(this),this.disableEditing(),e}static createDrawerInstance(e,s,i,r,a){it("Not implemented")}static startDrawing(e,s,i,r){var v,w;const{target:a,offsetX:o,offsetY:l,pointerId:h,pointerType:c}=r;if(n(M,Li)&&n(M,Li)!==c)return;const{viewport:{rotation:f}}=e,{width:g,height:m}=a.getBoundingClientRect(),A=p(M,ir,new AbortController),y=e.combinedSignal(A);if(n(M,Mi)||p(M,Mi,h),(v=n(M,Li))!=null||p(M,Li,c),window.addEventListener("pointerup",_=>{var E;n(M,Mi)===_.pointerId?this._endDraw(_):(E=n(M,Ii))==null||E.delete(_.pointerId)},{signal:y}),window.addEventListener("pointercancel",_=>{var E;n(M,Mi)===_.pointerId?this._currentParent.endDrawingSession():(E=n(M,Ii))==null||E.delete(_.pointerId)},{signal:y}),window.addEventListener("pointerdown",_=>{n(M,Li)===_.pointerType&&((n(M,Ii)||p(M,Ii,new Set)).add(_.pointerId),n(M,Rt).isCancellable()&&(n(M,Rt).removeLastElement(),n(M,Rt).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:y}),window.addEventListener("contextmenu",Ke,{signal:y}),a.addEventListener("pointermove",this._drawMove.bind(this),{signal:y}),a.addEventListener("touchmove",_=>{_.timeStamp===n(M,rr)&&Se(_)},{signal:y}),e.toggleDrawing(),(w=s._editorUndoBar)==null||w.hide(),n(M,Rt)){e.drawLayer.updateProperties(this._currentDrawId,n(M,Rt).startNew(o,l,g,m,f));return}s.updateUIForDefaultProperties(this),p(M,Rt,this.createDrawerInstance(o,l,g,m,f)),p(M,nr,this.getDefaultDrawingOptions()),this._currentParent=e,{id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties(n(M,nr).toSVGProperties(),n(M,Rt).defaultSVGProperties),!0,!1)}static _drawMove(e){var a;if(p(M,rr,-1),!n(M,Rt))return;const{offsetX:s,offsetY:i,pointerId:r}=e;if(n(M,Mi)===r){if(((a=n(M,Ii))==null?void 0:a.size)>=1){this._endDraw(e);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,n(M,Rt).add(s,i)),p(M,rr,e.timeStamp),Se(e)}}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,p(M,Rt,null),p(M,nr,null),p(M,Li,null),p(M,rr,NaN)),n(M,ir)&&(n(M,ir).abort(),p(M,ir,null),p(M,Mi,NaN),p(M,Ii,null))}static _endDraw(e){const s=this._currentParent;if(s){if(s.toggleDrawing(!0),this._cleanup(!1),e&&s.drawLayer.updateProperties(this._currentDrawId,n(M,Rt).end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){const i=n(M,Rt),r=this._currentDrawId,a=i.getLastElement();s.addCommands({cmd:()=>{s.drawLayer.updateProperties(r,i.setLastElement(a))},undo:()=>{s.drawLayer.updateProperties(r,i.removeLastElement())},mustExec:!1,type:K.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(e){const s=this._currentParent;if(!s)return null;if(s.toggleDrawing(!0),s.cleanUndoStack(K.DRAW_STEP),!n(M,Rt).isEmpty()){const{pageDimensions:[i,r],scale:a}=s,o=s.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:n(M,Rt).getOutlines(i*a,r*a,a,this._INNER_MARGIN),drawingOptions:n(M,nr),mustBeCommitted:!e});return this._cleanup(!0),o}return s.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,s,i,r,a,o){it("Not implemented")}static deserialize(e,s,i){return I(this,null,function*(){var f,g;const{rawDims:{pageWidth:r,pageHeight:a,pageX:o,pageY:l}}=s.viewport,h=this.deserializeDraw(o,l,r,a,this._INNER_MARGIN,e),c=yield ji(M,this,"deserialize").call(this,e,s,i);return c.createDrawingOptions(e),b(f=c,Bh,Kf).call(f,{drawOutlines:h}),b(g=c,ar,ko).call(g),c.onScaleChanging(),c.rotate(),c})}serializeDraw(e){const[s,i]=this.pageTranslation,[r,a]=this.pageDimensions;return n(this,ye).serialize([s,i,r,a],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};ye=new WeakMap,Ya=new WeakMap,Rt=new WeakMap,ir=new WeakMap,nr=new WeakMap,Mi=new WeakMap,Li=new WeakMap,Ii=new WeakMap,rr=new WeakMap,Bh=new WeakSet,Kf=function({drawOutlines:e,drawId:s,drawingOptions:i}){p(this,ye,e),this._drawingOptions||(this._drawingOptions=i),s>=0?(this._drawId=s,this.parent.drawLayer.finalizeDraw(s,e.defaultProperties)):this._drawId=b(this,Hh,Qf).call(this,e,this.parent),b(this,or,Mo).call(this,e.box)},Hh=new WeakSet,Qf=function(e,s){const{id:i}=s.drawLayer.draw(M._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return i},zh=new WeakSet,Jf=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},ar=new WeakSet,ko=function(e=this.parent){if(!(this._drawId!==null&&this.parent===e)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,e.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=b(this,Hh,Qf).call(this,n(this,ye),e)}},Au=new WeakSet,jm=function([e,s,i,r]){const{parentDimensions:[a,o],rotation:l}=this;switch(l){case 90:return[s,1-e,i*(o/a),r*(a/o)];case 180:return[1-e,1-s,i,r];case 270:return[1-s,e,i*(o/a),r*(a/o)];default:return[e,s,i,r]}},Ka=new WeakSet,Pc=function(){const{x:e,y:s,width:i,height:r,parentDimensions:[a,o],rotation:l}=this;switch(l){case 90:return[1-s,e,i*(a/o),r*(o/a)];case 180:return[1-e,1-s,i,r];case 270:return[s,1-e,i*(a/o),r*(o/a)];default:return[e,s,i,r]}},or=new WeakSet,Mo=function(e){if([this.x,this.y,this.width,this.height]=b(this,Au,jm).call(this,e),this.div){this.fixAndSetPosition();const[s,i]=this.parentDimensions;this.setDims(this.width*s,this.height*i)}this._onResized()},Di=new WeakSet,Rr=function(){const{x:e,y:s,width:i,height:r,rotation:a,parentRotation:o,parentDimensions:[l,h]}=this;switch((a*4+o)/90){case 1:return[1-s-r,e,r,i];case 2:return[1-e-i,1-s-r,i,r];case 3:return[s,1-e-i,r,i];case 4:return[e,s-i*(l/h),r*(h/l),i*(l/h)];case 5:return[1-s,e,i*(l/h),r*(h/l)];case 6:return[1-e-r*(h/l),1-s,r*(h/l),i*(l/h)];case 7:return[s-i*(l/h),1-e-r*(h/l),i*(l/h),r*(h/l)];case 8:return[e-i,s-r,i,r];case 9:return[1-s,e-i,r,i];case 10:return[1-e,1-s,i,r];case 11:return[s-r,1-e,r,i];case 12:return[e-r*(h/l),s,r*(h/l),i*(l/h)];case 13:return[1-s-i*(l/h),e-r*(h/l),i*(l/h),r*(h/l)];case 14:return[1-e,1-s-i*(l/h),r*(h/l),i*(l/h)];case 15:return[s,1-e,i*(l/h),r*(h/l)];default:return[e,s,i,r]}},O(M,"_currentDrawId",-1),O(M,"_currentParent",null),u(M,Rt,null),u(M,ir,null),u(M,nr,null),u(M,Mi,NaN),u(M,Li,null),u(M,Ii,null),u(M,rr,NaN),O(M,"_INNER_MARGIN",3);let Yf=M;var fs,kt,Mt,lr,Qa,Qt,Ot,Me,hr,cr,dr,Ja,Rc;class Ly{constructor(t,e,s,i,r,a){u(this,Ja);u(this,fs,new Float64Array(6));u(this,kt,void 0);u(this,Mt,void 0);u(this,lr,void 0);u(this,Qa,void 0);u(this,Qt,void 0);u(this,Ot,"");u(this,Me,0);u(this,hr,new Gc);u(this,cr,void 0);u(this,dr,void 0);p(this,cr,s),p(this,dr,i),p(this,lr,r),p(this,Qa,a),[t,e]=b(this,Ja,Rc).call(this,t,e);const o=p(this,kt,[NaN,NaN,NaN,NaN,t,e]);p(this,Qt,[t,e]),p(this,Mt,[{line:o,points:n(this,Qt)}]),n(this,fs).set(o,0)}updateProperty(t,e){t==="stroke-width"&&p(this,Qa,e)}isEmpty(){return!n(this,Mt)||n(this,Mt).length===0}isCancellable(){return n(this,Qt).length<=10}add(t,e){[t,e]=b(this,Ja,Rc).call(this,t,e);const[s,i,r,a]=n(this,fs).subarray(2,6),o=t-r,l=e-a;return Math.hypot(n(this,cr)*o,n(this,dr)*l)<=2?null:(n(this,Qt).push(t,e),isNaN(s)?(n(this,fs).set([r,a,t,e],2),n(this,kt).push(NaN,NaN,NaN,NaN,t,e),{path:{d:this.toSVGPath()}}):(isNaN(n(this,fs)[0])&&n(this,kt).splice(6,6),n(this,fs).set([s,i,r,a,t,e],0),n(this,kt).push(...L.createBezierPoints(s,i,r,a,t,e)),{path:{d:this.toSVGPath()}}))}end(t,e){const s=this.add(t,e);return s||(n(this,Qt).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,e,s,i,r){p(this,cr,s),p(this,dr,i),p(this,lr,r),[t,e]=b(this,Ja,Rc).call(this,t,e);const a=p(this,kt,[NaN,NaN,NaN,NaN,t,e]);p(this,Qt,[t,e]);const o=n(this,Mt).at(-1);return o&&(o.line=new Float32Array(o.line),o.points=new Float32Array(o.points)),n(this,Mt).push({line:a,points:n(this,Qt)}),n(this,fs).set(a,0),p(this,Me,0),this.toSVGPath(),null}getLastElement(){return n(this,Mt).at(-1)}setLastElement(t){return n(this,Mt)?(n(this,Mt).push(t),p(this,kt,t.line),p(this,Qt,t.points),p(this,Me,0),{path:{d:this.toSVGPath()}}):n(this,hr).setLastElement(t)}removeLastElement(){if(!n(this,Mt))return n(this,hr).removeLastElement();n(this,Mt).pop(),p(this,Ot,"");for(let t=0,e=n(this,Mt).length;tS!=null?S:NaN),g,m,A,y),points:v(l[_].map(S=>S!=null?S:NaN),g,m,A,y)});const w=new Ep;return w.build(f,i,r,1,h,c,a),w}get box(){return n(this,Jt)}updateProperty(e,s){return e==="stroke-width"?b(this,vu,qm).call(this,s):null}updateParentDimensions([e,s],i){const[r,a]=b(this,Xe,Ss).call(this);p(this,ps,e),p(this,gs,s),p(this,Za,i);const[o,l]=b(this,Xe,Ss).call(this),h=o-r,c=l-a,f=n(this,Jt);return f[0]-=h,f[1]-=c,f[2]+=2*h,f[3]+=2*c,f}updateRotation(e){return p(this,$h,e),{path:{transform:this.rotationTransform}}}get viewBox(){return n(this,Jt).map(L.svgRound).join(" ")}get defaultProperties(){const[e,s]=n(this,Jt);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`}}}get rotationTransform(){const[,,e,s]=n(this,Jt);let i=0,r=0,a=0,o=0,l=0,h=0;switch(n(this,$h)){case 90:r=s/e,a=-e/s,l=e;break;case 180:i=-1,o=-1,l=e,h=s;break;case 270:r=-s/e,a=e/s,h=s;break;default:return""}return`matrix(${i} ${r} ${a} ${o} ${L.svgRound(l)} ${L.svgRound(h)})`}getPathResizingSVGProperties([e,s,i,r]){const[a,o]=b(this,Xe,Ss).call(this),[l,h,c,f]=n(this,Jt);if(Math.abs(c-a)<=L.PRECISION||Math.abs(f-o)<=L.PRECISION){const v=e+i/2-(l+c/2),w=s+r/2-(h+f/2);return{path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`,transform:`${this.rotationTransform} translate(${v} ${w})`}}}const g=(i-2*a)/(c-2*a),m=(r-2*o)/(f-2*o),A=c/i,y=f/r;return{path:{"transform-origin":`${L.svgRound(l)} ${L.svgRound(h)}`,transform:`${this.rotationTransform} scale(${A} ${y}) translate(${L.svgRound(a)} ${L.svgRound(o)}) scale(${g} ${m}) translate(${L.svgRound(-a)} ${L.svgRound(-o)})`}}}getPathResizedSVGProperties([e,s,i,r]){const[a,o]=b(this,Xe,Ss).call(this),l=n(this,Jt),[h,c,f,g]=l;if(l[0]=e,l[1]=s,l[2]=i,l[3]=r,Math.abs(f-a)<=L.PRECISION||Math.abs(g-o)<=L.PRECISION){const w=e+i/2-(h+f/2),_=s+r/2-(c+g/2);for(const{line:E,points:S}of n(this,we))L._translate(E,w,_,E),L._translate(S,w,_,S);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const m=(i-2*a)/(f-2*a),A=(r-2*o)/(g-2*o),y=-m*(h+a)+e+a,v=-A*(c+o)+s+o;if(m!==1||A!==1||y!==0||v!==0)for(const{line:w,points:_}of n(this,we))L._rescale(w,y,v,m,A,w),L._rescale(_,y,v,m,A,_);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,s],i){const[r,a]=i,o=n(this,Jt),l=e-o[0],h=s-o[1];if(n(this,ps)===r&&n(this,gs)===a)for(const{line:c,points:f}of n(this,we))L._translate(c,l,h,c),L._translate(f,l,h,f);else{const c=n(this,ps)/r,f=n(this,gs)/a;p(this,ps,r),p(this,gs,a);for(const{line:g,points:m}of n(this,we))L._rescale(g,l,h,c,f,g),L._rescale(m,l,h,c,f,m);o[2]*=c,o[3]*=f}return o[0]=e,o[1]=s,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${L.svgRound(e)} ${L.svgRound(s)}`}}}get defaultSVGProperties(){const e=n(this,Jt);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${L.svgRound(e[0])} ${L.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}};Jt=new WeakMap,$h=new WeakMap,Gh=new WeakMap,we=new WeakMap,ps=new WeakMap,gs=new WeakMap,Za=new WeakMap,to=new WeakMap,eo=new WeakMap,Xe=new WeakSet,Ss=function(e=n(this,eo)){const s=n(this,Gh)+e/2*n(this,Za);return n(this,to)%180===0?[s/n(this,ps),s/n(this,gs)]:[s/n(this,gs),s/n(this,ps)]},yu=new WeakSet,Wm=function(){const[e,s,i,r]=n(this,Jt),[a,o]=b(this,Xe,Ss).call(this,0);return[e+a,s+o,i-2*a,r-2*o]},wu=new WeakSet,Xm=function(){const e=p(this,Jt,new Float32Array([1/0,1/0,-1/0,-1/0]));for(const{line:r}of n(this,we)){if(r.length<=12){for(let l=4,h=r.length;lo!==s[l])||e.thickness!==i||e.opacity!==r||e.pageIndex!==a},O(Ji,"_type","ink"),O(Ji,"_editorType",G.INK),O(Ji,"_defaultDrawingOptions",null);let tp=Ji;var dt,Bt,Fi,Ks,Ni,io,ms,bs,ve,no,ur,Lo,fr,Io,ro,kc,Vh,sp,ao,Mc,Uh,ip,oo,Lc,Su,Km;const Lr=class Lr extends ut{constructor(e){super(_r(ws({},e),{name:"stampEditor"}));u(this,ur);u(this,fr);u(this,ro);u(this,Vh);u(this,ao);u(this,Uh);u(this,oo);u(this,Su);u(this,dt,null);u(this,Bt,null);u(this,Fi,null);u(this,Ks,null);u(this,Ni,null);u(this,io,"");u(this,ms,null);u(this,bs,null);u(this,ve,!1);u(this,no,!1);p(this,Ks,e.bitmapUrl),p(this,Ni,e.bitmapFile)}static initialize(e,s){ut.initialize(e,s)}static get supportedTypes(){return X(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(s=>`image/${s}`))}static get supportedTypesStr(){return X(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,s){s.pasteEditor(G.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var e;return{type:"stamp",hasAltText:!!((e=this.altTextData)!=null&&e.altText)}}static computeTelemetryFinalData(e){var i,r;const s=e.get("hasAltText");return{hasAltText:(i=s.get(!0))!=null?i:0,hasNoAltText:(r=s.get(!1))!=null?r:0}}mlGuessAltText(e=null,s=!0){return I(this,null,function*(){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!(yield i.isEnabledFor("altText")))throw new Error("ML isn't enabled for alt text.");const{data:r,width:a,height:o}=e||this.copyCanvas(null,null,!0).imageData,l=yield i.guess({name:"altText",request:{data:r,width:a,height:o,channels:r.length/(a*o)}});if(!l)throw new Error("No response from the AI service.");if(l.error)throw new Error("Error from the AI service.");if(l.cancel)return null;if(!l.output)throw new Error("No valid response from the AI service.");const h=l.output;return yield this.setGuessedAltText(h),s&&!this.hasAltTextData()&&(this.altTextData={alt:h,decorative:!1}),h})}remove(){var e;n(this,Bt)&&(p(this,dt,null),this._uiManager.imageManager.deleteId(n(this,Bt)),(e=n(this,ms))==null||e.remove(),p(this,ms,null),n(this,bs)&&(clearTimeout(n(this,bs)),p(this,bs,null))),super.remove()}rebuild(){if(!this.parent){n(this,Bt)&&b(this,ro,kc).call(this);return}super.rebuild(),this.div!==null&&(n(this,Bt)&&n(this,ms)===null&&b(this,ro,kc).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(n(this,Fi)||n(this,dt)||n(this,Ks)||n(this,Ni)||n(this,Bt))}get isResizable(){return!0}render(){if(this.div)return this.div;let e,s;if(this.width&&(e=this.x,s=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),n(this,dt)?b(this,Vh,sp).call(this):b(this,ro,kc).call(this),this.width&&!this.annotationElementId){const[i,r]=this.parentDimensions;this.setAt(e*i,s*r,this.width*i,this.height*r)}return this._uiManager.addShouldRescale(this),this.div}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;n(this,bs)!==null&&clearTimeout(n(this,bs)),p(this,bs,setTimeout(()=>{p(this,bs,null),b(this,Uh,ip).call(this)},200))}copyCanvas(e,s,i=!1){var m;e||(e=224);const{width:r,height:a}=n(this,dt),o=new Ju;let l=n(this,dt),h=r,c=a,f=null;if(s){if(r>s||a>s){const k=Math.min(s/r,s/a);h=Math.floor(r*k),c=Math.floor(a*k)}f=document.createElement("canvas");const A=f.width=Math.ceil(h*o.sx),y=f.height=Math.ceil(c*o.sy);n(this,ve)||(l=b(this,ao,Mc).call(this,A,y));const v=f.getContext("2d");v.filter=this._uiManager.hcmFilter;let w="white",_="#cfcfd8";this._uiManager.hcmFilter!=="none"?_="black":(m=window.matchMedia)!=null&&m.call(window,"(prefers-color-scheme: dark)").matches&&(w="#8f8f9d",_="#42414d");const E=15,S=E*o.sx,C=E*o.sy,P=new OffscreenCanvas(S*2,C*2),T=P.getContext("2d");T.fillStyle=w,T.fillRect(0,0,S*2,C*2),T.fillStyle=_,T.fillRect(0,0,S,C),T.fillRect(S,C,S,C),v.fillStyle=v.createPattern(P,"repeat"),v.fillRect(0,0,A,y),v.drawImage(l,0,0,l.width,l.height,0,0,A,y)}let g=null;if(i){let A,y;if(o.symmetric&&l.widthe||a>e){const _=Math.min(e/r,e/a);A=Math.floor(r*_),y=Math.floor(a*_),n(this,ve)||(l=b(this,ao,Mc).call(this,A,y))}const w=new OffscreenCanvas(A,y).getContext("2d",{willReadFrequently:!0});w.drawImage(l,0,0,l.width,l.height,0,0,A,y),g={width:A,height:y,data:w.getImageData(0,0,A,y).data}}return{canvas:f,width:h,height:c,imageData:g}}getImageForAltText(){return n(this,ms)}static deserialize(e,s,i){return I(this,null,function*(){var y;let r=null;if(e instanceof bm){const{data:{rect:v,rotation:w,id:_,structParent:E,popupRef:S},container:C,parent:{page:{pageNumber:P}}}=e,T=C.querySelector("canvas"),k=i.imageManager.getFromCanvas(C.id,T);T.remove();const N=((y=yield s._structTree.getAriaAttributes(`${dp}${_}`))==null?void 0:y.get("aria-label"))||"";r=e={annotationType:G.STAMP,bitmapId:k.id,bitmap:k.bitmap,pageIndex:P-1,rect:v.slice(0),rotation:w,id:_,deleted:!1,accessibilityData:{decorative:!1,altText:N},isSvg:!1,structParent:E,popupRef:S}}const a=yield ji(Lr,this,"deserialize").call(this,e,s,i),{rect:o,bitmap:l,bitmapUrl:h,bitmapId:c,isSvg:f,accessibilityData:g}=e;c&&i.imageManager.isValidId(c)?(p(a,Bt,c),l&&p(a,dt,l)):p(a,Ks,h),p(a,ve,f);const[m,A]=a.pageDimensions;return a.width=(o[2]-o[0])/m,a.height=(o[3]-o[1])/A,a.annotationElementId=e.id||null,g&&(a.altTextData=g),a._initialData=r,p(a,no,!!r),a})}serialize(e=!1,s=null){var l;if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i={annotationType:G.STAMP,bitmapId:n(this,Bt),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:n(this,ve),structTreeParentId:this._structTreeParentId};if(e)return i.bitmapUrl=b(this,oo,Lc).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i;const{decorative:r,altText:a}=this.serializeAltText(!1);if(!r&&a&&(i.accessibilityData={type:"Figure",alt:a}),this.annotationElementId){const h=b(this,Su,Km).call(this,i);if(h.isSame)return null;h.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=(l=this._initialData.structParent)!=null?l:-1}if(i.id=this.annotationElementId,s===null)return i;s.stamps||(s.stamps=new Map);const o=n(this,ve)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(!s.stamps.has(n(this,Bt)))s.stamps.set(n(this,Bt),{area:o,serialized:i}),i.bitmap=b(this,oo,Lc).call(this,!1);else if(n(this,ve)){const h=s.stamps.get(n(this,Bt));o>h.area&&(h.area=o,h.serialized.bitmap.close(),h.serialized.bitmap=b(this,oo,Lc).call(this,!1))}return i}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}};dt=new WeakMap,Bt=new WeakMap,Fi=new WeakMap,Ks=new WeakMap,Ni=new WeakMap,io=new WeakMap,ms=new WeakMap,bs=new WeakMap,ve=new WeakMap,no=new WeakMap,ur=new WeakSet,Lo=function(e,s=!1){if(!e){this.remove();return}p(this,dt,e.bitmap),s||(p(this,Bt,e.id),p(this,ve,e.isSvg)),e.file&&p(this,io,e.file.name),b(this,Vh,sp).call(this)},fr=new WeakSet,Io=function(){if(p(this,Fi,null),this._uiManager.enableWaiting(!1),!!n(this,ms)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&n(this,dt)){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&n(this,dt)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch(e){}}this.div.focus()}},ro=new WeakSet,kc=function(){if(n(this,Bt)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(n(this,Bt)).then(i=>b(this,ur,Lo).call(this,i,!0)).finally(()=>b(this,fr,Io).call(this));return}if(n(this,Ks)){const i=n(this,Ks);p(this,Ks,null),this._uiManager.enableWaiting(!0),p(this,Fi,this._uiManager.imageManager.getFromUrl(i).then(r=>b(this,ur,Lo).call(this,r)).finally(()=>b(this,fr,Io).call(this)));return}if(n(this,Ni)){const i=n(this,Ni);p(this,Ni,null),this._uiManager.enableWaiting(!0),p(this,Fi,this._uiManager.imageManager.getFromFile(i).then(r=>b(this,ur,Lo).call(this,r)).finally(()=>b(this,fr,Io).call(this)));return}const e=document.createElement("input");e.type="file",e.accept=Lr.supportedTypesStr;const s=this._uiManager._signal;p(this,Fi,new Promise(i=>{e.addEventListener("change",()=>I(this,null,function*(){if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const r=yield this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),b(this,ur,Lo).call(this,r)}i()}),{signal:s}),e.addEventListener("cancel",()=>{this.remove(),i()},{signal:s})}).finally(()=>b(this,fr,Io).call(this))),e.click()},Vh=new WeakSet,sp=function(){var f;const{div:e}=this;let{width:s,height:i}=n(this,dt);const[r,a]=this.pageDimensions,o=.75;if(this.width)s=this.width*r,i=this.height*a;else if(s>o*r||i>o*a){const g=Math.min(o*r/s,o*a/i);s*=g,i*=g}const[l,h]=this.parentDimensions;this.setDims(s*l/r,i*h/a),this._uiManager.enableWaiting(!1);const c=p(this,ms,document.createElement("canvas"));c.setAttribute("role","img"),this.addContainer(c),this.width=s/r,this.height=i/a,(f=this._initialOptions)!=null&&f.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),b(this,Uh,ip).call(this),n(this,no)||(this.parent.addUndoableEditor(this),p(this,no,!0)),this._reportTelemetry({action:"inserted_image"}),n(this,io)&&c.setAttribute("aria-label",n(this,io))},ao=new WeakSet,Mc=function(e,s){const{width:i,height:r}=n(this,dt);let a=i,o=r,l=n(this,dt);for(;a>2*e||o>2*s;){const h=a,c=o;a>2*e&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2)),o>2*s&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2));const f=new OffscreenCanvas(a,o);f.getContext("2d").drawImage(l,0,0,h,c,0,0,a,o),l=f.transferToImageBitmap()}return l},Uh=new WeakSet,ip=function(){const[e,s]=this.parentDimensions,{width:i,height:r}=this,a=new Ju,o=Math.ceil(i*e*a.sx),l=Math.ceil(r*s*a.sy),h=n(this,ms);if(!h||h.width===o&&h.height===l)return;h.width=o,h.height=l;const c=n(this,ve)?n(this,dt):b(this,ao,Mc).call(this,o,l),f=h.getContext("2d");f.filter=this._uiManager.hcmFilter,f.drawImage(c,0,0,c.width,c.height,0,0,o,l)},oo=new WeakSet,Lc=function(e){if(e){if(n(this,ve)){const r=this._uiManager.imageManager.getSvgUrl(n(this,Bt));if(r)return r}const s=document.createElement("canvas");return{width:s.width,height:s.height}=n(this,dt),s.getContext("2d").drawImage(n(this,dt),0,0),s.toDataURL()}if(n(this,ve)){const[s,i]=this.pageDimensions,r=Math.round(this.width*s*Gi.PDF_TO_CSS_UNITS),a=Math.round(this.height*i*Gi.PDF_TO_CSS_UNITS),o=new OffscreenCanvas(r,a);return o.getContext("2d").drawImage(n(this,dt),0,0,n(this,dt).width,n(this,dt).height,0,0,r,a),o.transferToImageBitmap()}return structuredClone(n(this,dt))},Su=new WeakSet,Km=function(e){var o;const{pageIndex:s,accessibilityData:{altText:i}}=this._initialData,r=e.pageIndex===s,a=(((o=e.accessibilityData)==null?void 0:o.alt)||"")===i;return{isSame:!this._hasBeenMoved&&!this._hasBeenResized&&r&&a,isSameAltText:a}},O(Lr,"_type","stamp"),O(Lr,"_editorType",G.STAMP);let ep=Lr;var pr,lo,As,Oi,Qs,Le,Bi,ho,gr,qe,Js,jt,Zs,D,Hi,Eu,Qm,Ie,ts,jh,rp,Wh,ap,co,Ic;const De=class De{constructor({uiManager:t,pageIndex:e,div:s,structTreeLayer:i,accessibilityManager:r,annotationLayer:a,drawLayer:o,textLayer:l,viewport:h,l10n:c}){u(this,Eu);u(this,Ie);u(this,jh);u(this,Wh);u(this,co);u(this,pr,void 0);u(this,lo,!1);u(this,As,null);u(this,Oi,null);u(this,Qs,null);u(this,Le,new Map);u(this,Bi,!1);u(this,ho,!1);u(this,gr,!1);u(this,qe,null);u(this,Js,null);u(this,jt,null);u(this,Zs,null);u(this,D,void 0);const f=[...n(De,Hi).values()];if(!De._initialized){De._initialized=!0;for(const g of f)g.initialize(c,t)}t.registerEditorTypes(f),p(this,D,t),this.pageIndex=e,this.div=s,p(this,pr,r),p(this,As,a),this.viewport=h,p(this,jt,l),this.drawLayer=o,this._structTree=i,n(this,D).addLayer(this)}get isEmpty(){return n(this,Le).size===0}get isInvisible(){return this.isEmpty&&n(this,D).getMode()===G.NONE}updateToolbar(t){n(this,D).updateToolbar(t)}updateMode(t=n(this,D).getMode()){switch(b(this,co,Ic).call(this),t){case G.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case G.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case G.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;for(const s of n(De,Hi).values())e.toggle(`${s._type}Editing`,t===s._editorType);this.div.hidden=!1}hasTextLayer(t){var e;return t===((e=n(this,jt))==null?void 0:e.div)}setEditingState(t){n(this,D).setEditingState(t)}addCommands(t){n(this,D).addCommands(t)}cleanUndoStack(t){n(this,D).cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){var e;(e=n(this,As))==null||e.div.classList.toggle("disabled",!t)}enable(){return I(this,null,function*(){p(this,gr,!0),this.div.tabIndex=0,this.togglePointerEvents(!0);const t=new Set;for(const s of n(this,Le).values())s.enableEditing(),s.show(!0),s.annotationElementId&&(n(this,D).removeChangedExistingAnnotation(s),t.add(s.annotationElementId));if(!n(this,As)){p(this,gr,!1);return}const e=n(this,As).getEditableAnnotations();for(const s of e){if(s.hide(),n(this,D).isDeletedAnnotationElement(s.data.id)||t.has(s.data.id))continue;const i=yield this.deserialize(s);i&&(this.addOrRebuild(i),i.enableEditing())}p(this,gr,!1)})}disable(){var i;p(this,ho,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const t=new Map,e=new Map;for(const r of n(this,Le).values())if(r.disableEditing(),!!r.annotationElementId){if(r.serialize()!==null){t.set(r.annotationElementId,r);continue}else e.set(r.annotationElementId,r);(i=this.getEditableAnnotation(r.annotationElementId))==null||i.show(),r.remove()}if(n(this,As)){const r=n(this,As).getEditableAnnotations();for(const a of r){const{id:o}=a.data;if(n(this,D).isDeletedAnnotationElement(o))continue;let l=e.get(o);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=t.get(o),l&&(n(this,D).addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}b(this,co,Ic).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:s}=this.div;for(const r of n(De,Hi).values())s.remove(`${r._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),p(this,ho,!1)}getEditableAnnotation(t){var e;return((e=n(this,As))==null?void 0:e.getEditableAnnotation(t))||null}setActiveEditor(t){n(this,D).getActive()!==t&&n(this,D).setActiveEditor(t)}enableTextSelection(){var t;if(this.div.tabIndex=-1,(t=n(this,jt))!=null&&t.div&&!n(this,Zs)){p(this,Zs,new AbortController);const e=n(this,D).combinedSignal(n(this,Zs));n(this,jt).div.addEventListener("pointerdown",b(this,Eu,Qm).bind(this),{signal:e}),n(this,jt).div.classList.add("highlighting")}}disableTextSelection(){var t;this.div.tabIndex=0,(t=n(this,jt))!=null&&t.div&&n(this,Zs)&&(n(this,Zs).abort(),p(this,Zs,null),n(this,jt).div.classList.remove("highlighting"))}enableClick(){if(n(this,Oi))return;p(this,Oi,new AbortController);const t=n(this,D).combinedSignal(n(this,Oi));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const e=this.pointerup.bind(this);this.div.addEventListener("pointerup",e,{signal:t}),this.div.addEventListener("pointercancel",e,{signal:t})}disableClick(){var t;(t=n(this,Oi))==null||t.abort(),p(this,Oi,null)}attach(t){n(this,Le).set(t.id,t);const{annotationElementId:e}=t;e&&n(this,D).isDeletedAnnotationElement(e)&&n(this,D).removeDeletedAnnotationElement(t)}detach(t){var e;n(this,Le).delete(t.id),(e=n(this,pr))==null||e.removePointerInTextLayer(t.contentDiv),!n(this,ho)&&t.annotationElementId&&n(this,D).addDeletedAnnotationElement(t)}remove(t){this.detach(t),n(this,D).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(n(this,D).addDeletedAnnotationElement(t.annotationElementId),ut.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),(e=t.parent)==null||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),n(this,D).addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!n(this,gr)),n(this,D).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){var s;if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&!n(this,Qs)&&(t._focusEventsAllowed=!1,p(this,Qs,setTimeout(()=>{p(this,Qs,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:n(this,D)._signal}),e.focus())},0))),t._structTreeParentId=(s=n(this,pr))==null?void 0:s.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const e=()=>t._uiManager.rebuild(t),s=()=>{t.remove()};this.addCommands({cmd:e,undo:s,mustExec:!1})}getNextId(){return n(this,D).getId()}combinedSignal(t){return n(this,D).combinedSignal(t)}canCreateNewEmptyEditor(){var t;return(t=n(this,Ie,ts))==null?void 0:t.canCreateNewEmptyEditor()}pasteEditor(t,e){n(this,D).updateToolbar(t),n(this,D).updateMode(t);const{offsetX:s,offsetY:i}=b(this,Wh,ap).call(this),r=this.getNextId(),a=b(this,jh,rp).call(this,ws({parent:this,id:r,x:s,y:i,uiManager:n(this,D),isCentered:!0},e));a&&this.add(a)}deserialize(t){return I(this,null,function*(){var e,s;return(yield(s=n(De,Hi).get((e=t.annotationType)!=null?e:t.annotationEditorType))==null?void 0:s.deserialize(t,this,n(this,D)))||null})}createAndAddNewEditor(t,e,s={}){const i=this.getNextId(),r=b(this,jh,rp).call(this,ws({parent:this,id:i,x:t.offsetX,y:t.offsetY,uiManager:n(this,D),isCentered:e},s));return r&&this.add(r),r}addNewEditor(){this.createAndAddNewEditor(b(this,Wh,ap).call(this),!0)}setSelected(t){n(this,D).setSelected(t)}toggleSelected(t){n(this,D).toggleSelected(t)}unselect(t){n(this,D).unselect(t)}pointerup(t){var s;const{isMac:e}=te.platform;if(!(t.button!==0||t.ctrlKey&&e)&&t.target===this.div&&n(this,Bi)&&(p(this,Bi,!1),!((s=n(this,Ie,ts))!=null&&s.isDrawer&&n(this,Ie,ts).supportMultipleDrawings))){if(!n(this,lo)){p(this,lo,!0);return}if(n(this,D).getMode()===G.STAMP){n(this,D).unselectAll();return}this.createAndAddNewEditor(t,!1)}}pointerdown(t){var i;if(n(this,D).getMode()===G.HIGHLIGHT&&this.enableTextSelection(),n(this,Bi)){p(this,Bi,!1);return}const{isMac:e}=te.platform;if(t.button!==0||t.ctrlKey&&e||t.target!==this.div)return;if(p(this,Bi,!0),(i=n(this,Ie,ts))!=null&&i.isDrawer){this.startDrawingSession(t);return}const s=n(this,D).getActive();p(this,lo,!s||s.isEmpty())}startDrawingSession(t){if(this.div.focus(),n(this,qe)){n(this,Ie,ts).startDrawing(this,n(this,D),!1,t);return}n(this,D).setCurrentDrawingSession(this),p(this,qe,new AbortController);const e=n(this,D).combinedSignal(n(this,qe));this.div.addEventListener("blur",({relatedTarget:s})=>{s&&!this.div.contains(s)&&(p(this,Js,null),this.commitOrRemove())},{signal:e}),n(this,Ie,ts).startDrawing(this,n(this,D),!1,t)}pause(t){if(t){const{activeElement:e}=document;this.div.contains(e)&&p(this,Js,e);return}n(this,Js)&&setTimeout(()=>{var e;(e=n(this,Js))==null||e.focus(),p(this,Js,null)},0)}endDrawingSession(t=!1){return n(this,qe)?(n(this,D).setCurrentDrawingSession(null),n(this,qe).abort(),p(this,qe,null),p(this,Js,null),n(this,Ie,ts).endDrawing(t)):null}findNewParent(t,e,s){const i=n(this,D).findParent(e,s);return i===null||i===this?!1:(i.changeParent(t),!0)}commitOrRemove(){return n(this,qe)?(this.endDrawingSession(),!0):!1}onScaleChanging(){n(this,qe)&&n(this,Ie,ts).onScaleChangingWhenDrawing(this)}destroy(){var t,e;this.commitOrRemove(),((t=n(this,D).getActive())==null?void 0:t.parent)===this&&(n(this,D).commitOrRemove(),n(this,D).setActiveEditor(null)),n(this,Qs)&&(clearTimeout(n(this,Qs)),p(this,Qs,null));for(const s of n(this,Le).values())(e=n(this,pr))==null||e.removePointerInTextLayer(s.contentDiv),s.setParent(null),s.isAttachedToDOM=!1,s.div.remove();this.div=null,n(this,Le).clear(),n(this,D).removeLayer(this)}render({viewport:t}){this.viewport=t,br(this.div,t);for(const e of n(this,D).getEditors(this.pageIndex))this.add(e),e.rebuild();this.updateMode()}update({viewport:t}){n(this,D).commitOrRemove(),b(this,co,Ic).call(this);const e=this.viewport.rotation,s=t.rotation;if(this.viewport=t,br(this.div,{rotation:s}),e!==s)for(const i of n(this,Le).values())i.rotate(s)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return n(this,D).viewParameters.realScale}};pr=new WeakMap,lo=new WeakMap,As=new WeakMap,Oi=new WeakMap,Qs=new WeakMap,Le=new WeakMap,Bi=new WeakMap,ho=new WeakMap,gr=new WeakMap,qe=new WeakMap,Js=new WeakMap,jt=new WeakMap,Zs=new WeakMap,D=new WeakMap,Hi=new WeakMap,Eu=new WeakSet,Qm=function(t){n(this,D).unselectAll();const{target:e}=t;if(e===n(this,jt).div||(e.getAttribute("role")==="img"||e.classList.contains("endOfContent"))&&n(this,jt).div.contains(e)){const{isMac:s}=te.platform;if(t.button!==0||t.ctrlKey&&s)return;n(this,D).showAllEditors("highlight",!0,!0),n(this,jt).div.classList.add("free"),this.toggleDrawing(),$c.startHighlighting(this,n(this,D).direction==="ltr",{target:n(this,jt).div,x:t.x,y:t.y}),n(this,jt).div.addEventListener("pointerup",()=>{n(this,jt).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:n(this,D)._signal}),t.preventDefault()}},Ie=new WeakSet,ts=function(){return n(De,Hi).get(n(this,D).getMode())},jh=new WeakSet,rp=function(t){const e=n(this,Ie,ts);return e?new e.prototype.constructor(t):null},Wh=new WeakSet,ap=function(){const{x:t,y:e,width:s,height:i}=this.div.getBoundingClientRect(),r=Math.max(0,t),a=Math.max(0,e),o=Math.min(window.innerWidth,t+s),l=Math.min(window.innerHeight,e+i),h=(r+o)/2-t,c=(a+l)/2-e,[f,g]=this.viewport.rotation%180===0?[h,c]:[c,h];return{offsetX:f,offsetY:g}},co=new WeakSet,Ic=function(){for(const t of n(this,Le).values())t.isEmpty()&&t.remove()},O(De,"_initialized",!1),u(De,Hi,new Map([Hf,tp,ep,$c].map(t=>[t._editorType,t])));let np=De;var Ye,Xh,Zt,mr,Cu,Jm,qh,lp,xu,Zm,Yh,hp;const $t=class $t{constructor({pageIndex:t}){u(this,qh);u(this,xu);u(this,Yh);u(this,Ye,null);u(this,Xh,0);u(this,Zt,new Map);u(this,mr,new Map);this.pageIndex=t}setParent(t){if(!n(this,Ye)){p(this,Ye,t);return}if(n(this,Ye)!==t){if(n(this,Zt).size>0)for(const e of n(this,Zt).values())e.remove(),t.append(e);p(this,Ye,t)}}static get _svgFactory(){return X(this,"_svgFactory",new Ap)}draw(t,e=!1,s=!1){const i=qt(this,Xh)._++,r=b(this,qh,lp).call(this),a=$t._svgFactory.createElement("defs");r.append(a);const o=$t._svgFactory.createElement("path");a.append(o);const l=`path_p${this.pageIndex}_${i}`;o.setAttribute("id",l),o.setAttribute("vector-effect","non-scaling-stroke"),e&&n(this,mr).set(i,o);const h=s?b(this,xu,Zm).call(this,a,l):null,c=$t._svgFactory.createElement("use");return r.append(c),c.setAttribute("href",`#${l}`),this.updateProperties(r,t),n(this,Zt).set(i,r),{id:i,clipPathId:`url(#${h})`}}drawOutline(t,e){const s=qt(this,Xh)._++,i=b(this,qh,lp).call(this),r=$t._svgFactory.createElement("defs");i.append(r);const a=$t._svgFactory.createElement("path");r.append(a);const o=`path_p${this.pageIndex}_${s}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke");let l;if(e){const f=$t._svgFactory.createElement("mask");r.append(f),l=`mask_p${this.pageIndex}_${s}`,f.setAttribute("id",l),f.setAttribute("maskUnits","objectBoundingBox");const g=$t._svgFactory.createElement("rect");f.append(g),g.setAttribute("width","1"),g.setAttribute("height","1"),g.setAttribute("fill","white");const m=$t._svgFactory.createElement("use");f.append(m),m.setAttribute("href",`#${o}`),m.setAttribute("stroke","none"),m.setAttribute("fill","black"),m.setAttribute("fill-rule","nonzero"),m.classList.add("mask")}const h=$t._svgFactory.createElement("use");i.append(h),h.setAttribute("href",`#${o}`),l&&h.setAttribute("mask",`url(#${l})`);const c=h.cloneNode();return i.append(c),h.classList.add("mainOutline"),c.classList.add("secondaryOutline"),this.updateProperties(i,t),n(this,Zt).set(s,i),s}finalizeDraw(t,e){n(this,mr).delete(t),this.updateProperties(t,e)}updateProperties(t,e){var l;if(!e)return;const{root:s,bbox:i,rootClass:r,path:a}=e,o=typeof t=="number"?n(this,Zt).get(t):t;if(o){if(s&&b(this,Yh,hp).call(this,o,s),i&&b(l=$t,Cu,Jm).call(l,o,i),r){const{classList:h}=o;for(const[c,f]of Object.entries(r))h.toggle(c,f)}if(a){const c=o.firstChild.firstChild;b(this,Yh,hp).call(this,c,a)}}}updateParent(t,e){if(e===this)return;const s=n(this,Zt).get(t);s&&(n(e,Ye).append(s),n(this,Zt).delete(t),n(e,Zt).set(t,s))}remove(t){n(this,mr).delete(t),n(this,Ye)!==null&&(n(this,Zt).get(t).remove(),n(this,Zt).delete(t))}destroy(){p(this,Ye,null);for(const t of n(this,Zt).values())t.remove();n(this,Zt).clear(),n(this,mr).clear()}};Ye=new WeakMap,Xh=new WeakMap,Zt=new WeakMap,mr=new WeakMap,Cu=new WeakSet,Jm=function(t,[e,s,i,r]){const{style:a}=t;a.top=`${100*s}%`,a.left=`${100*e}%`,a.width=`${100*i}%`,a.height=`${100*r}%`},qh=new WeakSet,lp=function(){const t=$t._svgFactory.create(1,1,!0);return n(this,Ye).append(t),t.setAttribute("aria-hidden",!0),t},xu=new WeakSet,Zm=function(t,e){const s=$t._svgFactory.createElement("clipPath");t.append(s);const i=`clip_${e}`;s.setAttribute("id",i),s.setAttribute("clipPathUnits","objectBoundingBox");const r=$t._svgFactory.createElement("use");return s.append(r),r.setAttribute("href",`#${e}`),r.classList.add("clip"),i},Yh=new WeakSet,hp=function(t,e){for(const[s,i]of Object.entries(e))i===null?t.removeAttribute(s):t.setAttribute(s,i)},u($t,Cu);let op=$t;globalThis.pdfjsTestingUtils={HighlightOutliner:$f};H.AbortException;H.AnnotationEditorLayer;H.AnnotationEditorParamsType;H.AnnotationEditorType;H.AnnotationEditorUIManager;H.AnnotationLayer;H.AnnotationMode;H.ColorPicker;H.DOMSVGFactory;H.DrawLayer;H.FeatureTest;var Iy=H.GlobalWorkerOptions;H.ImageKind;H.InvalidPDFException;H.MissingPDFException;H.OPS;H.OutputScale;H.PDFDataRangeTransport;H.PDFDateString;H.PDFWorker;H.PasswordResponses;H.PermissionFlag;H.PixelsPerInch;H.RenderingCancelledException;H.TextLayer;H.TouchManager;H.UnexpectedResponseException;H.Util;H.VerbosityLevel;H.XfaLayer;H.build;H.createValidAbsoluteUrl;H.fetchData;var Dy=H.getDocument;H.getFilenameFromUrl;H.getPdfFilenameFromUrl;H.getXfaPageViewport;H.isDataScheme;H.isPdfFile;H.noContextMenu;H.normalizeUnicode;H.setLayerDimensions;H.shadow;H.stopEvent;H.version;Iy.workerSrc="../pdf.worker.mjs";const Fy={name:"PdfViewer",data(){return{open:!1,zoomLevel:1,start:!1,selection:null,startPoint:null,scrollPoint:null,selectionStyle:null,captureButtonStyle:null,captureButtonVisible:!1,pdfData:void 0}},methods:{MinusOutlined:gb,PlusOutlined:Zp,CloseOutlined:mb,ScissorOutlined:bb,h:bo,loadPdf(){return I(this,null,function*(){const e=yield(yield Dy({data:this.pdfData.slice()}).promise).getPage(1),s=e.getViewport({scale:this.zoomLevel}),i=this.$refs.pdfCanvas,r=i.getContext("2d");i.width=s.width,i.height=s.height,yield e.render({canvasContext:r,viewport:s}).promise})},show(){this.open=!0,this.scrollPoint={x:0,y:0},this.start=!1,this.selection=null,this.startPoint=null,this.selectionStyle=null,this.captureButtonVisible=!1},close(){document.getElementById("scroller").scrollTop=0,document.getElementById("scroller").scrollLeft=0,this.open=!1},startSelection(d){this.start=!0,this.startPoint={x:d.offsetX,y:d.offsetY},this.selection={x:d.offsetX,y:d.offsetY,width:0,height:0},this.selectionStyle=null,this.hideCaptureButton()},updateSelection(d){this.start&&this.startPoint&&(this.selection.width=Math.abs(d.offsetX-this.startPoint.x),this.selection.height=Math.abs(d.offsetY-this.startPoint.y),this.selection.x=Math.min(d.offsetX,this.startPoint.x),this.selection.y=Math.min(d.offsetY,this.startPoint.y),this.selectionStyle={left:`${this.selection.x}px`,top:`${this.selection.y}px`,width:`${this.selection.width}px`,height:`${this.selection.height}px`,position:"absolute",border:"2px dashed red"})},endSelection(){this.start=!1,this.showCaptureButton()},captureSelection(){const d=this.$refs.pdfCanvas;d.getContext("2d");const t=this.$refs.tempCanvas;t.width=this.selection.width,t.height=this.selection.height,t.getContext("2d").drawImage(d,this.selection.x,this.selection.y,this.selection.width,this.selection.height,0,0,t.width,t.height);const s=t.toDataURL("image/png");this.$emit("onCapture",s),this.close()},handleScroll(d){this.scrollPoint={x:d.srcElement.scrollLeft,y:d.srcElement.scrollTop},this.showCaptureButton()},showCaptureButton(){this.selection&&this.selection.width>50&&this.selection.height>30?(this.captureButtonStyle={left:`${this.selection.x-this.scrollPoint.x+1}px`,top:`${this.selection.y-this.scrollPoint.y+1}px`,position:"absolute",borderRadius:0},this.captureButtonVisible=!0):this.captureButtonVisible=!1},hideCaptureButton(){this.captureButtonVisible=!1},zoomIn(){return I(this,null,function*(){this.zoomLevel=Math.min(3,this.zoomLevel+.1),yield this.loadPdf()})},zoomOut(){return I(this,null,function*(){this.zoomLevel=Math.max(.5,this.zoomLevel-.1),yield this.loadPdf()})}}},Ny={class:"box"},Oy={ref:"pdfCanvas"},By={ref:"tempCanvas"},Hy={class:"tool-box"};function zy(d,t,e,s,i,r){const a=tg("a-button");return Hu((Dc(),qu("div",Ny,[ys("div",{id:"scroller",class:"pdf-viewer",onMousedown:t[0]||(t[0]=(...o)=>r.startSelection&&r.startSelection(...o)),onMousemove:t[1]||(t[1]=(...o)=>r.updateSelection&&r.updateSelection(...o)),onMouseup:t[2]||(t[2]=(...o)=>r.endSelection&&r.endSelection(...o)),onScroll:t[3]||(t[3]=(...o)=>r.handleScroll&&r.handleScroll(...o))},[ys("canvas",Oy,null,512),Hu(ys("canvas",By,null,512),[[zu,!1]]),i.selection?(Dc(),qu("div",{key:0,class:"selection-box",style:Mp(i.selectionStyle)},null,4)):eg("",!0)],32),ys("div",Hy,[oe(a,{type:"primary",class:"tool-button",icon:r.h(r.MinusOutlined),onClick:r.zoomOut},null,8,["icon","onClick"]),ys("span",null,xb(Math.round(i.zoomLevel*100))+"%",1),oe(a,{type:"primary",class:"tool-button",icon:r.h(r.PlusOutlined),onClick:r.zoomIn},null,8,["icon","onClick"]),oe(a,{type:"primary",style:{"border-radius":"8px","margin-left":"10px"},icon:r.h(r.CloseOutlined),onClick:r.close},{default:si(()=>t[4]||(t[4]=[kr("取 消")])),_:1},8,["icon","onClick"])]),Hu(oe(a,{type:"primary",class:"btn",style:Mp(i.captureButtonStyle),icon:r.h(r.ScissorOutlined),onClick:r.captureSelection},{default:si(()=>t[5]||(t[5]=[kr("截 图")])),_:1},8,["style","icon","onClick"]),[[zu,i.captureButtonVisible]])],512)),[[zu,i.open]])}const $y=Jp(Fy,[["render",zy],["__scopeId","data-v-ac028922"]]),Gy={class:"header"},Vy=Tb({__name:"index",setup(d){const[t,{openModal:e}]=Lb(),s=Wi(),{hasPermission:i}=ob(),r=Wi([]),a=x=>{r.value=x.filter(R=>typeof R!="undefined")},[o,{openDrawer:l}]=Cb(),[h,{reload:c}]=ub({api:x=>Sb(g(x)),columns:Eb,formConfig:{labelWidth:0,schemas:kp,showAdvancedButton:!1},rowSelection:{type:"checkbox",onChange:a,getCheckboxProps:x=>({disabled:x.state!==0})},useSearchForm:!0,showTableSetting:!1,bordered:!0,showIndexColumn:!1,canResize:!1,rowKey:x=>x.id,actionColumn:{width:420,title:"操作",dataIndex:"action",fixed:void 0}}),f=Wi(!1),g=x=>{const ft=x,{pageNum:R,pageSize:q,field:j="id",order:z="descend"}=ft,Lt=Rp(ft,["pageNum","pageSize","field","order"]),rt={pageNum:R,pageSize:q,orderByClause:`${j} ${z==="descend"?"desc":"asc"}`};return Object.keys(Lt).forEach(Qe=>{const Ee=kp.find(Ui=>Ui.field===Qe),ht=x[Qe];let J=Qe;Ee?ht!==void 0&&ht!==""&&(Ee.component==="Input"?rt[J]=`%${ht.trim()}%`:["Select","ApiSelect","ApiTreeSelect"].includes(Ee.component)?rt[J]=db(ht)?ht.value:ht:Ee.component==="RangePicker"?(J==="startTimeQuery"&&(J="startTime"),rt[`${J}From`]=Bu(ht[0]).startOf("d").format("YYYY-MM-DD HH:mm:ss"),rt[`${J}To`]=Bu(ht[1]).endOf("d").format("YYYY-MM-DD HH:mm:ss")):Ee.component==="DatePicker"?rt[J]=Bu(ht).format(Ee.componentProps.format||"YYYY-MM-DD"):rt[J]=ht):rt[J]=ht}),rt},m=()=>{l(!0,{isUpdate:!1})},A=x=>{l(!0,{record:x,isUpdate:!0})},y=x=>{_b(x.id).then(R=>{c()})},v=()=>{c()},w=(x,R)=>{if(x.indexOf("PT")!==-1){let j=x.split("PT")[0]+"PT";for(let z=0;z{const R=JSON.parse(x.paramJson);if(x.results===void 0||x.results===null)return;const q=JSON.parse(x.results);return R.forEach(j=>{const z=q.filter(Lt=>j.code===Lt.code||j.code===w(j.code,Lt.code+""));z.length>0&&(j.x1=z[0].x1,j.y1=z[0].y1,j.x2=z[0].x2,j.y2=z[0].y2,j.x3=z[0].x3,j.y3=z[0].y3,j.x4=z[0].x4,j.y4=z[0].y4,j.base=z[0].base,j.actual_value=z[0].actual_value,j.status=z[0].status)}),R},E=x=>{const R=_(x);R&&(x.resultJson1=JSON.stringify(R),e(!0,{record:x}))};let S=null;const C=Wi(),P=x=>{var R;S=x,(R=C.value)==null||R.click()},T=x=>{const R=x.target.files[0];if(R){const q=new FileReader;q.onload=j=>{N(j.target.result),C.value.value=""},q.readAsArrayBuffer(R)}},k=Wi(),N=x=>I(this,null,function*(){k.value.pdfData=x,yield k.value.loadPdf(),k.value.show()}),$=x=>{f.value=!0,OCRService.importByOCR(x).then(R=>{var j;const q=JSON.parse(R);if(q.length===0){f.value=!1;return}if(S===null){const z={name:"",paramJson:JSON.stringify(q)};l(!0,{record:z,isUpdate:!1})}else(j=s.value)==null||j.setParamData(q);WebViewService.setMessage("数据导入成功!","success").then(()=>{}),f.value=!1},R=>{WebViewService.setMessage("数据导入失败!","error").then(()=>{}),f.value=!1})},B=x=>{const R=[...new Set([...x.id?[x.id]:[],...r.value.map(q=>q)])];DeviceClientService.assignTasks(R).then(()=>{WebViewService.setMessage("下发任务成功!","success").then(()=>{})},q=>{WebViewService.setMessage("下发任务失败!","error").then(()=>{})})},st=x=>{const R=[...new Set([...x.id?[x.id]:[],...r.value.map(q=>q)])];DeviceClientService.syncTasks(R).then(()=>{WebViewService.setMessage("同步任务成功!","success").then(()=>{}),c()},q=>{WebViewService.setMessage("同步任务失败!","error").then(()=>{})})},nt=Wi([]),Q=Pb(()=>x=>nt.value[x]?nt.value[x]:!1),Et=Wi();return Rb(()=>{Et.value=setInterval(()=>{DeviceClientService.getDeviceConnected().then(x=>{nt.value=x},x=>{WebViewService.setMessage("获取设备连接出错","error").then(()=>{})})},300),WebViewService.setIsLoading(!1).then(()=>{})}),kb(()=>{clearInterval(Et.value)}),(x,R)=>{const q=tg("a-button");return Dc(),qu("div",null,[ys("div",Gy,[oe(he(lb),{size:"19",name:"list"}),R[1]||(R[1]=ys("div",{class:"title"},"任务列表",-1))]),oe(he(fb),{onRegister:he(h)},{toolbar:si(()=>[oe(q,{type:"primary",onClick:m,icon:bo(he(Zp))},{default:si(()=>R[2]||(R[2]=[kr("新 增")])),_:1},8,["icon"]),R[6]||(R[6]=ys("div",{style:{width:"5px"}},null,-1)),oe(q,{type:"default",icon:bo(he(Ab)),onClick:R[0]||(R[0]=j=>P(null))},{default:si(()=>R[3]||(R[3]=[kr("OCR识别")])),_:1},8,["icon"]),ys("input",{type:"file",ref_key:"fileInput",ref:C,accept:"application/pdf","aria-hidden":"true",onChange:T,style:{display:"none"}},null,544),R[7]||(R[7]=ys("div",{style:{width:"5px"}},null,-1)),oe(q,{type:"default",onClick:B,icon:bo(he(yb)),disabled:r.value.length===0},{default:si(()=>R[4]||(R[4]=[kr("下发数据")])),_:1},8,["icon","disabled"]),oe(q,{type:"default",onClick:st,icon:bo(he(wb)),disabled:r.value.length===0},{default:si(()=>R[5]||(R[5]=[kr("同步数据")])),_:1},8,["icon","disabled"])]),bodyCell:si(({column:j,record:z})=>[j.dataIndex==="action"?(Dc(),Mb(he(pb),{key:0,actions:[{label:"编辑",icon:"clarity:note-edit-line",onClick:A.bind(null,z),divider:!0,disabled:z.state!==0},{label:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:y.bind(null,z),placement:"topRight"},ifShow:he(i)("AUTH_DATA_TASK:DELETE"),disabled:z.state!==0,divider:!0},{label:"结果查看",icon:"ant-design:eye-outlined",onClick:E.bind(null,z),divider:!0,disabled:z.endTime===void 0||z.endTime===null},{label:"下发数据",icon:"ant-design:download-outlined",onClick:B.bind(null,z),divider:!0,disabled:z.state!==0||!Q.value(z.deviceSn)},{label:"同步数据",icon:"ant-design:sync-outlined",onClick:st.bind(null,z),divider:!0,disabled:!Q.value(z.deviceSn)}]},null,8,["actions"])):eg("",!0)]),_:1},8,["onRegister"]),oe(vb,{ref_key:"taskDrawer",ref:s,onRegister:he(o),onSuccess:v,onOcrClick:P},null,8,["onRegister"]),oe($y,{ref_key:"pdfView",ref:k,onOnCapture:$},null,512),oe(Ib,{onRegister:he(t)},null,8,["onRegister"]),oe(he(cb),{loading:f.value,absolute:!1,tip:"OCR识别中...",size:he(hb).LARGE,theme:"dark"},null,8,["loading","size"])])}}});const aw=Jp(Vy,[["__scopeId","data-v-961b4952"]]);export{aw as default}; diff --git a/detect.gui/Embedded/dist/assets/index-12c490c2.js b/detect.gui/Embedded/dist/assets/index-ce2144ce.js similarity index 98% rename from detect.gui/Embedded/dist/assets/index-12c490c2.js rename to detect.gui/Embedded/dist/assets/index-ce2144ce.js index 85d1af2..1f8faab 100644 --- a/detect.gui/Embedded/dist/assets/index-12c490c2.js +++ b/detect.gui/Embedded/dist/assets/index-ce2144ce.js @@ -1 +1 @@ -var pe=Object.defineProperty,fe=Object.defineProperties;var ge=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var Q=(s,t,r)=>t in s?pe(s,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[t]=r,k=(s,t)=>{for(var r in t||(t={}))he.call(t,r)&&Q(s,r,t[r]);if(X)for(var r of X(t))me.call(t,r)&&Q(s,r,t[r]);return s},V=(s,t)=>fe(s,ge(t));var Y=(s,t,r)=>new Promise((a,m)=>{var b=d=>{try{g(r.next(d))}catch(H){m(H)}},y=d=>{try{g(r.throw(d))}catch(H){m(H)}},g=d=>d.done?a(d.value):Promise.resolve(d.value).then(b,y);g((r=r.apply(s,t)).next())});import{u as K,a as ye,_ as ve,b as be,i as _e,c as ke,p as x,P as He,w as Z,d as xe,e as we,C as Ce,f as A,h as Re}from"./index.js";import{d as N,Z as E,_ as U,$ as I,ab as B,a1 as z,u as e,ad as re,f as D,y as M,w as ae,H as Se,K as je,ae as $e,p as Pe,c as _,a4 as q,aa as Fe,a7 as De,a5 as O,ag as Be,ah as Te,F as Ee,G as ie,a0 as ce,a9 as le,a8 as ee,k as F,i as Oe,I as Ie,g as We,l as te}from"./vue-72a104e4.js";import{u as ue}from"./useContentViewHeight-1771cd5b.js";import{o as ze}from"./onMountedOrActivated-ee461833.js";import{u as Ve}from"./useWindowSizeFn-1db11f4f.js";import{o as ne,G as Ne,H as se,J as Ae,K as Me}from"./antd-0679333d.js";import{G as oe,D as Ge,S as Le}from"./siteSetting-efd6ab5b.js";const Ue=N({name:"PageFooter",inheritAttrs:!1,__name:"PageFooter",setup(s){const{prefixCls:t}=K("page-footer"),{getCalcContentWidth:r}=ye();return(a,m)=>(E(),U("div",{class:z(e(t)),style:re({width:e(r)})},[I("div",{class:z(`${e(t)}__left`)},[B(a.$slots,"left",{},void 0,!0)],2),B(a.$slots,"default",{},void 0,!0),I("div",{class:z(`${e(t)}__right`)},[B(a.$slots,"right",{},void 0,!0)],2)],6))}});const de=ve(Ue,[["__scopeId","data-v-7277d5d2"]]);function qe(s,t,r,a,m=0,b=D(0)){const y=D(null),{footerHeightRef:g}=ue();let d={useLayoutFooter:!0};const H=c=>{d=c};function P(){M(()=>{S()})}function w(c,j="all"){var f,v,C,l;function p(o){return Number(o.replace(/[^\d]/g,""))}let n=0;const h="0px";if(c){const o=getComputedStyle(c),u=p((f=o==null?void 0:o.marginTop)!=null?f:h),i=p((v=o==null?void 0:o.marginBottom)!=null?v:h),T=p((C=o==null?void 0:o.paddingTop)!=null?C:h),$=p((l=o==null?void 0:o.paddingBottom)!=null?l:h);j==="all"?(n+=u,n+=i,n+=T,n+=$):j==="top"?(n+=u,n+=T):(n+=i,n+=$)}return n}function R(c){return c==null?null:c instanceof HTMLDivElement?c:c.$el}function S(){return Y(this,null,function*(){var l;if(!s.value)return;yield M();const c=R(e(t));if(!c)return;const{bottomIncludeBody:j}=be(c);let p=0;r.forEach(o=>{var u,i;p+=(i=(u=R(e(o)))==null?void 0:u.offsetHeight)!=null?i:0});let n=(l=w(c))!=null?l:0;a.forEach(o=>{n+=w(R(e(o)))});let h=0;function f(o,u){if(o&&u){const i=o.parentElement;i&&(_e(u)?i.classList.contains(u)?h+=w(i,"bottom"):(h+=w(i,"bottom"),f(i,u)):ke(u)&&u>0&&(h+=w(i,"bottom"),f(i,--u)))}}Se(m)?f(c,e(m)):f(c,m);let v=j-e(g)-e(b)-p-n-h;const C=()=>{var o;(o=d.elements)==null||o.forEach(u=>{var i,T;v+=(T=(i=R(e(u)))==null?void 0:i.offsetHeight)!=null?T:0})};d.useLayoutFooter&&e(g)>0,C(),y.value=v})}return ze(()=>{M(()=>{S()})}),Ve(()=>{S()},{wait:50,immediate:!0}),ae(()=>[g.value],()=>{S()},{flush:"post",immediate:!0}),{redoHeight:P,setCompensation:H,contentHeight:y}}const Ke=N({name:"PageWrapper",inheritAttrs:!1,__name:"PageWrapper",props:{title:x.string,dense:x.bool,ghost:x.bool,headerSticky:x.bool,headerStyle:Object,content:x.string,contentStyle:{type:Object},contentBackground:x.bool,contentFullHeight:x.bool.def(!1),contentClass:x.string,fixedHeight:x.bool,upwardSpace:x.oneOfType([x.number,x.string]).def(0)},setup(s){const t=s,r=je(),a=$e(),m=D(null),b=D(null),y=D(null),g=D(null),{prefixCls:d}=K("page-wrapper");Pe(He,_(()=>t.fixedHeight));const H=_(()=>t.contentFullHeight),P=_(()=>t.upwardSpace),{redoHeight:w,setCompensation:R,contentHeight:S}=qe(H,m,[b,g],[y],P);R({useLayoutFooter:!0,elements:[g]});const c=_(()=>{var l;return[d,{[`${d}--dense`]:t.dense},(l=r.class)!=null?l:{}]}),{headerHeightRef:j}=ue(),p=_(()=>{const{headerSticky:l}=t;return l?k({position:"sticky",top:`${e(j)}px`},t.headerStyle):{}}),n=_(()=>t.content||(a==null?void 0:a.headerContent)||t.title||f.value.length),h=_(()=>(a==null?void 0:a.leftFooter)||(a==null?void 0:a.rightFooter)),f=_(()=>Object.keys(ne(a,"default","leftFooter","rightFooter","headerContent"))),v=_(()=>{const{contentFullHeight:l,contentStyle:o,fixedHeight:u}=t;if(!l)return k({},o);const i=`${e(S)}px`;return k(V(k({},o),{minHeight:i}),u?{height:i}:{})}),C=_(()=>{const{contentBackground:l,contentClass:o}=t;return[`${d}-content`,o,{[`${d}-content-bg`]:l}]});return ae(()=>[h.value],()=>{w()},{flush:"post",immediate:!0}),(l,o)=>(E(),U("div",{class:z(c.value),ref_key:"wrapperRef",ref:m},[n.value?(E(),q(e(Ne),le({key:0,ghost:s.ghost,title:s.title},e(ne)(l.$attrs,"class"),{style:p.value,ref_key:"headerRef",ref:b}),Fe({default:O(()=>[s.content?(E(),U(Ee,{key:0},[ie(ce(s.content),1)],64)):B(l.$slots,"headerContent",{key:1})]),_:2},[De(f.value,u=>({name:u,fn:O(i=>[B(l.$slots,u,Be(Te(i||{})))])}))]),1040,["ghost","title","style"])):ee("",!0),I("div",{class:z(["overflow-hidden",C.value]),style:re(v.value),ref_key:"contentRef",ref:y},[B(l.$slots,"default")],6),h.value?(E(),q(de,{key:1,ref_key:"footerRef",ref:g},{left:O(()=>[B(l.$slots,"leftFooter")]),right:O(()=>[B(l.$slots,"rightFooter")]),_:3},512)):ee("",!0)],2))}});Z(de);const Ze=Z(Ke);function Je(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Oe(s)}const Xe={useCollapse:{type:Boolean,default:!0},title:{type:String,default:""},size:{type:String,validator:s=>["small","default","middle",void 0].includes(s),default:"small"},bordered:{type:Boolean,default:!0},column:{type:[Number,Object],default:()=>({xxl:4,xl:3,lg:3,md:3,sm:2,xs:1})},collapseOptions:{type:Object,default:null},schema:{type:Array,default:()=>[]},data:{type:Object}},Qe=N({name:"Description",props:Xe,emits:["register"],setup(s,{slots:t,emit:r}){const a=D(null),{prefixCls:m}=K("description"),b=xe(),y=_(()=>k(k({},s),e(a))),g=_(()=>V(k({},e(y)),{title:void 0})),d=_(()=>!!e(y).title),H=_(()=>k({canExpand:!1},e(g).collapseOptions)),P=_(()=>k(k({},e(b)),e(g)));function w(n){a.value=k(k({},e(a)),n)}function R({label:n,labelMinWidth:h,labelStyle:f}){if(!f&&!h)return n;const v=V(k({},f),{minWidth:`${h}px `});return F("div",{style:v},[n])}function S(){const{schema:n,data:h}=e(g);return e(n).map(f=>{const{render:v,field:C,span:l,show:o,contentMinWidth:u}=f;if(o&&A(o)&&!o(h))return null;const i=()=>{var J;const $=(J=e(g))==null?void 0:J.data;if(!$)return null;const W=Ae($,C);return W&&!Ie($).hasOwnProperty(C)?A(v)?v("",$):"":A(v)?v(W,$):W!=null?W:""},T=u;return F(se.Item,{label:R(f),key:C,span:l},{default:()=>{if(!u)return i();const $={minWidth:`${T}px`};return F("div",{style:$},[i()])}})}).filter(f=>!!f)}const c=()=>{let n;return F(se,le({class:`${m}`},e(P)),Je(n=S())?n:{default:()=>[n]})},j=()=>{const n=s.useCollapse?c():F("div",null,[c()]);if(!s.useCollapse)return n;const{canExpand:h,helpMessage:f}=e(H),{title:v}=e(y);return F(Ce,{title:v,canExpan:h,helpMessage:f},{default:()=>n,action:()=>we(t,"action")})};return r("register",{setDescProps:w}),()=>e(d)?j():c()}});function G(s){if(!We())throw new Error("useDescription() can only be used inside setup() or functional components!");const t=D(null),r=D(!1);function a(b){e(r)&&Re()||(t.value=b,s&&b.setDescProps(s),r.value=!0)}return[a,{setDescProps:b=>{var y;(y=e(t))==null||y.setDescProps(b)}}]}const L=Z(Qe),Ye={class:"flex justify-between items-center"},et={class:"flex-1"},tt=["href"],ut=N({__name:"index",setup(s){const{pkg:t,lastBuildTime:r}={pkg:{dependencies:{"@ant-design/icons-vue":"^6.1.0","@iconify/iconify":"^3.1.1","@vben/hooks":"workspace:*","@vue/shared":"^3.3.4","@vueuse/core":"^10.2.1","@vueuse/shared":"^10.2.1","@zxcvbn-ts/core":"^3.0.2","ant-design-vue":"^4.0.3",axios:"^1.4.0",codemirror:"^5.65.12",cropperjs:"^1.5.13","crypto-js":"^4.1.1",dayjs:"^1.11.9",echarts:"^5.4.2",exceljs:"^4.4.0","file-saver":"^2.0.5","lodash-es":"^4.17.21","lodash.get":"^4.4.2",mockjs:"^1.1.0",nprogress:"^0.2.0","path-to-regexp":"^6.2.1","pdfjs-dist":"^4.10.38",pinia:"2.1.4",qrcode:"^1.5.3",qs:"^6.11.2","resize-observer-polyfill":"^1.5.1",showdown:"^2.1.0",sortablejs:"^1.15.0",vue:"^3.3.4","vue-i18n":"^9.2.2","vue-json-pretty":"^2.2.4","vue-router":"^4.2.3","vue-types":"^5.1.0",vuedraggable:"^4.1.0","vxe-table":"^4.4.5","vxe-table-plugin-export-xlsx":"^3.0.4","xe-utils":"^3.5.11"},devDependencies:{"@commitlint/cli":"^17.6.6","@commitlint/config-conventional":"^17.6.6","@iconify/json":"^2.2.87","@purge-icons/generated":"^0.9.0","@types/codemirror":"^5.60.8","@types/crypto-js":"^4.1.1","@types/file-saver":"^2.0.7","@types/intro.js":"^5.1.1","@types/lodash-es":"^4.17.7","@types/lodash.get":"^4.4.7","@types/mockjs":"^1.0.7","@types/nprogress":"^0.2.0","@types/qrcode":"^1.5.1","@types/qs":"^6.9.7","@types/showdown":"^2.0.1","@types/sortablejs":"^1.15.1","@vben/eslint-config":"workspace:*","@vben/stylelint-config":"workspace:*","@vben/ts-config":"workspace:*","@vben/types":"workspace:*","@vben/vite-config":"workspace:*","@vue/compiler-sfc":"^3.3.4","@vue/test-utils":"^2.4.0","cross-env":"^7.0.3","cz-git":"^1.6.1",czg:"^1.6.1","lint-staged":"13.2.3",prettier:"^2.8.8","prettier-plugin-packagejson":"^2.4.4",rimraf:"^5.0.1",turbo:"^1.10.7",typescript:"^5.1.6",unbuild:"^1.2.1",vite:"^4.4.0","vite-plugin-mock":"^2.9.6","vue-tsc":"^1.8.4"},name:"vben-admin",version:"2.10.1.build0307"},lastBuildTime:"2025-04-21 13:02:42"},{dependencies:a,devDependencies:m,name:b,version:y}=t,g=[],d=[],H=p=>n=>te(Me,{color:p},()=>n),P=p=>n=>te("a",{href:n,target:"_blank"},p),w=[{label:"版本",field:"version",render:H("blue")},{label:"最后编译时间",field:"lastBuildTime",render:H("blue")},{label:"文档地址",field:"doc",render:P("文档地址")},{label:"预览地址",field:"preview",render:P("预览地址")},{label:"Github",field:"github",render:P("Github")}],R={version:y,lastBuildTime:r,doc:Ge,preview:Le,github:oe};Object.keys(a).forEach(p=>{g.push({field:p,label:p})}),Object.keys(m).forEach(p=>{d.push({field:p,label:p})});const[S]=G({title:"生产环境依赖",data:a,schema:g,column:3}),[c]=G({title:"开发环境依赖",data:m,schema:d,column:3}),[j]=G({title:"项目信息",data:R,schema:w,column:2});return(p,n)=>(E(),q(e(Ze),{title:"关于"},{headerContent:O(()=>[I("div",Ye,[I("span",et,[I("a",{href:e(oe),target:"_blank"},ce(e(b)),9,tt),n[0]||(n[0]=ie(" 是一个基于Vue3.0、Vite、 Ant-Design-Vue 、TypeScript 的后台解决方案,目标是为中大型项目开发,提供现成的开箱解决方案及丰富的示例,原则上不会限制任何代码用于商用。 "))])])]),default:O(()=>[F(e(L),{onRegister:e(j),class:"enter-y"},null,8,["onRegister"]),F(e(L),{onRegister:e(S),class:"my-4 enter-y"},null,8,["onRegister"]),F(e(L),{onRegister:e(c),class:"enter-y"},null,8,["onRegister"])]),_:1}))}});export{ut as default}; +var pe=Object.defineProperty,fe=Object.defineProperties;var ge=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var Q=(s,t,r)=>t in s?pe(s,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[t]=r,k=(s,t)=>{for(var r in t||(t={}))he.call(t,r)&&Q(s,r,t[r]);if(X)for(var r of X(t))me.call(t,r)&&Q(s,r,t[r]);return s},V=(s,t)=>fe(s,ge(t));var Y=(s,t,r)=>new Promise((a,m)=>{var b=d=>{try{g(r.next(d))}catch(H){m(H)}},y=d=>{try{g(r.throw(d))}catch(H){m(H)}},g=d=>d.done?a(d.value):Promise.resolve(d.value).then(b,y);g((r=r.apply(s,t)).next())});import{u as K,a as ye,_ as ve,b as be,i as _e,c as ke,p as x,P as He,w as Z,d as xe,e as we,C as Ce,f as A,h as Re}from"./index.js";import{d as N,Z as E,_ as U,$ as I,ab as B,a1 as z,u as e,ad as re,f as D,y as M,w as ae,H as Se,K as je,ae as $e,p as Pe,c as _,a4 as q,aa as Fe,a7 as De,a5 as O,ag as Be,ah as Te,F as Ee,G as ie,a0 as ce,a9 as le,a8 as ee,k as F,i as Oe,I as Ie,g as We,l as te}from"./vue-72a104e4.js";import{u as ue}from"./useContentViewHeight-1771cd5b.js";import{o as ze}from"./onMountedOrActivated-ee461833.js";import{u as Ve}from"./useWindowSizeFn-1db11f4f.js";import{o as ne,G as Ne,H as se,J as Ae,K as Me}from"./antd-0679333d.js";import{G as oe,D as Ge,S as Le}from"./siteSetting-efd6ab5b.js";const Ue=N({name:"PageFooter",inheritAttrs:!1,__name:"PageFooter",setup(s){const{prefixCls:t}=K("page-footer"),{getCalcContentWidth:r}=ye();return(a,m)=>(E(),U("div",{class:z(e(t)),style:re({width:e(r)})},[I("div",{class:z(`${e(t)}__left`)},[B(a.$slots,"left",{},void 0,!0)],2),B(a.$slots,"default",{},void 0,!0),I("div",{class:z(`${e(t)}__right`)},[B(a.$slots,"right",{},void 0,!0)],2)],6))}});const de=ve(Ue,[["__scopeId","data-v-7277d5d2"]]);function qe(s,t,r,a,m=0,b=D(0)){const y=D(null),{footerHeightRef:g}=ue();let d={useLayoutFooter:!0};const H=c=>{d=c};function P(){M(()=>{S()})}function w(c,j="all"){var f,v,C,l;function p(o){return Number(o.replace(/[^\d]/g,""))}let n=0;const h="0px";if(c){const o=getComputedStyle(c),u=p((f=o==null?void 0:o.marginTop)!=null?f:h),i=p((v=o==null?void 0:o.marginBottom)!=null?v:h),T=p((C=o==null?void 0:o.paddingTop)!=null?C:h),$=p((l=o==null?void 0:o.paddingBottom)!=null?l:h);j==="all"?(n+=u,n+=i,n+=T,n+=$):j==="top"?(n+=u,n+=T):(n+=i,n+=$)}return n}function R(c){return c==null?null:c instanceof HTMLDivElement?c:c.$el}function S(){return Y(this,null,function*(){var l;if(!s.value)return;yield M();const c=R(e(t));if(!c)return;const{bottomIncludeBody:j}=be(c);let p=0;r.forEach(o=>{var u,i;p+=(i=(u=R(e(o)))==null?void 0:u.offsetHeight)!=null?i:0});let n=(l=w(c))!=null?l:0;a.forEach(o=>{n+=w(R(e(o)))});let h=0;function f(o,u){if(o&&u){const i=o.parentElement;i&&(_e(u)?i.classList.contains(u)?h+=w(i,"bottom"):(h+=w(i,"bottom"),f(i,u)):ke(u)&&u>0&&(h+=w(i,"bottom"),f(i,--u)))}}Se(m)?f(c,e(m)):f(c,m);let v=j-e(g)-e(b)-p-n-h;const C=()=>{var o;(o=d.elements)==null||o.forEach(u=>{var i,T;v+=(T=(i=R(e(u)))==null?void 0:i.offsetHeight)!=null?T:0})};d.useLayoutFooter&&e(g)>0,C(),y.value=v})}return ze(()=>{M(()=>{S()})}),Ve(()=>{S()},{wait:50,immediate:!0}),ae(()=>[g.value],()=>{S()},{flush:"post",immediate:!0}),{redoHeight:P,setCompensation:H,contentHeight:y}}const Ke=N({name:"PageWrapper",inheritAttrs:!1,__name:"PageWrapper",props:{title:x.string,dense:x.bool,ghost:x.bool,headerSticky:x.bool,headerStyle:Object,content:x.string,contentStyle:{type:Object},contentBackground:x.bool,contentFullHeight:x.bool.def(!1),contentClass:x.string,fixedHeight:x.bool,upwardSpace:x.oneOfType([x.number,x.string]).def(0)},setup(s){const t=s,r=je(),a=$e(),m=D(null),b=D(null),y=D(null),g=D(null),{prefixCls:d}=K("page-wrapper");Pe(He,_(()=>t.fixedHeight));const H=_(()=>t.contentFullHeight),P=_(()=>t.upwardSpace),{redoHeight:w,setCompensation:R,contentHeight:S}=qe(H,m,[b,g],[y],P);R({useLayoutFooter:!0,elements:[g]});const c=_(()=>{var l;return[d,{[`${d}--dense`]:t.dense},(l=r.class)!=null?l:{}]}),{headerHeightRef:j}=ue(),p=_(()=>{const{headerSticky:l}=t;return l?k({position:"sticky",top:`${e(j)}px`},t.headerStyle):{}}),n=_(()=>t.content||(a==null?void 0:a.headerContent)||t.title||f.value.length),h=_(()=>(a==null?void 0:a.leftFooter)||(a==null?void 0:a.rightFooter)),f=_(()=>Object.keys(ne(a,"default","leftFooter","rightFooter","headerContent"))),v=_(()=>{const{contentFullHeight:l,contentStyle:o,fixedHeight:u}=t;if(!l)return k({},o);const i=`${e(S)}px`;return k(V(k({},o),{minHeight:i}),u?{height:i}:{})}),C=_(()=>{const{contentBackground:l,contentClass:o}=t;return[`${d}-content`,o,{[`${d}-content-bg`]:l}]});return ae(()=>[h.value],()=>{w()},{flush:"post",immediate:!0}),(l,o)=>(E(),U("div",{class:z(c.value),ref_key:"wrapperRef",ref:m},[n.value?(E(),q(e(Ne),le({key:0,ghost:s.ghost,title:s.title},e(ne)(l.$attrs,"class"),{style:p.value,ref_key:"headerRef",ref:b}),Fe({default:O(()=>[s.content?(E(),U(Ee,{key:0},[ie(ce(s.content),1)],64)):B(l.$slots,"headerContent",{key:1})]),_:2},[De(f.value,u=>({name:u,fn:O(i=>[B(l.$slots,u,Be(Te(i||{})))])}))]),1040,["ghost","title","style"])):ee("",!0),I("div",{class:z(["overflow-hidden",C.value]),style:re(v.value),ref_key:"contentRef",ref:y},[B(l.$slots,"default")],6),h.value?(E(),q(de,{key:1,ref_key:"footerRef",ref:g},{left:O(()=>[B(l.$slots,"leftFooter")]),right:O(()=>[B(l.$slots,"rightFooter")]),_:3},512)):ee("",!0)],2))}});Z(de);const Ze=Z(Ke);function Je(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Oe(s)}const Xe={useCollapse:{type:Boolean,default:!0},title:{type:String,default:""},size:{type:String,validator:s=>["small","default","middle",void 0].includes(s),default:"small"},bordered:{type:Boolean,default:!0},column:{type:[Number,Object],default:()=>({xxl:4,xl:3,lg:3,md:3,sm:2,xs:1})},collapseOptions:{type:Object,default:null},schema:{type:Array,default:()=>[]},data:{type:Object}},Qe=N({name:"Description",props:Xe,emits:["register"],setup(s,{slots:t,emit:r}){const a=D(null),{prefixCls:m}=K("description"),b=xe(),y=_(()=>k(k({},s),e(a))),g=_(()=>V(k({},e(y)),{title:void 0})),d=_(()=>!!e(y).title),H=_(()=>k({canExpand:!1},e(g).collapseOptions)),P=_(()=>k(k({},e(b)),e(g)));function w(n){a.value=k(k({},e(a)),n)}function R({label:n,labelMinWidth:h,labelStyle:f}){if(!f&&!h)return n;const v=V(k({},f),{minWidth:`${h}px `});return F("div",{style:v},[n])}function S(){const{schema:n,data:h}=e(g);return e(n).map(f=>{const{render:v,field:C,span:l,show:o,contentMinWidth:u}=f;if(o&&A(o)&&!o(h))return null;const i=()=>{var J;const $=(J=e(g))==null?void 0:J.data;if(!$)return null;const W=Ae($,C);return W&&!Ie($).hasOwnProperty(C)?A(v)?v("",$):"":A(v)?v(W,$):W!=null?W:""},T=u;return F(se.Item,{label:R(f),key:C,span:l},{default:()=>{if(!u)return i();const $={minWidth:`${T}px`};return F("div",{style:$},[i()])}})}).filter(f=>!!f)}const c=()=>{let n;return F(se,le({class:`${m}`},e(P)),Je(n=S())?n:{default:()=>[n]})},j=()=>{const n=s.useCollapse?c():F("div",null,[c()]);if(!s.useCollapse)return n;const{canExpand:h,helpMessage:f}=e(H),{title:v}=e(y);return F(Ce,{title:v,canExpan:h,helpMessage:f},{default:()=>n,action:()=>we(t,"action")})};return r("register",{setDescProps:w}),()=>e(d)?j():c()}});function G(s){if(!We())throw new Error("useDescription() can only be used inside setup() or functional components!");const t=D(null),r=D(!1);function a(b){e(r)&&Re()||(t.value=b,s&&b.setDescProps(s),r.value=!0)}return[a,{setDescProps:b=>{var y;(y=e(t))==null||y.setDescProps(b)}}]}const L=Z(Qe),Ye={class:"flex justify-between items-center"},et={class:"flex-1"},tt=["href"],ut=N({__name:"index",setup(s){const{pkg:t,lastBuildTime:r}={pkg:{dependencies:{"@ant-design/icons-vue":"^6.1.0","@iconify/iconify":"^3.1.1","@vben/hooks":"workspace:*","@vue/shared":"^3.3.4","@vueuse/core":"^10.2.1","@vueuse/shared":"^10.2.1","@zxcvbn-ts/core":"^3.0.2","ant-design-vue":"^4.0.3",axios:"^1.4.0",codemirror:"^5.65.12",cropperjs:"^1.5.13","crypto-js":"^4.1.1",dayjs:"^1.11.9",echarts:"^5.4.2",exceljs:"^4.4.0","file-saver":"^2.0.5","lodash-es":"^4.17.21","lodash.get":"^4.4.2",mockjs:"^1.1.0",nprogress:"^0.2.0","path-to-regexp":"^6.2.1","pdfjs-dist":"^4.10.38",pinia:"2.1.4",qrcode:"^1.5.3",qs:"^6.11.2","resize-observer-polyfill":"^1.5.1",showdown:"^2.1.0",sortablejs:"^1.15.0",vue:"^3.3.4","vue-i18n":"^9.2.2","vue-json-pretty":"^2.2.4","vue-router":"^4.2.3","vue-types":"^5.1.0",vuedraggable:"^4.1.0","vxe-table":"^4.4.5","vxe-table-plugin-export-xlsx":"^3.0.4","xe-utils":"^3.5.11"},devDependencies:{"@commitlint/cli":"^17.6.6","@commitlint/config-conventional":"^17.6.6","@iconify/json":"^2.2.87","@purge-icons/generated":"^0.9.0","@types/codemirror":"^5.60.8","@types/crypto-js":"^4.1.1","@types/file-saver":"^2.0.7","@types/intro.js":"^5.1.1","@types/lodash-es":"^4.17.7","@types/lodash.get":"^4.4.7","@types/mockjs":"^1.0.7","@types/nprogress":"^0.2.0","@types/qrcode":"^1.5.1","@types/qs":"^6.9.7","@types/showdown":"^2.0.1","@types/sortablejs":"^1.15.1","@vben/eslint-config":"workspace:*","@vben/stylelint-config":"workspace:*","@vben/ts-config":"workspace:*","@vben/types":"workspace:*","@vben/vite-config":"workspace:*","@vue/compiler-sfc":"^3.3.4","@vue/test-utils":"^2.4.0","cross-env":"^7.0.3","cz-git":"^1.6.1",czg:"^1.6.1","lint-staged":"13.2.3",prettier:"^2.8.8","prettier-plugin-packagejson":"^2.4.4",rimraf:"^5.0.1",turbo:"^1.10.7",typescript:"^5.1.6",unbuild:"^1.2.1",vite:"^4.4.0","vite-plugin-mock":"^2.9.6","vue-tsc":"^1.8.4"},name:"vben-admin",version:"2.10.1.build0307"},lastBuildTime:"2025-04-23 10:29:14"},{dependencies:a,devDependencies:m,name:b,version:y}=t,g=[],d=[],H=p=>n=>te(Me,{color:p},()=>n),P=p=>n=>te("a",{href:n,target:"_blank"},p),w=[{label:"版本",field:"version",render:H("blue")},{label:"最后编译时间",field:"lastBuildTime",render:H("blue")},{label:"文档地址",field:"doc",render:P("文档地址")},{label:"预览地址",field:"preview",render:P("预览地址")},{label:"Github",field:"github",render:P("Github")}],R={version:y,lastBuildTime:r,doc:Ge,preview:Le,github:oe};Object.keys(a).forEach(p=>{g.push({field:p,label:p})}),Object.keys(m).forEach(p=>{d.push({field:p,label:p})});const[S]=G({title:"生产环境依赖",data:a,schema:g,column:3}),[c]=G({title:"开发环境依赖",data:m,schema:d,column:3}),[j]=G({title:"项目信息",data:R,schema:w,column:2});return(p,n)=>(E(),q(e(Ze),{title:"关于"},{headerContent:O(()=>[I("div",Ye,[I("span",et,[I("a",{href:e(oe),target:"_blank"},ce(e(b)),9,tt),n[0]||(n[0]=ie(" 是一个基于Vue3.0、Vite、 Ant-Design-Vue 、TypeScript 的后台解决方案,目标是为中大型项目开发,提供现成的开箱解决方案及丰富的示例,原则上不会限制任何代码用于商用。 "))])])]),default:O(()=>[F(e(L),{onRegister:e(j),class:"enter-y"},null,8,["onRegister"]),F(e(L),{onRegister:e(S),class:"my-4 enter-y"},null,8,["onRegister"]),F(e(L),{onRegister:e(c),class:"enter-y"},null,8,["onRegister"])]),_:1}))}});export{ut as default}; diff --git a/detect.gui/Embedded/dist/assets/index-dc7c3222.css b/detect.gui/Embedded/dist/assets/index-dc7c3222.css deleted file mode 100644 index 8c39273..0000000 --- a/detect.gui/Embedded/dist/assets/index-dc7c3222.css +++ /dev/null @@ -1 +0,0 @@ -.box[data-v-ac028922]{position:absolute;left:0;top:0;width:100vw;height:100vh;background-color:#0d1540;z-index:9999}.box .pdf-viewer[data-v-ac028922]{text-align:center;position:absolute;left:0;top:0;width:100vw;height:100vh;background-color:#0d1540;overflow:auto}.box .pdf-viewer .selection-box[data-v-ac028922]{position:absolute;border:2px dashed red}.box .btn[data-v-ac028922]{position:absolute;border-radius:0;left:0;top:0}.tool-box[data-v-ac028922]{position:absolute;top:5px;right:20px;margin-right:20px;padding:5px;background:rgba(45,119,243,.5);display:flex;justify-content:space-around;align-items:center;border-radius:5px}.tool-box .tool-button[data-v-ac028922]{border-radius:100px;padding:5px;width:36px;height:36px}.tool-box>span[data-v-ac028922]{padding-left:10px;padding-right:10px;color:#fff}.header[data-v-961b4952]{padding:5px 20px;height:50px;display:flex;background-color:#2d77f333;align-items:center}.header .title[data-v-961b4952]{font-family:Noto Sans SC,serif;font-size:14px;color:#fff;padding-left:10px}[data-v-961b4952] .ant-form{background-color:transparent;padding:0;margin:10px 20px 2px 10px}[data-v-961b4952] .ant-table-wrapper{background:transparent}[data-v-961b4952] .ant-pagination-total-text{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-pagination.ant-pagination-mini .ant-pagination-item{min-width:28px;height:28px;margin:0;line-height:26px}[data-v-961b4952] .ant-pagination .ant-pagination-item-active:hover{border-color:#2d77f34d!important;background:rgba(45,119,243,.2)!important}[data-v-961b4952] .ant-pagination .ant-pagination-item-active{font-weight:700;border-color:#2d77f366!important;background:rgba(45,119,243,.3)!important}[data-v-961b4952] .ant-pagination .ant-pagination-item a{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-pagination.ant-pagination-mini .ant-pagination-prev,[data-v-961b4952] .ant-pagination.ant-pagination-mini .ant-pagination-next{width:28px;height:28px;padding-top:2px;color:#fff}[data-v-961b4952] .ant-pagination.ant-pagination-mini .ant-pagination-options-quick-jumper{height:28px;line-height:28px;font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-select-selector{border:1px solid rgba(45,119,243,.3)!important;background-color:#2d77f333!important;height:36px!important}[data-v-961b4952] .ant-pagination-options .ant-select-selector{height:28px!important}[data-v-961b4952] .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector{border:1px solid rgba(45,119,243,.4)!important;background-color:#2d77f34d!important}[data-v-961b4952] .ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector{width:100%;height:36px;padding:1px 11px 0}[data-v-961b4952] .ant-select .ant-select-selection-placeholder{font-family:Noto Sans SC,serif;font-size:14px;color:#aaa;line-height:34px}[data-v-961b4952] .ant-select-selector .ant-select-selection-item,[data-v-961b4952] .ant-select-selection-item{font-family:Noto Sans SC,serif;font-size:14px;color:#fff;line-height:34px}[data-v-961b4952] .ant-select-open .ant-select-selection-item{color:#aaa}[data-v-961b4952] .ant-select .ant-select-arrow{padding-top:2px;color:#fff}[data-v-961b4952] .ant-select-dropdown{border-radius:6px!important;border:1px solid #183171!important;background-color:#13265a!important}[data-v-961b4952] .ant-select-item-option-content{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-select-item-option-active{background-color:#92d6ed4d!important}[data-v-961b4952] .ant-select-item-option-selected{font-weight:400!important;background-color:#92d6ed66!important}[data-v-961b4952] .ant-empty-description{color:#999}[data-v-961b4952] .ant-pagination-options-quick-jumper>input{font-family:Noto Sans SC,serif;font-size:14px;color:#fff;height:26px!important;line-height:26px;background-color:#2d77f333;border:1px solid rgba(45,119,243,.3)}[data-v-961b4952] .ant-pagination-options-quick-jumper>input:hover,[data-v-961b4952] .ant-pagination-options-quick-jumper>input:focus{background-color:#2d77f34d;border:1px solid rgba(45,119,243,.4)}[data-v-961b4952] .ant-input-clear-icon,[data-v-961b4952] .ant-input-password-icon{color:#fff!important}[data-v-961b4952] .ant-select-clear{color:#fff!important;background:transparent!important}[data-v-961b4952] .vben-basic-table-action button:disabled{color:#999!important}[data-v-961b4952] .vben-tree{border-radius:6px!important;border:1px solid #183171!important;background-color:#13265a!important}[data-v-961b4952] .vben-tree-header{border-bottom:1px solid #183171}[data-v-961b4952] .vben-basic-title{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-tree-list{background:#13265a!important}[data-v-961b4952] .vben-tree__title{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-tree-switcher-icon{color:#fff!important}[data-v-961b4952] .ant-dropdown-trigger{padding-top:2px;color:#fff!important}[data-v-961b4952] .ant-tree-treenode .ant-tree-treenode-switcher-close .ant-tree-treenode-selected{background-color:#92d6ed4d!important}[data-v-961b4952] .ant-popover-inner{border:1px solid #183171!important;background-color:#13265a!important}[data-v-961b4952] .ant-popconfirm-message-title{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-picker,[data-v-961b4952] .ant-picker-range{height:36px;border-color:#2d77f34d;background:rgba(45,119,243,.2)}[data-v-961b4952] .ant-picker:hover{border-color:#2d77f366;background:rgba(45,119,243,.3)}[data-v-961b4952] .ant-picker-focused,[data-v-961b4952] .ant-picker-range:hover,[data-v-961b4952] .ant-picker-range:focus{border-color:#2d77f366;background:rgba(45,119,243,.3)}[data-v-961b4952] .vben-basic-table .ant-picker-range{width:100%}[data-v-961b4952] .ant-picker-input>input{font-family:Noto Sans SC,serif;font-size:14px;color:#fff}[data-v-961b4952] .ant-picker-input>input::placeholder{font-family:Noto Sans SC,serif;font-size:14px;color:#aaa}[data-v-961b4952] .anticon{color:#fff}[data-v-961b4952] .ant-picker-panel-layout{border:1px solid #183171!important;background-color:#13265a!important}[data-v-961b4952] .ant-picker-cell{font-family:Noto Sans SC,serif;font-size:14px;color:#999}[data-v-961b4952] .ant-picker-cell-in-view{color:#fff!important}[data-v-961b4952] .ant-picker-content th,[data-v-961b4952] .ant-picker-header-super-prev-btn,[data-v-961b4952] .ant-picker-header-prev-btn,[data-v-961b4952] .ant-picker-header-super-next-btn,[data-v-961b4952] .ant-picker-header-next-btn,[data-v-961b4952] .ant-picker-year-btn,[data-v-961b4952] .ant-picker-month-btn,[data-v-961b4952] .ant-picker-decade-btn,[data-v-961b4952] .ant-picker-header-view,[data-v-961b4952] .ant-picker-time-panel-cell-inner{font-family:Noto Sans SC,serif;font-size:14px;color:#fff!important}[data-v-961b4952] .ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner{background-color:#92d6ed4d!important}[data-v-961b4952] .ant-card{border:1px solid #183171!important;background-color:#13265a!important}[data-v-961b4952] .ant-card-body{padding:0!important}[data-v-961b4952] .ant-page-header-heading-title{font-family:Noto Sans SC,serif;font-size:20px;font-weight:400;color:#fff!important}[data-v-961b4952] .ant-descriptions-view{border:1px solid #183171!important}[data-v-961b4952] .ant-descriptions-row{border-bottom:1px solid #183171!important}[data-v-961b4952] .ant-descriptions-item-label{background-color:#92d6ed0d!important}[data-v-961b4952] .ant-descriptions-item-label,[data-v-961b4952] .ant-descriptions-item-content{font-family:Noto Sans SC,serif;font-size:14px;color:#fff!important;border-inline-end:1px solid #183171!important}[data-v-961b4952] .CodeMirror{border-radius:6px;border:1px solid rgba(45,119,243,.3)!important;background-color:#13265a!important}[data-v-961b4952] .CodeMirror-lines{font-family:Noto Sans SC,serif;font-size:14px;color:#fff!important}[data-v-961b4952] .CodeMirror-gutters{border-right:1px solid rgba(45,119,243,.3)!important}[data-v-961b4952] .CodeMirror-cursor{border-left:1px solid white}[data-v-961b4952] .cm-string{color:#ff8c00!important}[data-v-961b4952] .ant-descriptions-item-label{width:120px}[data-v-961b4952] .ant-spin-dot-item{background-color:#5ca0ff!important}[data-v-961b4952] .ant-spin-text{color:#5ca0ff!important} diff --git a/detect.gui/Embedded/dist/assets/index-9ac8985b.js b/detect.gui/Embedded/dist/assets/index-efaa1ab1.js similarity index 97% rename from detect.gui/Embedded/dist/assets/index-9ac8985b.js rename to detect.gui/Embedded/dist/assets/index-efaa1ab1.js index 958817c..a1f5db1 100644 --- a/detect.gui/Embedded/dist/assets/index-9ac8985b.js +++ b/detect.gui/Embedded/dist/assets/index-efaa1ab1.js @@ -1 +1 @@ -var D=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var x=(a,d)=>{var i={};for(var e in a)R.call(a,e)&&d.indexOf(e)<0&&(i[e]=a[e]);if(a!=null&&D)for(var e of D(a))d.indexOf(e)<0&&N.call(a,e)&&(i[e]=a[e]);return i};import{u as P,B as $}from"./useTable-e949a6b7.js";import{T as j}from"./useForm-baba730a.js";import{S as O,j as V,_ as A}from"./index.js";import{N as H,j as h}from"./antd-0679333d.js";import{r as z,s as E}from"./deviceApi-260fcde9.js";import{u as F}from"./index-679d8a0a.js";import{D as K,c as U,s as C}from"./drawer-7740e10f.js";import{d as W,o as G,a6 as L,Z as S,_ as Z,$ as Y,k as p,u as c,a5 as b,l as q,G as J,a4 as Q,a8 as X}from"./vue-72a104e4.js";import"./index-8a6826ba.js";import"./useWindowSizeFn-1db11f4f.js";import"./onMountedOrActivated-ee461833.js";import"./sortable.esm-15c0a34e.js";import"./copyTextToClipboard-3ca69a78.js";const ee={class:"header"},te=W({__name:"index",setup(a){const[d,{openDrawer:i}]=F(),[e,{reload:v}]=P({api:t=>E(w(t)),columns:U,formConfig:{labelWidth:0,schemas:C,showAdvancedButton:!1},useSearchForm:!0,showTableSetting:!1,bordered:!0,showIndexColumn:!1,canResize:!1,rowKey:t=>t.id,actionColumn:{width:180,title:"操作",dataIndex:"action",fixed:void 0}});G(()=>{WebViewService.setIsLoading(!1).then(()=>{})});const w=t=>{const g=t,{pageNum:n,pageSize:u,field:f="id",order:m="descend"}=g,I=x(g,["pageNum","pageSize","field","order"]),s={pageNum:n,pageSize:u,orderByClause:`${f} ${m==="descend"?"desc":"asc"}`};return Object.keys(I).forEach(_=>{const l=C.find(M=>M.field===_),o=t[_],r=_;l?o!==void 0&&o!==""&&(l.component==="Input"?s[r]=`%${o.trim()}%`:["Select","ApiSelect","ApiTreeSelect"].includes(l.component)?s[r]=V(o)?o.value:o:l.component==="RangePicker"?(s[`${r}From`]=h(o[0]).startOf("d").format("YYYY-MM-DD HH:mm:ss"),s[`${r}To`]=h(o[1]).endOf("d").format("YYYY-MM-DD HH:mm:ss")):l.component==="DatePicker"?s[r]=h(o).format(l.componentProps.format||"YYYY-MM-DD"):s[r]=o):s[r]=o}),s},y=()=>{i(!0,{isUpdate:!1})},T=t=>{i(!0,{record:t,isUpdate:!0})},k=t=>{z(t.id).then(n=>{v()})},B=()=>{v()};return(t,n)=>{const u=L("a-button");return S(),Z("div",null,[Y("div",ee,[p(c(O),{size:"19",name:"list"}),n[0]||(n[0]=Y("div",{class:"title"},"设备列表",-1))]),p(c($),{onRegister:c(e)},{toolbar:b(()=>[p(u,{type:"primary",onClick:y,icon:q(c(H))},{default:b(()=>n[1]||(n[1]=[J("新增")])),_:1},8,["icon"])]),bodyCell:b(({column:f,record:m})=>[f.dataIndex==="action"?(S(),Q(c(j),{key:0,actions:[{label:"编辑",icon:"clarity:note-edit-line",onClick:T.bind(null,m),divider:!0},{label:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:k.bind(null,m),placement:"topRight"}}]},null,8,["actions"])):X("",!0)]),_:1},8,["onRegister"]),p(K,{onRegister:c(d),onSuccess:B},null,8,["onRegister"])])}}});const he=A(te,[["__scopeId","data-v-56d2e6a3"]]);export{he as default}; +var D=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var x=(a,d)=>{var i={};for(var e in a)R.call(a,e)&&d.indexOf(e)<0&&(i[e]=a[e]);if(a!=null&&D)for(var e of D(a))d.indexOf(e)<0&&N.call(a,e)&&(i[e]=a[e]);return i};import{u as P,B as $}from"./useTable-e949a6b7.js";import{T as j}from"./useForm-baba730a.js";import{S as O,j as V,_ as A}from"./index.js";import{N as H,j as h}from"./antd-0679333d.js";import{r as z,s as E}from"./deviceApi-260fcde9.js";import{u as F}from"./index-679d8a0a.js";import{D as K,c as U,s as C}from"./drawer-8318451d.js";import{d as W,o as G,a6 as L,Z as S,_ as Z,$ as Y,k as p,u as c,a5 as b,l as q,G as J,a4 as Q,a8 as X}from"./vue-72a104e4.js";import"./index-8a6826ba.js";import"./useWindowSizeFn-1db11f4f.js";import"./onMountedOrActivated-ee461833.js";import"./sortable.esm-15c0a34e.js";import"./copyTextToClipboard-3ca69a78.js";const ee={class:"header"},te=W({__name:"index",setup(a){const[d,{openDrawer:i}]=F(),[e,{reload:v}]=P({api:t=>E(w(t)),columns:U,formConfig:{labelWidth:0,schemas:C,showAdvancedButton:!1},useSearchForm:!0,showTableSetting:!1,bordered:!0,showIndexColumn:!1,canResize:!1,rowKey:t=>t.id,actionColumn:{width:180,title:"操作",dataIndex:"action",fixed:void 0}});G(()=>{WebViewService.setIsLoading(!1).then(()=>{})});const w=t=>{const g=t,{pageNum:n,pageSize:u,field:f="id",order:m="descend"}=g,I=x(g,["pageNum","pageSize","field","order"]),s={pageNum:n,pageSize:u,orderByClause:`${f} ${m==="descend"?"desc":"asc"}`};return Object.keys(I).forEach(_=>{const l=C.find(M=>M.field===_),o=t[_],r=_;l?o!==void 0&&o!==""&&(l.component==="Input"?s[r]=`%${o.trim()}%`:["Select","ApiSelect","ApiTreeSelect"].includes(l.component)?s[r]=V(o)?o.value:o:l.component==="RangePicker"?(s[`${r}From`]=h(o[0]).startOf("d").format("YYYY-MM-DD HH:mm:ss"),s[`${r}To`]=h(o[1]).endOf("d").format("YYYY-MM-DD HH:mm:ss")):l.component==="DatePicker"?s[r]=h(o).format(l.componentProps.format||"YYYY-MM-DD"):s[r]=o):s[r]=o}),s},y=()=>{i(!0,{isUpdate:!1})},T=t=>{i(!0,{record:t,isUpdate:!0})},k=t=>{z(t.id).then(n=>{v()})},B=()=>{v()};return(t,n)=>{const u=L("a-button");return S(),Z("div",null,[Y("div",ee,[p(c(O),{size:"19",name:"list"}),n[0]||(n[0]=Y("div",{class:"title"},"设备列表",-1))]),p(c($),{onRegister:c(e)},{toolbar:b(()=>[p(u,{type:"primary",onClick:y,icon:q(c(H))},{default:b(()=>n[1]||(n[1]=[J("新增")])),_:1},8,["icon"])]),bodyCell:b(({column:f,record:m})=>[f.dataIndex==="action"?(S(),Q(c(j),{key:0,actions:[{label:"编辑",icon:"clarity:note-edit-line",onClick:T.bind(null,m),divider:!0},{label:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:k.bind(null,m),placement:"topRight"}}]},null,8,["actions"])):X("",!0)]),_:1},8,["onRegister"]),p(K,{onRegister:c(d),onSuccess:B},null,8,["onRegister"])])}}});const he=A(te,[["__scopeId","data-v-56d2e6a3"]]);export{he as default}; diff --git a/detect.gui/Embedded/dist/assets/index.js b/detect.gui/Embedded/dist/assets/index.js index f57b270..065f19b 100644 --- a/detect.gui/Embedded/dist/assets/index.js +++ b/detect.gui/Embedded/dist/assets/index.js @@ -14,7 +14,7 @@ var Wb=Object.defineProperty,zb=Object.defineProperties;var Ub=Object.getOwnProp * vue-i18n v9.14.1 * (c) 2024 kazuya kawaguchi * Released under the MIT License. - */var Re=Yx,Ct=OE,Ft=TE;const e6="9.14.1",t6=Ct.CoreWarnCodes.__EXTEND_POINT__,Wo=Re.incrementer(t6),un={FALLBACK_TO_ROOT:t6,NOT_SUPPORTED_PRESERVE:Wo(),NOT_SUPPORTED_FORMATTER:Wo(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Wo(),NOT_SUPPORTED_GET_CHOICE_INDEX:Wo(),COMPONENT_NAME_LEGACY_COMPATIBLE:Wo(),NOT_FOUND_PARENT_SCOPE:Wo(),IGNORE_OBJ_FLATTEN:Wo(),NOTICE_DROP_ALLOW_COMPOSITION:Wo(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Wo()},ME={[un.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[un.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[un.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[un.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[un.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[un.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[un.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[un.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[un.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[un.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function vr(e,...t){return Re.format(ME[e],...t)}const n6=Ct.CoreErrorCodes.__EXTEND_POINT__,mr=Re.incrementer(n6),zt={UNEXPECTED_RETURN_TYPE:n6,INVALID_ARGUMENT:mr(),MUST_BE_CALL_SETUP_TOP:mr(),NOT_INSTALLED:mr(),NOT_AVAILABLE_IN_LEGACY_MODE:mr(),REQUIRED_VALUE:mr(),INVALID_VALUE:mr(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:mr(),NOT_INSTALLED_WITH_PROVIDE:mr(),UNEXPECTED_ERROR:mr(),NOT_COMPATIBLE_LEGACY_VUE_I18N:mr(),BRIDGE_SUPPORT_VUE_2_ONLY:mr(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:mr(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:mr(),__EXTEND_POINT__:mr()};function In(e,...t){return Ct.createCompileError(e,null,{messages:RE,args:t})}const RE={[zt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[zt.INVALID_ARGUMENT]:"Invalid argument",[zt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[zt.NOT_INSTALLED]:"Need to install with `app.use` function",[zt.UNEXPECTED_ERROR]:"Unexpected error",[zt.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[zt.REQUIRED_VALUE]:"Required in value: {0}",[zt.INVALID_VALUE]:"Invalid value",[zt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[zt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[zt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[zt.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[zt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[zt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},qf=Re.makeSymbol("__translateVNode"),Gf=Re.makeSymbol("__datetimeParts"),Zf=Re.makeSymbol("__numberParts"),Yf=Re.makeSymbol("__enableEmitter"),Kf=Re.makeSymbol("__disableEmitter"),r6=Re.makeSymbol("__setPluralRules");Re.makeSymbol("__intlifyMeta");const o6=Re.makeSymbol("__injectWithOption"),Xf=Re.makeSymbol("__dispose"),LE="__VUE_I18N_BRIDGE__";function ac(e){if(!Re.isObject(e))return e;for(const t in e)if(Re.hasOwn(e,t))if(!t.includes("."))Re.isObject(e[t])&&ac(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,s=!1;for(let a=0;a{if("locale"in l&&"resource"in l){const{locale:i,resource:c}=l;i?(a[i]=a[i]||{},Re.deepCopy(c,a[i])):Re.deepCopy(c,a)}else Re.isString(l)&&Re.deepCopy(JSON.parse(l),a)}),o==null&&s)for(const l in a)Re.hasOwn(a,l)&&ac(a[l]);return a}function s6(e){return e.type}function a6(e,t,n){let r=Re.isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=y1(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(Re.isObject(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(Re.isObject(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function Q3(e){return Ft.createVNode(Ft.Text,null,e,0)}const eh="__INTLIFY_META__",th=()=>[],kE=()=>!1;let nh=0;function rh(e){return(t,n,r,o)=>e(n,r,Ft.getCurrentInstance()||void 0,o)}const AE=()=>{const e=Ft.getCurrentInstance();let t=null;return e&&(t=s6(e)[eh])?{[eh]:t}:null};function g0(e={},t){const{__root:n,__injectWithOption:r}=e,o=n===void 0,s=e.flatJson,a=Re.inBrowser?Ft.ref:Ft.shallowRef,l=!!e.translateExistCompatible;l&&Re.warnOnce(vr(un.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let i=Re.isBoolean(e.inheritLocale)?e.inheritLocale:!0;const c=a(n&&i?n.locale.value:Re.isString(e.locale)?e.locale:Ct.DEFAULT_LOCALE),u=a(n&&i?n.fallbackLocale.value:Re.isString(e.fallbackLocale)||Re.isArray(e.fallbackLocale)||Re.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),d=a(y1(c.value,e)),p=a(Re.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),C=a(Re.isPlainObject(e.numberFormats)?e.numberFormats:{[c.value]:{}});let v=n?n.missingWarn:Re.isBoolean(e.missingWarn)||Re.isRegExp(e.missingWarn)?e.missingWarn:!0,b=n?n.fallbackWarn:Re.isBoolean(e.fallbackWarn)||Re.isRegExp(e.fallbackWarn)?e.fallbackWarn:!0,S=n?n.fallbackRoot:Re.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,E=!!e.fallbackFormat,x=Re.isFunction(e.missing)?e.missing:null,h=Re.isFunction(e.missing)?rh(e.missing):null,y=Re.isFunction(e.postTranslation)?e.postTranslation:null,O=n?n.warnHtmlMessage:Re.isBoolean(e.warnHtmlMessage)?e.warnHtmlMessage:!0,T=!!e.escapeParameter;const M=n?n.modifiers:Re.isPlainObject(e.modifiers)?e.modifiers:{};let R=e.pluralRules||n&&n.pluralRules,A;A=(()=>{o&&Ct.setFallbackContext(null);const Q={version:e6,locale:c.value,fallbackLocale:u.value,messages:d.value,modifiers:M,pluralRules:R,missing:h===null?void 0:h,missingWarn:v,fallbackWarn:b,fallbackFormat:E,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:O,escapeParameter:T,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Q.datetimeFormats=p.value,Q.numberFormats=C.value,Q.__datetimeFormatters=Re.isPlainObject(A)?A.__datetimeFormatters:void 0,Q.__numberFormatters=Re.isPlainObject(A)?A.__numberFormatters:void 0,Q.__v_emitter=Re.isPlainObject(A)?A.__v_emitter:void 0;const ce=Ct.createCoreContext(Q);return o&&Ct.setFallbackContext(ce),ce})(),Ct.updateFallbackLocale(A,c.value,u.value);function K(){return[c.value,u.value,d.value,p.value,C.value]}const Z=Ft.computed({get:()=>c.value,set:Q=>{c.value=Q,A.locale=c.value}}),V=Ft.computed({get:()=>u.value,set:Q=>{u.value=Q,A.fallbackLocale=u.value,Ct.updateFallbackLocale(A,c.value,Q)}}),se=Ft.computed(()=>d.value),re=Ft.computed(()=>p.value),ee=Ft.computed(()=>C.value);function H(){return Re.isFunction(y)?y:null}function N(Q){y=Q,A.postTranslation=Q}function $(){return x}function X(Q){Q!==null&&(h=rh(Q)),x=Q,A.missing=h}function F(Q,ce){return Q!=="translate"||!ce.resolvedMessage}const J=(Q,ce,z,le,Te,Ge)=>{K();let qe;try{Ct.setAdditionalMeta(AE()),o||(A.fallbackContext=n?Ct.getFallbackContext():void 0),qe=Q(A)}finally{Ct.setAdditionalMeta(null),o||(A.fallbackContext=void 0)}if(z!=="translate exists"&&Re.isNumber(qe)&&qe===Ct.NOT_REOSLVED||z==="translate exists"&&!qe){const[Ye,tt]=ce();if(n&&Re.isString(Ye)&&F(z,tt)){S&&(Ct.isTranslateFallbackWarn(b,Ye)||Ct.isTranslateMissingWarn(v,Ye))&&Re.warn(vr(un.FALLBACK_TO_ROOT,{key:Ye,type:z}));{const{__v_emitter:et}=A;et&&S&&et.emit("fallback",{type:z,key:Ye,to:"global",groupId:`${z}:${Ye}`})}}return n&&S?le(n):Te(Ye)}else{if(Ge(qe))return qe;throw In(zt.UNEXPECTED_RETURN_TYPE)}};function ue(...Q){return J(ce=>Reflect.apply(Ct.translate,null,[ce,...Q]),()=>Ct.parseTranslateArgs(...Q),"translate",ce=>Reflect.apply(ce.t,ce,[...Q]),ce=>ce,ce=>Re.isString(ce))}function ae(...Q){const[ce,z,le]=Q;if(le&&!Re.isObject(le))throw In(zt.INVALID_ARGUMENT);return ue(ce,z,Re.assign({resolvedMessage:!0},le||{}))}function $e(...Q){return J(ce=>Reflect.apply(Ct.datetime,null,[ce,...Q]),()=>Ct.parseDateTimeArgs(...Q),"datetime format",ce=>Reflect.apply(ce.d,ce,[...Q]),()=>Ct.MISSING_RESOLVE_VALUE,ce=>Re.isString(ce))}function We(...Q){return J(ce=>Reflect.apply(Ct.number,null,[ce,...Q]),()=>Ct.parseNumberArgs(...Q),"number format",ce=>Reflect.apply(ce.n,ce,[...Q]),()=>Ct.MISSING_RESOLVE_VALUE,ce=>Re.isString(ce))}function Ce(Q){return Q.map(ce=>Re.isString(ce)||Re.isNumber(ce)||Re.isBoolean(ce)?Q3(String(ce)):ce)}const pe={normalize:Ce,interpolate:Q=>Q,type:"vnode"};function xe(...Q){return J(ce=>{let z;const le=ce;try{le.processor=pe,z=Reflect.apply(Ct.translate,null,[le,...Q])}finally{le.processor=null}return z},()=>Ct.parseTranslateArgs(...Q),"translate",ce=>ce[qf](...Q),ce=>[Q3(ce)],ce=>Re.isArray(ce))}function Se(...Q){return J(ce=>Reflect.apply(Ct.number,null,[ce,...Q]),()=>Ct.parseNumberArgs(...Q),"number format",ce=>ce[Zf](...Q),th,ce=>Re.isString(ce)||Re.isArray(ce))}function De(...Q){return J(ce=>Reflect.apply(Ct.datetime,null,[ce,...Q]),()=>Ct.parseDateTimeArgs(...Q),"datetime format",ce=>ce[Gf](...Q),th,ce=>Re.isString(ce)||Re.isArray(ce))}function be(Q){R=Q,A.pluralRules=R}function Y(Q,ce){return J(()=>{if(!Q)return!1;const z=Re.isString(ce)?ce:c.value,le=Me(z),Te=A.messageResolver(le,Q);return l?Te!=null:Ct.isMessageAST(Te)||Ct.isMessageFunction(Te)||Re.isString(Te)},()=>[Q],"translate exists",z=>Reflect.apply(z.te,z,[Q,ce]),kE,z=>Re.isBoolean(z))}function de(Q){let ce=null;const z=Ct.fallbackWithLocaleChain(A,u.value,c.value);for(let le=0;le{i&&(c.value=Q,A.locale=Q,Ct.updateFallbackLocale(A,c.value,u.value))}),Ft.watch(n.fallbackLocale,Q=>{i&&(u.value=Q,A.fallbackLocale=Q,Ct.updateFallbackLocale(A,c.value,u.value))}));const me={id:nh,locale:Z,fallbackLocale:V,get inheritLocale(){return i},set inheritLocale(Q){i=Q,Q&&n&&(c.value=n.locale.value,u.value=n.fallbackLocale.value,Ct.updateFallbackLocale(A,c.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:se,get modifiers(){return M},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return v},set missingWarn(Q){v=Q,A.missingWarn=v},get fallbackWarn(){return b},set fallbackWarn(Q){b=Q,A.fallbackWarn=b},get fallbackRoot(){return S},set fallbackRoot(Q){S=Q},get fallbackFormat(){return E},set fallbackFormat(Q){E=Q,A.fallbackFormat=E},get warnHtmlMessage(){return O},set warnHtmlMessage(Q){O=Q,A.warnHtmlMessage=Q},get escapeParameter(){return T},set escapeParameter(Q){T=Q,A.escapeParameter=Q},t:ue,getLocaleMessage:Me,setLocaleMessage:Oe,mergeLocaleMessage:je,getPostTranslationHandler:H,setPostTranslationHandler:N,getMissingHandler:$,setMissingHandler:X,[r6]:be};return me.datetimeFormats=re,me.numberFormats=ee,me.rt=ae,me.te=Y,me.tm=_e,me.d=$e,me.n=We,me.getDateTimeFormat=W,me.setDateTimeFormat=G,me.mergeDateTimeFormat=ye,me.getNumberFormat=Ee,me.setNumberFormat=ke,me.mergeNumberFormat=ie,me[o6]=r,me[qf]=xe,me[Gf]=De,me[Zf]=Se,me[Yf]=Q=>{A.__v_emitter=Q},me[Kf]=()=>{A.__v_emitter=void 0},me}function IE(e){const t=Re.isString(e.locale)?e.locale:Ct.DEFAULT_LOCALE,n=Re.isString(e.fallbackLocale)||Re.isArray(e.fallbackLocale)||Re.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Re.isFunction(e.missing)?e.missing:void 0,o=Re.isBoolean(e.silentTranslationWarn)||Re.isRegExp(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=Re.isBoolean(e.silentFallbackWarn)||Re.isRegExp(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=Re.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,i=Re.isPlainObject(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Re.isFunction(e.postTranslation)?e.postTranslation:void 0,d=Re.isString(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,C=Re.isBoolean(e.sync)?e.sync:!0;e.formatter&&Re.warn(vr(un.NOT_SUPPORTED_FORMATTER)),e.preserveDirectiveContent&&Re.warn(vr(un.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let v=e.messages;if(Re.isPlainObject(e.sharedMessages)){const T=e.sharedMessages;v=Object.keys(T).reduce((R,A)=>{const P=R[A]||(R[A]={});return Re.assign(P,T[A]),R},v||{})}const{__i18n:b,__root:S,__injectWithOption:E}=e,x=e.datetimeFormats,h=e.numberFormats,y=e.flatJson,O=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:v,flatJson:y,datetimeFormats:x,numberFormats:h,missing:r,missingWarn:o,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:i,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:C,translateExistCompatible:O,__i18n:b,__root:S,__injectWithOption:E}}function Jf(e={},t){{const n=g0(IE(e)),{__extender:r}=e,o={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return Re.warn(vr(un.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(s){Re.warn(vr(un.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return Re.isBoolean(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=Re.isBoolean(s)?!s:s},get silentFallbackWarn(){return Re.isBoolean(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=Re.isBoolean(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return Re.warn(vr(un.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(s){Re.warn(vr(un.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[a,l,i]=s,c={};let u=null,d=null;if(!Re.isString(a))throw In(zt.INVALID_ARGUMENT);const p=a;return Re.isString(l)?c.locale=l:Re.isArray(l)?u=l:Re.isPlainObject(l)&&(d=l),Re.isArray(i)?u=i:Re.isPlainObject(i)&&(d=i),Reflect.apply(n.t,n,[p,u||d||{},c])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[a,l,i]=s,c={plural:1};let u=null,d=null;if(!Re.isString(a))throw In(zt.INVALID_ARGUMENT);const p=a;return Re.isString(l)?c.locale=l:Re.isNumber(l)?c.plural=l:Re.isArray(l)?u=l:Re.isPlainObject(l)&&(d=l),Re.isString(i)?c.locale=i:Re.isArray(i)?u=i:Re.isPlainObject(i)&&(d=i),Reflect.apply(n.t,n,[p,u||d||{},c])},te(s,a){return n.te(s,a)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,a){n.setLocaleMessage(s,a)},mergeLocaleMessage(s,a){n.mergeLocaleMessage(s,a)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,a){n.setDateTimeFormat(s,a)},mergeDateTimeFormat(s,a){n.mergeDateTimeFormat(s,a)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,a){n.setNumberFormat(s,a)},mergeNumberFormat(s,a){n.mergeNumberFormat(s,a)},getChoiceIndex(s,a){return Re.warn(vr(un.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return o.__extender=r,o.__enableEmitter=s=>{const a=n;a[Yf]&&a[Yf](s)},o.__disableEmitter=()=>{const s=n;s[Kf]&&s[Kf]()},o}}const v0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function DE({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===Ft.Fragment?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function i6(e){return Ft.Fragment}const PE=Ft.defineComponent({name:"i18n-t",props:Re.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Re.isNumber(e)||!isNaN(e)}},v0),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||x1({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(d=>d!=="_"),a={};e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=Re.isString(e.plural)?+e.plural:e.plural);const l=DE(t,s),i=o[qf](e.keypath,l,a),c=Re.assign({},r),u=Re.isString(e.tag)||Re.isObject(e.tag)?e.tag:i6();return Ft.h(u,c,i)}}}),_l=PE,NE=_l;function $E(e){return Re.isArray(e)&&!Re.isString(e[0])}function l6(e,t,n,r){const{slots:o,attrs:s}=t;return()=>{const a={part:!0};let l={};e.locale&&(a.locale=e.locale),Re.isString(e.format)?a.key=e.format:Re.isObject(e.format)&&(Re.isString(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((p,C)=>n.includes(C)?Re.assign({},p,{[C]:e.format[C]}):p,{}));const i=r(e.value,a,l);let c=[a.key];Re.isArray(i)?c=i.map((p,C)=>{const v=o[p.type],b=v?v({[p.type]:p.value,index:C,parts:i}):[p.value];return $E(b)&&(b[0].key=`${p.type}-${C}`),b}):Re.isString(i)&&(c=[i]);const u=Re.assign({},s),d=Re.isString(e.tag)||Re.isObject(e.tag)?e.tag:i6();return Ft.h(d,u,c)}}const FE=Ft.defineComponent({name:"i18n-n",props:Re.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},v0),setup(e,t){const n=e.i18n||x1({useScope:e.scope,__useComponent:!0});return l6(e,t,Ct.NUMBER_FORMAT_OPTIONS_KEYS,(...r)=>n[Zf](...r))}}),Nu=FE,BE=Nu,VE=Ft.defineComponent({name:"i18n-d",props:Re.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},v0),setup(e,t){const n=e.i18n||x1({useScope:e.scope,__useComponent:!0});return l6(e,t,Ct.DATETIME_FORMAT_OPTIONS_KEYS,(...r)=>n[Gf](...r))}}),$u=VE,HE=$u;function jE(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function c6(e){const t=a=>{const{instance:l,modifiers:i,value:c}=a;if(!l||!l.$)throw In(zt.UNEXPECTED_ERROR);const u=jE(e,l.$);i.preserve&&Re.warn(vr(un.NOT_SUPPORTED_PRESERVE));const d=oh(c);return[Reflect.apply(u.t,u,[...sh(d)]),u]};return{created:(a,l)=>{const[i,c]=t(l);Re.inBrowser&&e.global===c&&(a.__i18nWatcher=Ft.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=i},unmounted:a=>{Re.inBrowser&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const i=a.__composer,c=oh(l);a.textContent=Reflect.apply(i.t,i,[...sh(c)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function oh(e){if(Re.isString(e))return{path:e};if(Re.isPlainObject(e)){if(!("path"in e))throw In(zt.REQUIRED_VALUE,"path");return e}else throw In(zt.INVALID_VALUE)}function sh(e){const{path:t,locale:n,args:r,choice:o,plural:s}=e,a={},l=r||{};return Re.isString(n)&&(a.locale=n),Re.isNumber(o)&&(a.plural=o),Re.isNumber(s)&&(a.plural=s),[t,l,a]}function WE(e,t,...n){const r=Re.isPlainObject(n[0])?n[0]:{},o=!!r.useI18nComponentName,s=Re.isBoolean(r.globalInstall)?r.globalInstall:!0;s&&o&&Re.warn(vr(un.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:_l.name})),s&&([o?"i18n":_l.name,"I18nT"].forEach(a=>e.component(a,_l)),[Nu.name,"I18nN"].forEach(a=>e.component(a,Nu)),[$u.name,"I18nD"].forEach(a=>e.component(a,$u))),e.directive("t",c6(t))}function zE(e,t,n){return{beforeCreate(){const r=Ft.getCurrentInstance();if(!r)throw In(zt.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=t,this===this.$root)this.$i18n=ah(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Jf(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=ah(e,o);else{this.$i18n=Jf({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&a6(t,o,o),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=Ft.getCurrentInstance();if(!r)throw In(zt.UNEXPECTED_ERROR);const o=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n}}}function ah(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[r6](t.pluralizationRules||e.pluralizationRules);const n=y1(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const u6=Re.makeSymbol("global-vue-i18n");function UE(e={},t){const n=Re.isBoolean(e.legacy)?e.legacy:!0,r=Re.isBoolean(e.globalInjection)?e.globalInjection:!0,o=n?!!e.allowComposition:!0,s=new Map,[a,l]=GE(e,n),i=Re.makeSymbol("vue-i18n");n&&o&&Re.warn(vr(un.NOTICE_DROP_ALLOW_COMPOSITION));function c(p){return s.get(p)||null}function u(p,C){s.set(p,C)}function d(p){s.delete(p)}{let C;const p={get mode(){return n?"legacy":"composition"},get allowComposition(){return o},install(v,...b){return ft(this,null,function*(){if(v.__VUE_I18N_SYMBOL__=i,v.provide(v.__VUE_I18N_SYMBOL__,p),Re.isPlainObject(b[0])){const x=b[0];p.__composerExtend=x.__composerExtend,p.__vueI18nExtend=x.__vueI18nExtend}let S=null;!n&&r&&(S=nw(v,p.global)),WE(v,p,...b),n&&v.mixin(zE(l,l.__composer,p));const E=v.unmount;v.unmount=()=>{S&&S(),p.dispose(),E()}})},get global(){return l},dispose(){a.stop()},__instances:s,__getInstance:c,__setInstance:u,__deleteInstance:d};return p}}function x1(e={}){const t=Ft.getCurrentInstance();if(t==null)throw In(zt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw In(zt.NOT_INSTALLED);const n=ZE(t),r=KE(n),o=s6(t),s=YE(e,o);if(n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw In(zt.NOT_AVAILABLE_IN_LEGACY_MODE);return ew(t,s,r,e)}if(s==="global")return a6(r,e,o),r;if(s==="parent"){let i=XE(n,t,e.__useComponent);return i==null&&(Re.warn(vr(un.NOT_FOUND_PARENT_SCOPE)),i=r),i}const a=n;let l=a.__getInstance(t);if(l==null){const i=Re.assign({},e);"__i18n"in o&&(i.__i18n=o.__i18n),r&&(i.__root=r),l=g0(i),a.__composerExtend&&(l[Xf]=a.__composerExtend(l)),QE(a,t,l),a.__setInstance(t,l)}return l}const qE=e=>{if(!(LE in e))throw In(zt.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function GE(e,t,n){const r=Ft.effectScope();{const o=t?r.run(()=>Jf(e)):r.run(()=>g0(e));if(o==null)throw In(zt.UNEXPECTED_ERROR);return[r,o]}}function ZE(e){{const t=Ft.inject(e.isCE?u6:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw In(e.isCE?zt.NOT_INSTALLED_WITH_PROVIDE:zt.UNEXPECTED_ERROR);return t}}function YE(e,t){return Re.isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function KE(e){return e.mode==="composition"?e.global:e.global.__composer}function XE(e,t,n=!1){let r=null;const o=t.root;let s=JE(t,n);for(;s!=null;){const a=e;if(e.mode==="composition")r=a.__getInstance(s);else{const l=a.__getInstance(s);l!=null&&(r=l.__composer,n&&r&&!r[o6]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function JE(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function QE(e,t,n){Ft.onMounted(()=>{},t),Ft.onUnmounted(()=>{const r=n;e.__deleteInstance(t);const o=r[Xf];o&&(o(),delete r[Xf])},t)}function ew(e,t,n,r={}){const o=t==="local",s=Ft.shallowRef(null);if(o&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw In(zt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const a=Re.isBoolean(r.inheritLocale)?r.inheritLocale:!Re.isString(r.locale),l=Ft.ref(!o||a?n.locale.value:Re.isString(r.locale)?r.locale:Ct.DEFAULT_LOCALE),i=Ft.ref(!o||a?n.fallbackLocale.value:Re.isString(r.fallbackLocale)||Re.isArray(r.fallbackLocale)||Re.isPlainObject(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),c=Ft.ref(y1(l.value,r)),u=Ft.ref(Re.isPlainObject(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),d=Ft.ref(Re.isPlainObject(r.numberFormats)?r.numberFormats:{[l.value]:{}}),p=o?n.missingWarn:Re.isBoolean(r.missingWarn)||Re.isRegExp(r.missingWarn)?r.missingWarn:!0,C=o?n.fallbackWarn:Re.isBoolean(r.fallbackWarn)||Re.isRegExp(r.fallbackWarn)?r.fallbackWarn:!0,v=o?n.fallbackRoot:Re.isBoolean(r.fallbackRoot)?r.fallbackRoot:!0,b=!!r.fallbackFormat,S=Re.isFunction(r.missing)?r.missing:null,E=Re.isFunction(r.postTranslation)?r.postTranslation:null,x=o?n.warnHtmlMessage:Re.isBoolean(r.warnHtmlMessage)?r.warnHtmlMessage:!0,h=!!r.escapeParameter,y=o?n.modifiers:Re.isPlainObject(r.modifiers)?r.modifiers:{},O=r.pluralRules||o&&n.pluralRules;function T(){return[l.value,i.value,c.value,u.value,d.value]}const M=Ft.computed({get:()=>s.value?s.value.locale.value:l.value,set:Y=>{s.value&&(s.value.locale.value=Y),l.value=Y}}),R=Ft.computed({get:()=>s.value?s.value.fallbackLocale.value:i.value,set:Y=>{s.value&&(s.value.fallbackLocale.value=Y),i.value=Y}}),A=Ft.computed(()=>s.value?s.value.messages.value:c.value),P=Ft.computed(()=>u.value),K=Ft.computed(()=>d.value);function Z(){return s.value?s.value.getPostTranslationHandler():E}function V(Y){s.value&&s.value.setPostTranslationHandler(Y)}function se(){return s.value?s.value.getMissingHandler():S}function re(Y){s.value&&s.value.setMissingHandler(Y)}function ee(Y){return T(),Y()}function H(...Y){return s.value?ee(()=>Reflect.apply(s.value.t,null,[...Y])):ee(()=>"")}function N(...Y){return s.value?Reflect.apply(s.value.rt,null,[...Y]):""}function $(...Y){return s.value?ee(()=>Reflect.apply(s.value.d,null,[...Y])):ee(()=>"")}function X(...Y){return s.value?ee(()=>Reflect.apply(s.value.n,null,[...Y])):ee(()=>"")}function F(Y){return s.value?s.value.tm(Y):{}}function J(Y,de){return s.value?s.value.te(Y,de):!1}function ue(Y){return s.value?s.value.getLocaleMessage(Y):{}}function ae(Y,de){s.value&&(s.value.setLocaleMessage(Y,de),c.value[Y]=de)}function $e(Y,de){s.value&&s.value.mergeLocaleMessage(Y,de)}function We(Y){return s.value?s.value.getDateTimeFormat(Y):{}}function Ce(Y,de){s.value&&(s.value.setDateTimeFormat(Y,de),u.value[Y]=de)}function U(Y,de){s.value&&s.value.mergeDateTimeFormat(Y,de)}function pe(Y){return s.value?s.value.getNumberFormat(Y):{}}function xe(Y,de){s.value&&(s.value.setNumberFormat(Y,de),d.value[Y]=de)}function Se(Y,de){s.value&&s.value.mergeNumberFormat(Y,de)}const De={get id(){return s.value?s.value.id:-1},locale:M,fallbackLocale:R,messages:A,datetimeFormats:P,numberFormats:K,get inheritLocale(){return s.value?s.value.inheritLocale:a},set inheritLocale(Y){s.value&&(s.value.inheritLocale=Y)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(c.value)},get modifiers(){return s.value?s.value.modifiers:y},get pluralRules(){return s.value?s.value.pluralRules:O},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:p},set missingWarn(Y){s.value&&(s.value.missingWarn=Y)},get fallbackWarn(){return s.value?s.value.fallbackWarn:C},set fallbackWarn(Y){s.value&&(s.value.missingWarn=Y)},get fallbackRoot(){return s.value?s.value.fallbackRoot:v},set fallbackRoot(Y){s.value&&(s.value.fallbackRoot=Y)},get fallbackFormat(){return s.value?s.value.fallbackFormat:b},set fallbackFormat(Y){s.value&&(s.value.fallbackFormat=Y)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:x},set warnHtmlMessage(Y){s.value&&(s.value.warnHtmlMessage=Y)},get escapeParameter(){return s.value?s.value.escapeParameter:h},set escapeParameter(Y){s.value&&(s.value.escapeParameter=Y)},t:H,getPostTranslationHandler:Z,setPostTranslationHandler:V,getMissingHandler:se,setMissingHandler:re,rt:N,d:$,n:X,tm:F,te:J,getLocaleMessage:ue,setLocaleMessage:ae,mergeLocaleMessage:$e,getDateTimeFormat:We,setDateTimeFormat:Ce,mergeDateTimeFormat:U,getNumberFormat:pe,setNumberFormat:xe,mergeNumberFormat:Se};function be(Y){Y.locale.value=l.value,Y.fallbackLocale.value=i.value,Object.keys(c.value).forEach(de=>{Y.mergeLocaleMessage(de,c.value[de])}),Object.keys(u.value).forEach(de=>{Y.mergeDateTimeFormat(de,u.value[de])}),Object.keys(d.value).forEach(de=>{Y.mergeNumberFormat(de,d.value[de])}),Y.escapeParameter=h,Y.fallbackFormat=b,Y.fallbackRoot=v,Y.fallbackWarn=C,Y.missingWarn=p,Y.warnHtmlMessage=x}return Ft.onBeforeMount(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw In(zt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const Y=s.value=e.proxy.$i18n.__composer;t==="global"?(l.value=Y.locale.value,i.value=Y.fallbackLocale.value,c.value=Y.messages.value,u.value=Y.datetimeFormats.value,d.value=Y.numberFormats.value):o&&be(Y)}),De}const tw=["locale","fallbackLocale","availableLocales"],ih=["t","rt","d","n","tm","te"];function nw(e,t){const n=Object.create(null);return tw.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s)throw In(zt.UNEXPECTED_ERROR);const a=Ft.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,a)}),e.config.globalProperties.$i18n=n,ih.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s||!s.value)throw In(zt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,s)}),()=>{delete e.config.globalProperties.$i18n,ih.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}Ct.registerMessageCompiler(Ct.compile);Ct.registerMessageResolver(Ct.resolveValue);Ct.registerLocaleFallbacker(Ct.fallbackWithLocaleChain);{const e=Re.getGlobalThis();e.__INTLIFY__=!0,Ct.setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}Pr.DatetimeFormat=$u;Pr.I18nD=HE;Pr.I18nInjectionKey=u6;Pr.I18nN=BE;Pr.I18nT=NE;Pr.NumberFormat=Nu;Pr.Translation=_l;Pr.VERSION=e6;Pr.castToVueI18n=qE;Pr.createI18n=UE;Pr.useI18n=x1;Pr.vTDirective=c6;var rw=Pr;const Qf=[];function d6(e){var t;(t=document.querySelector("html"))==null||t.setAttribute("lang",e)}function ow(e){e(Qf)}function UX(e,t="lang"){const n={};return Object.keys(e).forEach(r=>{const o=e[r].default;let s=r.replace(`./${t}/`,"").replace(/^\.\//,"");const a=s.lastIndexOf(".");s=s.substring(0,a);const l=s.split("/"),i=l.shift(),c=l.join(".");i&&(c?(xd(n,i,n[i]||{}),xd(n[i],c,o)):xd(n,i,o||{}))}),n}const oi={ZH_CN:"zh_CN",EN_US:"en"},b0={showPicker:!1,locale:oi.ZH_CN,fallback:oi.ZH_CN,availableLocales:[oi.ZH_CN,oi.EN_US]},lh=[{text:"简体中文",event:oi.ZH_CN},{text:"English",event:oi.EN_US}],f6=f5(),sw=f6.get(e5)||b0,y0=Ai({id:"app-locale",state:()=>({localInfo:sw}),getters:{getShowPicker(e){var t;return!!((t=e.localInfo)!=null&&t.showPicker)},getLocale(e){var t,n;return(n=(t=e.localInfo)==null?void 0:t.locale)!=null?n:"zh_CN"}},actions:{setLocaleInfo(e){this.localInfo=at(at({},this.localInfo),e),f6.set(e5,this.localInfo)},initLocale(){this.setLocaleInfo(at(at({},b0),this.localInfo))}}});function x0(){return y0($i)}const{fallback:aw,availableLocales:iw}=b0;let Xo;function lw(){return ft(this,null,function*(){var o,s;const t=x0().getLocale,r=(s=(o=(yield g5(Object.assign({"./lang/en.ts":()=>Tt(()=>import("./en-9c11272e.js"),["./en-9c11272e.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url),"./lang/zh_CN.ts":()=>Tt(()=>import("./zh_CN-f9481935.js"),["./zh_CN-f9481935.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url)}),`./lang/${t}.ts`)).default)==null?void 0:o.message)!=null?s:{};return d6(t),ow(a=>{a.push(t)}),{legacy:!1,locale:t,fallbackLocale:aw,messages:{[t]:r},availableLocales:iw,sync:!0,silentTranslationWarn:!0,missingWarn:!1,silentFallbackWarn:!0}})}function cw(e){return ft(this,null,function*(){const t=yield lw();Xo=rw.createI18n(t),e.use(Xo)})}function ch(e,t){return!e||t.startsWith(e)?t:`${e}.${t}`}function Zr(e){const t={t:a=>ch(e,a)};if(!Xo)return t;const s=Xo.global,{t:n}=s,r=ll(s,["t"]),o=(a,...l)=>a?!a.includes(".")&&!e?a:n(ch(e,a),...l):"";return Yt(at({},r),{t:o})}const e2=e=>e,uw={path:"/about",name:"About",component:mc,redirect:"/about/index",meta:{hideMenu:!0,icon:"simple-icons:about-dot-me",title:e2("routes.dashboard.about"),orderNo:1e5},children:[{path:"index",name:"AboutPage",component:()=>Tt(()=>import("./index-12c490c2.js"),["./index-12c490c2.js","./vue-72a104e4.js","./useContentViewHeight-1771cd5b.js","./useWindowSizeFn-1db11f4f.js","./onMountedOrActivated-ee461833.js","./antd-0679333d.js","./siteSetting-efd6ab5b.js","./index-8ee108fa.css"],import.meta.url),meta:{title:e2("routes.dashboard.about"),icon:"simple-icons:about-dot-me",hideMenu:!0}}]},dw=Object.freeze(Object.defineProperty({__proto__:null,default:uw},Symbol.toStringTag,{value:"Module"})),fw={path:"/dashboard",name:"Dashboard",component:()=>Tt(()=>import("./index-e1982fac.js"),["./index-e1982fac.js","./vue-72a104e4.js"],import.meta.url),meta:{title:e2("routes.dashboard.dashboard"),ignoreAuth:!0}},pw=Object.freeze(Object.defineProperty({__proto__:null,default:fw},Symbol.toStringTag,{value:"Module"})),hw={path:"/data",name:"Data",component:Qg,meta:{title:"数据管理",orderNo:1e5,ignoreAuth:!0},children:[{path:"device",name:"DevicePage",component:()=>Tt(()=>import("./index-9ac8985b.js"),["./index-9ac8985b.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-7740e10f.js","./drawer-979bd460.css","./index-acc49e4a.css"],import.meta.url),meta:{title:"设备管理",ignoreAuth:!0}},{path:"task",name:"TaskPage",component:()=>Tt(()=>import("./index-b51a6013.js"),["./index-b51a6013.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./drawer-20246748.js","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./modal-62c07bbb.js","./modal-9fe2831b.css","./drawer-1e066757.css","./result-f5f59bf1.js","./result-1c2ebb23.css","./index-dc7c3222.css"],import.meta.url),meta:{title:"任务管理",ignoreAuth:!0}},{path:"task-log",name:"TaskLogPage",component:()=>Tt(()=>import("./index-e44b7100.js"),["./index-e44b7100.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-e52e16c3.css"],import.meta.url),meta:{title:"任务日志",ignoreAuth:!0}}]},mw=Object.freeze(Object.defineProperty({__proto__:null,default:hw},Symbol.toStringTag,{value:"Module"})),gw={path:"/system",name:"System",component:Qg,meta:{title:"系统设置",orderNo:100001,ignoreAuth:!0},children:[{path:"constant",name:"ConstantPage",component:()=>Tt(()=>import("./index-5ea73e3b.js"),["./index-5ea73e3b.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./schema-0004c8eb.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-5ec4ab70.js","./index-7f0daf98.css"],import.meta.url),meta:{title:"常量管理",ignoreAuth:!0}},{path:"user",name:"UserPage",component:()=>Tt(()=>import("./index-5c55be75.js"),["./index-5c55be75.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-c24723db.js","./authorityApi-b12c1221.js","./drawer-bace9237.css","./index-5b2db5a3.css"],import.meta.url),meta:{title:"用户管理",ignoreAuth:!0}},{path:"log",name:"LogPage",component:()=>Tt(()=>import("./index-253344a3.js"),["./index-253344a3.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-b4de5e75.css"],import.meta.url),meta:{title:"日志查看",ignoreAuth:!0}}]},vw=Object.freeze(Object.defineProperty({__proto__:null,default:gw},Symbol.toStringTag,{value:"Module"})),_s={path:"/:path(.*)*",name:x3,component:mc,meta:{title:"ErrorPage",hideBreadcrumb:!0,hideMenu:!0},children:[{path:"/:path(.*)*",name:x3,component:Jg,meta:{title:"ErrorPage",hideBreadcrumb:!0,hideMenu:!0}}]},p6={path:"/redirect",component:mc,name:"RedirectTo",meta:{title:li,hideBreadcrumb:!0,hideMenu:!0},children:[{path:"/redirect/:path(.*)/:_redirect_type(.*)/:_origin_params(.*)?",name:li,component:()=>Tt(()=>import("./index-2d0e3a91.js"),["./index-2d0e3a91.js","./vue-72a104e4.js"],import.meta.url),meta:{title:li,hideBreadcrumb:!0}}]},uh=Object.assign({"./modules/about.ts":dw}),h6=[];Object.keys(uh).forEach(e=>{const t=uh[e].default||{},n=Array.isArray(t)?[...t]:[t];h6.push(...n)});const dh=[_s,...h6],fh=Object.assign({"./embedded/dashboard.ts":pw,"./embedded/data.ts":mw,"./embedded/system.ts":vw}),m6=[];Object.keys(fh).forEach(e=>{const t=fh[e].default||{},n=Array.isArray(t)?[...t]:[t];m6.push(...n)});const g6={path:"/",name:"Root",redirect:ar.BASE_HOME,meta:{title:"Root"}},v6=[g6,p6,_s,...m6],b6=[],y6=e=>e.forEach(t=>{b6.push(t.name),y6(t.children||[])});y6(v6);const yr=$g({history:Fg("./"),routes:v6,strict:!1,scrollBehavior:()=>({left:0,top:0})});function x6(){yr.getRoutes().forEach(e=>{const{name:t}=e;t&&!b6.includes(t)&&yr.hasRoute(t)&&yr.removeRoute(t)})}function bw(e){e.use(yr)}let Ad;const Kr=Ai({id:"app",state:()=>({darkMode:void 0,pageLoading:!1,projectConfig:ir.getLocal(mu),beforeMiniInfo:{}}),getters:{getPageLoading(e){return e.pageLoading},getDarkMode(e){return e.darkMode||localStorage.getItem(w3)||xx},getBeforeMiniInfo(e){return e.beforeMiniInfo},getProjectConfig(e){return e.projectConfig||{}},getHeaderSetting(){return this.getProjectConfig.headerSetting},getMenuSetting(){return this.getProjectConfig.menuSetting},getTransitionSetting(){return this.getProjectConfig.transitionSetting},getMultiTabsSetting(){return this.getProjectConfig.multiTabsSetting}},actions:{setPageLoading(e){this.pageLoading=e},setDarkMode(e){this.darkMode=e,localStorage.setItem(w3,e)},setBeforeMiniInfo(e){this.beforeMiniInfo=e},setProjectConfig(e){this.projectConfig=oc(this.projectConfig||{},e),ir.setLocal(mu,this.projectConfig)},setMenuSetting(e){this.projectConfig.menuSetting=oc(this.projectConfig.menuSetting,e),ir.setLocal(mu,this.projectConfig)},resetAllState(){return ft(this,null,function*(){x6(),ir.clearAll()})},setPageLoadingAction(e){return ft(this,null,function*(){e?(clearTimeout(Ad),Ad=setTimeout(()=>{this.setPageLoading(e)},50)):(this.setPageLoading(e),clearTimeout(Ad))})}}});function C1(){return Kr($i)}var Cs=(e=>(e.SIDEBAR="sidebar",e.MIX_SIDEBAR="mix-sidebar",e.MIX="mix",e.TOP_MENU="top-menu",e))(Cs||{}),C0=(e=>(e.NONE="NONE",e.FOOTER="FOOTER",e.HEADER="HEADER",e))(C0||{}),la=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.VERTICAL_RIGHT="vertical-right",e.INLINE="inline",e))(la||{}),yw=(e=>(e[e.NONE=0]="NONE",e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e))(yw||{}),xw=(e=>(e.CENTER="center",e.START="start",e.END="end",e))(xw||{}),C6=(e=>(e.HOVER="hover",e.CLICK="click",e))(C6||{});const Cw=()=>{const e=Kr(),t=fc(),{currentRoute:n}=t;return{getFullContent:oe(()=>{const s=Ie(n).query;return s&&Reflect.has(s,"__full__")?!0:e.getProjectConfig.fullContent})}},ph=Ne(!1);function Ew(){const{getFullContent:e}=Cw(),t=Kr(),n=oe(()=>Ie(p)||Ie(l)&&Ie(s)!==la.HORIZONTAL&&!Ie(e)),r=oe(()=>t.getMenuSetting.collapsed),o=oe(()=>t.getMenuSetting.type),s=oe(()=>t.getMenuSetting.mode),a=oe(()=>t.getMenuSetting.fixed),l=oe(()=>t.getMenuSetting.show),i=oe(()=>t.getMenuSetting.hidden),c=oe(()=>t.getMenuSetting.menuWidth),u=oe(()=>t.getMenuSetting.trigger),d=oe(()=>t.getMenuSetting.theme),p=oe(()=>t.getMenuSetting.split),C=oe(()=>t.getMenuSetting.bgColor),v=oe(()=>t.getMenuSetting.mixSideTrigger),b=oe(()=>t.getMenuSetting.canDrag),S=oe(()=>t.getMenuSetting.accordion),E=oe(()=>t.getMenuSetting.mixSideFixed),x=oe(()=>t.getMenuSetting.topMenuAlign),h=oe(()=>t.getMenuSetting.closeMixSidebarOnChange),y=oe(()=>Ie(o)===Cs.SIDEBAR),O=oe(()=>Ie(o)===Cs.TOP_MENU),T=oe(()=>t.getMenuSetting.collapsedShowTitle),M=oe(()=>Ie(s)===la.HORIZONTAL||Ie(p)),R=oe(()=>Ie(o)===Cs.TOP_MENU||!Ie(l)||Ie(i)?!1:Ie(u)===C0.HEADER),A=oe(()=>Ie(s)===la.HORIZONTAL),P=oe(()=>Ie(o)===Cs.MIX_SIDEBAR),K=oe(()=>Ie(s)===la.INLINE&&Ie(o)===Cs.MIX),Z=oe(()=>Ie(P)?Ie(r)&&!Ie(E)?Ie(V):Ie(c):Ie(r)?Ie(V):Ie(c)),V=oe(()=>{const{collapsedShowTitle:H,siderHidden:N}=t.getMenuSetting;return N?0:H?D3:I3}),se=oe(()=>{const H=Ie(O)||!Ie(l)||Ie(p)&&Ie(i)?0:Ie(P)?(Ie(r)?I3:D3)+(Ie(E)&&Ie(ph)?Ie(Z):0):Ie(Z);return`calc(100% - ${Ie(H)}px)`});function re(H){t.setMenuSetting(H)}function ee(){re({collapsed:!Ie(r)})}return{setMenuSetting:re,toggleCollapsed:ee,getMenuFixed:a,getRealWidth:Z,getMenuType:o,getMenuMode:s,getShowMenu:l,getCollapsed:r,getMiniWidthNumber:V,getCalcContentWidth:se,getMenuWidth:c,getTrigger:u,getSplit:p,getMenuTheme:d,getCanDrag:b,getCollapsedShowTitle:T,getIsHorizontal:A,getIsSidebarType:y,getAccordion:S,getShowTopMenu:M,getShowHeaderTrigger:R,getTopMenuAlign:x,getMenuHidden:i,getIsTopMenu:O,getMenuBgColor:C,getShowSidebar:n,getIsMixMode:K,getIsMixSidebar:P,getCloseMixSidebarOnChange:h,getMixSideTrigger:v,getMixSideFixed:E,mixSideHasChildren:ph}}const ww="#0960bd",Io={showSettingButton:!1,showDarkModeToggle:!0,settingButtonPosition:h5.AUTO,permissionMode:qn.ROUTE_MAPPING,permissionCacheType:o0.LOCAL,sessionTimeoutProcessing:a0.ROUTE_JUMP,themeColor:ww,grayMode:!1,colorWeak:!1,fullContent:!1,contentMode:Sl.FULL,showLogo:!0,showFooter:!1,headerSetting:{bgColor:Cx[0],fixed:!0,show:!0,theme:lr.LIGHT,useLockPage:!1,showFullScreen:!0,showDoc:!1,showNotice:!1,showSearch:!0},menuSetting:{bgColor:Ex[0],fixed:!0,collapsed:!1,siderHidden:!1,collapsedShowTitle:!1,canDrag:!1,show:!0,hidden:!1,menuWidth:210,mode:la.INLINE,type:Cs.SIDEBAR,theme:lr.DARK,split:!1,topMenuAlign:"center",trigger:C0.HEADER,accordion:!0,closeMixSidebarOnChange:!1,mixSideTrigger:C6.CLICK,mixSideFixed:!1},multiTabsSetting:{cache:!1,show:!0,canDrag:!0,showQuick:!0,showRedo:!0,showFold:!0},transitionSetting:{enable:!0,basicTransition:m5.FADE_SIDE,openPageLoading:!0,openNProgress:!1},openKeepAlive:!0,lockTime:0,showBreadCrumb:!0,showBreadCrumbIcon:!1,useErrorHandle:!1,useOpenBackTop:!0,canEmbedIFramePage:!0,closeMessageOnSwitch:!0,removeAllHttpPending:!1},{permissionCacheType:Sw}=Io,E6=Sw===o0.LOCAL;function _w(){return gu(sc)}function gu(e){return(E6?ir.getLocal:ir.getSession)(e)}function Id(e,t){return(E6?ir.setLocal:ir.setSession)(e,t,!0)}function w6(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ow}=Object.prototype,{getPrototypeOf:E0}=Object,E1=(e=>t=>{const n=Ow.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),uo=e=>(e=e.toLowerCase(),t=>E1(t)===e),w1=e=>t=>typeof t===e,{isArray:Bi}=Array,ic=w1("undefined");function Tw(e){return e!==null&&!ic(e)&&e.constructor!==null&&!ic(e.constructor)&&Ar(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S6=uo("ArrayBuffer");function Mw(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S6(e.buffer),t}const Rw=w1("string"),Ar=w1("function"),_6=w1("number"),S1=e=>e!==null&&typeof e=="object",Lw=e=>e===!0||e===!1,vu=e=>{if(E1(e)!=="object")return!1;const t=E0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kw=uo("Date"),Aw=uo("File"),Iw=uo("Blob"),Dw=uo("FileList"),Pw=e=>S1(e)&&Ar(e.pipe),Nw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ar(e.append)&&((t=E1(e))==="formdata"||t==="object"&&Ar(e.toString)&&e.toString()==="[object FormData]"))},$w=uo("URLSearchParams"),[Fw,Bw,Vw,Hw]=["ReadableStream","Request","Response","Headers"].map(uo),jw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Bi(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ca=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),T6=e=>!ic(e)&&e!==ca;function t2(){const{caseless:e}=T6(this)&&this||{},t={},n=(r,o)=>{const s=e&&O6(t,o)||o;vu(t[s])&&vu(r)?t[s]=t2(t[s],r):vu(r)?t[s]=t2({},r):Bi(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r(gc(t,(o,s)=>{n&&Ar(o)?e[s]=w6(o,n):e[s]=o},{allOwnKeys:r}),e),zw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Uw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},qw=(e,t,n,r)=>{let o,s,a;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&E0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zw=e=>{if(!e)return null;if(Bi(e))return e;let t=e.length;if(!_6(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&E0(Uint8Array)),Kw=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Xw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jw=uo("HTMLFormElement"),Qw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eS=uo("RegExp"),M6=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};gc(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},tS=e=>{M6(e,(t,n)=>{if(Ar(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ar(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nS=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Bi(e)?r(e):r(String(e).split(t)),n},rS=()=>{},oS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Dd="abcdefghijklmnopqrstuvwxyz",mh="0123456789",R6={DIGIT:mh,ALPHA:Dd,ALPHA_DIGIT:Dd+Dd.toUpperCase()+mh},sS=(e=16,t=R6.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function aS(e){return!!(e&&Ar(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const iS=e=>{const t=new Array(10),n=(r,o)=>{if(S1(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Bi(r)?[]:{};return gc(r,(a,l)=>{const i=n(a,o+1);!ic(i)&&(s[l]=i)}),t[o]=void 0,s}}return r};return n(e,0)},lS=uo("AsyncFunction"),cS=e=>e&&(S1(e)||Ar(e))&&Ar(e.then)&&Ar(e.catch),L6=((e,t)=>e?setImmediate:t?((n,r)=>(ca.addEventListener("message",({source:o,data:s})=>{o===ca&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ca.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ar(ca.postMessage)),uS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ca):typeof process!="undefined"&&process.nextTick||L6,ze={isArray:Bi,isArrayBuffer:S6,isBuffer:Tw,isFormData:Nw,isArrayBufferView:Mw,isString:Rw,isNumber:_6,isBoolean:Lw,isObject:S1,isPlainObject:vu,isReadableStream:Fw,isRequest:Bw,isResponse:Vw,isHeaders:Hw,isUndefined:ic,isDate:kw,isFile:Aw,isBlob:Iw,isRegExp:eS,isFunction:Ar,isStream:Pw,isURLSearchParams:$w,isTypedArray:Yw,isFileList:Dw,forEach:gc,merge:t2,extend:Ww,trim:jw,stripBOM:zw,inherits:Uw,toFlatObject:qw,kindOf:E1,kindOfTest:uo,endsWith:Gw,toArray:Zw,forEachEntry:Kw,matchAll:Xw,isHTMLForm:Jw,hasOwnProperty:hh,hasOwnProp:hh,reduceDescriptors:M6,freezeMethods:tS,toObjectSet:nS,toCamelCase:Qw,noop:rS,toFiniteNumber:oS,findKey:O6,global:ca,isContextDefined:T6,ALPHABET:R6,generateString:sS,isSpecCompliantForm:aS,toJSONObject:iS,isAsyncFn:lS,isThenable:cS,setImmediate:L6,asap:uS};function Pt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}ze.inherits(Pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ze.toJSONObject(this.config),code:this.code,status:this.status}}});const k6=Pt.prototype,A6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{A6[e]={value:e}});Object.defineProperties(Pt,A6);Object.defineProperty(k6,"isAxiosError",{value:!0});Pt.from=(e,t,n,r,o,s)=>{const a=Object.create(k6);return ze.toFlatObject(e,a,function(i){return i!==Error.prototype},l=>l!=="isAxiosError"),Pt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const dS=null;function n2(e){return ze.isPlainObject(e)||ze.isArray(e)}function I6(e){return ze.endsWith(e,"[]")?e.slice(0,-2):e}function gh(e,t,n){return e?e.concat(t).map(function(o,s){return o=I6(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function fS(e){return ze.isArray(e)&&!e.some(n2)}const pS=ze.toFlatObject(ze,{},null,function(t){return/^is[A-Z]/.test(t)});function _1(e,t,n){if(!ze.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ze.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,S){return!ze.isUndefined(S[b])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,a=n.indexes,i=(n.Blob||typeof Blob!="undefined"&&Blob)&&ze.isSpecCompliantForm(t);if(!ze.isFunction(o))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(ze.isDate(v))return v.toISOString();if(!i&&ze.isBlob(v))throw new Pt("Blob is not supported. Use a Buffer instead.");return ze.isArrayBuffer(v)||ze.isTypedArray(v)?i&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,b,S){let E=v;if(v&&!S&&typeof v=="object"){if(ze.endsWith(b,"{}"))b=r?b:b.slice(0,-2),v=JSON.stringify(v);else if(ze.isArray(v)&&fS(v)||(ze.isFileList(v)||ze.endsWith(b,"[]"))&&(E=ze.toArray(v)))return b=I6(b),E.forEach(function(h,y){!(ze.isUndefined(h)||h===null)&&t.append(a===!0?gh([b],y,s):a===null?b:b+"[]",c(h))}),!1}return n2(v)?!0:(t.append(gh(S,b,s),c(v)),!1)}const d=[],p=Object.assign(pS,{defaultVisitor:u,convertValue:c,isVisitable:n2});function C(v,b){if(!ze.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+b.join("."));d.push(v),ze.forEach(v,function(E,x){(!(ze.isUndefined(E)||E===null)&&o.call(t,E,ze.isString(x)?x.trim():x,b,p))===!0&&C(E,b?b.concat(x):[x])}),d.pop()}}if(!ze.isObject(e))throw new TypeError("data must be an object");return C(e),t}function vh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function w0(e,t){this._pairs=[],e&&_1(e,this,t)}const D6=w0.prototype;D6.append=function(t,n){this._pairs.push([t,n])};D6.toString=function(t){const n=t?function(r){return t.call(this,r,vh)}:vh;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function P6(e,t,n){if(!t)return e;const r=n&&n.encode||hS,o=n&&n.serialize;let s;if(o?s=o(t,n):s=ze.isURLSearchParams(t)?t.toString():new w0(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class mS{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ze.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bh=mS,N6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gS=typeof URLSearchParams!="undefined"?URLSearchParams:w0,vS=typeof FormData!="undefined"?FormData:null,bS=typeof Blob!="undefined"?Blob:null,yS={isBrowser:!0,classes:{URLSearchParams:gS,FormData:vS,Blob:bS},protocols:["http","https","file","blob","url","data"]},S0=typeof window!="undefined"&&typeof document!="undefined",r2=typeof navigator=="object"&&navigator||void 0,xS=S0&&(!r2||["ReactNative","NativeScript","NS"].indexOf(r2.product)<0),CS=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ES=S0&&window.location.href||"http://localhost",wS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:S0,hasStandardBrowserEnv:xS,hasStandardBrowserWebWorkerEnv:CS,navigator:r2,origin:ES},Symbol.toStringTag,{value:"Module"})),xr=at(at({},wS),yS);function SS(e,t){return _1(e,new xr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return xr.isNode&&ze.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function _S(e){return ze.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function OS(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r=n.length;return a=!a&&ze.isArray(o)?o.length:a,i?(ze.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!l):((!o[a]||!ze.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&ze.isArray(o[a])&&(o[a]=OS(o[a])),!l)}if(ze.isFormData(e)&&ze.isFunction(e.entries)){const n={};return ze.forEachEntry(e,(r,o)=>{t(_S(r),o,n,0)}),n}return null}function TS(e,t,n){if(ze.isString(e))try{return(t||JSON.parse)(e),ze.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _0={transitional:N6,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=ze.isObject(t);if(s&&ze.isHTMLForm(t)&&(t=new FormData(t)),ze.isFormData(t))return o?JSON.stringify($6(t)):t;if(ze.isArrayBuffer(t)||ze.isBuffer(t)||ze.isStream(t)||ze.isFile(t)||ze.isBlob(t)||ze.isReadableStream(t))return t;if(ze.isArrayBufferView(t))return t.buffer;if(ze.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return SS(t,this.formSerializer).toString();if((l=ze.isFileList(t))||r.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return _1(l?{"files[]":t}:t,i&&new i,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),TS(t)):t}],transformResponse:[function(t){const n=this.transitional||_0.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(ze.isResponse(t)||ze.isReadableStream(t))return t;if(t&&ze.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?Pt.from(l,Pt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ze.forEach(["delete","get","head","post","put","patch"],e=>{_0.headers[e]={}});const O0=_0,MS=ze.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RS=e=>{const t={};let n,r,o;return e&&e.split(` + */var Re=Yx,Ct=OE,Ft=TE;const e6="9.14.1",t6=Ct.CoreWarnCodes.__EXTEND_POINT__,Wo=Re.incrementer(t6),un={FALLBACK_TO_ROOT:t6,NOT_SUPPORTED_PRESERVE:Wo(),NOT_SUPPORTED_FORMATTER:Wo(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Wo(),NOT_SUPPORTED_GET_CHOICE_INDEX:Wo(),COMPONENT_NAME_LEGACY_COMPATIBLE:Wo(),NOT_FOUND_PARENT_SCOPE:Wo(),IGNORE_OBJ_FLATTEN:Wo(),NOTICE_DROP_ALLOW_COMPOSITION:Wo(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Wo()},ME={[un.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[un.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[un.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[un.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[un.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[un.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[un.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[un.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[un.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[un.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function vr(e,...t){return Re.format(ME[e],...t)}const n6=Ct.CoreErrorCodes.__EXTEND_POINT__,mr=Re.incrementer(n6),zt={UNEXPECTED_RETURN_TYPE:n6,INVALID_ARGUMENT:mr(),MUST_BE_CALL_SETUP_TOP:mr(),NOT_INSTALLED:mr(),NOT_AVAILABLE_IN_LEGACY_MODE:mr(),REQUIRED_VALUE:mr(),INVALID_VALUE:mr(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:mr(),NOT_INSTALLED_WITH_PROVIDE:mr(),UNEXPECTED_ERROR:mr(),NOT_COMPATIBLE_LEGACY_VUE_I18N:mr(),BRIDGE_SUPPORT_VUE_2_ONLY:mr(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:mr(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:mr(),__EXTEND_POINT__:mr()};function In(e,...t){return Ct.createCompileError(e,null,{messages:RE,args:t})}const RE={[zt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[zt.INVALID_ARGUMENT]:"Invalid argument",[zt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[zt.NOT_INSTALLED]:"Need to install with `app.use` function",[zt.UNEXPECTED_ERROR]:"Unexpected error",[zt.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[zt.REQUIRED_VALUE]:"Required in value: {0}",[zt.INVALID_VALUE]:"Invalid value",[zt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[zt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[zt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[zt.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[zt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[zt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},qf=Re.makeSymbol("__translateVNode"),Gf=Re.makeSymbol("__datetimeParts"),Zf=Re.makeSymbol("__numberParts"),Yf=Re.makeSymbol("__enableEmitter"),Kf=Re.makeSymbol("__disableEmitter"),r6=Re.makeSymbol("__setPluralRules");Re.makeSymbol("__intlifyMeta");const o6=Re.makeSymbol("__injectWithOption"),Xf=Re.makeSymbol("__dispose"),LE="__VUE_I18N_BRIDGE__";function ac(e){if(!Re.isObject(e))return e;for(const t in e)if(Re.hasOwn(e,t))if(!t.includes("."))Re.isObject(e[t])&&ac(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,s=!1;for(let a=0;a{if("locale"in l&&"resource"in l){const{locale:i,resource:c}=l;i?(a[i]=a[i]||{},Re.deepCopy(c,a[i])):Re.deepCopy(c,a)}else Re.isString(l)&&Re.deepCopy(JSON.parse(l),a)}),o==null&&s)for(const l in a)Re.hasOwn(a,l)&&ac(a[l]);return a}function s6(e){return e.type}function a6(e,t,n){let r=Re.isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=y1(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(Re.isObject(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(Re.isObject(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function Q3(e){return Ft.createVNode(Ft.Text,null,e,0)}const eh="__INTLIFY_META__",th=()=>[],kE=()=>!1;let nh=0;function rh(e){return(t,n,r,o)=>e(n,r,Ft.getCurrentInstance()||void 0,o)}const AE=()=>{const e=Ft.getCurrentInstance();let t=null;return e&&(t=s6(e)[eh])?{[eh]:t}:null};function g0(e={},t){const{__root:n,__injectWithOption:r}=e,o=n===void 0,s=e.flatJson,a=Re.inBrowser?Ft.ref:Ft.shallowRef,l=!!e.translateExistCompatible;l&&Re.warnOnce(vr(un.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let i=Re.isBoolean(e.inheritLocale)?e.inheritLocale:!0;const c=a(n&&i?n.locale.value:Re.isString(e.locale)?e.locale:Ct.DEFAULT_LOCALE),u=a(n&&i?n.fallbackLocale.value:Re.isString(e.fallbackLocale)||Re.isArray(e.fallbackLocale)||Re.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),d=a(y1(c.value,e)),p=a(Re.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),C=a(Re.isPlainObject(e.numberFormats)?e.numberFormats:{[c.value]:{}});let v=n?n.missingWarn:Re.isBoolean(e.missingWarn)||Re.isRegExp(e.missingWarn)?e.missingWarn:!0,b=n?n.fallbackWarn:Re.isBoolean(e.fallbackWarn)||Re.isRegExp(e.fallbackWarn)?e.fallbackWarn:!0,S=n?n.fallbackRoot:Re.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,E=!!e.fallbackFormat,x=Re.isFunction(e.missing)?e.missing:null,h=Re.isFunction(e.missing)?rh(e.missing):null,y=Re.isFunction(e.postTranslation)?e.postTranslation:null,O=n?n.warnHtmlMessage:Re.isBoolean(e.warnHtmlMessage)?e.warnHtmlMessage:!0,T=!!e.escapeParameter;const M=n?n.modifiers:Re.isPlainObject(e.modifiers)?e.modifiers:{};let R=e.pluralRules||n&&n.pluralRules,A;A=(()=>{o&&Ct.setFallbackContext(null);const Q={version:e6,locale:c.value,fallbackLocale:u.value,messages:d.value,modifiers:M,pluralRules:R,missing:h===null?void 0:h,missingWarn:v,fallbackWarn:b,fallbackFormat:E,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:O,escapeParameter:T,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Q.datetimeFormats=p.value,Q.numberFormats=C.value,Q.__datetimeFormatters=Re.isPlainObject(A)?A.__datetimeFormatters:void 0,Q.__numberFormatters=Re.isPlainObject(A)?A.__numberFormatters:void 0,Q.__v_emitter=Re.isPlainObject(A)?A.__v_emitter:void 0;const ce=Ct.createCoreContext(Q);return o&&Ct.setFallbackContext(ce),ce})(),Ct.updateFallbackLocale(A,c.value,u.value);function K(){return[c.value,u.value,d.value,p.value,C.value]}const Z=Ft.computed({get:()=>c.value,set:Q=>{c.value=Q,A.locale=c.value}}),V=Ft.computed({get:()=>u.value,set:Q=>{u.value=Q,A.fallbackLocale=u.value,Ct.updateFallbackLocale(A,c.value,Q)}}),se=Ft.computed(()=>d.value),re=Ft.computed(()=>p.value),ee=Ft.computed(()=>C.value);function H(){return Re.isFunction(y)?y:null}function N(Q){y=Q,A.postTranslation=Q}function $(){return x}function X(Q){Q!==null&&(h=rh(Q)),x=Q,A.missing=h}function F(Q,ce){return Q!=="translate"||!ce.resolvedMessage}const J=(Q,ce,z,le,Te,Ge)=>{K();let qe;try{Ct.setAdditionalMeta(AE()),o||(A.fallbackContext=n?Ct.getFallbackContext():void 0),qe=Q(A)}finally{Ct.setAdditionalMeta(null),o||(A.fallbackContext=void 0)}if(z!=="translate exists"&&Re.isNumber(qe)&&qe===Ct.NOT_REOSLVED||z==="translate exists"&&!qe){const[Ye,tt]=ce();if(n&&Re.isString(Ye)&&F(z,tt)){S&&(Ct.isTranslateFallbackWarn(b,Ye)||Ct.isTranslateMissingWarn(v,Ye))&&Re.warn(vr(un.FALLBACK_TO_ROOT,{key:Ye,type:z}));{const{__v_emitter:et}=A;et&&S&&et.emit("fallback",{type:z,key:Ye,to:"global",groupId:`${z}:${Ye}`})}}return n&&S?le(n):Te(Ye)}else{if(Ge(qe))return qe;throw In(zt.UNEXPECTED_RETURN_TYPE)}};function ue(...Q){return J(ce=>Reflect.apply(Ct.translate,null,[ce,...Q]),()=>Ct.parseTranslateArgs(...Q),"translate",ce=>Reflect.apply(ce.t,ce,[...Q]),ce=>ce,ce=>Re.isString(ce))}function ae(...Q){const[ce,z,le]=Q;if(le&&!Re.isObject(le))throw In(zt.INVALID_ARGUMENT);return ue(ce,z,Re.assign({resolvedMessage:!0},le||{}))}function $e(...Q){return J(ce=>Reflect.apply(Ct.datetime,null,[ce,...Q]),()=>Ct.parseDateTimeArgs(...Q),"datetime format",ce=>Reflect.apply(ce.d,ce,[...Q]),()=>Ct.MISSING_RESOLVE_VALUE,ce=>Re.isString(ce))}function We(...Q){return J(ce=>Reflect.apply(Ct.number,null,[ce,...Q]),()=>Ct.parseNumberArgs(...Q),"number format",ce=>Reflect.apply(ce.n,ce,[...Q]),()=>Ct.MISSING_RESOLVE_VALUE,ce=>Re.isString(ce))}function Ce(Q){return Q.map(ce=>Re.isString(ce)||Re.isNumber(ce)||Re.isBoolean(ce)?Q3(String(ce)):ce)}const pe={normalize:Ce,interpolate:Q=>Q,type:"vnode"};function xe(...Q){return J(ce=>{let z;const le=ce;try{le.processor=pe,z=Reflect.apply(Ct.translate,null,[le,...Q])}finally{le.processor=null}return z},()=>Ct.parseTranslateArgs(...Q),"translate",ce=>ce[qf](...Q),ce=>[Q3(ce)],ce=>Re.isArray(ce))}function Se(...Q){return J(ce=>Reflect.apply(Ct.number,null,[ce,...Q]),()=>Ct.parseNumberArgs(...Q),"number format",ce=>ce[Zf](...Q),th,ce=>Re.isString(ce)||Re.isArray(ce))}function De(...Q){return J(ce=>Reflect.apply(Ct.datetime,null,[ce,...Q]),()=>Ct.parseDateTimeArgs(...Q),"datetime format",ce=>ce[Gf](...Q),th,ce=>Re.isString(ce)||Re.isArray(ce))}function be(Q){R=Q,A.pluralRules=R}function Y(Q,ce){return J(()=>{if(!Q)return!1;const z=Re.isString(ce)?ce:c.value,le=Me(z),Te=A.messageResolver(le,Q);return l?Te!=null:Ct.isMessageAST(Te)||Ct.isMessageFunction(Te)||Re.isString(Te)},()=>[Q],"translate exists",z=>Reflect.apply(z.te,z,[Q,ce]),kE,z=>Re.isBoolean(z))}function de(Q){let ce=null;const z=Ct.fallbackWithLocaleChain(A,u.value,c.value);for(let le=0;le{i&&(c.value=Q,A.locale=Q,Ct.updateFallbackLocale(A,c.value,u.value))}),Ft.watch(n.fallbackLocale,Q=>{i&&(u.value=Q,A.fallbackLocale=Q,Ct.updateFallbackLocale(A,c.value,u.value))}));const me={id:nh,locale:Z,fallbackLocale:V,get inheritLocale(){return i},set inheritLocale(Q){i=Q,Q&&n&&(c.value=n.locale.value,u.value=n.fallbackLocale.value,Ct.updateFallbackLocale(A,c.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:se,get modifiers(){return M},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return v},set missingWarn(Q){v=Q,A.missingWarn=v},get fallbackWarn(){return b},set fallbackWarn(Q){b=Q,A.fallbackWarn=b},get fallbackRoot(){return S},set fallbackRoot(Q){S=Q},get fallbackFormat(){return E},set fallbackFormat(Q){E=Q,A.fallbackFormat=E},get warnHtmlMessage(){return O},set warnHtmlMessage(Q){O=Q,A.warnHtmlMessage=Q},get escapeParameter(){return T},set escapeParameter(Q){T=Q,A.escapeParameter=Q},t:ue,getLocaleMessage:Me,setLocaleMessage:Oe,mergeLocaleMessage:je,getPostTranslationHandler:H,setPostTranslationHandler:N,getMissingHandler:$,setMissingHandler:X,[r6]:be};return me.datetimeFormats=re,me.numberFormats=ee,me.rt=ae,me.te=Y,me.tm=_e,me.d=$e,me.n=We,me.getDateTimeFormat=W,me.setDateTimeFormat=G,me.mergeDateTimeFormat=ye,me.getNumberFormat=Ee,me.setNumberFormat=ke,me.mergeNumberFormat=ie,me[o6]=r,me[qf]=xe,me[Gf]=De,me[Zf]=Se,me[Yf]=Q=>{A.__v_emitter=Q},me[Kf]=()=>{A.__v_emitter=void 0},me}function IE(e){const t=Re.isString(e.locale)?e.locale:Ct.DEFAULT_LOCALE,n=Re.isString(e.fallbackLocale)||Re.isArray(e.fallbackLocale)||Re.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Re.isFunction(e.missing)?e.missing:void 0,o=Re.isBoolean(e.silentTranslationWarn)||Re.isRegExp(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=Re.isBoolean(e.silentFallbackWarn)||Re.isRegExp(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=Re.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,i=Re.isPlainObject(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Re.isFunction(e.postTranslation)?e.postTranslation:void 0,d=Re.isString(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,C=Re.isBoolean(e.sync)?e.sync:!0;e.formatter&&Re.warn(vr(un.NOT_SUPPORTED_FORMATTER)),e.preserveDirectiveContent&&Re.warn(vr(un.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let v=e.messages;if(Re.isPlainObject(e.sharedMessages)){const T=e.sharedMessages;v=Object.keys(T).reduce((R,A)=>{const P=R[A]||(R[A]={});return Re.assign(P,T[A]),R},v||{})}const{__i18n:b,__root:S,__injectWithOption:E}=e,x=e.datetimeFormats,h=e.numberFormats,y=e.flatJson,O=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:v,flatJson:y,datetimeFormats:x,numberFormats:h,missing:r,missingWarn:o,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:i,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:C,translateExistCompatible:O,__i18n:b,__root:S,__injectWithOption:E}}function Jf(e={},t){{const n=g0(IE(e)),{__extender:r}=e,o={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return Re.warn(vr(un.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(s){Re.warn(vr(un.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return Re.isBoolean(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=Re.isBoolean(s)?!s:s},get silentFallbackWarn(){return Re.isBoolean(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=Re.isBoolean(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return Re.warn(vr(un.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(s){Re.warn(vr(un.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[a,l,i]=s,c={};let u=null,d=null;if(!Re.isString(a))throw In(zt.INVALID_ARGUMENT);const p=a;return Re.isString(l)?c.locale=l:Re.isArray(l)?u=l:Re.isPlainObject(l)&&(d=l),Re.isArray(i)?u=i:Re.isPlainObject(i)&&(d=i),Reflect.apply(n.t,n,[p,u||d||{},c])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[a,l,i]=s,c={plural:1};let u=null,d=null;if(!Re.isString(a))throw In(zt.INVALID_ARGUMENT);const p=a;return Re.isString(l)?c.locale=l:Re.isNumber(l)?c.plural=l:Re.isArray(l)?u=l:Re.isPlainObject(l)&&(d=l),Re.isString(i)?c.locale=i:Re.isArray(i)?u=i:Re.isPlainObject(i)&&(d=i),Reflect.apply(n.t,n,[p,u||d||{},c])},te(s,a){return n.te(s,a)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,a){n.setLocaleMessage(s,a)},mergeLocaleMessage(s,a){n.mergeLocaleMessage(s,a)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,a){n.setDateTimeFormat(s,a)},mergeDateTimeFormat(s,a){n.mergeDateTimeFormat(s,a)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,a){n.setNumberFormat(s,a)},mergeNumberFormat(s,a){n.mergeNumberFormat(s,a)},getChoiceIndex(s,a){return Re.warn(vr(un.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return o.__extender=r,o.__enableEmitter=s=>{const a=n;a[Yf]&&a[Yf](s)},o.__disableEmitter=()=>{const s=n;s[Kf]&&s[Kf]()},o}}const v0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function DE({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===Ft.Fragment?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function i6(e){return Ft.Fragment}const PE=Ft.defineComponent({name:"i18n-t",props:Re.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Re.isNumber(e)||!isNaN(e)}},v0),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||x1({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(d=>d!=="_"),a={};e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=Re.isString(e.plural)?+e.plural:e.plural);const l=DE(t,s),i=o[qf](e.keypath,l,a),c=Re.assign({},r),u=Re.isString(e.tag)||Re.isObject(e.tag)?e.tag:i6();return Ft.h(u,c,i)}}}),_l=PE,NE=_l;function $E(e){return Re.isArray(e)&&!Re.isString(e[0])}function l6(e,t,n,r){const{slots:o,attrs:s}=t;return()=>{const a={part:!0};let l={};e.locale&&(a.locale=e.locale),Re.isString(e.format)?a.key=e.format:Re.isObject(e.format)&&(Re.isString(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((p,C)=>n.includes(C)?Re.assign({},p,{[C]:e.format[C]}):p,{}));const i=r(e.value,a,l);let c=[a.key];Re.isArray(i)?c=i.map((p,C)=>{const v=o[p.type],b=v?v({[p.type]:p.value,index:C,parts:i}):[p.value];return $E(b)&&(b[0].key=`${p.type}-${C}`),b}):Re.isString(i)&&(c=[i]);const u=Re.assign({},s),d=Re.isString(e.tag)||Re.isObject(e.tag)?e.tag:i6();return Ft.h(d,u,c)}}const FE=Ft.defineComponent({name:"i18n-n",props:Re.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},v0),setup(e,t){const n=e.i18n||x1({useScope:e.scope,__useComponent:!0});return l6(e,t,Ct.NUMBER_FORMAT_OPTIONS_KEYS,(...r)=>n[Zf](...r))}}),Nu=FE,BE=Nu,VE=Ft.defineComponent({name:"i18n-d",props:Re.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},v0),setup(e,t){const n=e.i18n||x1({useScope:e.scope,__useComponent:!0});return l6(e,t,Ct.DATETIME_FORMAT_OPTIONS_KEYS,(...r)=>n[Gf](...r))}}),$u=VE,HE=$u;function jE(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function c6(e){const t=a=>{const{instance:l,modifiers:i,value:c}=a;if(!l||!l.$)throw In(zt.UNEXPECTED_ERROR);const u=jE(e,l.$);i.preserve&&Re.warn(vr(un.NOT_SUPPORTED_PRESERVE));const d=oh(c);return[Reflect.apply(u.t,u,[...sh(d)]),u]};return{created:(a,l)=>{const[i,c]=t(l);Re.inBrowser&&e.global===c&&(a.__i18nWatcher=Ft.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=i},unmounted:a=>{Re.inBrowser&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const i=a.__composer,c=oh(l);a.textContent=Reflect.apply(i.t,i,[...sh(c)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function oh(e){if(Re.isString(e))return{path:e};if(Re.isPlainObject(e)){if(!("path"in e))throw In(zt.REQUIRED_VALUE,"path");return e}else throw In(zt.INVALID_VALUE)}function sh(e){const{path:t,locale:n,args:r,choice:o,plural:s}=e,a={},l=r||{};return Re.isString(n)&&(a.locale=n),Re.isNumber(o)&&(a.plural=o),Re.isNumber(s)&&(a.plural=s),[t,l,a]}function WE(e,t,...n){const r=Re.isPlainObject(n[0])?n[0]:{},o=!!r.useI18nComponentName,s=Re.isBoolean(r.globalInstall)?r.globalInstall:!0;s&&o&&Re.warn(vr(un.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:_l.name})),s&&([o?"i18n":_l.name,"I18nT"].forEach(a=>e.component(a,_l)),[Nu.name,"I18nN"].forEach(a=>e.component(a,Nu)),[$u.name,"I18nD"].forEach(a=>e.component(a,$u))),e.directive("t",c6(t))}function zE(e,t,n){return{beforeCreate(){const r=Ft.getCurrentInstance();if(!r)throw In(zt.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=t,this===this.$root)this.$i18n=ah(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Jf(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=ah(e,o);else{this.$i18n=Jf({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&a6(t,o,o),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=Ft.getCurrentInstance();if(!r)throw In(zt.UNEXPECTED_ERROR);const o=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n}}}function ah(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[r6](t.pluralizationRules||e.pluralizationRules);const n=y1(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const u6=Re.makeSymbol("global-vue-i18n");function UE(e={},t){const n=Re.isBoolean(e.legacy)?e.legacy:!0,r=Re.isBoolean(e.globalInjection)?e.globalInjection:!0,o=n?!!e.allowComposition:!0,s=new Map,[a,l]=GE(e,n),i=Re.makeSymbol("vue-i18n");n&&o&&Re.warn(vr(un.NOTICE_DROP_ALLOW_COMPOSITION));function c(p){return s.get(p)||null}function u(p,C){s.set(p,C)}function d(p){s.delete(p)}{let C;const p={get mode(){return n?"legacy":"composition"},get allowComposition(){return o},install(v,...b){return ft(this,null,function*(){if(v.__VUE_I18N_SYMBOL__=i,v.provide(v.__VUE_I18N_SYMBOL__,p),Re.isPlainObject(b[0])){const x=b[0];p.__composerExtend=x.__composerExtend,p.__vueI18nExtend=x.__vueI18nExtend}let S=null;!n&&r&&(S=nw(v,p.global)),WE(v,p,...b),n&&v.mixin(zE(l,l.__composer,p));const E=v.unmount;v.unmount=()=>{S&&S(),p.dispose(),E()}})},get global(){return l},dispose(){a.stop()},__instances:s,__getInstance:c,__setInstance:u,__deleteInstance:d};return p}}function x1(e={}){const t=Ft.getCurrentInstance();if(t==null)throw In(zt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw In(zt.NOT_INSTALLED);const n=ZE(t),r=KE(n),o=s6(t),s=YE(e,o);if(n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw In(zt.NOT_AVAILABLE_IN_LEGACY_MODE);return ew(t,s,r,e)}if(s==="global")return a6(r,e,o),r;if(s==="parent"){let i=XE(n,t,e.__useComponent);return i==null&&(Re.warn(vr(un.NOT_FOUND_PARENT_SCOPE)),i=r),i}const a=n;let l=a.__getInstance(t);if(l==null){const i=Re.assign({},e);"__i18n"in o&&(i.__i18n=o.__i18n),r&&(i.__root=r),l=g0(i),a.__composerExtend&&(l[Xf]=a.__composerExtend(l)),QE(a,t,l),a.__setInstance(t,l)}return l}const qE=e=>{if(!(LE in e))throw In(zt.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function GE(e,t,n){const r=Ft.effectScope();{const o=t?r.run(()=>Jf(e)):r.run(()=>g0(e));if(o==null)throw In(zt.UNEXPECTED_ERROR);return[r,o]}}function ZE(e){{const t=Ft.inject(e.isCE?u6:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw In(e.isCE?zt.NOT_INSTALLED_WITH_PROVIDE:zt.UNEXPECTED_ERROR);return t}}function YE(e,t){return Re.isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function KE(e){return e.mode==="composition"?e.global:e.global.__composer}function XE(e,t,n=!1){let r=null;const o=t.root;let s=JE(t,n);for(;s!=null;){const a=e;if(e.mode==="composition")r=a.__getInstance(s);else{const l=a.__getInstance(s);l!=null&&(r=l.__composer,n&&r&&!r[o6]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function JE(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function QE(e,t,n){Ft.onMounted(()=>{},t),Ft.onUnmounted(()=>{const r=n;e.__deleteInstance(t);const o=r[Xf];o&&(o(),delete r[Xf])},t)}function ew(e,t,n,r={}){const o=t==="local",s=Ft.shallowRef(null);if(o&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw In(zt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const a=Re.isBoolean(r.inheritLocale)?r.inheritLocale:!Re.isString(r.locale),l=Ft.ref(!o||a?n.locale.value:Re.isString(r.locale)?r.locale:Ct.DEFAULT_LOCALE),i=Ft.ref(!o||a?n.fallbackLocale.value:Re.isString(r.fallbackLocale)||Re.isArray(r.fallbackLocale)||Re.isPlainObject(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),c=Ft.ref(y1(l.value,r)),u=Ft.ref(Re.isPlainObject(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),d=Ft.ref(Re.isPlainObject(r.numberFormats)?r.numberFormats:{[l.value]:{}}),p=o?n.missingWarn:Re.isBoolean(r.missingWarn)||Re.isRegExp(r.missingWarn)?r.missingWarn:!0,C=o?n.fallbackWarn:Re.isBoolean(r.fallbackWarn)||Re.isRegExp(r.fallbackWarn)?r.fallbackWarn:!0,v=o?n.fallbackRoot:Re.isBoolean(r.fallbackRoot)?r.fallbackRoot:!0,b=!!r.fallbackFormat,S=Re.isFunction(r.missing)?r.missing:null,E=Re.isFunction(r.postTranslation)?r.postTranslation:null,x=o?n.warnHtmlMessage:Re.isBoolean(r.warnHtmlMessage)?r.warnHtmlMessage:!0,h=!!r.escapeParameter,y=o?n.modifiers:Re.isPlainObject(r.modifiers)?r.modifiers:{},O=r.pluralRules||o&&n.pluralRules;function T(){return[l.value,i.value,c.value,u.value,d.value]}const M=Ft.computed({get:()=>s.value?s.value.locale.value:l.value,set:Y=>{s.value&&(s.value.locale.value=Y),l.value=Y}}),R=Ft.computed({get:()=>s.value?s.value.fallbackLocale.value:i.value,set:Y=>{s.value&&(s.value.fallbackLocale.value=Y),i.value=Y}}),A=Ft.computed(()=>s.value?s.value.messages.value:c.value),P=Ft.computed(()=>u.value),K=Ft.computed(()=>d.value);function Z(){return s.value?s.value.getPostTranslationHandler():E}function V(Y){s.value&&s.value.setPostTranslationHandler(Y)}function se(){return s.value?s.value.getMissingHandler():S}function re(Y){s.value&&s.value.setMissingHandler(Y)}function ee(Y){return T(),Y()}function H(...Y){return s.value?ee(()=>Reflect.apply(s.value.t,null,[...Y])):ee(()=>"")}function N(...Y){return s.value?Reflect.apply(s.value.rt,null,[...Y]):""}function $(...Y){return s.value?ee(()=>Reflect.apply(s.value.d,null,[...Y])):ee(()=>"")}function X(...Y){return s.value?ee(()=>Reflect.apply(s.value.n,null,[...Y])):ee(()=>"")}function F(Y){return s.value?s.value.tm(Y):{}}function J(Y,de){return s.value?s.value.te(Y,de):!1}function ue(Y){return s.value?s.value.getLocaleMessage(Y):{}}function ae(Y,de){s.value&&(s.value.setLocaleMessage(Y,de),c.value[Y]=de)}function $e(Y,de){s.value&&s.value.mergeLocaleMessage(Y,de)}function We(Y){return s.value?s.value.getDateTimeFormat(Y):{}}function Ce(Y,de){s.value&&(s.value.setDateTimeFormat(Y,de),u.value[Y]=de)}function U(Y,de){s.value&&s.value.mergeDateTimeFormat(Y,de)}function pe(Y){return s.value?s.value.getNumberFormat(Y):{}}function xe(Y,de){s.value&&(s.value.setNumberFormat(Y,de),d.value[Y]=de)}function Se(Y,de){s.value&&s.value.mergeNumberFormat(Y,de)}const De={get id(){return s.value?s.value.id:-1},locale:M,fallbackLocale:R,messages:A,datetimeFormats:P,numberFormats:K,get inheritLocale(){return s.value?s.value.inheritLocale:a},set inheritLocale(Y){s.value&&(s.value.inheritLocale=Y)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(c.value)},get modifiers(){return s.value?s.value.modifiers:y},get pluralRules(){return s.value?s.value.pluralRules:O},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:p},set missingWarn(Y){s.value&&(s.value.missingWarn=Y)},get fallbackWarn(){return s.value?s.value.fallbackWarn:C},set fallbackWarn(Y){s.value&&(s.value.missingWarn=Y)},get fallbackRoot(){return s.value?s.value.fallbackRoot:v},set fallbackRoot(Y){s.value&&(s.value.fallbackRoot=Y)},get fallbackFormat(){return s.value?s.value.fallbackFormat:b},set fallbackFormat(Y){s.value&&(s.value.fallbackFormat=Y)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:x},set warnHtmlMessage(Y){s.value&&(s.value.warnHtmlMessage=Y)},get escapeParameter(){return s.value?s.value.escapeParameter:h},set escapeParameter(Y){s.value&&(s.value.escapeParameter=Y)},t:H,getPostTranslationHandler:Z,setPostTranslationHandler:V,getMissingHandler:se,setMissingHandler:re,rt:N,d:$,n:X,tm:F,te:J,getLocaleMessage:ue,setLocaleMessage:ae,mergeLocaleMessage:$e,getDateTimeFormat:We,setDateTimeFormat:Ce,mergeDateTimeFormat:U,getNumberFormat:pe,setNumberFormat:xe,mergeNumberFormat:Se};function be(Y){Y.locale.value=l.value,Y.fallbackLocale.value=i.value,Object.keys(c.value).forEach(de=>{Y.mergeLocaleMessage(de,c.value[de])}),Object.keys(u.value).forEach(de=>{Y.mergeDateTimeFormat(de,u.value[de])}),Object.keys(d.value).forEach(de=>{Y.mergeNumberFormat(de,d.value[de])}),Y.escapeParameter=h,Y.fallbackFormat=b,Y.fallbackRoot=v,Y.fallbackWarn=C,Y.missingWarn=p,Y.warnHtmlMessage=x}return Ft.onBeforeMount(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw In(zt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const Y=s.value=e.proxy.$i18n.__composer;t==="global"?(l.value=Y.locale.value,i.value=Y.fallbackLocale.value,c.value=Y.messages.value,u.value=Y.datetimeFormats.value,d.value=Y.numberFormats.value):o&&be(Y)}),De}const tw=["locale","fallbackLocale","availableLocales"],ih=["t","rt","d","n","tm","te"];function nw(e,t){const n=Object.create(null);return tw.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s)throw In(zt.UNEXPECTED_ERROR);const a=Ft.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,a)}),e.config.globalProperties.$i18n=n,ih.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s||!s.value)throw In(zt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,s)}),()=>{delete e.config.globalProperties.$i18n,ih.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}Ct.registerMessageCompiler(Ct.compile);Ct.registerMessageResolver(Ct.resolveValue);Ct.registerLocaleFallbacker(Ct.fallbackWithLocaleChain);{const e=Re.getGlobalThis();e.__INTLIFY__=!0,Ct.setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}Pr.DatetimeFormat=$u;Pr.I18nD=HE;Pr.I18nInjectionKey=u6;Pr.I18nN=BE;Pr.I18nT=NE;Pr.NumberFormat=Nu;Pr.Translation=_l;Pr.VERSION=e6;Pr.castToVueI18n=qE;Pr.createI18n=UE;Pr.useI18n=x1;Pr.vTDirective=c6;var rw=Pr;const Qf=[];function d6(e){var t;(t=document.querySelector("html"))==null||t.setAttribute("lang",e)}function ow(e){e(Qf)}function UX(e,t="lang"){const n={};return Object.keys(e).forEach(r=>{const o=e[r].default;let s=r.replace(`./${t}/`,"").replace(/^\.\//,"");const a=s.lastIndexOf(".");s=s.substring(0,a);const l=s.split("/"),i=l.shift(),c=l.join(".");i&&(c?(xd(n,i,n[i]||{}),xd(n[i],c,o)):xd(n,i,o||{}))}),n}const oi={ZH_CN:"zh_CN",EN_US:"en"},b0={showPicker:!1,locale:oi.ZH_CN,fallback:oi.ZH_CN,availableLocales:[oi.ZH_CN,oi.EN_US]},lh=[{text:"简体中文",event:oi.ZH_CN},{text:"English",event:oi.EN_US}],f6=f5(),sw=f6.get(e5)||b0,y0=Ai({id:"app-locale",state:()=>({localInfo:sw}),getters:{getShowPicker(e){var t;return!!((t=e.localInfo)!=null&&t.showPicker)},getLocale(e){var t,n;return(n=(t=e.localInfo)==null?void 0:t.locale)!=null?n:"zh_CN"}},actions:{setLocaleInfo(e){this.localInfo=at(at({},this.localInfo),e),f6.set(e5,this.localInfo)},initLocale(){this.setLocaleInfo(at(at({},b0),this.localInfo))}}});function x0(){return y0($i)}const{fallback:aw,availableLocales:iw}=b0;let Xo;function lw(){return ft(this,null,function*(){var o,s;const t=x0().getLocale,r=(s=(o=(yield g5(Object.assign({"./lang/en.ts":()=>Tt(()=>import("./en-9c11272e.js"),["./en-9c11272e.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url),"./lang/zh_CN.ts":()=>Tt(()=>import("./zh_CN-f9481935.js"),["./zh_CN-f9481935.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url)}),`./lang/${t}.ts`)).default)==null?void 0:o.message)!=null?s:{};return d6(t),ow(a=>{a.push(t)}),{legacy:!1,locale:t,fallbackLocale:aw,messages:{[t]:r},availableLocales:iw,sync:!0,silentTranslationWarn:!0,missingWarn:!1,silentFallbackWarn:!0}})}function cw(e){return ft(this,null,function*(){const t=yield lw();Xo=rw.createI18n(t),e.use(Xo)})}function ch(e,t){return!e||t.startsWith(e)?t:`${e}.${t}`}function Zr(e){const t={t:a=>ch(e,a)};if(!Xo)return t;const s=Xo.global,{t:n}=s,r=ll(s,["t"]),o=(a,...l)=>a?!a.includes(".")&&!e?a:n(ch(e,a),...l):"";return Yt(at({},r),{t:o})}const e2=e=>e,uw={path:"/about",name:"About",component:mc,redirect:"/about/index",meta:{hideMenu:!0,icon:"simple-icons:about-dot-me",title:e2("routes.dashboard.about"),orderNo:1e5},children:[{path:"index",name:"AboutPage",component:()=>Tt(()=>import("./index-ce2144ce.js"),["./index-ce2144ce.js","./vue-72a104e4.js","./useContentViewHeight-1771cd5b.js","./useWindowSizeFn-1db11f4f.js","./onMountedOrActivated-ee461833.js","./antd-0679333d.js","./siteSetting-efd6ab5b.js","./index-8ee108fa.css"],import.meta.url),meta:{title:e2("routes.dashboard.about"),icon:"simple-icons:about-dot-me",hideMenu:!0}}]},dw=Object.freeze(Object.defineProperty({__proto__:null,default:uw},Symbol.toStringTag,{value:"Module"})),fw={path:"/dashboard",name:"Dashboard",component:()=>Tt(()=>import("./index-e1982fac.js"),["./index-e1982fac.js","./vue-72a104e4.js"],import.meta.url),meta:{title:e2("routes.dashboard.dashboard"),ignoreAuth:!0}},pw=Object.freeze(Object.defineProperty({__proto__:null,default:fw},Symbol.toStringTag,{value:"Module"})),hw={path:"/data",name:"Data",component:Qg,meta:{title:"数据管理",orderNo:1e5,ignoreAuth:!0},children:[{path:"device",name:"DevicePage",component:()=>Tt(()=>import("./index-efaa1ab1.js"),["./index-efaa1ab1.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-8318451d.js","./drawer-979bd460.css","./index-acc49e4a.css"],import.meta.url),meta:{title:"设备管理",ignoreAuth:!0}},{path:"task",name:"TaskPage",component:()=>Tt(()=>import("./index-41d79c03.js"),["./index-41d79c03.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./drawer-20246748.js","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./modal-62c07bbb.js","./modal-9fe2831b.css","./drawer-1e066757.css","./result-f5f59bf1.js","./result-1c2ebb23.css","./index-1773ff73.css"],import.meta.url),meta:{title:"任务管理",ignoreAuth:!0}},{path:"task-log",name:"TaskLogPage",component:()=>Tt(()=>import("./index-e44b7100.js"),["./index-e44b7100.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-e52e16c3.css"],import.meta.url),meta:{title:"任务日志",ignoreAuth:!0}}]},mw=Object.freeze(Object.defineProperty({__proto__:null,default:hw},Symbol.toStringTag,{value:"Module"})),gw={path:"/system",name:"System",component:Qg,meta:{title:"系统设置",orderNo:100001,ignoreAuth:!0},children:[{path:"constant",name:"ConstantPage",component:()=>Tt(()=>import("./index-5ea73e3b.js"),["./index-5ea73e3b.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./schema-0004c8eb.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-5ec4ab70.js","./index-7f0daf98.css"],import.meta.url),meta:{title:"常量管理",ignoreAuth:!0}},{path:"user",name:"UserPage",component:()=>Tt(()=>import("./index-5c55be75.js"),["./index-5c55be75.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-c24723db.js","./authorityApi-b12c1221.js","./drawer-bace9237.css","./index-5b2db5a3.css"],import.meta.url),meta:{title:"用户管理",ignoreAuth:!0}},{path:"log",name:"LogPage",component:()=>Tt(()=>import("./index-253344a3.js"),["./index-253344a3.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-b4de5e75.css"],import.meta.url),meta:{title:"日志查看",ignoreAuth:!0}}]},vw=Object.freeze(Object.defineProperty({__proto__:null,default:gw},Symbol.toStringTag,{value:"Module"})),_s={path:"/:path(.*)*",name:x3,component:mc,meta:{title:"ErrorPage",hideBreadcrumb:!0,hideMenu:!0},children:[{path:"/:path(.*)*",name:x3,component:Jg,meta:{title:"ErrorPage",hideBreadcrumb:!0,hideMenu:!0}}]},p6={path:"/redirect",component:mc,name:"RedirectTo",meta:{title:li,hideBreadcrumb:!0,hideMenu:!0},children:[{path:"/redirect/:path(.*)/:_redirect_type(.*)/:_origin_params(.*)?",name:li,component:()=>Tt(()=>import("./index-2d0e3a91.js"),["./index-2d0e3a91.js","./vue-72a104e4.js"],import.meta.url),meta:{title:li,hideBreadcrumb:!0}}]},uh=Object.assign({"./modules/about.ts":dw}),h6=[];Object.keys(uh).forEach(e=>{const t=uh[e].default||{},n=Array.isArray(t)?[...t]:[t];h6.push(...n)});const dh=[_s,...h6],fh=Object.assign({"./embedded/dashboard.ts":pw,"./embedded/data.ts":mw,"./embedded/system.ts":vw}),m6=[];Object.keys(fh).forEach(e=>{const t=fh[e].default||{},n=Array.isArray(t)?[...t]:[t];m6.push(...n)});const g6={path:"/",name:"Root",redirect:ar.BASE_HOME,meta:{title:"Root"}},v6=[g6,p6,_s,...m6],b6=[],y6=e=>e.forEach(t=>{b6.push(t.name),y6(t.children||[])});y6(v6);const yr=$g({history:Fg("./"),routes:v6,strict:!1,scrollBehavior:()=>({left:0,top:0})});function x6(){yr.getRoutes().forEach(e=>{const{name:t}=e;t&&!b6.includes(t)&&yr.hasRoute(t)&&yr.removeRoute(t)})}function bw(e){e.use(yr)}let Ad;const Kr=Ai({id:"app",state:()=>({darkMode:void 0,pageLoading:!1,projectConfig:ir.getLocal(mu),beforeMiniInfo:{}}),getters:{getPageLoading(e){return e.pageLoading},getDarkMode(e){return e.darkMode||localStorage.getItem(w3)||xx},getBeforeMiniInfo(e){return e.beforeMiniInfo},getProjectConfig(e){return e.projectConfig||{}},getHeaderSetting(){return this.getProjectConfig.headerSetting},getMenuSetting(){return this.getProjectConfig.menuSetting},getTransitionSetting(){return this.getProjectConfig.transitionSetting},getMultiTabsSetting(){return this.getProjectConfig.multiTabsSetting}},actions:{setPageLoading(e){this.pageLoading=e},setDarkMode(e){this.darkMode=e,localStorage.setItem(w3,e)},setBeforeMiniInfo(e){this.beforeMiniInfo=e},setProjectConfig(e){this.projectConfig=oc(this.projectConfig||{},e),ir.setLocal(mu,this.projectConfig)},setMenuSetting(e){this.projectConfig.menuSetting=oc(this.projectConfig.menuSetting,e),ir.setLocal(mu,this.projectConfig)},resetAllState(){return ft(this,null,function*(){x6(),ir.clearAll()})},setPageLoadingAction(e){return ft(this,null,function*(){e?(clearTimeout(Ad),Ad=setTimeout(()=>{this.setPageLoading(e)},50)):(this.setPageLoading(e),clearTimeout(Ad))})}}});function C1(){return Kr($i)}var Cs=(e=>(e.SIDEBAR="sidebar",e.MIX_SIDEBAR="mix-sidebar",e.MIX="mix",e.TOP_MENU="top-menu",e))(Cs||{}),C0=(e=>(e.NONE="NONE",e.FOOTER="FOOTER",e.HEADER="HEADER",e))(C0||{}),la=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.VERTICAL_RIGHT="vertical-right",e.INLINE="inline",e))(la||{}),yw=(e=>(e[e.NONE=0]="NONE",e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e))(yw||{}),xw=(e=>(e.CENTER="center",e.START="start",e.END="end",e))(xw||{}),C6=(e=>(e.HOVER="hover",e.CLICK="click",e))(C6||{});const Cw=()=>{const e=Kr(),t=fc(),{currentRoute:n}=t;return{getFullContent:oe(()=>{const s=Ie(n).query;return s&&Reflect.has(s,"__full__")?!0:e.getProjectConfig.fullContent})}},ph=Ne(!1);function Ew(){const{getFullContent:e}=Cw(),t=Kr(),n=oe(()=>Ie(p)||Ie(l)&&Ie(s)!==la.HORIZONTAL&&!Ie(e)),r=oe(()=>t.getMenuSetting.collapsed),o=oe(()=>t.getMenuSetting.type),s=oe(()=>t.getMenuSetting.mode),a=oe(()=>t.getMenuSetting.fixed),l=oe(()=>t.getMenuSetting.show),i=oe(()=>t.getMenuSetting.hidden),c=oe(()=>t.getMenuSetting.menuWidth),u=oe(()=>t.getMenuSetting.trigger),d=oe(()=>t.getMenuSetting.theme),p=oe(()=>t.getMenuSetting.split),C=oe(()=>t.getMenuSetting.bgColor),v=oe(()=>t.getMenuSetting.mixSideTrigger),b=oe(()=>t.getMenuSetting.canDrag),S=oe(()=>t.getMenuSetting.accordion),E=oe(()=>t.getMenuSetting.mixSideFixed),x=oe(()=>t.getMenuSetting.topMenuAlign),h=oe(()=>t.getMenuSetting.closeMixSidebarOnChange),y=oe(()=>Ie(o)===Cs.SIDEBAR),O=oe(()=>Ie(o)===Cs.TOP_MENU),T=oe(()=>t.getMenuSetting.collapsedShowTitle),M=oe(()=>Ie(s)===la.HORIZONTAL||Ie(p)),R=oe(()=>Ie(o)===Cs.TOP_MENU||!Ie(l)||Ie(i)?!1:Ie(u)===C0.HEADER),A=oe(()=>Ie(s)===la.HORIZONTAL),P=oe(()=>Ie(o)===Cs.MIX_SIDEBAR),K=oe(()=>Ie(s)===la.INLINE&&Ie(o)===Cs.MIX),Z=oe(()=>Ie(P)?Ie(r)&&!Ie(E)?Ie(V):Ie(c):Ie(r)?Ie(V):Ie(c)),V=oe(()=>{const{collapsedShowTitle:H,siderHidden:N}=t.getMenuSetting;return N?0:H?D3:I3}),se=oe(()=>{const H=Ie(O)||!Ie(l)||Ie(p)&&Ie(i)?0:Ie(P)?(Ie(r)?I3:D3)+(Ie(E)&&Ie(ph)?Ie(Z):0):Ie(Z);return`calc(100% - ${Ie(H)}px)`});function re(H){t.setMenuSetting(H)}function ee(){re({collapsed:!Ie(r)})}return{setMenuSetting:re,toggleCollapsed:ee,getMenuFixed:a,getRealWidth:Z,getMenuType:o,getMenuMode:s,getShowMenu:l,getCollapsed:r,getMiniWidthNumber:V,getCalcContentWidth:se,getMenuWidth:c,getTrigger:u,getSplit:p,getMenuTheme:d,getCanDrag:b,getCollapsedShowTitle:T,getIsHorizontal:A,getIsSidebarType:y,getAccordion:S,getShowTopMenu:M,getShowHeaderTrigger:R,getTopMenuAlign:x,getMenuHidden:i,getIsTopMenu:O,getMenuBgColor:C,getShowSidebar:n,getIsMixMode:K,getIsMixSidebar:P,getCloseMixSidebarOnChange:h,getMixSideTrigger:v,getMixSideFixed:E,mixSideHasChildren:ph}}const ww="#0960bd",Io={showSettingButton:!1,showDarkModeToggle:!0,settingButtonPosition:h5.AUTO,permissionMode:qn.ROUTE_MAPPING,permissionCacheType:o0.LOCAL,sessionTimeoutProcessing:a0.ROUTE_JUMP,themeColor:ww,grayMode:!1,colorWeak:!1,fullContent:!1,contentMode:Sl.FULL,showLogo:!0,showFooter:!1,headerSetting:{bgColor:Cx[0],fixed:!0,show:!0,theme:lr.LIGHT,useLockPage:!1,showFullScreen:!0,showDoc:!1,showNotice:!1,showSearch:!0},menuSetting:{bgColor:Ex[0],fixed:!0,collapsed:!1,siderHidden:!1,collapsedShowTitle:!1,canDrag:!1,show:!0,hidden:!1,menuWidth:210,mode:la.INLINE,type:Cs.SIDEBAR,theme:lr.DARK,split:!1,topMenuAlign:"center",trigger:C0.HEADER,accordion:!0,closeMixSidebarOnChange:!1,mixSideTrigger:C6.CLICK,mixSideFixed:!1},multiTabsSetting:{cache:!1,show:!0,canDrag:!0,showQuick:!0,showRedo:!0,showFold:!0},transitionSetting:{enable:!0,basicTransition:m5.FADE_SIDE,openPageLoading:!0,openNProgress:!1},openKeepAlive:!0,lockTime:0,showBreadCrumb:!0,showBreadCrumbIcon:!1,useErrorHandle:!1,useOpenBackTop:!0,canEmbedIFramePage:!0,closeMessageOnSwitch:!0,removeAllHttpPending:!1},{permissionCacheType:Sw}=Io,E6=Sw===o0.LOCAL;function _w(){return gu(sc)}function gu(e){return(E6?ir.getLocal:ir.getSession)(e)}function Id(e,t){return(E6?ir.setLocal:ir.setSession)(e,t,!0)}function w6(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ow}=Object.prototype,{getPrototypeOf:E0}=Object,E1=(e=>t=>{const n=Ow.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),uo=e=>(e=e.toLowerCase(),t=>E1(t)===e),w1=e=>t=>typeof t===e,{isArray:Bi}=Array,ic=w1("undefined");function Tw(e){return e!==null&&!ic(e)&&e.constructor!==null&&!ic(e.constructor)&&Ar(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S6=uo("ArrayBuffer");function Mw(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S6(e.buffer),t}const Rw=w1("string"),Ar=w1("function"),_6=w1("number"),S1=e=>e!==null&&typeof e=="object",Lw=e=>e===!0||e===!1,vu=e=>{if(E1(e)!=="object")return!1;const t=E0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kw=uo("Date"),Aw=uo("File"),Iw=uo("Blob"),Dw=uo("FileList"),Pw=e=>S1(e)&&Ar(e.pipe),Nw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ar(e.append)&&((t=E1(e))==="formdata"||t==="object"&&Ar(e.toString)&&e.toString()==="[object FormData]"))},$w=uo("URLSearchParams"),[Fw,Bw,Vw,Hw]=["ReadableStream","Request","Response","Headers"].map(uo),jw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Bi(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ca=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),T6=e=>!ic(e)&&e!==ca;function t2(){const{caseless:e}=T6(this)&&this||{},t={},n=(r,o)=>{const s=e&&O6(t,o)||o;vu(t[s])&&vu(r)?t[s]=t2(t[s],r):vu(r)?t[s]=t2({},r):Bi(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r(gc(t,(o,s)=>{n&&Ar(o)?e[s]=w6(o,n):e[s]=o},{allOwnKeys:r}),e),zw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Uw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},qw=(e,t,n,r)=>{let o,s,a;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&E0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zw=e=>{if(!e)return null;if(Bi(e))return e;let t=e.length;if(!_6(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&E0(Uint8Array)),Kw=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Xw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jw=uo("HTMLFormElement"),Qw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eS=uo("RegExp"),M6=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};gc(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},tS=e=>{M6(e,(t,n)=>{if(Ar(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ar(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nS=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Bi(e)?r(e):r(String(e).split(t)),n},rS=()=>{},oS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Dd="abcdefghijklmnopqrstuvwxyz",mh="0123456789",R6={DIGIT:mh,ALPHA:Dd,ALPHA_DIGIT:Dd+Dd.toUpperCase()+mh},sS=(e=16,t=R6.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function aS(e){return!!(e&&Ar(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const iS=e=>{const t=new Array(10),n=(r,o)=>{if(S1(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Bi(r)?[]:{};return gc(r,(a,l)=>{const i=n(a,o+1);!ic(i)&&(s[l]=i)}),t[o]=void 0,s}}return r};return n(e,0)},lS=uo("AsyncFunction"),cS=e=>e&&(S1(e)||Ar(e))&&Ar(e.then)&&Ar(e.catch),L6=((e,t)=>e?setImmediate:t?((n,r)=>(ca.addEventListener("message",({source:o,data:s})=>{o===ca&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ca.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ar(ca.postMessage)),uS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ca):typeof process!="undefined"&&process.nextTick||L6,ze={isArray:Bi,isArrayBuffer:S6,isBuffer:Tw,isFormData:Nw,isArrayBufferView:Mw,isString:Rw,isNumber:_6,isBoolean:Lw,isObject:S1,isPlainObject:vu,isReadableStream:Fw,isRequest:Bw,isResponse:Vw,isHeaders:Hw,isUndefined:ic,isDate:kw,isFile:Aw,isBlob:Iw,isRegExp:eS,isFunction:Ar,isStream:Pw,isURLSearchParams:$w,isTypedArray:Yw,isFileList:Dw,forEach:gc,merge:t2,extend:Ww,trim:jw,stripBOM:zw,inherits:Uw,toFlatObject:qw,kindOf:E1,kindOfTest:uo,endsWith:Gw,toArray:Zw,forEachEntry:Kw,matchAll:Xw,isHTMLForm:Jw,hasOwnProperty:hh,hasOwnProp:hh,reduceDescriptors:M6,freezeMethods:tS,toObjectSet:nS,toCamelCase:Qw,noop:rS,toFiniteNumber:oS,findKey:O6,global:ca,isContextDefined:T6,ALPHABET:R6,generateString:sS,isSpecCompliantForm:aS,toJSONObject:iS,isAsyncFn:lS,isThenable:cS,setImmediate:L6,asap:uS};function Pt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}ze.inherits(Pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ze.toJSONObject(this.config),code:this.code,status:this.status}}});const k6=Pt.prototype,A6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{A6[e]={value:e}});Object.defineProperties(Pt,A6);Object.defineProperty(k6,"isAxiosError",{value:!0});Pt.from=(e,t,n,r,o,s)=>{const a=Object.create(k6);return ze.toFlatObject(e,a,function(i){return i!==Error.prototype},l=>l!=="isAxiosError"),Pt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const dS=null;function n2(e){return ze.isPlainObject(e)||ze.isArray(e)}function I6(e){return ze.endsWith(e,"[]")?e.slice(0,-2):e}function gh(e,t,n){return e?e.concat(t).map(function(o,s){return o=I6(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function fS(e){return ze.isArray(e)&&!e.some(n2)}const pS=ze.toFlatObject(ze,{},null,function(t){return/^is[A-Z]/.test(t)});function _1(e,t,n){if(!ze.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ze.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,S){return!ze.isUndefined(S[b])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,a=n.indexes,i=(n.Blob||typeof Blob!="undefined"&&Blob)&&ze.isSpecCompliantForm(t);if(!ze.isFunction(o))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(ze.isDate(v))return v.toISOString();if(!i&&ze.isBlob(v))throw new Pt("Blob is not supported. Use a Buffer instead.");return ze.isArrayBuffer(v)||ze.isTypedArray(v)?i&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,b,S){let E=v;if(v&&!S&&typeof v=="object"){if(ze.endsWith(b,"{}"))b=r?b:b.slice(0,-2),v=JSON.stringify(v);else if(ze.isArray(v)&&fS(v)||(ze.isFileList(v)||ze.endsWith(b,"[]"))&&(E=ze.toArray(v)))return b=I6(b),E.forEach(function(h,y){!(ze.isUndefined(h)||h===null)&&t.append(a===!0?gh([b],y,s):a===null?b:b+"[]",c(h))}),!1}return n2(v)?!0:(t.append(gh(S,b,s),c(v)),!1)}const d=[],p=Object.assign(pS,{defaultVisitor:u,convertValue:c,isVisitable:n2});function C(v,b){if(!ze.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+b.join("."));d.push(v),ze.forEach(v,function(E,x){(!(ze.isUndefined(E)||E===null)&&o.call(t,E,ze.isString(x)?x.trim():x,b,p))===!0&&C(E,b?b.concat(x):[x])}),d.pop()}}if(!ze.isObject(e))throw new TypeError("data must be an object");return C(e),t}function vh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function w0(e,t){this._pairs=[],e&&_1(e,this,t)}const D6=w0.prototype;D6.append=function(t,n){this._pairs.push([t,n])};D6.toString=function(t){const n=t?function(r){return t.call(this,r,vh)}:vh;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function P6(e,t,n){if(!t)return e;const r=n&&n.encode||hS,o=n&&n.serialize;let s;if(o?s=o(t,n):s=ze.isURLSearchParams(t)?t.toString():new w0(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class mS{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ze.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bh=mS,N6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gS=typeof URLSearchParams!="undefined"?URLSearchParams:w0,vS=typeof FormData!="undefined"?FormData:null,bS=typeof Blob!="undefined"?Blob:null,yS={isBrowser:!0,classes:{URLSearchParams:gS,FormData:vS,Blob:bS},protocols:["http","https","file","blob","url","data"]},S0=typeof window!="undefined"&&typeof document!="undefined",r2=typeof navigator=="object"&&navigator||void 0,xS=S0&&(!r2||["ReactNative","NativeScript","NS"].indexOf(r2.product)<0),CS=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ES=S0&&window.location.href||"http://localhost",wS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:S0,hasStandardBrowserEnv:xS,hasStandardBrowserWebWorkerEnv:CS,navigator:r2,origin:ES},Symbol.toStringTag,{value:"Module"})),xr=at(at({},wS),yS);function SS(e,t){return _1(e,new xr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return xr.isNode&&ze.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function _S(e){return ze.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function OS(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r=n.length;return a=!a&&ze.isArray(o)?o.length:a,i?(ze.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!l):((!o[a]||!ze.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&ze.isArray(o[a])&&(o[a]=OS(o[a])),!l)}if(ze.isFormData(e)&&ze.isFunction(e.entries)){const n={};return ze.forEachEntry(e,(r,o)=>{t(_S(r),o,n,0)}),n}return null}function TS(e,t,n){if(ze.isString(e))try{return(t||JSON.parse)(e),ze.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _0={transitional:N6,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=ze.isObject(t);if(s&&ze.isHTMLForm(t)&&(t=new FormData(t)),ze.isFormData(t))return o?JSON.stringify($6(t)):t;if(ze.isArrayBuffer(t)||ze.isBuffer(t)||ze.isStream(t)||ze.isFile(t)||ze.isBlob(t)||ze.isReadableStream(t))return t;if(ze.isArrayBufferView(t))return t.buffer;if(ze.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return SS(t,this.formSerializer).toString();if((l=ze.isFileList(t))||r.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return _1(l?{"files[]":t}:t,i&&new i,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),TS(t)):t}],transformResponse:[function(t){const n=this.transitional||_0.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(ze.isResponse(t)||ze.isReadableStream(t))return t;if(t&&ze.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?Pt.from(l,Pt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ze.forEach(["delete","get","head","post","put","patch"],e=>{_0.headers[e]={}});const O0=_0,MS=ze.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RS=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&MS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yh=Symbol("internals");function cl(e){return e&&String(e).trim().toLowerCase()}function bu(e){return e===!1||e==null?e:ze.isArray(e)?e.map(bu):String(e)}function LS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const kS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pd(e,t,n,r,o){if(ze.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!ze.isString(t)){if(ze.isString(r))return t.indexOf(r)!==-1;if(ze.isRegExp(r))return r.test(t)}}function AS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function IS(e,t){const n=ze.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class O1{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(l,i,c){const u=cl(i);if(!u)throw new Error("header name must be a non-empty string");const d=ze.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||i]=bu(l))}const a=(l,i)=>ze.forEach(l,(c,u)=>s(c,u,i));if(ze.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(ze.isString(t)&&(t=t.trim())&&!kS(t))a(RS(t),n);else if(ze.isHeaders(t))for(const[l,i]of t.entries())s(i,l,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=cl(t),t){const r=ze.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return LS(o);if(ze.isFunction(n))return n.call(this,o,r);if(ze.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cl(t),t){const r=ze.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Pd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=cl(a),a){const l=ze.findKey(r,a);l&&(!n||Pd(r,r[l],l,n))&&(delete r[l],o=!0)}}return ze.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Pd(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return ze.forEach(this,(o,s)=>{const a=ze.findKey(r,s);if(a){n[a]=bu(o),delete n[s];return}const l=t?AS(s):String(s).trim();l!==s&&delete n[s],n[l]=bu(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ze.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&ze.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[yh]=this[yh]={accessors:{}}).accessors,o=this.prototype;function s(a){const l=cl(a);r[l]||(IS(o,a),r[l]=!0)}return ze.isArray(t)?t.forEach(s):s(t),this}}O1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ze.reduceDescriptors(O1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ze.freezeMethods(O1);const lo=O1;function Nd(e,t){const n=this||O0,r=t||n,o=lo.from(r.headers);let s=r.data;return ze.forEach(e,function(l){s=l.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function F6(e){return!!(e&&e.__CANCEL__)}function Vi(e,t,n){Pt.call(this,e==null?"canceled":e,Pt.ERR_CANCELED,t,n),this.name="CanceledError"}ze.inherits(Vi,Pt,{__CANCEL__:!0});function B6(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Pt("Request failed with status code "+n.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function DS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function PS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(i){const c=Date.now(),u=r[s];a||(a=c),n[o]=i,r[o]=c;let d=s,p=0;for(;d!==o;)p+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a{n=u,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},r-d)))},()=>o&&a(o)]}const Fu=(e,t,n=3)=>{let r=0;const o=PS(50,250);return NS(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,i=a-r,c=o(i),u=a<=l;r=a;const d={loaded:a,total:l,progress:l?a/l:void 0,bytes:i,rate:c||void 0,estimated:c&&l&&u?(l-a)/c:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(d)},n)},xh=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ch=e=>(...t)=>ze.asap(()=>e(...t)),$S=xr.hasStandardBrowserEnv?function(){const t=xr.navigator&&/(msie|trident)/i.test(xr.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const l=ze.isString(a)?o(a):a;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}(),FS=xr.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];ze.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ze.isString(r)&&a.push("path="+r),ze.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function BS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function VS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function V6(e,t){return e&&!BS(t)?VS(e,t):t}const Eh=e=>e instanceof lo?at({},e):e;function La(e,t){t=t||{};const n={};function r(c,u,d){return ze.isPlainObject(c)&&ze.isPlainObject(u)?ze.merge.call({caseless:d},c,u):ze.isPlainObject(u)?ze.merge({},u):ze.isArray(u)?u.slice():u}function o(c,u,d){if(ze.isUndefined(u)){if(!ze.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function s(c,u){if(!ze.isUndefined(u))return r(void 0,u)}function a(c,u){if(ze.isUndefined(u)){if(!ze.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function l(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const i={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,u)=>o(Eh(c),Eh(u),!0)};return ze.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=i[u]||o,p=d(e[u],t[u],u);ze.isUndefined(p)&&d!==l||(n[u]=p)}),n}const H6=e=>{const t=La({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=t;t.headers=a=lo.from(a),t.url=P6(V6(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let i;if(ze.isFormData(n)){if(xr.hasStandardBrowserEnv||xr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((i=a.getContentType())!==!1){const[c,...u]=i?i.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(xr.hasStandardBrowserEnv&&(r&&ze.isFunction(r)&&(r=r(t)),r||r!==!1&&$S(t.url))){const c=o&&s&&FS.read(s);c&&a.set(o,c)}return t},HS=typeof XMLHttpRequest!="undefined",jS=HS&&function(e){return new Promise(function(n,r){const o=H6(e);let s=o.data;const a=lo.from(o.headers).normalize();let{responseType:l,onUploadProgress:i,onDownloadProgress:c}=o,u,d,p,C,v;function b(){C&&C(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function E(){if(!S)return;const h=lo.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),O={data:!l||l==="text"||l==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:h,config:e,request:S};B6(function(M){n(M),b()},function(M){r(M),b()},O),S=null}"onloadend"in S?S.onloadend=E:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(E)},S.onabort=function(){S&&(r(new Pt("Request aborted",Pt.ECONNABORTED,e,S)),S=null)},S.onerror=function(){r(new Pt("Network Error",Pt.ERR_NETWORK,e,S)),S=null},S.ontimeout=function(){let y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const O=o.transitional||N6;o.timeoutErrorMessage&&(y=o.timeoutErrorMessage),r(new Pt(y,O.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,e,S)),S=null},s===void 0&&a.setContentType(null),"setRequestHeader"in S&&ze.forEach(a.toJSON(),function(y,O){S.setRequestHeader(O,y)}),ze.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),l&&l!=="json"&&(S.responseType=o.responseType),c&&([p,v]=Fu(c,!0),S.addEventListener("progress",p)),i&&S.upload&&([d,C]=Fu(i),S.upload.addEventListener("progress",d),S.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(u=h=>{S&&(r(!h||h.type?new Vi(null,e,S):h),S.abort(),S=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=DS(o.url);if(x&&xr.protocols.indexOf(x)===-1){r(new Pt("Unsupported protocol "+x+":",Pt.ERR_BAD_REQUEST,e));return}S.send(s||null)})},WS=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,l();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Pt?u:new Vi(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new Pt(`timeout ${t} of ms exceeded`,Pt.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:i}=r;return i.unsubscribe=()=>ze.asap(l),i}},zS=WS,US=function*(e,t){let n=e.byteLength;if(!t||n{const o=qS(e,t);let s=0,a,l=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({pull(c){return ft(this,null,function*(){try{const{done:u,value:d}=yield o.next();if(u){l(),c.close();return}let p=d.byteLength;if(n){let C=s+=p;n(C)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}})},cancel(c){return l(c),o.return()}},{highWaterMark:2})},T1=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",j6=T1&&typeof ReadableStream=="function",ZS=T1&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):e=>ft(void 0,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),W6=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},YS=j6&&W6(()=>{let e=!1;const t=new Request(xr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Sh=64*1024,o2=j6&&W6(()=>ze.isReadableStream(new Response("").body)),Bu={stream:o2&&(e=>e.body)};T1&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Bu[t]&&(Bu[t]=ze.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Pt(`Response type '${t}' is not supported`,Pt.ERR_NOT_SUPPORT,r)})})})(new Response);const KS=e=>ft(void 0,null,function*(){if(e==null)return 0;if(ze.isBlob(e))return e.size;if(ze.isSpecCompliantForm(e))return(yield new Request(xr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ze.isArrayBufferView(e)||ze.isArrayBuffer(e))return e.byteLength;if(ze.isURLSearchParams(e)&&(e=e+""),ze.isString(e))return(yield ZS(e)).byteLength}),XS=(e,t)=>ft(void 0,null,function*(){const n=ze.toFiniteNumber(e.getContentLength());return n==null?KS(t):n}),JS=T1&&(e=>ft(void 0,null,function*(){let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:i,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:p}=H6(e);c=c?(c+"").toLowerCase():"text";let C=zS([o,s&&s.toAbortSignal()],a),v;const b=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let S;try{if(i&&YS&&n!=="get"&&n!=="head"&&(S=yield XS(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(ze.isFormData(r)&&(T=O.headers.get("content-type"))&&u.setContentType(T),O.body){const[M,R]=xh(S,Fu(Ch(i)));r=wh(O.body,Sh,M,R)}}ze.isString(d)||(d=d?"include":"omit");const E="credentials"in Request.prototype;v=new Request(t,Yt(at({},p),{signal:C,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:E?d:void 0}));let x=yield fetch(v);const h=o2&&(c==="stream"||c==="response");if(o2&&(l||h&&b)){const O={};["status","statusText","headers"].forEach(A=>{O[A]=x[A]});const T=ze.toFiniteNumber(x.headers.get("content-length")),[M,R]=l&&xh(T,Fu(Ch(l),!0))||[];x=new Response(wh(x.body,Sh,M,()=>{R&&R(),b&&b()}),O)}c=c||"text";let y=yield Bu[ze.findKey(Bu,c)||"text"](x,e);return!h&&b&&b(),yield new Promise((O,T)=>{B6(O,T,{data:y,headers:lo.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:v})})}catch(E){throw b&&b(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,e,v),{cause:E.cause||E}):Pt.from(E,E&&E.code,e,v)}})),s2={http:dS,xhr:jS,fetch:JS};ze.forEach(s2,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const _h=e=>`- ${e}`,QS=e=>ze.isFunction(e)||e===null||e===!1,z6={getAdapter:e=>{e=ze.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s`adapter ${l} `+(i===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since : `+s.map(_h).join(` @@ -22,7 +22,7 @@ var Wb=Object.defineProperty,zb=Object.defineProperties;var Ub=Object.getOwnProp `+s):r.stack=s}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=La(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&a2.assertOptions(r,{silentJSONParsing:ds.transitional(ds.boolean),forcedJSONParsing:ds.transitional(ds.boolean),clarifyTimeoutError:ds.transitional(ds.boolean)},!1),o!=null&&(ze.isFunction(o)?n.paramsSerializer={serialize:o}:a2.assertOptions(o,{encode:ds.function,serialize:ds.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&ze.merge(s.common,s[n.method]);s&&ze.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),n.headers=lo.concat(a,s);const l=[];let i=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(i=i&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let u,d=0,p;if(!i){const v=[Oh.bind(this),void 0];for(v.unshift.apply(v,l),v.push.apply(v,c),p=v.length,u=Promise.resolve(n);d{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,l){r.reason||(r.reason=new Vi(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new M0(function(o){t=o}),cancel:t}}}const t_=M0;function n_(e){return function(n){return e.apply(null,n)}}function r_(e){return ze.isObject(e)&&e.isAxiosError===!0}const i2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(i2).forEach(([e,t])=>{i2[t]=e});const o_=i2;function q6(e){const t=new yu(e),n=w6(yu.prototype.request,t);return ze.extend(n,yu.prototype,t,{allOwnKeys:!0}),ze.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return q6(La(e,o))},n}const _n=q6(O0);_n.Axios=yu;_n.CanceledError=Vi;_n.CancelToken=t_;_n.isCancel=F6;_n.VERSION=U6;_n.toFormData=_1;_n.AxiosError=Pt;_n.Cancel=_n.CanceledError;_n.all=function(t){return Promise.all(t)};_n.spread=n_;_n.isAxiosError=r_;_n.mergeConfig=La;_n.AxiosHeaders=lo;_n.formToJSON=e=>$6(ze.isHTMLForm(e)?new FormData(e):e);_n.getAdapter=z6.getAdapter;_n.HttpStatusCode=o_;_n.default=_n;const xu=_n;var s_=Error,a_=EvalError,i_=RangeError,l_=ReferenceError,G6=SyntaxError,vc=TypeError,c_=URIError,u_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},Mh=typeof Symbol!="undefined"&&Symbol,d_=u_,f_=function(){return typeof Mh!="function"||typeof Symbol!="function"||typeof Mh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d_()},Fd={__proto__:null,foo:{}},p_=Object,h_=function(){return{__proto__:Fd}.foo===Fd.foo&&!(Fd instanceof p_)},m_="Function.prototype.bind called on incompatible ",g_=Object.prototype.toString,v_=Math.max,b_="[object Function]",Rh=function(t,n){for(var r=[],o=0;o1&&typeof n!="boolean")throw new ci('"allowMissing" argument must be a boolean');if(B_(/^%?[^%]*%?$/,t)===null)throw new Ei("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=j_(t),o=r.length>0?r[0]:"",s=W_("%"+o+"%",n),a=s.name,l=s.value,i=!1,c=s.alias;c&&(o=c[0],F_(r,$_([0,1],c)));for(var u=1,d=!0;u=r.length){var b=va(l,p);d=!!b,d&&"get"in b&&!("originalValue"in b.get)?l=b.get:l=l[p]}else d=Hu(l,p),l=l[p];d&&!i&&(ba[a]=l)}}return l},Y6={exports:{}},Hd,Ah;function L0(){if(Ah)return Hd;Ah=1;var e=Hi,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch(n){t=!1}return Hd=t,Hd}var z_=Hi,Cu=z_("%Object.getOwnPropertyDescriptor%",!0);if(Cu)try{Cu([],"length")}catch(e){Cu=null}var K6=Cu,Ih=L0(),U_=G6,za=vc,Dh=K6,q_=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new za("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new za("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new za("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new za("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new za("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new za("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,i=!!Dh&&Dh(t,n);if(Ih)Ih(t,n,{configurable:a===null&&i?i.configurable:!a,enumerable:o===null&&i?i.enumerable:!o,value:r,writable:s===null&&i?i.writable:!s});else if(l||!o&&!s&&!a)t[n]=r;else throw new U_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},l2=L0(),X6=function(){return!!l2};X6.hasArrayLengthDefineBug=function(){if(!l2)return null;try{return l2([],"length",{value:1}).length!==1}catch(t){return!0}};var G_=X6,Z_=Hi,Ph=q_,Y_=G_(),Nh=K6,$h=vc,K_=Z_("%Math.floor%"),X_=function(t,n){if(typeof t!="function")throw new $h("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||K_(n)!==n)throw new $h("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Nh){var a=Nh(t,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(s=!1)}return(o||s||!r)&&(Y_?Ph(t,"length",n,!0,!0):Ph(t,"length",n)),t};(function(e){var t=R0,n=Hi,r=X_,o=vc,s=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||t.call(a,s),i=L0(),c=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new o("a function is required");var C=l(t,a,arguments);return r(C,1+c(0,p.length-(arguments.length-1)),!0)};var u=function(){return l(t,s,arguments)};i?i(e.exports,"apply",{value:u}):e.exports.apply=u})(Y6);var J_=Y6.exports,J6=Hi,Q6=J_,Q_=Q6(J6("String.prototype.indexOf")),eO=function(t,n){var r=J6(t,!!n);return typeof r=="function"&&Q_(t,".prototype.")>-1?Q6(r):r},k0=typeof Map=="function"&&Map.prototype,jd=Object.getOwnPropertyDescriptor&&k0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Wu=k0&&jd&&typeof jd.get=="function"?jd.get:null,Fh=k0&&Map.prototype.forEach,A0=typeof Set=="function"&&Set.prototype,Wd=Object.getOwnPropertyDescriptor&&A0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,zu=A0&&Wd&&typeof Wd.get=="function"?Wd.get:null,Bh=A0&&Set.prototype.forEach,tO=typeof WeakMap=="function"&&WeakMap.prototype,Ol=tO?WeakMap.prototype.has:null,nO=typeof WeakSet=="function"&&WeakSet.prototype,Tl=nO?WeakSet.prototype.has:null,rO=typeof WeakRef=="function"&&WeakRef.prototype,Vh=rO?WeakRef.prototype.deref:null,oO=Boolean.prototype.valueOf,sO=Object.prototype.toString,aO=Function.prototype.toString,iO=String.prototype.match,I0=String.prototype.slice,Ss=String.prototype.replace,lO=String.prototype.toUpperCase,Hh=String.prototype.toLowerCase,ev=RegExp.prototype.test,jh=Array.prototype.concat,So=Array.prototype.join,cO=Array.prototype.slice,Wh=Math.floor,c2=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zd=Object.getOwnPropertySymbols,u2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,wi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Xn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===wi||"symbol")?Symbol.toStringTag:null,tv=Object.prototype.propertyIsEnumerable,zh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Uh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||ev.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Wh(-e):Wh(e);if(r!==e){var o=String(r),s=I0.call(t,o.length+1);return Ss.call(o,n,"$&_")+"."+Ss.call(Ss.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ss.call(t,n,"$&_")}var d2=n5,qh=d2.custom,Gh=rv(qh)?qh:null,uO=function e(t,n,r,o){var s=n||{};if(xs(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xs(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=xs(s,"customInspect")?s.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(xs(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(xs(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return sv(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var i=String(t);return l?Uh(t,i):i}if(typeof t=="bigint"){var c=String(t)+"n";return l?Uh(t,c):c}var u=typeof s.depth=="undefined"?5:s.depth;if(typeof r=="undefined"&&(r=0),r>=u&&u>0&&typeof t=="object")return f2(t)?"[Array]":"[Object]";var d=MO(s,r);if(typeof o=="undefined")o=[];else if(ov(o,t)>=0)return"[Circular]";function p(V,se,re){if(se&&(o=cO.call(o),o.push(se)),re){var ee={depth:s.depth};return xs(s,"quoteStyle")&&(ee.quoteStyle=s.quoteStyle),e(V,ee,r+1,o)}return e(V,s,r+1,o)}if(typeof t=="function"&&!Zh(t)){var C=yO(t),v=Kc(t,p);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(v.length>0?" { "+So.call(v,", ")+" }":"")}if(rv(t)){var b=wi?Ss.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):u2.call(t);return typeof t=="object"&&!wi?ul(b):b}if(_O(t)){for(var S="<"+Hh.call(String(t.nodeName)),E=t.attributes||[],x=0;x",S}if(f2(t)){if(t.length===0)return"[]";var h=Kc(t,p);return d&&!TO(h)?"["+p2(h,d)+"]":"[ "+So.call(h,", ")+" ]"}if(pO(t)){var y=Kc(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!tv.call(t,"cause")?"{ ["+String(t)+"] "+So.call(jh.call("[cause]: "+p(t.cause),y),", ")+" }":y.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+So.call(y,", ")+" }"}if(typeof t=="object"&&a){if(Gh&&typeof t[Gh]=="function"&&d2)return d2(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(xO(t)){var O=[];return Fh&&Fh.call(t,function(V,se){O.push(p(se,t,!0)+" => "+p(V,t))}),Yh("Map",Wu.call(t),O,d)}if(wO(t)){var T=[];return Bh&&Bh.call(t,function(V){T.push(p(V,t))}),Yh("Set",zu.call(t),T,d)}if(CO(t))return Ud("WeakMap");if(SO(t))return Ud("WeakSet");if(EO(t))return Ud("WeakRef");if(mO(t))return ul(p(Number(t)));if(vO(t))return ul(p(c2.call(t)));if(gO(t))return ul(oO.call(t));if(hO(t))return ul(p(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof Hn!="undefined"&&t===Hn)return"{ [object globalThis] }";if(!fO(t)&&!Zh(t)){var M=Kc(t,p),R=zh?zh(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",P=!R&&Xn&&Object(t)===t&&Xn in t?I0.call(Ns(t),8,-1):A?"Object":"",K=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Z=K+(P||A?"["+So.call(jh.call([],P||[],A||[]),": ")+"] ":"");return M.length===0?Z+"{}":d?Z+"{"+p2(M,d)+"}":Z+"{ "+So.call(M,", ")+" }"}return String(t)};function nv(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function dO(e){return Ss.call(String(e),/"/g,""")}function f2(e){return Ns(e)==="[object Array]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function fO(e){return Ns(e)==="[object Date]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function Zh(e){return Ns(e)==="[object RegExp]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function pO(e){return Ns(e)==="[object Error]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function hO(e){return Ns(e)==="[object String]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function mO(e){return Ns(e)==="[object Number]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function gO(e){return Ns(e)==="[object Boolean]"&&(!Xn||!(typeof e=="object"&&Xn in e))}function rv(e){if(wi)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!u2)return!1;try{return u2.call(e),!0}catch(t){}return!1}function vO(e){if(!e||typeof e!="object"||!c2)return!1;try{return c2.call(e),!0}catch(t){}return!1}var bO=Object.prototype.hasOwnProperty||function(e){return e in this};function xs(e,t){return bO.call(e,t)}function Ns(e){return sO.call(e)}function yO(e){if(e.name)return e.name;var t=iO.call(aO.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function ov(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return sv(I0.call(e,0,t.maxStringLength),t)+r}var o=Ss.call(Ss.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,OO);return nv(o,"single",t)}function OO(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+lO.call(t.toString(16))}function ul(e){return"Object("+e+")"}function Ud(e){return e+" { ? }"}function Yh(e,t,n,r){var o=r?p2(n,r):So.call(n,", ");return e+" ("+t+") {"+o+"}"}function TO(e){for(var t=0;t=0)return!1;return!0}function MO(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=So.call(Array(e.indent+1)," ");else return null;return{base:n,prev:So.call(Array(t+1),n)}}function p2(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+So.call(e,","+n)+` -`+t.prev}function Kc(e,t){var n=f2(e),r=[];if(n){r.length=e.length;for(var o=0;o1;){var n=t.pop(),r=n.obj[n.prop];if(ra(r)){for(var o=[],s=0;s=Zd?a.slice(i,i+Zd):a,u=[],d=0;d=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||s===WO.RFC1738&&(p===40||p===41)){u[u.length]=c.charAt(d);continue}if(p<128){u[u.length]=yo[p];continue}if(p<2048){u[u.length]=yo[192|p>>6]+yo[128|p&63];continue}if(p<55296||p>=57344){u[u.length]=yo[224|p>>12]+yo[128|p>>6&63]+yo[128|p&63];continue}d+=1,p=65536+((p&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=yo[240|p>>18]+yo[128|p>>12&63]+yo[128|p>>6&63]+yo[128|p&63]}l+=u.join("")}return l},YO=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o0?h.join(",")||null:void 0}];else if(wo(u))P=u;else{var K=Object.keys(h);P=d?K.sort(d):K}var Z=i?n.replace(/\./g,"%2E"):n,V=o&&wo(h)&&h.length===1?Z+"[]":Z;if(s&&wo(h)&&h.length===0)return V+"[]";for(var se=0;se0?C+p:""},Si=lv,h2=Object.prototype.hasOwnProperty,iT=Array.isArray,bn={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Si.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},lT=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},fv=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cT="utf8=%26%2310003%3B",uT="utf8=%E2%9C%93",dT=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,s),l=-1,i,c=n.charset;if(n.charsetSentinel)for(i=0;i-1&&(v=iT(v)?[v]:v);var b=h2.call(r,C);b&&n.duplicates==="combine"?r[C]=Si.combine(r[C],v):(!b||n.duplicates==="last")&&(r[C]=v)}return r},fT=function(e,t,n,r){for(var o=r?t:fv(t,n),s=e.length-1;s>=0;--s){var a,l=e[s];if(l==="[]"&&n.parseArrays)a=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{a=n.plainObjects?Object.create(null):{};var i=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,c=n.decodeDotInKeys?i.replace(/%2E/g,"."):i,u=parseInt(c,10);!n.parseArrays&&c===""?a={0:o}:!isNaN(u)&&l!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[],a[u]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},pT=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,i=r.depth>0&&a.exec(s),c=i?s.slice(0,i.index):s,u=[];if(c){if(!r.plainObjects&&h2.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(i=l.exec(s))!==null&&d[e.method,e.url].join("&");class pv{addPending(t){this.removePending(t);const n=Xh(t),r=new AbortController;t.signal=t.signal||r.signal,Qs.has(n)||Qs.set(n,r)}removeAllPending(){Qs.forEach(t=>{t&&t.abort()}),this.reset()}removePending(t){const n=Xh(t);if(Qs.has(n)){const r=Qs.get(n);r&&r.abort(n),Qs.delete(n)}}reset(){Qs.clear()}}var m2=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=-1]="ERROR",e[e.TIMEOUT=401]="TIMEOUT",e.TYPE="success",e))(m2||{}),Uu=(e=>(e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e))(Uu||{}),qu=(e=>(e.JSON="application/json;charset=UTF-8",e.FORM_URLENCODED="application/x-www-form-urlencoded;charset=UTF-8",e.FORM_DATA="multipart/form-data;charset=UTF-8",e))(qu||{});class CT{constructor(t){oo(this,"axiosInstance");oo(this,"options");this.options=t,this.axiosInstance=xu.create(t),this.setupInterceptors()}createAxios(t){this.axiosInstance=xu.create(t)}getTransform(){const{transform:t}=this.options;return t}getAxios(){return this.axiosInstance}configAxios(t){this.axiosInstance&&this.createAxios(t)}setHeader(t){this.axiosInstance&&Object.assign(this.axiosInstance.defaults.headers,t)}setupInterceptors(){const{axiosInstance:t,options:{transform:n}}=this;if(!n)return;const{requestInterceptors:r,requestInterceptorsCatch:o,responseInterceptors:s,responseInterceptorsCatch:a}=n,l=new pv;this.axiosInstance.interceptors.request.use(i=>{var d,p;const c=(d=i.requestOptions)!=null?d:this.options.requestOptions;return!((p=c==null?void 0:c.ignoreCancelToken)!=null?p:!0)&&l.addPending(i),r&&Eo(r)&&(i=r(i,this.options)),i},void 0),o&&Eo(o)&&this.axiosInstance.interceptors.request.use(void 0,o),this.axiosInstance.interceptors.response.use(i=>(i&&l.removePending(i.config),s&&Eo(s)&&(i=s(i)),i),void 0),a&&Eo(a)&&this.axiosInstance.interceptors.response.use(void 0,i=>a(t,i))}uploadFile(t,n){const r=new window.FormData,o=n.name||"file";return n.filename?r.append(o,n.file,n.filename):r.append(o,n.file),n.data&&Object.keys(n.data).forEach(s=>{const a=n.data[s];if(Array.isArray(a)){a.forEach(l=>{r.append(`${s}[]`,l)});return}r.append(s,n.data[s])}),this.axiosInstance.request(Yt(at({},t),{method:"POST",data:r,headers:{"Content-type":qu.FORM_DATA,ignoreCancelToken:!0}}))}supportFormData(t){var o;const n=t.headers||this.options.headers;return((n==null?void 0:n["Content-Type"])||(n==null?void 0:n["content-type"]))!==qu.FORM_URLENCODED||!Reflect.has(t,"data")||((o=t.method)==null?void 0:o.toUpperCase())===Uu.GET?t:Yt(at({},t),{data:xT.stringify(t.data,{arrayFormat:"brackets"})})}get(t,n){return this.request(Yt(at({},t),{method:"GET"}),n)}post(t,n){return this.request(Yt(at({},t),{method:"POST"}),n)}put(t,n){return this.request(Yt(at({},t),{method:"PUT"}),n)}delete(t,n){return this.request(Yt(at({},t),{method:"DELETE"}),n)}request(t,n){let r=vi(t);t.cancelToken&&(r.cancelToken=t.cancelToken),t.signal&&(r.signal=t.signal);const o=this.getTransform(),{requestOptions:s}=this.options,a=Object.assign({},s,n),{beforeRequestHook:l,requestCatchHook:i,transformResponseHook:c}=o||{};return l&&Eo(l)&&(r=l(r,a)),r.requestOptions=a,r=this.supportFormData(r),new Promise((u,d)=>{this.axiosInstance.request(r).then(p=>{if(c&&Eo(c)){try{const C=c(p,a);u(C)}catch(C){d(C||new Error("request error!"))}return}u(p)}).catch(p=>{if(i&&Eo(i)){d(i(p,a));return}xu.isAxiosError(p),d(p)})})}}function hv(e){return e==="warning"?yt(g3,{class:"modal-icon-warning"},null):e==="success"?yt(hy,{class:"modal-icon-success"},null):e==="info"?yt(g3,{class:"modal-icon-info"},null):yt(my,{class:"modal-icon-error"},null)}function mv({content:e}){return _o(e)?yt("div",{innerHTML:`
${e}
`},null):e}function ET(e){const t=e.iconType||"warning";Reflect.deleteProperty(e,"iconType");const n=Yt(at({centered:!0,icon:hv(t)},e),{content:mv(e)});return Ni.confirm(n)}const wT=()=>{const{t:e}=Zr();return{okText:e("common.okText"),centered:!0}};function M1(e,t){return Yt(at(at({},wT()),e),{content:mv(e),icon:hv(t)})}function ST(e){return Ni.success(M1(e,"success"))}function _T(e){return Ni.error(M1(e,"error"))}function OT(e){return Ni.info(M1(e,"info"))}function TT(e){return Ni.warning(M1(e,"warning"))}Q2.config({placement:"topRight",duration:3});function R1(){return{createMessage:py,notification:Q2,createConfirm:ET,createSuccessModal:ST,createErrorModal:_T,createInfoModal:OT,createWarningModal:TT}}const{createMessage:MT,createErrorModal:RT}=R1(),LT=MT.error,kT=Io.sessionTimeoutProcessing;function AT(e,t,n="message"){const{t:r}=Zr(),o=k1();let s="";switch(e){case 400:s=`${t}`;break;case 401:o.setToken(void 0),s=t||r("sys.api.errMsg401"),kT===a0.PAGE_COVERAGE?o.setSessionTimeout(!0):o.logout(!0);break;case 403:s=r("sys.api.errMsg403");break;case 404:s=r("sys.api.errMsg404");break;case 405:s=r("sys.api.errMsg405");break;case 408:s=r("sys.api.errMsg408");break;case 500:s=r("sys.api.errMsg500");break;case 501:s=r("sys.api.errMsg501");break;case 502:s=r("sys.api.errMsg502");break;case 503:s=r("sys.api.errMsg503");break;case 504:s=r("sys.api.errMsg504");break;case 505:s=r("sys.api.errMsg505");break}s&&(n==="modal"?RT({title:r("sys.api.errorTip"),content:s}):n==="message"&<({content:s,key:`global_error_message_status_${e}`}))}const IT="YYYY-MM-DD HH:mm:ss",DT="YYYY-MM-DD";function PT(e,t=IT){return e0(e).format(t)}function qX(e,t=DT){return e0(e).format(t)}const GX=e0;var NT=(e=>(e[e.PAGE_NOT_ACCESS=403]="PAGE_NOT_ACCESS",e[e.PAGE_NOT_FOUND=404]="PAGE_NOT_FOUND",e[e.ERROR=500]="ERROR",e[e.NET_WORK_ERROR=1e4]="NET_WORK_ERROR",e[e.PAGE_NOT_DATA=10100]="PAGE_NOT_DATA",e))(NT||{}),Wi=(e=>(e.VUE="vue",e.SCRIPT="script",e.RESOURCE="resource",e.AJAX="ajax",e.PROMISE="promise",e))(Wi||{});const $T=Ai({id:"app-error-log",state:()=>({errorLogInfoList:null,errorLogListCount:0}),getters:{getErrorLogInfoList(e){return e.errorLogInfoList||[]},getErrorLogListCount(e){return e.errorLogListCount}},actions:{addErrorLogInfo(e){const t=Yt(at({},e),{time:PT(new Date)});this.errorLogInfoList=[t,...this.errorLogInfoList||[]],this.errorLogListCount+=1},setErrorLogListCount(e){this.errorLogListCount=e},addAjaxErrorInfo(e){const{useErrorHandle:t}=Io;if(!t)return;const n={message:e.message,type:Wi.AJAX};if(e.response){const{config:{url:r="",data:o="",method:s="get",headers:a={}}={},data:l={}}=e.response;n.url=r,n.name="Ajax Error!",n.file="-",n.stack=JSON.stringify(l),n.detail=JSON.stringify({params:o,method:s,headers:a})}this.addErrorLogInfo(n)}}});function yc(){return $T($i)}const FT="YYYY-MM-DD HH:mm:ss";function Jh(e,t=!1){if(!e)return t?"":{};const n=new Date().getTime();return t?`?_t=${n}`:{_t:n}}function g2(e){var t,n;if(Object.prototype.toString.call(e)==="[object Object]")for(const r in e){const o=(n=(t=e[r])==null?void 0:t.format)!=null?n:null;if(o&&typeof o=="function"&&(e[r]=e[r].format(FT)),_o(r)){const s=e[r];if(s)try{e[r]=_o(s)?s.trim():s}catch(a){throw new Error(a)}}Au(e[r])&&g2(e[r])}}class BT{retry(t,n){var a,l;const{config:r}=n.response,{waitTime:o,count:s}=(l=(a=r==null?void 0:r.requestOptions)==null?void 0:a.retryRequest)!=null?l:{};return r.__retryCount=r.__retryCount||0,r.__retryCount>=s?Promise.reject(n):(r.__retryCount+=1,delete r.headers,this.delay(o).then(()=>t(r)))}delay(t){return new Promise(n=>setTimeout(n,t))}}const gv=r0(),VT=gv.urlPrefix,{createMessage:Kd,createErrorModal:Qh,createSuccessModal:HT}=R1(),jT={transformResponseHook:(e,t)=>{const{t:n}=Zr(),{isTransformResponse:r,isReturnNativeResponse:o}=t;if(o)return e;if(!r)return e.data;const{data:s}=e;if(!s)throw new Error(n("sys.api.apiRequestFailed"));const{code:a,result:l,message:i}=s;if(s&&Reflect.has(s,"code")&&a===m2.SUCCESS){let d=i;return(n0(d)||t0(d)||Ug(d))&&(d=n("sys.api.operationSuccess")),t.successMessageMode==="modal"?HT({title:n("sys.api.successTip"),content:d}):t.successMessageMode==="message"&&Kd.success(d),l}let u="";switch(a){case m2.TIMEOUT:u=n("sys.api.timeoutMessage"),k1().logout(!0);break;default:i&&(u=i)}throw t.errorMessageMode==="modal"?Qh({title:n("sys.api.errorTip"),content:u}):t.errorMessageMode==="message"&&Kd.error(u),new Error(u||n("sys.api.apiRequestFailed"))},beforeRequestHook:(e,t)=>{var u;const{apiUrl:n,joinPrefix:r,joinParamsToUrl:o,formatDate:s,joinTime:a=!0,urlPrefix:l}=t;r&&(e.url=`${l}${e.url}`),n&&_o(n)&&(e.url=`${n}${e.url}`);const i=e.params||{},c=e.data||!1;return s&&c&&!_o(c)&&g2(c),((u=e.method)==null?void 0:u.toUpperCase())===Uu.GET?_o(i)?(e.url=e.url+i+`${Jh(a,!0)}`,e.params=void 0):e.params=Object.assign(i||{},Jh(a,!1)):_o(i)?(e.url=e.url+i,e.params=void 0):(s&&g2(i),Reflect.has(e,"data")&&e.data&&(Object.keys(e.data).length>0||e.data instanceof FormData)?(e.data=c,e.params=i):(e.data=i,e.params=void 0),o&&(e.url=ky(e.url,Object.assign({},e.params,e.data)))),e},requestInterceptors:(e,t)=>{var r;const n=_w();return n&&((r=e==null?void 0:e.requestOptions)==null?void 0:r.withToken)!==!1&&(e.headers.Authorization=t.authenticationScheme?`${t.authenticationScheme} ${n}`:n),e},responseInterceptors:e=>e,responseInterceptorsCatch:(e,t)=>{var v,b,S,E,x,h,y,O;const{t:n}=Zr();yc().addAjaxErrorInfo(t);const{response:o,code:s,message:a,config:l}=t||{},i=((v=l==null?void 0:l.requestOptions)==null?void 0:v.errorMessageMode)||"none",c=(E=(S=(b=o==null?void 0:o.data)==null?void 0:b.error)==null?void 0:S.message)!=null?E:"",u=(h=(x=t==null?void 0:t.toString)==null?void 0:x.call(t))!=null?h:"";let d="";if(xu.isCancel(t))return Promise.reject(t);try{if(s==="ECONNABORTED"&&a.indexOf("timeout")!==-1&&(d=n("sys.api.apiTimeoutMessage")),u!=null&&u.includes("Network Error")&&(d=n("sys.api.networkExceptionMsg")),d)return i==="modal"?Qh({title:n("sys.api.errorTip"),content:d}):i==="message"&&Kd.error(d),Promise.reject(t)}catch(T){throw new Error(T)}AT((y=t==null?void 0:t.response)==null?void 0:y.status,c,i);const p=new BT,{isOpenRetry:C}=l.requestOptions.retryRequest;return((O=l.method)==null?void 0:O.toUpperCase())===Uu.GET&&C&&p.retry(e,t),Promise.reject(t)}};function WT(e){return new CT(oc({authenticationScheme:"",timeout:10*1e3,headers:{"Content-Type":qu.JSON},transform:gy(jT),requestOptions:{joinPrefix:!0,isReturnNativeResponse:!1,isTransformResponse:!0,joinParamsToUrl:!1,formatDate:!0,errorMessageMode:"message",apiUrl:gv.apiUrl,urlPrefix:VT,joinTime:!0,ignoreCancelToken:!0,withToken:!0,retryRequest:{isOpenRetry:!0,count:5,waitTime:100}}},e||{}))}const Ia=WT(),Da="/v1/system/user",ZX=e=>Ia.post({url:`${Da}/`,data:e}),YX=(e,t=!1)=>Ia.put({url:`${Da}/`,data:e,params:{updateAllFields:t}}),KX=e=>Ia.delete({url:`${Da}/${e}`}),XX=e=>Ia.get({url:`${Da}/search`,params:e}),zT=e=>Ia.post({url:`${Da}/login`,data:e},{errorMessageMode:"none"}),UT=()=>Ia.post({url:`${Da}/logout`},{errorMessageMode:"none"}),qT=()=>Ia.get({url:`${Da}/info`},{errorMessageMode:"none"}),GT="中核集团预埋件检测系统";function JX(e){}function QX(e){throw new Error(`[${GT} error]:${e}`)}const ZT=()=>Tt(()=>import("./FrameBlank-7a13f319.js"),["./FrameBlank-7a13f319.js","./vue-72a104e4.js"],import.meta.url),L1=new Map;L1.set("LAYOUT",mc);L1.set("IFRAME",ZT);let Xd;function vv(e){Xd=Xd||Object.assign({"../../views/dashboard/index.vue":()=>Tt(()=>import("./index-e1982fac.js"),["./index-e1982fac.js","./vue-72a104e4.js"],import.meta.url),"../../views/data/device/drawer.vue":()=>Tt(()=>import("./drawer-7740e10f.js").then(t=>t.d),["./drawer-7740e10f.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./index-679d8a0a.js","./index-ac2d527c.css","./deviceApi-260fcde9.js","./drawer-979bd460.css"],import.meta.url),"../../views/data/device/index.vue":()=>Tt(()=>import("./index-9ac8985b.js"),["./index-9ac8985b.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-7740e10f.js","./drawer-979bd460.css","./index-acc49e4a.css"],import.meta.url),"../../views/data/task-log/index.vue":()=>Tt(()=>import("./index-e44b7100.js"),["./index-e44b7100.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-e52e16c3.css"],import.meta.url),"../../views/data/task-progress/detail.vue":()=>Tt(()=>import("./detail-e298fdc6.js"),["./detail-e298fdc6.js","./vue-72a104e4.js","./taskProgressApi-ab295ee1.js","./antd-0679333d.js","./detail-e4985283.css"],import.meta.url),"../../views/data/task-progress/drawer.vue":()=>Tt(()=>import("./drawer-5e1025ae.js"),["./drawer-5e1025ae.js","./drawer.vue_vue_type_script_setup_true_lang-06391f52.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./taskProgressApi-ab295ee1.js","./index-679d8a0a.js","./index-ac2d527c.css"],import.meta.url),"../../views/data/task-progress/index.vue":()=>Tt(()=>import("./index-76a27ad4.js"),["./index-76a27ad4.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./taskProgressApi-ab295ee1.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-06391f52.js"],import.meta.url),"../../views/data/task/drawer.vue":()=>Tt(()=>import("./drawer-20246748.js").then(t=>t.d),["./drawer-20246748.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./useTable-e949a6b7.js","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./modal-62c07bbb.js","./modal-9fe2831b.css","./drawer-1e066757.css"],import.meta.url),"../../views/data/task/index.vue":()=>Tt(()=>import("./index-b51a6013.js"),["./index-b51a6013.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./drawer-20246748.js","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./modal-62c07bbb.js","./modal-9fe2831b.css","./drawer-1e066757.css","./result-f5f59bf1.js","./result-1c2ebb23.css","./index-dc7c3222.css"],import.meta.url),"../../views/data/task/modal.vue":()=>Tt(()=>import("./modal-62c07bbb.js"),["./modal-62c07bbb.js","./index-8a6826ba.js","./vue-72a104e4.js","./antd-0679333d.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./useForm-baba730a.js","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./modal-9fe2831b.css"],import.meta.url),"../../views/data/task/result.vue":()=>Tt(()=>import("./result-f5f59bf1.js"),["./result-f5f59bf1.js","./index-8a6826ba.js","./vue-72a104e4.js","./antd-0679333d.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./useTable-e949a6b7.js","./useForm-baba730a.js","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./result-1c2ebb23.css"],import.meta.url),"../../views/sys/about/index.vue":()=>Tt(()=>import("./index-12c490c2.js"),["./index-12c490c2.js","./vue-72a104e4.js","./useContentViewHeight-1771cd5b.js","./useWindowSizeFn-1db11f4f.js","./onMountedOrActivated-ee461833.js","./antd-0679333d.js","./siteSetting-efd6ab5b.js","./index-8ee108fa.css"],import.meta.url),"../../views/sys/exception/Exception.vue":()=>Tt(()=>import("./Exception-79ade5b8.js"),["./Exception-79ade5b8.js","./vue-72a104e4.js","./antd-0679333d.js","./Exception-228e2019.css"],import.meta.url),"../../views/sys/iframe/FrameBlank.vue":()=>Tt(()=>import("./FrameBlank-7a13f319.js"),["./FrameBlank-7a13f319.js","./vue-72a104e4.js"],import.meta.url),"../../views/sys/iframe/index.vue":()=>Tt(()=>import("./index-0a75e8e4.js"),["./index-0a75e8e4.js","./useContentViewHeight-1771cd5b.js","./useWindowSizeFn-1db11f4f.js","./vue-72a104e4.js","./antd-0679333d.js","./index-054645fa.css"],import.meta.url),"../../views/sys/lock/LockPage.vue":()=>Tt(()=>import("./LockPage-1f0cbf71.js"),["./LockPage-1f0cbf71.js","./vue-72a104e4.js","./lock-a170f962.js","./header-b90f4bbc.js","./antd-0679333d.js","./LockPage-b0b08e00.css"],import.meta.url),"../../views/sys/lock/index.vue":()=>Tt(()=>import("./index-6c3f423b.js"),["./index-6c3f423b.js","./vue-72a104e4.js","./LockPage-1f0cbf71.js","./lock-a170f962.js","./header-b90f4bbc.js","./antd-0679333d.js","./LockPage-b0b08e00.css"],import.meta.url),"../../views/sys/redirect/index.vue":()=>Tt(()=>import("./index-2d0e3a91.js"),["./index-2d0e3a91.js","./vue-72a104e4.js"],import.meta.url),"../../views/system/authority/detail.vue":()=>Tt(()=>import("./detail-9fbbe16e.js"),["./detail-9fbbe16e.js","./vue-72a104e4.js","./schema-9d07929f.js","./authorityApi-b12c1221.js","./antd-0679333d.js","./detail-9c9c0d2c.css"],import.meta.url),"../../views/system/authority/drawer.vue":()=>Tt(()=>import("./drawer-18e287e5.js"),["./drawer-18e287e5.js","./drawer.vue_vue_type_script_setup_true_lang-52006c48.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./schema-9d07929f.js","./index-679d8a0a.js","./index-ac2d527c.css","./authorityApi-b12c1221.js"],import.meta.url),"../../views/system/authority/index.vue":()=>Tt(()=>import("./index-dd4da8c9.js"),["./index-dd4da8c9.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./authorityApi-b12c1221.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-52006c48.js","./schema-9d07929f.js","./index-9bec8476.css"],import.meta.url),"../../views/system/constant/detail.vue":()=>Tt(()=>import("./detail-b0185055.js"),["./detail-b0185055.js","./vue-72a104e4.js","./schema-0004c8eb.js","./antd-0679333d.js","./detail-8993a7f8.css"],import.meta.url),"../../views/system/constant/drawer.vue":()=>Tt(()=>import("./drawer-b5ab9726.js"),["./drawer-b5ab9726.js","./drawer.vue_vue_type_script_setup_true_lang-5ec4ab70.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./schema-0004c8eb.js","./index-679d8a0a.js","./index-ac2d527c.css"],import.meta.url),"../../views/system/constant/index.vue":()=>Tt(()=>import("./index-5ea73e3b.js"),["./index-5ea73e3b.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./schema-0004c8eb.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-5ec4ab70.js","./index-7f0daf98.css"],import.meta.url),"../../views/system/index.vue":()=>Tt(()=>import("./index-d7f478ea.js"),["./index-d7f478ea.js","./vue-72a104e4.js","./antd-0679333d.js"],import.meta.url),"../../views/system/log/index.vue":()=>Tt(()=>import("./index-253344a3.js"),["./index-253344a3.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-b4de5e75.css"],import.meta.url),"../../views/system/user-authority/detail.vue":()=>Tt(()=>import("./detail-e296b9ca.js"),["./detail-e296b9ca.js","./vue-72a104e4.js","./userAuthorityApi-5e5c6315.js","./antd-0679333d.js","./detail-5b35e746.css"],import.meta.url),"../../views/system/user-authority/drawer.vue":()=>Tt(()=>import("./drawer-301fe1e6.js"),["./drawer-301fe1e6.js","./drawer.vue_vue_type_script_setup_true_lang-95f18621.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./userAuthorityApi-5e5c6315.js","./index-679d8a0a.js","./index-ac2d527c.css"],import.meta.url),"../../views/system/user-authority/index.vue":()=>Tt(()=>import("./index-1495421d.js"),["./index-1495421d.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./userAuthorityApi-5e5c6315.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-95f18621.js","./index-87b6a8a4.css"],import.meta.url),"../../views/system/user/drawer.vue":()=>Tt(()=>import("./drawer-c24723db.js").then(t=>t.d),["./drawer-c24723db.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./index-679d8a0a.js","./index-ac2d527c.css","./authorityApi-b12c1221.js","./drawer-bace9237.css"],import.meta.url),"../../views/system/user/index.vue":()=>Tt(()=>import("./index-5c55be75.js"),["./index-5c55be75.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-c24723db.js","./authorityApi-b12c1221.js","./drawer-bace9237.css","./index-5b2db5a3.css"],import.meta.url)}),e&&e.forEach(t=>{var s;!t.component&&((s=t.meta)!=null&&s.frameSrc)&&(t.component="IFRAME");const{component:n,name:r}=t,{children:o}=t;if(n){const a=L1.get(n.toUpperCase());a?t.component=a:t.component=YT(Xd,n)}else r&&(t.component=ex());o&&vv(o)})}function YT(e,t){const r=Object.keys(e).filter(o=>{const s=o.replace("../../views",""),a=t.startsWith("/"),l=t.endsWith(".vue")||t.endsWith(".tsx"),i=a?0:1,c=l?s.length:s.lastIndexOf(".");return s.substring(i,c)===t});if((r==null?void 0:r.length)===1){const o=r[0];return e[o]}else return(r==null?void 0:r.length)>1?void 0:Jg}function KT(e){return e.forEach(t=>{const n=t.component;if(n)if(n.toUpperCase()==="LAYOUT")t.component=L1.get(n.toUpperCase());else{t.children=[vi(t)],t.component=mc,t.name=`${t.name}Parent`,t.path="";const r=t.meta||{};r.single=!0,r.affix=!1,t.meta=r}else""+(t==null?void 0:t.name);t.children&&vv(t.children)}),e}function Jd(e){const t=vi(e);for(let n=0;ngi(o,"children"))}function bv(e,t,n){var r,o;for(let s=0;si.name===a.name);l&&(n.children=n.children||[],n.children.find(i=>i.name===l.name)||(r=n.children)==null||r.push(l),(o=a.children)!=null&&o.length&&bv(e,a.children,n))}}function JT(e){var r,o;if(!e||!Reflect.has(e,"children")||!((r=e.children)!=null&&r.length))return!1;const t=e.children;let n=!1;for(let s=0;sObject.assign({},QT,e);function eJ(e,t={}){t=xc(t);const{children:n}=t,r=[...e];for(let o=0;oat({},a)).filter(a=>(a[r]=a[r]&&o(a[r]),t(a)||a[r]&&a[r].length))}return o(e)}function tM(e,t,n={}){n=xc(n);const r=[...e],{children:o}=n;for(let s=0;syv(n,t))}function yv(e,{children:t="children",conversion:n}){const r=Array.isArray(e[t])&&e[t].length>0,o=n(e)||{};return r?Yt(at({},o),{[t]:e[t].map(s=>yv(s,{children:t,conversion:n}))}):at({},o)}function rM(e,t,n={}){e.forEach(r=>{const o=t(r,n)||r;r.children&&rM(r.children,t,o)})}function oM(e,t){return(eM(e,r=>r.path===t)||[]).map(r=>r.path)}function N0(e,t=""){var n,r;for(let o=0;o{var a,l;if(t&&s.meta.hideChildrenInMenu&&typeof s.redirect=="string"&&(s.path=s.redirect),(a=s.meta)!=null&&a.single){const i=(l=s==null?void 0:s.children)==null?void 0:l[0];i&&r.push(i)}else r.push(s)});const o=nM(r,{conversion:s=>{const{meta:{title:a,hideMenu:l=!1}={}}=s;return at(Yt(at({},s.meta||{}),{meta:s.meta,name:a,hideMenu:l,path:s.path}),s.redirect?{redirect:s.redirect}:{})}});return N0(o),vi(o)}const aM=/(?::)([\s\S]+?)((?=\/)|$)/g;function xv(e,t){var a;const{path:n,paramPath:r}=tc(e);let o=r||n;const s=o.match(aM);s==null||s.forEach(l=>{const i=l.substr(1);t[i]&&(o=o.replace(`:${i}`,t[i]))}),!r&&s&&s.length>0&&(e.paramPath=n),e.path=o,(a=e.children)==null||a.forEach(l=>xv(l,t))}const Cc=Ai({id:"app-permission",state:()=>({permCodeList:[],isDynamicAddedRoute:!1,lastBuildMenuTime:0,backMenuList:[],frontMenuList:[]}),getters:{getPermCodeList(e){return e.permCodeList},getBackMenuList(e){return e.backMenuList},getFrontMenuList(e){return e.frontMenuList},getLastBuildMenuTime(e){return e.lastBuildMenuTime},getIsDynamicAddedRoute(e){return e.isDynamicAddedRoute}},actions:{setPermCodeList(e){this.permCodeList=e},setBackMenuList(e){this.backMenuList=e,(e==null?void 0:e.length)>0&&this.setLastBuildMenuTime()},setFrontMenuList(e){this.frontMenuList=e},setLastBuildMenuTime(){this.lastBuildMenuTime=new Date().getTime()},setDynamicAddedRoute(e){this.isDynamicAddedRoute=e},resetState(){this.isDynamicAddedRoute=!1,this.permCodeList=[],this.backMenuList=[],this.lastBuildMenuTime=0},changePermissionCode(e){this.setPermCodeList(e)},buildRoutesAction(){return ft(this,null,function*(){const{t:e}=Zr(),t=Os(),n=C1();let r=[];const o=tc(t.getRoleList)||[],{permissionMode:s=Io.permissionMode}=n.getProjectConfig,a=c=>{const{meta:u}=c,{roles:d}=u||{};return d?o.some(p=>d.includes(p)):!0},l=c=>{const{meta:u}=c,{ignoreRoute:d}=u||{};return!d},i=c=>{if(!c||c.length===0)return;let u=ar.BASE_HOME;function d(p,C=""){C&&(C=C+"/"),p.forEach(v=>{const{path:b,children:S,redirect:E}=v,x=b.startsWith("/")?b:C+b;if(x===u)if(E)u=v.redirect;else throw v.meta=Object.assign({},v.meta,{affix:!0}),new Error("end");S&&S.length>0&&d(S,x)})}try{d(c)}catch(p){}};switch(s){case qn.ROLE:r=ua(dh,a),r=r.filter(a),r=Jd(r);break;case qn.ROUTE_MAPPING:r=ua(dh,a),r=r.filter(a);const c=e4(r,!0);r=ua(r,l),r=r.filter(l),c.sort((C,v)=>{var b,S;return(((b=C.meta)==null?void 0:b.orderNo)||0)-(((S=v.meta)==null?void 0:S.orderNo)||0)}),this.setFrontMenuList(c),r=Jd(r);break;case qn.BACK:const{createMessage:u}=R1();u.loading({content:e("sys.app.menuLoading"),duration:1});let d=[];try{let C=t.getAuthorityList.filter(E=>E.type==="BUTTON").map(E=>E.name);this.changePermissionCode(C);const v=t.getAuthorityList.filter(E=>["MENU","DIR"].includes(E.type)),b=Ay(v,"authorityId"),S=E=>E.map(x=>{x.children&&x.children.length&&(x.children=S(x.children));const{name:h,path:y,redirect:O,title:T,icon:M,keepAlive:R,component:A,hidden:P,children:K,frameSrc:Z}=x;return Z?{name:h,path:y,component:"/sys/iframe/FrameBlank",meta:{title:T,frameSrc:Z}}:{name:h,path:y,redirect:O,component:A,children:K,meta:{title:T,icon:M,hideMenu:P,keepAlive:R}}});d=S(b)}catch(C){}d=KT(d);const p=e4(d);this.setBackMenuList(p),d=ua(d,l),d=d.filter(l),d=Jd(d),r=[_s,...d];break}return i(r),r})}}});function Cv(){return Cc($i)}const Os=Ai({id:"app-user",state:()=>({userInfo:null,token:void 0,roleList:[],authorityList:[],sessionTimeout:!1,lastUpdateTime:0}),getters:{getUserInfo(e){return e.userInfo||gu(Iu)||{}},getToken(e){return e.token||gu(sc)},getRoleList(e){return e.roleList.length>0?e.roleList:gu(E3)},getAuthorityList(){return this.authorityList},getSessionTimeout(e){return!!e.sessionTimeout},getLastUpdateTime(e){return e.lastUpdateTime}},actions:{setToken(e){this.token=e||"",Id(sc,e)},setRoleList(e){this.roleList=e,Id(E3,e)},setUserInfo(e){this.userInfo=e,this.lastUpdateTime=new Date().getTime(),Id(Iu,e)},setRoleAuthority(e){this.authorityList=e},setSessionTimeout(e){this.sessionTimeout=e},resetState(){this.userInfo=null,this.token="",this.roleList=[],this.sessionTimeout=!1},login(e){return ft(this,null,function*(){try{const t=e,{goHome:n=!0,mode:r}=t,o=ll(t,["goHome","mode"]),s=yield zT(o),{token:a}=s;return this.setToken(a),this.afterLoginAction(n)}catch(n){return Promise.reject(n)}})},afterLoginAction(e){return ft(this,null,function*(){if(!this.getToken)return null;const t=yield this.getUserInfoAction();if(this.sessionTimeout)this.setSessionTimeout(!1);else{const r=Cc();r.isDynamicAddedRoute||((yield r.buildRoutesAction()).forEach(s=>{yr.addRoute(s)}),yr.addRoute(_s),r.setDynamicAddedRoute(!0)),e&&(yield yr.replace(ar.BASE_HOME))}return t})},getUserInfoAction(){return ft(this,null,function*(){if(!this.getToken)return null;const e=yield qT(),{roleList:t=[]}=e,n=t.map(o=>o.name);this.setRoleList(n);const r=t[0].authorityList;return n.length&&this.setRoleAuthority(r),this.setUserInfo(e),e})},logout(e=!1){return ft(this,null,function*(){if(this.getToken)try{yield UT()}catch(t){}this.setToken(void 0),this.setSessionTimeout(!1),this.setUserInfo(null),e&&yr.push(ar.BASE_LOGIN)})},confirmLoginOut(){const{createConfirm:e}=R1(),{t}=Zr();e({iconType:"warning",title:()=>w("span",t("sys.app.logoutTip")),content:()=>w("span",t("sys.app.logoutMessage")),onOk:()=>ft(this,null,function*(){yield this.logout(!0)})})}}});function k1(){return Os($i)}const iM=dt({__name:"AppLogo",props:{theme:{type:String,validator:e=>["light","dark"].includes(e)},showTitle:{type:Boolean,default:!0},alwaysShowTitle:{type:Boolean}},setup(e){const t=e,{prefixCls:n}=Do("app-logo"),{getCollapsedShowTitle:r}=Ew(),o=Os(),{title:s}=r0(),a=d1(),l=oe(()=>[n,t.theme,{"collapsed-show-title":Ie(r)}]),i=oe(()=>[`${n}__title`,{"xs:opacity-0":!t.alwaysShowTitle}]);function c(){a(o.getUserInfo.homePath||ar.BASE_HOME)}return(u,d)=>(Wt(),kn("div",{class:Kt(["anticon",l.value]),onClick:c},[d[0]||(d[0]=wn("img",{src:Iy},null,-1)),ai(wn("div",{class:Kt(["ml-2 truncate md:opacity-100",i.value])},Oo(Ie(s)),3),[[nc,e.showTitle]])],2))}});const Xr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},lM=Xr(iM,[["__scopeId","data-v-229a7517"]]);function cM(e,t=Symbol(),n={}){const{readonly:r=!0,createProvider:o=!0,native:s=!1}=n,a=en(e),l=r?K2(a):a;return o&&ln(t,s?e:l),{state:a}}function uM(e=Symbol(),t){return xt(e,t||{})}const Ev=Symbol();function dM(e){return cM(e,Ev)}function wv(){return uM(Ev)}function A1(e){return Zb()?(Yb(e),!0):!1}function br(e){return typeof e=="function"?e():Ie(e)}const $0=typeof window!="undefined"&&typeof document!="undefined";typeof WorkerGlobalScope!="undefined"&&globalThis instanceof WorkerGlobalScope;const fM=e=>e!=null,pM=Object.prototype.toString,hM=e=>pM.call(e)==="[object Object]",Ls=()=>{};function Sv(e,t){function n(...r){return new Promise((o,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(s)})}return n}function mM(e,t={}){let n,r,o=Ls;const s=l=>{clearTimeout(l),o(),o=Ls};return l=>{const i=br(e),c=br(t.maxWait);return n&&s(n),i<=0||c!==void 0&&c<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((u,d)=>{o=t.rejectOnCancel?d:u,c&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,u(l())},c)),n=setTimeout(()=>{r&&s(r),r=null,u(l())},i)})}}function gM(...e){let t=0,n,r=!0,o=Ls,s,a,l,i,c;!Bg(e[0])&&typeof e[0]=="object"?{delay:a,trailing:l=!0,leading:i=!0,rejectOnCancel:c=!1}=e[0]:[a,l=!0,i=!0,c=!1]=e;const u=()=>{n&&(clearTimeout(n),n=void 0,o(),o=Ls)};return p=>{const C=br(a),v=Date.now()-t,b=()=>s=p();return u(),C<=0?(t=Date.now(),b()):(v>C&&(i||!r)?(t=Date.now(),b()):l&&(s=new Promise((S,E)=>{o=c?E:S,n=setTimeout(()=>{t=Date.now(),r=!0,S(b()),u()},Math.max(0,C-v))})),!i&&!n&&(n=setTimeout(()=>r=!0,C)),r=!1,s)}}function v2(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function F0(e){return e||Ii()}function vM(...e){if(e.length!==1)return Kb(...e);const t=e[0];return typeof t=="function"?K2(Xb(()=>({get:t,set:Ls}))):Ne(t)}function _v(e,t=200,n={}){return Sv(mM(t,n),e)}function bM(e,t=200,n=!1,r=!0,o=!1){return Sv(gM(t,n,r,o),e)}function yM(e,t){F0(t)&&pc(e,t)}function nJ(e,t=!0,n){F0()?On(e,n):t?e():ve(e)}function rJ(e,t){F0(t)&&Tn(e,t)}function b2(e,t=!1){function n(d,{flush:p="sync",deep:C=!1,timeout:v,throwOnTimeout:b}={}){let S=null;const x=[new Promise(h=>{S=it(e,y=>{d(y)!==t&&(S==null||S(),h(y))},{flush:p,deep:C,immediate:!0})})];return v!=null&&x.push(v2(v,b).then(()=>br(e)).finally(()=>S==null?void 0:S())),Promise.race(x)}function r(d,p){if(!Bg(d))return n(y=>y===d,p);const{flush:C="sync",deep:v=!1,timeout:b,throwOnTimeout:S}=p!=null?p:{};let E=null;const h=[new Promise(y=>{E=it([e,d],([O,T])=>{t!==(O===T)&&(E==null||E(),y(O))},{flush:C,deep:v,immediate:!0})})];return b!=null&&h.push(v2(b,S).then(()=>br(e)).finally(()=>(E==null||E(),br(e)))),Promise.race(h)}function o(d){return n(p=>!!p,d)}function s(d){return r(null,d)}function a(d){return r(void 0,d)}function l(d){return n(Number.isNaN,d)}function i(d,p){return n(C=>{const v=Array.from(C);return v.includes(d)||v.includes(br(d))},p)}function c(d){return u(1,d)}function u(d=1,p){let C=-1;return n(()=>(C+=1,C>=d),p)}return Array.isArray(br(e))?{toMatch:n,toContains:i,changed:c,changedTimes:u,get not(){return b2(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:s,toBeNaN:l,toBeUndefined:a,changed:c,changedTimes:u,get not(){return b2(e,!t)}}}function xM(e){return b2(e)}function CM(e,t,n={}){const{immediate:r=!0}=n,o=Ne(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){o.value=!1,a()}function i(...c){a(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=null,e(...c)},br(t))}return r&&(o.value=!0,$0&&i()),A1(l),{isPending:K2(o),start:i,stop:l}}function Gu(e){var t;const n=br(e);return(t=n==null?void 0:n.$el)!=null?t:n}const B0=$0?window:void 0,Ov=$0?window.document:void 0;function y2(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=B0):[t,n,r,o]=e,!t)return Ls;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(u=>u()),s.length=0},l=(u,d,p,C)=>(u.addEventListener(d,p,C),()=>u.removeEventListener(d,p,C)),i=it(()=>[Gu(t),br(o)],([u,d])=>{if(a(),!u)return;const p=hM(d)?at({},d):d;s.push(...n.flatMap(C=>r.map(v=>l(u,C,v,p))))},{immediate:!0,flush:"post"}),c=()=>{i(),a()};return A1(c),c}function EM(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Qc(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=B0,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,i=EM(t);return y2(o,s,u=>{u.repeat&&br(l)||i(u)&&n(u)},a)}function wM(){const e=Ne(!1),t=Ii();return t&&On(()=>{e.value=!0},t),e}function Tv(e){const t=wM();return oe(()=>(t.value,!!e()))}function SM(e,t,n={}){const p=n,{window:r=B0}=p,o=ll(p,["window"]);let s;const a=Tv(()=>r&&"MutationObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},i=oe(()=>{const C=br(e),v=(Array.isArray(C)?C:[C]).map(Gu).filter(fM);return new Set(v)}),c=it(()=>i.value,C=>{l(),a.value&&C.size&&(s=new MutationObserver(t),C.forEach(v=>s.observe(v,o)))},{immediate:!0,flush:"post"}),u=()=>s==null?void 0:s.takeRecords(),d=()=>{l(),c()};return A1(d),{isSupported:a,stop:d,takeRecords:u}}function oJ(e,t,n){const{immediate:r=!0,delay:o=0,onError:s=Ls,onSuccess:a=Ls,resetOnExecute:l=!0,shallow:i=!0,throwError:c}=n!=null?n:{},u=i?rc(t):Ne(t),d=Ne(!1),p=Ne(!1),C=rc(void 0);function v(E=0,...x){return ft(this,null,function*(){l&&(u.value=t),C.value=void 0,d.value=!1,p.value=!0,E>0&&(yield v2(E));const h=typeof e=="function"?e(...x):e;try{const y=yield h;u.value=y,d.value=!0,a(y)}catch(y){if(C.value=y,s(y),c)throw y}finally{p.value=!1}return u.value})}r&&v(o);const b={state:u,isReady:d,isLoading:p,error:C,execute:v};function S(){return new Promise((E,x)=>{xM(p).toBe(!1).then(()=>E(b)).catch(x)})}return Yt(at({},b),{then(E,x){return S().then(E,x)}})}const t4=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function sJ(e,t={}){const{document:n=Ov,autoExit:r=!1}=t,o=oe(()=>{var E;return(E=Gu(e))!=null?E:n==null?void 0:n.querySelector("html")}),s=Ne(!1),a=oe(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(E=>n&&E in n||o.value&&E in o.value)),l=oe(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(E=>n&&E in n||o.value&&E in o.value)),i=oe(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(E=>n&&E in n||o.value&&E in o.value)),c=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(E=>n&&E in n),u=Tv(()=>o.value&&n&&a.value!==void 0&&l.value!==void 0&&i.value!==void 0),d=()=>c?(n==null?void 0:n[c])===o.value:!1,p=()=>{if(i.value){if(n&&n[i.value]!=null)return n[i.value];{const E=o.value;if((E==null?void 0:E[i.value])!=null)return!!E[i.value]}}return!1};function C(){return ft(this,null,function*(){if(!(!u.value||!s.value)){if(l.value)if((n==null?void 0:n[l.value])!=null)yield n[l.value]();else{const E=o.value;(E==null?void 0:E[l.value])!=null&&(yield E[l.value]())}s.value=!1}})}function v(){return ft(this,null,function*(){if(!u.value||s.value)return;p()&&(yield C());const E=o.value;a.value&&(E==null?void 0:E[a.value])!=null&&(yield E[a.value](),s.value=!0)})}function b(){return ft(this,null,function*(){yield s.value?C():v()})}const S=()=>{const E=p();(!E||E&&d())&&(s.value=E)};return y2(n,t4,S,!1),y2(()=>Gu(o),t4,S,!1),r&&A1(C),{isSupported:u,isFullscreen:s,enter:v,exit:C,toggle:b}}function _M(e=null,t={}){var n,r,o;const{document:s=Ov,restoreOnUnmount:a=d=>d}=t,l=(n=s==null?void 0:s.title)!=null?n:"",i=vM((r=e!=null?e:s==null?void 0:s.title)!=null?r:null),c=e&&typeof e=="function";function u(d){if(!("titleTemplate"in t))return d;const p=t.titleTemplate||"%s";return typeof p=="function"?p(d):br(p).replace(/%s/g,d)}return it(i,(d,p)=>{d!==p&&s&&(s.title=u(typeof d=="string"?d:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&s&&!c&&SM((o=s.head)==null?void 0:o.querySelector("title"),()=>{s&&s.title!==i.value&&(i.value=u(s.title))},{childList:!0}),yM(()=>{if(a){const d=a(l,i.value||"");d!=null&&s&&(s.title=d)}}),i}function OM({el:e=window,name:t,listener:n,options:r,autoRemove:o=!0,isDebounce:s=!0,wait:a=80}){let l=()=>{};const i=Ne(!1);if(e){const c=Ne(e),u=s?_v(n,a):bM(n,a),d=a?u:n,p=b=>{i.value=!0,b.removeEventListener(t,d,r)},C=b=>b.addEventListener(t,d,r),v=it(c,(b,S,E)=>{b&&(!Ie(i)&&C(b),E(()=>{o&&p(b)}))},{immediate:!0});l=()=>{p(c.value),v()}}return{removeEvent:l}}var gr=(e=>(e.XS="XS",e.SM="SM",e.MD="MD",e.LG="LG",e.XL="XL",e.XXL="XXL",e))(gr||{}),Zu=(e=>(e[e.XS=480]="XS",e[e.SM=576]="SM",e[e.MD=768]="MD",e[e.LG=992]="LG",e[e.XL=1200]="XL",e[e.XXL=1600]="XXL",e))(Zu||{});const Or=new Map;Or.set("XS",480);Or.set("SM",576);Or.set("MD",768);Or.set("LG",992);Or.set("XL",1200);Or.set("XXL",1600);let wu,Su,_u;function aJ(){return{screenRef:oe(()=>Ie(wu)),widthRef:Su,screenEnum:Zu,realWidthRef:_u}}function TM(e){const t=Ne(gr.XL),n=Ne(window.innerWidth);function r(){const s=document.body.clientWidth,a=Or.get(gr.XS),l=Or.get(gr.SM),i=Or.get(gr.MD),c=Or.get(gr.LG),u=Or.get(gr.XL);s{r(),o()}}),r(),wu=oe(()=>Ie(t)),Su=oe(()=>Or.get(Ie(t))),_u=oe(()=>Ie(n));function o(){e==null||e({screen:wu,width:Su,realWidth:_u,screenEnum:Zu,screenMap:Or,sizeEnum:gr})}return o(),{screenRef:wu,screenEnum:Zu,widthRef:Su,realWidthRef:_u}}const MM={prefixCls:{type:String,default:yx}},RM=dt({name:"AppProvider",inheritAttrs:!1,props:MM,setup(e,{slots:t}){const n=Ne(!1),r=Ne(!1),o=Kr();TM(({screenMap:l,sizeEnum:i,width:c})=>{const u=l.get(i.LG);u&&(n.value=c.value-1{var l;return(l=t.default)==null?void 0:l.call(t)}}}),eu=dt({__name:"AppSearchKeyItem",props:{icon:String},setup(e){return(t,n)=>(Wt(),kn("span",{class:Kt(t.$attrs.class)},[yt(Mo,{icon:e.icon},null,8,["icon"])],2))}}),LM=dt({__name:"AppSearchFooter",setup(e){const{prefixCls:t}=Do("app-search-footer"),{t:n}=Zr();return(r,o)=>(Wt(),kn("div",{class:Kt(`${Ie(t)}`)},[yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"ant-design:enter-outlined"},null,8,["class"]),wn("span",null,Oo(Ie(n)("component.app.toSearch")),1),yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"ion:arrow-up-outline"},null,8,["class"]),yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"ion:arrow-down-outline"},null,8,["class"]),wn("span",null,Oo(Ie(n)("component.app.toNavigate")),1),yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"mdi:keyboard-esc"},null,8,["class"]),wn("span",null,Oo(Ie(n)("common.closeText")),1)],2))}});const kM=Xr(LM,[["__scopeId","data-v-3c05e343"]]);function AM(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function IM(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")}function V0(e,t){if(!e||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function x2(e,t){if(!e)return;let n=e.className;const r=(t||"").split(" ");for(let o=0,s=r.length;or4=e),Yu(document,"mouseup",e=>{for(const{documentHandler:t}of Ou.values())t(e,r4)}));function o4(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:n.push(t.arg),function(r,o){const s=t.instance.popperRef,a=r.target,l=o.target,i=!t||!t.instance,c=!a||!l,u=e.contains(a)||e.contains(l),d=e===a,p=n.length&&n.some(v=>v==null?void 0:v.contains(a))||n.length&&n.includes(l),C=s&&(s.contains(a)||s.contains(l));i||c||u||d||p||C||t.value()}}const DM={beforeMount(e,t){Ou.set(e,{documentHandler:o4(e,t),bindingFn:t.value})},updated(e,t){Ou.set(e,{documentHandler:o4(e,t),bindingFn:t.value})},unmounted(e){Ou.delete(e)}},PM=["class","style"],NM=/^on[A-Z]/;function $M(e){return Object.keys(e).map(t=>[t,e[t]])}function Mv(e={}){const t=Ii();if(!t)return{};const{excludeListeners:n=!1,excludeKeys:r=[],excludeDefaultKeys:o=!0}=e,s=rc({}),a=r.concat(o?PM:[]);return t.attrs=en(t.attrs),Vg(()=>{const l=$M(t.attrs).reduce((i,[c,u])=>(!a.includes(c)&&!(n&&NM.test(c))&&(i[c]=u),i),{});s.value=l}),s}function FM(){const e=rc([]);return Qb(()=>{e.value=[]}),{refs:e,setRefs:n=>r=>{e.value[n]=r}}}function BM(e,t,n,r){return e/=r/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)}function VM(e,t){e.scrollTop=t}const HM=e=>e.scrollTop;function E2({el:e,to:t,duration:n=500,callback:r}){const o=rc(!1),s=HM(e),a=t-s,l=20;let i=0;const c=function(){if(!Ie(o))return;i+=l;const p=BM(i,s,a,n);VM(e,p),i{o.value=!0,c()},stop:()=>{o.value=!1}}}function jM(e){for(var t=[],n=0;n=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a===95){o+=e[s++];continue}break}if(!o)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:o}),n=s;continue}if(r==="("){var l=1,i="",s=n+1;if(e[s]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s-1)return!0}return!1},b=function(A){var P=l[l.length-1],K=A||(P&&typeof P=="string"?P:"");if(P&&!K)throw new TypeError('Must have text between two parameters, missing text after "'.concat(P.name,'"'));return!K||v(K)?"[^".concat(Es(a),"]+?"):"(?:(?!".concat(Es(K),")[^").concat(Es(a),"])+?")};c)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}function UM(e,t,n){var r=e.map(function(o){return w2(o,t,n).source});return new RegExp("(?:".concat(r.join("|"),")"),Rv(n))}function qM(e,t,n){return GM(WM(e,n),t,n)}function GM(e,t,n){n===void 0&&(n={});for(var r=n.strict,o=r===void 0?!1:r,s=n.start,a=s===void 0?!0:s,l=n.end,i=l===void 0?!0:l,c=n.encode,u=c===void 0?function(P){return P}:c,d=n.delimiter,p=d===void 0?"/#?":d,C=n.endsWith,v=C===void 0?"":C,b="[".concat(Es(v),"]|$"),S="[".concat(Es(p),"]"),E=a?"^":"",x=0,h=e;x-1:R===void 0;o||(E+="(?:".concat(S,"(?=").concat(b,"))?")),A||(E+="(?=".concat(S,"|").concat(b,")"))}return new RegExp(E,Rv(n))}function w2(e,t,n){return e instanceof RegExp?zM(e,t):Array.isArray(e)?UM(e,t,n):qM(e,t,n)}const s4=Object.assign({}),S2=[];Object.keys(s4).forEach(e=>{const t=s4[e].default||{},n=Array.isArray(t)?[...t]:[t];S2.push(...n)});const H0=()=>C1().getProjectConfig.permissionMode,ZM=()=>H0()===qn.BACK,YM=()=>H0()===qn.ROUTE_MAPPING,j0=()=>H0()===qn.ROLE,Lv=[];(()=>{S2.sort((e,t)=>(e.orderNo||0)-(t.orderNo||0));for(const e of S2)Lv.push(sM(e))})();function W0(){return ft(this,null,function*(){const e=Cc(),t=n=>n.filter(r=>{var s;const o=!((s=r.meta)!=null&&s.hideMenu)&&!r.hideMenu;return o&&r.children&&(r.children=t(r.children)),o});return ZM()?t(e.getBackMenuList):YM()?t(e.getFrontMenuList):Lv})}const kv=()=>ft(void 0,null,function*(){const e=yield W0();if(j0()){const t=yr.getRoutes();return ua(e,z0(t))}return e});function lJ(e){return ft(this,null,function*(){const t=yield W0(),n=yield oM(t,e);return n==null?void 0:n[0]})}function cJ(){return ft(this,null,function*(){const t=(yield W0()).map(n=>Yt(at({},n),{children:void 0}));if(j0()){const n=yr.getRoutes();return t.filter(z0(n))}return t})}function uJ(e){return ft(this,null,function*(){var r;const n=(yield kv()).find(o=>o.path===e);if(!n||!n.children||(r=n==null?void 0:n.meta)!=null&&r.hideChildrenInMenu)return[];if(j0()){const o=yr.getRoutes();return ua(n.children,z0(o))}return n.children})}function z0(e){return t=>{const n=e.find(r=>{var s,a;if(Gg(t.path))return!0;if((s=r.meta)!=null&&s.carryParam)return w2(r.path).test(t.path);const o=r.path===t.path;return o?(a=r.meta)!=null&&a.ignoreAuth?!0:o||w2(r.path).test(t.path):!1});return n?(t.icon=t.icon||n.meta.icon,t.meta=n.meta,!0):!1}}function KM(e){return["$","(",")","*","+",".","[","]","?","\\","^","{","}","|"].includes(e)?`\\${e}`:e}function XM(e){const n=["",...[...e].map(r=>KM(r)),""].join(".*");return new RegExp(n)}function JM(e,t,n){const r=Ne([]),o=Ne(""),s=Ne(-1);let a=[];const{t:l}=Zr(),i=d1(),c=_v(u,200);ey(()=>ft(this,null,function*(){const x=yield kv();a=vi(x),tM(a,h=>{h.name=l(h.name)})}));function u(x){x==null||x.stopPropagation();const h=x.target.value;if(o.value=h.trim(),!h){r.value=[];return}const y=XM(Ie(o)),O=ua(a,T=>y.test(T.name)&&!T.hideMenu);r.value=d(O,y),s.value=0}function d(x,h,y){const O=[];return x.forEach(T=>{const{name:M,path:R,icon:A,children:P,hideMenu:K,meta:Z}=T;!K&&h.test(M)&&(!(P!=null&&P.length)||Z!=null&&Z.hideChildrenInMenu)&&O.push({name:y!=null&&y.name?`${y.name} > ${M}`:M,path:R,icon:A}),!(Z!=null&&Z.hideChildrenInMenu)&&Array.isArray(P)&&P.length&&O.push(...d(P,h,T))}),O}function p(x){const h=x.target.dataset.index;s.value=Number(h)}function C(){r.value.length&&(s.value--,s.value<0&&(s.value=r.value.length-1),b())}function v(){r.value.length&&(s.value++,s.value>r.value.length-1&&(s.value=0),b())}function b(){const x=Ie(e);if(!x||!Array.isArray(x)||x.length===0||!Ie(t))return;const h=Ie(s),y=x[h];if(!y)return;const O=Ie(t);if(!O)return;const T=y.offsetTop+y.offsetHeight,M=O.offsetHeight,{start:R}=E2({el:O,duration:100,to:T-M});R()}function S(){return ft(this,null,function*(){if(!r.value.length)return;const x=Ie(r),h=Ie(s);if(x.length===0||h<0)return;const y=x[h];E(),yield ve(),i(y.path)})}function E(){r.value=[],n("close")}return Qc("Enter",S),Qc("ArrowUp",C),Qc("ArrowDown",v),Qc("Escape",E),{handleSearch:c,searchResult:r,keyword:o,activeIndex:s,handleMouseenter:p,handleEnter:S}}function QM(){const e=wv();return{getIsMobile:oe(()=>Ie(e.isMobile))}}const eR=["data-index"],tR=dt({__name:"AppSearchModal",props:{visible:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,o=Ne(null),s=Ne(null),{t:a}=Zr(),{prefixCls:l}=Do("app-search-modal"),{refs:i,setRefs:c}=FM(),{getIsMobile:u}=QM(),{handleSearch:d,searchResult:p,keyword:C,activeIndex:v,handleEnter:b,handleMouseenter:S}=JM(i,o,r),E=oe(()=>!C||Ie(p).length===0),x=oe(()=>[l,{[`${l}--mobile`]:Ie(u)}]);it(()=>n.visible,y=>{y&&ve(()=>{var O;(O=Ie(s))==null||O.focus()})});function h(){p.value=[],r("close")}return(y,O)=>{const T=hn("a-input");return Wt(),Kn(Is,{to:"body"},[yt(X2,{name:"zoom-fade",mode:"out-in"},{default:or(()=>[e.visible?(Wt(),kn("div",{key:0,class:Kt(x.value),onClick:O[2]||(O[2]=ty(()=>{},["stop"]))},[ai((Wt(),kn("div",{class:Kt(`${Ie(l)}-content`)},[wn("div",{class:Kt(`${Ie(l)}-input__wrapper`)},[yt(T,{class:Kt(`${Ie(l)}-input`),placeholder:Ie(a)("common.searchText"),ref_key:"inputRef",ref:s,"allow-clear":"",onChange:Ie(d)},{prefix:or(()=>[yt(Ie(vy))]),_:1},8,["class","placeholder","onChange"]),wn("span",{class:Kt(`${Ie(l)}-cancel`),onClick:h},Oo(Ie(a)("common.cancelText")),3)],2),ai(wn("div",{class:Kt(`${Ie(l)}-not-data`)},Oo(Ie(a)("component.app.searchNotData")),3),[[nc,E.value]]),ai(wn("ul",{class:Kt(`${Ie(l)}-list`),ref_key:"scrollWrap",ref:o},[(Wt(!0),kn(ii,null,Hg(Ie(p),(M,R)=>(Wt(),kn("li",{ref_for:!0,ref:Ie(c)(R),key:M.path,"data-index":R,onMouseenter:O[0]||(O[0]=(...A)=>Ie(S)&&Ie(S)(...A)),onClick:O[1]||(O[1]=(...A)=>Ie(b)&&Ie(b)(...A)),class:Kt([`${Ie(l)}-list__item`,{[`${Ie(l)}-list__item--active`]:Ie(v)===R}])},[wn("div",{class:Kt(`${Ie(l)}-list__item-icon`)},[yt(Mo,{icon:M.icon||"mdi:form-select",size:20},null,8,["icon"])],2),wn("div",{class:Kt(`${Ie(l)}-list__item-text`)},Oo(M.name),3),wn("div",{class:Kt(`${Ie(l)}-list__item-enter`)},[yt(Mo,{icon:"ant-design:enter-outlined",size:20})],2)],42,eR))),128))],2),[[nc,!E.value]]),yt(kM)],2)),[[Ie(DM),h]])],2)):bt("",!0)]),_:1})])}}});const nR=Xr(tR,[["__scopeId","data-v-5602e8a8"]]),rR=dt({name:"AppSearch",setup(){const e=Ne(!1),{t}=Zr();function n(r){e.value=r}return()=>yt("div",{class:"p-1",onClick:n.bind(null,!0)},[yt(Vf,null,{title:()=>t("common.searchText"),default:()=>yt(by,null,null)}),yt(nR,{onClose:n.bind(null,!1),visible:Ie(e)},null)])}}),oR={class:"ml-1"},sR={class:"ml-1"},aR=dt({__name:"Dropdown",props:{popconfirm:Boolean,trigger:{type:Array,default:()=>["contextmenu"]},dropMenuList:{type:Array,default:()=>[]},selectedKeys:{type:Array,default:()=>[]}},emits:["menuEvent"],setup(e,{emit:t}){const n=yy,r=Cd,o=Cd.Item,s=Cd.Divider,a=zg,l=e,i=t;function c(p){var b;const{event:C}=p,v=l.dropMenuList.find(S=>`${S.event}`==`${C}`);i("menuEvent",v),(b=p.onClick)==null||b.call(p)}const u=oe(()=>p=>{const C=gi(p,["confirm","cancel","icon"]);return!p.onConfirm&&p.confirm&&Eo(p.confirm)&&(C.onConfirm=p.confirm),!p.onCancel&&p.cancel&&Eo(p.cancel)&&(C.onCancel=p.cancel),C}),d=p=>({key:p});return(p,C)=>(Wt(),Kn(Ie(n),Ko({trigger:e.trigger},p.$attrs),{overlay:or(()=>[yt(Ie(r),{selectedKeys:e.selectedKeys},{default:or(()=>[(Wt(!0),kn(ii,null,Hg(e.dropMenuList,v=>(Wt(),kn(ii,{key:`${v.event}`},[yt(Ie(o),Ko({ref_for:!0},d(v.event),{onClick:b=>c(v),disabled:v.disabled}),{default:or(()=>[e.popconfirm&&v.popConfirm?(Wt(),Kn(Ie(a),Ko({key:0,ref_for:!0},u.value(v.popConfirm),{disabled:v.disabled}),ny({default:or(()=>[wn("div",null,[v.icon?(Wt(),Kn(Mo,{key:0,icon:v.icon},null,8,["icon"])):bt("",!0),wn("span",oR,Oo(v.text),1)])]),_:2},[v.popConfirm.icon?{name:"icon",fn:or(()=>[yt(Mo,{icon:v.popConfirm.icon},null,8,["icon"])]),key:"0"}:void 0]),1040,["disabled"])):(Wt(),kn(ii,{key:1},[v.icon?(Wt(),Kn(Mo,{key:0,icon:v.icon},null,8,["icon"])):bt("",!0),wn("span",sR,Oo(v.text),1)],64))]),_:2},1040,["onClick","disabled"]),v.divider?(Wt(),Kn(Ie(s),{key:`d-${v.event}`})):bt("",!0)],64))),128))]),_:1},8,["selectedKeys"])]),default:or(()=>[wn("span",null,[Di(p.$slots,"default")])]),_:3},16,["trigger"]))}}),iR=Dr(aR);function a4(e){const t=x0();Xo.mode==="legacy"?Xo.global.locale=e:Xo.global.locale.value=e,t.setLocaleInfo({locale:e}),d6(e)}function Av(){const e=x0(),t=oe(()=>e.getLocale),n=oe(()=>e.getShowPicker),r=oe(()=>{var s,a;return(a=(s=Xo.global.getLocaleMessage(Ie(t)))==null?void 0:s.antdLocale)!=null?a:{}});function o(s){return ft(this,null,function*(){const a=Xo.global;if(Ie(a.locale)===s)return s;if(Qf.includes(s))return a4(s),s;const i=(yield g5(Object.assign({"./lang/en.ts":()=>Tt(()=>import("./en-9c11272e.js"),["./en-9c11272e.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url),"./lang/zh_CN.ts":()=>Tt(()=>import("./zh_CN-f9481935.js"),["./zh_CN-f9481935.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url)}),`./lang/${s}.ts`)).default;if(!i)return;const{message:c}=i;return a.setLocaleMessage(s,c),Qf.push(s),a4(s),s})}return{getLocale:t,getShowLocalePicker:n,changeLocale:o,getAntdLocale:r}}const lR={class:"cursor-pointer flex items-center"},cR={key:0,class:"ml-1"},uR=dt({__name:"AppLocalePicker",props:{showText:{type:Boolean,default:!0},reload:{type:Boolean}},setup(e){const t=e,n=Ne([]),{changeLocale:r,getLocale:o}=Av(),s=oe(()=>{var c;const i=n.value[0];return i?(c=lh.find(u=>u.event===i))==null?void 0:c.text:""});Vg(()=>{n.value=[Ie(o)]});function a(i){return ft(this,null,function*(){yield r(i),n.value=[i],t.reload&&location.reload()})}function l(i){Ie(o)!==i.event&&a(i.event)}return(i,c)=>(Wt(),Kn(Ie(iR),{placement:"bottom",trigger:["click"],dropMenuList:Ie(lh),selectedKeys:n.value,onMenuEvent:l,overlayClassName:"app-locale-picker-overlay"},{default:or(()=>[wn("span",lR,[yt(Mo,{icon:"ion:language"}),e.showText?(Wt(),kn("span",cR,Oo(s.value),1)):bt("",!0)])]),_:1},8,["dropMenuList","selectedKeys"]))}});function U0(e,t="default",n,r){if(!e||!Reflect.has(e,t)||!Eo(e[t]))return null;const o=e[t];if(!o)return null;const s=at(at({},n),r);return o(s)}function dR(e,t=[]){const n=Object.keys(e),r={};return n.map(o=>{if(t.includes(o))return null;r[o]=s=>U0(e,o,s)}),r}function Iv(e,t,n="in-out"){return dt({name:e,props:{mode:{type:String,default:n}},setup(r,{attrs:o,slots:s}){return()=>yt(X2,Ko({name:e,mode:r.mode},o,{onBeforeEnter:t.beforeEnter,onEnter:t.enter,onLeave:t.leave,onAfterLeave:t.afterLeave,onLeaveCancelled:t.afterLeave}),{default:()=>U0(s)})}})}function fR(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Dv(e="",t=!1){const n=t?"width":"height",r=`offset${fR(n)}`;return{beforeEnter(a){a._parent=a.parentNode,a._initialStyle={transition:a.style.transition,overflow:a.style.overflow,[n]:a.style[n]}},enter(a){const l=a._initialStyle;a.style.setProperty("transition","none","important"),a.style.overflow="hidden",a.offsetHeight,a.style.transition=l.transition,e&&a._parent&&a._parent.classList.add(e),requestAnimationFrame(()=>{})},afterEnter:s,enterCancelled:s,leave(a){a._initialStyle={transition:"",overflow:a.style.overflow,[n]:a.style[n]},a.style.overflow="hidden",a.style[n]=`${a[r]}px`,a.offsetHeight,requestAnimationFrame(()=>a.style[n]="0")},afterLeave:o,leaveCancelled:o};function o(a){e&&a._parent&&a._parent.classList.remove(e),s(a)}function s(a){const l=a._initialStyle[n];a.style.overflow=a._initialStyle.overflow,l!=null&&(a.style[n]=l),Reflect.deleteProperty(a,"_initialStyle")}}const pR=dt({name:"CollapseTransition",setup(){return{on:{beforeEnter(e){x2(e,"collapse-transition"),e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height="0",e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=e.scrollHeight+"px",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"},afterEnter(e){C2(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=e.scrollHeight+"px",e.style.overflow="hidden"},leave(e){e.scrollHeight!==0&&(x2(e,"collapse-transition"),e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){C2(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}}}}});function hR(e,t,n,r,o,s){return Wt(),Kn(X2,Ko({mode:"out-in"},ry(e.on)),{default:or(()=>[Di(e.$slots,"default")]),_:3},16)}const mR=Xr(pR,[["render",hR]]);Iv("expand-x-transition",Dv("",!0));Iv("expand-transition",Dv(""));const gR=dt({__name:"BasicArrow",props:{expand:{type:Boolean},up:{type:Boolean},down:{type:Boolean},inset:{type:Boolean}},setup(e){const t=e,{prefixCls:n}=Do("basic-arrow"),r=oe(()=>{const{expand:o,up:s,down:a,inset:l}=t;return[n,{[`${n}--active`]:o,up:s,inset:l,down:a}]});return(o,s)=>(Wt(),kn("span",{class:Kt(r.value)},[yt(Mo,{icon:"ion:chevron-forward",style:mi(o.$attrs.iconStyle)},null,8,["style"])],2))}});const vR=Xr(gR,[["__scopeId","data-v-ec9b569e"]]),bR={maxWidth:{type:String,default:"600px"},showIndex:{type:Boolean},color:{type:String,default:"#ffffff"},fontSize:{type:String,default:"14px"},placement:{type:String,default:"right"},text:{type:[Array,String]}},Pv=dt({name:"BasicHelp",components:{Tooltip:Vf},props:bR,setup(e,{slots:t}){const{prefixCls:n}=Do("basic-help"),r=oe(()=>({color:e.color,fontSize:e.fontSize})),o=oe(()=>({maxWidth:e.maxWidth}));function s(){const a=e.text;return _o(a)?yt("p",null,[a]):ga(a)?a.map((l,i)=>yt("p",{key:l},[yt(ii,null,[e.showIndex?`${i+1}. `:"",l])])):null}return()=>yt(Vf,{overlayClassName:`${n}__wrap`,title:yt("div",{style:Ie(r)},[s()]),autoAdjustOverflow:!0,overlayStyle:Ie(o),placement:e.placement,getPopupContainer:()=>Ly()},{default:()=>[yt("span",{class:n},[U0(t)||yt(xy,null,null)])]})}});const yR=dt({__name:"BasicTitle",props:{helpMessage:{type:[String,Array],default:""},span:{type:Boolean},normal:{type:Boolean}},setup(e){const t=e,{prefixCls:n}=Do("basic-title"),r=oy(),o=oe(()=>[n,{[`${n}-show-span`]:t.span&&r.default},{[`${n}-normal`]:t.normal}]);return(s,a)=>(Wt(),kn("span",{class:Kt(o.value)},[Di(s.$slots,"default",{},void 0,!0),e.helpMessage?(Wt(),Kn(Pv,{key:0,class:Kt(`${Ie(n)}-help`),text:e.helpMessage},null,8,["class","text"])):bt("",!0)],2))}});const xR=Xr(yR,[["__scopeId","data-v-3f45b404"]]),CR=Dr(vR),ER=Dr(xR),dJ=Dr(Pv),wR={prefixCls:String,title:String,show:Boolean,canExpan:Boolean,helpMessage:{type:[Array,String],default:""}},SR=dt({name:"CollapseHeader",inheritAttrs:!1,props:wR,emits:["expand"],setup(e,{slots:t,attrs:n,emit:r}){const{prefixCls:o}=Do("collapse-container"),s=oe(()=>e.prefixCls||Ie(o));return()=>yt("div",{class:[`${Ie(s)}__header px-2 py-5`,n.class]},[yt(ER,{helpMessage:e.helpMessage,normal:!0},{default:()=>{var a;return[((a=t.title)==null?void 0:a.call(t))||e.title]}}),yt("div",{class:`${Ie(s)}__action`},[t.action?t.action({expand:e.show,onClick:()=>r("expand")}):e.canExpan&&yt(CR,{up:!0,expand:e.show,onClick:()=>r("expand")},null)])])}}),_R=typeof window=="undefined";function OR(e){for(const t of e){const n=t.target.__resizeListeners__||[];n.length&&n.forEach(r=>{r()})}}function i4(e,t){_R||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new Cy(OR),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function l4(e,t){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||e.__ro__.disconnect())}function TR(){const e=document.createEvent("HTMLEvents");e.initEvent("resize",!0,!0),e.eventType="message",window.dispatchEvent(e)}const MR={title:{type:String,default:""},loading:{type:Boolean},canExpan:{type:Boolean,default:!0},helpMessage:{type:[Array,String],default:""},triggerWindowResize:{type:Boolean},lazyTime:{type:Number,default:0}},RR=dt({name:"CollapseContainer",props:MR,setup(e,{expose:t,slots:n}){const{prefixCls:r}=Do("collapse-container"),o=Ne(!0),s=a=>{o.value=J2(a)?!o.value:a,e.triggerWindowResize&&CM(TR,200)};return t({handleExpand:s}),()=>yt("div",{class:Ie(r)},[yt(SR,Ko(e,{prefixCls:Ie(r),onExpand:s,show:o.value}),{title:n.title,action:n.action}),yt("div",{class:"p-2"},[yt(mR,{enable:e.canExpan},{default:()=>{var a;return[e.loading?yt(Ey,{active:e.loading},null):ai(yt("div",{class:`${r}__body`},[(a=n.default)==null?void 0:a.call(n)]),[[nc,o.value]])]}})]),n.footer&&yt("div",{class:`${r}__footer`},[n.footer()])])}});const LR={table:{fetchSetting:{pageField:"pageNum",sizeField:"pageSize",listField:"records",totalField:"total"},pageSizeOptions:["10","50","80","100"],defaultPageSize:10,defaultSize:"middle",defaultSortFn:e=>{const{field:t,order:n}=e;return t&&n?{field:t,order:n}:{}},defaultFilterFn:e=>e},vxeTable:{table:{border:!0,stripe:!0,columnConfig:{resizable:!0,isCurrent:!0,isHover:!0},rowConfig:{isCurrent:!0,isHover:!0},emptyRender:{name:"AEmpty"},printConfig:{},exportConfig:{},customConfig:{storage:!0}},grid:{toolbarConfig:{enabled:!0,export:!0,zoom:!0,print:!0,refresh:!0,custom:!0},pagerConfig:{pageSizes:[20,50,100,500],pageSize:20,autoHidden:!0},proxyConfig:{form:!0,props:{result:"items",total:"total"}},zoomConfig:{}}},scrollbar:{native:!1}},kR={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};function AR({move:e,size:t,bar:n}){const r={},o=`translate${n.axis}(${e}%)`;return r[n.size]=t,r.transform=o,r.msTransform=o,r.webkitTransform=o,r}function IR(e,t){return Object.assign(e,t)}function DR(e){const t={};for(let n=0;nkR[e.vertical?"vertical":"horizontal"]),s=Ne({}),a=Ne(),l=p=>{var C;p.ctrlKey||p.button===2||((C=window.getSelection())==null||C.removeAllRanges(),c(p),s.value[o.value.axis]=p.currentTarget[o.value.offset]-(p[o.value.client]-p.currentTarget.getBoundingClientRect()[o.value.direction]))},i=p=>{var S;const C=Math.abs(p.target.getBoundingClientRect()[o.value.direction]-p[o.value.client]),v=n.value[o.value.offset]/2,b=(C-v)*100/((S=t==null?void 0:t.vnode.el)==null?void 0:S[o.value.offset]);r.value[o.value.scroll]=b*r.value[o.value.scrollSize]/100},c=p=>{p.stopImmediatePropagation(),a.value=!0,Yu(document,"mousemove",u),Yu(document,"mouseup",d),document.onselectstart=()=>!1},u=p=>{var E,x;if(a.value===!1)return;const C=s.value[o.value.axis];if(!C)return;const v=(((E=t==null?void 0:t.vnode.el)==null?void 0:E.getBoundingClientRect()[o.value.direction])-p[o.value.client])*-1,b=n.value[o.value.offset]-C,S=(v-b)*100/((x=t==null?void 0:t.vnode.el)==null?void 0:x[o.value.offset]);r.value[o.value.scroll]=S*r.value[o.value.scrollSize]/100};function d(){a.value=!1,s.value[o.value.axis]=0,n4(document,"mousemove",u),document.onselectstart=null}return Tn(()=>{n4(document,"mouseup",d)}),()=>w("div",{class:["scrollbar__bar","is-"+o.value.key],onMousedown:i},w("div",{ref:n,class:"scrollbar__thumb",onMousedown:l,style:AR({size:e.size,move:e.move,bar:o.value})}))}}),{scrollbar:Qd}=LR;var Ng;const NR=dt({name:"Scrollbar",components:{Bar:PR},props:{native:{type:Boolean,default:(Ng=Qd==null?void 0:Qd.native)!=null?Ng:!1},wrapStyle:{type:[String,Array],default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array],default:""},noresize:Boolean,tag:{type:String,default:"div"}},setup(e){const t=Ne("0"),n=Ne("0"),r=Ne(0),o=Ne(0),s=Ne(),a=Ne();ln("scroll-bar-wrap",s);const l=oe(()=>Array.isArray(e.wrapStyle)?DR(e.wrapStyle):e.wrapStyle),i=()=>{e.native||(o.value=Ie(s).scrollTop*100/Ie(s).clientHeight,r.value=Ie(s).scrollLeft*100/Ie(s).clientWidth)},c=()=>{if(!Ie(s))return;const u=Ie(s).clientHeight*100/Ie(s).scrollHeight,d=Ie(s).clientWidth*100/Ie(s).scrollWidth;n.value=u<100?u+"%":"",t.value=d<100?d+"%":""};return On(()=>{e.native||(ve(c),e.noresize||(i4(Ie(a),c),i4(Ie(s),c),addEventListener("resize",c)))}),pc(()=>{e.native||e.noresize||(l4(Ie(a),c),l4(Ie(s),c),removeEventListener("resize",c))}),{moveX:r,moveY:o,sizeWidth:t,sizeHeight:n,style:l,wrap:s,resize:a,update:c,handleScroll:i}}});const $R={class:"scrollbar"};function FR(e,t,n,r,o,s){const a=hn("bar");return Wt(),kn("div",$R,[wn("div",{ref:"wrap",class:Kt([e.wrapClass,"scrollbar__wrap",e.native?"":"scrollbar__wrap--hidden-default"]),style:mi(e.style),onScroll:t[0]||(t[0]=(...l)=>e.handleScroll&&e.handleScroll(...l))},[(Wt(),Kn(sy(e.tag),{ref:"resize",class:Kt(["scrollbar__view",e.viewClass]),style:mi(e.viewStyle)},{default:or(()=>[Di(e.$slots,"default")]),_:3},8,["class","style"]))],38),e.native?bt("",!0):(Wt(),kn(ii,{key:0},[yt(a,{move:e.moveX,size:e.sizeWidth},null,8,["move","size"]),yt(a,{vertical:"",move:e.moveY,size:e.sizeHeight},null,8,["move","size"])],64))])}const BR=Xr(NR,[["render",FR]]),VR=dt({name:"ScrollContainer",components:{Scrollbar:BR},setup(){const e=Ne(null);function t(o,s=500){const a=Ie(e);a&&ve(()=>{const l=Ie(a.wrap);if(!l)return;const{start:i}=E2({el:l,to:o,duration:s});i()})}function n(){const o=Ie(e);return o?o.wrap:null}function r(){const o=Ie(e);o&&ve(()=>{const s=Ie(o.wrap);if(!s)return;const a=s.scrollHeight,{start:l}=E2({el:s,to:a});l()})}return{scrollbarRef:e,scrollTo:t,scrollBottom:r,getScrollWrap:n}}});function HR(e,t,n,r,o,s){const a=hn("Scrollbar");return Wt(),Kn(a,Ko({ref:"scrollbarRef",class:"scroll-container"},e.$attrs),{default:or(()=>[Di(e.$slots,"default")]),_:3},16)}const jR=Xr(VR,[["render",HR]]),fJ=Dr(RR),pJ=Dr(jR);function WR(){const e=Kr(),t=oe(()=>e.getPageLoading),n=oe(()=>e.getProjectConfig.openKeepAlive),r=oe(()=>e.getProjectConfig.settingButtonPosition),o=oe(()=>e.getProjectConfig.canEmbedIFramePage),s=oe(()=>e.getProjectConfig.permissionMode),a=oe(()=>e.getProjectConfig.showLogo),l=oe(()=>e.getProjectConfig.contentMode),i=oe(()=>e.getProjectConfig.useOpenBackTop),c=oe(()=>e.getProjectConfig.showSettingButton),u=oe(()=>e.getProjectConfig.useErrorHandle),d=oe(()=>e.getProjectConfig.showFooter),p=oe(()=>e.getProjectConfig.showBreadCrumb),C=oe(()=>e.getProjectConfig.themeColor),v=oe(()=>e.getProjectConfig.showBreadCrumbIcon),b=oe(()=>e.getProjectConfig.fullContent),S=oe(()=>e.getProjectConfig.colorWeak),E=oe(()=>e.getProjectConfig.grayMode),x=oe(()=>e.getProjectConfig.lockTime),h=oe(()=>e.getProjectConfig.showDarkModeToggle),y=oe(()=>e.getDarkMode),O=oe(()=>e.getProjectConfig.contentMode===Sl.FULL?Sl.FULL:Sl.FIXED);function T(R){e.setProjectConfig(R)}function M(R){e.setDarkMode(R)}return{setRootSetting:T,getSettingButtonPosition:r,getFullContent:b,getColorWeak:S,getGrayMode:E,getLayoutContentMode:O,getPageLoading:t,getOpenKeepAlive:n,getCanEmbedIFramePage:o,getPermissionMode:s,getShowLogo:a,getUseErrorHandle:u,getShowBreadCrumb:p,getShowBreadCrumbIcon:v,getUseOpenBackTop:i,getShowSettingButton:c,getShowFooter:d,getContentMode:l,getLockTime:x,getThemeColor:C,getDarkMode:y,setDarkMode:M,getShowDarkModeToggle:h}}function Nv(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function zR(e){let t=e.toLowerCase();if(Nv(e)){if(t.length===4){let r="#";for(let o=1;o<4;o+=1)r+=t.slice(o,o+1).concat(t.slice(o,o+1));t=r}const n=[];for(let r=1;r<7;r+=2)n.push(parseInt("0x"+t.slice(r,r+2)));return"RGB("+n.join(",")+")"}return t}function UR(e){if(!Nv(e))return;const[t,n,r]=zR(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(o=>Number(o));return t*.299+n*.578+r*.114<192}function qR(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${tf(e.substring(0,2),t)}${tf(e.substring(2,4),t)}${tf(e.substring(4,6),t)}`}function $v(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ef(e.substring(0,2),t)}${ef(e.substring(2,4),t)}${ef(e.substring(4,6),t)}`}function ef(e,t){const n=parseInt(e,16)+t,r=n>255?255:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function tf(e,t){const n=parseInt(e,16)-t,r=n<0?0:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}const GR=document.documentElement;function Fv(e,t,n){const r=n||document.body;let{className:o}=r;o=o.replace(t,""),r.className=e?`${o} ${t} `:o}function ui(e,t,n=GR){n.style.setProperty(e,t)}const ZR="--header-bg-color",YR="--header-bg-hover-color",KR="--header-active-menu-bg-color",XR="--sider-dark-bg-color",JR="--sider-dark-darken-bg-color",QR="--sider-dark-lighten-bg-color";function _2(e){const t=Kr(),n=t.getDarkMode===lr.DARK;e||(n?e="#151515":e=t.getHeaderSetting.bgColor),ui(ZR,e);const r=$v(e,6);ui(YR,r),ui(KR,r);const o=UR(e);t.setProjectConfig({headerSetting:{theme:o||n?lr.DARK:lr.LIGHT}})}function O2(e){const t=Kr(),n=t.getDarkMode===lr.DARK;e||(n?e="#212121":e=t.getMenuSetting.bgColor),ui(XR,e),ui(JR,qR(e,6)),ui(QR,$v(e,5));const r=["#fff","#ffffff"].includes(e.toLowerCase());t.setProjectConfig({menuSetting:{theme:r&&!n?lr.LIGHT:lr.DARK}})}function Bv(e="light"){return ft(this,null,function*(){const t=document.getElementById("htmlRoot");if(!t)return;const n=V0(t,"dark");e==="dark"?(t.setAttribute("data-theme","dark"),n||x2(t,"dark")):(t.setAttribute("data-theme","light"),n&&C2(t,"dark"))})}const eL=dt({__name:"AppDarkModeToggle",setup(e){const{prefixCls:t}=Do("dark-switch"),{getDarkMode:n,setDarkMode:r,getShowDarkModeToggle:o}=WR(),s=oe(()=>n.value===lr.DARK),a=oe(()=>[t,{[`${t}--dark`]:Ie(s)}]);function l(){const i=n.value===lr.DARK?lr.LIGHT:lr.DARK;r(i),Bv(i),_2(),O2()}return(i,c)=>Ie(o)?(Wt(),kn("div",{key:0,class:Kt(a.value),onClick:l},[wn("div",{class:Kt(`${Ie(t)}-inner`)},null,2),yt(Ie(T2),{size:"14",name:"sun"}),yt(Ie(T2),{size:"14",name:"moon"})],2)):bt("",!0)}});const tL=Xr(eL,[["__scopeId","data-v-a37e5ee9"]]),hJ=Dr(lM),nL=Dr(RM),mJ=Dr(rR),gJ=Dr(uR),vJ=Dr(tL);function Do(e){const t=wv();return{prefixCls:`${t.prefixCls}-${e}`,prefixVar:t.prefixCls}}const rL=dt({name:"SvgIcon",props:{prefix:{type:String,default:"icon"},name:{type:String,required:!0},size:{type:[Number,String],default:16},spin:{type:Boolean,default:!1}},setup(e){const{prefixCls:t}=Do("svg-icon"),n=oe(()=>`#${e.prefix}-${e.name}`),r=oe(()=>{const{size:o}=e;let s=`${o}`;return s=`${s.replace("px","")}px`,{width:s,height:s}});return{symbolId:n,prefixCls:t,getStyle:r}}});const oL=["xlink:href"];function sL(e,t,n,r,o,s){return Wt(),kn("svg",{class:Kt([e.prefixCls,e.$attrs.class,e.spin&&"svg-icon-spin"]),style:mi(e.getStyle),"aria-hidden":"true"},[wn("use",{"xlink:href":e.symbolId},null,8,oL)],6)}const T2=Xr(rL,[["render",sL],["__scopeId","data-v-6b7deac0"]]);/** +`+t.prev}function Kc(e,t){var n=f2(e),r=[];if(n){r.length=e.length;for(var o=0;o1;){var n=t.pop(),r=n.obj[n.prop];if(ra(r)){for(var o=[],s=0;s=Zd?a.slice(i,i+Zd):a,u=[],d=0;d=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||s===WO.RFC1738&&(p===40||p===41)){u[u.length]=c.charAt(d);continue}if(p<128){u[u.length]=yo[p];continue}if(p<2048){u[u.length]=yo[192|p>>6]+yo[128|p&63];continue}if(p<55296||p>=57344){u[u.length]=yo[224|p>>12]+yo[128|p>>6&63]+yo[128|p&63];continue}d+=1,p=65536+((p&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=yo[240|p>>18]+yo[128|p>>12&63]+yo[128|p>>6&63]+yo[128|p&63]}l+=u.join("")}return l},YO=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o0?h.join(",")||null:void 0}];else if(wo(u))P=u;else{var K=Object.keys(h);P=d?K.sort(d):K}var Z=i?n.replace(/\./g,"%2E"):n,V=o&&wo(h)&&h.length===1?Z+"[]":Z;if(s&&wo(h)&&h.length===0)return V+"[]";for(var se=0;se0?C+p:""},Si=lv,h2=Object.prototype.hasOwnProperty,iT=Array.isArray,bn={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Si.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},lT=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},fv=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cT="utf8=%26%2310003%3B",uT="utf8=%E2%9C%93",dT=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,s),l=-1,i,c=n.charset;if(n.charsetSentinel)for(i=0;i-1&&(v=iT(v)?[v]:v);var b=h2.call(r,C);b&&n.duplicates==="combine"?r[C]=Si.combine(r[C],v):(!b||n.duplicates==="last")&&(r[C]=v)}return r},fT=function(e,t,n,r){for(var o=r?t:fv(t,n),s=e.length-1;s>=0;--s){var a,l=e[s];if(l==="[]"&&n.parseArrays)a=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{a=n.plainObjects?Object.create(null):{};var i=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,c=n.decodeDotInKeys?i.replace(/%2E/g,"."):i,u=parseInt(c,10);!n.parseArrays&&c===""?a={0:o}:!isNaN(u)&&l!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[],a[u]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},pT=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,i=r.depth>0&&a.exec(s),c=i?s.slice(0,i.index):s,u=[];if(c){if(!r.plainObjects&&h2.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(i=l.exec(s))!==null&&d[e.method,e.url].join("&");class pv{addPending(t){this.removePending(t);const n=Xh(t),r=new AbortController;t.signal=t.signal||r.signal,Qs.has(n)||Qs.set(n,r)}removeAllPending(){Qs.forEach(t=>{t&&t.abort()}),this.reset()}removePending(t){const n=Xh(t);if(Qs.has(n)){const r=Qs.get(n);r&&r.abort(n),Qs.delete(n)}}reset(){Qs.clear()}}var m2=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=-1]="ERROR",e[e.TIMEOUT=401]="TIMEOUT",e.TYPE="success",e))(m2||{}),Uu=(e=>(e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e))(Uu||{}),qu=(e=>(e.JSON="application/json;charset=UTF-8",e.FORM_URLENCODED="application/x-www-form-urlencoded;charset=UTF-8",e.FORM_DATA="multipart/form-data;charset=UTF-8",e))(qu||{});class CT{constructor(t){oo(this,"axiosInstance");oo(this,"options");this.options=t,this.axiosInstance=xu.create(t),this.setupInterceptors()}createAxios(t){this.axiosInstance=xu.create(t)}getTransform(){const{transform:t}=this.options;return t}getAxios(){return this.axiosInstance}configAxios(t){this.axiosInstance&&this.createAxios(t)}setHeader(t){this.axiosInstance&&Object.assign(this.axiosInstance.defaults.headers,t)}setupInterceptors(){const{axiosInstance:t,options:{transform:n}}=this;if(!n)return;const{requestInterceptors:r,requestInterceptorsCatch:o,responseInterceptors:s,responseInterceptorsCatch:a}=n,l=new pv;this.axiosInstance.interceptors.request.use(i=>{var d,p;const c=(d=i.requestOptions)!=null?d:this.options.requestOptions;return!((p=c==null?void 0:c.ignoreCancelToken)!=null?p:!0)&&l.addPending(i),r&&Eo(r)&&(i=r(i,this.options)),i},void 0),o&&Eo(o)&&this.axiosInstance.interceptors.request.use(void 0,o),this.axiosInstance.interceptors.response.use(i=>(i&&l.removePending(i.config),s&&Eo(s)&&(i=s(i)),i),void 0),a&&Eo(a)&&this.axiosInstance.interceptors.response.use(void 0,i=>a(t,i))}uploadFile(t,n){const r=new window.FormData,o=n.name||"file";return n.filename?r.append(o,n.file,n.filename):r.append(o,n.file),n.data&&Object.keys(n.data).forEach(s=>{const a=n.data[s];if(Array.isArray(a)){a.forEach(l=>{r.append(`${s}[]`,l)});return}r.append(s,n.data[s])}),this.axiosInstance.request(Yt(at({},t),{method:"POST",data:r,headers:{"Content-type":qu.FORM_DATA,ignoreCancelToken:!0}}))}supportFormData(t){var o;const n=t.headers||this.options.headers;return((n==null?void 0:n["Content-Type"])||(n==null?void 0:n["content-type"]))!==qu.FORM_URLENCODED||!Reflect.has(t,"data")||((o=t.method)==null?void 0:o.toUpperCase())===Uu.GET?t:Yt(at({},t),{data:xT.stringify(t.data,{arrayFormat:"brackets"})})}get(t,n){return this.request(Yt(at({},t),{method:"GET"}),n)}post(t,n){return this.request(Yt(at({},t),{method:"POST"}),n)}put(t,n){return this.request(Yt(at({},t),{method:"PUT"}),n)}delete(t,n){return this.request(Yt(at({},t),{method:"DELETE"}),n)}request(t,n){let r=vi(t);t.cancelToken&&(r.cancelToken=t.cancelToken),t.signal&&(r.signal=t.signal);const o=this.getTransform(),{requestOptions:s}=this.options,a=Object.assign({},s,n),{beforeRequestHook:l,requestCatchHook:i,transformResponseHook:c}=o||{};return l&&Eo(l)&&(r=l(r,a)),r.requestOptions=a,r=this.supportFormData(r),new Promise((u,d)=>{this.axiosInstance.request(r).then(p=>{if(c&&Eo(c)){try{const C=c(p,a);u(C)}catch(C){d(C||new Error("request error!"))}return}u(p)}).catch(p=>{if(i&&Eo(i)){d(i(p,a));return}xu.isAxiosError(p),d(p)})})}}function hv(e){return e==="warning"?yt(g3,{class:"modal-icon-warning"},null):e==="success"?yt(hy,{class:"modal-icon-success"},null):e==="info"?yt(g3,{class:"modal-icon-info"},null):yt(my,{class:"modal-icon-error"},null)}function mv({content:e}){return _o(e)?yt("div",{innerHTML:`
${e}
`},null):e}function ET(e){const t=e.iconType||"warning";Reflect.deleteProperty(e,"iconType");const n=Yt(at({centered:!0,icon:hv(t)},e),{content:mv(e)});return Ni.confirm(n)}const wT=()=>{const{t:e}=Zr();return{okText:e("common.okText"),centered:!0}};function M1(e,t){return Yt(at(at({},wT()),e),{content:mv(e),icon:hv(t)})}function ST(e){return Ni.success(M1(e,"success"))}function _T(e){return Ni.error(M1(e,"error"))}function OT(e){return Ni.info(M1(e,"info"))}function TT(e){return Ni.warning(M1(e,"warning"))}Q2.config({placement:"topRight",duration:3});function R1(){return{createMessage:py,notification:Q2,createConfirm:ET,createSuccessModal:ST,createErrorModal:_T,createInfoModal:OT,createWarningModal:TT}}const{createMessage:MT,createErrorModal:RT}=R1(),LT=MT.error,kT=Io.sessionTimeoutProcessing;function AT(e,t,n="message"){const{t:r}=Zr(),o=k1();let s="";switch(e){case 400:s=`${t}`;break;case 401:o.setToken(void 0),s=t||r("sys.api.errMsg401"),kT===a0.PAGE_COVERAGE?o.setSessionTimeout(!0):o.logout(!0);break;case 403:s=r("sys.api.errMsg403");break;case 404:s=r("sys.api.errMsg404");break;case 405:s=r("sys.api.errMsg405");break;case 408:s=r("sys.api.errMsg408");break;case 500:s=r("sys.api.errMsg500");break;case 501:s=r("sys.api.errMsg501");break;case 502:s=r("sys.api.errMsg502");break;case 503:s=r("sys.api.errMsg503");break;case 504:s=r("sys.api.errMsg504");break;case 505:s=r("sys.api.errMsg505");break}s&&(n==="modal"?RT({title:r("sys.api.errorTip"),content:s}):n==="message"&<({content:s,key:`global_error_message_status_${e}`}))}const IT="YYYY-MM-DD HH:mm:ss",DT="YYYY-MM-DD";function PT(e,t=IT){return e0(e).format(t)}function qX(e,t=DT){return e0(e).format(t)}const GX=e0;var NT=(e=>(e[e.PAGE_NOT_ACCESS=403]="PAGE_NOT_ACCESS",e[e.PAGE_NOT_FOUND=404]="PAGE_NOT_FOUND",e[e.ERROR=500]="ERROR",e[e.NET_WORK_ERROR=1e4]="NET_WORK_ERROR",e[e.PAGE_NOT_DATA=10100]="PAGE_NOT_DATA",e))(NT||{}),Wi=(e=>(e.VUE="vue",e.SCRIPT="script",e.RESOURCE="resource",e.AJAX="ajax",e.PROMISE="promise",e))(Wi||{});const $T=Ai({id:"app-error-log",state:()=>({errorLogInfoList:null,errorLogListCount:0}),getters:{getErrorLogInfoList(e){return e.errorLogInfoList||[]},getErrorLogListCount(e){return e.errorLogListCount}},actions:{addErrorLogInfo(e){const t=Yt(at({},e),{time:PT(new Date)});this.errorLogInfoList=[t,...this.errorLogInfoList||[]],this.errorLogListCount+=1},setErrorLogListCount(e){this.errorLogListCount=e},addAjaxErrorInfo(e){const{useErrorHandle:t}=Io;if(!t)return;const n={message:e.message,type:Wi.AJAX};if(e.response){const{config:{url:r="",data:o="",method:s="get",headers:a={}}={},data:l={}}=e.response;n.url=r,n.name="Ajax Error!",n.file="-",n.stack=JSON.stringify(l),n.detail=JSON.stringify({params:o,method:s,headers:a})}this.addErrorLogInfo(n)}}});function yc(){return $T($i)}const FT="YYYY-MM-DD HH:mm:ss";function Jh(e,t=!1){if(!e)return t?"":{};const n=new Date().getTime();return t?`?_t=${n}`:{_t:n}}function g2(e){var t,n;if(Object.prototype.toString.call(e)==="[object Object]")for(const r in e){const o=(n=(t=e[r])==null?void 0:t.format)!=null?n:null;if(o&&typeof o=="function"&&(e[r]=e[r].format(FT)),_o(r)){const s=e[r];if(s)try{e[r]=_o(s)?s.trim():s}catch(a){throw new Error(a)}}Au(e[r])&&g2(e[r])}}class BT{retry(t,n){var a,l;const{config:r}=n.response,{waitTime:o,count:s}=(l=(a=r==null?void 0:r.requestOptions)==null?void 0:a.retryRequest)!=null?l:{};return r.__retryCount=r.__retryCount||0,r.__retryCount>=s?Promise.reject(n):(r.__retryCount+=1,delete r.headers,this.delay(o).then(()=>t(r)))}delay(t){return new Promise(n=>setTimeout(n,t))}}const gv=r0(),VT=gv.urlPrefix,{createMessage:Kd,createErrorModal:Qh,createSuccessModal:HT}=R1(),jT={transformResponseHook:(e,t)=>{const{t:n}=Zr(),{isTransformResponse:r,isReturnNativeResponse:o}=t;if(o)return e;if(!r)return e.data;const{data:s}=e;if(!s)throw new Error(n("sys.api.apiRequestFailed"));const{code:a,result:l,message:i}=s;if(s&&Reflect.has(s,"code")&&a===m2.SUCCESS){let d=i;return(n0(d)||t0(d)||Ug(d))&&(d=n("sys.api.operationSuccess")),t.successMessageMode==="modal"?HT({title:n("sys.api.successTip"),content:d}):t.successMessageMode==="message"&&Kd.success(d),l}let u="";switch(a){case m2.TIMEOUT:u=n("sys.api.timeoutMessage"),k1().logout(!0);break;default:i&&(u=i)}throw t.errorMessageMode==="modal"?Qh({title:n("sys.api.errorTip"),content:u}):t.errorMessageMode==="message"&&Kd.error(u),new Error(u||n("sys.api.apiRequestFailed"))},beforeRequestHook:(e,t)=>{var u;const{apiUrl:n,joinPrefix:r,joinParamsToUrl:o,formatDate:s,joinTime:a=!0,urlPrefix:l}=t;r&&(e.url=`${l}${e.url}`),n&&_o(n)&&(e.url=`${n}${e.url}`);const i=e.params||{},c=e.data||!1;return s&&c&&!_o(c)&&g2(c),((u=e.method)==null?void 0:u.toUpperCase())===Uu.GET?_o(i)?(e.url=e.url+i+`${Jh(a,!0)}`,e.params=void 0):e.params=Object.assign(i||{},Jh(a,!1)):_o(i)?(e.url=e.url+i,e.params=void 0):(s&&g2(i),Reflect.has(e,"data")&&e.data&&(Object.keys(e.data).length>0||e.data instanceof FormData)?(e.data=c,e.params=i):(e.data=i,e.params=void 0),o&&(e.url=ky(e.url,Object.assign({},e.params,e.data)))),e},requestInterceptors:(e,t)=>{var r;const n=_w();return n&&((r=e==null?void 0:e.requestOptions)==null?void 0:r.withToken)!==!1&&(e.headers.Authorization=t.authenticationScheme?`${t.authenticationScheme} ${n}`:n),e},responseInterceptors:e=>e,responseInterceptorsCatch:(e,t)=>{var v,b,S,E,x,h,y,O;const{t:n}=Zr();yc().addAjaxErrorInfo(t);const{response:o,code:s,message:a,config:l}=t||{},i=((v=l==null?void 0:l.requestOptions)==null?void 0:v.errorMessageMode)||"none",c=(E=(S=(b=o==null?void 0:o.data)==null?void 0:b.error)==null?void 0:S.message)!=null?E:"",u=(h=(x=t==null?void 0:t.toString)==null?void 0:x.call(t))!=null?h:"";let d="";if(xu.isCancel(t))return Promise.reject(t);try{if(s==="ECONNABORTED"&&a.indexOf("timeout")!==-1&&(d=n("sys.api.apiTimeoutMessage")),u!=null&&u.includes("Network Error")&&(d=n("sys.api.networkExceptionMsg")),d)return i==="modal"?Qh({title:n("sys.api.errorTip"),content:d}):i==="message"&&Kd.error(d),Promise.reject(t)}catch(T){throw new Error(T)}AT((y=t==null?void 0:t.response)==null?void 0:y.status,c,i);const p=new BT,{isOpenRetry:C}=l.requestOptions.retryRequest;return((O=l.method)==null?void 0:O.toUpperCase())===Uu.GET&&C&&p.retry(e,t),Promise.reject(t)}};function WT(e){return new CT(oc({authenticationScheme:"",timeout:10*1e3,headers:{"Content-Type":qu.JSON},transform:gy(jT),requestOptions:{joinPrefix:!0,isReturnNativeResponse:!1,isTransformResponse:!0,joinParamsToUrl:!1,formatDate:!0,errorMessageMode:"message",apiUrl:gv.apiUrl,urlPrefix:VT,joinTime:!0,ignoreCancelToken:!0,withToken:!0,retryRequest:{isOpenRetry:!0,count:5,waitTime:100}}},e||{}))}const Ia=WT(),Da="/v1/system/user",ZX=e=>Ia.post({url:`${Da}/`,data:e}),YX=(e,t=!1)=>Ia.put({url:`${Da}/`,data:e,params:{updateAllFields:t}}),KX=e=>Ia.delete({url:`${Da}/${e}`}),XX=e=>Ia.get({url:`${Da}/search`,params:e}),zT=e=>Ia.post({url:`${Da}/login`,data:e},{errorMessageMode:"none"}),UT=()=>Ia.post({url:`${Da}/logout`},{errorMessageMode:"none"}),qT=()=>Ia.get({url:`${Da}/info`},{errorMessageMode:"none"}),GT="中核集团预埋件检测系统";function JX(e){}function QX(e){throw new Error(`[${GT} error]:${e}`)}const ZT=()=>Tt(()=>import("./FrameBlank-7a13f319.js"),["./FrameBlank-7a13f319.js","./vue-72a104e4.js"],import.meta.url),L1=new Map;L1.set("LAYOUT",mc);L1.set("IFRAME",ZT);let Xd;function vv(e){Xd=Xd||Object.assign({"../../views/dashboard/index.vue":()=>Tt(()=>import("./index-e1982fac.js"),["./index-e1982fac.js","./vue-72a104e4.js"],import.meta.url),"../../views/data/device/drawer.vue":()=>Tt(()=>import("./drawer-8318451d.js").then(t=>t.d),["./drawer-8318451d.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./index-679d8a0a.js","./index-ac2d527c.css","./deviceApi-260fcde9.js","./drawer-979bd460.css"],import.meta.url),"../../views/data/device/index.vue":()=>Tt(()=>import("./index-efaa1ab1.js"),["./index-efaa1ab1.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-8318451d.js","./drawer-979bd460.css","./index-acc49e4a.css"],import.meta.url),"../../views/data/task-log/index.vue":()=>Tt(()=>import("./index-e44b7100.js"),["./index-e44b7100.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-e52e16c3.css"],import.meta.url),"../../views/data/task-progress/detail.vue":()=>Tt(()=>import("./detail-e298fdc6.js"),["./detail-e298fdc6.js","./vue-72a104e4.js","./taskProgressApi-ab295ee1.js","./antd-0679333d.js","./detail-e4985283.css"],import.meta.url),"../../views/data/task-progress/drawer.vue":()=>Tt(()=>import("./drawer-5e1025ae.js"),["./drawer-5e1025ae.js","./drawer.vue_vue_type_script_setup_true_lang-06391f52.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./taskProgressApi-ab295ee1.js","./index-679d8a0a.js","./index-ac2d527c.css"],import.meta.url),"../../views/data/task-progress/index.vue":()=>Tt(()=>import("./index-76a27ad4.js"),["./index-76a27ad4.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./taskProgressApi-ab295ee1.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-06391f52.js"],import.meta.url),"../../views/data/task/drawer.vue":()=>Tt(()=>import("./drawer-20246748.js").then(t=>t.d),["./drawer-20246748.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./useTable-e949a6b7.js","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./modal-62c07bbb.js","./modal-9fe2831b.css","./drawer-1e066757.css"],import.meta.url),"../../views/data/task/index.vue":()=>Tt(()=>import("./index-41d79c03.js"),["./index-41d79c03.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./drawer-20246748.js","./deviceApi-260fcde9.js","./index-679d8a0a.js","./index-ac2d527c.css","./modal-62c07bbb.js","./modal-9fe2831b.css","./drawer-1e066757.css","./result-f5f59bf1.js","./result-1c2ebb23.css","./index-1773ff73.css"],import.meta.url),"../../views/data/task/modal.vue":()=>Tt(()=>import("./modal-62c07bbb.js"),["./modal-62c07bbb.js","./index-8a6826ba.js","./vue-72a104e4.js","./antd-0679333d.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./useForm-baba730a.js","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./modal-9fe2831b.css"],import.meta.url),"../../views/data/task/result.vue":()=>Tt(()=>import("./result-f5f59bf1.js"),["./result-f5f59bf1.js","./index-8a6826ba.js","./vue-72a104e4.js","./antd-0679333d.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./useTable-e949a6b7.js","./useForm-baba730a.js","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./result-1c2ebb23.css"],import.meta.url),"../../views/sys/about/index.vue":()=>Tt(()=>import("./index-ce2144ce.js"),["./index-ce2144ce.js","./vue-72a104e4.js","./useContentViewHeight-1771cd5b.js","./useWindowSizeFn-1db11f4f.js","./onMountedOrActivated-ee461833.js","./antd-0679333d.js","./siteSetting-efd6ab5b.js","./index-8ee108fa.css"],import.meta.url),"../../views/sys/exception/Exception.vue":()=>Tt(()=>import("./Exception-79ade5b8.js"),["./Exception-79ade5b8.js","./vue-72a104e4.js","./antd-0679333d.js","./Exception-228e2019.css"],import.meta.url),"../../views/sys/iframe/FrameBlank.vue":()=>Tt(()=>import("./FrameBlank-7a13f319.js"),["./FrameBlank-7a13f319.js","./vue-72a104e4.js"],import.meta.url),"../../views/sys/iframe/index.vue":()=>Tt(()=>import("./index-0a75e8e4.js"),["./index-0a75e8e4.js","./useContentViewHeight-1771cd5b.js","./useWindowSizeFn-1db11f4f.js","./vue-72a104e4.js","./antd-0679333d.js","./index-054645fa.css"],import.meta.url),"../../views/sys/lock/LockPage.vue":()=>Tt(()=>import("./LockPage-1f0cbf71.js"),["./LockPage-1f0cbf71.js","./vue-72a104e4.js","./lock-a170f962.js","./header-b90f4bbc.js","./antd-0679333d.js","./LockPage-b0b08e00.css"],import.meta.url),"../../views/sys/lock/index.vue":()=>Tt(()=>import("./index-6c3f423b.js"),["./index-6c3f423b.js","./vue-72a104e4.js","./LockPage-1f0cbf71.js","./lock-a170f962.js","./header-b90f4bbc.js","./antd-0679333d.js","./LockPage-b0b08e00.css"],import.meta.url),"../../views/sys/redirect/index.vue":()=>Tt(()=>import("./index-2d0e3a91.js"),["./index-2d0e3a91.js","./vue-72a104e4.js"],import.meta.url),"../../views/system/authority/detail.vue":()=>Tt(()=>import("./detail-9fbbe16e.js"),["./detail-9fbbe16e.js","./vue-72a104e4.js","./schema-9d07929f.js","./authorityApi-b12c1221.js","./antd-0679333d.js","./detail-9c9c0d2c.css"],import.meta.url),"../../views/system/authority/drawer.vue":()=>Tt(()=>import("./drawer-18e287e5.js"),["./drawer-18e287e5.js","./drawer.vue_vue_type_script_setup_true_lang-52006c48.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./schema-9d07929f.js","./index-679d8a0a.js","./index-ac2d527c.css","./authorityApi-b12c1221.js"],import.meta.url),"../../views/system/authority/index.vue":()=>Tt(()=>import("./index-dd4da8c9.js"),["./index-dd4da8c9.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./authorityApi-b12c1221.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-52006c48.js","./schema-9d07929f.js","./index-9bec8476.css"],import.meta.url),"../../views/system/constant/detail.vue":()=>Tt(()=>import("./detail-b0185055.js"),["./detail-b0185055.js","./vue-72a104e4.js","./schema-0004c8eb.js","./antd-0679333d.js","./detail-8993a7f8.css"],import.meta.url),"../../views/system/constant/drawer.vue":()=>Tt(()=>import("./drawer-b5ab9726.js"),["./drawer-b5ab9726.js","./drawer.vue_vue_type_script_setup_true_lang-5ec4ab70.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./schema-0004c8eb.js","./index-679d8a0a.js","./index-ac2d527c.css"],import.meta.url),"../../views/system/constant/index.vue":()=>Tt(()=>import("./index-5ea73e3b.js"),["./index-5ea73e3b.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./schema-0004c8eb.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-5ec4ab70.js","./index-7f0daf98.css"],import.meta.url),"../../views/system/index.vue":()=>Tt(()=>import("./index-d7f478ea.js"),["./index-d7f478ea.js","./vue-72a104e4.js","./antd-0679333d.js"],import.meta.url),"../../views/system/log/index.vue":()=>Tt(()=>import("./index-253344a3.js"),["./index-253344a3.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-b4de5e75.css"],import.meta.url),"../../views/system/user-authority/detail.vue":()=>Tt(()=>import("./detail-e296b9ca.js"),["./detail-e296b9ca.js","./vue-72a104e4.js","./userAuthorityApi-5e5c6315.js","./antd-0679333d.js","./detail-5b35e746.css"],import.meta.url),"../../views/system/user-authority/drawer.vue":()=>Tt(()=>import("./drawer-301fe1e6.js"),["./drawer-301fe1e6.js","./drawer.vue_vue_type_script_setup_true_lang-95f18621.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./userAuthorityApi-5e5c6315.js","./index-679d8a0a.js","./index-ac2d527c.css"],import.meta.url),"../../views/system/user-authority/index.vue":()=>Tt(()=>import("./index-1495421d.js"),["./index-1495421d.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./userAuthorityApi-5e5c6315.js","./index-679d8a0a.js","./index-ac2d527c.css","./drawer.vue_vue_type_script_setup_true_lang-95f18621.js","./index-87b6a8a4.css"],import.meta.url),"../../views/system/user/drawer.vue":()=>Tt(()=>import("./drawer-c24723db.js").then(t=>t.d),["./drawer-c24723db.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./index-679d8a0a.js","./index-ac2d527c.css","./authorityApi-b12c1221.js","./drawer-bace9237.css"],import.meta.url),"../../views/system/user/index.vue":()=>Tt(()=>import("./index-5c55be75.js"),["./index-5c55be75.js","./useTable-e949a6b7.js","./useForm-baba730a.js","./vue-72a104e4.js","./antd-0679333d.js","./index-8a6826ba.js","./useWindowSizeFn-1db11f4f.js","./index-7064e331.css","./copyTextToClipboard-3ca69a78.js","./useForm-01d9c31d.css","./onMountedOrActivated-ee461833.js","./sortable.esm-15c0a34e.js","./useTable-91c68fcd.css","./index-679d8a0a.js","./index-ac2d527c.css","./drawer-c24723db.js","./authorityApi-b12c1221.js","./drawer-bace9237.css","./index-5b2db5a3.css"],import.meta.url)}),e&&e.forEach(t=>{var s;!t.component&&((s=t.meta)!=null&&s.frameSrc)&&(t.component="IFRAME");const{component:n,name:r}=t,{children:o}=t;if(n){const a=L1.get(n.toUpperCase());a?t.component=a:t.component=YT(Xd,n)}else r&&(t.component=ex());o&&vv(o)})}function YT(e,t){const r=Object.keys(e).filter(o=>{const s=o.replace("../../views",""),a=t.startsWith("/"),l=t.endsWith(".vue")||t.endsWith(".tsx"),i=a?0:1,c=l?s.length:s.lastIndexOf(".");return s.substring(i,c)===t});if((r==null?void 0:r.length)===1){const o=r[0];return e[o]}else return(r==null?void 0:r.length)>1?void 0:Jg}function KT(e){return e.forEach(t=>{const n=t.component;if(n)if(n.toUpperCase()==="LAYOUT")t.component=L1.get(n.toUpperCase());else{t.children=[vi(t)],t.component=mc,t.name=`${t.name}Parent`,t.path="";const r=t.meta||{};r.single=!0,r.affix=!1,t.meta=r}else""+(t==null?void 0:t.name);t.children&&vv(t.children)}),e}function Jd(e){const t=vi(e);for(let n=0;ngi(o,"children"))}function bv(e,t,n){var r,o;for(let s=0;si.name===a.name);l&&(n.children=n.children||[],n.children.find(i=>i.name===l.name)||(r=n.children)==null||r.push(l),(o=a.children)!=null&&o.length&&bv(e,a.children,n))}}function JT(e){var r,o;if(!e||!Reflect.has(e,"children")||!((r=e.children)!=null&&r.length))return!1;const t=e.children;let n=!1;for(let s=0;sObject.assign({},QT,e);function eJ(e,t={}){t=xc(t);const{children:n}=t,r=[...e];for(let o=0;oat({},a)).filter(a=>(a[r]=a[r]&&o(a[r]),t(a)||a[r]&&a[r].length))}return o(e)}function tM(e,t,n={}){n=xc(n);const r=[...e],{children:o}=n;for(let s=0;syv(n,t))}function yv(e,{children:t="children",conversion:n}){const r=Array.isArray(e[t])&&e[t].length>0,o=n(e)||{};return r?Yt(at({},o),{[t]:e[t].map(s=>yv(s,{children:t,conversion:n}))}):at({},o)}function rM(e,t,n={}){e.forEach(r=>{const o=t(r,n)||r;r.children&&rM(r.children,t,o)})}function oM(e,t){return(eM(e,r=>r.path===t)||[]).map(r=>r.path)}function N0(e,t=""){var n,r;for(let o=0;o{var a,l;if(t&&s.meta.hideChildrenInMenu&&typeof s.redirect=="string"&&(s.path=s.redirect),(a=s.meta)!=null&&a.single){const i=(l=s==null?void 0:s.children)==null?void 0:l[0];i&&r.push(i)}else r.push(s)});const o=nM(r,{conversion:s=>{const{meta:{title:a,hideMenu:l=!1}={}}=s;return at(Yt(at({},s.meta||{}),{meta:s.meta,name:a,hideMenu:l,path:s.path}),s.redirect?{redirect:s.redirect}:{})}});return N0(o),vi(o)}const aM=/(?::)([\s\S]+?)((?=\/)|$)/g;function xv(e,t){var a;const{path:n,paramPath:r}=tc(e);let o=r||n;const s=o.match(aM);s==null||s.forEach(l=>{const i=l.substr(1);t[i]&&(o=o.replace(`:${i}`,t[i]))}),!r&&s&&s.length>0&&(e.paramPath=n),e.path=o,(a=e.children)==null||a.forEach(l=>xv(l,t))}const Cc=Ai({id:"app-permission",state:()=>({permCodeList:[],isDynamicAddedRoute:!1,lastBuildMenuTime:0,backMenuList:[],frontMenuList:[]}),getters:{getPermCodeList(e){return e.permCodeList},getBackMenuList(e){return e.backMenuList},getFrontMenuList(e){return e.frontMenuList},getLastBuildMenuTime(e){return e.lastBuildMenuTime},getIsDynamicAddedRoute(e){return e.isDynamicAddedRoute}},actions:{setPermCodeList(e){this.permCodeList=e},setBackMenuList(e){this.backMenuList=e,(e==null?void 0:e.length)>0&&this.setLastBuildMenuTime()},setFrontMenuList(e){this.frontMenuList=e},setLastBuildMenuTime(){this.lastBuildMenuTime=new Date().getTime()},setDynamicAddedRoute(e){this.isDynamicAddedRoute=e},resetState(){this.isDynamicAddedRoute=!1,this.permCodeList=[],this.backMenuList=[],this.lastBuildMenuTime=0},changePermissionCode(e){this.setPermCodeList(e)},buildRoutesAction(){return ft(this,null,function*(){const{t:e}=Zr(),t=Os(),n=C1();let r=[];const o=tc(t.getRoleList)||[],{permissionMode:s=Io.permissionMode}=n.getProjectConfig,a=c=>{const{meta:u}=c,{roles:d}=u||{};return d?o.some(p=>d.includes(p)):!0},l=c=>{const{meta:u}=c,{ignoreRoute:d}=u||{};return!d},i=c=>{if(!c||c.length===0)return;let u=ar.BASE_HOME;function d(p,C=""){C&&(C=C+"/"),p.forEach(v=>{const{path:b,children:S,redirect:E}=v,x=b.startsWith("/")?b:C+b;if(x===u)if(E)u=v.redirect;else throw v.meta=Object.assign({},v.meta,{affix:!0}),new Error("end");S&&S.length>0&&d(S,x)})}try{d(c)}catch(p){}};switch(s){case qn.ROLE:r=ua(dh,a),r=r.filter(a),r=Jd(r);break;case qn.ROUTE_MAPPING:r=ua(dh,a),r=r.filter(a);const c=e4(r,!0);r=ua(r,l),r=r.filter(l),c.sort((C,v)=>{var b,S;return(((b=C.meta)==null?void 0:b.orderNo)||0)-(((S=v.meta)==null?void 0:S.orderNo)||0)}),this.setFrontMenuList(c),r=Jd(r);break;case qn.BACK:const{createMessage:u}=R1();u.loading({content:e("sys.app.menuLoading"),duration:1});let d=[];try{let C=t.getAuthorityList.filter(E=>E.type==="BUTTON").map(E=>E.name);this.changePermissionCode(C);const v=t.getAuthorityList.filter(E=>["MENU","DIR"].includes(E.type)),b=Ay(v,"authorityId"),S=E=>E.map(x=>{x.children&&x.children.length&&(x.children=S(x.children));const{name:h,path:y,redirect:O,title:T,icon:M,keepAlive:R,component:A,hidden:P,children:K,frameSrc:Z}=x;return Z?{name:h,path:y,component:"/sys/iframe/FrameBlank",meta:{title:T,frameSrc:Z}}:{name:h,path:y,redirect:O,component:A,children:K,meta:{title:T,icon:M,hideMenu:P,keepAlive:R}}});d=S(b)}catch(C){}d=KT(d);const p=e4(d);this.setBackMenuList(p),d=ua(d,l),d=d.filter(l),d=Jd(d),r=[_s,...d];break}return i(r),r})}}});function Cv(){return Cc($i)}const Os=Ai({id:"app-user",state:()=>({userInfo:null,token:void 0,roleList:[],authorityList:[],sessionTimeout:!1,lastUpdateTime:0}),getters:{getUserInfo(e){return e.userInfo||gu(Iu)||{}},getToken(e){return e.token||gu(sc)},getRoleList(e){return e.roleList.length>0?e.roleList:gu(E3)},getAuthorityList(){return this.authorityList},getSessionTimeout(e){return!!e.sessionTimeout},getLastUpdateTime(e){return e.lastUpdateTime}},actions:{setToken(e){this.token=e||"",Id(sc,e)},setRoleList(e){this.roleList=e,Id(E3,e)},setUserInfo(e){this.userInfo=e,this.lastUpdateTime=new Date().getTime(),Id(Iu,e)},setRoleAuthority(e){this.authorityList=e},setSessionTimeout(e){this.sessionTimeout=e},resetState(){this.userInfo=null,this.token="",this.roleList=[],this.sessionTimeout=!1},login(e){return ft(this,null,function*(){try{const t=e,{goHome:n=!0,mode:r}=t,o=ll(t,["goHome","mode"]),s=yield zT(o),{token:a}=s;return this.setToken(a),this.afterLoginAction(n)}catch(n){return Promise.reject(n)}})},afterLoginAction(e){return ft(this,null,function*(){if(!this.getToken)return null;const t=yield this.getUserInfoAction();if(this.sessionTimeout)this.setSessionTimeout(!1);else{const r=Cc();r.isDynamicAddedRoute||((yield r.buildRoutesAction()).forEach(s=>{yr.addRoute(s)}),yr.addRoute(_s),r.setDynamicAddedRoute(!0)),e&&(yield yr.replace(ar.BASE_HOME))}return t})},getUserInfoAction(){return ft(this,null,function*(){if(!this.getToken)return null;const e=yield qT(),{roleList:t=[]}=e,n=t.map(o=>o.name);this.setRoleList(n);const r=t[0].authorityList;return n.length&&this.setRoleAuthority(r),this.setUserInfo(e),e})},logout(e=!1){return ft(this,null,function*(){if(this.getToken)try{yield UT()}catch(t){}this.setToken(void 0),this.setSessionTimeout(!1),this.setUserInfo(null),e&&yr.push(ar.BASE_LOGIN)})},confirmLoginOut(){const{createConfirm:e}=R1(),{t}=Zr();e({iconType:"warning",title:()=>w("span",t("sys.app.logoutTip")),content:()=>w("span",t("sys.app.logoutMessage")),onOk:()=>ft(this,null,function*(){yield this.logout(!0)})})}}});function k1(){return Os($i)}const iM=dt({__name:"AppLogo",props:{theme:{type:String,validator:e=>["light","dark"].includes(e)},showTitle:{type:Boolean,default:!0},alwaysShowTitle:{type:Boolean}},setup(e){const t=e,{prefixCls:n}=Do("app-logo"),{getCollapsedShowTitle:r}=Ew(),o=Os(),{title:s}=r0(),a=d1(),l=oe(()=>[n,t.theme,{"collapsed-show-title":Ie(r)}]),i=oe(()=>[`${n}__title`,{"xs:opacity-0":!t.alwaysShowTitle}]);function c(){a(o.getUserInfo.homePath||ar.BASE_HOME)}return(u,d)=>(Wt(),kn("div",{class:Kt(["anticon",l.value]),onClick:c},[d[0]||(d[0]=wn("img",{src:Iy},null,-1)),ai(wn("div",{class:Kt(["ml-2 truncate md:opacity-100",i.value])},Oo(Ie(s)),3),[[nc,e.showTitle]])],2))}});const Xr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},lM=Xr(iM,[["__scopeId","data-v-229a7517"]]);function cM(e,t=Symbol(),n={}){const{readonly:r=!0,createProvider:o=!0,native:s=!1}=n,a=en(e),l=r?K2(a):a;return o&&ln(t,s?e:l),{state:a}}function uM(e=Symbol(),t){return xt(e,t||{})}const Ev=Symbol();function dM(e){return cM(e,Ev)}function wv(){return uM(Ev)}function A1(e){return Zb()?(Yb(e),!0):!1}function br(e){return typeof e=="function"?e():Ie(e)}const $0=typeof window!="undefined"&&typeof document!="undefined";typeof WorkerGlobalScope!="undefined"&&globalThis instanceof WorkerGlobalScope;const fM=e=>e!=null,pM=Object.prototype.toString,hM=e=>pM.call(e)==="[object Object]",Ls=()=>{};function Sv(e,t){function n(...r){return new Promise((o,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(s)})}return n}function mM(e,t={}){let n,r,o=Ls;const s=l=>{clearTimeout(l),o(),o=Ls};return l=>{const i=br(e),c=br(t.maxWait);return n&&s(n),i<=0||c!==void 0&&c<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((u,d)=>{o=t.rejectOnCancel?d:u,c&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,u(l())},c)),n=setTimeout(()=>{r&&s(r),r=null,u(l())},i)})}}function gM(...e){let t=0,n,r=!0,o=Ls,s,a,l,i,c;!Bg(e[0])&&typeof e[0]=="object"?{delay:a,trailing:l=!0,leading:i=!0,rejectOnCancel:c=!1}=e[0]:[a,l=!0,i=!0,c=!1]=e;const u=()=>{n&&(clearTimeout(n),n=void 0,o(),o=Ls)};return p=>{const C=br(a),v=Date.now()-t,b=()=>s=p();return u(),C<=0?(t=Date.now(),b()):(v>C&&(i||!r)?(t=Date.now(),b()):l&&(s=new Promise((S,E)=>{o=c?E:S,n=setTimeout(()=>{t=Date.now(),r=!0,S(b()),u()},Math.max(0,C-v))})),!i&&!n&&(n=setTimeout(()=>r=!0,C)),r=!1,s)}}function v2(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function F0(e){return e||Ii()}function vM(...e){if(e.length!==1)return Kb(...e);const t=e[0];return typeof t=="function"?K2(Xb(()=>({get:t,set:Ls}))):Ne(t)}function _v(e,t=200,n={}){return Sv(mM(t,n),e)}function bM(e,t=200,n=!1,r=!0,o=!1){return Sv(gM(t,n,r,o),e)}function yM(e,t){F0(t)&&pc(e,t)}function nJ(e,t=!0,n){F0()?On(e,n):t?e():ve(e)}function rJ(e,t){F0(t)&&Tn(e,t)}function b2(e,t=!1){function n(d,{flush:p="sync",deep:C=!1,timeout:v,throwOnTimeout:b}={}){let S=null;const x=[new Promise(h=>{S=it(e,y=>{d(y)!==t&&(S==null||S(),h(y))},{flush:p,deep:C,immediate:!0})})];return v!=null&&x.push(v2(v,b).then(()=>br(e)).finally(()=>S==null?void 0:S())),Promise.race(x)}function r(d,p){if(!Bg(d))return n(y=>y===d,p);const{flush:C="sync",deep:v=!1,timeout:b,throwOnTimeout:S}=p!=null?p:{};let E=null;const h=[new Promise(y=>{E=it([e,d],([O,T])=>{t!==(O===T)&&(E==null||E(),y(O))},{flush:C,deep:v,immediate:!0})})];return b!=null&&h.push(v2(b,S).then(()=>br(e)).finally(()=>(E==null||E(),br(e)))),Promise.race(h)}function o(d){return n(p=>!!p,d)}function s(d){return r(null,d)}function a(d){return r(void 0,d)}function l(d){return n(Number.isNaN,d)}function i(d,p){return n(C=>{const v=Array.from(C);return v.includes(d)||v.includes(br(d))},p)}function c(d){return u(1,d)}function u(d=1,p){let C=-1;return n(()=>(C+=1,C>=d),p)}return Array.isArray(br(e))?{toMatch:n,toContains:i,changed:c,changedTimes:u,get not(){return b2(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:s,toBeNaN:l,toBeUndefined:a,changed:c,changedTimes:u,get not(){return b2(e,!t)}}}function xM(e){return b2(e)}function CM(e,t,n={}){const{immediate:r=!0}=n,o=Ne(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){o.value=!1,a()}function i(...c){a(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=null,e(...c)},br(t))}return r&&(o.value=!0,$0&&i()),A1(l),{isPending:K2(o),start:i,stop:l}}function Gu(e){var t;const n=br(e);return(t=n==null?void 0:n.$el)!=null?t:n}const B0=$0?window:void 0,Ov=$0?window.document:void 0;function y2(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=B0):[t,n,r,o]=e,!t)return Ls;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(u=>u()),s.length=0},l=(u,d,p,C)=>(u.addEventListener(d,p,C),()=>u.removeEventListener(d,p,C)),i=it(()=>[Gu(t),br(o)],([u,d])=>{if(a(),!u)return;const p=hM(d)?at({},d):d;s.push(...n.flatMap(C=>r.map(v=>l(u,C,v,p))))},{immediate:!0,flush:"post"}),c=()=>{i(),a()};return A1(c),c}function EM(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Qc(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=B0,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,i=EM(t);return y2(o,s,u=>{u.repeat&&br(l)||i(u)&&n(u)},a)}function wM(){const e=Ne(!1),t=Ii();return t&&On(()=>{e.value=!0},t),e}function Tv(e){const t=wM();return oe(()=>(t.value,!!e()))}function SM(e,t,n={}){const p=n,{window:r=B0}=p,o=ll(p,["window"]);let s;const a=Tv(()=>r&&"MutationObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},i=oe(()=>{const C=br(e),v=(Array.isArray(C)?C:[C]).map(Gu).filter(fM);return new Set(v)}),c=it(()=>i.value,C=>{l(),a.value&&C.size&&(s=new MutationObserver(t),C.forEach(v=>s.observe(v,o)))},{immediate:!0,flush:"post"}),u=()=>s==null?void 0:s.takeRecords(),d=()=>{l(),c()};return A1(d),{isSupported:a,stop:d,takeRecords:u}}function oJ(e,t,n){const{immediate:r=!0,delay:o=0,onError:s=Ls,onSuccess:a=Ls,resetOnExecute:l=!0,shallow:i=!0,throwError:c}=n!=null?n:{},u=i?rc(t):Ne(t),d=Ne(!1),p=Ne(!1),C=rc(void 0);function v(E=0,...x){return ft(this,null,function*(){l&&(u.value=t),C.value=void 0,d.value=!1,p.value=!0,E>0&&(yield v2(E));const h=typeof e=="function"?e(...x):e;try{const y=yield h;u.value=y,d.value=!0,a(y)}catch(y){if(C.value=y,s(y),c)throw y}finally{p.value=!1}return u.value})}r&&v(o);const b={state:u,isReady:d,isLoading:p,error:C,execute:v};function S(){return new Promise((E,x)=>{xM(p).toBe(!1).then(()=>E(b)).catch(x)})}return Yt(at({},b),{then(E,x){return S().then(E,x)}})}const t4=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function sJ(e,t={}){const{document:n=Ov,autoExit:r=!1}=t,o=oe(()=>{var E;return(E=Gu(e))!=null?E:n==null?void 0:n.querySelector("html")}),s=Ne(!1),a=oe(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(E=>n&&E in n||o.value&&E in o.value)),l=oe(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(E=>n&&E in n||o.value&&E in o.value)),i=oe(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(E=>n&&E in n||o.value&&E in o.value)),c=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(E=>n&&E in n),u=Tv(()=>o.value&&n&&a.value!==void 0&&l.value!==void 0&&i.value!==void 0),d=()=>c?(n==null?void 0:n[c])===o.value:!1,p=()=>{if(i.value){if(n&&n[i.value]!=null)return n[i.value];{const E=o.value;if((E==null?void 0:E[i.value])!=null)return!!E[i.value]}}return!1};function C(){return ft(this,null,function*(){if(!(!u.value||!s.value)){if(l.value)if((n==null?void 0:n[l.value])!=null)yield n[l.value]();else{const E=o.value;(E==null?void 0:E[l.value])!=null&&(yield E[l.value]())}s.value=!1}})}function v(){return ft(this,null,function*(){if(!u.value||s.value)return;p()&&(yield C());const E=o.value;a.value&&(E==null?void 0:E[a.value])!=null&&(yield E[a.value](),s.value=!0)})}function b(){return ft(this,null,function*(){yield s.value?C():v()})}const S=()=>{const E=p();(!E||E&&d())&&(s.value=E)};return y2(n,t4,S,!1),y2(()=>Gu(o),t4,S,!1),r&&A1(C),{isSupported:u,isFullscreen:s,enter:v,exit:C,toggle:b}}function _M(e=null,t={}){var n,r,o;const{document:s=Ov,restoreOnUnmount:a=d=>d}=t,l=(n=s==null?void 0:s.title)!=null?n:"",i=vM((r=e!=null?e:s==null?void 0:s.title)!=null?r:null),c=e&&typeof e=="function";function u(d){if(!("titleTemplate"in t))return d;const p=t.titleTemplate||"%s";return typeof p=="function"?p(d):br(p).replace(/%s/g,d)}return it(i,(d,p)=>{d!==p&&s&&(s.title=u(typeof d=="string"?d:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&s&&!c&&SM((o=s.head)==null?void 0:o.querySelector("title"),()=>{s&&s.title!==i.value&&(i.value=u(s.title))},{childList:!0}),yM(()=>{if(a){const d=a(l,i.value||"");d!=null&&s&&(s.title=d)}}),i}function OM({el:e=window,name:t,listener:n,options:r,autoRemove:o=!0,isDebounce:s=!0,wait:a=80}){let l=()=>{};const i=Ne(!1);if(e){const c=Ne(e),u=s?_v(n,a):bM(n,a),d=a?u:n,p=b=>{i.value=!0,b.removeEventListener(t,d,r)},C=b=>b.addEventListener(t,d,r),v=it(c,(b,S,E)=>{b&&(!Ie(i)&&C(b),E(()=>{o&&p(b)}))},{immediate:!0});l=()=>{p(c.value),v()}}return{removeEvent:l}}var gr=(e=>(e.XS="XS",e.SM="SM",e.MD="MD",e.LG="LG",e.XL="XL",e.XXL="XXL",e))(gr||{}),Zu=(e=>(e[e.XS=480]="XS",e[e.SM=576]="SM",e[e.MD=768]="MD",e[e.LG=992]="LG",e[e.XL=1200]="XL",e[e.XXL=1600]="XXL",e))(Zu||{});const Or=new Map;Or.set("XS",480);Or.set("SM",576);Or.set("MD",768);Or.set("LG",992);Or.set("XL",1200);Or.set("XXL",1600);let wu,Su,_u;function aJ(){return{screenRef:oe(()=>Ie(wu)),widthRef:Su,screenEnum:Zu,realWidthRef:_u}}function TM(e){const t=Ne(gr.XL),n=Ne(window.innerWidth);function r(){const s=document.body.clientWidth,a=Or.get(gr.XS),l=Or.get(gr.SM),i=Or.get(gr.MD),c=Or.get(gr.LG),u=Or.get(gr.XL);s{r(),o()}}),r(),wu=oe(()=>Ie(t)),Su=oe(()=>Or.get(Ie(t))),_u=oe(()=>Ie(n));function o(){e==null||e({screen:wu,width:Su,realWidth:_u,screenEnum:Zu,screenMap:Or,sizeEnum:gr})}return o(),{screenRef:wu,screenEnum:Zu,widthRef:Su,realWidthRef:_u}}const MM={prefixCls:{type:String,default:yx}},RM=dt({name:"AppProvider",inheritAttrs:!1,props:MM,setup(e,{slots:t}){const n=Ne(!1),r=Ne(!1),o=Kr();TM(({screenMap:l,sizeEnum:i,width:c})=>{const u=l.get(i.LG);u&&(n.value=c.value-1{var l;return(l=t.default)==null?void 0:l.call(t)}}}),eu=dt({__name:"AppSearchKeyItem",props:{icon:String},setup(e){return(t,n)=>(Wt(),kn("span",{class:Kt(t.$attrs.class)},[yt(Mo,{icon:e.icon},null,8,["icon"])],2))}}),LM=dt({__name:"AppSearchFooter",setup(e){const{prefixCls:t}=Do("app-search-footer"),{t:n}=Zr();return(r,o)=>(Wt(),kn("div",{class:Kt(`${Ie(t)}`)},[yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"ant-design:enter-outlined"},null,8,["class"]),wn("span",null,Oo(Ie(n)("component.app.toSearch")),1),yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"ion:arrow-up-outline"},null,8,["class"]),yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"ion:arrow-down-outline"},null,8,["class"]),wn("span",null,Oo(Ie(n)("component.app.toNavigate")),1),yt(eu,{class:Kt(`${Ie(t)}-item`),icon:"mdi:keyboard-esc"},null,8,["class"]),wn("span",null,Oo(Ie(n)("common.closeText")),1)],2))}});const kM=Xr(LM,[["__scopeId","data-v-3c05e343"]]);function AM(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function IM(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")}function V0(e,t){if(!e||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function x2(e,t){if(!e)return;let n=e.className;const r=(t||"").split(" ");for(let o=0,s=r.length;or4=e),Yu(document,"mouseup",e=>{for(const{documentHandler:t}of Ou.values())t(e,r4)}));function o4(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:n.push(t.arg),function(r,o){const s=t.instance.popperRef,a=r.target,l=o.target,i=!t||!t.instance,c=!a||!l,u=e.contains(a)||e.contains(l),d=e===a,p=n.length&&n.some(v=>v==null?void 0:v.contains(a))||n.length&&n.includes(l),C=s&&(s.contains(a)||s.contains(l));i||c||u||d||p||C||t.value()}}const DM={beforeMount(e,t){Ou.set(e,{documentHandler:o4(e,t),bindingFn:t.value})},updated(e,t){Ou.set(e,{documentHandler:o4(e,t),bindingFn:t.value})},unmounted(e){Ou.delete(e)}},PM=["class","style"],NM=/^on[A-Z]/;function $M(e){return Object.keys(e).map(t=>[t,e[t]])}function Mv(e={}){const t=Ii();if(!t)return{};const{excludeListeners:n=!1,excludeKeys:r=[],excludeDefaultKeys:o=!0}=e,s=rc({}),a=r.concat(o?PM:[]);return t.attrs=en(t.attrs),Vg(()=>{const l=$M(t.attrs).reduce((i,[c,u])=>(!a.includes(c)&&!(n&&NM.test(c))&&(i[c]=u),i),{});s.value=l}),s}function FM(){const e=rc([]);return Qb(()=>{e.value=[]}),{refs:e,setRefs:n=>r=>{e.value[n]=r}}}function BM(e,t,n,r){return e/=r/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)}function VM(e,t){e.scrollTop=t}const HM=e=>e.scrollTop;function E2({el:e,to:t,duration:n=500,callback:r}){const o=rc(!1),s=HM(e),a=t-s,l=20;let i=0;const c=function(){if(!Ie(o))return;i+=l;const p=BM(i,s,a,n);VM(e,p),i{o.value=!0,c()},stop:()=>{o.value=!1}}}function jM(e){for(var t=[],n=0;n=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a===95){o+=e[s++];continue}break}if(!o)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:o}),n=s;continue}if(r==="("){var l=1,i="",s=n+1;if(e[s]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s-1)return!0}return!1},b=function(A){var P=l[l.length-1],K=A||(P&&typeof P=="string"?P:"");if(P&&!K)throw new TypeError('Must have text between two parameters, missing text after "'.concat(P.name,'"'));return!K||v(K)?"[^".concat(Es(a),"]+?"):"(?:(?!".concat(Es(K),")[^").concat(Es(a),"])+?")};c)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}function UM(e,t,n){var r=e.map(function(o){return w2(o,t,n).source});return new RegExp("(?:".concat(r.join("|"),")"),Rv(n))}function qM(e,t,n){return GM(WM(e,n),t,n)}function GM(e,t,n){n===void 0&&(n={});for(var r=n.strict,o=r===void 0?!1:r,s=n.start,a=s===void 0?!0:s,l=n.end,i=l===void 0?!0:l,c=n.encode,u=c===void 0?function(P){return P}:c,d=n.delimiter,p=d===void 0?"/#?":d,C=n.endsWith,v=C===void 0?"":C,b="[".concat(Es(v),"]|$"),S="[".concat(Es(p),"]"),E=a?"^":"",x=0,h=e;x-1:R===void 0;o||(E+="(?:".concat(S,"(?=").concat(b,"))?")),A||(E+="(?=".concat(S,"|").concat(b,")"))}return new RegExp(E,Rv(n))}function w2(e,t,n){return e instanceof RegExp?zM(e,t):Array.isArray(e)?UM(e,t,n):qM(e,t,n)}const s4=Object.assign({}),S2=[];Object.keys(s4).forEach(e=>{const t=s4[e].default||{},n=Array.isArray(t)?[...t]:[t];S2.push(...n)});const H0=()=>C1().getProjectConfig.permissionMode,ZM=()=>H0()===qn.BACK,YM=()=>H0()===qn.ROUTE_MAPPING,j0=()=>H0()===qn.ROLE,Lv=[];(()=>{S2.sort((e,t)=>(e.orderNo||0)-(t.orderNo||0));for(const e of S2)Lv.push(sM(e))})();function W0(){return ft(this,null,function*(){const e=Cc(),t=n=>n.filter(r=>{var s;const o=!((s=r.meta)!=null&&s.hideMenu)&&!r.hideMenu;return o&&r.children&&(r.children=t(r.children)),o});return ZM()?t(e.getBackMenuList):YM()?t(e.getFrontMenuList):Lv})}const kv=()=>ft(void 0,null,function*(){const e=yield W0();if(j0()){const t=yr.getRoutes();return ua(e,z0(t))}return e});function lJ(e){return ft(this,null,function*(){const t=yield W0(),n=yield oM(t,e);return n==null?void 0:n[0]})}function cJ(){return ft(this,null,function*(){const t=(yield W0()).map(n=>Yt(at({},n),{children:void 0}));if(j0()){const n=yr.getRoutes();return t.filter(z0(n))}return t})}function uJ(e){return ft(this,null,function*(){var r;const n=(yield kv()).find(o=>o.path===e);if(!n||!n.children||(r=n==null?void 0:n.meta)!=null&&r.hideChildrenInMenu)return[];if(j0()){const o=yr.getRoutes();return ua(n.children,z0(o))}return n.children})}function z0(e){return t=>{const n=e.find(r=>{var s,a;if(Gg(t.path))return!0;if((s=r.meta)!=null&&s.carryParam)return w2(r.path).test(t.path);const o=r.path===t.path;return o?(a=r.meta)!=null&&a.ignoreAuth?!0:o||w2(r.path).test(t.path):!1});return n?(t.icon=t.icon||n.meta.icon,t.meta=n.meta,!0):!1}}function KM(e){return["$","(",")","*","+",".","[","]","?","\\","^","{","}","|"].includes(e)?`\\${e}`:e}function XM(e){const n=["",...[...e].map(r=>KM(r)),""].join(".*");return new RegExp(n)}function JM(e,t,n){const r=Ne([]),o=Ne(""),s=Ne(-1);let a=[];const{t:l}=Zr(),i=d1(),c=_v(u,200);ey(()=>ft(this,null,function*(){const x=yield kv();a=vi(x),tM(a,h=>{h.name=l(h.name)})}));function u(x){x==null||x.stopPropagation();const h=x.target.value;if(o.value=h.trim(),!h){r.value=[];return}const y=XM(Ie(o)),O=ua(a,T=>y.test(T.name)&&!T.hideMenu);r.value=d(O,y),s.value=0}function d(x,h,y){const O=[];return x.forEach(T=>{const{name:M,path:R,icon:A,children:P,hideMenu:K,meta:Z}=T;!K&&h.test(M)&&(!(P!=null&&P.length)||Z!=null&&Z.hideChildrenInMenu)&&O.push({name:y!=null&&y.name?`${y.name} > ${M}`:M,path:R,icon:A}),!(Z!=null&&Z.hideChildrenInMenu)&&Array.isArray(P)&&P.length&&O.push(...d(P,h,T))}),O}function p(x){const h=x.target.dataset.index;s.value=Number(h)}function C(){r.value.length&&(s.value--,s.value<0&&(s.value=r.value.length-1),b())}function v(){r.value.length&&(s.value++,s.value>r.value.length-1&&(s.value=0),b())}function b(){const x=Ie(e);if(!x||!Array.isArray(x)||x.length===0||!Ie(t))return;const h=Ie(s),y=x[h];if(!y)return;const O=Ie(t);if(!O)return;const T=y.offsetTop+y.offsetHeight,M=O.offsetHeight,{start:R}=E2({el:O,duration:100,to:T-M});R()}function S(){return ft(this,null,function*(){if(!r.value.length)return;const x=Ie(r),h=Ie(s);if(x.length===0||h<0)return;const y=x[h];E(),yield ve(),i(y.path)})}function E(){r.value=[],n("close")}return Qc("Enter",S),Qc("ArrowUp",C),Qc("ArrowDown",v),Qc("Escape",E),{handleSearch:c,searchResult:r,keyword:o,activeIndex:s,handleMouseenter:p,handleEnter:S}}function QM(){const e=wv();return{getIsMobile:oe(()=>Ie(e.isMobile))}}const eR=["data-index"],tR=dt({__name:"AppSearchModal",props:{visible:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,o=Ne(null),s=Ne(null),{t:a}=Zr(),{prefixCls:l}=Do("app-search-modal"),{refs:i,setRefs:c}=FM(),{getIsMobile:u}=QM(),{handleSearch:d,searchResult:p,keyword:C,activeIndex:v,handleEnter:b,handleMouseenter:S}=JM(i,o,r),E=oe(()=>!C||Ie(p).length===0),x=oe(()=>[l,{[`${l}--mobile`]:Ie(u)}]);it(()=>n.visible,y=>{y&&ve(()=>{var O;(O=Ie(s))==null||O.focus()})});function h(){p.value=[],r("close")}return(y,O)=>{const T=hn("a-input");return Wt(),Kn(Is,{to:"body"},[yt(X2,{name:"zoom-fade",mode:"out-in"},{default:or(()=>[e.visible?(Wt(),kn("div",{key:0,class:Kt(x.value),onClick:O[2]||(O[2]=ty(()=>{},["stop"]))},[ai((Wt(),kn("div",{class:Kt(`${Ie(l)}-content`)},[wn("div",{class:Kt(`${Ie(l)}-input__wrapper`)},[yt(T,{class:Kt(`${Ie(l)}-input`),placeholder:Ie(a)("common.searchText"),ref_key:"inputRef",ref:s,"allow-clear":"",onChange:Ie(d)},{prefix:or(()=>[yt(Ie(vy))]),_:1},8,["class","placeholder","onChange"]),wn("span",{class:Kt(`${Ie(l)}-cancel`),onClick:h},Oo(Ie(a)("common.cancelText")),3)],2),ai(wn("div",{class:Kt(`${Ie(l)}-not-data`)},Oo(Ie(a)("component.app.searchNotData")),3),[[nc,E.value]]),ai(wn("ul",{class:Kt(`${Ie(l)}-list`),ref_key:"scrollWrap",ref:o},[(Wt(!0),kn(ii,null,Hg(Ie(p),(M,R)=>(Wt(),kn("li",{ref_for:!0,ref:Ie(c)(R),key:M.path,"data-index":R,onMouseenter:O[0]||(O[0]=(...A)=>Ie(S)&&Ie(S)(...A)),onClick:O[1]||(O[1]=(...A)=>Ie(b)&&Ie(b)(...A)),class:Kt([`${Ie(l)}-list__item`,{[`${Ie(l)}-list__item--active`]:Ie(v)===R}])},[wn("div",{class:Kt(`${Ie(l)}-list__item-icon`)},[yt(Mo,{icon:M.icon||"mdi:form-select",size:20},null,8,["icon"])],2),wn("div",{class:Kt(`${Ie(l)}-list__item-text`)},Oo(M.name),3),wn("div",{class:Kt(`${Ie(l)}-list__item-enter`)},[yt(Mo,{icon:"ant-design:enter-outlined",size:20})],2)],42,eR))),128))],2),[[nc,!E.value]]),yt(kM)],2)),[[Ie(DM),h]])],2)):bt("",!0)]),_:1})])}}});const nR=Xr(tR,[["__scopeId","data-v-5602e8a8"]]),rR=dt({name:"AppSearch",setup(){const e=Ne(!1),{t}=Zr();function n(r){e.value=r}return()=>yt("div",{class:"p-1",onClick:n.bind(null,!0)},[yt(Vf,null,{title:()=>t("common.searchText"),default:()=>yt(by,null,null)}),yt(nR,{onClose:n.bind(null,!1),visible:Ie(e)},null)])}}),oR={class:"ml-1"},sR={class:"ml-1"},aR=dt({__name:"Dropdown",props:{popconfirm:Boolean,trigger:{type:Array,default:()=>["contextmenu"]},dropMenuList:{type:Array,default:()=>[]},selectedKeys:{type:Array,default:()=>[]}},emits:["menuEvent"],setup(e,{emit:t}){const n=yy,r=Cd,o=Cd.Item,s=Cd.Divider,a=zg,l=e,i=t;function c(p){var b;const{event:C}=p,v=l.dropMenuList.find(S=>`${S.event}`==`${C}`);i("menuEvent",v),(b=p.onClick)==null||b.call(p)}const u=oe(()=>p=>{const C=gi(p,["confirm","cancel","icon"]);return!p.onConfirm&&p.confirm&&Eo(p.confirm)&&(C.onConfirm=p.confirm),!p.onCancel&&p.cancel&&Eo(p.cancel)&&(C.onCancel=p.cancel),C}),d=p=>({key:p});return(p,C)=>(Wt(),Kn(Ie(n),Ko({trigger:e.trigger},p.$attrs),{overlay:or(()=>[yt(Ie(r),{selectedKeys:e.selectedKeys},{default:or(()=>[(Wt(!0),kn(ii,null,Hg(e.dropMenuList,v=>(Wt(),kn(ii,{key:`${v.event}`},[yt(Ie(o),Ko({ref_for:!0},d(v.event),{onClick:b=>c(v),disabled:v.disabled}),{default:or(()=>[e.popconfirm&&v.popConfirm?(Wt(),Kn(Ie(a),Ko({key:0,ref_for:!0},u.value(v.popConfirm),{disabled:v.disabled}),ny({default:or(()=>[wn("div",null,[v.icon?(Wt(),Kn(Mo,{key:0,icon:v.icon},null,8,["icon"])):bt("",!0),wn("span",oR,Oo(v.text),1)])]),_:2},[v.popConfirm.icon?{name:"icon",fn:or(()=>[yt(Mo,{icon:v.popConfirm.icon},null,8,["icon"])]),key:"0"}:void 0]),1040,["disabled"])):(Wt(),kn(ii,{key:1},[v.icon?(Wt(),Kn(Mo,{key:0,icon:v.icon},null,8,["icon"])):bt("",!0),wn("span",sR,Oo(v.text),1)],64))]),_:2},1040,["onClick","disabled"]),v.divider?(Wt(),Kn(Ie(s),{key:`d-${v.event}`})):bt("",!0)],64))),128))]),_:1},8,["selectedKeys"])]),default:or(()=>[wn("span",null,[Di(p.$slots,"default")])]),_:3},16,["trigger"]))}}),iR=Dr(aR);function a4(e){const t=x0();Xo.mode==="legacy"?Xo.global.locale=e:Xo.global.locale.value=e,t.setLocaleInfo({locale:e}),d6(e)}function Av(){const e=x0(),t=oe(()=>e.getLocale),n=oe(()=>e.getShowPicker),r=oe(()=>{var s,a;return(a=(s=Xo.global.getLocaleMessage(Ie(t)))==null?void 0:s.antdLocale)!=null?a:{}});function o(s){return ft(this,null,function*(){const a=Xo.global;if(Ie(a.locale)===s)return s;if(Qf.includes(s))return a4(s),s;const i=(yield g5(Object.assign({"./lang/en.ts":()=>Tt(()=>import("./en-9c11272e.js"),["./en-9c11272e.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url),"./lang/zh_CN.ts":()=>Tt(()=>import("./zh_CN-f9481935.js"),["./zh_CN-f9481935.js","./antd-0679333d.js","./vue-72a104e4.js"],import.meta.url)}),`./lang/${s}.ts`)).default;if(!i)return;const{message:c}=i;return a.setLocaleMessage(s,c),Qf.push(s),a4(s),s})}return{getLocale:t,getShowLocalePicker:n,changeLocale:o,getAntdLocale:r}}const lR={class:"cursor-pointer flex items-center"},cR={key:0,class:"ml-1"},uR=dt({__name:"AppLocalePicker",props:{showText:{type:Boolean,default:!0},reload:{type:Boolean}},setup(e){const t=e,n=Ne([]),{changeLocale:r,getLocale:o}=Av(),s=oe(()=>{var c;const i=n.value[0];return i?(c=lh.find(u=>u.event===i))==null?void 0:c.text:""});Vg(()=>{n.value=[Ie(o)]});function a(i){return ft(this,null,function*(){yield r(i),n.value=[i],t.reload&&location.reload()})}function l(i){Ie(o)!==i.event&&a(i.event)}return(i,c)=>(Wt(),Kn(Ie(iR),{placement:"bottom",trigger:["click"],dropMenuList:Ie(lh),selectedKeys:n.value,onMenuEvent:l,overlayClassName:"app-locale-picker-overlay"},{default:or(()=>[wn("span",lR,[yt(Mo,{icon:"ion:language"}),e.showText?(Wt(),kn("span",cR,Oo(s.value),1)):bt("",!0)])]),_:1},8,["dropMenuList","selectedKeys"]))}});function U0(e,t="default",n,r){if(!e||!Reflect.has(e,t)||!Eo(e[t]))return null;const o=e[t];if(!o)return null;const s=at(at({},n),r);return o(s)}function dR(e,t=[]){const n=Object.keys(e),r={};return n.map(o=>{if(t.includes(o))return null;r[o]=s=>U0(e,o,s)}),r}function Iv(e,t,n="in-out"){return dt({name:e,props:{mode:{type:String,default:n}},setup(r,{attrs:o,slots:s}){return()=>yt(X2,Ko({name:e,mode:r.mode},o,{onBeforeEnter:t.beforeEnter,onEnter:t.enter,onLeave:t.leave,onAfterLeave:t.afterLeave,onLeaveCancelled:t.afterLeave}),{default:()=>U0(s)})}})}function fR(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Dv(e="",t=!1){const n=t?"width":"height",r=`offset${fR(n)}`;return{beforeEnter(a){a._parent=a.parentNode,a._initialStyle={transition:a.style.transition,overflow:a.style.overflow,[n]:a.style[n]}},enter(a){const l=a._initialStyle;a.style.setProperty("transition","none","important"),a.style.overflow="hidden",a.offsetHeight,a.style.transition=l.transition,e&&a._parent&&a._parent.classList.add(e),requestAnimationFrame(()=>{})},afterEnter:s,enterCancelled:s,leave(a){a._initialStyle={transition:"",overflow:a.style.overflow,[n]:a.style[n]},a.style.overflow="hidden",a.style[n]=`${a[r]}px`,a.offsetHeight,requestAnimationFrame(()=>a.style[n]="0")},afterLeave:o,leaveCancelled:o};function o(a){e&&a._parent&&a._parent.classList.remove(e),s(a)}function s(a){const l=a._initialStyle[n];a.style.overflow=a._initialStyle.overflow,l!=null&&(a.style[n]=l),Reflect.deleteProperty(a,"_initialStyle")}}const pR=dt({name:"CollapseTransition",setup(){return{on:{beforeEnter(e){x2(e,"collapse-transition"),e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height="0",e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=e.scrollHeight+"px",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"},afterEnter(e){C2(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=e.scrollHeight+"px",e.style.overflow="hidden"},leave(e){e.scrollHeight!==0&&(x2(e,"collapse-transition"),e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){C2(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}}}}});function hR(e,t,n,r,o,s){return Wt(),Kn(X2,Ko({mode:"out-in"},ry(e.on)),{default:or(()=>[Di(e.$slots,"default")]),_:3},16)}const mR=Xr(pR,[["render",hR]]);Iv("expand-x-transition",Dv("",!0));Iv("expand-transition",Dv(""));const gR=dt({__name:"BasicArrow",props:{expand:{type:Boolean},up:{type:Boolean},down:{type:Boolean},inset:{type:Boolean}},setup(e){const t=e,{prefixCls:n}=Do("basic-arrow"),r=oe(()=>{const{expand:o,up:s,down:a,inset:l}=t;return[n,{[`${n}--active`]:o,up:s,inset:l,down:a}]});return(o,s)=>(Wt(),kn("span",{class:Kt(r.value)},[yt(Mo,{icon:"ion:chevron-forward",style:mi(o.$attrs.iconStyle)},null,8,["style"])],2))}});const vR=Xr(gR,[["__scopeId","data-v-ec9b569e"]]),bR={maxWidth:{type:String,default:"600px"},showIndex:{type:Boolean},color:{type:String,default:"#ffffff"},fontSize:{type:String,default:"14px"},placement:{type:String,default:"right"},text:{type:[Array,String]}},Pv=dt({name:"BasicHelp",components:{Tooltip:Vf},props:bR,setup(e,{slots:t}){const{prefixCls:n}=Do("basic-help"),r=oe(()=>({color:e.color,fontSize:e.fontSize})),o=oe(()=>({maxWidth:e.maxWidth}));function s(){const a=e.text;return _o(a)?yt("p",null,[a]):ga(a)?a.map((l,i)=>yt("p",{key:l},[yt(ii,null,[e.showIndex?`${i+1}. `:"",l])])):null}return()=>yt(Vf,{overlayClassName:`${n}__wrap`,title:yt("div",{style:Ie(r)},[s()]),autoAdjustOverflow:!0,overlayStyle:Ie(o),placement:e.placement,getPopupContainer:()=>Ly()},{default:()=>[yt("span",{class:n},[U0(t)||yt(xy,null,null)])]})}});const yR=dt({__name:"BasicTitle",props:{helpMessage:{type:[String,Array],default:""},span:{type:Boolean},normal:{type:Boolean}},setup(e){const t=e,{prefixCls:n}=Do("basic-title"),r=oy(),o=oe(()=>[n,{[`${n}-show-span`]:t.span&&r.default},{[`${n}-normal`]:t.normal}]);return(s,a)=>(Wt(),kn("span",{class:Kt(o.value)},[Di(s.$slots,"default",{},void 0,!0),e.helpMessage?(Wt(),Kn(Pv,{key:0,class:Kt(`${Ie(n)}-help`),text:e.helpMessage},null,8,["class","text"])):bt("",!0)],2))}});const xR=Xr(yR,[["__scopeId","data-v-3f45b404"]]),CR=Dr(vR),ER=Dr(xR),dJ=Dr(Pv),wR={prefixCls:String,title:String,show:Boolean,canExpan:Boolean,helpMessage:{type:[Array,String],default:""}},SR=dt({name:"CollapseHeader",inheritAttrs:!1,props:wR,emits:["expand"],setup(e,{slots:t,attrs:n,emit:r}){const{prefixCls:o}=Do("collapse-container"),s=oe(()=>e.prefixCls||Ie(o));return()=>yt("div",{class:[`${Ie(s)}__header px-2 py-5`,n.class]},[yt(ER,{helpMessage:e.helpMessage,normal:!0},{default:()=>{var a;return[((a=t.title)==null?void 0:a.call(t))||e.title]}}),yt("div",{class:`${Ie(s)}__action`},[t.action?t.action({expand:e.show,onClick:()=>r("expand")}):e.canExpan&&yt(CR,{up:!0,expand:e.show,onClick:()=>r("expand")},null)])])}}),_R=typeof window=="undefined";function OR(e){for(const t of e){const n=t.target.__resizeListeners__||[];n.length&&n.forEach(r=>{r()})}}function i4(e,t){_R||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new Cy(OR),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function l4(e,t){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||e.__ro__.disconnect())}function TR(){const e=document.createEvent("HTMLEvents");e.initEvent("resize",!0,!0),e.eventType="message",window.dispatchEvent(e)}const MR={title:{type:String,default:""},loading:{type:Boolean},canExpan:{type:Boolean,default:!0},helpMessage:{type:[Array,String],default:""},triggerWindowResize:{type:Boolean},lazyTime:{type:Number,default:0}},RR=dt({name:"CollapseContainer",props:MR,setup(e,{expose:t,slots:n}){const{prefixCls:r}=Do("collapse-container"),o=Ne(!0),s=a=>{o.value=J2(a)?!o.value:a,e.triggerWindowResize&&CM(TR,200)};return t({handleExpand:s}),()=>yt("div",{class:Ie(r)},[yt(SR,Ko(e,{prefixCls:Ie(r),onExpand:s,show:o.value}),{title:n.title,action:n.action}),yt("div",{class:"p-2"},[yt(mR,{enable:e.canExpan},{default:()=>{var a;return[e.loading?yt(Ey,{active:e.loading},null):ai(yt("div",{class:`${r}__body`},[(a=n.default)==null?void 0:a.call(n)]),[[nc,o.value]])]}})]),n.footer&&yt("div",{class:`${r}__footer`},[n.footer()])])}});const LR={table:{fetchSetting:{pageField:"pageNum",sizeField:"pageSize",listField:"records",totalField:"total"},pageSizeOptions:["10","50","80","100"],defaultPageSize:10,defaultSize:"middle",defaultSortFn:e=>{const{field:t,order:n}=e;return t&&n?{field:t,order:n}:{}},defaultFilterFn:e=>e},vxeTable:{table:{border:!0,stripe:!0,columnConfig:{resizable:!0,isCurrent:!0,isHover:!0},rowConfig:{isCurrent:!0,isHover:!0},emptyRender:{name:"AEmpty"},printConfig:{},exportConfig:{},customConfig:{storage:!0}},grid:{toolbarConfig:{enabled:!0,export:!0,zoom:!0,print:!0,refresh:!0,custom:!0},pagerConfig:{pageSizes:[20,50,100,500],pageSize:20,autoHidden:!0},proxyConfig:{form:!0,props:{result:"items",total:"total"}},zoomConfig:{}}},scrollbar:{native:!1}},kR={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};function AR({move:e,size:t,bar:n}){const r={},o=`translate${n.axis}(${e}%)`;return r[n.size]=t,r.transform=o,r.msTransform=o,r.webkitTransform=o,r}function IR(e,t){return Object.assign(e,t)}function DR(e){const t={};for(let n=0;nkR[e.vertical?"vertical":"horizontal"]),s=Ne({}),a=Ne(),l=p=>{var C;p.ctrlKey||p.button===2||((C=window.getSelection())==null||C.removeAllRanges(),c(p),s.value[o.value.axis]=p.currentTarget[o.value.offset]-(p[o.value.client]-p.currentTarget.getBoundingClientRect()[o.value.direction]))},i=p=>{var S;const C=Math.abs(p.target.getBoundingClientRect()[o.value.direction]-p[o.value.client]),v=n.value[o.value.offset]/2,b=(C-v)*100/((S=t==null?void 0:t.vnode.el)==null?void 0:S[o.value.offset]);r.value[o.value.scroll]=b*r.value[o.value.scrollSize]/100},c=p=>{p.stopImmediatePropagation(),a.value=!0,Yu(document,"mousemove",u),Yu(document,"mouseup",d),document.onselectstart=()=>!1},u=p=>{var E,x;if(a.value===!1)return;const C=s.value[o.value.axis];if(!C)return;const v=(((E=t==null?void 0:t.vnode.el)==null?void 0:E.getBoundingClientRect()[o.value.direction])-p[o.value.client])*-1,b=n.value[o.value.offset]-C,S=(v-b)*100/((x=t==null?void 0:t.vnode.el)==null?void 0:x[o.value.offset]);r.value[o.value.scroll]=S*r.value[o.value.scrollSize]/100};function d(){a.value=!1,s.value[o.value.axis]=0,n4(document,"mousemove",u),document.onselectstart=null}return Tn(()=>{n4(document,"mouseup",d)}),()=>w("div",{class:["scrollbar__bar","is-"+o.value.key],onMousedown:i},w("div",{ref:n,class:"scrollbar__thumb",onMousedown:l,style:AR({size:e.size,move:e.move,bar:o.value})}))}}),{scrollbar:Qd}=LR;var Ng;const NR=dt({name:"Scrollbar",components:{Bar:PR},props:{native:{type:Boolean,default:(Ng=Qd==null?void 0:Qd.native)!=null?Ng:!1},wrapStyle:{type:[String,Array],default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array],default:""},noresize:Boolean,tag:{type:String,default:"div"}},setup(e){const t=Ne("0"),n=Ne("0"),r=Ne(0),o=Ne(0),s=Ne(),a=Ne();ln("scroll-bar-wrap",s);const l=oe(()=>Array.isArray(e.wrapStyle)?DR(e.wrapStyle):e.wrapStyle),i=()=>{e.native||(o.value=Ie(s).scrollTop*100/Ie(s).clientHeight,r.value=Ie(s).scrollLeft*100/Ie(s).clientWidth)},c=()=>{if(!Ie(s))return;const u=Ie(s).clientHeight*100/Ie(s).scrollHeight,d=Ie(s).clientWidth*100/Ie(s).scrollWidth;n.value=u<100?u+"%":"",t.value=d<100?d+"%":""};return On(()=>{e.native||(ve(c),e.noresize||(i4(Ie(a),c),i4(Ie(s),c),addEventListener("resize",c)))}),pc(()=>{e.native||e.noresize||(l4(Ie(a),c),l4(Ie(s),c),removeEventListener("resize",c))}),{moveX:r,moveY:o,sizeWidth:t,sizeHeight:n,style:l,wrap:s,resize:a,update:c,handleScroll:i}}});const $R={class:"scrollbar"};function FR(e,t,n,r,o,s){const a=hn("bar");return Wt(),kn("div",$R,[wn("div",{ref:"wrap",class:Kt([e.wrapClass,"scrollbar__wrap",e.native?"":"scrollbar__wrap--hidden-default"]),style:mi(e.style),onScroll:t[0]||(t[0]=(...l)=>e.handleScroll&&e.handleScroll(...l))},[(Wt(),Kn(sy(e.tag),{ref:"resize",class:Kt(["scrollbar__view",e.viewClass]),style:mi(e.viewStyle)},{default:or(()=>[Di(e.$slots,"default")]),_:3},8,["class","style"]))],38),e.native?bt("",!0):(Wt(),kn(ii,{key:0},[yt(a,{move:e.moveX,size:e.sizeWidth},null,8,["move","size"]),yt(a,{vertical:"",move:e.moveY,size:e.sizeHeight},null,8,["move","size"])],64))])}const BR=Xr(NR,[["render",FR]]),VR=dt({name:"ScrollContainer",components:{Scrollbar:BR},setup(){const e=Ne(null);function t(o,s=500){const a=Ie(e);a&&ve(()=>{const l=Ie(a.wrap);if(!l)return;const{start:i}=E2({el:l,to:o,duration:s});i()})}function n(){const o=Ie(e);return o?o.wrap:null}function r(){const o=Ie(e);o&&ve(()=>{const s=Ie(o.wrap);if(!s)return;const a=s.scrollHeight,{start:l}=E2({el:s,to:a});l()})}return{scrollbarRef:e,scrollTo:t,scrollBottom:r,getScrollWrap:n}}});function HR(e,t,n,r,o,s){const a=hn("Scrollbar");return Wt(),Kn(a,Ko({ref:"scrollbarRef",class:"scroll-container"},e.$attrs),{default:or(()=>[Di(e.$slots,"default")]),_:3},16)}const jR=Xr(VR,[["render",HR]]),fJ=Dr(RR),pJ=Dr(jR);function WR(){const e=Kr(),t=oe(()=>e.getPageLoading),n=oe(()=>e.getProjectConfig.openKeepAlive),r=oe(()=>e.getProjectConfig.settingButtonPosition),o=oe(()=>e.getProjectConfig.canEmbedIFramePage),s=oe(()=>e.getProjectConfig.permissionMode),a=oe(()=>e.getProjectConfig.showLogo),l=oe(()=>e.getProjectConfig.contentMode),i=oe(()=>e.getProjectConfig.useOpenBackTop),c=oe(()=>e.getProjectConfig.showSettingButton),u=oe(()=>e.getProjectConfig.useErrorHandle),d=oe(()=>e.getProjectConfig.showFooter),p=oe(()=>e.getProjectConfig.showBreadCrumb),C=oe(()=>e.getProjectConfig.themeColor),v=oe(()=>e.getProjectConfig.showBreadCrumbIcon),b=oe(()=>e.getProjectConfig.fullContent),S=oe(()=>e.getProjectConfig.colorWeak),E=oe(()=>e.getProjectConfig.grayMode),x=oe(()=>e.getProjectConfig.lockTime),h=oe(()=>e.getProjectConfig.showDarkModeToggle),y=oe(()=>e.getDarkMode),O=oe(()=>e.getProjectConfig.contentMode===Sl.FULL?Sl.FULL:Sl.FIXED);function T(R){e.setProjectConfig(R)}function M(R){e.setDarkMode(R)}return{setRootSetting:T,getSettingButtonPosition:r,getFullContent:b,getColorWeak:S,getGrayMode:E,getLayoutContentMode:O,getPageLoading:t,getOpenKeepAlive:n,getCanEmbedIFramePage:o,getPermissionMode:s,getShowLogo:a,getUseErrorHandle:u,getShowBreadCrumb:p,getShowBreadCrumbIcon:v,getUseOpenBackTop:i,getShowSettingButton:c,getShowFooter:d,getContentMode:l,getLockTime:x,getThemeColor:C,getDarkMode:y,setDarkMode:M,getShowDarkModeToggle:h}}function Nv(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function zR(e){let t=e.toLowerCase();if(Nv(e)){if(t.length===4){let r="#";for(let o=1;o<4;o+=1)r+=t.slice(o,o+1).concat(t.slice(o,o+1));t=r}const n=[];for(let r=1;r<7;r+=2)n.push(parseInt("0x"+t.slice(r,r+2)));return"RGB("+n.join(",")+")"}return t}function UR(e){if(!Nv(e))return;const[t,n,r]=zR(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(o=>Number(o));return t*.299+n*.578+r*.114<192}function qR(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${tf(e.substring(0,2),t)}${tf(e.substring(2,4),t)}${tf(e.substring(4,6),t)}`}function $v(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ef(e.substring(0,2),t)}${ef(e.substring(2,4),t)}${ef(e.substring(4,6),t)}`}function ef(e,t){const n=parseInt(e,16)+t,r=n>255?255:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function tf(e,t){const n=parseInt(e,16)-t,r=n<0?0:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}const GR=document.documentElement;function Fv(e,t,n){const r=n||document.body;let{className:o}=r;o=o.replace(t,""),r.className=e?`${o} ${t} `:o}function ui(e,t,n=GR){n.style.setProperty(e,t)}const ZR="--header-bg-color",YR="--header-bg-hover-color",KR="--header-active-menu-bg-color",XR="--sider-dark-bg-color",JR="--sider-dark-darken-bg-color",QR="--sider-dark-lighten-bg-color";function _2(e){const t=Kr(),n=t.getDarkMode===lr.DARK;e||(n?e="#151515":e=t.getHeaderSetting.bgColor),ui(ZR,e);const r=$v(e,6);ui(YR,r),ui(KR,r);const o=UR(e);t.setProjectConfig({headerSetting:{theme:o||n?lr.DARK:lr.LIGHT}})}function O2(e){const t=Kr(),n=t.getDarkMode===lr.DARK;e||(n?e="#212121":e=t.getMenuSetting.bgColor),ui(XR,e),ui(JR,qR(e,6)),ui(QR,$v(e,5));const r=["#fff","#ffffff"].includes(e.toLowerCase());t.setProjectConfig({menuSetting:{theme:r&&!n?lr.LIGHT:lr.DARK}})}function Bv(e="light"){return ft(this,null,function*(){const t=document.getElementById("htmlRoot");if(!t)return;const n=V0(t,"dark");e==="dark"?(t.setAttribute("data-theme","dark"),n||x2(t,"dark")):(t.setAttribute("data-theme","light"),n&&C2(t,"dark"))})}const eL=dt({__name:"AppDarkModeToggle",setup(e){const{prefixCls:t}=Do("dark-switch"),{getDarkMode:n,setDarkMode:r,getShowDarkModeToggle:o}=WR(),s=oe(()=>n.value===lr.DARK),a=oe(()=>[t,{[`${t}--dark`]:Ie(s)}]);function l(){const i=n.value===lr.DARK?lr.LIGHT:lr.DARK;r(i),Bv(i),_2(),O2()}return(i,c)=>Ie(o)?(Wt(),kn("div",{key:0,class:Kt(a.value),onClick:l},[wn("div",{class:Kt(`${Ie(t)}-inner`)},null,2),yt(Ie(T2),{size:"14",name:"sun"}),yt(Ie(T2),{size:"14",name:"moon"})],2)):bt("",!0)}});const tL=Xr(eL,[["__scopeId","data-v-a37e5ee9"]]),hJ=Dr(lM),nL=Dr(RM),mJ=Dr(rR),gJ=Dr(uR),vJ=Dr(tL);function Do(e){const t=wv();return{prefixCls:`${t.prefixCls}-${e}`,prefixVar:t.prefixCls}}const rL=dt({name:"SvgIcon",props:{prefix:{type:String,default:"icon"},name:{type:String,required:!0},size:{type:[Number,String],default:16},spin:{type:Boolean,default:!1}},setup(e){const{prefixCls:t}=Do("svg-icon"),n=oe(()=>`#${e.prefix}-${e.name}`),r=oe(()=>{const{size:o}=e;let s=`${o}`;return s=`${s.replace("px","")}px`,{width:s,height:s}});return{symbolId:n,prefixCls:t,getStyle:r}}});const oL=["xlink:href"];function sL(e,t,n,r,o,s){return Wt(),kn("svg",{class:Kt([e.prefixCls,e.$attrs.class,e.spin&&"svg-icon-spin"]),style:mi(e.getStyle),"aria-hidden":"true"},[wn("use",{"xlink:href":e.symbolId},null,8,oL)],6)}const T2=Xr(rL,[["render",sL],["__scopeId","data-v-6b7deac0"]]);/** * (c) Iconify * * For the full copyright and license information, please view the license.txt or license.gpl.txt @@ -32,7 +32,7 @@ var Wb=Object.defineProperty,zb=Object.defineProperties;var Ub=Object.getOwnProp * * @license MIT * @version 3.1.1 -*/const Vv=Object.freeze({left:0,top:0,width:16,height:16}),Ku=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ec=Object.freeze(at(at({},Vv),Ku)),M2=Object.freeze(Yt(at({},Ec),{body:"",hidden:!1}));function aL(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function c4(e,t){const n=aL(e,t);for(const r in M2)r in Ku?r in e&&!(r in n)&&(n[r]=Ku[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function iL(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=r[a]&&r[a].parent,i=l&&s(l);i&&(o[a]=[l].concat(i))}return o[a]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function lL(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function a(l){s=c4(r[l]||o[l],s)}return a(t),n.forEach(a),c4(e,s)}function Hv(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=iL(e);for(const o in r){const s=r[o];s&&(t(o,lL(e,o,s)),n.push(o))}return n}const Rl=/^[a-z0-9]+(-[a-z0-9]+)*$/,zi=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),i=o.pop(),c={provider:o.length>0?o[0]:r,prefix:i,name:l};return t&&!Tu(c)?null:c}const s=o[0],a=s.split("-");if(a.length>1){const l={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Tu(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:s};return t&&!Tu(l,n)?null:l}return null},Tu=(e,t)=>e?!!((e.provider===""||e.provider.match(Rl))&&(t&&e.prefix===""||e.prefix.match(Rl))&&e.name.match(Rl)):!1,cL=at({provider:"",aliases:{},not_found:{}},Vv);function nf(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function jv(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!nf(e,cL))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(Rl)||typeof s.body!="string"||!nf(s,M2))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],a=s.parent;if(!o.match(Rl)||typeof a!="string"||!n[a]&&!r[a]||!nf(s,M2))return null}return t}const Xu=Object.create(null);function uL(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ko(e,t){const n=Xu[e]||(Xu[e]=Object.create(null));return n[t]||(n[t]=uL(e,t))}function q0(e,t){return jv(t)?Hv(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function dL(e,t,n){try{if(typeof n.body=="string")return e.icons[t]=at({},n),!0}catch(r){}return!1}function fL(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Xu)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Xu[o]||{})).forEach(a=>{const l=ko(o,a);n=n.concat(Object.keys(l.icons).map(i=>(o!==""?"@"+o+":":"")+a+":"+i))})}),n}let lc=!1;function pL(e){return typeof e=="boolean"&&(lc=e),lc}function wc(e){const t=typeof e=="string"?zi(e,!0,lc):e;if(t){const n=ko(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Wv(e,t){const n=zi(e,!0,lc);if(!n)return!1;const r=ko(n.provider,n.prefix);return dL(r,n.name,t)}function zv(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),lc&&!t&&!e.prefix){let o=!1;return jv(e)&&(e.prefix="",Hv(e,(s,a)=>{a&&Wv(s,a)&&(o=!0)})),o}const n=e.prefix;if(!Tu({provider:t,prefix:n,name:"a"}))return!1;const r=ko(t,n);return!!q0(r,e)}function hL(e){return!!wc(e)}function mL(e){const t=wc(e);return t?at(at({},Ec),t):null}const Uv=Object.freeze({width:null,height:null}),qv=Object.freeze(at(at({},Uv),Ku)),gL=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vL=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function R2(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(gL);if(r===null||!r.length)return e;const o=[];let s=r.shift(),a=vL.test(s);for(;;){if(a){const l=parseFloat(s);isNaN(l)?o.push(s):o.push(Math.ceil(l*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");a=!a}}const bL=e=>e==="unset"||e==="undefined"||e==="none";function I1(e,t){const n=at(at({},Ec),e),r=at(at({},qv),t),o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(v=>{const b=[],S=v.hFlip,E=v.vFlip;let x=v.rotate;S?E?x+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):E&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let h;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:h=o.height/2+o.top,b.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:h=o.width/2+o.left,b.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}x%2===1&&(o.left!==o.top&&(h=o.left,o.left=o.top,o.top=h),o.width!==o.height&&(h=o.width,o.width=o.height,o.height=h)),b.length&&(s=''+s+"")});const a=r.width,l=r.height,i=o.width,c=o.height;let u,d;a===null?(d=l===null?"1em":l==="auto"?c:l,u=R2(d,i/c)):(u=a==="auto"?i:a,d=l===null?R2(u,c/i):l==="auto"?c:l);const p={},C=(v,b)=>{bL(b)||(p[v]=b.toString())};return C("width",u),C("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+i.toString()+" "+c.toString(),{attributes:p,body:s}}const yL=/\sid="(\S+)"/g,xL="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let CL=0;function Gv(e,t=xL){const n=[];let r;for(;r=yL.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(CL++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ya={local:!0,session:!0},Zv={local:new Set,session:new Set};let G0=!1;function EL(e){G0=e}const u4="iconify2",cc="iconify",Yv=cc+"-count",d4=cc+"-version",Kv=36e5,wL=168;function L2(e,t){try{return e.getItem(t)}catch(n){}}function Z0(e,t,n){try{return e.setItem(t,n),!0}catch(r){}}function f4(e,t){try{e.removeItem(t)}catch(n){}}function k2(e,t){return Z0(e,Yv,t.toString())}function A2(e){return parseInt(L2(e,Yv))||0}let tu=typeof window=="undefined"?{}:window;function Xv(e){const t=e+"Storage";try{if(tu&&tu[t]&&typeof tu[t].length=="number")return tu[t]}catch(n){}ya[e]=!1}function Jv(e,t){const n=Xv(e);if(!n)return;const r=L2(n,d4);if(r!==u4){if(r){const l=A2(n);for(let i=0;i{const i=cc+l.toString(),c=L2(n,i);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch(u){}f4(n,i)}};let a=A2(n);for(let l=a-1;l>=0;l--)s(l)||(l===a-1?(a--,k2(n,a)):Zv[e].add(l))}function Qv(){if(!G0){EL(!0);for(const e in ya)Jv(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=ko(r,o);if(!q0(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function e8(e,t){switch(e){case"local":case"session":ya[e]=t;break;case"all":for(const n in ya)ya[n]=t;break}}const I2=Object.create(null);function t8(e,t){I2[e]=t}function D2(e){return I2[e]||I2[""]}function Y0(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const D1=Object.create(null),dl=["https://api.simplesvg.com","https://api.unisvg.com"],Mu=[];for(;dl.length>0;)dl.length===1||Math.random()>.5?Mu.push(dl.shift()):Mu.push(dl.pop());D1[""]=Y0({resources:["https://api.iconify.design"].concat(Mu)});function n8(e,t){const n=Y0(t);return n===null?!1:(D1[e]=n,!0)}function P1(e){return D1[e]}function SL(){return Object.keys(D1)}const _L=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}};let Ju=_L();function OL(e){Ju=e}function TL(){return Ju}function ML(e,t){const n=P1(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function RL(e){return e===404}const LL=(e,t,n)=>{const r=[],o=ML(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},l=0;return n.forEach((i,c)=>{l+=i.length+1,l>=o&&c>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},l=i.length),a.icons.push(i)}),r.push(a),r};function kL(e){if(typeof e=="string"){const t=P1(e);if(t)return t.path}return"/"}const AL=(e,t,n)=>{if(!Ju){n("abort",424);return}let r=kL(t.provider);switch(t.type){case"icons":{const s=t.prefix,l=t.icons.join(","),i=new URLSearchParams({icons:l});r+=s+".json?"+i.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;Ju(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(RL(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},IL={prepare:LL,send:AL};function DL(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,a=o.prefix,l=o.name,i=n[s]||(n[s]=Object.create(null)),c=i[a]||(i[a]=ko(s,a));let u;l in c.icons?u=t.loaded:a===""||c.missing.has(l)?u=t.missing:u=t.pending;const d={provider:s,prefix:a,name:l};u.push(d)}),t}function r8(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function PL(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(i=>{if(i.prefix!==o)return!0;const c=i.name;if(e.icons[c])a.loaded.push({provider:r,prefix:o,name:c});else if(e.missing.has(c))a.missing.push({provider:r,prefix:o,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||r8([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let NL=0;function $L(e,t,n){const r=NL++,o=r8.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function FL(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?zi(o,t,n):o;s&&r.push(s)}),r}var BL={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function VL(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let T=e.resources.slice(0);for(a=[];T.length>1;){const M=Math.floor(Math.random()*T.length);a.push(T[M]),T=T.slice(0,M).concat(T.slice(M+1))}a=a.concat(T)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let i="pending",c=0,u,d=null,p=[],C=[];typeof r=="function"&&C.push(r);function v(){d&&(clearTimeout(d),d=null)}function b(){i==="pending"&&(i="aborted"),v(),p.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),p=[]}function S(T,M){M&&(C=[]),typeof T=="function"&&C.push(T)}function E(){return{startTime:l,payload:t,status:i,queriesSent:c,queriesPending:p.length,subscribe:S,abort:b}}function x(){i="failed",C.forEach(T=>{T(void 0,u)})}function h(){p.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),p=[]}function y(T,M,R){const A=M!=="success";switch(p=p.filter(P=>P!==T),i){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if(M==="abort"){u=R,x();return}if(A){u=R,p.length||(a.length?O():x());return}if(v(),h(),!e.random){const P=e.resources.indexOf(T.resource);P!==-1&&P!==e.index&&(e.index=P)}i="completed",C.forEach(P=>{P(R)})}function O(){if(i!=="pending")return;v();const T=a.shift();if(T===void 0){if(p.length){d=setTimeout(()=>{v(),i==="pending"&&(h(),x())},e.timeout);return}x();return}const M={status:"pending",resource:T,callback:(R,A)=>{y(M,R,A)}};p.push(M),c++,d=setTimeout(O,e.rotate),n(T,t,M.callback)}return setTimeout(O),E}function o8(e){const t=at(at({},BL),e);let n=[];function r(){n=n.filter(l=>l().status==="pending")}function o(l,i,c){const u=VL(t,l,i,(d,p)=>{r(),c&&c(d,p)});return n.push(u),u}function s(l){return n.find(i=>l(i))||null}return{query:o,find:s,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:r}}function p4(){}const rf=Object.create(null);function HL(e){if(!rf[e]){const t=P1(e);if(!t)return;const n=o8(t),r={config:t,redundancy:n};rf[e]=r}return rf[e]}function s8(e,t,n){let r,o;if(typeof e=="string"){const s=D2(e);if(!s)return n(void 0,424),p4;o=s.send;const a=HL(e);a&&(r=a.redundancy)}else{const s=Y0(e);if(s){r=o8(s);const a=e.resources?e.resources[0]:"",l=D2(a);l&&(o=l.send)}}return!r||!o?(n(void 0,424),p4):r.query(t,o,n)().abort}function jL(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in ya)Jv(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function WL(e,t){G0||Qv();function n(r){let o;if(!ya[r]||!(o=Xv(r)))return;const s=Zv[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=A2(o),!k2(o,a+1))return;const l={cached:Math.floor(Date.now()/Kv),provider:e.provider,data:t};return Z0(o,cc+a.toString(),JSON.stringify(l))}t.lastModified&&!jL(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function h4(){}function zL(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,PL(e)}))}function UL(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=D2(n)))return;s.prepare(n,r,o).forEach(l=>{s8(n,l,i=>{if(typeof i!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=q0(e,i);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),WL(e,i)}catch(c){}zL(e)})})}))}const qL=e=>{const n=ko(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},K0=(e,t)=>{const n=FL(e,!0,pL()),r=DL(n);if(!r.pending.length){let i=!0;return t&&setTimeout(()=>{i&&t(r.loaded,r.missing,r.pending,h4)}),()=>{i=!1}}const o=Object.create(null),s=[];let a,l;return r.pending.forEach(i=>{const{provider:c,prefix:u}=i;if(u===l&&c===a)return;a=c,l=u,s.push(ko(c,u));const d=o[c]||(o[c]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(i=>{const{provider:c,prefix:u,name:d}=i,p=ko(c,u),C=p.pendingIcons||(p.pendingIcons=new Set);C.has(d)||(C.add(d),o[c][u].push(d))}),s.forEach(i=>{const{provider:c,prefix:u}=i;o[c][u].length&&UL(i,o[c][u])}),t?$L(t,r,s):h4},GL=e=>new Promise((t,n)=>{const r=typeof e=="string"?zi(e,!0):e;if(!r){n(e);return}K0([r||e],o=>{if(o.length&&r){const s=wc(r);if(s){t(at(at({},Ec),s));return}}n(e)})});function a8(e,t){const n=at({},e);for(const r in t){const o=t[r],s=typeof o;r in Uv?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const N1=Yt(at({},qv),{inline:!1}),of="iconify",P2="iconify-inline",ks="iconifyData"+Date.now();let ka=[];function Sc(e){for(let t=0;tdocument.documentElement})}function YL(e){ka=ka.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function _c(){return ka}function KL(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Ll=null;const XL={childList:!0,subtree:!0,attributes:!0};function l8(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Ll&&Ll(e)}))}function JL(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r0||o.type==="attributes"&&o.target[ks]!==void 0){n.paused||l8(e);return}}}function c8(e,t){e.observer.instance.observe(t,XL)}function Qu(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(JL.bind(null,e)),c8(e,n),t.paused||l8(e))}function m4(){_c().forEach(Qu)}function u8(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function QL(e){const t=Ll!==null;if(Ll!==e&&(Ll=e,t&&_c().forEach(u8)),t){m4();return}KL(m4)}function N2(e){(e?[e]:_c()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function ek(e){if(e){const t=Sc(e);t&&N2(t)}else N2()}function $2(e){(e?[e]:_c()).forEach(t=>{if(!t.observer){Qu(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?c8(t,r):Qu(t);else return}})}function tk(e){if(e){const t=Sc(e);t&&$2(t)}else $2()}function d8(e,t=!1){const n=i8(e,t);return Qu(n),n}function f8(e){const t=Sc(e);t&&(u8(t),YL(e))}function nk(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in N1)if(n[o]!==r[o])return!0;return!1}function rk(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const ok=/[\s,]+/;function sk(e,t){t.split(ok).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ak=["width","height"],ik=["inline","hFlip","vFlip"];function lk(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ck(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&zi(t,!0);if(!n)return null;const r=Yt(at({},N1),{inline:e.classList&&e.classList.contains(P2)});ak.forEach(l=>{const i=e.getAttribute("data-"+l);i&&(r[l]=i)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=rk(o));const s=e.getAttribute("data-flip");typeof s=="string"&&sk(r,s),ik.forEach(l=>{const i="data-"+l,c=lk(e.getAttribute(i),i);typeof c=="boolean"&&(r[l]=c)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const uk="svg."+of+", i."+of+", span."+of+", i."+P2+", span."+P2;function dk(e){const t=[];return e.querySelectorAll(uk).forEach(n=>{const r=n[ks]||n.tagName.toLowerCase()!=="svg"?ck(n):null;r&&t.push({node:n,props:r})}),t}function p8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}let kl;function fk(){try{kl=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){kl=null}}function pk(e){return kl===void 0&&fk(),kl?kl.createHTML(e):e}function h8(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function m8(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(l=>{o.add(l)})}const s=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&s.push(a):(o.add(a),s.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),s}function g8(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function v8(e,t,n){let r;try{r=document.createElement("span")}catch(v){return e}const o=t.customisations,s=I1(n,o),a=e[ks],l=p8(Gv(s.body),at({"aria-hidden":"true",role:"img"},s.attributes));r.innerHTML=pk(l);const i=r.childNodes[0],c=e.attributes;for(let v=0;v/g,"%3E").replace(/\s+/g," ")}function mk(e){return"data:image/svg+xml,"+hk(e)}function gk(e){return'url("'+mk(e)+'")'}const vk={display:"inline-block"},F2={"background-color":"currentColor"},b8={"background-color":"transparent"},g4={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},v4={"-webkit-mask":F2,mask:F2,background:b8};for(const e in v4){const t=v4[e];for(const n in g4)t[e+"-"+n]=g4[n]}function b4(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function bk(e,t,n,r){const o=t.customisations,s=I1(n,o),a=s.attributes,l=e[ks],i=p8(s.body,Yt(at({},a),{width:n.width+"",height:n.height+""})),c=h8(t.icon),u=m8(e,c,new Set(l&&l.addedClasses)),d=gk(i),p=at(at({"--svg":d,width:b4(a.width),height:b4(a.height)},vk),r?F2:b8);o.inline&&(p["vertical-align"]="-0.125em");const C=g8(e,p,l&&l.addedStyles),v=Yt(at({},t),{status:"loaded",addedClasses:u,addedStyles:C});return e[ks]=v,e}let nu=!1;function yk(){nu||(nu=!0,setTimeout(()=>{nu&&(nu=!1,_i())}))}function _i(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:a,prefix:l,name:i}=o,c=ko(a,l),u=c.icons[i];if(u)return{status:"loaded",icon:u};if(c.missing.has(i))return{status:"missing"};if(s&&!qL(o)){const d=n[a]||(n[a]=Object.create(null));(d[l]||(d[l]=new Set)).add(i)}return{status:"loading"}}(e?[e]:_c()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let a=!1,l=!1;function i(c,u,d){if(l||(l=!0,N2(o)),c.tagName.toUpperCase()!=="SVG"){const p=u.mode,C=p==="mask"||(p==="bg"?!1:p==="style"?d.body.indexOf("currentColor")!==-1:null);if(typeof C=="boolean"){bk(c,u,at(at({},Ec),d),C);return}}v8(c,u,d)}dk(s).forEach(({node:c,props:u})=>{const d=c[ks];if(!d){const{status:C,icon:v}=r(u.icon,!0);if(v){i(c,u,v);return}a=a||C==="loading",c[ks]=Yt(at({},u),{status:C});return}let p;if(nk(d,u)){if(p=r(u.icon,d.name!==u.name),!p.icon){a=a||p.status==="loading",Object.assign(d,Yt(at({},u),{status:p.status}));return}}else{if(d.status!=="loading")return;if(p=r(u.icon,!1),!p.icon){d.status=p.status;return}}i(c,u,p.icon)}),o.temporary&&!a?f8(s):t&&a?d8(s,!0):l&&o.observer&&$2(o)});for(const o in n){const s=n[o];for(const a in s){const l=s[a];K0(Array.from(l).map(i=>({provider:o,prefix:a,name:i})),yk)}}}function xk(e){const t=Sc(e);t?_i(t):_i({node:e,temporary:!0},!0)}function y8(e,t,n=!1){const r=wc(e);if(!r)return null;const o=zi(e),s=a8(N1,t||{}),a=v8(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?a.outerHTML:a}function Ck(){return"3.1.1"}function Ek(e,t){return y8(e,t,!1)}function wk(e,t){return y8(e,t,!0)}function Sk(e,t){const n=wc(e);if(!n)return null;const r=a8(N1,t||{});return I1(n,r)}function _k(e){e?xk(e):_i()}if(typeof document!="undefined"&&typeof window!="undefined"){ZL();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||zv(r)}catch(o){}})}setTimeout(()=>{QL(_i),_i()})}function Ok(e,t){e8(e,t!==!1)}function Tk(e){e8(e,!0)}t8("",IL);if(typeof document!="undefined"&&typeof window!="undefined"){Qv();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;n8(n,o)}catch(o){}}}}const Mk={getAPIConfig:P1,setAPIModule:t8,sendAPIQuery:s8,setFetch:OL,getFetch:TL,listAPIProviders:SL},B2={_api:Mk,addAPIProvider:n8,loadIcons:K0,loadIcon:GL,iconExists:hL,getIcon:mL,listIcons:fL,addIcon:Wv,addCollection:zv,replaceIDs:Gv,calculateSize:R2,buildIcon:I1,getVersion:Ck,renderSVG:Ek,renderHTML:wk,renderIcon:Sk,scan:_k,observe:d8,stopObserving:f8,pauseObserver:ek,resumeObserver:tk,enableCache:Ok,disableCache:Tk};try{self.Iconify===void 0&&(self.Iconify=B2)}catch(e){}const x8=B2.default||B2,Rk=JSON.parse('[{"prefix":"ion","width":512,"height":512,"icons":{"apps-outline":{"body":""},"arrow-down-outline":{"body":""},"arrow-up-outline":{"body":""},"at":{"body":""},"bug-outline":{"body":""},"chevron-down":{"body":""},"chevron-forward":{"body":""},"document":{"body":""},"document-lock-outline":{"body":""},"document-text-outline":{"body":""},"ellipsis-vertical":{"body":""},"git-compare-outline":{"body":""},"language":{"body":""},"layers-outline":{"body":""},"lock-closed-outline":{"body":""},"power-outline":{"body":""},"reload-sharp":{"body":""},"settings-outline":{"body":""},"tv-outline":{"body":""}}},{"prefix":"map","width":50,"height":50,"icons":{}},{"prefix":"fe","width":24,"height":24,"icons":{}},{"prefix":"et","width":32,"height":32,"icons":{}},{"prefix":"ps","width":512,"height":512,"icons":{}},{"prefix":"ls","width":717,"height":717,"icons":{"a":{"body":"","width":563,"height":671},"b":{"body":"","width":563,"height":768},"c":{"body":"","width":507,"height":671},"d":{"body":"","width":562,"height":768},"e":{"body":"","width":559,"height":671},"f":{"body":"","width":255,"height":754},"g":{"body":"","width":562,"height":881},"h":{"body":"","width":466,"height":754},"i":{"body":"","width":82,"height":690},"j":{"body":"","width":188,"height":917},"k":{"body":"","width":456,"height":754},"l":{"body":"","width":72,"height":754},"m":{"body":"","width":860,"height":654},"n":{"body":"","width":466,"height":654},"o":{"body":"","width":560,"height":654},"p":{"body":"","width":563,"height":867},"r":{"body":"","width":287,"height":654},"s":{"body":"","width":326,"height":671},"t":{"body":"","width":255,"height":754},"u":{"body":"","width":466,"height":671},"v":{"body":"","width":497,"height":667},"w":{"body":"","width":825,"height":667},"x":{"body":"","width":537,"height":654},"y":{"body":"","width":496,"height":881}}},{"prefix":"il","width":750,"height":850,"icons":{}},{"prefix":"la","width":32,"height":32,"icons":{}},{"prefix":"ep","width":1024,"height":1024,"icons":{}},{"prefix":"el","width":1200,"height":1200,"icons":{}},{"prefix":"ph","width":256,"height":256,"icons":{}},{"prefix":"clarity","width":36,"height":36,"icons":{"close-line":{"body":""},"minus-line":{"body":""},"note-edit-line":{"body":""}}},{"prefix":"ant-design","width":1024,"height":1024,"icons":{"cloud-upload-outlined":{"body":""},"delete-outlined":{"body":""},"download-outlined":{"body":""},"enter-outlined":{"body":""},"eye-outlined":{"body":""},"reload-outlined":{"body":""},"rotate-left-outlined":{"body":""},"rotate-right-outlined":{"body":""},"sync-outlined":{"body":""},"upload-outlined":{"body":""},"zoom-in-outlined":{"body":""},"zoom-out-outlined":{"body":""}}},{"prefix":"vs","width":1792,"height":1792,"icons":{}},{"prefix":"eva","width":24,"height":24,"icons":{"arrow-ios-downward-outline":{"body":""}}},{"prefix":"ri","width":24,"height":24,"icons":{"pushpin-2-fill":{"body":""},"pushpin-2-line":{"body":""}}},{"prefix":"line-md","width":24,"height":24,"icons":{"arrow-align-left":{"body":""},"arrow-close-left":{"body":""},"arrow-close-right":{"body":""}}},{"prefix":"dashicons","width":20,"height":20,"icons":{"align-center":{"body":""}}},{"prefix":"codicon","icons":{"screen-full":{"body":""},"screen-normal":{"body":""}}},{"prefix":"simple-icons","width":24,"height":24,"icons":{}},{"prefix":"mdi","width":24,"height":24,"icons":{"form-select":{"body":""},"keyboard-esc":{"body":""}}},{"prefix":"flag","width":512,"height":512,"icons":{}},{"prefix":"ic","width":24,"height":24,"icons":{}},{"prefix":"prime","width":24,"height":24,"icons":{}},{"prefix":"carbon","width":32,"height":32,"icons":{"cloud-upload":{"body":""},"user-role":{"body":""}}},{"prefix":"bi","icons":{"eye":{"body":""}}},{"prefix":"bx","width":24,"height":24,"icons":{"bx-home":{"body":""}}},{"prefix":"vaadin","icons":{"arrows-long-h":{"body":""},"arrows-long-v":{"body":""}}}]');Rk.forEach(e=>x8.addCollection(e));/*! +*/const Vv=Object.freeze({left:0,top:0,width:16,height:16}),Ku=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ec=Object.freeze(at(at({},Vv),Ku)),M2=Object.freeze(Yt(at({},Ec),{body:"",hidden:!1}));function aL(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function c4(e,t){const n=aL(e,t);for(const r in M2)r in Ku?r in e&&!(r in n)&&(n[r]=Ku[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function iL(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=r[a]&&r[a].parent,i=l&&s(l);i&&(o[a]=[l].concat(i))}return o[a]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function lL(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function a(l){s=c4(r[l]||o[l],s)}return a(t),n.forEach(a),c4(e,s)}function Hv(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=iL(e);for(const o in r){const s=r[o];s&&(t(o,lL(e,o,s)),n.push(o))}return n}const Rl=/^[a-z0-9]+(-[a-z0-9]+)*$/,zi=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),i=o.pop(),c={provider:o.length>0?o[0]:r,prefix:i,name:l};return t&&!Tu(c)?null:c}const s=o[0],a=s.split("-");if(a.length>1){const l={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Tu(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:s};return t&&!Tu(l,n)?null:l}return null},Tu=(e,t)=>e?!!((e.provider===""||e.provider.match(Rl))&&(t&&e.prefix===""||e.prefix.match(Rl))&&e.name.match(Rl)):!1,cL=at({provider:"",aliases:{},not_found:{}},Vv);function nf(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function jv(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!nf(e,cL))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(Rl)||typeof s.body!="string"||!nf(s,M2))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],a=s.parent;if(!o.match(Rl)||typeof a!="string"||!n[a]&&!r[a]||!nf(s,M2))return null}return t}const Xu=Object.create(null);function uL(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ko(e,t){const n=Xu[e]||(Xu[e]=Object.create(null));return n[t]||(n[t]=uL(e,t))}function q0(e,t){return jv(t)?Hv(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function dL(e,t,n){try{if(typeof n.body=="string")return e.icons[t]=at({},n),!0}catch(r){}return!1}function fL(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Xu)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Xu[o]||{})).forEach(a=>{const l=ko(o,a);n=n.concat(Object.keys(l.icons).map(i=>(o!==""?"@"+o+":":"")+a+":"+i))})}),n}let lc=!1;function pL(e){return typeof e=="boolean"&&(lc=e),lc}function wc(e){const t=typeof e=="string"?zi(e,!0,lc):e;if(t){const n=ko(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Wv(e,t){const n=zi(e,!0,lc);if(!n)return!1;const r=ko(n.provider,n.prefix);return dL(r,n.name,t)}function zv(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),lc&&!t&&!e.prefix){let o=!1;return jv(e)&&(e.prefix="",Hv(e,(s,a)=>{a&&Wv(s,a)&&(o=!0)})),o}const n=e.prefix;if(!Tu({provider:t,prefix:n,name:"a"}))return!1;const r=ko(t,n);return!!q0(r,e)}function hL(e){return!!wc(e)}function mL(e){const t=wc(e);return t?at(at({},Ec),t):null}const Uv=Object.freeze({width:null,height:null}),qv=Object.freeze(at(at({},Uv),Ku)),gL=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vL=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function R2(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(gL);if(r===null||!r.length)return e;const o=[];let s=r.shift(),a=vL.test(s);for(;;){if(a){const l=parseFloat(s);isNaN(l)?o.push(s):o.push(Math.ceil(l*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");a=!a}}const bL=e=>e==="unset"||e==="undefined"||e==="none";function I1(e,t){const n=at(at({},Ec),e),r=at(at({},qv),t),o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(v=>{const b=[],S=v.hFlip,E=v.vFlip;let x=v.rotate;S?E?x+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):E&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let h;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:h=o.height/2+o.top,b.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:h=o.width/2+o.left,b.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}x%2===1&&(o.left!==o.top&&(h=o.left,o.left=o.top,o.top=h),o.width!==o.height&&(h=o.width,o.width=o.height,o.height=h)),b.length&&(s=''+s+"")});const a=r.width,l=r.height,i=o.width,c=o.height;let u,d;a===null?(d=l===null?"1em":l==="auto"?c:l,u=R2(d,i/c)):(u=a==="auto"?i:a,d=l===null?R2(u,c/i):l==="auto"?c:l);const p={},C=(v,b)=>{bL(b)||(p[v]=b.toString())};return C("width",u),C("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+i.toString()+" "+c.toString(),{attributes:p,body:s}}const yL=/\sid="(\S+)"/g,xL="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let CL=0;function Gv(e,t=xL){const n=[];let r;for(;r=yL.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(CL++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ya={local:!0,session:!0},Zv={local:new Set,session:new Set};let G0=!1;function EL(e){G0=e}const u4="iconify2",cc="iconify",Yv=cc+"-count",d4=cc+"-version",Kv=36e5,wL=168;function L2(e,t){try{return e.getItem(t)}catch(n){}}function Z0(e,t,n){try{return e.setItem(t,n),!0}catch(r){}}function f4(e,t){try{e.removeItem(t)}catch(n){}}function k2(e,t){return Z0(e,Yv,t.toString())}function A2(e){return parseInt(L2(e,Yv))||0}let tu=typeof window=="undefined"?{}:window;function Xv(e){const t=e+"Storage";try{if(tu&&tu[t]&&typeof tu[t].length=="number")return tu[t]}catch(n){}ya[e]=!1}function Jv(e,t){const n=Xv(e);if(!n)return;const r=L2(n,d4);if(r!==u4){if(r){const l=A2(n);for(let i=0;i{const i=cc+l.toString(),c=L2(n,i);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch(u){}f4(n,i)}};let a=A2(n);for(let l=a-1;l>=0;l--)s(l)||(l===a-1?(a--,k2(n,a)):Zv[e].add(l))}function Qv(){if(!G0){EL(!0);for(const e in ya)Jv(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=ko(r,o);if(!q0(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function e8(e,t){switch(e){case"local":case"session":ya[e]=t;break;case"all":for(const n in ya)ya[n]=t;break}}const I2=Object.create(null);function t8(e,t){I2[e]=t}function D2(e){return I2[e]||I2[""]}function Y0(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const D1=Object.create(null),dl=["https://api.simplesvg.com","https://api.unisvg.com"],Mu=[];for(;dl.length>0;)dl.length===1||Math.random()>.5?Mu.push(dl.shift()):Mu.push(dl.pop());D1[""]=Y0({resources:["https://api.iconify.design"].concat(Mu)});function n8(e,t){const n=Y0(t);return n===null?!1:(D1[e]=n,!0)}function P1(e){return D1[e]}function SL(){return Object.keys(D1)}const _L=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}};let Ju=_L();function OL(e){Ju=e}function TL(){return Ju}function ML(e,t){const n=P1(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function RL(e){return e===404}const LL=(e,t,n)=>{const r=[],o=ML(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},l=0;return n.forEach((i,c)=>{l+=i.length+1,l>=o&&c>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},l=i.length),a.icons.push(i)}),r.push(a),r};function kL(e){if(typeof e=="string"){const t=P1(e);if(t)return t.path}return"/"}const AL=(e,t,n)=>{if(!Ju){n("abort",424);return}let r=kL(t.provider);switch(t.type){case"icons":{const s=t.prefix,l=t.icons.join(","),i=new URLSearchParams({icons:l});r+=s+".json?"+i.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;Ju(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(RL(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},IL={prepare:LL,send:AL};function DL(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,a=o.prefix,l=o.name,i=n[s]||(n[s]=Object.create(null)),c=i[a]||(i[a]=ko(s,a));let u;l in c.icons?u=t.loaded:a===""||c.missing.has(l)?u=t.missing:u=t.pending;const d={provider:s,prefix:a,name:l};u.push(d)}),t}function r8(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function PL(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(i=>{if(i.prefix!==o)return!0;const c=i.name;if(e.icons[c])a.loaded.push({provider:r,prefix:o,name:c});else if(e.missing.has(c))a.missing.push({provider:r,prefix:o,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||r8([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let NL=0;function $L(e,t,n){const r=NL++,o=r8.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function FL(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?zi(o,t,n):o;s&&r.push(s)}),r}var BL={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function VL(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let T=e.resources.slice(0);for(a=[];T.length>1;){const M=Math.floor(Math.random()*T.length);a.push(T[M]),T=T.slice(0,M).concat(T.slice(M+1))}a=a.concat(T)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let i="pending",c=0,u,d=null,p=[],C=[];typeof r=="function"&&C.push(r);function v(){d&&(clearTimeout(d),d=null)}function b(){i==="pending"&&(i="aborted"),v(),p.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),p=[]}function S(T,M){M&&(C=[]),typeof T=="function"&&C.push(T)}function E(){return{startTime:l,payload:t,status:i,queriesSent:c,queriesPending:p.length,subscribe:S,abort:b}}function x(){i="failed",C.forEach(T=>{T(void 0,u)})}function h(){p.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),p=[]}function y(T,M,R){const A=M!=="success";switch(p=p.filter(P=>P!==T),i){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if(M==="abort"){u=R,x();return}if(A){u=R,p.length||(a.length?O():x());return}if(v(),h(),!e.random){const P=e.resources.indexOf(T.resource);P!==-1&&P!==e.index&&(e.index=P)}i="completed",C.forEach(P=>{P(R)})}function O(){if(i!=="pending")return;v();const T=a.shift();if(T===void 0){if(p.length){d=setTimeout(()=>{v(),i==="pending"&&(h(),x())},e.timeout);return}x();return}const M={status:"pending",resource:T,callback:(R,A)=>{y(M,R,A)}};p.push(M),c++,d=setTimeout(O,e.rotate),n(T,t,M.callback)}return setTimeout(O),E}function o8(e){const t=at(at({},BL),e);let n=[];function r(){n=n.filter(l=>l().status==="pending")}function o(l,i,c){const u=VL(t,l,i,(d,p)=>{r(),c&&c(d,p)});return n.push(u),u}function s(l){return n.find(i=>l(i))||null}return{query:o,find:s,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:r}}function p4(){}const rf=Object.create(null);function HL(e){if(!rf[e]){const t=P1(e);if(!t)return;const n=o8(t),r={config:t,redundancy:n};rf[e]=r}return rf[e]}function s8(e,t,n){let r,o;if(typeof e=="string"){const s=D2(e);if(!s)return n(void 0,424),p4;o=s.send;const a=HL(e);a&&(r=a.redundancy)}else{const s=Y0(e);if(s){r=o8(s);const a=e.resources?e.resources[0]:"",l=D2(a);l&&(o=l.send)}}return!r||!o?(n(void 0,424),p4):r.query(t,o,n)().abort}function jL(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in ya)Jv(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function WL(e,t){G0||Qv();function n(r){let o;if(!ya[r]||!(o=Xv(r)))return;const s=Zv[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=A2(o),!k2(o,a+1))return;const l={cached:Math.floor(Date.now()/Kv),provider:e.provider,data:t};return Z0(o,cc+a.toString(),JSON.stringify(l))}t.lastModified&&!jL(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function h4(){}function zL(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,PL(e)}))}function UL(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=D2(n)))return;s.prepare(n,r,o).forEach(l=>{s8(n,l,i=>{if(typeof i!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=q0(e,i);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),WL(e,i)}catch(c){}zL(e)})})}))}const qL=e=>{const n=ko(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},K0=(e,t)=>{const n=FL(e,!0,pL()),r=DL(n);if(!r.pending.length){let i=!0;return t&&setTimeout(()=>{i&&t(r.loaded,r.missing,r.pending,h4)}),()=>{i=!1}}const o=Object.create(null),s=[];let a,l;return r.pending.forEach(i=>{const{provider:c,prefix:u}=i;if(u===l&&c===a)return;a=c,l=u,s.push(ko(c,u));const d=o[c]||(o[c]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(i=>{const{provider:c,prefix:u,name:d}=i,p=ko(c,u),C=p.pendingIcons||(p.pendingIcons=new Set);C.has(d)||(C.add(d),o[c][u].push(d))}),s.forEach(i=>{const{provider:c,prefix:u}=i;o[c][u].length&&UL(i,o[c][u])}),t?$L(t,r,s):h4},GL=e=>new Promise((t,n)=>{const r=typeof e=="string"?zi(e,!0):e;if(!r){n(e);return}K0([r||e],o=>{if(o.length&&r){const s=wc(r);if(s){t(at(at({},Ec),s));return}}n(e)})});function a8(e,t){const n=at({},e);for(const r in t){const o=t[r],s=typeof o;r in Uv?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const N1=Yt(at({},qv),{inline:!1}),of="iconify",P2="iconify-inline",ks="iconifyData"+Date.now();let ka=[];function Sc(e){for(let t=0;tdocument.documentElement})}function YL(e){ka=ka.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function _c(){return ka}function KL(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Ll=null;const XL={childList:!0,subtree:!0,attributes:!0};function l8(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Ll&&Ll(e)}))}function JL(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r0||o.type==="attributes"&&o.target[ks]!==void 0){n.paused||l8(e);return}}}function c8(e,t){e.observer.instance.observe(t,XL)}function Qu(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(JL.bind(null,e)),c8(e,n),t.paused||l8(e))}function m4(){_c().forEach(Qu)}function u8(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function QL(e){const t=Ll!==null;if(Ll!==e&&(Ll=e,t&&_c().forEach(u8)),t){m4();return}KL(m4)}function N2(e){(e?[e]:_c()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function ek(e){if(e){const t=Sc(e);t&&N2(t)}else N2()}function $2(e){(e?[e]:_c()).forEach(t=>{if(!t.observer){Qu(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?c8(t,r):Qu(t);else return}})}function tk(e){if(e){const t=Sc(e);t&&$2(t)}else $2()}function d8(e,t=!1){const n=i8(e,t);return Qu(n),n}function f8(e){const t=Sc(e);t&&(u8(t),YL(e))}function nk(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in N1)if(n[o]!==r[o])return!0;return!1}function rk(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const ok=/[\s,]+/;function sk(e,t){t.split(ok).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ak=["width","height"],ik=["inline","hFlip","vFlip"];function lk(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ck(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&zi(t,!0);if(!n)return null;const r=Yt(at({},N1),{inline:e.classList&&e.classList.contains(P2)});ak.forEach(l=>{const i=e.getAttribute("data-"+l);i&&(r[l]=i)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=rk(o));const s=e.getAttribute("data-flip");typeof s=="string"&&sk(r,s),ik.forEach(l=>{const i="data-"+l,c=lk(e.getAttribute(i),i);typeof c=="boolean"&&(r[l]=c)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const uk="svg."+of+", i."+of+", span."+of+", i."+P2+", span."+P2;function dk(e){const t=[];return e.querySelectorAll(uk).forEach(n=>{const r=n[ks]||n.tagName.toLowerCase()!=="svg"?ck(n):null;r&&t.push({node:n,props:r})}),t}function p8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}let kl;function fk(){try{kl=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){kl=null}}function pk(e){return kl===void 0&&fk(),kl?kl.createHTML(e):e}function h8(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function m8(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(l=>{o.add(l)})}const s=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&s.push(a):(o.add(a),s.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),s}function g8(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function v8(e,t,n){let r;try{r=document.createElement("span")}catch(v){return e}const o=t.customisations,s=I1(n,o),a=e[ks],l=p8(Gv(s.body),at({"aria-hidden":"true",role:"img"},s.attributes));r.innerHTML=pk(l);const i=r.childNodes[0],c=e.attributes;for(let v=0;v/g,"%3E").replace(/\s+/g," ")}function mk(e){return"data:image/svg+xml,"+hk(e)}function gk(e){return'url("'+mk(e)+'")'}const vk={display:"inline-block"},F2={"background-color":"currentColor"},b8={"background-color":"transparent"},g4={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},v4={"-webkit-mask":F2,mask:F2,background:b8};for(const e in v4){const t=v4[e];for(const n in g4)t[e+"-"+n]=g4[n]}function b4(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function bk(e,t,n,r){const o=t.customisations,s=I1(n,o),a=s.attributes,l=e[ks],i=p8(s.body,Yt(at({},a),{width:n.width+"",height:n.height+""})),c=h8(t.icon),u=m8(e,c,new Set(l&&l.addedClasses)),d=gk(i),p=at(at({"--svg":d,width:b4(a.width),height:b4(a.height)},vk),r?F2:b8);o.inline&&(p["vertical-align"]="-0.125em");const C=g8(e,p,l&&l.addedStyles),v=Yt(at({},t),{status:"loaded",addedClasses:u,addedStyles:C});return e[ks]=v,e}let nu=!1;function yk(){nu||(nu=!0,setTimeout(()=>{nu&&(nu=!1,_i())}))}function _i(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:a,prefix:l,name:i}=o,c=ko(a,l),u=c.icons[i];if(u)return{status:"loaded",icon:u};if(c.missing.has(i))return{status:"missing"};if(s&&!qL(o)){const d=n[a]||(n[a]=Object.create(null));(d[l]||(d[l]=new Set)).add(i)}return{status:"loading"}}(e?[e]:_c()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let a=!1,l=!1;function i(c,u,d){if(l||(l=!0,N2(o)),c.tagName.toUpperCase()!=="SVG"){const p=u.mode,C=p==="mask"||(p==="bg"?!1:p==="style"?d.body.indexOf("currentColor")!==-1:null);if(typeof C=="boolean"){bk(c,u,at(at({},Ec),d),C);return}}v8(c,u,d)}dk(s).forEach(({node:c,props:u})=>{const d=c[ks];if(!d){const{status:C,icon:v}=r(u.icon,!0);if(v){i(c,u,v);return}a=a||C==="loading",c[ks]=Yt(at({},u),{status:C});return}let p;if(nk(d,u)){if(p=r(u.icon,d.name!==u.name),!p.icon){a=a||p.status==="loading",Object.assign(d,Yt(at({},u),{status:p.status}));return}}else{if(d.status!=="loading")return;if(p=r(u.icon,!1),!p.icon){d.status=p.status;return}}i(c,u,p.icon)}),o.temporary&&!a?f8(s):t&&a?d8(s,!0):l&&o.observer&&$2(o)});for(const o in n){const s=n[o];for(const a in s){const l=s[a];K0(Array.from(l).map(i=>({provider:o,prefix:a,name:i})),yk)}}}function xk(e){const t=Sc(e);t?_i(t):_i({node:e,temporary:!0},!0)}function y8(e,t,n=!1){const r=wc(e);if(!r)return null;const o=zi(e),s=a8(N1,t||{}),a=v8(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?a.outerHTML:a}function Ck(){return"3.1.1"}function Ek(e,t){return y8(e,t,!1)}function wk(e,t){return y8(e,t,!0)}function Sk(e,t){const n=wc(e);if(!n)return null;const r=a8(N1,t||{});return I1(n,r)}function _k(e){e?xk(e):_i()}if(typeof document!="undefined"&&typeof window!="undefined"){ZL();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||zv(r)}catch(o){}})}setTimeout(()=>{QL(_i),_i()})}function Ok(e,t){e8(e,t!==!1)}function Tk(e){e8(e,!0)}t8("",IL);if(typeof document!="undefined"&&typeof window!="undefined"){Qv();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;n8(n,o)}catch(o){}}}}const Mk={getAPIConfig:P1,setAPIModule:t8,sendAPIQuery:s8,setFetch:OL,getFetch:TL,listAPIProviders:SL},B2={_api:Mk,addAPIProvider:n8,loadIcons:K0,loadIcon:GL,iconExists:hL,getIcon:mL,listIcons:fL,addIcon:Wv,addCollection:zv,replaceIDs:Gv,calculateSize:R2,buildIcon:I1,getVersion:Ck,renderSVG:Ek,renderHTML:wk,renderIcon:Sk,scan:_k,observe:d8,stopObserving:f8,pauseObserver:ek,resumeObserver:tk,enableCache:Ok,disableCache:Tk};try{self.Iconify===void 0&&(self.Iconify=B2)}catch(e){}const x8=B2.default||B2,Rk=JSON.parse('[{"prefix":"ion","width":512,"height":512,"icons":{"apps-outline":{"body":""},"arrow-down-outline":{"body":""},"arrow-up-outline":{"body":""},"at":{"body":""},"bug-outline":{"body":""},"chevron-down":{"body":""},"chevron-forward":{"body":""},"document":{"body":""},"document-lock-outline":{"body":""},"document-text-outline":{"body":""},"ellipsis-vertical":{"body":""},"git-compare-outline":{"body":""},"language":{"body":""},"layers-outline":{"body":""},"lock-closed-outline":{"body":""},"power-outline":{"body":""},"reload-sharp":{"body":""},"settings-outline":{"body":""},"tv-outline":{"body":""}}},{"prefix":"bx","width":24,"height":24,"icons":{"bx-home":{"body":""}}},{"prefix":"carbon","width":32,"height":32,"icons":{"cloud-upload":{"body":""},"user-role":{"body":""}}},{"prefix":"el","width":1200,"height":1200,"icons":{}},{"prefix":"ant-design","width":1024,"height":1024,"icons":{"cloud-upload-outlined":{"body":""},"delete-outlined":{"body":""},"download-outlined":{"body":""},"enter-outlined":{"body":""},"eye-outlined":{"body":""},"reload-outlined":{"body":""},"rotate-left-outlined":{"body":""},"rotate-right-outlined":{"body":""},"sync-outlined":{"body":""},"upload-outlined":{"body":""},"zoom-in-outlined":{"body":""},"zoom-out-outlined":{"body":""}}},{"prefix":"vaadin","icons":{"arrows-long-h":{"body":""},"arrows-long-v":{"body":""}}},{"prefix":"bi","icons":{"eye":{"body":""}}},{"prefix":"ri","width":24,"height":24,"icons":{"pushpin-2-fill":{"body":""},"pushpin-2-line":{"body":""}}},{"prefix":"clarity","width":36,"height":36,"icons":{"close-line":{"body":""},"minus-line":{"body":""},"note-edit-line":{"body":""}}},{"prefix":"line-md","width":24,"height":24,"icons":{"arrow-align-left":{"body":""},"arrow-close-left":{"body":""},"arrow-close-right":{"body":""}}},{"prefix":"dashicons","width":20,"height":20,"icons":{"align-center":{"body":""}}},{"prefix":"simple-icons","width":24,"height":24,"icons":{}},{"prefix":"mdi","width":24,"height":24,"icons":{"form-select":{"body":""},"keyboard-esc":{"body":""}}},{"prefix":"map","width":50,"height":50,"icons":{}},{"prefix":"fe","width":24,"height":24,"icons":{}},{"prefix":"et","width":32,"height":32,"icons":{}},{"prefix":"ps","width":512,"height":512,"icons":{}},{"prefix":"ls","width":717,"height":717,"icons":{"a":{"body":"","width":563,"height":671},"b":{"body":"","width":563,"height":768},"c":{"body":"","width":507,"height":671},"d":{"body":"","width":562,"height":768},"e":{"body":"","width":559,"height":671},"f":{"body":"","width":255,"height":754},"g":{"body":"","width":562,"height":881},"h":{"body":"","width":466,"height":754},"i":{"body":"","width":82,"height":690},"j":{"body":"","width":188,"height":917},"k":{"body":"","width":456,"height":754},"l":{"body":"","width":72,"height":754},"m":{"body":"","width":860,"height":654},"n":{"body":"","width":466,"height":654},"o":{"body":"","width":560,"height":654},"p":{"body":"","width":563,"height":867},"r":{"body":"","width":287,"height":654},"s":{"body":"","width":326,"height":671},"t":{"body":"","width":255,"height":754},"u":{"body":"","width":466,"height":671},"v":{"body":"","width":497,"height":667},"w":{"body":"","width":825,"height":667},"x":{"body":"","width":537,"height":654},"y":{"body":"","width":496,"height":881}}},{"prefix":"il","width":750,"height":850,"icons":{}},{"prefix":"la","width":32,"height":32,"icons":{}},{"prefix":"ep","width":1024,"height":1024,"icons":{}},{"prefix":"ph","width":256,"height":256,"icons":{}},{"prefix":"vs","width":1792,"height":1792,"icons":{}},{"prefix":"eva","width":24,"height":24,"icons":{"arrow-ios-downward-outline":{"body":""}}},{"prefix":"codicon","icons":{"screen-full":{"body":""},"screen-normal":{"body":""}}},{"prefix":"flag","width":512,"height":512,"icons":{}},{"prefix":"ic","width":24,"height":24,"icons":{}},{"prefix":"prime","width":24,"height":24,"icons":{}}]');Rk.forEach(e=>x8.addCollection(e));/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. diff --git a/detect.gui/Services/DeviceClientService.cs b/detect.gui/Services/DeviceClientService.cs index b581c9e..6856ab2 100644 --- a/detect.gui/Services/DeviceClientService.cs +++ b/detect.gui/Services/DeviceClientService.cs @@ -74,13 +74,15 @@ public class DeviceClientService var eventService = Locator.Current.GetService()!; return ConnectDevice(eventService.ListById(deviceId).Result!); } - - public IDeviceClient? RefreshDeviceClientBySn(string deviceSn) + + public void RefreshDeviceClientBySn(string deviceSn) { var device = Locator.Current.GetService()!.ListBySn(deviceSn).Result!; _deviceClients.TryGetValue(device.Id!.Value, out var deviceClient); deviceClient?.DisConnectAsync(); - return ConnectDevice(device); + DeleteDeviceClientById(device.Id!.Value); + ConnectDevice(device); + Log.Information("重新连接设备【" + device.Name + "】【" + device.DeviceIp + "】"); } /// diff --git a/detect.gui/Services/OCRService.cs b/detect.gui/Services/OCRService.cs index f08dba7..183c917 100644 --- a/detect.gui/Services/OCRService.cs +++ b/detect.gui/Services/OCRService.cs @@ -86,7 +86,7 @@ public class OCRService return new ApiResponse(0, "success", result); } - public Task ImportByOCR(string base64ImageString) + public Task ImportByOCR(string base64ImageString, string? wallCode) { return Task.Run(() => { @@ -100,11 +100,29 @@ public class OCRService d.Index = index; return d; }).ToList(); - var tempList = resultList.Where(d => !string.IsNullOrEmpty(d.Text) && - (d.Text.ToUpper().Contains("PT") || - d.Text.ToUpper().Contains("VBP") || - d.Text.ToUpper().Contains("BSC"))) - .ToList(); + var items = resultList.Where(d => !string.IsNullOrEmpty(d.Text) && d.Text.ToUpper().Contains("定位信息表")).ToList(); + if (items.Any() && !string.IsNullOrEmpty(items.First().Text)) + { + wallCode = items.First().Text!.Replace("定位信息表", "").Replace("预埋件", "").Replace("墙", ""); + } + // var tempList = resultList.Where(d => !string.IsNullOrEmpty(d.Text) && + // (d.Text.ToUpper().Contains("PT") || + // d.Text.ToUpper().Contains("VBP") || + // d.Text.ToUpper().Contains("BSC"))) + // .ToList(); + var tempList = new List(); + if (wallCode != null) + { + tempList = resultList.Where(d => !string.IsNullOrEmpty(d.Text) && d.Text.ToUpper().Contains(wallCode.ToUpper())).ToList(); + } + else + { + tempList = resultList.Where(d => !string.IsNullOrEmpty(d.Text) && + (d.Text.ToUpper().Contains("P") || + d.Text.ToUpper().Contains("VB") || + d.Text.ToUpper().Contains("BS"))) + .ToList(); + } var data = new List(); foreach (var item in tempList) { @@ -122,8 +140,8 @@ public class OCRService type = type.Split("-")[0]; if (type.Contains('x', StringComparison.CurrentCultureIgnoreCase)) { - w = type.Split("x")[1]; - h = type.Split("x")[0]; + w = type.Split("x")[0]; + h = type.Split("x")[1]; } else { @@ -133,7 +151,6 @@ public class OCRService } else continue; - // } // else // { diff --git a/detect.sln.DotSettings.user b/detect.sln.DotSettings.user index ab7a4f1..280fc6b 100644 --- a/detect.sln.DotSettings.user +++ b/detect.sln.DotSettings.user @@ -7,6 +7,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded