2025-04-17 10:37:22 +00:00
|
|
|
(()=>{"use strict";var t,e,n,i={35810:(t,e,n)=>{n.d(e,{Al:()=>i.r,CP:()=>i.k,Gg:()=>u,H4:()=>i.c,Q$:()=>i.e,R3:()=>i.n,Ss:()=>tt,VI:()=>c,VL:()=>i.l,VP:()=>N,VX:()=>i.j,aX:()=>i.P,bh:()=>b,hY:()=>l,lJ:()=>i.d,pt:()=>i.F,ur:()=>m,v7:()=>p,yC:()=>d});var i=n(68251),r=(n(43627),n(53334)),s=n(380),o=n(65606),a=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(a||{});class l{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(a).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const u=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],i.o.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?i.o.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};class c{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get iconSvgInline(){return this._action.iconSvgInline}get order(){return this._action.order}get enabled(){return this._action.enabled}get exec(){return this._action.exec}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("iconSvgInline"in t&&"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function")}}const d=t=>{void 0===window._nc_filelistactions&&(window._nc_filelistactions=[]),window._nc_filelistactions.find((e=>e.id===t.id))?i.o.error(`FileListAction with id "${t.id}" is already registered`,{action:t}):window._nc_filelistactions.push(t)};Error;const h=["B","KB","MB","GB","TB","PB"],f=["B","KiB","MiB","GiB","TiB","PiB"];function p(t,e=!1,n=!1,i=!1){n=n&&!i,"string"==typeof t&&(t=Number(t));let s=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;s=Math.min((n?f.length:h.length)-1,s);const o=n?f[s]:h[s];let a=(t/Math.pow(i?1e3:1024,s)).toFixed(1);return!0===e&&0===s?("0.0"!==a?"< 1 ":"0 ")+(n?f[1]:h[1]):(a=s<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,r.lO)()),a+" "+o)}function g(t){return t instanceof Date?t.toISOString():String(t)}function m(t,e={}){const n={sortingMode:"basename",so
|