(()=>{"use strict";var e,n,r,i={35810:(e,t,n)=>{n.d(t,{Al:()=>r.r,H4:()=>r.c,Q$:()=>r.e,R3:()=>r.n,VL:()=>r.l,lJ:()=>r.d,pt:()=>r.F,ur:()=>d,v7:()=>c});var r=n(68251),i=(n(43627),n(53334)),o=n(380),s=n(65606);Error;const a=["B","KB","MB","GB","TB","PB"],l=["B","KiB","MiB","GiB","TiB","PiB"];function c(e,t=!1,n=!1,r=!1){n=n&&!r,"string"==typeof e&&(e=Number(e));let o=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;o=Math.min((n?l.length:a.length)-1,o);const s=n?l[o]:a[o];let c=(e/Math.pow(r?1e3:1024,o)).toFixed(1);return!0===t&&0===o?("0.0"!==c?"< 1 ":"0 ")+(n?l[1]:a[1]):(c=o<2?parseFloat(c).toFixed(0):parseFloat(c).toLocaleString((0,i.lO)()),c+" "+s)}function u(e){return e instanceof Date?e.toISOString():String(e)}function d(e,t={}){const n={sortingMode:"basename",sortingOrder:"asc",...t};return function(e,t,n){n=n??[];const r=(t=t??[e=>e]).map(((e,t)=>"asc"===(n[t]??"asc")?1:-1)),o=Intl.Collator([(0,i.Z0)(),(0,i.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,n)=>{for(const[i,s]of t.entries()){const t=o.compare(u(s(e)),u(s(n)));if(0!==t)return t*r[i]}return 0}))}(e,[...n.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...n.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==n.sortingMode?[e=>e[n.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename).lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}var h,f,p={},m={};function g(){return h||(h=1,function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o5&&"xml"===r)return d("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function i(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}p.validate=function(o,s){s=Object.assign({},t,s);const l=[];let h=!1,f=!1;"\ufeff"===o[0]&&(o=o.substr(1));for(let t=0;t"!==o[t]&&" "!==o[t]&&"\t"!==o[t]&&"\n"!==o[t]&&"\r"!==o[t];t++)b+=o[t];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),t--),p=b,!e.isName(p)){let e;return e=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",d("InvalidTag",e,m(o,t))}const x=a(o,t);if(!1===x)return d("InvalidAttr","Attributes for '"+b+"' have open quote.",m(o,t));let E=x.value;if(t=x.index,"/"===E[E.length-1]){const e=t-E.length;E=E.substring(0,E.length-1);const n=c(E,s);if(!0!==n)return d(n.err.code,n.err.msg,m(o,e+n.err.line));h=!0}else if(v){if(!x.tagClosed)return d("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",m(o,t));if(E.trim().length>0)return d("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",m(o,g));if(0===l.length)return d("InvalidTag","Closing tag '"+b+"' has not been opened.",m(o,g));{const e=l.pop();if(b!==e.tagName){let t=m(o,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+b+"'.",m(o,g))}0==l.length&&(f=!0)}}else{const e=c(E,s);if(!0!==e)return d(e.err.code,e.err.msg,m(o,t-E.length+e.err.line));if(!0===f)return d("InvalidXml","Multiple possible root nodes found.",m(o,t));-1!==s.unpairedTags.indexOf(b)||l.push({tagName:b,tagStartPos:g}),h=!0}for(t++;t0)||d("InvalidXml","Invalid '"+JSON.stringify(l.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const o='"',s="'";function a(e,t){let n="",r="",i=!1;for(;t"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(t,n){const r=e.getAllMatches(t,l),i={};for(let e=0;e{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1})}var T,S,_,R,$,F,D,j,M,B,V,G,z,U={};function q(){if(T)return U;function e(i,o,s){let a;const l={};for(let c=0;c0&&(l[o.textNodeName]=a):void 0!==a&&(l[o.textNodeName]=a),l}function t(e){const t=Object.keys(e);for(let e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};return P.buildOptions=function(t){return Object.assign({},e,t)},P.defaultOptions=e,P}(),t=function(){if(O)return I;O=1;const e=g(),t=E?x:(E=1,x=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}),n=function(){if(A)return y;A=1;const e=g();function t(e,t){let n="";for(;t"===e[a]){if(d?"-"===e[a-1]&&"-"===e[a-2]&&(d=!1,c--):c--,0===c)break}else"["===e[a]?u=!0:h+=e[a];else{if(u&&n(e,a)){let n,r;a+=7,[n,r,a]=t(e,a+1),-1===r.indexOf("&")&&(l[s(n)]={regx:RegExp(`&${n};`,"g"),val:r})}else u&&r(e,a)||u&&i(e,a)?a+=8:u&&o(e,a)?a+=9:d=!0;c++,h=""}if(0!==c)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:a}}}(),r=function(){if(C)return k;C=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return k=function(r,i={}){if(i=Object.assign({},n,i),!r||"string"!=typeof r)return r;let o=r.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return r;if(i.hex&&e.test(o))return Number.parseInt(o,16);{const e=t.exec(o);if(e){const t=e[1],n=e[2];let a=(s=e[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const l=e[4]||e[6];if(!i.leadingZeros&&n.length>0&&t&&"."!==o[2])return r;if(!i.leadingZeros&&n.length>0&&!t&&"."!==o[1])return r;{const e=Number(o),s=""+e;return-1!==s.search(/[eE]/)||l?i.eNotation?e:r:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||t&&s==="-"+a?e:r:n?a===s||t+a===s?e:r:o===s||o===t+s?e:r}}return r}var s}}(),i=L();function o(e){const t=Object.keys(e);for(let n=0;n0)){s||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?w(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function a(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,n,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const r=e.getAllMatches(t,l),i=r.length,o={};for(let e=0;e",a,"Closing Tag is not closed.");let n=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=n.indexOf(":");-1!==e&&(n=n.substr(e+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),i&&(o=this.saveTextToParentTag(o,i,s));const r=s.substring(s.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;r&&-1!==this.options.unpairedTags.indexOf(r)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),i=this.tagsNodeStack.pop(),o="",a=t}else if("?"===e[a+1]){let n=v(e,a,!1,"?>");if(!n)throw new Error("Pi Tag is not closed.");if(o=this.saveTextToParentTag(o,i,s),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{const e=new t(n.tagName);e.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(e[":@"]=this.buildAttributesMap(n.tagExp,s,n.tagName)),this.addChild(i,e,s)}a=n.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=m(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(a+4,t-2);o=this.saveTextToParentTag(o,i,s),i.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=t}else if("!D"===e.substr(a+1,2)){const t=n(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=m(e,"]]>",a,"CDATA is not closed.")-2,n=e.substring(a+9,t);o=this.saveTextToParentTag(o,i,s);let r=this.parseTextData(n,i.tagname,s,!0,!1,!0,!0);null==r&&(r=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):i.add(this.options.textNodeName,r),a=t+2}else{let n=v(e,a,this.options.removeNSPrefix),l=n.tagName;const c=n.rawTagName;let u=n.tagExp,d=n.attrExpPresent,h=n.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),i&&o&&"!xml"!==i.tagname&&(o=this.saveTextToParentTag(o,i,s,!1));const f=i;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(i=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==r.tagname&&(s+=s?"."+l:l),this.isItStopNode(this.options.stopNodes,s,l)){let r="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),a=n.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=n.closeIndex;else{const t=this.readStopNodeData(e,c,h+1);if(!t)throw new Error(`Unexpected end of ${c}`);a=t.i,r=t.tagContent}const o=new t(l);l!==u&&d&&(o[":@"]=this.buildAttributesMap(u,s,l)),r&&(r=this.parseTextData(r,l,s,!0,d,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),o.add(this.options.textNodeName,r),this.addChild(i,o,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new t(l);l!==u&&d&&(e[":@"]=this.buildAttributesMap(u,s,l)),this.addChild(i,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new t(l);this.tagsNodeStack.push(i),l!==u&&d&&(e[":@"]=this.buildAttributesMap(u,s,l)),this.addChild(i,e,s),i=e}o="",a=h}}else o+=e[a];return r.child};function d(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const h=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function f(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function p(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function m(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function v(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=m(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=m(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=m(e,"]]>",n,"StopNode is not closed.")-2;else{const r=v(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function w(t,n,i){if(n&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&r(t,i)}return e.isExist(t)?t:""}return I=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=o,this.parseXml=u,this.parseTextData=s,this.resolveNameSpace=a,this.buildAttributesMap=c,this.isItStopNode=p,this.replaceEntitiesValue=h,this.readStopNodeData=b,this.saveTextToParentTag=f,this.addChild=d,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}}(),{prettify:n}=q(),r=v();return S=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,i){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(i){!0===i&&(i={});const t=r.validate(e,i);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const o=new t(this.options);o.addExternalEntities(this.externalEntities);const s=o.parseXml(e);return this.options.preserveOrder||void 0===s?s:n(s,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function X(){if($)return R;function e(o,s,a,l){let c="",u=!1;for(let d=0;d`,u=!1;continue}if(f===s.commentPropName){c+=l+`\x3c!--${h[f][0][s.textNodeName]}--\x3e`,u=!0;continue}if("?"===f[0]){const e=n(h[":@"],s),t="?xml"===f?"":l;let r=h[f][0][s.textNodeName];r=0!==r.length?" "+r:"",c+=t+`<${f}${r}${e}?>`,u=!0;continue}let m=l;""!==m&&(m+=s.indentBy);const g=l+`<${f}${n(h[":@"],s)}`,v=e(h[f],s,p,m);-1!==s.unpairedTags.indexOf(f)?s.suppressUnpairedNode?c+=g+">":c+=g+"/>":v&&0!==v.length||!s.suppressEmptyNode?v&&v.endsWith(">")?c+=g+`>${v}${l}`:(c+=g+">",v&&""!==l&&(v.includes("/>")||v.includes("`):c+=g+"/>",u=!0}return c}function t(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(r="\n"),e(t,n,"",r)}}function H(){if(V)return B;V=1;const e="object"==typeof s&&s.env&&s.env.NODE_DEBUG&&/\bsemver\b/i.test(s.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return B=e}function Y(){if(z)return G;z=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return G={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}}!function(){if(M)return j;M=1;const e=v(),t=W(),n=function(){if(D)return F;D=1;const e=X(),t=L(),n={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(e){this.options=Object.assign({},n,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=t(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=s),this.processTextOrObjNode=i,this.options.format?(this.indentate=o,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(e,t,n,r){const i=this.j2x(e,n+1,r.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function o(e){return this.options.indentBy.repeat(e)}function s(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return r.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},r.prototype.j2x=function(e,t,n){let r="",i="";const o=n.join(".");for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(i+="");else if(null===e[s])this.isAttribute(s)?i+="":"?"===s[0]?i+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)i+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const n=this.isAttribute(s);if(n&&!this.ignoreAttributesFn(n,o))r+=this.buildAttrPairStr(n,""+e[s]);else if(!n)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const r=e[s].length;let o="",a="";for(let l=0;l"+e+i}},r.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"0&&this.options.processEntities)for(let t=0;t{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=u++;o(e,i,t),c[e]=i,l[i]=t,s[i]=new RegExp(t,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),f("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${d}+`),f("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),f("FULL",`^${l[c.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),f("LOOSE",`^${l[c.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),f("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),f("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",l[c.COERCE],!0),f("COERCERTLFULL",l[c.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ce,ce.exports)),ce.exports),o=function(){if(K)return Z;K=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Z=n=>n?"object"!=typeof n?e:n:t}(),{compareIdentifiers:s}=function(){if(ee)return J;ee=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:tt(n,e)}}();class a{constructor(s,l){if(l=o(l),s instanceof a){if(s.loose===!!l.loose&&s.includePrerelease===!!l.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,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=s.trim().match(l.loose?r[i.LOOSE]:r[i.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>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||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=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===s(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return te=a}!function(){if(se)return oe;se=1;const e=function(){if(ie)return re;ie=1;const e=ue();return re=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}}}();oe=(t,n)=>{const r=e(t,n);return r?r.version:null}}(),function(){if(le)return ae;le=1;const e=ue();ae=(t,n)=>new e(t,n).major}(),o.m},47390:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(71354),i=n.n(r),o=n(76314),s=n.n(o)()(i());s.push([e.id,".widget-file[data-v-f5ca5316]{display:flex;flex-grow:1;color:var(--color-main-text) !important;text-decoration:none !important;padding:0 !important}.widget-file__image[data-v-f5ca5316]{width:30%;min-width:160px;max-width:320px;background-position:center;background-size:cover;background-repeat:no-repeat}.widget-file__image--icon[data-v-f5ca5316]{min-width:88px;max-width:88px;padding:12px;padding-inline-end:0;display:flex;align-items:center;justify-content:center}.widget-file__title[data-v-f5ca5316]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:bold}.widget-file__details[data-v-f5ca5316]{padding:12px;flex-grow:1;display:flex;flex-direction:column}.widget-file__details p[data-v-f5ca5316]{margin:0;padding:0}.widget-file__description[data-v-f5ca5316]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}.widget-file--link[data-v-f5ca5316]{color:var(--color-text-maxcontrast)}.widget-file--interactive[data-v-f5ca5316]{position:relative;height:400px;max-height:50vh;margin:0}","",{version:3,sources:["webpack://./apps/files/src/views/ReferenceFileWidget.vue"],names:[],mappings:"AACA,8BACC,YAAA,CACA,WAAA,CACA,uCAAA,CACA,+BAAA,CACA,oBAAA,CAEA,qCACC,SAAA,CACA,eAAA,CACA,eAAA,CACA,0BAAA,CACA,qBAAA,CACA,2BAAA,CAEA,2CACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,oBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CAIF,qCACC,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CAGD,uCACC,YAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CAEA,yCACC,QAAA,CACA,SAAA,CAIF,2CACC,eAAA,CACA,sBAAA,CACA,mBAAA,CACA,oBAAA,CACA,YAAA,CACA,2BAAA,CAID,oCACC,mCAAA,CAGD,2CACC,iBAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA",sourcesContent:["\n.widget-file {\n\tdisplay: flex;\n\tflex-grow: 1;\n\tcolor: var(--color-main-text) !important;\n\ttext-decoration: none !important;\n\tpadding: 0 !important;\n\n\t&__image {\n\t\twidth: 30%;\n\t\tmin-width: 160px;\n\t\tmax-width: 320px;\n\t\tbackground-position: center;\n\t\tbackground-size: cover;\n\t\tbackground-repeat: no-repeat;\n\n\t\t&--icon {\n\t\t\tmin-width: 88px;\n\t\t\tmax-width: 88px;\n\t\t\tpadding: 12px;\n\t\t\tpadding-inline-end: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tfont-weight: bold;\n\t}\n\n\t&__details {\n\t\tpadding: 12px;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\tp {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t&__description {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tdisplay: -webkit-box;\n\t\t-webkit-line-clamp: 3;\n\t\tline-clamp: 3;\n\t\t-webkit-box-orient: vertical;\n\t}\n\n\t// No preview, standard link to ressource\n\t&--link {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&--interactive {\n\t\tposition: relative;\n\t\theight: 400px;\n\t\tmax-height: 50vh;\n\t\tmargin: 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},60640:(e,t,n)=>{n.d(t,{FilePickerVue:()=>r});const r=(0,n(85471).$V)((()=>Promise.all([n.e(4208),n.e(7432)]).then(n.bind(n,28686))))},75673:(e,n,r)=>{var i=r(85471),o=r(53334),s=(r(76408),r(58322)),a=(r(85378),r(63814)),l=r(21777),c=r(85168),u=(r(35810),r(60557)),d=r(25866),h=r(43627),f=r.n(h);const p=(0,i.pM)({name:"ReferenceFileWidget",components:{FolderIcon:d.A,FileIcon:u.A},props:{richObject:{type:Object,required:!0},accessible:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0}},data:()=>({previewUrl:null,failedViewer:!1}),computed:{availableViewerHandlers:()=>window?.OCA?.Viewer?.availableHandlers||[],viewerHandler(){return this.availableViewerHandlers.find((e=>e.mimes.includes(this.richObject.mimetype)))},viewerFile(){const e=(0,a.dC)(`dav/files/${(0,l.HW)()?.uid}/${this.richObject.path}`).replace(/\/\/$/,"/");return{filename:this.richObject.path,basename:this.richObject.name,lastmod:new Date(1e3*this.richObject.mtime),size:this.richObject.size,type:"file",mime:this.richObject.mimetype,fileid:this.richObject.id,failed:!1,loaded:!0,davPath:e,source:e}},fileSize(){return window.OC.Util.humanFileSize(this.richObject.size)},fileMtime(){return window.OC.Util.relativeModifiedDate(1e3*this.richObject.mtime)},filePath(){return f().dirname(this.richObject.path)},filePreviewStyle(){return this.previewUrl?{backgroundImage:"url("+this.previewUrl+")"}:{}},filePreviewClass(){return this.previewUrl?"widget-file__image--preview":"widget-file__image--icon"},isFolder(){return"httpd/unix-directory"===this.richObject.mimetype}},mounted(){if(this.richObject["preview-available"]){const e=(0,a.Jv)("/core/preview?fileId={fileId}&x=250&y=250",{fileId:this.richObject.id}),t=new Image;t.onload=()=>{this.previewUrl=e},t.onerror=e=>{console.error("could not load recommendation preview",e)},t.src=e}},methods:{navigate(e){this.isFolder?(e.stopPropagation(),e.preventDefault(),this.openFilePicker()):-1===window?.OCA?.Viewer?.mimetypes.indexOf(this.richObject.mimetype)||window?.OCA?.Viewer?.file||(e.stopPropagation(),e.preventDefault(),window?.OCA?.Viewer?.open({path:this.richObject.path}))},openFilePicker(){(0,c.a1)(t("settings","Your files")).allowDirectories(!0).setMultiSelect(!1).addButton({id:"open",label:this.t("settings","Open in files"),callback(e){e[0]&&window.open((0,a.Jv)("/f/{fileid}",{fileid:e[0].fileid}))},type:"primary"}).disableNavigation().startAt(this.richObject.path).build().pick()}}});var m=r(85072),g=r.n(m),v=r(97825),b=r.n(v),x=r(77659),E=r.n(x),y=r(55056),A=r.n(y),k=r(10540),C=r.n(k),w=r(41113),N=r.n(w),I=r(47390),O={};O.styleTagTransform=N(),O.setAttributes=A(),O.insert=E().bind(null,"head"),O.domAPI=b(),O.insertStyleElement=C(),g()(I.A,O),I.A&&I.A.locals&&I.A.locals;var P=r(14486);const L=(0,P.A)(p,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.accessible?e.interactive&&e.viewerHandler&&!e.failedViewer?t(e.viewerHandler.component,e._b({tag:"component",staticClass:"widget-file widget-file--interactive",attrs:{active:!1,"can-swipe":!1,"can-zoom":!1,"is-embedded":!0,"file-list":[e.viewerFile],"is-full-screen":!1,"is-sidebar-shown":!1},on:{error:function(t){e.failedViewer=!0}}},"component",e.viewerFile,!1)):t("a",{staticClass:"widget-file widget-file--link",attrs:{href:e.richObject.link,target:"_blank"},on:{click:e.navigate}},[t("span",{staticClass:"widget-file__image",class:e.filePreviewClass,style:e.filePreviewStyle},[e.previewUrl?e._e():[e.isFolder?t("FolderIcon",{attrs:{size:88,"fill-color":"var(--color-primary-element)"}}):t("FileIcon",{attrs:{size:88}})]],2),e._v(" "),t("span",{staticClass:"widget-file__details"},[t("p",{staticClass:"widget-file__title"},[e._v(e._s(e.richObject.name))]),e._v(" "),t("p",{staticClass:"widget-file__description"},[e._v(e._s(e.fileSize)),t("br"),e._v(e._s(e.fileMtime))]),e._v(" "),t("p",{staticClass:"widget-file__link"},[e._v(e._s(e.filePath))])])]):t("div",{staticClass:"widget-file widget-file--no-access"},[t("span",{staticClass:"widget-file__image widget-file__image--icon"},[e.isFolder?t("FolderIcon",{attrs:{size:88}}):t("FileIcon",{attrs:{size:88}})],1),e._v(" "),t("span",{staticClass:"widget-file__details"},[t("p",{staticClass:"widget-file__title"},[e._v("\n\t\t\t"+e._s(e.t("files","File cannot be accessed"))+"\n\t\t")]),e._v(" "),t("p",{staticClass:"widget-file__description"},[e._v("\n\t\t\t"+e._s(e.t("files","The file could not be found or you do not have permissions to view it. Ask the sender to share it."))+"\n\t\t")])])])}),[],!1,null,"f5ca5316",null).exports;var T=r(60640);const S=(0,i.pM)({name:"FileReferencePickerElement",components:{FilePicker:T.FilePickerVue},props:{providerId:{type:String,required:!0},accessible:{type:Boolean,default:!1}},computed:{containerId:()=>`filepicker-${Math.random().toString(36).slice(7)}`,filepickerOptions(){return{allowPickDirectory:!0,buttons:this.buttonFactory,container:`#${this.containerId}`,multiselect:!1,name:(0,o.Tl)("files","Select file or folder to link to")}}},methods:{t:o.Tl,buttonFactory(e){const t=[];if(0===e.length)return[];const n=e.at(0);return"/"===n.path?[]:(t.push({label:(0,o.Tl)("files","Choose {file}",{file:n.displayname}),type:"primary",callback:this.onClose}),t)},onClose(e){void 0===e||0===e.length?this.$emit("cancel"):this.onSubmit(e[0])},onSubmit(e){const t=new URL(window.location.href);t.pathname=(0,a.Jv)("/f/{fileId}",{fileId:e.fileid}),t.search="",this.$emit("submit",t.href)}}}),_=(0,P.A)(S,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{attrs:{id:e.containerId}},[t("FilePicker",e._b({on:{close:e.onClose}},"FilePicker",e.filepickerOptions,!1))],1)}),[],!1,null,null,null).exports;i.Ay.mixin({methods:{t:o.t}}),(0,s.r)("file",((e,t)=>{let{richObjectType:n,richObject:r,accessible:o,interactive:s}=t;new(i.Ay.extend(L))({propsData:{richObjectType:n,richObject:r,accessible:o,interactive:s}}).$mount(e)}),(()=>{}),{hasInteractiveView:!0}),(0,s.b)("files",((e,t)=>{let{providerId:n,accessible:r}=t;const o=new(i.Ay.extend(_))({propsData:{providerId:n,accessible:r}}).$mount(e);return new s.N(o.$el,o)}),((e,t)=>{t.object.$destroy()}))},76408:(e,t,n)=>{n(42802);var r=n(85471),i=n(85378),o=n(43921),s=n(65043),a=n(82680),l=n(21777),c=n(63814),u=n(51431),d=n(13368),h=n(47970),f=n(64546),p=n(33239),m=n(86241),g=n(8019),v=n(87798),b=n(76643),x=n(19998),E=n(86435),y=n(43819),A=n(40173);const k={name:"NcReferenceList",components:{NcReferenceWidget:i.N},props:{text:{type:String,default:""},referenceData:{type:Array,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},data:()=>({references:null,loading:!0}),computed:{isVisible(){return this.loading||0!==this.displayedReferences.length},values(){return this.referenceData?this.referenceData:!this.displayFallback||this.loading||this.references?this.references?Object.values(this.references):[]:[this.fallbackReference]},firstReference(){return this.values[0]??null},displayedReferences(){return this.values.slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){return this.loading=!0,this.referenceData?(this.references=null,void(this.loading=!1)):new RegExp(o.U).exec(this.text)?void this.resolve().then((e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")})).catch((e=>{console.error("Failed to extract references",e),this.loading=!1,this.$emit("loaded")})):(this.references=null,void(this.loading=!1))},resolve(){const e=new RegExp(o.U).exec(this.text.trim()),t=null===(0,l.HW)();return 1===this.limit&&e?t?s.Ay.get((0,c.KT)("references/resolvePublic")+`?reference=${encodeURIComponent(e[0])}&sharingToken=${(0,a.G)()}`):s.Ay.get((0,c.KT)("references/resolve")+`?reference=${encodeURIComponent(e[0])}`):t?s.Ay.post((0,c.KT)("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:(0,a.G)()}):s.Ay.post((0,c.KT)("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};var C=function(){var e=this,t=e._self._c;return e.isVisible?t("div",{staticClass:"widgets--list",class:{"icon-loading":e.loading}},e._l(e.displayedReferences,(function(n){return t("NcReferenceWidget",{key:n?.openGraphObject?.id,attrs:{reference:n,interactive:e.interactive,"interactive-opt-in":e.interactiveOptIn}})})),1):e._e()},w=[];const N=(0,u.n)(k,C,w,!1,null,"ffdba753").exports,I=function(){return function(e){(0,h.YR)(e,(e=>"text"===e.type),(function(e,t,n){const r=e.value.split(/(\{[a-z\-_.0-9]+\})/gi).map(((e,t,n)=>{const r=e.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!r)return(0,p.u)("text",e);const[,i]=r;return(0,p.u)("element",{tagName:`#${i}`})}));n.children.splice(t,1,...r)}))}},O=function(){return function(e){(0,h.YR)(e,(e=>["text","code","inlineCode"].includes(e.type)),((e,t,n)=>(n.children.splice(t,1,{...e,value:e.value.replace(/</gim,"<").replace(/>/gim,">")}),[f._Z,t+1])))}};function P(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}const L=D(/[A-Za-z]/),T=D(/[\dA-Za-z]/);function S(e){return null!==e&&e<-2}function _(e){return null!==e&&(e<0||32===e)}function R(e){return-2===e||-1===e||32===e}const $=D(new RegExp("\\p{P}|\\p{S}","u")),F=D(/\s/);function D(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}const j=function(e){if(null==e)return B;if("function"==typeof e)return M(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n":"")+")"})}return a;function a(){let s,a,l,c=V;if(o(t,r,i[i.length-1]||void 0)&&(c=function(e){return Array.isArray(e)?e:"number"==typeof e?[G,e]:null==e?V:[e]}(n(t,i)),c[0]===z))return c;if("children"in t&&t.children){const n=t;if(n.children&&c[0]!==U)for(a=0,l=i.concat(n);a>-1&&a0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),a=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(a?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=P(e,"(");let o=P(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function re(e,t,n,r){return!(!ie(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ie(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||F(n)||$(n))&&(!t||47!==n)}function oe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function se(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ae(){this.buffer()}function le(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=oe(this.sliceSerialize(e)).toLowerCase()}function ce(e){this.exit(e)}function ue(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function de(){this.buffer()}function he(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=oe(this.sliceSerialize(e)).toLowerCase()}function fe(e){this.exit(e)}function pe(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),a(),s(),o+=i.move("]"),o}function me(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),a(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),ge)),s(),o}function ge(e,t,n){return 0===t?e:(n?"":" ")+e}pe.peek=function(){return"["};const ve=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function be(e){this.enter({type:"delete",children:[]},e)}function xe(e){this.exit(e)}function Ee(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function ye(e){return e.length}function Ae(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function ke(e,t,n){return">"+(n?"":" ")+e}function Ce(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),s(),c}function $e(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function Fe(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(e.url))}function je(e,t,n,r){const i=Ie(n),o='"'===i?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(De(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),a(),n.stack=t,r}a=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),a(),c}function Me(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function Be(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ve(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}_e.peek=function(){return"<"},Re.peek=function(){return"!"},$e.peek=function(){return"!"},Fe.peek=function(){return"`"},je.peek=function(e,t,n){return De(e,n)?"<":"["},Me.peek=function(){return"["};const Ge=j(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ze(e,t,n,r){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),o(),a}ze.peek=function(e,t,n){return n.options.strong||"*"};const Ue={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),ke);return i(),s},break:we,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",s="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,Ne);return e(),t}const a=n.createTracker(r),l=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}(o,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const t=n.enter(`codeFencedLang${s}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),o&&(u+=a.move(o+"\n")),u+=a.move(l),c(),u},definition:function(e,t,n,r){const i=Ie(n),o='"'===i?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),s(),c},emphasis:Oe,hardBreak:we,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return(0,h.YR)(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,f.dc})),Boolean((!e.depth||e.depth<3)&&Le(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===i?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c},html:_e,image:Re,imageReference:$e,inlineCode:Fe,link:je,linkReference:Me,list:function(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Be(n);const a=e.ordered?"."===s?")":".":function(e){const t=Be(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ve(n)===s&&t){let t=-1;for(;++t-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let s=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),(function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?o:o+" ".repeat(s-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s},root:function(e,t,n,r){return(e.children.some((function(e){return Ge(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:ze,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ve(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function qe(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function We(e){this.exit(e),this.data.inTable=void 0}function Xe(e){this.enter({type:"tableRow",children:[]},e)}function He(e){this.exit(e)}function Ye(e){this.enter({type:"tableCell",children:[]},e)}function Qe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ze));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ze(e,t){return"|"===t?t:e}function Ke(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ue.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let i=-1;const o=[],s=t.enter("table");for(;++il&&(l=e[c].length);++da[d])&&(a[d]=e)}n.push(o)}o[c]=n,s[c]=i}var u;let d=-1;if("object"==typeof n&&"length"in n)for(;++da[d]&&(a[d]=o),f[d]=o),h[d]=s}o.splice(1,0,h),s.splice(1,0,f),c=-1;const p=[];for(;++ci?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function yt(e){return null===e||_(e)||F(e)?1:$(e)?2:void 0}function At(e,t,n){const r=[];let i=-1;for(;++i999||93===a&&!o||null===a||91===a||_(a))return n(a);if(93===a){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(oe(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return _(a)||(o=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function Pt(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!s||null===t||91===t||_(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=oe(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return _(t)||(s=!0),a++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),kt(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}function Lt(e,t,n){return e.check(Ct,t,e.attempt(wt,t,n))}function Tt(e){e.exit("gfmFootnoteDefinition")}function St(e){let t=(e||{}).singleTilde;const n={tokenize:function(e,n,r){const i=this.previous,o=this.events;let s=0;return function(t){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const l=yt(i);if(126===o)return s>1?r(o):(e.consume(o),s++,a);if(s<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=yt(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function Rt(e,t){let n=!1;const r=[];for(;t-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?E:a;return o===E&&r.parser.lazy[r.now().line]?n(e):o(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(i=!0,s+=1),l(e)}(t)}function l(t){return null===t?n(t):S(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):R(t)?kt(e,l,"whitespace")(t):(s+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||_(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,R(t)?kt(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t))}function h(t){return 45===t||58===t?p(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):x(t)}function f(t){return R(t)?kt(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||S(t)?b(t):x(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):x(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return R(t)?kt(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?h(n):(null===n||S(n))&&i&&o===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):x(n)}function x(e){return n(e)}function E(t){return e.enter("tableRow"),y(t)}function y(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),y):null===n||S(n)?(e.exit("tableRow"),t(n)):R(n)?kt(e,y,"whitespace")(n):(e.enter("data"),A(n))}function A(t){return null===t||124===t||_(t)?(e.exit("data"),y(t)):(e.consume(t),92===t?k:A)}function k(t){return 92===t||124===t?(e.consume(t),A):A(t)}}function Ft(e,t){let n,r,i,o=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const h=new _t;for(;++on[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==i&&(o.end=Object.assign({},Mt(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function jt(e,t,n,r,i){const o=[],s=Mt(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Mt(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Bt={tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return _(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return S(r)?t(r):R(r)?e.check({tokenize:Vt},t,n)(r):n(r)}}};function Vt(e,t,n){return kt(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Gt={};function zt(e){const t=e||Gt,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return function(e){const t={};let n=-1;for(;++n({})},referenceLimit:{type:Number,default:0},referenceInteractive:{type:Boolean,default:!0},referenceInteractiveOptIn:{type:Boolean,default:!1},references:{type:Array,default:null},useMarkdown:{type:Boolean,default:!1},useExtendedMarkdown:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},autolink:{type:Boolean,default:!0}},emits:["interact:todo"],data:()=>({parentId:(0,m.G)(5)}),methods:{renderPlaintext(e){const t=this,n=this.text.split(/(\{[a-z\-_.0-9]+\})/gi).map((function(n,r,i){const s=n.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!s)return(({h:e,context:t},n)=>(t.autolink&&(n=(0,o.p)(n)),Array.isArray(n)?n.map((t=>{if("string"==typeof t)return t;const{component:n,props:r}=t,i="NcLink"===n.name?void 0:"rich-text--component";return e(n,{props:r,class:i})})):n))({h:e,context:t},n);const a=s[1],l=t.arguments[a];if("object"==typeof l){const{component:t,props:n}=l;return e(t,{props:n,class:"rich-text--component"})}return l?e("span",{class:"rich-text--fallback"},l):n}));return e("div",{class:"rich-text--wrapper"},[e("div",{},n.flat()),this.referenceLimit>0?e("div",{class:"rich-text--reference-widget"},[e(N,{props:{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn}})]):null])},renderMarkdown(e){const t=(0,g.l)().use(v.A).use(o.r,{autolink:this.autolink,useMarkdown:this.useMarkdown,useExtendedMarkdown:this.useExtendedMarkdown}).use(O).use(this.useExtendedMarkdown?zt:void 0).use(b.A).use(x.A,{handlers:{component:(e,t)=>e(t,t.component,{value:t.value})}}).use(this.useExtendedMarkdown?Ut.value:void 0).use(I).use(y.A,{target:"_blank",rel:["noopener noreferrer"]}).use(E.A,{createElement:(t,r,i)=>{if(!t.startsWith("#")){if(this.useExtendedMarkdown){"code"===t&&!Ut.value&&r?.attrs?.class?.includes("language")&&async function(){const e=await n.e(5862).then(n.bind(n,75862));Ut.value=e.default}();let o=null;if("li"===t&&Array.isArray(i)&&"input"===i[0].tag&&"checkbox"===i[0].data.attrs.type){const[n,...s]=i,a=s.findIndex((e=>["ul","ol","li","blockquote","pre"].includes(e.tag)));-1!==a&&(o=s[a],s.splice(a));const l=this.parentId+"-markdown-input-"+(0,m.G)(5),c=e(d.N,{attrs:{...n.data.attrs,id:l,disabled:!this.interactive},on:{"update:checked":()=>{this.$emit("interact:todo",l)}}},s);return e(t,r,[c,o])}}if("a"===t){const t=(0,o.g)(this.$router,r.attrs.href);if(t)return delete r.attrs.href,delete r.attrs.target,e(A.Wk,{...r,props:{to:t}},i)}return e(t,r,i)}const s=this.arguments[t.slice(1)];return s?s.component?e(s.component,{attrs:r,props:s.props,class:"rich-text--component"},i):e("span",r,[s]):e("span",{attrs:r,class:"rich-text--fallback"},[`{${t.slice(1)}}`])},prefix:!1}).processSync(this.text.replace(/<[^>]+>/g,(e=>e.replace(/")).result;return e("div",{class:"rich-text--wrapper rich-text--wrapper-markdown"},[t,this.referenceLimit>0?e("div",{class:"rich-text--reference-widget"},[e(N,{props:{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn}})]):null])}},render(e){return this.useMarkdown||this.useExtendedMarkdown?this.renderMarkdown(e):this.renderPlaintext(e)}};(0,u.n)(qt,null,null,!1,null,"d7087beb").exports},85378:(e,t,n)=>{n.d(t,{N:()=>I}),n(7861);var r=n(58322),i=n(51431),o=n(50538),s=n(65043),a=n(32981),l=n(63814),c=n(35779),u=n(26517),d=n(25825),h=n(13073),f=n(85471),p=n(40173),m=n(43921),g=n(97012),v=n(59892),b=n(59890),x=n(47296),E=n(69496),y=n(61338),A=n(83427),k=n(89916);(0,o.r)(o.V);const C={name:"NcReferenceWidget",components:{NcButton:g.A},props:{reference:{type:Object,required:!0},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},setup(){const e=(0,f.KR)(!1),t=(0,f.KR)(),{width:n}=(0,h.Lhy)(t);return(0,h.BLq)(t,(([t])=>{(0,f.dY)((()=>{e.value=t.isIntersecting}))})),{width:n,isVisible:e,widgetRoot:t}},data:()=>({showInteractive:!1,rendered:!1,idleTimeout:null}),computed:{isInteractive(){return!this.interactiveOptIn&&this.interactive||this.showInteractive},hasFullWidth(){return(0,r.f)(this.reference.richObjectType)},hasCustomWidget(){return(0,r.i)(this.reference.richObjectType)},hasInteractiveView(){return(0,r.i)(this.reference.richObjectType)&&(0,r.h)(this.reference.richObjectType)},noAccess(){return this.reference&&!this.reference.accessible},descriptionStyle(){if(0===this.numberOfLines)return{display:"none"};const e=this.numberOfLines;return{lineClamp:e,webkitLineClamp:e}},numberOfLines(){return[450,550,650,1/0].findIndex((e=>this.width{this.isVisible||this.destroyWidget()}),18e4)},immediate:!0}},beforeDestroy(){this.destroyWidget()},methods:{t:o.a,enableInteractive(){this.showInteractive=!0,this.renderWidget()},renderWidget(){if(!this.$refs.customWidget)return;if("open-graph"===this?.reference?.richObjectType)return;this.$refs.customWidget.innerHTML="";const e=document.createElement("div");e.style="width: 100%;",this.$refs.customWidget.appendChild(e),this.$nextTick((()=>{(0,r.a)(e,{...this.reference,interactive:this.isInteractive}),this.rendered=!0}))},destroyWidget(){this.rendered&&((0,r.e)(this.reference.richObjectType,this.$el),this.rendered=!1)}}};var w=function(){var e=this,t=e._self._c;return t("div",{ref:"widgetRoot",class:{"toggle-interactive":e.hasInteractiveView&&!e.isInteractive}},[e.reference&&e.hasCustomWidget?t("div",{ref:"customWidget",staticClass:"widget-custom",class:{"full-width":e.hasFullWidth}}):!e.noAccess&&e.reference&&e.reference.openGraphObject&&!e.hasCustomWidget?t(e.referenceWidgetLinkComponent,e._b({tag:"component",staticClass:"widget-default",attrs:{rel:"noopener noreferrer"}},"component",e.referenceWidgetLinkProps,!1),[e.reference.openGraphObject.thumb?t("img",{staticClass:"widget-default--image",attrs:{src:e.reference.openGraphObject.thumb}}):e._e(),t("div",{staticClass:"widget-default--details"},[t("p",{staticClass:"widget-default--name"},[e._v(" "+e._s(e.reference.openGraphObject.name)+" ")]),t("p",{staticClass:"widget-default--description",style:e.descriptionStyle},[e._v(" "+e._s(e.reference.openGraphObject.description)+" ")]),t("p",{staticClass:"widget-default--link"},[e._v(" "+e._s(e.compactLink)+" ")])])]):e._e(),e.interactiveOptIn&&e.hasInteractiveView&&!e.isInteractive?t("NcButton",{staticClass:"toggle-interactive--button",on:{click:e.enableInteractive}},[e._v(" "+e._s(e.t("Enable interactive view"))+" ")]):e._e()],1)},N=[];const I=(0,i.n)(C,w,N,!1,null,"734d6ae9").exports,O={name:"NcCustomPickerElement",props:{provider:{type:Object,required:!0}},emits:["cancel","submit"],data(){return{isRegistered:(0,r.d)(this.provider.id),renderResult:null}},mounted(){this.isRegistered&&this.renderElement()},beforeDestroy(){this.isRegistered&&(0,r.g)(this.provider.id,this.$el,this.renderResult)},methods:{renderElement(){this.$refs.domElement&&(this.$refs.domElement.innerHTML="");const e=(0,r.c)(this.$refs.domElement,{providerId:this.provider.id,accessible:!1});Promise.resolve(e).then((e=>{this.renderResult=e,this.renderResult.object?._isVue&&this.renderResult.object?.$on&&(this.renderResult.object.$on("submit",this.onSubmit),this.renderResult.object.$on("cancel",this.onCancel)),this.renderResult.element.addEventListener("submit",(e=>{this.onSubmit(e.detail)})),this.renderResult.element.addEventListener("cancel",this.onCancel)}))},onSubmit(e){this.$emit("submit",e)},onCancel(){this.$emit("cancel")}}};var P=function(){return(0,this._self._c)("div",{ref:"domElement"})},L=[];const T=(0,i.n)(O,P,L,!1,null,"de9850e4").exports;(0,o.r)(o.W);const S={id:"any-link",title:(0,o.a)("Any link"),icon_url:(0,l.d0)("core","filetypes/link.svg")};function _(e,t=null){const n=window._vue_richtext_reference_providers.filter((e=>{const t=!!e.search_providers_ids&&e.search_providers_ids.length>0||(0,r.d)(e.id);return t||console.debug("[smart picker]",e.id,"reference provider is discoverable but does not have any related search provider or custom picker component registered"),t})),i=e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),o=new RegExp(i,"i"),s=function(e){const t=window._vue_richtext_reference_provider_timestamps;return e.sort(((e,t)=>e.order===t.order?0:e.order>t.order?1:-1)).sort(((e,n)=>{const r=t[e.id],i=t[n.id];return r===i?0:void 0===i?-1:void 0===r?1:r>i?-1:1}))}(n).filter((e=>e.title.match(o))),a=t?s.slice(0,t):s;return""!==e&&0!==a.length||a.push(S),a}window._vue_richtext_reference_providers||(window._vue_richtext_reference_providers=(0,a.C)("core","reference-provider-list",[])),window._vue_richtext_reference_provider_timestamps||(window._vue_richtext_reference_provider_timestamps=(0,a.C)("core","reference-provider-timestamps",{}));let R=0;function $(e,t){return function(){const n=this,r=arguments;clearTimeout(R),R=setTimeout((function(){e.apply(n,r)}),t)}}function F(e){try{return Boolean(new URL(e))}catch(e){return!1}}(0,o.r)(o.Y,o.X);const D={name:"LinkVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var j=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon link-variant-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},M=[];const B=(0,i.n)(D,j,M,!1,null,null).exports,V={name:"NcProviderList",components:{NcSelect:d.N,NcHighlight:u.N,NcEmptyContent:c.A,LinkVariantIcon:B},emits:["select-provider","submit"],data:()=>({selectedProvider:null,query:"",multiselectPlaceholder:(0,o.a)("Select provider"),providerIconAlt:(0,o.a)("Provider icon")}),computed:{options(){const e=[];return""!==this.query&&F(this.query)&&e.push({id:this.query,title:this.query,isLink:!0}),e.push(..._(this.query)),e}},methods:{focus(){setTimeout((()=>{this.$refs["provider-select"]?.$el?.querySelector("#provider-select-input")?.focus()}),300)},onProviderSelected(e){null!==e&&(e.isLink?this.$emit("submit",e.title):this.$emit("select-provider",e),this.selectedProvider=null)},onSearch(e,t){this.query=e}}};var G=function(){var e=this,t=e._self._c;return t("div",{staticClass:"provider-list"},[t("NcSelect",{ref:"provider-select",staticClass:"provider-list--select",attrs:{"input-id":"provider-select-input",label:"title",placeholder:e.multiselectPlaceholder,options:e.options,"append-to-body":!1,"clear-search-on-select":!0,"clear-search-on-blur":()=>!1,filterable:!1},on:{search:e.onSearch,input:e.onProviderSelected},scopedSlots:e._u([{key:"option",fn:function(n){return[n.isLink?t("div",{staticClass:"provider"},[t("LinkVariantIcon",{staticClass:"link-icon",attrs:{size:20}}),t("span",[e._v(e._s(n.title))])],1):t("div",{staticClass:"provider"},[t("img",{staticClass:"provider-icon",attrs:{src:n.icon_url,alt:e.providerIconAlt}}),t("NcHighlight",{staticClass:"option-text",attrs:{search:e.query,text:n.title}})],1)]}}]),model:{value:e.selectedProvider,callback:function(t){e.selectedProvider=t},expression:"selectedProvider"}}),t("NcEmptyContent",{staticClass:"provider-list--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[t("LinkVariantIcon")]},proxy:!0}])})],1)},z=[];const U=(0,i.n)(V,G,z,!1,null,"f03ee0c9").exports;(0,o.r)(o.Z);const q={name:"NcRawLinkInput",components:{LinkVariantIcon:B,NcEmptyContent:c.A,NcLoadingIcon:v.A,NcReferenceWidget:I,NcTextField:b.N},props:{provider:{type:Object,required:!0}},emits:["submit"],data:()=>({inputValue:"",loading:!1,reference:null,abortController:null,inputPlaceholder:(0,o.a)("Enter link")}),computed:{isLinkValid(){return F(this.inputValue)}},methods:{focus(){this.$refs["url-input"].$el.getElementsByTagName("input")[0]?.focus()},onSubmit(e){const t=e.target.value;this.isLinkValid&&this.$emit("submit",t)},onClear(){this.inputValue="",this.reference=null},onInput(){this.reference=null,this.abortController&&this.abortController.abort(),this.isLinkValid&&$((()=>{this.updateReference()}),500)()},updateReference(){this.loading=!0,this.abortController=new AbortController,s.Ay.get((0,l.KT)("references/resolve",2)+"?reference="+encodeURIComponent(this.inputValue),{signal:this.abortController.signal}).then((e=>{this.reference=e.data.ocs.data.references[this.inputValue]})).catch((e=>{console.error(e)})).then((()=>{this.loading=!1}))}}};var W=function(){var e=this,t=e._self._c;return t("div",{staticClass:"raw-link"},[t("div",{staticClass:"input-wrapper"},[t("NcTextField",{ref:"url-input",attrs:{value:e.inputValue,"show-trailing-button":""!==e.inputValue,label:e.inputPlaceholder},on:{"update:value":[function(t){e.inputValue=t},e.onInput],"trailing-button-click":e.onClear},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onSubmit.apply(null,arguments)}}},[e.loading?t("NcLoadingIcon",{attrs:{size:16}}):t("LinkVariantIcon",{attrs:{size:16}})],1)],1),null!==e.reference?t("NcReferenceWidget",{staticClass:"reference-widget",attrs:{reference:e.reference}}):t("NcEmptyContent",{staticClass:"raw-link--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[e.provider.icon_url?t("img",{staticClass:"provider-icon",attrs:{src:e.provider.icon_url}}):t("LinkVariantIcon")]},proxy:!0}])})],1)},X=[];const H=(0,i.n)(q,W,X,!1,null,"3c1803b5").exports,Y={name:"NcSearchResult",components:{NcHighlight:u.N},props:{entry:{type:Object,required:!0},query:{type:String,required:!0}}};var Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"result"},[e.entry.icon?t("div",{staticClass:"result--icon-class",class:{[e.entry.icon]:!0,rounded:e.entry.rounded}}):t("img",{staticClass:"result--image",class:{rounded:e.entry.rounded},attrs:{src:e.entry.thumbnailUrl}}),t("div",{staticClass:"result--content"},[t("span",{staticClass:"result--content--name"},[t("NcHighlight",{attrs:{search:e.query,text:e.entry.title}})],1),t("span",{staticClass:"result--content--subline"},[t("NcHighlight",{attrs:{search:e.query,text:e.entry.subline}})],1)])])},Z=[];const K=(0,i.n)(Y,Q,Z,!1,null,"ff4bcbf3").exports;(0,o.r)(o._,o.Y,o.B);const J={name:"NcSearch",components:{LinkVariantIcon:B,DotsHorizontalIcon:x.D,NcEmptyContent:c.A,NcSelect:d.N,NcSearchResult:K},props:{provider:{type:Object,required:!0},showEmptyContent:{type:Boolean,default:!0},searchPlaceholder:{type:String,default:null}},emits:["submit"],data:()=>({searchQuery:"",selectedResult:null,resultsBySearchProvider:{},searching:!1,searchingMoreOf:null,abortController:null,noOptionsText:(0,o.a)("Start typing to search"),providerIconAlt:(0,o.a)("Provider icon")}),computed:{mySearchPlaceholder(){return this.searchPlaceholder||(0,o.a)("Search")},searchProviderIds(){return this.provider.search_providers_ids},options(){if(""===this.searchQuery)return[];const e=[];return F(this.searchQuery)&&e.push(this.rawLinkEntry),e.push(...this.formattedSearchResults),e},rawLinkEntry(){return{id:"rawLinkEntry",resourceUrl:this.searchQuery,isRawLink:!0}},formattedSearchResults(){const e=[];return this.searchProviderIds.forEach((t=>{if(this.resultsBySearchProvider[t].entries.length>0){(this.searchProviderIds.length>1||this.resultsBySearchProvider[t].entries.length>1)&&e.push({id:"groupTitle-"+t,name:this.resultsBySearchProvider[t].name,isCustomGroupTitle:!0,providerId:t});const n=this.resultsBySearchProvider[t].entries.map(((e,n)=>({id:"provider-"+t+"-entry-"+n,...e})));e.push(...n),this.resultsBySearchProvider[t].isPaginated&&e.push({id:"moreOf-"+t,name:this.resultsBySearchProvider[t].name,isMore:!0,providerId:t,isLoading:this.searchingMoreOf===t})}})),e}},mounted(){this.resetResults()},beforeDestroy(){this.cancelSearchRequests()},methods:{t:o.a,resetResults(){const e={};this.searchProviderIds.forEach((t=>{e[t]={entries:[]}})),this.resultsBySearchProvider=e},focus(){setTimeout((()=>{this.$refs["search-select"]?.$el?.querySelector("#search-select-input")?.focus()}),300)},cancelSearchRequests(){this.abortController&&this.abortController.abort()},onSearchInput(e,t){this.searchQuery=e,$((()=>{this.updateSearch()}),500)()},onSelectResultSelected(e){null!==e&&(e.resourceUrl?(this.cancelSearchRequests(),this.$emit("submit",e.resourceUrl)):e.isMore&&this.searchMoreOf(e.providerId).then((()=>{this.selectedResult=null})))},searchMoreOf(e){return this.searchingMoreOf=e,this.cancelSearchRequests(),this.searchProviders(e)},updateSearch(){if(this.cancelSearchRequests(),this.resetResults(),""!==this.searchQuery)return this.searchProviders();this.searching=!1},searchProviders(e=null){this.abortController=new AbortController,this.searching=!0;const t=null===e?[...this.searchProviderIds].map((e=>this.searchOneProvider(e))):[this.searchOneProvider(e,this.resultsBySearchProvider[e]?.cursor??null)];return Promise.allSettled(t).then((e=>{e.find((e=>"rejected"===e.status&&("CanceledError"===e.reason.name||"ERR_CANCELED"===e.reason.code)))||(this.searching=!1,this.searchingMoreOf=null)}))},searchOneProvider(e,t=null){const n=null===t?(0,l.KT)("search/providers/{providerId}/search?term={term}&limit={limit}",{providerId:e,term:this.searchQuery,limit:5}):(0,l.KT)("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}",{providerId:e,term:this.searchQuery,limit:5,cursor:t});return s.Ay.get(n,{signal:this.abortController.signal}).then((t=>{const n=t.data.ocs.data;this.resultsBySearchProvider[e].name=n.name,this.resultsBySearchProvider[e].cursor=n.cursor,this.resultsBySearchProvider[e].isPaginated=n.isPaginated,this.resultsBySearchProvider[e].entries.push(...n.entries)}))}}};var ee=function(){var e=this,t=e._self._c;return t("div",{staticClass:"smart-picker-search",class:{"with-empty-content":e.showEmptyContent}},[t("NcSelect",{ref:"search-select",staticClass:"smart-picker-search--select",attrs:{"input-id":"search-select-input",label:"name",placeholder:e.mySearchPlaceholder,options:e.options,"append-to-body":!1,"close-on-select":!1,"clear-search-on-select":!1,"clear-search-on-blur":()=>!1,"reset-focus-on-options-change":!1,filterable:!1,autoscroll:!0,"reset-on-options-change":!1,loading:e.searching},on:{search:e.onSearchInput,input:e.onSelectResultSelected},scopedSlots:e._u([{key:"option",fn:function(n){return[n.isRawLink?t("div",{staticClass:"custom-option"},[t("LinkVariantIcon",{staticClass:"option-simple-icon",attrs:{size:20}}),t("span",{staticClass:"option-text"},[e._v(" "+e._s(e.t("Raw link {options}",{options:n.resourceUrl}))+" ")])],1):n.resourceUrl?t("NcSearchResult",{staticClass:"search-result",attrs:{entry:n,query:e.searchQuery}}):n.isCustomGroupTitle?t("span",{staticClass:"custom-option group-name"},[e.provider.icon_url?t("img",{staticClass:"provider-icon group-name-icon",attrs:{src:e.provider.icon_url}}):e._e(),t("span",{staticClass:"option-text"},[t("strong",[e._v(e._s(n.name))])])]):n.isMore?t("span",{class:{"custom-option":!0}},[n.isLoading?t("span",{staticClass:"option-simple-icon icon-loading-small"}):t("DotsHorizontalIcon",{staticClass:"option-simple-icon",attrs:{size:20}}),t("span",{staticClass:"option-text"},[e._v(" "+e._s(e.t('Load more "{options}"',{options:n.name}))+" ")])],1):e._e()]}},{key:"no-options",fn:function(){return[e._v(" "+e._s(e.noOptionsText)+" ")]},proxy:!0}]),model:{value:e.selectedResult,callback:function(t){e.selectedResult=t},expression:"selectedResult"}}),e.showEmptyContent?t("NcEmptyContent",{staticClass:"smart-picker-search--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[e.provider.icon_url?t("img",{staticClass:"provider-icon",attrs:{alt:e.providerIconAlt,src:e.provider.icon_url}}):t("LinkVariantIcon")]},proxy:!0}],null,!1,2922132592)}):e._e()],1)},te=[];const ne=(0,i.n)(J,ee,te,!1,null,"05fef988").exports,re={providerList:1,standardLinkInput:2,searchInput:3,customElement:4},ie={name:"NcReferencePicker",components:{NcCustomPickerElement:T,NcProviderList:U,NcRawLinkInput:H,NcSearch:ne},props:{initialProvider:{type:Object,default:()=>null},width:{type:Number,default:null},focusOnCreate:{type:Boolean,default:!0}},emits:["cancel","cancel-raw-link","cancel-search","provider-selected","submit"],data(){return{MODES:re,selectedProvider:this.initialProvider}},computed:{mode(){return null===this.selectedProvider?re.providerList:(0,r.d)(this.selectedProvider.id)?re.customElement:this.selectedProvider.search_providers_ids?re.searchInput:re.standardLinkInput},pickerWrapperStyle(){return{width:this.width?this.width+"px":void 0}}},mounted(){this.focusOnCreate&&(this.initialProvider?setTimeout((()=>{this.$refs["url-input"]?.focus()}),300):this.$nextTick((()=>{this.$refs["provider-list"]?.focus()})))},methods:{onEscapePressed(){null!==this.selectedProvider?this.deselectProvider():this.cancelProviderSelection()},onProviderSelected(e){this.selectedProvider=e,this.$emit("provider-selected",e),this.$nextTick((()=>{this.$refs["url-input"]?.focus()}))},cancelCustomElement(){this.deselectProvider()},cancelSearch(){this.$emit("cancel-search",this.selectedProvider?.title),this.deselectProvider()},cancelRawLinkInput(){this.$emit("cancel-raw-link",this.selectedProvider?.title),this.deselectProvider()},cancelProviderSelection(){this.$emit("cancel")},submitLink(e){null!==this.selectedProvider&&function(e){const t=Math.floor(Date.now()/1e3),n={timestamp:t},r=(0,l.KT)("references/provider/{providerId}",{providerId:e});s.Ay.put(r,n).then((n=>{window._vue_richtext_reference_provider_timestamps[e]=t}))}(this.selectedProvider.id),this.$emit("submit",e),this.deselectProvider()},deselectProvider(){this.selectedProvider=null,this.$emit("provider-selected",null),setTimeout((()=>{this.$refs["provider-list"]?.focus()}),300)}}};var oe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"reference-picker",style:e.pickerWrapperStyle,attrs:{tabindex:"-1"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:(t.stopPropagation(),t.preventDefault(),e.onEscapePressed.apply(null,arguments))}}},[e.mode===e.MODES.providerList?t("NcProviderList",{ref:"provider-list",on:{"select-provider":e.onProviderSelected,submit:e.submitLink,cancel:e.cancelProviderSelection}}):e.mode===e.MODES.standardLinkInput?t("NcRawLinkInput",{ref:"url-input",attrs:{provider:e.selectedProvider},on:{submit:e.submitLink,cancel:e.cancelRawLinkInput}}):e.mode===e.MODES.searchInput?t("NcSearch",{ref:"url-input",attrs:{provider:e.selectedProvider},on:{cancel:e.cancelSearch,submit:e.submitLink}}):e.mode===e.MODES.customElement?t("div",{staticClass:"custom-element-wrapper"},[t("NcCustomPickerElement",{staticClass:"custom-element",attrs:{provider:e.selectedProvider},on:{submit:e.submitLink,cancel:e.cancelCustomElement}})],1):e._e()],1)},se=[];const ae=(0,i.n)(ie,oe,se,!1,null,"cd33df8e").exports;(0,o.r)(o.$,o.n);const le={name:"NcReferencePickerModal",components:{NcReferencePicker:ae,NcModal:E.A,NcButton:g.A,ArrowLeftIcon:A.A,CloseIcon:k.C},props:{initialProvider:{type:Object,default:()=>null},focusOnCreate:{type:Boolean,default:!0},isInsideViewer:{type:Boolean,default:!1}},emits:["cancel","submit"],data(){return{show:!0,selectedProvider:this.initialProvider,backButtonTitle:(0,o.a)("Back to provider selection"),closeButtonTitle:(0,o.a)("Close"),closeButtonLabel:(0,o.a)("Close Smart Picker")}},computed:{isProviderSelected(){return null!==this.selectedProvider},showBackButton(){return null===this.initialProvider&&this.isProviderSelected},modalSize(){return this.isProviderSelected&&(0,r.d)(this.selectedProvider.id)?(0,r.j)(this.selectedProvider.id)??"large":"normal"},showModalName(){return!this.isProviderSelected||!(0,r.d)(this.selectedProvider.id)},modalName(){return this.isProviderSelected?this.selectedProvider.title:(0,o.a)("Smart Picker")}},mounted(){if(this.isInsideViewer){const e=this.$refs.modal_content;(0,y.Ic)("viewer:trapElements:changed",e)}},methods:{onCancel(){this.show=!1,this.$emit("cancel")},onSubmit(e){this.show=!1,this.$emit("submit",e)},onProviderSelect(e){this.selectedProvider=e,null===e&&null!==this.initialProvider&&this.onCancel()},onBackClicked(){this.$refs.referencePicker.deselectProvider()}}};var ce=function(){var e=this,t=e._self._c;return e.show?t("NcModal",{staticClass:"reference-picker-modal",attrs:{size:e.modalSize,"can-close":!0},on:{close:e.onCancel}},[t("div",{ref:"modal_content",staticClass:"reference-picker-modal--content"},[e.showBackButton?t("NcButton",{staticClass:"back-button",attrs:{"aria-label":e.backButtonTitle,title:e.backButtonTitle},on:{click:e.onBackClicked},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ArrowLeftIcon")]},proxy:!0}],null,!1,3001860362)}):e._e(),t("NcButton",{staticClass:"close-button",attrs:{"aria-label":e.closeButtonLabel,title:e.closeButtonTitle,variant:"tertiary"},on:{click:e.onCancel},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon")]},proxy:!0}],null,!1,2491825086)}),e.showModalName?t("h2",[e._v(" "+e._s(e.modalName)+" ")]):e._e(),t("NcReferencePicker",{ref:"referencePicker",attrs:{"initial-provider":e.initialProvider,"focus-on-create":e.focusOnCreate},on:{"provider-selected":e.onProviderSelect,submit:e.onSubmit,cancel:e.onCancel}})],1)]):e._e()},ue=[];(0,i.n)(le,ce,ue,!1,null,"c66449c1").exports}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,e=[],s.O=(t,n,r,i)=>{if(!n){var o=1/0;for(u=0;u=i)&&Object.keys(s.O).every((e=>s.O[e](n[l])))?n.splice(l--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+"-"+e+".js?v="+{640:"c4d4943f2c00c1f8a515",5862:"142cd48ca8ec32e57725",7432:"bf453467840969b202ee",9279:"460048c8db22e016b900"}[e],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="nextcloud:",s.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(f);var i=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(r))),t)return t(r)},f=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),l&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=54,(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{s.b=document.baseURI||self.location.href;var e={54:0,640:0,6408:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var o=s.p+s.u(t),a=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,o=n[0],a=n[1],l=n[2],c=0;if(o.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(l)var u=l(s)}for(t&&t(n);cs(75673)));a=s.O(a)})(); //# sourceMappingURL=files-reference-files.js.map?v=24b891c979e71484c3fb