comments-comments-app.js 52 KB

123
  1. /*! For license information please see comments-comments-app.js.LICENSE.txt */
  2. (()=>{var e,n,r,o={84281:(e,n,r)=>{"use strict";var o=r(53334),s=r(21777),i=r(85471),a=r(85168),c=r(55042),l=r(80284),u=r(96763);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function m(t,e){if(t===e)return!0;if("object"===p(t)){for(var n in t)if(!m(t[n],e[n]))return!1;return!0}return!1}var f=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,r)}var e,n;return e=t,n=[{key:"createObserver",value:function(t,e){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){var r;if(this.options="function"==typeof(r=t)?{callback:r}:r,this.callback=function(t,e){n.options.callback(t,e),t&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var o=(this.options.throttleOptions||{}).leading;this.callback=function(t,e){var n,r,o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(i){for(var a=arguments.length,c=new Array(a>1?a-1:0),l=1;l<a;l++)c[l-1]=arguments[l];if(o=c,!n||i!==r){var u=s.leading;"function"==typeof u&&(u=u(i,r)),n&&i===r||!u||t.apply(void 0,[i].concat(d(o))),r=i,clearTimeout(n),n=setTimeout((function(){t.apply(void 0,[i].concat(d(o))),n=0}),e)}};return i._clear=function(){clearTimeout(n),n=null},i}(this.callback,this.options.throttle,{leading:function(t){return"both"===o||"visible"===o&&t||"hidden"===o&&!t}})}this.oldResult=void 0,this.observer=new IntersectionObserver((function(t){var e=t[0];if(t.length>1){var r=t.find((function(t){return t.isIntersecting}));r&&(e=r)}if(n.callback){var o=e.isIntersecting&&e.intersectionRatio>=n.threshold;if(o===n.oldResult)return;n.oldResult=o,n.callback(o,e)}}),this.options.intersection),e.context.$nextTick((function(){n.observer&&n.observer.observe(n.el)}))}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&"number"==typeof this.options.intersection.threshold?this.options.intersection.threshold:0}}],n&&h(e.prototype,n),t}();function g(t,e,n){var r=e.value;if(r)if("undefined"==typeof IntersectionObserver)u.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new f(t,r,n);t._vue_visibilityState=o}}function v(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var A={bind:g,update:function(t,e,n){var r=e.value;if(!m(r,e.oldValue)){var o=t._vue_visibilityState;r?o?o.createObserver(r,n):g(t,{value:r},n):v(t)}},unbind:v},b={version:"1.0.0",install:function(t){t.directive("observe-visibility",A)}},y=null;"undefined"!=typeof window?y=window.Vue:void 0!==r.g&&(y=r.g.Vue),y&&y.use(b);const C=b;var w=r(76162);const _={name:"MessageReplyTextIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var x=r(14486);const O=(0,x.A)(_,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var S=r(54332),j=r(34196);const k={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},E=(0,x.A)(k,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var T=r(44719),M=r(68928);const N={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},I=t=>t.replace(/[[\]\\-]/g,"\\$&"),P=t=>t.join(""),R=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const r=[],o=[];let s=n+1,i=!1,a=!1,c=!1,l=!1,u=n,p="";t:for(;s<t.length;){const e=t.charAt(s);if("!"!==e&&"^"!==e||s!==n+1){if("]"===e&&i&&!c){u=s+1;break}if(i=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[i,c,l]]of Object.entries(N))if(t.startsWith(e,s)){if(p)return["$.",!1,t.length-n,!0];s+=e.length,l?o.push(i):r.push(i),a=a||c;continue t}c=!1,p?(e>p?r.push(I(p)+"-"+I(e)):e===p&&r.push(I(e)),p="",s++):t.startsWith("-]",s+1)?(r.push(I(e+"-")),s+=2):t.startsWith("-",s+1)?(p=e,s+=2):(r.push(I(e)),s++)}else c=!0,s++}else l=!0,s++}if(u<s)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,t.length-n,!0];if(0===o.length&&1===r.length&&/^\\?.$/.test(r[0])&&!l){return[(h=2===r[0].length?r[0].slice(-1):r[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var h;const d="["+(l?"^":"")+P(r)+"]",m="["+(l?"":"^")+P(o)+"]";return[r.length&&o.length?"("+d+"|"+m+")":r.length?d:m,a,u-n,!0]};var $=r(65606),D=r(96763);const L=(t,e,n={})=>(ft(e),!(!n.nocomment&&"#"===e.charAt(0))&&new At(e,n).match(t)),B=/^\*+([^+@!?\*\[\(]*)$/,W=t=>e=>!e.startsWith(".")&&e.endsWith(t),z=t=>e=>e.endsWith(t),H=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),V=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),q=/^\*+\.\*+$/,G=t=>!t.startsWith(".")&&t.includes("."),F=t=>"."!==t&&".."!==t&&t.includes("."),U=/^\.\*+$/,Z=t=>"."!==t&&".."!==t&&t.startsWith("."),Q=/^\*+$/,Y=t=>0!==t.length&&!t.startsWith("."),X=t=>0!==t.length&&"."!==t&&".."!==t,K=/^\?+([^+@!?\*\[\(]*)?$/,J=([t,e=""])=>{const n=rt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},tt=([t,e=""])=>{const n=ot([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},et=([t,e=""])=>{const n=ot([t]);return e?t=>n(t)&&t.endsWith(e):n},nt=([t,e=""])=>{const n=rt([t]);return e?t=>n(t)&&t.endsWith(e):n},rt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},ot=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},st="object"==typeof $&&$?"object"==typeof $.env&&$.env&&$.env.__MINIMATCH_TESTING_PLATFORM__||$.platform:"posix";L.sep="win32"===st?"\\":"/";const it=Symbol("globstar **");L.GLOBSTAR=it;const at={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},ct="[^/]",lt=ct+"*?",ut=t=>t.split("").reduce(((t,e)=>(t[e]=!0,t)),{}),pt=ut("().*{}+?[]^$\\!"),ht=ut("[.(");L.filter=(t,e={})=>n=>L(n,t,e);const dt=(t,e={})=>Object.assign({},t,e);L.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return L;const e=L;return Object.assign(((n,r,o={})=>e(n,r,dt(t,o))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,dt(t,n))}static defaults(n){return e.defaults(dt(t,n)).Minimatch}},unescape:(n,r={})=>e.unescape(n,dt(t,r)),escape:(n,r={})=>e.escape(n,dt(t,r)),filter:(n,r={})=>e.filter(n,dt(t,r)),defaults:n=>e.defaults(dt(t,n)),makeRe:(n,r={})=>e.makeRe(n,dt(t,r)),braceExpand:(n,r={})=>e.braceExpand(n,dt(t,r)),match:(n,r,o={})=>e.match(n,r,dt(t,o)),sep:e.sep,GLOBSTAR:it})};const mt=(t,e={})=>(ft(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:M(t));L.braceExpand=mt;const ft=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};L.makeRe=(t,e={})=>new At(t,e).makeRe(),L.match=(t,e,n={})=>{const r=new At(e,n);return t=t.filter((t=>r.match(t))),r.options.nonull&&!t.length&&t.push(e),t};const gt=/[?*]|[+@!]\(.*?\)|\[|\]/,vt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class At{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ft(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||st,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>D.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&gt.test(t[2])||gt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,r),this.set=r.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const r=t[n];1===n&&""===r&&""===t[0]||"."!==r&&""!==r||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const r=t[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let o=r;for(;"**"===n[o+1];)o++;o>r&&n.splice(r+1,o-r);let s=n[r+1];const i=n[r+2],a=n[r+3];if(".."!==s)continue;if(!i||"."===i||".."===i||!a||"."===a||".."===a)continue;e=!0,n.splice(r,1);const c=n.slice(0);c[r]="**",t.push(c),r--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const r=n[t];1===t&&""===r&&""===n[0]||"."!==r&&""!==r||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf("..",o+1));){const t=n[o-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===o&&"**"===n[o+1]?["."]:[];n.splice(o-1,2,...t),0===n.length&&n.push(""),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const r=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);r&&(t[e]=r,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let r=0,o=0,s=[],i="";for(;r<t.length&&o<e.length;)if(t[r]===e[o])s.push("b"===i?e[o]:t[r]),r++,o++;else if(n&&"**"===t[r]&&e[o]===t[r+1])s.push(t[r]),r++;else if(n&&"**"===e[o]&&t[r]===e[o+1])s.push(e[o]),o++;else if("*"!==t[r]||!e[o]||!this.options.dot&&e[o].startsWith(".")||"**"===e[o]){if("*"!==e[o]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r])return!1;if("a"===i)return!1;i="b",s.push(e[o]),r++,o++}else{if("b"===i)return!1;i="a",s.push(t[r]),r++,o++}return t.length===e.length&&s}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let r=0;r<t.length&&"!"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const r=this.options;if(this.isWindows){const n=""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3]),r=""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3]);if(n&&r){const n=t[3],r=e[3];n.toLowerCase()===r.toLowerCase()&&(t[3]=r)}else if(r&&"string"==typeof t[0]){const n=e[3],r=t[0];n.toLowerCase()===r.toLowerCase()&&(e[3]=r,e=e.slice(3))}else if(n&&"string"==typeof e[0]){const n=t[3];n.toLowerCase()===e[0].toLowerCase()&&(e[0]=n,t=t.slice(3))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var s=0,i=0,a=t.length,c=e.length;s<a&&i<c;s++,i++){this.debug("matchOne loop");var l=e[i],u=t[s];if(this.debug(e,l,u),!1===l)return!1;if(l===it){this.debug("GLOBSTAR",[e,l,u]);var p=s,h=i+1;if(h===c){for(this.debug("** at the end");s<a;s++)if("."===t[s]||".."===t[s]||!r.dot&&"."===t[s].charAt(0))return!1;return!0}for(;p<a;){var d=t[p];if(this.debug("\nglobstar while",t,p,e,h,d),this.matchOne(t.slice(p),e.slice(h),n))return this.debug("globstar found match!",p,a,d),!0;if("."===d||".."===d||!r.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,p,e,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",t,p,e,h),p!==a))}let o;if("string"==typeof l?(o=u===l,this.debug("string match",l,u,o)):(o=l.test(u),this.debug("pattern match",l,u,o)),!o)return!1}if(s===a&&i===c)return!0;if(s===a)return n;if(i===c)return s===a-1&&""===t[s];throw new Error("wtf?")}braceExpand(){return mt(this.pattern,this.options)}parse(t){ft(t);const e=this.options;if("**"===t)return it;if(""===t)return"";let n,r=null;(n=t.match(Q))?r=e.dot?X:Y:(n=t.match(B))?r=(e.nocase?e.dot?V:H:e.dot?z:W)(n[1]):(n=t.match(K))?r=(e.nocase?e.dot?tt:J:e.dot?et:nt)(n):(n=t.match(q))?r=e.dot?F:G:(n=t.match(U))&&(r=Z);let o="",s=!1,i=!1;const a=[],c=[];let l,u=!1,p=!1,h="."===t.charAt(0),d=e.dot||h;const m=t=>"."===t.charAt(0)?"":e.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=()=>{if(u){switch(u){case"*":o+=lt,s=!0;break;case"?":o+=ct,s=!0;break;default:o+="\\"+u}this.debug("clearStateChar %j %j",u,o),u=!1}};for(let n,r=0;r<t.length&&(n=t.charAt(r));r++)if(this.debug("%s\t%s %s %j",t,r,o,n),i){if("/"===n)return!1;pt[n]&&(o+="\\"),o+=n,i=!1}else switch(n){case"/":return!1;case"\\":f(),i=!0;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,r,o,n),this.debug("call clearStateChar %j",u),f(),u=n,e.noext&&f();continue;case"(":{if(!u){o+="\\(";continue}const e={type:u,start:r-1,reStart:o.length,open:at[u].open,close:at[u].close};this.debug(this.pattern,"\t",e),a.push(e),o+=e.open,0===e.start&&"!"!==e.type&&(h=!0,o+=m(t.slice(r+1))),this.debug("plType %j %j",u,o),u=!1;continue}case")":{const t=a[a.length-1];if(!t){o+="\\)";continue}a.pop(),f(),s=!0,l=t,o+=l.close,"!"===l.type&&c.push(Object.assign(l,{reEnd:o.length}));continue}case"|":{const e=a[a.length-1];if(!e){o+="\\|";continue}f(),o+="|",0===e.start&&"!"!==e.type&&(h=!0,o+=m(t.slice(r+1)));continue}case"[":f();const[d,g,v,A]=R(t,r);v?(o+=d,p=p||g,r+=v-1,s=s||A):o+="\\[";continue;case"]":o+="\\"+n;continue;default:f(),o+=vt(n)}for(l=a.pop();l;l=a.pop()){let t;t=o.slice(l.reStart+l.open.length),this.debug(this.pattern,"setting tail",o,l),t=t.replace(/((?:\\{2}){0,64})(\\?)\|/g,((t,e,n)=>(n||(n="\\"),e+e+n+"|"))),this.debug("tail=%j\n %s",t,t,l,o);const e="*"===l.type?lt:"?"===l.type?ct:"\\"+l.type;s=!0,o=o.slice(0,l.reStart)+e+"\\("+t}f(),i&&(o+="\\\\");const g=ht[o.charAt(0)];for(let t=c.length-1;t>-1;t--){const e=c[t],n=o.slice(0,e.reStart),r=o.slice(e.reStart,e.reEnd-8);let s=o.slice(e.reEnd);const i=o.slice(e.reEnd-8,e.reEnd)+s,a=n.split(")").length,l=n.split("(").length-a;let u=s;for(let t=0;t<l;t++)u=u.replace(/\)[+*?]?/,"");s=u,o=n+r+s+(""===s?"(?:$|\\/)":"")+i}if(""!==o&&s&&(o="(?=.)"+o),g&&(o=(h?"":d?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+o),!e.nocase||s||e.nocaseMagicOnly||(s=t.toUpperCase()!==t.toLowerCase()),!s)return o.replace(/\\(.)/g,"$1");const v=(e.nocase?"i":"")+(p?"u":"");try{const e=r?{_glob:t,_src:o,test:r}:{_glob:t,_src:o};return Object.assign(new RegExp("^"+o+"$",v),e)}catch(t){return this.debug("invalid regexp",t),new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?lt:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=e.nocase?"i":"";let o=t.map((t=>{const e=t.map((t=>"string"==typeof t?vt(t):t===it?it:t._src));return e.forEach(((t,r)=>{const o=e[r+1],s=e[r-1];t===it&&s!==it&&(void 0===s?void 0!==o&&o!==it?e[r+1]="(?:\\/|"+n+"\\/)?"+o:e[r]=n:void 0===o?e[r-1]=s+"(?:\\/|"+n+")?":o!==it&&(e[r-1]=s+"(?:\\/|\\/"+n+"\\/)"+o,e[r+1]=it))})),e.filter((t=>t!==it)).join("/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const r=this.slashSplit(t);this.debug(this.pattern,"split",r);const o=this.set;this.debug(this.pattern,"set",o);let s=r[r.length-1];if(!s)for(let t=r.length-2;!s&&t>=0;t--)s=r[t];for(let t=0;t<o.length;t++){const i=o[t];let a=r;if(n.matchBase&&1===i.length&&(a=[s]),this.matchOne(a,i,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return L.defaults(t).Minimatch}}function bt(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}L.Minimatch=At,L.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),L.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var yt,Ct=r(12692);r(86454),r(26602),Error,function(t){t.Array="array",t.Object="object",t.Original="original"}(yt||(yt={}));var wt=r(63814);const _t=function(){return(0,wt.dC)("dav/comments")},xt=(0,T.UU)(_t()),Ot=t=>{xt.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:null!=t?t:""})};(0,s.zo)(Ot),Ot((0,s.do)());const St=xt,jt=async function(t,e){var n;let{resourceType:r,resourceId:o}=t;const s=["",r,o].join("/"),i=e.datetime?"<oc:datetime>".concat(e.datetime.toISOString(),"</oc:datetime>"):"",a=await St.customRequest(s,Object.assign({method:"REPORT",data:'<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>'.concat(null!==(n=e.limit)&&void 0!==n?n:20,"</oc:limit>\n\t\t\t\t<oc:offset>").concat(e.offset||0,"</oc:offset>\n\t\t\t\t").concat(i,"\n\t\t\t</oc:filter-comments>")},e)),c=await a.text(),l=await(0,T.h4)(c);return function(t,e,n=!1){return n?{data:e,headers:t.headers?bt(t.headers):{},status:t.status,statusText:t.statusText}:e}(a,kt(l,!0),!0)},kt=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:n}}=t;return n.map((t=>{const n=t.propstat.prop;return function(t,e,n=!1){const{getlastmodified:r=null,getcontentlength:o="0",resourcetype:s=null,getcontenttype:i=null,getetag:a=null}=t,c=s&&"object"==typeof s&&void 0!==s.collection?"directory":"file",l={filename:e,basename:Ct.basename(e),lastmod:r,size:parseInt(o,10),type:c,etag:"string"==typeof a?a.replace(/"/g,""):null};return"file"===c&&(l.mime=i&&"string"==typeof i?i.split(";")[0]:""),n&&(l.props=t),l}(n,n.id.toString(),e)}))};var Et=r(19231),Tt=r(89257),Mt=r(24764),Nt=r(80114),It=r(41944),Pt=r(80701),Rt=r(9191),$t=r(24325),Dt=r(11037),Lt=r(93919);const Bt={name:"Moment",props:{timestamp:{type:Number,required:!0},format:{type:String,default:"LLL"}},computed:{title(){return Et.A.unix(this.timestamp).format(this.format)},formatted(){return Et.A.unix(this.timestamp).fromNow()}}},Wt=(0,x.A)(Bt,(function(){var t=this;return(0,t._self._c)("span",{staticClass:"live-relative-timestamp",attrs:{"data-timestamp":1e3*t.timestamp,title:t.title}},[t._v(t._s(t.formatted))])}),[],!1,null,null,null).exports;function zt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let r=t;for(let t=0;t<e;t++)r=n.parseFromString(r,"text/html").documentElement.textContent;return r}var Ht=r(26287);const Vt=(0,r(53529).YK)().setApp("comments").detectUser().build();var qt=r(96763);const Gt={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await async function(t,e,n,r){const o=["",t,e,n].join("/");return await St.customRequest(o,Object.assign({method:"PROPPATCH",data:'<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>'.concat(r,"</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>")}))}(this.resourceType,this.resourceId,this.id,e),Vt.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,a.Qg)(t("comments","An error occurred while trying to edit the comment")),qt.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.deleted=!0;const e=setTimeout(this.onDelete,a.Br);(0,a._h)(t("comments","Comment deleted"),(()=>{clearTimeout(e),this.deleted=!1}))},async onDelete(){try{await async function(t,e,n){const r=["",t,e,n].join("/");await St.deleteFile(r)}(this.resourceType,this.resourceId,this.id),Vt.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,a.Qg)(t("comments","An error occurred while trying to delete the comment")),qt.error(e),this.deleted=!1}},async onNewComment(e){this.loading=!0;try{const t=await async function(t,e,n){const r=["",t,e].join("/"),o=await Ht.A.post(_t()+r,{actorDisplayName:(0,s.HW)().displayName,actorId:(0,s.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),i=r+"/"+parseInt(o.headers["content-location"].split("/").pop()),a=await St.stat(i,{details:!0}),c=a.data.props;return c.actorDisplayName=zt(c.actorDisplayName,2),c.message=zt(c.message,2),a.data}(this.resourceType,this.resourceId,e);Vt.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,a.Qg)(t("comments","An error occurred while trying to create the comment")),qt.error(e)}finally{this.loading=!1}}}},Ft={name:"Comment",components:{IconArrowRight:Rt.A,IconClose:$t.A,IconDelete:Dt.A,IconEdit:Lt.A,Moment:Wt,NcActionButton:Tt.A,NcActions:Mt.A,NcActionSeparator:Nt.A,NcAvatar:It.A,NcButton:S.A,NcRichContenteditable:()=>Promise.all([r.e(4208),r.e(5528)]).then(r.bind(r,95528))},mixins:[Pt.Ay,Gt],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{isOwnComment(){return(0,s.HW)().uid===this.actorId},renderedContent(){return this.isEmptyMessage?"":this.renderContent(this.localMessage)},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return parseInt((0,Et.A)(this.creationDateTime).format("x"),10)/1e3}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:o.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick((()=>{this.$refs.editor.$el.focus()}))):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}};var Ut=r(85072),Zt=r.n(Ut),Qt=r(97825),Yt=r.n(Qt),Xt=r(77659),Kt=r.n(Xt),Jt=r(55056),te=r.n(Jt),ee=r(10540),ne=r.n(ee),re=r(41113),oe=r.n(re),se=r(72894),ie={};ie.styleTagTransform=oe(),ie.setAttributes=te(),ie.insert=Kt().bind(null,"head"),ie.domAPI=Yt(),ie.insertStyleElement=ne(),Zt()(se.A,ie),se.A&&se.A.locals&&se.A.locals;const ae=(0,x.A)(Ft,(function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted,expression:"!deleted"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconEdit",{attrs:{size:20}})]},proxy:!0}],null,!1,649782975)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDelete",{attrs:{size:20}})]},proxy:!0}],null,!1,881161434)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("Moment",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{type:"tertiary-no-background","native-type":"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("div",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},domProps:{innerHTML:t._s(t.renderedContent)},on:{click:t.onExpand}})])])}),[],!1,null,"39ff2081",null).exports;var ce=r(32981);const le=(0,i.pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,s.HW)().displayName,actorId:(0,s.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await Ht.A.get((0,wt.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,ce.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach((t=>{this.userData[t.id]=t})),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach((t=>{var e;this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(null===(e=(0,s.HW)())||void 0===e?void 0:e.uid)===t.mentionId}})),this.userData}}});var ue=r(96763);i.Ay.use(l.Ay),i.Ay.use(C);const pe={name:"Comments",components:{Comment:ae,NcEmptyContent:j.A,NcButton:S.A,RefreshIcon:E,MessageReplyTextIcon:O,AlertCircleOutlineIcon:w.A},directives:{elementVisibility:c.Zx},mixins:[le],data(){return{error:"",loading:!1,done:!1,currentResourceId:this.resourceId,offset:0,comments:[],cancelRequest:()=>{},Comment:ae,userData:{}}},computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},watch:{resourceId(){this.currentResourceId=this.resourceId}},methods:{t:o.Tl,async onVisibilityChange(t){if(t)try{await((t,e,n)=>{const r=["",t,e].join("/"),o=n.toUTCString();return St.customRequest(r,{method:"PROPPATCH",data:'<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:readMarker>'.concat(o,"</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>")})})(this.resourceType,this.currentResourceId,new Date)}catch(t){(0,a.Qg)(t.message||(0,o.Tl)("comments","Failed to mark comments as read"))}},async update(t){this.currentResourceId=t,this.resetState(),this.getComments()},onScrollBottomReached(){this.error||this.done||this.loading||this.getComments()},async getComments(){this.cancelRequest("cancel");try{this.loading=!0,this.error="";const{request:t,abort:e}=function(t){const e=new AbortController,n=e.signal;return{request:async function(e,r){return await t(e,Object.assign({signal:n},r))},abort:()=>e.abort()}}(jt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.currentResourceId},{offset:this.offset})||{data:[]};this.logger.debug("Processed ".concat(n.length," comments"),{comments:n}),n.length<20&&(this.done=!0),this.comments.push(...n),this.offset+=20}catch(t){if("cancel"===t.message)return;this.error=(0,o.Tl)("comments","Unable to load the comments list"),ue.error("Error loading the comments list",t)}finally{this.loading=!1}},onNewComment(t){this.comments.unshift(t)},onDelete(t){const e=this.comments.findIndex((e=>e.props.id===t));e>-1?this.comments.splice(e,1):ue.error("Could not find the deleted comment in the list",t)},resetState(){this.error="",this.loading=!1,this.done=!1,this.offset=0,this.comments=[]}}};var he=r(70384),de={};de.styleTagTransform=oe(),de.setAttributes=te(),de.insert=Kt().bind(null,"head"),de.domAPI=Yt(),de.insertStyleElement=ne(),Zt()(he.A,de),he.A&&he.A.locals&&he.A.locals;const me=(0,x.A)(pe,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:t.onVisibilityChange,expression:"onVisibilityChange"}],staticClass:"comments",class:{"icon-loading":t.isFirstLoading}},[e("Comment",t._b({staticClass:"comments__writer",attrs:{"auto-complete":t.autoComplete,"resource-type":t.resourceType,editor:!0,"user-data":t.userData,"resource-id":t.currentResourceId},on:{new:t.onNewComment}},"Comment",t.editorData,!1)),t._v(" "),t.isFirstLoading?t._e():[!t.hasComments&&t.done?e("NcEmptyContent",{staticClass:"comments__empty",attrs:{name:t.t("comments","No comments yet, start the conversation!")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("MessageReplyTextIcon")]},proxy:!0}],null,!1,1033639148)}):e("ul",t._l(t.comments,(function(n){return e("Comment",t._b({key:n.props.id,staticClass:"comments__list",attrs:{tag:"li","auto-complete":t.autoComplete,"resource-type":t.resourceType,message:n.props.message,"resource-id":t.currentResourceId,"user-data":t.genMentionsData(n.props.mentions)},on:{"update:message":function(e){return t.$set(n.props,"message",e)},delete:t.onDelete}},"Comment",n.props,!1))})),1),t._v(" "),t.loading&&!t.isFirstLoading?e("div",{staticClass:"comments__info icon-loading"}):t.hasComments&&t.done?e("div",{staticClass:"comments__info"},[t._v("\n\t\t\t"+t._s(t.t("comments","No more messages"))+"\n\t\t")]):t.error?[e("NcEmptyContent",{staticClass:"comments__error",attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AlertCircleOutlineIcon")]},proxy:!0}],null,!1,66050004)}),t._v(" "),e("NcButton",{staticClass:"comments__retry",on:{click:t.getComments},scopedSlots:t._u([{key:"icon",fn:function(){return[e("RefreshIcon")]},proxy:!0}],null,!1,3924573781)},[t._v("\n\t\t\t\t"+t._s(t.t("comments","Retry"))+"\n\t\t\t")])]:t._e()]],2)}),[],!1,null,"222c65b2",null).exports;r.nc=btoa((0,s.do)()),i.Ay.mixin({data:()=>({logger:Vt}),methods:{t:o.Tl,n:o.zw}});var fe=r(96763);window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:class{constructor(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n={...n,propsData:{...null!==(t=n.propsData)&&void 0!==t?t:{},resourceType:e}},new(i.Ay.extend(me))(n)}}}),fe.debug("OCA.Comments.View initialized")},8505:t=>{"use strict";function e(t,e,o){t instanceof RegExp&&(t=n(t,o)),e instanceof RegExp&&(e=n(e,o));var s=r(t,e,o);return s&&{start:s[0],end:s[1],pre:o.slice(0,s[0]),body:o.slice(s[0]+t.length,s[1]),post:o.slice(s[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function r(t,e,n){var r,o,s,i,a,c=n.indexOf(t),l=n.indexOf(e,c+1),u=c;if(c>=0&&l>0){if(t===e)return[c,l];for(r=[],s=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(t,u+1)):1==r.length?a=[r.pop(),l]:((o=r.pop())<s&&(s=o,i=l),l=n.indexOf(e,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[s,i])}return a}t.exports=e,e.range=r},68928:(t,e,n)=>{var r=n(8505);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(i).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(u)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function u(t){return t.split(o).join("\\").split(s).join("{").split(i).join("}").split(a).join(",").split(c).join(".")}function p(t){if(!t)return[""];var e=[],n=r("{","}",t);if(!n)return t.split(",");var o=n.pre,s=n.body,i=n.post,a=o.split(",");a[a.length-1]+="{"+s+"}";var c=p(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function h(t){return"{"+t+"}"}function d(t){return/^-?0\d/.test(t)}function m(t,e){return t<=e}function f(t,e){return t>=e}function g(t,e){var n=[],o=r("{","}",t);if(!o)return[t];var s=o.pre,a=o.post.length?g(o.post,!1):[""];if(/\$$/.test(o.pre))for(var c=0;c<a.length;c++){var u=s+"{"+o.body+"}"+a[c];n.push(u)}else{var v,A,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),C=b||y,w=o.body.indexOf(",")>=0;if(!C&&!w)return o.post.match(/,.*\}/)?g(t=o.pre+"{"+o.body+i+o.post):[t];if(C)v=o.body.split(/\.\./);else if(1===(v=p(o.body)).length&&1===(v=g(v[0],!1).map(h)).length)return a.map((function(t){return o.pre+v[0]+t}));if(C){var _=l(v[0]),x=l(v[1]),O=Math.max(v[0].length,v[1].length),S=3==v.length?Math.abs(l(v[2])):1,j=m;x<_&&(S*=-1,j=f);var k=v.some(d);A=[];for(var E=_;j(E,x);E+=S){var T;if(y)"\\"===(T=String.fromCharCode(E))&&(T="");else if(T=String(E),k){var M=O-T.length;if(M>0){var N=new Array(M+1).join("0");T=E<0?"-"+N+T.slice(1):N+T}}A.push(T)}}else{A=[];for(var I=0;I<v.length;I++)A.push.apply(A,g(v[I],!1))}for(I=0;I<A.length;I++)for(c=0;c<a.length;c++)u=s+A[I]+a[c],(!e||C||u)&&n.push(u)}return n}},72894:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(71354),o=n.n(r),s=n(76314),i=n.n(s)()(o());i.push([t.id,".comment[data-v-39ff2081]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-39ff2081]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-39ff2081]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-39ff2081]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-39ff2081]{margin-left:10px !important}.comment__author[data-v-39ff2081]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-39ff2081],.comment__timestamp[data-v-39ff2081]{margin-left:auto;text-align:right;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-39ff2081]{position:relative}.comment__editor-description[data-v-39ff2081]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-39ff2081]{position:absolute !important;bottom:0;right:0}.comment__message[data-v-39ff2081]{white-space:pre-wrap;word-break:break-word;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-39ff2081]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-39ff2081]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,2BAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,gBAAA,CACA,gBAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,QAAA,CACA,OAAA,CAGD,mCACC,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-left: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-left: auto;\n\t\ttext-align: right;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 0;\n\t\tright: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: break-word;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const a=i},70384:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(71354),o=n.n(r),s=n(76314),i=n.n(s)()(o());i.push([t.id,".comments[data-v-222c65b2]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-222c65b2],.comments__error[data-v-222c65b2]{flex:1 0}.comments__retry[data-v-222c65b2]{margin:0 auto}.comments__info[data-v-222c65b2]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}","",{version:3,sources:["webpack://./apps/comments/src/views/Comments.vue"],names:[],mappings:"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n"],sourceRoot:""}]);const a=i},86454:(t,e,n)=>{"use strict";const r=n(43918),o=n(32923),s=n(8904);t.exports={XMLParser:o,XMLValidator:r,XMLBuilder:s}},26602:t=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return r(t,arguments,s(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,t)},n(t)}function r(t,e,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var s=new(Function.bind.apply(t,r));return n&&o(s,n.prototype),s},r.apply(null,arguments)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var i=function(t){function n(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}(this,s(n).call(this,t))).name="ObjectPrototypeMutationError",r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(n,t),n}(n(Error));function a(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=n.split("."),s=o.length,i=function(e){var n=o[e];if(!t)return{v:void 0};if("+"===n){if(Array.isArray(t))return{v:t.map((function(n,s){var i=o.slice(e+1);return i.length>0?a(n,i.join("."),r):r(t,s,o,e)}))};var s=o.slice(0,e).join(".");throw new Error("Object at wildcard (".concat(s,") is not an array"))}t=r(t,n,o,e)},c=0;c<s;c++){var l=i(c);if("object"===e(l))return l.v}return t}function c(t,e){return t.length===e+1}t.exports={set:function(t,n,r){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n]=r,t[n];try{return a(t,n,(function(t,e,n,o){if(t===Reflect.getPrototypeOf({}))throw new i("Attempting to mutate Object.prototype");if(!t[e]){var s=Number.isInteger(Number(n[o+1])),a="+"===n[o+1];t[e]=s||a?[]:{}}return c(n,o)&&(t[e]=r),t[e]}))}catch(e){if(e instanceof i)throw e;return t}},get:function(t,n){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n];try{return a(t,n,(function(t,e){return t[e]}))}catch(e){return t}},has:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;if("number"==typeof n)return n in t;try{var o=!1;return a(t,n,(function(t,e,n,s){if(!c(n,s))return t&&t[e];o=r.own?t.hasOwnProperty(e):e in t})),o}catch(t){return!1}},hasOwn:function(t,e,n){return this.has(t,e,n||{own:!0})},isIn:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;try{var s=!1,i=!1;return a(t,n,(function(t,n,o,a){return s=s||t===r||!!t&&t[n]===r,i=c(o,a)&&"object"===e(t)&&n in t,t&&t[n]})),o.validPath?s&&i:s}catch(t){return!1}},ObjectPrototypeMutationError:i}},12692:(t,e,n)=>{"use strict";var r=n(65606),o=n(40537),s=function(t){return"string"==typeof t};function i(t,e){for(var n=[],r=0;r<t.length;r++){var o=t[r];o&&"."!==o&&(".."===o?n.length&&".."!==n[n.length-1]?n.pop():e&&n.push(".."):n.push(o))}return n}var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,c={};function l(t){return a.exec(t).slice(1)}c.resolve=function(){for(var t="",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var o=n>=0?arguments[n]:r.cwd();if(!s(o))throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,e="/"===o.charAt(0))}return(e?"/":"")+(t=i(t.split("/"),!e).join("/"))||"."},c.normalize=function(t){var e=c.isAbsolute(t),n="/"===t.substr(-1);return(t=i(t.split("/"),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t},c.isAbsolute=function(t){return"/"===t.charAt(0)},c.join=function(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];if(!s(n))throw new TypeError("Arguments to path.join must be strings");n&&(t+=t?"/"+n:n)}return c.normalize(t)},c.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n+1)}t=c.resolve(t).substr(1),e=c.resolve(e).substr(1);for(var r=n(t.split("/")),o=n(e.split("/")),s=Math.min(r.length,o.length),i=s,a=0;a<s;a++)if(r[a]!==o[a]){i=a;break}var l=[];for(a=i;a<r.length;a++)l.push("..");return(l=l.concat(o.slice(i))).join("/")},c._makeLong=function(t){return t},c.dirname=function(t){var e=l(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},c.basename=function(t,e){var n=l(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},c.extname=function(t){return l(t)[3]},c.format=function(t){if(!o.isObject(t))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof t);var e=t.root||"";if(!s(e))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof t.root);return(t.dir?t.dir+c.sep:"")+(t.base||"")},c.parse=function(t){if(!s(t))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=l(t);if(!e||4!==e.length)throw new TypeError("Invalid path '"+t+"'");return e[1]=e[1]||"",e[2]=e[2]||"",e[3]=e[3]||"",{root:e[0],dir:e[0]+e[1].slice(0,e[1].length-1),base:e[2],ext:e[3],name:e[2].slice(0,e[2].length-e[3].length)}},c.sep="/",c.delimiter=":",t.exports=c}},s={};function i(t){var e=s[t];if(void 0!==e)return e.exports;var n=s[t]={id:t,loaded:!1,exports:{}};return o[t].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=o,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],o=e[u][2];for(var a=!0,c=0;c<n.length;c++)(!1&o||s>=o)&&Object.keys(i.O).every((t=>i.O[t](n[c])))?n.splice(c--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((e,n)=>(i.f[n](t,e),e)),[])),i.u=t=>t+"-"+t+".js?v="+{4065:"e0744ecca882f5202a32",4254:"96661b9f421b07ce7189",5528:"51e4e2fa9f60f9a32432"}[t],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},r="nextcloud:",i.l=(t,e,o,s)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){a=p;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",r+o),a.src=t),n[t]=[e];var h=(e,r)=>{a.onerror=a.onload=null,clearTimeout(d);var o=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((t=>t(r))),e)return e(r)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),c&&document.head.appendChild(a)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i.j=7062,(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{i.b=document.baseURI||self.location.href;var t={7062:0};i.f.j=(e,n)=>{var r=i.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=o);var s=i.p+i.u(e),a=new Error;i.l(s,(n=>{if(i.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}}),"chunk-"+e,e)}},i.O.j=e=>0===t[e];var e=(e,n)=>{var r,o,s=n[0],a=n[1],c=n[2],l=0;if(s.some((e=>0!==t[e]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(c)var u=c(i)}for(e&&e(n);l<s.length;l++)o=s[l],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),i.nc=void 0;var a=i.O(void 0,[4208],(()=>i(84281)));a=i.O(a)})();
  3. //# sourceMappingURL=comments-comments-app.js.map?v=ce95366474a38326f121