You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
16 KiB
2 lines
16 KiB
(()=>{var e,t={39224(e,t,r){"use strict";var i=r(36520),n=r(380),o=r(20005),s=r(53334),a=r(65606);const E=Object.freeze({DEFAULT:"default",HIDDEN:"hidden"});var c,l,h,d;function f(){if(l)return c;l=1;const e="object"==typeof a&&a.env&&a.env.NODE_DEBUG&&/\bsemver\b/i.test(a.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return c=e}function p(){if(d)return h;d=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return h={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var I,u,N,R,m,w,L,O,v,b,A,g,$,S={exports:{}};function T(){if(L)return w;L=1;const e=f(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=p(),{safeRe:i,t:n}=(I||(I=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=p(),o=f(),s=(t=e.exports={}).re=[],a=t.safeRe=[],E=t.src=[],c=t.safeSrc=[],l=t.t={};let h=0;const d="[a-zA-Z0-9-]",I=[["\\s",1],["\\d",n],[d,i]],u=(e,t,r)=>{const i=(e=>{for(const[t,r]of I)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=h++;o(e,n,t),l[e]=n,E[n]=t,c[n]=i,s[n]=new RegExp(t,r?"g":void 0),a[n]=new RegExp(i,r?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","\\d+"),u("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),u("MAINVERSION",`(${E[l.NUMERICIDENTIFIER]})\\.(${E[l.NUMERICIDENTIFIER]})\\.(${E[l.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${E[l.NUMERICIDENTIFIERLOOSE]})\\.(${E[l.NUMERICIDENTIFIERLOOSE]})\\.(${E[l.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${E[l.NONNUMERICIDENTIFIER]}|${E[l.NUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${E[l.NONNUMERICIDENTIFIER]}|${E[l.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASE",`(?:-(${E[l.PRERELEASEIDENTIFIER]}(?:\\.${E[l.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${E[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[l.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER",`${d}+`),u("BUILD",`(?:\\+(${E[l.BUILDIDENTIFIER]}(?:\\.${E[l.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${E[l.MAINVERSION]}${E[l.PRERELEASE]}?${E[l.BUILD]}?`),u("FULL",`^${E[l.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${E[l.MAINVERSIONLOOSE]}${E[l.PRERELEASELOOSE]}?${E[l.BUILD]}?`),u("LOOSE",`^${E[l.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${E[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${E[l.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${E[l.XRANGEIDENTIFIER]})(?:\\.(${E[l.XRANGEIDENTIFIER]})(?:\\.(${E[l.XRANGEIDENTIFIER]})(?:${E[l.PRERELEASE]})?${E[l.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${E[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[l.XRANGEIDENTIFIERLOOSE]})(?:${E[l.PRERELEASELOOSE]})?${E[l.BUILD]}?)?)?`),u("XRANGE",`^${E[l.GTLT]}\\s*${E[l.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${E[l.GTLT]}\\s*${E[l.XRANGEPLAINLOOSE]}$`),u("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),u("COERCE",`${E[l.COERCEPLAIN]}(?:$|[^\\d])`),u("COERCEFULL",E[l.COERCEPLAIN]+`(?:${E[l.PRERELEASE]})?(?:${E[l.BUILD]})?(?:$|[^\\d])`),u("COERCERTL",E[l.COERCE],!0),u("COERCERTLFULL",E[l.COERCEFULL],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${E[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${E[l.LONETILDE]}${E[l.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${E[l.LONETILDE]}${E[l.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${E[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${E[l.LONECARET]}${E[l.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${E[l.LONECARET]}${E[l.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${E[l.GTLT]}\\s*(${E[l.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${E[l.GTLT]}\\s*(${E[l.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${E[l.GTLT]}\\s*(${E[l.LOOSEPLAIN]}|${E[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${E[l.XRANGEPLAIN]})\\s+-\\s+(${E[l.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${E[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[l.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(S,S.exports)),S.exports),o=function(){if(N)return u;N=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return u=r=>r?"object"!=typeof r?e:r:t}(),{compareIdentifiers:s}=function(){if(m)return R;m=1;const e=/^[0-9]+$/,t=(t,r)=>{if("number"==typeof t&&"number"==typeof r)return t===r?0:t<r?-1:1;const i=e.test(t),n=e.test(r);return i&&n&&(t=+t,r=+r),t===r?0:i&&!n?-1:n&&!i?1:t<r?-1:1};return R={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}();class a{constructor(s,E){if(E=o(E),s instanceof a){if(s.loose===!!E.loose&&s.includePrerelease===!!E.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",s,E),this.options=E,this.loose=!!E.loose,this.includePrerelease=!!E.includePrerelease;const c=s.trim().match(E.loose?i[n.LOOSE]:i[n.FULL]);if(!c)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<r)return t}return e}):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof a)){if("string"==typeof t&&t===this.version)return 0;t=new a(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof a||(e=new a(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof a||(t=new a(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const i=this.prerelease[r],n=t.prerelease[r];if(e("prerelease compare",r,i,n),void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return s(i,n)}while(++r)}compareBuild(t){t instanceof a||(t=new a(t,this.options));let r=0;do{const i=this.build[r],n=t.build[r];if(e("build compare",r,i,n),void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return s(i,n)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[n.PRERELEASELOOSE]:i[n.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===s(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return w=a}!function(){if(v)return O;v=1;const e=T();O=(t,r)=>new e(t,r).major}(),function(){if($)return g;$=1;const e=function(){if(A)return b;A=1;const e=T();return b=(t,r,i=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(e){if(!i)return null;throw e}}}();g=(t,r)=>{const i=e(t,r);return i?i.version:null}}(),n.m,Object.freeze({UploadFromDevice:0,CreateNew:1,Other:2});class y{get#e(){return window.OCA?.Files?._sidebar?.()}get available(){return!!this.#e}get isOpen(){return this.#e?.isOpen??!1}get activeTab(){return this.#e?.activeTab}get node(){return this.#e?.node}open(e,t){this.#e?.open(e,t)}close(){this.#e?.close()}setActiveTab(e){this.#e?.setActiveTab(e)}registerTab(e){!function(e){!function(e){if("object"!=typeof e)throw new Error("Sidebar tab is not an object");if(!e.id||"string"!=typeof e.id||e.id!==CSS.escape(e.id))throw new Error("Sidebar tabs need to have an id conforming to the HTML id attribute specifications");if(!e.tagName||"string"!=typeof e.tagName)throw new Error("Sidebar tabs need to have the tagName name set");if(!e.tagName.match(/^[a-z][a-z0-9-_]+$/))throw new Error('Sidebar tab "tagName" is invalid');if(!e.displayName||"string"!=typeof e.displayName)throw new Error("Sidebar tabs need to have a name set");if("string"!=typeof e.iconSvgInline||!(0,o.A)(e.iconSvgInline))throw new Error("Sidebar tabs need to have an valid SVG icon");if("number"!=typeof e.order)throw new Error("Sidebar tabs need to have a numeric order set");if(e.enabled&&"function"!=typeof e.enabled)throw new Error('Sidebar tab "enabled" is not a function');if(e.onInit&&"function"!=typeof e.onInit)throw new Error('Sidebar tab "onInit" is not a function')}(e),window._nc_files_sidebar_tabs??=new Map,window._nc_files_sidebar_tabs.has(e.id)?i.l.warn(`Sidebar tab with id "${e.id}" already registered. Skipping.`):(window._nc_files_sidebar_tabs.set(e.id,e),i.l.debug(`New sidebar tab with id "${e.id}" registered.`))}(e)}getTabs(e){return this.#e?.getTabs(e)??[]}getActions(e){return this.#e?.getActions(e)??[]}registerAction(e){!function(e){!function(e){if("object"!=typeof e)throw new Error("Sidebar action is not an object");if(!e.id||"string"!=typeof e.id||e.id!==CSS.escape(e.id))throw new Error("Sidebar actions need to have an id conforming to the HTML id attribute specifications");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Sidebar actions need to have a displayName function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Sidebar actions need to have a iconSvgInline function");if(!e.enabled||"function"!=typeof e.enabled)throw new Error("Sidebar actions need to have an enabled function");if(!e.onClick||"function"!=typeof e.onClick)throw new Error("Sidebar actions need to have an onClick function")}(e),window._nc_files_sidebar_actions??=new Map,window._nc_files_sidebar_actions.has(e.id)?i.l.warn(`Sidebar action with id "${e.id}" already registered. Skipping.`):(window._nc_files_sidebar_actions.set(e.id,e),i.l.debug(`New sidebar action with id "${e.id}" registered.`))}(e)}}Object.freeze({ReservedName:"reserved name",Character:"character",Extension:"extension"}),Error,Object.freeze({Name:"basename",Modified:"mtime",Size:"size"});const _=(0,r(35947).YK)().setApp("comments").detectUser().build();var C;C=new class{_action;constructor(e){this.validateAction(e),this._action=e}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 hotkey(){return this._action.hotkey}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(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if(void 0!==e.destructive&&"boolean"!=typeof e.destructive)throw new Error("Invalid destructive flag");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(E).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function");if("hotkey"in e&&void 0!==e.hotkey){if("object"!=typeof e.hotkey)throw new Error("Invalid hotkey configuration");if("string"!=typeof e.hotkey.key||!e.hotkey.key)throw new Error("Missing or invalid hotkey key");if("string"!=typeof e.hotkey.description||!e.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}({id:"comments-unread",title({nodes:e}){const t=e[0]?.attributes["comments-unread"];return"number"==typeof t&&t>=0?(0,s.n)("comments","1 new comment","{unread} new comments",t,{unread:t}):(0,s.t)("comments","Comment")},displayName:()=>"",iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-comment-processing" viewBox="0 0 24 24"><path d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M17,11V9H15V11H17M13,11V9H11V11H13M9,11V9H7V11H9Z" /></svg>',enabled({nodes:e}){const t=e[0]?.attributes?.["comments-unread"];return"number"==typeof t&&t>0},async exec({nodes:e}){if(1!==e.length||!e[0])return!1;try{return(new y).open(e[0],"comments"),null}catch(e){return _.error("Error while opening sidebar",{error:e}),!1}},inline:()=>!0,order:-140}),void 0===window._nc_fileactions&&(window._nc_fileactions=[],i.l.debug("FileActions initialized")),window._nc_fileactions.find(e=>e.id===C.id)?i.l.error(`FileAction ${C.id} already registered`,{action:C}):window._nc_fileactions.push(C)},63779(){},77199(){}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=(t,r,n,o)=>{if(!r){var s=1/0;for(l=0;l<e.length;l++){for(var[r,n,o]=e[l],a=!0,E=0;E<r.length;E++)(!1&o||s>=o)&&Object.keys(i.O).every(e=>i.O[e](r[E]))?r.splice(E--,1):(a=!1,o<s&&(s=o));if(a){e.splice(l--,1);var c=n();void 0!==c&&(t=c)}}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,n,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.e=()=>Promise.resolve(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=3260,(()=>{i.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={3260:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var n,o,[s,a,E]=r,c=0;if(s.some(t=>0!==e[t])){for(n in a)i.o(a,n)&&(i.m[n]=a[n]);if(E)var l=E(i)}for(t&&t(r);c<s.length;c++)o=s[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(l)},r=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),i.nc=void 0;var n=i.O(void 0,[4208],()=>i(39224));n=i.O(n)})();
|
|
//# sourceMappingURL=comments-init.js.map?v=ade2648d98d339cb12db
|