summaryrefslogtreecommitdiffstats
path: root/settings/js/vue-settings-personal-security.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/vue-settings-personal-security.js')
-rw-r--r--settings/js/vue-settings-personal-security.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings/js/vue-settings-personal-security.js b/settings/js/vue-settings-personal-security.js
index 0a1fef3cd5c..2d8ad908fa9 100644
--- a/settings/js/vue-settings-personal-security.js
+++ b/settings/js/vue-settings-personal-security.js
@@ -811,7 +811,7 @@ t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e
*
* Date: 2019-06-29T08:20:19.827Z
*/
-function b(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var w=function(t,e){return t(e={exports:{}},e.exports),e.exports}(function(t,e){t.exports=function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var c=b;if(!s&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return o(n||t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var r=b,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=i(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),r=[n-7],a=1;a<e-1;a++)r[a]=r[a-1]-o;return r.push(6),r.reverse()},n.getPositions=function(t){for(var e=[],i=n.getRowColCoords(t),o=i.length,r=0;r<o;r++)for(var a=0;a<o;a++)0===r&&0===a||0===r&&a===o-1||r===o-1&&0===a||e.push([i[r],i[a]]);return e}},{"./utils":21}],3:[function(t,e,n){var i=t("./mode"),o=["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 r(t){this.mode=i.ALPHANUMERIC,this.data=t}r.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},e.exports=r},{"./mode":14}],4:[function(t,e,n){function i(){this.buffer=[],this.length=0}i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=i},{}],5:[function(t,e,n){var i=t("../utils/buffer");function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new i(t*t),this.data.fill(0),this.reservedBit=new i(t*t),this.reservedBit.fill(0)}o.prototype.set=function(t,e,n,i){var o=t*this.size+e;this.data[o]=n,i&&(this.reservedBit[o]=!0)},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=o},{"../utils/buffer":28}],6:[function(t,e,n){var i=t("../utils/buffer"),o=t("./mode");function r(t){this.mode=o.BYTE,this.data=new i(t)}r.getBitsLength=function(t){return 8*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},e.exports=r},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,n){var i=t("./error-correction-level"),o=[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],r=[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];n.getBlocksCount=function(t,e){switch(e){case i.L:return o[4*(t-1)+0];case i.M:return o[4*(t-1)+1];case i.Q:return o[4*(t-1)+2];case i.H:return o[4*(t-1)+3];default:return}},n.getTotalCodewordsCount=function(t,e){switch(e){case i.L:return r[4*(t-1)+0];case i.M:return r[4*(t-1)+1];case i.Q:return r[4*(t-1)+2];case i.H:return r[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getPositions=function(t){var e=i(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,n){var i=t("./utils"),o=i.getBCHDigit(1335);n.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,r=n<<10;i.getBCHDigit(r)-o>=0;)r^=1335<<i.getBCHDigit(r)-o;return 21522^(n<<10|r)}},{"./utils":21}],11:[function(t,e,n){var i=t("../utils/buffer");if(i.alloc)var o=i.alloc(512),r=i.alloc(256);else var o=new i(512),r=new i(256);!function(){for(var t=1,e=0;e<255;e++)o[e]=t,r[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)o[e]=o[e-255]}(),n.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},n.exp=function(t){return o[t]},n.mul=function(t,e){return 0===t||0===e?0:o[r[t]+r[e]]}},{"../utils/buffer":28}],12:[function(t,e,n){var i=t("./mode"),o=t("./utils");function r(t){this.mode=i.KANJI,this.data=t}r.getBitsLength=function(t){return 13*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},e.exports=r},{"./mode":14,"./utils":21}],13:[function(t,e,n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i={N1:3,N2:3,N3:40,N4:10};function o(t,e,i){switch(t){case n.Patterns.PATTERN000:return(e+i)%2==0;case n.Patterns.PATTERN001:return e%2==0;case n.Patterns.PATTERN010:return i%3==0;case n.Patterns.PATTERN011:return(e+i)%3==0;case n.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case n.Patterns.PATTERN101:return e*i%2+e*i%3==0;case n.Patterns.PATTERN110:return(e*i%2+e*i%3)%2==0;case n.Patterns.PATTERN111:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}n.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},n.from=function(t){return n.isValid(t)?parseInt(t,10):void 0},n.getPenaltyN1=function(t){for(var e=t.size,n=0,o=0,r=0,a=null,s=null,c=0;c<e;c++){o=r=0,a=s=null;for(var l=0;l<e;l++){var u=t.get(c,l);u===a?o++:(o>=5&&(n+=i.N1+(o-5)),a=u,o=1),(u=t.get(l,c))===s?r++:(r>=5&&(n+=i.N1+(r-5)),s=u,r=1)}o>=5&&(n+=i.N1+(o-5)),r>=5&&(n+=i.N1+(r-5))}return n},n.getPenaltyN2=function(t){for(var e=t.size,n=0,o=0;o<e-1;o++)for(var r=0;r<e-1;r++){var a=t.get(o,r)+t.get(o,r+1)+t.get(o+1,r)+t.get(o+1,r+1);4!==a&&0!==a||n++}return n*i.N2},n.getPenaltyN3=function(t){for(var e=t.size,n=0,o=0,r=0,a=0;a<e;a++){o=r=0;for(var s=0;s<e;s++)o=o<<1&2047|t.get(a,s),s>=10&&(1488===o||93===o)&&n++,r=r<<1&2047|t.get(s,a),s>=10&&(1488===r||93===r)&&n++}return n*i.N3},n.getPenaltyN4=function(t){for(var e=0,n=t.data.length,o=0;o<n;o++)e+=t.data[o];var r=Math.abs(Math.ceil(100*e/n/5)-10);return r*i.N4},n.applyMask=function(t,e){for(var n=e.size,i=0;i<n;i++)for(var r=0;r<n;r++)e.isReserved(r,i)||e.xor(r,i,o(t,r,i))},n.getBestMask=function(t,e){for(var i=Object.keys(n.Patterns).length,o=0,r=1/0,a=0;a<i;a++){e(a),n.applyMask(a,t);var s=n.getPenaltyN1(t)+n.getPenaltyN2(t)+n.getPenaltyN3(t)+n.getPenaltyN4(t);n.applyMask(a,t),s<r&&(r=s,o=a)}return o}},{}],14:[function(t,e,n){var i=t("./version-check"),o=t("./regex");n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!i.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},n.getBestModeForData=function(t){return o.testNumeric(t)?n.NUMERIC:o.testAlphanumeric(t)?n.ALPHANUMERIC:o.testKanji(t)?n.KANJI:n.BYTE},n.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},n.isValid=function(t){return t&&t.bit&&t.ccBits},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,n){var i=t("./mode");function o(t){this.mode=i.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),t.put(i,10);var o=this.data.length-e;o>0&&(n=this.data.substr(e),i=parseInt(n,10),t.put(i,3*o+1))},e.exports=o},{"./mode":14}],16:[function(t,e,n){var i=t("../utils/buffer"),o=t("./galois-field");n.mul=function(t,e){var n=new i(t.length+e.length-1);n.fill(0);for(var r=0;r<t.length;r++)for(var a=0;a<e.length;a++)n[r+a]^=o.mul(t[r],e[a]);return n},n.mod=function(t,e){for(var n=new i(t);n.length-e.length>=0;){for(var r=n[0],a=0;a<e.length;a++)n[a]^=o.mul(e[a],r);for(var s=0;s<n.length&&0===n[s];)s++;n=n.slice(s)}return n},n.generateECPolynomial=function(t){for(var e=new i([1]),r=0;r<t;r++)e=n.mul(e,[1,o.exp(r)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,n){var i=t("../utils/buffer"),o=t("./utils"),r=t("./error-correction-level"),a=t("./bit-buffer"),s=t("./bit-matrix"),c=t("./alignment-pattern"),l=t("./finder-pattern"),u=t("./mask-pattern"),d=t("./error-correction-code"),p=t("./reed-solomon-encoder"),f=t("./version"),h=t("./format-info"),v=t("./mode"),m=t("./segments"),A=t("isarray");function g(t,e,n){var i,o,r=t.size,a=h.getEncodedBits(e,n);for(i=0;i<15;i++)o=1==(a>>i&1),i<6?t.set(i,8,o,!0):i<8?t.set(i+1,8,o,!0):t.set(r-15+i,8,o,!0),i<8?t.set(8,r-i-1,o,!0):i<9?t.set(8,15-i-1+1,o,!0):t.set(8,15-i-1,o,!0);t.set(r-8,8,1,!0)}function y(t,e,n){var r=new a;n.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),v.getCharCountIndicator(e.mode,t)),e.write(r)});var s=o.getSymbolTotalCodewords(t),c=d.getTotalCodewordsCount(t,e),l=8*(s-c);for(r.getLengthInBits()+4<=l&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var u=(l-r.getLengthInBits())/8,f=0;f<u;f++)r.put(f%2?17:236,8);return function(t,e,n){for(var r=o.getSymbolTotalCodewords(e),a=d.getTotalCodewordsCount(e,n),s=r-a,c=d.getBlocksCount(e,n),l=c-r%c,u=Math.floor(r/c),f=Math.floor(s/c),h=f+1,v=u-f,m=new p(v),A=0,g=new Array(c),y=new Array(c),b=0,w=new i(t.buffer),_=0;_<c;_++){var x=_<l?f:h;g[_]=w.slice(A,A+x),y[_]=m.encode(g[_]),A+=x,b=Math.max(b,x)}var T,C,k=new i(r),E=0;for(T=0;T<b;T++)for(C=0;C<c;C++)T<g[C].length&&(k[E++]=g[C][T]);for(T=0;T<v;T++)for(C=0;C<c;C++)k[E++]=y[C][T];return k}(r,t,e)}function b(t,e,n,i){var r;if(A(t))r=m.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var d=m.rawSplit(t);a=f.getBestVersionForData(d,n)}r=m.fromString(t,a||40)}var p=f.getBestVersionForData(r,n);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else e=p;var h=y(e,n,r),v=o.getSymbolSize(e),b=new s(v);return function(t,e){for(var n=t.size,i=l.getPositions(e),o=0;o<i.length;o++)for(var r=i[o][0],a=i[o][1],s=-1;s<=7;s++)if(!(r+s<=-1||n<=r+s))for(var c=-1;c<=7;c++)a+c<=-1||n<=a+c||(s>=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4?t.set(r+s,a+c,!0,!0):t.set(r+s,a+c,!1,!0))}(b,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var i=n%2==0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}(b),function(t,e){for(var n=c.getPositions(e),i=0;i<n.length;i++)for(var o=n[i][0],r=n[i][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(o+a,r+s,!0,!0):t.set(o+a,r+s,!1,!0)}(b,e),g(b,n,0),e>=7&&function(t,e){for(var n,i,o,r=t.size,a=f.getEncodedBits(e),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+r-8-3,o=1==(a>>s&1),t.set(n,i,o,!0),t.set(i,n,o,!0)}(b,e),function(t,e){for(var n=t.size,i=-1,o=n-1,r=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!t.isReserved(o,s-c)){var l=!1;a<e.length&&(l=1==(e[a]>>>r&1)),t.set(o,s-c,l),-1==--r&&(a++,r=7)}if((o+=i)<0||n<=o){o-=i,i=-i;break}}}(b,h),isNaN(i)&&(i=u.getBestMask(b,g.bind(null,b,n))),u.applyMask(i,b),g(b,n,i),{modules:b,version:e,errorCorrectionLevel:n,maskPattern:i,segments:r}}n.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,i,a=r.M;return void 0!==e&&(a=r.from(e.errorCorrectionLevel,r.M),n=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)),b(t,n,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:30}],18:[function(t,e,n){var i=t("../utils/buffer"),o=t("./polynomial");function r(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(t){this.degree=t,this.genPoly=o.generateECPolynomial(this.degree)},r.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=new i(this.degree);e.fill(0);var n=i.concat([t,e],t.length+this.degree),r=o.mod(n,this.genPoly),a=this.degree-r.length;if(a>0){var s=new i(this.degree);return s.fill(0),r.copy(s,a),s}return r},e.exports=r},{"../utils/buffer":28,"./polynomial":16}],19:[function(t,e,n){var i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=new RegExp(i,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(o,"g"),n.NUMERIC=new RegExp("[0-9]+","g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var r=new RegExp("^"+i+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(t){return r.test(t)},n.testNumeric=function(t){return a.test(t)},n.testAlphanumeric=function(t){return s.test(t)}},{}],20:[function(t,e,n){var i=t("./mode"),o=t("./numeric-data"),r=t("./alphanumeric-data"),a=t("./byte-data"),s=t("./kanji-data"),c=t("./regex"),l=t("./utils"),u=t("dijkstrajs");function d(t){return unescape(encodeURIComponent(t)).length}function p(t,e,n){for(var i,o=[];null!==(i=t.exec(n));)o.push({data:i[0],index:i.index,mode:e,length:i[0].length});return o}function f(t){var e,n,o=p(c.NUMERIC,i.NUMERIC,t),r=p(c.ALPHANUMERIC,i.ALPHANUMERIC,t);l.isKanjiModeEnabled()?(e=p(c.BYTE,i.BYTE,t),n=p(c.KANJI,i.KANJI,t)):(e=p(c.BYTE_KANJI,i.BYTE,t),n=[]);var a=o.concat(r,e,n);return a.sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,e){switch(e){case i.NUMERIC:return o.getBitsLength(t);case i.ALPHANUMERIC:return r.getBitsLength(t);case i.KANJI:return s.getBitsLength(t);case i.BYTE:return a.getBitsLength(t)}}function v(t,e){var n,c=i.getBestModeForData(t);if((n=i.from(e,c))!==i.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+i.toString(n)+".\n Suggested mode is: "+i.toString(c));switch(n!==i.KANJI||l.isKanjiModeEnabled()||(n=i.BYTE),n){case i.NUMERIC:return new o(t);case i.ALPHANUMERIC:return new r(t);case i.KANJI:return new s(t);case i.BYTE:return new a(t)}}n.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(v(e,null)):e.data&&t.push(v(e.data,e.mode)),t},[])},n.fromString=function(t,e){for(var o=f(t,l.isKanjiModeEnabled()),r=function(t){for(var e=[],n=0;n<t.length;n++){var o=t[n];switch(o.mode){case i.NUMERIC:e.push([o,{data:o.data,mode:i.ALPHANUMERIC,length:o.length},{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.ALPHANUMERIC:e.push([o,{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.KANJI:e.push([o,{data:o.data,mode:i.BYTE,length:d(o.data)}]);break;case i.BYTE:e.push([{data:o.data,mode:i.BYTE,length:d(o.data)}])}}return e}(o),a=function(t,e){for(var n={},o={start:{}},r=["start"],a=0;a<t.length;a++){for(var s=t[a],c=[],l=0;l<s.length;l++){var u=s[l],d=""+a+l;c.push(d),n[d]={node:u,lastCount:0},o[d]={};for(var p=0;p<r.length;p++){var f=r[p];n[f]&&n[f].node.mode===u.mode?(o[f][d]=h(n[f].lastCount+u.length,u.mode)-h(n[f].lastCount,u.mode),n[f].lastCount+=u.length):(n[f]&&(n[f].lastCount=u.length),o[f][d]=h(u.length,u.mode)+4+i.getCharCountIndicator(u.mode,e))}}r=c}for(p=0;p<r.length;p++)o[r[p]].end=0;return{map:o,table:n}}(r,e),s=u.find_path(a.map,"start","end"),c=[],p=1;p<s.length-1;p++)c.push(a.table[s[p]].node);return n.fromArray(function(t){return t.reduce(function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(c))},n.rawSplit=function(t){return n.fromArray(f(t,l.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:29}],21:[function(t,e,n){var i,o=[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];n.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},n.getSymbolTotalCodewords=function(t){return o[t]},n.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},n.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');i=t},n.isKanjiModeEnabled=function(){return void 0!==i},n.toSJIS=function(t){return i(t)}},{}],22:[function(t,e,n){n.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,n){var i=t("./utils"),o=t("./error-correction-code"),r=t("./error-correction-level"),a=t("./mode"),s=t("./version-check"),c=t("isarray"),l=i.getBCHDigit(7973);function u(t,e){return a.getCharCountIndicator(t,e)+4}function d(t,e){var n=0;return t.forEach(function(t){var i=u(t.mode,e);n+=i+t.getBitsLength()}),n}n.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},n.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var r=i.getSymbolTotalCodewords(t),c=o.getTotalCodewordsCount(t,e),l=8*(r-c);if(n===a.MIXED)return l;var d=l-u(n,t);switch(n){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}},n.getBestVersionForData=function(t,e){var i,o=r.from(e,r.M);if(c(t)){if(t.length>1)return function(t,e){for(var i=1;i<=40;i++){var o=d(t,i);if(o<=n.getCapacity(i,e,a.MIXED))return i}}(t,o);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,e,i){for(var o=1;o<=40;o++)if(e<=n.getCapacity(o,i,t))return o}(i.mode,i.getLength(),o)},n.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;i.getBCHDigit(e)-l>=0;)e^=7973<<i.getBCHDigit(e)-l;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:30}],24:[function(t,e,n){var i=t("./can-promise"),o=t("./core/qrcode"),r=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function s(t,e,n,r,a){var s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!i())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=r=void 0):2!==c||e.getContext||(r=n,n=e,e=void 0),new Promise(function(i,a){try{var s=o.create(n,r);i(t(s,e,r))}catch(t){a(t)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=r=void 0):3===c&&(e.getContext&&void 0===a?(a=r,r=void 0):(a=r,r=n,n=e,e=void 0));try{var u=o.create(n,r);a(null,t(u,e,r))}catch(t){a(t)}}n.create=o.create,n.toCanvas=s.bind(null,r.render),n.toDataURL=s.bind(null,r.renderToDataURL),n.toString=s.bind(null,function(t,e,n){return a.render(t,n)})},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,n){var i=t("./utils");n.render=function(t,e,n){var o=n,r=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(r=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=i.getOptions(o);var a=i.getImageWidth(t.modules.size,o),s=r.getContext("2d"),c=s.createImageData(a,a);return i.qrToImageData(c.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,r,a),s.putImageData(c,0,0),r},n.renderToDataURL=function(t,e,i){var o=i;void 0!==o||e&&e.getContext||(o=e,e=void 0),o||(o={});var r=n.render(t,e,o),a=o.type||"image/png",s=o.rendererOpts||{};return r.toDataURL(a,s.quality)}},{"./utils":27}],26:[function(t,e,n){var i=t("./utils");function o(t,e){var n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function r(t,e,n){var i=t+e;return void 0!==n&&(i+=" "+n),i}n.render=function(t,e,n){var a=i.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){for(var i="",o=0,a=!1,s=0,c=0;c<t.length;c++){var l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(i+=a?r("M",l+n,.5+u+n):r("m",o,0),o=0,a=!1),l+1<e&&t[c+1]||(i+=r("h",s),s=0)):o++}return i}(c,s,a.margin)+'"/>',p='viewBox="0 0 '+l+" "+l+'"',f=a.width?'width="'+a.width+'" height="'+a.width+'" ':"",h='<svg xmlns="http://www.w3.org/2000/svg" '+f+p+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,h),h}},{"./utils":27}],27:[function(t,e,n){function i(t){if("string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}n.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:n,scale:n?4:o,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},n.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},n.getImageWidth=function(t,e){var i=n.getScale(t,e);return Math.floor((t+2*e.margin)*i)},n.qrToImageData=function(t,e,i){for(var o=e.modules.size,r=e.modules.data,a=n.getScale(o,i),s=Math.floor((o+2*i.margin)*a),c=i.margin*a,l=[i.color.light,i.color.dark],u=0;u<s;u++)for(var d=0;d<s;d++){var p=4*(u*s+d),f=i.color.light;if(u>=c&&d>=c&&u<s-c&&d<s-c){var h=Math.floor((u-c)/a),v=Math.floor((d-c)/a);f=l[r[h*o+v]?1:0]}t[p++]=f.r,t[p++]=f.g,t[p++]=f.b,t[p]=f.a}}},{}],28:[function(t,e,n){var i=t("isarray");r.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var o=r.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function r(t,e,n){return r.TYPED_ARRAY_SUPPORT||this instanceof r?"number"==typeof t?c(this,t):function(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");var o;return o=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),r.TYPED_ARRAY_SUPPORT?o.__proto__=r.prototype:o=l(t,o),o}(t,e,n,i):"string"==typeof e?function(t,e){var n=0|d(e),i=s(t,n),o=i.write(e);return o!==n&&(i=i.slice(0,o)),i}(t,e):function(t,e){if(r.isBuffer(e)){var n=0|a(e.length),i=s(t,n);return 0===i.length?i:(e.copy(i,0,0,n),i)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(o=e.length)!=o?s(t,0):l(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return l(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new r(t,e,n)}function a(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function s(t,e){var n;return r.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=r.prototype:(null===(n=t)&&(n=new r(e)),n.length=e),n}function c(t,e){var n=s(t,e<0?0:0|a(e));if(!r.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)n[i]=0;return n}function l(t,e){for(var n=e.length<0?0:0|a(e.length),i=s(t,n),o=0;o<n;o+=1)i[o]=255&e[o];return i}function u(t,e){var n;e=e||1/0;for(var i=t.length,o=null,r=[],a=0;a<i;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function d(t){if(r.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;return 0===e?0:u(t).length}r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),r.prototype.write=function(t,e,n){void 0===e?(n=this.length,e=0):void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,i){return function(t,e,n,i){for(var o=0;o<i&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}(u(e,t.length-n),t,n,i)}(this,t,e,n)},r.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=r.prototype;else{var o=e-t;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+t]}return n},r.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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),t.length-e<i-n&&(i=t.length-e+n);var o,a=i-n;if(this===t&&n<e&&e<i)for(o=a-1;o>=0;--o)t[o+e]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},r.prototype.fill=function(t,e,n){if("string"==typeof t){if("string"==typeof e?(e=0,n=this.length):"string"==typeof n&&(n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=r.isBuffer(t)?t:new r(t),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this},r.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=c(null,e),a=0;for(n=0;n<t.length;++n){var l=t[n];if(!r.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,a),a+=l.length}return o},r.byteLength=d,r.prototype._isBuffer=!0,r.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports=r},{isarray:30}],29:[function(t,e,n){var i={single_source_shortest_paths:function(t,e,n){var o={},r={};r[e]=0;var a,s,c,l,u,d,p,f,h=i.PriorityQueue.make();for(h.push(e,0);!h.empty();)for(c in a=h.pop(),s=a.value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=u[c],p=l+d,f=r[c],(void 0===r[c]||f>p)&&(r[c]=p,h.push(c,p),o[c]=s));if(void 0!==n&&void 0===r[n]){var v=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(v)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],i=e;i;)n.push(i),t[i],i=t[i];return n.reverse(),n},find_path:function(t,e,n){var o=i.single_source_shortest_paths(t,e,n);return i.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(t){var e,n=i.PriorityQueue,o={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o.queue=[],o.sorter=t.sorter||n.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=i)},{}],30:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}]},{},[24])(24)});function _(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(n,!0).forEach(function(e){T(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function T(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C={name:"AuthTokenSetupDialogue",components:{QR:{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,e=this.options,n=this.tag,i=String(this.value);"canvas"===n?w.toCanvas(this.$el,i,e,function(t){if(t)throw t}):"img"===n?w.toDataURL(i,e,function(e,n){if(e)throw e;t.$el.src=n}):w.toString(i,e,function(e,n){if(e)throw e;t.$el.innerHTML=n})}},mounted:function(){this.generate()}}},props:{add:{type:Function,required:!0}},data:function(){return{adding:!1,loading:!1,deviceName:"",appPassword:"",loginName:"",passwordCopied:!1,showQR:!1,qrUrl:"",hoveringCopyButton:!1}},computed:{copyTooltipOptions:function(){var e={hideOnTargetClick:!1,trigger:"manual"};return this.passwordCopied?x({},e,{content:t("core","Copied!"),show:!0}):x({},e,{content:t("core","Copy"),show:this.hoveringCopyButton})}},methods:{selectInput:function(t){t.currentTarget.select()},submit:function(){var e=this;d()().then(function(){return e.loading=!0,e.add(e.deviceName)}).then(function(t){e.adding=!0,e.loginName=t.loginName,e.appPassword=t.token;var n=window.location.protocol+"//"+window.location.host+OC.getRootPath();e.qrUrl="nc://login/user:".concat(t.loginName,"&password:").concat(t.token,"&server:").concat(n),e.$nextTick(function(){e.$refs.appPassword.select()})}).catch(function(n){console.error("could not create a new app password",n),OC.Notification.showTemporary(t("core","Error while creating device token")),e.reset()})},onCopyPassword:function(){var t=this;this.passwordCopied=!0,this.$refs.clipboardButton.blur(),setTimeout(function(){return t.passwordCopied=!1},3e3)},onCopyPasswordFailed:function(){OC.Notification.showTemporary(t("core","Could not copy app password. Please copy it manually."))},reset:function(){this.adding=!1,this.loading=!1,this.showQR=!1,this.qrUrl="",this.deviceName="",this.appPassword="",this.loginName=""}}},k=(i(61),Object(A.a)(C,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.adding?n("div",[t._v("\n\t"+t._s(t.t("settings","Use the credentials below to configure your app or device."))+"\n\t"+t._s(t.t("settings","For security reasons this password will only be shown once."))+"\n\t"),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Username")))]),t._v(" "),n("input",{staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.loginName},on:{focus:t.selectInput}})]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Password")))]),t._v(" "),n("input",{ref:"appPassword",staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.appPassword},on:{focus:t.selectInput}}),t._v(" "),n("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.copyTooltipOptions,expression:"copyTooltipOptions"},{name:"clipboard",rawName:"v-clipboard:copy",value:t.appPassword,expression:"appPassword",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopyPassword,expression:"onCopyPassword",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onCopyPasswordFailed,expression:"onCopyPasswordFailed",arg:"error"}],ref:"clipboardButton",staticClass:"icon icon-clippy",on:{mouseover:function(e){t.hoveringCopyButton=!0},mouseleave:function(e){t.hoveringCopyButton=!1}}}),t._v(" "),n("button",{staticClass:"button",on:{click:t.reset}},[t._v("\n\t\t\t"+t._s(t.t("settings","Done"))+"\n\t\t")])]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"}),t._v(" "),t.showQR?n("QR",{attrs:{value:t.qrUrl}}):n("a",{on:{click:function(e){t.showQR=!0}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show QR code for mobile apps"))+"\n\t\t")])],1)]):n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.deviceName,expression:"deviceName"}],attrs:{type:"text",disabled:t.loading,placeholder:t.t("settings","App name")},domProps:{value:t.deviceName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)},input:function(e){e.target.composing||(t.deviceName=e.target.value)}}}),t._v(" "),n("button",{staticClass:"button",attrs:{disabled:t.loading},on:{click:t.submit}},[t._v(t._s(t.t("settings","Create new app password"))+"\n\t")])])},[],!1,null,"68c31750",null).exports);function E(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}var S,O,N=function(t){return function(e){return t(e),e}},M={name:"AuthTokenSection",props:{tokens:{type:Array,requried:!0}},components:{AuthTokenSetupDialogue:k,AuthTokenList:y},data:function(){return{baseUrl:OC.generateUrl("/settings/personal/authtokens")}},methods:{addNewToken:function(e){var n=this;console.debug("creating a new app token",e);var i={name:e};return l.a.post(this.baseUrl,i).then(function(t){return t.data}).then(N(function(){return console.debug("app token created")})).then(N(function(t){return n.tokens.push(t.deviceToken)})).catch(function(e){throw console.error.bind("could not create app password",e),OC.Notification.showTemporary(t("core","Error while creating device token")),e})},toggleTokenScope:function(e,n,i){console.debug("updating app token scope",e.id,n,i);var o=e.scope[n];return e.scope[n]=i,this.updateToken(e).then(N(function(){return console.debug("app token scope updated")})).catch(function(i){throw console.error.bind("could not update app token scope",i),OC.Notification.showTemporary(t("core","Error while updating device token scope")),e.scope[n]=o,i})},rename:function(e,n){console.debug("renaming app token",e.id,e.name,n);var i=e.name;return e.name=n,this.updateToken(e).then(N(function(){return console.debug("app token name updated")})).catch(function(n){console.error.bind("could not update app token name",n),OC.Notification.showTemporary(t("core","Error while updating device token name")),e.name=i})},updateToken:function(t){return l.a.put(this.baseUrl+"/"+t.id,t).then(function(t){return t.data})},deleteToken:function(e){var n=this;return console.debug("deleting app token",e),this.tokens=this.tokens.filter(function(t){return t!==e}),l.a.delete(this.baseUrl+"/"+e.id).then(function(t){return t.data}).then(N(function(){return console.debug("app token deleted")})).catch(function(i){console.error.bind("could not delete app token",i),OC.Notification.showTemporary(t("core","Error while deleting the token")),n.tokens.push(e)})},wipeToken:(S=regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.debug("wiping app token",n),e.prev=1,e.next=4,d()();case 4:return e.next=6,new Promise(function(e){OC.dialogs.confirm(t("core","Do you really want to wipe your data from this device?"),t("core","Confirm wipe"),e,!0)});case 6:if(e.sent){e.next=9;break}return console.debug("wipe aborted by user"),e.abrupt("return");case 9:return e.next=11,l.a.post(this.baseUrl+"/wipe/"+n.id);case 11:console.debug("app token marked for wipe"),n.type=2,e.next=19;break;case 15:e.prev=15,e.t0=e.catch(1),console.error("could not wipe app token",e.t0),OC.Notification.showTemporary(t("core","Error while wiping the device with the token"));case 19:case"end":return e.stop()}},e,this,[[1,15]])}),O=function(){var t=this,e=arguments;return new Promise(function(n,i){var o=S.apply(t,e);function r(t){E(o,n,i,r,a,"next",t)}function a(t){E(o,n,i,r,a,"throw",t)}r(void 0)})},function(t){return O.apply(this,arguments)})}},I=Object(A.a)(M,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"section",attrs:{id:"security"}},[n("h2",[t._v(t._s(t.t("settings","Devices & sessions")))]),t._v(" "),n("p",{staticClass:"settings-hint hidden-when-empty"},[t._v(t._s(t.t("settings","Web, desktop and mobile clients currently logged in to your account.")))]),t._v(" "),n("AuthTokenList",{attrs:{tokens:t.tokens},on:{toggleScope:t.toggleTokenScope,rename:t.rename,delete:t.deleteToken,wipe:t.wipeToken}}),t._v(" "),n("AuthTokenSetupDialogue",{attrs:{add:t.addNewToken}})],1)},[],!1,null,"51136558",null).exports;
+function b(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var w=function(t,e){return t(e={exports:{}},e.exports),e.exports}(function(t,e){t.exports=function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var c=b;if(!s&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return o(n||t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var r=b,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=i(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),r=[n-7],a=1;a<e-1;a++)r[a]=r[a-1]-o;return r.push(6),r.reverse()},n.getPositions=function(t){for(var e=[],i=n.getRowColCoords(t),o=i.length,r=0;r<o;r++)for(var a=0;a<o;a++)0===r&&0===a||0===r&&a===o-1||r===o-1&&0===a||e.push([i[r],i[a]]);return e}},{"./utils":21}],3:[function(t,e,n){var i=t("./mode"),o=["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 r(t){this.mode=i.ALPHANUMERIC,this.data=t}r.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},e.exports=r},{"./mode":14}],4:[function(t,e,n){function i(){this.buffer=[],this.length=0}i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=i},{}],5:[function(t,e,n){var i=t("../utils/buffer");function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new i(t*t),this.data.fill(0),this.reservedBit=new i(t*t),this.reservedBit.fill(0)}o.prototype.set=function(t,e,n,i){var o=t*this.size+e;this.data[o]=n,i&&(this.reservedBit[o]=!0)},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=o},{"../utils/buffer":28}],6:[function(t,e,n){var i=t("../utils/buffer"),o=t("./mode");function r(t){this.mode=o.BYTE,this.data=new i(t)}r.getBitsLength=function(t){return 8*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},e.exports=r},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,n){var i=t("./error-correction-level"),o=[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],r=[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];n.getBlocksCount=function(t,e){switch(e){case i.L:return o[4*(t-1)+0];case i.M:return o[4*(t-1)+1];case i.Q:return o[4*(t-1)+2];case i.H:return o[4*(t-1)+3];default:return}},n.getTotalCodewordsCount=function(t,e){switch(e){case i.L:return r[4*(t-1)+0];case i.M:return r[4*(t-1)+1];case i.Q:return r[4*(t-1)+2];case i.H:return r[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getPositions=function(t){var e=i(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,n){var i=t("./utils"),o=i.getBCHDigit(1335);n.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,r=n<<10;i.getBCHDigit(r)-o>=0;)r^=1335<<i.getBCHDigit(r)-o;return 21522^(n<<10|r)}},{"./utils":21}],11:[function(t,e,n){var i=t("../utils/buffer");if(i.alloc)var o=i.alloc(512),r=i.alloc(256);else var o=new i(512),r=new i(256);!function(){for(var t=1,e=0;e<255;e++)o[e]=t,r[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)o[e]=o[e-255]}(),n.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},n.exp=function(t){return o[t]},n.mul=function(t,e){return 0===t||0===e?0:o[r[t]+r[e]]}},{"../utils/buffer":28}],12:[function(t,e,n){var i=t("./mode"),o=t("./utils");function r(t){this.mode=i.KANJI,this.data=t}r.getBitsLength=function(t){return 13*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},e.exports=r},{"./mode":14,"./utils":21}],13:[function(t,e,n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i={N1:3,N2:3,N3:40,N4:10};function o(t,e,i){switch(t){case n.Patterns.PATTERN000:return(e+i)%2==0;case n.Patterns.PATTERN001:return e%2==0;case n.Patterns.PATTERN010:return i%3==0;case n.Patterns.PATTERN011:return(e+i)%3==0;case n.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case n.Patterns.PATTERN101:return e*i%2+e*i%3==0;case n.Patterns.PATTERN110:return(e*i%2+e*i%3)%2==0;case n.Patterns.PATTERN111:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}n.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},n.from=function(t){return n.isValid(t)?parseInt(t,10):void 0},n.getPenaltyN1=function(t){for(var e=t.size,n=0,o=0,r=0,a=null,s=null,c=0;c<e;c++){o=r=0,a=s=null;for(var l=0;l<e;l++){var u=t.get(c,l);u===a?o++:(o>=5&&(n+=i.N1+(o-5)),a=u,o=1),(u=t.get(l,c))===s?r++:(r>=5&&(n+=i.N1+(r-5)),s=u,r=1)}o>=5&&(n+=i.N1+(o-5)),r>=5&&(n+=i.N1+(r-5))}return n},n.getPenaltyN2=function(t){for(var e=t.size,n=0,o=0;o<e-1;o++)for(var r=0;r<e-1;r++){var a=t.get(o,r)+t.get(o,r+1)+t.get(o+1,r)+t.get(o+1,r+1);4!==a&&0!==a||n++}return n*i.N2},n.getPenaltyN3=function(t){for(var e=t.size,n=0,o=0,r=0,a=0;a<e;a++){o=r=0;for(var s=0;s<e;s++)o=o<<1&2047|t.get(a,s),s>=10&&(1488===o||93===o)&&n++,r=r<<1&2047|t.get(s,a),s>=10&&(1488===r||93===r)&&n++}return n*i.N3},n.getPenaltyN4=function(t){for(var e=0,n=t.data.length,o=0;o<n;o++)e+=t.data[o];var r=Math.abs(Math.ceil(100*e/n/5)-10);return r*i.N4},n.applyMask=function(t,e){for(var n=e.size,i=0;i<n;i++)for(var r=0;r<n;r++)e.isReserved(r,i)||e.xor(r,i,o(t,r,i))},n.getBestMask=function(t,e){for(var i=Object.keys(n.Patterns).length,o=0,r=1/0,a=0;a<i;a++){e(a),n.applyMask(a,t);var s=n.getPenaltyN1(t)+n.getPenaltyN2(t)+n.getPenaltyN3(t)+n.getPenaltyN4(t);n.applyMask(a,t),s<r&&(r=s,o=a)}return o}},{}],14:[function(t,e,n){var i=t("./version-check"),o=t("./regex");n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!i.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},n.getBestModeForData=function(t){return o.testNumeric(t)?n.NUMERIC:o.testAlphanumeric(t)?n.ALPHANUMERIC:o.testKanji(t)?n.KANJI:n.BYTE},n.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},n.isValid=function(t){return t&&t.bit&&t.ccBits},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,n){var i=t("./mode");function o(t){this.mode=i.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),t.put(i,10);var o=this.data.length-e;o>0&&(n=this.data.substr(e),i=parseInt(n,10),t.put(i,3*o+1))},e.exports=o},{"./mode":14}],16:[function(t,e,n){var i=t("../utils/buffer"),o=t("./galois-field");n.mul=function(t,e){var n=new i(t.length+e.length-1);n.fill(0);for(var r=0;r<t.length;r++)for(var a=0;a<e.length;a++)n[r+a]^=o.mul(t[r],e[a]);return n},n.mod=function(t,e){for(var n=new i(t);n.length-e.length>=0;){for(var r=n[0],a=0;a<e.length;a++)n[a]^=o.mul(e[a],r);for(var s=0;s<n.length&&0===n[s];)s++;n=n.slice(s)}return n},n.generateECPolynomial=function(t){for(var e=new i([1]),r=0;r<t;r++)e=n.mul(e,[1,o.exp(r)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,n){var i=t("../utils/buffer"),o=t("./utils"),r=t("./error-correction-level"),a=t("./bit-buffer"),s=t("./bit-matrix"),c=t("./alignment-pattern"),l=t("./finder-pattern"),u=t("./mask-pattern"),d=t("./error-correction-code"),p=t("./reed-solomon-encoder"),f=t("./version"),h=t("./format-info"),v=t("./mode"),m=t("./segments"),A=t("isarray");function g(t,e,n){var i,o,r=t.size,a=h.getEncodedBits(e,n);for(i=0;i<15;i++)o=1==(a>>i&1),i<6?t.set(i,8,o,!0):i<8?t.set(i+1,8,o,!0):t.set(r-15+i,8,o,!0),i<8?t.set(8,r-i-1,o,!0):i<9?t.set(8,15-i-1+1,o,!0):t.set(8,15-i-1,o,!0);t.set(r-8,8,1,!0)}function y(t,e,n){var r=new a;n.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),v.getCharCountIndicator(e.mode,t)),e.write(r)});var s=o.getSymbolTotalCodewords(t),c=d.getTotalCodewordsCount(t,e),l=8*(s-c);for(r.getLengthInBits()+4<=l&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var u=(l-r.getLengthInBits())/8,f=0;f<u;f++)r.put(f%2?17:236,8);return function(t,e,n){for(var r=o.getSymbolTotalCodewords(e),a=d.getTotalCodewordsCount(e,n),s=r-a,c=d.getBlocksCount(e,n),l=c-r%c,u=Math.floor(r/c),f=Math.floor(s/c),h=f+1,v=u-f,m=new p(v),A=0,g=new Array(c),y=new Array(c),b=0,w=new i(t.buffer),_=0;_<c;_++){var x=_<l?f:h;g[_]=w.slice(A,A+x),y[_]=m.encode(g[_]),A+=x,b=Math.max(b,x)}var T,C,k=new i(r),E=0;for(T=0;T<b;T++)for(C=0;C<c;C++)T<g[C].length&&(k[E++]=g[C][T]);for(T=0;T<v;T++)for(C=0;C<c;C++)k[E++]=y[C][T];return k}(r,t,e)}function b(t,e,n,i){var r;if(A(t))r=m.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var d=m.rawSplit(t);a=f.getBestVersionForData(d,n)}r=m.fromString(t,a||40)}var p=f.getBestVersionForData(r,n);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else e=p;var h=y(e,n,r),v=o.getSymbolSize(e),b=new s(v);return function(t,e){for(var n=t.size,i=l.getPositions(e),o=0;o<i.length;o++)for(var r=i[o][0],a=i[o][1],s=-1;s<=7;s++)if(!(r+s<=-1||n<=r+s))for(var c=-1;c<=7;c++)a+c<=-1||n<=a+c||(s>=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4?t.set(r+s,a+c,!0,!0):t.set(r+s,a+c,!1,!0))}(b,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var i=n%2==0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}(b),function(t,e){for(var n=c.getPositions(e),i=0;i<n.length;i++)for(var o=n[i][0],r=n[i][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(o+a,r+s,!0,!0):t.set(o+a,r+s,!1,!0)}(b,e),g(b,n,0),e>=7&&function(t,e){for(var n,i,o,r=t.size,a=f.getEncodedBits(e),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+r-8-3,o=1==(a>>s&1),t.set(n,i,o,!0),t.set(i,n,o,!0)}(b,e),function(t,e){for(var n=t.size,i=-1,o=n-1,r=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!t.isReserved(o,s-c)){var l=!1;a<e.length&&(l=1==(e[a]>>>r&1)),t.set(o,s-c,l),-1==--r&&(a++,r=7)}if((o+=i)<0||n<=o){o-=i,i=-i;break}}}(b,h),isNaN(i)&&(i=u.getBestMask(b,g.bind(null,b,n))),u.applyMask(i,b),g(b,n,i),{modules:b,version:e,errorCorrectionLevel:n,maskPattern:i,segments:r}}n.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,i,a=r.M;return void 0!==e&&(a=r.from(e.errorCorrectionLevel,r.M),n=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)),b(t,n,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:30}],18:[function(t,e,n){var i=t("../utils/buffer"),o=t("./polynomial");function r(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(t){this.degree=t,this.genPoly=o.generateECPolynomial(this.degree)},r.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=new i(this.degree);e.fill(0);var n=i.concat([t,e],t.length+this.degree),r=o.mod(n,this.genPoly),a=this.degree-r.length;if(a>0){var s=new i(this.degree);return s.fill(0),r.copy(s,a),s}return r},e.exports=r},{"../utils/buffer":28,"./polynomial":16}],19:[function(t,e,n){var i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=new RegExp(i,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(o,"g"),n.NUMERIC=new RegExp("[0-9]+","g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var r=new RegExp("^"+i+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(t){return r.test(t)},n.testNumeric=function(t){return a.test(t)},n.testAlphanumeric=function(t){return s.test(t)}},{}],20:[function(t,e,n){var i=t("./mode"),o=t("./numeric-data"),r=t("./alphanumeric-data"),a=t("./byte-data"),s=t("./kanji-data"),c=t("./regex"),l=t("./utils"),u=t("dijkstrajs");function d(t){return unescape(encodeURIComponent(t)).length}function p(t,e,n){for(var i,o=[];null!==(i=t.exec(n));)o.push({data:i[0],index:i.index,mode:e,length:i[0].length});return o}function f(t){var e,n,o=p(c.NUMERIC,i.NUMERIC,t),r=p(c.ALPHANUMERIC,i.ALPHANUMERIC,t);l.isKanjiModeEnabled()?(e=p(c.BYTE,i.BYTE,t),n=p(c.KANJI,i.KANJI,t)):(e=p(c.BYTE_KANJI,i.BYTE,t),n=[]);var a=o.concat(r,e,n);return a.sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,e){switch(e){case i.NUMERIC:return o.getBitsLength(t);case i.ALPHANUMERIC:return r.getBitsLength(t);case i.KANJI:return s.getBitsLength(t);case i.BYTE:return a.getBitsLength(t)}}function v(t,e){var n,c=i.getBestModeForData(t);if((n=i.from(e,c))!==i.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+i.toString(n)+".\n Suggested mode is: "+i.toString(c));switch(n!==i.KANJI||l.isKanjiModeEnabled()||(n=i.BYTE),n){case i.NUMERIC:return new o(t);case i.ALPHANUMERIC:return new r(t);case i.KANJI:return new s(t);case i.BYTE:return new a(t)}}n.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(v(e,null)):e.data&&t.push(v(e.data,e.mode)),t},[])},n.fromString=function(t,e){for(var o=f(t,l.isKanjiModeEnabled()),r=function(t){for(var e=[],n=0;n<t.length;n++){var o=t[n];switch(o.mode){case i.NUMERIC:e.push([o,{data:o.data,mode:i.ALPHANUMERIC,length:o.length},{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.ALPHANUMERIC:e.push([o,{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.KANJI:e.push([o,{data:o.data,mode:i.BYTE,length:d(o.data)}]);break;case i.BYTE:e.push([{data:o.data,mode:i.BYTE,length:d(o.data)}])}}return e}(o),a=function(t,e){for(var n={},o={start:{}},r=["start"],a=0;a<t.length;a++){for(var s=t[a],c=[],l=0;l<s.length;l++){var u=s[l],d=""+a+l;c.push(d),n[d]={node:u,lastCount:0},o[d]={};for(var p=0;p<r.length;p++){var f=r[p];n[f]&&n[f].node.mode===u.mode?(o[f][d]=h(n[f].lastCount+u.length,u.mode)-h(n[f].lastCount,u.mode),n[f].lastCount+=u.length):(n[f]&&(n[f].lastCount=u.length),o[f][d]=h(u.length,u.mode)+4+i.getCharCountIndicator(u.mode,e))}}r=c}for(p=0;p<r.length;p++)o[r[p]].end=0;return{map:o,table:n}}(r,e),s=u.find_path(a.map,"start","end"),c=[],p=1;p<s.length-1;p++)c.push(a.table[s[p]].node);return n.fromArray(function(t){return t.reduce(function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(c))},n.rawSplit=function(t){return n.fromArray(f(t,l.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:29}],21:[function(t,e,n){var i,o=[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];n.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},n.getSymbolTotalCodewords=function(t){return o[t]},n.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},n.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');i=t},n.isKanjiModeEnabled=function(){return void 0!==i},n.toSJIS=function(t){return i(t)}},{}],22:[function(t,e,n){n.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,n){var i=t("./utils"),o=t("./error-correction-code"),r=t("./error-correction-level"),a=t("./mode"),s=t("./version-check"),c=t("isarray"),l=i.getBCHDigit(7973);function u(t,e){return a.getCharCountIndicator(t,e)+4}function d(t,e){var n=0;return t.forEach(function(t){var i=u(t.mode,e);n+=i+t.getBitsLength()}),n}n.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},n.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var r=i.getSymbolTotalCodewords(t),c=o.getTotalCodewordsCount(t,e),l=8*(r-c);if(n===a.MIXED)return l;var d=l-u(n,t);switch(n){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}},n.getBestVersionForData=function(t,e){var i,o=r.from(e,r.M);if(c(t)){if(t.length>1)return function(t,e){for(var i=1;i<=40;i++){var o=d(t,i);if(o<=n.getCapacity(i,e,a.MIXED))return i}}(t,o);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,e,i){for(var o=1;o<=40;o++)if(e<=n.getCapacity(o,i,t))return o}(i.mode,i.getLength(),o)},n.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;i.getBCHDigit(e)-l>=0;)e^=7973<<i.getBCHDigit(e)-l;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:30}],24:[function(t,e,n){var i=t("./can-promise"),o=t("./core/qrcode"),r=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function s(t,e,n,r,a){var s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!i())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=r=void 0):2!==c||e.getContext||(r=n,n=e,e=void 0),new Promise(function(i,a){try{var s=o.create(n,r);i(t(s,e,r))}catch(t){a(t)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=r=void 0):3===c&&(e.getContext&&void 0===a?(a=r,r=void 0):(a=r,r=n,n=e,e=void 0));try{var u=o.create(n,r);a(null,t(u,e,r))}catch(t){a(t)}}n.create=o.create,n.toCanvas=s.bind(null,r.render),n.toDataURL=s.bind(null,r.renderToDataURL),n.toString=s.bind(null,function(t,e,n){return a.render(t,n)})},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,n){var i=t("./utils");n.render=function(t,e,n){var o=n,r=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(r=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=i.getOptions(o);var a=i.getImageWidth(t.modules.size,o),s=r.getContext("2d"),c=s.createImageData(a,a);return i.qrToImageData(c.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,r,a),s.putImageData(c,0,0),r},n.renderToDataURL=function(t,e,i){var o=i;void 0!==o||e&&e.getContext||(o=e,e=void 0),o||(o={});var r=n.render(t,e,o),a=o.type||"image/png",s=o.rendererOpts||{};return r.toDataURL(a,s.quality)}},{"./utils":27}],26:[function(t,e,n){var i=t("./utils");function o(t,e){var n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function r(t,e,n){var i=t+e;return void 0!==n&&(i+=" "+n),i}n.render=function(t,e,n){var a=i.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){for(var i="",o=0,a=!1,s=0,c=0;c<t.length;c++){var l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(i+=a?r("M",l+n,.5+u+n):r("m",o,0),o=0,a=!1),l+1<e&&t[c+1]||(i+=r("h",s),s=0)):o++}return i}(c,s,a.margin)+'"/>',p='viewBox="0 0 '+l+" "+l+'"',f=a.width?'width="'+a.width+'" height="'+a.width+'" ':"",h='<svg xmlns="http://www.w3.org/2000/svg" '+f+p+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,h),h}},{"./utils":27}],27:[function(t,e,n){function i(t){if("string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}n.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:n,scale:n?4:o,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},n.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},n.getImageWidth=function(t,e){var i=n.getScale(t,e);return Math.floor((t+2*e.margin)*i)},n.qrToImageData=function(t,e,i){for(var o=e.modules.size,r=e.modules.data,a=n.getScale(o,i),s=Math.floor((o+2*i.margin)*a),c=i.margin*a,l=[i.color.light,i.color.dark],u=0;u<s;u++)for(var d=0;d<s;d++){var p=4*(u*s+d),f=i.color.light;if(u>=c&&d>=c&&u<s-c&&d<s-c){var h=Math.floor((u-c)/a),v=Math.floor((d-c)/a);f=l[r[h*o+v]?1:0]}t[p++]=f.r,t[p++]=f.g,t[p++]=f.b,t[p]=f.a}}},{}],28:[function(t,e,n){var i=t("isarray");r.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var o=r.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function r(t,e,n){return r.TYPED_ARRAY_SUPPORT||this instanceof r?"number"==typeof t?c(this,t):function(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");var o;return o=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),r.TYPED_ARRAY_SUPPORT?o.__proto__=r.prototype:o=l(t,o),o}(t,e,n,i):"string"==typeof e?function(t,e){var n=0|d(e),i=s(t,n),o=i.write(e);return o!==n&&(i=i.slice(0,o)),i}(t,e):function(t,e){if(r.isBuffer(e)){var n=0|a(e.length),i=s(t,n);return 0===i.length?i:(e.copy(i,0,0,n),i)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(o=e.length)!=o?s(t,0):l(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return l(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new r(t,e,n)}function a(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function s(t,e){var n;return r.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=r.prototype:(null===(n=t)&&(n=new r(e)),n.length=e),n}function c(t,e){var n=s(t,e<0?0:0|a(e));if(!r.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)n[i]=0;return n}function l(t,e){for(var n=e.length<0?0:0|a(e.length),i=s(t,n),o=0;o<n;o+=1)i[o]=255&e[o];return i}function u(t,e){var n;e=e||1/0;for(var i=t.length,o=null,r=[],a=0;a<i;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function d(t){if(r.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;return 0===e?0:u(t).length}r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),r.prototype.write=function(t,e,n){void 0===e?(n=this.length,e=0):void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,i){return function(t,e,n,i){for(var o=0;o<i&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}(u(e,t.length-n),t,n,i)}(this,t,e,n)},r.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=r.prototype;else{var o=e-t;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+t]}return n},r.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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),t.length-e<i-n&&(i=t.length-e+n);var o,a=i-n;if(this===t&&n<e&&e<i)for(o=a-1;o>=0;--o)t[o+e]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},r.prototype.fill=function(t,e,n){if("string"==typeof t){if("string"==typeof e?(e=0,n=this.length):"string"==typeof n&&(n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=r.isBuffer(t)?t:new r(t),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this},r.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=c(null,e),a=0;for(n=0;n<t.length;++n){var l=t[n];if(!r.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,a),a+=l.length}return o},r.byteLength=d,r.prototype._isBuffer=!0,r.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports=r},{isarray:30}],29:[function(t,e,n){var i={single_source_shortest_paths:function(t,e,n){var o={},r={};r[e]=0;var a,s,c,l,u,d,p,f,h=i.PriorityQueue.make();for(h.push(e,0);!h.empty();)for(c in a=h.pop(),s=a.value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=u[c],p=l+d,f=r[c],(void 0===r[c]||f>p)&&(r[c]=p,h.push(c,p),o[c]=s));if(void 0!==n&&void 0===r[n]){var v=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(v)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],i=e;i;)n.push(i),t[i],i=t[i];return n.reverse(),n},find_path:function(t,e,n){var o=i.single_source_shortest_paths(t,e,n);return i.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(t){var e,n=i.PriorityQueue,o={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o.queue=[],o.sorter=t.sorter||n.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=i)},{}],30:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}]},{},[24])(24)});function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(n,!0).forEach(function(e){T(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function T(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C={name:"AuthTokenSetupDialogue",components:{QR:{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,e=this.options,n=this.tag,i=String(this.value);"canvas"===n?w.toCanvas(this.$el,i,e,function(t){if(t)throw t}):"img"===n?w.toDataURL(i,e,function(e,n){if(e)throw e;t.$el.src=n}):w.toString(i,e,function(e,n){if(e)throw e;t.$el.innerHTML=n})}},mounted:function(){this.generate()}}},props:{add:{type:Function,required:!0}},data:function(){return{adding:!1,loading:!1,deviceName:"",appPassword:"",loginName:"",passwordCopied:!1,showQR:!1,qrUrl:"",hoveringCopyButton:!1}},computed:{copyTooltipOptions:function(){var e={hideOnTargetClick:!1,trigger:"manual"};return this.passwordCopied?x({},e,{content:t("core","Copied!"),show:!0}):x({},e,{content:t("core","Copy"),show:this.hoveringCopyButton})}},methods:{selectInput:function(t){t.currentTarget.select()},submit:function(){var e=this;d()().then(function(){return e.loading=!0,e.add(e.deviceName)}).then(function(t){e.adding=!0,e.loginName=t.loginName,e.appPassword=t.token;var n=window.location.protocol+"//"+window.location.host+OC.getRootPath();e.qrUrl="nc://login/user:".concat(t.loginName,"&password:").concat(t.token,"&server:").concat(n),e.$nextTick(function(){e.$refs.appPassword.select()})}).catch(function(n){console.error("could not create a new app password",n),OC.Notification.showTemporary(t("core","Error while creating device token")),e.reset()})},onCopyPassword:function(){var t=this;this.passwordCopied=!0,this.$refs.clipboardButton.blur(),setTimeout(function(){return t.passwordCopied=!1},3e3)},onCopyPasswordFailed:function(){OC.Notification.showTemporary(t("core","Could not copy app password. Please copy it manually."))},reset:function(){this.adding=!1,this.loading=!1,this.showQR=!1,this.qrUrl="",this.deviceName="",this.appPassword="",this.loginName=""}}},k=(i(61),Object(A.a)(C,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.adding?n("div",[t._v("\n\t"+t._s(t.t("settings","Use the credentials below to configure your app or device."))+"\n\t"+t._s(t.t("settings","For security reasons this password will only be shown once."))+"\n\t"),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Username")))]),t._v(" "),n("input",{staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.loginName},on:{focus:t.selectInput}})]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Password")))]),t._v(" "),n("input",{ref:"appPassword",staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.appPassword},on:{focus:t.selectInput}}),t._v(" "),n("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.copyTooltipOptions,expression:"copyTooltipOptions"},{name:"clipboard",rawName:"v-clipboard:copy",value:t.appPassword,expression:"appPassword",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopyPassword,expression:"onCopyPassword",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onCopyPasswordFailed,expression:"onCopyPasswordFailed",arg:"error"}],ref:"clipboardButton",staticClass:"icon icon-clippy",on:{mouseover:function(e){t.hoveringCopyButton=!0},mouseleave:function(e){t.hoveringCopyButton=!1}}}),t._v(" "),n("button",{staticClass:"button",on:{click:t.reset}},[t._v("\n\t\t\t"+t._s(t.t("settings","Done"))+"\n\t\t")])]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"}),t._v(" "),t.showQR?n("QR",{attrs:{value:t.qrUrl}}):n("a",{on:{click:function(e){t.showQR=!0}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show QR code for mobile apps"))+"\n\t\t")])],1)]):n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.deviceName,expression:"deviceName"}],attrs:{type:"text",disabled:t.loading,placeholder:t.t("settings","App name")},domProps:{value:t.deviceName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)},input:function(e){e.target.composing||(t.deviceName=e.target.value)}}}),t._v(" "),n("button",{staticClass:"button",attrs:{disabled:t.loading},on:{click:t.submit}},[t._v(t._s(t.t("settings","Create new app password"))+"\n\t")])])},[],!1,null,"68c31750",null).exports);function E(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}var S,O,N=function(t){return function(e){return t(e),e}},M={name:"AuthTokenSection",props:{tokens:{type:Array,requried:!0}},components:{AuthTokenSetupDialogue:k,AuthTokenList:y},data:function(){return{baseUrl:OC.generateUrl("/settings/personal/authtokens")}},methods:{addNewToken:function(e){var n=this;console.debug("creating a new app token",e);var i={name:e};return l.a.post(this.baseUrl,i).then(function(t){return t.data}).then(N(function(){return console.debug("app token created")})).then(N(function(t){return n.tokens.push(t.deviceToken)})).catch(function(e){throw console.error.bind("could not create app password",e),OC.Notification.showTemporary(t("core","Error while creating device token")),e})},toggleTokenScope:function(e,n,i){console.debug("updating app token scope",e.id,n,i);var o=e.scope[n];return e.scope[n]=i,this.updateToken(e).then(N(function(){return console.debug("app token scope updated")})).catch(function(i){throw console.error.bind("could not update app token scope",i),OC.Notification.showTemporary(t("core","Error while updating device token scope")),e.scope[n]=o,i})},rename:function(e,n){console.debug("renaming app token",e.id,e.name,n);var i=e.name;return e.name=n,this.updateToken(e).then(N(function(){return console.debug("app token name updated")})).catch(function(n){console.error.bind("could not update app token name",n),OC.Notification.showTemporary(t("core","Error while updating device token name")),e.name=i})},updateToken:function(t){return l.a.put(this.baseUrl+"/"+t.id,t).then(function(t){return t.data})},deleteToken:function(e){var n=this;return console.debug("deleting app token",e),this.tokens=this.tokens.filter(function(t){return t!==e}),l.a.delete(this.baseUrl+"/"+e.id).then(function(t){return t.data}).then(N(function(){return console.debug("app token deleted")})).catch(function(i){console.error.bind("could not delete app token",i),OC.Notification.showTemporary(t("core","Error while deleting the token")),n.tokens.push(e)})},wipeToken:(S=regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.debug("wiping app token",n),e.prev=1,e.next=4,d()();case 4:return e.next=6,new Promise(function(e){OC.dialogs.confirm(t("core","Do you really want to wipe your data from this device?"),t("core","Confirm wipe"),e,!0)});case 6:if(e.sent){e.next=9;break}return console.debug("wipe aborted by user"),e.abrupt("return");case 9:return e.next=11,l.a.post(this.baseUrl+"/wipe/"+n.id);case 11:console.debug("app token marked for wipe"),n.type=2,e.next=19;break;case 15:e.prev=15,e.t0=e.catch(1),console.error("could not wipe app token",e.t0),OC.Notification.showTemporary(t("core","Error while wiping the device with the token"));case 19:case"end":return e.stop()}},e,this,[[1,15]])}),O=function(){var t=this,e=arguments;return new Promise(function(n,i){var o=S.apply(t,e);function r(t){E(o,n,i,r,a,"next",t)}function a(t){E(o,n,i,r,a,"throw",t)}r(void 0)})},function(t){return O.apply(this,arguments)})}},I=Object(A.a)(M,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"section",attrs:{id:"security"}},[n("h2",[t._v(t._s(t.t("settings","Devices & sessions")))]),t._v(" "),n("p",{staticClass:"settings-hint hidden-when-empty"},[t._v(t._s(t.t("settings","Web, desktop and mobile clients currently logged in to your account.")))]),t._v(" "),n("AuthTokenList",{attrs:{tokens:t.tokens},on:{toggleScope:t.toggleTokenScope,rename:t.rename,delete:t.deleteToken,wipe:t.wipeToken}}),t._v(" "),n("AuthTokenSetupDialogue",{attrs:{add:t.addNewToken}})],1)},[],!1,null,"51136558",null).exports;
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@@ -833,4 +833,4 @@ function b(){throw new Error("Dynamic requires are not currently supported by ro
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
i.nc=btoa(OC.requestToken),o.default.use(a.a),o.default.use(s.a),o.default.prototype.t=t,new(o.default.extend(I))({propsData:{tokens:OCP.InitialState.loadState("settings","app_tokens")}}).$mount("#security")}]);
-//# sourceMappingURL=vue-settings-personal-security.js.map?v=eed952f52c1b17884d42 \ No newline at end of file
+//# sourceMappingURL=vue-settings-personal-security.js.map?v=1d3a477c0b22e4ee114a \ No newline at end of file