1 (window
.webpackJsonp
=window
.webpackJsonp
||[]).push([[3],{623:function(t
,e
){let i
;const 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];e
.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},e
.getSymbolTotalCodewords=function(t
){return n
[t
]},e
.getBCHDigit=function(t
){let e
=0;for(;0!==t
;)e
++,t
>>>=1;return e
},e
.setToSJISFunction=function(t
){if("function"!=typeof t
)throw new Error('"toSJISFunc" is not a valid function.');i
=t
},e
.isKanjiModeEnabled=function(){return void 0!==i
},e
.toSJIS=function(t
){return i(t
)}},624:function(t
,e
,i
){const n
=i(641),r
=i(642);e
.NUMERIC
={id:"Numeric",bit:1,ccBits:[10,12,14]},e
.ALPHANUMERIC
={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e
.BYTE
={id:"Byte",bit:4,ccBits:[8,16,16]},e
.KANJI
={id:"Kanji",bit:8,ccBits:[8,10,12]},e
.MIXED
={bit:-1},e
.getCharCountIndicator=function(t
,e
){if(!t
.ccBits
)throw new Error("Invalid mode: "+t
);if(!n
.isValid(e
))throw new Error("Invalid version: "+e
);return e
>=1&&e
<10?t
.ccBits
[0]:e
<27?t
.ccBits
[1]:t
.ccBits
[2]},e
.getBestModeForData=function(t
){return r
.testNumeric(t
)?e
.NUMERIC:r
.testAlphanumeric(t
)?e
.ALPHANUMERIC:r
.testKanji(t
)?e
.KANJI:e
.BYTE
},e
.toString=function(t
){if(t
&&t
.id
)return t
.id
;throw new Error("Invalid mode")},e
.isValid=function(t
){return t
&&t
.bit
&&t
.ccBits
},e
.from=function(t
,i
){if(e
.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 e
.NUMERIC
;case"alphanumeric":return e
.ALPHANUMERIC
;case"kanji":return e
.KANJI
;case"byte":return e
.BYTE
;default:throw new Error("Unknown mode: "+t
)}}(t
)}catch(t
){return i
}}},625:function(t
,e
,i
){var n
=i(339),r
=i(338),o
=i(173),a
=i(340);t
.exports=function(t
){return n(t
)||r(t
)||o(t
)||a()},t
.exports
.__esModule
=!0,t
.exports
.default=t
.exports
},626:function(t
,e
){e
.L
={bit:1},e
.M
={bit:0},e
.Q
={bit:3},e
.H
={bit:2},e
.isValid=function(t
){return t
&&void 0!==t
.bit
&&t
.bit
>=0&&t
.bit
<4},e
.from=function(t
,i
){if(e
.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 e
.L
;case"m":case"medium":return e
.M
;case"q":case"quartile":return e
.Q
;case"h":case"high":return e
.H
;default:throw new Error("Unknown EC Level: "+t
)}}(t
)}catch(t
){return i
}}},640:function(t
,e
,i
){const n
=i(626),r
=[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],o
=[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];e
.getBlocksCount=function(t
,e
){switch(e
){case n
.L:return r
[4*(t
-1)+0];case n
.M:return r
[4*(t
-1)+1];case n
.Q:return r
[4*(t
-1)+2];case n
.H:return r
[4*(t
-1)+3];default:return}},e
.getTotalCodewordsCount=function(t
,e
){switch(e
){case n
.L:return o
[4*(t
-1)+0];case n
.M:return o
[4*(t
-1)+1];case n
.Q:return o
[4*(t
-1)+2];case n
.H:return o
[4*(t
-1)+3];default:return}}},641:function(t
,e
){e
.isValid=function(t
){return!isNaN(t
)&&t
>=1&&t
<=40}},642:function(t
,e
){let i
="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i
=i
.replace(/u
/g
,"\\u");const n
="(?:(?![A-Z0-9 $%*+\\-./:]|"+i
+")(?:.|[\r\n]))+";e
.KANJI
=new RegExp(i
,"g"),e
.BYTE_KANJI
=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e
.BYTE
=new RegExp(n
,"g"),e
.NUMERIC
=new RegExp("[0-9]+","g"),e
.ALPHANUMERIC
=new RegExp("[A-Z $%*+\\-./:]+","g");const r
=new RegExp("^"+i
+"$"),o
=new RegExp("^[0-9]+$"),a
=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e
.testKanji=function(t
){return r
.test(t
)},e
.testNumeric=function(t
){return o
.test(t
)},e
.testAlphanumeric=function(t
){return a
.test(t
)}},643:function(t
,e
){function i(t
){if("number"==typeof t
&&(t
=t
.toString()),"string"!=typeof t
)throw new Error("Color should be defined as hex string");let 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");const i
=parseInt(e
.join(""),16);return{r:i
>>24&255,g:i
>>16&255,b:i
>>8&255,a:255&i
,hex:"#"+e
.slice(0,6).join("")}}e
.getOptions=function(t
){t
||(t
={}),t
.color
||(t
.color
={});const e
=void 0===t
.margin
||null===t
.margin
||t
.margin
<0?4:t
.margin
,n
=t
.width
&&t
.width
>=21?t
.width:void 0,r
=t
.scale
||4;return{width:n
,scale:n
?4:r
,margin:e
,color:{dark:i(t
.color
.dark
||"#000000ff"),light:i(t
.color
.light
||"#ffffffff")},type:t
.type
,rendererOpts:t
.rendererOpts
||{}}},e
.getScale=function(t
,e
){return e
.width
&&e
.width
>=t
+2*e
.margin
?e
.width
/(t
+2*e
.margin
):e
.scale
},e
.getImageWidth=function(t
,i
){const n
=e
.getScale(t
,i
);return Math
.floor((t
+2*i
.margin
)*n
)},e
.qrToImageData=function(t
,i
,n
){const r
=i
.modules
.size
,o
=i
.modules
.data
,a
=e
.getScale(r
,n
),s
=Math
.floor((r
+2*n
.margin
)*a
),h
=n
.margin
*a
,c
=[n
.color
.light
,n
.color
.dark
];for(let e
=0;e
<s
;e
++)for(let i
=0;i
<s
;i
++){let l
=4*(e
*s
+i
),u
=n
.color
.light
;if(e
>=h
&&i
>=h
&&e
<s
-h
&&i
<s
-h
){u
=c
[o
[Math
.floor((e
-h
)/a)*r+Math.floor((i-h)/a)]?1:0]}t
[l
++]=u
.r
,t
[l
++]=u
.g
,t
[l
++]=u
.b
,t
[l
]=u
.a
}}},667:function(t
,e
,i
){var n
=i(341),r
=i(342),o
=i(343),a
=i(668),s
=i(669),h
=i(344),c
=i(63);t
.exports=function(t
,e
,i
){if((t
=c(t
))&&(i
||void 0===e
))return r(t
);if(!t
||!(e
=n(e
)))return t
;var l
=h(t
),u
=h(e
),d
=s(l
,u
),p
=a(l
,u
)+1;return o(l
,d
,p
).join("")}},668:function(t
,e
,i
){var n
=i(172);t
.exports=function(t
,e
){for(var i
=t
.length
;i
--&&n(e
,t
[i
],0)>-1;);return i
}},669:function(t
,e
,i
){var n
=i(172);t
.exports=function(t
,e
){for(var i
=-1,r
=t
.length
;++i
<r
&&n(e
,t
[i
],0)>-1;);return i
}},672:function(t
,e
,i
){"use strict";i
.d(e
,"a",(function(){return o
}));var n
=i(0),r
=i(673);var o
=Object(n
.o
)({name:"VueQrcode",props:{value:{type:String
,default:void 0},options:{type:Object
,default:void 0},tag:{type:String
,default:"canvas"}},emits:["ready"],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el
&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const t
=this.options
||{},e
=String(this.value
),i
=()=>{this.$emit("ready",this.$el
)};switch(this.tag
){case"canvas":Object(r
.toCanvas
)(this.$el
,e
,t
,t
=>{if(t
)throw t
;i()});break;case"img":Object(r
.toDataURL
)(e
,t
,(t
,e
)=>{if(t
)throw t
;this.$el
.src
=e
,this.$el
.onload
=i
});break;case"svg":Object(r
.toString
)(e
,t
,(t
,e
)=>{if(t
)throw t
;const n
=document
.createElement("div");n
.innerHTML
=e
;const r
=n
.querySelector("svg");if(r
){const{attributes:t
,childNodes:e
}=r
;Object
.keys(t
).forEach(e
=>{const i
=t
[Number(e
)];this.$el
.setAttribute(i
.name
,i
.value
)}),Object
.keys(e
).forEach(t
=>{const i
=e
[Number(t
)];this.$el
.appendChild(i
.cloneNode(!0))}),i()}})}}},render(){return Object(n
.q
)(this.tag
,this.$slots
.default)}})},673:function(t
,e
,i
){const n
=i(674),r
=i(675),o
=i(693),a
=i(694);function s(t
,e
,i
,o
,a
){const s
=[].slice
.call(arguments
,1),h
=s
.length
,c
="function"==typeof s
[h
-1];if(!c
&&!n())throw new Error("Callback required as last argument");if(!c
){if(h
<1)throw new Error("Too few arguments provided");return 1===h
?(i
=e
,e
=o
=void 0):2!==h
||e
.getContext
||(o
=i
,i
=e
,e
=void 0),new Promise((function(n
,a
){try{const a
=r
.create(i
,o
);n(t(a
,e
,o
))}catch(t
){a(t
)}}))}if(h
<2)throw new Error("Too few arguments provided");2===h
?(a
=i
,i
=e
,e
=o
=void 0):3===h
&&(e
.getContext
&&void 0===a
?(a
=o
,o
=void 0):(a
=o
,o
=i
,i
=e
,e
=void 0));try{const n
=r
.create(i
,o
);a(null,t(n
,e
,o
))}catch(t
){a(t
)}}e
.create
=r
.create
,e
.toCanvas
=s
.bind(null,o
.render
),e
.toDataURL
=s
.bind(null,o
.renderToDataURL
),e
.toString
=s
.bind(null,(function(t
,e
,i
){return a
.render(t
,i
)}))},674:function(t
,e
){t
.exports=function(){return"function"==typeof Promise
&&Promise
.prototype&&Promise
.prototype.then
}},675:function(t
,e
,i
){const n
=i(623),r
=i(626),o
=i(676),a
=i(677),s
=i(678),h
=i(679),c
=i(680),l
=i(640),u
=i(681),d
=i(684),p
=i(685),f
=i(624),g
=i(686);function m(t
,e
,i
){const n
=t
.size
,r
=p
.getEncodedBits(e
,i
);let o
,a
;for(o
=0;o
<15;o
++)a
=1==(r
>>o
&1),o
<6?t
.set(o
,8,a
,!0):o
<8?t
.set(o
+1,8,a
,!0):t
.set(n
-15+o
,8,a
,!0),o
<8?t
.set(8,n
-o
-1,a
,!0):o
<9?t
.set(8,15-o
-1+1,a
,!0):t
.set(8,15-o
-1,a
,!0);t
.set(n
-8,8,1,!0)}function v(t
,e
,i
){const r
=new o
;i
.forEach((function(e
){r
.put(e
.mode
.bit
,4),r
.put(e
.getLength(),f
.getCharCountIndicator(e
.mode
,t
)),e
.write(r
)}));const a
=8*(n
.getSymbolTotalCodewords(t
)-l
.getTotalCodewordsCount(t
,e
));for(r
.getLengthInBits()+4<=a
&&r
.put(0,4);r
.getLengthInBits()%8!=0;)r
.putBit(0);const s
=(a
-r
.getLengthInBits())/8;for(let t
=0;t
<s
;t
++)r
.put(t
%2?17:236,8);return function(t
,e
,i
){const r
=n
.getSymbolTotalCodewords(e
),o
=l
.getTotalCodewordsCount(e
,i
),a
=r
-o
,s
=l
.getBlocksCount(e
,i
),h
=s
-r
%s
,c
=Math
.floor(r
/s),d=Math.floor(a/s),p
=d
+1,f
=c
-d
,g
=new u(f
);let m
=0;const v
=new Array(s
),w
=new Array(s
);let y
=0;const b
=new Uint8Array(t
.buffer
);for(let t
=0;t
<s
;t
++){const e
=t
<h
?d:p
;v
[t
]=b
.slice(m
,m
+e
),w
[t
]=g
.encode(v
[t
]),m
+=e
,y
=Math
.max(y
,e
)}const x
=new Uint8Array(r
);let M
,C
,E
=0;for(M
=0;M
<y
;M
++)for(C
=0;C
<s
;C
++)M
<v
[C
].length
&&(x
[E
++]=v
[C
][M
]);for(M
=0;M
<f
;M
++)for(C
=0;C
<s
;C
++)x
[E
++]=w
[C
][M
];return x
}(r
,t
,e
)}function w(t
,e
,i
,r
){let o
;if(Array
.isArray(t
))o
=g
.fromArray(t
);else{if("string"!=typeof t
)throw new Error("Invalid data");{let n
=e
;if(!n
){const e
=g
.rawSplit(t
);n
=d
.getBestVersionForData(e
,i
)}o
=g
.fromString(t
,n
||40)}}const l
=d
.getBestVersionForData(o
,i
);if(!l
)throw new Error("The amount of data is too big to be stored in a QR Code");if(e
){if(e
<l
)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l
+".\n")}else e
=l
;const u
=v(e
,i
,o
),p
=n
.getSymbolSize(e
),f
=new a(p
);return function(t
,e
){const i
=t
.size
,n
=h
.getPositions(e
);for(let e
=0;e
<n
.length
;e
++){const r
=n
[e
][0],o
=n
[e
][1];for(let e
=-1;e
<=7;e
++)if(!(r
+e
<=-1||i
<=r
+e
))for(let n
=-1;n
<=7;n
++)o
+n
<=-1||i
<=o
+n
||(e
>=0&&e
<=6&&(0===n
||6===n
)||n
>=0&&n
<=6&&(0===e
||6===e
)||e
>=2&&e
<=4&&n
>=2&&n
<=4?t
.set(r
+e
,o
+n
,!0,!0):t
.set(r
+e
,o
+n
,!1,!0))}}(f
,e
),function(t
){const e
=t
.size
;for(let i
=8;i
<e
-8;i
++){const e
=i
%2==0;t
.set(i
,6,e
,!0),t
.set(6,i
,e
,!0)}}(f
),function(t
,e
){const i
=s
.getPositions(e
);for(let e
=0;e
<i
.length
;e
++){const n
=i
[e
][0],r
=i
[e
][1];for(let e
=-2;e
<=2;e
++)for(let i
=-2;i
<=2;i
++)-2===e
||2===e
||-2===i
||2===i
||0===e
&&0===i
?t
.set(n
+e
,r
+i
,!0,!0):t
.set(n
+e
,r
+i
,!1,!0)}}(f
,e
),m(f
,i
,0),e
>=7&&function(t
,e
){const i
=t
.size
,n
=d
.getEncodedBits(e
);let r
,o
,a
;for(let e
=0;e
<18;e
++)r
=Math
.floor(e
/3),o
=e
%3+i
-8-3,a
=1==(n
>>e
&1),t
.set(r
,o
,a
,!0),t
.set(o
,r
,a
,!0)}(f
,e
),function(t
,e
){const i
=t
.size
;let n
=-1,r
=i
-1,o
=7,a
=0;for(let s
=i
-1;s
>0;s
-=2)for(6===s
&&s
--;;){for(let i
=0;i
<2;i
++)if(!t
.isReserved(r
,s
-i
)){let n
=!1;a
<e
.length
&&(n
=1==(e
[a
]>>>o
&1)),t
.set(r
,s
-i
,n
),o
--,-1===o
&&(a
++,o
=7)}if(r
+=n
,r
<0||i
<=r
){r
-=n
,n
=-n
;break}}}(f
,u
),isNaN(r
)&&(r
=c
.getBestMask(f
,m
.bind(null,f
,i
))),c
.applyMask(r
,f
),m(f
,i
,r
),{modules:f
,version:e
,errorCorrectionLevel:i
,maskPattern:r
,segments:o
}}e
.create=function(t
,e
){if(void 0===t
||""===t
)throw new Error("No input text");let i
,o
,a
=r
.M
;return void 0!==e
&&(a
=r
.from(e
.errorCorrectionLevel
,r
.M
),i
=d
.from(e
.version
),o
=c
.from(e
.maskPattern
),e
.toSJISFunc
&&n
.setToSJISFunction(e
.toSJISFunc
)),w(t
,i
,a
,o
)}},676:function(t
,e
){function i(){this.buffer
=[],this.length
=0}i
.prototype={get:function(t
){const e
=Math
.floor(t
/8);return 1==(this.buffer
[e
]>>>7-t
%8&1)},put:function(t
,e
){for(let i
=0;i
<e
;i
++)this.putBit(1==(t
>>>e
-i
-1&1))},getLengthInBits:function(){return this.length
},putBit:function(t
){const e
=Math
.floor(this.length
/8);this.buffer
.length
<=e
&&this.buffer
.push(0),t
&&(this.buffer
[e
]|=128>>>this.length
%8),this.length
++}},t
.exports
=i
},677:function(t
,e
){function i(t
){if(!t
||t
<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size
=t
,this.data
=new Uint8Array(t
*t
),this.reservedBit
=new Uint8Array(t
*t
)}i
.prototype.set=function(t
,e
,i
,n
){const r
=t
*this.size
+e
;this.data
[r
]=i
,n
&&(this.reservedBit
[r
]=!0)},i
.prototype.get=function(t
,e
){return this.data
[t
*this.size
+e
]},i
.prototype.xor=function(t
,e
,i
){this.data
[t
*this.size
+e
]^=i
},i
.prototype.isReserved=function(t
,e
){return this.reservedBit
[t
*this.size
+e
]},t
.exports
=i
},678:function(t
,e
,i
){const n
=i(623).getSymbolSize
;e
.getRowColCoords=function(t
){if(1===t
)return[];const e
=Math
.floor(t
/7)+2,i=n(t),r=145===i?26:2*Math.ceil((i-13)/(2*e
-2)),o
=[i
-7];for(let t
=1;t
<e
-1;t
++)o
[t
]=o
[t
-1]-r
;return o
.push(6),o
.reverse()},e
.getPositions=function(t
){const i
=[],n
=e
.getRowColCoords(t
),r
=n
.length
;for(let t
=0;t
<r
;t
++)for(let e
=0;e
<r
;e
++)0===t
&&0===e
||0===t
&&e
===r
-1||t
===r
-1&&0===e
||i
.push([n
[t
],n
[e
]]);return i
}},679:function(t
,e
,i
){const n
=i(623).getSymbolSize
;e
.getPositions=function(t
){const e
=n(t
);return[[0,0],[e
-7,0],[0,e
-7]]}},680:function(t
,e
){e
.Patterns
={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const i
=3,n
=3,r
=40,o
=10;function a(t
,i
,n
){switch(t
){case e
.Patterns
.PATTERN000:return(i
+n
)%2==0;case e
.Patterns
.PATTERN001:return i
%2==0;case e
.Patterns
.PATTERN010:return n
%3==0;case e
.Patterns
.PATTERN011:return(i
+n
)%3==0;case e
.Patterns
.PATTERN100:return(Math
.floor(i
/2)+Math.floor(n/3))%2==0;case e
.Patterns
.PATTERN101:return i
*n
%2+i
*n
%3==0;case e
.Patterns
.PATTERN110:return(i
*n
%2+i
*n
%3)%2==0;case e
.Patterns
.PATTERN111:return(i
*n
%3+(i
+n
)%2)%2==0;default:throw new Error("bad maskPattern:"+t
)}}e
.isValid=function(t
){return null!=t
&&""!==t
&&!isNaN(t
)&&t
>=0&&t
<=7},e
.from=function(t
){return e
.isValid(t
)?parseInt(t
,10):void 0},e
.getPenaltyN1=function(t
){const e
=t
.size
;let n
=0,r
=0,o
=0,a
=null,s
=null;for(let h
=0;h
<e
;h
++){r
=o
=0,a
=s
=null;for(let c
=0;c
<e
;c
++){let e
=t
.get(h
,c
);e
===a
?r
++:(r
>=5&&(n
+=i
+(r
-5)),a
=e
,r
=1),e
=t
.get(c
,h
),e
===s
?o
++:(o
>=5&&(n
+=i
+(o
-5)),s
=e
,o
=1)}r
>=5&&(n
+=i
+(r
-5)),o
>=5&&(n
+=i
+(o
-5))}return n
},e
.getPenaltyN2=function(t
){const e
=t
.size
;let i
=0;for(let n
=0;n
<e
-1;n
++)for(let r
=0;r
<e
-1;r
++){const e
=t
.get(n
,r
)+t
.get(n
,r
+1)+t
.get(n
+1,r
)+t
.get(n
+1,r
+1);4!==e
&&0!==e
||i
++}return i
*n
},e
.getPenaltyN3=function(t
){const e
=t
.size
;let i
=0,n
=0,o
=0;for(let r
=0;r
<e
;r
++){n
=o
=0;for(let a
=0;a
<e
;a
++)n
=n
<<1&2047|t
.get(r
,a
),a
>=10&&(1488===n
||93===n
)&&i
++,o
=o
<<1&2047|t
.get(a
,r
),a
>=10&&(1488===o
||93===o
)&&i
++}return i
*r
},e
.getPenaltyN4=function(t
){let e
=0;const i
=t
.data
.length
;for(let n
=0;n
<i
;n
++)e
+=t
.data
[n
];return Math
.abs(Math
.ceil(100*e
/i
/5)-10)*o
},e
.applyMask=function(t
,e
){const i
=e
.size
;for(let n
=0;n
<i
;n
++)for(let r
=0;r
<i
;r
++)e
.isReserved(r
,n
)||e
.xor(r
,n
,a(t
,r
,n
))},e
.getBestMask=function(t
,i
){const n
=Object
.keys(e
.Patterns
).length
;let r
=0,o
=1/0;for(let a
=0;a
<n
;a
++){i(a
),e
.applyMask(a
,t
);const n
=e
.getPenaltyN1(t
)+e
.getPenaltyN2(t
)+e
.getPenaltyN3(t
)+e
.getPenaltyN4(t
);e
.applyMask(a
,t
),n
<o
&&(o
=n
,r
=a
)}return r
}},681:function(t
,e
,i
){const n
=i(682);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
=n
.generateECPolynomial(this.degree
)},r
.prototype.encode=function(t
){if(!this.genPoly
)throw new Error("Encoder not initialized");const e
=new Uint8Array(t
.length
+this.degree
);e
.set(t
);const i
=n
.mod(e
,this.genPoly
),r
=this.degree
-i
.length
;if(r
>0){const t
=new Uint8Array(this.degree
);return t
.set(i
,r
),t
}return i
},t
.exports
=r
},682:function(t
,e
,i
){const n
=i(683);e
.mul=function(t
,e
){const i
=new Uint8Array(t
.length
+e
.length
-1);for(let r
=0;r
<t
.length
;r
++)for(let o
=0;o
<e
.length
;o
++)i
[r
+o
]^=n
.mul(t
[r
],e
[o
]);return i
},e
.mod=function(t
,e
){let i
=new Uint8Array(t
);for(;i
.length
-e
.length
>=0;){const t
=i
[0];for(let r
=0;r
<e
.length
;r
++)i
[r
]^=n
.mul(e
[r
],t
);let r
=0;for(;r
<i
.length
&&0===i
[r
];)r
++;i
=i
.slice(r
)}return i
},e
.generateECPolynomial=function(t
){let i
=new Uint8Array([1]);for(let r
=0;r
<t
;r
++)i
=e
.mul(i
,new Uint8Array([1,n
.exp(r
)]));return i
}},683:function(t
,e
){const i
=new Uint8Array(512),n
=new Uint8Array(256);!function(){let t
=1;for(let e
=0;e
<255;e
++)i
[e
]=t
,n
[t
]=e
,t
<<=1,256&t
&&(t
^=285);for(let t
=255;t
<512;t
++)i
[t
]=i
[t
-255]}(),e
.log=function(t
){if(t
<1)throw new Error("log("+t
+")");return n
[t
]},e
.exp=function(t
){return i
[t
]},e
.mul=function(t
,e
){return 0===t
||0===e
?0:i
[n
[t
]+n
[e
]]}},684:function(t
,e
,i
){const n
=i(623),r
=i(640),o
=i(626),a
=i(624),s
=i(641),h
=n
.getBCHDigit(7973);function c(t
,e
){return a
.getCharCountIndicator(t
,e
)+4}function l(t
,e
){let i
=0;return t
.forEach((function(t
){const n
=c(t
.mode
,e
);i
+=n
+t
.getBitsLength()})),i
}e
.from=function(t
,e
){return s
.isValid(t
)?parseInt(t
,10):e
},e
.getCapacity=function(t
,e
,i
){if(!s
.isValid(t
))throw new Error("Invalid QR Code version");void 0===i
&&(i
=a
.BYTE
);const o
=8*(n
.getSymbolTotalCodewords(t
)-r
.getTotalCodewordsCount(t
,e
));if(i
===a
.MIXED
)return o
;const h
=o
-c(i
,t
);switch(i
){case a
.NUMERIC:return Math
.floor(h
/10*3);case a
.ALPHANUMERIC:return Math
.floor(h
/11*2);case a
.KANJI:return Math
.floor(h
/13);case a
.BYTE:default:return Math
.floor(h
/8)}},e
.getBestVersionForData=function(t
,i
){let n
;const r
=o
.from(i
,o
.M
);if(Array
.isArray(t
)){if(t
.length
>1)return function(t
,i
){for(let n
=1;n
<=40;n
++){if(l(t
,n
)<=e
.getCapacity(n
,i
,a
.MIXED
))return n
}}(t
,r
);if(0===t
.length
)return 1;n
=t
[0]}else n
=t
;return function(t
,i
,n
){for(let r
=1;r
<=40;r
++)if(i
<=e
.getCapacity(r
,n
,t
))return r
}(n
.mode
,n
.getLength(),r
)},e
.getEncodedBits=function(t
){if(!s
.isValid(t
)||t
<7)throw new Error("Invalid QR Code version");let e
=t
<<12;for(;n
.getBCHDigit(e
)-h
>=0;)e
^=7973<<n
.getBCHDigit(e
)-h
;return t
<<12|e
}},685:function(t
,e
,i
){const n
=i(623),r
=n
.getBCHDigit(1335);e
.getEncodedBits=function(t
,e
){const i
=t
.bit
<<3|e
;let o
=i
<<10;for(;n
.getBCHDigit(o
)-r
>=0;)o
^=1335<<n
.getBCHDigit(o
)-r
;return 21522^(i
<<10|o
)}},686:function(t
,e
,i
){const n
=i(624),r
=i(687),o
=i(688),a
=i(689),s
=i(691),h
=i(642),c
=i(623),l
=i(692);function u(t
){return unescape(encodeURIComponent(t
)).length
}function d(t
,e
,i
){const n
=[];let r
;for(;null!==(r
=t
.exec(i
));)n
.push({data:r
[0],index:r
.index
,mode:e
,length:r
[0].length
});return n
}function p(t
){const e
=d(h
.NUMERIC
,n
.NUMERIC
,t
),i
=d(h
.ALPHANUMERIC
,n
.ALPHANUMERIC
,t
);let r
,o
;c
.isKanjiModeEnabled()?(r
=d(h
.BYTE
,n
.BYTE
,t
),o
=d(h
.KANJI
,n
.KANJI
,t
)):(r
=d(h
.BYTE_KANJI
,n
.BYTE
,t
),o
=[]);return e
.concat(i
,r
,o
).sort((function(t
,e
){return t
.index
-e
.index
})).map((function(t
){return{data:t
.data
,mode:t
.mode
,length:t
.length
}}))}function f(t
,e
){switch(e
){case n
.NUMERIC:return r
.getBitsLength(t
);case n
.ALPHANUMERIC:return o
.getBitsLength(t
);case n
.KANJI:return s
.getBitsLength(t
);case n
.BYTE:return a
.getBitsLength(t
)}}function g(t
,e
){let i
;const h
=n
.getBestModeForData(t
);if(i
=n
.from(e
,h
),i
!==n
.BYTE
&&i
.bit
<h
.bit
)throw new Error('"'+t
+'" cannot be encoded with mode '+n
.toString(i
)+".\n Suggested mode is: "+n
.toString(h
));switch(i
!==n
.KANJI
||c
.isKanjiModeEnabled()||(i
=n
.BYTE
),i
){case n
.NUMERIC:return new r(t
);case n
.ALPHANUMERIC:return new o(t
);case n
.KANJI:return new s(t
);case n
.BYTE:return new a(t
)}}e
.fromArray=function(t
){return t
.reduce((function(t
,e
){return"string"==typeof e
?t
.push(g(e
,null)):e
.data
&&t
.push(g(e
.data
,e
.mode
)),t
}),[])},e
.fromString=function(t
,i
){const r=function(t
,e
){const i
={},r
={start:{}};let o
=["start"];for(let a
=0;a
<t
.length
;a
++){const s
=t
[a
],h
=[];for(let t
=0;t
<s
.length
;t
++){const c
=s
[t
],l
=""+a
+t
;h
.push(l
),i
[l
]={node:c
,lastCount:0},r
[l
]={};for(let t
=0;t
<o
.length
;t
++){const a
=o
[t
];i
[a
]&&i
[a
].node
.mode
===c
.mode
?(r
[a
][l
]=f(i
[a
].lastCount
+c
.length
,c
.mode
)-f(i
[a
].lastCount
,c
.mode
),i
[a
].lastCount
+=c
.length
):(i
[a
]&&(i
[a
].lastCount
=c
.length
),r
[a
][l
]=f(c
.length
,c
.mode
)+4+n
.getCharCountIndicator(c
.mode
,e
))}}o
=h
}for(let t
=0;t
<o
.length
;t
++)r
[o
[t
]].end
=0;return{map:r
,table:i
}}(function(t
){const e
=[];for(let i
=0;i
<t
.length
;i
++){const r
=t
[i
];switch(r
.mode
){case n
.NUMERIC:e
.push([r
,{data:r
.data
,mode:n
.ALPHANUMERIC
,length:r
.length
},{data:r
.data
,mode:n
.BYTE
,length:r
.length
}]);break;case n
.ALPHANUMERIC:e
.push([r
,{data:r
.data
,mode:n
.BYTE
,length:r
.length
}]);break;case n
.KANJI:e
.push([r
,{data:r
.data
,mode:n
.BYTE
,length:u(r
.data
)}]);break;case n
.BYTE:e
.push([{data:r
.data
,mode:n
.BYTE
,length:u(r
.data
)}])}}return e
}(p(t
,c
.isKanjiModeEnabled())),i
),o
=l
.find_path(r
.map
,"start","end"),a
=[];for(let t
=1;t
<o
.length
-1;t
++)a
.push(r
.table
[o
[t
]].node
);return e
.fromArray(function(t
){return t
.reduce((function(t
,e
){const i
=t
.length
-1>=0?t
[t
.length
-1]:null;return i
&&i
.mode
===e
.mode
?(t
[t
.length
-1].data
+=e
.data
,t
):(t
.push(e
),t
)}),[])}(a
))},e
.rawSplit=function(t
){return e
.fromArray(p(t
,c
.isKanjiModeEnabled()))}},687:function(t
,e
,i
){const n
=i(624);function r(t
){this.mode
=n
.NUMERIC
,this.data
=t
.toString()}r
.getBitsLength=function(t
){return 10*Math
.floor(t
/3)+(t
%3?t
%3*3+1:0)},r
.prototype.getLength=function(){return this.data
.length
},r
.prototype.getBitsLength=function(){return r
.getBitsLength(this.data
.length
)},r
.prototype.write=function(t
){let e
,i
,n
;for(e
=0;e
+3<=this.data
.length
;e
+=3)i
=this.data
.substr(e
,3),n
=parseInt(i
,10),t
.put(n
,10);const r
=this.data
.length
-e
;r
>0&&(i
=this.data
.substr(e
),n
=parseInt(i
,10),t
.put(n
,3*r
+1))},t
.exports
=r
},688:function(t
,e
,i
){const n
=i(624),r
=["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 o(t
){this.mode
=n
.ALPHANUMERIC
,this.data
=t
}o
.getBitsLength=function(t
){return 11*Math
.floor(t
/2)+t
%2*6},o
.prototype.getLength=function(){return this.data
.length
},o
.prototype.getBitsLength=function(){return o
.getBitsLength(this.data
.length
)},o
.prototype.write=function(t
){let e
;for(e
=0;e
+2<=this.data
.length
;e
+=2){let i
=45*r
.indexOf(this.data
[e
]);i
+=r
.indexOf(this.data
[e
+1]),t
.put(i
,11)}this.data
.length
%2&&t
.put(r
.indexOf(this.data
[e
]),6)},t
.exports
=o
},689:function(t
,e
,i
){const n
=i(690),r
=i(624);function o(t
){this.mode
=r
.BYTE
,this.data
=new Uint8Array(n(t
))}o
.getBitsLength=function(t
){return 8*t
},o
.prototype.getLength=function(){return this.data
.length
},o
.prototype.getBitsLength=function(){return o
.getBitsLength(this.data
.length
)},o
.prototype.write=function(t
){for(let e
=0,i
=this.data
.length
;e
<i
;e
++)t
.put(this.data
[e
],8)},t
.exports
=o
},690:function(t
,e
,i
){"use strict";t
.exports=function(t
){for(var e
=[],i
=t
.length
,n
=0;n
<i
;n
++){var r
=t
.charCodeAt(n
);if(r
>=55296&&r
<=56319&&i
>n
+1){var o
=t
.charCodeAt(n
+1);o
>=56320&&o
<=57343&&(r
=1024*(r
-55296)+o
-56320+65536,n
+=1)}r
<128?e
.push(r
):r
<2048?(e
.push(r
>>6|192),e
.push(63&r
|128)):r
<55296||r
>=57344&&r
<65536?(e
.push(r
>>12|224),e
.push(r
>>6&63|128),e
.push(63&r
|128)):r
>=65536&&r
<=1114111?(e
.push(r
>>18|240),e
.push(r
>>12&63|128),e
.push(r
>>6&63|128),e
.push(63&r
|128)):e
.push(239,191,189)}return new Uint8Array(e
).buffer
}},691:function(t
,e
,i
){const n
=i(624),r
=i(623);function o(t
){this.mode
=n
.KANJI
,this.data
=t
}o
.getBitsLength=function(t
){return 13*t
},o
.prototype.getLength=function(){return this.data
.length
},o
.prototype.getBitsLength=function(){return o
.getBitsLength(this.data
.length
)},o
.prototype.write=function(t
){let e
;for(e
=0;e
<this.data
.length
;e
++){let i
=r
.toSJIS(this.data
[e
]);if(i
>=33088&&i
<=40956)i
-=33088;else{if(!(i
>=57408&&i
<=60351))throw new Error("Invalid SJIS character: "+this.data
[e
]+"\nMake sure your charset is UTF-8");i
-=49472}i
=192*(i
>>>8&255)+(255&i
),t
.put(i
,13)}},t
.exports
=o
},692:function(t
,e
,i
){"use strict";var n
={single_source_shortest_paths:function(t
,e
,i
){var r
={},o
={};o
[e
]=0;var a
,s
,h
,c
,l
,u
,d
,p
=n
.PriorityQueue
.make();for(p
.push(e
,0);!p
.empty();)for(h
in s
=(a
=p
.pop()).value
,c
=a
.cost
,l
=t
[s
]||{})l
.hasOwnProperty(h
)&&(u
=c
+l
[h
],d
=o
[h
],(void 0===o
[h
]||d
>u
)&&(o
[h
]=u
,p
.push(h
,u
),r
[h
]=s
));if(void 0!==i
&&void 0===o
[i
]){var f
=["Could not find a path from ",e
," to ",i
,"."].join("");throw new Error(f
)}return r
},extract_shortest_path_from_predecessor_list:function(t
,e
){for(var i
=[],n
=e
;n
;)i
.push(n
),t
[n
],n
=t
[n
];return i
.reverse(),i
},find_path:function(t
,e
,i
){var r
=n
.single_source_shortest_paths(t
,e
,i
);return n
.extract_shortest_path_from_predecessor_list(r
,i
)},PriorityQueue:{make:function(t
){var e
,i
=n
.PriorityQueue
,r
={};for(e
in t
=t
||{},i
)i
.hasOwnProperty(e
)&&(r
[e
]=i
[e
]);return r
.queue
=[],r
.sorter
=t
.sorter
||i
.default_sorter
,r
},default_sorter:function(t
,e
){return t
.cost
-e
.cost
},push:function(t
,e
){var i
={value:t
,cost:e
};this.queue
.push(i
),this.queue
.sort(this.sorter
)},pop:function(){return this.queue
.shift()},empty:function(){return 0===this.queue
.length
}}};t
.exports
=n
},693:function(t
,e
,i
){const n
=i(643);e
.render=function(t
,e
,i
){let r
=i
,o
=e
;void 0!==r
||e
&&e
.getContext
||(r
=e
,e
=void 0),e
||(o=function(){try{return document
.createElement("canvas")}catch(t
){throw new Error("You need to specify a canvas element")}}()),r
=n
.getOptions(r
);const a
=n
.getImageWidth(t
.modules
.size
,r
),s
=o
.getContext("2d"),h
=s
.createImageData(a
,a
);return n
.qrToImageData(h
.data
,t
,r
),function(t
,e
,i
){t
.clearRect(0,0,e
.width
,e
.height
),e
.style
||(e
.style
={}),e
.height
=i
,e
.width
=i
,e
.style
.height
=i
+"px",e
.style
.width
=i
+"px"}(s
,o
,a
),s
.putImageData(h
,0,0),o
},e
.renderToDataURL=function(t
,i
,n
){let r
=n
;void 0!==r
||i
&&i
.getContext
||(r
=i
,i
=void 0),r
||(r
={});const o
=e
.render(t
,i
,r
),a
=r
.type
||"image/png",s
=r
.rendererOpts
||{};return o
.toDataURL(a
,s
.quality
)}},694:function(t
,e
,i
){const n
=i(643);function r(t
,e
){const i
=t
.a
/255,n
=e
+'="'+t
.hex
+'"';return i
<1?n
+" "+e
+'-opacity="'+i
.toFixed(2).slice(1)+'"':n
}function o(t
,e
,i
){let n
=t
+e
;return void 0!==i
&&(n
+=" "+i
),n
}e
.render=function(t
,e
,i
){const a
=n
.getOptions(e
),s
=t
.modules
.size
,h
=t
.modules
.data
,c
=s
+2*a
.margin
,l
=a
.color
.light
.a
?"<path "+r(a
.color
.light
,"fill")+' d="M0 0h'+c
+"v"+c
+'H0z"/>':"",u
="<path "+r(a
.color
.dark
,"stroke")+' d="'+function(t
,e
,i
){let n
="",r
=0,a
=!1,s
=0;for(let h
=0;h
<t
.length
;h
++){const c
=Math
.floor(h
%e
),l
=Math
.floor(h
/e
);c
||a
||(a
=!0),t
[h
]?(s
++,h
>0&&c
>0&&t
[h
-1]||(n
+=a
?o("M",c
+i
,.5+l
+i
):o("m",r
,0),r
=0,a
=!1),c
+1<e
&&t
[h
+1]||(n
+=o("h",s
),s
=0)):r
++}return n
}(h
,s
,a
.margin
)+'"/>',d
='viewBox="0 0 '+c
+" "+c
+'"',p
='<svg xmlns="http://www.w3.org/2000/svg" '+(a
.width
?'width="'+a
.width
+'" height="'+a
.width
+'" ':"")+d
+' shape-rendering="crispEdges">'+l
+u
+"</svg>\n";return"function"==typeof i
&&i(null,p
),p
}},696:function(t
,e
,i
){
4 * https://fengyuanchen.github.io/cropperjs
6 * Copyright 2015-present Chen Fengyuan
7 * Released under the MIT license
9 * Date: 2021-06-12T08:00:17.411Z
11 t
.exports=function(){"use strict";function t(t
,e
){var i
=Object
.keys(t
);if(Object
.getOwnPropertySymbols
){var n
=Object
.getOwnPropertySymbols(t
);e
&&(n
=n
.filter((function(e
){return Object
.getOwnPropertyDescriptor(t
,e
).enumerable
}))),i
.push
.apply(i
,n
)}return i
}function e(e
){for(var i
=1;i
<arguments
.length
;i
++){var n
=null!=arguments
[i
]?arguments
[i
]:{};i
%2?t(Object(n
),!0).forEach((function(t
){o(e
,t
,n
[t
])})):Object
.getOwnPropertyDescriptors
?Object
.defineProperties(e
,Object
.getOwnPropertyDescriptors(n
)):t(Object(n
)).forEach((function(t
){Object
.defineProperty(e
,t
,Object
.getOwnPropertyDescriptor(n
,t
))}))}return e
}function i(t
){return(i
="function"==typeof Symbol
&&"symbol"==typeof Symbol
.iterator
?function(t
){return typeof t
}:function(t
){return t
&&"function"==typeof Symbol
&&t
.constructor===Symbol
&&t
!==Symbol
.prototype?"symbol":typeof t
})(t
)}function n(t
,e
){if(!(t
instanceof e
))throw new TypeError("Cannot call a class as a function")}function r(t
,e
){for(var i
=0;i
<e
.length
;i
++){var n
=e
[i
];n
.enumerable
=n
.enumerable
||!1,n
.configurable
=!0,"value"in n
&&(n
.writable
=!0),Object
.defineProperty(t
,n
.key
,n
)}}function o(t
,e
,i
){return e
in t
?Object
.defineProperty(t
,e
,{value:i
,enumerable:!0,configurable:!0,writable:!0}):t
[e
]=i
,t
}function a(t
){return function(t
){if(Array
.isArray(t
))return s(t
)}(t
)||function(t
){if("undefined"!=typeof Symbol
&&null!=t
[Symbol
.iterator
]||null!=t
["@@iterator"])return Array
.from(t
)}(t
)||function(t
,e
){if(t
){if("string"==typeof t
)return s(t
,e
);var i
=Object
.prototype.toString
.call(t
).slice(8,-1);return"Object"===i
&&t
.constructor&&(i
=t
.constructor.name
),"Map"===i
||"Set"===i
?Array
.from(t
):"Arguments"===i
||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i
)?s(t
,e
):void 0}}(t
)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t
,e
){(null==e
||e
>t
.length
)&&(e
=t
.length
);for(var i
=0,n
=new Array(e
);i
<e
;i
++)n
[i
]=t
[i
];return n
}var h
="undefined"!=typeof window
&&void 0!==window
.document
,c
=h
?window:{},l
=!(!h
||!c
.document
.documentElement
)&&"ontouchstart"in c
.document
.documentElement
,u
=!!h
&&"PointerEvent"in c
,d
="".concat("cropper","-crop"),p
="".concat("cropper","-disabled"),f
="".concat("cropper","-hidden"),g
="".concat("cropper","-hide"),m
="".concat("cropper","-invisible"),v
="".concat("cropper","-modal"),w
="".concat("cropper","-move"),y
="".concat("cropper","Action"),b
="".concat("cropper","Preview"),x
=l
?"touchstart":"mousedown",M
=l
?"touchmove":"mousemove",C
=l
?"touchend touchcancel":"mouseup",E
=u
?"pointerdown":x
,B
=u
?"pointermove":M
,D
=u
?"pointerup pointercancel":C
,T
=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,A
=/^data:/,N
=/^data:image\/jpeg;base64,/,R
=/^img|canvas$/i,k
={viewMode:0,dragMode:"crop",initialAspectRatio:NaN
,aspectRatio:NaN
,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},L
=Number
.isNaN
||c
.isNaN
;function I(t
){return"number"==typeof t
&&!L(t
)}var P=function(t
){return t
>0&&t
<1/0};function O(t
){return void 0===t
}function S(t
){return"object"===i(t
)&&null!==t
}var H
=Object
.prototype.hasOwnProperty
;function z(t
){if(!S(t
))return!1;try{var e
=t
.constructor,i
=e
.prototype;return e
&&i
&&H
.call(i
,"isPrototypeOf")}catch(t
){return!1}}function U(t
){return"function"==typeof t
}var Y
=Array
.prototype.slice
;function W(t
){return Array
.from?Array
.from(t
):Y
.call(t
)}function j(t
,e
){return t
&&U(e
)&&(Array
.isArray(t
)||I(t
.length
)?W(t
).forEach((function(i
,n
){e
.call(t
,i
,n
,t
)})):S(t
)&&Object
.keys(t
).forEach((function(i
){e
.call(t
,t
[i
],i
,t
)}))),t
}var X
=Object
.assign
||function(t
){for(var e
=arguments
.length
,i
=new Array(e
>1?e
-1:0),n
=1;n
<e
;n
++)i
[n
-1]=arguments
[n
];return S(t
)&&i
.length
>0&&i
.forEach((function(e
){S(e
)&&Object
.keys(e
).forEach((function(i
){t
[i
]=e
[i
]}))})),t
},F
=/\.\d*(?:0|9){12}\d*$/;function q(t
){var e
=arguments
.length
>1&&void 0!==arguments
[1]?arguments
[1]:1e11
;return F
.test(t
)?Math
.round(t
*e
)/e:t
}var K
=/^width|height|left|top|marginLeft|marginTop$/;function J(t
,e
){var i
=t
.style
;j(e
,(function(t
,e
){K
.test(e
)&&I(t
)&&(t
="".concat(t
,"px")),i
[e
]=t
}))}function $(t
,e
){if(e
)if(I(t
.length
))j(t
,(function(t
){$(t
,e
)}));else if(t
.classList
)t
.classList
.add(e
);else{var i
=t
.className
.trim();i
?i
.indexOf(e
)<0&&(t
.className
="".concat(i
," ").concat(e
)):t
.className
=e
}}function _(t
,e
){e
&&(I(t
.length
)?j(t
,(function(t
){_(t
,e
)})):t
.classList
?t
.classList
.remove(e
):t
.className
.indexOf(e
)>=0&&(t
.className
=t
.className
.replace(e
,"")))}function Q(t
,e
,i
){e
&&(I(t
.length
)?j(t
,(function(t
){Q(t
,e
,i
)})):i
?$(t
,e
):_(t
,e
))}var V
=/([a-z\d])([A-Z])/g;function Z(t
){return t
.replace(V
,"$1-$2").toLowerCase()}function G(t
,e
){return S(t
[e
])?t
[e
]:t
.dataset
?t
.dataset
[e
]:t
.getAttribute("data-".concat(Z(e
)))}function tt(t
,e
,i
){S(i
)?t
[e
]=i:t
.dataset
?t
.dataset
[e
]=i:t
.setAttribute("data-".concat(Z(e
)),i
)}var et
=/\s\s*/,it=function(){var t
=!1;if(h
){var e
=!1,i=function(){},n
=Object
.defineProperty({},"once",{get:function(){return t
=!0,e
},set:function(t
){e
=t
}});c
.addEventListener("test",i
,n
),c
.removeEventListener("test",i
,n
)}return t
}();function nt(t
,e
,i
){var n
=arguments
.length
>3&&void 0!==arguments
[3]?arguments
[3]:{},r
=i
;e
.trim().split(et
).forEach((function(e
){if(!it
){var o
=t
.listeners
;o
&&o
[e
]&&o
[e
][i
]&&(r
=o
[e
][i
],delete o
[e
][i
],0===Object
.keys(o
[e
]).length
&&delete o
[e
],0===Object
.keys(o
).length
&&delete t
.listeners
)}t
.removeEventListener(e
,r
,n
)}))}function rt(t
,e
,i
){var n
=arguments
.length
>3&&void 0!==arguments
[3]?arguments
[3]:{},r
=i
;e
.trim().split(et
).forEach((function(e
){if(n
.once
&&!it
){var o
=t
.listeners
,a
=void 0===o
?{}:o
;r=function(){delete a
[e
][i
],t
.removeEventListener(e
,r
,n
);for(var o
=arguments
.length
,s
=new Array(o
),h
=0;h
<o
;h
++)s
[h
]=arguments
[h
];i
.apply(t
,s
)},a
[e
]||(a
[e
]={}),a
[e
][i
]&&t
.removeEventListener(e
,a
[e
][i
],n
),a
[e
][i
]=r
,t
.listeners
=a
}t
.addEventListener(e
,r
,n
)}))}function ot(t
,e
,i
){var n
;return U(Event
)&&U(CustomEvent
)?n
=new CustomEvent(e
,{detail:i
,bubbles:!0,cancelable:!0}):(n
=document
.createEvent("CustomEvent")).initCustomEvent(e
,!0,!0,i
),t
.dispatchEvent(n
)}function at(t
){var e
=t
.getBoundingClientRect();return{left:e
.left
+(window
.pageXOffset
-document
.documentElement
.clientLeft
),top:e
.top
+(window
.pageYOffset
-document
.documentElement
.clientTop
)}}var st
=c
.location
,ht
=/^(\w+:)\/\/([^:/?#]*):?(\d
*)/i
;function ct(t
){var e
=t
.match(ht
);return null!==e
&&(e
[1]!==st
.protocol
||e
[2]!==st
.hostname
||e
[3]!==st
.port
)}function lt(t
){var e
="timestamp=".concat((new Date
).getTime());return t
+(-1===t
.indexOf("?")?"?":"&")+e
}function ut(t
){var e
=t
.rotate
,i
=t
.scaleX
,n
=t
.scaleY
,r
=t
.translateX
,o
=t
.translateY
,a
=[];I(r
)&&0!==r
&&a
.push("translateX(".concat(r
,"px)")),I(o
)&&0!==o
&&a
.push("translateY(".concat(o
,"px)")),I(e
)&&0!==e
&&a
.push("rotate(".concat(e
,"deg)")),I(i
)&&1!==i
&&a
.push("scaleX(".concat(i
,")")),I(n
)&&1!==n
&&a
.push("scaleY(".concat(n
,")"));var s
=a
.length
?a
.join(" "):"none";return{WebkitTransform:s
,msTransform:s
,transform:s
}}function dt(t
,i
){var n
=t
.pageX
,r
=t
.pageY
,o
={endX:n
,endY:r
};return i
?o:e({startX:n
,startY:r
},o
)}function pt(t
){var e
=t
.aspectRatio
,i
=t
.height
,n
=t
.width
,r
=arguments
.length
>1&&void 0!==arguments
[1]?arguments
[1]:"contain",o
=P(n
),a
=P(i
);if(o
&&a
){var s
=i
*e
;"contain"===r
&&s
>n
||"cover"===r
&&s
<n
?i
=n
/e:n
=i
*e
}else o
?i
=n
/e:a
&&(n
=i
*e
);return{width:n
,height:i
}}function ft(t
,e
,i
,n
){var r
=e
.aspectRatio
,o
=e
.naturalWidth
,s
=e
.naturalHeight
,h
=e
.rotate
,c
=void 0===h
?0:h
,l
=e
.scaleX
,u
=void 0===l
?1:l
,d
=e
.scaleY
,p
=void 0===d
?1:d
,f
=i
.aspectRatio
,g
=i
.naturalWidth
,m
=i
.naturalHeight
,v
=n
.fillColor
,w
=void 0===v
?"transparent":v
,y
=n
.imageSmoothingEnabled
,b
=void 0===y
||y
,x
=n
.imageSmoothingQuality
,M
=void 0===x
?"low":x
,C
=n
.maxWidth
,E
=void 0===C
?1/0:C
,B
=n
.maxHeight
,D
=void 0===B
?1/0:B
,T
=n
.minWidth
,A
=void 0===T
?0:T
,N
=n
.minHeight
,R
=void 0===N
?0:N
,k
=document
.createElement("canvas"),L
=k
.getContext("2d"),I
=pt({aspectRatio:f
,width:E
,height:D
}),P
=pt({aspectRatio:f
,width:A
,height:R
},"cover"),O
=Math
.min(I
.width
,Math
.max(P
.width
,g
)),S
=Math
.min(I
.height
,Math
.max(P
.height
,m
)),H
=pt({aspectRatio:r
,width:E
,height:D
}),z
=pt({aspectRatio:r
,width:A
,height:R
},"cover"),U
=Math
.min(H
.width
,Math
.max(z
.width
,o
)),Y
=Math
.min(H
.height
,Math
.max(z
.height
,s
)),W
=[-U
/2,-Y/2,U
,Y
];return k
.width
=q(O
),k
.height
=q(S
),L
.fillStyle
=w
,L
.fillRect(0,0,O
,S
),L
.save(),L
.translate(O
/2,S/2),L
.rotate(c
*Math
.PI
/180),L
.scale(u
,p
),L
.imageSmoothingEnabled
=b
,L
.imageSmoothingQuality
=M
,L
.drawImage
.apply(L
,[t
].concat(a(W
.map((function(t
){return Math
.floor(q(t
))}))))),L
.restore(),k
}var gt
=String
.fromCharCode
,mt
=/^data:.*,/;function vt(t
){var e
,i
=new DataView(t
);try{var n
,r
,o
;if(255===i
.getUint8(0)&&216===i
.getUint8(1))for(var a
=i
.byteLength
,s
=2;s
+1<a
;){if(255===i
.getUint8(s
)&&225===i
.getUint8(s
+1)){r
=s
;break}s
+=1}if(r
){var h
=r
+10;if("Exif"===function(t
,e
,i
){var n
="";i
+=e
;for(var r
=e
;r
<i
;r
+=1)n
+=gt(t
.getUint8(r
));return n
}(i
,r
+4,4)){var c
=i
.getUint16(h
);if(((n
=18761===c
)||19789===c
)&&42===i
.getUint16(h
+2,n
)){var l
=i
.getUint32(h
+4,n
);l
>=8&&(o
=h
+l
)}}}if(o
){var u
,d
,p
=i
.getUint16(o
,n
);for(d
=0;d
<p
;d
+=1)if(u
=o
+12*d
+2,274===i
.getUint16(u
,n
)){u
+=8,e
=i
.getUint16(u
,n
),i
.setUint16(u
,1,n
);break}}}catch(t
){e
=1}return e
}var wt
={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped
&&this.renderCropBox()},initContainer:function(){var t
=this.element
,e
=this.options
,i
=this.container
,n
=this.cropper
,r
=Number(e
.minContainerWidth
),o
=Number(e
.minContainerHeight
);$(n
,f
),_(t
,f
);var a
={width:Math
.max(i
.offsetWidth
,r
>=0?r:200),height:Math
.max(i
.offsetHeight
,o
>=0?o:100)};this.containerData
=a
,J(n
,{width:a
.width
,height:a
.height
}),$(t
,f
),_(n
,f
)},initCanvas:function(){var t
=this.containerData
,e
=this.imageData
,i
=this.options
.viewMode
,n
=Math
.abs(e
.rotate
)%180==90,r
=n
?e
.naturalHeight:e
.naturalWidth
,o
=n
?e
.naturalWidth:e
.naturalHeight
,a
=r
/o,s=t.width,h=t.height;t.height*a>t.width?3===i?s=t.height*a:h=t.width/a:3===i
?h
=t
.width
/a:s
=t
.height
*a
;var c
={aspectRatio:a
,naturalWidth:r
,naturalHeight:o
,width:s
,height:h
};this.canvasData
=c
,this.limited
=1===i
||2===i
,this.limitCanvas(!0,!0),c
.width
=Math
.min(Math
.max(c
.width
,c
.minWidth
),c
.maxWidth
),c
.height
=Math
.min(Math
.max(c
.height
,c
.minHeight
),c
.maxHeight
),c
.left
=(t
.width
-c
.width
)/2,c.top=(t.height-c.height)/2,c
.oldLeft
=c
.left
,c
.oldTop
=c
.top
,this.initialCanvasData
=X({},c
)},limitCanvas:function(t
,e
){var i
=this.options
,n
=this.containerData
,r
=this.canvasData
,o
=this.cropBoxData
,a
=i
.viewMode
,s
=r
.aspectRatio
,h
=this.cropped
&&o
;if(t
){var c
=Number(i
.minCanvasWidth
)||0,l
=Number(i
.minCanvasHeight
)||0;a
>1?(c
=Math
.max(c
,n
.width
),l
=Math
.max(l
,n
.height
),3===a
&&(l
*s
>c
?c
=l
*s:l
=c
/s)):a>0&&(c?c=Math.max(c,h?o.width:0):l?l=Math.max(l,h?o.height:0):h&&(c=o.width,(l=o.height)*s>c?c=l*s:l=c/s));var u
=pt({aspectRatio:s
,width:c
,height:l
});c
=u
.width
,l
=u
.height
,r
.minWidth
=c
,r
.minHeight
=l
,r
.maxWidth
=1/0,r.maxHeight=1/0}if(e
)if(a
>(h
?0:1)){var d
=n
.width
-r
.width
,p
=n
.height
-r
.height
;r
.minLeft
=Math
.min(0,d
),r
.minTop
=Math
.min(0,p
),r
.maxLeft
=Math
.max(0,d
),r
.maxTop
=Math
.max(0,p
),h
&&this.limited
&&(r
.minLeft
=Math
.min(o
.left
,o
.left
+(o
.width
-r
.width
)),r
.minTop
=Math
.min(o
.top
,o
.top
+(o
.height
-r
.height
)),r
.maxLeft
=o
.left
,r
.maxTop
=o
.top
,2===a
&&(r
.width
>=n
.width
&&(r
.minLeft
=Math
.min(0,d
),r
.maxLeft
=Math
.max(0,d
)),r
.height
>=n
.height
&&(r
.minTop
=Math
.min(0,p
),r
.maxTop
=Math
.max(0,p
))))}else r
.minLeft
=-r
.width
,r
.minTop
=-r
.height
,r
.maxLeft
=n
.width
,r
.maxTop
=n
.height
},renderCanvas:function(t
,e
){var i
=this.canvasData
,n
=this.imageData
;if(e
){var r=function(t
){var e
=t
.width
,i
=t
.height
,n
=t
.degree
;if(90==(n
=Math
.abs(n
)%180))return{width:i
,height:e
};var r
=n
%90*Math
.PI
/180,o
=Math
.sin(r
),a
=Math
.cos(r
),s
=e
*a
+i
*o
,h
=e
*o
+i
*a
;return n
>90?{width:h
,height:s
}:{width:s
,height:h
}}({width:n
.naturalWidth
*Math
.abs(n
.scaleX
||1),height:n
.naturalHeight
*Math
.abs(n
.scaleY
||1),degree:n
.rotate
||0}),o
=r
.width
,a
=r
.height
,s
=i
.width
*(o
/i.naturalWidth),h=i.height*(a/i.naturalHeight
);i
.left
-=(s
-i
.width
)/2,i.top-=(h-i.height)/2,i
.width
=s
,i
.height
=h
,i
.aspectRatio
=o
/a
,i
.naturalWidth
=o
,i
.naturalHeight
=a
,this.limitCanvas(!0,!1)}(i
.width
>i
.maxWidth
||i
.width
<i
.minWidth
)&&(i
.left
=i
.oldLeft
),(i
.height
>i
.maxHeight
||i
.height
<i
.minHeight
)&&(i
.top
=i
.oldTop
),i
.width
=Math
.min(Math
.max(i
.width
,i
.minWidth
),i
.maxWidth
),i
.height
=Math
.min(Math
.max(i
.height
,i
.minHeight
),i
.maxHeight
),this.limitCanvas(!1,!0),i
.left
=Math
.min(Math
.max(i
.left
,i
.minLeft
),i
.maxLeft
),i
.top
=Math
.min(Math
.max(i
.top
,i
.minTop
),i
.maxTop
),i
.oldLeft
=i
.left
,i
.oldTop
=i
.top
,J(this.canvas
,X({width:i
.width
,height:i
.height
},ut({translateX:i
.left
,translateY:i
.top
}))),this.renderImage(t
),this.cropped
&&this.limited
&&this.limitCropBox(!0,!0)},renderImage:function(t
){var e
=this.canvasData
,i
=this.imageData
,n
=i
.naturalWidth
*(e
.width
/e.naturalWidth),r=i.naturalHeight*(e.height/e
.naturalHeight
);X(i
,{width:n
,height:r
,left:(e
.width
-n
)/2,top:(e.height-r)/2}),J(this.image
,X({width:i
.width
,height:i
.height
},ut(X({translateX:i
.left
,translateY:i
.top
},i
)))),t
&&this.output()},initCropBox:function(){var t
=this.options
,e
=this.canvasData
,i
=t
.aspectRatio
||t
.initialAspectRatio
,n
=Number(t
.autoCropArea
)||.8,r
={width:e
.width
,height:e
.height
};i
&&(e
.height
*i
>e
.width
?r
.height
=r
.width
/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=e.left+(e.width-r.width)/2,r
.top
=e
.top
+(e
.height
-r
.height
)/2,r
.oldLeft
=r
.left
,r
.oldTop
=r
.top
,this.initialCropBoxData
=X({},r
)},limitCropBox:function(t
,e
){var i
=this.options
,n
=this.containerData
,r
=this.canvasData
,o
=this.cropBoxData
,a
=this.limited
,s
=i
.aspectRatio
;if(t
){var h
=Number(i
.minCropBoxWidth
)||0,c
=Number(i
.minCropBoxHeight
)||0,l
=a
?Math
.min(n
.width
,r
.width
,r
.width
+r
.left
,n
.width
-r
.left
):n
.width
,u
=a
?Math
.min(n
.height
,r
.height
,r
.height
+r
.top
,n
.height
-r
.top
):n
.height
;h
=Math
.min(h
,n
.width
),c
=Math
.min(c
,n
.height
),s
&&(h
&&c
?c
*s
>h
?c
=h
/s:h=c*s:h?c=h/s:c
&&(h
=c
*s
),u
*s
>l
?u
=l
/s:l
=u
*s
),o
.minWidth
=Math
.min(h
,l
),o
.minHeight
=Math
.min(c
,u
),o
.maxWidth
=l
,o
.maxHeight
=u
}e
&&(a
?(o
.minLeft
=Math
.max(0,r
.left
),o
.minTop
=Math
.max(0,r
.top
),o
.maxLeft
=Math
.min(n
.width
,r
.left
+r
.width
)-o
.width
,o
.maxTop
=Math
.min(n
.height
,r
.top
+r
.height
)-o
.height
):(o
.minLeft
=0,o
.minTop
=0,o
.maxLeft
=n
.width
-o
.width
,o
.maxTop
=n
.height
-o
.height
))},renderCropBox:function(){var t
=this.options
,e
=this.containerData
,i
=this.cropBoxData
;(i
.width
>i
.maxWidth
||i
.width
<i
.minWidth
)&&(i
.left
=i
.oldLeft
),(i
.height
>i
.maxHeight
||i
.height
<i
.minHeight
)&&(i
.top
=i
.oldTop
),i
.width
=Math
.min(Math
.max(i
.width
,i
.minWidth
),i
.maxWidth
),i
.height
=Math
.min(Math
.max(i
.height
,i
.minHeight
),i
.maxHeight
),this.limitCropBox(!1,!0),i
.left
=Math
.min(Math
.max(i
.left
,i
.minLeft
),i
.maxLeft
),i
.top
=Math
.min(Math
.max(i
.top
,i
.minTop
),i
.maxTop
),i
.oldLeft
=i
.left
,i
.oldTop
=i
.top
,t
.movable
&&t
.cropBoxMovable
&&tt(this.face
,y
,i
.width
>=e
.width
&&i
.height
>=e
.height
?"move":"all"),J(this.cropBox
,X({width:i
.width
,height:i
.height
},ut({translateX:i
.left
,translateY:i
.top
}))),this.cropped
&&this.limited
&&this.limitCanvas(!0,!0),this.disabled
||this.output()},output:function(){this.preview(),ot(this.element
,"crop",this.getData())}},yt
={initPreview:function(){var t
=this.element
,e
=this.crossOrigin
,i
=this.options
.preview
,n
=e
?this.crossOriginUrl:this.url
,r
=t
.alt
||"The image to preview",o
=document
.createElement("img");if(e
&&(o
.crossOrigin
=e
),o
.src
=n
,o
.alt
=r
,this.viewBox
.appendChild(o
),this.viewBoxImage
=o
,i
){var a
=i
;"string"==typeof i
?a
=t
.ownerDocument
.querySelectorAll(i
):i
.querySelector
&&(a
=[i
]),this.previews
=a
,j(a
,(function(t
){var i
=document
.createElement("img");tt(t
,b
,{width:t
.offsetWidth
,height:t
.offsetHeight
,html:t
.innerHTML
}),e
&&(i
.crossOrigin
=e
),i
.src
=n
,i
.alt
=r
,i
.style
.cssText
='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t
.innerHTML
="",t
.appendChild(i
)}))}},resetPreview:function(){j(this.previews
,(function(t
){var e
=G(t
,b
);J(t
,{width:e
.width
,height:e
.height
}),t
.innerHTML
=e
.html
,function(t
,e
){if(S(t
[e
]))try{delete t
[e
]}catch(i
){t
[e
]=void 0}else if(t
.dataset
)try{delete t
.dataset
[e
]}catch(i
){t
.dataset
[e
]=void 0}else t
.removeAttribute("data-".concat(Z(e
)))}(t
,b
)}))},preview:function(){var t
=this.imageData
,e
=this.canvasData
,i
=this.cropBoxData
,n
=i
.width
,r
=i
.height
,o
=t
.width
,a
=t
.height
,s
=i
.left
-e
.left
-t
.left
,h
=i
.top
-e
.top
-t
.top
;this.cropped
&&!this.disabled
&&(J(this.viewBoxImage
,X({width:o
,height:a
},ut(X({translateX:-s
,translateY:-h
},t
)))),j(this.previews
,(function(e
){var i
=G(e
,b
),c
=i
.width
,l
=i
.height
,u
=c
,d
=l
,p
=1;n
&&(d
=r
*(p
=c
/n)),r&&d>l&&(u=n*(p=l/r
),d
=l
),J(e
,{width:u
,height:d
}),J(e
.getElementsByTagName("img")[0],X({width:o
*p
,height:a
*p
},ut(X({translateX:-s
*p
,translateY:-h
*p
},t
))))})))}},bt
={bind:function(){var t
=this.element
,e
=this.options
,i
=this.cropper
;U(e
.cropstart
)&&rt(t
,"cropstart",e
.cropstart
),U(e
.cropmove
)&&rt(t
,"cropmove",e
.cropmove
),U(e
.cropend
)&&rt(t
,"cropend",e
.cropend
),U(e
.crop
)&&rt(t
,"crop",e
.crop
),U(e
.zoom
)&&rt(t
,"zoom",e
.zoom
),rt(i
,E
,this.onCropStart
=this.cropStart
.bind(this)),e
.zoomable
&&e
.zoomOnWheel
&&rt(i
,"wheel",this.onWheel
=this.wheel
.bind(this),{passive:!1,capture:!0}),e
.toggleDragModeOnDblclick
&&rt(i
,"dblclick",this.onDblclick
=this.dblclick
.bind(this)),rt(t
.ownerDocument
,B
,this.onCropMove
=this.cropMove
.bind(this)),rt(t
.ownerDocument
,D
,this.onCropEnd
=this.cropEnd
.bind(this)),e
.responsive
&&rt(window
,"resize",this.onResize
=this.resize
.bind(this))},unbind:function(){var t
=this.element
,e
=this.options
,i
=this.cropper
;U(e
.cropstart
)&&nt(t
,"cropstart",e
.cropstart
),U(e
.cropmove
)&&nt(t
,"cropmove",e
.cropmove
),U(e
.cropend
)&&nt(t
,"cropend",e
.cropend
),U(e
.crop
)&&nt(t
,"crop",e
.crop
),U(e
.zoom
)&&nt(t
,"zoom",e
.zoom
),nt(i
,E
,this.onCropStart
),e
.zoomable
&&e
.zoomOnWheel
&&nt(i
,"wheel",this.onWheel
,{passive:!1,capture:!0}),e
.toggleDragModeOnDblclick
&&nt(i
,"dblclick",this.onDblclick
),nt(t
.ownerDocument
,B
,this.onCropMove
),nt(t
.ownerDocument
,D
,this.onCropEnd
),e
.responsive
&&nt(window
,"resize",this.onResize
)}},xt
={resize:function(){if(!this.disabled
){var t
,e
,i
=this.options
,n
=this.container
,r
=this.containerData
,o
=n
.offsetWidth
/r.width,a=n.offsetHeight/r
.height
,s
=Math
.abs(o
-1)>Math
.abs(a
-1)?o:a
;1!==s
&&(i
.restore
&&(t
=this.getCanvasData(),e
=this.getCropBoxData()),this.render(),i
.restore
&&(this.setCanvasData(j(t
,(function(e
,i
){t
[i
]=e
*s
}))),this.setCropBoxData(j(e
,(function(t
,i
){e
[i
]=t
*s
})))))}},dblclick:function(){var t
,e
;this.disabled
||"none"===this.options
.dragMode
||this.setDragMode((t
=this.dragBox
,e
=d
,(t
.classList
?t
.classList
.contains(e
):t
.className
.indexOf(e
)>-1)?"move":"crop"))},wheel:function(t
){var e
=this,i
=Number(this.options
.wheelZoomRatio
)||.1,n
=1;this.disabled
||(t
.preventDefault(),this.wheeling
||(this.wheeling
=!0,setTimeout((function(){e
.wheeling
=!1}),50),t
.deltaY
?n
=t
.deltaY
>0?1:-1:t
.wheelDelta
?n
=-t
.wheelDelta
/120:t
.detail
&&(n
=t
.detail
>0?1:-1),this.zoom(-n
*i
,t
)))},cropStart:function(t
){var e
=t
.buttons
,i
=t
.button
;if(!(this.disabled
||("mousedown"===t
.type
||"pointerdown"===t
.type
&&"mouse"===t
.pointerType
)&&(I(e
)&&1!==e
||I(i
)&&0!==i
||t
.ctrlKey
))){var n
,r
=this.options
,o
=this.pointers
;t
.changedTouches
?j(t
.changedTouches
,(function(t
){o
[t
.identifier
]=dt(t
)})):o
[t
.pointerId
||0]=dt(t
),n
=Object
.keys(o
).length
>1&&r
.zoomable
&&r
.zoomOnTouch
?"zoom":G(t
.target
,y
),T
.test(n
)&&!1!==ot(this.element
,"cropstart",{originalEvent:t
,action:n
})&&(t
.preventDefault(),this.action
=n
,this.cropping
=!1,"crop"===n
&&(this.cropping
=!0,$(this.dragBox
,v
)))}},cropMove:function(t
){var e
=this.action
;if(!this.disabled
&&e
){var i
=this.pointers
;t
.preventDefault(),!1!==ot(this.element
,"cropmove",{originalEvent:t
,action:e
})&&(t
.changedTouches
?j(t
.changedTouches
,(function(t
){X(i
[t
.identifier
]||{},dt(t
,!0))})):X(i
[t
.pointerId
||0]||{},dt(t
,!0)),this.change(t
))}},cropEnd:function(t
){if(!this.disabled
){var e
=this.action
,i
=this.pointers
;t
.changedTouches
?j(t
.changedTouches
,(function(t
){delete i
[t
.identifier
]})):delete i
[t
.pointerId
||0],e
&&(t
.preventDefault(),Object
.keys(i
).length
||(this.action
=""),this.cropping
&&(this.cropping
=!1,Q(this.dragBox
,v
,this.cropped
&&this.options
.modal
)),ot(this.element
,"cropend",{originalEvent:t
,action:e
}))}}},Mt
={change:function(t
){var i
,n
=this.options
,r
=this.canvasData
,o
=this.containerData
,a
=this.cropBoxData
,s
=this.pointers
,h
=this.action
,c
=n
.aspectRatio
,l
=a
.left
,u
=a
.top
,d
=a
.width
,p
=a
.height
,g
=l
+d
,m
=u
+p
,v
=0,w
=0,y
=o
.width
,b
=o
.height
,x
=!0;!c
&&t
.shiftKey
&&(c
=d
&&p
?d
/p:1),this.limited
&&(v
=a
.minLeft
,w
=a
.minTop
,y
=v
+Math
.min(o
.width
,r
.width
,r
.left
+r
.width
),b
=w
+Math
.min(o
.height
,r
.height
,r
.top
+r
.height
));var M
=s
[Object
.keys(s
)[0]],C
={x:M
.endX
-M
.startX
,y:M
.endY
-M
.startY
},E=function(t
){switch(t
){case"e":g
+C
.x
>y
&&(C
.x
=y
-g
);break;case"w":l
+C
.x
<v
&&(C
.x
=v
-l
);break;case"n":u
+C
.y
<w
&&(C
.y
=w
-u
);break;case"s":m
+C
.y
>b
&&(C
.y
=b
-m
)}};switch(h
){case"all":l
+=C
.x
,u
+=C
.y
;break;case"e":if(C
.x
>=0&&(g
>=y
||c
&&(u
<=w
||m
>=b
))){x
=!1;break}E("e"),(d
+=C
.x
)<0&&(h
="w",l
-=d
=-d
),c
&&(p
=d
/c,u+=(a.height-p)/2);break;case"n":if(C
.y
<=0&&(u
<=w
||c
&&(l
<=v
||g
>=y
))){x
=!1;break}E("n"),p
-=C
.y
,u
+=C
.y
,p
<0&&(h
="s",u
-=p
=-p
),c
&&(d
=p
*c
,l
+=(a
.width
-d
)/2);break;case"w":if(C.x<=0&&(l<=v||c&&(u<=w||m>=b))){x=!1;break}E("w"),d-=C.x,l+=C.x,d<0&&(h="e",l-=d=-d),c&&(p=d/c,u
+=(a
.height
-p
)/2);break;case"s":if(C.y>=0&&(m>=b||c&&(l<=v||g>=y))){x=!1;break}E("s"),(p+=C.y)<0&&(h="n",u-=p=-p),c&&(d=p*c,l+=(a.width-d)/2);break;case"ne":if(c
){if(C
.y
<=0&&(u
<=w
||g
>=y
)){x
=!1;break}E("n"),p
-=C
.y
,u
+=C
.y
,d
=p
*c
}else E("n"),E("e"),C
.x
>=0?g
<y
?d
+=C
.x:C
.y
<=0&&u
<=w
&&(x
=!1):d
+=C
.x
,C
.y
<=0?u
>w
&&(p
-=C
.y
,u
+=C
.y
):(p
-=C
.y
,u
+=C
.y
);d
<0&&p
<0?(h
="sw",u
-=p
=-p
,l
-=d
=-d
):d
<0?(h
="nw",l
-=d
=-d
):p
<0&&(h
="se",u
-=p
=-p
);break;case"nw":if(c
){if(C
.y
<=0&&(u
<=w
||l
<=v
)){x
=!1;break}E("n"),p
-=C
.y
,u
+=C
.y
,d
=p
*c
,l
+=a
.width
-d
}else E("n"),E("w"),C
.x
<=0?l
>v
?(d
-=C
.x
,l
+=C
.x
):C
.y
<=0&&u
<=w
&&(x
=!1):(d
-=C
.x
,l
+=C
.x
),C
.y
<=0?u
>w
&&(p
-=C
.y
,u
+=C
.y
):(p
-=C
.y
,u
+=C
.y
);d
<0&&p
<0?(h
="se",u
-=p
=-p
,l
-=d
=-d
):d
<0?(h
="ne",l
-=d
=-d
):p
<0&&(h
="sw",u
-=p
=-p
);break;case"sw":if(c
){if(C
.x
<=0&&(l
<=v
||m
>=b
)){x
=!1;break}E("w"),d
-=C
.x
,l
+=C
.x
,p
=d
/c
}else E("s"),E("w"),C
.x
<=0?l
>v
?(d
-=C
.x
,l
+=C
.x
):C
.y
>=0&&m
>=b
&&(x
=!1):(d
-=C
.x
,l
+=C
.x
),C
.y
>=0?m
<b
&&(p
+=C
.y
):p
+=C
.y
;d
<0&&p
<0?(h
="ne",u
-=p
=-p
,l
-=d
=-d
):d
<0?(h
="se",l
-=d
=-d
):p
<0&&(h
="nw",u
-=p
=-p
);break;case"se":if(c
){if(C
.x
>=0&&(g
>=y
||m
>=b
)){x
=!1;break}E("e"),p
=(d
+=C
.x
)/c
}else E("s"),E("e"),C
.x
>=0?g
<y
?d
+=C
.x:C
.y
>=0&&m
>=b
&&(x
=!1):d
+=C
.x
,C
.y
>=0?m
<b
&&(p
+=C
.y
):p
+=C
.y
;d
<0&&p
<0?(h
="nw",u
-=p
=-p
,l
-=d
=-d
):d
<0?(h
="sw",l
-=d
=-d
):p
<0&&(h
="ne",u
-=p
=-p
);break;case"move":this.move(C
.x
,C
.y
),x
=!1;break;case"zoom":this.zoom(function(t
){var i
=e({},t
),n
=0;return j(t
,(function(t
,e
){delete i
[e
],j(i
,(function(e
){var i
=Math
.abs(t
.startX
-e
.startX
),r
=Math
.abs(t
.startY
-e
.startY
),o
=Math
.abs(t
.endX
-e
.endX
),a
=Math
.abs(t
.endY
-e
.endY
),s
=Math
.sqrt(i
*i
+r
*r
),h
=(Math
.sqrt(o
*o
+a
*a
)-s
)/s
;Math
.abs(h
)>Math
.abs(n
)&&(n
=h
)}))})),n
}(s
),t
),x
=!1;break;case"crop":if(!C
.x
||!C
.y
){x
=!1;break}i
=at(this.cropper
),l
=M
.startX
-i
.left
,u
=M
.startY
-i
.top
,d
=a
.minWidth
,p
=a
.minHeight
,C
.x
>0?h
=C
.y
>0?"se":"ne":C
.x
<0&&(l
-=d
,h
=C
.y
>0?"sw":"nw"),C
.y
<0&&(u
-=p
),this.cropped
||(_(this.cropBox
,f
),this.cropped
=!0,this.limited
&&this.limitCropBox(!0,!0))}x
&&(a
.width
=d
,a
.height
=p
,a
.left
=l
,a
.top
=u
,this.action
=h
,this.renderCropBox()),j(s
,(function(t
){t
.startX
=t
.endX
,t
.startY
=t
.endY
}))}},Ct
={crop:function(){return!this.ready
||this.cropped
||this.disabled
||(this.cropped
=!0,this.limitCropBox(!0,!0),this.options
.modal
&&$(this.dragBox
,v
),_(this.cropBox
,f
),this.setCropBoxData(this.initialCropBoxData
)),this},reset:function(){return this.ready
&&!this.disabled
&&(this.imageData
=X({},this.initialImageData
),this.canvasData
=X({},this.initialCanvasData
),this.cropBoxData
=X({},this.initialCropBoxData
),this.renderCanvas(),this.cropped
&&this.renderCropBox()),this},clear:function(){return this.cropped
&&!this.disabled
&&(X(this.cropBoxData
,{left:0,top:0,width:0,height:0}),this.cropped
=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),_(this.dragBox
,v
),$(this.cropBox
,f
)),this},replace:function(t
){var e
=arguments
.length
>1&&void 0!==arguments
[1]&&arguments
[1];return!this.disabled
&&t
&&(this.isImg
&&(this.element
.src
=t
),e
?(this.url
=t
,this.image
.src
=t
,this.ready
&&(this.viewBoxImage
.src
=t
,j(this.previews
,(function(e
){e
.getElementsByTagName("img")[0].src
=t
})))):(this.isImg
&&(this.replaced
=!0),this.options
.data
=null,this.uncreate(),this.load(t
))),this},enable:function(){return this.ready
&&this.disabled
&&(this.disabled
=!1,_(this.cropper
,p
)),this},disable:function(){return this.ready
&&!this.disabled
&&(this.disabled
=!0,$(this.cropper
,p
)),this},destroy:function(){var t
=this.element
;return t
.cropper
?(t
.cropper
=void 0,this.isImg
&&this.replaced
&&(t
.src
=this.originalUrl
),this.uncreate(),this):this},move:function(t
){var e
=arguments
.length
>1&&void 0!==arguments
[1]?arguments
[1]:t
,i
=this.canvasData
,n
=i
.left
,r
=i
.top
;return this.moveTo(O(t
)?t:n
+Number(t
),O(e
)?e:r
+Number(e
))},moveTo:function(t
){var e
=arguments
.length
>1&&void 0!==arguments
[1]?arguments
[1]:t
,i
=this.canvasData
,n
=!1;return t
=Number(t
),e
=Number(e
),this.ready
&&!this.disabled
&&this.options
.movable
&&(I(t
)&&(i
.left
=t
,n
=!0),I(e
)&&(i
.top
=e
,n
=!0),n
&&this.renderCanvas(!0)),this},zoom:function(t
,e
){var i
=this.canvasData
;return t
=(t
=Number(t
))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth
,null,e
)},zoomTo:function(t
,e
,i
){var n
=this.options
,r
=this.canvasData
,o
=r
.width
,a
=r
.height
,s
=r
.naturalWidth
,h
=r
.naturalHeight
;if((t
=Number(t
))>=0&&this.ready
&&!this.disabled
&&n
.zoomable
){var c
=s
*t
,l
=h
*t
;if(!1===ot(this.element
,"zoom",{ratio:t
,oldRatio:o
/s
,originalEvent:i
}))return this;if(i
){var u
=this.pointers
,d
=at(this.cropper
),p
=u
&&Object
.keys(u
).length
?function(t
){var e
=0,i
=0,n
=0;return j(t
,(function(t
){var r
=t
.startX
,o
=t
.startY
;e
+=r
,i
+=o
,n
+=1})),{pageX:e
/=n,pageY:i/=n
}}(u
):{pageX:i
.pageX
,pageY:i
.pageY
};r
.left
-=(c
-o
)*((p
.pageX
-d
.left
-r
.left
)/o),r.top-=(l-a)*((p.pageY-d.top-r.top)/a)}else z(e
)&&I(e
.x
)&&I(e
.y
)?(r
.left
-=(c
-o
)*((e
.x
-r
.left
)/o),r.top-=(l-a)*((e.y-r.top)/a)):(r
.left
-=(c
-o
)/2,r.top-=(l-a)/2);r
.width
=c
,r
.height
=l
,this.renderCanvas(!0)}return this},rotate:function(t
){return this.rotateTo((this.imageData
.rotate
||0)+Number(t
))},rotateTo:function(t
){return I(t
=Number(t
))&&this.ready
&&!this.disabled
&&this.options
.rotatable
&&(this.imageData
.rotate
=t
%360,this.renderCanvas(!0,!0)),this},scaleX:function(t
){var e
=this.imageData
.scaleY
;return this.scale(t
,I(e
)?e:1)},scaleY:function(t
){var e
=this.imageData
.scaleX
;return this.scale(I(e
)?e:1,t
)},scale:function(t
){var e
=arguments
.length
>1&&void 0!==arguments
[1]?arguments
[1]:t
,i
=this.imageData
,n
=!1;return t
=Number(t
),e
=Number(e
),this.ready
&&!this.disabled
&&this.options
.scalable
&&(I(t
)&&(i
.scaleX
=t
,n
=!0),I(e
)&&(i
.scaleY
=e
,n
=!0),n
&&this.renderCanvas(!0,!0)),this},getData:function(){var t
,e
=arguments
.length
>0&&void 0!==arguments
[0]&&arguments
[0],i
=this.options
,n
=this.imageData
,r
=this.canvasData
,o
=this.cropBoxData
;if(this.ready
&&this.cropped
){t
={x:o
.left
-r
.left
,y:o
.top
-r
.top
,width:o
.width
,height:o
.height
};var a
=n
.width
/n.naturalWidth;if(j(t,(function(e,i){t[i]=e/a})),e
){var s
=Math
.round(t
.y
+t
.height
),h
=Math
.round(t
.x
+t
.width
);t
.x
=Math
.round(t
.x
),t
.y
=Math
.round(t
.y
),t
.width
=h
-t
.x
,t
.height
=s
-t
.y
}}else t
={x:0,y:0,width:0,height:0};return i
.rotatable
&&(t
.rotate
=n
.rotate
||0),i
.scalable
&&(t
.scaleX
=n
.scaleX
||1,t
.scaleY
=n
.scaleY
||1),t
},setData:function(t
){var e
=this.options
,i
=this.imageData
,n
=this.canvasData
,r
={};if(this.ready
&&!this.disabled
&&z(t
)){var o
=!1;e
.rotatable
&&I(t
.rotate
)&&t
.rotate
!==i
.rotate
&&(i
.rotate
=t
.rotate
,o
=!0),e
.scalable
&&(I(t
.scaleX
)&&t
.scaleX
!==i
.scaleX
&&(i
.scaleX
=t
.scaleX
,o
=!0),I(t
.scaleY
)&&t
.scaleY
!==i
.scaleY
&&(i
.scaleY
=t
.scaleY
,o
=!0)),o
&&this.renderCanvas(!0,!0);var a
=i
.width
/i
.naturalWidth
;I(t
.x
)&&(r
.left
=t
.x
*a
+n
.left
),I(t
.y
)&&(r
.top
=t
.y
*a
+n
.top
),I(t
.width
)&&(r
.width
=t
.width
*a
),I(t
.height
)&&(r
.height
=t
.height
*a
),this.setCropBoxData(r
)}return this},getContainerData:function(){return this.ready
?X({},this.containerData
):{}},getImageData:function(){return this.sized
?X({},this.imageData
):{}},getCanvasData:function(){var t
=this.canvasData
,e
={};return this.ready
&&j(["left","top","width","height","naturalWidth","naturalHeight"],(function(i
){e
[i
]=t
[i
]})),e
},setCanvasData:function(t
){var e
=this.canvasData
,i
=e
.aspectRatio
;return this.ready
&&!this.disabled
&&z(t
)&&(I(t
.left
)&&(e
.left
=t
.left
),I(t
.top
)&&(e
.top
=t
.top
),I(t
.width
)?(e
.width
=t
.width
,e
.height
=t
.width
/i
):I(t
.height
)&&(e
.height
=t
.height
,e
.width
=t
.height
*i
),this.renderCanvas(!0)),this},getCropBoxData:function(){var t
,e
=this.cropBoxData
;return this.ready
&&this.cropped
&&(t
={left:e
.left
,top:e
.top
,width:e
.width
,height:e
.height
}),t
||{}},setCropBoxData:function(t
){var e
,i
,n
=this.cropBoxData
,r
=this.options
.aspectRatio
;return this.ready
&&this.cropped
&&!this.disabled
&&z(t
)&&(I(t
.left
)&&(n
.left
=t
.left
),I(t
.top
)&&(n
.top
=t
.top
),I(t
.width
)&&t
.width
!==n
.width
&&(e
=!0,n
.width
=t
.width
),I(t
.height
)&&t
.height
!==n
.height
&&(i
=!0,n
.height
=t
.height
),r
&&(e
?n
.height
=n
.width
/r:i
&&(n
.width
=n
.height
*r
)),this.renderCropBox()),this},getCroppedCanvas:function(){var t
=arguments
.length
>0&&void 0!==arguments
[0]?arguments
[0]:{};if(!this.ready
||!window
.HTMLCanvasElement
)return null;var e
=this.canvasData
,i
=ft(this.image
,this.imageData
,e
,t
);if(!this.cropped
)return i
;var n
=this.getData(),r
=n
.x
,o
=n
.y
,s
=n
.width
,h
=n
.height
,c
=i
.width
/Math
.floor(e
.naturalWidth
);1!==c
&&(r
*=c
,o
*=c
,s
*=c
,h
*=c
);var l
=s
/h,u=pt({aspectRatio:l,width:t.maxWidth||1/0,height:t
.maxHeight
||1/0}),d
=pt({aspectRatio:l
,width:t
.minWidth
||0,height:t
.minHeight
||0},"cover"),p
=pt({aspectRatio:l
,width:t
.width
||(1!==c
?i
.width:s
),height:t
.height
||(1!==c
?i
.height:h
)}),f
=p
.width
,g
=p
.height
;f
=Math
.min(u
.width
,Math
.max(d
.width
,f
)),g
=Math
.min(u
.height
,Math
.max(d
.height
,g
));var m
=document
.createElement("canvas"),v
=m
.getContext("2d");m
.width
=q(f
),m
.height
=q(g
),v
.fillStyle
=t
.fillColor
||"transparent",v
.fillRect(0,0,f
,g
);var w
=t
.imageSmoothingEnabled
,y
=void 0===w
||w
,b
=t
.imageSmoothingQuality
;v
.imageSmoothingEnabled
=y
,b
&&(v
.imageSmoothingQuality
=b
);var x
,M
,C
,E
,B
,D
,T
=i
.width
,A
=i
.height
,N
=r
,R
=o
;N
<=-s
||N
>T
?(N
=0,x
=0,C
=0,B
=0):N
<=0?(C
=-N
,N
=0,B
=x
=Math
.min(T
,s
+N
)):N
<=T
&&(C
=0,B
=x
=Math
.min(s
,T
-N
)),x
<=0||R
<=-h
||R
>A
?(R
=0,M
=0,E
=0,D
=0):R
<=0?(E
=-R
,R
=0,D
=M
=Math
.min(A
,h
+R
)):R
<=A
&&(E
=0,D
=M
=Math
.min(h
,A
-R
));var k
=[N
,R
,x
,M
];if(B
>0&&D
>0){var L
=f
/s
;k
.push(C
*L
,E
*L
,B
*L
,D
*L
)}return v
.drawImage
.apply(v
,[i
].concat(a(k
.map((function(t
){return Math
.floor(q(t
))}))))),m
},setAspectRatio:function(t
){var e
=this.options
;return this.disabled
||O(t
)||(e
.aspectRatio
=Math
.max(0,t
)||NaN
,this.ready
&&(this.initCropBox(),this.cropped
&&this.renderCropBox())),this},setDragMode:function(t
){var e
=this.options
,i
=this.dragBox
,n
=this.face
;if(this.ready
&&!this.disabled
){var r
="crop"===t
,o
=e
.movable
&&"move"===t
;t
=r
||o
?t:"none",e
.dragMode
=t
,tt(i
,y
,t
),Q(i
,d
,r
),Q(i
,w
,o
),e
.cropBoxMovable
||(tt(n
,y
,t
),Q(n
,d
,r
),Q(n
,w
,o
))}return this}},Et
=c
.Cropper
,Bt=function(){function t(e
){var i
=arguments
.length
>1&&void 0!==arguments
[1]?arguments
[1]:{};if(n(this,t
),!e
||!R
.test(e
.tagName
))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element
=e
,this.options
=X({},k
,z(i
)&&i
),this.cropped
=!1,this.disabled
=!1,this.pointers
={},this.ready
=!1,this.reloading
=!1,this.replaced
=!1,this.sized
=!1,this.sizing
=!1,this.init()}var e
,i
,o
;return e
=t
,o
=[{key:"noConflict",value:function(){return window
.Cropper
=Et
,t
}},{key:"setDefaults",value:function(t
){X(k
,z(t
)&&t
)}}],(i
=[{key:"init",value:function(){var t
,e
=this.element
,i
=e
.tagName
.toLowerCase();if(!e
.cropper
){if(e
.cropper
=this,"img"===i
){if(this.isImg
=!0,t
=e
.getAttribute("src")||"",this.originalUrl
=t
,!t
)return;t
=e
.src
}else"canvas"===i
&&window
.HTMLCanvasElement
&&(t
=e
.toDataURL());this.load(t
)}}},{key:"load",value:function(t
){var e
=this;if(t
){this.url
=t
,this.imageData
={};var i
=this.element
,n
=this.options
;if(n
.rotatable
||n
.scalable
||(n
.checkOrientation
=!1),n
.checkOrientation
&&window
.ArrayBuffer
)if(A
.test(t
))N
.test(t
)?this.read((r
=t
.replace(mt
,""),o
=atob(r
),a
=new ArrayBuffer(o
.length
),j(s
=new Uint8Array(a
),(function(t
,e
){s
[e
]=o
.charCodeAt(e
)})),a
)):this.clone();else{var r
,o
,a
,s
,h
=new XMLHttpRequest
,c
=this.clone
.bind(this);this.reloading
=!0,this.xhr
=h
,h
.onabort
=c
,h
.onerror
=c
,h
.ontimeout
=c
,h
.onprogress=function(){"image/jpeg"!==h
.getResponseHeader("content-type")&&h
.abort()},h
.onload=function(){e
.read(h
.response
)},h
.onloadend=function(){e
.reloading
=!1,e
.xhr
=null},n
.checkCrossOrigin
&&ct(t
)&&i
.crossOrigin
&&(t
=lt(t
)),h
.open("GET",t
,!0),h
.responseType
="arraybuffer",h
.withCredentials
="use-credentials"===i
.crossOrigin
,h
.send()}else this.clone()}}},{key:"read",value:function(t
){var e
=this.options
,i
=this.imageData
,n
=vt(t
),r
=0,o
=1,a
=1;if(n
>1){this.url=function(t
,e
){for(var i
=[],n
=new Uint8Array(t
);n
.length
>0;)i
.push(gt
.apply(null,W(n
.subarray(0,8192)))),n
=n
.subarray(8192);return"data:".concat(e
,";base64,").concat(btoa(i
.join("")))}(t
,"image/jpeg");var s=function(t
){var e
=0,i
=1,n
=1;switch(t
){case 2:i
=-1;break;case 3:e
=-180;break;case 4:n
=-1;break;case 5:e
=90,n
=-1;break;case 6:e
=90;break;case 7:e
=90,i
=-1;break;case 8:e
=-90}return{rotate:e
,scaleX:i
,scaleY:n
}}(n
);r
=s
.rotate
,o
=s
.scaleX
,a
=s
.scaleY
}e
.rotatable
&&(i
.rotate
=r
),e
.scalable
&&(i
.scaleX
=o
,i
.scaleY
=a
),this.clone()}},{key:"clone",value:function(){var t
=this.element
,e
=this.url
,i
=t
.crossOrigin
,n
=e
;this.options
.checkCrossOrigin
&&ct(e
)&&(i
||(i
="anonymous"),n
=lt(e
)),this.crossOrigin
=i
,this.crossOriginUrl
=n
;var r
=document
.createElement("img");i
&&(r
.crossOrigin
=i
),r
.src
=n
||e
,r
.alt
=t
.alt
||"The image to crop",this.image
=r
,r
.onload
=this.start
.bind(this),r
.onerror
=this.stop
.bind(this),$(r
,g
),t
.parentNode
.insertBefore(r
,t
.nextSibling
)}},{key:"start",value:function(){var t
=this,e
=this.image
;e
.onload
=null,e
.onerror
=null,this.sizing
=!0;var i
=c
.navigator
&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c
.navigator
.userAgent
),n=function(e
,i
){X(t
.imageData
,{naturalWidth:e
,naturalHeight:i
,aspectRatio:e
/i
}),t
.initialImageData
=X({},t
.imageData
),t
.sizing
=!1,t
.sized
=!0,t
.build()};if(!e
.naturalWidth
||i
){var r
=document
.createElement("img"),o
=document
.body
||document
.documentElement
;this.sizingImage
=r
,r
.onload=function(){n(r
.width
,r
.height
),i
||o
.removeChild(r
)},r
.src
=e
.src
,i
||(r
.style
.cssText
="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o
.appendChild(r
))}else n(e
.naturalWidth
,e
.naturalHeight
)}},{key:"stop",value:function(){var t
=this.image
;t
.onload
=null,t
.onerror
=null,t
.parentNode
.removeChild(t
),this.image
=null}},{key:"build",value:function(){if(this.sized
&&!this.ready
){var t
=this.element
,e
=this.options
,i
=this.image
,n
=t
.parentNode
,r
=document
.createElement("div");r
.innerHTML
='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o
=r
.querySelector(".".concat("cropper","-container")),a
=o
.querySelector(".".concat("cropper","-canvas")),s
=o
.querySelector(".".concat("cropper","-drag-box")),h
=o
.querySelector(".".concat("cropper","-crop-box")),c
=h
.querySelector(".".concat("cropper","-face"));this.container
=n
,this.cropper
=o
,this.canvas
=a
,this.dragBox
=s
,this.cropBox
=h
,this.viewBox
=o
.querySelector(".".concat("cropper","-view-box")),this.face
=c
,a
.appendChild(i
),$(t
,f
),n
.insertBefore(o
,t
.nextSibling
),this.isImg
||_(i
,g
),this.initPreview(),this.bind(),e
.initialAspectRatio
=Math
.max(0,e
.initialAspectRatio
)||NaN
,e
.aspectRatio
=Math
.max(0,e
.aspectRatio
)||NaN
,e
.viewMode
=Math
.max(0,Math
.min(3,Math
.round(e
.viewMode
)))||0,$(h
,f
),e
.guides
||$(h
.getElementsByClassName("".concat("cropper","-dashed")),f
),e
.center
||$(h
.getElementsByClassName("".concat("cropper","-center")),f
),e
.background
&&$(o
,"".concat("cropper","-bg")),e
.highlight
||$(c
,m
),e
.cropBoxMovable
&&($(c
,w
),tt(c
,y
,"all")),e
.cropBoxResizable
||($(h
.getElementsByClassName("".concat("cropper","-line")),f
),$(h
.getElementsByClassName("".concat("cropper","-point")),f
)),this.render(),this.ready
=!0,this.setDragMode(e
.dragMode
),e
.autoCrop
&&this.crop(),this.setData(e
.data
),U(e
.ready
)&&rt(t
,"ready",e
.ready
,{once:!0}),ot(t
,"ready")}}},{key:"unbuild",value:function(){this.ready
&&(this.ready
=!1,this.unbind(),this.resetPreview(),this.cropper
.parentNode
.removeChild(this.cropper
),_(this.element
,f
))}},{key:"uncreate",value:function(){this.ready
?(this.unbuild(),this.ready
=!1,this.cropped
=!1):this.sizing
?(this.sizingImage
.onload
=null,this.sizing
=!1,this.sized
=!1):this.reloading
?(this.xhr
.onabort
=null,this.xhr
.abort()):this.image
&&this.stop()}}])&&r(e
.prototype,i
),o
&&r(e
,o
),t
}();return X(Bt
.prototype,wt
,yt
,bt
,xt
,Mt
,Ct
),Bt
}()},697:function(t
,e
,i
){}}]);
12 //# sourceMappingURL=3.6817af5c7ddbbd72fbf1.js.map