From 9bccc99228ac12b59097250e2dad5b077fda7bdf Mon Sep 17 00:00:00 2001
From: weifashi <605403358@qq.com>
Date: Mon, 23 Oct 2023 11:47:57 +0800
Subject: [PATCH] build
---
.../{404.9b77acd3.js => 404.91d7e04d.js} | 2 +-
...itor.7e82aa03.js => AceEditor.9d71672f.js} | 2 +-
....077e97cd.js => ApproveExport.ab6e6423.js} | 2 +-
....06b7674e.js => CheckinExport.eac9ba3b.js} | 2 +-
....5bdbbc03.js => DialogWrapper.8ecc241b.js} | 2 +-
...{Drawio.b05712cf.js => Drawio.cda7ebb1.js} | 2 +-
...nt.b11379e6.js => FileContent.4319b324.js} | 2 +-
...ew.8bc390f6.js => FilePreview.fb0728a6.js} | 2 +-
...{IFrame.162cdbd3.js => IFrame.718924da.js} | 2 +-
...load.0ae472e5.js => ImgUpload.1be206fe.js} | 2 +-
...fedf89f1.js => MeetingManager.327c728a.js} | 2 +-
...Apps.3d8fcc8a.js => MicroApps.f393c42a.js} | 2 +-
...{Minder.ffbd311d.js => Minder.b742db97.js} | 2 +-
...ice.eb60ccb8.js => OnlyOffice.acc93128.js} | 2 +-
...Log.ce16c9c7.js => ProjectLog.afc456e6.js} | 2 +-
...l.a66c947f.js => ReportDetail.45cf029e.js} | 2 +-
...dit.57d614d0.js => ReportEdit.a1ca5897.js} | 2 +-
...Editor.7af59296.js => TEditor.0e72961f.js} | 2 +-
...ail.8d6fef25.js => TaskDetail.7c28be67.js} | 2 +-
...kMenu.e84f4488.js => TaskMenu.6e1fdabd.js} | 2 +-
...ect.554e5393.js => UserSelect.797d0d6f.js} | 2 +-
.../{app.00b87814.js => app.195b3d7f.js} | 6 +-
...on.e0fb2417.js => application.50d9d528.js} | 2 +-
.../{apps.3e84b0d6.js => apps.f7d276cf.js} | 2 +-
...2c1fbb.js => bn.interface.min.a6dcd2e2.js} | 2 +-
...{bn.min.cf4401fc.js => bn.min.cc13483c.js} | 2 +-
...endar.35a472d7.js => calendar.238cb51d.js} | 2 +-
...heckin.2259b9d5.js => checkin.c23df431.js} | 2 +-
...oard.fbfb9054.js => dashboard.bda0e54d.js} | 2 +-
...{delete.81c64820.js => delete.3a4dad96.js} | 2 +-
...etails.272f00cc.js => details.b96e9ee8.js} | 2 +-
...n.e8bc24bf.js => elliptic.min.cb73496a.js} | 2 +-
.../{email.f68d0bb3.js => email.8cfe6e7f.js} | 2 +-
.../{file.abd29ae6.js => file.d8dc2dde.js} | 4 +-
.../{file.f594daae.js => file.e834b605.js} | 2 +-
...ileMsg.27237244.js => fileMsg.546eb36f.js} | 2 +-
...eTask.6ae652ba.js => fileTask.2260e655.js} | 2 +-
.../{index.264d0719.js => index.313c52c0.js} | 2 +-
.../{index.dc6d1a13.js => index.47d4e1d5.js} | 2 +-
.../{index.3c217e72.js => index.9bff59db.js} | 2 +-
.../{index.d4adaac1.js => index.ce5835fb.js} | 2 +-
.../{index.e41127fb.js => index.e2abe010.js} | 2 +-
...board.d5682815.js => keyboard.63575ebc.js} | 2 +-
...guage.3d8de1e7.js => language.b4fde4c6.js} | 2 +-
...icense.c16f7251.js => license.eea2833e.js} | 2 +-
.../{login.470e0048.js => login.7da1ede2.js} | 2 +-
...{manage.5d294ba6.js => manage.5299d580.js} | 2 +-
...eeting.342e83f8.js => meeting.a7f2323a.js} | 2 +-
...nger.253c5519.js => messenger.df7f9517.js} | 2 +-
...sword.75585323.js => password.2ffa1645.js} | 2 +-
...sonal.2628b750.js => personal.ccab6539.js} | 2 +-
public/js/build/preview.07c0933a.js | 1 +
public/js/build/preview.f06f6516.js | 1 -
.../{pro.196da6c1.js => pro.33be6e96.js} | 2 +-
...roject.9c8464ae.js => project.3abcdb2d.js} | 2 +-
....8f95a60f.js => projectInvite.02dc2169.js} | 2 +-
...l.68ce455a.js => reportDetail.99a3a8b4.js} | 2 +-
...dit.4f287669.js => reportEdit.0f204856.js} | 2 +-
.../{swipe.7622ecf2.js => swipe.1e44b111.js} | 2 +-
...{system.f821ed89.js => system.b7569cb4.js} | 2 +-
.../{task.cfe97e42.js => task.fc8f90ec.js} | 2 +-
.../{theme.f390f8b6.js => theme.ef2be494.js} | 2 +-
.../{token.20223ca5.js => token.668ebd7b.js} | 2 +-
...ail.410ec82b.js => validEmail.2e7bd493.js} | 2 +-
.../{view.9e6d5e1e.js => view.662c949b.js} | 2 +-
public/manifest.json | 314 +++++++++---------
66 files changed, 224 insertions(+), 224 deletions(-)
rename public/js/build/{404.9b77acd3.js => 404.91d7e04d.js} (87%)
rename public/js/build/{AceEditor.7e82aa03.js => AceEditor.9d71672f.js} (98%)
rename public/js/build/{ApproveExport.077e97cd.js => ApproveExport.ab6e6423.js} (97%)
rename public/js/build/{CheckinExport.06b7674e.js => CheckinExport.eac9ba3b.js} (99%)
rename public/js/build/{DialogWrapper.5bdbbc03.js => DialogWrapper.8ecc241b.js} (99%)
rename public/js/build/{Drawio.b05712cf.js => Drawio.cda7ebb1.js} (93%)
rename public/js/build/{FileContent.b11379e6.js => FileContent.4319b324.js} (92%)
rename public/js/build/{FilePreview.8bc390f6.js => FilePreview.fb0728a6.js} (76%)
rename public/js/build/{IFrame.162cdbd3.js => IFrame.718924da.js} (94%)
rename public/js/build/{ImgUpload.0ae472e5.js => ImgUpload.1be206fe.js} (99%)
rename public/js/build/{MeetingManager.fedf89f1.js => MeetingManager.327c728a.js} (99%)
rename public/js/build/{MicroApps.3d8fcc8a.js => MicroApps.f393c42a.js} (94%)
rename public/js/build/{Minder.ffbd311d.js => Minder.b742db97.js} (97%)
rename public/js/build/{OnlyOffice.eb60ccb8.js => OnlyOffice.acc93128.js} (96%)
rename public/js/build/{ProjectLog.ce16c9c7.js => ProjectLog.afc456e6.js} (98%)
rename public/js/build/{ReportDetail.a66c947f.js => ReportDetail.45cf029e.js} (97%)
rename public/js/build/{ReportEdit.57d614d0.js => ReportEdit.a1ca5897.js} (94%)
rename public/js/build/{TEditor.7af59296.js => TEditor.0e72961f.js} (99%)
rename public/js/build/{TaskDetail.8d6fef25.js => TaskDetail.7c28be67.js} (99%)
rename public/js/build/{TaskMenu.e84f4488.js => TaskMenu.6e1fdabd.js} (96%)
rename public/js/build/{UserSelect.554e5393.js => UserSelect.797d0d6f.js} (99%)
rename public/js/build/{app.00b87814.js => app.195b3d7f.js} (99%)
rename public/js/build/{application.e0fb2417.js => application.50d9d528.js} (99%)
rename public/js/build/{apps.3e84b0d6.js => apps.f7d276cf.js} (65%)
rename public/js/build/{bn.interface.min.372c1fbb.js => bn.interface.min.a6dcd2e2.js} (96%)
rename public/js/build/{bn.min.cf4401fc.js => bn.min.cc13483c.js} (99%)
rename public/js/build/{calendar.35a472d7.js => calendar.238cb51d.js} (99%)
rename public/js/build/{checkin.2259b9d5.js => checkin.c23df431.js} (99%)
rename public/js/build/{dashboard.fbfb9054.js => dashboard.bda0e54d.js} (97%)
rename public/js/build/{delete.81c64820.js => delete.3a4dad96.js} (99%)
rename public/js/build/{details.272f00cc.js => details.b96e9ee8.js} (99%)
rename public/js/build/{elliptic.min.e8bc24bf.js => elliptic.min.cb73496a.js} (99%)
rename public/js/build/{email.f68d0bb3.js => email.8cfe6e7f.js} (98%)
rename public/js/build/{file.abd29ae6.js => file.d8dc2dde.js} (99%)
rename public/js/build/{file.f594daae.js => file.e834b605.js} (88%)
rename public/js/build/{fileMsg.27237244.js => fileMsg.546eb36f.js} (71%)
rename public/js/build/{fileTask.6ae652ba.js => fileTask.2260e655.js} (69%)
rename public/js/build/{index.264d0719.js => index.313c52c0.js} (99%)
rename public/js/build/{index.dc6d1a13.js => index.47d4e1d5.js} (99%)
rename public/js/build/{index.3c217e72.js => index.9bff59db.js} (94%)
rename public/js/build/{index.d4adaac1.js => index.ce5835fb.js} (98%)
rename public/js/build/{index.e41127fb.js => index.e2abe010.js} (98%)
rename public/js/build/{keyboard.d5682815.js => keyboard.63575ebc.js} (97%)
rename public/js/build/{language.3d8de1e7.js => language.b4fde4c6.js} (95%)
rename public/js/build/{license.c16f7251.js => license.eea2833e.js} (98%)
rename public/js/build/{login.470e0048.js => login.7da1ede2.js} (99%)
rename public/js/build/{manage.5d294ba6.js => manage.5299d580.js} (98%)
rename public/js/build/{meeting.342e83f8.js => meeting.a7f2323a.js} (77%)
rename public/js/build/{messenger.253c5519.js => messenger.df7f9517.js} (98%)
rename public/js/build/{password.75585323.js => password.2ffa1645.js} (97%)
rename public/js/build/{personal.2628b750.js => personal.ccab6539.js} (96%)
create mode 100644 public/js/build/preview.07c0933a.js
delete mode 100644 public/js/build/preview.f06f6516.js
rename public/js/build/{pro.196da6c1.js => pro.33be6e96.js} (85%)
rename public/js/build/{project.9c8464ae.js => project.3abcdb2d.js} (99%)
rename public/js/build/{projectInvite.8f95a60f.js => projectInvite.02dc2169.js} (96%)
rename public/js/build/{reportDetail.68ce455a.js => reportDetail.99a3a8b4.js} (85%)
rename public/js/build/{reportEdit.4f287669.js => reportEdit.0f204856.js} (86%)
rename public/js/build/{swipe.7622ecf2.js => swipe.1e44b111.js} (99%)
rename public/js/build/{system.f821ed89.js => system.b7569cb4.js} (99%)
rename public/js/build/{task.cfe97e42.js => task.fc8f90ec.js} (83%)
rename public/js/build/{theme.f390f8b6.js => theme.ef2be494.js} (96%)
rename public/js/build/{token.20223ca5.js => token.668ebd7b.js} (91%)
rename public/js/build/{validEmail.410ec82b.js => validEmail.2e7bd493.js} (95%)
rename public/js/build/{view.9e6d5e1e.js => view.662c949b.js} (98%)
diff --git a/public/js/build/404.9b77acd3.js b/public/js/build/404.91d7e04d.js
similarity index 87%
rename from public/js/build/404.9b77acd3.js
rename to public/js/build/404.91d7e04d.js
index 57e4f23c7..142aa10d5 100644
--- a/public/js/build/404.9b77acd3.js
+++ b/public/js/build/404.91d7e04d.js
@@ -1 +1 @@
-import{n}from"./app.00b87814.js";var r=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-404"},[s("div",{staticClass:"flex-center position-ref full-height"},[s("div",{staticClass:"code"},[e._v("404")]),s("div",{staticClass:"message"},[e._v("Not Found")])])])}];const i={},_={};var o=n(i,r,a,!1,c,"7d7154a8",null,null);function c(e){for(let t in _)this[t]=_[t]}var v=function(){return o.exports}();export{v as default};
+import{n}from"./app.195b3d7f.js";var r=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-404"},[s("div",{staticClass:"flex-center position-ref full-height"},[s("div",{staticClass:"code"},[e._v("404")]),s("div",{staticClass:"message"},[e._v("Not Found")])])])}];const i={},_={};var o=n(i,r,a,!1,c,"7d7154a8",null,null);function c(e){for(let t in _)this[t]=_[t]}var v=function(){return o.exports}();export{v as default};
diff --git a/public/js/build/AceEditor.7e82aa03.js b/public/js/build/AceEditor.9d71672f.js
similarity index 98%
rename from public/js/build/AceEditor.7e82aa03.js
rename to public/js/build/AceEditor.9d71672f.js
index a7feb0bee..1a57a3592 100644
--- a/public/js/build/AceEditor.7e82aa03.js
+++ b/public/js/build/AceEditor.9d71672f.js
@@ -1 +1 @@
-import{m as h,n as l}from"./app.00b87814.js";const d={name:"AceEditor",props:{value:{default:""},options:{type:Object,default:()=>({})},theme:{type:String,default:"auto"},ext:{type:String,default:"txt"},height:{type:Number||null,default:null},width:{type:Number||null,default:null},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},render(e){return e("div",{class:"no-dark-content"})},data:()=>({code:"",editor:null,cursorPosition:{row:0,column:0},supportedModes:{Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],BatchFile:["bat|cmd"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],CSharp:["cs"],CSS:["css"],Dockerfile:["^Dockerfile"],golang:["go|golang"],HTML:["html|htm|xhtml|vue|we|wpy"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSP:["jsp"],LESS:["less"],Lua:["lua"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],MySQL:["mysql"],Nginx:["nginx|conf"],INI:["ini|conf|cfg|prefs"],ObjectiveC:["m|mm"],Perl:["pl|pm"],Perl6:["p6|pl6|pm6"],pgSQL:["pgsql"],PHP_Laravel_blade:["blade.php"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Powershell:["ps1"],Python:["py"],R:["r"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SQL:["sql"],SQLServer:["sqlserver"],Swift:["swift"],Text:["txt"],Typescript:["ts|typescript|str"],VBScript:["vbs|vb"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml|plist"],YAML:["yaml|yml"],Compress:["tar|zip|7z|rar|gz|arj|z"],images:["icon|jpg|jpeg|webp|png|bmp|gif|tif|emf"]}}),mounted(){$A.loadScriptS(["js/ace/ace.js","js/ace/mode-json.js"]).then(e=>{this.setSize(this.$el,{height:this.height,width:this.width}),this.editor=window.ace.edit(this.$el,{wrap:this.wrap,showPrintMargin:!1,readOnly:this.readOnly,keyboardHandler:"vscode"}),this.editor.session.setMode(`ace/mode/${this.getFileMode()}`),this.$emit("mounted",this.editor),this.editor.session.$worker&&this.editor.session.$worker.addEventListener("annotate",this.workerMessage,!1),this.setValue(this.value),this.editor.setOptions(this.options),this.editTheme&&this.editor.setTheme(`ace/theme/${this.editTheme}`),this.editor.commands.addCommand({name:"\u4FDD\u5B58\u6587\u4EF6",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{this.$emit("saveData")},readOnly:!1}),this.editor.getSession().on("change",()=>{this.code=this.editor.getValue(),this.$emit("input",this.code)})})},methods:{workerMessage({data:e}){this.cursorPosition=this.editor.selection.getCursor();const[t]=e;t&&t.type==="error"?this.$emit("validationFailed",t):this.$emit("change",this.editor.getValue())},setSize(e,{width:t=this.width,height:s=this.height}){e.style.width=t&&typeof t=="number"?`${t}px`:"100%",e.style.height=s&&typeof s=="number"?`${s}px`:"100%",this.$nextTick(()=>this.editor&&this.editor.resize())},setValue(e){typeof e=="string"&&this.editor&&(this.editor.setValue(e),this.editor.clearSelection())},getFileMode(){var e=this.ext||"text";for(var t in this.supportedModes)for(var s=this.supportedModes[t],r=s[0].split("|"),a=t.toLowerCase(),i=0;i
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},a)}}},{title:this.$L("\u6700\u540E\u5728\u7EBF"),key:"line_at",width:168},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=s.row.identity,a=[];e.includes("admin")?a.push(t("EDropdownItem",{props:{command:"clearadmin"}},[t("div",this.$L("\u53D6\u6D88\u7BA1\u7406\u5458"))])):a.push(t("EDropdownItem",{props:{command:"setadmin"}},[t("div",this.$L("\u8BBE\u4E3A\u7BA1\u7406\u5458"))])),e.includes("temp")?a.push(t("EDropdownItem",{props:{command:"cleartemp"}},[t("div",this.$L("\u53D6\u6D88\u4E34\u65F6\u8EAB\u4EFD"))])):a.push(t("EDropdownItem",{props:{command:"settemp"}},[t("div",this.$L("\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7"))])),a.push(t("EDropdownItem",{props:{command:"email"}},[t("div",this.$L("\u4FEE\u6539\u90AE\u7BB1"))])),a.push(t("EDropdownItem",{props:{command:"password"}},[t("div",this.$L("\u4FEE\u6539\u5BC6\u7801"))])),this.checkinMac&&a.push(t("EDropdownItem",{props:{command:"checkin_mac"}},[t("div",this.$L("\u4FEE\u6539MAC"))])),a.push(t("EDropdownItem",{props:{command:"department"}},[t("div",this.$L("\u4FEE\u6539\u90E8\u95E8"))])),e.includes("disable")?a.push(t("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[t("div",this.$L("\u6062\u590D\u5E10\u53F7\uFF08\u5DF2\u79BB\u804C\uFF09"))])):a.push(t("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[t("div",this.$L("\u64CD\u4F5C\u79BB\u804C"))])),a.push(t("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[t("div",this.$L("\u5220\u9664"))]));const i=t("EDropdown",{props:{size:"small",trigger:"click"},on:{command:n=>{this.dropUser(n,s.row)}}},[t("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},this.$L("\u64CD\u4F5C")),t("EDropdownMenu",{slot:"dropdown"},[a])]);return t("TableAction",{props:{column:s.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:"12:00",value(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"17:00",value(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"18:00",value(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"19:00",value(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("\u73B0\u5728"),value(){return new Date},onClick:t=>{t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC\u5730\u5740"),key:"checkin_mac",minWidth:80,render:(t,{row:s})=>{let e=$A.cloneJSON(s.checkin_macs||[]);if(e.length===0)return t("div","-");{const a=n=>n.remark?`${n.mac} (${n.remark})`:n.mac,i=[];return i.push(t("AutoTip",a(e[0]))),e.length>1&&(e=e.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.map(n=>a(n)).join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},i)}}})},mounted(){this.getLists(),this.getDepartmentLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))},departmentSelect(){this.setPage(1)},windowPortrait:{handler(t){this.minBox=t},immediate:!0},minBox:{handler(){this.$nextTick(t=>{this.$el&&this.$el.clientWidth>0&&(this.minWidth=this.$el.clientWidth)})},immediate:!0}},computed:{departmentParentDisabled(){return!!(this.departmentData.id>0&&this.departmentList.find(({parent_id:t})=>t==this.departmentData.id))},userStyle({minWidth:t,windowPortrait:s}){const e={};return t>0&&s&&(e.minWidth=t-40+"px"),e}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="";let t=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(t=Object.assign(t,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:t,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:s})=>{this.page=s.current_page,this.total=s.total,this.list=s.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6210\u5458"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(s=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},dropUser(t,s){switch(t){case"settemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u5C06\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7\u5417\uFF1F\uFF08\u6CE8\uFF1A\u4E34\u65F6\u5E10\u53F7\u9650\u5236\u8BF7\u67E5\u770B\u7CFB\u7EDF\u8BBE\u7F6E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"cleartemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u53D6\u6D88\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u4E34\u65F6\u8EAB\u4EFD\u5417\uFF1F`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"email":$A.modalInput({title:"\u4FEE\u6539\u90AE\u7BB1",placeholder:`\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\uFF08${s.email}\uFF09`,onOk:a=>a?this.operationUser({userid:s.userid,email:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\u5730\u5740"});break;case"password":$A.modalInput({title:"\u4FEE\u6539\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801",onOk:a=>a?this.operationUser({userid:s.userid,password:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801"});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:s.userid,nickname:s.nickname,checkin_macs:s.checkin_macs},this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":let e=[];s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.owner_userid===s.userid?`${i.name} (${this.$L("\u8D1F\u8D23\u4EBA")})`:i.name)}),this.departmentEditData={type:"department",userid:s.userid,nickname:s.nickname,department:s.department.map(a=>parseInt(a))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:s.userid,nickname:s.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6062\u590D\u5DF2\u79BB\u804C\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u5417\uFF1F\uFF08\u6CE8\uFF1A\u6B64\u64CD\u4F5C\u4EC5\u6062\u590D\u5E10\u53F7\u72B6\u6001\uFF0C\u65E0\u6CD5\u6062\u590D\u64CD\u4F5C\u79BB\u804C\u65F6\u79FB\u4EA4\u7684\u6570\u636E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"delete":$A.modalInput({title:`\u5220\u9664\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011`,placeholder:"\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0",okText:"\u786E\u5B9A\u5220\u9664",onOk:a=>a?this.operationUser({userid:s.userid,type:t,delete_reason:a}):"\u5220\u9664\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});break;default:this.operationUser({userid:s.userid,type:t},!0);break}},operationUser(t,s){return new Promise((e,a)=>{t.type=="checkin_macs"?this.checkinMacEditLoading++:t.type=="department"?this.departmentEditLoading++:t.type=="setdisable"?this.disableLoading++:this.loadIng++,this.$store.dispatch("call",{url:"users/operation",data:t}).then(({msg:i})=>{$A.messageSuccess(i),this.getLists(),e(),t.type=="checkin_macs"?this.checkinMacEditShow=!1:t.type=="department"?this.departmentEditShow=!1:t.type=="setdisable"&&(this.disableShow=!1)}).catch(({msg:i})=>{s===!0&&$A.modalError(i),this.getLists(),a(i)}).finally(i=>{t.type=="checkin_macs"?this.checkinMacEditLoading--:t.type=="department"?this.departmentEditLoading--:t.type=="setdisable"?this.disableLoading--:this.loadIng--})})},getDepartmentLists(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then(({data:t})=>{this.departmentList=[],this.generateDepartmentList(t,0,1)}).finally(t=>{this.departmentLoading--})},generateDepartmentList(t,s,e){t.some(a=>{a.parent_id==s&&(this.departmentList.push(Object.assign(a,{level:e+1})),this.generateDepartmentList(t,a.id,e+1))})},onShowDepartment(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then(({msg:t})=>{$A.messageSuccess(t),this.getDepartmentLists(),this.getLists(),this.departmentShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.departmentLoading--})},onSelectDepartment(t){if(this.windowPortrait&&(this.minBox=!0),this.departmentSelect===t){this.departmentSelect=-1;return}this.departmentSelect=t},onOpDepartment(t){if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(5)));s&&this.onShowDepartment(s)}else if($A.leftExists(t,"del_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(4)));s&&$A.modalConfirm({title:this.$L("\u5220\u9664\u90E8\u95E8"),content:`
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},a)}}},{title:this.$L("\u6700\u540E\u5728\u7EBF"),key:"line_at",width:168},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=s.row.identity,a=[];e.includes("admin")?a.push(t("EDropdownItem",{props:{command:"clearadmin"}},[t("div",this.$L("\u53D6\u6D88\u7BA1\u7406\u5458"))])):a.push(t("EDropdownItem",{props:{command:"setadmin"}},[t("div",this.$L("\u8BBE\u4E3A\u7BA1\u7406\u5458"))])),e.includes("temp")?a.push(t("EDropdownItem",{props:{command:"cleartemp"}},[t("div",this.$L("\u53D6\u6D88\u4E34\u65F6\u8EAB\u4EFD"))])):a.push(t("EDropdownItem",{props:{command:"settemp"}},[t("div",this.$L("\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7"))])),a.push(t("EDropdownItem",{props:{command:"email"}},[t("div",this.$L("\u4FEE\u6539\u90AE\u7BB1"))])),a.push(t("EDropdownItem",{props:{command:"password"}},[t("div",this.$L("\u4FEE\u6539\u5BC6\u7801"))])),this.checkinMac&&a.push(t("EDropdownItem",{props:{command:"checkin_mac"}},[t("div",this.$L("\u4FEE\u6539MAC"))])),a.push(t("EDropdownItem",{props:{command:"department"}},[t("div",this.$L("\u4FEE\u6539\u90E8\u95E8"))])),e.includes("disable")?a.push(t("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[t("div",this.$L("\u6062\u590D\u5E10\u53F7\uFF08\u5DF2\u79BB\u804C\uFF09"))])):a.push(t("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[t("div",this.$L("\u64CD\u4F5C\u79BB\u804C"))])),a.push(t("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[t("div",this.$L("\u5220\u9664"))]));const i=t("EDropdown",{props:{size:"small",trigger:"click"},on:{command:n=>{this.dropUser(n,s.row)}}},[t("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},this.$L("\u64CD\u4F5C")),t("EDropdownMenu",{slot:"dropdown"},[a])]);return t("TableAction",{props:{column:s.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:"12:00",value(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"17:00",value(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"18:00",value(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"19:00",value(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("\u73B0\u5728"),value(){return new Date},onClick:t=>{t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC\u5730\u5740"),key:"checkin_mac",minWidth:80,render:(t,{row:s})=>{let e=$A.cloneJSON(s.checkin_macs||[]);if(e.length===0)return t("div","-");{const a=n=>n.remark?`${n.mac} (${n.remark})`:n.mac,i=[];return i.push(t("AutoTip",a(e[0]))),e.length>1&&(e=e.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.map(n=>a(n)).join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},i)}}})},mounted(){this.getLists(),this.getDepartmentLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))},departmentSelect(){this.setPage(1)},windowPortrait:{handler(t){this.minBox=t},immediate:!0},minBox:{handler(){this.$nextTick(t=>{this.$el&&this.$el.clientWidth>0&&(this.minWidth=this.$el.clientWidth)})},immediate:!0}},computed:{departmentParentDisabled(){return!!(this.departmentData.id>0&&this.departmentList.find(({parent_id:t})=>t==this.departmentData.id))},userStyle({minWidth:t,windowPortrait:s}){const e={};return t>0&&s&&(e.minWidth=t-40+"px"),e}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="";let t=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(t=Object.assign(t,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:t,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:s})=>{this.page=s.current_page,this.total=s.total,this.list=s.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6210\u5458"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(s=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},dropUser(t,s){switch(t){case"settemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u5C06\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7\u5417\uFF1F\uFF08\u6CE8\uFF1A\u4E34\u65F6\u5E10\u53F7\u9650\u5236\u8BF7\u67E5\u770B\u7CFB\u7EDF\u8BBE\u7F6E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"cleartemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u53D6\u6D88\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u4E34\u65F6\u8EAB\u4EFD\u5417\uFF1F`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"email":$A.modalInput({title:"\u4FEE\u6539\u90AE\u7BB1",placeholder:`\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\uFF08${s.email}\uFF09`,onOk:a=>a?this.operationUser({userid:s.userid,email:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\u5730\u5740"});break;case"password":$A.modalInput({title:"\u4FEE\u6539\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801",onOk:a=>a?this.operationUser({userid:s.userid,password:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801"});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:s.userid,nickname:s.nickname,checkin_macs:s.checkin_macs},this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":let e=[];s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.owner_userid===s.userid?`${i.name} (${this.$L("\u8D1F\u8D23\u4EBA")})`:i.name)}),this.departmentEditData={type:"department",userid:s.userid,nickname:s.nickname,department:s.department.map(a=>parseInt(a))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:s.userid,nickname:s.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6062\u590D\u5DF2\u79BB\u804C\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u5417\uFF1F\uFF08\u6CE8\uFF1A\u6B64\u64CD\u4F5C\u4EC5\u6062\u590D\u5E10\u53F7\u72B6\u6001\uFF0C\u65E0\u6CD5\u6062\u590D\u64CD\u4F5C\u79BB\u804C\u65F6\u79FB\u4EA4\u7684\u6570\u636E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"delete":$A.modalInput({title:`\u5220\u9664\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011`,placeholder:"\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0",okText:"\u786E\u5B9A\u5220\u9664",onOk:a=>a?this.operationUser({userid:s.userid,type:t,delete_reason:a}):"\u5220\u9664\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});break;default:this.operationUser({userid:s.userid,type:t},!0);break}},operationUser(t,s){return new Promise((e,a)=>{t.type=="checkin_macs"?this.checkinMacEditLoading++:t.type=="department"?this.departmentEditLoading++:t.type=="setdisable"?this.disableLoading++:this.loadIng++,this.$store.dispatch("call",{url:"users/operation",data:t}).then(({msg:i})=>{$A.messageSuccess(i),this.getLists(),e(),t.type=="checkin_macs"?this.checkinMacEditShow=!1:t.type=="department"?this.departmentEditShow=!1:t.type=="setdisable"&&(this.disableShow=!1)}).catch(({msg:i})=>{s===!0&&$A.modalError(i),this.getLists(),a(i)}).finally(i=>{t.type=="checkin_macs"?this.checkinMacEditLoading--:t.type=="department"?this.departmentEditLoading--:t.type=="setdisable"?this.disableLoading--:this.loadIng--})})},getDepartmentLists(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then(({data:t})=>{this.departmentList=[],this.generateDepartmentList(t,0,1)}).finally(t=>{this.departmentLoading--})},generateDepartmentList(t,s,e){t.some(a=>{a.parent_id==s&&(this.departmentList.push(Object.assign(a,{level:e+1})),this.generateDepartmentList(t,a.id,e+1))})},onShowDepartment(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then(({msg:t})=>{$A.messageSuccess(t),this.getDepartmentLists(),this.getLists(),this.departmentShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.departmentLoading--})},onSelectDepartment(t){if(this.windowPortrait&&(this.minBox=!0),this.departmentSelect===t){this.departmentSelect=-1;return}this.departmentSelect=t},onOpDepartment(t){if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(5)));s&&this.onShowDepartment(s)}else if($A.leftExists(t,"del_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(4)));s&&$A.modalConfirm({title:this.$L("\u5220\u9664\u90E8\u95E8"),content:`
`};Qt.fence=function(e,t,n,r,a){var l=e[t],u=l.info?zG(l.info).trim():"",c="",d="",g,f,h,p,m;return u&&(h=u.split(/(\s+)/g),c=h[0],d=h.slice(2).join("")),n.highlight?g=n.highlight(l.content,c,d)||Rn(l.content):g=Rn(l.content),g.indexOf(""+Rn(e[t].content)+`480?480:e.windowWidth-40,"max-height":e.windowHeight-180,columns:e.columns,data:e.list,loading:e.loadIng>0,"no-data-text":e.$L(e.noText),"highlight-row":"",stripe:""}}),e.total>e.pageSize?t("Page",{attrs:{total:e.total,current:e.page,"page-size":e.pageSize,disabled:e.loadIng>0,simple:!0},on:{"on-change":e.setPage,"on-page-size-change":e.setPageSize}}):e._e()],1)},u=[];const f={name:"FileHistory",props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{loadIng:0,columns:[{title:this.$L("\u65E5\u671F"),key:"created_at",width:168},{title:this.$L("\u521B\u5EFA\u4EBA"),width:120,render:(e,{row:s})=>e("UserAvatar",{props:{showName:!0,size:22,userid:s.userid}})},{title:this.$L("\u5927\u5C0F"),key:"size",width:90,render:(e,{row:s})=>e("AutoTip",$A.bytesToSize(s.size))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(e,{index:s,row:t,column:i})=>s===0&&this.page===1?e("div","-"):e("TableAction",{props:{column:i,menu:[{label:this.$L("\u67E5\u770B"),action:"preview"},{label:this.$L("\u8FD8\u539F"),action:"restore"}]},on:{action:n=>{this.onAction(n,t)}}})}],list:[],page:1,pageSize:10,total:0,noText:""}},mounted(){},watch:{value:{handler(e){e&&this.setPage(1)},immediate:!0}},computed:{fileId(){return this.file.id||0}},methods:{getLists(){this.fileId!==0&&(this.loadIng++,this.$store.dispatch("call",{url:"file/content/history",data:{id:this.fileId,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--}))},setPage(e){this.page=e,this.getLists()},setPageSize(e){this.page=1,this.pageSize=e,this.getLists()},onAction(e,s){switch(e){case"restore":this.$emit("on-restore",s);break;case"preview":const t=`/single/file/${this.fileId}?history_id=${s.id}&history_at=${s.created_at}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${this.fileId}-${s.id}`,path:t,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(this.file)+` [${s.created_at}]`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:this.file.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(this.file)+` [${s.created_at}]`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${t}`}}):window.open($A.apiUrl(`..${t}`));break}}}},o={};var p=r(f,h,u,!1,v,"6fa79072",null,null);function v(e){for(let s in o)this[s]=o[s]}var m=function(){return p.exports}(),_=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.ready?t("div",{staticClass:"file-content"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[["word","excel","ppt"].includes(e.file.type)?t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("div",{ref:"officeHeader",staticClass:"office-header",attrs:{slot:"reference"},slot:"reference"})]):t("div",{staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[e.equalContent?e._e():t("EPopover",{staticClass:"file-unsave-tip",model:{value:e.unsaveTip,callback:function(i){e.unsaveTip=i},expression:"unsaveTip"}},[t("div",{staticClass:"task-detail-delete-file-popover"},[t("p",[e._v(e._s(e.$L("\u672A\u4FDD\u5B58\u5F53\u524D\u4FEE\u6539\u5185\u5BB9\uFF1F")))]),t("div",{staticClass:"buttons"},[t("Button",{attrs:{size:"small",type:"text"},on:{click:e.unSaveGive}},[e._v(e._s(e.$L("\u653E\u5F03")))]),t("Button",{attrs:{size:"small",type:"primary"},on:{click:e.onSaveSave}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)]),t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v("["+e._s(e.$L("\u672A\u4FDD\u5B58"))+"*]")])]),e._v(" "+e._s(e.fileName)+" ")],1),t("div",{staticClass:"header-user"},[t("ul",[e._l(e.editUser,function(i,n){return n<=10?t("li",{key:n},[t("UserAvatar",{attrs:{userid:i,size:28,"border-witdh":2}})],1):e._e()}),e.editUser.length>10?t("li",{staticClass:"more",attrs:{title:e.editUser.length}},[e._v(e._s(e.editUser.length>999?"...":e.editUser.length))]):e._e()],2)]),e.file.type=="document"&&e.contentDetail&&!e.windowPortrait?t("div",{staticClass:"header-hint"},[t("ButtonGroup",{attrs:{size:"small",shape:"circle"}},[t("Button",{attrs:{type:`${e.contentDetail.type=="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("md")}}},[e._v(e._s(e.$L("MD\u7F16\u8F91\u5668")))]),t("Button",{attrs:{type:`${e.contentDetail.type!="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("text")}}},[e._v(e._s(e.$L("\u6587\u672C\u7F16\u8F91\u5668")))])],1)],1):e._e(),e.file.type=="mind"?t("div",{staticClass:"header-hint"},[e._v(" "+e._s(e.$L("\u9009\u4E2D\u8282\u70B9\uFF0C\u6309enter\u952E\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9\uFF0Ctab\u952E\u6DFB\u52A0\u5B50\u8282\u70B9"))+" ")]):e._e(),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click",transfer:""},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e(),e.file.only_view?e._e():[t("div",{staticClass:"header-icons"},[t("ETooltip",{attrs:{disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u6587\u4EF6\u94FE\u63A5")}},[t("div",{staticClass:"header-icon",on:{click:function(i){return e.handleClick("link")}}},[t("i",{staticClass:"taskfont"},[e._v("\uE785")])])]),t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("ETooltip",{ref:"historyTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.historyShow,content:e.$L("\u5386\u53F2\u7248\u672C")},slot:"reference"},[t("div",{staticClass:"header-icon"},[t("i",{staticClass:"taskfont"},[e._v("\uE71D")])])])],1)],1),e.windowPortrait&&e.file.type=="document"?[e.edit?e.edit&&e.equalContent?t("Button",{staticClass:"header-button",attrs:{size:"small"},on:{click:function(i){e.edit=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]):t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))]):t("Button",{staticClass:"header-button",attrs:{size:"small",type:"primary"},on:{click:function(i){e.edit=!0}}},[e._v(e._s(e.$L("\u7F16\u8F91")))])]:t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])]],2),t("div",{staticClass:"content-body"},[e.historyShow?t("div",{staticClass:"content-mask"}):e._e(),e.file.type=="document"?[e.contentDetail.type=="md"?[e.edit?t("MDEditor",{attrs:{height:"100%",toolbars:e.toolbars},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("MDPreview",{attrs:{initialValue:e.contentDetail.content}})]:t("TEditor",{attrs:{readOnly:!e.edit,height:"100%"},on:{editorSave:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{title:e.file.name},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e.file.type=="mind"?t("Minder",{ref:"myMind",on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{ext:e.file.ext},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{documentKey:e.documentKey},on:{"on-document-ready":function(i){return e.handleClick("officeReady")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e(),t("Modal",{attrs:{title:e.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:e.linkShow,callback:function(i){e.linkShow=i},expression:"linkShow"}},[t("div",[t("div",{staticStyle:{margin:"-10px 0 8px"}},[e._v(e._s(e.$L("\u6587\u4EF6\u540D\u79F0"))+": "+e._s(e.linkData.name))]),t("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":e.linkFocus},model:{value:e.linkData.url,callback:function(i){e.$set(e.linkData,"url",i)},expression:"linkData.url"}}),t("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[e._v(" "+e._s(e.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))+" "),t("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":e.$L("\u786E\u5B9A"),"cancel-text":e.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(i){return e.linkGet(!0)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("p",[t("strong",[e._v(e._s(e.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1),t("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"default"},on:{click:function(i){e.linkShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),t("Button",{attrs:{type:"primary",loading:e.linkLoad>0},on:{click:e.linkCopy}},[e._v(e._s(e.$L("\u590D\u5236")))])],1)])],2):e._e()},y=[];const k=()=>a(()=>import("./index.dc6d1a13.js"),["js/build/index.dc6d1a13.js","js/build/index.4d847d9e.css","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/ImgUpload.0ae472e5.js"]),$=()=>a(()=>import("./preview.f06f6516.js"),["js/build/preview.f06f6516.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css"]),w=()=>a(()=>import("./TEditor.7af59296.js"),["js/build/TEditor.7af59296.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/ImgUpload.0ae472e5.js"]),g=()=>a(()=>import("./AceEditor.7e82aa03.js"),["js/build/AceEditor.7e82aa03.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css"]),D=()=>a(()=>import("./OnlyOffice.eb60ccb8.js"),["js/build/OnlyOffice.eb60ccb8.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/IFrame.162cdbd3.js"]),C=()=>a(()=>import("./Drawio.b05712cf.js"),["js/build/Drawio.b05712cf.js","js/build/Drawio.fc5c6326.css","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/IFrame.162cdbd3.js"]),x=()=>a(()=>import("./Minder.ffbd311d.js"),["js/build/Minder.ffbd311d.js","js/build/Minder.f052977b.css","js/build/IFrame.162cdbd3.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css"]),S={name:"FileContent",components:{IFrame:d,FileHistory:m,AceEditor:g,TEditor:w,MDEditor:k,OnlyOffice:D,Drawio:C,Minder:x,MDPreview:$},props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{ready:!1,loadSave:0,loadContent:0,unsaveTip:!1,fileExt:null,contentDetail:null,contentBak:{},editUser:[],loadPreview:!0,linkShow:!1,linkData:{},linkLoad:0,historyShow:!1,officeReady:!1,edit:!1}},mounted(){this.edit=!this.windowPortrait,document.addEventListener("keydown",this.keySave),window.addEventListener("message",this.handleOfficeMessage),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(!this.equalContent)return $A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.keySave),window.removeEventListener("message",this.handleOfficeMessage)},watch:{value:{handler(e){e?(this.ready=!0,this.editUser=[this.userId],this.getContent()):(this.linkShow=!1,this.historyShow=!1,this.officeReady=!1,this.fileExt=null)},immediate:!0},historyShow(e){!e&&this.$refs.historyTip&&this.$refs.historyTip.updatePopper()},wsMsg:{handler(e){const{type:s,action:t,data:i}=e;switch(s){case"path":i.path=="/single/file/"+this.fileId&&(this.editUser=i.userids);break;case"file":t=="content"&&this.value&&i.id==this.fileId&&$A.modalConfirm({title:"\u66F4\u65B0\u63D0\u793A",content:"\u56E2\u961F\u6210\u5458\uFF08"+e.nickname+"\uFF09\u66F4\u65B0\u4E86\u5185\u5BB9\uFF0C
\u66F4\u65B0\u65F6\u95F4\uFF1A"+$A.formatDate("Y-m-d H:i:s",e.time)+"\u3002
\u70B9\u51FB\u3010\u786E\u5B9A\u3011\u52A0\u8F7D\u6700\u65B0\u5185\u5BB9\u3002",onOk:()=>{this.getContent()}});break}},deep:!0}},computed:{...c(["wsMsg"]),fileId(){return this.file.id||0},fileName(){return this.fileExt?$A.getFileName(Object.assign(this.file,{ext:this.fileExt})):$A.getFileName(this.file)},equalContent(){return this.contentBak==$A.jsonStringify(this.contentDetail)},contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:s}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${s}`)}return""},toolbars(){return this.windowPortrait?{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!1,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!1,notChecked:!1,split:!0,preview:!1,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!1,html_to_markdown:!1,custom_image:!1,custom_uploadImage:!1,custom_uploadFile:!1,custom_fullscreen:!1}:{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!0,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!0,notChecked:!0,split:!0,preview:!0,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!0,html_to_markdown:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,custom_fullscreen:!0}}},methods:{handleOfficeMessage({data:e,source:s}){if(e.source==="onlyoffice")switch(e.action){case"ready":s.postMessage("createMenu","*");break;case"link":this.handleClick("link");break;case"history":const t=this.$refs.officeHeader;t&&(t.style.top=`${e.rect.top}px`,t.style.left=`${e.rect.left}px`,t.style.width=`${e.rect.width}px`,t.style.height=`${e.rect.height}px`,t.click());break}},onFrameLoad(){this.loadPreview=!1},keySave(e){this.value&&e.keyCode===83&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.onSaveSave())},getContent(){if(this.fileId===0){this.contentDetail={},this.updateBak();return}if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file),this.updateBak();return}this.loadSave++,setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId}}).then(({data:e})=>{this.contentDetail=e.content,this.updateBak()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadSave--,this.loadContent--})},updateBak(){this.contentBak=$A.jsonStringify(this.contentDetail)},handleClick(e){switch(e){case"link":this.linkData={id:this.fileId,name:this.file.name},this.linkShow=!0,this.linkGet();break;case"saveBefore":!this.equalContent&&this.loadSave==0?this.handleClick("save"):$A.messageWarning("\u6CA1\u6709\u4EFB\u4F55\u4FEE\u6539\uFF01");break;case"save":if(this.file.only_view)return;this.updateBak(),this.loadSave++,this.$store.dispatch("call",{url:"file/content/save",method:"post",data:{id:this.fileId,content:this.contentBak}}).then(({data:s,msg:t})=>{$A.messageSuccess(t);const i={id:this.fileId,size:s.size};this.fileExt&&(i.ext=this.fileExt,this.fileExt=null),this.edit=!this.windowPortrait,this.$store.dispatch("saveFile",i)}).catch(({msg:s})=>{$A.modalError(s),this.getContent()}).finally(s=>{this.loadSave--});break;case"officeReady":this.officeReady=!0;break}},onRestoreHistory(e){this.historyShow=!1,$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6587\u4EF6\u8FD8\u539F\u81F3\u3010${e.created_at}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((s,t)=>{this.$store.dispatch("call",{url:"file/content/restore",data:{id:this.fileId,history_id:e.id}}).then(({msg:i})=>{s(i),this.contentDetail=null,this.getContent()}).catch(({msg:i})=>{t(i)})})})},linkGet(e){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:e===!0?"yes":"no"}}).then(({data:s})=>{this.linkData=Object.assign(s,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:s})=>{this.linkShow=!1,$A.modalError(s)}).finally(s=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(e=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(e=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(e=>{this.$refs.linkInput.focus({cursor:"all"})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}},unSaveGive(){this.getContent(),this.unsaveTip=!1},onSaveSave(){this.handleClick("save"),this.unsaveTip=!1},setTextType(e){this.fileExt=e,this.$set(this.contentDetail,"type",e)},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId,only_update_at:"yes"}}).then(({data:s})=>{e(`${s.id}-${$A.Time(s.update_at)}`)}).catch(()=>{e(0)})})}}},l={};var b=r(S,_,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var A=function(){return b.exports}();export{A as default};
+import{n as r,m as c,_ as a}from"./app.195b3d7f.js";import{I as d}from"./IFrame.718924da.js";var h=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"file-history"},[t("Table",{attrs:{width:e.windowWidth-40>480?480:e.windowWidth-40,"max-height":e.windowHeight-180,columns:e.columns,data:e.list,loading:e.loadIng>0,"no-data-text":e.$L(e.noText),"highlight-row":"",stripe:""}}),e.total>e.pageSize?t("Page",{attrs:{total:e.total,current:e.page,"page-size":e.pageSize,disabled:e.loadIng>0,simple:!0},on:{"on-change":e.setPage,"on-page-size-change":e.setPageSize}}):e._e()],1)},u=[];const f={name:"FileHistory",props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{loadIng:0,columns:[{title:this.$L("\u65E5\u671F"),key:"created_at",width:168},{title:this.$L("\u521B\u5EFA\u4EBA"),width:120,render:(e,{row:s})=>e("UserAvatar",{props:{showName:!0,size:22,userid:s.userid}})},{title:this.$L("\u5927\u5C0F"),key:"size",width:90,render:(e,{row:s})=>e("AutoTip",$A.bytesToSize(s.size))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(e,{index:s,row:t,column:i})=>s===0&&this.page===1?e("div","-"):e("TableAction",{props:{column:i,menu:[{label:this.$L("\u67E5\u770B"),action:"preview"},{label:this.$L("\u8FD8\u539F"),action:"restore"}]},on:{action:n=>{this.onAction(n,t)}}})}],list:[],page:1,pageSize:10,total:0,noText:""}},mounted(){},watch:{value:{handler(e){e&&this.setPage(1)},immediate:!0}},computed:{fileId(){return this.file.id||0}},methods:{getLists(){this.fileId!==0&&(this.loadIng++,this.$store.dispatch("call",{url:"file/content/history",data:{id:this.fileId,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--}))},setPage(e){this.page=e,this.getLists()},setPageSize(e){this.page=1,this.pageSize=e,this.getLists()},onAction(e,s){switch(e){case"restore":this.$emit("on-restore",s);break;case"preview":const t=`/single/file/${this.fileId}?history_id=${s.id}&history_at=${s.created_at}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${this.fileId}-${s.id}`,path:t,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(this.file)+` [${s.created_at}]`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:this.file.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(this.file)+` [${s.created_at}]`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${t}`}}):window.open($A.apiUrl(`..${t}`));break}}}},o={};var p=r(f,h,u,!1,v,"6fa79072",null,null);function v(e){for(let s in o)this[s]=o[s]}var m=function(){return p.exports}(),_=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.ready?t("div",{staticClass:"file-content"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[["word","excel","ppt"].includes(e.file.type)?t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("div",{ref:"officeHeader",staticClass:"office-header",attrs:{slot:"reference"},slot:"reference"})]):t("div",{staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[e.equalContent?e._e():t("EPopover",{staticClass:"file-unsave-tip",model:{value:e.unsaveTip,callback:function(i){e.unsaveTip=i},expression:"unsaveTip"}},[t("div",{staticClass:"task-detail-delete-file-popover"},[t("p",[e._v(e._s(e.$L("\u672A\u4FDD\u5B58\u5F53\u524D\u4FEE\u6539\u5185\u5BB9\uFF1F")))]),t("div",{staticClass:"buttons"},[t("Button",{attrs:{size:"small",type:"text"},on:{click:e.unSaveGive}},[e._v(e._s(e.$L("\u653E\u5F03")))]),t("Button",{attrs:{size:"small",type:"primary"},on:{click:e.onSaveSave}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)]),t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v("["+e._s(e.$L("\u672A\u4FDD\u5B58"))+"*]")])]),e._v(" "+e._s(e.fileName)+" ")],1),t("div",{staticClass:"header-user"},[t("ul",[e._l(e.editUser,function(i,n){return n<=10?t("li",{key:n},[t("UserAvatar",{attrs:{userid:i,size:28,"border-witdh":2}})],1):e._e()}),e.editUser.length>10?t("li",{staticClass:"more",attrs:{title:e.editUser.length}},[e._v(e._s(e.editUser.length>999?"...":e.editUser.length))]):e._e()],2)]),e.file.type=="document"&&e.contentDetail&&!e.windowPortrait?t("div",{staticClass:"header-hint"},[t("ButtonGroup",{attrs:{size:"small",shape:"circle"}},[t("Button",{attrs:{type:`${e.contentDetail.type=="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("md")}}},[e._v(e._s(e.$L("MD\u7F16\u8F91\u5668")))]),t("Button",{attrs:{type:`${e.contentDetail.type!="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("text")}}},[e._v(e._s(e.$L("\u6587\u672C\u7F16\u8F91\u5668")))])],1)],1):e._e(),e.file.type=="mind"?t("div",{staticClass:"header-hint"},[e._v(" "+e._s(e.$L("\u9009\u4E2D\u8282\u70B9\uFF0C\u6309enter\u952E\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9\uFF0Ctab\u952E\u6DFB\u52A0\u5B50\u8282\u70B9"))+" ")]):e._e(),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click",transfer:""},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e(),e.file.only_view?e._e():[t("div",{staticClass:"header-icons"},[t("ETooltip",{attrs:{disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u6587\u4EF6\u94FE\u63A5")}},[t("div",{staticClass:"header-icon",on:{click:function(i){return e.handleClick("link")}}},[t("i",{staticClass:"taskfont"},[e._v("\uE785")])])]),t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("ETooltip",{ref:"historyTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.historyShow,content:e.$L("\u5386\u53F2\u7248\u672C")},slot:"reference"},[t("div",{staticClass:"header-icon"},[t("i",{staticClass:"taskfont"},[e._v("\uE71D")])])])],1)],1),e.windowPortrait&&e.file.type=="document"?[e.edit?e.edit&&e.equalContent?t("Button",{staticClass:"header-button",attrs:{size:"small"},on:{click:function(i){e.edit=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]):t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))]):t("Button",{staticClass:"header-button",attrs:{size:"small",type:"primary"},on:{click:function(i){e.edit=!0}}},[e._v(e._s(e.$L("\u7F16\u8F91")))])]:t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])]],2),t("div",{staticClass:"content-body"},[e.historyShow?t("div",{staticClass:"content-mask"}):e._e(),e.file.type=="document"?[e.contentDetail.type=="md"?[e.edit?t("MDEditor",{attrs:{height:"100%",toolbars:e.toolbars},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("MDPreview",{attrs:{initialValue:e.contentDetail.content}})]:t("TEditor",{attrs:{readOnly:!e.edit,height:"100%"},on:{editorSave:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{title:e.file.name},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e.file.type=="mind"?t("Minder",{ref:"myMind",on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{ext:e.file.ext},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{documentKey:e.documentKey},on:{"on-document-ready":function(i){return e.handleClick("officeReady")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e(),t("Modal",{attrs:{title:e.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:e.linkShow,callback:function(i){e.linkShow=i},expression:"linkShow"}},[t("div",[t("div",{staticStyle:{margin:"-10px 0 8px"}},[e._v(e._s(e.$L("\u6587\u4EF6\u540D\u79F0"))+": "+e._s(e.linkData.name))]),t("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":e.linkFocus},model:{value:e.linkData.url,callback:function(i){e.$set(e.linkData,"url",i)},expression:"linkData.url"}}),t("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[e._v(" "+e._s(e.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))+" "),t("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":e.$L("\u786E\u5B9A"),"cancel-text":e.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(i){return e.linkGet(!0)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("p",[t("strong",[e._v(e._s(e.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1),t("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"default"},on:{click:function(i){e.linkShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),t("Button",{attrs:{type:"primary",loading:e.linkLoad>0},on:{click:e.linkCopy}},[e._v(e._s(e.$L("\u590D\u5236")))])],1)])],2):e._e()},y=[];const k=()=>a(()=>import("./index.47d4e1d5.js"),["js/build/index.47d4e1d5.js","js/build/index.4d847d9e.css","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/ImgUpload.1be206fe.js"]),$=()=>a(()=>import("./preview.07c0933a.js"),["js/build/preview.07c0933a.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css"]),w=()=>a(()=>import("./TEditor.0e72961f.js"),["js/build/TEditor.0e72961f.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/ImgUpload.1be206fe.js"]),g=()=>a(()=>import("./AceEditor.9d71672f.js"),["js/build/AceEditor.9d71672f.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css"]),D=()=>a(()=>import("./OnlyOffice.acc93128.js"),["js/build/OnlyOffice.acc93128.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/IFrame.718924da.js"]),C=()=>a(()=>import("./Drawio.cda7ebb1.js"),["js/build/Drawio.cda7ebb1.js","js/build/Drawio.fc5c6326.css","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/IFrame.718924da.js"]),x=()=>a(()=>import("./Minder.b742db97.js"),["js/build/Minder.b742db97.js","js/build/Minder.f052977b.css","js/build/IFrame.718924da.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css"]),S={name:"FileContent",components:{IFrame:d,FileHistory:m,AceEditor:g,TEditor:w,MDEditor:k,OnlyOffice:D,Drawio:C,Minder:x,MDPreview:$},props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{ready:!1,loadSave:0,loadContent:0,unsaveTip:!1,fileExt:null,contentDetail:null,contentBak:{},editUser:[],loadPreview:!0,linkShow:!1,linkData:{},linkLoad:0,historyShow:!1,officeReady:!1,edit:!1}},mounted(){this.edit=!this.windowPortrait,document.addEventListener("keydown",this.keySave),window.addEventListener("message",this.handleOfficeMessage),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(!this.equalContent)return $A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.keySave),window.removeEventListener("message",this.handleOfficeMessage)},watch:{value:{handler(e){e?(this.ready=!0,this.editUser=[this.userId],this.getContent()):(this.linkShow=!1,this.historyShow=!1,this.officeReady=!1,this.fileExt=null)},immediate:!0},historyShow(e){!e&&this.$refs.historyTip&&this.$refs.historyTip.updatePopper()},wsMsg:{handler(e){const{type:s,action:t,data:i}=e;switch(s){case"path":i.path=="/single/file/"+this.fileId&&(this.editUser=i.userids);break;case"file":t=="content"&&this.value&&i.id==this.fileId&&$A.modalConfirm({title:"\u66F4\u65B0\u63D0\u793A",content:"\u56E2\u961F\u6210\u5458\uFF08"+e.nickname+"\uFF09\u66F4\u65B0\u4E86\u5185\u5BB9\uFF0C
\u66F4\u65B0\u65F6\u95F4\uFF1A"+$A.formatDate("Y-m-d H:i:s",e.time)+"\u3002
\u70B9\u51FB\u3010\u786E\u5B9A\u3011\u52A0\u8F7D\u6700\u65B0\u5185\u5BB9\u3002",onOk:()=>{this.getContent()}});break}},deep:!0}},computed:{...c(["wsMsg"]),fileId(){return this.file.id||0},fileName(){return this.fileExt?$A.getFileName(Object.assign(this.file,{ext:this.fileExt})):$A.getFileName(this.file)},equalContent(){return this.contentBak==$A.jsonStringify(this.contentDetail)},contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:s}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${s}`)}return""},toolbars(){return this.windowPortrait?{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!1,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!1,notChecked:!1,split:!0,preview:!1,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!1,html_to_markdown:!1,custom_image:!1,custom_uploadImage:!1,custom_uploadFile:!1,custom_fullscreen:!1}:{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!0,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!0,notChecked:!0,split:!0,preview:!0,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!0,html_to_markdown:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,custom_fullscreen:!0}}},methods:{handleOfficeMessage({data:e,source:s}){if(e.source==="onlyoffice")switch(e.action){case"ready":s.postMessage("createMenu","*");break;case"link":this.handleClick("link");break;case"history":const t=this.$refs.officeHeader;t&&(t.style.top=`${e.rect.top}px`,t.style.left=`${e.rect.left}px`,t.style.width=`${e.rect.width}px`,t.style.height=`${e.rect.height}px`,t.click());break}},onFrameLoad(){this.loadPreview=!1},keySave(e){this.value&&e.keyCode===83&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.onSaveSave())},getContent(){if(this.fileId===0){this.contentDetail={},this.updateBak();return}if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file),this.updateBak();return}this.loadSave++,setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId}}).then(({data:e})=>{this.contentDetail=e.content,this.updateBak()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadSave--,this.loadContent--})},updateBak(){this.contentBak=$A.jsonStringify(this.contentDetail)},handleClick(e){switch(e){case"link":this.linkData={id:this.fileId,name:this.file.name},this.linkShow=!0,this.linkGet();break;case"saveBefore":!this.equalContent&&this.loadSave==0?this.handleClick("save"):$A.messageWarning("\u6CA1\u6709\u4EFB\u4F55\u4FEE\u6539\uFF01");break;case"save":if(this.file.only_view)return;this.updateBak(),this.loadSave++,this.$store.dispatch("call",{url:"file/content/save",method:"post",data:{id:this.fileId,content:this.contentBak}}).then(({data:s,msg:t})=>{$A.messageSuccess(t);const i={id:this.fileId,size:s.size};this.fileExt&&(i.ext=this.fileExt,this.fileExt=null),this.edit=!this.windowPortrait,this.$store.dispatch("saveFile",i)}).catch(({msg:s})=>{$A.modalError(s),this.getContent()}).finally(s=>{this.loadSave--});break;case"officeReady":this.officeReady=!0;break}},onRestoreHistory(e){this.historyShow=!1,$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6587\u4EF6\u8FD8\u539F\u81F3\u3010${e.created_at}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((s,t)=>{this.$store.dispatch("call",{url:"file/content/restore",data:{id:this.fileId,history_id:e.id}}).then(({msg:i})=>{s(i),this.contentDetail=null,this.getContent()}).catch(({msg:i})=>{t(i)})})})},linkGet(e){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:e===!0?"yes":"no"}}).then(({data:s})=>{this.linkData=Object.assign(s,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:s})=>{this.linkShow=!1,$A.modalError(s)}).finally(s=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(e=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(e=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(e=>{this.$refs.linkInput.focus({cursor:"all"})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}},unSaveGive(){this.getContent(),this.unsaveTip=!1},onSaveSave(){this.handleClick("save"),this.unsaveTip=!1},setTextType(e){this.fileExt=e,this.$set(this.contentDetail,"type",e)},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId,only_update_at:"yes"}}).then(({data:s})=>{e(`${s.id}-${$A.Time(s.update_at)}`)}).catch(()=>{e(0)})})}}},l={};var b=r(S,_,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var A=function(){return b.exports}();export{A as default};
diff --git a/public/js/build/FilePreview.8bc390f6.js b/public/js/build/FilePreview.fb0728a6.js
similarity index 76%
rename from public/js/build/FilePreview.8bc390f6.js
rename to public/js/build/FilePreview.fb0728a6.js
index 2971175df..19e9cbdf8 100644
--- a/public/js/build/FilePreview.8bc390f6.js
+++ b/public/js/build/FilePreview.fb0728a6.js
@@ -1 +1 @@
-import{n as r,_ as n}from"./app.00b87814.js";import{I as a}from"./IFrame.162cdbd3.js";var s=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"file-preview"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.headerShow&&!["word","excel","ppt"].includes(e.file.type),expression:"headerShow && !['word', 'excel', 'ppt'].includes(file.type)"}],staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[t("div",{staticClass:"title-name"},[e._v(e._s(e.$A.getFileName(e.file)))]),t("Tag",{attrs:{color:"default"}},[e._v(e._s(e.$L("\u53EA\u8BFB")))]),t("div",{staticClass:"refresh"},[e.contentLoad?t("Loading"):t("Icon",{attrs:{type:"ios-refresh"},on:{click:e.getContent}})],1)],1),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click"},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e()],1),t("div",{staticClass:"content-body"},[e.file.type=="document"?[e.contentDetail.type=="md"?t("MDPreview",{attrs:{initialValue:e.contentDetail.content}}):t("TEditor",{attrs:{value:e.contentDetail.content,height:"100%",readOnly:""}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{value:e.contentDetail,title:e.file.name,readOnly:""}}):e.file.type=="mind"?t("Minder",{ref:"myMind",attrs:{value:e.contentDetail,readOnly:""}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{value:e.contentDetail.content,ext:e.file.ext,readOnly:""}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{value:e.contentDetail,code:e.code,historyId:e.historyId,documentKey:e.documentKey,readOnly:""}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e()],2)},l=[];const d=()=>n(()=>import("./preview.f06f6516.js"),["js/build/preview.f06f6516.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css"]),c=()=>n(()=>import("./TEditor.7af59296.js"),["js/build/TEditor.7af59296.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/ImgUpload.0ae472e5.js"]),_=()=>n(()=>import("./AceEditor.7e82aa03.js"),["js/build/AceEditor.7e82aa03.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css"]),p=()=>n(()=>import("./OnlyOffice.eb60ccb8.js"),["js/build/OnlyOffice.eb60ccb8.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/IFrame.162cdbd3.js"]),u=()=>n(()=>import("./Drawio.b05712cf.js"),["js/build/Drawio.b05712cf.js","js/build/Drawio.fc5c6326.css","js/build/app.00b87814.js","js/build/app.3dbebb0c.css","js/build/IFrame.162cdbd3.js"]),h=()=>n(()=>import("./Minder.ffbd311d.js"),["js/build/Minder.ffbd311d.js","js/build/Minder.f052977b.css","js/build/IFrame.162cdbd3.js","js/build/app.00b87814.js","js/build/app.3dbebb0c.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:_,TEditor:c,MDPreview:d,OnlyOffice:p,Drawio:u,Minder:h},props:{code:{type:String,default:""},historyId:{type:Number,default:0},file:{type:Object,default:()=>({})},headerShow:{type:Boolean,default:!0}},data(){return{loadContent:0,contentDetail:null,loadPreview:!0}},watch:{"file.id":{handler(e){e&&(this.contentDetail=null,this.getContent())},immediate:!0,deep:!0}},computed:{contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:i}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${i}`)}return""}},methods:{onFrameLoad(){this.loadPreview=!1},getContent(){if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file);return}setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,history_id:this.historyId}}).then(({data:e})=>{this.contentDetail=e.content}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadContent--})},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,only_update_at:"yes"}}).then(({data:i})=>{e(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{e(0)})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}}}},o={};var f=r(v,s,l,!1,m,null,null,null);function m(e){for(let i in o)this[i]=o[i]}var D=function(){return f.exports}();export{D as default};
+import{n as r,_ as n}from"./app.195b3d7f.js";import{I as a}from"./IFrame.718924da.js";var s=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"file-preview"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.headerShow&&!["word","excel","ppt"].includes(e.file.type),expression:"headerShow && !['word', 'excel', 'ppt'].includes(file.type)"}],staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[t("div",{staticClass:"title-name"},[e._v(e._s(e.$A.getFileName(e.file)))]),t("Tag",{attrs:{color:"default"}},[e._v(e._s(e.$L("\u53EA\u8BFB")))]),t("div",{staticClass:"refresh"},[e.contentLoad?t("Loading"):t("Icon",{attrs:{type:"ios-refresh"},on:{click:e.getContent}})],1)],1),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click"},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e()],1),t("div",{staticClass:"content-body"},[e.file.type=="document"?[e.contentDetail.type=="md"?t("MDPreview",{attrs:{initialValue:e.contentDetail.content}}):t("TEditor",{attrs:{value:e.contentDetail.content,height:"100%",readOnly:""}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{value:e.contentDetail,title:e.file.name,readOnly:""}}):e.file.type=="mind"?t("Minder",{ref:"myMind",attrs:{value:e.contentDetail,readOnly:""}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{value:e.contentDetail.content,ext:e.file.ext,readOnly:""}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{value:e.contentDetail,code:e.code,historyId:e.historyId,documentKey:e.documentKey,readOnly:""}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e()],2)},l=[];const d=()=>n(()=>import("./preview.07c0933a.js"),["js/build/preview.07c0933a.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css"]),c=()=>n(()=>import("./TEditor.0e72961f.js"),["js/build/TEditor.0e72961f.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/ImgUpload.1be206fe.js"]),_=()=>n(()=>import("./AceEditor.9d71672f.js"),["js/build/AceEditor.9d71672f.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css"]),p=()=>n(()=>import("./OnlyOffice.acc93128.js"),["js/build/OnlyOffice.acc93128.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/IFrame.718924da.js"]),u=()=>n(()=>import("./Drawio.cda7ebb1.js"),["js/build/Drawio.cda7ebb1.js","js/build/Drawio.fc5c6326.css","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css","js/build/IFrame.718924da.js"]),h=()=>n(()=>import("./Minder.b742db97.js"),["js/build/Minder.b742db97.js","js/build/Minder.f052977b.css","js/build/IFrame.718924da.js","js/build/app.195b3d7f.js","js/build/app.3dbebb0c.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:_,TEditor:c,MDPreview:d,OnlyOffice:p,Drawio:u,Minder:h},props:{code:{type:String,default:""},historyId:{type:Number,default:0},file:{type:Object,default:()=>({})},headerShow:{type:Boolean,default:!0}},data(){return{loadContent:0,contentDetail:null,loadPreview:!0}},watch:{"file.id":{handler(e){e&&(this.contentDetail=null,this.getContent())},immediate:!0,deep:!0}},computed:{contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:i}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${i}`)}return""}},methods:{onFrameLoad(){this.loadPreview=!1},getContent(){if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file);return}setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,history_id:this.historyId}}).then(({data:e})=>{this.contentDetail=e.content}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadContent--})},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,only_update_at:"yes"}}).then(({data:i})=>{e(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{e(0)})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}}}},o={};var f=r(v,s,l,!1,m,null,null,null);function m(e){for(let i in o)this[i]=o[i]}var D=function(){return f.exports}();export{D as default};
diff --git a/public/js/build/IFrame.162cdbd3.js b/public/js/build/IFrame.718924da.js
similarity index 94%
rename from public/js/build/IFrame.162cdbd3.js
rename to public/js/build/IFrame.718924da.js
index 050861e00..58e0f3846 100644
--- a/public/js/build/IFrame.162cdbd3.js
+++ b/public/js/build/IFrame.718924da.js
@@ -1 +1 @@
-import{n}from"./app.00b87814.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I};
+import{n}from"./app.195b3d7f.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I};
diff --git a/public/js/build/ImgUpload.0ae472e5.js b/public/js/build/ImgUpload.1be206fe.js
similarity index 99%
rename from public/js/build/ImgUpload.0ae472e5.js
rename to public/js/build/ImgUpload.1be206fe.js
index d7a01163d..324ff7e9e 100644
--- a/public/js/build/ImgUpload.0ae472e5.js
+++ b/public/js/build/ImgUpload.1be206fe.js
@@ -1 +1 @@
-import{n as o}from"./app.00b87814.js";var r=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"common-img-update"},[t._l(t.uploadList,function(s){return t.type!=="callback"?e("div",{staticClass:"imgcomp-upload-list"},[s.status==="finished"?[e("div",{staticClass:"imgcomp-upload-img",style:{"background-image":"url("+t.__thumb(s.thumb)+")"}}),e("div",{staticClass:"imgcomp-upload-list-cover"},[e("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(a){return t.handleView(s)}}}),e("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(a){return t.handleRemove(s)}}})],1)]:[s.showProgress?e("Progress",{attrs:{percent:s.percentage,"hide-info":""}}):t._e()]],2):t._e()}),e("div",{staticClass:"add-box",class:{"callback-add-box":t.type==="callback"}},[e("div",{staticClass:"add-box-icon"},[e("Icon",{attrs:{type:"md-add",size:"32"}})],1),e("div",{staticClass:"add-box-upload"},[e("div",{staticClass:"add-box-item",on:{click:t.browsePicture}},[e("span",[t._v(t._s(t.$L("\u6D4F\u89C8"))),t.type==="callback"?e("em",[t._v(t._s(t.$L("\u56FE\u7247")))]):t._e()])]),e("div",{staticClass:"add-box-item"},[e("Upload",{ref:"upload",attrs:{name:"image",accept:"image/*",action:t.actionUrl,headers:t.uploadHeaders,data:t.uploadParams,"show-upload-list":!1,"max-size":t.maxSize,format:["jpg","jpeg","webp","gif","png"],"default-file-list":t.defaultList,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-error":t.handleError,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload,multiple:t.multiple}},[e("span",[t._v(t._s(t.$L("\u4E0A\u4F20"))),t.type==="callback"?e("em",[t._v(t._s(t.$L("\u56FE\u7247")))]):t._e()])])],1)])]),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("\u6D4F\u89C8\u56FE\u7247\u7A7A\u95F4"),width:"710"},model:{value:t.browseVisible,callback:function(s){t.browseVisible=s},expression:"browseVisible"}},[t.isLoading?e("div",{staticClass:"browse-load"},[t._v(t._s(t.$L("\u52A0\u8F7D\u4E2D...")))]):e("div",{ref:"browselistbox",staticClass:"browse-list",class:t.httpType==="input"?"browse-list-disabled":""},[t.browseList.length<=0?e("div",[t._v(t._s(t.$L("\u65E0\u5185\u5BB9")))]):t._l(t.browseList,function(s){return e("div",{staticClass:"browse-item",on:{click:function(a){return t.browseItem(s)}}},[s.active?e("Icon",{staticClass:"browse-icon",attrs:{type:"ios-checkmark-circle"}}):t._e(),e("div",{staticClass:"browse-img",style:t.browseStyle(s.thumb)}),e("div",{staticClass:"browse-title"},[t._v(t._s(s.title))])],1)})],2),e("div",{staticClass:"img-upload-foot",attrs:{slot:"footer"},slot:"footer"},[t.type!=="callback"&&t.http&&t.httpType===""?e("div",{staticClass:"img-upload-foot-input",on:{click:function(s){t.httpType="input"}}},[e("Icon",{attrs:{type:"ios-image",size:"22"}}),e("div",{staticClass:"img-upload-foot-httptitle"},[t._v(t._s(t.$L("\u81EA\u5B9A\u4E49\u56FE\u7247\u5730\u5740")))])],1):t._e(),t.type!=="callback"&&t.http&&t.httpType==="input"?e("div",{staticClass:"img-upload-foot-input"},[e("Input",{attrs:{placeholder:t.$L("\u4EE5 http:// \u6216 https:// \u5F00\u5934"),search:"","enter-button":t.$L("\u786E\u5B9A")},on:{"on-search":t.httpEnter},model:{value:t.httpValue,callback:function(s){t.httpValue=s},expression:"httpValue"}},[e("span",{staticStyle:{cursor:"pointer"},attrs:{slot:"prepend"},on:{click:function(s){t.httpType=""}},slot:"prepend"},[t._v(t._s(t.$L("\u81EA\u5B9A\u4E49\u5730\u5740"))+": ")])])],1):t._e(),t.httpType===""?e("Button",{on:{click:function(s){t.browseVisible=!1}}},[t._v(t._s(t.$L("\u5173\u95ED")))]):t._e(),t.httpType===""?e("Button",{attrs:{type:"primary"},on:{click:function(s){return t.handleCallback(!0)}}},[t._v(t._s(t.$L("\u5B8C\u6210")))]):t._e()],1)]),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("\u67E5\u770B\u56FE\u7247"),draggable:""},model:{value:t.visible,callback:function(s){t.visible=s},expression:"visible"}},[e("div",{staticStyle:{"max-height":"480px",overflow:"auto"}},[e("a",{attrs:{href:t.imgVisible,target:"_blank"}},[t.visible?e("img",{staticStyle:{"max-width":"100%","max-height":"900px",display:"block",margin:"0 auto"},attrs:{src:t.imgVisible}}):t._e()])])])],2)},n=[];const h={name:"ImgUpload",props:{value:{},num:{},width:{},height:{},whcut:{},type:{},http:{type:Boolean,default:!1},otherParams:{type:Object,default:()=>({})},uploadIng:{type:Number,default:0}},data(){return{actionUrl:$A.apiUrl("system/imgupload"),multiple:this.num>1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted(){this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);let t=$A(this.$refs.browselistbox);t.scroll(()=>{let i=t[0].scrollHeight,e=t[0].scrollTop,s=t.height();if(e+s>=i&&this.browseListNext.length>0){let a=this.browseListNext;this.browseListNext=[],this.browsePictureFor(a)}})},watch:{value(t){if(typeof t=="string"){this.$emit("input",this.initItems(t));return}t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList)},browseVisible(){this.httpType="",this.httpValue=""}},computed:{uploadHeaders(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},uploadParams(){let t={width:this.width,height:this.height,whcut:this.whcut};return Object.keys(this.otherParams).length>0?Object.assign(t,this.otherParams):t}},methods:{handleCallback(t){this.type==="callback"&&(t===!0?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):typeof t=="object"&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems(t){typeof t=="string"&&(t=[{url:t}]);let i=[];return $A.each(t,(e,s)=>{typeof s=="string"&&(s={url:s}),s.url&&(s.active=!0,s.status="finished",typeof s.path=="undefined"&&(s.path=s.url),typeof s.thumb=="undefined"&&(s.thumb=s.url),i.push(s))}),i},handleView(t){this.$store.dispatch("previewImage",t.url)},handleRemove(t){let i=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(i.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress(t,i){i._uploadIng===void 0&&(i._uploadIng=!0,this.$emit("update:uploadIng",this.uploadIng+1))},handleSuccess(t,i){this.$emit("update:uploadIng",this.uploadIng-1),t.ret===1?(i.url=t.data.url,i.path=t.data.path,i.thumb=t.data.thumb,this.handleCallback(i)):($A.noticeWarning({title:this.$L("\u4E0A\u4F20\u5931\u8D25"),desc:this.$L("\u6587\u4EF6 "+i.name+" \u4E0A\u4F20\u5931\u8D25 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError(t){$A.noticeWarning({title:this.$L("\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u4E0A\u4F20 jpg\u3001jpeg\u3001webp\u3001gif\u3001png \u683C\u5F0F\u7684\u56FE\u7247\u3002")})},handleMaxSize(t){$A.noticeWarning({title:this.$L("\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024))})},handleBeforeUpload(){let t=this.uploadList.length
"+T,ue.removeChild(ue.firstChild)}catch{oe("").html("
"+T).contents().slice(1).appendTo(ue)}return T}}):F.html(T)},Be=function(w,T,F,z,ue){return pe(w,function(ge){var Ae=typeof T=="string"?e.createElement(T):T;return me(Ae,F),z&&(typeof z!="string"&&z.nodeType?Ae.appendChild(z):typeof z=="string"&&qe(Ae,z)),ue?Ae:ge.appendChild(Ae)})},lt=function(w,T,F){return Be(e.createElement(w),w,T,F,!0)},xt=Yn.decode,O=Yn.encodeAllRaw,U=function(w,T,F){var z="",ue;z+="<"+w;for(ue in T)ta(T,ue)&&(z+=" "+ue+'="'+O(T[ue])+'"');return typeof F!="undefined"?z+">"+F+""+w+">":z+" />"},Z=function(w){var T,F=e.createElement("div"),z=e.createDocumentFragment();for(z.appendChild(F),w&&(F.innerHTML=w);T=F.firstChild;)z.appendChild(T);return z.removeChild(F),z},N=function(w,T){var F=y(w);return T?F.each(function(){for(var z;z=this.firstChild;)z.nodeType===3&&z.data.length===0?this.removeChild(z):this.parentNode.insertBefore(z,this)}).remove():F.remove(),F.length>1?F.toArray():F[0]},$=function(w){return pe(w,function(T){var F,z=T.attributes;for(F=z.length-1;F>=0;F--)T.removeAttributeNode(z.item(F))})},P=function(w){return c.parse(w)},J=function(w,T){return c.serialize(w,T)},te=function(w){var T,F;if(Yr!==xe.DOM&&e===document){if(n[w])return;n[w]=!0}F=e.getElementById("mceDefaultStyles"),F||(F=e.createElement("style"),F.id="mceDefaultStyles",F.type="text/css",T=e.getElementsByTagName("head")[0],T.firstChild?T.insertBefore(F,T.firstChild):T.appendChild(F)),F.styleSheet?F.styleSheet.cssText+=w:F.appendChild(e.createTextNode(w))},ye=function(w){w||(w=""),Y(w.split(","),function(T){a[T]=!0,s.load(T,le)})},Fe=function(w,T,F){y(w).toggleClass(T,F).each(function(){this.className===""&&oe(this).attr("class",null)})},$e=function(w,T){y(w).addClass(T)},Hn=function(w,T){Fe(w,T,!1)},ct=function(w,T){return y(w).hasClass(T)},gt=function(w){y(w).show()},Me=function(w){y(w).hide()},Ot=function(w){return y(w).css("display")==="none"},ht=function(w){return(w||"mce_")+i++},_n=function(w){var T=typeof w=="string"?g(w):w;return ae(T)?T.outerHTML:oe("").append(oe(T).clone()).html()},we=function(w,T){y(w).each(function(){try{if("outerHTML"in this){this.outerHTML=T;return}}catch{}N(oe(this).html(T),!0)})},Ee=function(w,T){var F=g(T);return pe(w,function(z){var ue=F.parentNode,ge=F.nextSibling;return ge?ue.insertBefore(z,ge):ue.appendChild(z),z})},Ue=function(w,T,F){return pe(T,function(z){return B.is(z,"array")&&(w=w.cloneNode(!0)),F&&ci(xE(z.childNodes),function(ue){w.appendChild(ue)}),z.parentNode.replaceChild(w,z)})},fn=function(w,T){var F;return w.nodeName!==T.toUpperCase()&&(F=lt(T),ci(E(w),function(z){S(F,z.nodeName,h(w,z.nodeName))}),Ue(F,w,!0)),F||w},ln=function(w,T){for(var F=w,z;F;){for(z=T;z&&F!==z;)z=z.parentNode;if(F===z)break;F=F.parentNode}return!F&&w.ownerDocument?w.ownerDocument.documentElement:F},cn=function(w){return c.toHex(B.trim(w))},hr=function(w){if(ae(w)){var T=w.nodeName.toLowerCase()==="a"&&!h(w,"href")&&h(w,"id");if(h(w,"name")||h(w,"data-mce-bookmark")||T)return!0}return!1},Hc=function(w,T){var F,z,ue=0;if(hr(w))return!1;if(w=w.firstChild,w){var ge=new Ge(w,w.parentNode),Ae=l?l.getWhiteSpaceElements():{};T=T||(l?l.getNonEmptyElements():null);do{if(F=w.nodeType,ae(w)){var br=w.getAttribute("data-mce-bogus");if(br){w=ge.next(br==="all");continue}if(z=w.nodeName.toLowerCase(),T&&T[z]){if(z==="br"){ue++,w=ge.next();continue}return!1}if(hr(w))return!1}if(F===8||F===3&&!Nr(w.nodeValue)||F===3&&w.parentNode&&Ae[w.parentNode.nodeName]&&Nr(w.nodeValue))return!1;w=ge.next()}while(w)}return ue<=1},Vc=function(){return e.createRange()},JU=function(w,T,F){var z=Vc(),ue,ge,Ae;if(w&&T)return z.setStart(w.parentNode,ya(w)),z.setEnd(T.parentNode,ya(T)),ue=z.extractContents(),z=Vc(),z.setStart(T.parentNode,ya(T)+1),z.setEnd(w.parentNode,ya(w)+1),ge=z.extractContents(),Ae=w.parentNode,Ae.insertBefore(Ls(Yr,ue),w),F?Ae.insertBefore(F,w):Ae.insertBefore(T,w),Ae.insertBefore(Ls(Yr,ge),w),N(w),F||T},BC=function(w,T,F,z){if(B.isArray(w)){for(var ue=w.length,ge=[];ue--;)ge[ue]=BC(w[ue],T,F,z);return ge}t.collect&&(w===e||w===r)&&f.push([w,T,F,z]);var Ae=v.bind(w,T,F,z||Yr);return Ae},_C=function(w,T,F){if(B.isArray(w)){for(var z=w.length,ue=[];z--;)ue[z]=_C(w[z],T,F);return ue}else{if(f.length>0&&(w===e||w===r))for(var z=f.length;z--;){var ge=f[z];w===ge[0]&&(!T||T===ge[1])&&(!F||F===ge[2])&&v.unbind(ge[0],ge[1],ge[2])}return v.unbind(w,T,F)}},e2=function(w,T,F){return v.fire(w,T,F)},DC=function(w){if(w&&ae(w)){var T=w.getAttribute("data-mce-contenteditable");return T&&T!=="inherit"?T:w.contentEditable!=="inherit"?w.contentEditable:null}else return null},t2=function(w){for(var T=x(),F=null;w&&w!==T&&(F=DC(w),F===null);w=w.parentNode);return F},n2=function(){if(f.length>0)for(var w=f.length;w--;){var T=f[w];v.unbind(T[0],T[1],T[2])}Pe(a,function(F,z){s.unload(z),delete a[z]}),Ce.setDocument&&Ce.setDocument()},r2=function(w,T){if(sf){for(;w;){if(T===w)return!0;w=w.parentNode}return!1}else return w===T||T.contains(w)},a2=function(w){return"startContainer: "+w.startContainer.nodeName+", startOffset: "+w.startOffset+", endContainer: "+w.endContainer.nodeName+", endOffset: "+w.endOffset},Yr={doc:e,settings:t,win:r,files:a,stdMode:o,boxModel:u,styleSheetLoader:s,boundEvents:f,styles:c,schema:l,events:v,isBlock:p,$:m,$$:y,root:null,clone:C,getRoot:x,getViewPort:R,getRect:M,getSize:ee,getParent:V,getParents:L,get:g,getNext:D,getPrev:j,select:fe,is:q,add:Be,create:lt,createHTML:U,createFragment:Z,remove:N,setStyle:ne,getStyle:_,setStyles:W,removeAllAttribs:$,setAttrib:S,setAttribs:me,getAttrib:h,getPos:I,parseStyle:P,serializeStyle:J,addStyle:te,loadCSS:ye,addClass:$e,removeClass:Hn,hasClass:ct,toggleClass:Fe,show:gt,hide:Me,isHidden:Ot,uniqueId:ht,setHTML:qe,getOuterHTML:_n,setOuterHTML:we,decode:xt,encode:O,insertAfter:Ee,replace:Ue,rename:fn,findCommonAncestor:ln,toHex:cn,run:pe,getAttribs:E,isEmpty:Hc,createRng:Vc,nodeIndex:ya,split:JU,bind:BC,unbind:_C,fire:e2,getContentEditable:DC,getContentEditableParent:t2,destroy:n2,isChildOf:r2,dumpRng:a2},OC=TE(c,t,X(Yr));return Yr};xe.DOM=xe(document),xe.nodeIndex=ya;var AE=xe.DOM,ff=B.each,RE=B.grep,BE=0,Qd=1,No=2,Zd=3,$n=function(){function e(t){t===void 0&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return e.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},e.prototype.loadScript=function(t,n,r){var a=AE,i,o=function(){a.remove(f),i&&(i.onerror=i.onload=i=null)},u=function(){o(),n()},s=function(){o(),Oe(r)?r():typeof console!="undefined"&&console.log&&console.log("Failed to load script: "+t)},f=a.uniqueId();i=document.createElement("script"),i.id=f,i.type="text/javascript",i.src=B._addCacheSuffix(t),this.settings.referrerPolicy&&a.setAttrib(i,"referrerpolicy",this.settings.referrerPolicy),i.onload=u,i.onerror=s,(document.getElementsByTagName("head")[0]||document.body).appendChild(i)},e.prototype.isDone=function(t){return this.states[t]===No},e.prototype.markDone=function(t){this.states[t]=No},e.prototype.add=function(t,n,r,a){var i=this.states[t];this.queue.push(t),i===void 0&&(this.states[t]=BE),n&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:n,failure:a,scope:r||this}))},e.prototype.load=function(t,n,r,a){return this.add(t,n,r,a)},e.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},e.prototype.loadQueue=function(t,n,r){this.loadScripts(this.queue,t,n,r)},e.prototype.loadScripts=function(t,n,r,a){var i=this,o=[],u=function(f,l){ff(i.scriptLoadedCallbacks[l],function(c){Oe(c[f])&&c[f].call(c.scope)}),i.scriptLoadedCallbacks[l]=void 0};i.queueLoadedCallbacks.push({success:n,failure:a,scope:r||this});var s=function(){var f=RE(t);if(t.length=0,ff(f,function(c){if(i.states[c]===No){u("success",c);return}if(i.states[c]===Zd){u("failure",c);return}i.states[c]!==Qd&&(i.states[c]=Qd,i.loading++,i.loadScript(c,function(){i.states[c]=No,i.loading--,u("success",c),s()},function(){i.states[c]=Zd,i.loading--,o.push(c),u("failure",c),s()}))}),!i.loading){var l=i.queueLoadedCallbacks.slice(0);i.queueLoadedCallbacks.length=0,ff(l,function(c){o.length===0?Oe(c.success)&&c.success.call(c.scope):Oe(c.failure)&&c.failure.call(c.scope,o)})}};s()},e.ScriptLoader=new e,e}(),dt=function(e){var t=e,n=function(){return t},r=function(a){t=a};return{get:n,set:r}},_E=function(e){return Qr(e)&&de(e,"raw")},DE=function(e){return Vt(e)&&e.length>1},vi={},lf=dt("en"),Jd=function(){return je(vi,lf.get())},OE=function(){return tv(vi,function(e){return ie({},e)})},PE=function(e){e&&lf.set(e)},IE=function(){return lf.get()},$E=function(e,t){var n=vi[e];n||(vi[e]=n={}),Pe(t,function(r,a){n[a.toLowerCase()]=r})},LE=function(e){var t=Jd().getOr({}),n=function(s){return Oe(s)?Object.prototype.toString.call(s):r(s)?"":""+s},r=function(s){return s===""||s===null||s===void 0},a=function(s){var f=n(s);return je(t,f.toLowerCase()).map(n).getOr(f)},i=function(s){return s.replace(/{context:\w+}$/,"")};if(r(e))return"";if(_E(e))return n(e.raw);if(DE(e)){var o=e.slice(1),u=a(e[0]).replace(/\{([0-9]+)\}/g,function(s,f){return de(o,f)?n(o[f]):s});return i(u)}return i(a(e))},FE=function(){return Jd().bind(function(e){return je(e,"_dir")}).exists(function(e){return e==="rtl"})},ME=function(e){return de(vi,e)},rn={getData:OE,setCode:PE,getCode:IE,add:$E,translate:LE,isRtl:FE,hasCode:ME},Rt=function(){var e=[],t={},n={},r=[],a=function(p,g){var y=ve(r,function(h){return h.name===p&&h.state===g});Y(y,function(h){return h.callback()})},i=function(p){if(n[p])return n[p].instance},o=function(p){var g;return n[p]&&(g=n[p].dependencies),g||[]},u=function(p,g){Rt.languageLoad!==!1&&m(p,function(){var y=rn.getCode(),h=","+(g||"")+",";!y||g&&h.indexOf(","+y+",")===-1||$n.ScriptLoader.add(t[p]+"/langs/"+y+".js")},"loaded")},s=function(p,g,y){var h=g;return e.push(h),n[p]={instance:h,dependencies:y},a(p,"added"),h},f=function(p){delete t[p],delete n[p]},l=function(p,g){return typeof g=="object"?g:typeof p=="string"?{prefix:"",resource:g,suffix:""}:{prefix:p.prefix,resource:g,suffix:p.suffix}},c=function(p,g){var y=t[p];Y(g,function(h){$n.ScriptLoader.add(y+"/"+h)})},v=function(p,g,y,h){var E=o(p);Y(E,function(S){var C=l(g,S);d(C.resource,C,void 0,void 0)}),y&&(h?y.call(h):y.call($n))},d=function(p,g,y,h,E){if(!t[p]){var S=typeof g=="string"?g:g.prefix+g.resource+g.suffix;S.indexOf("/")!==0&&S.indexOf("://")===-1&&(S=Rt.baseURL+"/"+S),t[p]=S.substring(0,S.lastIndexOf("/"));var C=function(){a(p,"loaded"),v(p,g,y,h)};n[p]?C():$n.ScriptLoader.add(S,C,h,E)}},m=function(p,g,y){y===void 0&&(y="added"),de(n,p)&&y==="added"||de(t,p)&&y==="loaded"?g():r.push({name:p,state:y,callback:g})};return{items:e,urls:t,lookup:n,_listeners:r,get:i,dependencies:o,requireLangPack:u,add:s,remove:f,createUrl:l,addComponents:c,load:d,waitFor:m}};Rt.languageLoad=!0,Rt.baseURL="",Rt.PluginManager=Rt(),Rt.ThemeManager=Rt();var UE=function(e){var t=dt(b.none()),n=function(){return t.get().each(e)},r=function(){n(),t.set(b.none())},a=function(){return t.get().isSome()},i=function(){return t.get()},o=function(u){n(),t.set(b.some(u))};return{clear:r,isSet:a,get:i,set:o}},Ca=function(){var e=UE(le),t=function(n){return e.get().each(n)};return ie(ie({},e),{on:t})},cf=function(e,t){var n=null,r=function(){Ka(n)||(clearTimeout(n),n=null)},a=function(){for(var i=[],o=0;o
|)<\\/"+n+`>[\r
diff --git a/public/js/build/TaskDetail.8d6fef25.js b/public/js/build/TaskDetail.7c28be67.js
similarity index 99%
rename from public/js/build/TaskDetail.8d6fef25.js
rename to public/js/build/TaskDetail.7c28be67.js
index 041fffbed..ff46dbf76 100644
--- a/public/js/build/TaskDetail.8d6fef25.js
+++ b/public/js/build/TaskDetail.7c28be67.js
@@ -1 +1 @@
-import{n as l,a as p,m as f}from"./app.00b87814.js";import{P as _,T as k}from"./ProjectLog.ce16c9c7.js";import{C as v,D as g}from"./DialogWrapper.5bdbbc03.js";import{T as b}from"./TaskMenu.e84f4488.js";import{U as D}from"./UserSelect.554e5393.js";import w from"./TEditor.7af59296.js";var C=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{staticClass:"task-exist-tips",attrs:{title:t.$L("\u8BA1\u5212\u65F6\u95F4\u51B2\u7A81\u63D0\u793A"),styles:{width:"90%",maxWidth:"550px"}},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("List",{attrs:{split:!1,size:"small"}},t._l(t.tipsTask,function(a,i){return e("ListItem",{key:i},[e("div",{staticClass:"list-content"},[e("UserAvatar",{attrs:{userid:i,size:28,"show-icon":!0,"show-name":!0,tooltipDisabled:""}}),t._l(a,function(o,n){return e("div",{key:n,staticClass:"list-task"},[e("div",{staticClass:"list-task-info"},[e("span",[t._v("["+t._s(o.project_name)+"] ")]),e("span",{attrs:{title:o.name}},[t._v(t._s(o.name))])]),e("div",{staticClass:"list-task-date"},[t._v(t._s(t.getCutTime(o)))])])})],2)])}),1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u5FFD\u7565\u5E76\u7EE7\u7EED")))])],1)],1)},y=[];const T={name:"TaskExistTips",props:{value:{type:Boolean,default:!1}},data(){return{isExist:!1,show:!1,tipsTask:[],loadIng:!1}},methods:{onAdd(){this.$emit("onAdd",{}),this.show=!1},getCutTime(t){let s=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),a="";return $A.formatDate("Y/m/d",s)==$A.formatDate("Y/m/d",e)?a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",s)==$A.formatDate("Y",e)?(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")):(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("Y/m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")),a},isExistTask({userids:t,timerange:s,taskid:e}){return this.isExist=!1,new Promise(async a=>{this.$store.dispatch("call",{url:"project/task/easylists",data:{userid:t,timerange:s,taskid:e},method:"get"}).then(({data:i})=>{if(i.data.length>0){this.show=!0;let o={};t.map(n=>{i.data.map(r=>{(r.task_user||[]).map(d=>d.owner?d.userid:0).indexOf(n)!==-1&&(o[n]||(o[n]=[]),o[n].push(r))})}),this.tipsTask=o,this.isExist=!0}a(this.isExist)})})}}},c={};var A=l(T,C,y,!1,L,null,null,null);function L(t){for(let s in c)this[s]=c[s]}var x=function(){return A.exports}(),I=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-editor",on:{click:t.onClickWrap,touchstart:t.onTouchstart}},[e("TEditor",{ref:"desc",attrs:{plugins:t.plugins,options:t.options,"option-full":t.optionFull,placeholder:t.placeholder,placeholderFull:t.placeholderFull,readOnly:t.windowTouch,readOnlyFull:!1,inline:""},on:{"on-blur":t.onBlur,"on-editor-init":t.onEditorInit,"on-transfer-change":t.onTransferChange},model:{value:t.content,callback:function(a){t.content=a},expression:"content"}}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"task-editor-operate",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(a){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(a){return t.onEditing.apply(null,arguments)}}},[t._v(t._s(t.$L("\u7F16\u8F91\u63CF\u8FF0")))]),t.operateLink?e("DropdownItem",{nativeOn:{click:function(a){return t.onLinkPreview.apply(null,arguments)}}},[t._v(t._s(t.$L("\u6253\u5F00\u94FE\u63A5")))]):t._e(),t.operateImg?e("DropdownItem",{nativeOn:{click:function(a){return t.onImagePreview.apply(null,arguments)}}},[t._v(t._s(t.$L("\u67E5\u770B\u56FE\u7247")))]):t._e()],1)],1)],1)],1)},S=[];const E={name:"TEditorTask",components:{TEditor:w},props:{value:{default:""},placeholder:{default:""},placeholderFull:{default:""}},data(){return{content:this.value,plugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],options:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | link | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|title|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",extended_valid_elements:"a[href|title|target=_blank]",toolbar:!1},optionFull:{menubar:"file edit view",valid_elements:"a[href|title|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",extended_valid_elements:"a[href|title|target=_blank]",toolbar:"uploadImages | bold italic underline | forecolor backcolor"},operateStyles:{},operateVisible:!1,operateLink:null,operateImg:null,listener:null}},mounted(){var s;let t=this.$parent.$el.parentNode;for(;t;){if((s=t.classList)!=null&&s.contains(".ivu-modal-wrap")){this.listener=t,t.addEventListener("scroll",this.onTouchstart);break}t=t.parentNode}},beforeDestroy(){var t;(t=this.listener)==null||t.removeEventListener("scroll",this.onTouchstart)},computed:{editor(){return this.$refs.desc.editor}},watch:{value(t){this.content=t},content(t){this.$emit("input",t)}},methods:{getContent(){return this.$refs.desc.getContent()},onEditing(){this.$refs.desc.onFull()},onBlur(){this.$emit("on-blur")},onEditorInit(t){this.updateTouchContent(),this.$emit("on-editor-init",t)},onTransferChange(t){t||!this.windowTouch||setTimeout(s=>{this.updateTouchContent(),this.onBlur()},100)},onClickWrap(t){!this.windowTouch||(t.stopPropagation(),this.operateVisible=!1,this.operateLink=t.target.tagName==="A"?t.target.href:null,this.operateImg=t.target.tagName==="IMG"?t.target.src:null,this.$nextTick(()=>{const s=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-s.left}px`,top:`${t.clientY-s.top}px`},this.operateVisible=!0}))},onTouchstart(){!this.windowTouch||(this.operateVisible=!1)},updateTouchContent(){!this.windowTouch||this.$nextTick(t=>{!this.editor||(this.content?(this.editor.bodyElement.removeAttribute("data-mce-placeholder"),this.editor.bodyElement.removeAttribute("aria-placeholder")):(this.editor.bodyElement.setAttribute("data-mce-placeholder",this.placeholder),this.editor.bodyElement.setAttribute("aria-placeholder",this.placeholder)),this.updateTouchLink(0))})},updateTouchLink(t){!this.windowTouch||setTimeout(s=>{!this.editor||(this.editor.bodyElement.querySelectorAll("a").forEach(e=>{e.__dataMceClick!==!0&&(e.__dataMceClick=!0,e.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),this.onClickWrap(a)}))}),t<300&&this.updateTouchLink(t+100))},t)},onLinkPreview(){this.operateLink&&window.open(this.operateLink)},onImagePreview(){const t=this.$refs.desc.getValueImages();if(t.length===0){$A.messageWarning("\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u56FE\u7247");return}let s=Math.max(0,t.findIndex(e=>e.src===this.operateImg));this.$store.dispatch("previewImage",{index:s,list:t})}}},h={};var F=l(E,I,S,!1,O,"20dab440",null,null);function O(t){for(let s in h)this[s]=h[s]}var M=function(){return F.exports}(),j=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})},P=[];const z={name:"TaskUpload",props:{maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:["jpg","jpeg","webp","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(t){return this.$emit("on-select-file",t),!1},handleClick(){this.$refs.upload.handleClick()}}},u={};var H=l(z,j,P,!1,U,null,null,null);function U(t){for(let s in u)this[s]=u[s]}var V=function(){return H.exports}(),N=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.ready&&t.taskDetail.parent_id>0?e("li",[e("div",{staticClass:"subtask-icon"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,attrs:{disabled:t.taskId===0,task:t.taskDetail,"load-status":t.taskDetail.loading===!0},on:{"on-update":t.getLogLists}})],1),t.taskDetail.flow_item_name?e("div",{staticClass:"subtask-flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),e("div",{staticClass:"subtask-name"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(a){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(a){t.$set(t.taskDetail,"name",a)},expression:"taskDetail.name"}})],1),e("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-change":t.taskTimeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}},[!t.taskDetail.complete_at&&t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?e("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v(" "+t._s(t.expiresFormat(t.taskDetail.end_at))+" ")]):e("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),e("UserSelect",{staticClass:"subtask-avatar",attrs:{"multiple-max":10,"avatar-size":20,title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),"add-icon":!1,"project-id":t.taskDetail.project_id,"before-submit":t.onOwner},model:{value:t.ownerData.owner_userid,callback:function(a){t.$set(t.ownerData,"owner_userid",a)},expression:"ownerData.owner_userid"}})],1):t.ready?e("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at},style:t.taskDetailStyle},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[e("div",{staticClass:"head"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,staticClass:"icon",attrs:{disabled:t.taskId===0,task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t.taskDetail.flow_item_name?e("div",{staticClass:"flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t.taskDetail.archived_at?e("div",{staticClass:"flow"},[e("span",{staticClass:"archived",on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))])]):t._e(),e("div",{staticClass:"nav"},[t.projectName?e("p",[e("span",[t._v(t._s(t.projectName))])]):t._e(),t.columnName?e("p",[e("span",[t._v(t._s(t.columnName))])]):t._e(),t.taskDetail.id?e("p",[e("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),e("div",{staticClass:"function"},[t.getOwner.length===0?e("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(a){t.receiveShow=a},expression:"receiveShow"}},[e("div",{staticClass:"task-detail-receive"},[e("div",{staticClass:"receive-title"},[e("Icon",{attrs:{type:"ios-help-circle"}}),t._v(" "+t._s(t.$L("\u786E\u8BA4\u8BA1\u5212\u65F6\u95F4\u9886\u53D6\u4EFB\u52A1"))+" ")],1),e("div",{staticClass:"receive-time"},[e("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4"),clearable:!1,editable:!1},on:{"on-change":t.taskTimeChange},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}})],1),e("div",{staticClass:"receive-bottom"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(a){t.receiveShow=!1}}},[t._v("\u53D6\u6D88")]),e("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.onOwner(!0)}}},[t._v("\u786E\u5B9A")])],1)]),e("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("\u6211\u8981\u9886\u53D6\u4EFB\u52A1")))])],1):t._e(),t.$Electron?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u65B0\u7A97\u53E3\u6253\u5F00")}},[e("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("\uE776")])]):t._e(),e("div",{staticClass:"menu"},[e("TaskMenu",{attrs:{disabled:t.taskId===0,task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),e("Scrollbar",{staticClass:"scroller"},[e("div",{staticClass:"title"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(a){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(a){t.$set(t.taskDetail,"name",a)},expression:"taskDetail.name"}})],1),e("TEditorTask",{ref:"desc",staticClass:"desc",attrs:{value:t.taskContent,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0...")},on:{"on-blur":function(a){return t.updateBlur("content")}}}),e("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[t.taskDetail.p_name?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6EC")]),t._v(t._s(t.$L("\u4F18\u5148\u7EA7"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(a){return t.updateData("priority",a)}}},[e("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(a,i){return e("EDropdownItem",{key:i,attrs:{command:a}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==a.name?"":"")}}),t._v(" "+t._s(a.name)+" ")])}),1)],1)],1)])]):t._e(),t.getOwner.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E4")]),t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA"))+" ")]),e("UserSelect",{staticClass:"item-content user",attrs:{"multiple-max":10,"avatar-size":28,title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),"project-id":t.taskDetail.project_id,"add-icon":!1,"before-submit":t.onOwner},model:{value:t.ownerData.owner_userid,callback:function(a){t.$set(t.ownerData,"owner_userid",a)},expression:"ownerData.owner_userid"}})],1):t._e(),t.getAssist.length>0||t.assistForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE63F")]),t._v(t._s(t.$L("\u534F\u52A9\u4EBA\u5458"))+" ")]),e("UserSelect",{ref:"assist",staticClass:"item-content user",attrs:{"multiple-max":10,"avatar-size":28,title:t.$L(t.getAssist.length>0?"\u4FEE\u6539\u534F\u52A9\u4EBA\u5458":"\u6DFB\u52A0\u534F\u52A9\u4EBA\u5458"),"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,"add-icon":!1,"before-submit":t.onAssist},model:{value:t.assistData.assist_userid,callback:function(a){t.$set(t.assistData,"assist_userid",a)},expression:"assistData.assist_userid"}})],1):t._e(),t.taskDetail.is_all_visible>1||t.visibleForce||t.visibleKeep?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE77B")]),e("EDropdown",{ref:"eDropdownRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropVisible}},[e("span",{staticClass:"visibility-text color"},[t._v(t._s(t.$L("\u53EF\u89C1\u6027"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE740")])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.is_all_visible==1?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u9879\u76EE\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.is_all_visible==2?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:3}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.is_all_visible==3?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u6307\u5B9A\u6210\u5458"))+" ")],1)])],1)],1)],1),e("div",{staticClass:"item-content user"},[t.taskDetail.is_all_visible==1?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.taskDetail.is_all_visible==2?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458\u53EF\u89C1")))]):e("UserSelect",{ref:"visibleUserSelectRef",attrs:{"avatar-size":28,title:t.$L("\u9009\u62E9\u6307\u5B9A\u4EBA\u5458"),"project-id":t.taskDetail.project_id,"add-icon":!1},on:{"on-show-change":t.visibleUserSelectShowChange},model:{value:t.taskDetail.visibility_appointor,callback:function(a){t.$set(t.taskDetail,"visibility_appointor",a)},expression:"taskDetail.visibility_appointor"}})],1)]):t._e(),t.taskDetail.end_at||t.timeForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E8")]),t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-change":t.taskTimeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}},[e("div",{staticClass:"picker-time"},[e("div",{staticClass:"time",on:{click:t.openTime}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),!t.taskDetail.complete_at&&t.taskDetail.end_at?[t.within24Hours(t.taskDetail.end_at)?e("Tag",{attrs:{color:"blue"}},[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t.isOverdue(t.taskDetail)?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u8D85\u671F\u672A\u5B8C\u6210")))]):t._e()]:t._e()],2)])],1)])]):t._e(),t.taskDetail.loop&&t.taskDetail.loop!="never"||t.loopForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE93F")]),t._v(t._s(t.$L("\u91CD\u590D\u5468\u671F"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"loop",attrs:{trigger:"click",placement:"bottom"},on:{command:function(a){return t.updateData("loop",a)}}},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch||!t.taskDetail.loop_at,content:`${t.$L("\u4E0B\u4E2A\u5468\u671F")}: ${t.taskDetail.loop_at}`,placement:"right"}},[e("span",[t._v(t._s(t.$L(t.loopLabel(t.taskDetail.loop))))])]),e("EDropdownMenu",{staticClass:"task-detail-loop",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.loops,function(a){return e("EDropdownItem",{key:a.key,attrs:{command:a.key}},[t._v(" "+t._s(t.$L(a.label))+" ")])}),1)],1)],1)])]):t._e(),t.fileList.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E6")]),t._v(t._s(t.$L("\u9644\u4EF6"))+" ")]),e("ul",{staticClass:"item-content file"},[t.taskDetail.file_num>50?e("li",{staticClass:"tip"},[t._v(t._s(t.$L(`\u5171${t.taskDetail.file_num}\u4E2A\u6587\u4EF6\uFF0C\u4EC5\u663E\u793A\u6700\u65B050\u4E2A`)))]):t._e(),t._l(t.fileList,function(a){return e("li",[a.id?e("img",{staticClass:"file-ext",attrs:{src:a.thumb}}):e("Loading",{staticClass:"file-load"}),e("div",{staticClass:"file-name"},[t._v(t._s(a.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(a.size)))]),e("div",{staticClass:"file-menu",class:{show:a._show_menu}},[e("Icon",{attrs:{type:"md-eye"},on:{click:function(i){return t.viewFile(a)}}}),e("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(i){return t.downFile(a)}}}),e("EPopover",{staticClass:"file-delete",model:{value:a._show_menu,callback:function(i){t.$set(a,"_show_menu",i)},expression:"file._show_menu"}},[e("div",{staticClass:"task-detail-delete-file-popover"},[e("p",[t._v(t._s(t.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u6587\u4EF6\u5417\uFF1F")))]),e("div",{staticClass:"buttons"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(i){a._show_menu=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return t.deleteFile(a)}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)]),e("i",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("\uE6EA")])])],1)],1)})],2),e("ul",{staticClass:"item-content"},[e("li",[e("div",{staticClass:"add-button",on:{click:function(a){return t.onUploadClick(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0\u9644\u4EF6")))])])])])]):t._e(),t.subList.length>0||t.addsubForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F0")]),t._v(t._s(t.$L("\u5B50\u4EFB\u52A1"))+" ")]),e("ul",{staticClass:"item-content subtask"},t._l(t.subList,function(a,i){return e("TaskDetail",{key:i,ref:`subTask_${a.id}`,refInFor:!0,attrs:{"task-id":a.id,"open-task":a,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})}),1),e("ul",{class:["item-content",t.subList.length===0?"nosub":""]},[e("li",[t.addsubShow?e("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1"),icon:t.addsubLoad>0?"ios-loading":"",enterkeyhint:"done"},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(a){t.addsubName=a},expression:"addsubName"}}):e("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u4EFB\u52A1")))])])],1)])]):t._e()],1),t.menuList.length>0?e("div",{staticClass:"add"},[e("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[e("div",{staticClass:"add-button"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0")))]),e("em",[t._v(t._s(t.menuText))])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,function(a,i){return e("EDropdownItem",{key:i,attrs:{command:a.command}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(a.icon)}}),t._v(t._s(t.$L(a.name))+" ")])])}),1)],1)],1):t._e()],1),e("TaskUpload",{ref:"upload",staticClass:"upload",on:{"on-select-file":t.onSelectFile}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?e("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[e("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(a){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(a){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:e("div",[e("div",{staticClass:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(a){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(a){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()]),e("div",{staticClass:"menu"},[t.navActive=="dialog"&&t.taskDetail.msg_num>0?e("div",{staticClass:"menu-item",on:{click:function(a){return a.stopPropagation(),t.onSend("open")}}},[t.openLoad>0?e("div",{staticClass:"menu-load"},[e("Loading")],1):t._e(),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u804A\u5929"))+" "),e("em",[t._v("("+t._s(t.taskDetail.msg_num>999?"999+":t.taskDetail.msg_num)+")")]),e("i",{staticClass:"taskfont"},[t._v("\uE703")])]):t._e()])],1),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):e("div",{staticClass:"no-dialog",on:{drop:function(a){return a.preventDefault(),t.taskPasteDrag(a,"drag")},dragover:function(a){return a.preventDefault(),t.taskDragOver(!0,a)},dragleave:function(a){return a.preventDefault(),t.taskDragOver(!1,a)}}},[e("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]),e("div",{staticClass:"no-input"},[e("ChatInput",{ref:"chatInput",attrs:{"task-id":t.taskId,loading:t.sendLoad>0,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F..."),"send-menu":!1},on:{"on-more":t.onEventMore,"on-file":t.onSelectFile,"on-record":t.onRecord,"on-send":t.onSend},model:{value:t.msgText,callback:function(a){t.msgText=a},expression:"msgText"}})],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(a){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e()])],1)],2),t.taskDetail.id?t._e():e("div",{staticClass:"task-load"},[e("Loading")],1),e("TaskExistTips",{ref:"taskExistTipsRef",on:{onAdd:function(a){return t.updateData("times",t.updateParams)}}})],1):t._e()},B=[];const R={name:"TaskDetail",components:{TEditorTask:M,UserSelect:D,TaskExistTips:x,ChatInput:v,TaskMenu:b,ProjectLog:_,DialogWrapper:g,TaskUpload:V,TaskPriority:k},props:{taskId:{type:Number,default:0},openTask:{type:Object,default:()=>({})},mainEndAt:{default:null},canUpdateBlur:{type:Boolean,default:!0},modalMode:{type:Boolean,default:!1}},data(){return{ready:!1,taskDetail:{},ownerData:{},ownerLoad:0,receiveShow:!1,assistForce:!1,assistData:{},assistLoad:0,visibleForce:!1,addsubForce:!1,addsubShow:!1,addsubName:"",addsubLoad:0,timeForce:!1,timeOpen:!1,timeValue:[],timeOptions:{shortcuts:$A.timeOptionShortcuts()},loopForce:!1,nowTime:$A.Time(),nowInterval:null,msgText:"",msgFile:[],msgRecord:{},navActive:"dialog",logLoadIng:!1,sendLoad:0,openLoad:0,dialogDrag:!1,imageAttachment:!0,receiveTaskSubscribe:null,loops:[{key:"never",label:"\u4ECE\u4E0D"},{key:"day",label:"\u6BCF\u5929"},{key:"weekdays",label:"\u6BCF\u4E2A\u5DE5\u4F5C\u65E5"},{key:"week",label:"\u6BCF\u5468"},{key:"twoweeks",label:"\u6BCF\u4E24\u5468"},{key:"month",label:"\u6BCF\u6708"},{key:"year",label:"\u6BCF\u5E74"},{key:"custom",label:"\u81EA\u5B9A\u4E49"}],updateParams:{}}},created(){const t=$A.getObject(this.$route.query,"navActive");["dialog","log"].includes(t)&&(this.navActive=t)},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3),this.receiveTaskSubscribe=p.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...f(["systemConfig","cacheProjects","cacheColumns","cacheTasks","taskContents","taskFiles","taskPriority","dialogId"]),projectName(){if(!this.taskDetail.project_id)return"";if(this.taskDetail.project_name)return this.taskDetail.project_name;const t=this.cacheProjects.find(({id:s})=>s==this.taskDetail.project_id);return t?t.name:""},columnName(){if(!this.taskDetail.column_id)return"";if(this.taskDetail.column_name)return this.taskDetail.column_name;const t=this.cacheColumns.find(({id:s})=>s==this.taskDetail.column_id);return t?t.name:""},taskContent(){if(!this.taskId)return"";let t=this.taskContents.find(({task_id:s})=>s==this.taskId);return t?t.content:""},fileList(){return this.taskId?this.taskFiles.filter(({task_id:t})=>t==this.taskId).sort((t,s)=>s.id-t.id):[]},subList(){return this.taskId?this.cacheTasks.filter(t=>t.parent_id==this.taskId).sort((t,s)=>t.id-s.id):[]},hasOpenDialog(){return this.taskDetail.dialog_id>0&&this.windowLandscape},dialogStyle(){const{windowHeight:t,hasOpenDialog:s}=this,e=Math.min(1100,t);if(!e)return{};if(!s)return{};const a=e>900?200:70;return{minHeight:e-a-48+"px"}},taskDetailStyle(){const{modalMode:t,windowHeight:s,hasOpenDialog:e}=this,a=Math.min(1100,s);if(t&&e){const i=a>900?200:70;return{maxHeight:a-i-30+"px"}}return{}},cutTime(){const{taskDetail:t}=this;let s=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),a="";return $A.formatDate("Y/m/d",s)==$A.formatDate("Y/m/d",e)?a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",s)==$A.formatDate("Y",e)?(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")):(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("Y/m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")),a},getOwner(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:s})=>s===1).sort((s,e)=>s.id-e.id):[]},getAssist(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:s})=>s===0).sort((s,e)=>s.id-e.id):[]},menuList(){const{taskDetail:t}=this,s=[];return t.p_name||s.push({command:"priority",icon:"",name:"\u4F18\u5148\u7EA7"}),$A.isArray(t.task_user)&&t.task_user.find(({owner:e})=>e===0)||s.push({command:"assist",icon:"",name:"\u534F\u52A9\u4EBA\u5458"}),t.is_all_visible<=1&&!this.visibleKeep&&s.push({command:"visible",icon:"",name:"\u53EF\u89C1\u6027"}),t.end_at||s.push({command:"times",icon:"",name:"\u622A\u6B62\u65F6\u95F4"}),(!t.loop||t.loop=="never")&&s.push({command:"loop",icon:"",name:"\u91CD\u590D\u5468\u671F"}),this.fileList.length==0&&s.push({command:"file",icon:"",name:"\u9644\u4EF6"}),this.subList.length==0&&s.push({command:"subtask",icon:"",name:"\u5B50\u4EFB\u52A1"}),s},menuText(){const{menuList:t}=this;let s="";return t.length>0&&t.forEach((e,a)=>{a>0&&(s+=" / "),s+=this.$L(e.name)}),s},visibleKeep(){return this.systemConfig.task_visible==="open"}},watch:{openTask:{handler(t){this.taskDetail=$A.cloneJSON(t),this.__openTask&&clearTimeout(this.__openTask),this.__openTask=setTimeout(s=>{var e;return(e=this.$refs.name)==null?void 0:e.resizeTextarea()},100)},immediate:!0,deep:!0},taskId:{handler(t){t>0?this.ready=!0:(this.windowPortrait&&$A.onBlur(),this.timeOpen=!1,this.timeForce=!1,this.loopForce=!1,this.assistForce=!1,this.visibleForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.chatInput&&this.$refs.chatInput.hidePopover())},immediate:!0},getOwner:{handler(t){const s=t.map(({userid:e})=>e);this.$set(this.taskDetail,"owner_userid",s),this.$set(this.ownerData,"owner_userid",s),this.$set(this.assistData,"disabled",t.map(({userid:e})=>e).filter(e=>e!=this.userId))},immediate:!0},getAssist:{handler(t){const s=t.map(({userid:e})=>e);this.$set(this.taskDetail,"assist_userid",s),this.$set(this.assistData,"assist_userid",s)},immediate:!0},receiveShow(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},"taskDetail.visibility_appointor":{handler(t){(t==null?void 0:t.length)>0&&t[0]&&(this.taskDetail.is_all_visible=3,this.updateVisible())},immediate:!0}},methods:{within24Hours(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},isOverdue(t){return t.overdue?!0:$A.Date(t.end_at,!0)"+e+""};yr.prototype.br=function(){return this.options.xhtml?"
":"
"};yr.prototype.del=function(e){return""+e+""};yr.prototype.link=function(e,t,n){if(e=a8(this.options.sanitize,this.options.baseUrl,e),e===null)return n;var r='"+n+"",r};yr.prototype.image=function(e,t,n){if(e=a8(this.options.sanitize,this.options.baseUrl,e),e===null)return n;var r='":">",r};yr.prototype.text=function(e){return e};function $s(){}$s.prototype.strong=$s.prototype.em=$s.prototype.codespan=$s.prototype.del=$s.prototype.text=function(e){return e};$s.prototype.link=$s.prototype.image=function(e,t,n){return""+n};$s.prototype.br=function(){return""};function os(e){this.tokens=[],this.token=null,this.options=e||tr.defaults,this.options.renderer=this.options.renderer||new yr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i2}os.parse=function(e,t){var n=new os(t);return n.parse(e)};os.prototype.parse=function(e){this.inline=new Li(e.links,this.options),this.inlineText=new Li(e.links,ls({},this.options,{renderer:new $s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t};os.prototype.next=function(){return this.token=this.tokens.pop(),this.token};os.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};os.prototype.parseText=function(){for(var e=this.token.text;this.peek().type==="text";)e+=`
`+this.next().text;return this.inline.output(e)};os.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,i8(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{var e="",t="",n,r,i,a;for(i="",n=0;n
"+Yn(h.message+"",!0)+"";throw h}}tr.options=tr.setOptions=function(e){return ls(tr.defaults,e),tr};tr.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new yr,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}};tr.defaults=tr.getDefaults();tr.Parser=os;tr.parser=os.parse;tr.Renderer=yr;tr.TextRenderer=$s;tr.Lexer=Co;tr.lexer=Co.lex;tr.InlineLexer=Li;tr.inlineLexer=Li.output;tr.Slugger=i2;tr.parse=tr;ln.initHighlightingOnLoad();const cV=new tr.Renderer;var dV=tr.setOptions({renderer:cV,gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,highlight:function(e){return ln.highlightAuto(e).value}}),fV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"preview",staticClass:"markdown-preview-warp"},[n("div",{class:`markdown-preview ${"markdown-theme-"+e.theme}`,domProps:{innerHTML:e._s(e.html)}}),n("div",{class:["preview-img",e.previewImgModal?"active":""]},[n("span",{staticClass:"close icon-close iconfont",on:{click:function(r){e.previewImgModal=!1}}}),n("img",{class:[e.previewImgMode],attrs:{src:e.previewImgSrc,alt:""}})])])},hV=[];const pV={name:"markdown-preview",props:{initialValue:{type:String,default:""},markedOptions:{type:Object,default:()=>({})},theme:{type:String,default:"light"},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"\u590D\u5236\u4EE3\u7801"}},data(){return{html:"",previewImgModal:!1,previewImgSrc:"",previewImgMode:""}},mounted(){this.translateMarkdown()},methods:{tocLevel(e,t){let n=9999;return t.forEach(({level:r})=>{n=Math.min(n,r)}),n===9999?e:e-(n-1)},translateMarkdown(){let e=dV(this.initialValue,{sanitize:!1,...this.markedOptions}).replace(/href="/gi,'target="_blank" href="');if(this.copyCode&&(e=e.replace(/
/g,''+this.copyBtnText+"")),/\[\[TOC\]\]/.test(e)){let t="";cb.tocItems.forEach(n=>{t+=`").replace(/<\/pre>/g,"
>4)*ye[Z],F=Q[Z]>>8,Q[Z]&=255;for(Z=0;Z<32;Z++)Q[Z]-=F*ye[Z];for(I=0;I<32;I++)Q[I+1]+=Q[I]>>8,re[I]=255&Q[I]}function Se(re){var Q,F=new Float64Array(64);for(Q=0;Q<64;Q++)F[Q]=re[Q];for(Q=0;Q<64;Q++)re[Q]=0;de(re,F)}function X(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n();return _(re[2],l),C(re[1],Q),M(Z,re[1]),w(q,Z,h),P(Z,Z,re[2]),D(q,re[2],q),M(pe,q),M(Ee,pe),w(J,Ee,pe),w(F,J,Z),w(F,F,q),function(Y,ae){var te,Ae=n();for(te=0;te<16;te++)Ae[te]=ae[te];for(te=250;te>=0;te--)M(Ae,Ae),te!==1&&w(Ae,Ae,ae);for(te=0;te<16;te++)Y[te]=Ae[te]}(F,F),w(F,F,Z),w(F,F,q),w(F,F,q),w(re[0],F,q),M(I,re[0]),w(I,I,q),O(I,Z)&&w(re[0],re[0],v),M(I,re[0]),w(I,I,q),O(I,Z)?-1:(x(re[0])===Q[31]>>7&&P(re[0],a,re[0]),w(re[3],re[0],re[1]),0)}var se=64;function Ce(){for(var re=0;re=0},t.sign.keyPair=function(){var re=new Uint8Array(32),Q=new Uint8Array(64);return he(re,Q),{publicKey:re,secretKey:Q}},t.sign.keyPair.fromSecretKey=function(re){if(Ce(re),re.length!==64)throw Error("bad secret key size");for(var Q=new Uint8Array(32),F=0;F e&&(h.imod(a.leftShift(i)).iadd(a),s=h.mod(l).toNumber());while(!await kP(h,t,n));return h}async function kP(e,t,n){return!(t&&!e.dec().gcd(t).isOne())&&!!await async function(r){const i=await Te.getBigInteger();return KG.every(a=>r.mod(new i(a))!==0)}(e)&&!!await async function(r,i){const a=await Te.getBigInteger();return i=i||new a(2),i.modExp(r.dec(),r).isOne()}(e)&&!!await async function(r,i,a){const l=await Te.getBigInteger(),c=r.bitLength();i||(i=Math.max(1,c/48|0));const h=r.dec();let s=0;for(;!h.getBit(s);)s++;const p=r.rightShift(new l(s));for(;i>0;i--){let d,v=(a?a():await Eo(new l(2),h)).modExp(p,r);if(!v.isOne()&&!v.equal(h)){for(d=1;d t-11)throw Error("Message too long");const r=function(a){const l=new Uint8Array(a);let c=0;for(;c=8&!r;if(t)return Te.selectUint8Array(l,a,t);if(l)return a;throw Error("Decryption error")}async function Ob(e,t,n){let r;if(t.length!==Nc.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(Os[e].length);for(r=0;rimport("./bn.min.cf4401fc.js"),[]),O=new E(_),x=new E(y),C=new E(m),D=C.mod(x.subn(1)),P=C.mod(O.subn(1)),w=wi.createSign(ve.read(ve.hash,s));w.write(p),w.end();const M={version:0,modulus:new E(d),publicExponent:new E(v),privateExponent:new E(m),prime1:new E(y),prime2:new E(_),exponent1:D,exponent2:P,coefficient:new E(b)};if(wi.createPrivateKey!==void 0){const R=rc.encode(M,"der");return new Uint8Array(w.sign({key:R,format:"der",type:"pkcs1"}))}const T=rc.encode(M,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(w.sign(T))}(e,t,n,r,i,a,l,c)}return async function(s,p,d,v){const m=await Te.getBigInteger();p=new m(p);const _=new m(await Ob(s,v,p.byteLength()));if(d=new m(d),_.gte(p))throw Error("Message size cannot exceed modulus size");return _.modExp(d,p).toUint8Array("be",p.byteLength())}(e,n,i,h)},verify:async function(e,t,n,r,i,a){if(t&&!Te.isStream(t)){if(Te.getWebCrypto())try{return await async function(l,c,h,s,p){const d=function(m,_){return{kty:"RSA",n:pa(m,!0),e:pa(_,!0),ext:!0}}(s,p),v=await nc.importKey("jwk",d,{name:"RSASSA-PKCS1-v1_5",hash:{name:l}},!1,["verify"]);return nc.verify("RSASSA-PKCS1-v1_5",v,h,c)}(ve.read(ve.webHash,e),t,n,r,i)}catch(l){Te.printDebugError(l)}else if(Te.getNodeCrypto())return async function(l,c,h,s,p){const{default:d}=await _n(()=>import("./bn.min.cf4401fc.js"),[]),v=wi.createVerify(ve.read(ve.hash,l));v.write(c),v.end();const m={modulus:new d(s),publicExponent:new d(p)};let _;wi.createPrivateKey!==void 0?_={key:Rv.encode(m,"der"),format:"der",type:"pkcs1"}:_=Rv.encode(m,"pem",{label:"RSA PUBLIC KEY"});try{return await v.verify(_,h)}catch{return!1}}(e,t,n,r,i)}return async function(l,c,h,s,p){const d=await Te.getBigInteger();if(h=new d(h),c=new d(c),s=new d(s),c.gte(h))throw Error("Signature size cannot exceed modulus size");const v=c.modExp(s,h).toUint8Array("be",h.byteLength()),m=await Ob(l,p,h.byteLength());return Te.equalsUint8Array(v,m)}(e,n,r,i,a)},encrypt:async function(e,t,n){return Te.getNodeCrypto()?async function(r,i,a){const{default:l}=await _n(()=>import("./bn.min.cf4401fc.js"),[]),c={modulus:new l(i),publicExponent:new l(a)};let h;return wi.createPrivateKey!==void 0?h={key:Rv.encode(c,"der"),format:"der",type:"pkcs1",padding:wi.constants.RSA_PKCS1_PADDING}:h={key:Rv.encode(c,"pem",{label:"RSA PUBLIC KEY"}),padding:wi.constants.RSA_PKCS1_PADDING},new Uint8Array(wi.publicEncrypt(h,r))}(e,t,n):async function(r,i,a){const l=await Te.getBigInteger();if(i=new l(i),r=new l(E2(r,i.byteLength())),a=new l(a),r.gte(i))throw Error("Message size cannot exceed modulus size");return r.modExp(a,i).toUint8Array("be",i.byteLength())}(e,t,n)},decrypt:async function(e,t,n,r,i,a,l,c){return Te.getNodeCrypto()?async function(h,s,p,d,v,m,_,y){const{default:b}=await _n(()=>import("./bn.min.cf4401fc.js"),[]),E=new b(v),O=new b(m),x=new b(d),C=x.mod(O.subn(1)),D=x.mod(E.subn(1)),P={version:0,modulus:new b(s),publicExponent:new b(p),privateExponent:new b(d),prime1:new b(m),prime2:new b(v),exponent1:C,exponent2:D,coefficient:new b(_)};let w;wi.createPrivateKey!==void 0?w={key:rc.encode(P,"der"),format:"der",type:"pkcs1",padding:wi.constants.RSA_PKCS1_PADDING}:w={key:rc.encode(P,"pem",{label:"RSA PRIVATE KEY"}),padding:wi.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(wi.privateDecrypt(w,h))}catch{if(y)return y;throw Error("Decryption error")}}(e,t,n,r,i,a,l,c):async function(h,s,p,d,v,m,_,y){const b=await Te.getBigInteger();if(h=new b(h),s=new b(s),p=new b(p),d=new b(d),v=new b(v),m=new b(m),_=new b(_),h.gte(s))throw Error("Data too large.");const E=d.mod(m.dec()),O=d.mod(v.dec()),x=(await Eo(new b(2),s)).mod(s),C=x.modInv(s).modExp(p,s);h=h.mul(C).mod(s);const D=h.modExp(O,v),P=h.modExp(E,m);let M=_.mul(P.sub(D)).mod(m).mul(v).add(D);return M=M.mul(x).mod(s),D2(M.toUint8Array("be",s.byteLength()),y)}(e,t,n,r,i,a,l,c)},generate:async function(e,t){if(t=new(await Te.getBigInteger())(t),Te.getWebCrypto()){const l={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},c=await nc.generateKey(l,!0,["sign","verify"]),h=await nc.exportKey("jwk",c.privateKey);return{n:co(h.n),e:t.toUint8Array(),d:co(h.d),p:co(h.q),q:co(h.p),u:co(h.qi)}}if(Te.getNodeCrypto()&&wi.generateKeyPair&&rc){const l={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},c=await new Promise((h,s)=>{wi.generateKeyPair("rsa",l,(p,d,v)=>{p?s(p):h(rc.decode(v,"der"))})});return{n:c.modulus.toArrayLike(Uint8Array),e:c.publicExponent.toArrayLike(Uint8Array),d:c.privateExponent.toArrayLike(Uint8Array),p:c.prime2.toArrayLike(Uint8Array),q:c.prime1.toArrayLike(Uint8Array),u:c.coefficient.toArrayLike(Uint8Array)}}let n,r,i;do r=await o4(e-(e>>1),t,40),n=await o4(e>>1,t,40),i=n.mul(r);while(i.bitLength()!==e);const a=n.dec().imul(r.dec());return r.lt(n)&&([n,r]=[r,n]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:n.toUint8Array(),q:r.toUint8Array(),u:n.modInv(r).toUint8Array()}},validateParams:async function(e,t,n,r,i,a){const l=await Te.getBigInteger();if(e=new l(e),r=new l(r),i=new l(i),!r.mul(i).equal(e))return!1;const c=new l(2);if(a=new l(a),!r.mul(a).mod(i).isOne())return!1;t=new l(t),n=new l(n);const h=new l(Math.floor(e.bitLength()/3)),s=await Eo(c,c.leftShift(h)),p=s.mul(n).mul(t);return!(!p.mod(r.dec()).equal(s)||!p.mod(i.dec()).equal(s))}}),XG=Object.freeze({__proto__:null,encrypt:async function(e,t,n,r){const i=await Te.getBigInteger();t=new i(t),n=new i(n),r=new i(r);const a=new i(E2(e,t.byteLength())),l=await Eo(new i(1),t.dec());return{c1:n.modExp(l,t).toUint8Array(),c2:r.modExp(l,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,n,r,i){const a=await Te.getBigInteger();return e=new a(e),t=new a(t),n=new a(n),r=new a(r),D2(e.modExp(r,n).modInv(n).imul(t).imod(n).toUint8Array("be",n.byteLength()),i)},validateParams:async function(e,t,n,r){const i=await Te.getBigInteger();e=new i(e),t=new i(t),n=new i(n);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const l=new i(e.bitLength()),c=new i(1023);if(l.lt(c)||!t.modExp(e.dec(),e).isOne())return!1;let h=t;const s=new i(1),p=new i(2).leftShift(new i(17));for(;s.lt(p);){if(h=h.mul(t).imod(e),h.isOne())return!1;s.iinc()}r=new i(r);const d=new i(2),v=await Eo(d.leftShift(l.dec()),d.leftShift(l)),m=e.dec().imul(v).iadd(r);return!!n.equal(t.modExp(m,e))}});class Ms{constructor(t){if(t instanceof Ms)this.oid=t.oid;else if(Te.isArray(t)||Te.isUint8Array(t)){if((t=new Uint8Array(t))[0]===6){if(t[1]!==t.length-2)throw Error("Length mismatch in DER encoded oid");t=t.subarray(2)}this.oid=t}else this.oid=""}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.oid=t.subarray(1,1+n),1+this.oid.length}throw Error("Invalid oid")}write(){return Te.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Te.uint8ArrayToHex(this.oid)}getName(){const t=this.toHex();if(ve.curve[t])return ve.write(ve.curve,t);throw Error("Unknown curve object identifier.")}}function l_(e,t){return e.keyPair({priv:t})}function u_(e,t){const n=e.keyPair({pub:t});if(n.validate().result!==!0)throw Error("Invalid elliptic public key");return n}async function Jc(e){if(!Nt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await _n(()=>import("./elliptic.min.e8bc24bf.js"),["js/build/elliptic.min.e8bc24bf.js","js/build/bn.min.cf4401fc.js"]);return new t.ec(e)}function PP(e){let t,n=0;const r=e[0];return r<192?([n]=e,t=1):r<255?(n=(e[0]-192<<8)+e[1]+192,t=2):r===255&&(n=Te.readNumber(e.subarray(1,5)),t=5),{len:n,offset:t}}function oh(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Te.concatUint8Array([new Uint8Array([255]),Te.writeNumber(e,4)])}function JG(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function TP(e){return new Uint8Array([192|e])}function l4(e,t){return Te.concatUint8Array([TP(e),oh(t)])}function _m(e){return[ve.packet.literalData,ve.packet.compressedData,ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData].includes(e)}async function ZG(e,t){const n=Qs(e);let r,i;try{const a=await n.peekBytes(2);if(!a||a.length<2||(128&a[0])==0)throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const l=await n.readByte();let c,h,s=-1,p=-1;p=0,(64&l)!=0&&(p=1),p?s=63&l:(s=(63&l)>>2,h=3&l);const d=_m(s);let v,m=null;if(d){if(Te.isStream(e)==="array"){const y=new js;r=ea(y),m=y}else{const y=new Rc;r=ea(y.writable),m=y.readable}i=t({tag:s,packet:m})}else m=[];do{if(p){const y=await n.readByte();if(v=!1,y<192)c=y;else if(y>=192&&y<224)c=(y-192<<8)+await n.readByte()+192;else if(y>223&&y<255){if(c=1<<(31&y),v=!0,!d)throw new TypeError("This packet type does not support partial lengths.")}else c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte()}else switch(h){case 0:c=await n.readByte();break;case 1:c=await n.readByte()<<8|await n.readByte();break;case 2:c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte();break;default:c=1/0}if(c>0){let y=0;for(;;){r&&await r.ready;const{done:b,value:E}=await n.read();if(b){if(c===1/0)break;throw Error("Unexpected end of packet")}const O=c===1/0?E:E.subarray(0,c-y);if(r?await r.write(O):m.push(O),y+=E.length,y>=c){n.unshift(E.subarray(c-y+E.length));break}}}}while(v);const _=await n.peekBytes(d?1/0:2);return r?(await r.ready,await r.close()):(m=Te.concatUint8Array(m),await t({tag:s,packet:m})),!_||!_.length}catch(a){if(r)return await r.abort(a),!0;throw a}finally{r&&await i,n.releaseLock()}}class zr extends Error{constructor(...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,zr),this.name="UnsupportedError"}}class Pb{constructor(t,n){this.tag=t,this.rawContent=n}write(){return this.rawContent}}const Ky=Te.getWebCrypto(),ug=Te.getNodeCrypto(),Gs={p256:"P-256",p384:"P-384",p521:"P-521"},io=ug?ug.getCurves():[],Ho=ug?{secp256k1:io.includes("secp256k1")?"secp256k1":void 0,p256:io.includes("prime256v1")?"prime256v1":void 0,p384:io.includes("secp384r1")?"secp384r1":void 0,p521:io.includes("secp521r1")?"secp521r1":void 0,ed25519:io.includes("ED25519")?"ED25519":void 0,curve25519:io.includes("X25519")?"X25519":void 0,brainpoolP256r1:io.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:io.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:io.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},ym={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Ho.p256,web:Gs.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Ho.p384,web:Gs.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Ho.p521,web:Gs.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Ho.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:ve.publicKey.eddsa,hash:ve.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:ve.publicKey.ecdh,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Ho.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Ho.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Ho.brainpoolP512r1,payloadSize:64}};class Do{constructor(t,n){try{(Te.isArray(t)||Te.isUint8Array(t))&&(t=new Ms(t)),t instanceof Ms&&(t=t.getName()),this.name=ve.write(ve.curve,t)}catch{throw new zr("Unknown curve")}n=n||ym[this.name],this.keyType=n.keyType,this.oid=n.oid,this.hash=n.hash,this.cipher=n.cipher,this.node=n.node&&ym[this.name],this.web=n.web&&ym[this.name],this.payloadSize=n.payloadSize,this.web&&Te.getWebCrypto()?this.type="web":this.node&&Te.getNodeCrypto()?this.type="node":this.name==="curve25519"?this.type="curve25519":this.name==="ed25519"&&(this.type="ed25519")}async genKeyPair(){let t;switch(this.type){case"web":try{return await async function(r){const i=await Ky.generateKey({name:"ECDSA",namedCurve:Gs[r]},!0,["sign","verify"]),a=await Ky.exportKey("jwk",i.privateKey),l=await Ky.exportKey("jwk",i.publicKey);return{publicKey:MP(l),privateKey:co(a.d)}}(this.name)}catch(r){Te.printDebugError("Browser did not support generating ec key "+r.message);break}case"node":return async function(r){const i=ug.createECDH(Ho[r]);return await i.generateKeys(),{publicKey:new Uint8Array(i.getPublicKey()),privateKey:new Uint8Array(i.getPrivateKey())}}(this.name);case"curve25519":{const r=Ks(32);r[0]=127&r[0]|64,r[31]&=248;const i=r.slice().reverse();return t=Hs.box.keyPair.fromSecretKey(i),{publicKey:Te.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:r}}case"ed25519":{const r=Ks(32),i=Hs.sign.keyPair.fromSeed(r);return{publicKey:Te.concatUint8Array([new Uint8Array([64]),i.publicKey]),privateKey:r}}}return t=await(await Jc(this.name)).genKeyPair({entropy:Te.uint8ArrayToString(Ks(32))}),{publicKey:new Uint8Array(t.getPublic("array",!1)),privateKey:t.getPrivate().toArrayLike(Uint8Array)}}}async function AP(e,t,n,r){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===ve.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if(a==="curve25519"){r=r.slice().reverse();const{publicKey:c}=Hs.box.keyPair.fromSecretKey(r);n=new Uint8Array(n);const h=new Uint8Array([64,...c]);return!!Te.equalsUint8Array(h,n)}const l=await Jc(a);try{n=u_(l,n).getPublic()}catch{return!1}return!!l_(l,r).getPublic().eq(n)}function MP(e){const t=co(e.x),n=co(e.y),r=new Uint8Array(t.length+n.length+1);return r[0]=4,r.set(t,1),r.set(n,t.length+1),r}function c_(e,t,n){const r=e,i=n.slice(1,r+1),a=n.slice(r+1,2*r+1);return{kty:"EC",crv:t,x:pa(i,!0),y:pa(a,!0),ext:!0}}function IP(e,t,n,r){const i=c_(e,t,n);return i.d=pa(r,!0),i}const cg=Te.getWebCrypto(),Zc=Te.getNodeCrypto();async function u4(e,t,n,r,i,a){const l=new Do(e);if(n&&!Te.isStream(n)){const c={publicKey:r,privateKey:i};switch(l.type){case"web":try{return await async function(h,s,p,d){const v=h.payloadSize,m=IP(h.payloadSize,Gs[h.name],d.publicKey,d.privateKey),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Gs[h.name],hash:{name:ve.read(ve.webHash,h.hash)}},!1,["sign"]),y=new Uint8Array(await cg.sign({name:"ECDSA",namedCurve:Gs[h.name],hash:{name:ve.read(ve.webHash,s)}},_,p));return{r:y.slice(0,v),s:y.slice(v,v<<1)}}(l,t,n,c)}catch(h){if(l.name!=="p521"&&(h.name==="DataError"||h.name==="OperationError"))throw h;Te.printDebugError("Browser did not support signing: "+h.message)}break;case"node":{const h=await async function(s,p,d,v){const m=Zc.createSign(ve.read(ve.hash,p));m.write(d),m.end();const _=QG.encode({version:1,parameters:s.oid,privateKey:Array.from(v.privateKey),publicKey:{unused:0,data:Array.from(v.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return $P.decode(m.sign(_),"der")}(l,t,n,c);return{r:h.r.toArrayLike(Uint8Array),s:h.s.toArrayLike(Uint8Array)}}}}return async function(c,h,s){const p=await Jc(c.name),d=l_(p,s),v=d.sign(h);return{r:v.r.toArrayLike(Uint8Array),s:v.s.toArrayLike(Uint8Array)}}(l,a,i)}async function c4(e,t,n,r,i,a){const l=new Do(e);if(r&&!Te.isStream(r))switch(l.type){case"web":try{return await async function(c,h,{r:s,s:p},d,v){const m=c_(c.payloadSize,Gs[c.name],v),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Gs[c.name],hash:{name:ve.read(ve.webHash,c.hash)}},!1,["verify"]),y=Te.concatUint8Array([s,p]).buffer;return cg.verify({name:"ECDSA",namedCurve:Gs[c.name],hash:{name:ve.read(ve.webHash,h)}},_,y,d)}(l,t,n,r,i)}catch(c){if(l.name!=="p521"&&(c.name==="DataError"||c.name==="OperationError"))throw c;Te.printDebugError("Browser did not support verifying: "+c.message)}break;case"node":return async function(c,h,{r:s,s:p},d,v){const{default:m}=await _n(()=>import("./bn.min.cf4401fc.js"),[]),_=Zc.createVerify(ve.read(ve.hash,h));_.write(d),_.end();const y=eY.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:c.oid},subjectPublicKey:{unused:0,data:Array.from(v)}},"pem",{label:"PUBLIC KEY"}),b=$P.encode({r:new m(s),s:new m(p)},"der");try{return _.verify(y,b)}catch{return!1}}(l,t,n,r,i)}return async function(c,h,s,p){const d=await Jc(c.name);return u_(d,p).verify(s,h)}(l,n,t===void 0?r:a,i)}const d_=void 0,$P=Zc?d_.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,QG=Zc?d_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())}):void 0,qG=Zc?d_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,eY=Zc?d_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(qG),this.key("subjectPublicKey").bitstr())}):void 0;var tY=Object.freeze({__proto__:null,sign:u4,verify:c4,validateParams:async function(e,t,n){const r=new Do(e);if(r.keyType!==ve.publicKey.ecdsa)return!1;switch(r.type){case"web":case"node":{const i=Ks(8),a=ve.hash.sha256,l=await Nc.digest(a,i);try{const c=await u4(e,a,i,t,n,l);return await c4(e,a,c,i,t,l)}catch{return!1}}default:return AP(ve.publicKey.ecdsa,e,t,n)}}});Hs.hash=e=>new Uint8Array(s_().update(e).digest());var nY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){if(Nc.getHashByteLength(t) =0;--p)for(let d=c-1;d>=0;--d)h[1]=c*p+(d+1),s[0]=a[0]^h[0],s[1]=a[1]^h[1],s[2]=l[2*d],s[3]=l[2*d+1],s=dg(n.decrypt(fg(s))),a=s.subarray(0,2),l[2*d]=s[2],l[2*d+1]=s[3];if(a[0]===r[0]&&a[1]===r[1])return fg(l);throw Error("Key Data Integrity failed")}function dg(e){const{length:t}=e,n=function(a){if(Te.isString(a)){const{length:l}=a,c=new ArrayBuffer(l),h=new Uint8Array(c);for(let s=0;s 0){const n=e[t-1];if(n>=1){const r=e.subarray(t-n),i=new Uint8Array(n).fill(n);if(Te.equalsUint8Array(r,i))return e.subarray(0,t-n)}}throw Error("Invalid padding")}var iY=Object.freeze({__proto__:null,encode:LP,decode:FP});const tl=Te.getWebCrypto(),BP=Te.getNodeCrypto();function d4(e,t,n,r){return Te.concatUint8Array([t.write(),new Uint8Array([e]),n.write(),Te.stringToUint8Array("Anonymous Sender "),r.subarray(0,20)])}async function f4(e,t,n,r,i=!1,a=!1){let l;if(i){for(l=0;l =0&&t[l]===0;l--);t=t.subarray(0,l+1)}return(await Nc.digest(e,Te.concatUint8Array([new Uint8Array([0,0,0,1]),t,r]))).subarray(0,n)}async function aY(e,t){switch(e.type){case"curve25519":{const n=Ks(32),{secretKey:r,sharedKey:i}=await UP(e,t,null,n);let{publicKey:a}=Hs.box.keyPair.fromSecretKey(r);return a=Te.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(n,r){const i=c_(n.payloadSize,n.web.web,r);let a=tl.generateKey({name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]),l=tl.importKey("jwk",i,{name:"ECDH",namedCurve:n.web.web},!1,[]);[a,l]=await Promise.all([a,l]);let c=tl.deriveBits({name:"ECDH",namedCurve:n.web.web,public:l},a.privateKey,n.web.sharedSize),h=tl.exportKey("jwk",a.publicKey);[c,h]=await Promise.all([c,h]);const s=new Uint8Array(c);return{publicKey:new Uint8Array(MP(h)),sharedKey:s}}(e,t)}catch(n){Te.printDebugError(n)}break;case"node":return async function(n,r){const i=BP.createECDH(n.node.node);i.generateKeys();const a=new Uint8Array(i.computeSecret(r));return{publicKey:new Uint8Array(i.getPublicKey()),sharedKey:a}}(e,t)}return async function(n,r){const i=await Jc(n.name),a=await n.genKeyPair();r=u_(i,r);const l=l_(i,a.privateKey),c=a.publicKey,h=l.derive(r.getPublic()),s=i.curve.p.byteLength(),p=h.toArrayLike(Uint8Array,"be",s);return{publicKey:c,sharedKey:p}}(e,t)}async function UP(e,t,n,r){if(r.length!==e.payloadSize){const i=new Uint8Array(e.payloadSize);i.set(r,e.payloadSize-r.length),r=i}switch(e.type){case"curve25519":{const i=r.slice().reverse();return{secretKey:i,sharedKey:Hs.scalarMult(i,t.subarray(1))}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(i,a,l,c){const h=IP(i.payloadSize,i.web.web,l,c);let s=tl.importKey("jwk",h,{name:"ECDH",namedCurve:i.web.web},!0,["deriveKey","deriveBits"]);const p=c_(i.payloadSize,i.web.web,a);let d=tl.importKey("jwk",p,{name:"ECDH",namedCurve:i.web.web},!0,[]);[s,d]=await Promise.all([s,d]);let v=tl.deriveBits({name:"ECDH",namedCurve:i.web.web,public:d},s,i.web.sharedSize),m=tl.exportKey("jwk",s);[v,m]=await Promise.all([v,m]);const _=new Uint8Array(v);return{secretKey:co(m.d),sharedKey:_}}(e,t,n,r)}catch(i){Te.printDebugError(i)}break;case"node":return async function(i,a,l){const c=BP.createECDH(i.node.node);c.setPrivateKey(l);const h=new Uint8Array(c.computeSecret(a));return{secretKey:new Uint8Array(c.getPrivateKey()),sharedKey:h}}(e,t,r)}return async function(i,a,l){const c=await Jc(i.name);a=u_(c,a),l=l_(c,l);const h=new Uint8Array(l.getPrivate()),s=l.derive(a.getPublic()),p=c.curve.p.byteLength(),d=s.toArrayLike(Uint8Array,"be",p);return{secretKey:h,sharedKey:d}}(e,t,r)}var sY=Object.freeze({__proto__:null,validateParams:async function(e,t,n){return AP(ve.publicKey.ecdh,e,t,n)},encrypt:async function(e,t,n,r,i){const a=LP(n),l=new Do(e),{publicKey:c,sharedKey:h}=await aY(l,r),s=d4(ve.publicKey.ecdh,e,t,i),{keySize:p}=cl(t.cipher);return{publicKey:c,wrappedKey:RP(await f4(t.hash,h,p,s),a)}},decrypt:async function(e,t,n,r,i,a,l){const c=new Do(e),{sharedKey:h}=await UP(c,n,i,a),s=d4(ve.publicKey.ecdh,e,t,l),{keySize:p}=cl(t.cipher);let d;for(let v=0;v<3;v++)try{return FP(NP(await f4(t.hash,h,p,s,v===1,v===2),r))}catch(m){d=m}throw d}}),oY=Object.freeze({__proto__:null,Curve:Do,ecdh:sY,ecdsa:tY,eddsa:nY,generate:async function(e){const t=await Te.getBigInteger();e=new Do(e);const n=await e.genKeyPair(),r=new t(n.publicKey).toUint8Array(),i=new t(n.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:r,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return ym[ve.write(ve.curve,e.toHex())].hash}}),lY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){const l=await Te.getBigInteger(),c=new l(1);let h,s,p,d;r=new l(r),i=new l(i),n=new l(n),a=new l(a),n=n.mod(r),a=a.mod(i);const v=new l(t.subarray(0,i.byteLength())).mod(i);for(;;){if(h=await Eo(c,i),s=n.modExp(h,r).imod(i),s.isZero())continue;const m=a.mul(s).imod(i);if(d=v.add(m).imod(i),p=h.modInv(i).imul(d).imod(i),!p.isZero())break}return{r:s.toUint8Array("be",i.byteLength()),s:p.toUint8Array("be",i.byteLength())}},verify:async function(e,t,n,r,i,a,l,c){const h=await Te.getBigInteger(),s=new h(0);if(t=new h(t),n=new h(n),a=new h(a),l=new h(l),i=new h(i),c=new h(c),t.lte(s)||t.gte(l)||n.lte(s)||n.gte(l))return Te.printDebug("invalid DSA Signature"),!1;const p=new h(r.subarray(0,l.byteLength())).imod(l),d=n.modInv(l);if(d.isZero())return Te.printDebug("invalid DSA Signature"),!1;i=i.mod(a),c=c.mod(a);const v=p.mul(d).imod(l),m=t.mul(d).imod(l),_=i.modExp(v,a),y=c.modExp(m,a);return _.mul(y).imod(a).imod(l).equal(t)},validateParams:async function(e,t,n,r,i){const a=await Te.getBigInteger();e=new a(e),t=new a(t),n=new a(n),r=new a(r);const l=new a(1);if(n.lte(l)||n.gte(e)||!e.dec().mod(t).isZero()||!n.modExp(t,e).isOne())return!1;const c=new a(t.bitLength()),h=new a(150);if(c.lt(h)||!await kP(t,null,32))return!1;i=new a(i);const s=new a(2),p=await Eo(s.leftShift(c.dec()),s.leftShift(c)),d=t.mul(p).add(i);return!!r.equal(n.modExp(d,e))}}),dr={rsa:YG,elgamal:XG,elliptic:oY,dsa:lY,nacl:Hs},uY=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:return{s:Te.readMPI(t.subarray(n))};case ve.publicKey.dsa:case ve.publicKey.ecdsa:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{r,s:Te.readMPI(t.subarray(n))}}case ve.publicKey.eddsa:{let r=Te.readMPI(t.subarray(n));n+=r.length+2,r=Te.leftPad(r,32);let i=Te.readMPI(t.subarray(n));return i=Te.leftPad(i,32),{r,s:i}}default:throw new zr("Unknown signature algorithm.")}},verify:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=r,h=Te.leftPad(n.s,l.length);return dr.rsa.verify(t,i,h,l,c,a)}case ve.publicKey.dsa:{const{g:l,p:c,q:h,y:s}=r,{r:p,s:d}=n;return dr.dsa.verify(t,p,d,a,l,c,h,s)}case ve.publicKey.ecdsa:{const{oid:l,Q:c}=r,h=new dr.elliptic.Curve(l).payloadSize,s=Te.leftPad(n.r,h),p=Te.leftPad(n.s,h);return dr.elliptic.ecdsa.verify(l,t,{r:s,s:p},i,c,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=r;return dr.elliptic.eddsa.verify(l,t,n,i,c,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,n,r,i,a){if(!n||!r)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=n,{d:h,p:s,q:p,u:d}=r;return{s:await dr.rsa.sign(t,i,l,c,h,s,p,d,a)}}case ve.publicKey.dsa:{const{g:l,p:c,q:h}=n,{x:s}=r;return dr.dsa.sign(t,a,l,c,h,s)}case ve.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case ve.publicKey.ecdsa:{const{oid:l,Q:c}=n,{d:h}=r;return dr.elliptic.ecdsa.sign(l,t,i,c,h,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=n,{seed:h}=r;return dr.elliptic.eddsa.sign(l,t,i,c,h,a)}default:throw Error("Unknown signature algorithm.")}}});class h4{constructor(t){t=t===void 0?new Uint8Array([]):Te.isString(t)?Te.stringToUint8Array(t):new Uint8Array(t),this.data=t}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.data=t.subarray(1,1+n),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Te.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class p4{constructor(t){if(t){const{hash:n,cipher:r}=t;this.hash=n,this.cipher=r}else this.hash=null,this.cipher=null}read(t){if(t.length<4||t[0]!==3||t[1]!==1)throw Error("Cannot read KDFParams");return this.hash=t[2],this.cipher=t[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function Gy(e){try{e.getName()}catch{throw new zr("Unknown curve OID")}}var cY=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,n,r){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:{const{n:i,e:a}=t;return{c:await dr.rsa.encrypt(n,i,a)}}case ve.publicKey.elgamal:{const{p:i,g:a,y:l}=t;return dr.elgamal.encrypt(n,i,a,l)}case ve.publicKey.ecdh:{const{oid:i,Q:a,kdfParams:l}=t,{publicKey:c,wrappedKey:h}=await dr.elliptic.ecdh.encrypt(i,l,n,a,r);return{V:c,C:new h4(h)}}default:return[]}},publicKeyDecrypt:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:{const{c:l}=r,{n:c,e:h}=t,{d:s,p,q:d,u:v}=n;return dr.rsa.decrypt(l,c,h,s,p,d,v,a)}case ve.publicKey.elgamal:{const{c1:l,c2:c}=r,h=t.p,s=n.x;return dr.elgamal.decrypt(l,c,h,s,a)}case ve.publicKey.ecdh:{const{oid:l,Q:c,kdfParams:h}=t,{d:s}=n,{V:p,C:d}=r;return dr.elliptic.ecdh.decrypt(l,h,p,d.data,c,s,i)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{n:r,e:i}}}case ve.publicKey.dsa:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));n+=a.length+2;const l=Te.readMPI(t.subarray(n));return n+=l.length+2,{read:n,publicParams:{p:r,q:i,g:a,y:l}}}case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{p:r,g:i,y:a}}}case ve.publicKey.ecdsa:{const r=new Ms;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.eddsa:{const r=new Ms;n+=r.read(t),Gy(r);let i=Te.readMPI(t.subarray(n));return n+=i.length+2,i=Te.leftPad(i,33),{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.ecdh:{const r=new Ms;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=new p4;return n+=a.read(t.subarray(n)),{read:n,publicParams:{oid:r,Q:i,kdfParams:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,n){let r=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const i=Te.readMPI(t.subarray(r));r+=i.length+2;const a=Te.readMPI(t.subarray(r));r+=a.length+2;const l=Te.readMPI(t.subarray(r));r+=l.length+2;const c=Te.readMPI(t.subarray(r));return r+=c.length+2,{read:r,privateParams:{d:i,p:a,q:l,u:c}}}case ve.publicKey.dsa:case ve.publicKey.elgamal:{const i=Te.readMPI(t.subarray(r));return r+=i.length+2,{read:r,privateParams:{x:i}}}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{d:a}}}case ve.publicKey.eddsa:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{seed:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:return{c:Te.readMPI(t.subarray(n))};case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{c1:r,c2:Te.readMPI(t.subarray(n))}}case ve.publicKey.ecdh:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=new h4;return i.read(t.subarray(n)),{V:r,C:i}}default:throw new zr("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const n=Object.keys(t).map(r=>{const i=t[r];return Te.isUint8Array(i)?Te.uint8ArrayToMPI(i):i.write()});return Te.concatUint8Array(n)},generateParams:function(e,t,n){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:return dr.rsa.generate(t,65537).then(({n:r,e:i,d:a,p:l,q:c,u:h})=>({privateParams:{d:a,p:l,q:c,u:h},publicParams:{n:r,e:i}}));case ve.publicKey.ecdsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{d:a},publicParams:{oid:new Ms(r),Q:i}}));case ve.publicKey.eddsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{seed:a},publicParams:{oid:new Ms(r),Q:i}}));case ve.publicKey.ecdh:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a,hash:l,cipher:c})=>({privateParams:{d:a},publicParams:{oid:new Ms(r),Q:i,kdfParams:new p4({hash:l,cipher:c})}}));case ve.publicKey.dsa:case ve.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,n){if(!t||!n)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const{n:r,e:i}=t,{d:a,p:l,q:c,u:h}=n;return dr.rsa.validateParams(r,i,a,l,c,h)}case ve.publicKey.dsa:{const{p:r,q:i,g:a,y:l}=t,{x:c}=n;return dr.dsa.validateParams(r,i,a,l,c)}case ve.publicKey.elgamal:{const{p:r,g:i,y:a}=t,{x:l}=n;return dr.elgamal.validateParams(r,i,a,l)}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const r=dr.elliptic[ve.read(ve.publicKey,e)],{oid:i,Q:a}=t,{d:l}=n;return r.validateParams(i,a,l)}case ve.publicKey.eddsa:{const{oid:r,Q:i}=t,{seed:a}=n;return dr.elliptic.eddsa.validateParams(r,i,a)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=cl(e),n=await Ks(t),r=new Uint8Array([n[n.length-2],n[n.length-1]]);return Te.concat([n,r])},generateSessionKey:function(e){const{keySize:t}=cl(e);return Ks(t)},getAEADMode:function(e){const t=ve.read(ve.aead,e);return DP[t]},getCipher:cl});const Kt={cipher:sh,hash:Nc,mode:DP,publicKey:dr,signature:uY,random:HG,pkcs1:GG,pkcs5:iY,aesKW:rY};Object.assign(Kt,cY);var lh=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function jP(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const zP={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(let a=0;a =0;)e[t]=0}const vY=0,YP=1,mY=2,O2=29,uh=256,Ff=uh+1+O2,kc=30,P2=19,_4=2*Ff+1,eu=15,Yy=16,gY=7,T2=256,XP=16,JP=17,ZP=18,Ab=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],bm=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_Y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],y4=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],lo=Array(2*(Ff+2));Qc(lo);const bf=Array(2*kc);Qc(bf);const Bf=Array(512);Qc(Bf);const Uf=Array(256);Qc(Uf);const A2=Array(O2);Qc(A2);const pg=Array(kc);function Xy(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let b4,w4,C4;function Jy(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function QP(e){return e<256?Bf[e]:Bf[256+(e>>>7)]}function jf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Hi(e,t,n){e.bi_valid>Yy-n?(e.bi_buf|=t< >Yy-e.bi_valid,e.bi_valid+=n-Yy):(e.bi_buf|=t< >>=1,n<<=1;while(--t>0);return n>>>1}function eT(e,t,n){const r=Array(eu+1);let i,a,l=0;for(i=1;i<=eu;i++)r[i]=l=l+n[i-1]<<1;for(a=0;a<=t;a++){const c=e[2*a+1];c!==0&&(e[2*a]=qP(r[c]++,c))}}function tT(e){let t;for(t=0;t 8?jf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x4(e,t,n,r){const i=2*t,a=2*n;return e[i] >1;l>=1;l--)Zy(e,n,l);h=a;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Zy(e,n,1),c=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=c,n[2*h]=n[2*l]+n[2*c],e.depth[h]=(e.depth[l]>=e.depth[c]?e.depth[l]:e.depth[c])+1,n[2*l+1]=n[2*c+1]=h,e.heap[1]=h++,Zy(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(p,d){const v=d.dyn_tree,m=d.max_code,_=d.stat_desc.static_tree,y=d.stat_desc.has_stree,b=d.stat_desc.extra_bits,E=d.stat_desc.extra_base,O=d.stat_desc.max_length;let x,C,D,P,w,M,T=0;for(P=0;P<=eu;P++)p.bl_count[P]=0;for(v[2*p.heap[p.heap_max]+1]=0,x=p.heap_max+1;x<_4;x++)C=p.heap[x],P=v[2*v[2*C+1]+1]+1,P>O&&(P=O,T++),v[2*C+1]=P,C>m||(p.bl_count[P]++,w=0,C>=E&&(w=b[C-E]),M=v[2*C],p.opt_len+=M*(P+w),y&&(p.static_len+=M*(_[2*C+1]+w)));if(T!==0){do{for(P=O-1;p.bl_count[P]===0;)P--;p.bl_count[P]--,p.bl_count[P+1]+=2,p.bl_count[O]--,T-=2}while(T>0);for(P=O;P!==0;P--)for(C=p.bl_count[P];C!==0;)D=p.heap[--x],D>m||(v[2*D+1]!==P&&(p.opt_len+=(P-v[2*D+1])*v[2*D],v[2*D+1]=P),C--)}}(e,t),eT(n,s,e.bl_count)}function E4(e,t,n){let r,i,a=-1,l=t[1],c=0,h=7,s=4;for(l===0&&(h=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=l,l=t[2*(r+1)+1],++c >=7;i =8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function wY(e,t,n,r){let i,a,l=0;e.level>0?(e.strm.data_type===GP&&(e.strm.data_type=function(c){let h,s=4093624447;for(h=0;h<=31;h++,s>>>=1)if(1&s&&c.dyn_ltree[2*h]!==0)return m4;if(c.dyn_ltree[18]!==0||c.dyn_ltree[20]!==0||c.dyn_ltree[26]!==0)return g4;for(h=32;h =3&&c.bl_tree[2*y4[h]+1]===0;h--);return c.opt_len+=3*(h+1)+5+5+4,h}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?rT(e,t,n,r):e.strategy===KP||a===i?(Hi(e,(YP<<1)+(r?1:0),3),S4(e,lo,bf)):(Hi(e,(mY<<1)+(r?1:0),3),function(c,h,s,p){let d;for(Hi(c,h-257,5),Hi(c,s-1,5),Hi(c,p-4,4),d=0;d >>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Uf[n]+uh+1)]++,e.dyn_dtree[2*QP(t)]++),e.last_lit===e.lit_bufsize-1}function zf(e,t,n,r){let i=65535&e|0,a=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,a=a+i|0;while(--l);i%=65521,a%=65521}return i|a<<16|0}const CY=function(){let e;const t=[];for(let n=0;n<256;n++){e=n;for(let r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Kr(e,t,n,r){const i=CY,a=r+n;e^=-1;for(let l=r;l>>8^i[255&(e^t[l])];return-1^e}var Vf={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const xY=9,Bn=3,nl=258,rs=nl+Bn+1,SY=32,vg=42,Mb=69,wm=73,Cm=91,xm=103,tu=113,ef=666,Gr=1,wf=2,nu=3,Oc=4,EY=3;function rl(e,t){return e.msg=Vf[t],t}function O4(e){return(e<<1)-(e>4?9:0)}function Zo(e){let t=e.length;for(;--t>=0;)e[t]=0}function Ko(e){const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Ys(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function si(e,t){wY(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ko(e.strm)}function zn(e,t){e.pending_buf[e.pending++]=t}function Rd(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function DY(e,t,n,r){let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Ys(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=zf(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Kr(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function iT(e,t){let n,r,i=e.max_chain_length,a=e.strstart,l=e.prev_length,c=e.nice_match;const h=e.strstart>e.w_size-rs?e.strstart-(e.w_size-rs):0,s=e.window,p=e.w_mask,d=e.prev,v=e.strstart+nl;let m=s[a+l-1],_=s[a+l];e.prev_length>=e.good_match&&(i>>=2),c>e.lookahead&&(c=e.lookahead);do if(n=t,s[n+l]===_&&s[n+l-1]===m&&s[n]===s[a]&&s[++n]===s[a+1]){a+=2,n++;do;while(s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&a
l){if(e.match_start=t,l=r,r>=c)break;m=s[a+l-1],_=s[a+l]}}while((t=d[t&p])>h&&--i!=0);return l<=e.lookahead?l:e.lookahead}function yu(e){const t=e.w_size;let n,r,i,a,l;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-rs)){Ys(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=DY(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=Bn)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h< =Bn&&(e.ins_h=(e.ins_h< =Bn)if(r=dl(e,e.strstart-e.match_start,e.match_length-Bn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Bn){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h< =Bn&&(e.ins_h=(e.ins_h< 4096)&&(e.match_length=Bn-1)),e.prev_length>=Bn&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Bn,r=dl(e,e.strstart-1-e.prev_match,e.prev_length-Bn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h< e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(yu(e),e.lookahead===0&&t===Xs)return Gr;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,si(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-rs&&(si(e,!1),e.strm.avail_out===0))return Gr}return e.insert=0,t===Xr?(si(e,!0),e.strm.avail_out===0?nu:Oc):(e.strstart>e.block_start&&(si(e,!1),e.strm.avail_out),Gr)}),new Ss(4,4,8,4,qy),new Ss(4,5,16,8,qy),new Ss(4,6,32,32,qy),new Ss(4,4,16,16,ic),new Ss(8,16,32,32,ic),new Ss(8,16,128,128,ic),new Ss(8,32,128,256,ic),new Ss(32,128,258,1024,ic),new Ss(32,258,258,4096,ic)];class kY{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Lc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ia(1146),this.dyn_dtree=new Ia(122),this.bl_tree=new Ia(78),Zo(this.dyn_ltree),Zo(this.dyn_dtree),Zo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ia(16),this.heap=new Ia(573),Zo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ia(573),Zo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}}function OY(e){const t=function(n){let r;return n&&n.state?(n.total_in=n.total_out=0,n.data_type=GP,r=n.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?vg:tu,n.adler=r.wrap===2?0:1,r.last_flush=Xs,yY(r),Xn):rl(n,Fr)}(e);return t===Xn&&function(n){n.window_size=2*n.w_size,Zo(n.head),n.max_lazy_match=tf[n.level].max_lazy,n.good_match=tf[n.level].good_length,n.nice_match=tf[n.level].nice_length,n.max_chain_length=tf[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=Bn-1,n.match_available=0,n.ins_h=0}(e.state),t}function PY(e,t){let n,r,i,a;if(!e||!e.state||t>Tb||t<0)return e?rl(e,Fr):Fr;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===ef&&t!==Xr)return rl(e,e.avail_out===0?yf:Fr);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===vg)if(r.wrap===2)e.adler=0,zn(r,31),zn(r,139),zn(r,8),r.gzhead?(zn(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),zn(r,255&r.gzhead.time),zn(r,r.gzhead.time>>8&255),zn(r,r.gzhead.time>>16&255),zn(r,r.gzhead.time>>24&255),zn(r,r.level===9?2:r.strategy>=Lv||r.level<2?4:0),zn(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(zn(r,255&r.gzhead.extra.length),zn(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Kr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Mb):(zn(r,0),zn(r,0),zn(r,0),zn(r,0),zn(r,0),zn(r,r.level===9?2:r.strategy>=Lv||r.level<2?4:0),zn(r,EY),r.status=tu);else{let c=Lc+(r.w_bits-8<<4)<<8,h=-1;h=r.strategy>=Lv||r.level<2?0:r.level<6?1:r.level===6?2:3,c|=h<<6,r.strstart!==0&&(c|=SY),c+=31-c%31,r.status=tu,Rd(r,c),r.strstart!==0&&(Rd(r,e.adler>>>16),Rd(r,65535&e.adler)),e.adler=1}if(r.status===Mb)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ko(e),i=r.pending,r.pending!==r.pending_buf_size));)zn(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=wm)}else r.status=wm;if(r.status===wm)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ko(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=Cm)}else r.status=Cm;if(r.status===Cm)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ko(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=xm)}else r.status=xm;if(r.status===xm&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ko(e),r.pending+2<=r.pending_buf_size&&(zn(r,255&e.adler),zn(r,e.adler>>8&255),e.adler=0,r.status=tu)):r.status=tu),r.pending!==0){if(Ko(e),e.avail_out===0)return r.last_flush=-1,Xn}else if(e.avail_in===0&&O4(t)<=O4(n)&&t!==Xr)return rl(e,yf);if(r.status===ef&&e.avail_in!==0)return rl(e,yf);if(e.avail_in!==0||r.lookahead!==0||t!==Xs&&r.status!==ef){var l=r.strategy===Lv?function(c,h){let s;for(;;){if(c.lookahead===0&&(yu(c),c.lookahead===0)){if(h===Xs)return Gr;break}if(c.match_length=0,s=dl(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++,s&&(si(c,!1),c.strm.avail_out===0))return Gr}return c.insert=0,h===Xr?(si(c,!0),c.strm.avail_out===0?nu:Oc):c.last_lit&&(si(c,!1),c.strm.avail_out===0)?Gr:wf}(r,t):r.strategy===pY?function(c,h){let s,p,d,v;const m=c.window;for(;;){if(c.lookahead<=nl){if(yu(c),c.lookahead<=nl&&h===Xs)return Gr;if(c.lookahead===0)break}if(c.match_length=0,c.lookahead>=Bn&&c.strstart>0&&(d=c.strstart-1,p=m[d],p===m[++d]&&p===m[++d]&&p===m[++d])){v=c.strstart+nl;do;while(p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&d c.lookahead&&(c.match_length=c.lookahead)}if(c.match_length>=Bn?(s=dl(c,1,c.match_length-Bn),c.lookahead-=c.match_length,c.strstart+=c.match_length,c.match_length=0):(s=dl(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++),s&&(si(c,!1),c.strm.avail_out===0))return Gr}return c.insert=0,h===Xr?(si(c,!0),c.strm.avail_out===0?nu:Oc):c.last_lit&&(si(c,!1),c.strm.avail_out===0)?Gr:wf}(r,t):tf[r.level].func(r,t);if(l!==nu&&l!==Oc||(r.status=ef),l===Gr||l===nu)return e.avail_out===0&&(r.last_flush=-1),Xn;if(l===wf&&(t===dY?bY(r):t!==Tb&&(rT(r,0,0,!1),t===fY&&(Zo(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Ko(e),e.avail_out===0))return r.last_flush=-1,Xn}return t!==Xr?Xn:r.wrap<=0?_o:(r.wrap===2?(zn(r,255&e.adler),zn(r,e.adler>>8&255),zn(r,e.adler>>16&255),zn(r,e.adler>>24&255),zn(r,255&e.total_in),zn(r,e.total_in>>8&255),zn(r,e.total_in>>16&255),zn(r,e.total_in>>24&255)):(Rd(r,e.adler>>>16),Rd(r,65535&e.adler)),Ko(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Xn:_o)}try{String.fromCharCode.call(null,0)}catch{}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const Ib=new zs(256);for(let e=0;e<256;e++)Ib[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;function $b(e){let t,n,r,i,a=0;const l=e.length;for(r=0;r >>6,c[i++]=128|63&t):t<65536?(c[i++]=224|t>>>12,c[i++]=128|t>>>6&63,c[i++]=128|63&t):(c[i++]=240|t>>>18,c[i++]=128|t>>>12&63,c[i++]=128|t>>>6&63,c[i++]=128|63&t);return c}Ib[254]=Ib[254]=1;class aT{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}class Rb{constructor(t){this.options={level:v4,method:Lc,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...t||{}};const n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new aT,this.strm.avail_out=0;var r,i,a=function(l,c,h,s,p,d){if(!l)return Fr;let v=1;if(c===v4&&(c=6),s<0?(v=0,s=-s):s>15&&(v=2,s-=16),p<1||p>xY||h!==Lc||s<8||s>15||c<0||c>9||d<0||d>KP)return rl(l,Fr);s===8&&(s=9);const m=new kY;return l.state=m,m.strm=l,m.wrap=v,m.gzhead=null,m.w_bits=s,m.w_size=1< =s.w_size&&(v===0&&(Zo(s.head),s.strstart=0,s.block_start=0,s.insert=0),b=new zs(s.w_size),Ys(b,h,E-s.w_size,s.w_size,0),h=b,E=s.w_size),m=c.avail_in,_=c.next_in,y=c.input,c.avail_in=E,c.next_in=0,c.input=h,yu(s);s.lookahead>=Bn;){p=s.strstart,d=s.lookahead-(Bn-1);do s.ins_h=(s.ins_h< 0||r.avail_out===0)&&a!==_o);return l===Xr?(a=function(c){let h;return c&&c.state?(h=c.state.status,h!==vg&&h!==Mb&&h!==wm&&h!==Cm&&h!==xm&&h!==tu&&h!==ef?rl(c,Fr):(c.state=null,h===tu?rl(c,k2):Xn)):Fr}(this.strm),this.onEnd(a),this.ended=!0,a===Xn):l!==Lf||(this.onEnd(Xn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Xn&&(this.result=WP(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}const Fv=30,TY=12;function AY(e,t){let n,r,i,a,l,c,h,s,p,d;const v=e.state;n=e.next_in;const m=e.input,_=n+(e.avail_in-5);r=e.next_out;const y=e.output,b=r-(t-e.avail_out),E=r+(e.avail_out-257),O=v.dmax,x=v.wsize,C=v.whave,D=v.wnext,P=v.window;i=v.hold,a=v.bits;const w=v.lencode,M=v.distcode,T=(1< >>24,i>>>=c,a-=c,c=l>>>16&255,c===0)y[r++]=65535&l;else{if(!(16&c)){if((64&c)==0){l=w[(65535&l)+(i&(1< >>=c,a-=c),a<15&&(i+=m[n++]<>>24,i>>>=c,a-=c,c=l>>>16&255,!(16&c)){if((64&c)==0){l=M[(65535&l)+(i&(1< O){e.msg="invalid distance too far back",v.mode=Fv;break e}if(i>>>=c,a-=c,c=r-b,s>c){if(c=s-c,c>C&&v.sane){e.msg="invalid distance too far back",v.mode=Fv;break e}if(p=0,d=P,D===0){if(p+=x-c,c 2;)y[r++]=d[p++],y[r++]=d[p++],y[r++]=d[p++],h-=3;h&&(y[r++]=d[p++],h>1&&(y[r++]=d[p++]))}else{p=r-s;do y[r++]=y[p++],y[r++]=y[p++],y[r++]=y[p++],h-=3;while(h>2);h&&(y[r++]=y[p++],h>1&&(y[r++]=y[p++]))}break}}break}}while(n<_&&r >3,n-=h,a-=h<<3,i&=(1<=1&&R[E]===0;E--);if(O>E&&(O=E),E===0)return i[a++]=20971520,i[a++]=20971520,c.bits=1,0;for(b=1;b 0&&(e===A4||E!==1))return-1;for(K[1]=0,_=1;_ P4||e===M4&&P>T4)return 1;for(;;){L=_-C,l[y] m?(z=oe[Pe+l[y]],U=M[T+l[y]]):(z=96,U=0),s=1<<_-C,p=1< >C)+p]=L<<24|z<<16|U|0;while(p!==0);for(s=1<<_-1;w&s;)s>>=1;if(s!==0?(w&=s-1,w+=s):w=0,y++,--R[_]==0){if(_===E)break;_=t[n+l[y]]}if(_>O&&(w&he)!==d){for(C===0&&(C=O),v+=b,x=_-C,D=1< P4||e===M4&&P>T4)return 1;d=w&he,i[d]=O<<24|x<<16|v-a|0}}return w!==0&&(i[v+w]=_-C<<24|64<<16|0),c.bits=O,0}const NY=0,sT=1,oT=2,lT=1,I4=2,$4=3,R4=4,N4=5,L4=6,F4=7,B4=8,U4=9,j4=10,mg=11,ao=12,t0=13,z4=14,n0=15,V4=16,W4=17,H4=18,K4=19,Bv=20,Uv=21,G4=22,Y4=23,X4=24,J4=25,Z4=26,r0=27,Q4=28,q4=29,gr=30,LY=852,FY=592;function ek(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}class BY{constructor(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ia(320),this.work=new Ia(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function UY(e){let t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,function(n){let r;return n&&n.state?(r=n.state,n.total_in=n.total_out=r.total=0,n.msg="",r.wrap&&(n.adler=1&r.wrap),r.mode=lT,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new hg(LY),r.distcode=r.distdyn=new hg(FY),r.sane=1,r.back=-1,Xn):Fr}(e)):Fr}function jY(e,t){let n,r;return e?(r=new BY,e.state=r,r.window=null,n=function(i,a){let l,c;return i&&i.state?(c=i.state,a<0?(l=0,a=-a):(l=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?Fr:(c.window!==null&&c.wbits!==a&&(c.window=null),c.wrap=l,c.wbits=a,UY(i))):Fr}(e,t),n!==Xn&&(e.state=null),n):Fr}let i0,a0,tk=!0;function zY(e){if(tk){let t;for(i0=new hg(512),a0=new hg(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Cf(sT,e.lens,0,288,i0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Cf(oT,e.lens,0,32,a0,0,e.work,{bits:5}),tk=!1}e.lencode=i0,e.lenbits=9,e.distcode=a0,e.distbits=5}function uT(e,t,n,r){let i;const a=e.state;return a.window===null&&(a.wsize=1< =a.wsize?(Ys(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),Ys(a.window,t,n-r,i,a.wnext),(r-=i)?(Ys(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave >>8&255,n.check=Kr(n.check,K,2,0),s=0,p=0,n.mode=I4;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&s)<<8)+(s>>8))%31){e.msg="incorrect header check",n.mode=gr;break}if((15&s)!==Lc){e.msg="unknown compression method",n.mode=gr;break}if(s>>>=4,p-=4,P=8+(15&s),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=gr;break}n.dmax=1< >8&1),512&n.flags&&(K[0]=255&s,K[1]=s>>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0,n.mode=$4;case $4:for(;p<32;){if(c===0)break e;c--,s+=r[a++]<
>>8&255,K[2]=s>>>16&255,K[3]=s>>>24&255,n.check=Kr(n.check,K,4,0)),s=0,p=0,n.mode=R4;case R4:for(;p<16;){if(c===0)break e;c--,s+=r[a++]<
>8),512&n.flags&&(K[0]=255&s,K[1]=s>>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0,n.mode=N4;case N4:if(1024&n.flags){for(;p<16;){if(c===0)break e;c--,s+=r[a++]<
>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0}else n.head&&(n.head.extra=null);n.mode=L4;case L4:if(1024&n.flags&&(m=n.length,m>c&&(m=c),m&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),Ys(n.head.extra,r,a,m,P)),512&n.flags&&(n.check=Kr(n.check,r,m,a)),c-=m,a+=m,n.length-=m),n.length))break e;n.length=0,n.mode=F4;case F4:if(2048&n.flags){if(c===0)break e;m=0;do P=r[a+m++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&m
>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ao;break;case j4:for(;p<32;){if(c===0)break e;c--,s+=r[a++]< >>=7&p,p-=7&p,n.mode=r0;break}for(;p<3;){if(c===0)break e;c--,s+=r[a++]<
>>=1,p-=1,3&s){case 0:n.mode=z4;break;case 1:if(zY(n),n.mode=Bv,t===Nv){s>>>=2,p-=2;break e}break;case 2:n.mode=W4;break;case 3:e.msg="invalid block type",n.mode=gr}s>>>=2,p-=2;break;case z4:for(s>>>=7&p,p-=7&p;p<32;){if(c===0)break e;c--,s+=r[a++]<
>>16^65535)){e.msg="invalid stored block lengths",n.mode=gr;break}if(n.length=65535&s,s=0,p=0,n.mode=n0,t===Nv)break e;case n0:n.mode=V4;case V4:if(m=n.length,m){if(m>c&&(m=c),m>h&&(m=h),m===0)break e;Ys(i,r,a,m,l),c-=m,a+=m,h-=m,l+=m,n.length-=m;break}n.mode=ao;break;case W4:for(;p<14;){if(c===0)break e;c--,s+=r[a++]<
>>=5,p-=5,n.ndist=1+(31&s),s>>>=5,p-=5,n.ncode=4+(15&s),s>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=gr;break}n.have=0,n.mode=H4;case H4:for(;n.have
>>=3,p-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},w=Cf(NY,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,w){e.msg="invalid code lengths set",n.mode=gr;break}n.have=0,n.mode=K4;case K4:for(;n.have >>24,E=R>>>16&255,O=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]< >>=b,p-=b,n.lens[n.have++]=O;else{if(O===16){for(T=b+2;p
>>=b,p-=b,n.have===0){e.msg="invalid bit length repeat",n.mode=gr;break}P=n.lens[n.have-1],m=3+(3&s),s>>>=2,p-=2}else if(O===17){for(T=b+3;p >>=b,p-=b,P=0,m=3+(7&s),s>>>=3,p-=3}else{for(T=b+7;p >>=b,p-=b,P=0,m=11+(127&s),s>>>=7,p-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=gr;break}for(;m--;)n.lens[n.have++]=P}}if(n.mode===gr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=gr;break}if(n.lenbits=9,M={bits:n.lenbits},w=Cf(sT,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,w){e.msg="invalid literal/lengths set",n.mode=gr;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},w=Cf(oT,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,w){e.msg="invalid distances set",n.mode=gr;break}if(n.mode=Bv,t===Nv)break e;case Bv:n.mode=Uv;case Uv:if(c>=6&&h>=258){e.next_out=l,e.avail_out=h,e.next_in=a,e.avail_in=c,n.hold=s,n.bits=p,AY(e,v),l=e.next_out,i=e.output,h=e.avail_out,a=e.next_in,r=e.input,c=e.avail_in,s=n.hold,p=n.bits,n.mode===ao&&(n.back=-1);break}for(n.back=0;R=n.lencode[s&(1< >>24,E=R>>>16&255,O=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]< >x)],b=R>>>24,E=R>>>16&255,O=65535&R,!(x+b<=p);){if(c===0)break e;c--,s+=r[a++]<
>>=x,p-=x,n.back+=x}if(s>>>=b,p-=b,n.back+=b,n.length=O,E===0){n.mode=Z4;break}if(32&E){n.back=-1,n.mode=ao;break}if(64&E){e.msg="invalid literal/length code",n.mode=gr;break}n.extra=15&E,n.mode=G4;case G4:if(n.extra){for(T=n.extra;p
>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Y4;case Y4:for(;R=n.distcode[s&(1< >>24,E=R>>>16&255,O=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]< >x)],b=R>>>24,E=R>>>16&255,O=65535&R,!(x+b<=p);){if(c===0)break e;c--,s+=r[a++]<
>>=x,p-=x,n.back+=x}if(s>>>=b,p-=b,n.back+=b,64&E){e.msg="invalid distance code",n.mode=gr;break}n.offset=O,n.extra=15&E,n.mode=X4;case X4:if(n.extra){for(T=n.extra;p
>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=gr;break}n.mode=J4;case J4:if(h===0)break e;if(m=v-h,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=gr;break}m>n.wnext?(m-=n.wnext,_=n.wsize-m):_=n.wnext-m,m>n.length&&(m=n.length),y=n.window}else y=i,_=l-n.offset,m=n.length;m>h&&(m=h),h-=m,n.length-=m;do i[l++]=y[_++];while(--m);n.length===0&&(n.mode=Uv);break;case Z4:if(h===0)break e;i[l++]=n.length,h--,n.mode=Uv;break;case r0:if(n.wrap){for(;p<32;){if(c===0)break e;c--,s|=r[a++]< =0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),!(n.windowBits>=0&&n.windowBits<16)||t&&t.windowBits||(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(15&n.windowBits)==0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new aT,this.strm.avail_out=0;let r=jY(this.strm,n.windowBits);if(r!==Xn||(this.header=new WY,function(i,a){let l;i&&i.state&&(l=i.state,(2&l.wrap)==0||(l.head=a,a.done=!1))}(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=$b(n.dictionary):n.dictionary instanceof ArrayBuffer&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(r=nk(this.strm,n.dictionary),r!==Xn))))throw Error(Vf[r])}push(t,n){const{strm:r,options:{chunkSize:i,dictionary:a}}=this;let l,c,h=!1;if(this.ended)return!1;c=n===~~n?n:n===!0?Xr:Xs,typeof t=="string"?r.input=function(s){const p=new zs(s.length);for(let d=0,v=p.length;d
0||r.avail_out===0)&&l!==_o);return l===_o&&(c=Xr),c===Xr?(l=function(s){if(!s||!s.state)return Fr;const p=s.state;return p.window&&(p.window=null),s.state=null,Xn}(this.strm),this.onEnd(l),this.ended=!0,l===Xn):c!==Lf||(this.onEnd(Xn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Xn&&(this.result=WP(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}var ik=[0,1,3,7,15,31,63,127,255],nf=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};nf.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},nf.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var n=8-this.bitOffset;if(e>=n)t<<=n,t|=ik[n]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=n;else{t<<=e;var r=n-e;t|=(this.curByte&ik[e]< >r,this.bitOffset+=e,e=0}}return t},nf.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},nf.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e ("00"+r.toString(16)).slice(-2)).join("")}(t)};var HY=nf,Hl=function(){};Hl.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Hl.prototype.read=function(e,t,n){for(var r=0;r >>0},this.updateCRC=function(t){e=e<<8^s0[255&(e>>>24^t)]},this.updateCRCRun=function(t,n){for(;n-- >0;)e=e<<8^s0[255&(e>>>24^t)]}}),ak=function(e,t){var n,r=e[t];for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},_r={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Go={};Go[_r.LAST_BLOCK]="Bad file checksum",Go[_r.NOT_BZIP_DATA]="Not bzip data",Go[_r.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Go[_r.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Go[_r.DATA_ERROR]="Data error",Go[_r.OUT_OF_MEMORY]="Out of memory",Go[_r.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var ni=function(e,t){var n=Go[e]||"unknown error";t&&(n+=": "+t);var r=new TypeError(n);throw r.errorCode=e,r},rf=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};rf.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new KY,!0):(this.writeCount=-1,!1)},rf.prototype._start_bunzip=function(e,t){var n=new Uint8Array(4);e.read(n,0,4)===4&&String.fromCharCode(n[0],n[1],n[2])==="BZh"||ni(_r.NOT_BZIP_DATA,"bad magic");var r=n[3]-48;(r<1||r>9)&&ni(_r.NOT_BZIP_DATA,"level out of range"),this.reader=new HY(e),this.dbufSize=1e5*r,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},rf.prototype._get_next_block=function(){var e,t,n,r=this.reader,i=r.pi();if(i==="177245385090")return!1;i!=="314159265359"&&ni(_r.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&ni(_r.OBSOLETE_INPUT);var a=r.read(24);a>this.dbufSize&&ni(_r.DATA_ERROR,"initial position out of bounds");var l=r.read(16),c=new Uint8Array(256),h=0;for(e=0;e<16;e++)if(l&1<<15-e){var s=16*e;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(c[h++]=s+t)}var p=r.read(3);(p<2||p>6)&&ni(_r.DATA_ERROR);var d=r.read(15);d===0&&ni(_r.DATA_ERROR);var v=new Uint8Array(256);for(e=0;e =p&&ni(_r.DATA_ERROR);m[e]=ak(v,t)}var _,y=h+2,b=[];for(t=0;t
20)&&ni(_r.DATA_ERROR),r.read(1);)r.read(1)?l--:l++;x[e]=l}for(E=O=x[0],e=1;e
O?O=x[e]:x[e] =d&&ni(_r.DATA_ERROR),_=b[m[R++]]),e=_.minLen,t=r.read(e);e>_.maxLen&&ni(_r.DATA_ERROR),!(t<=_.limit[e]);e++)t=t<<1|r.read(1);((t-=_.base[e])<0||t>=258)&&ni(_r.DATA_ERROR);var L=_.permute[t];if(L!==0&&L!==1){if(M)for(M=0,T+l>this.dbufSize&&ni(_r.DATA_ERROR),P[w=c[v[0]]]+=l;l--;)K[T++]=w;if(L>h)break;T>=this.dbufSize&&ni(_r.DATA_ERROR),P[w=c[w=ak(v,e=L-1)]]++,K[T++]=w}else M||(M=1,l=0),l+=L===0?M:2*M,M<<=1}for((a<0||a>=T)&&ni(_r.DATA_ERROR),t=0,e=0;e<256;e++)n=t+P[e],P[e]=t,t=n;for(e=0;e >=8,oe=-1),this.writePos=z,this.writeCurrent=U,this.writeCount=T,this.writeRun=oe,!0},rf.prototype._read_bunzip=function(e,t){var n,r,i;if(this.writeCount<0)return 0;var a=this.dbuf,l=this.writePos,c=this.writeCurrent,h=this.writeCount;this.outputsize;for(var s=this.writeRun;h;){for(h--,r=c,c=255&(l=a[l]),l>>=8,s++==3?(n=c,i=r,c=-1):(n=1,i=c),this.blockCRC.updateCRCRun(i,n);n--;)this.outputStream.writeByte(i),this.nextoutput++;c!=r&&(s=0)}return this.writeCount=h,this.blockCRC.getCRC()!==this.targetBlockCRC&&ni(_r.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var GY=function(e){if("readByte"in e)return e;var t=new cT;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(n){this.pos=n},t.eof=function(){return this.pos>=e.length},t},YY=function(e){var t=new cT,n=!0;if(e)if(typeof e=="number")t.buffer=new Uint8Array(e),n=!1;else{if("writeByte"in e)return e;t.buffer=e,n=!1}else t.buffer=new Uint8Array(16384);return t.pos=0,t.writeByte=function(r){if(n&&this.pos>=this.buffer.length){var i=new Uint8Array(2*this.buffer.length);i.set(this.buffer),this.buffer=i}this.buffer[this.pos++]=r},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!n)throw new TypeError("outputsize does not match decoded input");var r=new Uint8Array(this.pos);r.set(this.buffer.subarray(0,this.pos)),this.buffer=r}return this.buffer},t._coerced=!0,t},sk=function(e,t,n){for(var r=GY(e),i=YY(t),a=new rf(r,i);!("eof"in r)||!r.eof();)if(a._init_block())a._read_bunzip();else{var l=a.reader.read(32)>>>0;if(l!==a.streamCRC&&ni(_r.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+l.toString(16)+")"),!n||!("eof"in r)||r.eof())break;a._start_bunzip(r,i)}if("getBuffer"in i)return i.getBuffer()};class qc{static get tag(){return ve.packet.literalData}constructor(t=new Date){this.format=ve.literal.utf8,this.date=Te.normalizeDate(t),this.text=null,this.data=null,this.filename=""}setText(t,n=ve.literal.utf8){this.format=n,this.text=t,this.data=null}getText(t=!1){return(this.text===null||Te.isStream(this.text))&&(this.text=Te.decodeUTF8(Te.nativeEOL(this.getBytes(t)))),this.text}setBytes(t,n){this.format=n,this.data=t,this.text=null}getBytes(t=!1){return this.data===null&&(this.data=Te.canonicalizeEOL(Te.encodeUTF8(this.text))),t?Sc(this.data):this.data}setFilename(t){this.filename=t}getFilename(){return this.filename}async read(t){await r_(t,async n=>{const r=await n.readByte(),i=await n.readByte();this.filename=Te.decodeUTF8(await n.readBytes(i)),this.date=Te.readDate(await n.readBytes(4));let a=n.remainder();Ar(a)&&(a=await Ir(a)),this.setBytes(a,r)})}writeHeader(){const t=Te.encodeUTF8(this.filename),n=new Uint8Array([t.length]),r=new Uint8Array([this.format]),i=Te.writeDate(this.date);return Te.concatUint8Array([r,n,t,i])}write(){const t=this.writeHeader(),n=this.getBytes();return Te.concat([t,n])}}const Nd=Symbol("verified"),XY=new Set([ve.signatureSubpacket.issuer,ve.signatureSubpacket.issuerFingerprint,ve.signatureSubpacket.embeddedSignature]);class ci{static get tag(){return ve.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new ml,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[Nd]=null}read(t){let n=0;if(this.version=t[n++],this.version!==4&&this.version!==5)throw new zr(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=t[n++],this.publicKeyAlgorithm=t[n++],this.hashAlgorithm=t[n++],n+=this.readSubPackets(t.subarray(n,t.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=t.subarray(0,n),n+=this.readSubPackets(t.subarray(n,t.length),!1),this.signedHashValue=t.subarray(n,n+2),n+=2,this.params=Kt.signature.parseSignatureParams(this.publicKeyAlgorithm,t.subarray(n,t.length))}writeParams(){return this.params instanceof Promise?Cl(async()=>Kt.serializeParams(this.publicKeyAlgorithm,await this.params)):Kt.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const t=[];return t.push(this.signatureData),t.push(this.writeUnhashedSubPackets()),t.push(this.signedHashValue),t.push(this.writeParams()),Te.concat(t)}async sign(t,n,r=new Date,i=!1){t.version===5?this.version=5:this.version=4;const a=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Te.normalizeDate(r),this.issuerKeyVersion=t.version,this.issuerFingerprint=t.getFingerprintBytes(),this.issuerKeyID=t.getKeyID(),a.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Te.concat(a);const l=this.toHash(this.signatureType,n,i),c=await this.hash(this.signatureType,n,l,i);this.signedHashValue=li(_u(c),0,2);const h=async()=>Kt.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,t.publicParams,t.privateParams,l,await Ir(c));Te.isStream(c)?this.params=h():(this.params=await h(),this[Nd]=!0)}writeHashedSubPackets(){const t=ve.signatureSubpacket,n=[];let r;if(this.created===null)throw Error("Missing signature creation time");n.push(cr(t.signatureCreationTime,!0,Te.writeDate(this.created))),this.signatureExpirationTime!==null&&n.push(cr(t.signatureExpirationTime,!0,Te.writeNumber(this.signatureExpirationTime,4))),this.exportable!==null&&n.push(cr(t.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),this.trustLevel!==null&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),n.push(cr(t.trustSignature,!0,r))),this.regularExpression!==null&&n.push(cr(t.regularExpression,!0,this.regularExpression)),this.revocable!==null&&n.push(cr(t.revocable,!0,new Uint8Array([this.revocable?1:0]))),this.keyExpirationTime!==null&&n.push(cr(t.keyExpirationTime,!0,Te.writeNumber(this.keyExpirationTime,4))),this.preferredSymmetricAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredSymmetricAlgorithms)),n.push(cr(t.preferredSymmetricAlgorithms,!1,r))),this.revocationKeyClass!==null&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Te.concat([r,this.revocationKeyFingerprint]),n.push(cr(t.revocationKey,!1,r))),this.issuerKeyID.isNull()||this.issuerKeyVersion===5||n.push(cr(t.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach(({name:l,value:c,humanReadable:h,critical:s})=>{r=[new Uint8Array([h?128:0,0,0,0])];const p=Te.encodeUTF8(l);r.push(Te.writeNumber(p.length,2)),r.push(Te.writeNumber(c.length,2)),r.push(p),r.push(c),r=Te.concat(r),n.push(cr(t.notationData,s,r))}),this.preferredHashAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredHashAlgorithms)),n.push(cr(t.preferredHashAlgorithms,!1,r))),this.preferredCompressionAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredCompressionAlgorithms)),n.push(cr(t.preferredCompressionAlgorithms,!1,r))),this.keyServerPreferences!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.keyServerPreferences)),n.push(cr(t.keyServerPreferences,!1,r))),this.preferredKeyServer!==null&&n.push(cr(t.preferredKeyServer,!1,Te.encodeUTF8(this.preferredKeyServer))),this.isPrimaryUserID!==null&&n.push(cr(t.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),this.policyURI!==null&&n.push(cr(t.policyURI,!1,Te.encodeUTF8(this.policyURI))),this.keyFlags!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.keyFlags)),n.push(cr(t.keyFlags,!0,r))),this.signersUserID!==null&&n.push(cr(t.signersUserID,!1,Te.encodeUTF8(this.signersUserID))),this.reasonForRevocationFlag!==null&&(r=Te.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),n.push(cr(t.reasonForRevocation,!0,r))),this.features!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.features)),n.push(cr(t.features,!1,r))),this.signatureTargetPublicKeyAlgorithm!==null&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Te.stringToUint8Array(this.signatureTargetHash)),r=Te.concat(r),n.push(cr(t.signatureTarget,!0,r))),this.embeddedSignature!==null&&n.push(cr(t.embeddedSignature,!0,this.embeddedSignature.write())),this.issuerFingerprint!==null&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Te.concat(r),n.push(cr(t.issuerFingerprint,this.version===5,r))),this.preferredAEADAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredAEADAlgorithms)),n.push(cr(t.preferredAEADAlgorithms,!1,r)));const i=Te.concat(n),a=Te.writeNumber(i.length,2);return Te.concat([a,i])}writeUnhashedSubPackets(){const t=[];this.unhashedSubpackets.forEach(i=>{t.push(oh(i.length)),t.push(i)});const n=Te.concat(t),r=Te.writeNumber(n.length,2);return Te.concat([r,n])}readSubPacket(t,n=!0){let r=0;const i=!!(128&t[r]),a=127&t[r];if(n||(this.unhashedSubpackets.push(t.subarray(r,t.length)),XY.has(a)))switch(r++,a){case ve.signatureSubpacket.signatureCreationTime:this.created=Te.readDate(t.subarray(r,t.length));break;case ve.signatureSubpacket.signatureExpirationTime:{const l=Te.readNumber(t.subarray(r,t.length));this.signatureNeverExpires=l===0,this.signatureExpirationTime=l;break}case ve.signatureSubpacket.exportableCertification:this.exportable=t[r++]===1;break;case ve.signatureSubpacket.trustSignature:this.trustLevel=t[r++],this.trustAmount=t[r++];break;case ve.signatureSubpacket.regularExpression:this.regularExpression=t[r];break;case ve.signatureSubpacket.revocable:this.revocable=t[r++]===1;break;case ve.signatureSubpacket.keyExpirationTime:{const l=Te.readNumber(t.subarray(r,t.length));this.keyExpirationTime=l,this.keyNeverExpires=l===0;break}case ve.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.revocationKey:this.revocationKeyClass=t[r++],this.revocationKeyAlgorithm=t[r++],this.revocationKeyFingerprint=t.subarray(r,r+20);break;case ve.signatureSubpacket.issuer:this.issuerKeyID.read(t.subarray(r,t.length));break;case ve.signatureSubpacket.notationData:{const l=!!(128&t[r]);r+=4;const c=Te.readNumber(t.subarray(r,r+2));r+=2;const h=Te.readNumber(t.subarray(r,r+2));r+=2;const s=Te.decodeUTF8(t.subarray(r,r+c)),p=t.subarray(r+c,r+c+h);this.rawNotations.push({name:s,humanReadable:l,value:p,critical:i}),l&&(this.notations[s]=Te.decodeUTF8(p));break}case ve.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.primaryUserID:this.isPrimaryUserID=t[r++]!==0;break;case ve.signatureSubpacket.policyURI:this.policyURI=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.keyFlags:this.keyFlags=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.signersUserID:this.signersUserID=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=t[r++],this.reasonForRevocationString=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.features:this.features=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=t[r++],this.signatureTargetHashAlgorithm=t[r++];const l=Kt.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Te.uint8ArrayToString(t.subarray(r,r+l));break}case ve.signatureSubpacket.embeddedSignature:this.embeddedSignature=new ci,this.embeddedSignature.read(t.subarray(r,t.length));break;case ve.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=t[r++],this.issuerFingerprint=t.subarray(r,t.length),this.issuerKeyVersion===5?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case ve.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...t.subarray(r,t.length)];break;default:{const l=Error("Unknown signature subpacket type "+a);if(i)throw l;Te.printDebug(l)}}}readSubPackets(t,n=!0,r){const i=Te.readNumber(t.subarray(0,2));let a=2;for(;a<2+i;){const l=PP(t.subarray(a,t.length));a+=l.offset,this.readSubPacket(t.subarray(a,a+l.len),n,r),a+=l.len}return a}toSign(t,n){const r=ve.signature;switch(t){case r.binary:return n.text!==null?Te.encodeUTF8(n.getText(!0)):n.getBytes(!0);case r.text:{const i=n.getBytes(!0);return Te.canonicalizeEOL(i)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let i,a;if(n.userID)a=180,i=n.userID;else{if(!n.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");a=209,i=n.userAttribute}const l=i.write();return Te.concat([this.toSign(r.key,n),new Uint8Array([a]),Te.writeNumber(l.length,4),l])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Te.concat([this.toSign(r.key,n),this.toSign(r.key,{key:n.bind})]);case r.key:if(n.key===void 0)throw Error("Key packet is required for this signature.");return n.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,n);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(t,n){let r=0;return Sr(_u(this.signatureData),i=>{r+=i.length},()=>{const i=[];return this.version!==5||this.signatureType!==ve.signature.binary&&this.signatureType!==ve.signature.text||(n?i.push(new Uint8Array(6)):i.push(t.writeHeader())),i.push(new Uint8Array([this.version,255])),this.version===5&&i.push(new Uint8Array(4)),i.push(Te.writeNumber(r,4)),Te.concat(i)})}toHash(t,n,r=!1){const i=this.toSign(t,n);return Te.concat([i,this.signatureData,this.calculateTrailer(n,r)])}async hash(t,n,r,i=!1){return r||(r=this.toHash(t,n,i)),Kt.hash.digest(this.hashAlgorithm,r)}async verify(t,n,r,i=new Date,a=!1,l=Nt){if(!this.issuerKeyID.equals(t.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==t.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const c=n===ve.signature.binary||n===ve.signature.text;if(!(this[Nd]&&!c)){let s,p;if(this.hashed?p=await this.hashed:(s=this.toHash(n,r,a),p=await this.hash(n,r,s)),p=await Ir(p),this.signedHashValue[0]!==p[0]||this.signedHashValue[1]!==p[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[Nd]=await Kt.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,t.publicParams,s,p),!this[Nd])throw Error("Signature verification failed")}const h=Te.normalizeDate(i);if(h&&this.created>h)throw Error("Signature creation time is in the future");if(h&&h>=this.getExpirationTime())throw Error("Signature is expired");if(l.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+ve.read(ve.hash,this.hashAlgorithm).toUpperCase());if(l.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[ve.signature.binary,ve.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+ve.read(ve.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach(({name:s,critical:p})=>{if(p&&l.knownNotations.indexOf(s)<0)throw Error("Unknown critical notation: "+s)}),this.revocationKeyClass!==null)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(t=new Date){const n=Te.normalizeDate(t);return n!==null&&!(this.created<=n&&n ci.prototype.calculateTrailer.apply(await this.correspondingSig,t))}async verify(){const t=await this.correspondingSig;if(!t||t.constructor.tag!==ve.packet.signature)throw Error("Corresponding signature packet missing");if(t.signatureType!==this.signatureType||t.hashAlgorithm!==this.hashAlgorithm||t.publicKeyAlgorithm!==this.publicKeyAlgorithm||!t.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return t.hashed=this.hashed,t.verify.apply(t,arguments)}}function JY(e,t){if(!t[e]){let n;try{n=ve.read(ve.packet,e)}catch{throw new zr("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+n)}return new t[e]}is.prototype.hash=ci.prototype.hash,is.prototype.toHash=ci.prototype.toHash,is.prototype.toSign=ci.prototype.toSign;class Gn extends Array{static async fromBinary(t,n,r=Nt){const i=new Gn;return await i.read(t,n,r),i}async read(t,n,r=Nt){this.stream=xo(t,async(a,l)=>{const c=ea(l);try{for(;;)if(await c.ready,await ZG(a,async h=>{try{if(h.tag===ve.packet.marker||h.tag===ve.packet.trust)return;const s=JY(h.tag,n);s.packets=new Gn,s.fromStream=Te.isStream(h.packet),await s.read(h.packet,r),await c.write(s)}catch(s){const p=!r.ignoreUnsupportedPackets&&s instanceof zr,d=!(r.ignoreMalformedPackets||s instanceof zr);if(p||d||_m(h.tag))await c.abort(s);else{const v=new Pb(h.tag,h.packet);await c.write(v)}Te.printDebugError(s)}}))return await c.ready,void await c.close()}catch(h){await c.abort(h)}});const i=Qs(this.stream);for(;;){const{done:a,value:l}=await i.read();if(a?this.stream=null:this.push(l),a||_m(l.constructor.tag))break}i.releaseLock()}write(){const t=[];for(let n=0;n {if(a.push(h),l+=h.length,l>=c){const s=Math.min(Math.log(l)/Math.LN2|0,30),p=2**s,d=Te.concat([JG(s)].concat(a));return a=[d.subarray(1+p)],l=a[0].length,d.subarray(0,1+p)}},()=>Te.concat([oh(l)].concat(a))))}else{if(Te.isStream(i)){let a=0;t.push(Sr(_u(i),l=>{a+=l.length},()=>l4(r,a)))}else t.push(l4(r,i.length));t.push(i)}}return Te.concat(t)}filterByTag(...t){const n=new Gn,r=i=>a=>i===a;for(let i=0;i n.constructor.tag===t)}indexOfTag(...t){const n=[],r=this,i=a=>l=>a===l;for(let a=0;a {this.algorithm=await r.readByte(),this.compressed=r.remainder(),await this.decompress(n)})}write(){return this.compressed===null&&this.compress(),Te.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(t=Nt){const n=ve.read(ve.compression,this.algorithm),r=qY[n];if(!r)throw Error(n+" decompression not supported");this.packets=await Gn.fromBinary(r(this.compressed),ZY,t)}compress(){const t=ve.read(ve.compression,this.algorithm),n=QY[t];if(!n)throw Error(t+" compression not supported");this.compressed=n(this.packets.write(),this.deflateLevel)}}const Ns=Te.getNodeZlib();function ok(e){return e}function gg(e,t,n={}){return function(r){return!Te.isStream(r)||Ar(r)?Cl(()=>Ir(r).then(i=>new Promise((a,l)=>{e(i,n,(c,h)=>{if(c)return l(c);a(h)})}))):n_(_2(r).pipe(t(n)))}}function _g(e,t={}){return function(n){const r=new e(t);return Sr(n,i=>{if(i.length)return r.push(i,Lf),r.result},()=>{if(e===Rb)return r.push([],Xr),r.result})}}function lk(e){return function(t){return Cl(async()=>e(await Ir(t)))}}const QY=Ns?{zip:(e,t)=>gg(Ns.deflateRaw,Ns.createDeflateRaw,{level:t})(e),zlib:(e,t)=>gg(Ns.deflate,Ns.createDeflate,{level:t})(e)}:{zip:(e,t)=>_g(Rb,{raw:!0,level:t})(e),zlib:(e,t)=>_g(Rb,{level:t})(e)},qY=Ns?{uncompressed:ok,zip:gg(Ns.inflateRaw,Ns.createInflateRaw),zlib:gg(Ns.inflate,Ns.createInflate),bzip2:lk(sk)}:{uncompressed:ok,zip:_g(rk,{raw:!0}),zlib:_g(rk),bzip2:lk(sk)},eX=Te.constructAllowedPackets([qc,ch,is,ci]);class dT{static get tag(){return ve.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(t){await r_(t,async n=>{const r=await n.readByte();if(r!==1)throw new zr(`Version ${r} of the SEIP packet is unsupported.`);this.encrypted=n.remainder()})}write(){return Te.concat([new Uint8Array([1]),this.encrypted])}async encrypt(t,n,r=Nt){const{blockSize:i}=Kt.getCipher(t);let a=this.packets.write();Ar(a)&&(a=await Ir(a));const l=await Kt.getPrefixRandom(t),c=new Uint8Array([211,20]),h=Te.concat([l,a,c]),s=await Kt.hash.sha1(Sc(h)),p=Te.concat([h,s]);return this.encrypted=await Kt.mode.cfb.encrypt(t,n,p,new Uint8Array(i),r),!0}async decrypt(t,n,r=Nt){const{blockSize:i}=Kt.getCipher(t);let a=_u(this.encrypted);Ar(a)&&(a=await Ir(a));const l=await Kt.mode.cfb.decrypt(t,n,a,new Uint8Array(i)),c=li(Sc(l),-20),h=li(l,0,-20),s=Promise.all([Ir(await Kt.hash.sha1(Sc(h))),Ir(c)]).then(([v,m])=>{if(!Te.equalsUint8Array(v,m))throw Error("Modification detected.");return new Uint8Array}),p=li(h,i+2);let d=li(p,0,-2);return d=Yi([d,Cl(()=>s)]),Te.isStream(a)&&r.allowUnauthenticatedStream||(d=await Ir(d)),this.packets=await Gn.fromBinary(d,eX,r),!0}}const tX=Te.constructAllowedPackets([qc,ch,is,ci]);class f_{static get tag(){return ve.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=ve.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(t){await r_(t,async n=>{const r=await n.readByte();if(r!==1)throw new zr(`Version ${r} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await n.readByte(),this.aeadAlgorithm=await n.readByte(),this.chunkSizeByte=await n.readByte();const i=Kt.getAEADMode(this.aeadAlgorithm);this.iv=await n.readBytes(i.ivLength),this.encrypted=n.remainder()})}write(){return Te.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(t,n,r=Nt){this.packets=await Gn.fromBinary(await this.crypt("decrypt",n,_u(this.encrypted)),tX,r)}async encrypt(t,n,r=Nt){this.cipherAlgorithm=t;const{ivLength:i}=Kt.getAEADMode(this.aeadAlgorithm);this.iv=Kt.random.getRandomBytes(i),this.chunkSizeByte=r.aeadChunkSizeByte;const a=this.packets.write();this.encrypted=await this.crypt("encrypt",n,a)}async crypt(t,n,r){const i=Kt.getAEADMode(this.aeadAlgorithm),a=await i(this.cipherAlgorithm,n),l=t==="decrypt"?i.tagLength:0,c=t==="encrypt"?i.tagLength:0,h=2**(this.chunkSizeByte+6)+l,s=new ArrayBuffer(21),p=new Uint8Array(s,0,13),d=new Uint8Array(s),v=new DataView(s),m=new Uint8Array(s,5,8);p.set([192|f_.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let _=0,y=Promise.resolve(),b=0,E=0;const O=this.iv;return xo(r,async(x,C)=>{if(Te.isStream(x)!=="array"){const w=new Rc({},{highWaterMark:Te.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:M=>M.length});vl(w.readable,C),C=w.writable}const D=Qs(x),P=ea(C);try{for(;;){let w=await D.readBytes(h+l)||new Uint8Array;const M=w.subarray(w.length-l);let T,R;if(w=w.subarray(0,w.length-l),!_||w.length?(D.unshift(M),T=a[t](w,i.getNonce(O,m),p),E+=w.length-l+c):(v.setInt32(17,b),T=a[t](M,i.getNonce(O,m),d),E+=c,R=!0),b+=w.length-l,y=y.then(()=>T).then(async K=>{await P.ready,await P.write(K),E-=K.length}).catch(K=>P.abort(K)),(R||E>P.desiredSize)&&await y,R){await P.close();break}v.setInt32(9,++_)}}catch(w){await P.abort(w)}})}}class Nb{static get tag(){return ve.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new ml,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(t){if(this.version=t[0],this.version!==3)throw new zr(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(t.subarray(1,t.length)),this.publicKeyAlgorithm=t[9],this.encrypted=Kt.parseEncSessionKeyParams(this.publicKeyAlgorithm,t.subarray(10))}write(){const t=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),Kt.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return Te.concatUint8Array(t)}async encrypt(t){const n=Te.concatUint8Array([new Uint8Array([ve.write(ve.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,Te.writeChecksum(this.sessionKey)]),r=ve.write(ve.publicKey,this.publicKeyAlgorithm);this.encrypted=await Kt.publicKeyEncrypt(r,t.publicParams,n,t.getFingerprintBytes())}async decrypt(t,n){if(this.publicKeyAlgorithm!==t.algorithm)throw Error("Decryption error");const r=n?Te.concatUint8Array([new Uint8Array([n.sessionKeyAlgorithm]),n.sessionKey,Te.writeChecksum(n.sessionKey)]):null,i=await Kt.publicKeyDecrypt(this.publicKeyAlgorithm,t.publicParams,t.privateParams,this.encrypted,t.getFingerprintBytes(),r),a=i[0],l=i.subarray(1,i.length-2),c=i.subarray(i.length-2),h=Te.writeChecksum(l),s=h[0]===c[0]&h[1]===c[1];if(n){const p=s&a===n.sessionKeyAlgorithm&l.length===n.sessionKey.length;this.sessionKeyAlgorithm=Te.selectUint8(p,a,n.sessionKeyAlgorithm),this.sessionKey=Te.selectUint8Array(p,l,n.sessionKey)}else{if(!(s&&ve.read(ve.symmetric,a)))throw Error("Decryption error");this.sessionKey=l,this.sessionKeyAlgorithm=a}}}class xf{constructor(t=Nt){this.algorithm=ve.hash.sha256,this.type="iterated",this.c=t.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(t){let n=0;switch(this.type=ve.read(ve.s2k,t[n++]),this.algorithm=t[n++],this.type){case"simple":break;case"salted":this.salt=t.subarray(n,n+8),n+=8;break;case"iterated":this.salt=t.subarray(n,n+8),n+=8,this.c=t[n++];break;case"gnu":if(Te.uint8ArrayToString(t.subarray(n,n+3))!=="GNU")throw Error("Unknown s2k type.");if(n+=3,1e3+t[n++]!==1001)throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return n}write(){if(this.type==="gnu-dummy")return new Uint8Array([101,0,...Te.stringToUint8Array("GNU"),1]);const t=[new Uint8Array([ve.write(ve.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":t.push(this.salt);break;case"iterated":t.push(this.salt),t.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return Te.concatUint8Array(t)}async produceKey(t,n){t=Te.encodeUTF8(t);const r=[];let i=0,a=0;for(;i {this.privateParams[t].fill(0),delete this.privateParams[t]}),this.privateParams=null,this.isEncrypted=!0)}}async function uk(e,t,n){const{keySize:r}=Kt.getCipher(n);return e.produceKey(t,r)}var iX=x2(function(e){(function(t){function n(i){function a(){return Yt 0&&(it.semantic=" "),it}}function x(tt,it){return function(){var yt,Ft,Oe,Fe,Ue;for(Fe=l(),yt=s("star"),Oe=0,Ue=it===void 0?0:it;(Ft=tt())!==null;)Oe+=1,d(yt,Ft);return Oe>=Ue?yt:(c(Fe),null)}}function C(tt){return tt.charCodeAt(0)>=128}function D(){return p("cr",m("\r")())}function P(){return p("crlf",_(D,T)())}function w(){return p("dquote",m('"')())}function M(){return p("htab",m(" ")())}function T(){return p("lf",m(` +`)}return Te.concat(s)}class ml{constructor(){this.bytes=""}read(t){this.bytes=Te.uint8ArrayToString(t.subarray(0,8))}write(){return Te.stringToUint8Array(this.bytes)}toHex(){return Te.uint8ArrayToHex(Te.stringToUint8Array(this.bytes))}equals(t,n=!1){return n&&(t.isWildcard()||this.isWildcard())||this.bytes===t.bytes}isNull(){return this.bytes===""}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(t){return t.toHex()}static fromID(t){const n=new ml;return n.read(Te.hexToUint8Array(t)),n}static wildcard(){const t=new ml;return t.read(new Uint8Array(8)),t}}var Tn=function(){var e,t,n=!1;function r(d,v){var m=e[(t[d]+t[v])%255];return d!==0&&v!==0||(m=0),m}var i,a,l,c,h=!1;function s(){function d(y){var b,E,O;for(E=O=function(x){var C=e[255-t[x]];return x===0&&(C=0),C}(y),b=0;b<4;b++)O^=E=255&(E<<1|E>>>7);return O^=99}n||function(){e=[],t=[];var y,b,E=1;for(y=0;y<255;y++)e[y]=E,b=128&E,E<<=1,E&=255,b===128&&(E^=27),E^=e[y],t[e[y]]=y;e[255]=e[0],t[0]=0,n=!0}(),i=[],a=[],l=[[],[],[],[]],c=[[],[],[],[]];for(var v=0;v<256;v++){var m=d(v);i[v]=m,a[m]=v,l[0][v]=r(2,m)<<24|m<<16|m<<8|r(3,m),c[0][m]=r(14,v)<<24|r(9,v)<<16|r(13,v)<<8|r(11,v);for(var _=1;_<4;_++)l[_][v]=l[_-1][v]>>>8|l[_-1][v]<<24,c[_][m]=c[_-1][m]>>>8|c[_-1][m]<<24}h=!0}var p=function(d,v){h||s();var m=new Uint32Array(v);m.set(i,512),m.set(a,768);for(var _=0;_<4;_++)m.set(l[_],4096+1024*_>>2),m.set(c[_],8192+1024*_>>2);var y=function(b,E,O){var x=0,C=0,D=0,P=0,w=0,M=0,T=0,R=0,K=0,L=0,z=0,U=0,oe=0,Pe=0,he=0,ye=0,de=0,Se=0,X=0,se=0,Ce=0,be=new b.Uint32Array(O),re=new b.Uint8Array(O);function Q(fe,ce,Ve,Je,vt,xt,kt,Lt){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,vt=vt|0,xt=xt|0,kt=kt|0,Lt=Lt|0;var pt=0,It=0,Ot=0,hn=0,qt=0,Zt=0,Qt=0,Yt=0;for(pt=Ve|1024,It=Ve|2048,Ot=Ve|3072,vt=vt^be[(fe|0)>>2],xt=xt^be[(fe|4)>>2],kt=kt^be[(fe|8)>>2],Lt=Lt^be[(fe|12)>>2],Yt=16;(Yt|0)<=Je<<4;Yt=Yt+16|0)hn=be[(Ve|vt>>22&1020)>>2]^be[(pt|xt>>14&1020)>>2]^be[(It|kt>>6&1020)>>2]^be[(Ot|Lt<<2&1020)>>2]^be[(fe|Yt|0)>>2],qt=be[(Ve|xt>>22&1020)>>2]^be[(pt|kt>>14&1020)>>2]^be[(It|Lt>>6&1020)>>2]^be[(Ot|vt<<2&1020)>>2]^be[(fe|Yt|4)>>2],Zt=be[(Ve|kt>>22&1020)>>2]^be[(pt|Lt>>14&1020)>>2]^be[(It|vt>>6&1020)>>2]^be[(Ot|xt<<2&1020)>>2]^be[(fe|Yt|8)>>2],Qt=be[(Ve|Lt>>22&1020)>>2]^be[(pt|vt>>14&1020)>>2]^be[(It|xt>>6&1020)>>2]^be[(Ot|kt<<2&1020)>>2]^be[(fe|Yt|12)>>2],vt=hn,xt=qt,kt=Zt,Lt=Qt;x=be[(ce|vt>>22&1020)>>2]<<24^be[(ce|xt>>14&1020)>>2]<<16^be[(ce|kt>>6&1020)>>2]<<8^be[(ce|Lt<<2&1020)>>2]^be[(fe|Yt|0)>>2],C=be[(ce|xt>>22&1020)>>2]<<24^be[(ce|kt>>14&1020)>>2]<<16^be[(ce|Lt>>6&1020)>>2]<<8^be[(ce|vt<<2&1020)>>2]^be[(fe|Yt|4)>>2],D=be[(ce|kt>>22&1020)>>2]<<24^be[(ce|Lt>>14&1020)>>2]<<16^be[(ce|vt>>6&1020)>>2]<<8^be[(ce|xt<<2&1020)>>2]^be[(fe|Yt|8)>>2],P=be[(ce|Lt>>22&1020)>>2]<<24^be[(ce|vt>>14&1020)>>2]<<16^be[(ce|xt>>6&1020)>>2]<<8^be[(ce|kt<<2&1020)>>2]^be[(fe|Yt|12)>>2]}function F(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,fe,ce,Ve,Je)}function I(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0;Q(1024,3072,8192,Ce,fe,Je,Ve,ce),vt=C,C=P,P=vt}function Z(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w^fe,M^ce,T^Ve,R^Je),w=x,M=C,T=D,R=P}function q(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0;Q(1024,3072,8192,Ce,fe,Je,Ve,ce),vt=C,C=P,P=vt,x=x^w,C=C^M,D=D^T,P=P^R,w=fe,M=ce,T=Ve,R=Je}function pe(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),w=x=x^fe,M=C=C^ce,T=D=D^Ve,R=P=P^Je}function Ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),x=x^fe,C=C^ce,D=D^Ve,P=P^Je,w=fe,M=ce,T=Ve,R=Je}function J(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),w=x,M=C,T=D,R=P,x=x^fe,C=C^ce,D=D^Ve,P=P^Je}function Y(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,K,L,z,U),U=~ye&U|ye&U+1,z=~he&z|he&z+((U|0)==0),L=~Pe&L|Pe&L+((z|0)==0),K=~oe&K|oe&K+((L|0)==0),x=x^fe,C=C^ce,D=D^Ve,P=P^Je}function ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0,xt=0,kt=0,Lt=0,pt=0,It=0,Ot=0,hn=0,qt=0,Zt=0;for(fe=fe^w,ce=ce^M,Ve=Ve^T,Je=Je^R,vt=de|0,xt=Se|0,kt=X|0,Lt=se|0;(qt|0)<128;qt=qt+1|0)vt>>>31&&(pt=pt^fe,It=It^ce,Ot=Ot^Ve,hn=hn^Je),vt=vt<<1|xt>>>31,xt=xt<<1|kt>>>31,kt=kt<<1|Lt>>>31,Lt=Lt<<1,Zt=Je&1,Je=Je>>>1|Ve<<31,Ve=Ve>>>1|ce<<31,ce=ce>>>1|fe<<31,fe=fe>>>1,Zt&&(fe=fe^3774873600);w=pt,M=It,T=Ot,R=hn}function te(fe){fe=fe|0,Ce=fe}function Ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,x=fe,C=ce,D=Ve,P=Je}function me(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,w=fe,M=ce,T=Ve,R=Je}function V(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,K=fe,L=ce,z=Ve,U=Je}function De(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,oe=fe,Pe=ce,he=Ve,ye=Je}function ge(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,U=~ye&U|ye&Je,z=~he&z|he&Ve,L=~Pe&L|Pe&ce,K=~oe&K|oe&fe}function le(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=x>>>24,re[fe|1]=x>>>16&255,re[fe|2]=x>>>8&255,re[fe|3]=x&255,re[fe|4]=C>>>24,re[fe|5]=C>>>16&255,re[fe|6]=C>>>8&255,re[fe|7]=C&255,re[fe|8]=D>>>24,re[fe|9]=D>>>16&255,re[fe|10]=D>>>8&255,re[fe|11]=D&255,re[fe|12]=P>>>24,re[fe|13]=P>>>16&255,re[fe|14]=P>>>8&255,re[fe|15]=P&255,16)}function B(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=w>>>24,re[fe|1]=w>>>16&255,re[fe|2]=w>>>8&255,re[fe|3]=w&255,re[fe|4]=M>>>24,re[fe|5]=M>>>16&255,re[fe|6]=M>>>8&255,re[fe|7]=M&255,re[fe|8]=T>>>24,re[fe|9]=T>>>16&255,re[fe|10]=T>>>8&255,re[fe|11]=T&255,re[fe|12]=R>>>24,re[fe|13]=R>>>16&255,re[fe|14]=R>>>8&255,re[fe|15]=R&255,16)}function H(){F(0,0,0,0),de=x,Se=C,X=D,se=P}function W(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)ue[fe&7](re[ce|0]<<24|re[ce|1]<<16|re[ce|2]<<8|re[ce|3],re[ce|4]<<24|re[ce|5]<<16|re[ce|6]<<8|re[ce|7],re[ce|8]<<24|re[ce|9]<<16|re[ce|10]<<8|re[ce|11],re[ce|12]<<24|re[ce|13]<<16|re[ce|14]<<8|re[ce|15]),re[ce|0]=x>>>24,re[ce|1]=x>>>16&255,re[ce|2]=x>>>8&255,re[ce|3]=x&255,re[ce|4]=C>>>24,re[ce|5]=C>>>16&255,re[ce|6]=C>>>8&255,re[ce|7]=C&255,re[ce|8]=D>>>24,re[ce|9]=D>>>16&255,re[ce|10]=D>>>8&255,re[ce|11]=D&255,re[ce|12]=P>>>24,re[ce|13]=P>>>16&255,re[ce|14]=P>>>8&255,re[ce|15]=P&255,Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}function ee(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)xe[fe&1](re[ce|0]<<24|re[ce|1]<<16|re[ce|2]<<8|re[ce|3],re[ce|4]<<24|re[ce|5]<<16|re[ce|6]<<8|re[ce|7],re[ce|8]<<24|re[ce|9]<<16|re[ce|10]<<8|re[ce|11],re[ce|12]<<24|re[ce|13]<<16|re[ce|14]<<8|re[ce|15]),Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}var ue=[F,I,Z,q,pe,Ee,J,Y],xe=[Z,ae];return{set_rounds:te,set_state:Ae,set_iv:me,set_nonce:V,set_mask:De,set_counter:ge,get_state:le,get_iv:B,gcm_init:H,cipher:W,mac:ee}}({Uint8Array,Uint32Array},d,v);return y.set_key=function(b,E,O,x,C,D,P,w,M){var T=m.subarray(0,60),R=m.subarray(256,316);T.set([E,O,x,C,D,P,w,M]);for(var K=b,L=1;K<4*b+28;K++){var z=T[K-1];(K%b==0||b===8&&K%b==4)&&(z=i[z>>>24]<<24^i[z>>>16&255]<<16^i[z>>>8&255]<<8^i[255&z]),K%b==0&&(z=z<<8^z>>>24^L<<24,L=L<<1^(128&L?27:0)),T[K]=T[K-b]^z}for(var U=0;U =K-4?z:c[0][i[z>>>24]]^c[1][i[z>>>16&255]]^c[2][i[z>>>8&255]]^c[3][i[255&z]];y.set_rounds(b+5)},y};return p.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},p.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},p.MAC={CBC:0,GCM:1},p.HEAP_DATA=16384,p}();function UD(e){return e instanceof Uint8Array}function w2(e,t){const n=e?e.byteLength:t||65536;if(4095&n||n<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(n))}function Zl(e,t,n,r,i){const a=e.length-t,l=ai+a.length,0),n=new Uint8Array(t);let r=0;for(let i=0;i >2,a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12),i>16?a.getUint32(16):0,i>16?a.getUint32(20):0,i>24?a.getUint32(24):0,i>24?a.getUint32(28):0),n!==void 0){if(n.length!==16)throw new go("illegal iv size");let l=new DataView(n.buffer,n.byteOffset,n.byteLength);r.set_iv(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(t){if(!UD(t))throw new TypeError("data isn't of expected type");let{heap:n,asm:r}=this.acquire_asm(),i=Tn.ENC[this.mode],a=Tn.HEAP_DATA,l=this.pos,c=this.len,h=0,s=t.length||0,p=0,d=0,v=new Uint8Array(c+s&-16);for(;s>0;)d=Zl(n,l+c,t,h,s),c+=d,h+=d,s-=d,d=r.cipher(i,a+l,c),d&&v.set(n.subarray(l,l+d),p),p+=d,d 0;)m=Zl(n,l+c,t,h,s),c+=m,h+=m,s-=m,m=r.cipher(i,a+l,c-(s?0:v)),m&&_.set(n.subarray(l,l+m),p),p+=m,m 0){if(l%16){if(this.hasOwnProperty("padding"))throw new go("data length must be a multiple of the block size");l+=16-l%16}if(n.cipher(r,i+a,l),this.hasOwnProperty("padding")&&this.padding){let s=t[a+c-1];if(s<1||s>16||s>c)throw new Eb("bad padding");let p=0;for(let d=s;d>1;d--)p|=s^t[a+c-d];if(p)throw new Eb("bad padding");c-=s}}const h=new Uint8Array(c);return c>0&&h.set(t.subarray(a,a+c)),this.pos=0,this.len=0,this.release_asm(),h}}class rg{static encrypt(t,n,r=!1){return new rg(n,r).encrypt(t)}static decrypt(t,n,r=!1){return new rg(n,r).decrypt(t)}constructor(t,n=!1,r){this.aes=r||new ah(t,void 0,n,"ECB")}encrypt(t){return gl(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return gl(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}function C2(e){const t=function(n){const r=new rg(n);this.encrypt=function(i){return r.encrypt(i)},this.decrypt=function(i){return r.decrypt(i)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function gf(e,t,n,r,i,a){const l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],c=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],h=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],s=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],p=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],d=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],m=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let _,y,b,E,O,x,C,D,P,w,M,T,R,K,L=0,z=t.length;const U=e.length===32?3:9;D=U===3?n?[0,32,2]:[30,-2,-2]:n?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],n&&(t=function(he,ye){const de=8-he.length%8;let Se;if(ye===2&&de<8)Se=32;else if(ye===1)Se=de;else{if(ye||!(de<8)){if(de===8)return he;throw Error("des: invalid padding")}Se=0}const X=new Uint8Array(he.length+de);for(let se=0;se >>4^C),C^=b,x^=b<<4,b=65535&(x>>>16^C),C^=b,x^=b<<16,b=858993459&(C>>>2^x),x^=b,C^=b<<2,b=16711935&(C>>>8^x),x^=b,C^=b<<8,b=1431655765&(x>>>1^C),C^=b,x^=b<<1,x=x<<1|x>>>31,C=C<<1|C>>>31,y=0;y>>4|C<<28)^e[_+1],b=x,x=C,C=b^(c[E>>>24&63]|s[E>>>16&63]|d[E>>>8&63]|m[63&E]|l[O>>>24&63]|h[O>>>16&63]|p[O>>>8&63]|v[63&O]);b=x,x=C,C=b}x=x>>>1|x<<31,C=C>>>1|C<<31,b=1431655765&(x>>>1^C),C^=b,x^=b<<1,b=16711935&(C>>>8^x),x^=b,C^=b<<8,b=858993459&(C>>>2^x),x^=b,C^=b<<2,b=65535&(x>>>16^C),C^=b,x^=b<<16,b=252645135&(x>>>4^C),C^=b,x^=b<<4,r===1&&(n?(P=x,M=C):(x^=w,C^=T)),oe[Pe++]=x>>>24,oe[Pe++]=x>>>16&255,oe[Pe++]=x>>>8&255,oe[Pe++]=255&x,oe[Pe++]=C>>>24,oe[Pe++]=C>>>16&255,oe[Pe++]=C>>>8&255,oe[Pe++]=255&C}return n||(oe=function(he,ye){let de,Se=null;if(ye===2)de=32;else if(ye===1)Se=he[he.length-1];else{if(ye)throw Error("des: invalid padding");de=0}if(!Se){for(Se=1;he[he.length-Se]===de;)Se++;Se--}return he.subarray(0,he.length-Se)}(oe,a)),oe}function _f(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],l=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],h=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],s=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],p=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],v=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],m=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],_=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length>8?3:1,b=Array(32*y),E=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let O,x,C,D=0,P=0;for(let w=0;w >>4^T),T^=C,M^=C<<4,C=65535&(T>>>-16^M),M^=C,T^=C<<-16,C=858993459&(M>>>2^T),T^=C,M^=C<<2,C=65535&(T>>>-16^M),M^=C,T^=C<<-16,C=1431655765&(M>>>1^T),T^=C,M^=C<<1,C=16711935&(T>>>8^M),M^=C,T^=C<<8,C=1431655765&(M>>>1^T),T^=C,M^=C<<1,C=M<<8|T>>>20&240,M=T<<24|T<<8&16711680|T>>>8&65280|T>>>24&240,T=C;for(let R=0;R<16;R++)E[R]?(M=M<<2|M>>>26,T=T<<2|T>>>26):(M=M<<1|M>>>27,T=T<<1|T>>>27),M&=-15,T&=-15,O=t[M>>>28]|n[M>>>24&15]|r[M>>>20&15]|i[M>>>16&15]|a[M>>>12&15]|l[M>>>8&15]|c[M>>>4&15],x=h[T>>>28]|s[T>>>24&15]|p[T>>>20&15]|d[T>>>16&15]|v[T>>>12&15]|m[T>>>8&15]|_[T>>>4&15],C=65535&(x>>>16^O),b[P++]=O^C,b[P++]=x^C<<16}return b}function Yd(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(t){return gf(_f(this.key[2]),gf(_f(this.key[1]),gf(_f(this.key[0]),t,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function UK(){this.BlockSize=8,this.KeySize=16,this.setKey=function(l){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),l.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(l),!0},this.reset=function(){for(let l=0;l<16;l++)this.masking[l]=0,this.rotate[l]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(l){const c=Array(l.length);for(let h=0;h >>24&255,c[h+1]=d>>>16&255,c[h+2]=d>>>8&255,c[h+3]=255&d,c[h+4]=p>>>24&255,c[h+5]=p>>>16&255,c[h+6]=p>>>8&255,c[h+7]=255&p}return c},this.decrypt=function(l){const c=Array(l.length);for(let h=0;h >>24&255,c[h+1]=d>>>16&255,c[h+2]=d>>>8&255,c[h+3]=255&d,c[h+4]=p>>>24&255,c[h+5]=p>>16&255,c[h+6]=p>>8&255,c[h+7]=255&p}return c};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function n(l,c,h){const s=c+l,p=s< >>32-h;return(a[0][p>>>24]^a[1][p>>>16&255])-a[2][p>>>8&255]+a[3][255&p]}function r(l,c,h){const s=c^l,p=s< >>32-h;return a[0][p>>>24]-a[1][p>>>16&255]+a[2][p>>>8&255]^a[3][255&p]}function i(l,c,h){const s=c-l,p=s< >>32-h;return(a[0][p>>>24]+a[1][p>>>16&255]^a[2][p>>>8&255])-a[3][255&p]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(l){const c=[,,,,,,,,],h=Array(32);let s;for(let m=0;m<4;m++)s=4*m,c[m]=l[s]<<24|l[s+1]<<16|l[s+2]<<8|l[s+3];const p=[6,7,4,5];let d,v=0;for(let m=0;m<2;m++)for(let _=0;_<4;_++){for(s=0;s<4;s++){const y=e[_][s];d=c[y[1]],d^=a[4][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=a[5][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=a[6][c[y[4]>>>2]>>>24-8*(3&y[4])&255],d^=a[7][c[y[5]>>>2]>>>24-8*(3&y[5])&255],d^=a[p[s]][c[y[6]>>>2]>>>24-8*(3&y[6])&255],c[y[0]]=d}for(s=0;s<4;s++){const y=t[_][s];d=a[4][c[y[0]>>>2]>>>24-8*(3&y[0])&255],d^=a[5][c[y[1]>>>2]>>>24-8*(3&y[1])&255],d^=a[6][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=a[7][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=a[4+s][c[y[4]>>>2]>>>24-8*(3&y[4])&255],h[v]=d,v++}}for(let m=0;m<16;m++)this.masking[m]=h[m],this.rotate[m]=31&h[16+m]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Xd(e){this.cast5=new UK,this.cast5.setKey(e),this.encrypt=function(t){return this.cast5.encrypt(t)}}Yd.keySize=Yd.prototype.keySize=24,Yd.blockSize=Yd.prototype.blockSize=8,Xd.blockSize=Xd.prototype.blockSize=8,Xd.keySize=Xd.prototype.keySize=16;const Aa=4294967295;function Cs(e,t){return(e< >>32-t)&Aa}function ro(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Bo(e,t,n){e.splice(t,4,255&n,n>>>8&255,n>>>16&255,n>>>24&255)}function wn(e,t){return e>>>8*t&255}function Jd(e){this.tf=function(){let t=null,n=null,r=-1,i=[],a=[[],[],[],[]];function l(p){return a[0][wn(p,0)]^a[1][wn(p,1)]^a[2][wn(p,2)]^a[3][wn(p,3)]}function c(p){return a[0][wn(p,3)]^a[1][wn(p,0)]^a[2][wn(p,1)]^a[3][wn(p,2)]}function h(p,d){let v=l(d[0]),m=c(d[1]);d[2]=Cs(d[2]^v+m+i[4*p+8]&Aa,31),d[3]=Cs(d[3],1)^v+2*m+i[4*p+9]&Aa,v=l(d[2]),m=c(d[3]),d[0]=Cs(d[0]^v+m+i[4*p+10]&Aa,31),d[1]=Cs(d[1],1)^v+2*m+i[4*p+11]&Aa}function s(p,d){let v=l(d[0]),m=c(d[1]);d[2]=Cs(d[2],1)^v+m+i[4*p+10]&Aa,d[3]=Cs(d[3]^v+2*m+i[4*p+11]&Aa,31),v=l(d[2]),m=c(d[3]),d[0]=Cs(d[0],1)^v+m+i[4*p+8]&Aa,d[1]=Cs(d[1]^v+2*m+i[4*p+9]&Aa,31)}return{name:"twofish",blocksize:16,open:function(p){let d,v,m,_,y;t=p;const b=[],E=[],O=[];let x;const C=[];let D,P,w;const M=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],T=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],R=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],K=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],L=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],z=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],U=[[],[]],oe=[[],[],[],[]];function Pe(X){return X^X>>2^[0,90,180,238][3&X]}function he(X){return X^X>>1^X>>2^[0,238,180,90][3&X]}function ye(X,se){let Ce,be,re;for(Ce=0;Ce<8;Ce++)be=se>>>24,se=se<<8&Aa|X>>>24,X=X<<8&Aa,re=be<<1,128&be&&(re^=333),se^=be^re<<16,re^=be>>>1,1&be&&(re^=166),se^=re<<24|re<<8;return se}function de(X,se){const Ce=se>>4,be=15&se,re=M[X][Ce^be],Q=T[X][L[be]^z[Ce]];return K[X][L[Q]^z[re]]<<4|R[X][re^Q]}function Se(X,se){let Ce=wn(X,0),be=wn(X,1),re=wn(X,2),Q=wn(X,3);switch(x){case 4:Ce=U[1][Ce]^wn(se[3],0),be=U[0][be]^wn(se[3],1),re=U[0][re]^wn(se[3],2),Q=U[1][Q]^wn(se[3],3);case 3:Ce=U[1][Ce]^wn(se[2],0),be=U[1][be]^wn(se[2],1),re=U[0][re]^wn(se[2],2),Q=U[0][Q]^wn(se[2],3);case 2:Ce=U[0][U[0][Ce]^wn(se[1],0)]^wn(se[0],0),be=U[0][U[1][be]^wn(se[1],1)]^wn(se[0],1),re=U[1][U[0][re]^wn(se[1],2)]^wn(se[0],2),Q=U[1][U[1][Q]^wn(se[1],3)]^wn(se[0],3)}return oe[0][Ce]^oe[1][be]^oe[2][re]^oe[3][Q]}for(t=t.slice(0,32),d=t.length;d!==16&&d!==24&&d!==32;)t[d++]=0;for(d=0;d >2]=ro(t,d);for(d=0;d<256;d++)U[0][d]=de(0,d),U[1][d]=de(1,d);for(d=0;d<256;d++)D=U[1][d],P=Pe(D),w=he(D),oe[0][d]=D+(P<<8)+(w<<16)+(w<<24),oe[2][d]=P+(w<<8)+(D<<16)+(w<<24),D=U[0][d],P=Pe(D),w=he(D),oe[1][d]=w+(w<<8)+(P<<16)+(D<<24),oe[3][d]=P+(D<<8)+(w<<16)+(P<<24);for(x=O.length/2,d=0;d =0;m--)s(m,v);Bo(n,r,v[2]^i[0]),Bo(n,r+4,v[3]^i[1]),Bo(n,r+8,v[0]^i[2]),Bo(n,r+12,v[1]^i[3]),r+=16},finalize:function(){return n}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(t){return this.tf.encrypt(Array.from(t),0)}}function Ya(){}function Zd(e){this.bf=new Ya,this.bf.init(e),this.encrypt=function(t){return this.bf.encryptBlock(t)}}Jd.keySize=Jd.prototype.keySize=32,Jd.blockSize=Jd.prototype.blockSize=16,Ya.prototype.BLOCKSIZE=8,Ya.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Ya.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Ya.prototype.NN=16,Ya.prototype._clean=function(e){return e<0&&(e=(2147483647&e)+2147483648),e},Ya.prototype._F=function(e){let t;const n=255&e,r=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][r],t+=this.sboxes[3][n],t},Ya.prototype._encryptBlock=function(e){let t,n=e[0],r=e[1];for(t=0;t >>24-8*t&255,i[t+r]=n[1]>>>24-8*t&255;return i},Ya.prototype._decryptBlock=function(e){let t,n=e[0],r=e[1];for(t=this.NN+1;t>1;--t){n^=this.parray[t],r=this._F(n)^r;const i=n;n=r,r=i}n^=this.parray[1],r^=this.parray[0],e[0]=this._clean(r),e[1]=this._clean(n)},Ya.prototype.init=function(e){let t,n=0;for(this.parray=[],t=0;t =e.length&&(n=0);this.parray[t]=this.PARRAY[t]^i}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],n=0;n<256;++n)this.sboxes[t][n]=this.SBOXES[t][n];const r=[0,0];for(t=0;t >>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=ye+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=de+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Se+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=X+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=se+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Ce+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=be+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=re+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Q+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=F+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=I+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Z+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=q+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=pe+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Ee+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=q^re^de^he,De=me<<1|me>>>31,V=De+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=pe^Q^Se^ye,ge=me<<1|me>>>31,V=ge+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ee^F^X^de,le=me<<1|me>>>31,V=le+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=De^I^se^Se,B=me<<1|me>>>31,V=B+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ge^Z^Ce^X,H=me<<1|me>>>31,V=H+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=le^q^be^se,W=me<<1|me>>>31,V=W+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=B^pe^re^Ce,ee=me<<1|me>>>31,V=ee+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=H^Ee^Q^be,ue=me<<1|me>>>31,V=ue+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=W^De^F^re,xe=me<<1|me>>>31,V=xe+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ee^ge^I^Q,fe=me<<1|me>>>31,V=fe+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ue^le^Z^F,ce=me<<1|me>>>31,V=ce+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=xe^B^q^I,Ve=me<<1|me>>>31,V=Ve+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=fe^H^pe^Z,Je=me<<1|me>>>31,V=Je+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ce^W^Ee^q,vt=me<<1|me>>>31,V=vt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ve^ee^De^pe,xt=me<<1|me>>>31,V=xt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Je^ue^ge^Ee,kt=me<<1|me>>>31,V=kt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=vt^xe^le^De,Lt=me<<1|me>>>31,V=Lt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=xt^fe^B^ge,pt=me<<1|me>>>31,V=pt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=kt^ce^H^le,It=me<<1|me>>>31,V=It+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Lt^Ve^W^B,Ot=me<<1|me>>>31,V=Ot+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=pt^Je^ee^H,hn=me<<1|me>>>31,V=hn+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=It^vt^ue^W,qt=me<<1|me>>>31,V=qt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ot^xt^xe^ee,Zt=me<<1|me>>>31,V=Zt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=hn^kt^fe^ue,Qt=me<<1|me>>>31,V=Qt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=qt^Lt^ce^xe,Yt=me<<1|me>>>31,V=Yt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Zt^pt^Ve^fe,Ut=me<<1|me>>>31,V=Ut+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Qt^It^Je^ce,Xt=me<<1|me>>>31,V=Xt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Yt^Ot^vt^Ve,rn=me<<1|me>>>31,V=rn+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ut^hn^xt^Je,tt=me<<1|me>>>31,V=tt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Xt^qt^kt^vt,it=me<<1|me>>>31,V=it+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=rn^Zt^Lt^xt,yt=me<<1|me>>>31,V=yt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=tt^Qt^pt^kt,Ft=me<<1|me>>>31,V=Ft+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=it^Yt^It^Lt,Oe=me<<1|me>>>31,V=Oe+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=yt^Ut^Ot^pt,Fe=me<<1|me>>>31,V=Fe+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ft^Xt^hn^It,Ue=me<<1|me>>>31,V=Ue+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Oe^rn^qt^Ot,Re=me<<1|me>>>31,V=Re+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Fe^tt^Zt^hn,nt=me<<1|me>>>31,V=nt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ue^it^Qt^qt,ot=me<<1|me>>>31,V=ot+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Re^yt^Yt^Zt,ht=me<<1|me>>>31,V=ht+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=nt^Ft^Ut^Qt,_t=me<<1|me>>>31,V=_t+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ot^Oe^Xt^Yt,Pt=me<<1|me>>>31,V=Pt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ht^Fe^rn^Ut,jt=me<<1|me>>>31,V=jt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=_t^Ue^tt^Xt,Gt=me<<1|me>>>31,V=Gt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Pt^Re^it^rn,$t=me<<1|me>>>31,V=$t+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=jt^nt^yt^tt,tn=me<<1|me>>>31,V=tn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Gt^ot^Ft^it,nn=me<<1|me>>>31,V=nn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=$t^ht^Oe^yt,an=me<<1|me>>>31,V=an+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=tn^_t^Fe^Ft,On=me<<1|me>>>31,V=On+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=nn^Pt^Ue^Oe,hr=me<<1|me>>>31,V=hr+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=an^jt^Re^Fe,br=me<<1|me>>>31,V=br+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=On^Gt^nt^Ue,Wn=me<<1|me>>>31,V=Wn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=hr^$t^ot^Re,Qn=me<<1|me>>>31,V=Qn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=br^tn^ht^nt,Ur=me<<1|me>>>31,V=Ur+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Wn^nn^_t^ot,wr=me<<1|me>>>31,V=wr+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Qn^an^Pt^ht,Bi=me<<1|me>>>31,V=Bi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ur^On^jt^_t,di=me<<1|me>>>31,V=di+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=wr^hr^Gt^Pt,ki=me<<1|me>>>31,V=ki+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Bi^br^$t^jt,na=me<<1|me>>>31,V=na+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=di^Wn^tn^Gt,La=me<<1|me>>>31,V=La+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ki^Qn^nn^$t,Oi=me<<1|me>>>31,V=Oi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=na^Ur^an^tn,ra=me<<1|me>>>31,V=ra+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=La^wr^On^nn,fi=me<<1|me>>>31,V=fi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Oi^Bi^hr^an,Ie=me<<1|me>>>31,V=Ie+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ra^di^br^On,je=me<<1|me>>>31,V=je+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,r=r+J|0,i=i+Y|0,a=a+ae|0,l=l+te|0,c=c+Ae|0}function P(he){he=he|0,D(C[he|0]<<24|C[he|1]<<16|C[he|2]<<8|C[he|3],C[he|4]<<24|C[he|5]<<16|C[he|6]<<8|C[he|7],C[he|8]<<24|C[he|9]<<16|C[he|10]<<8|C[he|11],C[he|12]<<24|C[he|13]<<16|C[he|14]<<8|C[he|15],C[he|16]<<24|C[he|17]<<16|C[he|18]<<8|C[he|19],C[he|20]<<24|C[he|21]<<16|C[he|22]<<8|C[he|23],C[he|24]<<24|C[he|25]<<16|C[he|26]<<8|C[he|27],C[he|28]<<24|C[he|29]<<16|C[he|30]<<8|C[he|31],C[he|32]<<24|C[he|33]<<16|C[he|34]<<8|C[he|35],C[he|36]<<24|C[he|37]<<16|C[he|38]<<8|C[he|39],C[he|40]<<24|C[he|41]<<16|C[he|42]<<8|C[he|43],C[he|44]<<24|C[he|45]<<16|C[he|46]<<8|C[he|47],C[he|48]<<24|C[he|49]<<16|C[he|50]<<8|C[he|51],C[he|52]<<24|C[he|53]<<16|C[he|54]<<8|C[he|55],C[he|56]<<24|C[he|57]<<16|C[he|58]<<8|C[he|59],C[he|60]<<24|C[he|61]<<16|C[he|62]<<8|C[he|63])}function w(he){he=he|0,C[he|0]=r>>>24,C[he|1]=r>>>16&255,C[he|2]=r>>>8&255,C[he|3]=r&255,C[he|4]=i>>>24,C[he|5]=i>>>16&255,C[he|6]=i>>>8&255,C[he|7]=i&255,C[he|8]=a>>>24,C[he|9]=a>>>16&255,C[he|10]=a>>>8&255,C[he|11]=a&255,C[he|12]=l>>>24,C[he|13]=l>>>16&255,C[he|14]=l>>>8&255,C[he|15]=l&255,C[he|16]=c>>>24,C[he|17]=c>>>16&255,C[he|18]=c>>>8&255,C[he|19]=c&255}function M(){r=1732584193,i=4023233417,a=2562383102,l=271733878,c=3285377520,h=s=0}function T(he,ye,de,Se,X,se,Ce){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0,se=se|0,Ce=Ce|0,r=he,i=ye,a=de,l=Se,c=X,h=se,s=Ce}function R(he,ye){he=he|0,ye=ye|0;var de=0;if(he&63)return-1;for(;(ye|0)>=64;)P(he),he=he+64|0,ye=ye-64|0,de=de+64|0;return h=h+de|0,h>>>0 >>0&&(s=s+1|0),de|0}function K(he,ye,de){he=he|0,ye=ye|0,de=de|0;var Se=0,X=0;if(he&63||~de&&de&31)return-1;if((ye|0)>=64){if(Se=R(he,ye)|0,(Se|0)==-1)return-1;he=he+Se|0,ye=ye-Se|0}if(Se=Se+ye|0,h=h+ye|0,h>>>0 >>0&&(s=s+1|0),C[he|ye]=128,(ye|0)>=56){for(X=ye+1|0;(X|0)<64;X=X+1|0)C[he|X]=0;P(he),ye=0,C[he|0]=0}for(X=ye+1|0;(X|0)<59;X=X+1|0)C[he|X]=0;return C[he|56]=s>>>21&255,C[he|57]=s>>>13&255,C[he|58]=s>>>5&255,C[he|59]=s<<3&255|h>>>29,C[he|60]=h>>>21&255,C[he|61]=h>>>13&255,C[he|62]=h>>>5&255,C[he|63]=h<<3&255,P(he),~de&&w(de),Se|0}function L(){r=p,i=d,a=v,l=m,c=_,h=64,s=0}function z(){r=y,i=b,a=E,l=O,c=x,h=64,s=0}function U(he,ye,de,Se,X,se,Ce,be,re,Q,F,I,Z,q,pe,Ee){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0,se=se|0,Ce=Ce|0,be=be|0,re=re|0,Q=Q|0,F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,M(),D(he^1549556828,ye^1549556828,de^1549556828,Se^1549556828,X^1549556828,se^1549556828,Ce^1549556828,be^1549556828,re^1549556828,Q^1549556828,F^1549556828,I^1549556828,Z^1549556828,q^1549556828,pe^1549556828,Ee^1549556828),y=r,b=i,E=a,O=l,x=c,M(),D(he^909522486,ye^909522486,de^909522486,Se^909522486,X^909522486,se^909522486,Ce^909522486,be^909522486,re^909522486,Q^909522486,F^909522486,I^909522486,Z^909522486,q^909522486,pe^909522486,Ee^909522486),p=r,d=i,v=a,m=l,_=c,h=64,s=0}function oe(he,ye,de){he=he|0,ye=ye|0,de=de|0;var Se=0,X=0,se=0,Ce=0,be=0,re=0;return he&63||~de&&de&31?-1:(re=K(he,ye,-1)|0,Se=r,X=i,se=a,Ce=l,be=c,z(),D(Se,X,se,Ce,be,2147483648,0,0,0,0,0,0,0,0,0,672),~de&&w(de),re|0)}function Pe(he,ye,de,Se,X){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0;var se=0,Ce=0,be=0,re=0,Q=0,F=0,I=0,Z=0,q=0,pe=0;if(he&63||~X&&X&31)return-1;for(C[he+ye|0]=de>>>24,C[he+ye+1|0]=de>>>16&255,C[he+ye+2|0]=de>>>8&255,C[he+ye+3|0]=de&255,oe(he,ye+4|0,-1)|0,se=F=r,Ce=I=i,be=Z=a,re=q=l,Q=pe=c,Se=Se-1|0;(Se|0)>0;)L(),D(F,I,Z,q,pe,2147483648,0,0,0,0,0,0,0,0,0,672),F=r,I=i,Z=a,q=l,pe=c,z(),D(F,I,Z,q,pe,2147483648,0,0,0,0,0,0,0,0,0,672),F=r,I=i,Z=a,q=l,pe=c,se=se^r,Ce=Ce^i,be=be^a,re=re^l,Q=Q^c,Se=Se-1|0;return r=se,i=Ce,a=be,l=re,c=Q,~X&&w(X),0}return{reset:M,init:T,process:R,finish:K,hmac_reset:L,hmac_init:U,hmac_finish:oe,pbkdf2_generate_block:Pe}};class cP{constructor(){this.pos=0,this.len=0}reset(){const{asm:t}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,t.reset(),this}process(t){if(this.result!==null)throw new Sb("state must be reset before processing new data");const{asm:n,heap:r}=this.acquire_asm();let i=this.pos,a=this.len,l=0,c=t.length,h=0;for(;c>0;)h=Zl(r,i+a,t,l,c),a+=h,l+=h,c-=h,h=n.process(i,a),i+=h,a-=h,a||(i=0);return this.pos=i,this.len=a,this}finish(){if(this.result!==null)throw new Sb("state must be reset before processing new data");const{asm:t,heap:n}=this.acquire_asm();return t.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(n.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const VD=[],WD=[];class Ql extends cP{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=VD.pop()||w2(),this.asm=WD.pop()||uP({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(VD.push(this.heap),WD.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new Ql().process(t).finish().result}}Ql.NAME="sha1",Ql.heap_pool=[],Ql.asm_pool=[],Ql.asm_function=uP;const HD=[],KD=[];class i_ extends cP{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=HD.pop()||w2(),this.asm=KD.pop()||function(t,n,r){var i=0,a=0,l=0,c=0,h=0,s=0,p=0,d=0,v=0,m=0,_=0,y=0,b=0,E=0,O=0,x=0,C=0,D=0,P=0,w=0,M=0,T=0,R=0,K=0,L=0,z=0,U=new t.Uint8Array(r);function oe(F,I,Z,q,pe,Ee,J,Y,ae,te,Ae,me,V,De,ge,le){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,Ae=Ae|0,me=me|0,V=V|0,De=De|0,ge=ge|0,le=le|0;var B=0,H=0,W=0,ee=0,ue=0,xe=0,fe=0,ce=0;B=i,H=a,W=l,ee=c,ue=h,xe=s,fe=p,ce=d,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+1116352408|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+1899447441|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+3049323471|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3921009573|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+961987163|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1508970993|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2453635748|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+2870763221|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+3624381080|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+310598401|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+607225278|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+1426881987|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+1925078388|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+2162078206|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2614888103|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+3248222580|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+3835390401|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+4022224774|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+264347078|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+604807628|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+770255983|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1249150122|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+1555081692|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+1996064986|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+2554220882|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2821834349|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+2952996808|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3210313671|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+3336571891|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+3584528711|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+113926993|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+338241895|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+666307205|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+773529912|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+1294757372|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+1396182291|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+1695183700|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1986661051|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2177026350|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+2456956037|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+2730485921|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2820302411|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+3259730800|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3345764771|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+3516065817|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+3600352804|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+4094571909|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+275423344|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+430227734|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+506948616|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+659060556|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+883997877|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+958139571|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1322822218|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+1537002063|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+1747873779|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+1955562222|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2024104815|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+2227730452|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+2361852424|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+2428436474|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+2756734187|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+3204031479|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+3329325298|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,i=i+B|0,a=a+H|0,l=l+W|0,c=c+ee|0,h=h+ue|0,s=s+xe|0,p=p+fe|0,d=d+ce|0}function Pe(F){F=F|0,oe(U[F|0]<<24|U[F|1]<<16|U[F|2]<<8|U[F|3],U[F|4]<<24|U[F|5]<<16|U[F|6]<<8|U[F|7],U[F|8]<<24|U[F|9]<<16|U[F|10]<<8|U[F|11],U[F|12]<<24|U[F|13]<<16|U[F|14]<<8|U[F|15],U[F|16]<<24|U[F|17]<<16|U[F|18]<<8|U[F|19],U[F|20]<<24|U[F|21]<<16|U[F|22]<<8|U[F|23],U[F|24]<<24|U[F|25]<<16|U[F|26]<<8|U[F|27],U[F|28]<<24|U[F|29]<<16|U[F|30]<<8|U[F|31],U[F|32]<<24|U[F|33]<<16|U[F|34]<<8|U[F|35],U[F|36]<<24|U[F|37]<<16|U[F|38]<<8|U[F|39],U[F|40]<<24|U[F|41]<<16|U[F|42]<<8|U[F|43],U[F|44]<<24|U[F|45]<<16|U[F|46]<<8|U[F|47],U[F|48]<<24|U[F|49]<<16|U[F|50]<<8|U[F|51],U[F|52]<<24|U[F|53]<<16|U[F|54]<<8|U[F|55],U[F|56]<<24|U[F|57]<<16|U[F|58]<<8|U[F|59],U[F|60]<<24|U[F|61]<<16|U[F|62]<<8|U[F|63])}function he(F){F=F|0,U[F|0]=i>>>24,U[F|1]=i>>>16&255,U[F|2]=i>>>8&255,U[F|3]=i&255,U[F|4]=a>>>24,U[F|5]=a>>>16&255,U[F|6]=a>>>8&255,U[F|7]=a&255,U[F|8]=l>>>24,U[F|9]=l>>>16&255,U[F|10]=l>>>8&255,U[F|11]=l&255,U[F|12]=c>>>24,U[F|13]=c>>>16&255,U[F|14]=c>>>8&255,U[F|15]=c&255,U[F|16]=h>>>24,U[F|17]=h>>>16&255,U[F|18]=h>>>8&255,U[F|19]=h&255,U[F|20]=s>>>24,U[F|21]=s>>>16&255,U[F|22]=s>>>8&255,U[F|23]=s&255,U[F|24]=p>>>24,U[F|25]=p>>>16&255,U[F|26]=p>>>8&255,U[F|27]=p&255,U[F|28]=d>>>24,U[F|29]=d>>>16&255,U[F|30]=d>>>8&255,U[F|31]=d&255}function ye(){i=1779033703,a=3144134277,l=1013904242,c=2773480762,h=1359893119,s=2600822924,p=528734635,d=1541459225,v=m=0}function de(F,I,Z,q,pe,Ee,J,Y,ae,te){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,i=F,a=I,l=Z,c=q,h=pe,s=Ee,p=J,d=Y,v=ae,m=te}function Se(F,I){F=F|0,I=I|0;var Z=0;if(F&63)return-1;for(;(I|0)>=64;)Pe(F),F=F+64|0,I=I-64|0,Z=Z+64|0;return v=v+Z|0,v>>>0 >>0&&(m=m+1|0),Z|0}function X(F,I,Z){F=F|0,I=I|0,Z=Z|0;var q=0,pe=0;if(F&63||~Z&&Z&31)return-1;if((I|0)>=64){if(q=Se(F,I)|0,(q|0)==-1)return-1;F=F+q|0,I=I-q|0}if(q=q+I|0,v=v+I|0,v>>>0>>0&&(m=m+1|0),U[F|I]=128,(I|0)>=56){for(pe=I+1|0;(pe|0)<64;pe=pe+1|0)U[F|pe]=0;Pe(F),I=0,U[F|0]=0}for(pe=I+1|0;(pe|0)<59;pe=pe+1|0)U[F|pe]=0;return U[F|56]=m>>>21&255,U[F|57]=m>>>13&255,U[F|58]=m>>>5&255,U[F|59]=m<<3&255|v>>>29,U[F|60]=v>>>21&255,U[F|61]=v>>>13&255,U[F|62]=v>>>5&255,U[F|63]=v<<3&255,Pe(F),~Z&&he(Z),q|0}function se(){i=_,a=y,l=b,c=E,h=O,s=x,p=C,d=D,v=64,m=0}function Ce(){i=P,a=w,l=M,c=T,h=R,s=K,p=L,d=z,v=64,m=0}function be(F,I,Z,q,pe,Ee,J,Y,ae,te,Ae,me,V,De,ge,le){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,Ae=Ae|0,me=me|0,V=V|0,De=De|0,ge=ge|0,le=le|0,ye(),oe(F^1549556828,I^1549556828,Z^1549556828,q^1549556828,pe^1549556828,Ee^1549556828,J^1549556828,Y^1549556828,ae^1549556828,te^1549556828,Ae^1549556828,me^1549556828,V^1549556828,De^1549556828,ge^1549556828,le^1549556828),P=i,w=a,M=l,T=c,R=h,K=s,L=p,z=d,ye(),oe(F^909522486,I^909522486,Z^909522486,q^909522486,pe^909522486,Ee^909522486,J^909522486,Y^909522486,ae^909522486,te^909522486,Ae^909522486,me^909522486,V^909522486,De^909522486,ge^909522486,le^909522486),_=i,y=a,b=l,E=c,O=h,x=s,C=p,D=d,v=64,m=0}function re(F,I,Z){F=F|0,I=I|0,Z=Z|0;var q=0,pe=0,Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0;return F&63||~Z&&Z&31?-1:(me=X(F,I,-1)|0,q=i,pe=a,Ee=l,J=c,Y=h,ae=s,te=p,Ae=d,Ce(),oe(q,pe,Ee,J,Y,ae,te,Ae,2147483648,0,0,0,0,0,0,768),~Z&&he(Z),me|0)}function Q(F,I,Z,q,pe){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0;var Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0,V=0,De=0,ge=0,le=0,B=0,H=0,W=0,ee=0,ue=0;if(F&63||~pe&&pe&31)return-1;for(U[F+I|0]=Z>>>24,U[F+I+1|0]=Z>>>16&255,U[F+I+2|0]=Z>>>8&255,U[F+I+3|0]=Z&255,re(F,I+4|0,-1)|0,Ee=De=i,J=ge=a,Y=le=l,ae=B=c,te=H=h,Ae=W=s,me=ee=p,V=ue=d,q=q-1|0;(q|0)>0;)se(),oe(De,ge,le,B,H,W,ee,ue,2147483648,0,0,0,0,0,0,768),De=i,ge=a,le=l,B=c,H=h,W=s,ee=p,ue=d,Ce(),oe(De,ge,le,B,H,W,ee,ue,2147483648,0,0,0,0,0,0,768),De=i,ge=a,le=l,B=c,H=h,W=s,ee=p,ue=d,Ee=Ee^i,J=J^a,Y=Y^l,ae=ae^c,te=te^h,Ae=Ae^s,me=me^p,V=V^d,q=q-1|0;return i=Ee,a=J,l=Y,c=ae,h=te,s=Ae,p=me,d=V,~pe&&he(pe),0}return{reset:ye,init:de,process:Se,finish:X,hmac_reset:se,hmac_init:be,hmac_finish:re,pbkdf2_generate_block:Q}}({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(HD.push(this.heap),KD.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new i_().process(t).finish().result}}i_.NAME="sha256";var a_=dP;function dP(e,t){if(!e)throw Error(t||"Assertion failed")}dP.equal=function(e,t,n){if(e!=t)throw Error(n||"Assertion failed: "+e+" != "+t)};var Lne=ba!==void 0?ba:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function x2(e,t){return e(t={exports:{}},t.exports),t.exports}function WK(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var HK=x2(function(e){e.exports=typeof Object.create=="function"?function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),KK=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r >8,l=255&i;a?n.push(a,l):n.push(l)}else for(r=0;r >>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}var YK=function(e,t){for(var n="",r=0;r >>0}return a},JK=function(e,t){for(var n=Array(4*e.length),r=0,i=0;r >>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},Nn={inherits:HK,toArray:KK,toHex:GK,htonl:fP,toHex32:YK,zero2:hP,zero8:pP,join32:XK,split32:JK,rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e< >>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,l=(a >>0,e[t+1]=a},sum64_hi:function(e,t,n,r){return(t+r>>>0 >>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,a,l,c){var h=0,s=t;return h+=(s=s+r>>>0) >>0)>>0) >>0},sum64_4_lo:function(e,t,n,r,i,a,l,c){return t+r+a+c>>>0},sum64_5_hi:function(e,t,n,r,i,a,l,c,h,s){var p=0,d=t;return p+=(d=d+r>>>0) >>0)>>0) >>0) >>0},sum64_5_lo:function(e,t,n,r,i,a,l,c,h,s){return t+r+a+c+s>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function gm(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var ZK=gm;gm.prototype.update=function(e,t){if(e=Nn.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Nn.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a >>3},g1_256:function(e){return xs(e,17)^xs(e,19)^e>>>10}},Ha=Nn.sum32,qK=Nn.sum32_4,eG=Nn.sum32_5,tG=Xc.ch32,nG=Xc.maj32,rG=Xc.s0_256,iG=Xc.s1_256,aG=Xc.g0_256,sG=Xc.g1_256,_P=S2.BlockHash,oG=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Ts(){if(!(this instanceof Ts))return new Ts;_P.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=oG,this.W=Array(64)}Nn.inherits(Ts,_P);var yP=Ts;function fo(){if(!(this instanceof fo))return new fo;yP.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ts.blockSize=512,Ts.outSize=256,Ts.hmacStrength=192,Ts.padLength=64,Ts.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r >>32-i,n)}function vi(e,t,n,r,i,a,l){return o_(t&n|~t&r,e,t,i,a,l)}function mi(e,t,n,r,i,a,l){return o_(t&r|n&~r,e,t,i,a,l)}function gi(e,t,n,r,i,a,l){return o_(t^n^r,e,t,i,a,l)}function _i(e,t,n,r,i,a,l){return o_(n^(t|~r),e,t,i,a,l)}function IG(e){const t=[];let n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}const JD="0123456789abcdef".split("");function $G(e){let t="",n=0;for(;n<4;n++)t+=JD[e>>8*n+4&15]+JD[e>>8*n&15];return t}function el(e,t){return e+t&4294967295}const ig=Te.getWebCrypto(),ag=Te.getNodeCrypto(),RG=ag&&ag.getHashes();function Fl(e){if(ag&&RG.includes(e))return async function(t){const n=ag.createHash(e);return Sr(t,r=>{n.update(r)},()=>new Uint8Array(n.digest()))}}function Av(e,t){return async function(n,r=Nt){if(Ar(n)&&(n=await Ir(n)),!Te.isStream(n)&&ig&&t&&n.length>=r.minBytesForWebCrypto)return new Uint8Array(await ig.digest(t,n));const i=e();return Sr(n,a=>{i.update(a)},()=>new Uint8Array(i.digest()))}}function ZD(e,t){return async function(n,r=Nt){if(Ar(n)&&(n=await Ir(n)),Te.isStream(n)){const i=new e;return Sr(n,a=>{i.process(a)},()=>i.finish().result)}return ig&&t&&n.length>=r.minBytesForWebCrypto?new Uint8Array(await ig.digest(t,n)):e.bytes(n)}}const Bl={md5:Fl("md5")||async function(e){const t=function(n){const r=n.length,i=[1732584193,-271733879,-1732584194,271733878];let a;for(a=64;a<=n.length;a+=64)jy(i,IG(n.substring(a-64,a)));n=n.substring(a-64);const l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(a=0;a >2]|=n.charCodeAt(a)<<(a%4<<3);if(l[a>>2]|=128<<(a%4<<3),a>55)for(jy(i,l),a=0;a<16;a++)l[a]=0;return l[14]=8*r,jy(i,l),i}(Te.uint8ArrayToString(e));return Te.hexToUint8Array(function(n){for(let r=0;r new Uint8Array(b.update(E)))}(e,t,n,r);if(a.substr(0,3)==="aes")return function(d,v,m,_,y){if(Te.getWebCrypto()&&v.length!==24&&!Te.isStream(m)&&m.length>=3e3*y.minBytesForWebCrypto)return async function(E,O,x,C){const D="AES-CBC",P=await QD.importKey("raw",O,{name:D},!1,["encrypt"]),{blockSize:w}=cl(E),M=Te.concatUint8Array([new Uint8Array(w),x]),T=new Uint8Array(await QD.encrypt({name:D,iv:C},P,M)).subarray(0,x.length);return function(R,K){for(let L=0;L b.aes.AES_Encrypt_process(E),()=>b.aes.AES_Encrypt_finish())}(e,t,n,r,i);const l=new(cl(e))(t),c=l.blockSize,h=r.slice();let s=new Uint8Array;const p=d=>{d&&(s=Te.concatUint8Array([s,d]));const v=new Uint8Array(s.length);let m,_=0;for(;d?s.length>=c:s.length;){const y=l.encrypt(h);for(m=0;m new Uint8Array(y.update(b)))}(e,t,n,r);if(i.substr(0,3)==="aes")return function(p,d,v,m){if(Te.isStream(v)){const _=new Dc(d,m);return Sr(v,y=>_.aes.AES_Decrypt_process(y),()=>_.aes.AES_Decrypt_finish())}return Dc.decrypt(v,d,m)}(0,t,n,r);const a=new(cl(e))(t),l=a.blockSize;let c=r,h=new Uint8Array;const s=p=>{p&&(h=Te.concatUint8Array([h,p]));const d=new Uint8Array(h.length);let v,m=0;for(;p?h.length>=l:h.length;){const _=a.encrypt(c);for(c=h,v=0;v 48)throw new go("illegal counter size");let a=Math.pow(2,r)-1;i.set_mask(0,0,a/4294967296|0,0|a)}else r=48,i.set_mask(0,0,65535,4294967295);if(t===void 0)throw Error("nonce is required");{let a=t.length;if(!a||a>16)throw new go("illegal nonce size");let l=new DataView(new ArrayBuffer(16));new Uint8Array(l.buffer).set(t),i.set_nonce(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}if(n!==void 0){if(n<0||n>=Math.pow(2,r))throw new go("illegal counter value");i.set_counter(0,0,n/4294967296|0,0|n)}}}class lg{static encrypt(t,n,r=!0,i){return new lg(n,i,r).encrypt(t)}static decrypt(t,n,r=!0,i){return new lg(n,i,r).decrypt(t)}constructor(t,n,r=!0,i){this.aes=i||new ah(t,n,r,"CBC")}encrypt(t){return gl(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return gl(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}const qD=Te.getWebCrypto(),LG=Te.getNodeCrypto(),oo=16;function e4(e,t){const n=e.length-oo;for(let r=0;r >3),17+(m>>3)),8-(7&m)).subarray(1),E=new Uint8Array($i),O=new Uint8Array(h.length+Wo);let x,C=0;for(x=0;x 16)throw new go("illegal tagSize value");const h=n.length||0,s=new Uint8Array(16);h!==12?(this._gcm_mac_process(n),c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=0,c[11]=h>>>29,c[12]=h>>>21&255,c[13]=h>>>13&255,c[14]=h>>>5&255,c[15]=h<<3&255,l.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),l.get_iv(Tn.HEAP_DATA),l.set_iv(0,0,0,0),s.set(c.subarray(0,16))):(s.set(n),s[15]=1);const p=new DataView(s.buffer);if(this.gamma0=p.getUint32(12),l.set_nonce(p.getUint32(0),p.getUint32(4),p.getUint32(8),0),l.set_mask(0,0,0,4294967295),r!==void 0){if(r.length>Vy)throw new go("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");l.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(t,n,r,i,a){return new ql(n,r,i,a).encrypt(t)}static decrypt(t,n,r,i,a){return new ql(n,r,i,a).decrypt(t)}encrypt(t){return this.AES_GCM_encrypt(t)}decrypt(t){return this.AES_GCM_decrypt(t)}AES_GCM_Encrypt_process(t){let n=0,r=t.length||0,{asm:i,heap:a}=this.aes.acquire_asm(),l=this.counter,c=this.aes.pos,h=this.aes.len,s=0,p=h+r&-16,d=0;if((l-1<<4)+h+r>Vy)throw new RangeError("counter overflow");const v=new Uint8Array(p);for(;r>0;)d=Zl(a,c+h,t,n,r),h+=d,n+=d,r-=d,d=i.cipher(Tn.ENC.CTR,Tn.HEAP_DATA+c,h),d=i.mac(Tn.MAC.GCM,Tn.HEAP_DATA+c,d),d&&v.set(a.subarray(c,c+d),s),l+=d>>>4,s+=d,d >>29,n[4]=p>>>21,n[5]=p>>>13&255,n[6]=p>>>5&255,n[7]=p<<3&255,n[8]=n[9]=n[10]=0,n[11]=d>>>29,n[12]=d>>>21&255,n[13]=d>>>13&255,n[14]=d>>>5&255,n[15]=d<<3&255,t.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),t.get_iv(Tn.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(Tn.ENC.CTR,Tn.HEAP_DATA,16),h.set(n.subarray(0,i),c),this.counter=1,this.aes.pos=0,this.aes.len=0,h}AES_GCM_Decrypt_process(t){let n=0,r=t.length||0,{asm:i,heap:a}=this.aes.acquire_asm(),l=this.counter,c=this.tagSize,h=this.aes.pos,s=this.aes.len,p=0,d=s+r>c?s+r-c&-16:0,v=s+r-d,m=0;if((l-1<<4)+s+r>Vy)throw new RangeError("counter overflow");const _=new Uint8Array(d);for(;r>v;)m=Zl(a,h+s,t,n,r-v),s+=m,n+=m,r-=m,m=i.mac(Tn.MAC.GCM,Tn.HEAP_DATA+h,m),m=i.cipher(Tn.DEC.CTR,Tn.HEAP_DATA+h,m),m&&_.set(a.subarray(h,h+m),p),l+=m>>>4,p+=m,h=0,s=0;return r>0&&(s+=Zl(a,0,t,n,r)),this.counter=l,this.aes.pos=h,this.aes.len=s,_}AES_GCM_Decrypt_finish(){let{asm:t,heap:n}=this.aes.acquire_asm(),r=this.tagSize,i=this.adata,a=this.counter,l=this.aes.pos,c=this.aes.len,h=c-r;if(c >>29,n[4]=v>>>21,n[5]=v>>>13&255,n[6]=v>>>5&255,n[7]=v<<3&255,n[8]=n[9]=n[10]=0,n[11]=m>>>29,n[12]=m>>>21&255,n[13]=m>>>13&255,n[14]=m>>>5&255,n[15]=m<<3&255,t.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),t.get_iv(Tn.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(Tn.ENC.CTR,Tn.HEAP_DATA,16);let _=0;for(let y=0;y 0;){for(l=Zl(r,0,t,i,a),i+=l,a-=l;15&l;)r[l++]=0;n.mac(Tn.MAC.GCM,Tn.HEAP_DATA,l)}}}const Wy=Te.getWebCrypto(),i4=Te.getNodeCrypto(),a4=Te.getNodeBuffer(),dc=16,Hy="AES-GCM";async function _c(e,t){if(e!==ve.symmetric.aes128&&e!==ve.symmetric.aes192&&e!==ve.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Te.getWebCrypto()&&t.length!==24){const n=await Wy.importKey("raw",t,{name:Hy},!1,["encrypt","decrypt"]);return{encrypt:async function(r,i,a=new Uint8Array){if(!r.length)return ql.encrypt(r,t,i,a);const l=await Wy.encrypt({name:Hy,iv:i,additionalData:a,tagLength:8*dc},n,r);return new Uint8Array(l)},decrypt:async function(r,i,a=new Uint8Array){if(r.length===dc)return ql.decrypt(r,t,i,a);const l=await Wy.decrypt({name:Hy,iv:i,additionalData:a,tagLength:8*dc},n,r);return new Uint8Array(l)}}}return Te.getNodeCrypto()?{encrypt:async function(n,r,i=new Uint8Array){const a=new i4.createCipheriv("aes-"+8*t.length+"-gcm",t,r);a.setAAD(i);const l=a4.concat([a.update(n),a.final(),a.getAuthTag()]);return new Uint8Array(l)},decrypt:async function(n,r,i=new Uint8Array){const a=new i4.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);a.setAAD(i),a.setAuthTag(n.slice(n.length-dc,n.length));const l=a4.concat([a.update(n.slice(0,n.length-dc)),a.final()]);return new Uint8Array(l)}}:{encrypt:async function(n,r,i){return ql.encrypt(n,t,r,i)},decrypt:async function(n,r,i){return ql.decrypt(n,t,r,i)}}}_c.getNonce=function(e,t){const n=e.slice();for(let r=0;r >>8)-1}(re,Q,F,I,32)}function _(re,Q){var F;for(F=0;F<16;F++)re[F]=0|Q[F]}function y(re){var Q,F,I=1;for(Q=0;Q<16;Q++)F=re[Q]+I+65535,I=Math.floor(F/65536),re[Q]=F-65536*I;re[0]+=I-1+37*(I-1)}function b(re,Q,F){for(var I,Z=~(F-1),q=0;q<16;q++)I=Z&(re[q]^Q[q]),re[q]^=I,Q[q]^=I}function E(re,Q){var F,I,Z,q=n(),pe=n();for(F=0;F<16;F++)pe[F]=Q[F];for(y(pe),y(pe),y(pe),I=0;I<2;I++){for(q[0]=pe[0]-65517,F=1;F<15;F++)q[F]=pe[F]-65535-(q[F-1]>>16&1),q[F-1]&=65535;q[15]=pe[15]-32767-(q[14]>>16&1),Z=q[15]>>16&1,q[14]&=65535,b(pe,q,1-Z)}for(F=0;F<16;F++)re[2*F]=255&pe[F],re[2*F+1]=pe[F]>>8}function O(re,Q){var F=new Uint8Array(32),I=new Uint8Array(32);return E(F,re),E(I,Q),m(F,0,I,0)}function x(re){var Q=new Uint8Array(32);return E(Q,re),1&Q[0]}function C(re,Q){var F;for(F=0;F<16;F++)re[F]=Q[2*F]+(Q[2*F+1]<<8);re[15]&=32767}function D(re,Q,F){for(var I=0;I<16;I++)re[I]=Q[I]+F[I]}function P(re,Q,F){for(var I=0;I<16;I++)re[I]=Q[I]-F[I]}function w(re,Q,F){var I,Z,q=0,pe=0,Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0,V=0,De=0,ge=0,le=0,B=0,H=0,W=0,ee=0,ue=0,xe=0,fe=0,ce=0,Ve=0,Je=0,vt=0,xt=0,kt=0,Lt=0,pt=0,It=0,Ot=0,hn=0,qt=F[0],Zt=F[1],Qt=F[2],Yt=F[3],Ut=F[4],Xt=F[5],rn=F[6],tt=F[7],it=F[8],yt=F[9],Ft=F[10],Oe=F[11],Fe=F[12],Ue=F[13],Re=F[14],nt=F[15];q+=(I=Q[0])*qt,pe+=I*Zt,Ee+=I*Qt,J+=I*Yt,Y+=I*Ut,ae+=I*Xt,te+=I*rn,Ae+=I*tt,me+=I*it,V+=I*yt,De+=I*Ft,ge+=I*Oe,le+=I*Fe,B+=I*Ue,H+=I*Re,W+=I*nt,pe+=(I=Q[1])*qt,Ee+=I*Zt,J+=I*Qt,Y+=I*Yt,ae+=I*Ut,te+=I*Xt,Ae+=I*rn,me+=I*tt,V+=I*it,De+=I*yt,ge+=I*Ft,le+=I*Oe,B+=I*Fe,H+=I*Ue,W+=I*Re,ee+=I*nt,Ee+=(I=Q[2])*qt,J+=I*Zt,Y+=I*Qt,ae+=I*Yt,te+=I*Ut,Ae+=I*Xt,me+=I*rn,V+=I*tt,De+=I*it,ge+=I*yt,le+=I*Ft,B+=I*Oe,H+=I*Fe,W+=I*Ue,ee+=I*Re,ue+=I*nt,J+=(I=Q[3])*qt,Y+=I*Zt,ae+=I*Qt,te+=I*Yt,Ae+=I*Ut,me+=I*Xt,V+=I*rn,De+=I*tt,ge+=I*it,le+=I*yt,B+=I*Ft,H+=I*Oe,W+=I*Fe,ee+=I*Ue,ue+=I*Re,xe+=I*nt,Y+=(I=Q[4])*qt,ae+=I*Zt,te+=I*Qt,Ae+=I*Yt,me+=I*Ut,V+=I*Xt,De+=I*rn,ge+=I*tt,le+=I*it,B+=I*yt,H+=I*Ft,W+=I*Oe,ee+=I*Fe,ue+=I*Ue,xe+=I*Re,fe+=I*nt,ae+=(I=Q[5])*qt,te+=I*Zt,Ae+=I*Qt,me+=I*Yt,V+=I*Ut,De+=I*Xt,ge+=I*rn,le+=I*tt,B+=I*it,H+=I*yt,W+=I*Ft,ee+=I*Oe,ue+=I*Fe,xe+=I*Ue,fe+=I*Re,ce+=I*nt,te+=(I=Q[6])*qt,Ae+=I*Zt,me+=I*Qt,V+=I*Yt,De+=I*Ut,ge+=I*Xt,le+=I*rn,B+=I*tt,H+=I*it,W+=I*yt,ee+=I*Ft,ue+=I*Oe,xe+=I*Fe,fe+=I*Ue,ce+=I*Re,Ve+=I*nt,Ae+=(I=Q[7])*qt,me+=I*Zt,V+=I*Qt,De+=I*Yt,ge+=I*Ut,le+=I*Xt,B+=I*rn,H+=I*tt,W+=I*it,ee+=I*yt,ue+=I*Ft,xe+=I*Oe,fe+=I*Fe,ce+=I*Ue,Ve+=I*Re,Je+=I*nt,me+=(I=Q[8])*qt,V+=I*Zt,De+=I*Qt,ge+=I*Yt,le+=I*Ut,B+=I*Xt,H+=I*rn,W+=I*tt,ee+=I*it,ue+=I*yt,xe+=I*Ft,fe+=I*Oe,ce+=I*Fe,Ve+=I*Ue,Je+=I*Re,vt+=I*nt,V+=(I=Q[9])*qt,De+=I*Zt,ge+=I*Qt,le+=I*Yt,B+=I*Ut,H+=I*Xt,W+=I*rn,ee+=I*tt,ue+=I*it,xe+=I*yt,fe+=I*Ft,ce+=I*Oe,Ve+=I*Fe,Je+=I*Ue,vt+=I*Re,xt+=I*nt,De+=(I=Q[10])*qt,ge+=I*Zt,le+=I*Qt,B+=I*Yt,H+=I*Ut,W+=I*Xt,ee+=I*rn,ue+=I*tt,xe+=I*it,fe+=I*yt,ce+=I*Ft,Ve+=I*Oe,Je+=I*Fe,vt+=I*Ue,xt+=I*Re,kt+=I*nt,ge+=(I=Q[11])*qt,le+=I*Zt,B+=I*Qt,H+=I*Yt,W+=I*Ut,ee+=I*Xt,ue+=I*rn,xe+=I*tt,fe+=I*it,ce+=I*yt,Ve+=I*Ft,Je+=I*Oe,vt+=I*Fe,xt+=I*Ue,kt+=I*Re,Lt+=I*nt,le+=(I=Q[12])*qt,B+=I*Zt,H+=I*Qt,W+=I*Yt,ee+=I*Ut,ue+=I*Xt,xe+=I*rn,fe+=I*tt,ce+=I*it,Ve+=I*yt,Je+=I*Ft,vt+=I*Oe,xt+=I*Fe,kt+=I*Ue,Lt+=I*Re,pt+=I*nt,B+=(I=Q[13])*qt,H+=I*Zt,W+=I*Qt,ee+=I*Yt,ue+=I*Ut,xe+=I*Xt,fe+=I*rn,ce+=I*tt,Ve+=I*it,Je+=I*yt,vt+=I*Ft,xt+=I*Oe,kt+=I*Fe,Lt+=I*Ue,pt+=I*Re,It+=I*nt,H+=(I=Q[14])*qt,W+=I*Zt,ee+=I*Qt,ue+=I*Yt,xe+=I*Ut,fe+=I*Xt,ce+=I*rn,Ve+=I*tt,Je+=I*it,vt+=I*yt,xt+=I*Ft,kt+=I*Oe,Lt+=I*Fe,pt+=I*Ue,It+=I*Re,Ot+=I*nt,W+=(I=Q[15])*qt,pe+=38*(ue+=I*Qt),Ee+=38*(xe+=I*Yt),J+=38*(fe+=I*Ut),Y+=38*(ce+=I*Xt),ae+=38*(Ve+=I*rn),te+=38*(Je+=I*tt),Ae+=38*(vt+=I*it),me+=38*(xt+=I*yt),V+=38*(kt+=I*Ft),De+=38*(Lt+=I*Oe),ge+=38*(pt+=I*Fe),le+=38*(It+=I*Ue),B+=38*(Ot+=I*Re),H+=38*(hn+=I*nt),q=(I=(q+=38*(ee+=I*Zt))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),pe=(I=pe+Z+65535)-65536*(Z=Math.floor(I/65536)),Ee=(I=Ee+Z+65535)-65536*(Z=Math.floor(I/65536)),J=(I=J+Z+65535)-65536*(Z=Math.floor(I/65536)),Y=(I=Y+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),te=(I=te+Z+65535)-65536*(Z=Math.floor(I/65536)),Ae=(I=Ae+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),V=(I=V+Z+65535)-65536*(Z=Math.floor(I/65536)),De=(I=De+Z+65535)-65536*(Z=Math.floor(I/65536)),ge=(I=ge+Z+65535)-65536*(Z=Math.floor(I/65536)),le=(I=le+Z+65535)-65536*(Z=Math.floor(I/65536)),B=(I=B+Z+65535)-65536*(Z=Math.floor(I/65536)),H=(I=H+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=(q+=Z-1+37*(Z-1))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),pe=(I=pe+Z+65535)-65536*(Z=Math.floor(I/65536)),Ee=(I=Ee+Z+65535)-65536*(Z=Math.floor(I/65536)),J=(I=J+Z+65535)-65536*(Z=Math.floor(I/65536)),Y=(I=Y+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),te=(I=te+Z+65535)-65536*(Z=Math.floor(I/65536)),Ae=(I=Ae+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),V=(I=V+Z+65535)-65536*(Z=Math.floor(I/65536)),De=(I=De+Z+65535)-65536*(Z=Math.floor(I/65536)),ge=(I=ge+Z+65535)-65536*(Z=Math.floor(I/65536)),le=(I=le+Z+65535)-65536*(Z=Math.floor(I/65536)),B=(I=B+Z+65535)-65536*(Z=Math.floor(I/65536)),H=(I=H+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),q+=Z-1+37*(Z-1),re[0]=q,re[1]=pe,re[2]=Ee,re[3]=J,re[4]=Y,re[5]=ae,re[6]=te,re[7]=Ae,re[8]=me,re[9]=V,re[10]=De,re[11]=ge,re[12]=le,re[13]=B,re[14]=H,re[15]=W}function M(re,Q){w(re,Q,Q)}function T(re,Q){var F,I=n();for(F=0;F<16;F++)I[F]=Q[F];for(F=253;F>=0;F--)M(I,I),F!==2&&F!==4&&w(I,I,Q);for(F=0;F<16;F++)re[F]=I[F]}function R(re,Q,F){var I,Z,q=new Uint8Array(32),pe=new Float64Array(80),Ee=n(),J=n(),Y=n(),ae=n(),te=n(),Ae=n();for(Z=0;Z<31;Z++)q[Z]=Q[Z];for(q[31]=127&Q[31]|64,q[0]&=248,C(pe,F),Z=0;Z<16;Z++)J[Z]=pe[Z],ae[Z]=Ee[Z]=Y[Z]=0;for(Ee[0]=ae[0]=1,Z=254;Z>=0;--Z)b(Ee,J,I=q[Z>>>3]>>>(7&Z)&1),b(Y,ae,I),D(te,Ee,Y),P(Ee,Ee,Y),D(Y,J,ae),P(J,J,ae),M(ae,te),M(Ae,Ee),w(Ee,Y,Ee),w(Y,J,te),D(te,Ee,Y),P(Ee,Ee,Y),M(J,Ee),P(Y,ae,Ae),w(Ee,Y,c),D(Ee,Ee,ae),w(Y,Y,Ee),w(Ee,ae,Ae),w(ae,J,pe),M(J,te),b(Ee,J,I),b(Y,ae,I);for(Z=0;Z<16;Z++)pe[Z+16]=Ee[Z],pe[Z+32]=Y[Z],pe[Z+48]=J[Z],pe[Z+64]=ae[Z];var me=pe.subarray(32),V=pe.subarray(16);return T(me,me),w(V,V,me),E(re,V),0}function K(re,Q){return R(re,Q,i)}function L(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n(),Y=n(),ae=n();P(F,re[1],re[0]),P(ae,Q[1],Q[0]),w(F,F,ae),D(I,re[0],re[1]),D(ae,Q[0],Q[1]),w(I,I,ae),w(Z,re[3],Q[3]),w(Z,Z,s),w(q,re[2],Q[2]),D(q,q,q),P(pe,I,F),P(Ee,q,Z),D(J,q,Z),D(Y,I,F),w(re[0],pe,Ee),w(re[1],Y,J),w(re[2],J,Ee),w(re[3],pe,Y)}function z(re,Q,F){var I;for(I=0;I<4;I++)b(re[I],Q[I],F)}function U(re,Q){var F=n(),I=n(),Z=n();T(Z,Q[2]),w(F,Q[0],Z),w(I,Q[1],Z),E(re,I),re[31]^=x(F)<<7}function oe(re,Q,F){var I,Z;for(_(re[0],a),_(re[1],l),_(re[2],l),_(re[3],a),Z=255;Z>=0;--Z)z(re,Q,I=F[Z/8|0]>>(7&Z)&1),L(Q,re),L(re,re),z(re,Q,I)}function Pe(re,Q){var F=[n(),n(),n(),n()];_(F[0],p),_(F[1],d),_(F[2],l),w(F[3],p,d),oe(re,F,Q)}function he(re,Q,F){var I,Z,q=[n(),n(),n(),n()];for(F||r(Q,32),(I=t.hash(Q.subarray(0,32)))[0]&=248,I[31]&=127,I[31]|=64,Pe(q,I),U(re,q),Z=0;Z<32;Z++)Q[Z+32]=re[Z];return 0}var ye=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function de(re,Q){var F,I,Z,q;for(I=63;I>=32;--I){for(F=0,Z=I-32,q=I-12;Z >4)*ye[Z],F=Q[Z]>>8,Q[Z]&=255;for(Z=0;Z<32;Z++)Q[Z]-=F*ye[Z];for(I=0;I<32;I++)Q[I+1]+=Q[I]>>8,re[I]=255&Q[I]}function Se(re){var Q,F=new Float64Array(64);for(Q=0;Q<64;Q++)F[Q]=re[Q];for(Q=0;Q<64;Q++)re[Q]=0;de(re,F)}function X(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n();return _(re[2],l),C(re[1],Q),M(Z,re[1]),w(q,Z,h),P(Z,Z,re[2]),D(q,re[2],q),M(pe,q),M(Ee,pe),w(J,Ee,pe),w(F,J,Z),w(F,F,q),function(Y,ae){var te,Ae=n();for(te=0;te<16;te++)Ae[te]=ae[te];for(te=250;te>=0;te--)M(Ae,Ae),te!==1&&w(Ae,Ae,ae);for(te=0;te<16;te++)Y[te]=Ae[te]}(F,F),w(F,F,Z),w(F,F,q),w(F,F,q),w(re[0],F,q),M(I,re[0]),w(I,I,q),O(I,Z)&&w(re[0],re[0],v),M(I,re[0]),w(I,I,q),O(I,Z)?-1:(x(re[0])===Q[31]>>7&&P(re[0],a,re[0]),w(re[3],re[0],re[1]),0)}var se=64;function Ce(){for(var re=0;re=0},t.sign.keyPair=function(){var re=new Uint8Array(32),Q=new Uint8Array(64);return he(re,Q),{publicKey:re,secretKey:Q}},t.sign.keyPair.fromSecretKey=function(re){if(Ce(re),re.length!==64)throw Error("bad secret key size");for(var Q=new Uint8Array(32),F=0;F e&&(h.imod(a.leftShift(i)).iadd(a),s=h.mod(l).toNumber());while(!await kP(h,t,n));return h}async function kP(e,t,n){return!(t&&!e.dec().gcd(t).isOne())&&!!await async function(r){const i=await Te.getBigInteger();return KG.every(a=>r.mod(new i(a))!==0)}(e)&&!!await async function(r,i){const a=await Te.getBigInteger();return i=i||new a(2),i.modExp(r.dec(),r).isOne()}(e)&&!!await async function(r,i,a){const l=await Te.getBigInteger(),c=r.bitLength();i||(i=Math.max(1,c/48|0));const h=r.dec();let s=0;for(;!h.getBit(s);)s++;const p=r.rightShift(new l(s));for(;i>0;i--){let d,v=(a?a():await Eo(new l(2),h)).modExp(p,r);if(!v.isOne()&&!v.equal(h)){for(d=1;d t-11)throw Error("Message too long");const r=function(a){const l=new Uint8Array(a);let c=0;for(;c=8&!r;if(t)return Te.selectUint8Array(l,a,t);if(l)return a;throw Error("Decryption error")}async function Ob(e,t,n){let r;if(t.length!==Nc.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(Os[e].length);for(r=0;rimport("./bn.min.cc13483c.js"),[]),O=new E(_),x=new E(y),C=new E(m),D=C.mod(x.subn(1)),P=C.mod(O.subn(1)),w=wi.createSign(ve.read(ve.hash,s));w.write(p),w.end();const M={version:0,modulus:new E(d),publicExponent:new E(v),privateExponent:new E(m),prime1:new E(y),prime2:new E(_),exponent1:D,exponent2:P,coefficient:new E(b)};if(wi.createPrivateKey!==void 0){const R=rc.encode(M,"der");return new Uint8Array(w.sign({key:R,format:"der",type:"pkcs1"}))}const T=rc.encode(M,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(w.sign(T))}(e,t,n,r,i,a,l,c)}return async function(s,p,d,v){const m=await Te.getBigInteger();p=new m(p);const _=new m(await Ob(s,v,p.byteLength()));if(d=new m(d),_.gte(p))throw Error("Message size cannot exceed modulus size");return _.modExp(d,p).toUint8Array("be",p.byteLength())}(e,n,i,h)},verify:async function(e,t,n,r,i,a){if(t&&!Te.isStream(t)){if(Te.getWebCrypto())try{return await async function(l,c,h,s,p){const d=function(m,_){return{kty:"RSA",n:pa(m,!0),e:pa(_,!0),ext:!0}}(s,p),v=await nc.importKey("jwk",d,{name:"RSASSA-PKCS1-v1_5",hash:{name:l}},!1,["verify"]);return nc.verify("RSASSA-PKCS1-v1_5",v,h,c)}(ve.read(ve.webHash,e),t,n,r,i)}catch(l){Te.printDebugError(l)}else if(Te.getNodeCrypto())return async function(l,c,h,s,p){const{default:d}=await _n(()=>import("./bn.min.cc13483c.js"),[]),v=wi.createVerify(ve.read(ve.hash,l));v.write(c),v.end();const m={modulus:new d(s),publicExponent:new d(p)};let _;wi.createPrivateKey!==void 0?_={key:Rv.encode(m,"der"),format:"der",type:"pkcs1"}:_=Rv.encode(m,"pem",{label:"RSA PUBLIC KEY"});try{return await v.verify(_,h)}catch{return!1}}(e,t,n,r,i)}return async function(l,c,h,s,p){const d=await Te.getBigInteger();if(h=new d(h),c=new d(c),s=new d(s),c.gte(h))throw Error("Signature size cannot exceed modulus size");const v=c.modExp(s,h).toUint8Array("be",h.byteLength()),m=await Ob(l,p,h.byteLength());return Te.equalsUint8Array(v,m)}(e,n,r,i,a)},encrypt:async function(e,t,n){return Te.getNodeCrypto()?async function(r,i,a){const{default:l}=await _n(()=>import("./bn.min.cc13483c.js"),[]),c={modulus:new l(i),publicExponent:new l(a)};let h;return wi.createPrivateKey!==void 0?h={key:Rv.encode(c,"der"),format:"der",type:"pkcs1",padding:wi.constants.RSA_PKCS1_PADDING}:h={key:Rv.encode(c,"pem",{label:"RSA PUBLIC KEY"}),padding:wi.constants.RSA_PKCS1_PADDING},new Uint8Array(wi.publicEncrypt(h,r))}(e,t,n):async function(r,i,a){const l=await Te.getBigInteger();if(i=new l(i),r=new l(E2(r,i.byteLength())),a=new l(a),r.gte(i))throw Error("Message size cannot exceed modulus size");return r.modExp(a,i).toUint8Array("be",i.byteLength())}(e,t,n)},decrypt:async function(e,t,n,r,i,a,l,c){return Te.getNodeCrypto()?async function(h,s,p,d,v,m,_,y){const{default:b}=await _n(()=>import("./bn.min.cc13483c.js"),[]),E=new b(v),O=new b(m),x=new b(d),C=x.mod(O.subn(1)),D=x.mod(E.subn(1)),P={version:0,modulus:new b(s),publicExponent:new b(p),privateExponent:new b(d),prime1:new b(m),prime2:new b(v),exponent1:C,exponent2:D,coefficient:new b(_)};let w;wi.createPrivateKey!==void 0?w={key:rc.encode(P,"der"),format:"der",type:"pkcs1",padding:wi.constants.RSA_PKCS1_PADDING}:w={key:rc.encode(P,"pem",{label:"RSA PRIVATE KEY"}),padding:wi.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(wi.privateDecrypt(w,h))}catch{if(y)return y;throw Error("Decryption error")}}(e,t,n,r,i,a,l,c):async function(h,s,p,d,v,m,_,y){const b=await Te.getBigInteger();if(h=new b(h),s=new b(s),p=new b(p),d=new b(d),v=new b(v),m=new b(m),_=new b(_),h.gte(s))throw Error("Data too large.");const E=d.mod(m.dec()),O=d.mod(v.dec()),x=(await Eo(new b(2),s)).mod(s),C=x.modInv(s).modExp(p,s);h=h.mul(C).mod(s);const D=h.modExp(O,v),P=h.modExp(E,m);let M=_.mul(P.sub(D)).mod(m).mul(v).add(D);return M=M.mul(x).mod(s),D2(M.toUint8Array("be",s.byteLength()),y)}(e,t,n,r,i,a,l,c)},generate:async function(e,t){if(t=new(await Te.getBigInteger())(t),Te.getWebCrypto()){const l={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},c=await nc.generateKey(l,!0,["sign","verify"]),h=await nc.exportKey("jwk",c.privateKey);return{n:co(h.n),e:t.toUint8Array(),d:co(h.d),p:co(h.q),q:co(h.p),u:co(h.qi)}}if(Te.getNodeCrypto()&&wi.generateKeyPair&&rc){const l={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},c=await new Promise((h,s)=>{wi.generateKeyPair("rsa",l,(p,d,v)=>{p?s(p):h(rc.decode(v,"der"))})});return{n:c.modulus.toArrayLike(Uint8Array),e:c.publicExponent.toArrayLike(Uint8Array),d:c.privateExponent.toArrayLike(Uint8Array),p:c.prime2.toArrayLike(Uint8Array),q:c.prime1.toArrayLike(Uint8Array),u:c.coefficient.toArrayLike(Uint8Array)}}let n,r,i;do r=await o4(e-(e>>1),t,40),n=await o4(e>>1,t,40),i=n.mul(r);while(i.bitLength()!==e);const a=n.dec().imul(r.dec());return r.lt(n)&&([n,r]=[r,n]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:n.toUint8Array(),q:r.toUint8Array(),u:n.modInv(r).toUint8Array()}},validateParams:async function(e,t,n,r,i,a){const l=await Te.getBigInteger();if(e=new l(e),r=new l(r),i=new l(i),!r.mul(i).equal(e))return!1;const c=new l(2);if(a=new l(a),!r.mul(a).mod(i).isOne())return!1;t=new l(t),n=new l(n);const h=new l(Math.floor(e.bitLength()/3)),s=await Eo(c,c.leftShift(h)),p=s.mul(n).mul(t);return!(!p.mod(r.dec()).equal(s)||!p.mod(i.dec()).equal(s))}}),XG=Object.freeze({__proto__:null,encrypt:async function(e,t,n,r){const i=await Te.getBigInteger();t=new i(t),n=new i(n),r=new i(r);const a=new i(E2(e,t.byteLength())),l=await Eo(new i(1),t.dec());return{c1:n.modExp(l,t).toUint8Array(),c2:r.modExp(l,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,n,r,i){const a=await Te.getBigInteger();return e=new a(e),t=new a(t),n=new a(n),r=new a(r),D2(e.modExp(r,n).modInv(n).imul(t).imod(n).toUint8Array("be",n.byteLength()),i)},validateParams:async function(e,t,n,r){const i=await Te.getBigInteger();e=new i(e),t=new i(t),n=new i(n);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const l=new i(e.bitLength()),c=new i(1023);if(l.lt(c)||!t.modExp(e.dec(),e).isOne())return!1;let h=t;const s=new i(1),p=new i(2).leftShift(new i(17));for(;s.lt(p);){if(h=h.mul(t).imod(e),h.isOne())return!1;s.iinc()}r=new i(r);const d=new i(2),v=await Eo(d.leftShift(l.dec()),d.leftShift(l)),m=e.dec().imul(v).iadd(r);return!!n.equal(t.modExp(m,e))}});class Ms{constructor(t){if(t instanceof Ms)this.oid=t.oid;else if(Te.isArray(t)||Te.isUint8Array(t)){if((t=new Uint8Array(t))[0]===6){if(t[1]!==t.length-2)throw Error("Length mismatch in DER encoded oid");t=t.subarray(2)}this.oid=t}else this.oid=""}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.oid=t.subarray(1,1+n),1+this.oid.length}throw Error("Invalid oid")}write(){return Te.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Te.uint8ArrayToHex(this.oid)}getName(){const t=this.toHex();if(ve.curve[t])return ve.write(ve.curve,t);throw Error("Unknown curve object identifier.")}}function l_(e,t){return e.keyPair({priv:t})}function u_(e,t){const n=e.keyPair({pub:t});if(n.validate().result!==!0)throw Error("Invalid elliptic public key");return n}async function Jc(e){if(!Nt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await _n(()=>import("./elliptic.min.cb73496a.js"),["js/build/elliptic.min.cb73496a.js","js/build/bn.min.cc13483c.js"]);return new t.ec(e)}function PP(e){let t,n=0;const r=e[0];return r<192?([n]=e,t=1):r<255?(n=(e[0]-192<<8)+e[1]+192,t=2):r===255&&(n=Te.readNumber(e.subarray(1,5)),t=5),{len:n,offset:t}}function oh(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Te.concatUint8Array([new Uint8Array([255]),Te.writeNumber(e,4)])}function JG(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function TP(e){return new Uint8Array([192|e])}function l4(e,t){return Te.concatUint8Array([TP(e),oh(t)])}function _m(e){return[ve.packet.literalData,ve.packet.compressedData,ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData].includes(e)}async function ZG(e,t){const n=Qs(e);let r,i;try{const a=await n.peekBytes(2);if(!a||a.length<2||(128&a[0])==0)throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const l=await n.readByte();let c,h,s=-1,p=-1;p=0,(64&l)!=0&&(p=1),p?s=63&l:(s=(63&l)>>2,h=3&l);const d=_m(s);let v,m=null;if(d){if(Te.isStream(e)==="array"){const y=new js;r=ea(y),m=y}else{const y=new Rc;r=ea(y.writable),m=y.readable}i=t({tag:s,packet:m})}else m=[];do{if(p){const y=await n.readByte();if(v=!1,y<192)c=y;else if(y>=192&&y<224)c=(y-192<<8)+await n.readByte()+192;else if(y>223&&y<255){if(c=1<<(31&y),v=!0,!d)throw new TypeError("This packet type does not support partial lengths.")}else c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte()}else switch(h){case 0:c=await n.readByte();break;case 1:c=await n.readByte()<<8|await n.readByte();break;case 2:c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte();break;default:c=1/0}if(c>0){let y=0;for(;;){r&&await r.ready;const{done:b,value:E}=await n.read();if(b){if(c===1/0)break;throw Error("Unexpected end of packet")}const O=c===1/0?E:E.subarray(0,c-y);if(r?await r.write(O):m.push(O),y+=E.length,y>=c){n.unshift(E.subarray(c-y+E.length));break}}}}while(v);const _=await n.peekBytes(d?1/0:2);return r?(await r.ready,await r.close()):(m=Te.concatUint8Array(m),await t({tag:s,packet:m})),!_||!_.length}catch(a){if(r)return await r.abort(a),!0;throw a}finally{r&&await i,n.releaseLock()}}class zr extends Error{constructor(...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,zr),this.name="UnsupportedError"}}class Pb{constructor(t,n){this.tag=t,this.rawContent=n}write(){return this.rawContent}}const Ky=Te.getWebCrypto(),ug=Te.getNodeCrypto(),Gs={p256:"P-256",p384:"P-384",p521:"P-521"},io=ug?ug.getCurves():[],Ho=ug?{secp256k1:io.includes("secp256k1")?"secp256k1":void 0,p256:io.includes("prime256v1")?"prime256v1":void 0,p384:io.includes("secp384r1")?"secp384r1":void 0,p521:io.includes("secp521r1")?"secp521r1":void 0,ed25519:io.includes("ED25519")?"ED25519":void 0,curve25519:io.includes("X25519")?"X25519":void 0,brainpoolP256r1:io.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:io.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:io.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},ym={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Ho.p256,web:Gs.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Ho.p384,web:Gs.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Ho.p521,web:Gs.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Ho.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:ve.publicKey.eddsa,hash:ve.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:ve.publicKey.ecdh,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Ho.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Ho.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Ho.brainpoolP512r1,payloadSize:64}};class Do{constructor(t,n){try{(Te.isArray(t)||Te.isUint8Array(t))&&(t=new Ms(t)),t instanceof Ms&&(t=t.getName()),this.name=ve.write(ve.curve,t)}catch{throw new zr("Unknown curve")}n=n||ym[this.name],this.keyType=n.keyType,this.oid=n.oid,this.hash=n.hash,this.cipher=n.cipher,this.node=n.node&&ym[this.name],this.web=n.web&&ym[this.name],this.payloadSize=n.payloadSize,this.web&&Te.getWebCrypto()?this.type="web":this.node&&Te.getNodeCrypto()?this.type="node":this.name==="curve25519"?this.type="curve25519":this.name==="ed25519"&&(this.type="ed25519")}async genKeyPair(){let t;switch(this.type){case"web":try{return await async function(r){const i=await Ky.generateKey({name:"ECDSA",namedCurve:Gs[r]},!0,["sign","verify"]),a=await Ky.exportKey("jwk",i.privateKey),l=await Ky.exportKey("jwk",i.publicKey);return{publicKey:MP(l),privateKey:co(a.d)}}(this.name)}catch(r){Te.printDebugError("Browser did not support generating ec key "+r.message);break}case"node":return async function(r){const i=ug.createECDH(Ho[r]);return await i.generateKeys(),{publicKey:new Uint8Array(i.getPublicKey()),privateKey:new Uint8Array(i.getPrivateKey())}}(this.name);case"curve25519":{const r=Ks(32);r[0]=127&r[0]|64,r[31]&=248;const i=r.slice().reverse();return t=Hs.box.keyPair.fromSecretKey(i),{publicKey:Te.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:r}}case"ed25519":{const r=Ks(32),i=Hs.sign.keyPair.fromSeed(r);return{publicKey:Te.concatUint8Array([new Uint8Array([64]),i.publicKey]),privateKey:r}}}return t=await(await Jc(this.name)).genKeyPair({entropy:Te.uint8ArrayToString(Ks(32))}),{publicKey:new Uint8Array(t.getPublic("array",!1)),privateKey:t.getPrivate().toArrayLike(Uint8Array)}}}async function AP(e,t,n,r){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===ve.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if(a==="curve25519"){r=r.slice().reverse();const{publicKey:c}=Hs.box.keyPair.fromSecretKey(r);n=new Uint8Array(n);const h=new Uint8Array([64,...c]);return!!Te.equalsUint8Array(h,n)}const l=await Jc(a);try{n=u_(l,n).getPublic()}catch{return!1}return!!l_(l,r).getPublic().eq(n)}function MP(e){const t=co(e.x),n=co(e.y),r=new Uint8Array(t.length+n.length+1);return r[0]=4,r.set(t,1),r.set(n,t.length+1),r}function c_(e,t,n){const r=e,i=n.slice(1,r+1),a=n.slice(r+1,2*r+1);return{kty:"EC",crv:t,x:pa(i,!0),y:pa(a,!0),ext:!0}}function IP(e,t,n,r){const i=c_(e,t,n);return i.d=pa(r,!0),i}const cg=Te.getWebCrypto(),Zc=Te.getNodeCrypto();async function u4(e,t,n,r,i,a){const l=new Do(e);if(n&&!Te.isStream(n)){const c={publicKey:r,privateKey:i};switch(l.type){case"web":try{return await async function(h,s,p,d){const v=h.payloadSize,m=IP(h.payloadSize,Gs[h.name],d.publicKey,d.privateKey),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Gs[h.name],hash:{name:ve.read(ve.webHash,h.hash)}},!1,["sign"]),y=new Uint8Array(await cg.sign({name:"ECDSA",namedCurve:Gs[h.name],hash:{name:ve.read(ve.webHash,s)}},_,p));return{r:y.slice(0,v),s:y.slice(v,v<<1)}}(l,t,n,c)}catch(h){if(l.name!=="p521"&&(h.name==="DataError"||h.name==="OperationError"))throw h;Te.printDebugError("Browser did not support signing: "+h.message)}break;case"node":{const h=await async function(s,p,d,v){const m=Zc.createSign(ve.read(ve.hash,p));m.write(d),m.end();const _=QG.encode({version:1,parameters:s.oid,privateKey:Array.from(v.privateKey),publicKey:{unused:0,data:Array.from(v.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return $P.decode(m.sign(_),"der")}(l,t,n,c);return{r:h.r.toArrayLike(Uint8Array),s:h.s.toArrayLike(Uint8Array)}}}}return async function(c,h,s){const p=await Jc(c.name),d=l_(p,s),v=d.sign(h);return{r:v.r.toArrayLike(Uint8Array),s:v.s.toArrayLike(Uint8Array)}}(l,a,i)}async function c4(e,t,n,r,i,a){const l=new Do(e);if(r&&!Te.isStream(r))switch(l.type){case"web":try{return await async function(c,h,{r:s,s:p},d,v){const m=c_(c.payloadSize,Gs[c.name],v),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Gs[c.name],hash:{name:ve.read(ve.webHash,c.hash)}},!1,["verify"]),y=Te.concatUint8Array([s,p]).buffer;return cg.verify({name:"ECDSA",namedCurve:Gs[c.name],hash:{name:ve.read(ve.webHash,h)}},_,y,d)}(l,t,n,r,i)}catch(c){if(l.name!=="p521"&&(c.name==="DataError"||c.name==="OperationError"))throw c;Te.printDebugError("Browser did not support verifying: "+c.message)}break;case"node":return async function(c,h,{r:s,s:p},d,v){const{default:m}=await _n(()=>import("./bn.min.cc13483c.js"),[]),_=Zc.createVerify(ve.read(ve.hash,h));_.write(d),_.end();const y=eY.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:c.oid},subjectPublicKey:{unused:0,data:Array.from(v)}},"pem",{label:"PUBLIC KEY"}),b=$P.encode({r:new m(s),s:new m(p)},"der");try{return _.verify(y,b)}catch{return!1}}(l,t,n,r,i)}return async function(c,h,s,p){const d=await Jc(c.name);return u_(d,p).verify(s,h)}(l,n,t===void 0?r:a,i)}const d_=void 0,$P=Zc?d_.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,QG=Zc?d_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())}):void 0,qG=Zc?d_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,eY=Zc?d_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(qG),this.key("subjectPublicKey").bitstr())}):void 0;var tY=Object.freeze({__proto__:null,sign:u4,verify:c4,validateParams:async function(e,t,n){const r=new Do(e);if(r.keyType!==ve.publicKey.ecdsa)return!1;switch(r.type){case"web":case"node":{const i=Ks(8),a=ve.hash.sha256,l=await Nc.digest(a,i);try{const c=await u4(e,a,i,t,n,l);return await c4(e,a,c,i,t,l)}catch{return!1}}default:return AP(ve.publicKey.ecdsa,e,t,n)}}});Hs.hash=e=>new Uint8Array(s_().update(e).digest());var nY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){if(Nc.getHashByteLength(t) =0;--p)for(let d=c-1;d>=0;--d)h[1]=c*p+(d+1),s[0]=a[0]^h[0],s[1]=a[1]^h[1],s[2]=l[2*d],s[3]=l[2*d+1],s=dg(n.decrypt(fg(s))),a=s.subarray(0,2),l[2*d]=s[2],l[2*d+1]=s[3];if(a[0]===r[0]&&a[1]===r[1])return fg(l);throw Error("Key Data Integrity failed")}function dg(e){const{length:t}=e,n=function(a){if(Te.isString(a)){const{length:l}=a,c=new ArrayBuffer(l),h=new Uint8Array(c);for(let s=0;s 0){const n=e[t-1];if(n>=1){const r=e.subarray(t-n),i=new Uint8Array(n).fill(n);if(Te.equalsUint8Array(r,i))return e.subarray(0,t-n)}}throw Error("Invalid padding")}var iY=Object.freeze({__proto__:null,encode:LP,decode:FP});const tl=Te.getWebCrypto(),BP=Te.getNodeCrypto();function d4(e,t,n,r){return Te.concatUint8Array([t.write(),new Uint8Array([e]),n.write(),Te.stringToUint8Array("Anonymous Sender "),r.subarray(0,20)])}async function f4(e,t,n,r,i=!1,a=!1){let l;if(i){for(l=0;l =0&&t[l]===0;l--);t=t.subarray(0,l+1)}return(await Nc.digest(e,Te.concatUint8Array([new Uint8Array([0,0,0,1]),t,r]))).subarray(0,n)}async function aY(e,t){switch(e.type){case"curve25519":{const n=Ks(32),{secretKey:r,sharedKey:i}=await UP(e,t,null,n);let{publicKey:a}=Hs.box.keyPair.fromSecretKey(r);return a=Te.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(n,r){const i=c_(n.payloadSize,n.web.web,r);let a=tl.generateKey({name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]),l=tl.importKey("jwk",i,{name:"ECDH",namedCurve:n.web.web},!1,[]);[a,l]=await Promise.all([a,l]);let c=tl.deriveBits({name:"ECDH",namedCurve:n.web.web,public:l},a.privateKey,n.web.sharedSize),h=tl.exportKey("jwk",a.publicKey);[c,h]=await Promise.all([c,h]);const s=new Uint8Array(c);return{publicKey:new Uint8Array(MP(h)),sharedKey:s}}(e,t)}catch(n){Te.printDebugError(n)}break;case"node":return async function(n,r){const i=BP.createECDH(n.node.node);i.generateKeys();const a=new Uint8Array(i.computeSecret(r));return{publicKey:new Uint8Array(i.getPublicKey()),sharedKey:a}}(e,t)}return async function(n,r){const i=await Jc(n.name),a=await n.genKeyPair();r=u_(i,r);const l=l_(i,a.privateKey),c=a.publicKey,h=l.derive(r.getPublic()),s=i.curve.p.byteLength(),p=h.toArrayLike(Uint8Array,"be",s);return{publicKey:c,sharedKey:p}}(e,t)}async function UP(e,t,n,r){if(r.length!==e.payloadSize){const i=new Uint8Array(e.payloadSize);i.set(r,e.payloadSize-r.length),r=i}switch(e.type){case"curve25519":{const i=r.slice().reverse();return{secretKey:i,sharedKey:Hs.scalarMult(i,t.subarray(1))}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(i,a,l,c){const h=IP(i.payloadSize,i.web.web,l,c);let s=tl.importKey("jwk",h,{name:"ECDH",namedCurve:i.web.web},!0,["deriveKey","deriveBits"]);const p=c_(i.payloadSize,i.web.web,a);let d=tl.importKey("jwk",p,{name:"ECDH",namedCurve:i.web.web},!0,[]);[s,d]=await Promise.all([s,d]);let v=tl.deriveBits({name:"ECDH",namedCurve:i.web.web,public:d},s,i.web.sharedSize),m=tl.exportKey("jwk",s);[v,m]=await Promise.all([v,m]);const _=new Uint8Array(v);return{secretKey:co(m.d),sharedKey:_}}(e,t,n,r)}catch(i){Te.printDebugError(i)}break;case"node":return async function(i,a,l){const c=BP.createECDH(i.node.node);c.setPrivateKey(l);const h=new Uint8Array(c.computeSecret(a));return{secretKey:new Uint8Array(c.getPrivateKey()),sharedKey:h}}(e,t,r)}return async function(i,a,l){const c=await Jc(i.name);a=u_(c,a),l=l_(c,l);const h=new Uint8Array(l.getPrivate()),s=l.derive(a.getPublic()),p=c.curve.p.byteLength(),d=s.toArrayLike(Uint8Array,"be",p);return{secretKey:h,sharedKey:d}}(e,t,r)}var sY=Object.freeze({__proto__:null,validateParams:async function(e,t,n){return AP(ve.publicKey.ecdh,e,t,n)},encrypt:async function(e,t,n,r,i){const a=LP(n),l=new Do(e),{publicKey:c,sharedKey:h}=await aY(l,r),s=d4(ve.publicKey.ecdh,e,t,i),{keySize:p}=cl(t.cipher);return{publicKey:c,wrappedKey:RP(await f4(t.hash,h,p,s),a)}},decrypt:async function(e,t,n,r,i,a,l){const c=new Do(e),{sharedKey:h}=await UP(c,n,i,a),s=d4(ve.publicKey.ecdh,e,t,l),{keySize:p}=cl(t.cipher);let d;for(let v=0;v<3;v++)try{return FP(NP(await f4(t.hash,h,p,s,v===1,v===2),r))}catch(m){d=m}throw d}}),oY=Object.freeze({__proto__:null,Curve:Do,ecdh:sY,ecdsa:tY,eddsa:nY,generate:async function(e){const t=await Te.getBigInteger();e=new Do(e);const n=await e.genKeyPair(),r=new t(n.publicKey).toUint8Array(),i=new t(n.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:r,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return ym[ve.write(ve.curve,e.toHex())].hash}}),lY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){const l=await Te.getBigInteger(),c=new l(1);let h,s,p,d;r=new l(r),i=new l(i),n=new l(n),a=new l(a),n=n.mod(r),a=a.mod(i);const v=new l(t.subarray(0,i.byteLength())).mod(i);for(;;){if(h=await Eo(c,i),s=n.modExp(h,r).imod(i),s.isZero())continue;const m=a.mul(s).imod(i);if(d=v.add(m).imod(i),p=h.modInv(i).imul(d).imod(i),!p.isZero())break}return{r:s.toUint8Array("be",i.byteLength()),s:p.toUint8Array("be",i.byteLength())}},verify:async function(e,t,n,r,i,a,l,c){const h=await Te.getBigInteger(),s=new h(0);if(t=new h(t),n=new h(n),a=new h(a),l=new h(l),i=new h(i),c=new h(c),t.lte(s)||t.gte(l)||n.lte(s)||n.gte(l))return Te.printDebug("invalid DSA Signature"),!1;const p=new h(r.subarray(0,l.byteLength())).imod(l),d=n.modInv(l);if(d.isZero())return Te.printDebug("invalid DSA Signature"),!1;i=i.mod(a),c=c.mod(a);const v=p.mul(d).imod(l),m=t.mul(d).imod(l),_=i.modExp(v,a),y=c.modExp(m,a);return _.mul(y).imod(a).imod(l).equal(t)},validateParams:async function(e,t,n,r,i){const a=await Te.getBigInteger();e=new a(e),t=new a(t),n=new a(n),r=new a(r);const l=new a(1);if(n.lte(l)||n.gte(e)||!e.dec().mod(t).isZero()||!n.modExp(t,e).isOne())return!1;const c=new a(t.bitLength()),h=new a(150);if(c.lt(h)||!await kP(t,null,32))return!1;i=new a(i);const s=new a(2),p=await Eo(s.leftShift(c.dec()),s.leftShift(c)),d=t.mul(p).add(i);return!!r.equal(n.modExp(d,e))}}),dr={rsa:YG,elgamal:XG,elliptic:oY,dsa:lY,nacl:Hs},uY=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:return{s:Te.readMPI(t.subarray(n))};case ve.publicKey.dsa:case ve.publicKey.ecdsa:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{r,s:Te.readMPI(t.subarray(n))}}case ve.publicKey.eddsa:{let r=Te.readMPI(t.subarray(n));n+=r.length+2,r=Te.leftPad(r,32);let i=Te.readMPI(t.subarray(n));return i=Te.leftPad(i,32),{r,s:i}}default:throw new zr("Unknown signature algorithm.")}},verify:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=r,h=Te.leftPad(n.s,l.length);return dr.rsa.verify(t,i,h,l,c,a)}case ve.publicKey.dsa:{const{g:l,p:c,q:h,y:s}=r,{r:p,s:d}=n;return dr.dsa.verify(t,p,d,a,l,c,h,s)}case ve.publicKey.ecdsa:{const{oid:l,Q:c}=r,h=new dr.elliptic.Curve(l).payloadSize,s=Te.leftPad(n.r,h),p=Te.leftPad(n.s,h);return dr.elliptic.ecdsa.verify(l,t,{r:s,s:p},i,c,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=r;return dr.elliptic.eddsa.verify(l,t,n,i,c,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,n,r,i,a){if(!n||!r)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=n,{d:h,p:s,q:p,u:d}=r;return{s:await dr.rsa.sign(t,i,l,c,h,s,p,d,a)}}case ve.publicKey.dsa:{const{g:l,p:c,q:h}=n,{x:s}=r;return dr.dsa.sign(t,a,l,c,h,s)}case ve.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case ve.publicKey.ecdsa:{const{oid:l,Q:c}=n,{d:h}=r;return dr.elliptic.ecdsa.sign(l,t,i,c,h,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=n,{seed:h}=r;return dr.elliptic.eddsa.sign(l,t,i,c,h,a)}default:throw Error("Unknown signature algorithm.")}}});class h4{constructor(t){t=t===void 0?new Uint8Array([]):Te.isString(t)?Te.stringToUint8Array(t):new Uint8Array(t),this.data=t}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.data=t.subarray(1,1+n),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Te.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class p4{constructor(t){if(t){const{hash:n,cipher:r}=t;this.hash=n,this.cipher=r}else this.hash=null,this.cipher=null}read(t){if(t.length<4||t[0]!==3||t[1]!==1)throw Error("Cannot read KDFParams");return this.hash=t[2],this.cipher=t[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function Gy(e){try{e.getName()}catch{throw new zr("Unknown curve OID")}}var cY=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,n,r){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:{const{n:i,e:a}=t;return{c:await dr.rsa.encrypt(n,i,a)}}case ve.publicKey.elgamal:{const{p:i,g:a,y:l}=t;return dr.elgamal.encrypt(n,i,a,l)}case ve.publicKey.ecdh:{const{oid:i,Q:a,kdfParams:l}=t,{publicKey:c,wrappedKey:h}=await dr.elliptic.ecdh.encrypt(i,l,n,a,r);return{V:c,C:new h4(h)}}default:return[]}},publicKeyDecrypt:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:{const{c:l}=r,{n:c,e:h}=t,{d:s,p,q:d,u:v}=n;return dr.rsa.decrypt(l,c,h,s,p,d,v,a)}case ve.publicKey.elgamal:{const{c1:l,c2:c}=r,h=t.p,s=n.x;return dr.elgamal.decrypt(l,c,h,s,a)}case ve.publicKey.ecdh:{const{oid:l,Q:c,kdfParams:h}=t,{d:s}=n,{V:p,C:d}=r;return dr.elliptic.ecdh.decrypt(l,h,p,d.data,c,s,i)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{n:r,e:i}}}case ve.publicKey.dsa:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));n+=a.length+2;const l=Te.readMPI(t.subarray(n));return n+=l.length+2,{read:n,publicParams:{p:r,q:i,g:a,y:l}}}case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{p:r,g:i,y:a}}}case ve.publicKey.ecdsa:{const r=new Ms;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.eddsa:{const r=new Ms;n+=r.read(t),Gy(r);let i=Te.readMPI(t.subarray(n));return n+=i.length+2,i=Te.leftPad(i,33),{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.ecdh:{const r=new Ms;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=new p4;return n+=a.read(t.subarray(n)),{read:n,publicParams:{oid:r,Q:i,kdfParams:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,n){let r=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const i=Te.readMPI(t.subarray(r));r+=i.length+2;const a=Te.readMPI(t.subarray(r));r+=a.length+2;const l=Te.readMPI(t.subarray(r));r+=l.length+2;const c=Te.readMPI(t.subarray(r));return r+=c.length+2,{read:r,privateParams:{d:i,p:a,q:l,u:c}}}case ve.publicKey.dsa:case ve.publicKey.elgamal:{const i=Te.readMPI(t.subarray(r));return r+=i.length+2,{read:r,privateParams:{x:i}}}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{d:a}}}case ve.publicKey.eddsa:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{seed:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:return{c:Te.readMPI(t.subarray(n))};case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{c1:r,c2:Te.readMPI(t.subarray(n))}}case ve.publicKey.ecdh:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=new h4;return i.read(t.subarray(n)),{V:r,C:i}}default:throw new zr("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const n=Object.keys(t).map(r=>{const i=t[r];return Te.isUint8Array(i)?Te.uint8ArrayToMPI(i):i.write()});return Te.concatUint8Array(n)},generateParams:function(e,t,n){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:return dr.rsa.generate(t,65537).then(({n:r,e:i,d:a,p:l,q:c,u:h})=>({privateParams:{d:a,p:l,q:c,u:h},publicParams:{n:r,e:i}}));case ve.publicKey.ecdsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{d:a},publicParams:{oid:new Ms(r),Q:i}}));case ve.publicKey.eddsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{seed:a},publicParams:{oid:new Ms(r),Q:i}}));case ve.publicKey.ecdh:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a,hash:l,cipher:c})=>({privateParams:{d:a},publicParams:{oid:new Ms(r),Q:i,kdfParams:new p4({hash:l,cipher:c})}}));case ve.publicKey.dsa:case ve.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,n){if(!t||!n)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const{n:r,e:i}=t,{d:a,p:l,q:c,u:h}=n;return dr.rsa.validateParams(r,i,a,l,c,h)}case ve.publicKey.dsa:{const{p:r,q:i,g:a,y:l}=t,{x:c}=n;return dr.dsa.validateParams(r,i,a,l,c)}case ve.publicKey.elgamal:{const{p:r,g:i,y:a}=t,{x:l}=n;return dr.elgamal.validateParams(r,i,a,l)}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const r=dr.elliptic[ve.read(ve.publicKey,e)],{oid:i,Q:a}=t,{d:l}=n;return r.validateParams(i,a,l)}case ve.publicKey.eddsa:{const{oid:r,Q:i}=t,{seed:a}=n;return dr.elliptic.eddsa.validateParams(r,i,a)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=cl(e),n=await Ks(t),r=new Uint8Array([n[n.length-2],n[n.length-1]]);return Te.concat([n,r])},generateSessionKey:function(e){const{keySize:t}=cl(e);return Ks(t)},getAEADMode:function(e){const t=ve.read(ve.aead,e);return DP[t]},getCipher:cl});const Kt={cipher:sh,hash:Nc,mode:DP,publicKey:dr,signature:uY,random:HG,pkcs1:GG,pkcs5:iY,aesKW:rY};Object.assign(Kt,cY);var lh=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function jP(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const zP={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(let a=0;a =0;)e[t]=0}const vY=0,YP=1,mY=2,O2=29,uh=256,Ff=uh+1+O2,kc=30,P2=19,_4=2*Ff+1,eu=15,Yy=16,gY=7,T2=256,XP=16,JP=17,ZP=18,Ab=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],bm=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_Y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],y4=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],lo=Array(2*(Ff+2));Qc(lo);const bf=Array(2*kc);Qc(bf);const Bf=Array(512);Qc(Bf);const Uf=Array(256);Qc(Uf);const A2=Array(O2);Qc(A2);const pg=Array(kc);function Xy(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let b4,w4,C4;function Jy(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function QP(e){return e<256?Bf[e]:Bf[256+(e>>>7)]}function jf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Hi(e,t,n){e.bi_valid>Yy-n?(e.bi_buf|=t< >Yy-e.bi_valid,e.bi_valid+=n-Yy):(e.bi_buf|=t< >>=1,n<<=1;while(--t>0);return n>>>1}function eT(e,t,n){const r=Array(eu+1);let i,a,l=0;for(i=1;i<=eu;i++)r[i]=l=l+n[i-1]<<1;for(a=0;a<=t;a++){const c=e[2*a+1];c!==0&&(e[2*a]=qP(r[c]++,c))}}function tT(e){let t;for(t=0;t 8?jf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x4(e,t,n,r){const i=2*t,a=2*n;return e[i] >1;l>=1;l--)Zy(e,n,l);h=a;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Zy(e,n,1),c=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=c,n[2*h]=n[2*l]+n[2*c],e.depth[h]=(e.depth[l]>=e.depth[c]?e.depth[l]:e.depth[c])+1,n[2*l+1]=n[2*c+1]=h,e.heap[1]=h++,Zy(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(p,d){const v=d.dyn_tree,m=d.max_code,_=d.stat_desc.static_tree,y=d.stat_desc.has_stree,b=d.stat_desc.extra_bits,E=d.stat_desc.extra_base,O=d.stat_desc.max_length;let x,C,D,P,w,M,T=0;for(P=0;P<=eu;P++)p.bl_count[P]=0;for(v[2*p.heap[p.heap_max]+1]=0,x=p.heap_max+1;x<_4;x++)C=p.heap[x],P=v[2*v[2*C+1]+1]+1,P>O&&(P=O,T++),v[2*C+1]=P,C>m||(p.bl_count[P]++,w=0,C>=E&&(w=b[C-E]),M=v[2*C],p.opt_len+=M*(P+w),y&&(p.static_len+=M*(_[2*C+1]+w)));if(T!==0){do{for(P=O-1;p.bl_count[P]===0;)P--;p.bl_count[P]--,p.bl_count[P+1]+=2,p.bl_count[O]--,T-=2}while(T>0);for(P=O;P!==0;P--)for(C=p.bl_count[P];C!==0;)D=p.heap[--x],D>m||(v[2*D+1]!==P&&(p.opt_len+=(P-v[2*D+1])*v[2*D],v[2*D+1]=P),C--)}}(e,t),eT(n,s,e.bl_count)}function E4(e,t,n){let r,i,a=-1,l=t[1],c=0,h=7,s=4;for(l===0&&(h=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=l,l=t[2*(r+1)+1],++c >=7;i =8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function wY(e,t,n,r){let i,a,l=0;e.level>0?(e.strm.data_type===GP&&(e.strm.data_type=function(c){let h,s=4093624447;for(h=0;h<=31;h++,s>>>=1)if(1&s&&c.dyn_ltree[2*h]!==0)return m4;if(c.dyn_ltree[18]!==0||c.dyn_ltree[20]!==0||c.dyn_ltree[26]!==0)return g4;for(h=32;h =3&&c.bl_tree[2*y4[h]+1]===0;h--);return c.opt_len+=3*(h+1)+5+5+4,h}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?rT(e,t,n,r):e.strategy===KP||a===i?(Hi(e,(YP<<1)+(r?1:0),3),S4(e,lo,bf)):(Hi(e,(mY<<1)+(r?1:0),3),function(c,h,s,p){let d;for(Hi(c,h-257,5),Hi(c,s-1,5),Hi(c,p-4,4),d=0;d >>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Uf[n]+uh+1)]++,e.dyn_dtree[2*QP(t)]++),e.last_lit===e.lit_bufsize-1}function zf(e,t,n,r){let i=65535&e|0,a=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,a=a+i|0;while(--l);i%=65521,a%=65521}return i|a<<16|0}const CY=function(){let e;const t=[];for(let n=0;n<256;n++){e=n;for(let r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Kr(e,t,n,r){const i=CY,a=r+n;e^=-1;for(let l=r;l>>8^i[255&(e^t[l])];return-1^e}var Vf={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const xY=9,Bn=3,nl=258,rs=nl+Bn+1,SY=32,vg=42,Mb=69,wm=73,Cm=91,xm=103,tu=113,ef=666,Gr=1,wf=2,nu=3,Oc=4,EY=3;function rl(e,t){return e.msg=Vf[t],t}function O4(e){return(e<<1)-(e>4?9:0)}function Zo(e){let t=e.length;for(;--t>=0;)e[t]=0}function Ko(e){const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Ys(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function si(e,t){wY(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ko(e.strm)}function zn(e,t){e.pending_buf[e.pending++]=t}function Rd(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function DY(e,t,n,r){let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Ys(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=zf(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Kr(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function iT(e,t){let n,r,i=e.max_chain_length,a=e.strstart,l=e.prev_length,c=e.nice_match;const h=e.strstart>e.w_size-rs?e.strstart-(e.w_size-rs):0,s=e.window,p=e.w_mask,d=e.prev,v=e.strstart+nl;let m=s[a+l-1],_=s[a+l];e.prev_length>=e.good_match&&(i>>=2),c>e.lookahead&&(c=e.lookahead);do if(n=t,s[n+l]===_&&s[n+l-1]===m&&s[n]===s[a]&&s[++n]===s[a+1]){a+=2,n++;do;while(s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&a
l){if(e.match_start=t,l=r,r>=c)break;m=s[a+l-1],_=s[a+l]}}while((t=d[t&p])>h&&--i!=0);return l<=e.lookahead?l:e.lookahead}function yu(e){const t=e.w_size;let n,r,i,a,l;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-rs)){Ys(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=DY(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=Bn)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h< =Bn&&(e.ins_h=(e.ins_h< =Bn)if(r=dl(e,e.strstart-e.match_start,e.match_length-Bn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Bn){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<