-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy path5781-5781.js
More file actions
2 lines (2 loc) · 209 KB
/
5781-5781.js
File metadata and controls
2 lines (2 loc) · 209 KB
1
2
(globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[]).push([[5781,9165],{5016(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".share-expiry-time[data-v-c9199db0]{display:inline-flex;align-items:center;justify-content:center}.share-expiry-time .hint-icon[data-v-c9199db0]{padding:0;margin:0;width:24px;height:24px}.hint-heading[data-v-c9199db0]{text-align:center;font-size:1rem;margin-top:8px;padding-bottom:8px;margin-bottom:0;border-bottom:1px solid var(--color-border)}.hint-body[data-v-c9199db0]{padding:var(--border-radius-element);max-width:300px}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/ShareExpiryTime.vue"],names:[],mappings:"AACA,oCACI,mBAAA,CACA,kBAAA,CACA,sBAAA,CAEA,+CACI,SAAA,CACA,QAAA,CACA,UAAA,CACA,WAAA,CAIR,+BACI,iBAAA,CACA,cAAA,CACA,cAAA,CACA,kBAAA,CACA,eAAA,CACA,2CAAA,CAGJ,4BACI,oCAAA,CACA,eAAA",sourcesContent:["\n.share-expiry-time {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n .hint-icon {\n padding: 0;\n margin: 0;\n width: 24px;\n height: 24px;\n }\n}\n\n.hint-heading {\n text-align: center;\n font-size: 1rem;\n margin-top: 8px;\n padding-bottom: 8px;\n margin-bottom: 0;\n border-bottom: 1px solid var(--color-border);\n}\n\n.hint-body {\n padding: var(--border-radius-element);\n max-width: 300px;\n}\n"],sourceRoot:""}]);const o=a},9165(e,t,r){"use strict";r.d(t,{$BT:()=>l,Brj:()=>d,DvY:()=>h,HzW:()=>A,IyB:()=>i,K5o:()=>n,NZC:()=>a,Tfj:()=>s,ZL5:()=>g,fEr:()=>c,hyP:()=>o,jUz:()=>f,kHm:()=>p,kOJ:()=>u});var i="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z",n="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",s="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",a="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",o="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",l="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",h="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z",c="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",u="M1,1V5H2V19H1V23H5V22H19V23H23V19H22V5H23V1H19V2H5V1M5,4H19V5H20V19H19V20H5V19H4V5H5M6,6V14H9V18H18V9H14V6M8,8H12V12H8M14,11H16V16H11V14H14",d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",p="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",f="M17,3A2,2 0 0,1 19,5V15A2,2 0 0,1 17,17H13V19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H7C5.89,17 5,16.1 5,15V5A2,2 0 0,1 7,3H17Z",g="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",A="M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z"},10322(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-469e5e80]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-469e5e80]{padding:8px;padding-inline-start:10px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0;min-width:0}.sharing-entry__summary__desc[data-v-469e5e80]{display:inline-block;padding-bottom:0;line-height:1.2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sharing-entry__summary__desc p[data-v-469e5e80],.sharing-entry__summary__desc small[data-v-469e5e80]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-469e5e80]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntry.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,yCACC,WAAA,CACA,yBAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,QAAA,CACA,WAAA,CAEA,+CACC,oBAAA,CACA,gBAAA,CACA,iBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CAEA,sGAEC,mCAAA,CAGD,sDACC,mCAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: flex-start;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\n\t\t&__desc {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding-bottom: 0;\n\t\t\tline-height: 1.2em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\tp,\n\t\t\tsmall {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&-unique {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"],sourceRoot:""}]);const o=a},12231(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-4ca4172c]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-4ca4172c]{padding:8px;padding-inline-start:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-4ca4172c]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-4ca4172c]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-4ca4172c]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry__actions[data-v-4ca4172c]{display:flex;align-items:center;margin-inline-start:auto}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-4ca4172c]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-4ca4172c] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-4ca4172c]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-4ca4172c]{width:44px;height:44px;margin:0;padding:14px;margin-inline-start:auto}.sharing-entry .action-item~.action-item[data-v-4ca4172c],.sharing-entry .action-item~.sharing-entry__loading[data-v-4ca4172c]{margin-inline-start:0}.sharing-entry__copy-icon--success[data-v-4ca4172c]{color:var(--color-border-success)}.qr-code-dialog[data-v-4ca4172c]{display:flex;width:100%;justify-content:center}.qr-code-dialog__img[data-v-4ca4172c]{width:100%;height:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryLink.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAEA,yCACC,WAAA,CACA,yBAAA,CACA,YAAA,CACA,6BAAA,CACA,QAAA,CACA,WAAA,CAGA,sCACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,wCACC,mCAAA,CAGD,6CACC,sBAAA,CACA,eAAA,CACA,kBAAA,CAIF,yCACC,YAAA,CACA,kBAAA,CACA,wBAAA,CAID,mGACC,wCAAA,CAIF,mDACC,6CAAA,CAGD,sEACC,2CAAA,CAGD,yCACC,UAAA,CACA,WAAA,CACA,QAAA,CACA,YAAA,CACA,wBAAA,CAOA,+HAEC,qBAAA,CAIF,oDACC,iCAAA,CAKF,iCACC,YAAA,CACA,UAAA,CACA,sBAAA,CAEA,sCACC,UAAA,CACA,WAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\t}\n\n\t\t&__desc {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tline-height: 1.2em;\n\n\t\t\tp {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&__title {\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\toverflow: hidden;\n\t\t\t\twhite-space: nowrap;\n\t\t\t}\n\t\t}\n\n\t\t&__actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tmargin-inline-start: auto;\n\t\t}\n\n\t&:not(.sharing-entry--share) &__actions {\n\t\t.new-share-link {\n\t\t\tborder-top: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t:deep(.avatar-link-share) {\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t.sharing-entry__action--public-upload {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&__loading {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tpadding: 14px;\n\t\tmargin-inline-start: auto;\n\t}\n\n\t// put menus to the left\n\t// but only the first one\n\t.action-item {\n\n\t\t~.action-item,\n\t\t~.sharing-entry__loading {\n\t\t\tmargin-inline-start: 0;\n\t\t}\n\t}\n\n\t&__copy-icon--success {\n\t\tcolor: var(--color-border-success);\n\t}\n}\n\n// styling for the qr-code container\n.qr-code-dialog {\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: center;\n\n\t&__img {\n\t\twidth: 100%;\n\t\theight: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=a},15340(){},17816(e){e.exports=function(){"use strict";function e(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(t,r){var i;i=function(){return function t(r,i,n){function s(o,l){if(!i[o]){if(!r[o]){if(!l&&e)return e();if(a)return a(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[o]={exports:{}};r[o][0].call(c.exports,function(e){return s(r[o][1][e]||e)},c,c.exports,t,r,i,n)}return i[o].exports}for(var a=e,o=0;o<n.length;o++)s(n[o]);return s}({1:[function(e,t,r){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(e,t,r){var i=e("./utils").getSymbolSize;r.getRowColCoords=function(e){if(1===e)return[];for(var t=Math.floor(e/7)+2,r=i(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),s=[r-7],a=1;a<t-1;a++)s[a]=s[a-1]-n;return s.push(6),s.reverse()},r.getPositions=function(e){for(var t=[],i=r.getRowColCoords(e),n=i.length,s=0;s<n;s++)for(var a=0;a<n;a++)0===s&&0===a||0===s&&a===n-1||s===n-1&&0===a||t.push([i[s],i[a]]);return t}},{"./utils":21}],3:[function(e,t,r){var i=e("./mode"),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(e){this.mode=i.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var r=45*n.indexOf(this.data[t]);r+=n.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},t.exports=s},{"./mode":14}],4:[function(e,t,r){function i(){this.buffer=[],this.length=0}i.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=i},{}],5:[function(e,t,r){var i=e("../utils/buffer");function n(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=i.alloc(e*e),this.reservedBit=i.alloc(e*e)}n.prototype.set=function(e,t,r,i){var n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n},{"../utils/buffer":28}],6:[function(e,t,r){var i=e("../utils/buffer"),n=e("./mode");function s(e){this.mode=n.BYTE,this.data=i.from(e)}s.getBitsLength=function(e){return 8*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){for(var t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},t.exports=s},{"../utils/buffer":28,"./mode":14}],7:[function(e,t,r){var i=e("./error-correction-level"),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function(e,t){switch(t){case i.L:return n[4*(e-1)+0];case i.M:return n[4*(e-1)+1];case i.Q:return n[4*(e-1)+2];case i.H:return n[4*(e-1)+3];default:return}},r.getTotalCodewordsCount=function(e,t){switch(t){case i.L:return s[4*(e-1)+0];case i.M:return s[4*(e-1)+1];case i.Q:return s[4*(e-1)+2];case i.H:return s[4*(e-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(e,t,r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},r.from=function(e,t){if(r.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return t}}},{}],9:[function(e,t,r){var i=e("./utils").getSymbolSize;r.getPositions=function(e){var t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},{"./utils":21}],10:[function(e,t,r){var i=e("./utils"),n=i.getBCHDigit(1335);r.getEncodedBits=function(e,t){for(var r=e.bit<<3|t,s=r<<10;i.getBCHDigit(s)-n>=0;)s^=1335<<i.getBCHDigit(s)-n;return 21522^(r<<10|s)}},{"./utils":21}],11:[function(e,t,r){var i=e("../utils/buffer"),n=i.alloc(512),s=i.alloc(256);!function(){for(var e=1,t=0;t<255;t++)n[t]=e,s[e]=t,256&(e<<=1)&&(e^=285);for(t=255;t<512;t++)n[t]=n[t-255]}(),r.log=function(e){if(e<1)throw new Error("log("+e+")");return s[e]},r.exp=function(e){return n[e]},r.mul=function(e,t){return 0===e||0===t?0:n[s[e]+s[t]]}},{"../utils/buffer":28}],12:[function(e,t,r){var i=e("./mode"),n=e("./utils");function s(e){this.mode=i.KANJI,this.data=e}s.getBitsLength=function(e){return 13*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){var t;for(t=0;t<this.data.length;t++){var r=n.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},t.exports=s},{"./mode":14,"./utils":21}],13:[function(e,t,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i=3,n=3,s=40,a=10;function o(e,t,i){switch(e){case r.Patterns.PATTERN000:return(t+i)%2==0;case r.Patterns.PATTERN001:return t%2==0;case r.Patterns.PATTERN010:return i%3==0;case r.Patterns.PATTERN011:return(t+i)%3==0;case r.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(i/3))%2==0;case r.Patterns.PATTERN101:return t*i%2+t*i%3==0;case r.Patterns.PATTERN110:return(t*i%2+t*i%3)%2==0;case r.Patterns.PATTERN111:return(t*i%3+(t+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}r.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},r.from=function(e){return r.isValid(e)?parseInt(e,10):void 0},r.getPenaltyN1=function(e){for(var t=e.size,r=0,n=0,s=0,a=null,o=null,l=0;l<t;l++){n=s=0,a=o=null;for(var h=0;h<t;h++){var c=e.get(l,h);c===a?n++:(n>=5&&(r+=i+(n-5)),a=c,n=1),(c=e.get(h,l))===o?s++:(s>=5&&(r+=i+(s-5)),o=c,s=1)}n>=5&&(r+=i+(n-5)),s>=5&&(r+=i+(s-5))}return r},r.getPenaltyN2=function(e){for(var t=e.size,r=0,i=0;i<t-1;i++)for(var s=0;s<t-1;s++){var a=e.get(i,s)+e.get(i,s+1)+e.get(i+1,s)+e.get(i+1,s+1);4!==a&&0!==a||r++}return r*n},r.getPenaltyN3=function(e){for(var t=e.size,r=0,i=0,n=0,a=0;a<t;a++){i=n=0;for(var o=0;o<t;o++)i=i<<1&2047|e.get(a,o),o>=10&&(1488===i||93===i)&&r++,n=n<<1&2047|e.get(o,a),o>=10&&(1488===n||93===n)&&r++}return r*s},r.getPenaltyN4=function(e){for(var t=0,r=e.data.length,i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*a},r.applyMask=function(e,t){for(var r=t.size,i=0;i<r;i++)for(var n=0;n<r;n++)t.isReserved(n,i)||t.xor(n,i,o(e,n,i))},r.getBestMask=function(e,t){for(var i=Object.keys(r.Patterns).length,n=0,s=1/0,a=0;a<i;a++){t(a),r.applyMask(a,e);var o=r.getPenaltyN1(e)+r.getPenaltyN2(e)+r.getPenaltyN3(e)+r.getPenaltyN4(e);r.applyMask(a,e),o<s&&(s=o,n=a)}return n}},{}],14:[function(e,t,r){var i=e("./version-check"),n=e("./regex");r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!i.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return n.testNumeric(e)?r.NUMERIC:n.testAlphanumeric(e)?r.ALPHANUMERIC:n.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits},r.from=function(e,t){if(r.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return t}}},{"./regex":19,"./version-check":22}],15:[function(e,t,r){var i=e("./mode");function n(e){this.mode=i.NUMERIC,this.data=e.toString()}n.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);var n=this.data.length-t;n>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,3*n+1))},t.exports=n},{"./mode":14}],16:[function(e,t,r){var i=e("../utils/buffer"),n=e("./galois-field");r.mul=function(e,t){for(var r=i.alloc(e.length+t.length-1),s=0;s<e.length;s++)for(var a=0;a<t.length;a++)r[s+a]^=n.mul(e[s],t[a]);return r},r.mod=function(e,t){for(var r=i.from(e);r.length-t.length>=0;){for(var s=r[0],a=0;a<t.length;a++)r[a]^=n.mul(t[a],s);for(var o=0;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},r.generateECPolynomial=function(e){for(var t=i.from([1]),s=0;s<e;s++)t=r.mul(t,[1,n.exp(s)]);return t}},{"../utils/buffer":28,"./galois-field":11}],17:[function(e,t,r){var i=e("../utils/buffer"),n=e("./utils"),s=e("./error-correction-level"),a=e("./bit-buffer"),o=e("./bit-matrix"),l=e("./alignment-pattern"),h=e("./finder-pattern"),c=e("./mask-pattern"),u=e("./error-correction-code"),d=e("./reed-solomon-encoder"),p=e("./version"),f=e("./format-info"),g=e("./mode"),A=e("./segments"),m=e("isarray");function y(e,t,r){var i,n,s=e.size,a=f.getEncodedBits(t,r);for(i=0;i<15;i++)n=1==(a>>i&1),i<6?e.set(i,8,n,!0):i<8?e.set(i+1,8,n,!0):e.set(s-15+i,8,n,!0),i<8?e.set(8,s-i-1,n,!0):i<9?e.set(8,15-i-1+1,n,!0):e.set(8,15-i-1,n,!0);e.set(s-8,8,1,!0)}function v(e,t,r){var s=new a;r.forEach(function(t){s.put(t.mode.bit,4),s.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(s)});var o=8*(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(s.getLengthInBits()+4<=o&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(0);for(var l=(o-s.getLengthInBits())/8,h=0;h<l;h++)s.put(h%2?17:236,8);return function(e,t,r){for(var s=n.getSymbolTotalCodewords(t),a=s-u.getTotalCodewordsCount(t,r),o=u.getBlocksCount(t,r),l=o-s%o,h=Math.floor(s/o),c=Math.floor(a/o),p=c+1,f=h-c,g=new d(f),A=0,m=new Array(o),y=new Array(o),v=0,w=i.from(e.buffer),_=0;_<o;_++){var C=_<l?c:p;m[_]=w.slice(A,A+C),y[_]=g.encode(m[_]),A+=C,v=Math.max(v,C)}var b,E,S=i.alloc(s),x=0;for(b=0;b<v;b++)for(E=0;E<o;E++)b<m[E].length&&(S[x++]=m[E][b]);for(b=0;b<f;b++)for(E=0;E<o;E++)S[x++]=y[E][b];return S}(s,e,t)}function w(e,t,r,i){var s;if(m(e))s=A.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");var a=t;if(!a){var u=A.rawSplit(e);a=p.getBestVersionForData(u,r)}s=A.fromString(e,a||40)}var d=p.getBestVersionForData(s,r);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<d)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+d+".\n")}else t=d;var f=v(t,r,s),g=n.getSymbolSize(t),w=new o(g);return function(e,t){for(var r=e.size,i=h.getPositions(t),n=0;n<i.length;n++)for(var s=i[n][0],a=i[n][1],o=-1;o<=7;o++)if(!(s+o<=-1||r<=s+o))for(var l=-1;l<=7;l++)a+l<=-1||r<=a+l||(o>=0&&o<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===o||6===o)||o>=2&&o<=4&&l>=2&&l<=4?e.set(s+o,a+l,!0,!0):e.set(s+o,a+l,!1,!0))}(w,t),function(e){for(var t=e.size,r=8;r<t-8;r++){var i=r%2==0;e.set(r,6,i,!0),e.set(6,r,i,!0)}}(w),function(e,t){for(var r=l.getPositions(t),i=0;i<r.length;i++)for(var n=r[i][0],s=r[i][1],a=-2;a<=2;a++)for(var o=-2;o<=2;o++)-2===a||2===a||-2===o||2===o||0===a&&0===o?e.set(n+a,s+o,!0,!0):e.set(n+a,s+o,!1,!0)}(w,t),y(w,r,0),t>=7&&function(e,t){for(var r,i,n,s=e.size,a=p.getEncodedBits(t),o=0;o<18;o++)r=Math.floor(o/3),i=o%3+s-8-3,n=1==(a>>o&1),e.set(r,i,n,!0),e.set(i,r,n,!0)}(w,t),function(e,t){for(var r=e.size,i=-1,n=r-1,s=7,a=0,o=r-1;o>0;o-=2)for(6===o&&o--;;){for(var l=0;l<2;l++)if(!e.isReserved(n,o-l)){var h=!1;a<t.length&&(h=1==(t[a]>>>s&1)),e.set(n,o-l,h),-1===--s&&(a++,s=7)}if((n+=i)<0||r<=n){n-=i,i=-i;break}}}(w,f),isNaN(i)&&(i=c.getBestMask(w,y.bind(null,w,r))),c.applyMask(i,w),y(w,r,i),{modules:w,version:t,errorCorrectionLevel:r,maskPattern:i,segments:s}}r.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");var r,i,a=s.M;return void 0!==t&&(a=s.from(t.errorCorrectionLevel,s.M),r=p.from(t.version),i=c.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),w(e,r,a,i)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(e,t,r){var i=e("../utils/buffer"),n=e("./polynomial"),s=e("buffer").Buffer;function a(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},a.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=i.alloc(this.degree),r=s.concat([e,t],e.length+this.degree),a=n.mod(r,this.genPoly),o=this.degree-a.length;if(o>0){var l=i.alloc(this.degree);return a.copy(l,o),l}return a},t.exports=a},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(e,t,r){var i="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",s="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(n,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(s,"g"),r.NUMERIC=new RegExp(i,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+n+"$"),o=new RegExp("^"+i+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(e){return a.test(e)},r.testNumeric=function(e){return o.test(e)},r.testAlphanumeric=function(e){return l.test(e)}},{}],20:[function(e,t,r){var i=e("./mode"),n=e("./numeric-data"),s=e("./alphanumeric-data"),a=e("./byte-data"),o=e("./kanji-data"),l=e("./regex"),h=e("./utils"),c=e("dijkstrajs");function u(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){for(var i,n=[];null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function p(e){var t,r,n=d(l.NUMERIC,i.NUMERIC,e),s=d(l.ALPHANUMERIC,i.ALPHANUMERIC,e);return h.isKanjiModeEnabled()?(t=d(l.BYTE,i.BYTE,e),r=d(l.KANJI,i.KANJI,e)):(t=d(l.BYTE_KANJI,i.BYTE,e),r=[]),n.concat(s,t,r).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case i.NUMERIC:return n.getBitsLength(e);case i.ALPHANUMERIC:return s.getBitsLength(e);case i.KANJI:return o.getBitsLength(e);case i.BYTE:return a.getBitsLength(e)}}function g(e,t){var r,l=i.getBestModeForData(e);if((r=i.from(t,l))!==i.BYTE&&r.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+i.toString(r)+".\n Suggested mode is: "+i.toString(l));switch(r!==i.KANJI||h.isKanjiModeEnabled()||(r=i.BYTE),r){case i.NUMERIC:return new n(e);case i.ALPHANUMERIC:return new s(e);case i.KANJI:return new o(e);case i.BYTE:return new a(e)}}r.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},r.fromString=function(e,t){for(var n=function(e,t){for(var r={},n={start:{}},s=["start"],a=0;a<e.length;a++){for(var o=e[a],l=[],h=0;h<o.length;h++){var c=o[h],u=""+a+h;l.push(u),r[u]={node:c,lastCount:0},n[u]={};for(var d=0;d<s.length;d++){var p=s[d];r[p]&&r[p].node.mode===c.mode?(n[p][u]=f(r[p].lastCount+c.length,c.mode)-f(r[p].lastCount,c.mode),r[p].lastCount+=c.length):(r[p]&&(r[p].lastCount=c.length),n[p][u]=f(c.length,c.mode)+4+i.getCharCountIndicator(c.mode,t))}}s=l}for(d=0;d<s.length;d++)n[s[d]].end=0;return{map:n,table:r}}(function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];switch(n.mode){case i.NUMERIC:t.push([n,{data:n.data,mode:i.ALPHANUMERIC,length:n.length},{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.ALPHANUMERIC:t.push([n,{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.KANJI:t.push([n,{data:n.data,mode:i.BYTE,length:u(n.data)}]);break;case i.BYTE:t.push([{data:n.data,mode:i.BYTE,length:u(n.data)}])}}return t}(p(e,h.isKanjiModeEnabled())),t),s=c.find_path(n.map,"start","end"),a=[],o=1;o<s.length-1;o++)a.push(n.table[s[o]].node);return r.fromArray(a.reduce(function(e,t){var r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[]))},r.rawSplit=function(e){return r.fromArray(p(e,h.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(e,t,r){var i,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},r.getSymbolTotalCodewords=function(e){return n[e]},r.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},r.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');i=e},r.isKanjiModeEnabled=function(){return void 0!==i},r.toSJIS=function(e){return i(e)}},{}],22:[function(e,t,r){r.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},{}],23:[function(e,t,r){var i=e("./utils"),n=e("./error-correction-code"),s=e("./error-correction-level"),a=e("./mode"),o=e("./version-check"),l=e("isarray"),h=i.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var r=0;return e.forEach(function(e){var i=c(e.mode,t);r+=i+e.getBitsLength()}),r}r.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},r.getCapacity=function(e,t,r){if(!o.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);var s=8*(i.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t));if(r===a.MIXED)return s;var l=s-c(r,e);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},r.getBestVersionForData=function(e,t){var i,n=s.from(t,s.M);if(l(e)){if(e.length>1)return function(e,t){for(var i=1;i<=40;i++)if(u(e,i)<=r.getCapacity(i,t,a.MIXED))return i}(e,n);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,t,i){for(var n=1;n<=40;n++)if(t<=r.getCapacity(n,i,e))return n}(i.mode,i.getLength(),n)},r.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var t=e<<12;i.getBCHDigit(t)-h>=0;)t^=7973<<i.getBCHDigit(t)-h;return e<<12|t}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:33}],24:[function(e,t,r){var i=e("./can-promise"),n=e("./core/qrcode"),s=e("./renderer/canvas"),a=e("./renderer/svg-tag.js");function o(e,t,r,s,a){var o=[].slice.call(arguments,1),l=o.length,h="function"==typeof o[l-1];if(!h&&!i())throw new Error("Callback required as last argument");if(!h){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=t,t=s=void 0):2!==l||t.getContext||(s=r,r=t,t=void 0),new Promise(function(i,a){try{var o=n.create(r,s);i(e(o,t,s))}catch(e){a(e)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(a=r,r=t,t=s=void 0):3===l&&(t.getContext&&void 0===a?(a=s,s=void 0):(a=s,s=r,r=t,t=void 0));try{var c=n.create(r,s);a(null,e(c,t,s))}catch(e){a(e)}}r.create=n.create,r.toCanvas=o.bind(null,s.render),r.toDataURL=o.bind(null,s.renderToDataURL),r.toString=o.bind(null,function(e,t,r){return a.render(e,r)})},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(e,t,r){var i=e("./utils");r.render=function(e,t,r){var n=r,s=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=i.getOptions(n);var a=i.getImageWidth(e.modules.size,n),o=s.getContext("2d"),l=o.createImageData(a,a);return i.qrToImageData(l.data,e,n),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(o,s,a),o.putImageData(l,0,0),s},r.renderToDataURL=function(e,t,i){var n=i;void 0!==n||t&&t.getContext||(n=t,t=void 0),n||(n={});var s=r.render(e,t,n),a=n.type||"image/png",o=n.rendererOpts||{};return s.toDataURL(a,o.quality)}},{"./utils":27}],26:[function(e,t,r){var i=e("./utils");function n(e,t){var r=e.a/255,i=t+'="'+e.hex+'"';return r<1?i+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function s(e,t,r){var i=e+t;return void 0!==r&&(i+=" "+r),i}r.render=function(e,t,r){var a=i.getOptions(t),o=e.modules.size,l=e.modules.data,h=o+2*a.margin,c=a.color.light.a?"<path "+n(a.color.light,"fill")+' d="M0 0h'+h+"v"+h+'H0z"/>':"",u="<path "+n(a.color.dark,"stroke")+' d="'+function(e,t,r){for(var i="",n=0,a=!1,o=0,l=0;l<e.length;l++){var h=Math.floor(l%t),c=Math.floor(l/t);h||a||(a=!0),e[l]?(o++,l>0&&h>0&&e[l-1]||(i+=a?s("M",h+r,.5+c+r):s("m",n,0),n=0,a=!1),h+1<t&&e[l+1]||(i+=s("h",o),o=0)):n++}return i}(l,o,a.margin)+'"/>',d='viewBox="0 0 '+h+" "+h+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof r&&r(null,p),p}},{"./utils":27}],27:[function(e,t,r){function i(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");var r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}r.getOptions=function(e){e||(e={}),e.color||(e.color={});var t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:r,scale:r?4:n,margin:t,color:{dark:i(e.color.dark||"#000000ff"),light:i(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},r.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},r.getImageWidth=function(e,t){var i=r.getScale(e,t);return Math.floor((e+2*t.margin)*i)},r.qrToImageData=function(e,t,i){for(var n=t.modules.size,s=t.modules.data,a=r.getScale(n,i),o=Math.floor((n+2*i.margin)*a),l=i.margin*a,h=[i.color.light,i.color.dark],c=0;c<o;c++)for(var u=0;u<o;u++){var d=4*(c*o+u),p=i.color.light;c>=l&&u>=l&&c<o-l&&u<o-l&&(p=h[s[Math.floor((c-l)/a)*n+Math.floor((u-l)/a)]?1:0]),e[d++]=p.r,e[d++]=p.g,e[d++]=p.b,e[d]=p.a}}},{}],28:[function(e,t,r){var i=e("isarray");s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}();var n=s.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function s(e,t,r){return s.TYPED_ARRAY_SUPPORT||this instanceof s?"number"==typeof e?l(this,e):function(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i),s.TYPED_ARRAY_SUPPORT?n.__proto__=s.prototype:n=h(e,n),n}(e,t,r,i):"string"==typeof t?function(e,t){var r=0|u(t),i=o(e,r),n=i.write(t);return n!==r&&(i=i.slice(0,n)),i}(e,t):function(e,t){if(s.isBuffer(t)){var r=0|a(t.length),i=o(e,r);return 0===i.length||t.copy(i,0,0,r),i}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?o(e,0):h(e,t);if("Buffer"===t.type&&Array.isArray(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}(this,e,t,r):new s(e,t,r)}function a(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function o(e,t){var r;return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t)).__proto__=s.prototype:(null===(r=e)&&(r=new s(t)),r.length=t),r}function l(e,t){var r=o(e,t<0?0:0|a(t));if(!s.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)r[i]=0;return r}function h(e,t){for(var r=t.length<0?0:0|a(t.length),i=o(e,r),n=0;n<r;n+=1)i[n]=255&t[n];return i}function c(e,t){var r;t=t||1/0;for(var i=e.length,n=null,s=[],a=0;a<i;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function u(e){return s.isBuffer(e)?e.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!=typeof e&&(e=""+e),0===e.length?0:c(e).length)}s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),s.prototype.write=function(e,t,r){void 0===t||void 0===r&&"string"==typeof t?(r=this.length,t=0):isFinite(t)&&(t|=0,isFinite(r)?r|=0:r=void 0);var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,r,i){return function(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}(c(t,e.length-r),e,r,i)}(this,e,t,r)},s.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=s.prototype;else{var n=t-e;r=new s(n,void 0);for(var a=0;a<n;++a)r[a]=this[a+e]}return r},s.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n,a=i-r;if(this===e&&r<t&&t<i)for(n=a-1;n>=0;--n)e[n+t]=this[n+r];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},s.prototype.fill=function(e,t,r){if("string"==typeof e){if("string"==typeof t?(t=0,r=this.length):"string"==typeof r&&(r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{var a=s.isBuffer(e)?e:new s(e),o=a.length;for(n=0;n<r-t;++n)this[n+t]=a[n%o]}return this},s.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o(null,0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l(null,t),a=0;for(r=0;r<e.length;++r){var h=e[r];if(!s.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(n,a),a+=h.length}return n},s.byteLength=u,s.prototype._isBuffer=!0,s.isBuffer=function(e){return!(null==e||!e._isBuffer)},t.exports.alloc=function(e){var t=new s(e);return t.fill(0),t},t.exports.from=function(e){return new s(e)}},{isarray:33}],29:[function(e,t,r){r.byteLength=function(e){var t=l(e),r=t[0],i=t[1];return 3*(r+i)/4-i},r.toByteArray=function(e){var t,r,i=l(e),a=i[0],o=i[1],h=new s(function(e,t,r){return 3*(t+r)/4-r}(0,a,o)),c=0,u=o>0?a-4:a;for(r=0;r<u;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],h[c++]=t>>16&255,h[c++]=t>>8&255,h[c++]=255&t;return 2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,h[c++]=255&t),1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,h[c++]=t>>8&255,h[c++]=255&t),h},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,s=[],a=16383,o=0,l=r-n;o<l;o+=a)s.push(c(e,o,o+a>l?l:o+a));return 1===n?(t=e[r-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),s.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=a[o],n[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function h(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function c(e,t,r){for(var i,n=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),n.push(h(i));return n.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],30:[function(e,t,r){var i=e("base64-js"),n=e("ieee754"),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=l,r.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return h(e,t,r)}function h(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|f(e,t),i=o(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,l.prototype),i}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,r);var n=function(e){if(l.isBuffer(e)){var t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||H(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),r=o(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return i?-1:V(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function A(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function m(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,i,n){var s,a=1,o=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,r/=2}function h(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var c=-1;for(s=r;s<o;s++)if(h(e,s)===h(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*a}else-1!==c&&(s-=s-c),c=-1}else for(r+l>o&&(r=o-l),s=r;s>=0;s--){for(var u=!0,d=0;d<l;d++)if(h(e,s+d)!==h(t,d)){u=!1;break}if(u)return s}return-1}function v(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var s=t.length;i>s/2&&(i=s/2);for(var a=0;a<i;++a){var o=parseInt(t.substr(2*a,2),16);if(H(o))return a;e[r+a]=o}return a}function w(e,t,r,i){return $(V(t,e.length-r),e,r,i)}function _(e,t,r,i){return $(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function C(e,t,r,i){return _(e,t,r,i)}function b(e,t,r,i){return $(U(t),e,r,i)}function E(e,t,r,i){return $(function(e,t){for(var r,i,n,s=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(r=e.charCodeAt(a))>>8,n=r%256,s.push(n),s.push(i);return s}(t,e.length-r),e,r,i)}function S(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var s,a,o,l,h=e[n],c=null,u=h>239?4:h>223?3:h>191?2:1;if(n+u<=r)switch(u){case 1:h<128&&(c=h);break;case 2:128==(192&(s=e[n+1]))&&(l=(31&h)<<6|63&s)>127&&(c=l);break;case 3:s=e[n+1],a=e[n+2],128==(192&s)&&128==(192&a)&&(l=(15&h)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[n+1],a=e[n+2],o=e[n+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&h)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(c=l)}null===c?(c=65533,u=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=u}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var r="",i=0;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=I));return r}(i)}r.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=function(e,t,r){return h(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,s=Math.min(r,i);n<s;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=l.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var s=e[r];if(F(s,Uint8Array)&&(s=l.from(s)),!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,n),n+=s.length}return i},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)A(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)A(this,t,t+3),A(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)A(this,t,t+7),A(this,t+1,t+6),A(this,t+2,t+5),A(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,r,i,n){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),o=Math.min(s,a),h=this.slice(i,n),c=e.slice(t,r),u=0;u<o;++u)if(h[u]!==c[u]){s=h[u],a=c[u];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},l.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return C(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function T(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function D(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",s=t;s<r;++s)n+=q[e[s]];return n}function P(e,t,r){for(var i=e.slice(t,r),n="",s=0;s<i.length;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}function N(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,i,n,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function R(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,i,s){return t=+t,r>>>=0,s||R(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function O(e,t,r,i,s){return t=+t,r>>>=0,s||R(e,0,r,8),n.write(e,t,r,i,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var i=this.subarray(e,t);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var i=this[e],n=1,s=0;++s<t&&(n*=256);)i+=this[e+s]*n;return i},l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},l.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var i=this[e],n=1,s=0;++s<t&&(n*=256);)i+=this[e+s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var i=t,n=1,s=this[e+--i];i>0&&(n*=256);)s+=this[e+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||L(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[t]=255&e;++s<r&&(n*=256);)this[t+s]=e/n&255;return t+r},l.prototype.writeUIntBE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||L(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[t+n]=255&e;--n>=0&&(s*=256);)this[t+n]=e/s&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},l.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,i){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n=i-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,i);else if(this===e&&r<t&&t<i)for(var s=n-1;s>=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,i),t);return n},l.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var n=e.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(e=n)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=l.isBuffer(e)?e:l.from(e,i),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%o]}return this};var M=/[^+/0-9A-Za-z-_]/g;function V(e,t){var r;t=t||1/0;for(var i=e.length,n=null,s=[],a=0;a<i;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function U(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)t[i+n]=e[r]+e[n];return t}()},{"base64-js":29,ieee754:32}],31:[function(e,t,r){var i={single_source_shortest_paths:function(e,t,r){var n={},s={};s[t]=0;var a,o,l,h,c,u,d,p=i.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(l in o=(a=p.pop()).value,h=a.cost,c=e[o]||{})c.hasOwnProperty(l)&&(u=h+c[l],d=s[l],(void 0===s[l]||d>u)&&(s[l]=u,p.push(l,u),n[l]=o));if(void 0!==r&&void 0===s[r]){var f=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,t,r){var n=i.single_source_shortest_paths(e,t,r);return i.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t,r=i.PriorityQueue,n={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(n[t]=r[t]);return n.queue=[],n.sorter=e.sorter||r.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==t&&(t.exports=i)},{}],32:[function(e,t,r){r.read=function(e,t,r,i,n){var s,a,o=8*n-i-1,l=(1<<o)-1,h=l>>1,c=-7,u=r?n-1:0,d=r?-1:1,p=e[t+u];for(u+=d,s=p&(1<<-c)-1,p>>=-c,c+=o;c>0;s=256*s+e[t+u],u+=d,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=i;c>0;a=256*a+e[t+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),s-=h}return(p?-1:1)*a*Math.pow(2,s-i)},r.write=function(e,t,r,i,n,s){var a,o,l,h=8*s-n-1,c=(1<<h)-1,u=c>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=c?(o=0,a=c):a+u>=1?(o=(t*l-1)*Math.pow(2,n),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;e[r+p]=255&o,p+=f,o/=256,n-=8);for(a=a<<n|o,h+=n;h>0;e[r+p]=255&a,p+=f,a/=256,h-=8);e[r+p-f]|=128*g}},{}],33:[function(e,t,r){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}]},{},[24])(24)},t.exports=i()});return{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(e){return e(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var e=this,r=this.options,i=this.tag,n=String(this.value);"canvas"===i?t.toCanvas(this.$el,n,r,function(e){if(e)throw e}):"img"===i?t.toDataURL(n,r,function(t,r){if(t)throw t;e.$el.src=r}):t.toString(n,r,function(t,r){if(t)throw t;e.$el.innerHTML=r})}},mounted:function(){this.generate()}}}()},18999(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-13d4a0bb]{display:flex;align-items:center;min-height:44px}.sharing-entry__desc[data-v-13d4a0bb]{padding:8px;padding-inline-start:10px;line-height:1.2em;position:relative;flex:1 1;min-width:0}.sharing-entry__desc p[data-v-13d4a0bb]{color:var(--color-text-maxcontrast)}.sharing-entry__title[data-v-13d4a0bb]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:inherit}.sharing-entry__actions[data-v-13d4a0bb]{margin-inline-start:auto !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntrySimple.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,sCACC,WAAA,CACA,yBAAA,CACA,iBAAA,CACA,iBAAA,CACA,QAAA,CACA,WAAA,CACA,wCACC,mCAAA,CAGF,uCACC,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,iBAAA,CAED,yCACC,mCAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\t&__desc {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tline-height: 1.2em;\n\t\tposition: relative;\n\t\tflex: 1 1;\n\t\tmin-width: 0;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__title {\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t\tmax-width: inherit;\n\t}\n\t&__actions {\n\t\tmargin-inline-start: auto !important;\n\t}\n}\n"],sourceRoot:""}]);const o=a},25224(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,"\n.sharing-tab-external-section-legacy[data-v-240645c6] {\n\twidth: 100%;\n}\n","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SidebarTabExternal/SidebarTabExternalSectionLegacy.vue"],names:[],mappings:";AAiCA;CACA,WAAA;AACA",sourcesContent:['\x3c!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n<template>\n\t<div class="sharing-tab-external-section-legacy">\n\t\t<component :is="component" :file-info="fileInfo" />\n\t</div>\n</template>\n\n<script lang="ts" setup>\nimport {\n\ttype Component, type PropType,\n\n\tcomputed,\n} from \'vue\'\n\nconst props = defineProps({\n\tfileInfo: {\n\t\ttype: Object,\n\t\trequired: true,\n\t},\n\tsectionCallback: {\n\t\ttype: Function as PropType<(el: HTMLElement | undefined, fileInfo: unknown) => Component>,\n\t\trequired: true,\n\t},\n})\n\nconst component = computed(() => props.sectionCallback(undefined, props.fileInfo))\n<\/script>\n\n<style scoped>\n.sharing-tab-external-section-legacy {\n\twidth: 100%;\n}\n</style>\n'],sourceRoot:""}]);const o=a},25236(e,r,i){"use strict";i.r(r),i.d(r,{default:()=>Xr});var n,s,a,o,l=i(21777),h=i(19051),c=i(87485),u=i(44013),d=i(380),p=i(53334),f=i(65606);function g(){if(s)return n;s=1;const e="object"==typeof f&&f.env&&f.env.NODE_DEBUG&&/\bsemver\b/i.test(f.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return n=e}function A(){if(o)return a;o=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return a={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var m,y,v,w,_,C,b,E,S,x,I,k,T,D={exports:{}};function P(){if(b)return C;b=1;const e=g(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=A(),{safeRe:i,t:n}=(m||(m=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=A(),s=g(),a=(t=e.exports={}).re=[],o=t.safeRe=[],l=t.src=[],h=t.safeSrc=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",n],[d,i]],f=(e,t,r)=>{const i=(e=>{for(const[t,r]of p)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=u++;s(e,n,t),c[e]=n,l[n]=t,h[n]=i,a[n]=new RegExp(t,r?"g":void 0),o[n]=new RegExp(i,r?"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.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),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,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),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*$")}(D,D.exports)),D.exports),s=function(){if(v)return y;v=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return y=r=>r?"object"!=typeof r?e:r:t,y}(),{compareIdentifiers:a}=function(){if(_)return w;_=1;const e=/^[0-9]+$/,t=(t,r)=>{if("number"==typeof t&&"number"==typeof r)return t===r?0:t<r?-1:1;const i=e.test(t),n=e.test(r);return i&&n&&(t=+t,r=+r),t===r?0:i&&!n?-1:n&&!i?1:t<r?-1:1};return w={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}();class o{constructor(a,l){if(l=s(l),a instanceof o){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const h=a.trim().match(l.loose?i[n.LOOSE]:i[n.FULL]);if(!h)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");h[4]?this.prerelease=h[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<r)return t}return e}):this.prerelease=[],this.build=h[5]?h[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof o)){if("string"==typeof t&&t===this.version)return 0;t=new o(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof o||(e=new o(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof o||(t=new o(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const i=this.prerelease[r],n=t.prerelease[r];if(e("prerelease compare",r,i,n),void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return a(i,n)}while(++r)}compareBuild(t){t instanceof o||(t=new o(t,this.options));let r=0;do{const i=this.build[r],n=t.build[r];if(e("build compare",r,i,n),void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return a(i,n)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[n.PRERELEASELOOSE]:i[n.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return C=o}function N(e){return e instanceof Date?e.toISOString():String(e)}!function(){if(S)return E;S=1;const e=P();E=(t,r)=>new e(t,r).major}(),function(){if(T)return k;T=1;const e=function(){if(I)return x;I=1;const e=P();return x=(t,r,i=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(e){if(!i)return null;throw e}},x}();k=(t,r)=>{const i=e(t,r);return i?i.version:null}}(),d.m,Error;var L=i(81222),R=i(51651),B=i(63814),O=i(40715),M=i(41944),V=i(74095),U=i(34811),$=i(60451),F=i(41423),H=i(85168),q=i(57505),z=i(54373);const j={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var W=i(14486);const G=(0,W.A)(j,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon content-copy-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:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var Y=i(24764);const Q={name:"SharingEntrySimple",components:{NcActions:Y.A},props:{title:{type:String,required:!0},subtitle:{type:String,default:""},isUnique:{type:Boolean,default:!0},ariaExpanded:{type:Boolean,default:null}},computed:{ariaExpandedValue(){return null===this.ariaExpanded?this.ariaExpanded:this.ariaExpanded?"true":"false"}}};var X=i(85072),Z=i.n(X),J=i(97825),K=i.n(J),ee=i(77659),te=i.n(ee),re=i(55056),ie=i.n(re),ne=i(10540),se=i.n(ne),ae=i(41113),oe=i.n(ae),le=i(18999),he={};he.styleTagTransform=oe(),he.setAttributes=ie(),he.insert=te().bind(null,"head"),he.domAPI=K(),he.insertStyleElement=se(),Z()(le.A,he),le.A&&le.A.locals&&le.A.locals;const ce=(0,W.A)(Q,function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry"},[e._t("avatar"),e._v(" "),t("div",{staticClass:"sharing-entry__desc"},[t("span",{staticClass:"sharing-entry__title"},[e._v(e._s(e.title))]),e._v(" "),e.subtitle?t("p",[e._v("\n\t\t\t"+e._s(e.subtitle)+"\n\t\t")]):e._e()]),e._v(" "),e.$slots.default?t("NcActions",{ref:"actionsComponent",staticClass:"sharing-entry__actions",attrs:{"menu-align":"right","aria-expanded":e.ariaExpandedValue}},[e._t("default")],2):e._e()],2)},[],!1,null,"13d4a0bb",null).exports;var ue=i(62746);function de(e){const t=(0,B.$_)(),{globalscale:r}=(0,c.F)();return r?.token?(0,B.Jv)("/gf/{token}/{fileid}",{token:r.token,fileid:e},{baseURL:t}):(0,B.Jv)("/f/{fileid}",{fileid:e},{baseURL:t})}const pe={name:"SharingEntryInternal",components:{NcActionButton:q.A,SharingEntrySimple:ce,CheckIcon:z.A,ClipboardIcon:G},props:{fileInfo:{type:Object,required:!0}},data:()=>({copied:!1,copySuccess:!1}),computed:{internalLink(){return de(this.fileInfo.id)},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing","Copy internal link")},internalLinkSubtitle:()=>t("files_sharing","For people who already have access")},methods:{async copyLink(){try{await navigator.clipboard.writeText(this.internalLink),(0,H.Te)(t("files_sharing","Link copied")),this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(e){this.copySuccess=!1,this.copied=!0,ue.A.error(e)}finally{setTimeout(()=>{this.copySuccess=!1,this.copied=!1},4e3)}}}};var fe=i(84388),ge={};ge.styleTagTransform=oe(),ge.setAttributes=ie(),ge.insert=te().bind(null,"head"),ge.domAPI=K(),ge.insertStyleElement=se(),Z()(fe.A,ge),fe.A&&fe.A.locals&&fe.A.locals;const Ae=(0,W.A)(pe,function(){var e=this,t=e._self._c;return t("ul",[t("SharingEntrySimple",{ref:"shareEntrySimple",staticClass:"sharing-entry__internal",attrs:{title:e.t("files_sharing","Internal link"),subtitle:e.internalLinkSubtitle},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("div",{staticClass:"avatar-external icon-external-white"})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{title:e.copyLinkTooltip,"aria-label":e.copyLinkTooltip},on:{click:e.copyLink},scopedSlots:e._u([{key:"icon",fn:function(){return[e.copied&&e.copySuccess?t("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):t("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}])})],1)],1)},[],!1,null,"6c4cb23b",null).exports;var me=i(46855),ye=i(67607);const ve=1,we=2,_e=4,Ce=8,be=16,Ee={READ_ONLY:ve,UPLOAD_AND_UPDATE:12|(ve|we),FILE_DROP:4,ALL:4|we|ve|8|be,ALL_FILE:we|ve|be};var Se=i(32505),xe=i(44719);const Ie=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],ke={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function Te(){return(0,Se.f)()?`/files/${(0,Se.G)()}`:`/files/${(0,l.HW)()?.uid}`}const De=Te(),Pe=function(){const e=(0,B.dC)("dav");return(0,Se.f)()?e.replace("remote.php","public.php"):e}();class Ne{constructor(e){if(function(e,t,r){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"_share",void 0),e.ocs&&e.ocs.data&&e.ocs.data[0]&&(e=e.ocs.data[0]),"string"==typeof e.id&&(e.id=Number.parseInt(e.id)),e.hide_download=!!e.hide_download,e.mail_send=!!e.mail_send,e.attributes&&"string"==typeof e.attributes)try{e.attributes=JSON.parse(e.attributes)}catch{ue.A.warn("Could not parse share attributes returned by server",e.attributes)}e.attributes=e.attributes??[],this._share=e}get state(){return this._share}get id(){return this._share.id}get type(){return this._share.share_type}get permissions(){return this._share.permissions}get attributes(){return this._share.attributes||[]}set permissions(e){this._share.permissions=e}get owner(){return this._share.uid_owner}get ownerDisplayName(){return this._share.displayname_owner}get shareWith(){return this._share.share_with}get shareWithDisplayName(){return this._share.share_with_displayname||this._share.share_with}get shareWithDisplayNameUnique(){return this._share.share_with_displayname_unique||this._share.share_with}get shareWithLink(){return this._share.share_with_link}get shareWithAvatar(){return this._share.share_with_avatar}get uidFileOwner(){return this._share.uid_file_owner}get displaynameFileOwner(){return this._share.displayname_file_owner||this._share.uid_file_owner}get createdTime(){return this._share.stime}get expireDate(){return this._share.expiration}set expireDate(e){this._share.expiration=e}get token(){return this._share.token}set token(e){this._share.token=e}get note(){return this._share.note}set note(e){this._share.note=e}get label(){return this._share.label??""}set label(e){this._share.label=e}get mailSend(){return!0===this._share.mail_send}get hideDownload(){return!0===this._share.hide_download||void 0!==this.attributes.find?.(({scope:e,key:t,value:r})=>"permissions"===e&&"download"===t&&!r)}set hideDownload(e){if(!e){const e=this.attributes.find(({key:e,scope:t})=>"download"===e&&"permissions"===t);e&&(e.value=!0)}this._share.hide_download=!0===e}get password(){return this._share.password}set password(e){this._share.password=e}get passwordExpirationTime(){return this._share.password_expiration_time}set passwordExpirationTime(e){this._share.password_expiration_time=e}get sendPasswordByTalk(){return this._share.send_password_by_talk}set sendPasswordByTalk(e){this._share.send_password_by_talk=e}get path(){return this._share.path}get itemType(){return this._share.item_type}get mimetype(){return this._share.mimetype}get fileSource(){return this._share.file_source}get fileTarget(){return this._share.file_target}get fileParent(){return this._share.file_parent}get hasReadPermission(){return!!(this.permissions&window.OC.PERMISSION_READ)}get hasCreatePermission(){return!!(this.permissions&window.OC.PERMISSION_CREATE)}get hasDeletePermission(){return!!(this.permissions&window.OC.PERMISSION_DELETE)}get hasUpdatePermission(){return!!(this.permissions&window.OC.PERMISSION_UPDATE)}get hasSharePermission(){return!!(this.permissions&window.OC.PERMISSION_SHARE)}get hasDownloadPermission(){return this.attributes.some(e=>"permissions"===e.scope&&"download"===e.key&&!1===e.value)}get isFileRequest(){return function(e="[]"){const t=e=>"fileRequest"===e.scope&&"enabled"===e.key&&!0===e.value;try{return JSON.parse(e).some(t)}catch(e){return ue.A.error("Error while parsing share attributes",{error:e}),!1}}(JSON.stringify(this.attributes))}set hasDownloadPermission(e){this.setAttribute("permissions","download",!!e)}setAttribute(e,t,r){const i={scope:e,key:t,value:r};for(const e in this._share.attributes){const t=this._share.attributes[e];if(t.scope===i.scope&&t.key===i.key)return void this._share.attributes.splice(e,1,i)}this._share.attributes.push(i)}get canEdit(){return!0===this._share.can_edit}get canDelete(){return!0===this._share.can_delete}get viaFileid(){return this._share.via_fileid}get viaPath(){return this._share.via_path}get parent(){return this._share.parent}get storageId(){return this._share.storage_id}get storage(){return this._share.storage}get itemSource(){return this._share.item_source}get status(){return this._share.status}get isTrustedServer(){return!!this._share.is_trusted_server}}class Le{constructor(){(function(e,t,r){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})(this,"_capabilities",void 0),this._capabilities=(0,c.F)()}get defaultPermissions(){return this._capabilities.files_sharing?.default_permissions}get isPublicUploadEnabled(){return!0===this._capabilities.files_sharing?.public?.upload}get federatedShareDocLink(){return window.OC.appConfig.core.federatedCloudShareDoc}get defaultExpirationDate(){return this.isDefaultExpireDateEnabled&&null!==this.defaultExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultExpireDate)):null}get defaultInternalExpirationDate(){return this.isDefaultInternalExpireDateEnabled&&null!==this.defaultInternalExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultInternalExpireDate)):null}get defaultRemoteExpirationDateString(){return this.isDefaultRemoteExpireDateEnabled&&null!==this.defaultRemoteExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultRemoteExpireDate)):null}get enforcePasswordForPublicLink(){return!0===window.OC.appConfig.core.enforcePasswordForPublicLink}get enableLinkPasswordByDefault(){return!0===window.OC.appConfig.core.enableLinkPasswordByDefault}get isDefaultExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultExpireDateEnforced}get isDefaultExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultExpireDateEnabled}get isDefaultInternalExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnforced}get isDefaultInternalExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnabled}get isDefaultRemoteExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnforced}get isDefaultRemoteExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnabled}get isRemoteShareAllowed(){return!0===window.OC.appConfig.core.remoteShareAllowed}get isFederationEnabled(){return!0===this._capabilities?.files_sharing?.federation?.outgoing}get isPublicShareAllowed(){return!0===this._capabilities?.files_sharing?.public?.enabled}get isMailShareAllowed(){return!0===this._capabilities?.files_sharing?.sharebymail?.enabled&&!0===this.isPublicShareAllowed}get defaultExpireDate(){return window.OC.appConfig.core.defaultExpireDate}get defaultInternalExpireDate(){return window.OC.appConfig.core.defaultInternalExpireDate}get defaultRemoteExpireDate(){return window.OC.appConfig.core.defaultRemoteExpireDate}get isResharingAllowed(){return!0===window.OC.appConfig.core.resharingAllowed}get isPasswordForMailSharesRequired(){return!0===this._capabilities.files_sharing?.sharebymail?.password?.enforced}get shouldAlwaysShowUnique(){return!0===this._capabilities.files_sharing?.sharee?.always_show_unique}get allowGroupSharing(){return!0===window.OC.appConfig.core.allowGroupSharing}get maxAutocompleteResults(){return parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25}get minSearchStringLength(){return parseInt(window.OC.config["sharing.minSearchStringLength"],10)||0}get passwordPolicy(){return this._capabilities?.password_policy||{}}get allowCustomTokens(){return this._capabilities?.files_sharing?.public?.custom_tokens}get showFederatedSharesAsInternal(){return(0,L.C)("files_sharing","showFederatedSharesAsInternal",!1)}get showFederatedSharesToTrustedServersAsInternal(){return(0,L.C)("files_sharing","showFederatedSharesToTrustedServersAsInternal",!1)}get showExternalSharing(){return(0,L.C)("files_sharing","showExternalSharing",!0)}}const Re={methods:{async openSharingDetails(e){let t={};if(e.handler){const r={};this.suggestions&&(r.suggestions=this.suggestions,r.fileInfo=this.fileInfo,r.query=this.query);const i=await e.handler(r);t=this.mapShareRequestToShareObject(i)}else t=this.mapShareRequestToShareObject(e);if("dir"!==this.fileInfo.type){const e=t.permissions,r=-5&e&-9;e!==r&&(ue.A.debug("Removed create/delete permissions from file share (only valid for folders)"),t.permissions=r)}const r={fileInfo:this.fileInfo,share:t};this.$emit("open-sharing-details",r)},openShareDetailsForCustomSettings(e){e.setCustomPermissions=!0,this.openSharingDetails(e)},mapShareRequestToShareObject(e){if(e.id)return e;const t={attributes:[{value:!0,key:"download",scope:"permissions"}],hideDownload:!1,share_type:e.shareType,share_with:e.shareWith,is_no_user:e.isNoUser,user:e.shareWith,share_with_displayname:e.displayName,subtitle:e.subtitle,permissions:e.permissions??(new Le).defaultPermissions,expiration:""};return new Ne(t)}}};var Be=i(61338);i(48318);const Oe=(0,B.KT)("apps/files_sharing/api/v1/shares"),Me={methods:{async createShare({path:e,permissions:r,shareType:i,shareWith:n,publicUpload:s,password:a,sendPasswordByTalk:o,expireDate:l,label:c,note:u,attributes:d}){try{const t=await h.Ay.post(Oe,{path:e,permissions:r,shareType:i,shareWith:n,publicUpload:s,password:a,sendPasswordByTalk:o,expireDate:l,label:c,note:u,attributes:d});if(!t?.data?.ocs)throw t;const p=new Ne(t.data.ocs.data);return(0,Be.Ic)("files_sharing:share:created",{share:p}),p}catch(e){ue.A.error("Error while creating share",{error:e});const r=e?.response?.data?.ocs?.meta?.message;throw(0,H.Qg)(r?t("files_sharing","Error creating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error creating the share"),{type:"error"}),e}},async deleteShare(e){try{const t=await h.Ay.delete(Oe+`/${e}`);if(!t?.data?.ocs)throw t;return(0,Be.Ic)("files_sharing:share:deleted",{id:e}),!0}catch(e){ue.A.error("Error while deleting share",{error:e});const r=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(r?t("files_sharing","Error deleting the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error deleting the share"),{type:"error"}),e}},async updateShare(e,r){try{const t=await h.Ay.put(Oe+`/${e}`,r);if((0,Be.Ic)("files_sharing:share:updated",{id:e}),t?.data?.ocs)return t.data.ocs.data;throw t}catch(e){if(ue.A.error("Error while updating share",{error:e}),400!==e.response.status){const r=e?.response?.data?.ocs?.meta?.message;OC.Notification.showTemporary(r?t("files_sharing","Error updating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error updating the share"),{type:"error"})}const r=e.response.data.ocs.meta.message;throw new Error(r)}}}},Ve={name:"SharingInput",components:{NcSelect:ye.default},mixins:[Me,Re],props:{shares:{type:Array,required:!0},linkShares:{type:Array,required:!0},fileInfo:{type:Object,required:!0},reshare:{type:Ne,default:null},canReshare:{type:Boolean,required:!0},isExternal:{type:Boolean,default:!1},placeholder:{type:String,default:""}},setup:()=>({shareInputId:`share-input-${Math.random().toString(36).slice(2,7)}`}),data:()=>({config:new Le,loading:!1,query:"",recommendations:[],ShareSearch:OCA.Sharing.ShareSearch.state,suggestions:[],value:null}),computed:{externalResults(){return this.ShareSearch.results},inputPlaceholder(){const e=this.config.isRemoteShareAllowed;return this.canReshare?this.placeholder?this.placeholder:e?t("files_sharing","Name, email, or Federated Cloud ID …"):t("files_sharing","Name or email …"):t("files_sharing","Resharing is not allowed")},isValidQuery(){return this.query&&""!==this.query.trim()&&this.query.length>this.config.minSearchStringLength},options(){return this.isValidQuery?this.suggestions:this.recommendations},noResultText(){return this.loading?t("files_sharing","Searching …"):t("files_sharing","No elements found.")}},mounted(){this.isExternal||this.getRecommendations()},methods:{onSelected(e){this.value=null,this.openSharingDetails(e)},async asyncFind(e){this.query=e.trim(),this.isValidQuery&&(this.loading=!0,await this.debounceGetSuggestions(e))},async getSuggestions(e,r=!1){this.loading=!0,!0===(0,c.F)().files_sharing.sharee.query_lookup_default&&(r=!0);const i=[O.I.Remote,O.I.RemoteGroup],n=[],s=this.config.showFederatedSharesAsInternal||this.config.showFederatedSharesToTrustedServersAsInternal,a=!this.isExternal&&s||this.isExternal&&!s||this.isExternal&&this.config.showFederatedSharesToTrustedServersAsInternal;this.isExternal?!0===(0,c.F)().files_sharing.public.enabled&&n.push(O.I.Email):n.push(O.I.User,O.I.Group,O.I.Team,O.I.Room,O.I.Guest,O.I.Deck,O.I.ScienceMesh),a&&n.push(...i);let o=null;try{o=await h.Ay.get((0,B.KT)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:r,perPage:this.config.maxAutocompleteResults,shareType:n}})}catch(e){return void ue.A.error("Error fetching suggestions",{error:e})}const{exact:l,...u}=o.data.ocs.data,d=Object.values(l).flat(),p=Object.values(u).flat(),f=this.filterOutExistingShares(d).filter(e=>this.filterByTrustedServer(e)).map(e=>this.formatForMultiselect(e)).sort((e,t)=>e.shareType-t.shareType),g=this.filterOutExistingShares(p).filter(e=>this.filterByTrustedServer(e)).map(e=>this.formatForMultiselect(e)).sort((e,t)=>e.shareType-t.shareType),A=[];u.lookupEnabled&&!r&&A.push({id:"global-lookup",isNoUser:!0,displayName:t("files_sharing","Search everywhere"),lookup:!0});const m=this.externalResults.filter(e=>!e.condition||e.condition(this)),y=f.concat(g).concat(m).concat(A),v=y.reduce((e,t)=>t.displayName?(e[t.displayName]||(e[t.displayName]=0),e[t.displayName]++,e):e,{});this.suggestions=y.map(e=>v[e.displayName]>1&&!e.desc?{...e,desc:e.shareWithDisplayNameUnique}:e),this.loading=!1,ue.A.debug("sharing suggestions",{suggestions:this.suggestions})},debounceGetSuggestions:(0,me.A)(function(...e){this.getSuggestions(...e)},300),async getRecommendations(){this.loading=!0;let e=null;try{e=await h.Ay.get((0,B.KT)("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:this.fileInfo.type}})}catch(e){return void ue.A.error("Error fetching recommendations",{error:e})}const t=this.externalResults.filter(e=>!e.condition||e.condition(this)),r=Object.values(e.data.ocs.data.exact).reduce((e,t)=>e.concat(t),[]);this.recommendations=this.filterOutExistingShares(r).filter(e=>this.filterByTrustedServer(e)).map(e=>this.formatForMultiselect(e)).concat(t),this.loading=!1,ue.A.debug("sharing recommendations",{recommendations:this.recommendations})},filterOutExistingShares(e){return e.reduce((e,t)=>{if("object"!=typeof t)return e;try{if(t.value.shareType===O.I.User){if(t.value.shareWith===(0,l.HW)().uid)return e;if(this.reshare&&t.value.shareWith===this.reshare.owner)return e}if(t.value.shareType===O.I.Email){if(!this.isExternal)return e;if(-1!==this.linkShares.map(e=>e.shareWith).indexOf(t.value.shareWith.trim()))return e}else{const r=this.shares.reduce((e,t)=>(e[t.shareWith]=t.type,e),{}),i=t.value.shareWith.trim();if(i in r&&r[i]===t.value.shareType)return e}e.push(t)}catch{return e}return e},[])},shareTypeToIcon(e){switch(e){case O.I.Guest:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case O.I.RemoteGroup:case O.I.Group:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case O.I.Email:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case O.I.Team:return{icon:"icon-teams",iconTitle:t("files_sharing","Team")};case O.I.Room:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case O.I.Deck:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case O.I.Sciencemesh:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},filterByTrustedServer(e){return!((e.value.shareType===O.I.Remote||e.value.shareType===O.I.RemoteGroup)&&this.config.showFederatedSharesToTrustedServersAsInternal&&!this.isExternal)||!0===e.value.isTrustedServer},formatForMultiselect(e){let r,i=e.name||e.label;return e.value.shareType===O.I.User&&this.config.shouldAlwaysShowUnique?r=e.shareWithDisplayNameUnique??"":e.value.shareType===O.I.Email?r=e.value.shareWith:e.value.shareType===O.I.Remote||e.value.shareType===O.I.RemoteGroup?this.config.showFederatedSharesAsInternal?(r=e.extra?.email?.value??"",i=e.extra?.name?.value??i):e.value.server&&(r=t("files_sharing","on {server}",{server:e.value.server})):r=e.shareWithDescription??"",{shareWith:e.value.shareWith,shareType:e.value.shareType,user:e.uuid||e.value.shareWith,isNoUser:e.value.shareType!==O.I.User,displayName:i,subname:r,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}}}};var Ue=i(77127),$e={};$e.styleTagTransform=oe(),$e.setAttributes=ie(),$e.insert=te().bind(null,"head"),$e.domAPI=K(),$e.insertStyleElement=se(),Z()(Ue.A,$e),Ue.A&&Ue.A.locals&&Ue.A.locals;const Fe=(0,W.A)(Ve,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharing-search"},[t("label",{staticClass:"hidden-visually",attrs:{for:e.shareInputId}},[e._v("\n\t\t"+e._s(e.isExternal?e.t("files_sharing","Enter external recipients"):e.t("files_sharing","Search for internal recipients"))+"\n\t")]),e._v(" "),t("NcSelect",{ref:"select",staticClass:"sharing-search__input",attrs:{"input-id":e.shareInputId,disabled:!e.canReshare,loading:e.loading,filterable:!1,placeholder:e.inputPlaceholder,"clear-search-on-blur":()=>!1,"user-select":!0,options:e.options,"label-outside":!0},on:{search:e.asyncFind,"option:selected":e.onSelected},scopedSlots:e._u([{key:"no-options",fn:function({search:t}){return[e._v("\n\t\t\t"+e._s(t?e.noResultText:e.placeholder)+"\n\t\t")]}}]),model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)},[],!1,null,null,null).exports;var He=i(85471);const qe=(0,He.pM)({__name:"SidebarTabExternalSection",props:{node:{type:Object,required:!0},section:{type:Object,required:!0}},setup(e){const t=e,r=(0,He.KR)();return(0,He.nT)(()=>{r.value&&(r.value.node=t.node)}),{__sfc:!0,props:t,sectionElement:r}}}),ze=(0,W.A)(qe,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(e.section.element,{ref:"sectionElement",tag:"component",domProps:{node:e.node}})},[],!1,null,null,null).exports,je=(0,He.pM)({__name:"SidebarTabExternalSectionLegacy",props:{fileInfo:{type:Object,required:!0},sectionCallback:{type:Function,required:!0}},setup(e){const t=e,r=(0,He.EW)(()=>t.sectionCallback(void 0,t.fileInfo));return{__sfc:!0,props:t,component:r}}});var We=i(25224),Ge={};Ge.styleTagTransform=oe(),Ge.setAttributes=ie(),Ge.insert=te().bind(null,"head"),Ge.domAPI=K(),Ge.insertStyleElement=se(),Z()(We.A,Ge),We.A&&We.A.locals&&We.A.locals;const Ye=(0,W.A)(je,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharing-tab-external-section-legacy"},[t(e._self._setupProxy.component,{tag:"component",attrs:{"file-info":e.fileInfo}})],1)},[],!1,null,"240645c6",null).exports;var Qe=i(32073),Xe=i(48198),Ze=i(16879),Je=i(88289),Ke=i(93663),et=i(177);const tt={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},rt=(0,W.A)(tt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon account-circle-outline-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:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7.07,18.28C7.5,17.38 10.12,16.5 12,16.5C13.88,16.5 16.5,17.38 16.93,18.28C15.57,19.36 13.86,20 12,20C10.14,20 8.43,19.36 7.07,18.28M18.36,16.83C16.93,15.09 13.46,14.5 12,14.5C10.54,14.5 7.07,15.09 5.64,16.83C4.62,15.5 4,13.82 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,13.82 19.38,15.5 18.36,16.83M12,6C10.06,6 8.5,7.56 8.5,9.5C8.5,11.44 10.06,13 12,13C13.94,13 15.5,11.44 15.5,9.5C15.5,7.56 13.94,6 12,6M12,11A1.5,1.5 0 0,1 10.5,9.5A1.5,1.5 0 0,1 12,8A1.5,1.5 0 0,1 13.5,9.5A1.5,1.5 0 0,1 12,11Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,it={name:"AccountGroupIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},nt=(0,W.A)(it,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon account-group-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:"M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var st=i(16039),at=i(66001),ot=i(26690);const lt={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ht=(0,W.A)(lt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon email-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:"M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,ct={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ut=(0,W.A)(ct,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-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:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var dt=i(36600),pt=i(25384),ft=i(33388),gt=i(16502);const At={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},mt=(0,W.A)(At,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon refresh-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:"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"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,yt={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vt=(0,W.A)(yt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon share-circle-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:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M14 16V13C10.39 13 7.81 14.43 6 17C6.72 13.33 8.94 9.73 14 9V6L19 11L14 16Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,wt={name:"TrayArrowUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},_t=(0,W.A)(wt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon tray-arrow-up-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:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Ct=(0,He.pM)({__name:"SidebarTabExternalAction",props:{action:{type:Object,required:!0},node:{type:Object,required:!0},share:{type:Object,required:!0}},setup(e,{expose:t}){const r=e;t({save:s});const i=(0,He.KR)(),n=(0,He.KR)();async function s(){await(n.value?.())}function a(e){n.value=e}return(0,He.nT)(()=>{i.value&&(i.value.node=(0,He.ux)(r.node),i.value.onSave=a,i.value.share=(0,He.ux)(r.share))}),{__sfc:!0,props:r,actionElement:i,savingCallback:n,save:s,onSave:a}}}),bt=(0,W.A)(Ct,function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(e.action.element,{key:e.action.id,ref:"actionElement",tag:"component",domProps:{share:e.share,node:e.node,onSave:r.onSave}})},[],!1,null,null,null).exports,Et={name:"SidebarTabExternalActionLegacy",props:{id:{type:String,required:!0},action:{type:Object,default:()=>({})},fileInfo:{type:Object,required:!0},share:{type:Ne,default:null}},computed:{data(){return this.action.data(this)}}},St=(0,W.A)(Et,function(){var e=this;return(0,e._self._c)(e.data.is,e._g(e._b({tag:"component"},"component",e.data,!1),e.action.handlers),[e._v("\n\t"+e._s(e.data.text)+"\n")])},[],!1,null,null,null).exports;var xt=i(39177);const It=function(e=Pe,t={}){const r=(0,xe.UU)(e,{headers:t});function i(e){r.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,l.zo)(i),i((0,l.do)()),(0,xe.Gu)().patch("fetch",(e,t)=>{const r=t.headers;return r?.method&&(t.method=r.method,delete r.method),fetch(e,t)}),r}();async function kt(e){const t=`<?xml version="1.0"?>\n\t\t<d:propfind ${void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...ke}),Object.keys(window._nc_dav_namespaces).map(e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`).join(" ")}>\n\t\t\t<d:prop>\n\t\t\t\t${void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...Ie]),window._nc_dav_properties.map(e=>`<${e} />`).join(" ")}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;return function(e,t=De,r=Pe){let i=(0,l.HW)()?.uid;if((0,Se.f)())i=i??"anonymous";else if(!i)throw new Error("No user id found");const n=e.props,s=function(e=""){let t=u.P.NONE;return e?((e.includes("C")||e.includes("K"))&&(t|=u.P.CREATE),e.includes("G")&&(t|=u.P.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=u.P.UPDATE),e.includes("D")&&(t|=u.P.DELETE),e.includes("R")&&(t|=u.P.SHARE),t):t}(n?.permissions),a=String(n?.["owner-id"]||i),o=n.fileid||0,h=new Date(Date.parse(e.lastmod)),c=new Date(Date.parse(n.creationdate)),d={id:o,source:`${r}${e.filename}`,mtime:isNaN(h.getTime())||0===h.getTime()?void 0:h,crtime:isNaN(c.getTime())||0===c.getTime()?void 0:c,mime:e.mime||"application/octet-stream",displayname:void 0!==n.displayname?String(n.displayname):void 0,size:n?.size||Number.parseInt(n.getcontentlength||"0"),status:o<0?u.c.FAILED:void 0,permissions:s,owner:a,root:t,attributes:{...e,...n,hasPreview:n?.["has-preview"]}};return delete d.attributes?.props,"file"===e.type?new u.a(d):new u.b(d)}((await It.stat(`${Te()}${e}`,{details:!0,data:t})).data)}const Tt=new Le;async function Dt(e=!1){if(Tt.passwordPolicy.api&&Tt.passwordPolicy.api.generate)try{const t=await h.Ay.get(Tt.passwordPolicy.api.generate);if(t.data.ocs.data.password)return e&&(0,H.Te)((0,p.t)("files_sharing","Password created successfully")),t.data.ocs.data.password}catch(t){ue.A.info("Error generating password from password_policy",{error:t}),e&&(0,H.Qg)((0,p.t)("files_sharing","Error generating password from password policy"))}const t=new Uint8Array(10),r=52/255;!function(e){if(self?.crypto?.getRandomValues)return void self.crypto.getRandomValues(e);let t=e.length;for(;t--;)e[t]=Math.floor(256*Math.random())}(t);let i="";for(let e=0;e<t.length;e++)i+="abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789".charAt(t[e]*r);return i}const Pt={mixins:[Me],props:{fileInfo:{type:Object,default:()=>{},required:!0},share:{type:Ne,default:null},isUnique:{type:Boolean,default:!0}},data(){return{config:new Le,node:null,ShareType:O.I,errors:{},loading:!1,saving:!1,open:!1,passwordProtectedState:void 0,updateQueue:new xt.A({concurrency:1}),reactiveState:this.share?.state}},computed:{path(){return(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/")},hasNote:{get(){return""!==this.share.note},set(e){this.share.note=e?null:""}},dateTomorrow:()=>new Date((new Date).setDate((new Date).getDate()+1)),lang(){const e=window.dayNamesShort?window.dayNamesShort:["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."],t=window.monthNamesShort?window.monthNamesShort:["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."];return{formatLocale:{firstDayOfWeek:window.firstDay?window.firstDay:0,monthsShort:t,weekdaysMin:e,weekdaysShort:e},monthFormat:"MMM"}},isNewShare(){return!this.share.id},isFolder(){return"dir"===this.fileInfo.type},isPublicShare(){const e=this.share.shareType??this.share.type;return[O.I.Link,O.I.Email].includes(e)},isRemoteShare(){return this.share.type===O.I.RemoteGroup||this.share.type===O.I.Remote},isShareOwner(){return this.share&&this.share.owner===(0,l.HW)().uid},isExpiryDateEnforced(){return this.isPublicShare?this.config.isDefaultExpireDateEnforced:this.isRemoteShare?this.config.isDefaultRemoteExpireDateEnforced:this.config.isDefaultInternalExpireDateEnforced},hasCustomPermissions(){return![Ee.ALL,Ee.READ_ONLY,Ee.FILE_DROP].includes(this.share.permissions)},maxExpirationDateEnforced(){return this.isExpiryDateEnforced?this.isPublicShare?this.config.defaultExpirationDate:this.isRemoteShare?this.config.defaultRemoteExpirationDateString:this.config.defaultInternalExpirationDate:null},isPasswordProtected:{get(){return!!this.config.enforcePasswordForPublicLink||(void 0!==this.passwordProtectedState?this.passwordProtectedState:"string"==typeof this.share.newPassword||"string"==typeof this.share.password)},async set(e){e?(this.passwordProtectedState=!0,this.$set(this.share,"newPassword",await Dt(!0))):(this.passwordProtectedState=!1,this.$set(this.share,"newPassword",""))}}},methods:{async getNode(){const e={path:this.path};try{this.node=await kt(e.path),ue.A.info("Fetched node:",{node:this.node})}catch(e){ue.A.error("Error:",e)}},checkShare:e=>(!e.password||"string"==typeof e.password&&""!==e.password.trim())&&((!e.newPassword||"string"==typeof e.newPassword)&&!(e.expirationDate&&!e.expirationDate.isValid())),formatDateToString:e=>new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())).toISOString().split("T")[0],onExpirationChange(e){if(!e)return this.share.expireDate=null,void this.$set(this.share,"expireDate",null);const t=e instanceof Date?e:new Date(e);this.share.expireDate=this.formatDateToString(t)},onNoteChange(e){this.$set(this.share,"newNote",e.trim())},onNoteSubmit(){this.share.newNote&&(this.share.note=this.share.newNote,this.$delete(this.share,"newNote"),this.queueUpdate("note"))},async onDelete(){try{this.loading=!0,this.open=!1,await this.deleteShare(this.share.id),ue.A.debug("Share deleted",{shareId:this.share.id});const e="file"===this.share.itemType?t("files_sharing",'File "{path}" has been unshared',{path:this.share.path}):t("files_sharing",'Folder "{path}" has been unshared',{path:this.share.path});(0,H.Te)(e),this.$emit("remove:share",this.share),await this.getNode(),(0,Be.Ic)("files:node:updated",this.node)}catch{this.open=!0}finally{this.loading=!1}},queueUpdate(...e){if(0!==e.length){if(this.share.id){const r={};for(const t of e)"password"!==t?null===this.share[t]||void 0===this.share[t]?r[t]="":"object"==typeof this.share[t]?r[t]=JSON.stringify(this.share[t]):r[t]=this.share[t].toString():void 0!==this.share.newPassword&&(r[t]=this.share.newPassword);return this.updateQueue.add(async()=>{this.saving=!0,this.errors={};try{const t=await this.updateShare(this.share.id,r);e.includes("password")&&(this.share.password=this.share.newPassword||void 0,this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=t.password_expiration_time);for(const t of e)this.$delete(this.errors,t);(0,H.Te)(this.updateSuccessMessage(e))}catch(r){ue.A.error("Could not update share",{error:r,share:this.share,propertyNames:e});const{message:i}=r;if(i&&""!==i){for(const t of e)this.onSyncError(t,i);(0,H.Qg)(i)}else(0,H.Qg)(t("files_sharing","Could not update share"))}finally{this.saving=!1}})}ue.A.debug("Updated local share",{share:this.share})}},updateSuccessMessage(e){if(1!==e.length)return t("files_sharing","Share saved");switch(e[0]){case"expireDate":return t("files_sharing","Share expiry date saved");case"hideDownload":return t("files_sharing","Share hide-download state saved");case"label":return t("files_sharing","Share label saved");case"note":return t("files_sharing","Share note for recipient saved");case"password":return t("files_sharing","Share password saved");case"permissions":return t("files_sharing","Share permissions saved");default:return t("files_sharing","Share saved")}},onSyncError(e,t){switch("password"===e&&void 0!==this.share.newPassword&&(this.share.newPassword===this.share.password&&(this.share.password=""),this.$delete(this.share,"newPassword")),this.open=!0,e){case"password":case"pending":case"expireDate":case"label":case"note":{this.$set(this.errors,e,t);let r=this.$refs[e];if(r){r.$el&&(r=r.$el);const e=r.querySelector(".focusable");e&&e.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,e,t),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:(0,me.A)(function(e){this.queueUpdate(e)},500)}},Nt={name:"SharingDetailsTab",components:{NcAvatar:M.A,NcButton:V.A,NcCheckboxRadioSwitch:Qe.A,NcDateTimePickerNative:Xe.A,NcInputField:Ze.A,NcLoadingIcon:Je.A,NcPasswordField:Ke.A,NcTextArea:et.A,CloseIcon:at.A,CircleIcon:st.A,EditIcon:gt.A,LinkIcon:dt.A,GroupIcon:nt,ShareIcon:vt,UserIcon:rt,UploadIcon:_t,ViewIcon:ut,MenuDownIcon:pt.A,MenuUpIcon:ft.A,DotsHorizontalIcon:ot.A,Refresh:mt,SidebarTabExternalAction:bt,SidebarTabExternalActionLegacy:St},mixins:[Me,Pt],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data(){return{writeNoteToRecipientIsChecked:!1,sharingPermission:Ee.ALL.toString(),revertSharingPermission:Ee.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:Ee,isFirstComponentLoad:!0,test:!1,creating:!1,initialToken:this.share.token,loadingToken:!1,externalShareActions:[...window._nc_files_sharing_sidebar_actions?.values()??[]],ExternalShareActions:OCA.Sharing.ExternalShareActions.state}},computed:{title(){switch(this.share.type){case O.I.User:return t("files_sharing","Share with {user}",{user:this.share.shareWithDisplayName});case O.I.Email:return t("files_sharing","Share with email {email}",{email:this.share.shareWith});case O.I.Link:return t("files_sharing","Share link");case O.I.Group:return t("files_sharing","Share with group");case O.I.Room:return t("files_sharing","Share in conversation");case O.I.Remote:{const[e,r]=this.share.shareWith.split("@");return this.config.showFederatedSharesAsInternal?t("files_sharing","Share with {user}",{user:e}):t("files_sharing","Share with {user} on remote server {server}",{user:e,server:r})}case O.I.RemoteGroup:return t("files_sharing","Share with remote group");case O.I.Guest:return t("files_sharing","Share with guest");default:return this.share.id?t("files_sharing","Update share"):t("files_sharing","Create share")}},allPermissions(){return this.isFolder?this.bundledPermissions.ALL.toString():this.bundledPermissions.ALL_FILE.toString()},canEdit:{get(){return this.share.hasUpdatePermission},set(e){this.updateAtomicPermissions({isEditChecked:e})}},canCreate:{get(){return this.share.hasCreatePermission},set(e){this.updateAtomicPermissions({isCreateChecked:e})}},canDelete:{get(){return this.share.hasDeletePermission},set(e){this.updateAtomicPermissions({isDeleteChecked:e})}},canReshare:{get(){return this.share.hasSharePermission},set(e){this.updateAtomicPermissions({isReshareChecked:e})}},showInGridView:{get(){return this.getShareAttribute("config","grid_view",!1)},set(e){this.setShareAttribute("config","grid_view",e)}},canDownload:{get(){return this.getShareAttribute("permissions","download",!0)},set(e){this.setShareAttribute("permissions","download",e)}},hasRead:{get(){return this.share.hasReadPermission},set(e){this.updateAtomicPermissions({isReadChecked:e})}},hasExpirationDate:{get(){return this.isValidShareAttribute(this.share.expireDate)},set(e){this.share.expireDate=e?this.formatDateToString(this.defaultExpiryDate):""}},isFolder(){return"dir"===this.fileInfo.type},isSetDownloadButtonVisible(){return this.isFolder||["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation"].includes(this.fileInfo.mimetype)},isPasswordEnforced(){return this.isPublicShare&&this.config.enforcePasswordForPublicLink},defaultExpiryDate(){return(this.isGroupShare||this.isUserShare)&&this.config.isDefaultInternalExpireDateEnabled?new Date(this.config.defaultInternalExpirationDate):this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?new Date(this.config.defaultRemoteExpireDateEnabled):this.isPublicShare&&this.config.isDefaultExpireDateEnabled?new Date(this.config.defaultExpirationDate):new Date((new Date).setDate((new Date).getDate()+1))},isUserShare(){return this.share.type===O.I.User},isGroupShare(){return this.share.type===O.I.Group},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==O.I.Link&&this.share.type!==O.I.Email)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},resharingIsPossible(){return this.config.isResharingAllowed&&this.share.type!==O.I.Link&&this.share.type!==O.I.Email},canSetEdit(){return this.fileInfo.sharePermissions&OC.PERMISSION_UPDATE||this.canEdit},canSetCreate(){return this.fileInfo.sharePermissions&OC.PERMISSION_CREATE||this.canCreate},canSetDelete(){return this.fileInfo.sharePermissions&OC.PERMISSION_DELETE||this.canDelete},canSetReshare(){return this.fileInfo.sharePermissions&OC.PERMISSION_SHARE||this.canReshare},canSetDownload(){return this.fileInfo.canDownload()||this.canDownload},canRemoveReadPermission(){return this.allowsFileDrop&&(this.share.type===O.I.Link||this.share.type===O.I.Email)},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const e=(0,R.A)(this.share.passwordExpirationTime);return!(e.diff((0,R.A)())<0)&&e.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(e){this.share.sendPasswordByTalk=e}},isEmailShareType(){return!!this.share&&this.share.type===O.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPublicShare||!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword||void 0===OC.appswebroots.spreed)},canChangeHideDownload(){return this.fileInfo.shareAttributes.some(e=>"download"===e.key&&"permissions"===e.scope&&!1===e.value)},customPermissionsList(){const e={[ve]:this.t("files_sharing","Read"),[_e]:this.t("files_sharing","Create"),[we]:this.t("files_sharing","Edit"),[be]:this.t("files_sharing","Share"),[Ce]:this.t("files_sharing","Delete")};return[ve,...this.isFolder?[4]:[],we,...this.resharingIsPossible?[be]:[],...this.isFolder?[8]:[]].filter(e=>{return t=this.share.permissions,r=e,0!==t&&(t&r)===r;var t,r}).map((t,r)=>0===r?e[t]:e[t].toLocaleLowerCase((0,p.Z0)())).join(", ")},advancedControlExpandedValue(){return this.advancedSectionAccordionExpanded?"true":"false"},errorPasswordLabel(){if(this.passwordError)return t("files_sharing","Password field cannot be empty")},passwordHint(){if(!this.isNewShare&&!this.hasUnsavedPassword)return t("files_sharing","Replace current password")},sortedExternalShareActions(){return this.externalShareActions.filter(e=>e.enabled((0,He.ux)(this.share),(0,He.ux)(this.fileInfo.node))).sort((e,t)=>e.order-t.order)},externalLegacyShareActions(){return ue.A.debug("legacy details tab",{ExternalShareActions:this.ExternalShareActions}),this.ExternalShareActions.actions.filter(e=>(e.shareType.includes(O.I.Link)||e.shareType.includes(O.I.Email))&&e.advanced)}},watch:{setCustomPermissions(e){this.sharingPermission=e?"custom":this.revertSharingPermission}},beforeMount(){this.initializePermissions(),this.initializeAttributes(),ue.A.debug("Share object received",{share:this.share}),ue.A.debug("Configuration object received",{config:this.config})},mounted(){this.$refs.quickPermissions?.querySelector("input:checked")?.focus()},methods:{setShareAttribute(e,t,r){this.share.attributes||this.$set(this.share,"attributes",[]);const i=this.share.attributes.find(r=>r.scope===e||r.key===t);i?i.value=r:this.share.attributes.push({scope:e,key:t,value:r})},getShareAttribute(e,t,r=void 0){const i=this.share.attributes?.find(r=>r.scope===e&&r.key===t);return i?.value??r},async generateNewToken(){if(!this.loadingToken){this.loadingToken=!0;try{this.share.token=await async function(){const{data:e}=await h.Ay.get((0,B.KT)("/apps/files_sharing/api/v1/token"));return e.ocs.data.token}()}catch{(0,H.Qg)(t("files_sharing","Failed to generate a new token"))}this.loadingToken=!1}},cancel(){this.share.token=this.initialToken,this.$emit("close-sharing-details")},updateAtomicPermissions({isReadChecked:e=this.hasRead,isEditChecked:t=this.canEdit,isCreateChecked:r=this.canCreate,isDeleteChecked:i=this.canDelete,isReshareChecked:n=this.canReshare}={}){this.isFolder||!r&&!i||(ue.A.debug("Ignoring create/delete permissions for file share — only available for folders"),r=!1,i=!1);const s=0|(e?ve:0)|(r?4:0)|(i?8:0)|(t?we:0)|(n?be:0);this.share.permissions=s},expandCustomPermissions(){this.advancedSectionAccordionExpanded||(this.advancedSectionAccordionExpanded=!0),this.toggleCustomPermissions()},toggleCustomPermissions(e){const t="custom"===this.sharingPermission;this.revertSharingPermission=t?"custom":e,this.setCustomPermissions=t},async initializeAttributes(){if(this.isNewShare)return(this.config.enableLinkPasswordByDefault||this.isPasswordEnforced)&&this.isPublicShare&&(this.$set(this.share,"newPassword",await Dt(!0)),this.advancedSectionAccordionExpanded=!0),this.isPublicShare&&this.config.isDefaultExpireDateEnabled?this.share.expireDate=this.config.defaultExpirationDate.toDateString():this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?this.share.expireDate=this.config.defaultRemoteExpirationDateString.toDateString():this.config.isDefaultInternalExpireDateEnabled&&(this.share.expireDate=this.config.defaultInternalExpirationDate.toDateString()),void(this.isValidShareAttribute(this.share.expireDate)&&(this.advancedSectionAccordionExpanded=!0));!this.isValidShareAttribute(this.share.expireDate)&&this.isExpiryDateEnforced&&(this.hasExpirationDate=!0),(this.isValidShareAttribute(this.share.password)||this.isValidShareAttribute(this.share.expireDate)||this.isValidShareAttribute(this.share.label))&&(this.advancedSectionAccordionExpanded=!0),this.isValidShareAttribute(this.share.note)&&(this.writeNoteToRecipientIsChecked=!0,this.advancedSectionAccordionExpanded=!0)},handleShareType(){"shareType"in this.share?this.share.type=this.share.shareType:this.share.share_type&&(this.share.type=this.share.share_type)},handleDefaultPermissions(){if(this.isNewShare){const e=this.config.defaultPermissions;e===Ee.READ_ONLY||e===Ee.ALL?this.sharingPermission=e.toString():(this.sharingPermission="custom",this.share.permissions=e,this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)}this.canRemoveReadPermission||(this.hasRead=!0)},handleCustomPermissions(){this.isNewShare||!this.hasCustomPermissions&&!this.share.setCustomPermissions?this.share.permissions&&(this.sharingPermission=this.share.permissions.toString()):(this.sharingPermission="custom",this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)},initializePermissions(){this.handleShareType(),this.handleDefaultPermissions(),this.handleCustomPermissions()},async saveShare(){const e=["permissions","attributes","note","expireDate"],t=["label","hideDownload"];this.hasUnsavedPassword&&t.push("password"),this.config.allowCustomTokens&&t.push("token"),this.isPublicShare&&e.push(...t);const r=parseInt(this.sharingPermission);if(this.setCustomPermissions?this.updateAtomicPermissions():this.share.permissions=r,this.isFolder||this.share.permissions!==Ee.ALL||(this.share.permissions=Ee.ALL_FILE),this.writeNoteToRecipientIsChecked||(this.share.note=""),this.isPasswordProtected?this.isPasswordEnforced&&this.isNewShare&&!this.isValidShareAttribute(this.share.newPassword)&&(this.passwordError=!0):this.share.password="",this.hasExpirationDate||(this.share.expireDate=""),this.isNewShare){const t={permissions:this.share.permissions,shareType:this.share.type,shareWith:this.share.shareWith,attributes:this.share.attributes,note:this.share.note,fileInfo:this.fileInfo};let r;t.expireDate=this.hasExpirationDate?this.share.expireDate:"",this.isPasswordProtected&&(t.password=this.share.newPassword);try{this.creating=!0,r=await this.addShare(t)}catch{return void(this.creating=!1)}this.share._share.id=r.id,await this.queueUpdate(...e);for(const t of e)if(t in r&&t in this.share)try{r[t]=this.share[t]}catch{r._share[t]=this.share[t]}this.share=r,this.creating=!1,this.$emit("add:share",this.share)}else await this.queueUpdate(...e),this.$emit("update:share",this.share);if(await this.getNode(),(0,Be.Ic)("files:node:updated",this.node),this.$refs.externalShareActions?.length>0){const e=this.$refs.externalShareActions;await Promise.allSettled(e.map(e=>e.save()))}this.$refs.externalLinkActions?.length>0&&await Promise.allSettled(this.$refs.externalLinkActions.map(e=>"function"!=typeof e.$children.at(0)?.onSave?Promise.resolve():e.$children.at(0)?.onSave?.())),this.$emit("close-sharing-details")},async addShare(e){ue.A.debug("Adding a new share from the input for",{share:e});const t=this.path;try{return await this.createShare({path:t,shareType:e.shareType,shareWith:e.shareWith,permissions:e.permissions,expireDate:e.expireDate,attributes:JSON.stringify(e.attributes),...e.note?{note:e.note}:{},...e.password?{password:e.password}:{}})}catch(e){throw ue.A.error("Error while adding new share",{error:e}),e}},async removeShare(){await this.onDelete(),await this.getNode(),(0,Be.Ic)("files:node:updated",this.node),this.$emit("close-sharing-details")},onPasswordChange(e){if(""===e)return this.$delete(this.share,"newPassword"),void(this.passwordError=this.isNewShare&&this.isPasswordEnforced);this.passwordError=!this.isValidShareAttribute(e),this.$set(this.share,"newPassword",e)},onPasswordProtectedByTalkChange(){this.isEmailShareType||this.hasUnsavedPassword?this.queueUpdate("sendPasswordByTalk","password"):this.queueUpdate("sendPasswordByTalk")},isValidShareAttribute:e=>![null,void 0].includes(e)&&e.trim().length>0,getShareTypeIcon(e){switch(e){case O.I.Link:return dt.A;case O.I.Guest:return rt;case O.I.RemoteGroup:case O.I.Group:return nt;case O.I.Email:return ht;case O.I.Team:return st.A;case O.I.Room:case O.I.Deck:case O.I.ScienceMesh:return vt;default:return null}}}};var Lt=i(56677),Rt={};Rt.styleTagTransform=oe(),Rt.setAttributes=ie(),Rt.insert=te().bind(null,"head"),Rt.domAPI=K(),Rt.insertStyleElement=se(),Z()(Lt.A,Rt),Lt.A&&Lt.A.locals&&Lt.A.locals;var Bt=(0,W.A)(Nt,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharingTabDetailsView"},[t("div",{staticClass:"sharingTabDetailsView__header"},[t("span",[e.isUserShare?t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.shareType!==e.ShareType.User,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}):e._e(),e._v(" "),t(e.getShareTypeIcon(e.share.type),{tag:"component",attrs:{size:32}})],1),e._v(" "),t("span",[t("h1",[e._v(e._s(e.title))])])]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__wrapper"},[t("div",{ref:"quickPermissions",staticClass:"sharingTabDetailsView__quick-permissions"},[t("div",[t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"read-only",value:e.bundledPermissions.READ_ONLY.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.toggleCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ViewIcon",{attrs:{size:20}})]},proxy:!0}]),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","View only"))+"\n\t\t\t\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"upload-edit",value:e.allPermissions,name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.toggleCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("EditIcon",{attrs:{size:20}})]},proxy:!0}]),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e.allowsFileDrop?[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow upload and editing"))+"\n\t\t\t\t\t")]:[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow editing"))+"\n\t\t\t\t\t")]],2),e._v(" "),e.allowsFileDrop?t("NcCheckboxRadioSwitch",{attrs:{"data-cy-files-sharing-share-permissions-bundle":"file-drop","button-variant":!0,value:e.bundledPermissions.FILE_DROP.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.toggleCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("UploadIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1083194048),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","File request"))+"\n\t\t\t\t\t"),t("small",{staticClass:"subline"},[e._v(e._s(e.t("files_sharing","Upload only")))])]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"custom",value:"custom",name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.expandCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}]),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t\t"),t("small",{staticClass:"subline"},[e._v(e._s(e.customPermissionsList))])])],1)]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__advanced-control"},[t("NcButton",{attrs:{id:"advancedSectionAccordionAdvancedControl",variant:"tertiary",alignment:"end-reverse","aria-controls":"advancedSectionAccordionAdvanced","aria-expanded":e.advancedControlExpandedValue},on:{click:function(t){e.advancedSectionAccordionExpanded=!e.advancedSectionAccordionExpanded}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.advancedSectionAccordionExpanded?t("MenuUpIcon"):t("MenuDownIcon")]},proxy:!0}])},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Advanced settings"))+"\n\t\t\t\t")])],1),e._v(" "),e.advancedSectionAccordionExpanded?t("div",{staticClass:"sharingTabDetailsView__advanced",attrs:{id:"advancedSectionAccordionAdvanced","aria-labelledby":"advancedSectionAccordionAdvancedControl",role:"region"}},[t("section",[e.isPublicShare?t("NcInputField",{staticClass:"sharingTabDetailsView__label",attrs:{autocomplete:"off",label:e.t("files_sharing","Share label")},model:{value:e.share.label,callback:function(t){e.$set(e.share,"label",t)},expression:"share.label"}}):e._e(),e._v(" "),e.config.allowCustomTokens&&e.isPublicShare&&!e.isNewShare?t("NcInputField",{attrs:{autocomplete:"off",label:e.t("files_sharing","Share link token"),"helper-text":e.t("files_sharing","Set the public share link token to something easy to remember or generate a new token. It is not recommended to use a guessable token for shares which contain sensitive information."),"show-trailing-button":"","trailing-button-label":e.loadingToken?e.t("files_sharing","Generating…"):e.t("files_sharing","Generate new token")},on:{"trailing-button-click":e.generateNewToken},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[e.loadingToken?t("NcLoadingIcon"):t("Refresh",{attrs:{size:20}})]},proxy:!0}],null,!1,4228062821),model:{value:e.share.token,callback:function(t){e.$set(e.share,"token",t)},expression:"share.token"}}):e._e(),e._v(" "),e.isPublicShare?[t("NcCheckboxRadioSwitch",{attrs:{disabled:e.isPasswordEnforced},model:{value:e.isPasswordProtected,callback:function(t){e.isPasswordProtected=t},expression:"isPasswordProtected"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Set password"))+"\n\t\t\t\t\t")]),e._v(" "),e.isPasswordProtected?t("NcPasswordField",{attrs:{autocomplete:"new-password","model-value":e.share.newPassword??"",error:e.passwordError,"helper-text":e.errorPasswordLabel||e.passwordHint,required:e.isPasswordEnforced&&e.isNewShare,label:e.t("files_sharing","Password")},on:{"update:value":e.onPasswordChange}}):e._e(),e._v(" "),e.isEmailShareType&&e.passwordExpirationTime?t("span",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expires {passwordExpirationTime}",{passwordExpirationTime:e.passwordExpirationTime}))+"\n\t\t\t\t\t")]):e.isEmailShareType&&null!==e.passwordExpirationTime?t("span",{attrs:{icon:"icon-error"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expired"))+"\n\t\t\t\t\t")]):e._e()]:e._e(),e._v(" "),e.canTogglePasswordProtectedByTalkAvailable?t("NcCheckboxRadioSwitch",{on:{"update:modelValue":e.onPasswordProtectedByTalkChange},model:{value:e.isPasswordProtectedByTalk,callback:function(t){e.isPasswordProtectedByTalk=t},expression:"isPasswordProtectedByTalk"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Video verification"))+"\n\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:e.isExpiryDateEnforced},model:{value:e.hasExpirationDate,callback:function(t){e.hasExpirationDate=t},expression:"hasExpirationDate"}},[e._v("\n\t\t\t\t\t"+e._s(e.isExpiryDateEnforced?e.t("files_sharing","Expiration date (enforced)"):e.t("files_sharing","Set expiration date"))+"\n\t\t\t\t")]),e._v(" "),e.hasExpirationDate?t("NcDateTimePickerNative",{attrs:{id:"share-date-picker","model-value":new Date(e.share.expireDate??e.dateTomorrow),min:e.dateTomorrow,max:e.maxExpirationDateEnforced,"hide-label":"",label:e.t("files_sharing","Expiration date"),placeholder:e.t("files_sharing","Expiration date"),type:"date"},on:{input:e.onExpirationChange}}):e._e(),e._v(" "),e.isPublicShare?t("NcCheckboxRadioSwitch",{attrs:{disabled:e.canChangeHideDownload},on:{"update:modelValue":function(t){return e.queueUpdate("hideDownload")}},model:{value:e.share.hideDownload,callback:function(t){e.$set(e.share,"hideDownload",t)},expression:"share.hideDownload"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Hide download"))+"\n\t\t\t\t")]):t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDownload,"data-cy-files-sharing-share-permissions-checkbox":"download"},model:{value:e.canDownload,callback:function(t){e.canDownload=t},expression:"canDownload"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Allow download and sync"))+"\n\t\t\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{model:{value:e.writeNoteToRecipientIsChecked,callback:function(t){e.writeNoteToRecipientIsChecked=t},expression:"writeNoteToRecipientIsChecked"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Note to recipient"))+"\n\t\t\t\t")]),e._v(" "),e.writeNoteToRecipientIsChecked?[t("NcTextArea",{attrs:{label:e.t("files_sharing","Note to recipient"),placeholder:e.t("files_sharing","Enter a note for the share recipient")},model:{value:e.share.note,callback:function(t){e.$set(e.share,"note",t)},expression:"share.note"}})]:e._e(),e._v(" "),e.isPublicShare&&e.isFolder?t("NcCheckboxRadioSwitch",{model:{value:e.showInGridView,callback:function(t){e.showInGridView=t},expression:"showInGridView"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Show files in grid view"))+"\n\t\t\t\t")]):e._e(),e._v(" "),e._l(e.sortedExternalShareActions,function(r){return t("SidebarTabExternalAction",{key:r.id,ref:"externalShareActions",refInFor:!0,attrs:{action:r,node:e.fileInfo.node,share:e.share}})}),e._v(" "),e._l(e.externalLegacyShareActions,function(r){return t("SidebarTabExternalActionLegacy",{key:r.id,ref:"externalLinkActions",refInFor:!0,attrs:{id:r.id,action:r,"file-info":e.fileInfo,share:e.share}})}),e._v(" "),t("NcCheckboxRadioSwitch",{model:{value:e.setCustomPermissions,callback:function(t){e.setCustomPermissions=t},expression:"setCustomPermissions"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t")]),e._v(" "),e.setCustomPermissions?t("section",{staticClass:"custom-permissions-group"},[t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canRemoveReadPermission,"data-cy-files-sharing-share-permissions-checkbox":"read"},model:{value:e.hasRead,callback:function(t){e.hasRead=t},expression:"hasRead"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Read"))+"\n\t\t\t\t\t")]),e._v(" "),e.isFolder?t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetCreate,"data-cy-files-sharing-share-permissions-checkbox":"create"},model:{value:e.canCreate,callback:function(t){e.canCreate=t},expression:"canCreate"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Create"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetEdit,"data-cy-files-sharing-share-permissions-checkbox":"update"},model:{value:e.canEdit,callback:function(t){e.canEdit=t},expression:"canEdit"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Edit"))+"\n\t\t\t\t\t")]),e._v(" "),e.resharingIsPossible?t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetReshare,"data-cy-files-sharing-share-permissions-checkbox":"share"},model:{value:e.canReshare,callback:function(t){e.canReshare=t},expression:"canReshare"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Share"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDelete,"data-cy-files-sharing-share-permissions-checkbox":"delete"},model:{value:e.canDelete,callback:function(t){e.canDelete=t},expression:"canDelete"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Delete"))+"\n\t\t\t\t\t")])],1):e._e()],2)]):e._e()]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__footer"},[t("div",{staticClass:"button-group"},[t("NcButton",{attrs:{"data-cy-files-sharing-share-editor-action":"cancel"},on:{click:e.cancel}},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t\t")]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__delete"},[e.isNewShare?e._e():t("NcButton",{attrs:{"aria-label":e.t("files_sharing","Delete share"),disabled:!1,readonly:!1,variant:"tertiary"},on:{click:function(t){return t.preventDefault(),e.removeShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Delete share"))+"\n\t\t\t\t")])],1),e._v(" "),t("NcButton",{attrs:{variant:"primary","data-cy-files-sharing-share-editor-action":"save",disabled:e.creating},on:{click:e.saveShare},scopedSlots:e._u([e.creating?{key:"icon",fn:function(){return[t("NcLoadingIcon")]},proxy:!0}:null],null,!0)},[e._v("\n\t\t\t\t"+e._s(e.shareButtonText)+"\n\t\t\t\t")])],1)])])},[],!1,null,"26224d91",null);const Ot=Bt.exports;var Mt=i(71225),Vt=i(57908),Ut=i(71711);const $t={name:"SharingEntryInherited",components:{NcActionButton:q.A,NcActionLink:Vt.A,NcActionText:Ut.A,NcAvatar:M.A,SharingEntrySimple:ce},mixins:[Pt],props:{share:{type:Ne,required:!0}},computed:{viaFileTargetUrl(){return de(this.share.viaFileid)},viaFolderName(){return(0,Mt.P8)(this.share.viaPath)}}};var Ft=i(50618),Ht={};Ht.styleTagTransform=oe(),Ht.setAttributes=ie(),Ht.insert=te().bind(null,"head"),Ht.domAPI=K(),Ht.insertStyleElement=se(),Z()(Ft.A,Ht),Ft.A&&Ft.A.locals&&Ft.A.locals;var qt=(0,W.A)($t,function(){var e=this,t=e._self._c;return t("SharingEntrySimple",{key:e.share.id,staticClass:"sharing-entry__inherited",attrs:{title:e.share.shareWithDisplayName},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:e.share.shareWith,"display-name":e.share.shareWithDisplayName}})]},proxy:!0}])},[e._v(" "),t("NcActionText",{attrs:{icon:"icon-user"}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Added by {initiator}",{initiator:e.share.ownerDisplayName}))+"\n\t")]),e._v(" "),e.share.viaPath&&e.share.viaFileid?t("NcActionLink",{attrs:{icon:"icon-folder",href:e.viaFileTargetUrl}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Via “{folder}”",{folder:e.viaFolderName}))+"\n\t")]):e._e(),e._v(" "),e.share.canDelete?t("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(t){return t.preventDefault(),e.onDelete.apply(null,arguments)}}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Unshare"))+"\n\t")]):e._e()],1)},[],!1,null,"731a9650",null);const zt=qt.exports,jt={name:"SharingInherited",components:{NcActionButton:q.A,SharingEntryInherited:zt,SharingEntrySimple:ce},props:{fileInfo:{type:Object,required:!0}},data:()=>({loaded:!1,loading:!1,showInheritedShares:!1,shares:[]}),computed:{showInheritedSharesIcon(){return this.loading?"icon-loading-small":this.showInheritedShares?"icon-triangle-n":"icon-triangle-s"},mainTitle:()=>t("files_sharing","Others with access"),subTitle(){return this.showInheritedShares&&0===this.shares.length?t("files_sharing","No other accounts with access found"):""},toggleTooltip(){return"dir"===this.fileInfo.type?t("files_sharing","Toggle list of others with access to this directory"):t("files_sharing","Toggle list of others with access to this file")},fullPath(){return`${this.fileInfo.path}/${this.fileInfo.name}`.replace("//","/")}},watch:{fileInfo(){this.resetState()}},methods:{toggleInheritedShares(){this.showInheritedShares=!this.showInheritedShares,this.showInheritedShares?this.fetchInheritedShares():this.resetState()},async fetchInheritedShares(){this.loading=!0;try{const e=(0,B.KT)("apps/files_sharing/api/v1/shares/inherited?format=json&path={path}",{path:this.fullPath}),t=await h.Ay.get(e);this.shares=t.data.ocs.data.map(e=>new Ne(e)).sort((e,t)=>t.createdTime-e.createdTime),this.loaded=!0}catch{OC.Notification.showTemporary(t("files_sharing","Unable to fetch inherited shares"),{type:"error"})}finally{this.loading=!1}},resetState(){this.loaded=!1,this.loading=!1,this.showInheritedShares=!1,this.shares=[]},removeShare(e){const t=this.shares.findIndex(t=>t===e);this.shares.splice(t,1)}}};var Wt=i(27920),Gt={};Gt.styleTagTransform=oe(),Gt.setAttributes=ie(),Gt.insert=te().bind(null,"head"),Gt.domAPI=K(),Gt.insertStyleElement=se(),Z()(Wt.A,Gt),Wt.A&&Wt.A.locals&&Wt.A.locals;var Yt=(0,W.A)(jt,function(){var e=this,t=e._self._c;return t("ul",{attrs:{id:"sharing-inherited-shares"}},[t("SharingEntrySimple",{staticClass:"sharing-entry__inherited",attrs:{title:e.mainTitle,subtitle:e.subTitle,"aria-expanded":e.showInheritedShares},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("div",{staticClass:"avatar-shared icon-more-white"})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{icon:e.showInheritedSharesIcon,"aria-label":e.toggleTooltip,title:e.toggleTooltip},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggleInheritedShares.apply(null,arguments)}}})],1),e._v(" "),e._l(e.shares,function(r){return t("SharingEntryInherited",{key:r.id,attrs:{"file-info":e.fileInfo,share:r},on:{"remove:share":e.removeShare}})})],2)},[],!1,null,"cedf3238",null);const Qt=Yt.exports;var Xt=i(17816),Zt=i.n(Xt),Jt=i(9165),Kt=i(73891),er=i(44131),tr=i(15502),rr=i(94219),ir=i(6695);const nr={name:"CalendarBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},sr=(0,W.A)(nr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon calendar-blank-outline-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:"M19 3H18V1H16V3H8V1H6V3H5C3.89 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H19C20.11 21 21 20.11 21 19V5C21 3.9 20.11 3 19 3M19 19H5V9H19V19M19 7H5V5H19V7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,ar={name:"CheckBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},or=(0,W.A)(ar,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon check-bold-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:"M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,lr={name:"ExclamationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},hr=(0,W.A)(lr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon exclamation-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:"M 11,4L 13,4L 13,15L 11,15L 11,4 Z M 13,18L 13,20L 11,20L 11,18L 13,18 Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,cr={name:"LockOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ur=(0,W.A)(cr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon lock-outline-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:"M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var dr=i(96078);const pr={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},fr=(0,W.A)(pr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon qrcode-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:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,gr={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ar=(0,W.A)(gr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon tune-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:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var mr=i(4604);const yr={name:"ClockOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vr=(0,W.A)(yr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon clock-outline-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:"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,wr={name:"ShareExpiryTime",components:{NcButton:V.A,NcPopover:$.N,NcDateTime:mr.A,ClockIcon:vr},props:{share:{type:Object,required:!0}},computed:{expiryTime(){return this.share?.expireDate?new Date(this.share.expireDate).getTime():null},timeFormat:()=>({dateStyle:"full",timeStyle:"short"})}};var _r=i(5016),Cr={};Cr.styleTagTransform=oe(),Cr.setAttributes=ie(),Cr.insert=te().bind(null,"head"),Cr.domAPI=K(),Cr.insertStyleElement=se(),Z()(_r.A,Cr),_r.A&&_r.A.locals&&_r.A.locals;const br=(0,W.A)(wr,function(){var e=this,t=e._self._c;return t("div",{staticClass:"share-expiry-time"},[t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[e.expiryTime?t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary","aria-label":e.t("files_sharing","Share expiration: {date}",{date:new Date(e.expiryTime).toLocaleString()})},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ClockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,3754271979)}):e._e()]},proxy:!0}])},[e._v(" "),t("h3",{staticClass:"hint-heading"},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Share Expiration"))+"\n\t\t")]),e._v(" "),e.expiryTime?t("p",{staticClass:"hint-body"},[t("NcDateTime",{attrs:{timestamp:e.expiryTime,format:e.timeFormat,"relative-time":!1}}),e._v(" ("),t("NcDateTime",{attrs:{timestamp:e.expiryTime}}),e._v(")\n\t\t")],1):e._e()])],1)},[],!1,null,"c9199db0",null).exports,Er={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Sr=(0,W.A)(Er,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-outline-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:"M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,xr={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ir={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:(0,W.A)(xr,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon triangle-small-down-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:"M8 9H16L12 16"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,NcActions:Y.A,NcActionButton:q.A},mixins:[Pt,Re],props:{share:{type:Object,required:!0}},emits:["open-sharing-details"],data:()=>({selectedOption:""}),computed:{ariaLabel(){return t("files_sharing",'Quick share options, the current selected is "{selectedOption}"',{selectedOption:this.selectedOption})},canViewText:()=>t("files_sharing","View only"),canEditText:()=>t("files_sharing","Can edit"),fileDropText:()=>t("files_sharing","File request"),customPermissionsText:()=>t("files_sharing","Custom permissions"),preSelectedOption(){return(-17&this.share.permissions)===Ee.READ_ONLY?this.canViewText:this.share.permissions===Ee.ALL||this.share.permissions===Ee.ALL_FILE?this.canEditText:(-17&this.share.permissions)===Ee.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const e=[{label:this.canViewText,icon:Sr},{label:this.canEditText,icon:gt.A}];return this.supportsFileDrop&&e.push({label:this.fileDropText,icon:_t}),e.push({label:this.customPermissionsText,icon:Ar}),e},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){const e=this.share.type??this.share.shareType;return[O.I.Link,O.I.Email].includes(e)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?Ee.ALL:Ee.ALL_FILE;case this.fileDropText:return Ee.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return Ee.READ_ONLY}}},created(){this.selectedOption=this.preSelectedOption},mounted(){(0,Be.B1)("update:share",e=>{e.id===this.share.id&&(this.share.permissions=e.permissions,this.selectedOption=this.preSelectedOption)})},unmounted(){(0,Be.al)("update:share")},methods:{selectOption(e){this.selectedOption=e,e===this.customPermissionsText?this.$emit("open-sharing-details"):(this.share.permissions=this.dropDownPermissionValue,this.queueUpdate("permissions"),this.$refs.quickShareActions.$refs.menuButton.$el.focus())}}},kr=Ir;var Tr=i(31868),Dr={};Dr.styleTagTransform=oe(),Dr.setAttributes=ie(),Dr.insert=te().bind(null,"head"),Dr.domAPI=K(),Dr.insertStyleElement=se(),Z()(Tr.A,Dr),Tr.A&&Tr.A.locals&&Tr.A.locals;const Pr=(0,W.A)(kr,function(){var e=this,t=e._self._c;return t("NcActions",{ref:"quickShareActions",staticClass:"share-select",attrs:{"menu-name":e.selectedOption,"aria-label":e.ariaLabel,variant:"tertiary-no-background",disabled:!e.share.canEdit,"force-name":""},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[e._v(" "),e._l(e.options,function(r){return t("NcActionButton",{key:r.label,attrs:{type:"radio","model-value":r.label===e.selectedOption,"close-after-click":""},on:{click:function(t){return e.selectOption(r.label)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(r.icon,{tag:"component"})]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(r.label)+"\n\t")])})],2)},[],!1,null,"61e49a3a",null).exports,Nr={name:"SharingEntryLink",components:{NcActions:Y.A,NcActionButton:q.A,NcActionCheckbox:Kt.N,NcActionInput:er.A,NcActionText:Ut.A,NcActionSeparator:tr.A,NcAvatar:M.A,NcDialog:rr.A,NcIconSvgWrapper:ir.A,NcLoadingIcon:Je.A,VueQrcode:Zt(),Tune:Ar,IconCalendarBlank:sr,IconQr:fr,ErrorIcon:hr,LockIcon:ur,CheckIcon:or,CloseIcon:at.A,PlusIcon:dr.A,SharingEntryQuickShareSelect:Pr,ShareExpiryTime:br,SidebarTabExternalActionLegacy:St},mixins:[Pt,Re],props:{canReshare:{type:Boolean,default:!0},index:{type:Number,default:null}},setup:()=>({mdiCheck:Jt.Tfj,mdiContentCopy:Jt.$BT}),data:()=>({shareCreationComplete:!1,copySuccess:!1,defaultExpirationDateEnabled:!1,pending:!1,ExternalShareActions:OCA.Sharing.ExternalShareActions.state,externalShareActions:[...window._nc_files_sharing_sidebar_inline_actions?.values()??[]],showQRCode:!1}),computed:{title(){const e={escape:!1};if(this.share&&this.share.id){if(!this.isShareOwner&&this.share.ownerDisplayName)return this.isEmailShareType?(0,p.t)("files_sharing","{shareWith} by {initiator}",{shareWith:this.share.shareWith,initiator:this.share.ownerDisplayName},e):(0,p.t)("files_sharing","Shared via link by {initiator}",{initiator:this.share.ownerDisplayName},e);if(this.share.label&&""!==this.share.label.trim())return this.isEmailShareType?this.isFileRequest?(0,p.t)("files_sharing","File request ({label})",{label:this.share.label.trim()},e):(0,p.t)("files_sharing","Mail share ({label})",{label:this.share.label.trim()},e):(0,p.t)("files_sharing","Share link ({label})",{label:this.share.label.trim()},e);if(this.isEmailShareType)return this.share.shareWith&&""!==this.share.shareWith.trim()?this.share.shareWith:this.isFileRequest?(0,p.t)("files_sharing","File request"):(0,p.t)("files_sharing","Mail share");if(null===this.index)return(0,p.t)("files_sharing","Share link")}return this.index>=1?(0,p.t)("files_sharing","Share link ({index})",{index:this.index}):(0,p.t)("files_sharing","Create public link")},subtitle(){return this.isEmailShareType&&this.title!==this.share.shareWith?this.share.shareWith:null},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const e=(0,R.A)(this.share.passwordExpirationTime);return!(e.diff((0,R.A)())<0)&&e.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(e){this.share.sendPasswordByTalk=e}},isEmailShareType(){return!!this.share&&this.share.type===O.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingDataIsMissing(){return this.pendingPassword||this.pendingEnforcedPassword||this.pendingDefaultExpirationDate||this.pendingEnforcedExpirationDate},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.isPendingShare},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.isPendingShare},pendingEnforcedExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.isPendingShare},pendingDefaultExpirationDate(){return(this.config.defaultExpirationDate instanceof Date||!isNaN(new Date(this.config.defaultExpirationDate).getTime()))&&this.isPendingShare},isPendingShare(){return!(!this.share||this.share.id)},sharePolicyHasEnforcedProperties(){return this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced},enforcedPropertiesMissing(){if(!this.sharePolicyHasEnforcedProperties)return!1;if(!this.share)return!0;if(this.share.id)return!0;const e=this.config.enforcePasswordForPublicLink&&!this.share.newPassword,t=this.config.isDefaultExpireDateEnforced&&!this.share.expireDate;return e||t},hasUnsavedPassword(){return void 0!==this.share.newPassword},shareLink(){return(0,B.Jv)("/s/{token}",{token:this.share.token},{baseURL:(0,B.$_)()})},actionsTooltip(){return(0,p.t)("files_sharing",'Actions for "{title}"',{title:this.title})},copyLinkLabel(){return(0,p.t)("files_sharing",'Copy public link of "{title}"',{title:this.title})},externalLegacyShareActions(){return ue.A.error("external legacy actions",{ExternalShareActions:this.ExternalShareActions}),this.ExternalShareActions.actions.filter(e=>(e.shareType.includes(O.I.Link)||e.shareType.includes(O.I.Email))&&!e.advanced)},sortedExternalShareActions(){return this.externalShareActions.filter(e=>e.enabled((0,He.ux)(this.share),(0,He.ux)(this.fileInfo.node))).sort((e,t)=>e.order-t.order)},isPasswordPolicyEnabled(){return"object"==typeof this.config.passwordPolicy},canChangeHideDownload(){return this.fileInfo.shareAttributes.some(e=>"permissions"===e.scope&&"download"===e.key&&!1===e.value)},isFileRequest(){return this.share.isFileRequest}},mounted(){this.defaultExpirationDateEnabled=this.config.defaultExpirationDate instanceof Date,this.share&&this.isNewShare&&(this.share.expireDate=this.defaultExpirationDateEnabled?this.formatDateToString(this.config.defaultExpirationDate):"")},methods:{shareRequiresReview(e){return!e&&(this.defaultExpirationDateEnabled||this.config.enableLinkPasswordByDefault)},async onNewLinkShare(e=!1){if(ue.A.debug("onNewLinkShare called (with this.share)",this.share),this.loading)return;const t={share_type:O.I.Link};if(this.config.isDefaultExpireDateEnforced&&(t.expiration=this.formatDateToString(this.config.defaultExpirationDate)),ue.A.debug("Missing required properties?",this.enforcedPropertiesMissing),this.sharePolicyHasEnforcedProperties&&this.enforcedPropertiesMissing||this.shareRequiresReview(!0===e)){this.pending=!0,this.shareCreationComplete=!1,ue.A.info("Share policy requires a review or has mandated properties (password, expirationDate)...");const e=new Ne(t);(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&this.$set(e,"newPassword",await Dt(!0));const r=await new Promise(t=>{this.$emit("add:share",e,t)});this.open=!1,this.pending=!1,r.open=!0}else{if(this.share&&!this.share.id){if(this.checkShare(this.share)){try{ue.A.info("Sending existing share to server",this.share),await this.pushNewLinkShare(this.share,!0),this.shareCreationComplete=!0,ue.A.info("Share created on server",this.share)}catch(e){return this.pending=!1,ue.A.error("Error creating share",e),!1}return!0}return this.open=!0,(0,H.Qg)((0,p.t)("files_sharing","Error, please enter proper password and/or expiration date")),!1}const e=new Ne(t);await this.pushNewLinkShare(e),this.shareCreationComplete=!0}},async pushNewLinkShare(e,t){try{if(this.loading)return!0;this.loading=!0,this.errors={};const r={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:O.I.Link,password:e.newPassword,expireDate:e.expireDate??"",attributes:JSON.stringify(this.fileInfo.shareAttributes)};ue.A.debug("Creating link share with options",{options:r});const i=await this.createShare(r);let n;this.open=!1,this.shareCreationComplete=!0,ue.A.debug("Link share created",{newShare:i}),n=t?await new Promise(e=>{this.$emit("update:share",i,e)}):await new Promise(e=>{this.$emit("add:share",i,e)}),await this.getNode(),(0,Be.Ic)("files:node:updated",this.node),this.config.enforcePasswordForPublicLink||n.copyLink(),(0,H.Te)((0,p.t)("files_sharing","Link share created"))}catch(e){const t=e?.response?.data?.ocs?.meta?.message;if(!t)return(0,H.Qg)((0,p.t)("files_sharing","Error while creating the share")),void ue.A.error("Error while creating the share",{error:e});throw t.match(/password/i)?this.onSyncError("password",t):t.match(/date/i)?this.onSyncError("expireDate",t):this.onSyncError("pending",t),e}finally{this.loading=!1,this.shareCreationComplete=!0}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,H.Te)((0,p.t)("files_sharing","Link copied")),this.$refs.copyButton.$el.focus()}catch(e){ue.A.debug("Failed to automatically copy share link",{error:e}),window.prompt((0,p.t)("files_sharing","Your browser does not support copying, please copy the link manually:"),this.shareLink)}finally{this.copySuccess=!0,setTimeout(()=>{this.copySuccess=!1},4e3)}},onPasswordChange(e){this.$set(this.share,"newPassword",e)},onPasswordDisable(){this.$set(this.share,"newPassword",""),this.share.id&&this.queueUpdate("password")},onPasswordSubmit(){this.hasUnsavedPassword&&(this.share.newPassword=this.share.newPassword.trim(),this.queueUpdate("password"))},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.newPassword=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},onMenuClose(){this.onPasswordSubmit(),this.onNoteSubmit()},onExpirationDateToggleUpdate(e){this.share.expireDate=e?this.formatDateToString(this.config.defaultExpirationDate):""},expirationDateChanged(e){const t=e?.target?.value,r=!!t&&!isNaN(new Date(t).getTime());this.defaultExpirationDateEnabled=r},onCancel(){this.shareCreationComplete||this.$emit("remove:share",this.share)}}},Lr=Nr;var Rr=i(12231),Br={};Br.styleTagTransform=oe(),Br.setAttributes=ie(),Br.insert=te().bind(null,"head"),Br.domAPI=K(),Br.insertStyleElement=se(),Z()(Rr.A,Br),Rr.A&&Rr.A.locals&&Rr.A.locals;var Or=(0,W.A)(Lr,function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry sharing-entry__link",class:{"sharing-entry--share":e.share}},[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":!0,"icon-class":e.isEmailShareType?"avatar-link-share icon-mail-white":"avatar-link-share icon-public-white"}}),e._v(" "),t("div",{staticClass:"sharing-entry__summary"},[t("div",{staticClass:"sharing-entry__desc"},[t("span",{staticClass:"sharing-entry__title",attrs:{title:e.title}},[e._v("\n\t\t\t\t"+e._s(e.title)+"\n\t\t\t")]),e._v(" "),e.subtitle?t("p",[e._v("\n\t\t\t\t"+e._s(e.subtitle)+"\n\t\t\t")]):e._e(),e._v(" "),e.share&&void 0!==e.share.permissions?t("SharingEntryQuickShareSelect",{attrs:{share:e.share,"file-info":e.fileInfo},on:{"open-sharing-details":function(t){return e.openShareDetailsForCustomSettings(e.share)}}}):e._e()],1),e._v(" "),t("div",{staticClass:"sharing-entry__actions"},[e.share&&e.share.expireDate?t("ShareExpiryTime",{attrs:{share:e.share}}):e._e(),e._v(" "),t("div",[e.share&&(!e.isEmailShareType||e.isFileRequest)&&e.share.token?t("NcActions",{ref:"copyButton",staticClass:"sharing-entry__copy"},[t("NcActionButton",{attrs:{"aria-label":e.copyLinkLabel,title:e.copySuccess?e.t("files_sharing","Successfully copied public link"):void 0,href:e.shareLink},on:{click:function(t){return t.preventDefault(),e.copyLink.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("NcIconSvgWrapper",{staticClass:"sharing-entry__copy-icon",class:{"sharing-entry__copy-icon--success":e.copySuccess},attrs:{path:e.copySuccess?e.mdiCheck:e.mdiContentCopy}})]},proxy:!0}],null,!1,1728815133)})],1):e._e()],1)],1)]),e._v(" "),!e.pending&&e.pendingDataIsMissing?t("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":e.actionsTooltip,"menu-align":"right",open:e.open},on:{"update:open":function(t){e.open=t},close:e.onCancel}},[e.errors.pending?t("NcActionText",{staticClass:"error",scopedSlots:e._u([{key:"icon",fn:function(){return[t("ErrorIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1966124155)},[e._v("\n\t\t\t"+e._s(e.errors.pending)+"\n\t\t")]):t("NcActionText",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Please enter the following required information before creating the share"))+"\n\t\t")]),e._v(" "),e.pendingPassword?t("NcActionCheckbox",{staticClass:"share-link-password-checkbox",attrs:{disabled:e.config.enforcePasswordForPublicLink||e.saving},on:{uncheck:e.onPasswordDisable},model:{value:e.isPasswordProtected,callback:function(t){e.isPasswordProtected=t},expression:"isPasswordProtected"}},[e._v("\n\t\t\t"+e._s(e.config.enforcePasswordForPublicLink?e.t("files_sharing","Password protection (enforced)"):e.t("files_sharing","Password protection"))+"\n\t\t")]):e._e(),e._v(" "),e.pendingEnforcedPassword||e.isPasswordProtected?t("NcActionInput",{staticClass:"share-link-password",attrs:{label:e.t("files_sharing","Enter a password"),disabled:e.saving,required:e.config.enableLinkPasswordByDefault||e.config.enforcePasswordForPublicLink,minlength:e.isPasswordPolicyEnabled&&e.config.passwordPolicy.minLength,autocomplete:"new-password"},on:{submit:function(t){return e.onNewLinkShare(!0)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("LockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2056568168),model:{value:e.share.newPassword,callback:function(t){e.$set(e.share,"newPassword",t)},expression:"share.newPassword"}}):e._e(),e._v(" "),e.pendingDefaultExpirationDate?t("NcActionCheckbox",{staticClass:"share-link-expiration-date-checkbox",attrs:{disabled:e.pendingEnforcedExpirationDate||e.saving},on:{"update:model-value":e.onExpirationDateToggleUpdate},model:{value:e.defaultExpirationDateEnabled,callback:function(t){e.defaultExpirationDateEnabled=t},expression:"defaultExpirationDateEnabled"}},[e._v("\n\t\t\t"+e._s(e.config.isDefaultExpireDateEnforced?e.t("files_sharing","Enable link expiration (enforced)"):e.t("files_sharing","Enable link expiration"))+"\n\t\t")]):e._e(),e._v(" "),(e.pendingDefaultExpirationDate||e.pendingEnforcedExpirationDate)&&e.defaultExpirationDateEnabled?t("NcActionInput",{staticClass:"share-link-expire-date",attrs:{"data-cy-files-sharing-expiration-date-input":"",label:e.pendingEnforcedExpirationDate?e.t("files_sharing","Enter expiration date (enforced)"):e.t("files_sharing","Enter expiration date"),disabled:e.saving,"is-native-picker":!0,"hide-label":!0,"model-value":new Date(e.share.expireDate),type:"date",min:e.dateTomorrow,max:e.maxExpirationDateEnforced},on:{"update:model-value":e.onExpirationChange,change:e.expirationDateChanged},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconCalendarBlank",{attrs:{size:20}})]},proxy:!0}],null,!1,3418578971)}):e._e(),e._v(" "),t("NcActionButton",{attrs:{disabled:e.pendingEnforcedPassword&&!e.share.newPassword},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare(!0)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CheckIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2630571749)},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Create share"))+"\n\t\t")]),e._v(" "),t("NcActionButton",{on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onCancel.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t")])],1):e.loading?t("NcLoadingIcon",{staticClass:"sharing-entry__loading"}):t("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":e.actionsTooltip,"menu-align":"right",open:e.open},on:{"update:open":function(t){e.open=t},close:e.onMenuClose}},[e.share?[e.share.canEdit&&e.canReshare?[t("NcActionButton",{attrs:{disabled:e.saving,"close-after-click":!0},on:{click:function(t){return t.preventDefault(),e.openSharingDetails.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Tune",{attrs:{size:20}})]},proxy:!0}],null,!1,1300586850)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Customize link"))+"\n\t\t\t\t")])]:e._e(),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){t.preventDefault(),e.showQRCode=!0}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconQr",{attrs:{size:20}})]},proxy:!0}],null,!1,1082198240)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Generate QR code"))+"\n\t\t\t")]),e._v(" "),t("NcActionSeparator"),e._v(" "),e._l(e.sortedExternalShareActions,function(r){return t("NcActionButton",{key:r.id,on:{click:function(t){return r.exec(e.share,e.fileInfo.node)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("NcIconSvgWrapper",{attrs:{svg:r.iconSvg}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t"+e._s(r.label(e.share,e.fileInfo.node))+"\n\t\t\t")])}),e._v(" "),e._l(e.externalLegacyShareActions,function(r){return t("SidebarTabExternalActionLegacy",{key:r.id,attrs:{id:r.id,action:r,"file-info":e.fileInfo,share:e.share}})}),e._v(" "),!e.isEmailShareType&&e.canReshare?t("NcActionButton",{staticClass:"new-share-link",on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("PlusIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2953566425)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Add another link"))+"\n\t\t\t")]):e._e(),e._v(" "),e.share.canDelete?t("NcActionButton",{attrs:{disabled:e.saving},on:{click:function(t){return t.preventDefault(),e.onDelete.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Unshare"))+"\n\t\t\t")]):e._e()]:e.canReshare?t("NcActionButton",{staticClass:"new-share-link",attrs:{title:e.t("files_sharing","Create a new share link"),"aria-label":e.t("files_sharing","Create a new share link"),icon:e.loading?"icon-loading-small":"icon-add"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare.apply(null,arguments)}}}):e._e()],2),e._v(" "),e.showQRCode?t("NcDialog",{attrs:{size:"normal",open:e.showQRCode,name:e.title,"close-on-click-outside":!0},on:{"update:open":function(t){e.showQRCode=t},close:function(t){e.showQRCode=!1}}},[t("div",{staticClass:"qr-code-dialog"},[t("VueQrcode",{staticClass:"qr-code-dialog__img",attrs:{tag:"img",value:e.shareLink}})],1)]):e._e()],1)},[],!1,null,"4ca4172c",null);const Mr={name:"SharingLinkList",components:{SharingEntryLink:Or.exports},mixins:[Re],props:{fileInfo:{type:Object,required:!0},shares:{type:Array,required:!0},canReshare:{type:Boolean,required:!0}},data:()=>({canLinkShare:(0,c.F)().files_sharing.public.enabled}),computed:{hasLinkShares(){return this.shares.filter(e=>e.type===O.I.Link).length>0},hasShares(){return this.shares.length>0}},methods:{t:p.t,addShare(e,t){this.shares.push(e),this.awaitForShare(e,t)},awaitForShare(e,t){this.$nextTick(()=>{const r=this.$children.find(t=>t.share===e);r&&t(r)})},removeShare(e){const t=this.shares.findIndex(t=>t===e);this.shares.splice(t,1)}}};var Vr=(0,W.A)(Mr,function(){var e=this,t=e._self._c;return e.canLinkShare?t("ul",{staticClass:"sharing-link-list",attrs:{"aria-label":e.t("files_sharing","Link shares")}},[e.hasShares?e._l(e.shares,function(r,i){return t("SharingEntryLink",{key:r.id,attrs:{index:e.shares.length>1?i+1:null,"can-reshare":e.canReshare,share:e.shares[i],"file-info":e.fileInfo},on:{"update:share":[function(t){return e.$set(e.shares,i,t)},function(t){return e.awaitForShare(...arguments)}],"add:share":function(t){return e.addShare(...arguments)},"remove:share":e.removeShare,"open-sharing-details":function(t){return e.openSharingDetails(r)}}})}):e._e(),e._v(" "),!e.hasLinkShares&&e.canReshare?t("SharingEntryLink",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo},on:{"add:share":e.addShare}}):e._e()],2):e._e()},[],!1,null,null,null);const Ur=Vr.exports,$r={name:"SharingEntry",components:{NcButton:V.A,NcAvatar:M.A,DotsHorizontalIcon:ot.A,NcSelect:ye.default,ShareExpiryTime:br,SharingEntryQuickShareSelect:Pr},mixins:[Pt,Re],computed:{title(){let e=this.share.shareWithDisplayName;const r=this.config.showFederatedSharesAsInternal||this.share.isTrustedServer&&this.config.showFederatedSharesToTrustedServersAsInternal;return this.share.type===O.I.Group||this.share.type===O.I.RemoteGroup&&r?e+=` (${t("files_sharing","group")})`:this.share.type===O.I.Room?e+=` (${t("files_sharing","conversation")})`:this.share.type!==O.I.Remote||r?this.share.type===O.I.RemoteGroup?e+=` (${t("files_sharing","remote group")})`:this.share.type===O.I.Guest&&(e+=` (${t("files_sharing","guest")})`):e+=` (${t("files_sharing","remote")})`,!this.isShareOwner&&this.share.ownerDisplayName&&(e+=" "+t("files_sharing","by {initiator}",{initiator:this.share.ownerDisplayName})),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===O.I.Group?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===O.I.Room?t("files_sharing","Shared with the conversation {user} by {owner}",e):t("files_sharing","Shared with {user} by {owner}",e)}return null},hasStatus(){return this.share.type===O.I.User&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var Fr=i(10322),Hr={};Hr.styleTagTransform=oe(),Hr.setAttributes=ie(),Hr.insert=te().bind(null,"head"),Hr.domAPI=K(),Hr.insertStyleElement=se(),Z()(Fr.A,Hr),Fr.A&&Fr.A.locals&&Fr.A.locals;const qr={name:"SharingList",components:{SharingEntry:(0,W.A)($r,function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry"},[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.type!==e.ShareType.User,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}),e._v(" "),t("div",{staticClass:"sharing-entry__summary"},[t(e.share.shareWithLink?"a":"div",{tag:"component",staticClass:"sharing-entry__summary__desc",attrs:{title:e.tooltip,"aria-label":e.tooltip,href:e.share.shareWithLink}},[t("span",[e._v(e._s(e.title)+"\n\t\t\t\t"),e.isUnique?e._e():t("span",{staticClass:"sharing-entry__summary__desc-unique"},[e._v("\n\t\t\t\t\t("+e._s(e.share.shareWithDisplayNameUnique)+")\n\t\t\t\t")]),e._v(" "),e.hasStatus&&e.share.status.message?t("small",[e._v("("+e._s(e.share.status.message)+")")]):e._e()])]),e._v(" "),t("SharingEntryQuickShareSelect",{attrs:{share:e.share,"file-info":e.fileInfo},on:{"open-sharing-details":function(t){return e.openShareDetailsForCustomSettings(e.share)}}})],1),e._v(" "),e.share&&e.share.expireDate?t("ShareExpiryTime",{attrs:{share:e.share}}):e._e(),e._v(" "),e.share.canEdit?t("NcButton",{staticClass:"sharing-entry__action",attrs:{"data-cy-files-sharing-share-actions":"","aria-label":e.t("files_sharing","Open Sharing Details"),variant:"tertiary"},on:{click:function(t){return e.openSharingDetails(e.share)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1700783217)}):e._e()],1)},[],!1,null,"469e5e80",null).exports},mixins:[Re],props:{fileInfo:{type:Object,required:!0},shares:{type:Array,required:!0}},setup:()=>({t:p.t}),computed:{hasShares(){return 0===this.shares.length},isUnique(){return e=>[...this.shares].filter(t=>e.type===O.I.User&&e.shareWithDisplayName===t.shareWithDisplayName).length<=1}}},zr=(0,W.A)(qr,function(){var e=this,t=e._self._c;return t("ul",{staticClass:"sharing-sharee-list",attrs:{"aria-label":e.t("files_sharing","Shares")}},e._l(e.shares,function(r){return t("SharingEntry",{key:r.id,attrs:{"file-info":e.fileInfo,share:r,"is-unique":e.isUnique(r)},on:{"open-sharing-details":function(t){return e.openSharingDetails(r)}}})}),1)},[],!1,null,null,null).exports,jr=window.OC.theme.productName,Wr={name:"SharingTab",components:{InfoIcon:F.A,NcAvatar:M.A,NcButton:V.A,NcCollectionList:U.N,NcPopover:$.N,SharingEntryInternal:Ae,SharingEntrySimple:ce,SharingInherited:Qt,SharingInput:Fe,SharingLinkList:Ur,SharingList:zr,SharingDetailsTab:Ot,SidebarTabExternalSection:ze,SidebarTabExternalSectionLegacy:Ye},mixins:[Re],data:()=>({config:new Le,deleteEvent:null,error:"",expirationInterval:null,loading:!0,fileInfo:null,reshare:null,sharedWithMe:{},shares:[],linkShares:[],externalShares:[],legacySections:OCA.Sharing.ShareTabSections.getSections(),sections:[...window._nc_files_sharing_sidebar_sections?.values()??[]],projectsEnabled:(0,L.C)("core","projects_enabled",!1),showSharingDetailsView:!1,shareDetailsData:{},returnFocusElement:null,internalSharesHelpText:t("files_sharing","Share files within your organization. Recipients who can already view the file can also use this link for easy access."),externalSharesHelpText:t("files_sharing","Share files with others outside your organization via public links and email addresses. You can also share to {productName} accounts on other instances using their federated cloud ID.",{productName:jr}),additionalSharesHelpText:t("files_sharing","Shares from apps or other sources which are not included in internal or external shares.")}),computed:{hasExternalSections(){return this.sections.length>0||this.legacySections.length>0},sortedExternalSections(){return this.sections.filter(e=>e.enabled(this.fileInfo.node)).sort((e,t)=>e.order-t.order)},isSharedWithMe(){return!!this.sharedWithMe?.user},isLinkSharingAllowed(){if(!(0,l.HW)())return!1;const e=(0,c.F)();return!0===(e.files_sharing?.public||{}).enabled},canReshare(){return!!(this.fileInfo.permissions&OC.PERMISSION_SHARE)||!!(this.reshare&&this.reshare.hasSharePermission&&this.config.isResharingAllowed)},internalShareInputPlaceholder(){return this.config.showFederatedSharesAsInternal&&this.config.isFederationEnabled?t("files_sharing","Type names, teams, federated cloud IDs"):t("files_sharing","Type names or teams")},externalShareInputPlaceholder(){return this.isLinkSharingAllowed?this.config.showFederatedSharesAsInternal||this.config.isFederationEnabled?t("files_sharing","Type an email or federated cloud ID"):t("files_sharing","Type an email"):this.config.isFederationEnabled?t("files_sharing","Type a federated cloud ID"):""}},methods:{async update(e){this.fileInfo=e,this.resetState(),this.getShares()},async getShares(){try{this.loading=!0;const e=(0,B.KT)("apps/files_sharing/api/v1/shares"),t="json",r=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),i=h.Ay.get(e,{params:{format:t,path:r,reshares:!0}}),n=h.Ay.get(e,{params:{format:t,path:r,shared_with_me:!0}}),[s,a]=await Promise.all([i,n]);this.loading=!1,this.processSharedWithMe(a),this.processShares(s)}catch(e){this.error=e?.response?.data?.ocs?.meta?.message?e.response.data.ocs.meta.message:t("files_sharing","Unable to load the shares list"),this.loading=!1,ue.A.error("Error loading the shares list",e)}},resetState(){clearInterval(this.expirationInterval),this.loading=!0,this.error="",this.sharedWithMe={},this.shares=[],this.linkShares=[],this.externalShares=[],this.showSharingDetailsView=!1,this.shareDetailsData={}},updateExpirationSubtitle(e){const r=(0,R.A)(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:(0,R.A)(1e3*r).fromNow()})),(0,R.A)().unix()>r&&(clearInterval(this.expirationInterval),this.$set(this.sharedWithMe,"subtitle",t("files_sharing","this share just expired.")))},processShares({data:e}){if(e.ocs&&e.ocs.data&&e.ocs.data.length>0){const t=function(e,t,r){r=r??[];const i=(t=t??[e=>e]).map((e,t)=>"asc"===(r[t]??"asc")?1:-1),n=Intl.Collator([(0,p.Z0)(),(0,p.lO)()],{numeric:!0,usage:"sort"});return[...e].sort((e,r)=>{for(const[s,a]of t.entries()){const t=n.compare(N(a(e)),N(a(r)));if(0!==t)return t*i[s]}return 0})}(e.ocs.data.map(e=>new Ne(e)),[e=>e.shareWithDisplayName,e=>e.label,e=>e.createdTime]);for(const e of t)[O.I.Link,O.I.Email].includes(e.type)?this.linkShares.push(e):[O.I.Remote,O.I.RemoteGroup].includes(e.type)?this.config.showFederatedSharesToTrustedServersAsInternal?e.isTrustedServer?this.shares.push(e):this.externalShares.push(e):this.config.showFederatedSharesAsInternal?this.shares.push(e):this.externalShares.push(e):this.shares.push(e);ue.A.debug(`Processed ${this.linkShares.length} link share(s)`),ue.A.debug(`Processed ${this.shares.length} share(s)`),ue.A.debug(`Processed ${this.externalShares.length} external share(s)`)}},processSharedWithMe({data:e}){if(e.ocs&&e.ocs.data&&e.ocs.data[0]){const r=new Ne(e),i=function(e){return e.type===O.I.Group?t("files_sharing","Shared with you and the group {group} by {owner}",{group:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===O.I.Team?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===O.I.Room?e.shareWithDisplayName?t("files_sharing","Shared with you and the conversation {conversation} by {owner}",{conversation:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you in a conversation by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1})}(r),n=r.ownerDisplayName,s=r.owner;this.sharedWithMe={displayName:n,title:i,user:s},this.reshare=r,r.expireDate&&(0,R.A)(r.expireDate).unix()>(0,R.A)().unix()&&(this.updateExpirationSubtitle(r),this.expirationInterval=setInterval(this.updateExpirationSubtitle,1e4,r))}else this.fileInfo&&void 0!==this.fileInfo.shareOwnerId&&this.fileInfo.shareOwnerId!==(0,l.HW)().uid&&(this.sharedWithMe={displayName:this.fileInfo.shareOwner,title:t("files_sharing","Shared with you by {owner}",{owner:this.fileInfo.shareOwner},void 0,{escape:!1}),user:this.fileInfo.shareOwnerId})},addShare(e,t=()=>{}){e.type===O.I.Email?this.linkShares.unshift(e):[O.I.Remote,O.I.RemoteGroup].includes(e.type)?(this.config.showFederatedSharesAsInternal&&this.shares.unshift(e),this.config.showFederatedSharesToTrustedServersAsInternal?e.isTrustedServer&&this.shares.unshift(e):this.externalShares.unshift(e)):this.shares.unshift(e),this.awaitForShare(e,t)},removeShare(e){const t=e.type===O.I.Email||e.type===O.I.Link?this.linkShares:this.shares,r=t.findIndex(t=>t.id===e.id);-1!==r&&t.splice(r,1)},awaitForShare(e,t){this.$nextTick(()=>{let r=this.$refs.shareList;e.type===O.I.Email&&(r=this.$refs.linkShareList);const i=r.$children.find(t=>t.share===e);i&&t(i)})},toggleShareDetailsView(e){if(!this.showSharingDetailsView)if(Array.from(document.activeElement.classList).some(e=>e.startsWith("action-"))){const e=document.activeElement.closest('[role="menu"]')?.id;this.returnFocusElement=document.querySelector(`[aria-controls="${e}"]`)}else this.returnFocusElement=document.activeElement;e&&(this.shareDetailsData=e),this.showSharingDetailsView=!this.showSharingDetailsView,this.showSharingDetailsView||this.$nextTick(()=>{this.returnFocusElement?.focus(),this.returnFocusElement=null})}}},Gr=Wr;var Yr=i(71088),Qr={};Qr.styleTagTransform=oe(),Qr.setAttributes=ie(),Qr.insert=te().bind(null,"head"),Qr.domAPI=K(),Qr.insertStyleElement=se(),Z()(Yr.A,Qr),Yr.A&&Yr.A.locals&&Yr.A.locals;const Xr=(0,W.A)(Gr,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharingTab",class:{"icon-loading":e.loading}},[e.error?t("div",{staticClass:"emptycontent",class:{emptyContentWithSections:e.hasExternalSections}},[t("div",{staticClass:"icon icon-error"}),e._v(" "),t("h2",[e._v(e._s(e.error))])]):e._e(),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView,expression:"!showSharingDetailsView"}],staticClass:"sharingTab__content"},[e.isSharedWithMe?t("ul",[t("SharingEntrySimple",e._b({staticClass:"sharing-entry__reshare",scopedSlots:e._u([{key:"avatar",fn:function(){return[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:e.sharedWithMe.user,"display-name":e.sharedWithMe.displayName}})]},proxy:!0}],null,!1,3197855346)},"SharingEntrySimple",e.sharedWithMe,!1))],1):e._e(),e._v(" "),t("section",[t("div",{staticClass:"section-header"},[t("h4",[e._v(e._s(e.t("files_sharing","Internal shares")))]),e._v(" "),t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary-no-background","aria-label":e.t("files_sharing","Internal shares explanation")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InfoIcon",{attrs:{size:20}})]},proxy:!0}])})]},proxy:!0}])},[e._v(" "),t("p",{staticClass:"hint-body"},[e._v("\n\t\t\t\t\t\t"+e._s(e.internalSharesHelpText)+"\n\t\t\t\t\t")])])],1),e._v(" "),e.loading?e._e():t("SharingInput",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,"link-shares":e.linkShares,reshare:e.reshare,shares:e.shares,placeholder:e.internalShareInputPlaceholder},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.loading?e._e():t("SharingList",{ref:"shareList",attrs:{shares:e.shares,"file-info":e.fileInfo},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.canReshare&&!e.loading?t("SharingInherited",{attrs:{"file-info":e.fileInfo}}):e._e(),e._v(" "),t("SharingEntryInternal",{attrs:{"file-info":e.fileInfo}})],1),e._v(" "),e.config.showExternalSharing?t("section",[t("div",{staticClass:"section-header"},[t("h4",[e._v(e._s(e.t("files_sharing","External shares")))]),e._v(" "),t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary-no-background","aria-label":e.t("files_sharing","External shares explanation")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InfoIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,915383693)})]},proxy:!0}],null,!1,4045083138)},[e._v(" "),t("p",{staticClass:"hint-body"},[e._v("\n\t\t\t\t\t\t"+e._s(e.externalSharesHelpText)+"\n\t\t\t\t\t")])])],1),e._v(" "),e.loading?e._e():t("SharingInput",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,"link-shares":e.linkShares,"is-external":!0,placeholder:e.externalShareInputPlaceholder,reshare:e.reshare,shares:e.shares},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.loading?e._e():t("SharingList",{attrs:{shares:e.externalShares,"file-info":e.fileInfo},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),!e.loading&&e.isLinkSharingAllowed?t("SharingLinkList",{ref:"linkShareList",attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,shares:e.linkShares},on:{"open-sharing-details":e.toggleShareDetailsView}}):e._e()],1):e._e(),e._v(" "),e.hasExternalSections&&!e.showSharingDetailsView?t("section",[t("div",{staticClass:"section-header"},[t("h4",[e._v(e._s(e.t("files_sharing","Additional shares")))]),e._v(" "),t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary-no-background","aria-label":e.t("files_sharing","Additional shares explanation")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InfoIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,915383693)})]},proxy:!0}],null,!1,880248230)},[e._v(" "),t("p",{staticClass:"hint-body"},[e._v("\n\t\t\t\t\t\t"+e._s(e.additionalSharesHelpText)+"\n\t\t\t\t\t")])])],1),e._v(" "),e._l(e.sortedExternalSections,function(r){return t("SidebarTabExternalSection",{key:r.id,staticClass:"sharingTab__additionalContent",attrs:{section:r,node:e.fileInfo.node}})}),e._v(" "),e._l(e.legacySections,function(r,i){return t("SidebarTabExternalSectionLegacy",{key:i,staticClass:"sharingTab__additionalContent",attrs:{"file-info":e.fileInfo,"section-callback":r}})}),e._v(" "),e.projectsEnabled?t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView&&e.fileInfo,expression:"!showSharingDetailsView && fileInfo"}],staticClass:"sharingTab__additionalContent"},[t("NcCollectionList",{attrs:{id:`${e.fileInfo.id}`,type:"file",name:e.fileInfo.name}})],1):e._e()],2):e._e()]),e._v(" "),e.showSharingDetailsView?t("SharingDetailsTab",{attrs:{"file-info":e.shareDetailsData.fileInfo,share:e.shareDetailsData.share},on:{"close-sharing-details":e.toggleShareDetailsView,"add:share":e.addShare,"remove:share":e.removeShare}}):e._e()],1)},[],!1,null,"ae0ef8b6",null).exports},27920(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry__inherited .avatar-shared[data-v-cedf3238]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingInherited.vue"],names:[],mappings:"AAEC,0DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA",sourcesContent:["\n.sharing-entry__inherited {\n\t.avatar-shared {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const o=a},31868(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".share-select[data-v-61e49a3a]{display:block}.share-select[data-v-61e49a3a] .action-item__menutoggle{color:var(--color-primary-element) !important;font-size:12.5px !important;height:auto !important;min-height:auto !important}.share-select[data-v-61e49a3a] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-61e49a3a] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-61e49a3a] .action-item__menutoggle .button-vue__wrapper{flex-direction:row-reverse !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue"],names:[],mappings:"AACA,+BACC,aAAA,CAIA,wDACC,6CAAA,CACA,2BAAA,CACA,sBAAA,CACA,0BAAA,CAEA,0EACC,6BAAA,CAGD,0EACC,sBAAA,CACA,0BAAA,CACA,qBAAA,CACA,yBAAA,CAGD,6EAEC,qCAAA",sourcesContent:["\n.share-select {\n\tdisplay: block;\n\n\t// TODO: NcActions should have a slot for custom trigger button like NcPopover\n\t// Overrider NcActionms button to make it small\n\t:deep(.action-item__menutoggle) {\n\t\tcolor: var(--color-primary-element) !important;\n\t\tfont-size: 12.5px !important;\n\t\theight: auto !important;\n\t\tmin-height: auto !important;\n\n\t\t.button-vue__text {\n\t\t\tfont-weight: normal !important;\n\t\t}\n\n\t\t.button-vue__icon {\n\t\t\theight: 24px !important;\n\t\t\tmin-height: 24px !important;\n\t\t\twidth: 24px !important;\n\t\t\tmin-width: 24px !important;\n\t\t}\n\n\t\t.button-vue__wrapper {\n\t\t\t// Emulate NcButton's alignment=center-reverse\n\t\t\tflex-direction: row-reverse !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=a},47790(){},48318(){!function(e){"use strict";var t,r=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),i=r&&"a=1"===new r({a:1}).toString(),n=r&&"+"===new r("s=%2B").get("s"),s=r&&"size"in r.prototype,a="__URLSearchParams__",o=!r||((t=new r).append("s"," &"),"s=+%26"===t.toString()),l=p.prototype,h=!(!e.Symbol||!e.Symbol.iterator);if(!(r&&i&&n&&o&&s)){l.append=function(e,t){y(this[a],e,t)},l.delete=function(e){delete this[a][e]},l.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},l.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},l.has=function(e){return w(this[a],e)},l.set=function(e,t){this[a][e]=[""+t]},l.toString=function(){var e,t,r,i,n=this[a],s=[];for(t in n)for(r=f(t),e=0,i=n[t];e<i.length;e++)s.push(r+"="+f(i[e]));return s.join("&")};var c,u=e.Proxy&&r&&(!n||!o||!i||!s);u?(c=new Proxy(r,{construct:function(e,t){return new e(new p(t[0]).toString())}})).toString=Function.prototype.toString.bind(p):c=p,Object.defineProperty(e,"URLSearchParams",{value:c});var d=e.URLSearchParams.prototype;d.polyfill=!0,!u&&e.Symbol&&(d[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in d||(d.forEach=function(e,t){var r=m(this.toString());Object.getOwnPropertyNames(r).forEach(function(i){r[i].forEach(function(r){e.call(t,r,i,this)},this)},this)}),"sort"in d||(d.sort=function(){var e,t,r,i=m(this.toString()),n=[];for(e in i)n.push(e);for(n.sort(),t=0;t<n.length;t++)this.delete(n[t]);for(t=0;t<n.length;t++){var s=n[t],a=i[s];for(r=0;r<a.length;r++)this.append(s,a[r])}}),"keys"in d||(d.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),A(e)}),"values"in d||(d.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),A(e)}),"entries"in d||(d.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),A(e)}),h&&(d[e.Symbol.iterator]=d[e.Symbol.iterator]||d.entries),"size"in d||Object.defineProperty(d,"size",{get:function(){var e=m(this.toString());if(d===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce(function(t,r){return t+e[r].length},0)}})}function p(e){((e=e||"")instanceof URLSearchParams||e instanceof p)&&(e=e.toString()),this[a]=m(e)}function f(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function g(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(e){return decodeURIComponent(e)})}function A(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return h&&(r[e.Symbol.iterator]=function(){return r}),r}function m(e){var t={};if("object"==typeof e)if(v(e))for(var r=0;r<e.length;r++){var i=e[r];if(!v(i)||2!==i.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");y(t,i[0],i[1])}else for(var n in e)e.hasOwnProperty(n)&&y(t,n,e[n]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var s=e.split("&"),a=0;a<s.length;a++){var o=s[a],l=o.indexOf("=");-1<l?y(t,g(o.slice(0,l)),g(o.slice(l+1))):o&&y(t,g(o),"")}}return t}function y(e,t,r){var i="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);w(e,t)?e[t].push(i):e[t]=[i]}function v(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this)},50618(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-731a9650]{display:flex;align-items:center;height:44px}.sharing-entry__desc[data-v-731a9650]{display:flex;flex-direction:column;justify-content:space-between;padding:8px;padding-inline-start:10px;line-height:1.2em}.sharing-entry__desc p[data-v-731a9650]{color:var(--color-text-maxcontrast)}.sharing-entry__actions[data-v-731a9650]{margin-inline-start:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInherited.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,sCACC,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,WAAA,CACA,yBAAA,CACA,iBAAA,CACA,wCACC,mCAAA,CAGF,yCACC,wBAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__desc {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tline-height: 1.2em;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__actions {\n\t\tmargin-inline-start: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=a},51069(){},56677(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharingTabDetailsView[data-v-26224d91]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-26224d91]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-26224d91]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-26224d91]{font-size:15px;padding-inline-start:.3em}.sharingTabDetailsView__wrapper[data-v-26224d91]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-inline-end:12px}.sharingTabDetailsView__quick-permissions[data-v-26224d91]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-26224d91]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-26224d91]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-26224d91]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-26224d91] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-26224d91] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-26224d91] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-26224d91]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-26224d91]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-26224d91]{width:100%;margin-bottom:.5em;text-align:start;padding-inline-start:0}.sharingTabDetailsView__advanced section textarea[data-v-26224d91],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-26224d91]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-26224d91]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-26224d91] label{padding-inline-start:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-26224d91]{padding-inline-start:1.5em}.sharingTabDetailsView__label[data-v-26224d91]{padding-block-end:6px}.sharingTabDetailsView__delete>button[data-v-26224d91]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-26224d91]{width:100%;display:flex;position:sticky;bottom:0;flex-direction:column;justify-content:space-between;align-items:flex-start;background:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background))}.sharingTabDetailsView__footer .button-group[data-v-26224d91]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-26224d91]{margin-inline-start:16px}.sharingTabDetailsView__footer .button-group button[data-v-26224d91]:first-child{margin-inline-start:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingDetailsTab.vue"],names:[],mappings:"AACA,wCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CAEA,gDACC,YAAA,CACA,kBAAA,CACA,qBAAA,CACA,WAAA,CAEA,qDACC,YAAA,CACA,kBAAA,CAEA,wDACC,cAAA,CACA,yBAAA,CAMH,iDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,uBAAA,CAGD,2DACC,YAAA,CACA,sBAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CAEA,+DACC,UAAA,CAEA,oEACC,UAAA,CAEA,sFACC,kBAAA,CACA,sBAAA,CACA,YAAA,CAGD,+EACC,YAAA,CACA,qBAAA,CAID,4HACC,cAAA,CAEA,qIACC,aAAA,CACA,eAAA,CAQL,0DACC,UAAA,CAEA,iEACC,eAAA,CAKF,kDACC,UAAA,CACA,kBAAA,CACA,gBAAA,CACA,sBAAA,CAIC,+IAEC,UAAA,CAGD,mEACC,WAAA,CACA,QAAA,CAYD,qEACC,iCAAA,CACA,mCAAA,CACA,sBAAA,CAGD,2FACC,0BAAA,CAKH,+CACC,qBAAA,CAIA,mEACC,aAAA,CAIF,gDACC,UAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA,CACA,qBAAA,CACA,6BAAA,CACA,sBAAA,CACA,2FAAA,CAEA,8DACC,YAAA,CACA,6BAAA,CACA,UAAA,CACA,eAAA,CAEA,qEACC,wBAAA,CAEA,iFACC,qBAAA",sourcesContent:["\n.sharingTabDetailsView {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\tmargin: 0 auto;\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0.2em;\n\n\t\tspan {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\th1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tpadding-inline-start: 0.3em;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\toverflow: scroll;\n\t\tflex-shrink: 1;\n\t\tpadding: 4px;\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t&__quick-permissions {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\tmargin: 0 auto;\n\t\tborder-radius: 0;\n\n\t\tdiv {\n\t\t\twidth: 100%;\n\n\t\t\tspan {\n\t\t\t\twidth: 100%;\n\n\t\t\t\tspan:nth-child(1) {\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tpadding: 0.1em;\n\t\t\t\t}\n\n\t\t\t\t:deep(label span) {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\n\t\t\t\t/* Target component based style in NcCheckboxRadioSwitch slot content*/\n\t\t\t\t:deep(span.checkbox-content__text.checkbox-radio-switch__text) {\n\t\t\t\t\tflex-wrap: wrap;\n\n\t\t\t\t\t.subline {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tflex-basis: 100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__advanced-control {\n\t\twidth: 100%;\n\n\t\tbutton {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\n\t}\n\n\t&__advanced {\n\t\twidth: 100%;\n\t\tmargin-bottom: 0.5em;\n\t\ttext-align: start;\n\t\tpadding-inline-start: 0;\n\n\t\tsection {\n\n\t\t\ttextarea,\n\t\t\tdiv.mx-datepicker {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttextarea {\n\t\t\t\theight: 80px;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t The following style is applied out of the component's scope\n\t\t\t to remove padding from the label.checkbox-radio-switch__label,\n\t\t\t which is used to group radio checkbox items. The use of ::v-deep\n\t\t\t ensures that the padding is modified without being affected by\n\t\t\t the component's scoping.\n\t\t\t Without this achieving left alignment for the checkboxes would not\n\t\t\t be possible.\n\t\t\t*/\n\t\t\tspan :deep(label) {\n\t\t\t\tpadding-inline-start: 0 !important;\n\t\t\t\tbackground-color: initial !important;\n\t\t\t\tborder: none !important;\n\t\t\t}\n\n\t\t\tsection.custom-permissions-group {\n\t\t\t\tpadding-inline-start: 1.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__label {\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__delete {\n\t\t> button:first-child {\n\t\t\tcolor: rgb(223, 7, 7);\n\t\t}\n\t}\n\n\t&__footer {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\talign-items: flex-start;\n\t\tbackground: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\n\t\t.button-group {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmargin-top: 16px;\n\n\t\t\tbutton {\n\t\t\t\tmargin-inline-start: 16px;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-inline-start: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=a},63779(){},64688(){},66089(){},71088(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".emptyContentWithSections[data-v-ae0ef8b6]{margin:1rem auto}.sharingTab[data-v-ae0ef8b6]{position:relative;height:100%}.sharingTab__content[data-v-ae0ef8b6]{padding:0 6px}.sharingTab__content section[data-v-ae0ef8b6]{padding-bottom:16px}.sharingTab__content section .section-header[data-v-ae0ef8b6]{margin-top:2px;margin-bottom:2px;display:flex;align-items:center;padding-bottom:4px}.sharingTab__content section .section-header h4[data-v-ae0ef8b6]{margin:0;font-size:16px}.sharingTab__content section .section-header .visually-hidden[data-v-ae0ef8b6]{display:none}.sharingTab__content section .section-header .hint-icon[data-v-ae0ef8b6]{color:var(--color-primary-element)}.sharingTab__content>section[data-v-ae0ef8b6]:not(:last-child){border-bottom:2px solid var(--color-border)}.sharingTab__additionalContent[data-v-ae0ef8b6]{margin:var(--default-clickable-area) 0}.hint-body[data-v-ae0ef8b6]{max-width:300px;padding:var(--border-radius-element)}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingTab.vue"],names:[],mappings:"AACA,2CACC,gBAAA,CAGD,6BACC,iBAAA,CACA,WAAA,CAEA,sCACC,aAAA,CAEA,8CACC,mBAAA,CAEA,8DACC,cAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,iEACC,QAAA,CACA,cAAA,CAGD,+EACC,YAAA,CAGD,yEACC,kCAAA,CAOH,+DACC,2CAAA,CAKF,gDACC,sCAAA,CAIF,4BACC,eAAA,CACA,oCAAA",sourcesContent:["\n.emptyContentWithSections {\n\tmargin: 1rem auto;\n}\n\n.sharingTab {\n\tposition: relative;\n\theight: 100%;\n\n\t&__content {\n\t\tpadding: 0 6px;\n\n\t\tsection {\n\t\t\tpadding-bottom: 16px;\n\n\t\t\t.section-header {\n\t\t\t\tmargin-top: 2px;\n\t\t\t\tmargin-bottom: 2px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tpadding-bottom: 4px;\n\n\t\t\t\th4 {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t}\n\n\t\t\t\t.visually-hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.hint-icon {\n\t\t\t\t\tcolor: var(--color-primary-element);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t& > section:not(:last-child) {\n\t\t\tborder-bottom: 2px solid var(--color-border);\n\t\t}\n\n\t}\n\n\t&__additionalContent {\n\t\tmargin: var(--default-clickable-area) 0;\n\t}\n}\n\n.hint-body {\n\tmax-width: 300px;\n\tpadding: var(--border-radius-element);\n}\n"],sourceRoot:""}]);const o=a},73776(){},77127(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-search{display:flex;flex-direction:column;margin-bottom:4px}.sharing-search label[for=sharing-search-input]{margin-bottom:2px}.sharing-search__input{width:100%;margin:10px 0}.vs__dropdown-menu span[lookup] .avatardiv{background-image:var(--icon-search-white);background-repeat:no-repeat;background-position:center;background-color:var(--color-text-maxcontrast) !important}.vs__dropdown-menu span[lookup] .avatardiv .avatardiv__initials-wrapper{display:none}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingInput.vue"],names:[],mappings:"AACA,gBACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,gDACC,iBAAA,CAGD,uBACC,UAAA,CACA,aAAA,CAOA,2CACC,yCAAA,CACA,2BAAA,CACA,0BAAA,CACA,yDAAA,CACA,wEACC,YAAA",sourcesContent:['\n.sharing-search {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-bottom: 4px;\n\n\tlabel[for="sharing-search-input"] {\n\t\tmargin-bottom: 2px;\n\t}\n\n\t&__input {\n\t\twidth: 100%;\n\t\tmargin: 10px 0;\n\t}\n}\n\n.vs__dropdown-menu {\n\t// properly style the lookup entry\n\tspan[lookup] {\n\t\t.avatardiv {\n\t\t\tbackground-image: var(--icon-search-white);\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tbackground-color: var(--color-text-maxcontrast) !important;\n\t\t\t.avatardiv__initials-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const o=a},77199(){},77965(){},78982(){},79368(){},79838(){},84388(e,t,r){"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry__internal .avatar-external[data-v-6c4cb23b]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}.sharing-entry__internal .icon-checkmark-color[data-v-6c4cb23b]{opacity:1;color:var(--color-border-success)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInternal.vue"],names:[],mappings:"AAEC,2DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA,CAED,gEACC,SAAA,CACA,iCAAA",sourcesContent:["\n.sharing-entry__internal {\n\t.avatar-external {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t\tcolor: var(--color-border-success);\n\t}\n}\n"],sourceRoot:""}]);const o=a}}]);
//# sourceMappingURL=5781-5781.js.map?v=f81a573d993baf86622a