@lifesg/web-frontend-engine 1.19.18 → 1.19.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/chunks/{file-upload-manager.58d10a8b.js → file-upload-manager.ea8e699a.js} +2 -2
  2. package/chunks/file-upload-manager.ea8e699a.js.map +1 -0
  3. package/chunks/{index.2a117e92.js → index.2eea32e5.js} +6 -6
  4. package/chunks/{index.2a117e92.js.map → index.2eea32e5.js.map} +1 -1
  5. package/chunks/{index.e11ec601.js → index.35f47b02.js} +2 -2
  6. package/chunks/{index.e11ec601.js.map → index.35f47b02.js.map} +1 -1
  7. package/chunks/{index.3396b1bb.js → index.3ad3ddcb.js} +2 -2
  8. package/chunks/{index.3396b1bb.js.map → index.3ad3ddcb.js.map} +1 -1
  9. package/chunks/{location-modal.559a916a.js → location-modal.f2d21ab1.js} +2 -2
  10. package/chunks/{location-modal.559a916a.js.map → location-modal.f2d21ab1.js.map} +1 -1
  11. package/cjs/chunks/file-upload-manager.037bf56f.js +2 -0
  12. package/cjs/chunks/file-upload-manager.037bf56f.js.map +1 -0
  13. package/cjs/chunks/{index.f8611425.js → index.1502ccf3.js} +2 -2
  14. package/cjs/chunks/{index.f8611425.js.map → index.1502ccf3.js.map} +1 -1
  15. package/cjs/chunks/{index.62020cb0.js → index.71069a70.js} +6 -6
  16. package/cjs/chunks/{index.62020cb0.js.map → index.71069a70.js.map} +1 -1
  17. package/cjs/chunks/{index.252a45d0.js → index.ef5ba9a2.js} +2 -2
  18. package/cjs/chunks/{index.252a45d0.js.map → index.ef5ba9a2.js.map} +1 -1
  19. package/cjs/chunks/{location-modal.17dc94b3.js → location-modal.c73280bf.js} +2 -2
  20. package/cjs/chunks/{location-modal.17dc94b3.js.map → location-modal.c73280bf.js.map} +1 -1
  21. package/cjs/index.js +1 -1
  22. package/components/shared/error-messages.d.ts +1 -0
  23. package/context-providers/yup/types.d.ts +8 -1
  24. package/index.js +1 -1
  25. package/package.json +1 -1
  26. package/chunks/file-upload-manager.58d10a8b.js.map +0 -1
  27. package/cjs/chunks/file-upload-manager.3328a5eb.js +0 -2
  28. package/cjs/chunks/file-upload-manager.3328a5eb.js.map +0 -1
@@ -176,7 +176,7 @@ var Vp=!1;Vp||(Vp=!0,Zp.ENGLISH=new Zp("en"),Zp.US=new Zp("en","US","en"),Zp.UK=
176
176
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
177
177
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
178
178
  */
179
- Ff((function(e){Object.getOwnPropertyNames(jp.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatterBuilder.prototype[t]=jp.prototype[t])})),Object.getOwnPropertyNames(Bp.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatter.prototype[t]=Bp.prototype[t])})),e.DateTimeFormatter.RFC_1123_DATE_TIME=Bp.RFC_1123_DATE_TIME}));var Hp=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Gp=un,Yp=Fr;var Wp=function(e){return"symbol"==typeof e||Yp(e)&&"[object Symbol]"==Gp(e)},qp=Hp,Kp=Gr,Jp=Wp,Xp=Kt?Kt.prototype:void 0,Qp=Xp?Xp.toString:void 0;var eh=function e(t){if("string"==typeof t)return t;if(Kp(t))return qp(t,e)+"";if(Jp(t))return Qp?Qp.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},th=eh;var nh=function(e){return null==e?"":th(e)};var rh=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a},ih=rh;var ah=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:ih(e,t,n)},oh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var sh=function(e){return oh.test(e)};var uh=function(e){return e.split("")},lh="\\ud800-\\udfff",ch="["+lh+"]",dh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",fh="\\ud83c[\\udffb-\\udfff]",ph="[^"+lh+"]",hh="(?:\\ud83c[\\udde6-\\uddff]){2}",mh="[\\ud800-\\udbff][\\udc00-\\udfff]",gh="(?:"+dh+"|"+fh+")"+"?",yh="[\\ufe0e\\ufe0f]?",_h=yh+gh+("(?:\\u200d(?:"+[ph,hh,mh].join("|")+")"+yh+gh+")*"),vh="(?:"+[ph+dh+"?",dh,hh,mh,ch].join("|")+")",bh=RegExp(fh+"(?="+fh+")|"+vh+_h,"g");var Eh=function(e){return e.match(bh)||[]},Sh=uh,Ah=sh,xh=Eh;var wh=function(e){return Ah(e)?xh(e):Sh(e)},Th=ah,Mh=sh,Oh=wh,Ch=nh;var Nh=function(e){return function(t){t=Ch(t);var n=Mh(t)?Oh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Th(n,1).join(""):t.slice(1);return r[e]()+i}},Dh=Nh("toUpperCase"),Lh=nh,Ih=Dh;var kh=function(e){return Ih(Lh(e).toLowerCase())};function $h(e){return new DataView(e.buffer,e.byteOffset)}const Rh={len:1,get:(e,t)=>$h(e).getUint8(t),put:(e,t,n)=>($h(e).setUint8(t,n),t+1)},Fh={len:2,get:(e,t)=>$h(e).getUint16(t,!0),put:(e,t,n)=>($h(e).setUint16(t,n,!0),t+2)},zh={len:2,get:(e,t)=>$h(e).getUint16(t),put:(e,t,n)=>($h(e).setUint16(t,n),t+2)},Ph={len:4,get:(e,t)=>$h(e).getUint32(t,!0),put:(e,t,n)=>($h(e).setUint32(t,n,!0),t+4)},jh={len:4,get:(e,t)=>$h(e).getUint32(t),put:(e,t,n)=>($h(e).setUint32(t,n),t+4)},Zh={len:4,get:(e,t)=>$h(e).getInt32(t),put:(e,t,n)=>($h(e).setInt32(t,n),t+4)},Uh={len:8,get:(e,t)=>$h(e).getBigUint64(t,!0),put:(e,t,n)=>($h(e).setBigUint64(t,n,!0),t+8)};class Bh{constructor(e,t){this.len=e,this.encoding=t,this.textDecoder=new TextDecoder(t)}get(e,t){return this.textDecoder.decode(e.subarray(t,t+this.len))}}class Vh extends Error{constructor(){super("End-Of-Stream")}}class Hh{constructor(){this.maxStreamReadSize=1048576,this.endOfStream=!1,this.peekQueue=[]}async peek(e,t,n){const r=await this.read(e,t,n);return this.peekQueue.push(e.subarray(t,t+r)),r}async read(e,t,n){if(0===n)return 0;let r=this.readFromPeekBuffer(e,t,n);if(r+=await this.readRemainderFromStream(e,t+r,n-r),0===r)throw new Vh;return r}readFromPeekBuffer(e,t,n){let r=n,i=0;for(;this.peekQueue.length>0&&r>0;){const n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");const a=Math.min(n.length,r);e.set(n.subarray(0,a),t+i),i+=a,r-=a,a<n.length&&this.peekQueue.push(n.subarray(a))}return i}async readRemainderFromStream(e,t,n){let r=n,i=0;for(;r>0&&!this.endOfStream;){const n=Math.min(r,this.maxStreamReadSize),a=await this.readFromStream(e,t+i,n);if(0===a)break;i+=a,r-=a}return i}}class Gh extends Hh{constructor(e){super(),this.reader=e.getReader({mode:"byob"})}async readFromStream(e,t,n){if(this.endOfStream)throw new Vh;const r=await this.reader.read(new Uint8Array(n));return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value,t),r.value.byteLength):0}abort(){return this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}class Yh{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",(()=>{this.abort()}))}async readToken(e,t=this.position){const n=new Uint8Array(e.len);if(await this.readBuffer(n,{position:t})<e.len)throw new Vh;return e.get(n,0)}async peekToken(e,t=this.position){const n=new Uint8Array(e.len);if(await this.peekBuffer(n,{position:t})<e.len)throw new Vh;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new Vh;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new Vh;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await(this.onClose?.())}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}abort(){return Promise.resolve()}}class Wh extends Yh{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){const n=this.normalizeOptions(e,t),r=n.position-this.position;if(r>0)return await this.ignore(r),this.readBuffer(e,t);if(r<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===n.length)return 0;const i=await this.streamReader.read(e,n.offset,n.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<n.length)throw new Vh;return i}async peekBuffer(e,t){const n=this.normalizeOptions(e,t);let r=0;if(n.position){const t=n.position-this.position;if(t>0){const i=new Uint8Array(n.length+t);return r=await this.peekBuffer(i,{mayBeLess:n.mayBeLess}),e.set(i.subarray(t),n.offset),r-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(n.length>0){try{r=await this.streamReader.peek(e,n.offset,n.length)}catch(e){if(t?.mayBeLess&&e instanceof Vh)return 0;throw e}if(!n.mayBeLess&&r<n.length)throw new Vh}return r}async ignore(e){const t=Math.min(256e3,e),n=new Uint8Array(t);let r=0;for(;r<e;){const i=e-r,a=await this.readBuffer(n,{length:Math.min(t,i)});if(a<0)return a;r+=a}return r}abort(){return this.streamReader.abort()}supportsRandomAccess(){return!1}}class qh extends Yh{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){if(t?.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const n=await this.peekBuffer(e,t);return this.position+=n,n}async peekBuffer(e,t){const n=this.normalizeOptions(e,t),r=Math.min(this.uint8Array.length-n.position,n.length);if(!n.mayBeLess&&r<n.length)throw new Vh;return e.set(this.uint8Array.subarray(n.position,n.position+r),n.offset),r}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}}function Kh(e){const{byteLength:t}=e;return 6===t?e.getUint16(0)*2**32+e.getUint32(2):5===t?e.getUint8(0)*2**32+e.getUint32(1):4===t?e.getUint32(0):3===t?65536*e.getUint8(0)+e.getUint16(1):2===t?e.getUint16(0):1===t?e.getUint8(0):void 0}function Jh(e,t){const n=e.length,r=t.length;if(0===r)return-1;if(r>n)return-1;const i=n-r;for(let n=0;n<=i;n++){let i=!0;for(let a=0;a<r;a++)if(e[n+a]!==t[a]){i=!1;break}if(i)return n}return-1}new globalThis.TextDecoder("utf8"),new globalThis.TextEncoder,Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const Xh={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},Qh=4100;function em(e,t,n){n={offset:0,...n};for(const[r,i]of t.entries())if(n.mask){if(i!==(n.mask[r]&e[r+n.offset]))return!1}else if(i!==e[r+n.offset])return!1;return!0}class tm{constructor(e){this.detectors=e?.customDetectors,this.tokenizerOptions={abortSignal:e?.signal},this.fromTokenizer=this.fromTokenizer.bind(this),this.fromBuffer=this.fromBuffer.bind(this),this.parse=this.parse.bind(this)}async fromTokenizer(e){const t=e.position;for(const n of this.detectors||[]){const r=await n(e);if(r)return r;if(t!==e.position)return}return this.parse(e)}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Uint8Array?e:new Uint8Array(e);var n,r;if(t?.length>1)return this.fromTokenizer((n=t,r=this.tokenizerOptions,new qh(n,r)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await(n=e,r=this.tokenizerOptions,new Wh(new Gh(n),r));var n,r;try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:n=Qh}=t;let r,i;const a=e.getReader({mode:"byob"});try{const{value:e,done:t}=await a.read(new Uint8Array(n));if(i=e,!t&&e)try{r=await this.fromBuffer(e.slice(0,n))}catch(e){if(!(e instanceof Vh))throw e;r=void 0}i=e}finally{a.releaseLock()}const o=new TransformStream({async start(e){e.enqueue(i)},transform(e,t){t.enqueue(e)}}),s=e.pipeThrough(o);return s.fileType=r,s}check(e,t){return em(this.buffer,e,t)}checkString(e,t){return this.check(function(e){return[...e].map((e=>e.charCodeAt(0)))}(e),t)}async parse(e){if(this.buffer=new Uint8Array(Qh),void 0===e.fileInfo.size&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.parse(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);const t=await e.readToken(Xh);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===this.buffer[0]||70===this.buffer[0])&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(this.buffer,{length:30});const n=new DataView(this.buffer.buffer),r={compressedSize:n.getUint32(18,!0),uncompressedSize:n.getUint32(22,!0),filenameLength:n.getUint16(26,!0),extraFieldLength:n.getUint16(28,!0)};if(r.filename=await e.readToken(new Bh(r.filenameLength,"utf-8")),await e.ignore(r.extraFieldLength),/classes\d*\.dex/.test(r.filename))return{ext:"apk",mime:"application/vnd.android.package-archive"};if("META-INF/mozilla.rsa"===r.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(r.filename.endsWith(".rels")||r.filename.endsWith(".xml")){switch(r.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};case"visio":return{ext:"vsdx",mime:"application/vnd.visio"}}}if(r.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(r.filename.startsWith("3D/")&&r.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===r.filename&&r.compressedSize===r.uncompressedSize){let i=await e.readToken(new Bh(r.compressedSize,"utf-8"));switch(i=i.trim(),i){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}}if(0===r.compressedSize){let a=-1;for(;a<0&&e.position<e.fileInfo.size;)await e.peekBuffer(this.buffer,{mayBeLess:!0}),a=Jh(this.buffer,new Uint8Array([80,75,3,4])),await e.ignore(a>=0?a:this.buffer.length)}else await e.ignore(r.compressedSize)}}catch(o){if(!(o instanceof Vh))throw o}return{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);const s=new Uint8Array(8);return await e.readBuffer(s),em(s,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:em(s,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:em(s,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:em(s,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:em(s,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:em(s,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const u=new Bh(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(u){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return u.startsWith("3g")?u.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF")){try{await e.ignore(1350);const l=10485760,c=new Uint8Array(Math.min(l,e.fileInfo.size));if(await e.readBuffer(c,{mayBeLess:!0}),function(e,t){return-1!==Jh(e,t)}(c,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}catch(d){if(!(d instanceof Vh))throw d}return{ext:"pdf",mime:"application/pdf"}}if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){const f=await this.readTiffHeader(!1);if(f)return f}if(this.check([77,77])){const p=await this.readTiffHeader(!0);if(p)return p}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function h(){const t=await e.peekNumber(Rh);let n=128,r=0;for(;!(t&n)&&0!==n;)++r,n>>=1;const i=new Uint8Array(r+1);return await e.readBuffer(i),i}async function m(){const e=await h(),t=await h();t[0]^=128>>t.length-1;const n=Math.min(6,t.length),r=new DataView(e.buffer),i=new DataView(t.buffer,t.length-n,n);return{id:Kh(r),len:Kh(i)}}async function g(t){for(;t>0;){const n=await m();if(17026===n.id){return(await e.readToken(new Bh(n.len))).replaceAll(/\00.*$/g,"")}await e.ignore(n.len),--t}}const y=await m();switch(await g(y.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(this.check([82,73,70,70])){if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1"))return{ext:"parquet",mime:"application/x-parquet"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(0===this.buffer[6]||1===this.buffer[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){const _=new Bh(4,"latin1").get(this.buffer,2);if(_.match("^d*")&&_>=1e3&&_<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>")){await e.ignore(8);return"debian-binary"===await e.readToken(new Bh(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"}}if(this.checkString("WEBVTT")&&["\n","\r","\t"," ","\0"].some((e=>this.checkString(e,{offset:6}))))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){async function v(){return{length:await e.readToken(Zh),type:await e.readToken(new Bh(4,"latin1"))}}await e.ignore(8);do{const b=await v();if(b.length<0)return;switch(b.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(b.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function E(){const t=new Uint8Array(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Uh))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const S=await E();let A=S.size-24;if(em(S.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const x=new Uint8Array(16);if(A-=await e.readBuffer(x),em(x,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(em(x,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(A)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10])){await e.ignore(20);switch(await e.readToken(new Bh(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.check([0,60,0,63,0,120,0,109,0,108],{offset:2})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){const w=new DataView(this.buffer.buffer).getUint32(12,!0);if(w>12&&this.buffer.length>=w+16)try{const T=(new TextDecoder).decode(this.buffer.slice(16,w+16));if(JSON.parse(T).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),function(e,t=0){const n=Number.parseInt(new Bh(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(n))return!1;let r=256;for(let n=t;n<t+148;n++)r+=e[n];for(let n=t+156;n<t+512;n++)r+=e[n];return n===r}(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254]))return this.check([60,0,63,0,120,0,109,0,108,0],{offset:2})?{ext:"xml",mime:"application/xml"}:this.check([255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0],{offset:2})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:void 0;if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(this.buffer.length>=2&&this.check([255,224],{offset:0,mask:[255,224]})){if(this.check([16],{offset:1,mask:[22]}))return this.check([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}async readTiffTag(e){const t=await this.tokenizer.readToken(e?zh:Fh);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e){const t=await this.tokenizer.readToken(e?zh:Fh);for(let n=0;n<t;++n){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?zh:Fh).get(this.buffer,2),n=(e?jh:Ph).get(this.buffer,4);if(42===t){if(n>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(n>=8&&(this.check([28,0,254,0],{offset:8})||this.check([31,0,11,0],{offset:8})))return{ext:"nef",mime:"image/x-nikon-nef"}}await this.tokenizer.ignore(n);return await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(43===t)return{ext:"tif",mime:"image/tiff"}}}new Set(["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk"]),new Set(["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/x-parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive"]),exports.FileHelper=void 0,function(e){e.truncateFileName=(e,n)=>{let r,i=e,a=0;if(n&&n.current&&(r=t(n.current),a=n.current.getBoundingClientRect().width),r&&r.measureText(e).width>a){const t="...";let n="",o="",s=0,u=e.length-1,l=t,c=l;for(;s<u;){if(n+=e.charAt(s),l=n+t+o,r.measureText(l).width>a){i=c;break}if(c=l,o=e.charAt(u)+o,l=n+t+o,r.measureText(l).width>a){i=c;break}c=l,s++,u--}}return i};const t=e=>{const t=document.createDocumentFragment(),n=document.createElement("canvas");t.appendChild(n);const r=n.getContext("2d"),i=window.getComputedStyle(e);return r.font=i.font?i.font:`${i.fontSize}" "${i.fontFamily}`,r};e.fileToDataUrl=async e=>{if(window&&window.FileReader)return new Promise(((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)}))},e.dataUrlToBlob=async e=>(await fetch(e)).blob(),e.getFilesizeFromBase64=e=>{const t=e.length;return.75*t-(e.substring(t-2,2).match(/=/g)?.length||0)},e.extensionsToSentence=e=>{const t=e.map((e=>`.${e.toUpperCase()}`)),n=t.indexOf(".JPG");return n>-1&&t.splice(n+1,0,".JPEG"),new Intl.ListFormat("en-GB",{style:"long",type:"disjunction"}).format(t)},e.fileExtensionToMimeType=e=>{switch(e.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"heic":return"image/heic";case"heif":return"image/heif";case"webp":return"image/webp"}},e.getType=async e=>{const t=await e.arrayBuffer(),n=await async function(e){return(new tm).fromBuffer(e)}(t);if(!n&&e.type.startsWith("text")){const t=e.name||".txt";return{mime:e.type,ext:t.substring(t.lastIndexOf(".")+1,t.length)}}return n},e.deduplicateFileName=(t,n,r,i=r,a=1)=>{if(t.filter(((e,t)=>t!==n)).includes(r)){const o=i.split("."),s=o.pop();return s?(r=o.join(".").concat(` (${a}).`).concat(s),e.deduplicateFileName(t,n,r,i,++a)):r}return r},e.sanitizeFileName=e=>{const t=e.split(".");let n,r;2===t.length&&""===t[0]?r=e:t.length>1?(n=t.pop(),r=t.join(".")):r=t.join(".");let i=r.replace(/[^\u0020-\u007E]*/g,"");return i||(i="file"),n?`${i}.${n}`:`${i}`},e.blobToFile=(e,t)=>{const{name:n,lastModified:r}=t;return new File([e],n,{type:e.type,lastModified:r})}}(exports.FileHelper||(exports.FileHelper={}));const nm={COMMON:{FIELD_REQUIRED:"This field is required.",REQUIRED_OPTION:"An option is required.",REQUIRED_OPTIONS:"Both options are required."},CONTACT:{INVALID_SINGAPORE_NUMBER:"Invalid Singapore number.",INVALID_INTERNATIONAL_NUMBER:"Invalid international number."},DATE:{MUST_BE_FUTURE:"Date must be in the future.",MUST_BE_PAST:"Date must be in the past.",CANNOT_BE_FUTURE:"Date cannot be in the future.",CANNOT_BE_PAST:"Date cannot be in the past.",MIN_DATE:e=>`Date cannot be earlier than ${e}.`,MAX_DATE:e=>`Date cannot be later than ${e}.`,DISABLED_DATES:"Date is not allowed.",INVALID:"Invalid date.",WITHIN_DAYS:e=>{const{numberOfDays:t,fromDate:n}=e,r=Math.abs(t);return`Date must be within ${r} ${1!==r?"days":"day"} ${t>0?"from":"prior to"} ${n?` ${n}`:" today"}.`},BEYOND_DAYS:e=>{const{numberOfDays:t,fromDate:n}=e,r=Math.abs(t);return`Date must be beyond ${r} ${1!==r?"days":"day"} ${t>0?"from":"prior to"} ${n?` ${n}`:" today"}.`}},DATE_RANGE:{MUST_BE_FUTURE:"Dates must be in the future.",MUST_BE_PAST:"Dates must be in the past.",CANNOT_BE_FUTURE:"Dates cannot be in the future.",CANNOT_BE_PAST:"Dates cannot be in the past.",MIN_DATE:e=>`Dates cannot be earlier than ${e}.`,MAX_DATE:e=>`Dates cannot be later than ${e}.`,DISABLED_DATES:"Date range should not include disabled dates.",INVALID:"Invalid dates",REQUIRED:"Both dates are required",MUST_HAVE_NUMBER_OF_DAYS:e=>`Selection should have ${e} days.`},EMAIL:{INVALID:"Invalid email address."},ESIGNATURE:{UPLOAD:"Signature not uploaded."},GENERIC:{INVALID:"Invalid input",UNSUPPORTED:"This component is not supported by the engine."},UPLOAD:(t="file",n=`${t}s`)=>({REQUIRED:`Upload at least 1 ${t}.`,MAX_FILES:e=>`Upload failed. You can only upload a maximum of ${e} ${1!==e?n:t}.`,MAX_FILES_WITH_REMAINING:e=>`Upload failed. You can only upload ${e} more ${1===e?t:n}. To upload more ${n}, you may wish to delete your previously uploaded ${n}.`,MAX_FILE_SIZE:e=>`Upload failed. ${kh(t)} exceeds the maximum size of ${e} KB.`,GENERIC:"Upload failed. Please try again.",FILE_TYPE:e=>`Upload failed. Only ${exports.FileHelper.extensionsToSentence(e)} files are accepted.`,MODAL:{FILE_TYPE:{TITLE:`Unsupported ${t} format`,DESCRIPTION:(t,n)=>e.jsxs(e.Fragment,{children:[t," could not be uploaded. Try again with a"," ",exports.FileHelper.extensionsToSentence(n)," file."]})},GENERIC_ERROR:{TITLE:`${kh(t)} not uploaded`,DESCRIPTION:t=>e.jsxs(e.Fragment,{children:["There was a problem uploading ",t,". Please try again."]})},MAX_FILE_SIZE:{TITLE:`${kh(t)} exceeds maximum size`,DESCRIPTION:(t,n)=>e.jsxs(e.Fragment,{children:[t," exceeds the maximum size of ",n," KB."]})}}}),SLIDER:{MUST_BE_INCREMENTAL:"Input must be incremental."},UNIT_NUMBER:{INVALID:"Invalid unit number."},LOCATION:{MUST_HAVE_POSTAL_CODE:"Selected location must have postal code."},ARRAY_FIELD:{INVALID:"One or more of the sections is incomplete",REQUIRED:"At least one section must be filled in"}};var rm;!function(e){function t(e,t,n){if(e)try{const r=Kd.ofPattern(t).withResolverStyle(qc.STRICT).withLocale(Zp.ENGLISH);switch(n){case"date":return gf.parse(e,r);case"time":return vf.parse(e,r);case"datetime":return _f.parse(e,r);default:return}}catch(e){return}}function n(e){const{numberOfDays:n,fromDate:r,dateFormat:i="uuuu-MM-dd"}=e,a=r&&t(r,i,"date")||gf.now();return n>=0?{startDate:a,endDate:a.plusDays(n)}:{startDate:a.plusDays(n),endDate:a}}e.formatDateTime=(e,t,n,r)=>{if(e)try{const i=Kd.ofPattern(t).withResolverStyle(qc.STRICT).withLocale(Zp.ENGLISH);switch(n){case"date":return gf.parse(e).format(i);case"time":return vf.parse(e).format(i);case"datetime":return _f.parse(e).format(i);default:return r||nm.GENERIC.INVALID}}catch(e){return r||nm.GENERIC.INVALID}},e.toLocalDateOrTime=t,e.calculateWithinDaysRange=n,e.calculateDisabledWithinDaysRange=function(e){const{numberOfDays:t,inclusive:r}=e,{startDate:i,endDate:a}=n(e);return t>=0?{startDate:r?i:i.plusDays(1),endDate:a}:{startDate:i,endDate:r?a:a.minusDays(1)}},e.calculateDisabledBeyondDaysRange=function(e){const{numberOfDays:n,fromDate:r,dateFormat:i="uuuu-MM-dd"}=e,a=r&&t(r,i,"date")||gf.now(),o={startDate:void 0,endDate:void 0};return n>=0?o.startDate=a.plusDays(n+1):o.endDate=a.plusDays(n-1),o},e.checkWithinDays=function(e,r){if(!e)return!0;const{dateFormat:i="uuuu-MM-dd"}=r,a=t(e,i,"date");if(!a)return!1;const{startDate:o,endDate:s}=n(r),{numberOfDays:u,inclusive:l}=r;if(u>=0){const e=l?o.minusDays(1):o,t=s.plusDays(1);return a.isAfter(e)&&a.isBefore(t)}{const e=o.minusDays(1),t=l?s.plusDays(1):s;return a.isAfter(e)&&a.isBefore(t)}},e.checkBeyondDays=function(e,n){if(!e)return!0;const{dateFormat:r="uuuu-MM-dd"}=n,i=t(e,r,"date");if(!i)return!1;const{numberOfDays:a,fromDate:o}=n,s=o&&t(o,r,"date")||gf.now();return a>=0?i.isAfter(s.plusDays(a)):i.isBefore(s.plusDays(a))}}(rm||(rm={})),exports.GeoLocationHelper=void 0,function(e){const t=async(e,t)=>new Promise(((n,r)=>{"geolocation"in navigator?navigator.geolocation.getCurrentPosition((({coords:e})=>n({lat:e.latitude,lng:e.longitude})),(e=>r(e)),{enableHighAccuracy:!0,timeout:e,maximumAge:t}):r(new Error("geolocation not supported in this browser"))}));e.getCurrentLocation=async(e={})=>{const{maxAttempts:n=3,timeout:r=2e3,maximumAge:i=2e3}=e;let a=0;do{a++;try{return await t(r,i)}catch(e){if(a>=n||!e||e.code!==e.TIMEOUT)throw e}}while(a<n);throw"Failed to get current location"}}(exports.GeoLocationHelper||(exports.GeoLocationHelper={}));const im=()=>Array(5).fill(0).map((()=>Math.random().toString(36).slice(2))).join("");class am{constructor(e){if(function(e){return"object"!=typeof e||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}function om(e,t,n){try{return new DataView(e,t,n)}catch(r){return new am(e,t,n)}}function sm(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return dm(r)}function um(e,t){const n=[];let r=0;for(;t+r<e.byteLength;){const i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return dm(n)}function lm(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),dm(r)}function cm(e,t){const n=e.getUint8(t);return[n,sm(e,t+1,n)]}function dm(e){return e.map((e=>String.fromCharCode(e))).join("")}function fm(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function pm(e,t,n){let r=!1;Object.defineProperty(e,t,{get:()=>(r||(r=!0,Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n.apply(e),writable:!0})),e[t]),configurable:!0,enumerable:!0})}function hm(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),((e,t)=>e+String.fromCharCode(t)),"")):"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function mm(e,t){return new Array(t+1).join(e)}const gm=void 0;function ym(e,t,n,r="string"){if(0===t&&"function"==typeof DecompressionStream){const t=new DecompressionStream("deflate"),i=new Blob([e]).stream().pipeThrough(t);return"dataview"===r?new Response(i).arrayBuffer().then((e=>new DataView(e))):new Response(i).arrayBuffer().then((e=>new TextDecoder(n).decode(e)))}return void 0!==t?Promise.reject(`Unknown compression method ${t}.`):e}var _m=!0,vm=!0;function bm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Em(e){if(e.length>=8){const t=bm(e.slice(0,8));if("ASCII\0\0\0"===t)return bm(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function Sm(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const Am=18761,xm=19789;var wm={BIG_ENDIAN:xm,LITTLE_ENDIAN:Am,getByteOrder:function(e,t){if(e.getUint16(t)===Am)return Am;if(e.getUint16(t)===xm)return xm;throw new Error("Illegal byte order value. Faulty image.")}};var Tm={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===wm.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};var Mm={isJpegFile:function(e){return!!e&&e.byteLength>=Om&&e.getUint16(0)===Cm},findJpegOffsets:function(e){let t,n,r,i,a,o,s,u,l,c=Nm;for(;c+Dm+5<=e.byteLength;){if(ug(e,c))t=e.getUint16(c+Lm),n=c+Lm;else if(lg(e,c))t=e.getUint16(c+Lm),r=c+Lm;else if(fg(e,c))t=e.getUint16(c+Lm),i=c+Im;else if(pg(e,c))t=e.getUint16(c+Lm),a=c+km;else if(hg(e,c))s||(s=[]),t=e.getUint16(c+Lm),s.push(gg(c,t));else if(mg(e,c))s||(s=[]),t=e.getUint16(c+Lm),s.push(yg(c,t));else if(_g(e,c))t=e.getUint16(c+Lm),o=c+$m;else if(cg(e,c)){t=e.getUint16(c+Lm);const n=c+zm,r=t-(zm-Lm),i=e.getUint8(c+Zm),a=e.getUint8(c+Um);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:a})}else if(dg(e,c))t=e.getUint16(c+Lm),l=c+Pm;else{if(!vg(e,c)){if(bg(e,c)){c++;continue}break}t=e.getUint16(c+Lm)}c+=Lm+t}return{hasAppMarkers:c>Nm,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:a,iptcDataOffset:o,xmpChunks:s,iccChunks:u,mpfDataOffset:l}}};const Om=2,Cm=65496,Nm=2,Dm=4,Lm=2,Im=2,km=10,$m=18,Rm=33,Fm=79,zm=18,Pm=8,jm="ICC_PROFILE\0",Zm=Dm+jm.length,Um=Zm+1,Bm="MPF\0",Vm=65472,Hm=65474,Gm=65476,Ym=65499,Wm=65501,qm=65498,Km=65504,Jm=65505,Xm=65506,Qm=65517,eg=65519,tg=65534,ng=65535,rg="JFIF",ig="Exif",ag="http://ns.adobe.com/xap/1.0/\0",og="http://ns.adobe.com/xmp/extension/\0",sg="Photoshop 3.0";function ug(e,t){return e.getUint16(t)===Vm}function lg(e,t){return e.getUint16(t)===Hm}function cg(e,t){const n=jm.length;return e.getUint16(t)===Xm&&sm(e,t+Dm,n)===jm}function dg(e,t){const n=Bm.length;return e.getUint16(t)===Xm&&sm(e,t+Dm,n)===Bm}function fg(e,t){const n=rg.length;return e.getUint16(t)===Km&&sm(e,t+Dm,n)===rg&&0===e.getUint8(t+Dm+n)}function pg(e,t){const n=ig.length;return e.getUint16(t)===Jm&&sm(e,t+Dm,n)===ig&&0===e.getUint8(t+Dm+n)}function hg(e,t){return e.getUint16(t)===Jm&&function(e,t){const n=ag.length;return sm(e,t+Dm,n)===ag}(e,t)}function mg(e,t){return e.getUint16(t)===Jm&&function(e,t){const n=og.length;return sm(e,t+Dm,n)===og}(e,t)}function gg(e,t){return{dataOffset:e+Rm,length:t-(Rm-Lm)}}function yg(e,t){return{dataOffset:e+Fm,length:t-(Fm-Lm)}}function _g(e,t){const n=sg.length;return e.getUint16(t)===Qm&&sm(e,t+Dm,n)===sg&&0===e.getUint8(t+Dm+n)}function vg(e,t){const n=e.getUint16(t);return n>=Km&&n<=eg||n===tg||n===Vm||n===Hm||n===Gm||n===Ym||n===Wm||n===qm}function bg(e,t){return e.getUint16(t)===ng}var Eg={isPngFile:function(e){return!!e&&sm(e,0,Sg.length)===Sg},findPngOffsets:function(e,t){const n={hasAppMarkers:!1};let r=Sg.length;for(;r+Ag+xg<=e.byteLength;){if(Rg(e,r))n.hasAppMarkers=!0,n.pngHeaderOffset=r+Mg;else if(Fg(e,r)){const t=Ug(e,r);void 0!==t&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:t,length:e.getUint32(r+wg)-(t-(r+Mg))}])}else if(zg(e,r,t)){n.hasAppMarkers=!0;const t=sm(e,r+Tg,xg);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+wg),type:t,offset:r+Mg})}else if(Pg(e,r))n.hasAppMarkers=!0,n.tiffHeaderOffset=r+Mg;else if(t&&jg(e,r)){n.hasAppMarkers=!0;const t=e.getUint32(r+wg),i=r+Mg,{profileName:a,compressionMethod:o,compressedProfileOffset:s}=Bg(e,i);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:t-(s-i),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:o})}else Zg(e,r)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+wg));r+=e.getUint32(r+wg)+Ag+xg+4}return n}};const Sg="‰PNG\r\n\n",Ag=4,xg=4,wg=0,Tg=Ag,Mg=Ag+xg,Og="XML:com.adobe.xmp\0",Cg="tEXt",Ng="iTXt",Dg="zTXt",Lg="pHYs",Ig="tIME",kg="eXIf",$g="iCCP";function Rg(e,t){return"IHDR"===sm(e,t+Tg,xg)}function Fg(e,t){return sm(e,t+Tg,xg)===Ng&&sm(e,t+Mg,Og.length)===Og}function zg(e,t,n){const r=sm(e,t+Tg,xg);return r===Cg||r===Ng||r===Dg&&n}function Pg(e,t){return sm(e,t+Tg,xg)===kg}function jg(e,t){return sm(e,t+Tg,xg)===$g}function Zg(e,t){const n=[Lg,Ig],r=sm(e,t+Tg,xg);return n.includes(r)}function Ug(e,t){t+=Mg+Og.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Bg(e,t){const n=um(e,t);t+=n.length+1;return{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function Vg(e,t,n,r){const{offsets:i,sizes:a}=function(e,t){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};e<2?(n.itemCount=2,n.item.itemId=2):2===e&&(n.itemCount=4,n.item.itemId=4);n.item.constructionMethod=1===e||2===e?2:0;const r={offsetSize:t,lengthSize:t,baseOffsetSize:t+1,indexSize:t+1};return r.itemCount=t+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}(t,n+3),o=e.getUint8(i.offsetSize)>>4;a.item.extent.extentOffset=o;const s=15&e.getUint8(i.lengthSize);a.item.extent.extentLength=s;const u=e.getUint8(i.baseOffsetSize)>>4;a.item.baseOffset=u;const l=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t);return}(e,i.indexSize,t);a.item.extent.extentIndex=void 0!==l?l:0;const c=function(e,t,n){if(n<2)return e.getUint16(t);if(2===n)return e.getUint32(t);return}(e,i.itemCount,t);return{type:"iloc",items:Hg(e,t,i,a,o,s,l,c),length:r}}function Hg(e,t,n,r,i,a,o,s){if(void 0===s)return[];const u=[];let l=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=Gg(e,l,t),l+=r.item.itemId,n.constructionMethod=1===t||2===t?15&e.getUint16(l):void 0,l+=r.item.constructionMethod,n.dataReferenceIndex=e.getUint16(l),l+=r.item.dataReferenceIndex,n.baseOffset=Wg(e,l,r.item.baseOffset),l+=r.item.baseOffset,n.extentCount=e.getUint16(l),l+=r.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=Yg(e,t,l,o),l+=r.item.extent.extentIndex,s.extentOffset=Wg(e,l,i),l+=r.item.extent.extentOffset,s.extentLength=Wg(e,l,a),l+=r.item.extent.extentLength,n.extents.push(s)}u.push(n)}return u}function Gg(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function Yg(e,t,n,r){if((1===t||2===t)&&r>0)return Wg(e,n,r)}function Wg(e,t,n){return 4===n?e.getUint32(t):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(e,t){return e.getUint32(t+4)}(e,t)):0}const qg=1165519206,Kg=1835625829,Jg=1970432288;function Xg(e,t){const{length:n,contentOffset:r}=function(e,t){const n=4,r=4,i=8,a=12,o=e.getUint32(t);if(function(e){return 0===e}(o))return{length:e.byteLength-t,contentOffset:t+n+r};if(function(e){return 1===e}(o)&&function(e,t){const n=8;return 0===e.getUint32(t+n)}(e,t))return{length:e.getUint32(t+a),contentOffset:t+n+r+i};return{length:o,contentOffset:t+n+r}}(e,t);if(n<8)return;const i=e.getUint32(t+4);if(1718909296===i)return function(e,t,n){const r=sm(e,t,4);return{type:"ftyp",majorBrand:r,length:n}}(e,r,n);if(1768977008===i)return function(e,t,n,r){return{type:"iprp",subBoxes:ny(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1768973167===i)return function(e,t,n,r){return{type:"ipco",properties:ny(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1668246642===i)return function(e,t,n){return{type:"colr",icc:ty(e,t),length:n}}(e,r,n);const a=e.getUint8(r);return 1835365473===i?function(e,t,n,r){const i=3;return{type:"meta",subBoxes:ny(e,n+i,r-(n+i-t)),length:r}}(e,t,r+1,n):1768714083===i?Vg(e,a,r+1,n):1768517222===i?function(e,t,n,r,i){const{offsets:a}=function(e,t){const n={entryCount:t+3},r={};r.entryCount=0===e?2:4;return n.itemInfos=n.entryCount+r.entryCount,{offsets:n}}(n,r);return{type:"iinf",itemInfos:ny(e,a.itemInfos,i-(a.itemInfos-t)),length:i}}(e,t,a,r+1,n):1768842853===i?function(e,t,n,r,i){r+=3;const a={type:"infe",length:i};0!==n&&1!==n||(a.itemId=e.getUint16(r),r+=2,a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemName=um(e,r),r+=a.itemName.length+1);n>=2&&(2===n?(a.itemId=e.getUint16(r),r+=2):3===n&&(a.itemId=e.getUint32(r),r+=4),a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemType=e.getUint32(r),r+=4,a.itemName=um(e,r),r+=a.itemName.length+1,a.itemType===Kg?(a.contentType=um(e,r),t+i>(r+=a.contentType.length+1)&&(a.contentEncoding=um(e,r),r+=a.contentEncoding.length+1)):a.itemType===Jg&&(a.itemUri=um(e,r),r+=a.itemUri.length+1));return a}(e,t,a,r+1,n):{type:void 0,length:n}}function Qg(e){{const t={},n=function(e){const t=4,n=4;let r=0;for(;r+t+n<=e.byteLength;){const t=Xg(e,r);if(void 0===t)break;if("meta"===t.type)return t;r+=t.length}return}(e);return n?(t.tiffHeaderOffset=function(e,t){try{const n=function(e){return e.subBoxes.find((e=>"iinf"===e.type)).itemInfos.find((e=>e.itemType===qg))}(t).itemId,r=ey(t,n);return function(e,t){return t+4+e.getUint32(t)}(e,r.baseOffset+r.extents[0].extentOffset)}catch(e){return}}(e,n),t.xmpChunks=function(e){try{const t=function(e){return e.subBoxes.find((e=>"iinf"===e.type)).itemInfos.find((e=>e.itemType===Kg&&"application/rdf+xml"===e.contentType))}(e).itemId,n=ey(e,t),r=ey(e,t).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch(e){return}}(n),t.iccChunks=function(e){try{const t=e.subBoxes.find((e=>"iprp"===e.type)).subBoxes.find((e=>"ipco"===e.type)).properties.find((e=>"colr"===e.type)).icc;if(t)return[t]}catch(e){}return}(n),t.hasAppMarkers=void 0!==t.tiffHeaderOffset||void 0!==t.xmpChunks||void 0!==t.iccChunks,t):{hasAppMarkers:!1}}}function ey(e,t){return e.subBoxes.find((e=>"iloc"===e.type)).items.find((e=>e.itemId===t))}function ty(e,t){const n=sm(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function ny(e,t,n){const r=[qg,Kg],i=[];let a=t;for(;a<t+n;){const t=Xg(e,a);if(void 0===t)break;void 0===t.type||void 0!==t.itemType&&-1===r.indexOf(t.itemType)||i.push(t),a+=t.length}return i}var ry={isHeicFile:function(e){if(!e)return!1;const t=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Xg(e,0);return n&&-1!==t.indexOf(n.majorBrand)}catch(e){return!1}},findHeicOffsets:function(e){return Qg(e)}};var iy={isAvifFile:function(e){if(!e)return!1;try{const t=Xg(e,0);return t&&"avif"===t.majorBrand}catch(e){return!1}},findAvifOffsets:function(e){return Qg(e)}};var ay={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&sm(e,0,4)===t&&sm(e,8,4)===n},findOffsets:function(e){const t="Exif\0\0";let n,r,i,a,o=12,s=!1;for(;o+8<e.byteLength;){const u=sm(e,o,4),l=e.getUint32(o+4,!0);"EXIF"===u?(s=!0,n=sm(e,o+8,6)===t?o+8+6:o+8):"XMP "===u?(s=!0,r=[{dataOffset:o+8,length:l}]):"ICCP"===u?(s=!0,i=[{offset:o+8,length:l,chunkNumber:1,chunksTotal:1}]):"VP8X"===u&&(s=!0,a=o+8),o+=8+(l%2==0?l:l+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:r,iccChunks:i,vp8xChunkOffset:a}}};var oy={isGifFile:function(e){return!!e&&uy.includes(sm(e,0,sy))},findOffsets:function(){return{gifHeaderOffset:0}}};const sy=6,uy=["GIF87a","GIF89a"];var ly={isXMLFile:function(e){return!!e&&sm(e,cy,dy.length)===dy},findOffsets:function(e){const t=[];return t.push({dataOffset:cy,length:e.byteLength}),{xmpChunks:t}}};const cy=0,dy="<?xpacket begin";var fy={parseAppMarkers:function(e,t){if(Tm.isTiffFile(e))return py(Tm.findTiffOffsets(),"tiff","TIFF");if(Mm.isJpegFile(e))return py(Mm.findJpegOffsets(e),"jpeg","JPEG");if(Eg.isPngFile(e))return py(Eg.findPngOffsets(e,t),"png","PNG");if(ry.isHeicFile(e))return py(ry.findHeicOffsets(e),"heic","HEIC");if(iy.isAvifFile(e))return py(iy.findAvifOffsets(e),"avif","AVIF");if(ay.isWebpFile(e))return py(ay.findOffsets(e),"webp","WebP");if(oy.isGifFile(e))return py(oy.findOffsets(e),"gif","GIF");if(ly.isXMLFile(e))return py(ly.findOffsets(e),"xml","XML");throw new Error("Invalid image format")}};function py(e,t,n){return fm({},e,{fileType:{value:t,description:n}})}var hy={ApertureValue:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2),ColorSpace:e=>1===e?"sRGB":65535===e?"Uncalibrated":"Unknown",ComponentsConfiguration:e=>e.map((e=>49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0)).join(""),Contrast:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",CustomRendered:e=>0===e?"Normal process":1===e?"Custom process":"Unknown",ExposureMode:e=>0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown",ExposureProgram:e=>0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown",ExposureTime(e){if(e[0]/e[1]>.25){const t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 0!==e[0]?`1/${Math.round(e[1]/e[0])}`:`0/${e[1]}`},FNumber:e=>"f/"+e[0]/e[1],FocalLength:e=>e[0]/e[1]+" mm",FocalPlaneResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",LightSource:e=>1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 – 7100K)":13===e?"Day white fluorescent (N 4600 – 5400K)":14===e?"Cool white fluorescent (W 3900 – 4500K)":15===e?"White fluorescent (WW 3200 – 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown",MeteringMode:e=>1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown",ResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",Saturation:e=>0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown",SceneCaptureType:e=>0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown",Sharpness:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",ShutterSpeedValue(e){const t=Math.pow(2,e[0]/e[1]);return t<=1?`${Math.round(1/t)}`:`1/${Math.round(t)}`},WhiteBalance:e=>0===e?"Auto white balance":1===e?"Manual white balance":"Unknown",XResolution:e=>""+Math.round(e[0]/e[1]),YResolution:e=>""+Math.round(e[0]/e[1])},my={11:"ProcessingSoftware",254:{name:"SubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown")},255:{name:"OldSubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:e=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:e=>({1:"Normal",2:"Reversed"}[e]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:e=>1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:hy.XResolution},283:{name:"YResolution",description:hy.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:e=>""+Math.round(e[0]/e[1])},287:{name:"YPosition",description:e=>""+Math.round(e[0]/e[1])},290:{name:"GrayResponseUnit",description:e=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown")},296:{name:"ResolutionUnit",description:hy.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:e=>e.map((e=>`${e[0]}/${e[1]}`)).join(", ")},319:{name:"PrimaryChromaticities",description:e=>e.map((e=>`${e[0]}/${e[1]}`)).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:e=>({1:"CMYK",2:"Not CMYK"}[e]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:e=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown")},339:{name:"SampleFormat",description:e=>{const t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((e=>t[e]||"Unknown")).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:e=>e.map((e=>""+e[0]/e[1])).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:e=>1===e?"centered":2===e?"co-sited":"undefined "+e},532:{name:"ReferenceBlackWhite",description:e=>e.map((e=>""+e[0]/e[1])).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:e=>e.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:gy},40092:{name:"XPComment",description:gy},40093:{name:"XPAuthor",description:gy},40094:{name:"XPKeywords",description:gy},40095:{name:"XPSubject",description:gy},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:e=>({0:"Unsafe",1:"Safe"}[e]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:hy.LightSource},50779:{name:"CalibrationIlluminant2",description:hy.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:e=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:e=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:e=>({0:"Linear",1:"sRGB"}[e]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:e=>({0:"Linear",1:"sRGB"}[e]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:e=>({0:"Auto",1:"None"}[e]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function gy(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}var yy={33434:{name:"ExposureTime",description:hy.ExposureTime},33437:{name:"FNumber",description:hy.FNumber},34850:{name:"ExposureProgram",description:hy.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:e=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:e=>bm(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:hy.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:hy.ShutterSpeedValue},37378:{name:"ApertureValue",description:hy.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},37382:{name:"SubjectDistance",description:e=>e[0]/e[1]+" m"},37383:{name:"MeteringMode",description:hy.MeteringMode},37384:{name:"LightSource",description:hy.LightSource},37385:{name:"Flash",description:e=>0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:hy.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:e=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:e=>2===e.length?`Location; X: ${e[0]}, Y: ${e[1]}`:3===e.length?`Circle; X: ${e[0]}, Y: ${e[1]}, diameter: ${e[2]}`:4===e.length?`Rectangle; X: ${e[0]}, Y: ${e[1]}, width: ${e[2]}, height: ${e[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:Em},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:e=>e[0]/e[1]+" °C"},37889:{name:"Humidity",description:e=>e[0]/e[1]+" %"},37890:{name:"Pressure",description:e=>e[0]/e[1]+" hPa"},37891:{name:"WaterDepth",description:e=>e[0]/e[1]+" m"},37892:{name:"Acceleration",description:e=>e[0]/e[1]+" mGal"},37893:{name:"CameraElevationAngle",description:e=>e[0]/e[1]+" °"},40960:{name:"FlashpixVersion",description:e=>e.map((e=>String.fromCharCode(e))).join("")},40961:{name:"ColorSpace",description:hy.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:hy.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([e,t])=>`X: ${e}, Y: ${t}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:e=>1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:e=>3===e?"DSC":"Unknown"},41729:{name:"SceneType",description:e=>1===e?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:hy.CustomRendered},41986:{name:"ExposureMode",description:hy.ExposureMode},41987:{name:"WhiteBalance",description:hy.WhiteBalance},41988:{name:"DigitalZoomRatio",description:e=>0===e[0]?"Digital zoom was not used":""+e[0]/e[1]},41989:{name:"FocalLengthIn35mmFilm",description:e=>0===e?"Unknown":e},41990:{name:"SceneCaptureType",description:hy.SceneCaptureType},41991:{name:"GainControl",description:e=>0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"},41992:{name:"Contrast",description:hy.Contrast},41993:{name:"Saturation",description:hy.Saturation},41994:{name:"Sharpness",description:hy.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:e=>1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:e=>{const t=`${parseFloat((e[0][0]/e[0][1]).toFixed(5))}-${parseFloat((e[1][0]/e[1][1]).toFixed(5))} mm`;if(0===e[3][1])return`${t} f/?`;const n=1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]));return`${t} f/${parseFloat(n.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:e=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},_y={0:{name:"GPSVersionID",description:e=>2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:e=>{const t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:Sm},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Sm},5:{name:"GPSAltitudeRef",description:e=>0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:e=>e[0]/e[1]+" m"},7:{name:"GPSTimeStamp",description:e=>e.map((([e,t])=>{const n=e/t;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n})).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:e=>{const t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:e=>{const t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:e=>{const t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:e=>{const t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},23:{name:"GPSDestBearingRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:e=>{const t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:Em},28:{name:"GPSAreaInformation",description:Em},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},vy={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>bm(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},by={45056:{name:"MPFVersion",description:e=>bm(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};const Ey=fm({},my,yy),Sy="0th",Ay="1st",xy="exif",wy="gps",Ty="interoperability",My="mpf",Oy="canon";var Cy={[Sy]:Ey,[Ay]:my,[xy]:Ey,[wy]:_y,[Ty]:vy,[My]:by,[Oy]:{4:{name:"ShotInfo",description:e=>e}}};const Ny={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Dy={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13};var Ly={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:Iy,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===wm.LITTLE_ENDIAN)},getLongAt:ky,getRationalAt:function(e,t,n){return[ky(e,t,n),ky(e,t+4,n)]},getUndefinedAt:function(e,t){return Iy(e,t)},getSlongAt:$y,getSrationalAt:function(e,t,n){return[$y(e,t,n),$y(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return ky(e,t,n)},typeSizes:Ny,tagTypes:Dy,getTypeSize:function(e){if(void 0===Dy[e])throw new Error("No such type found.");return Ny[Dy[e]]}};function Iy(e,t){return e.getUint8(t)}function ky(e,t,n){return e.getUint32(t,n===wm.LITTLE_ENDIAN)}function $y(e,t,n){return e.getInt32(t,n===wm.LITTLE_ENDIAN)}const Ry={1:Ly.getByteAt,2:Ly.getAsciiAt,3:Ly.getShortAt,4:Ly.getLongAt,5:Ly.getRationalAt,7:Ly.getUndefinedAt,9:Ly.getSlongAt,10:Ly.getSrationalAt,13:Ly.getIfdPointerAt};function Fy(e,t,n){return t+Ly.getLongAt(e,t+4,n)}function zy(e,t,n,r,i,a){const o=Ly.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+Ly.getTypeSize("SHORT")<=e.byteLength)return Ly.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(let o=0;o<u&&!(r+12>e.byteLength);o++){const o=Py(e,t,n,r,i,a);void 0!==o&&(s[o.name]={id:o.id,value:o.value,description:o.description},"MakerNote"===o.name&&(s[o.name].__offset=o.__offset)),r+=12}if(r<e.byteLength-Ly.getTypeSize("LONG")){const o=Ly.getLongAt(e,r,i);0!==o&&t===Sy&&(s.Thumbnail=zy(e,"1st",n,n+o,i,a))}return s}function Py(e,t,n,r,i,a){const o=Ly.getTypeSize("SHORT"),s=o+Ly.getTypeSize("SHORT"),u=s+Ly.getTypeSize("LONG"),l=Ly.getShortAt(e,r,i),c=Ly.getShortAt(e,r+o,i),d=Ly.getLongAt(e,r+s,i);let f,p;if(void 0===Ly.typeSizes[c]||!a&&void 0===Cy[t][l])return;if(function(e,t){return Ly.typeSizes[e]*t<=Ly.getTypeSize("LONG")}(c,d))p=r+u,f=jy(e,p,c,d,i);else if(p=Ly.getLongAt(e,r+u,i),function(e,t,n,r,i){return t+n+Ly.typeSizes[r]*i<=e.byteLength}(e,n,p,c,d)){f=jy(e,n+p,c,d,i,33723===l)}else f="<faulty value>";c===Ly.tagTypes.ASCII&&(f=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(f),f=function(e){try{return e.map((e=>decodeURIComponent(escape(e))))}catch(t){return e}}(f));let h=`undefined-${l}`,m=f;if(void 0!==Cy[t][l])if(void 0!==Cy[t][l].name&&void 0!==Cy[t][l].description){h=Cy[t][l].name;try{m=Cy[t][l].description(f)}catch(e){m=Zy(f)}}else c===Ly.tagTypes.RATIONAL||c===Ly.tagTypes.SRATIONAL?(h=Cy[t][l],m=""+f[0]/f[1]):(h=Cy[t][l],m=Zy(f));return{id:l,name:h,value:f,description:m,__offset:p}}function jy(e,t,n,r,i,a=!1){let o=[];a&&(r*=Ly.typeSizes[n],n=Ly.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(Ry[n](e,t,i)),t+=Ly.typeSizes[n];return n===Ly.tagTypes.ASCII?o=Ly.getAsciiValue(o):1===o.length&&(o=o[0]),o}function Zy(e){return e instanceof Array?e.join(", "):e}const Uy="Exif IFD Pointer",By="GPS Info IFD Pointer",Vy="Interoperability IFD Pointer";var Hy={read:function(e,t,n){const r=wm.getByteOrder(e,t);let i=function(e,t,n,r){return zy(e,Sy,t,Fy(e,t,n),n,r)}(e,t,r,n);return i=Gy(i,e,t,r,n),i=Yy(i,e,t,r,n),i=Wy(i,e,t,r,n),{tags:i,byteOrder:r}}};function Gy(e,t,n,r,i){return void 0!==e[Uy]?fm(e,zy(t,xy,n,n+e[Uy].value,r,i)):e}function Yy(e,t,n,r,i){return void 0!==e[By]?fm(e,zy(t,"gps",n,n+e[By].value,r,i)):e}function Wy(e,t,n,r,i){return void 0!==e[Vy]?fm(e,zy(t,Ty,n,n+e[Vy].value,r,i)):e}var qy={read:function(e,t,n){const r=wm.getByteOrder(e,t),i=zy(e,"mpf",t,Fy(e,t,r),r,n);return function(e,t,n,r){if(!n.MPEntry)return n;const i=[];for(let a=0;a<Math.ceil(n.MPEntry.value.length/Ky);a++){i[a]={};const o=Jy(n.MPEntry.value,a*Ky,Ly.getTypeSize("LONG"),r);i[a].ImageFlags=Xy(o),i[a].ImageFormat=Qy(o),i[a].ImageType=e_(o);const s=Jy(n.MPEntry.value,a*Ky+4,Ly.getTypeSize("LONG"),r);i[a].ImageSize={value:s,description:""+s};const u=t_(a,n.MPEntry,r,t);i[a].ImageOffset={value:u,description:""+u};const l=Jy(n.MPEntry.value,a*Ky+12,Ly.getTypeSize("SHORT"),r);i[a].DependentImage1EntryNumber={value:l,description:""+l};const c=Jy(n.MPEntry.value,a*Ky+14,Ly.getTypeSize("SHORT"),r);i[a].DependentImage2EntryNumber={value:c,description:""+c},i[a].image=e.buffer.slice(u,u+s),pm(i[a],"base64",(function(){return hm(this.image)}))}return n.Images=i,n}(e,t,i,r)}};const Ky=16;function Jy(e,t,n,r){if(r===wm.LITTLE_ENDIAN){let r=0;for(let i=0;i<n;i++)r+=e[t+i]<<8*i;return r}let i=0;for(let r=0;r<n;r++)i+=e[t+r]<<8*(n-1-r);return i}function Xy(e){const t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function Qy(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function e_(e){const t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function t_(e,t,n,r){return function(e){return 0===e}(e)?0:Jy(t.value,e*Ky+8,Ly.getTypeSize("LONG"),n)+r}var n_={read:function(e,t){const n=function(e,t){return Ly.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=Ly.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":r_(e,t,n),"Image Height":i_(e,t,n),"Image Width":a_(e,t,n),"Color Components":r,Subsampling:r&&o_(e,t,r.value,n)}}};function r_(e,t,n){if(3>n)return;const r=Ly.getByteAt(e,t+2);return{value:r,description:""+r}}function i_(e,t,n){if(5>n)return;const r=Ly.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function a_(e,t,n){if(7>n)return;const r=Ly.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function o_(e,t,n,r){if(8+3*n>r)return;const i=[];for(let r=0;r<n;r++){const n=t+8+3*r;i.push([Ly.getByteAt(e,n),Ly.getByteAt(e,n+1),Ly.getByteAt(e,n+2)])}return{value:i,description:i.length>1?s_(i)+u_(i):""}}function s_(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function u_(e){const t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var l_={read:function(e,t){const n=function(e,t){return Ly.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=Ly.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),i=function(e,t,n){const r=15;if(r+1>n)return;const i=Ly.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),a={"JFIF Version":c_(e,t,n),"Resolution Unit":d_(e,t,n),XResolution:p_(e,t,n),YResolution:h_(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){const o=function(e,t,n,r){const i=16;if(0===n||i+n>r)return;const a=e.buffer.slice(t+i,t+i+n);return{value:a,description:"<24-bit RGB pixel data>"}}(e,t,3*r.value*i.value,n);o&&(a["JFIF Thumbnail"]=o)}for(const e in a)void 0===a[e]&&delete a[e];return a}};function c_(e,t,n){if(9>n)return;const r=Ly.getByteAt(e,t+7),i=Ly.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function d_(e,t,n){if(10>n)return;const r=Ly.getByteAt(e,t+9);return{value:r,description:f_(r)}}function f_(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function p_(e,t,n){if(12>n)return;const r=Ly.getShortAt(e,t+10);return{value:r,description:""+r}}function h_(e,t,n){if(14>n)return;const r=Ly.getShortAt(e,t+12);return{value:r,description:""+r}}var m_={iptc:{256:{name:"Model Version",description:e=>((e[0]<<8)+e[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:e=>((e[0]<<8)+e[1]).toString()},278:{name:"File Format Version",description:e=>((e[0]<<8)+e[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:g_},336:{name:"Time Sent",description:y_},346:{name:"Coded Character Set",description:__,encoding_name:__},356:"UNO",376:{name:"ARM Identifier",description:e=>((e[0]<<8)+e[1]).toString()},378:{name:"ARM Version",description:e=>((e[0]<<8)+e[1]).toString()},512:{name:"Record Version",description:e=>((e[0]<<8)+e[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:e=>"01"===bm(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=bm(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:e=>{const t=bm(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:g_},572:{name:"Time Created",description:y_},574:{name:"Digital Creation Date",description:g_},575:{name:"Digital Creation Time",description:y_},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=bm(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:e=>e},642:"Image Type",643:{name:"Image Orientation",description:e=>{const t=bm(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=bm(e),n=t.charAt(0),r=t.charAt(1);let i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:e=>parseInt(bm(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(bm(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=bm(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:e=>2===e.length?"ObjectData Preview File Format":"Record 2 destination",description:e=>{if(2===e.length){const t=(e[0]<<8)+e[1];return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":`Unknown format ${t}`}return bm(e)}},713:{name:"ObjectData Preview File Format Version",description:(e,t)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=bm(e);if(t["ObjectData Preview File Format"]){const e=bm(t["ObjectData Preview File Format"].value);if(n[e]&&n[e][r])return n[e][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:e=>e[0].toString()},1812:{name:"Max Subfile Size",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function g_(e){const t=bm(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function y_(e){const t=bm(e);let n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function __(e){const t=bm(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}var v_={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var b_={decode:function(e,t){const n=v_.get();if(void 0!==n&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer:Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((e=>String.fromCharCode(e))).join(""))},TAG_HEADER_SIZE:5};var E_={read:function(e,t,n){try{if(Array.isArray(e))return w_(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);const{naaBlock:r,dataOffset:i}=function(e,t){for(;t+12<=e.byteLength;){const n=S_(e,t);if(A_(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+x_(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return w_(e,r,i,n)}catch(e){return{}}}};function S_(e,t){if(943868237!==e.getUint32(t,!1))throw new Error("Not an IPTC resource block.");const n=e.getUint8(t+4+2),r=(n%2==0?n+1:n)+1;return{headerSize:6+r+4,type:e.getUint16(t+4),size:e.getUint32(t+4+2+r)}}function A_(e){return 1028===e.type}function x_(e){return e.size%2!=0?1:0}function w_(e,t,n,r){const i={};let a;const o=n+t.size;for(;n<o&&n<e.byteLength;){const{tag:t,tagSize:o}=T_(e,n,i,a,r);if(null===t)break;t&&("encoding"in t&&(a=t.encoding),void 0===i[t.name]||void 0===t.repeatable?i[t.name]={id:t.id,value:t.value,description:t.description}:(i[t.name]instanceof Array||(i[t.name]=[{id:i[t.name].id,value:i[t.name].value,description:i[t.name].description}]),i[t.name].push({id:t.id,value:t.value,description:t.description}))),n+=5+o}return i}function T_(e,t,n,r,i){if(function(e,t){const n=28;return e.getUint8(t)!==n}(e,t))return{tag:null,tagSize:0};const a=e.getUint16(t+1),o=e.getUint16(t+3);if(!i&&!m_.iptc[a])return{tag:void 0,tagSize:o};const s=function(e,t,n){const r=[];for(let i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,o),u={id:a,name:M_(m_.iptc[a],a,s),value:s,description:O_(m_.iptc[a],s,n,r)};return function(e){return m_.iptc[e]&&m_.iptc[e].repeatable}(a)&&(u.repeatable=!0),function(e){return m_.iptc[e]&&void 0!==m_.iptc[e].encoding_name}(a)&&(u.encoding=m_.iptc[a].encoding_name(s)),{tag:u,tagSize:o}}function M_(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:`undefined-${t}`}function O_(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?b_.decode(r,t):t}var C_={"tiff:Orientation":e=>"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e,"tiff:ResolutionUnit":e=>hy.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>N_(hy.XResolution,e),"tiff:YResolution":e=>N_(hy.YResolution,e),"exif:ApertureValue":e=>N_(hy.ApertureValue,e),"exif:GPSLatitude":L_,"exif:GPSLongitude":L_,"exif:FNumber":e=>N_(hy.FNumber,e),"exif:FocalLength":e=>N_(hy.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>hy.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>hy.ColorSpace(function(e){if("0x"===e.substring(0,2))return parseInt(e.substring(2),16);return parseInt(e,10)}(e)),"exif:ComponentsConfiguration"(e,t){if(/^\d, \d, \d, \d$/.test(t)){const e=t.split(", ").map((e=>e.charCodeAt(0)));return hy.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>hy.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>hy.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>hy.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>hy.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>D_(e)?hy.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>hy.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>hy.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>hy.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>hy.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>N_(hy.ShutterSpeedValue,e),"exif:WhiteBalance":e=>hy.WhiteBalance(parseInt(e,10))};function N_(e,t){return D_(t)?e(t.split("/")):t}function D_(e){return/^-?\d+\/-?\d+$/.test(e)}function L_(e){const[t,n]=e.split(",");if(void 0!==t&&void 0!==n){const e=parseFloat(t),r=parseFloat(n),i=n.charAt(n.length-1);if(!Number.isNaN(e)&&!Number.isNaN(r))return""+(e+r/60)+i}return e}var I_={get:function(){if("undefined"!=typeof DOMParser)return new DOMParser;try{const{DOMParser:e,onErrorStopParsing:t}=__non_webpack_require__("@xmldom/xmldom");return new e({onError:t})}catch(e){return}}};var k_={read:function(e,t){const n={};if("string"==typeof e)return R_(n,e),n;const[r,i]=function(e,t){if(0===t.length)return[];const n=[$_(e,t.slice(0,1))];t.length>1&&n.push($_(e,t.slice(1)));return n}(e,t),a=R_(n,r);if(i){const r=R_(n,i);a||r||(delete n._raw,R_(n,$_(e,t)))}return n}};function $_(e,t){const n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);let i=0;for(let n=0;n<t.length;n++){const a=t[n],o=e.buffer.slice(a.dataOffset,a.dataOffset+a.length);r.set(new Uint8Array(o),i),i+=a.length}return new DataView(r.buffer)}function R_(e,t){try{const{doc:n,raw:r}=function(e){const t=I_.get();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const n="string"==typeof e?e:sm(e,0,e.byteLength),r=t.parseFromString((i=n,i.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")),"application/xml");var i;if("parsererror"===r.documentElement.nodeName)throw new Error(r.documentElement.textContent);return{doc:r,raw:n}}(t);e._raw=(e._raw||"")+r;return fm(e,j_(z_(F_(n),!0))),!0}catch(e){return!1}}function F_(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return F_(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function z_(e,t=!1){const n=function(e){const t=[];for(let n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(r=n).length&&"#text"===r[0].nodeName?t?{}:function(e){return e.nodeValue}(n[0]):function(e){const t={};return e.forEach((e=>{if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){const n=function(e){return{attributes:P_(e),value:z_(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}(n);var r}function P_(e){const t={};for(let n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}function j_(e){const t={};if("string"==typeof e)return e;for(const n in e){let r=e[n];Array.isArray(r)||(r=[r]),r.forEach((e=>{fm(t,Z_(e.attributes)),"object"==typeof e.value&&fm(t,Y_(e.value))}))}return t}function Z_(e){const t={};for(const n in e)try{U_(n)&&(t[V_(n)]={value:e[n],attributes:{},description:H_(e[n],n)})}catch(e){}return t}function U_(e){return"rdf:parseType"!==e&&!B_(e)}function B_(e){return"xmlns"===e.split(":")[0]}function V_(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function H_(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?H_(e.value):H_(e))).join(", ")}(e);return t&&"function"==typeof C_[t]?C_[t](e,n):n}if("object"==typeof e)return function(e){const t=[];for(const n in e)t.push(`${G_(n)}: ${H_(e[n].value)}`);return t.join("; ")}(e);try{return t&&"function"==typeof C_[t]?C_[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function G_(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function Y_(e){const t={};for(const n in e)try{B_(n)||(t[V_(n)]=W_(e[n],n))}catch(e){}return t}function W_(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return rv(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:q_(e)?K_(e,t):X_(e)?Q_(e,t):ev(e)?tv(e,t):function(e){return void 0!==nv(e.value)}(e)?function(e,t){let n=nv(e.value).value["rdf:li"];const r=J_(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(q_(e))return K_(e);if(X_(e))return Q_(e).value;if(ev(e))return tv(e).value;return rv(e)}(e))})),{value:i,attributes:r,description:H_(i,t)}}(e,t):rv(e,t)}function q_(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function K_(e,t){const n=J_(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),fm(n,J_(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||B_(n)||(t[V_(n)]=e.value[n].value);return t}(e));const r=function(e){return iv(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:H_(r,t)}}function J_(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||B_(n)||(t[V_(n)]=e.attributes[n]);return t}function X_(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Q_(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(fm(n.value,Z_(e.value["rdf:Description"].attributes)),fm(n.attributes,J_(e)),e=e.value["rdf:Description"]),fm(n.value,Y_(e.value)),n.description=H_(n.value,t),n}function ev(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function tv(e,t){const n=Z_(e.attributes);return{value:n,attributes:{},description:H_(n,t)}}function nv(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function rv(e,t){const n=iv(e)||j_(e.value);return{value:n,attributes:J_(e),description:H_(n,t)}}function iv(e){return e.attributes&&e.attributes["rdf:resource"]}const av=0,ov=1,sv=2,uv=3,lv=4,cv=5,dv=6,fv=7,pv=8;var hv={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=Ly.getShortAt(e,r);mv[i]&&(t[i]||(t[i]=mv[i].description),n.push({type:i,path:mv[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description(e){const[,t]=cm(e,0);return t}}};const mv={[av]:{description:"Closed subpath length",path:(e,t)=>[Ly.getShortAt(e,t)]},[ov]:{description:"Closed subpath Bezier knot, linked",path:gv},[sv]:{description:"Closed subpath Bezier knot, unlinked",path:gv},[uv]:{description:"Open subpath length",path:(e,t)=>[Ly.getShortAt(e,t)]},[lv]:{description:"Open subpath Bezier knot, linked",path:gv},[cv]:{description:"Open subpath Bezier knot, unlinked",path:gv},[dv]:{description:"Path fill rule",path:()=>[]},[pv]:{description:"Initial fill rule",path:(e,t)=>[Ly.getShortAt(e,t)]},[fv]:{description:"Clipboard",path:function(e,t){return[[_v(e,t,8),_v(e,t+4,8),_v(e,t+8,8),_v(e,t+12,8)],_v(e,t+16,8)]}}};function gv(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(yv(e,t+r));return n}function yv(e,t){const n=_v(e,t,8);return[_v(e,t+4,8),n]}function _v(e,t,n){const r=Ly.getLongAt(e,t),i=r>>>31==0?1:-1,a=(2130706432&r)>>>32-n,o=r&parseInt(mm("1",32-n),2);return i*function(e,t){return parseInt(e.replace(".",""),t)/Math.pow(t,(e.split(".")[1]||"").length)}(a.toString(2)+"."+function(e,t,n){return mm(n,t-e.length)+e}(o.toString(2),32-n,"0"),2)}var vv={read:function(e,t){const n=om(new Uint8Array(e).buffer),r={};let i=0;for(;i<e.length;){const e=sm(n,i,Av);i+=Av;const a=Ly.getShortAt(n,i);i+=Ev;const{tagName:o,tagNameSize:s}=xv(n,i);i+=s;const u=Ly.getLongAt(n,i);if(i+=Sv,e===bv){const e=om(n.buffer,i,u),s={id:a,value:sm(e,0,u)};if(hv[a]){try{s.description=hv[a].description(e)}catch(e){s.description="<no description formatter>"}r[o||hv[a].name]=s}else t&&(r[`undefined-${a}`]=s)}i+=u+u%2}return r}};const bv="8BIM",Ev=2,Sv=4,Av=bv.length;function xv(e,t){const[n,r]=cm(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const wv={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},Tv={4:{name:"Preferred CMM type",value:(e,t)=>sm(e,t,4),description:e=>null!==e?Mv(e):""},8:{name:"Profile Version",value:(e,t)=>e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)},12:{name:"Profile/Device class",value:(e,t)=>sm(e,t,4),description:e=>{switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:(e,t)=>sm(e,t,4)},20:{name:"Connection Space",value:(e,t)=>sm(e,t,4)},24:{name:"ICC Profile Date",value:(e,t)=>function(e,t){const n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),a=e.getUint16(t+6),o=e.getUint16(t+8),s=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,a,o,s))}(e,t).toISOString()},36:{name:"ICC Signature",value:(e,t)=>{return n=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(n));var n}},40:{name:"Primary Platform",value:(e,t)=>sm(e,t,4),description:e=>Mv(e)},48:{name:"Device Manufacturer",value:(e,t)=>sm(e,t,4),description:e=>Mv(e)},52:{name:"Device Model Number",value:(e,t)=>sm(e,t,4)},64:{name:"Rendering Intent",value:(e,t)=>e.getUint32(t),description:e=>{switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:(e,t)=>sm(e,t,4)}};function Mv(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var Ov={read:function(e,t,n){if(n&&t[0].compressionMethod!==gm)return function(e,t){if(n=t[0].compressionMethod,0!==n)return{};var n;const r=new DataView(e.buffer.slice(t[0].offset,t[0].offset+t[0].length));return ym(r,t[0].compressionMethod,"utf-8","dataview").then(zv).catch((()=>({})))}(e,t);return function(e,t){try{const n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);let i=0;const a=function(e){if(Array.isArray(e))return new DataView(Uint8Array.from(e).buffer).buffer;return e.buffer}(e);for(let e=1;e<=t.length;e++){const n=t.find((t=>t.chunkNumber===e));if(!n)throw new Error(`ICC chunk ${e} not found`);const o=a.slice(n.offset,n.offset+n.length),s=new Uint8Array(o);r.set(s,i),i+=s.length}return zv(new DataView(r.buffer))}catch(e){return{}}}(e,t)}};const Cv=84,Nv=128,Dv="acsp",Lv="desc",Iv="mluc",kv="text",$v="sig ",Rv=12;function Fv(e,t){return e.length<t+Rv}function zv(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<Cv)throw new Error("ICC profile too short");const r={},i=Object.keys(Tv);for(let t=0;t<i.length;t++){const n=i[t],a=Tv[n],o=a.value(e,parseInt(n,10));let s=o;a.description&&(s=a.description(o)),r[a.name]={value:o,description:s}}if(Pv(t.slice(36,40))!==Dv)throw new Error("ICC profile: missing signature");if(function(e){return e.length<Nv+4}(t))return r;const a=e.getUint32(128);let o=132;for(let n=0;n<a;n++){if(Fv(t,o))return r;const n=sm(e,o,4),i=e.getUint32(o+4),a=e.getUint32(o+8);if(i>t.length)return r;const s=sm(e,i,4);if(s===Lv){const o=e.getUint32(i+8);if(o>a)return r;jv(r,n,Pv(t.slice(i+12,i+o+11)))}else if(s===Iv){const t=e.getUint32(i+8),a=e.getUint32(i+12);let o=i+16;const s=[];for(let n=0;n<t;n++){const t=sm(e,o+0,2),n=sm(e,o+2,2),r=e.getUint32(o+4),u=e.getUint32(o+8),l=lm(e,i+u,r);s.push({languageCode:t,countryCode:n,text:l}),o+=a}if(1===t)jv(r,n,s[0].text);else{const e={};for(let t=0;t<s.length;t++)e[`${s[t].languageCode}-${s[t].countryCode}`]=s[t].text;jv(r,n,e)}}else if(s===kv){jv(r,n,Pv(t.slice(i+8,i+a-7)))}else if(s===$v){jv(r,n,Pv(t.slice(i+8,i+12)))}o+=12}return r}function Pv(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function jv(e,t,n){wv[t]?e[wv[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const Zv=27;var Uv={read:function(e,t,n,r,i){let a=zy(e,Oy,t,t+n,r,i);a.ShotInfo&&(a=fm({},a,function(e){const t={};void 0!==e[27]&&(t.AutoRotate={value:e[27],description:Bv(e[27])});return t}(a.ShotInfo.value)),delete a.ShotInfo);return a},SHOT_INFO_AUTO_ROTATE:Zv};function Bv(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var Vv={read:function(e,t){return{"Image Width":Hv(e,t),"Image Height":Gv(e,t),"Bit Depth":Yv(e,t),"Color Type":Wv(e,t),Compression:qv(e,t),Filter:Kv(e,t),Interlace:Jv(e,t)}}};function Hv(e,t){if(t+0+4>e.byteLength)return;const n=Ly.getLongAt(e,t);return{value:n,description:`${n}px`}}function Gv(e,t){if(t+4+4>e.byteLength)return;const n=Ly.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function Yv(e,t){if(t+8+1>e.byteLength)return;const n=Ly.getByteAt(e,t+8);return{value:n,description:`${n}`}}function Wv(e,t){if(t+9+1>e.byteLength)return;const n=Ly.getByteAt(e,t+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function qv(e,t){if(t+10+1>e.byteLength)return;const n=Ly.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function Kv(e,t){if(t+11+1>e.byteLength)return;const n=Ly.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function Jv(e,t){if(t+12+1>e.byteLength)return;const n=Ly.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}var Xv={read:function(e,t,n,r){const i={},a=[];for(let o=0;o<t.length;o++){const{offset:s,length:u,type:l}=t[o],c=sb(e,s,u,l,n);if(c instanceof Promise)a.push(c.then((({name:e,value:t,description:n})=>{try{if(_m&&pb(e,t))return{__exif:Hy.read(mb(t),ob,r).tags};if(vm&&hb(e,t))return{__iptc:E_.read(mb(t),0,r)};if(e&&!pb(e,t)&&!hb(e,t))return{[e]:{value:t,description:n}}}catch(e){}return{}})));else{const{name:e,value:t,description:n}=c;e&&(i[e]={value:t,description:n})}}return{readTags:i,readTagsPromise:a.length>0?Promise.all(a):void 0}}};const Qv="STATE_KEYWORD",eb="STATE_COMPRESSION",tb="STATE_LANG",nb="STATE_TRANSLATED_KEYWORD",rb="STATE_TEXT",ib=1,ab=1,ob=6;function sb(e,t,n,r,i){const a=[],o=[];let s,u=Qv,l=gm;for(let i=0;i<n&&t+i<e.byteLength;i++){if(u===eb){l=ub({type:r,dataView:e,offset:t+i}),r===Ng&&(i+=ib),u=lb(r,u);continue}if(u===rb){s=new DataView(e.buffer.slice(t+i,t+n));break}const c=e.getUint8(t+i);0===c?u=lb(r,u):u===Qv?a.push(c):u===tb&&o.push(c)}if(l!==gm&&!i)return{};const c=ym(s,l,function(e){if(e===Cg||e===Dg)return"latin1";return"utf-8"}(r));return c instanceof Promise?c.then((e=>cb(e,r,o,a))).catch((()=>cb("<text using unknown compression>".split(""),r,o,a))):cb(c,r,o,a)}function ub({type:e,dataView:t,offset:n}){if(e===Ng){if(t.getUint8(n)===ab)return t.getUint8(n+1)}else if(e===Dg)return t.getUint8(n);return gm}function lb(e,t){return t===Qv&&[Ng,Dg].includes(e)?eb:t===eb?e===Ng?tb:rb:t===tb?nb:rb}function cb(e,t,n,r){const i=function(e){if(e instanceof DataView)return sm(e,0,e.byteLength);return e}(e);return{name:db(t,n,r),value:i,description:t===Ng?fb(e):i}}function db(e,t,n){const r=dm(n);if(e===Cg||0===t.length)return r;return`${r} (${dm(t)})`}function fb(e){return b_.decode("UTF-8",e)}function pb(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function hb(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function mb(e){return function(e){const t=new DataView(new ArrayBuffer(e.length/2));for(let n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}var gb={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=Ly.getLongAt(e,t[r]+wg),a=sm(e,t[r]+Tg,xg);a===Lg?(n["Pixels Per Unit X"]=yb(e,t[r],i),n["Pixels Per Unit Y"]=_b(e,t[r],i),n["Pixel Units"]=vb(e,t[r],i)):a===Ig&&(n["Modify Date"]=bb(e,t[r],i))}return n}};function yb(e,t,n){if(!Eb(e,t,n,0,4))return;const r=Ly.getLongAt(e,t+Mg+0);return{value:r,description:""+r}}function _b(e,t,n){if(!Eb(e,t,n,4,4))return;const r=Ly.getLongAt(e,t+Mg+4);return{value:r,description:""+r}}function vb(e,t,n){if(!Eb(e,t,n,8,1))return;const r=Ly.getByteAt(e,t+Mg+8);return{value:r,description:1===r?"meters":"Unknown"}}function bb(e,t,n){if(!Eb(e,t,n,0,7))return;const r=Ly.getShortAt(e,t+Mg),i=Ly.getByteAt(e,t+Mg+2),a=Ly.getByteAt(e,t+Mg+3),o=Ly.getByteAt(e,t+Mg+4),s=Ly.getByteAt(e,t+Mg+5),u=Ly.getByteAt(e,t+Mg+6);return{value:[r,i,a,o,s,u],description:`${Sb(r,4)}-${Sb(i,2)}-${Sb(a,2)} ${Sb(o,2)}:${Sb(s,2)}:${Sb(u,2)}`}}function Eb(e,t,n,r,i){return r+i<=n&&t+Mg+r+i<=e.byteLength}function Sb(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}var Ab={read:function(e,t){const n={},r=Ly.getByteAt(e,t);return n.Alpha=Tb(r),n.Animation=Mb(r),n.ImageWidth=Ob(e,t+xb),n.ImageHeight=Ob(e,t+wb),n}};const xb=4,wb=7;function Tb(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function Mb(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function Ob(e,t){const n=Ly.getByteAt(e,t)+256*Ly.getByteAt(e,t+1)+65536*Ly.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Cb={read:function(e){return{"GIF Version":Nb(e),"Image Width":Db(e),"Image Height":Lb(e),"Global Color Map":Ib(e),"Bits Per Pixel":$b(e),"Color Resolution Depth":kb(e)}}};function Nb(e){if(6>e.byteLength)return;const t=sm(e,3,3);return{value:t,description:t}}function Db(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function Lb(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function Ib(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function kb(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function $b(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const Rb=[6,7,99];var Fb={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||Rb.includes(r.Compression.value))&&r.JPEGInterchangeFormat&&r.JPEGInterchangeFormat.value&&r.JPEGInterchangeFormatLength&&r.JPEGInterchangeFormatLength.value){t.type="image/jpeg";const r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),pm(t,"base64",(function(){return hm(this.image)}))}var r;return t}};function zb(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}zb.prototype=new Error;var Pb,jb,Zb={MetadataMissingError:zb},Ub={load:function(e,t={}){if(function(e){return"string"==typeof e}(e))return t.async=!0,function(e,t){if(/^\w+:\/\//.test(e))return"undefined"!=typeof fetch?function(e,{length:t}={}){const n={method:"GET"};Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-"+(t-1)});return fetch(e,n).then((e=>e.arrayBuffer()))}(e,t):function(e,{length:t}={}){return new Promise(((n,r)=>{const i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-"+(t-1)});const a=function(e){if(/^https:\/\//.test(e))return __non_webpack_require__("https").get;return __non_webpack_require__("http").get}(e);a(e,i,(e=>{if(e.statusCode>=200&&e.statusCode<=299){const t=[];e.on("data",(e=>t.push(Buffer.from(e)))),e.on("error",(e=>r(e))),e.on("end",(()=>n(Buffer.concat(t))))}else r(`Could not fetch file: ${e.statusCode} ${e.statusMessage}`),e.resume()})).on("error",(e=>r(e)))}))}(e,t);if(function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e))return Promise.resolve(function(e){const t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer;if("undefined"==typeof Buffer)return;return void 0!==Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}const n=decodeURIComponent(t);return"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(e=>e.charCodeAt(0))).buffer}(e));return function(e,{length:t}={}){return new Promise(((n,r)=>{const i=function(){try{return __non_webpack_require__("fs")}catch(e){return}}();i.open(e,((a,o)=>{a?r(a):i.stat(e,((a,s)=>{if(a)r(a);else{const a=Math.min(s.size,void 0!==t?t:s.size),u=Buffer.alloc(a),l={buffer:u,length:a};i.read(o,l,(t=>{t?r(t):i.close(o,(t=>{t&&console.warn(`Could not close file ${e}:`,t),n(u)}))}))}}))}))}))}(e,t)}(e,t).then((e=>Bb(e,t)));if(function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e))return t.async=!0,(n=e,new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>e(t.target.result),r.onerror=()=>t(r.error),r.readAsArrayBuffer(n)}))).then((e=>Bb(e,t)));var n;return Bb(e,t)},loadView:Vb,errors:Zb};function Bb(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),Vb(function(e){try{return new DataView(e)}catch(t){return new am(e)}}(e),t)}function Vb(e,{expanded:t=!1,async:n=!1,includeUnknown:r=!1}={expanded:!1,async:!1,includeUnknown:!1}){let i=!1,a={};const o=[],{fileType:s,fileDataOffset:u,jfifDataOffset:l,tiffHeaderOffset:c,iptcDataOffset:d,xmpChunks:f,iccChunks:p,mpfDataOffset:h,pngHeaderOffset:m,pngTextChunks:g,pngChunkOffsets:y,vp8xChunkOffset:_,gifHeaderOffset:v}=fy.parseAppMarkers(e,n);if(function(e){return void 0!==e}(u)){i=!0;const n=n_.read(e,u);t?a.file=n:a=fm({},a,n)}if(function(e){return void 0!==e}(l)){i=!0;const n=l_.read(e,l);t?a.jfif=n:a=fm({},a,n)}if(function(e){return void 0!==e}(c)){i=!0;const{tags:n,byteOrder:o}=Hy.read(e,c,r);if(n.Thumbnail&&(a.Thumbnail=n.Thumbnail,delete n.Thumbnail),t?(a.exif=n,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=Sm(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=Sm(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(a)):a=fm({},a,n),n["IPTC-NAA"]&&!Hb(d)){const e=E_.read(n["IPTC-NAA"].value,0,r);t?a.iptc=e:a=fm({},a,e)}if(n.ApplicationNotes&&!Gb(f)){const e=k_.read(dm(n.ApplicationNotes.value));t?a.xmp=e:(delete e._raw,a=fm({},a,e))}if(n.ImageSourceData){const e=vv.read(n.PhotoshopSettings.value,r);t?a.photoshop=e:a=fm({},a,e)}if(n.ICC_Profile&&!Yb(p)){const e=Ov.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?a.icc=e:a=fm({},a,e)}if(function(e){return e.Make&&e.Make.value&&Array.isArray(e.Make.value)&&"Canon"===e.Make.value[0]&&e.MakerNote&&e.MakerNote.__offset}(n)){const i=Uv.read(e,c,n.MakerNote.__offset,o,r);t?a.makerNotes=i:a=fm({},a,i)}n.MakerNote&&delete n.MakerNote.__offset}if(Hb(d)){i=!0;const n=E_.read(e,d,r);t?a.iptc=n:a=fm({},a,n)}if(Gb(f)){i=!0;const n=k_.read(e,f);t?a.xmp=n:(delete n._raw,a=fm({},a,n))}if(Yb(p)){i=!0;const t=Ov.read(e,p,n);t instanceof Promise?o.push(t.then(E)):E(t)}if(function(e){return void 0!==e}(h)){i=!0;const n=qy.read(e,h,r);t?a.mpf=n:a=fm({},a,n)}if(void 0!==m){i=!0;const n=Vv.read(e,m);t?(a.png=a.png?fm({},a.png,n):n,a.pngFile=n):a=fm({},a,n)}if(function(e){return void 0!==e}(g)){i=!0;const{readTags:t,readTagsPromise:a}=Xv.read(e,g,n,r);S(t),a&&o.push(a.then((e=>e.forEach(S))))}if(function(e){return void 0!==e}(y)){i=!0;const n=gb.read(e,y);t?a.png=a.png?fm({},a.png,n):n:a=fm({},a,n)}if(function(e){return void 0!==e}(_)){i=!0;const n=Ab.read(e,_);t?a.riff=a.riff?fm({},a.riff,n):n:a=fm({},a,n)}if(function(e){return void 0!==e}(v)){i=!0;const n=Cb.read(e,v);t?a.gif=a.gif?fm({},a.gif,n):n:a=fm({},a,n)}const b=Fb.get(e,a.Thumbnail,c);if(b?(i=!0,a.Thumbnail=b):delete a.Thumbnail,s&&(t?(a.file||(a.file={}),a.file.FileType=s):a.FileType=s,i=!0),!i)throw new Zb.MetadataMissingError;return n?Promise.all(o).then((()=>a)):a;function E(e){t?a.icc=e:a=fm({},a,e)}function S(e){if(t){for(const t of["exif","iptc"]){const n=`__${t}`;e[n]&&(a[t]=a[t]?fm({},a.exif,e[n]):e[n],delete e[n])}a.png=a.png?fm({},a.png,e):e,a.pngText=a.pngText?fm({},a.png,e):e}else a=fm({},a,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e),delete a.__exif,delete a.__iptc}}function Hb(e){return void 0!==e}function Gb(e){return Array.isArray(e)&&e.length>0}function Yb(e){return Array.isArray(e)&&e.length>0}exports.ImageHelper=void 0,(Pb=exports.ImageHelper||(exports.ImageHelper={})).convertBlob=async(e,t="image/jpeg")=>{const n=(await exports.FileHelper.getType(e)).mime;if("image/heic"===n||"image/heif"===n){const{heicTo:n}=await Promise.resolve().then((function(){return require("./heic-to.cfb16ea4.js")}));e=await n({blob:e,type:t})}const r=await Pb.blobToImage(e),i=document.createElement("canvas");return i.width=r.width,i.height=r.height,i.getContext("2d").drawImage(r,0,0),i.toDataURL(t)},Pb.dataUrlToImage=async e=>new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("dataURLtoImage(): dataURL is illegal")),r.src=e})),Pb.blobToImage=async e=>{const t=URL.createObjectURL(e);return new Promise(((e,n)=>{const r=new Image;r.onload=()=>{URL.revokeObjectURL(t),e(r)},r.onerror=()=>n(new Error("blobToImage(): blob is illegal")),r.src=t}))},Pb.resampleImage=async(e,t)=>{const{crop:n,scale:r,width:i,height:a,quality:o=1,type:s="image/jpeg"}=t,u=document.createElement("canvas"),l=u.getContext("2d");if(r)u.width=e.width*r,u.height=e.height*r,l.drawImage(e,0,0,u.width,u.height);else if(i&&a){u.width=i,u.height=a;let t=e.height/a*i,r=e.height,o=(e.width-t)/2,s=0;(n&&e.height>e.width||!n&&e.height<e.width)&&(t=e.width,r=e.width/i*a,o=0,s=(e.height-r)/2),l.drawImage(e,o,s,t,r,0,0,i,a)}return new Promise((e=>u.toBlob((t=>e(t)),s,o)))},Pb.compressImage=async(e,t)=>{const{quality:n=1,fileSize:r,attempts:i=0,maxAttempts:a}=t,o=await Pb.blobToImage(e);if(e.size<=1024*r||n<0)return e;const s=await Pb.resampleImage(o,{scale:1,quality:n});return s.size>1024*r&&(i<a||!a)?Pb.compressImage(e,{...t,quality:n-.1,attempts:i+1}):s},Pb.getMetadata=async e=>{try{const t=await Ub.load(e),n=t.DateTimeOriginal?.description,r=Number(t.GPSLongitude?.description),i=Number(t.GPSLatitude?.description),a=isNaN(r)?void 0:Number(r);return{dateTimeOriginal:n,lat:isNaN(i)?void 0:Number(i),lng:a}}catch{}},function(e){e.degreesToRadians=e=>Math.PI*e/180,e.radiansToDegrees=e=>180*e/Math.PI,e.nauticalMilesToMetres=e=>1852*e}(jb||(jb={}));var Wb=wi,qb=Ka,Kb=Hr,Jb=Gr,Xb=Oi,Qb=Yr.exports,eE=vi,tE=li,nE=Object.prototype.hasOwnProperty;var rE=function(e){if(null==e)return!0;if(Xb(e)&&(Jb(e)||"string"==typeof e||"function"==typeof e.splice||Qb(e)||tE(e)||Kb(e)))return!e.length;var t=qb(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(eE(e))return!Wb(e).length;for(var n in e)if(nE.call(e,n))return!1;return!0};var iE,aE,oE=function(e){return null==e};!function(e){e.upsert=(e,t,n)=>{const r={...e};return r[t]=t in r?{...r[t],...n}:n,r},e.getNestedValueByKey=(t,n,r={})=>{const{skipRoot:i,searchIn:a}=r;if(!i&&n in t)return{[n]:t[n]};for(const[i,o]of Object.entries(t))if(o&&"object"==typeof o&&!Array.isArray(o)&&(!a||a.includes(i))){const t=e.getNestedValueByKey(o,n,{...r,skipRoot:!1});if(!rE(t))return t}},e.removeNil=t=>{if(null!==t){if(Array.isArray(t)){const n=t.map((t=>e.removeNil(t))).filter((e=>e));return n.length?n:void 0}if("object"==typeof t){const n={...t};return Object.entries(n).forEach((([t,r])=>{const i=e.removeNil(r);oE(i)?delete n[t]:n[t]=i})),rE(n)?void 0:n}return t}}}(iE||(iE={})),exports.TestHelper=void 0,(aE=exports.TestHelper||(exports.TestHelper={})).generateId=(e,t,n)=>{let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r},aE.getError=e=>{try{return e()}catch(e){return e}},exports.WindowHelper=void 0,(exports.WindowHelper||(exports.WindowHelper={})).isMobileView=()=>window.innerWidth<=n.MediaWidths.mobileL||window.innerWidth>window.innerHeight&&window.innerHeight<n.MediaWidths.mobileL;const sE=t.createContext({formValidationConfig:null,setFormValidationConfig:()=>null,warnings:null,setWarnings:()=>null,yupId:null}),uE=({children:n})=>{const[r,i]=t.useState(),[a,o]=t.useState(),[s]=t.useState(im()),u=t.useMemo((()=>({formValidationConfig:r,setFormValidationConfig:i,warnings:a,setWarnings:o,yupId:s})),[r,a,s]);return e.jsx(sE.Provider,{value:u,children:n})};var lE=fr,cE=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},dE=function(e){return this.__data__.has(e)};function fE(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new lE;++t<n;)this.add(e[t])}fE.prototype.add=fE.prototype.push=cE,fE.prototype.has=dE;var pE=fE;var hE=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1};var mE=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},gE=hE,yE=function(e){return e!=e},_E=mE;var vE=function(e,t,n){return t==t?_E(e,t,n):gE(e,yE,n)},bE=vE;var EE=function(e,t){return!!(null==e?0:e.length)&&bE(e,t,0)>-1};var SE=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1};var AE=function(e,t){return e.has(t)},xE=pE,wE=EE,TE=SE,ME=Hp,OE=ri,CE=AE,NE=Math.min;var DE=function(e,t,n){for(var r=n?TE:wE,i=e[0].length,a=e.length,o=a,s=Array(a),u=1/0,l=[];o--;){var c=e[o];o&&t&&(c=ME(c,OE(t))),u=NE(c.length,u),s[o]=!n&&(t||i>=120&&c.length>=120)?new xE(o&&c):void 0}c=e[0];var d=-1,f=s[0];e:for(;++d<i&&l.length<u;){var p=c[d],h=t?t(p):p;if(p=n||0!==p?p:0,!(f?CE(f,h):r(l,h,n))){for(o=a;--o;){var m=s[o];if(!(m?CE(m,h):r(e[o],h,n)))continue e}f&&f.push(h),l.push(p)}}return l};var LE=function(e){return e};var IE=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},kE=Math.max;var $E=function(e,t,n){return t=kE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=kE(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),IE(e,this,s)}};var RE=function(e){return function(){return e}},FE=Tr,zE=FE?function(e,t){return FE(e,"toString",{configurable:!0,enumerable:!1,value:RE(t),writable:!0})}:LE,PE=zE,jE=Date.now;var ZE=function(e){var t=0,n=0;return function(){var r=jE(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(PE),UE=LE,BE=$E,VE=ZE;var HE=function(e,t){return VE(BE(e,t,UE),e+"")},GE=Oi,YE=Fr;var WE=function(e){return YE(e)&&GE(e)},qE=WE;var KE,JE,XE=Hp,QE=DE,eS=function(e){return qE(e)?e:[]},tS=HE((function(e){var t=XE(e,eS);return t.length&&t[0]===e[0]?QE(t):[]}));try{KE=Map}catch($f){}try{JE=Set}catch($f){}function nS(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(rS);if(KE&&e instanceof KE)return new Map(Array.from(e.entries()));if(JE&&e instanceof JE)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var a=t.findIndex((function(t){return t===e[i]}));r[i]=a>-1?n[a]:nS(e[i],t,n)}return r}return e}function rS(e){return nS(e,[],[])}const iS=Object.prototype.toString,aS=Error.prototype.toString,oS=RegExp.prototype.toString,sS="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",uS=/^Symbol\((.*)\)(.*)$/;function lS(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return sS.call(e).replace(uS,"Symbol($1)");const r=iS.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+aS.call(e)+"]":"RegExp"===r?oS.call(e):null}function cS(e,t){let n=lS(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=lS(this[e],t);return null!==r?r:n}),2)}let dS={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let i=null!=r&&r!==n,a=`${e} must be a \`${t}\` type, but the final value was: \`${cS(n,!0)}\``+(i?` (cast from the value \`${cS(r,!0)}\`).`:".");return null===n&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},fS={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},pS={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hS={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},mS={isValue:"${path} field must be ${value}"},gS={noUnknown:"${path} field has unspecified keys: ${unknown}"},yS={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};var _S=Object.assign(Object.create(null),{mixed:dS,string:fS,number:pS,date:hS,object:gS,array:yS,boolean:mS}),vS=Object.prototype.hasOwnProperty;var bS=function(e,t){return null!=e&&vS.call(e,t)},ES=Gr,SS=Wp,AS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xS=/^\w*$/;var wS=function(e,t){if(ES(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!SS(e))||(xS.test(e)||!AS.test(e)||null!=t&&e in Object(t))},TS=fr;function MS(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(MS.Cache||TS),n}MS.Cache=TS;var OS=MS;var CS=function(e){var t=OS(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},NS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DS=/\\(\\)?/g,LS=CS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(NS,(function(e,n,r,i){t.push(r?i.replace(DS,"$1"):n||e)})),t})),IS=Gr,kS=wS,$S=LS,RS=nh;var FS=function(e,t){return IS(e)?e:kS(e,t)?[e]:$S(RS(e))},zS=Wp;var PS=function(e){if("string"==typeof e||zS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},jS=FS,ZS=Hr,US=Gr,BS=Kr,VS=Jr,HS=PS;var GS=function(e,t,n){for(var r=-1,i=(t=jS(t,e)).length,a=!1;++r<i;){var o=HS(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&VS(i)&&BS(o,i)&&(US(e)||ZS(e))},YS=bS,WS=GS;var qS=function(e,t){return null!=e&&WS(e,t,YS)};const KS=e=>e&&e.__isYupSchema__;class JS{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!qS(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,a="function"==typeof n?n:(...e)=>e.every((e=>e===n));this.fn=function(...e){let t=e.pop(),n=e.pop(),o=a(...e)?r:i;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!KS(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function XS(e){return null==e?[]:[].concat(e)}function QS(){return QS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QS.apply(this,arguments)}let eA=/\$\{\s*(\w+)\s*\}/g;class tA extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=QS({},t,{path:n})),"string"==typeof e?e.replace(eA,((e,n)=>cS(t[n]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],XS(e).forEach((e=>{tA.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,tA)}}function nA(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,l=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),c=r.length;const d=[];if(o=o||[],!c)return o.length?l(new tA(o,a,u)):l(null,a);for(let e=0;e<r.length;e++){(0,r[e])(i,(function(e){if(e){if(!tA.isError(e))return l(e,a);if(n)return e.value=a,l(e,a);d.push(e)}if(--c<=0){if(d.length&&(s&&d.sort(s),o.length&&d.push(...o),o=d),o.length)return void l(new tA(o,a,u),a);l(null,a)}}))}}var rA=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===n(a[u],u,a))break}return t}},iA=rA(),aA=iA,oA=Li;var sA=function(e,t){return e&&aA(e,t,oA)};var uA=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},lA=pE,cA=uA,dA=AE;var fA=function(e,t,n,r,i,a){var o=1&n,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(e),c=a.get(t);if(l&&c)return l==t&&c==e;var d=-1,f=!0,p=2&n?new lA:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=o?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!cA(t,(function(e,t){if(!dA(p,t)&&(h===e||i(h,e,n,r,a)))return p.push(t)}))){f=!1;break}}else if(h!==m&&!i(h,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var pA=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var hA=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},mA=Qa,gA=Tt,yA=fA,_A=pA,vA=hA,bA=Kt?Kt.prototype:void 0,EA=bA?bA.valueOf:void 0;var SA=function(e,t,n,r,i,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new mA(e),new mA(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return gA(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=_A;case"[object Set]":var u=1&r;if(s||(s=vA),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var c=yA(s(e),s(t),r,i,a,o);return o.delete(e),c;case"[object Symbol]":if(EA)return EA.call(e)==EA.call(t)}return!1},AA=xa,xA=Object.prototype.hasOwnProperty;var wA=function(e,t,n,r,i,a){var o=1&n,s=AA(e),u=s.length;if(u!=AA(t).length&&!o)return!1;for(var l=u;l--;){var c=s[l];if(!(o?c in t:xA.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var h=o;++l<u;){var m=e[c=s[l]],g=t[c];if(r)var y=o?r(g,m,c,t,e,a):r(m,g,c,e,t,a);if(!(void 0===y?m===g||i(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var _=e.constructor,v=t.constructor;_==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof v&&v instanceof v||(p=!1)}return a.delete(e),a.delete(t),p},TA=Ar,MA=fA,OA=SA,CA=wA,NA=Ka,DA=Gr,LA=Yr.exports,IA=li,kA="[object Arguments]",$A="[object Array]",RA="[object Object]",FA=Object.prototype.hasOwnProperty;var zA=function(e,t,n,r,i,a){var o=DA(e),s=DA(t),u=o?$A:NA(e),l=s?$A:NA(t),c=(u=u==kA?RA:u)==RA,d=(l=l==kA?RA:l)==RA,f=u==l;if(f&&LA(e)){if(!LA(t))return!1;o=!0,c=!1}if(f&&!c)return a||(a=new TA),o||IA(e)?MA(e,t,n,r,i,a):OA(e,t,u,n,r,i,a);if(!(1&n)){var p=c&&FA.call(e,"__wrapped__"),h=d&&FA.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new TA),i(m,g,n,r,a)}}return!!f&&(a||(a=new TA),CA(e,t,n,r,i,a))},PA=zA,jA=Fr;var ZA=function e(t,n,r,i,a){return t===n||(null==t||null==n||!jA(t)&&!jA(n)?t!=t&&n!=n:PA(t,n,r,i,e,a))},UA=Ar,BA=ZA;var VA=function(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var u=(s=n[i])[0],l=e[u],c=s[1];if(o&&s[2]){if(void 0===l&&!(u in e))return!1}else{var d=new UA;if(r)var f=r(l,c,u,e,t,d);if(!(void 0===f?BA(c,l,3,r,d):f))return!1}}return!0},HA=ln;var GA=function(e){return e==e&&!HA(e)},YA=GA,WA=Li;var qA=function(e){for(var t=WA(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,YA(i)]}return t};var KA=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},JA=VA,XA=qA,QA=KA;var ex=function(e){var t=XA(e);return 1==t.length&&t[0][2]?QA(t[0][0],t[0][1]):function(n){return n===e||JA(n,e,t)}},tx=FS,nx=PS;var rx=function(e,t){for(var n=0,r=(t=tx(t,e)).length;null!=e&&n<r;)e=e[nx(t[n++])];return n&&n==r?e:void 0},ix=rx;var ax=function(e,t,n){var r=null==e?void 0:ix(e,t);return void 0===r?n:r};var ox=function(e,t){return null!=e&&t in Object(e)},sx=ox,ux=GS;var lx=function(e,t){return null!=e&&ux(e,t,sx)},cx=ZA,dx=ax,fx=lx,px=wS,hx=GA,mx=KA,gx=PS;var yx=function(e,t){return px(e)&&hx(t)?mx(gx(e),t):function(n){var r=dx(n,e);return void 0===r&&r===t?fx(n,e):cx(t,r,3)}};var _x=function(e){return function(t){return null==t?void 0:t[e]}},vx=rx;var bx=function(e){return function(t){return vx(t,e)}},Ex=_x,Sx=bx,Ax=wS,xx=PS;var wx=ex,Tx=yx,Mx=LE,Ox=Gr,Cx=function(e){return Ax(e)?Ex(xx(e)):Sx(e)};var Nx=function(e){return"function"==typeof e?e:null==e?Mx:"object"==typeof e?Ox(e)?Tx(e[0],e[1]):wx(e):Cx(e)},Dx=Or,Lx=sA,Ix=Nx;var kx=function(e,t){var n={};return t=Ix(t),Lx(e,(function(e,r,i){Dx(n,r,t(e,r,i))})),n};function $x(e){this._maxSize=e,this.clear()}$x.prototype.clear=function(){this._size=0,this._values=Object.create(null)},$x.prototype.get=function(e){return this._values[e]},$x.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Rx=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Fx=/^\d+$/,zx=/^\d/,Px=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,jx=/^\s*(['"]?)(.*?)(\1)\s*$/,Zx=new $x(512),Ux=new $x(512),Bx=new $x(512),Vx={Cache:$x,split:Gx,normalizePath:Hx,setter:function(e){var t=Hx(e);return Ux.get(e)||Ux.set(e,(function(e,n){for(var r=0,i=t.length,a=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;a=a[t[r++]]}a[t[r]]=n}))},getter:function(e,t){var n=Hx(e);return Bx.get(e)||Bx.set(e,(function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(Yx(t)||Fx.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,i,a,o,s=e.length;for(i=0;i<s;i++)(r=e[i])&&(Wx(r)&&(r='"'+r+'"'),a=!(o=Yx(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:Gx(e),t,n)}};function Hx(e){return Zx.get(e)||Zx.set(e,Gx(e).map((function(e){return e.replace(jx,"$2")})))}function Gx(e){return e.match(Rx)||[""]}function Yx(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function Wx(e){return!Yx(e)&&(function(e){return e.match(zx)&&!e.match(Fx)}(e)||function(e){return Px.test(e)}(e))}const qx="$",Kx=".";class Jx{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qx,this.isValue=this.key[0]===Kx,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qx:this.isValue?Kx:"";this.path=this.key.slice(n.length),this.getter=this.path&&Vx.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function Xx(){return Xx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xx.apply(this,arguments)}function Qx(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,l=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["value","path","label","options","originalValue","sync"]);const{name:c,test:d,params:f,message:p}=e;let{parent:h,context:m}=o;function g(e){return Jx.isRef(e)?e.getValue(r,h,m):e}function y(e={}){const t=kx(Xx({value:r,originalValue:s,label:a,path:e.path||i},f,e.params),g),n=new tA(tA.formatError(e.message||p,t),r,t.path,e.type||c);return n.params=t,n}let _,v=Xx({path:i,parent:h,type:c,createError:y,resolve:g,options:o,originalValue:s},l);if(u){try{var b;if(_=d.call(v,r,v),"function"==typeof(null==(b=_)?void 0:b.then))throw new Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(e){return void n(e)}tA.isError(_)?n(_):_?n(null,_):n(y())}else try{Promise.resolve(d.call(v,r,v)).then((e=>{tA.isError(e)?n(e):e?n(null,e):n(y())})).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}Jx.prototype.__isYupRef=!0;function ew(e,t,n,r=n){let i,a,o;return t?(Vx.forEach(t,((s,u,l)=>{let c=u?(e=>e.substr(0,e.length-1).substr(1))(s):s;if((e=e.resolve({context:r,parent:i,value:n})).innerType){let r=l?parseInt(c,10):0;if(n&&r>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[r],e=e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);i=n,n=n&&n[c],e=e.fields[c]}a=c,o=u?"["+s+"]":"."+s})),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class tw{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce(((t,n)=>t.concat(Jx.isRef(n)?e(n):n)),[])}add(e){Jx.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){Jx.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new tw;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach((e=>n.add(e))),e.refs.forEach((e=>n.add(e))),t.list.forEach((e=>n.delete(e))),t.refs.forEach((e=>n.delete(e))),n}}function nw(){return nw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nw.apply(this,arguments)}class rw{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new tw,this._blacklist=new tw,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(dS.notType)})),this.type=(null==e?void 0:e.type)||"mixed",this.spec=nw({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=nw({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=rS(nw({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=nw({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce(((t,n)=>n.resolve(t,e)),t),t=t.resolve(e)}return t}cast(e,t={}){let n=this.resolve(nw({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=cS(e),a=cS(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce(((t,n)=>n.call(this,t,e,this)),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:a=[],originalValue:o=e,strict:s=this.spec.strict,abortEarly:u=this.spec.abortEarly}=t,l=e;s||(l=this._cast(l,nw({assert:!1},t)));let c={value:l,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:a},d=[];this._typeError&&d.push(this._typeError);let f=[];this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),nA({args:c,value:l,path:i,sync:r,tests:d,endEarly:u},(e=>{e?n(e,l):nA({tests:this.tests.concat(f),args:c,path:i,sync:r,value:l,endEarly:u},n)}))}validate(e,t,n){let r=this.resolve(nw({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise(((n,i)=>r._validate(e,t,((e,t)=>{e?i(e):n(t)}))))}validateSync(e,t){let n;return this.resolve(nw({},t,{value:e}))._validate(e,nw({},t,{sync:!0}),((e,t)=>{if(e)throw e;n=t})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(tA.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(tA.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):rS(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=dS.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=dS.required){return this.clone({presence:"required"}).withMutation((t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}})))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=dS.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Qx(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=XS(e).map((e=>new Jx(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new JS(r,t)),n}typeError(e){let t=this.clone();return t._typeError=Qx({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=dS.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=Qx({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=dS.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=Qx({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t))};return r}}rw.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])rw.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=ew(this,t,n,r.context);return o[e](i&&i[a],nw({},r,{parent:i,path:t}))};for(const e of["equals","is"])rw.prototype[e]=rw.prototype.oneOf;for(const e of["not","nope"])rw.prototype[e]=rw.prototype.notOneOf;rw.prototype.optional=rw.prototype.notRequired;const iw=rw;function aw(){return new iw}aw.prototype=iw.prototype;const ow=e=>null==e;function sw(){return new uw}class uw extends rw{constructor(){super({type:"boolean"}),this.withMutation((()=>{this.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=mS.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>ow(e)||!0===e})}isFalse(e=mS.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>ow(e)||!1===e})}}sw.prototype=uw.prototype;let lw=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,cw=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,dw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,fw=e=>ow(e)||e===e.trim(),pw={}.toString();function hw(){return new mw}class mw extends rw{constructor(){super({type:"string"}),this.withMutation((()=>{this.transform((function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===pw?e:t}))}))}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=fS.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return ow(t)||t.length===this.resolve(e)}})}min(e,t=fS.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ow(t)||t.length>=this.resolve(e)}})}max(e,t=fS.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return ow(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||fS.matches,params:{regex:e},test:t=>ow(t)||""===t&&i||-1!==t.search(e)})}email(e=fS.email){return this.matches(lw,{name:"email",message:e,excludeEmptyString:!0})}url(e=fS.url){return this.matches(cw,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=fS.uuid){return this.matches(dw,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=fS.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:fw})}lowercase(e=fS.lowercase){return this.transform((e=>ow(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>ow(e)||e===e.toLowerCase()})}uppercase(e=fS.uppercase){return this.transform((e=>ow(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>ow(e)||e===e.toUpperCase()})}}hw.prototype=mw.prototype;function gw(){return new yw}class yw extends rw{constructor(){super({type:"number"}),this.withMutation((()=>{this.transform((function(e){let t=e;if("string"==typeof t){if(t=t.replace(/\s/g,""),""===t)return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e)}min(e,t=pS.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ow(t)||t>=this.resolve(e)}})}max(e,t=pS.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return ow(t)||t<=this.resolve(e)}})}lessThan(e,t=pS.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return ow(t)||t<this.resolve(e)}})}moreThan(e,t=pS.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return ow(t)||t>this.resolve(e)}})}positive(e=pS.positive){return this.moreThan(0,e)}negative(e=pS.negative){return this.lessThan(0,e)}integer(e=pS.integer){return this.test({name:"integer",message:e,test:e=>ow(e)||Number.isInteger(e)})}truncate(){return this.transform((e=>ow(e)?e:0|e))}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform((t=>ow(t)?t:Math[e](t)))}}gw.prototype=yw.prototype;var _w=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let vw=new Date("");function bw(){return new Ew}class Ew extends rw{constructor(){super({type:"date"}),this.withMutation((()=>{this.transform((function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=_w.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?vw:new Date(e))}))}))}_typeCheck(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}prepareParam(e,t){let n;if(Jx.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=hS.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return ow(e)||e>=this.resolve(n)}})}max(e,t=hS.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return ow(e)||e<=this.resolve(n)}})}}Ew.INVALID_DATE=vw,bw.prototype=Ew.prototype,bw.INVALID_DATE=vw;var Sw=function(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n};var Aw=function(e){return function(t){return null==e?void 0:e[t]}},xw=Aw({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ww=nh,Tw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mw=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ow=function(e){return(e=ww(e))&&e.replace(Tw,xw).replace(Mw,"")},Cw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Nw=function(e){return e.match(Cw)||[]},Dw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Lw=function(e){return Dw.test(e)},Iw="\\ud800-\\udfff",kw="\\u2700-\\u27bf",$w="a-z\\xdf-\\xf6\\xf8-\\xff",Rw="A-Z\\xc0-\\xd6\\xd8-\\xde",Fw="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zw="["+Fw+"]",Pw="\\d+",jw="["+kw+"]",Zw="["+$w+"]",Uw="[^"+Iw+Fw+Pw+kw+$w+Rw+"]",Bw="(?:\\ud83c[\\udde6-\\uddff]){2}",Vw="[\\ud800-\\udbff][\\udc00-\\udfff]",Hw="["+Rw+"]",Gw="(?:"+Zw+"|"+Uw+")",Yw="(?:"+Hw+"|"+Uw+")",Ww="(?:['’](?:d|ll|m|re|s|t|ve))?",qw="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kw="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Jw="[\\ufe0e\\ufe0f]?",Xw=Jw+Kw+("(?:\\u200d(?:"+["[^"+Iw+"]",Bw,Vw].join("|")+")"+Jw+Kw+")*"),Qw="(?:"+[jw,Bw,Vw].join("|")+")"+Xw,eT=RegExp([Hw+"?"+Zw+"+"+Ww+"(?="+[zw,Hw,"$"].join("|")+")",Yw+"+"+qw+"(?="+[zw,Hw+Gw,"$"].join("|")+")",Hw+"?"+Gw+"+"+Ww,Hw+"+"+qw,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pw,Qw].join("|"),"g");var tT=function(e){return e.match(eT)||[]},nT=Nw,rT=Lw,iT=nh,aT=tT;var oT=function(e,t,n){return e=iT(e),void 0===(t=n?void 0:t)?rT(e)?aT(e):nT(e):e.match(t)||[]},sT=Sw,uT=Ow,lT=oT,cT=RegExp("['’]","g");var dT=function(e){return function(t){return sT(lT(uT(t).replace(cT,"")),e,"")}},fT=dT((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),pT=fT,hT=kh,mT=dT((function(e,t,n){return t=t.toLowerCase(),e+(n?hT(t):t)})),gT=mT,yT=Or,_T=sA,vT=Nx;var bT=function(e,t){var n={};return t=vT(t),_T(e,(function(e,r,i){yT(n,t(e,r,i),e)})),n},ET={exports:{}};function ST(e,t){var n=e.length,r=new Array(n),i={},a=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)i[a]||u(e[a],a,new Set);return r;function u(e,t,a){if(a.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){a.add(e);do{var d=c[--t];u(d,s.get(d),a)}while(t);a.delete(e)}r[--n]=e}}}function AT(e,t){let n=1/0;return e.some(((e,r)=>{var i;if(-1!==(null==(i=t.path)?void 0:i.indexOf(e)))return n=r,!0})),n}function xT(e){return(t,n)=>AT(e,t)-AT(e,n)}function wT(){return wT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wT.apply(this,arguments)}ET.exports=function(e){return ST(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},ET.exports.array=ST;let TT=e=>"[object Object]"===Object.prototype.toString.call(e);const MT=xT([]);class OT extends rw{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=MT,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{this.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&this.shape(e)}))}_typeCheck(e){return TT(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter((e=>-1===this._nodes.indexOf(e)))),s={},u=wT({},t,{parent:s,__validating:t.__validating||!1}),l=!1;for(const e of o){let n=i[e],o=qS(r,e);if(n){let i,a=r[e];u.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:a,context:t.context,parent:s});let o="spec"in n?n.spec:void 0,c=null==o?void 0:o.strict;if(null==o?void 0:o.strip){l=l||e in r;continue}i=t.__validating&&c?r[e]:n.cast(r[e],u),void 0!==i&&(s[e]=i)}else o&&!a&&(s[e]=r[e]);s[e]!==r[e]&&(l=!0)}return l?s:r}_validate(e,t={},n){let r=[],{sync:i,from:a=[],originalValue:o=e,abortEarly:s=this.spec.abortEarly,recursive:u=this.spec.recursive}=t;a=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,t.from=a,super._validate(e,t,((e,l)=>{if(e){if(!tA.isError(e)||s)return void n(e,l);r.push(e)}if(!u||!TT(l))return void n(r[0]||null,l);o=o||l;let c=this._nodes.map((e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,s=this.fields[e];s&&"validate"in s?s.validate(l[e],wT({},t,{path:i,from:a,strict:!0,parent:l,originalValue:o[e]}),r):r(null)}));nA({sync:i,tests:c,value:l,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)}))}clone(e){const t=super.clone(e);return t.fields=wT({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];void 0===r?n[e]=t:r instanceof rw&&t instanceof rw&&(n[e]=t.concat(r))}return t.withMutation((()=>t.shape(n,this._excludedEdges)))}getDefaultFromShape(){let e={};return this._nodes.forEach((t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0})),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=xT(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map((([e,t])=>`${e}-${t}`)));function a(e,t){let a=Vx.split(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(const t in e)if(qS(e,t)){let n=e[t];r.add(t),Jx.isRef(n)&&n.isSibling?a(n.path,t):KS(n)&&"deps"in n&&n.deps.forEach((e=>a(e,t)))}return ET.exports.array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation((e=>(e.fields={},e.shape(t))))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const t of e)delete n[t];return t.withMutation((()=>t.shape(n)))}from(e,t,n){let r=Vx.getter(e,!0);return this.transform((i=>{if(null==i)return i;let a=i;return qS(i,e)&&(a=wT({},i),n||delete a[e],a[t]=r(i)),a}))}noUnknown(e=!0,t=gS.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===n.indexOf(e)))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=gS.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>t&&bT(t,((t,n)=>e(n)))))}camelCase(){return this.transformKeys(gT)}snakeCase(){return this.transformKeys(pT)}constantCase(){return this.transformKeys((e=>pT(e).toUpperCase()))}describe(){let e=super.describe();return e.fields=kx(this.fields,(e=>e.describe())),e}}function CT(e){return new OT(e)}function NT(){return NT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NT.apply(this,arguments)}function DT(e){return new LT(e)}CT.prototype=OT.prototype;class LT extends rw{constructor(e){super({type:"array"}),this.innerType=void 0,this.innerType=e,this.withMutation((()=>{this.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}))}))}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map(((e,n)=>{const i=this.innerType.cast(e,NT({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i}));return r?i:n}_validate(e,t={},n){var r,i;let a=[],o=t.sync,s=t.path,u=this.innerType,l=null!=(r=t.abortEarly)?r:this.spec.abortEarly,c=null!=(i=t.recursive)?i:this.spec.recursive,d=null!=t.originalValue?t.originalValue:e;super._validate(e,t,((e,r)=>{if(e){if(!tA.isError(e)||l)return void n(e,r);a.push(e)}if(!c||!u||!this._typeCheck(r))return void n(a[0]||null,r);d=d||r;let i=new Array(r.length);for(let e=0;e<r.length;e++){let n=r[e],a=`${t.path||""}[${e}]`,o=NT({},t,{path:a,strict:!0,parent:r,index:e,originalValue:d[e]});i[e]=(e,t)=>u.validate(n,o,t)}nA({sync:o,path:s,value:r,errors:a,endEarly:l,tests:i},n)}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!KS(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+cS(e));return t.innerType=e,t}length(e,t=yS.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return ow(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||yS.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ow(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||yS.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return ow(t)||t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}DT.prototype=LT.prototype;class IT{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.__inputType=void 0,this.__outputType=void 0,this._resolve=(e,t={})=>{let n=this.builder(e,t);if(!KS(n))throw new TypeError("lazy() functions must return a valid schema");return n.resolve(t)},this.builder=e}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}validate(e,t,n){return this._resolve(e,t).validate(e,t,n)}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,n){return this._resolve(t,n).validateAt(e,t,n)}validateSyncAt(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)}describe(){return null}isValid(e,t){return this._resolve(e,t).isValid(e,t)}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}}function kT(e,t,n){if(!e||!KS(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if("string"!=typeof t)throw new TypeError("A Method name must be provided");if("function"!=typeof n)throw new TypeError("Method function must be provided");e.prototype[t]=n}var $T=Object.freeze({__proto__:null,mixed:aw,bool:sw,boolean:sw,string:hw,number:gw,date:bw,object:CT,array:DT,ref:function(e,t){return new Jx(e,t)},lazy:function(e){return new IT(e)},reach:(e,t,n,r)=>ew(e,t,n,r).schema,isSchema:KS,addMethod:kT,setLocale:function(e){Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((n=>{_S[t][n]=e[t][n]}))}))},ValidationError:tA,BaseSchema:rw,MixedSchema:iw,BooleanSchema:uw,StringSchema:mw,NumberSchema:yw,DateSchema:Ew,ObjectSchema:OT,ArraySchema:LT});const RT=H.default.button`
179
+ Ff((function(e){Object.getOwnPropertyNames(jp.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatterBuilder.prototype[t]=jp.prototype[t])})),Object.getOwnPropertyNames(Bp.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatter.prototype[t]=Bp.prototype[t])})),e.DateTimeFormatter.RFC_1123_DATE_TIME=Bp.RFC_1123_DATE_TIME}));var Hp=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Gp=un,Yp=Fr;var Wp=function(e){return"symbol"==typeof e||Yp(e)&&"[object Symbol]"==Gp(e)},qp=Hp,Kp=Gr,Jp=Wp,Xp=Kt?Kt.prototype:void 0,Qp=Xp?Xp.toString:void 0;var eh=function e(t){if("string"==typeof t)return t;if(Kp(t))return qp(t,e)+"";if(Jp(t))return Qp?Qp.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},th=eh;var nh=function(e){return null==e?"":th(e)};var rh=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a},ih=rh;var ah=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:ih(e,t,n)},oh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var sh=function(e){return oh.test(e)};var uh=function(e){return e.split("")},lh="\\ud800-\\udfff",ch="["+lh+"]",dh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",fh="\\ud83c[\\udffb-\\udfff]",ph="[^"+lh+"]",hh="(?:\\ud83c[\\udde6-\\uddff]){2}",mh="[\\ud800-\\udbff][\\udc00-\\udfff]",gh="(?:"+dh+"|"+fh+")"+"?",yh="[\\ufe0e\\ufe0f]?",_h=yh+gh+("(?:\\u200d(?:"+[ph,hh,mh].join("|")+")"+yh+gh+")*"),vh="(?:"+[ph+dh+"?",dh,hh,mh,ch].join("|")+")",bh=RegExp(fh+"(?="+fh+")|"+vh+_h,"g");var Eh=function(e){return e.match(bh)||[]},Sh=uh,Ah=sh,xh=Eh;var wh=function(e){return Ah(e)?xh(e):Sh(e)},Th=ah,Mh=sh,Oh=wh,Ch=nh;var Nh=function(e){return function(t){t=Ch(t);var n=Mh(t)?Oh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Th(n,1).join(""):t.slice(1);return r[e]()+i}},Dh=Nh("toUpperCase"),Lh=nh,Ih=Dh;var kh=function(e){return Ih(Lh(e).toLowerCase())};function $h(e){return new DataView(e.buffer,e.byteOffset)}const Rh={len:1,get:(e,t)=>$h(e).getUint8(t),put:(e,t,n)=>($h(e).setUint8(t,n),t+1)},Fh={len:2,get:(e,t)=>$h(e).getUint16(t,!0),put:(e,t,n)=>($h(e).setUint16(t,n,!0),t+2)},zh={len:2,get:(e,t)=>$h(e).getUint16(t),put:(e,t,n)=>($h(e).setUint16(t,n),t+2)},Ph={len:4,get:(e,t)=>$h(e).getUint32(t,!0),put:(e,t,n)=>($h(e).setUint32(t,n,!0),t+4)},jh={len:4,get:(e,t)=>$h(e).getUint32(t),put:(e,t,n)=>($h(e).setUint32(t,n),t+4)},Zh={len:4,get:(e,t)=>$h(e).getInt32(t),put:(e,t,n)=>($h(e).setInt32(t,n),t+4)},Uh={len:8,get:(e,t)=>$h(e).getBigUint64(t,!0),put:(e,t,n)=>($h(e).setBigUint64(t,n,!0),t+8)};class Bh{constructor(e,t){this.len=e,this.encoding=t,this.textDecoder=new TextDecoder(t)}get(e,t){return this.textDecoder.decode(e.subarray(t,t+this.len))}}class Vh extends Error{constructor(){super("End-Of-Stream")}}class Hh{constructor(){this.maxStreamReadSize=1048576,this.endOfStream=!1,this.peekQueue=[]}async peek(e,t,n){const r=await this.read(e,t,n);return this.peekQueue.push(e.subarray(t,t+r)),r}async read(e,t,n){if(0===n)return 0;let r=this.readFromPeekBuffer(e,t,n);if(r+=await this.readRemainderFromStream(e,t+r,n-r),0===r)throw new Vh;return r}readFromPeekBuffer(e,t,n){let r=n,i=0;for(;this.peekQueue.length>0&&r>0;){const n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");const a=Math.min(n.length,r);e.set(n.subarray(0,a),t+i),i+=a,r-=a,a<n.length&&this.peekQueue.push(n.subarray(a))}return i}async readRemainderFromStream(e,t,n){let r=n,i=0;for(;r>0&&!this.endOfStream;){const n=Math.min(r,this.maxStreamReadSize),a=await this.readFromStream(e,t+i,n);if(0===a)break;i+=a,r-=a}return i}}class Gh extends Hh{constructor(e){super(),this.reader=e.getReader({mode:"byob"})}async readFromStream(e,t,n){if(this.endOfStream)throw new Vh;const r=await this.reader.read(new Uint8Array(n));return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value,t),r.value.byteLength):0}abort(){return this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}class Yh{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",(()=>{this.abort()}))}async readToken(e,t=this.position){const n=new Uint8Array(e.len);if(await this.readBuffer(n,{position:t})<e.len)throw new Vh;return e.get(n,0)}async peekToken(e,t=this.position){const n=new Uint8Array(e.len);if(await this.peekBuffer(n,{position:t})<e.len)throw new Vh;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new Vh;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new Vh;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await(this.onClose?.())}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}abort(){return Promise.resolve()}}class Wh extends Yh{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){const n=this.normalizeOptions(e,t),r=n.position-this.position;if(r>0)return await this.ignore(r),this.readBuffer(e,t);if(r<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===n.length)return 0;const i=await this.streamReader.read(e,n.offset,n.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<n.length)throw new Vh;return i}async peekBuffer(e,t){const n=this.normalizeOptions(e,t);let r=0;if(n.position){const t=n.position-this.position;if(t>0){const i=new Uint8Array(n.length+t);return r=await this.peekBuffer(i,{mayBeLess:n.mayBeLess}),e.set(i.subarray(t),n.offset),r-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(n.length>0){try{r=await this.streamReader.peek(e,n.offset,n.length)}catch(e){if(t?.mayBeLess&&e instanceof Vh)return 0;throw e}if(!n.mayBeLess&&r<n.length)throw new Vh}return r}async ignore(e){const t=Math.min(256e3,e),n=new Uint8Array(t);let r=0;for(;r<e;){const i=e-r,a=await this.readBuffer(n,{length:Math.min(t,i)});if(a<0)return a;r+=a}return r}abort(){return this.streamReader.abort()}supportsRandomAccess(){return!1}}class qh extends Yh{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){if(t?.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const n=await this.peekBuffer(e,t);return this.position+=n,n}async peekBuffer(e,t){const n=this.normalizeOptions(e,t),r=Math.min(this.uint8Array.length-n.position,n.length);if(!n.mayBeLess&&r<n.length)throw new Vh;return e.set(this.uint8Array.subarray(n.position,n.position+r),n.offset),r}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}}function Kh(e){const{byteLength:t}=e;return 6===t?e.getUint16(0)*2**32+e.getUint32(2):5===t?e.getUint8(0)*2**32+e.getUint32(1):4===t?e.getUint32(0):3===t?65536*e.getUint8(0)+e.getUint16(1):2===t?e.getUint16(0):1===t?e.getUint8(0):void 0}function Jh(e,t){const n=e.length,r=t.length;if(0===r)return-1;if(r>n)return-1;const i=n-r;for(let n=0;n<=i;n++){let i=!0;for(let a=0;a<r;a++)if(e[n+a]!==t[a]){i=!1;break}if(i)return n}return-1}new globalThis.TextDecoder("utf8"),new globalThis.TextEncoder,Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const Xh={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},Qh=4100;function em(e,t,n){n={offset:0,...n};for(const[r,i]of t.entries())if(n.mask){if(i!==(n.mask[r]&e[r+n.offset]))return!1}else if(i!==e[r+n.offset])return!1;return!0}class tm{constructor(e){this.detectors=e?.customDetectors,this.tokenizerOptions={abortSignal:e?.signal},this.fromTokenizer=this.fromTokenizer.bind(this),this.fromBuffer=this.fromBuffer.bind(this),this.parse=this.parse.bind(this)}async fromTokenizer(e){const t=e.position;for(const n of this.detectors||[]){const r=await n(e);if(r)return r;if(t!==e.position)return}return this.parse(e)}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Uint8Array?e:new Uint8Array(e);var n,r;if(t?.length>1)return this.fromTokenizer((n=t,r=this.tokenizerOptions,new qh(n,r)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await(n=e,r=this.tokenizerOptions,new Wh(new Gh(n),r));var n,r;try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:n=Qh}=t;let r,i;const a=e.getReader({mode:"byob"});try{const{value:e,done:t}=await a.read(new Uint8Array(n));if(i=e,!t&&e)try{r=await this.fromBuffer(e.slice(0,n))}catch(e){if(!(e instanceof Vh))throw e;r=void 0}i=e}finally{a.releaseLock()}const o=new TransformStream({async start(e){e.enqueue(i)},transform(e,t){t.enqueue(e)}}),s=e.pipeThrough(o);return s.fileType=r,s}check(e,t){return em(this.buffer,e,t)}checkString(e,t){return this.check(function(e){return[...e].map((e=>e.charCodeAt(0)))}(e),t)}async parse(e){if(this.buffer=new Uint8Array(Qh),void 0===e.fileInfo.size&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.parse(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);const t=await e.readToken(Xh);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===this.buffer[0]||70===this.buffer[0])&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(this.buffer,{length:30});const n=new DataView(this.buffer.buffer),r={compressedSize:n.getUint32(18,!0),uncompressedSize:n.getUint32(22,!0),filenameLength:n.getUint16(26,!0),extraFieldLength:n.getUint16(28,!0)};if(r.filename=await e.readToken(new Bh(r.filenameLength,"utf-8")),await e.ignore(r.extraFieldLength),/classes\d*\.dex/.test(r.filename))return{ext:"apk",mime:"application/vnd.android.package-archive"};if("META-INF/mozilla.rsa"===r.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(r.filename.endsWith(".rels")||r.filename.endsWith(".xml")){switch(r.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};case"visio":return{ext:"vsdx",mime:"application/vnd.visio"}}}if(r.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(r.filename.startsWith("3D/")&&r.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===r.filename&&r.compressedSize===r.uncompressedSize){let i=await e.readToken(new Bh(r.compressedSize,"utf-8"));switch(i=i.trim(),i){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}}if(0===r.compressedSize){let a=-1;for(;a<0&&e.position<e.fileInfo.size;)await e.peekBuffer(this.buffer,{mayBeLess:!0}),a=Jh(this.buffer,new Uint8Array([80,75,3,4])),await e.ignore(a>=0?a:this.buffer.length)}else await e.ignore(r.compressedSize)}}catch(o){if(!(o instanceof Vh))throw o}return{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);const s=new Uint8Array(8);return await e.readBuffer(s),em(s,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:em(s,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:em(s,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:em(s,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:em(s,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:em(s,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const u=new Bh(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(u){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return u.startsWith("3g")?u.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF")){try{await e.ignore(1350);const l=10485760,c=new Uint8Array(Math.min(l,e.fileInfo.size));if(await e.readBuffer(c,{mayBeLess:!0}),function(e,t){return-1!==Jh(e,t)}(c,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}catch(d){if(!(d instanceof Vh))throw d}return{ext:"pdf",mime:"application/pdf"}}if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){const f=await this.readTiffHeader(!1);if(f)return f}if(this.check([77,77])){const p=await this.readTiffHeader(!0);if(p)return p}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function h(){const t=await e.peekNumber(Rh);let n=128,r=0;for(;!(t&n)&&0!==n;)++r,n>>=1;const i=new Uint8Array(r+1);return await e.readBuffer(i),i}async function m(){const e=await h(),t=await h();t[0]^=128>>t.length-1;const n=Math.min(6,t.length),r=new DataView(e.buffer),i=new DataView(t.buffer,t.length-n,n);return{id:Kh(r),len:Kh(i)}}async function g(t){for(;t>0;){const n=await m();if(17026===n.id){return(await e.readToken(new Bh(n.len))).replaceAll(/\00.*$/g,"")}await e.ignore(n.len),--t}}const y=await m();switch(await g(y.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(this.check([82,73,70,70])){if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1"))return{ext:"parquet",mime:"application/x-parquet"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(0===this.buffer[6]||1===this.buffer[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){const _=new Bh(4,"latin1").get(this.buffer,2);if(_.match("^d*")&&_>=1e3&&_<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>")){await e.ignore(8);return"debian-binary"===await e.readToken(new Bh(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"}}if(this.checkString("WEBVTT")&&["\n","\r","\t"," ","\0"].some((e=>this.checkString(e,{offset:6}))))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){async function v(){return{length:await e.readToken(Zh),type:await e.readToken(new Bh(4,"latin1"))}}await e.ignore(8);do{const b=await v();if(b.length<0)return;switch(b.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(b.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function E(){const t=new Uint8Array(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Uh))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const S=await E();let A=S.size-24;if(em(S.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const x=new Uint8Array(16);if(A-=await e.readBuffer(x),em(x,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(em(x,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(A)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10])){await e.ignore(20);switch(await e.readToken(new Bh(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.check([0,60,0,63,0,120,0,109,0,108],{offset:2})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){const w=new DataView(this.buffer.buffer).getUint32(12,!0);if(w>12&&this.buffer.length>=w+16)try{const T=(new TextDecoder).decode(this.buffer.slice(16,w+16));if(JSON.parse(T).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),function(e,t=0){const n=Number.parseInt(new Bh(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(n))return!1;let r=256;for(let n=t;n<t+148;n++)r+=e[n];for(let n=t+156;n<t+512;n++)r+=e[n];return n===r}(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254]))return this.check([60,0,63,0,120,0,109,0,108,0],{offset:2})?{ext:"xml",mime:"application/xml"}:this.check([255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0],{offset:2})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:void 0;if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(this.buffer.length>=2&&this.check([255,224],{offset:0,mask:[255,224]})){if(this.check([16],{offset:1,mask:[22]}))return this.check([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}async readTiffTag(e){const t=await this.tokenizer.readToken(e?zh:Fh);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e){const t=await this.tokenizer.readToken(e?zh:Fh);for(let n=0;n<t;++n){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?zh:Fh).get(this.buffer,2),n=(e?jh:Ph).get(this.buffer,4);if(42===t){if(n>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(n>=8&&(this.check([28,0,254,0],{offset:8})||this.check([31,0,11,0],{offset:8})))return{ext:"nef",mime:"image/x-nikon-nef"}}await this.tokenizer.ignore(n);return await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(43===t)return{ext:"tif",mime:"image/tiff"}}}new Set(["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk"]),new Set(["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/x-parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive"]),exports.FileHelper=void 0,function(e){e.truncateFileName=(e,n)=>{let r,i=e,a=0;if(n&&n.current&&(r=t(n.current),a=n.current.getBoundingClientRect().width),r&&r.measureText(e).width>a){const t="...";let n="",o="",s=0,u=e.length-1,l=t,c=l;for(;s<u;){if(n+=e.charAt(s),l=n+t+o,r.measureText(l).width>a){i=c;break}if(c=l,o=e.charAt(u)+o,l=n+t+o,r.measureText(l).width>a){i=c;break}c=l,s++,u--}}return i};const t=e=>{const t=document.createDocumentFragment(),n=document.createElement("canvas");t.appendChild(n);const r=n.getContext("2d"),i=window.getComputedStyle(e);return r.font=i.font?i.font:`${i.fontSize}" "${i.fontFamily}`,r};e.fileToDataUrl=async e=>{if(window&&window.FileReader)return new Promise(((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)}))},e.dataUrlToBlob=async e=>(await fetch(e)).blob(),e.getFilesizeFromBase64=e=>{const t=e.length;return.75*t-(e.substring(t-2,2).match(/=/g)?.length||0)},e.extensionsToSentence=e=>{const t=e.map((e=>`.${e.toUpperCase()}`)),n=t.indexOf(".JPG");return n>-1&&t.splice(n+1,0,".JPEG"),new Intl.ListFormat("en-GB",{style:"long",type:"disjunction"}).format(t)},e.fileExtensionToMimeType=e=>{switch(e.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"heic":return"image/heic";case"heif":return"image/heif";case"webp":return"image/webp"}},e.getType=async e=>{const t=await e.arrayBuffer(),n=await async function(e){return(new tm).fromBuffer(e)}(t);if(!n&&e.type.startsWith("text")){const t=e.name||".txt";return{mime:e.type,ext:t.substring(t.lastIndexOf(".")+1,t.length)}}return n},e.deduplicateFileName=(t,n,r,i=r,a=1)=>{if(t.filter(((e,t)=>t!==n)).includes(r)){const o=i.split("."),s=o.pop();return s?(r=o.join(".").concat(` (${a}).`).concat(s),e.deduplicateFileName(t,n,r,i,++a)):r}return r},e.sanitizeFileName=e=>{const t=e.split(".");let n,r;2===t.length&&""===t[0]?r=e:t.length>1?(n=t.pop(),r=t.join(".")):r=t.join(".");let i=r.replace(/[^\u0020-\u007E]*/g,"");return i||(i="file"),n?`${i}.${n}`:`${i}`},e.blobToFile=(e,t)=>{const{name:n,lastModified:r}=t;return new File([e],n,{type:e.type,lastModified:r})}}(exports.FileHelper||(exports.FileHelper={}));const nm={COMMON:{FIELD_REQUIRED:"This field is required.",REQUIRED_OPTION:"An option is required.",REQUIRED_OPTIONS:"Both options are required."},CONTACT:{INVALID_SINGAPORE_NUMBER:"Invalid Singapore number.",INVALID_INTERNATIONAL_NUMBER:"Invalid international number."},DATE:{MUST_BE_FUTURE:"Date must be in the future.",MUST_BE_PAST:"Date must be in the past.",CANNOT_BE_FUTURE:"Date cannot be in the future.",CANNOT_BE_PAST:"Date cannot be in the past.",MIN_DATE:e=>`Date cannot be earlier than ${e}.`,MAX_DATE:e=>`Date cannot be later than ${e}.`,DISABLED_DATES:"Date is not allowed.",INVALID:"Invalid date.",WITHIN_DAYS:e=>{const{numberOfDays:t,fromDate:n}=e,r=Math.abs(t);return`Date must be within ${r} ${1!==r?"days":"day"} ${t>0?"from":"prior to"} ${n?` ${n}`:" today"}.`},BEYOND_DAYS:e=>{const{numberOfDays:t,fromDate:n}=e,r=Math.abs(t);return`Date must be beyond ${r} ${1!==r?"days":"day"} ${t>0?"from":"prior to"} ${n?` ${n}`:" today"}.`}},DATE_RANGE:{MUST_BE_FUTURE:"Dates must be in the future.",MUST_BE_PAST:"Dates must be in the past.",CANNOT_BE_FUTURE:"Dates cannot be in the future.",CANNOT_BE_PAST:"Dates cannot be in the past.",MIN_DATE:e=>`Dates cannot be earlier than ${e}.`,MAX_DATE:e=>`Dates cannot be later than ${e}.`,DISABLED_DATES:"Date range should not include disabled dates.",INVALID:"Invalid dates",REQUIRED:"Both dates are required",MUST_HAVE_NUMBER_OF_DAYS:e=>`Selection should have ${e} days.`},EMAIL:{INVALID:"Invalid email address."},ESIGNATURE:{UPLOAD:"Signature not uploaded."},GENERIC:{INVALID:"Invalid input",UNSUPPORTED:"This component is not supported by the engine."},UPLOAD:(t="file",n=`${t}s`)=>({REQUIRED:`Upload at least 1 ${t}.`,MAX_FILES:e=>`Upload failed. You can only upload a maximum of ${e} ${1!==e?n:t}.`,MAX_FILES_WITH_REMAINING:e=>`Upload failed. You can only upload ${e} more ${1===e?t:n}. To upload more ${n}, you may wish to delete your previously uploaded ${n}.`,MAX_FILE_SIZE:e=>`Upload failed. ${kh(t)} exceeds the maximum size of ${e} KB.`,GENERIC:"Upload failed. Please try again.",FILE_TYPE:e=>`Upload failed. Only ${exports.FileHelper.extensionsToSentence(e)} files are accepted.`,UPLOADING:`Please wait for all ${n} to finish uploading.`,MODAL:{FILE_TYPE:{TITLE:`Unsupported ${t} format`,DESCRIPTION:(t,n)=>e.jsxs(e.Fragment,{children:[t," could not be uploaded. Try again with a"," ",exports.FileHelper.extensionsToSentence(n)," file."]})},GENERIC_ERROR:{TITLE:`${kh(t)} not uploaded`,DESCRIPTION:t=>e.jsxs(e.Fragment,{children:["There was a problem uploading ",t,". Please try again."]})},MAX_FILE_SIZE:{TITLE:`${kh(t)} exceeds maximum size`,DESCRIPTION:(t,n)=>e.jsxs(e.Fragment,{children:[t," exceeds the maximum size of ",n," KB."]})}}}),SLIDER:{MUST_BE_INCREMENTAL:"Input must be incremental."},UNIT_NUMBER:{INVALID:"Invalid unit number."},LOCATION:{MUST_HAVE_POSTAL_CODE:"Selected location must have postal code."},ARRAY_FIELD:{INVALID:"One or more of the sections is incomplete",REQUIRED:"At least one section must be filled in"}};var rm;!function(e){function t(e,t,n){if(e)try{const r=Kd.ofPattern(t).withResolverStyle(qc.STRICT).withLocale(Zp.ENGLISH);switch(n){case"date":return gf.parse(e,r);case"time":return vf.parse(e,r);case"datetime":return _f.parse(e,r);default:return}}catch(e){return}}function n(e){const{numberOfDays:n,fromDate:r,dateFormat:i="uuuu-MM-dd"}=e,a=r&&t(r,i,"date")||gf.now();return n>=0?{startDate:a,endDate:a.plusDays(n)}:{startDate:a.plusDays(n),endDate:a}}e.formatDateTime=(e,t,n,r)=>{if(e)try{const i=Kd.ofPattern(t).withResolverStyle(qc.STRICT).withLocale(Zp.ENGLISH);switch(n){case"date":return gf.parse(e).format(i);case"time":return vf.parse(e).format(i);case"datetime":return _f.parse(e).format(i);default:return r||nm.GENERIC.INVALID}}catch(e){return r||nm.GENERIC.INVALID}},e.toLocalDateOrTime=t,e.calculateWithinDaysRange=n,e.calculateDisabledWithinDaysRange=function(e){const{numberOfDays:t,inclusive:r}=e,{startDate:i,endDate:a}=n(e);return t>=0?{startDate:r?i:i.plusDays(1),endDate:a}:{startDate:i,endDate:r?a:a.minusDays(1)}},e.calculateDisabledBeyondDaysRange=function(e){const{numberOfDays:n,fromDate:r,dateFormat:i="uuuu-MM-dd"}=e,a=r&&t(r,i,"date")||gf.now(),o={startDate:void 0,endDate:void 0};return n>=0?o.startDate=a.plusDays(n+1):o.endDate=a.plusDays(n-1),o},e.checkWithinDays=function(e,r){if(!e)return!0;const{dateFormat:i="uuuu-MM-dd"}=r,a=t(e,i,"date");if(!a)return!1;const{startDate:o,endDate:s}=n(r),{numberOfDays:u,inclusive:l}=r;if(u>=0){const e=l?o.minusDays(1):o,t=s.plusDays(1);return a.isAfter(e)&&a.isBefore(t)}{const e=o.minusDays(1),t=l?s.plusDays(1):s;return a.isAfter(e)&&a.isBefore(t)}},e.checkBeyondDays=function(e,n){if(!e)return!0;const{dateFormat:r="uuuu-MM-dd"}=n,i=t(e,r,"date");if(!i)return!1;const{numberOfDays:a,fromDate:o}=n,s=o&&t(o,r,"date")||gf.now();return a>=0?i.isAfter(s.plusDays(a)):i.isBefore(s.plusDays(a))}}(rm||(rm={})),exports.GeoLocationHelper=void 0,function(e){const t=async(e,t)=>new Promise(((n,r)=>{"geolocation"in navigator?navigator.geolocation.getCurrentPosition((({coords:e})=>n({lat:e.latitude,lng:e.longitude})),(e=>r(e)),{enableHighAccuracy:!0,timeout:e,maximumAge:t}):r(new Error("geolocation not supported in this browser"))}));e.getCurrentLocation=async(e={})=>{const{maxAttempts:n=3,timeout:r=2e3,maximumAge:i=2e3}=e;let a=0;do{a++;try{return await t(r,i)}catch(e){if(a>=n||!e||e.code!==e.TIMEOUT)throw e}}while(a<n);throw"Failed to get current location"}}(exports.GeoLocationHelper||(exports.GeoLocationHelper={}));const im=()=>Array(5).fill(0).map((()=>Math.random().toString(36).slice(2))).join("");class am{constructor(e){if(function(e){return"object"!=typeof e||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}function om(e,t,n){try{return new DataView(e,t,n)}catch(r){return new am(e,t,n)}}function sm(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return dm(r)}function um(e,t){const n=[];let r=0;for(;t+r<e.byteLength;){const i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return dm(n)}function lm(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),dm(r)}function cm(e,t){const n=e.getUint8(t);return[n,sm(e,t+1,n)]}function dm(e){return e.map((e=>String.fromCharCode(e))).join("")}function fm(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function pm(e,t,n){let r=!1;Object.defineProperty(e,t,{get:()=>(r||(r=!0,Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n.apply(e),writable:!0})),e[t]),configurable:!0,enumerable:!0})}function hm(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),((e,t)=>e+String.fromCharCode(t)),"")):"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function mm(e,t){return new Array(t+1).join(e)}const gm=void 0;function ym(e,t,n,r="string"){if(0===t&&"function"==typeof DecompressionStream){const t=new DecompressionStream("deflate"),i=new Blob([e]).stream().pipeThrough(t);return"dataview"===r?new Response(i).arrayBuffer().then((e=>new DataView(e))):new Response(i).arrayBuffer().then((e=>new TextDecoder(n).decode(e)))}return void 0!==t?Promise.reject(`Unknown compression method ${t}.`):e}var _m=!0,vm=!0;function bm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Em(e){if(e.length>=8){const t=bm(e.slice(0,8));if("ASCII\0\0\0"===t)return bm(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function Sm(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const Am=18761,xm=19789;var wm={BIG_ENDIAN:xm,LITTLE_ENDIAN:Am,getByteOrder:function(e,t){if(e.getUint16(t)===Am)return Am;if(e.getUint16(t)===xm)return xm;throw new Error("Illegal byte order value. Faulty image.")}};var Tm={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===wm.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};var Mm={isJpegFile:function(e){return!!e&&e.byteLength>=Om&&e.getUint16(0)===Cm},findJpegOffsets:function(e){let t,n,r,i,a,o,s,u,l,c=Nm;for(;c+Dm+5<=e.byteLength;){if(ug(e,c))t=e.getUint16(c+Lm),n=c+Lm;else if(lg(e,c))t=e.getUint16(c+Lm),r=c+Lm;else if(fg(e,c))t=e.getUint16(c+Lm),i=c+Im;else if(pg(e,c))t=e.getUint16(c+Lm),a=c+km;else if(hg(e,c))s||(s=[]),t=e.getUint16(c+Lm),s.push(gg(c,t));else if(mg(e,c))s||(s=[]),t=e.getUint16(c+Lm),s.push(yg(c,t));else if(_g(e,c))t=e.getUint16(c+Lm),o=c+$m;else if(cg(e,c)){t=e.getUint16(c+Lm);const n=c+zm,r=t-(zm-Lm),i=e.getUint8(c+Zm),a=e.getUint8(c+Um);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:a})}else if(dg(e,c))t=e.getUint16(c+Lm),l=c+Pm;else{if(!vg(e,c)){if(bg(e,c)){c++;continue}break}t=e.getUint16(c+Lm)}c+=Lm+t}return{hasAppMarkers:c>Nm,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:a,iptcDataOffset:o,xmpChunks:s,iccChunks:u,mpfDataOffset:l}}};const Om=2,Cm=65496,Nm=2,Dm=4,Lm=2,Im=2,km=10,$m=18,Rm=33,Fm=79,zm=18,Pm=8,jm="ICC_PROFILE\0",Zm=Dm+jm.length,Um=Zm+1,Bm="MPF\0",Vm=65472,Hm=65474,Gm=65476,Ym=65499,Wm=65501,qm=65498,Km=65504,Jm=65505,Xm=65506,Qm=65517,eg=65519,tg=65534,ng=65535,rg="JFIF",ig="Exif",ag="http://ns.adobe.com/xap/1.0/\0",og="http://ns.adobe.com/xmp/extension/\0",sg="Photoshop 3.0";function ug(e,t){return e.getUint16(t)===Vm}function lg(e,t){return e.getUint16(t)===Hm}function cg(e,t){const n=jm.length;return e.getUint16(t)===Xm&&sm(e,t+Dm,n)===jm}function dg(e,t){const n=Bm.length;return e.getUint16(t)===Xm&&sm(e,t+Dm,n)===Bm}function fg(e,t){const n=rg.length;return e.getUint16(t)===Km&&sm(e,t+Dm,n)===rg&&0===e.getUint8(t+Dm+n)}function pg(e,t){const n=ig.length;return e.getUint16(t)===Jm&&sm(e,t+Dm,n)===ig&&0===e.getUint8(t+Dm+n)}function hg(e,t){return e.getUint16(t)===Jm&&function(e,t){const n=ag.length;return sm(e,t+Dm,n)===ag}(e,t)}function mg(e,t){return e.getUint16(t)===Jm&&function(e,t){const n=og.length;return sm(e,t+Dm,n)===og}(e,t)}function gg(e,t){return{dataOffset:e+Rm,length:t-(Rm-Lm)}}function yg(e,t){return{dataOffset:e+Fm,length:t-(Fm-Lm)}}function _g(e,t){const n=sg.length;return e.getUint16(t)===Qm&&sm(e,t+Dm,n)===sg&&0===e.getUint8(t+Dm+n)}function vg(e,t){const n=e.getUint16(t);return n>=Km&&n<=eg||n===tg||n===Vm||n===Hm||n===Gm||n===Ym||n===Wm||n===qm}function bg(e,t){return e.getUint16(t)===ng}var Eg={isPngFile:function(e){return!!e&&sm(e,0,Sg.length)===Sg},findPngOffsets:function(e,t){const n={hasAppMarkers:!1};let r=Sg.length;for(;r+Ag+xg<=e.byteLength;){if(Rg(e,r))n.hasAppMarkers=!0,n.pngHeaderOffset=r+Mg;else if(Fg(e,r)){const t=Ug(e,r);void 0!==t&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:t,length:e.getUint32(r+wg)-(t-(r+Mg))}])}else if(zg(e,r,t)){n.hasAppMarkers=!0;const t=sm(e,r+Tg,xg);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+wg),type:t,offset:r+Mg})}else if(Pg(e,r))n.hasAppMarkers=!0,n.tiffHeaderOffset=r+Mg;else if(t&&jg(e,r)){n.hasAppMarkers=!0;const t=e.getUint32(r+wg),i=r+Mg,{profileName:a,compressionMethod:o,compressedProfileOffset:s}=Bg(e,i);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:t-(s-i),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:o})}else Zg(e,r)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+wg));r+=e.getUint32(r+wg)+Ag+xg+4}return n}};const Sg="‰PNG\r\n\n",Ag=4,xg=4,wg=0,Tg=Ag,Mg=Ag+xg,Og="XML:com.adobe.xmp\0",Cg="tEXt",Ng="iTXt",Dg="zTXt",Lg="pHYs",Ig="tIME",kg="eXIf",$g="iCCP";function Rg(e,t){return"IHDR"===sm(e,t+Tg,xg)}function Fg(e,t){return sm(e,t+Tg,xg)===Ng&&sm(e,t+Mg,Og.length)===Og}function zg(e,t,n){const r=sm(e,t+Tg,xg);return r===Cg||r===Ng||r===Dg&&n}function Pg(e,t){return sm(e,t+Tg,xg)===kg}function jg(e,t){return sm(e,t+Tg,xg)===$g}function Zg(e,t){const n=[Lg,Ig],r=sm(e,t+Tg,xg);return n.includes(r)}function Ug(e,t){t+=Mg+Og.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Bg(e,t){const n=um(e,t);t+=n.length+1;return{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function Vg(e,t,n,r){const{offsets:i,sizes:a}=function(e,t){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};e<2?(n.itemCount=2,n.item.itemId=2):2===e&&(n.itemCount=4,n.item.itemId=4);n.item.constructionMethod=1===e||2===e?2:0;const r={offsetSize:t,lengthSize:t,baseOffsetSize:t+1,indexSize:t+1};return r.itemCount=t+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}(t,n+3),o=e.getUint8(i.offsetSize)>>4;a.item.extent.extentOffset=o;const s=15&e.getUint8(i.lengthSize);a.item.extent.extentLength=s;const u=e.getUint8(i.baseOffsetSize)>>4;a.item.baseOffset=u;const l=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t);return}(e,i.indexSize,t);a.item.extent.extentIndex=void 0!==l?l:0;const c=function(e,t,n){if(n<2)return e.getUint16(t);if(2===n)return e.getUint32(t);return}(e,i.itemCount,t);return{type:"iloc",items:Hg(e,t,i,a,o,s,l,c),length:r}}function Hg(e,t,n,r,i,a,o,s){if(void 0===s)return[];const u=[];let l=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=Gg(e,l,t),l+=r.item.itemId,n.constructionMethod=1===t||2===t?15&e.getUint16(l):void 0,l+=r.item.constructionMethod,n.dataReferenceIndex=e.getUint16(l),l+=r.item.dataReferenceIndex,n.baseOffset=Wg(e,l,r.item.baseOffset),l+=r.item.baseOffset,n.extentCount=e.getUint16(l),l+=r.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=Yg(e,t,l,o),l+=r.item.extent.extentIndex,s.extentOffset=Wg(e,l,i),l+=r.item.extent.extentOffset,s.extentLength=Wg(e,l,a),l+=r.item.extent.extentLength,n.extents.push(s)}u.push(n)}return u}function Gg(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function Yg(e,t,n,r){if((1===t||2===t)&&r>0)return Wg(e,n,r)}function Wg(e,t,n){return 4===n?e.getUint32(t):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(e,t){return e.getUint32(t+4)}(e,t)):0}const qg=1165519206,Kg=1835625829,Jg=1970432288;function Xg(e,t){const{length:n,contentOffset:r}=function(e,t){const n=4,r=4,i=8,a=12,o=e.getUint32(t);if(function(e){return 0===e}(o))return{length:e.byteLength-t,contentOffset:t+n+r};if(function(e){return 1===e}(o)&&function(e,t){const n=8;return 0===e.getUint32(t+n)}(e,t))return{length:e.getUint32(t+a),contentOffset:t+n+r+i};return{length:o,contentOffset:t+n+r}}(e,t);if(n<8)return;const i=e.getUint32(t+4);if(1718909296===i)return function(e,t,n){const r=sm(e,t,4);return{type:"ftyp",majorBrand:r,length:n}}(e,r,n);if(1768977008===i)return function(e,t,n,r){return{type:"iprp",subBoxes:ny(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1768973167===i)return function(e,t,n,r){return{type:"ipco",properties:ny(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1668246642===i)return function(e,t,n){return{type:"colr",icc:ty(e,t),length:n}}(e,r,n);const a=e.getUint8(r);return 1835365473===i?function(e,t,n,r){const i=3;return{type:"meta",subBoxes:ny(e,n+i,r-(n+i-t)),length:r}}(e,t,r+1,n):1768714083===i?Vg(e,a,r+1,n):1768517222===i?function(e,t,n,r,i){const{offsets:a}=function(e,t){const n={entryCount:t+3},r={};r.entryCount=0===e?2:4;return n.itemInfos=n.entryCount+r.entryCount,{offsets:n}}(n,r);return{type:"iinf",itemInfos:ny(e,a.itemInfos,i-(a.itemInfos-t)),length:i}}(e,t,a,r+1,n):1768842853===i?function(e,t,n,r,i){r+=3;const a={type:"infe",length:i};0!==n&&1!==n||(a.itemId=e.getUint16(r),r+=2,a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemName=um(e,r),r+=a.itemName.length+1);n>=2&&(2===n?(a.itemId=e.getUint16(r),r+=2):3===n&&(a.itemId=e.getUint32(r),r+=4),a.itemProtectionIndex=e.getUint16(r),r+=2,a.itemType=e.getUint32(r),r+=4,a.itemName=um(e,r),r+=a.itemName.length+1,a.itemType===Kg?(a.contentType=um(e,r),t+i>(r+=a.contentType.length+1)&&(a.contentEncoding=um(e,r),r+=a.contentEncoding.length+1)):a.itemType===Jg&&(a.itemUri=um(e,r),r+=a.itemUri.length+1));return a}(e,t,a,r+1,n):{type:void 0,length:n}}function Qg(e){{const t={},n=function(e){const t=4,n=4;let r=0;for(;r+t+n<=e.byteLength;){const t=Xg(e,r);if(void 0===t)break;if("meta"===t.type)return t;r+=t.length}return}(e);return n?(t.tiffHeaderOffset=function(e,t){try{const n=function(e){return e.subBoxes.find((e=>"iinf"===e.type)).itemInfos.find((e=>e.itemType===qg))}(t).itemId,r=ey(t,n);return function(e,t){return t+4+e.getUint32(t)}(e,r.baseOffset+r.extents[0].extentOffset)}catch(e){return}}(e,n),t.xmpChunks=function(e){try{const t=function(e){return e.subBoxes.find((e=>"iinf"===e.type)).itemInfos.find((e=>e.itemType===Kg&&"application/rdf+xml"===e.contentType))}(e).itemId,n=ey(e,t),r=ey(e,t).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch(e){return}}(n),t.iccChunks=function(e){try{const t=e.subBoxes.find((e=>"iprp"===e.type)).subBoxes.find((e=>"ipco"===e.type)).properties.find((e=>"colr"===e.type)).icc;if(t)return[t]}catch(e){}return}(n),t.hasAppMarkers=void 0!==t.tiffHeaderOffset||void 0!==t.xmpChunks||void 0!==t.iccChunks,t):{hasAppMarkers:!1}}}function ey(e,t){return e.subBoxes.find((e=>"iloc"===e.type)).items.find((e=>e.itemId===t))}function ty(e,t){const n=sm(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function ny(e,t,n){const r=[qg,Kg],i=[];let a=t;for(;a<t+n;){const t=Xg(e,a);if(void 0===t)break;void 0===t.type||void 0!==t.itemType&&-1===r.indexOf(t.itemType)||i.push(t),a+=t.length}return i}var ry={isHeicFile:function(e){if(!e)return!1;const t=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Xg(e,0);return n&&-1!==t.indexOf(n.majorBrand)}catch(e){return!1}},findHeicOffsets:function(e){return Qg(e)}};var iy={isAvifFile:function(e){if(!e)return!1;try{const t=Xg(e,0);return t&&"avif"===t.majorBrand}catch(e){return!1}},findAvifOffsets:function(e){return Qg(e)}};var ay={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&sm(e,0,4)===t&&sm(e,8,4)===n},findOffsets:function(e){const t="Exif\0\0";let n,r,i,a,o=12,s=!1;for(;o+8<e.byteLength;){const u=sm(e,o,4),l=e.getUint32(o+4,!0);"EXIF"===u?(s=!0,n=sm(e,o+8,6)===t?o+8+6:o+8):"XMP "===u?(s=!0,r=[{dataOffset:o+8,length:l}]):"ICCP"===u?(s=!0,i=[{offset:o+8,length:l,chunkNumber:1,chunksTotal:1}]):"VP8X"===u&&(s=!0,a=o+8),o+=8+(l%2==0?l:l+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:r,iccChunks:i,vp8xChunkOffset:a}}};var oy={isGifFile:function(e){return!!e&&uy.includes(sm(e,0,sy))},findOffsets:function(){return{gifHeaderOffset:0}}};const sy=6,uy=["GIF87a","GIF89a"];var ly={isXMLFile:function(e){return!!e&&sm(e,cy,dy.length)===dy},findOffsets:function(e){const t=[];return t.push({dataOffset:cy,length:e.byteLength}),{xmpChunks:t}}};const cy=0,dy="<?xpacket begin";var fy={parseAppMarkers:function(e,t){if(Tm.isTiffFile(e))return py(Tm.findTiffOffsets(),"tiff","TIFF");if(Mm.isJpegFile(e))return py(Mm.findJpegOffsets(e),"jpeg","JPEG");if(Eg.isPngFile(e))return py(Eg.findPngOffsets(e,t),"png","PNG");if(ry.isHeicFile(e))return py(ry.findHeicOffsets(e),"heic","HEIC");if(iy.isAvifFile(e))return py(iy.findAvifOffsets(e),"avif","AVIF");if(ay.isWebpFile(e))return py(ay.findOffsets(e),"webp","WebP");if(oy.isGifFile(e))return py(oy.findOffsets(e),"gif","GIF");if(ly.isXMLFile(e))return py(ly.findOffsets(e),"xml","XML");throw new Error("Invalid image format")}};function py(e,t,n){return fm({},e,{fileType:{value:t,description:n}})}var hy={ApertureValue:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2),ColorSpace:e=>1===e?"sRGB":65535===e?"Uncalibrated":"Unknown",ComponentsConfiguration:e=>e.map((e=>49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0)).join(""),Contrast:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",CustomRendered:e=>0===e?"Normal process":1===e?"Custom process":"Unknown",ExposureMode:e=>0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown",ExposureProgram:e=>0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown",ExposureTime(e){if(e[0]/e[1]>.25){const t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 0!==e[0]?`1/${Math.round(e[1]/e[0])}`:`0/${e[1]}`},FNumber:e=>"f/"+e[0]/e[1],FocalLength:e=>e[0]/e[1]+" mm",FocalPlaneResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",LightSource:e=>1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 – 7100K)":13===e?"Day white fluorescent (N 4600 – 5400K)":14===e?"Cool white fluorescent (W 3900 – 4500K)":15===e?"White fluorescent (WW 3200 – 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown",MeteringMode:e=>1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown",ResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",Saturation:e=>0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown",SceneCaptureType:e=>0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown",Sharpness:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",ShutterSpeedValue(e){const t=Math.pow(2,e[0]/e[1]);return t<=1?`${Math.round(1/t)}`:`1/${Math.round(t)}`},WhiteBalance:e=>0===e?"Auto white balance":1===e?"Manual white balance":"Unknown",XResolution:e=>""+Math.round(e[0]/e[1]),YResolution:e=>""+Math.round(e[0]/e[1])},my={11:"ProcessingSoftware",254:{name:"SubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown")},255:{name:"OldSubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:e=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:e=>({1:"Normal",2:"Reversed"}[e]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:e=>1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:hy.XResolution},283:{name:"YResolution",description:hy.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:e=>""+Math.round(e[0]/e[1])},287:{name:"YPosition",description:e=>""+Math.round(e[0]/e[1])},290:{name:"GrayResponseUnit",description:e=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown")},296:{name:"ResolutionUnit",description:hy.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:e=>e.map((e=>`${e[0]}/${e[1]}`)).join(", ")},319:{name:"PrimaryChromaticities",description:e=>e.map((e=>`${e[0]}/${e[1]}`)).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:e=>({1:"CMYK",2:"Not CMYK"}[e]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:e=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown")},339:{name:"SampleFormat",description:e=>{const t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((e=>t[e]||"Unknown")).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:e=>e.map((e=>""+e[0]/e[1])).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:e=>1===e?"centered":2===e?"co-sited":"undefined "+e},532:{name:"ReferenceBlackWhite",description:e=>e.map((e=>""+e[0]/e[1])).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:e=>e.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:gy},40092:{name:"XPComment",description:gy},40093:{name:"XPAuthor",description:gy},40094:{name:"XPKeywords",description:gy},40095:{name:"XPSubject",description:gy},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:e=>({0:"Unsafe",1:"Safe"}[e]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:hy.LightSource},50779:{name:"CalibrationIlluminant2",description:hy.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:e=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:e=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:e=>({0:"Linear",1:"sRGB"}[e]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:e=>({0:"Linear",1:"sRGB"}[e]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:e=>({0:"Auto",1:"None"}[e]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function gy(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}var yy={33434:{name:"ExposureTime",description:hy.ExposureTime},33437:{name:"FNumber",description:hy.FNumber},34850:{name:"ExposureProgram",description:hy.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:e=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:e=>bm(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:hy.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:hy.ShutterSpeedValue},37378:{name:"ApertureValue",description:hy.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},37382:{name:"SubjectDistance",description:e=>e[0]/e[1]+" m"},37383:{name:"MeteringMode",description:hy.MeteringMode},37384:{name:"LightSource",description:hy.LightSource},37385:{name:"Flash",description:e=>0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:hy.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:e=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:e=>2===e.length?`Location; X: ${e[0]}, Y: ${e[1]}`:3===e.length?`Circle; X: ${e[0]}, Y: ${e[1]}, diameter: ${e[2]}`:4===e.length?`Rectangle; X: ${e[0]}, Y: ${e[1]}, width: ${e[2]}, height: ${e[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:Em},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:e=>e[0]/e[1]+" °C"},37889:{name:"Humidity",description:e=>e[0]/e[1]+" %"},37890:{name:"Pressure",description:e=>e[0]/e[1]+" hPa"},37891:{name:"WaterDepth",description:e=>e[0]/e[1]+" m"},37892:{name:"Acceleration",description:e=>e[0]/e[1]+" mGal"},37893:{name:"CameraElevationAngle",description:e=>e[0]/e[1]+" °"},40960:{name:"FlashpixVersion",description:e=>e.map((e=>String.fromCharCode(e))).join("")},40961:{name:"ColorSpace",description:hy.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:hy.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([e,t])=>`X: ${e}, Y: ${t}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:e=>1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:e=>3===e?"DSC":"Unknown"},41729:{name:"SceneType",description:e=>1===e?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:hy.CustomRendered},41986:{name:"ExposureMode",description:hy.ExposureMode},41987:{name:"WhiteBalance",description:hy.WhiteBalance},41988:{name:"DigitalZoomRatio",description:e=>0===e[0]?"Digital zoom was not used":""+e[0]/e[1]},41989:{name:"FocalLengthIn35mmFilm",description:e=>0===e?"Unknown":e},41990:{name:"SceneCaptureType",description:hy.SceneCaptureType},41991:{name:"GainControl",description:e=>0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"},41992:{name:"Contrast",description:hy.Contrast},41993:{name:"Saturation",description:hy.Saturation},41994:{name:"Sharpness",description:hy.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:e=>1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:e=>{const t=`${parseFloat((e[0][0]/e[0][1]).toFixed(5))}-${parseFloat((e[1][0]/e[1][1]).toFixed(5))} mm`;if(0===e[3][1])return`${t} f/?`;const n=1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]));return`${t} f/${parseFloat(n.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:e=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},_y={0:{name:"GPSVersionID",description:e=>2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:e=>{const t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:Sm},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Sm},5:{name:"GPSAltitudeRef",description:e=>0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:e=>e[0]/e[1]+" m"},7:{name:"GPSTimeStamp",description:e=>e.map((([e,t])=>{const n=e/t;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n})).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:e=>{const t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:e=>{const t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:e=>{const t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:e=>{const t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},23:{name:"GPSDestBearingRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:e=>{const t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:Em},28:{name:"GPSAreaInformation",description:Em},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},vy={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>bm(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},by={45056:{name:"MPFVersion",description:e=>bm(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};const Ey=fm({},my,yy),Sy="0th",Ay="1st",xy="exif",wy="gps",Ty="interoperability",My="mpf",Oy="canon";var Cy={[Sy]:Ey,[Ay]:my,[xy]:Ey,[wy]:_y,[Ty]:vy,[My]:by,[Oy]:{4:{name:"ShotInfo",description:e=>e}}};const Ny={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Dy={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13};var Ly={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:Iy,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===wm.LITTLE_ENDIAN)},getLongAt:ky,getRationalAt:function(e,t,n){return[ky(e,t,n),ky(e,t+4,n)]},getUndefinedAt:function(e,t){return Iy(e,t)},getSlongAt:$y,getSrationalAt:function(e,t,n){return[$y(e,t,n),$y(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return ky(e,t,n)},typeSizes:Ny,tagTypes:Dy,getTypeSize:function(e){if(void 0===Dy[e])throw new Error("No such type found.");return Ny[Dy[e]]}};function Iy(e,t){return e.getUint8(t)}function ky(e,t,n){return e.getUint32(t,n===wm.LITTLE_ENDIAN)}function $y(e,t,n){return e.getInt32(t,n===wm.LITTLE_ENDIAN)}const Ry={1:Ly.getByteAt,2:Ly.getAsciiAt,3:Ly.getShortAt,4:Ly.getLongAt,5:Ly.getRationalAt,7:Ly.getUndefinedAt,9:Ly.getSlongAt,10:Ly.getSrationalAt,13:Ly.getIfdPointerAt};function Fy(e,t,n){return t+Ly.getLongAt(e,t+4,n)}function zy(e,t,n,r,i,a){const o=Ly.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+Ly.getTypeSize("SHORT")<=e.byteLength)return Ly.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(let o=0;o<u&&!(r+12>e.byteLength);o++){const o=Py(e,t,n,r,i,a);void 0!==o&&(s[o.name]={id:o.id,value:o.value,description:o.description},"MakerNote"===o.name&&(s[o.name].__offset=o.__offset)),r+=12}if(r<e.byteLength-Ly.getTypeSize("LONG")){const o=Ly.getLongAt(e,r,i);0!==o&&t===Sy&&(s.Thumbnail=zy(e,"1st",n,n+o,i,a))}return s}function Py(e,t,n,r,i,a){const o=Ly.getTypeSize("SHORT"),s=o+Ly.getTypeSize("SHORT"),u=s+Ly.getTypeSize("LONG"),l=Ly.getShortAt(e,r,i),c=Ly.getShortAt(e,r+o,i),d=Ly.getLongAt(e,r+s,i);let f,p;if(void 0===Ly.typeSizes[c]||!a&&void 0===Cy[t][l])return;if(function(e,t){return Ly.typeSizes[e]*t<=Ly.getTypeSize("LONG")}(c,d))p=r+u,f=jy(e,p,c,d,i);else if(p=Ly.getLongAt(e,r+u,i),function(e,t,n,r,i){return t+n+Ly.typeSizes[r]*i<=e.byteLength}(e,n,p,c,d)){f=jy(e,n+p,c,d,i,33723===l)}else f="<faulty value>";c===Ly.tagTypes.ASCII&&(f=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(f),f=function(e){try{return e.map((e=>decodeURIComponent(escape(e))))}catch(t){return e}}(f));let h=`undefined-${l}`,m=f;if(void 0!==Cy[t][l])if(void 0!==Cy[t][l].name&&void 0!==Cy[t][l].description){h=Cy[t][l].name;try{m=Cy[t][l].description(f)}catch(e){m=Zy(f)}}else c===Ly.tagTypes.RATIONAL||c===Ly.tagTypes.SRATIONAL?(h=Cy[t][l],m=""+f[0]/f[1]):(h=Cy[t][l],m=Zy(f));return{id:l,name:h,value:f,description:m,__offset:p}}function jy(e,t,n,r,i,a=!1){let o=[];a&&(r*=Ly.typeSizes[n],n=Ly.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(Ry[n](e,t,i)),t+=Ly.typeSizes[n];return n===Ly.tagTypes.ASCII?o=Ly.getAsciiValue(o):1===o.length&&(o=o[0]),o}function Zy(e){return e instanceof Array?e.join(", "):e}const Uy="Exif IFD Pointer",By="GPS Info IFD Pointer",Vy="Interoperability IFD Pointer";var Hy={read:function(e,t,n){const r=wm.getByteOrder(e,t);let i=function(e,t,n,r){return zy(e,Sy,t,Fy(e,t,n),n,r)}(e,t,r,n);return i=Gy(i,e,t,r,n),i=Yy(i,e,t,r,n),i=Wy(i,e,t,r,n),{tags:i,byteOrder:r}}};function Gy(e,t,n,r,i){return void 0!==e[Uy]?fm(e,zy(t,xy,n,n+e[Uy].value,r,i)):e}function Yy(e,t,n,r,i){return void 0!==e[By]?fm(e,zy(t,"gps",n,n+e[By].value,r,i)):e}function Wy(e,t,n,r,i){return void 0!==e[Vy]?fm(e,zy(t,Ty,n,n+e[Vy].value,r,i)):e}var qy={read:function(e,t,n){const r=wm.getByteOrder(e,t),i=zy(e,"mpf",t,Fy(e,t,r),r,n);return function(e,t,n,r){if(!n.MPEntry)return n;const i=[];for(let a=0;a<Math.ceil(n.MPEntry.value.length/Ky);a++){i[a]={};const o=Jy(n.MPEntry.value,a*Ky,Ly.getTypeSize("LONG"),r);i[a].ImageFlags=Xy(o),i[a].ImageFormat=Qy(o),i[a].ImageType=e_(o);const s=Jy(n.MPEntry.value,a*Ky+4,Ly.getTypeSize("LONG"),r);i[a].ImageSize={value:s,description:""+s};const u=t_(a,n.MPEntry,r,t);i[a].ImageOffset={value:u,description:""+u};const l=Jy(n.MPEntry.value,a*Ky+12,Ly.getTypeSize("SHORT"),r);i[a].DependentImage1EntryNumber={value:l,description:""+l};const c=Jy(n.MPEntry.value,a*Ky+14,Ly.getTypeSize("SHORT"),r);i[a].DependentImage2EntryNumber={value:c,description:""+c},i[a].image=e.buffer.slice(u,u+s),pm(i[a],"base64",(function(){return hm(this.image)}))}return n.Images=i,n}(e,t,i,r)}};const Ky=16;function Jy(e,t,n,r){if(r===wm.LITTLE_ENDIAN){let r=0;for(let i=0;i<n;i++)r+=e[t+i]<<8*i;return r}let i=0;for(let r=0;r<n;r++)i+=e[t+r]<<8*(n-1-r);return i}function Xy(e){const t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function Qy(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function e_(e){const t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function t_(e,t,n,r){return function(e){return 0===e}(e)?0:Jy(t.value,e*Ky+8,Ly.getTypeSize("LONG"),n)+r}var n_={read:function(e,t){const n=function(e,t){return Ly.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=Ly.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":r_(e,t,n),"Image Height":i_(e,t,n),"Image Width":a_(e,t,n),"Color Components":r,Subsampling:r&&o_(e,t,r.value,n)}}};function r_(e,t,n){if(3>n)return;const r=Ly.getByteAt(e,t+2);return{value:r,description:""+r}}function i_(e,t,n){if(5>n)return;const r=Ly.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function a_(e,t,n){if(7>n)return;const r=Ly.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function o_(e,t,n,r){if(8+3*n>r)return;const i=[];for(let r=0;r<n;r++){const n=t+8+3*r;i.push([Ly.getByteAt(e,n),Ly.getByteAt(e,n+1),Ly.getByteAt(e,n+2)])}return{value:i,description:i.length>1?s_(i)+u_(i):""}}function s_(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function u_(e){const t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var l_={read:function(e,t){const n=function(e,t){return Ly.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=Ly.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),i=function(e,t,n){const r=15;if(r+1>n)return;const i=Ly.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),a={"JFIF Version":c_(e,t,n),"Resolution Unit":d_(e,t,n),XResolution:p_(e,t,n),YResolution:h_(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){const o=function(e,t,n,r){const i=16;if(0===n||i+n>r)return;const a=e.buffer.slice(t+i,t+i+n);return{value:a,description:"<24-bit RGB pixel data>"}}(e,t,3*r.value*i.value,n);o&&(a["JFIF Thumbnail"]=o)}for(const e in a)void 0===a[e]&&delete a[e];return a}};function c_(e,t,n){if(9>n)return;const r=Ly.getByteAt(e,t+7),i=Ly.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function d_(e,t,n){if(10>n)return;const r=Ly.getByteAt(e,t+9);return{value:r,description:f_(r)}}function f_(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function p_(e,t,n){if(12>n)return;const r=Ly.getShortAt(e,t+10);return{value:r,description:""+r}}function h_(e,t,n){if(14>n)return;const r=Ly.getShortAt(e,t+12);return{value:r,description:""+r}}var m_={iptc:{256:{name:"Model Version",description:e=>((e[0]<<8)+e[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:e=>((e[0]<<8)+e[1]).toString()},278:{name:"File Format Version",description:e=>((e[0]<<8)+e[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:g_},336:{name:"Time Sent",description:y_},346:{name:"Coded Character Set",description:__,encoding_name:__},356:"UNO",376:{name:"ARM Identifier",description:e=>((e[0]<<8)+e[1]).toString()},378:{name:"ARM Version",description:e=>((e[0]<<8)+e[1]).toString()},512:{name:"Record Version",description:e=>((e[0]<<8)+e[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:e=>"01"===bm(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=bm(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:e=>{const t=bm(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:g_},572:{name:"Time Created",description:y_},574:{name:"Digital Creation Date",description:g_},575:{name:"Digital Creation Time",description:y_},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=bm(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:e=>e},642:"Image Type",643:{name:"Image Orientation",description:e=>{const t=bm(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=bm(e),n=t.charAt(0),r=t.charAt(1);let i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:e=>parseInt(bm(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(bm(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=bm(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:e=>2===e.length?"ObjectData Preview File Format":"Record 2 destination",description:e=>{if(2===e.length){const t=(e[0]<<8)+e[1];return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":`Unknown format ${t}`}return bm(e)}},713:{name:"ObjectData Preview File Format Version",description:(e,t)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=bm(e);if(t["ObjectData Preview File Format"]){const e=bm(t["ObjectData Preview File Format"].value);if(n[e]&&n[e][r])return n[e][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:e=>e[0].toString()},1812:{name:"Max Subfile Size",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function g_(e){const t=bm(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function y_(e){const t=bm(e);let n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function __(e){const t=bm(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}var v_={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var b_={decode:function(e,t){const n=v_.get();if(void 0!==n&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer:Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((e=>String.fromCharCode(e))).join(""))},TAG_HEADER_SIZE:5};var E_={read:function(e,t,n){try{if(Array.isArray(e))return w_(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);const{naaBlock:r,dataOffset:i}=function(e,t){for(;t+12<=e.byteLength;){const n=S_(e,t);if(A_(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+x_(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return w_(e,r,i,n)}catch(e){return{}}}};function S_(e,t){if(943868237!==e.getUint32(t,!1))throw new Error("Not an IPTC resource block.");const n=e.getUint8(t+4+2),r=(n%2==0?n+1:n)+1;return{headerSize:6+r+4,type:e.getUint16(t+4),size:e.getUint32(t+4+2+r)}}function A_(e){return 1028===e.type}function x_(e){return e.size%2!=0?1:0}function w_(e,t,n,r){const i={};let a;const o=n+t.size;for(;n<o&&n<e.byteLength;){const{tag:t,tagSize:o}=T_(e,n,i,a,r);if(null===t)break;t&&("encoding"in t&&(a=t.encoding),void 0===i[t.name]||void 0===t.repeatable?i[t.name]={id:t.id,value:t.value,description:t.description}:(i[t.name]instanceof Array||(i[t.name]=[{id:i[t.name].id,value:i[t.name].value,description:i[t.name].description}]),i[t.name].push({id:t.id,value:t.value,description:t.description}))),n+=5+o}return i}function T_(e,t,n,r,i){if(function(e,t){const n=28;return e.getUint8(t)!==n}(e,t))return{tag:null,tagSize:0};const a=e.getUint16(t+1),o=e.getUint16(t+3);if(!i&&!m_.iptc[a])return{tag:void 0,tagSize:o};const s=function(e,t,n){const r=[];for(let i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,o),u={id:a,name:M_(m_.iptc[a],a,s),value:s,description:O_(m_.iptc[a],s,n,r)};return function(e){return m_.iptc[e]&&m_.iptc[e].repeatable}(a)&&(u.repeatable=!0),function(e){return m_.iptc[e]&&void 0!==m_.iptc[e].encoding_name}(a)&&(u.encoding=m_.iptc[a].encoding_name(s)),{tag:u,tagSize:o}}function M_(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:`undefined-${t}`}function O_(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?b_.decode(r,t):t}var C_={"tiff:Orientation":e=>"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e,"tiff:ResolutionUnit":e=>hy.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>N_(hy.XResolution,e),"tiff:YResolution":e=>N_(hy.YResolution,e),"exif:ApertureValue":e=>N_(hy.ApertureValue,e),"exif:GPSLatitude":L_,"exif:GPSLongitude":L_,"exif:FNumber":e=>N_(hy.FNumber,e),"exif:FocalLength":e=>N_(hy.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>hy.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>hy.ColorSpace(function(e){if("0x"===e.substring(0,2))return parseInt(e.substring(2),16);return parseInt(e,10)}(e)),"exif:ComponentsConfiguration"(e,t){if(/^\d, \d, \d, \d$/.test(t)){const e=t.split(", ").map((e=>e.charCodeAt(0)));return hy.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>hy.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>hy.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>hy.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>hy.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>D_(e)?hy.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>hy.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>hy.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>hy.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>hy.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>N_(hy.ShutterSpeedValue,e),"exif:WhiteBalance":e=>hy.WhiteBalance(parseInt(e,10))};function N_(e,t){return D_(t)?e(t.split("/")):t}function D_(e){return/^-?\d+\/-?\d+$/.test(e)}function L_(e){const[t,n]=e.split(",");if(void 0!==t&&void 0!==n){const e=parseFloat(t),r=parseFloat(n),i=n.charAt(n.length-1);if(!Number.isNaN(e)&&!Number.isNaN(r))return""+(e+r/60)+i}return e}var I_={get:function(){if("undefined"!=typeof DOMParser)return new DOMParser;try{const{DOMParser:e,onErrorStopParsing:t}=__non_webpack_require__("@xmldom/xmldom");return new e({onError:t})}catch(e){return}}};var k_={read:function(e,t){const n={};if("string"==typeof e)return R_(n,e),n;const[r,i]=function(e,t){if(0===t.length)return[];const n=[$_(e,t.slice(0,1))];t.length>1&&n.push($_(e,t.slice(1)));return n}(e,t),a=R_(n,r);if(i){const r=R_(n,i);a||r||(delete n._raw,R_(n,$_(e,t)))}return n}};function $_(e,t){const n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);let i=0;for(let n=0;n<t.length;n++){const a=t[n],o=e.buffer.slice(a.dataOffset,a.dataOffset+a.length);r.set(new Uint8Array(o),i),i+=a.length}return new DataView(r.buffer)}function R_(e,t){try{const{doc:n,raw:r}=function(e){const t=I_.get();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const n="string"==typeof e?e:sm(e,0,e.byteLength),r=t.parseFromString((i=n,i.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")),"application/xml");var i;if("parsererror"===r.documentElement.nodeName)throw new Error(r.documentElement.textContent);return{doc:r,raw:n}}(t);e._raw=(e._raw||"")+r;return fm(e,j_(z_(F_(n),!0))),!0}catch(e){return!1}}function F_(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return F_(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function z_(e,t=!1){const n=function(e){const t=[];for(let n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(r=n).length&&"#text"===r[0].nodeName?t?{}:function(e){return e.nodeValue}(n[0]):function(e){const t={};return e.forEach((e=>{if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){const n=function(e){return{attributes:P_(e),value:z_(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}(n);var r}function P_(e){const t={};for(let n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}function j_(e){const t={};if("string"==typeof e)return e;for(const n in e){let r=e[n];Array.isArray(r)||(r=[r]),r.forEach((e=>{fm(t,Z_(e.attributes)),"object"==typeof e.value&&fm(t,Y_(e.value))}))}return t}function Z_(e){const t={};for(const n in e)try{U_(n)&&(t[V_(n)]={value:e[n],attributes:{},description:H_(e[n],n)})}catch(e){}return t}function U_(e){return"rdf:parseType"!==e&&!B_(e)}function B_(e){return"xmlns"===e.split(":")[0]}function V_(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function H_(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?H_(e.value):H_(e))).join(", ")}(e);return t&&"function"==typeof C_[t]?C_[t](e,n):n}if("object"==typeof e)return function(e){const t=[];for(const n in e)t.push(`${G_(n)}: ${H_(e[n].value)}`);return t.join("; ")}(e);try{return t&&"function"==typeof C_[t]?C_[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function G_(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function Y_(e){const t={};for(const n in e)try{B_(n)||(t[V_(n)]=W_(e[n],n))}catch(e){}return t}function W_(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return rv(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:q_(e)?K_(e,t):X_(e)?Q_(e,t):ev(e)?tv(e,t):function(e){return void 0!==nv(e.value)}(e)?function(e,t){let n=nv(e.value).value["rdf:li"];const r=J_(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(q_(e))return K_(e);if(X_(e))return Q_(e).value;if(ev(e))return tv(e).value;return rv(e)}(e))})),{value:i,attributes:r,description:H_(i,t)}}(e,t):rv(e,t)}function q_(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function K_(e,t){const n=J_(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),fm(n,J_(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||B_(n)||(t[V_(n)]=e.value[n].value);return t}(e));const r=function(e){return iv(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:H_(r,t)}}function J_(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||B_(n)||(t[V_(n)]=e.attributes[n]);return t}function X_(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Q_(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(fm(n.value,Z_(e.value["rdf:Description"].attributes)),fm(n.attributes,J_(e)),e=e.value["rdf:Description"]),fm(n.value,Y_(e.value)),n.description=H_(n.value,t),n}function ev(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function tv(e,t){const n=Z_(e.attributes);return{value:n,attributes:{},description:H_(n,t)}}function nv(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function rv(e,t){const n=iv(e)||j_(e.value);return{value:n,attributes:J_(e),description:H_(n,t)}}function iv(e){return e.attributes&&e.attributes["rdf:resource"]}const av=0,ov=1,sv=2,uv=3,lv=4,cv=5,dv=6,fv=7,pv=8;var hv={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=Ly.getShortAt(e,r);mv[i]&&(t[i]||(t[i]=mv[i].description),n.push({type:i,path:mv[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description(e){const[,t]=cm(e,0);return t}}};const mv={[av]:{description:"Closed subpath length",path:(e,t)=>[Ly.getShortAt(e,t)]},[ov]:{description:"Closed subpath Bezier knot, linked",path:gv},[sv]:{description:"Closed subpath Bezier knot, unlinked",path:gv},[uv]:{description:"Open subpath length",path:(e,t)=>[Ly.getShortAt(e,t)]},[lv]:{description:"Open subpath Bezier knot, linked",path:gv},[cv]:{description:"Open subpath Bezier knot, unlinked",path:gv},[dv]:{description:"Path fill rule",path:()=>[]},[pv]:{description:"Initial fill rule",path:(e,t)=>[Ly.getShortAt(e,t)]},[fv]:{description:"Clipboard",path:function(e,t){return[[_v(e,t,8),_v(e,t+4,8),_v(e,t+8,8),_v(e,t+12,8)],_v(e,t+16,8)]}}};function gv(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(yv(e,t+r));return n}function yv(e,t){const n=_v(e,t,8);return[_v(e,t+4,8),n]}function _v(e,t,n){const r=Ly.getLongAt(e,t),i=r>>>31==0?1:-1,a=(2130706432&r)>>>32-n,o=r&parseInt(mm("1",32-n),2);return i*function(e,t){return parseInt(e.replace(".",""),t)/Math.pow(t,(e.split(".")[1]||"").length)}(a.toString(2)+"."+function(e,t,n){return mm(n,t-e.length)+e}(o.toString(2),32-n,"0"),2)}var vv={read:function(e,t){const n=om(new Uint8Array(e).buffer),r={};let i=0;for(;i<e.length;){const e=sm(n,i,Av);i+=Av;const a=Ly.getShortAt(n,i);i+=Ev;const{tagName:o,tagNameSize:s}=xv(n,i);i+=s;const u=Ly.getLongAt(n,i);if(i+=Sv,e===bv){const e=om(n.buffer,i,u),s={id:a,value:sm(e,0,u)};if(hv[a]){try{s.description=hv[a].description(e)}catch(e){s.description="<no description formatter>"}r[o||hv[a].name]=s}else t&&(r[`undefined-${a}`]=s)}i+=u+u%2}return r}};const bv="8BIM",Ev=2,Sv=4,Av=bv.length;function xv(e,t){const[n,r]=cm(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const wv={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},Tv={4:{name:"Preferred CMM type",value:(e,t)=>sm(e,t,4),description:e=>null!==e?Mv(e):""},8:{name:"Profile Version",value:(e,t)=>e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)},12:{name:"Profile/Device class",value:(e,t)=>sm(e,t,4),description:e=>{switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:(e,t)=>sm(e,t,4)},20:{name:"Connection Space",value:(e,t)=>sm(e,t,4)},24:{name:"ICC Profile Date",value:(e,t)=>function(e,t){const n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),a=e.getUint16(t+6),o=e.getUint16(t+8),s=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,a,o,s))}(e,t).toISOString()},36:{name:"ICC Signature",value:(e,t)=>{return n=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(n));var n}},40:{name:"Primary Platform",value:(e,t)=>sm(e,t,4),description:e=>Mv(e)},48:{name:"Device Manufacturer",value:(e,t)=>sm(e,t,4),description:e=>Mv(e)},52:{name:"Device Model Number",value:(e,t)=>sm(e,t,4)},64:{name:"Rendering Intent",value:(e,t)=>e.getUint32(t),description:e=>{switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:(e,t)=>sm(e,t,4)}};function Mv(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var Ov={read:function(e,t,n){if(n&&t[0].compressionMethod!==gm)return function(e,t){if(n=t[0].compressionMethod,0!==n)return{};var n;const r=new DataView(e.buffer.slice(t[0].offset,t[0].offset+t[0].length));return ym(r,t[0].compressionMethod,"utf-8","dataview").then(zv).catch((()=>({})))}(e,t);return function(e,t){try{const n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);let i=0;const a=function(e){if(Array.isArray(e))return new DataView(Uint8Array.from(e).buffer).buffer;return e.buffer}(e);for(let e=1;e<=t.length;e++){const n=t.find((t=>t.chunkNumber===e));if(!n)throw new Error(`ICC chunk ${e} not found`);const o=a.slice(n.offset,n.offset+n.length),s=new Uint8Array(o);r.set(s,i),i+=s.length}return zv(new DataView(r.buffer))}catch(e){return{}}}(e,t)}};const Cv=84,Nv=128,Dv="acsp",Lv="desc",Iv="mluc",kv="text",$v="sig ",Rv=12;function Fv(e,t){return e.length<t+Rv}function zv(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<Cv)throw new Error("ICC profile too short");const r={},i=Object.keys(Tv);for(let t=0;t<i.length;t++){const n=i[t],a=Tv[n],o=a.value(e,parseInt(n,10));let s=o;a.description&&(s=a.description(o)),r[a.name]={value:o,description:s}}if(Pv(t.slice(36,40))!==Dv)throw new Error("ICC profile: missing signature");if(function(e){return e.length<Nv+4}(t))return r;const a=e.getUint32(128);let o=132;for(let n=0;n<a;n++){if(Fv(t,o))return r;const n=sm(e,o,4),i=e.getUint32(o+4),a=e.getUint32(o+8);if(i>t.length)return r;const s=sm(e,i,4);if(s===Lv){const o=e.getUint32(i+8);if(o>a)return r;jv(r,n,Pv(t.slice(i+12,i+o+11)))}else if(s===Iv){const t=e.getUint32(i+8),a=e.getUint32(i+12);let o=i+16;const s=[];for(let n=0;n<t;n++){const t=sm(e,o+0,2),n=sm(e,o+2,2),r=e.getUint32(o+4),u=e.getUint32(o+8),l=lm(e,i+u,r);s.push({languageCode:t,countryCode:n,text:l}),o+=a}if(1===t)jv(r,n,s[0].text);else{const e={};for(let t=0;t<s.length;t++)e[`${s[t].languageCode}-${s[t].countryCode}`]=s[t].text;jv(r,n,e)}}else if(s===kv){jv(r,n,Pv(t.slice(i+8,i+a-7)))}else if(s===$v){jv(r,n,Pv(t.slice(i+8,i+12)))}o+=12}return r}function Pv(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function jv(e,t,n){wv[t]?e[wv[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const Zv=27;var Uv={read:function(e,t,n,r,i){let a=zy(e,Oy,t,t+n,r,i);a.ShotInfo&&(a=fm({},a,function(e){const t={};void 0!==e[27]&&(t.AutoRotate={value:e[27],description:Bv(e[27])});return t}(a.ShotInfo.value)),delete a.ShotInfo);return a},SHOT_INFO_AUTO_ROTATE:Zv};function Bv(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var Vv={read:function(e,t){return{"Image Width":Hv(e,t),"Image Height":Gv(e,t),"Bit Depth":Yv(e,t),"Color Type":Wv(e,t),Compression:qv(e,t),Filter:Kv(e,t),Interlace:Jv(e,t)}}};function Hv(e,t){if(t+0+4>e.byteLength)return;const n=Ly.getLongAt(e,t);return{value:n,description:`${n}px`}}function Gv(e,t){if(t+4+4>e.byteLength)return;const n=Ly.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function Yv(e,t){if(t+8+1>e.byteLength)return;const n=Ly.getByteAt(e,t+8);return{value:n,description:`${n}`}}function Wv(e,t){if(t+9+1>e.byteLength)return;const n=Ly.getByteAt(e,t+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function qv(e,t){if(t+10+1>e.byteLength)return;const n=Ly.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function Kv(e,t){if(t+11+1>e.byteLength)return;const n=Ly.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function Jv(e,t){if(t+12+1>e.byteLength)return;const n=Ly.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}var Xv={read:function(e,t,n,r){const i={},a=[];for(let o=0;o<t.length;o++){const{offset:s,length:u,type:l}=t[o],c=sb(e,s,u,l,n);if(c instanceof Promise)a.push(c.then((({name:e,value:t,description:n})=>{try{if(_m&&pb(e,t))return{__exif:Hy.read(mb(t),ob,r).tags};if(vm&&hb(e,t))return{__iptc:E_.read(mb(t),0,r)};if(e&&!pb(e,t)&&!hb(e,t))return{[e]:{value:t,description:n}}}catch(e){}return{}})));else{const{name:e,value:t,description:n}=c;e&&(i[e]={value:t,description:n})}}return{readTags:i,readTagsPromise:a.length>0?Promise.all(a):void 0}}};const Qv="STATE_KEYWORD",eb="STATE_COMPRESSION",tb="STATE_LANG",nb="STATE_TRANSLATED_KEYWORD",rb="STATE_TEXT",ib=1,ab=1,ob=6;function sb(e,t,n,r,i){const a=[],o=[];let s,u=Qv,l=gm;for(let i=0;i<n&&t+i<e.byteLength;i++){if(u===eb){l=ub({type:r,dataView:e,offset:t+i}),r===Ng&&(i+=ib),u=lb(r,u);continue}if(u===rb){s=new DataView(e.buffer.slice(t+i,t+n));break}const c=e.getUint8(t+i);0===c?u=lb(r,u):u===Qv?a.push(c):u===tb&&o.push(c)}if(l!==gm&&!i)return{};const c=ym(s,l,function(e){if(e===Cg||e===Dg)return"latin1";return"utf-8"}(r));return c instanceof Promise?c.then((e=>cb(e,r,o,a))).catch((()=>cb("<text using unknown compression>".split(""),r,o,a))):cb(c,r,o,a)}function ub({type:e,dataView:t,offset:n}){if(e===Ng){if(t.getUint8(n)===ab)return t.getUint8(n+1)}else if(e===Dg)return t.getUint8(n);return gm}function lb(e,t){return t===Qv&&[Ng,Dg].includes(e)?eb:t===eb?e===Ng?tb:rb:t===tb?nb:rb}function cb(e,t,n,r){const i=function(e){if(e instanceof DataView)return sm(e,0,e.byteLength);return e}(e);return{name:db(t,n,r),value:i,description:t===Ng?fb(e):i}}function db(e,t,n){const r=dm(n);if(e===Cg||0===t.length)return r;return`${r} (${dm(t)})`}function fb(e){return b_.decode("UTF-8",e)}function pb(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function hb(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function mb(e){return function(e){const t=new DataView(new ArrayBuffer(e.length/2));for(let n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}var gb={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=Ly.getLongAt(e,t[r]+wg),a=sm(e,t[r]+Tg,xg);a===Lg?(n["Pixels Per Unit X"]=yb(e,t[r],i),n["Pixels Per Unit Y"]=_b(e,t[r],i),n["Pixel Units"]=vb(e,t[r],i)):a===Ig&&(n["Modify Date"]=bb(e,t[r],i))}return n}};function yb(e,t,n){if(!Eb(e,t,n,0,4))return;const r=Ly.getLongAt(e,t+Mg+0);return{value:r,description:""+r}}function _b(e,t,n){if(!Eb(e,t,n,4,4))return;const r=Ly.getLongAt(e,t+Mg+4);return{value:r,description:""+r}}function vb(e,t,n){if(!Eb(e,t,n,8,1))return;const r=Ly.getByteAt(e,t+Mg+8);return{value:r,description:1===r?"meters":"Unknown"}}function bb(e,t,n){if(!Eb(e,t,n,0,7))return;const r=Ly.getShortAt(e,t+Mg),i=Ly.getByteAt(e,t+Mg+2),a=Ly.getByteAt(e,t+Mg+3),o=Ly.getByteAt(e,t+Mg+4),s=Ly.getByteAt(e,t+Mg+5),u=Ly.getByteAt(e,t+Mg+6);return{value:[r,i,a,o,s,u],description:`${Sb(r,4)}-${Sb(i,2)}-${Sb(a,2)} ${Sb(o,2)}:${Sb(s,2)}:${Sb(u,2)}`}}function Eb(e,t,n,r,i){return r+i<=n&&t+Mg+r+i<=e.byteLength}function Sb(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}var Ab={read:function(e,t){const n={},r=Ly.getByteAt(e,t);return n.Alpha=Tb(r),n.Animation=Mb(r),n.ImageWidth=Ob(e,t+xb),n.ImageHeight=Ob(e,t+wb),n}};const xb=4,wb=7;function Tb(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function Mb(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function Ob(e,t){const n=Ly.getByteAt(e,t)+256*Ly.getByteAt(e,t+1)+65536*Ly.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Cb={read:function(e){return{"GIF Version":Nb(e),"Image Width":Db(e),"Image Height":Lb(e),"Global Color Map":Ib(e),"Bits Per Pixel":$b(e),"Color Resolution Depth":kb(e)}}};function Nb(e){if(6>e.byteLength)return;const t=sm(e,3,3);return{value:t,description:t}}function Db(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function Lb(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function Ib(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function kb(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function $b(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const Rb=[6,7,99];var Fb={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||Rb.includes(r.Compression.value))&&r.JPEGInterchangeFormat&&r.JPEGInterchangeFormat.value&&r.JPEGInterchangeFormatLength&&r.JPEGInterchangeFormatLength.value){t.type="image/jpeg";const r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),pm(t,"base64",(function(){return hm(this.image)}))}var r;return t}};function zb(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}zb.prototype=new Error;var Pb,jb,Zb={MetadataMissingError:zb},Ub={load:function(e,t={}){if(function(e){return"string"==typeof e}(e))return t.async=!0,function(e,t){if(/^\w+:\/\//.test(e))return"undefined"!=typeof fetch?function(e,{length:t}={}){const n={method:"GET"};Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-"+(t-1)});return fetch(e,n).then((e=>e.arrayBuffer()))}(e,t):function(e,{length:t}={}){return new Promise(((n,r)=>{const i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-"+(t-1)});const a=function(e){if(/^https:\/\//.test(e))return __non_webpack_require__("https").get;return __non_webpack_require__("http").get}(e);a(e,i,(e=>{if(e.statusCode>=200&&e.statusCode<=299){const t=[];e.on("data",(e=>t.push(Buffer.from(e)))),e.on("error",(e=>r(e))),e.on("end",(()=>n(Buffer.concat(t))))}else r(`Could not fetch file: ${e.statusCode} ${e.statusMessage}`),e.resume()})).on("error",(e=>r(e)))}))}(e,t);if(function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e))return Promise.resolve(function(e){const t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer;if("undefined"==typeof Buffer)return;return void 0!==Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}const n=decodeURIComponent(t);return"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(e=>e.charCodeAt(0))).buffer}(e));return function(e,{length:t}={}){return new Promise(((n,r)=>{const i=function(){try{return __non_webpack_require__("fs")}catch(e){return}}();i.open(e,((a,o)=>{a?r(a):i.stat(e,((a,s)=>{if(a)r(a);else{const a=Math.min(s.size,void 0!==t?t:s.size),u=Buffer.alloc(a),l={buffer:u,length:a};i.read(o,l,(t=>{t?r(t):i.close(o,(t=>{t&&console.warn(`Could not close file ${e}:`,t),n(u)}))}))}}))}))}))}(e,t)}(e,t).then((e=>Bb(e,t)));if(function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e))return t.async=!0,(n=e,new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>e(t.target.result),r.onerror=()=>t(r.error),r.readAsArrayBuffer(n)}))).then((e=>Bb(e,t)));var n;return Bb(e,t)},loadView:Vb,errors:Zb};function Bb(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),Vb(function(e){try{return new DataView(e)}catch(t){return new am(e)}}(e),t)}function Vb(e,{expanded:t=!1,async:n=!1,includeUnknown:r=!1}={expanded:!1,async:!1,includeUnknown:!1}){let i=!1,a={};const o=[],{fileType:s,fileDataOffset:u,jfifDataOffset:l,tiffHeaderOffset:c,iptcDataOffset:d,xmpChunks:f,iccChunks:p,mpfDataOffset:h,pngHeaderOffset:m,pngTextChunks:g,pngChunkOffsets:y,vp8xChunkOffset:_,gifHeaderOffset:v}=fy.parseAppMarkers(e,n);if(function(e){return void 0!==e}(u)){i=!0;const n=n_.read(e,u);t?a.file=n:a=fm({},a,n)}if(function(e){return void 0!==e}(l)){i=!0;const n=l_.read(e,l);t?a.jfif=n:a=fm({},a,n)}if(function(e){return void 0!==e}(c)){i=!0;const{tags:n,byteOrder:o}=Hy.read(e,c,r);if(n.Thumbnail&&(a.Thumbnail=n.Thumbnail,delete n.Thumbnail),t?(a.exif=n,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=Sm(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=Sm(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(a)):a=fm({},a,n),n["IPTC-NAA"]&&!Hb(d)){const e=E_.read(n["IPTC-NAA"].value,0,r);t?a.iptc=e:a=fm({},a,e)}if(n.ApplicationNotes&&!Gb(f)){const e=k_.read(dm(n.ApplicationNotes.value));t?a.xmp=e:(delete e._raw,a=fm({},a,e))}if(n.ImageSourceData){const e=vv.read(n.PhotoshopSettings.value,r);t?a.photoshop=e:a=fm({},a,e)}if(n.ICC_Profile&&!Yb(p)){const e=Ov.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?a.icc=e:a=fm({},a,e)}if(function(e){return e.Make&&e.Make.value&&Array.isArray(e.Make.value)&&"Canon"===e.Make.value[0]&&e.MakerNote&&e.MakerNote.__offset}(n)){const i=Uv.read(e,c,n.MakerNote.__offset,o,r);t?a.makerNotes=i:a=fm({},a,i)}n.MakerNote&&delete n.MakerNote.__offset}if(Hb(d)){i=!0;const n=E_.read(e,d,r);t?a.iptc=n:a=fm({},a,n)}if(Gb(f)){i=!0;const n=k_.read(e,f);t?a.xmp=n:(delete n._raw,a=fm({},a,n))}if(Yb(p)){i=!0;const t=Ov.read(e,p,n);t instanceof Promise?o.push(t.then(E)):E(t)}if(function(e){return void 0!==e}(h)){i=!0;const n=qy.read(e,h,r);t?a.mpf=n:a=fm({},a,n)}if(void 0!==m){i=!0;const n=Vv.read(e,m);t?(a.png=a.png?fm({},a.png,n):n,a.pngFile=n):a=fm({},a,n)}if(function(e){return void 0!==e}(g)){i=!0;const{readTags:t,readTagsPromise:a}=Xv.read(e,g,n,r);S(t),a&&o.push(a.then((e=>e.forEach(S))))}if(function(e){return void 0!==e}(y)){i=!0;const n=gb.read(e,y);t?a.png=a.png?fm({},a.png,n):n:a=fm({},a,n)}if(function(e){return void 0!==e}(_)){i=!0;const n=Ab.read(e,_);t?a.riff=a.riff?fm({},a.riff,n):n:a=fm({},a,n)}if(function(e){return void 0!==e}(v)){i=!0;const n=Cb.read(e,v);t?a.gif=a.gif?fm({},a.gif,n):n:a=fm({},a,n)}const b=Fb.get(e,a.Thumbnail,c);if(b?(i=!0,a.Thumbnail=b):delete a.Thumbnail,s&&(t?(a.file||(a.file={}),a.file.FileType=s):a.FileType=s,i=!0),!i)throw new Zb.MetadataMissingError;return n?Promise.all(o).then((()=>a)):a;function E(e){t?a.icc=e:a=fm({},a,e)}function S(e){if(t){for(const t of["exif","iptc"]){const n=`__${t}`;e[n]&&(a[t]=a[t]?fm({},a.exif,e[n]):e[n],delete e[n])}a.png=a.png?fm({},a.png,e):e,a.pngText=a.pngText?fm({},a.png,e):e}else a=fm({},a,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e),delete a.__exif,delete a.__iptc}}function Hb(e){return void 0!==e}function Gb(e){return Array.isArray(e)&&e.length>0}function Yb(e){return Array.isArray(e)&&e.length>0}exports.ImageHelper=void 0,(Pb=exports.ImageHelper||(exports.ImageHelper={})).convertBlob=async(e,t="image/jpeg")=>{const n=(await exports.FileHelper.getType(e)).mime;if("image/heic"===n||"image/heif"===n){const{heicTo:n}=await Promise.resolve().then((function(){return require("./heic-to.cfb16ea4.js")}));e=await n({blob:e,type:t})}const r=await Pb.blobToImage(e),i=document.createElement("canvas");return i.width=r.width,i.height=r.height,i.getContext("2d").drawImage(r,0,0),i.toDataURL(t)},Pb.dataUrlToImage=async e=>new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("dataURLtoImage(): dataURL is illegal")),r.src=e})),Pb.blobToImage=async e=>{const t=URL.createObjectURL(e);return new Promise(((e,n)=>{const r=new Image;r.onload=()=>{URL.revokeObjectURL(t),e(r)},r.onerror=()=>n(new Error("blobToImage(): blob is illegal")),r.src=t}))},Pb.resampleImage=async(e,t)=>{const{crop:n,scale:r,width:i,height:a,quality:o=1,type:s="image/jpeg"}=t,u=document.createElement("canvas"),l=u.getContext("2d");if(r)u.width=e.width*r,u.height=e.height*r,l.drawImage(e,0,0,u.width,u.height);else if(i&&a){u.width=i,u.height=a;let t=e.height/a*i,r=e.height,o=(e.width-t)/2,s=0;(n&&e.height>e.width||!n&&e.height<e.width)&&(t=e.width,r=e.width/i*a,o=0,s=(e.height-r)/2),l.drawImage(e,o,s,t,r,0,0,i,a)}return new Promise((e=>u.toBlob((t=>e(t)),s,o)))},Pb.compressImage=async(e,t)=>{const{quality:n=1,fileSize:r,attempts:i=0,maxAttempts:a}=t,o=await Pb.blobToImage(e);if(e.size<=1024*r||n<0)return e;const s=await Pb.resampleImage(o,{scale:1,quality:n});return s.size>1024*r&&(i<a||!a)?Pb.compressImage(e,{...t,quality:n-.1,attempts:i+1}):s},Pb.getMetadata=async e=>{try{const t=await Ub.load(e),n=t.DateTimeOriginal?.description,r=Number(t.GPSLongitude?.description),i=Number(t.GPSLatitude?.description),a=isNaN(r)?void 0:Number(r);return{dateTimeOriginal:n,lat:isNaN(i)?void 0:Number(i),lng:a}}catch{}},function(e){e.degreesToRadians=e=>Math.PI*e/180,e.radiansToDegrees=e=>180*e/Math.PI,e.nauticalMilesToMetres=e=>1852*e}(jb||(jb={}));var Wb=wi,qb=Ka,Kb=Hr,Jb=Gr,Xb=Oi,Qb=Yr.exports,eE=vi,tE=li,nE=Object.prototype.hasOwnProperty;var rE=function(e){if(null==e)return!0;if(Xb(e)&&(Jb(e)||"string"==typeof e||"function"==typeof e.splice||Qb(e)||tE(e)||Kb(e)))return!e.length;var t=qb(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(eE(e))return!Wb(e).length;for(var n in e)if(nE.call(e,n))return!1;return!0};var iE,aE,oE=function(e){return null==e};!function(e){e.upsert=(e,t,n)=>{const r={...e};return r[t]=t in r?{...r[t],...n}:n,r},e.getNestedValueByKey=(t,n,r={})=>{const{skipRoot:i,searchIn:a}=r;if(!i&&n in t)return{[n]:t[n]};for(const[i,o]of Object.entries(t))if(o&&"object"==typeof o&&!Array.isArray(o)&&(!a||a.includes(i))){const t=e.getNestedValueByKey(o,n,{...r,skipRoot:!1});if(!rE(t))return t}},e.removeNil=t=>{if(null!==t){if(Array.isArray(t)){const n=t.map((t=>e.removeNil(t))).filter((e=>e));return n.length?n:void 0}if("object"==typeof t){const n={...t};return Object.entries(n).forEach((([t,r])=>{const i=e.removeNil(r);oE(i)?delete n[t]:n[t]=i})),rE(n)?void 0:n}return t}}}(iE||(iE={})),exports.TestHelper=void 0,(aE=exports.TestHelper||(exports.TestHelper={})).generateId=(e,t,n)=>{let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r},aE.getError=e=>{try{return e()}catch(e){return e}},exports.WindowHelper=void 0,(exports.WindowHelper||(exports.WindowHelper={})).isMobileView=()=>window.innerWidth<=n.MediaWidths.mobileL||window.innerWidth>window.innerHeight&&window.innerHeight<n.MediaWidths.mobileL;const sE=t.createContext({formValidationConfig:null,setFormValidationConfig:()=>null,warnings:null,setWarnings:()=>null,yupId:null}),uE=({children:n})=>{const[r,i]=t.useState(),[a,o]=t.useState(),[s]=t.useState(im()),u=t.useMemo((()=>({formValidationConfig:r,setFormValidationConfig:i,warnings:a,setWarnings:o,yupId:s})),[r,a,s]);return e.jsx(sE.Provider,{value:u,children:n})};var lE=fr,cE=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},dE=function(e){return this.__data__.has(e)};function fE(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new lE;++t<n;)this.add(e[t])}fE.prototype.add=fE.prototype.push=cE,fE.prototype.has=dE;var pE=fE;var hE=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1};var mE=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},gE=hE,yE=function(e){return e!=e},_E=mE;var vE=function(e,t,n){return t==t?_E(e,t,n):gE(e,yE,n)},bE=vE;var EE=function(e,t){return!!(null==e?0:e.length)&&bE(e,t,0)>-1};var SE=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1};var AE=function(e,t){return e.has(t)},xE=pE,wE=EE,TE=SE,ME=Hp,OE=ri,CE=AE,NE=Math.min;var DE=function(e,t,n){for(var r=n?TE:wE,i=e[0].length,a=e.length,o=a,s=Array(a),u=1/0,l=[];o--;){var c=e[o];o&&t&&(c=ME(c,OE(t))),u=NE(c.length,u),s[o]=!n&&(t||i>=120&&c.length>=120)?new xE(o&&c):void 0}c=e[0];var d=-1,f=s[0];e:for(;++d<i&&l.length<u;){var p=c[d],h=t?t(p):p;if(p=n||0!==p?p:0,!(f?CE(f,h):r(l,h,n))){for(o=a;--o;){var m=s[o];if(!(m?CE(m,h):r(e[o],h,n)))continue e}f&&f.push(h),l.push(p)}}return l};var LE=function(e){return e};var IE=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},kE=Math.max;var $E=function(e,t,n){return t=kE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=kE(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),IE(e,this,s)}};var RE=function(e){return function(){return e}},FE=Tr,zE=FE?function(e,t){return FE(e,"toString",{configurable:!0,enumerable:!1,value:RE(t),writable:!0})}:LE,PE=zE,jE=Date.now;var ZE=function(e){var t=0,n=0;return function(){var r=jE(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(PE),UE=LE,BE=$E,VE=ZE;var HE=function(e,t){return VE(BE(e,t,UE),e+"")},GE=Oi,YE=Fr;var WE=function(e){return YE(e)&&GE(e)},qE=WE;var KE,JE,XE=Hp,QE=DE,eS=function(e){return qE(e)?e:[]},tS=HE((function(e){var t=XE(e,eS);return t.length&&t[0]===e[0]?QE(t):[]}));try{KE=Map}catch($f){}try{JE=Set}catch($f){}function nS(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(rS);if(KE&&e instanceof KE)return new Map(Array.from(e.entries()));if(JE&&e instanceof JE)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var a=t.findIndex((function(t){return t===e[i]}));r[i]=a>-1?n[a]:nS(e[i],t,n)}return r}return e}function rS(e){return nS(e,[],[])}const iS=Object.prototype.toString,aS=Error.prototype.toString,oS=RegExp.prototype.toString,sS="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",uS=/^Symbol\((.*)\)(.*)$/;function lS(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return sS.call(e).replace(uS,"Symbol($1)");const r=iS.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+aS.call(e)+"]":"RegExp"===r?oS.call(e):null}function cS(e,t){let n=lS(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=lS(this[e],t);return null!==r?r:n}),2)}let dS={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let i=null!=r&&r!==n,a=`${e} must be a \`${t}\` type, but the final value was: \`${cS(n,!0)}\``+(i?` (cast from the value \`${cS(r,!0)}\`).`:".");return null===n&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},fS={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},pS={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hS={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},mS={isValue:"${path} field must be ${value}"},gS={noUnknown:"${path} field has unspecified keys: ${unknown}"},yS={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};var _S=Object.assign(Object.create(null),{mixed:dS,string:fS,number:pS,date:hS,object:gS,array:yS,boolean:mS}),vS=Object.prototype.hasOwnProperty;var bS=function(e,t){return null!=e&&vS.call(e,t)},ES=Gr,SS=Wp,AS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xS=/^\w*$/;var wS=function(e,t){if(ES(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!SS(e))||(xS.test(e)||!AS.test(e)||null!=t&&e in Object(t))},TS=fr;function MS(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(MS.Cache||TS),n}MS.Cache=TS;var OS=MS;var CS=function(e){var t=OS(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},NS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DS=/\\(\\)?/g,LS=CS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(NS,(function(e,n,r,i){t.push(r?i.replace(DS,"$1"):n||e)})),t})),IS=Gr,kS=wS,$S=LS,RS=nh;var FS=function(e,t){return IS(e)?e:kS(e,t)?[e]:$S(RS(e))},zS=Wp;var PS=function(e){if("string"==typeof e||zS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},jS=FS,ZS=Hr,US=Gr,BS=Kr,VS=Jr,HS=PS;var GS=function(e,t,n){for(var r=-1,i=(t=jS(t,e)).length,a=!1;++r<i;){var o=HS(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&VS(i)&&BS(o,i)&&(US(e)||ZS(e))},YS=bS,WS=GS;var qS=function(e,t){return null!=e&&WS(e,t,YS)};const KS=e=>e&&e.__isYupSchema__;class JS{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!qS(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,a="function"==typeof n?n:(...e)=>e.every((e=>e===n));this.fn=function(...e){let t=e.pop(),n=e.pop(),o=a(...e)?r:i;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!KS(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function XS(e){return null==e?[]:[].concat(e)}function QS(){return QS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QS.apply(this,arguments)}let eA=/\$\{\s*(\w+)\s*\}/g;class tA extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=QS({},t,{path:n})),"string"==typeof e?e.replace(eA,((e,n)=>cS(t[n]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],XS(e).forEach((e=>{tA.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,tA)}}function nA(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,l=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),c=r.length;const d=[];if(o=o||[],!c)return o.length?l(new tA(o,a,u)):l(null,a);for(let e=0;e<r.length;e++){(0,r[e])(i,(function(e){if(e){if(!tA.isError(e))return l(e,a);if(n)return e.value=a,l(e,a);d.push(e)}if(--c<=0){if(d.length&&(s&&d.sort(s),o.length&&d.push(...o),o=d),o.length)return void l(new tA(o,a,u),a);l(null,a)}}))}}var rA=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===n(a[u],u,a))break}return t}},iA=rA(),aA=iA,oA=Li;var sA=function(e,t){return e&&aA(e,t,oA)};var uA=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},lA=pE,cA=uA,dA=AE;var fA=function(e,t,n,r,i,a){var o=1&n,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(e),c=a.get(t);if(l&&c)return l==t&&c==e;var d=-1,f=!0,p=2&n?new lA:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=o?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!cA(t,(function(e,t){if(!dA(p,t)&&(h===e||i(h,e,n,r,a)))return p.push(t)}))){f=!1;break}}else if(h!==m&&!i(h,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var pA=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var hA=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},mA=Qa,gA=Tt,yA=fA,_A=pA,vA=hA,bA=Kt?Kt.prototype:void 0,EA=bA?bA.valueOf:void 0;var SA=function(e,t,n,r,i,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new mA(e),new mA(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return gA(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=_A;case"[object Set]":var u=1&r;if(s||(s=vA),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var c=yA(s(e),s(t),r,i,a,o);return o.delete(e),c;case"[object Symbol]":if(EA)return EA.call(e)==EA.call(t)}return!1},AA=xa,xA=Object.prototype.hasOwnProperty;var wA=function(e,t,n,r,i,a){var o=1&n,s=AA(e),u=s.length;if(u!=AA(t).length&&!o)return!1;for(var l=u;l--;){var c=s[l];if(!(o?c in t:xA.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var h=o;++l<u;){var m=e[c=s[l]],g=t[c];if(r)var y=o?r(g,m,c,t,e,a):r(m,g,c,e,t,a);if(!(void 0===y?m===g||i(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var _=e.constructor,v=t.constructor;_==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof v&&v instanceof v||(p=!1)}return a.delete(e),a.delete(t),p},TA=Ar,MA=fA,OA=SA,CA=wA,NA=Ka,DA=Gr,LA=Yr.exports,IA=li,kA="[object Arguments]",$A="[object Array]",RA="[object Object]",FA=Object.prototype.hasOwnProperty;var zA=function(e,t,n,r,i,a){var o=DA(e),s=DA(t),u=o?$A:NA(e),l=s?$A:NA(t),c=(u=u==kA?RA:u)==RA,d=(l=l==kA?RA:l)==RA,f=u==l;if(f&&LA(e)){if(!LA(t))return!1;o=!0,c=!1}if(f&&!c)return a||(a=new TA),o||IA(e)?MA(e,t,n,r,i,a):OA(e,t,u,n,r,i,a);if(!(1&n)){var p=c&&FA.call(e,"__wrapped__"),h=d&&FA.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new TA),i(m,g,n,r,a)}}return!!f&&(a||(a=new TA),CA(e,t,n,r,i,a))},PA=zA,jA=Fr;var ZA=function e(t,n,r,i,a){return t===n||(null==t||null==n||!jA(t)&&!jA(n)?t!=t&&n!=n:PA(t,n,r,i,e,a))},UA=Ar,BA=ZA;var VA=function(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var u=(s=n[i])[0],l=e[u],c=s[1];if(o&&s[2]){if(void 0===l&&!(u in e))return!1}else{var d=new UA;if(r)var f=r(l,c,u,e,t,d);if(!(void 0===f?BA(c,l,3,r,d):f))return!1}}return!0},HA=ln;var GA=function(e){return e==e&&!HA(e)},YA=GA,WA=Li;var qA=function(e){for(var t=WA(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,YA(i)]}return t};var KA=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},JA=VA,XA=qA,QA=KA;var ex=function(e){var t=XA(e);return 1==t.length&&t[0][2]?QA(t[0][0],t[0][1]):function(n){return n===e||JA(n,e,t)}},tx=FS,nx=PS;var rx=function(e,t){for(var n=0,r=(t=tx(t,e)).length;null!=e&&n<r;)e=e[nx(t[n++])];return n&&n==r?e:void 0},ix=rx;var ax=function(e,t,n){var r=null==e?void 0:ix(e,t);return void 0===r?n:r};var ox=function(e,t){return null!=e&&t in Object(e)},sx=ox,ux=GS;var lx=function(e,t){return null!=e&&ux(e,t,sx)},cx=ZA,dx=ax,fx=lx,px=wS,hx=GA,mx=KA,gx=PS;var yx=function(e,t){return px(e)&&hx(t)?mx(gx(e),t):function(n){var r=dx(n,e);return void 0===r&&r===t?fx(n,e):cx(t,r,3)}};var _x=function(e){return function(t){return null==t?void 0:t[e]}},vx=rx;var bx=function(e){return function(t){return vx(t,e)}},Ex=_x,Sx=bx,Ax=wS,xx=PS;var wx=ex,Tx=yx,Mx=LE,Ox=Gr,Cx=function(e){return Ax(e)?Ex(xx(e)):Sx(e)};var Nx=function(e){return"function"==typeof e?e:null==e?Mx:"object"==typeof e?Ox(e)?Tx(e[0],e[1]):wx(e):Cx(e)},Dx=Or,Lx=sA,Ix=Nx;var kx=function(e,t){var n={};return t=Ix(t),Lx(e,(function(e,r,i){Dx(n,r,t(e,r,i))})),n};function $x(e){this._maxSize=e,this.clear()}$x.prototype.clear=function(){this._size=0,this._values=Object.create(null)},$x.prototype.get=function(e){return this._values[e]},$x.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Rx=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Fx=/^\d+$/,zx=/^\d/,Px=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,jx=/^\s*(['"]?)(.*?)(\1)\s*$/,Zx=new $x(512),Ux=new $x(512),Bx=new $x(512),Vx={Cache:$x,split:Gx,normalizePath:Hx,setter:function(e){var t=Hx(e);return Ux.get(e)||Ux.set(e,(function(e,n){for(var r=0,i=t.length,a=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;a=a[t[r++]]}a[t[r]]=n}))},getter:function(e,t){var n=Hx(e);return Bx.get(e)||Bx.set(e,(function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(Yx(t)||Fx.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,i,a,o,s=e.length;for(i=0;i<s;i++)(r=e[i])&&(Wx(r)&&(r='"'+r+'"'),a=!(o=Yx(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:Gx(e),t,n)}};function Hx(e){return Zx.get(e)||Zx.set(e,Gx(e).map((function(e){return e.replace(jx,"$2")})))}function Gx(e){return e.match(Rx)||[""]}function Yx(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function Wx(e){return!Yx(e)&&(function(e){return e.match(zx)&&!e.match(Fx)}(e)||function(e){return Px.test(e)}(e))}const qx="$",Kx=".";class Jx{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qx,this.isValue=this.key[0]===Kx,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qx:this.isValue?Kx:"";this.path=this.key.slice(n.length),this.getter=this.path&&Vx.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function Xx(){return Xx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xx.apply(this,arguments)}function Qx(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,l=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["value","path","label","options","originalValue","sync"]);const{name:c,test:d,params:f,message:p}=e;let{parent:h,context:m}=o;function g(e){return Jx.isRef(e)?e.getValue(r,h,m):e}function y(e={}){const t=kx(Xx({value:r,originalValue:s,label:a,path:e.path||i},f,e.params),g),n=new tA(tA.formatError(e.message||p,t),r,t.path,e.type||c);return n.params=t,n}let _,v=Xx({path:i,parent:h,type:c,createError:y,resolve:g,options:o,originalValue:s},l);if(u){try{var b;if(_=d.call(v,r,v),"function"==typeof(null==(b=_)?void 0:b.then))throw new Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(e){return void n(e)}tA.isError(_)?n(_):_?n(null,_):n(y())}else try{Promise.resolve(d.call(v,r,v)).then((e=>{tA.isError(e)?n(e):e?n(null,e):n(y())})).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}Jx.prototype.__isYupRef=!0;function ew(e,t,n,r=n){let i,a,o;return t?(Vx.forEach(t,((s,u,l)=>{let c=u?(e=>e.substr(0,e.length-1).substr(1))(s):s;if((e=e.resolve({context:r,parent:i,value:n})).innerType){let r=l?parseInt(c,10):0;if(n&&r>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[r],e=e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);i=n,n=n&&n[c],e=e.fields[c]}a=c,o=u?"["+s+"]":"."+s})),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class tw{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce(((t,n)=>t.concat(Jx.isRef(n)?e(n):n)),[])}add(e){Jx.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){Jx.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new tw;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach((e=>n.add(e))),e.refs.forEach((e=>n.add(e))),t.list.forEach((e=>n.delete(e))),t.refs.forEach((e=>n.delete(e))),n}}function nw(){return nw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nw.apply(this,arguments)}class rw{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new tw,this._blacklist=new tw,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(dS.notType)})),this.type=(null==e?void 0:e.type)||"mixed",this.spec=nw({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=nw({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=rS(nw({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=nw({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce(((t,n)=>n.resolve(t,e)),t),t=t.resolve(e)}return t}cast(e,t={}){let n=this.resolve(nw({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=cS(e),a=cS(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce(((t,n)=>n.call(this,t,e,this)),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:a=[],originalValue:o=e,strict:s=this.spec.strict,abortEarly:u=this.spec.abortEarly}=t,l=e;s||(l=this._cast(l,nw({assert:!1},t)));let c={value:l,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:a},d=[];this._typeError&&d.push(this._typeError);let f=[];this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),nA({args:c,value:l,path:i,sync:r,tests:d,endEarly:u},(e=>{e?n(e,l):nA({tests:this.tests.concat(f),args:c,path:i,sync:r,value:l,endEarly:u},n)}))}validate(e,t,n){let r=this.resolve(nw({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise(((n,i)=>r._validate(e,t,((e,t)=>{e?i(e):n(t)}))))}validateSync(e,t){let n;return this.resolve(nw({},t,{value:e}))._validate(e,nw({},t,{sync:!0}),((e,t)=>{if(e)throw e;n=t})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(tA.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(tA.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):rS(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=dS.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=dS.required){return this.clone({presence:"required"}).withMutation((t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}})))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=dS.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Qx(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=XS(e).map((e=>new Jx(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new JS(r,t)),n}typeError(e){let t=this.clone();return t._typeError=Qx({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=dS.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=Qx({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=dS.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=Qx({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t))};return r}}rw.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])rw.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=ew(this,t,n,r.context);return o[e](i&&i[a],nw({},r,{parent:i,path:t}))};for(const e of["equals","is"])rw.prototype[e]=rw.prototype.oneOf;for(const e of["not","nope"])rw.prototype[e]=rw.prototype.notOneOf;rw.prototype.optional=rw.prototype.notRequired;const iw=rw;function aw(){return new iw}aw.prototype=iw.prototype;const ow=e=>null==e;function sw(){return new uw}class uw extends rw{constructor(){super({type:"boolean"}),this.withMutation((()=>{this.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=mS.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>ow(e)||!0===e})}isFalse(e=mS.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>ow(e)||!1===e})}}sw.prototype=uw.prototype;let lw=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,cw=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,dw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,fw=e=>ow(e)||e===e.trim(),pw={}.toString();function hw(){return new mw}class mw extends rw{constructor(){super({type:"string"}),this.withMutation((()=>{this.transform((function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===pw?e:t}))}))}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=fS.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return ow(t)||t.length===this.resolve(e)}})}min(e,t=fS.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ow(t)||t.length>=this.resolve(e)}})}max(e,t=fS.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return ow(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||fS.matches,params:{regex:e},test:t=>ow(t)||""===t&&i||-1!==t.search(e)})}email(e=fS.email){return this.matches(lw,{name:"email",message:e,excludeEmptyString:!0})}url(e=fS.url){return this.matches(cw,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=fS.uuid){return this.matches(dw,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=fS.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:fw})}lowercase(e=fS.lowercase){return this.transform((e=>ow(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>ow(e)||e===e.toLowerCase()})}uppercase(e=fS.uppercase){return this.transform((e=>ow(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>ow(e)||e===e.toUpperCase()})}}hw.prototype=mw.prototype;function gw(){return new yw}class yw extends rw{constructor(){super({type:"number"}),this.withMutation((()=>{this.transform((function(e){let t=e;if("string"==typeof t){if(t=t.replace(/\s/g,""),""===t)return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e)}min(e,t=pS.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ow(t)||t>=this.resolve(e)}})}max(e,t=pS.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return ow(t)||t<=this.resolve(e)}})}lessThan(e,t=pS.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return ow(t)||t<this.resolve(e)}})}moreThan(e,t=pS.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return ow(t)||t>this.resolve(e)}})}positive(e=pS.positive){return this.moreThan(0,e)}negative(e=pS.negative){return this.lessThan(0,e)}integer(e=pS.integer){return this.test({name:"integer",message:e,test:e=>ow(e)||Number.isInteger(e)})}truncate(){return this.transform((e=>ow(e)?e:0|e))}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform((t=>ow(t)?t:Math[e](t)))}}gw.prototype=yw.prototype;var _w=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let vw=new Date("");function bw(){return new Ew}class Ew extends rw{constructor(){super({type:"date"}),this.withMutation((()=>{this.transform((function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=_w.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?vw:new Date(e))}))}))}_typeCheck(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}prepareParam(e,t){let n;if(Jx.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=hS.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return ow(e)||e>=this.resolve(n)}})}max(e,t=hS.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return ow(e)||e<=this.resolve(n)}})}}Ew.INVALID_DATE=vw,bw.prototype=Ew.prototype,bw.INVALID_DATE=vw;var Sw=function(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n};var Aw=function(e){return function(t){return null==e?void 0:e[t]}},xw=Aw({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ww=nh,Tw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mw=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ow=function(e){return(e=ww(e))&&e.replace(Tw,xw).replace(Mw,"")},Cw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Nw=function(e){return e.match(Cw)||[]},Dw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Lw=function(e){return Dw.test(e)},Iw="\\ud800-\\udfff",kw="\\u2700-\\u27bf",$w="a-z\\xdf-\\xf6\\xf8-\\xff",Rw="A-Z\\xc0-\\xd6\\xd8-\\xde",Fw="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zw="["+Fw+"]",Pw="\\d+",jw="["+kw+"]",Zw="["+$w+"]",Uw="[^"+Iw+Fw+Pw+kw+$w+Rw+"]",Bw="(?:\\ud83c[\\udde6-\\uddff]){2}",Vw="[\\ud800-\\udbff][\\udc00-\\udfff]",Hw="["+Rw+"]",Gw="(?:"+Zw+"|"+Uw+")",Yw="(?:"+Hw+"|"+Uw+")",Ww="(?:['’](?:d|ll|m|re|s|t|ve))?",qw="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kw="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Jw="[\\ufe0e\\ufe0f]?",Xw=Jw+Kw+("(?:\\u200d(?:"+["[^"+Iw+"]",Bw,Vw].join("|")+")"+Jw+Kw+")*"),Qw="(?:"+[jw,Bw,Vw].join("|")+")"+Xw,eT=RegExp([Hw+"?"+Zw+"+"+Ww+"(?="+[zw,Hw,"$"].join("|")+")",Yw+"+"+qw+"(?="+[zw,Hw+Gw,"$"].join("|")+")",Hw+"?"+Gw+"+"+Ww,Hw+"+"+qw,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pw,Qw].join("|"),"g");var tT=function(e){return e.match(eT)||[]},nT=Nw,rT=Lw,iT=nh,aT=tT;var oT=function(e,t,n){return e=iT(e),void 0===(t=n?void 0:t)?rT(e)?aT(e):nT(e):e.match(t)||[]},sT=Sw,uT=Ow,lT=oT,cT=RegExp("['’]","g");var dT=function(e){return function(t){return sT(lT(uT(t).replace(cT,"")),e,"")}},fT=dT((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),pT=fT,hT=kh,mT=dT((function(e,t,n){return t=t.toLowerCase(),e+(n?hT(t):t)})),gT=mT,yT=Or,_T=sA,vT=Nx;var bT=function(e,t){var n={};return t=vT(t),_T(e,(function(e,r,i){yT(n,t(e,r,i),e)})),n},ET={exports:{}};function ST(e,t){var n=e.length,r=new Array(n),i={},a=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)i[a]||u(e[a],a,new Set);return r;function u(e,t,a){if(a.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){a.add(e);do{var d=c[--t];u(d,s.get(d),a)}while(t);a.delete(e)}r[--n]=e}}}function AT(e,t){let n=1/0;return e.some(((e,r)=>{var i;if(-1!==(null==(i=t.path)?void 0:i.indexOf(e)))return n=r,!0})),n}function xT(e){return(t,n)=>AT(e,t)-AT(e,n)}function wT(){return wT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wT.apply(this,arguments)}ET.exports=function(e){return ST(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},ET.exports.array=ST;let TT=e=>"[object Object]"===Object.prototype.toString.call(e);const MT=xT([]);class OT extends rw{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=MT,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{this.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&this.shape(e)}))}_typeCheck(e){return TT(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter((e=>-1===this._nodes.indexOf(e)))),s={},u=wT({},t,{parent:s,__validating:t.__validating||!1}),l=!1;for(const e of o){let n=i[e],o=qS(r,e);if(n){let i,a=r[e];u.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:a,context:t.context,parent:s});let o="spec"in n?n.spec:void 0,c=null==o?void 0:o.strict;if(null==o?void 0:o.strip){l=l||e in r;continue}i=t.__validating&&c?r[e]:n.cast(r[e],u),void 0!==i&&(s[e]=i)}else o&&!a&&(s[e]=r[e]);s[e]!==r[e]&&(l=!0)}return l?s:r}_validate(e,t={},n){let r=[],{sync:i,from:a=[],originalValue:o=e,abortEarly:s=this.spec.abortEarly,recursive:u=this.spec.recursive}=t;a=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,t.from=a,super._validate(e,t,((e,l)=>{if(e){if(!tA.isError(e)||s)return void n(e,l);r.push(e)}if(!u||!TT(l))return void n(r[0]||null,l);o=o||l;let c=this._nodes.map((e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,s=this.fields[e];s&&"validate"in s?s.validate(l[e],wT({},t,{path:i,from:a,strict:!0,parent:l,originalValue:o[e]}),r):r(null)}));nA({sync:i,tests:c,value:l,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)}))}clone(e){const t=super.clone(e);return t.fields=wT({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];void 0===r?n[e]=t:r instanceof rw&&t instanceof rw&&(n[e]=t.concat(r))}return t.withMutation((()=>t.shape(n,this._excludedEdges)))}getDefaultFromShape(){let e={};return this._nodes.forEach((t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0})),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=xT(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map((([e,t])=>`${e}-${t}`)));function a(e,t){let a=Vx.split(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(const t in e)if(qS(e,t)){let n=e[t];r.add(t),Jx.isRef(n)&&n.isSibling?a(n.path,t):KS(n)&&"deps"in n&&n.deps.forEach((e=>a(e,t)))}return ET.exports.array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation((e=>(e.fields={},e.shape(t))))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const t of e)delete n[t];return t.withMutation((()=>t.shape(n)))}from(e,t,n){let r=Vx.getter(e,!0);return this.transform((i=>{if(null==i)return i;let a=i;return qS(i,e)&&(a=wT({},i),n||delete a[e],a[t]=r(i)),a}))}noUnknown(e=!0,t=gS.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===n.indexOf(e)))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=gS.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>t&&bT(t,((t,n)=>e(n)))))}camelCase(){return this.transformKeys(gT)}snakeCase(){return this.transformKeys(pT)}constantCase(){return this.transformKeys((e=>pT(e).toUpperCase()))}describe(){let e=super.describe();return e.fields=kx(this.fields,(e=>e.describe())),e}}function CT(e){return new OT(e)}function NT(){return NT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NT.apply(this,arguments)}function DT(e){return new LT(e)}CT.prototype=OT.prototype;class LT extends rw{constructor(e){super({type:"array"}),this.innerType=void 0,this.innerType=e,this.withMutation((()=>{this.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}))}))}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map(((e,n)=>{const i=this.innerType.cast(e,NT({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i}));return r?i:n}_validate(e,t={},n){var r,i;let a=[],o=t.sync,s=t.path,u=this.innerType,l=null!=(r=t.abortEarly)?r:this.spec.abortEarly,c=null!=(i=t.recursive)?i:this.spec.recursive,d=null!=t.originalValue?t.originalValue:e;super._validate(e,t,((e,r)=>{if(e){if(!tA.isError(e)||l)return void n(e,r);a.push(e)}if(!c||!u||!this._typeCheck(r))return void n(a[0]||null,r);d=d||r;let i=new Array(r.length);for(let e=0;e<r.length;e++){let n=r[e],a=`${t.path||""}[${e}]`,o=NT({},t,{path:a,strict:!0,parent:r,index:e,originalValue:d[e]});i[e]=(e,t)=>u.validate(n,o,t)}nA({sync:o,path:s,value:r,errors:a,endEarly:l,tests:i},n)}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!KS(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+cS(e));return t.innerType=e,t}length(e,t=yS.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return ow(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||yS.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ow(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||yS.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return ow(t)||t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}DT.prototype=LT.prototype;class IT{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.__inputType=void 0,this.__outputType=void 0,this._resolve=(e,t={})=>{let n=this.builder(e,t);if(!KS(n))throw new TypeError("lazy() functions must return a valid schema");return n.resolve(t)},this.builder=e}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}validate(e,t,n){return this._resolve(e,t).validate(e,t,n)}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,n){return this._resolve(t,n).validateAt(e,t,n)}validateSyncAt(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)}describe(){return null}isValid(e,t){return this._resolve(e,t).isValid(e,t)}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}}function kT(e,t,n){if(!e||!KS(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if("string"!=typeof t)throw new TypeError("A Method name must be provided");if("function"!=typeof n)throw new TypeError("Method function must be provided");e.prototype[t]=n}var $T=Object.freeze({__proto__:null,mixed:aw,bool:sw,boolean:sw,string:hw,number:gw,date:bw,object:CT,array:DT,ref:function(e,t){return new Jx(e,t)},lazy:function(e){return new IT(e)},reach:(e,t,n,r)=>ew(e,t,n,r).schema,isSchema:KS,addMethod:kT,setLocale:function(e){Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((n=>{_S[t][n]=e[t][n]}))}))},ValidationError:tA,BaseSchema:rw,MixedSchema:iw,BooleanSchema:uw,StringSchema:mw,NumberSchema:yw,DateSchema:Ew,ObjectSchema:OT,ArraySchema:LT});const RT=H.default.button`
180
180
  background-color: ${i.Color.Neutral[8]};
181
181
  border: 1px solid ${i.Color.Neutral[5]};
182
182
  border-radius: 1rem;
@@ -294,7 +294,7 @@ function XO(e){return"[object Object]"===Object.prototype.toString.call(e)}Objec
294
294
  height: auto;
295
295
  `,AI=({id:r,lat:i,lng:a,address:o,staticMapPinColor:s={r:28,g:118,b:213},className:u,onClick:l,disabled:c})=>{const d=t.useRef(!1),[f,p]=t.useState(""),h=t.useRef([0,0]);t.useEffect((()=>(window.addEventListener("resize",m),i&&a&&m(),()=>{window.removeEventListener("resize",m)})),[i,a]);const m=()=>{if(!i||!a)return;const e=window.matchMedia(`(max-width: ${n.MediaWidths.mobileL}px)`).matches;if(d.current!==e||h.current[0]!==i||h.current[1]!==a){d.current=e;const t=e?bI.mobile:bI.desktop,n=15,r=t.height+n;p(exports.LocationHelper.getStaticMapUrl(i,a,t.width,r,s)),h.current=[i,a]}};return i&&a?e.jsx(EI,{id:exports.TestHelper.generateId(r,"static-map"),"data-testid":exports.TestHelper.generateId(r,"static-map"),className:u,onClick:l,"aria-disabled":c,children:e.jsx(SI,{alt:o||"Location Map",src:f,onError:e=>{e.currentTarget.src="https://assets.life.gov.sg/web-frontend-engine/img/map/static_map_placeholder.png"}})}):null},xI=({id:t,message:n,className:r})=>n?e.jsx(wI,{type:"warning","data-testid":exports.TestHelper.generateId(t,"warning"),className:r,children:n}):null,wI=H.default(c.Alert)`
296
296
  margin: -1rem 0rem 2rem;
297
- `,TI=["required","length","min","max","matches","email","url","uuid","positive","negative","integer","lessThan","moreThan","when","filled","empty","equals","notEquals","includes","excludes","uinfin","equalsField","withinDays"];var MI;!function(e){const t=[],n={};e.buildSchema=(t,n)=>{const i={},[a,o]=r(t);return Object.keys(a).forEach((n=>{const{schema:r,validationRules:a}=t[n];i[n]=e.buildFieldSchema(r,a)})),CT().meta({yupId:n}).shape(i,o)};const r=e=>{const t=[],n={...e};return Object.entries(n).forEach((([e,{validationRules:r}])=>{const[a,o]=i(e,n,r);t.push(...o),n[e].validationRules=a})),[n,t]},i=(e,t,n)=>{const r=[],a=n?.filter((e=>!("when"in e)))||[];return n?.filter((e=>"when"in e)).forEach((n=>{const o={...n,when:n.when?{...n.when}:void 0};Object.keys(o.when).forEach((n=>{if(!t[n])return void console.warn(`field "${n}" was not found, when condition on "${e}" was not applied`);r.push([e,n]),o.when[n]={...o.when[n],yupSchema:t[n].schema.clone()};const[a,s]=i(e,t,o.when[n].then);o.when[n].then=a,r.push(...s)})),a.push(o)})),[a,r]};e.buildFieldSchema=(n,r)=>{const i=r.filter((e=>tS(TI,Object.keys(e)).length>0||tS(t,Object.keys(e)).length>0));return e.mapRules(n,i)},e.mapSchemaType=e=>{switch(e){case"string":return hw().typeError("Only string values are allowed");case"number":return gw().typeError("Only number values are allowed");case"boolean":return sw().strict().typeError("Only boolean values are allowed");case"array":return DT().typeError("Only array values are allowed");case"object":return CT().typeError("Only object values are allowed");default:return aw()}},e.mapRules=(n,r)=>(r.forEach((r=>{const i=Object.keys(r).filter((e=>TI.includes(e)))?.[0];switch(!0){case r.required:n=n.required(r.errorMessage||nm.COMMON.FIELD_REQUIRED);break;case!!r.email:case!!r.url:case!!r.uuid:case!!r.positive:case!!r.negative:case!!r.integer:try{n=n[i](r.errorMessage)}catch(e){console.warn(`error applying "${i}" condition to ${n.type} schema`)}break;case r.length>0:case!isNaN(r.min):case!isNaN(r.max):case!isNaN(r.lessThan):case!isNaN(r.moreThan):try{n=n[i](r[i],r.errorMessage)}catch(e){console.warn(`error applying "${i}" condition to ${n.type} schema`)}break;case!!r.matches:{const e=r.matches.match(/\/(.*)\/([a-z]+)?/);try{n=n.matches(new RegExp(e[1],e[2]),r.errorMessage)}catch(e){console.warn(`error applying "${i}" condition to ${n.type} schema`)}}break;case!!r.when:Object.keys(r.when).forEach((t=>{const i=r.when[t]?.yupSchema;if(!i)return void console.warn(`[mapRules] Unexpected: yupSchema missing for field "${t}" in when condition. `);const a=r.when[t].is,o=e.mapRules(n,r.when[t].then),s=r.when[t].otherwise&&e.mapRules(n,r.when[t].otherwise);n=Array.isArray(a)&&a.every((e=>"object"==typeof e))?n.when(t,(t=>{const n=e.mapRules(i.clone(),a);let r=!1;try{n.validateSync(t),r=!0}catch(e){}return r?o:s})):n.when(t,{is:a,then:o,otherwise:s})}))}const a=Object.keys(r).filter((e=>t.includes(e)))?.[0];a&&(n[a]?n=n[a](r[a],r.errorMessage):console.warn(`error applying "${a}" condition to ${n.type} schema`)),n&&(n=n.transform((e=>{if(null!==e&&""!==e&&("object"!=typeof e||0!==Object.keys(e).length))return e})))})),n),e.addCondition=(e,r,i,a,o=!1)=>{if(a){if(n[a]||(n[a]={}),n[a][r]&&!0!==o)return void console.warn(`the validation condition "${r}" is not added because it already exists!`);n[a][r]=i}else if(t.includes(r)&&!0!==o)return void console.warn(`the validation condition "${r}" is not added because it already exists!`);t.includes(r)||t.push(r),kT($T[e],r,(function(e,t){return this.test({name:r,message:t,test:(t,o)=>{if(!a)return i(t,e,o);const s=o.options.from.length,u=o.options.from[s-1].schema.describe().meta.yupId;return n[u]?.[r]?.(t,e,o)}})}))}}(MI||(MI={}));var OI=un,CI=Fr;var NI=function(e){return!0===e||!1===e||CI(e)&&"[object Boolean]"==OI(e)},DI=ZA;var LI=function(e,t){return DI(e,t)},II=un,kI=Fr;var $I,RI=function(e){return"number"==typeof e||kI(e)&&"[object Number]"==II(e)};!function(e){e.LOCAL_S_PREFIX="S",e.LOCAL_T_PREFIX="T",e.FOREIGN_F_PREFIX="F",e.FOREIGN_G_PREFIX="G",e.FOREIGN_M_PREFIX="M"}($I||($I={}));const FI=[2,7,6,5,4,3,2],zI=["J","Z","I","H","G","F","E","D","C","B","A"],PI=["X","W","U","T","R","Q","P","N","M","L","K"],jI=["X","W","U","T","R","Q","P","N","J","L","K"];function ZI(e){if("string"==typeof e){const t=function(e){return/^[STFGM]\d{7}[A-Z]$/.test(e)}(e),n=e.charAt(8)===function(e){let t=0;for(let n=0;n<7;++n)t+=Number(e.charAt(n+1))*FI[n];const n=e.charAt(0);n!==$I.LOCAL_T_PREFIX&&n!==$I.FOREIGN_G_PREFIX||(t+=4);n===$I.FOREIGN_M_PREFIX&&(t+=3);let r;r=n===$I.LOCAL_S_PREFIX||n===$I.LOCAL_T_PREFIX?zI[t%11]:n===$I.FOREIGN_M_PREFIX?jI[t%11]:PI[t%11];return r}(e);return t&&n}return!1}MI.addCondition("string","uinfin",(e=>!!rE(e)||ZI(e)));const UI=["LP","LL","FC","PF","RF","MQ","MM","NB","CC","CS","MB","FM","GS","GA","GB","DP","CP","NR","CM","CD","MD","HS","VH","CH","MH","CL","XL","CX","RP","TU","TC","FB","FN","PA","PB","SS","MC","SM"];MI.addCondition("string","uen",(e=>!!rE(e)||function(e){if(e.length<9||e.length>10)return!1;if(9===(e=e.toUpperCase()).length){if(e.match(/^\d{8}[A-Z]$/))return!0}else if(10===e.length){if(e.match(/^\d{9}[A-Z]$/))return!0;const t=String.raw`^((R|S|T)([\d]{2})(`+UI.join("|")+String.raw`)([\d]{4})([A-Z]))$`;if(e.match(t))return!0}return!1}(e)));const BI=e=>RI(e)?oE(e):rE(e)&&!NI(e);MI.addCondition("mixed","filled",(e=>!BI(e))),MI.addCondition("mixed","empty",(e=>BI(e))),MI.addCondition("mixed","equals",((e,t)=>!BI(e)&&LI(e,t))),MI.addCondition("mixed","notEquals",((e,t)=>!BI(e)&&!LI(e,t))),MI.addCondition("string","notMatches",((e,t)=>{if(BI(e))return!0;const n=t.match(/\/(.*)\/([a-z]+)?/);return!new RegExp(n[1],n[2]).test(e)})),MI.addCondition("string","noWhitespaceOnly",((e,t)=>!(!BI(e)&&t)||/\S/.test(e))),MI.addCondition("array","includes",((e,t)=>!e?.length||(Array.isArray(t)?t.filter((t=>e.includes(t))).length===t.length:e.includes(t)))),MI.addCondition("array","excludes",((e,t)=>!e?.length||(Array.isArray(t)?e.length&&0===t.filter((t=>e.includes(t))).length:!e.includes(t)))),MI.addCondition("mixed","equalsField",((e,t,n)=>{if("object"==typeof e){if(Array.isArray(e)&&Array.isArray(n.parent[`${t}`])){const r=[...e].sort(),i=[...n.parent[`${t}`]].sort();return LI(r,i)}return LI(e,n.parent[`${t}`])}return LI(e,n.parent[`${t}`])})),MI.addCondition("mixed","notEqualsField",((e,t,n)=>{if("object"==typeof e){if(Array.isArray(e)&&Array.isArray(n.parent[`${t}`])){const r=[...e].sort(),i=[...n.parent[`${t}`]].sort();return!LI(r,i)}return!LI(e,n.parent[`${t}`])}return!LI(e,n.parent[`${t}`])})),MI.addCondition("mixed","withinDays",((e,t)=>!!rE(e)||rm.checkWithinDays(e,t))),MI.addCondition("mixed","beyondDays",((e,t)=>!!rE(e)||rm.checkBeyondDays(e,t)));const VI=({children:t})=>e.jsx(uE,{children:e.jsx(As,{children:e.jsx(ws,{children:e.jsx(Ms,{children:e.jsx(Es,{children:e.jsx(Cs,{children:t})})})})})}),HI=()=>{const{customComponents:e,setCustomComponents:n}=t.useContext(bs),r=t.useCallback((t=>e?.[t]),[e]);return{customComponents:e,getCustomComponent:r,setCustomComponents:n}},GI="undefined"!=typeof window?(e,n)=>{const r=t.useRef(n),i=t.useRef(0);return LI(n,r.current)||(r.current=n,i.current+=1),t.useLayoutEffect(e,[i.current])}:vs,YI=()=>{const{eventManagerRef:e}=t.useContext(Ss),n=t.useCallback(((t,n,r,i,a)=>{if("function"==typeof r&&"function"!=typeof i){const[a,o,s,u]=[t,n,r,i];e.current?.addEventListener(`${o}:${a}`,s,u)}else if("function"==typeof i){const[o,s,u,l,c]=[t,n,r,i,a];e.current?.addEventListener(`${u}:${s}`,l,c)}}),[e]),r=t.useCallback(((t,n,r,i,a)=>{if("function"==typeof r&&"function"!=typeof i){const[a,o,s,u]=[t,n,r,i];e.current?.removeEventListener(`${o}:${a}`,s,u)}else if("function"==typeof i){const[o,s,u,l,c]=[t,n,r,i,a];e.current?.removeEventListener(`${u}:${s}`,l,c)}}),[e]);return{addFieldEventListener:n,dispatchFieldEvent:t.useCallback(((t,n,r,i)=>{if("string"!=typeof r){const[i,a,o]=[t,n,r];return e.current?.dispatchEvent(new CustomEvent(`${a}:${i}`,{cancelable:!0,detail:{id:a,...o}}))}{const[a,o,s,u]=[t,n,r,i];return e.current?.dispatchEvent(new CustomEvent(`${s}:${o}`,{cancelable:!0,detail:{id:s,...u}}))}}),[e]),removeFieldEventListener:r}};var WI=Or,qI=Tt;var KI=function(e,t,n){(void 0!==n&&!qI(e[t],n)||void 0===n&&!(t in e))&&WI(e,t,n)},JI=un,XI=la,QI=Fr,ek=Function.prototype,tk=Object.prototype,nk=ek.toString,rk=tk.hasOwnProperty,ik=nk.call(Object);var ak=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},ok=$r,sk=Hi;var uk=KI,lk=qi.exports,ck=lo,dk=Ki,fk=Ao,pk=Hr,hk=Gr,mk=WE,gk=Yr.exports,yk=pn,_k=ln,vk=function(e){if(!QI(e)||"[object Object]"!=JI(e))return!1;var t=XI(e);if(null===t)return!0;var n=rk.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&nk.call(n)==ik},bk=li,Ek=ak,Sk=function(e){return ok(e,sk(e))};var Ak=function(e,t,n,r,i,a,o){var s=Ek(e,n),u=Ek(t,n),l=o.get(u);if(l)uk(e,n,l);else{var c=a?a(s,u,n+"",e,t,o):void 0,d=void 0===c;if(d){var f=hk(u),p=!f&&gk(u),h=!f&&!p&&bk(u);c=u,f||p||h?hk(s)?c=s:mk(s)?c=dk(s):p?(d=!1,c=lk(u,!0)):h?(d=!1,c=ck(u,!0)):c=[]:vk(u)||pk(u)?(c=s,pk(s)?c=Sk(s):_k(s)&&!yk(s)||(c=fk(u))):d=!1}d&&(o.set(u,c),i(c,u,r,a,o),o.delete(u)),uk(e,n,c)}},xk=Ar,wk=KI,Tk=iA,Mk=Ak,Ok=ln,Ck=Hi,Nk=ak;var Dk=function e(t,n,r,i,a){t!==n&&Tk(n,(function(o,s){if(a||(a=new xk),Ok(o))Mk(t,n,s,r,e,i,a);else{var u=i?i(Nk(t,s),o,s+"",t,n,a):void 0;void 0===u&&(u=o),wk(t,s,u)}}),Ck)},Lk=Tt,Ik=Oi,kk=Kr,$k=ln;var Rk=function(e,t,n){if(!$k(n))return!1;var r=typeof t;return!!("number"==r?Ik(n)&&kk(t,n.length):"string"==r&&t in n)&&Lk(n[t],e)},Fk=HE,zk=Rk;var Pk=function(e){return Fk((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&zk(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))},jk=Dk,Zk=Pk((function(e,t,n){jk(e,t,n)})),Uk=Zk;const Bk=()=>{const{setFormSchema:e,formSchema:n}=t.useContext(xs);return{setFormSchema:e,formSchema:n,overrideSchema:t.useCallback(((e,t)=>{if(rE(t)||"string"==typeof e)return e;let n={};if(Object.keys(e).forEach((e=>{const r=iE.getNestedValueByKey(t,e,{searchIn:["children"]});rE(r)||(n={...n,...r})})),!rE(n)){const t=fs(e),r=Uk(t,n);return iE.removeNil(r)}return e}),[])}},Vk=e=>{const n=we(),{setFormValues:r,formValues:i,formValuesRef:a,registeredFields:o,setRegisteredFields:s}=t.useContext(Ts),u=t.useCallback(((t,r=!1)=>{if("string"!=typeof t){if(Array.isArray(t)){if(r){const r=t.filter((e=>o.includes(e)));return e?.getValues(r)||n?.getValues(r)}return e?.getValues(t)||n?.getValues(t)}{const t=e?.getValues()||n?.getValues();if(r){const e={};return Object.entries(t).forEach((([t,n])=>{o.includes(t)&&(e[t]=n)})),e}return t}}if(!r||r&&o.includes(t))return e?.getValues(t)||n?.getValues(t)}),[n?.getValues,e?.getValues,o]);return{formValues:i,getField:e=>a.current[e],setFields:e=>{a.current={...a.current,...e},r((t=>({...t,...e})))},setField:(e,t)=>{a.current[e]=t,r((n=>({...n,[e]:t})))},resetFields:e=>{a.current={...e},r((()=>({...e})))},registeredFields:o,setRegisteredFields:s,getFormValues:u}},Hk=()=>{const{formValidationConfig:e,setFormValidationConfig:n}=t.useContext(sE);return{formValidationConfig:e,setFieldValidationConfig:(e,t,r=[])=>{n((n=>({...n,[e]:{schema:t,validationRules:r}})))},removeFieldValidationConfig:e=>n((t=>{const n={...t};return delete n[e],n}))}},Gk=()=>{const{submitHandler:e,setSubmitHandler:n,wrapInForm:r,setWrapInForm:i}=t.useContext(Os);return{submitHandler:e,setSubmitHandler:n,wrapInForm:r,setWrapInForm:i}},Yk=(e,n)=>{t.useEffect((()=>{const t=t=>{t.data.type===e&&n(t)};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}),[e,n])},Wk=e=>{const n=t.useRef();return t.useEffect((()=>{n.current=e}),[e]),n.current},qk=()=>{const{formValidationConfig:e,warnings:n,setWarnings:r,yupId:i}=t.useContext(sE),[a,o]=t.useState(CT()),[s,u]=t.useState(CT()),l=t.useCallback((()=>{if(e){let t={},n={};Object.entries(e).forEach((([e,r])=>{if(!r.validationRules||0===r.validationRules.length)return void(t=iE.upsert(t,e,{schema:r.schema,validationRules:[]}));const i=r.validationRules.filter((({soft:e})=>e)),a=r.validationRules.filter((({soft:e})=>!e));i.length&&(n=iE.upsert(n,e,{schema:r.schema,validationRules:i})),a.length&&(t=iE.upsert(t,e,{schema:r.schema,validationRules:a}))})),u(MI.buildSchema(n,i)),o(MI.buildSchema(t,i))}}),[e,i]);t.useEffect((()=>{l()}),[l]);return{warnings:n,softValidationSchema:s,hardValidationSchema:a,rebuildValidationSchema:l,performSoftValidation:(e,t)=>{e.validate(t,{abortEarly:!1}).then((()=>{r({})})).catch((e=>{const t=e;if(rE(t))return;const n=t.inner.reduce(((e,t)=>(e[t.path]=t.message,e)),{});r(n)}))},addWarnings:e=>{r({...n,...e})},yupId:i}},Kk=H.default.div`
297
+ `,TI=["required","length","min","max","matches","email","url","uuid","positive","negative","integer","lessThan","moreThan","when","filled","empty","equals","notEquals","includes","excludes","uinfin","equalsField","withinDays"];var MI;!function(e){const t=[],n={};e.buildSchema=(t,n)=>{const i={},[a,o]=r(t);return Object.keys(a).forEach((n=>{const{schema:r,validationRules:a}=t[n];i[n]=e.buildFieldSchema(r,a)})),CT().meta({yupId:n}).shape(i,o)};const r=e=>{const t=[],n={...e};return Object.entries(n).forEach((([e,{validationRules:r}])=>{const[a,o]=i(e,n,r);t.push(...o),n[e].validationRules=a})),[n,t]},i=(e,t,n)=>{const r=[],a=n?.filter((e=>!("when"in e)))||[];return n?.filter((e=>"when"in e)).forEach((n=>{const o={...n,when:n.when?{...n.when}:void 0};Object.keys(o.when).forEach((n=>{if(!t[n])return void console.warn(`field "${n}" was not found, when condition on "${e}" was not applied`);r.push([e,n]),o.when[n]={...o.when[n],yupSchema:t[n].schema.clone()};const[a,s]=i(e,t,o.when[n].then);o.when[n].then=a,r.push(...s)})),a.push(o)})),[a,r]};e.buildFieldSchema=(n,r)=>{const i=r.filter((e=>tS(TI,Object.keys(e)).length>0||tS(t,Object.keys(e)).length>0));return e.mapRules(n,i)},e.mapSchemaType=e=>{switch(e){case"string":return hw().typeError("Only string values are allowed");case"number":return gw().typeError("Only number values are allowed");case"boolean":return sw().strict().typeError("Only boolean values are allowed");case"array":return DT().typeError("Only array values are allowed");case"object":return CT().typeError("Only object values are allowed");default:return aw()}},e.mapRules=(n,r)=>(r.forEach((r=>{const i=Object.keys(r).filter((e=>TI.includes(e)))?.[0];switch(!0){case r.required:n=n.required(r.errorMessage||nm.COMMON.FIELD_REQUIRED);break;case!!r.email:case!!r.url:case!!r.uuid:case!!r.positive:case!!r.negative:case!!r.integer:try{n=n[i](r.errorMessage)}catch(e){console.warn(`error applying "${i}" condition to ${n.type} schema`)}break;case r.length>0:case!isNaN(r.min):case!isNaN(r.max):case!isNaN(r.lessThan):case!isNaN(r.moreThan):try{n=n[i](r[i],r.errorMessage)}catch(e){console.warn(`error applying "${i}" condition to ${n.type} schema`)}break;case!!r.matches:{const e=r.matches.match(/\/(.*)\/([a-z]+)?/);try{n=n.matches(new RegExp(e[1],e[2]),r.errorMessage)}catch(e){console.warn(`error applying "${i}" condition to ${n.type} schema`)}}break;case!!r.when:Object.keys(r.when).forEach((t=>{const i=r.when[t]?.yupSchema;if(!i)return void console.warn(`[mapRules] Unexpected: yupSchema missing for field "${t}" in when condition. `);const a=r.when[t].is,o=e.mapRules(n,r.when[t].then),s=r.when[t].otherwise&&e.mapRules(n,r.when[t].otherwise);n=Array.isArray(a)&&a.every((e=>"object"==typeof e))?n.when(t,(t=>{const n=e.mapRules(i.clone(),a);let r=!1;try{n.validateSync(t),r=!0}catch(e){}return r?o:s})):n.when(t,{is:a,then:o,otherwise:s})}))}const a=Object.keys(r).filter((e=>t.includes(e)))?.[0];a&&(n[a]?n=n[a](r[a],r.errorMessage):console.warn(`error applying "${a}" condition to ${n.type} schema`)),n&&(n=n.transform((e=>{if(null!==e&&""!==e&&("object"!=typeof e||0!==Object.keys(e).length))return e})))})),n),e.addCondition=(e,r,i,a,o=!1)=>{if(a){if(n[a]||(n[a]={}),n[a][r]&&!0!==o)return void console.warn(`the validation condition "${r}" is not added because it already exists!`);n[a][r]=i}else if(t.includes(r)&&!0!==o)return void console.warn(`the validation condition "${r}" is not added because it already exists!`);t.includes(r)||t.push(r),kT($T[e],r,(function(e,t){return this.test({name:r,message:t,test:(t,o)=>{if(!a)return i(t,e,o);const s=o.options.from.length,u=o.options.from[s-1].schema.describe().meta.yupId;return n[u]?.[r]?.(t,e,o)}})}))}}(MI||(MI={}));var OI=un,CI=Fr;var NI=function(e){return!0===e||!1===e||CI(e)&&"[object Boolean]"==OI(e)},DI=ZA;var LI=function(e,t){return DI(e,t)},II=un,kI=Fr;var $I,RI=function(e){return"number"==typeof e||kI(e)&&"[object Number]"==II(e)};!function(e){e.LOCAL_S_PREFIX="S",e.LOCAL_T_PREFIX="T",e.FOREIGN_F_PREFIX="F",e.FOREIGN_G_PREFIX="G",e.FOREIGN_M_PREFIX="M"}($I||($I={}));const FI=[2,7,6,5,4,3,2],zI=["J","Z","I","H","G","F","E","D","C","B","A"],PI=["X","W","U","T","R","Q","P","N","M","L","K"],jI=["X","W","U","T","R","Q","P","N","J","L","K"];function ZI(e){if("string"==typeof e){const t=function(e){return/^[STFGM]\d{7}[A-Z]$/.test(e)}(e),n=e.charAt(8)===function(e){let t=0;for(let n=0;n<7;++n)t+=Number(e.charAt(n+1))*FI[n];const n=e.charAt(0);n!==$I.LOCAL_T_PREFIX&&n!==$I.FOREIGN_G_PREFIX||(t+=4);n===$I.FOREIGN_M_PREFIX&&(t+=3);let r;r=n===$I.LOCAL_S_PREFIX||n===$I.LOCAL_T_PREFIX?zI[t%11]:n===$I.FOREIGN_M_PREFIX?jI[t%11]:PI[t%11];return r}(e);return t&&n}return!1}MI.addCondition("string","uinfin",(e=>!!rE(e)||ZI(e)));const UI=["LP","LL","FC","PF","RF","MQ","MM","NB","CC","CS","MB","FM","GS","GA","GB","DP","CP","NR","CM","CD","MD","HS","VH","CH","MH","CL","XL","CX","RP","TU","TC","FB","FN","PA","PB","SS","MC","SM"];MI.addCondition("string","uen",(e=>!!rE(e)||function(e){if(e.length<9||e.length>10)return!1;if(9===(e=e.toUpperCase()).length){if(e.match(/^\d{8}[A-Z]$/))return!0}else if(10===e.length){if(e.match(/^\d{9}[A-Z]$/))return!0;const t=String.raw`^((R|S|T)([\d]{2})(`+UI.join("|")+String.raw`)([\d]{4})([A-Z]))$`;if(e.match(t))return!0}return!1}(e)));const BI=e=>RI(e)?oE(e):rE(e)&&!NI(e);MI.addCondition("mixed","filled",(e=>!BI(e))),MI.addCondition("mixed","empty",(e=>BI(e))),MI.addCondition("mixed","equals",((e,t)=>!BI(e)&&LI(e,t))),MI.addCondition("mixed","notEquals",((e,t)=>!BI(e)&&!LI(e,t))),MI.addCondition("string","notMatches",((e,t)=>{if(BI(e))return!0;const n=t.match(/\/(.*)\/([a-z]+)?/);return!new RegExp(n[1],n[2]).test(e)})),MI.addCondition("string","noWhitespaceOnly",((e,t)=>!(!BI(e)&&t)||/\S/.test(e))),MI.addCondition("string","whitespace",((e,t)=>!(!BI(e)&&t&&("object"!=typeof t||NI(t.noLeadingOrTrailingWhitespace)))||("object"!=typeof t||t.noLeadingOrTrailingWhitespace?/^(?!\s+$)(?!\s).*(?<!\s)$/.test(e):/\S/.test(e)))),MI.addCondition("array","includes",((e,t)=>!e?.length||(Array.isArray(t)?t.filter((t=>e.includes(t))).length===t.length:e.includes(t)))),MI.addCondition("array","excludes",((e,t)=>!e?.length||(Array.isArray(t)?e.length&&0===t.filter((t=>e.includes(t))).length:!e.includes(t)))),MI.addCondition("mixed","equalsField",((e,t,n)=>{if("object"==typeof e){if(Array.isArray(e)&&Array.isArray(n.parent[`${t}`])){const r=[...e].sort(),i=[...n.parent[`${t}`]].sort();return LI(r,i)}return LI(e,n.parent[`${t}`])}return LI(e,n.parent[`${t}`])})),MI.addCondition("mixed","notEqualsField",((e,t,n)=>{if("object"==typeof e){if(Array.isArray(e)&&Array.isArray(n.parent[`${t}`])){const r=[...e].sort(),i=[...n.parent[`${t}`]].sort();return!LI(r,i)}return!LI(e,n.parent[`${t}`])}return!LI(e,n.parent[`${t}`])})),MI.addCondition("mixed","withinDays",((e,t)=>!!rE(e)||rm.checkWithinDays(e,t))),MI.addCondition("mixed","beyondDays",((e,t)=>!!rE(e)||rm.checkBeyondDays(e,t)));const VI=({children:t})=>e.jsx(uE,{children:e.jsx(As,{children:e.jsx(ws,{children:e.jsx(Ms,{children:e.jsx(Es,{children:e.jsx(Cs,{children:t})})})})})}),HI=()=>{const{customComponents:e,setCustomComponents:n}=t.useContext(bs),r=t.useCallback((t=>e?.[t]),[e]);return{customComponents:e,getCustomComponent:r,setCustomComponents:n}},GI="undefined"!=typeof window?(e,n)=>{const r=t.useRef(n),i=t.useRef(0);return LI(n,r.current)||(r.current=n,i.current+=1),t.useLayoutEffect(e,[i.current])}:vs,YI=()=>{const{eventManagerRef:e}=t.useContext(Ss),n=t.useCallback(((t,n,r,i,a)=>{if("function"==typeof r&&"function"!=typeof i){const[a,o,s,u]=[t,n,r,i];e.current?.addEventListener(`${o}:${a}`,s,u)}else if("function"==typeof i){const[o,s,u,l,c]=[t,n,r,i,a];e.current?.addEventListener(`${u}:${s}`,l,c)}}),[e]),r=t.useCallback(((t,n,r,i,a)=>{if("function"==typeof r&&"function"!=typeof i){const[a,o,s,u]=[t,n,r,i];e.current?.removeEventListener(`${o}:${a}`,s,u)}else if("function"==typeof i){const[o,s,u,l,c]=[t,n,r,i,a];e.current?.removeEventListener(`${u}:${s}`,l,c)}}),[e]);return{addFieldEventListener:n,dispatchFieldEvent:t.useCallback(((t,n,r,i)=>{if("string"!=typeof r){const[i,a,o]=[t,n,r];return e.current?.dispatchEvent(new CustomEvent(`${a}:${i}`,{cancelable:!0,detail:{id:a,...o}}))}{const[a,o,s,u]=[t,n,r,i];return e.current?.dispatchEvent(new CustomEvent(`${s}:${o}`,{cancelable:!0,detail:{id:s,...u}}))}}),[e]),removeFieldEventListener:r}};var WI=Or,qI=Tt;var KI=function(e,t,n){(void 0!==n&&!qI(e[t],n)||void 0===n&&!(t in e))&&WI(e,t,n)},JI=un,XI=la,QI=Fr,ek=Function.prototype,tk=Object.prototype,nk=ek.toString,rk=tk.hasOwnProperty,ik=nk.call(Object);var ak=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},ok=$r,sk=Hi;var uk=KI,lk=qi.exports,ck=lo,dk=Ki,fk=Ao,pk=Hr,hk=Gr,mk=WE,gk=Yr.exports,yk=pn,_k=ln,vk=function(e){if(!QI(e)||"[object Object]"!=JI(e))return!1;var t=XI(e);if(null===t)return!0;var n=rk.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&nk.call(n)==ik},bk=li,Ek=ak,Sk=function(e){return ok(e,sk(e))};var Ak=function(e,t,n,r,i,a,o){var s=Ek(e,n),u=Ek(t,n),l=o.get(u);if(l)uk(e,n,l);else{var c=a?a(s,u,n+"",e,t,o):void 0,d=void 0===c;if(d){var f=hk(u),p=!f&&gk(u),h=!f&&!p&&bk(u);c=u,f||p||h?hk(s)?c=s:mk(s)?c=dk(s):p?(d=!1,c=lk(u,!0)):h?(d=!1,c=ck(u,!0)):c=[]:vk(u)||pk(u)?(c=s,pk(s)?c=Sk(s):_k(s)&&!yk(s)||(c=fk(u))):d=!1}d&&(o.set(u,c),i(c,u,r,a,o),o.delete(u)),uk(e,n,c)}},xk=Ar,wk=KI,Tk=iA,Mk=Ak,Ok=ln,Ck=Hi,Nk=ak;var Dk=function e(t,n,r,i,a){t!==n&&Tk(n,(function(o,s){if(a||(a=new xk),Ok(o))Mk(t,n,s,r,e,i,a);else{var u=i?i(Nk(t,s),o,s+"",t,n,a):void 0;void 0===u&&(u=o),wk(t,s,u)}}),Ck)},Lk=Tt,Ik=Oi,kk=Kr,$k=ln;var Rk=function(e,t,n){if(!$k(n))return!1;var r=typeof t;return!!("number"==r?Ik(n)&&kk(t,n.length):"string"==r&&t in n)&&Lk(n[t],e)},Fk=HE,zk=Rk;var Pk=function(e){return Fk((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&zk(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))},jk=Dk,Zk=Pk((function(e,t,n){jk(e,t,n)})),Uk=Zk;const Bk=()=>{const{setFormSchema:e,formSchema:n}=t.useContext(xs);return{setFormSchema:e,formSchema:n,overrideSchema:t.useCallback(((e,t)=>{if(rE(t)||"string"==typeof e)return e;let n={};if(Object.keys(e).forEach((e=>{const r=iE.getNestedValueByKey(t,e,{searchIn:["children"]});rE(r)||(n={...n,...r})})),!rE(n)){const t=fs(e),r=Uk(t,n);return iE.removeNil(r)}return e}),[])}},Vk=e=>{const n=we(),{setFormValues:r,formValues:i,formValuesRef:a,registeredFields:o,setRegisteredFields:s}=t.useContext(Ts),u=t.useCallback(((t,r=!1)=>{if("string"!=typeof t){if(Array.isArray(t)){if(r){const r=t.filter((e=>o.includes(e)));return e?.getValues(r)||n?.getValues(r)}return e?.getValues(t)||n?.getValues(t)}{const t=e?.getValues()||n?.getValues();if(r){const e={};return Object.entries(t).forEach((([t,n])=>{o.includes(t)&&(e[t]=n)})),e}return t}}if(!r||r&&o.includes(t))return e?.getValues(t)||n?.getValues(t)}),[n?.getValues,e?.getValues,o]);return{formValues:i,getField:e=>a.current[e],setFields:e=>{a.current={...a.current,...e},r((t=>({...t,...e})))},setField:(e,t)=>{a.current[e]=t,r((n=>({...n,[e]:t})))},resetFields:e=>{a.current={...e},r((()=>({...e})))},registeredFields:o,setRegisteredFields:s,getFormValues:u}},Hk=()=>{const{formValidationConfig:e,setFormValidationConfig:n}=t.useContext(sE);return{formValidationConfig:e,setFieldValidationConfig:(e,t,r=[])=>{n((n=>({...n,[e]:{schema:t,validationRules:r}})))},removeFieldValidationConfig:e=>n((t=>{const n={...t};return delete n[e],n}))}},Gk=()=>{const{submitHandler:e,setSubmitHandler:n,wrapInForm:r,setWrapInForm:i}=t.useContext(Os);return{submitHandler:e,setSubmitHandler:n,wrapInForm:r,setWrapInForm:i}},Yk=(e,n)=>{t.useEffect((()=>{const t=t=>{t.data.type===e&&n(t)};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}),[e,n])},Wk=e=>{const n=t.useRef();return t.useEffect((()=>{n.current=e}),[e]),n.current},qk=()=>{const{formValidationConfig:e,warnings:n,setWarnings:r,yupId:i}=t.useContext(sE),[a,o]=t.useState(CT()),[s,u]=t.useState(CT()),l=t.useCallback((()=>{if(e){let t={},n={};Object.entries(e).forEach((([e,r])=>{if(!r.validationRules||0===r.validationRules.length)return void(t=iE.upsert(t,e,{schema:r.schema,validationRules:[]}));const i=r.validationRules.filter((({soft:e})=>e)),a=r.validationRules.filter((({soft:e})=>!e));i.length&&(n=iE.upsert(n,e,{schema:r.schema,validationRules:i})),a.length&&(t=iE.upsert(t,e,{schema:r.schema,validationRules:a}))})),u(MI.buildSchema(n,i)),o(MI.buildSchema(t,i))}}),[e,i]);t.useEffect((()=>{l()}),[l]);return{warnings:n,softValidationSchema:s,hardValidationSchema:a,rebuildValidationSchema:l,performSoftValidation:(e,t)=>{e.validate(t,{abortEarly:!1}).then((()=>{r({})})).catch((e=>{const t=e;if(rE(t))return;const n=t.inner.reduce(((e,t)=>(e[t.path]=t.message,e)),{});r(n)}))},addWarnings:e=>{r({...n,...e})},yupId:i}},Kk=H.default.div`
298
298
  flex: 1;
299
299
  padding: 2rem 0;
300
300
  `,Jk=H.default(p.Divider)`
@@ -434,7 +434,7 @@ function XO(e){return"[object Object]"===Object.prototype.toString.call(e)}Objec
434
434
  cursor: pointer;
435
435
  `,az=H.default(c.Alert)`
436
436
  margin-top: 0.5rem;
437
- `;var oz=Hr,sz=Gr,uz=Kt?Kt.isConcatSpreadable:void 0;var lz=ua,cz=function(e){return sz(e)||oz(e)||!!(uz&&e&&e[uz])};var dz=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=cz),a||(a=[]);++o<s;){var u=t[o];n>0&&r(u)?n>1?e(u,n-1,r,i,a):lz(a,u):i||(a[a.length]=u)}return a};var fz=Da,pz=function(){},hz=fz&&1/hA(new fz([,-0]))[1]==1/0?function(e){return new fz(e)}:pz,mz=pE,gz=EE,yz=SE,_z=AE,vz=hz,bz=hA;var Ez=function(e,t,n){var r=-1,i=gz,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=yz;else if(a>=200){var l=t?null:vz(e);if(l)return bz(l);o=!1,i=_z,u=new mz}else u=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,o&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(c)}else i(u,d,n)||(u!==s&&u.push(d),s.push(c))}return s},Sz=C$,Az=dz,xz=Ez;var wz=function(e,t,n){var r=e.length;if(r<2)return r?xz(e[0]):[];for(var i=-1,a=Array(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=Sz(a[i]||o,e[s],t,n));return xz(Az(a,1),t,n)},Tz=Ji,Mz=wz,Oz=WE,Cz=HE((function(e){return Mz(Tz(e,Oz))}));const Nz=t.createContext({files:[],setFiles:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),Dz=({children:n})=>{const[r,i]=t.useState([]),[a,o]=t.useState([]),s=t.useMemo((()=>({files:r,setFiles:i,currentFileIds:a,setCurrentFileIds:o})),[r,a]);return e.jsx(Nz.Provider,{value:s,children:n})};var Lz,Iz;!function(e){e.findAvailableSlot=e=>{const t=e.reduce(((e,{slot:t})=>t>e?t:e),0),n=Math.max(t,e.length),r=Array(n).fill(0).map(((e,t)=>t)),i=e.map((({slot:e})=>e));return r.filter((e=>!i.includes(e)))[0]??n}}(Lz||(Lz={})),exports.EFileStatus=void 0,(Iz=exports.EFileStatus||(exports.EFileStatus={}))[Iz.INJECTED=-99]="INJECTED",Iz[Iz.INJECTING=-98]="INJECTING",Iz[Iz.TO_DELETE=-4]="TO_DELETE",Iz[Iz.ERROR_FORMAT=-3]="ERROR_FORMAT",Iz[Iz.ERROR_GENERIC=-2]="ERROR_GENERIC",Iz[Iz.ERROR_SIZE=-1]="ERROR_SIZE",Iz[Iz.NONE=0]="NONE",Iz[Iz.UPLOAD_READY=4]="UPLOAD_READY",Iz[Iz.UPLOADING=5]="UPLOADING",Iz[Iz.UPLOADED=6]="UPLOADED";const kz=t.lazy((()=>Promise.resolve().then((function(){return require("./file-upload-manager.3328a5eb.js")})))),$z=n=>{const{id:r,error:i,isDirty:a,isTouched:o,value:s,schema:{compressImages:u,description:l,hideThumbnail:c,label:d,uploadOnAddingFile:f,validation:p,warning:h,...m},warning:g}=n,{files:y,currentFileIds:_,setFiles:v}=t.useContext(Nz),b=t.useRef({}),E=t.useRef({}),S=t.useRef({}),A=t.useRef({}),{setFieldValidationConfig:x}=Hk(),{dispatchFieldEvent:w}=YI(),{clearErrors:T,setError:O}=we(),[C,N]=t.useState(),D=t.useRef(y),L=t.useCallback(((e,t)=>{const n=[...t],i=n.length;e.forEach(((e,t)=>{!E.current.max||i+t<E.current.max?(n.push({...e,slot:Lz.findAvailableSlot(n)}),T(r)):O(r,{type:"max",message:E.current.errorMessage||nm.UPLOAD().MAX_FILES(E.current.max)})})),v(n)}),[T,r,O,v]);t.useEffect((()=>{D.current=y}),[y]),t.useEffect((()=>{w("mount",r)}),[w,r]),t.useEffect((()=>{const e=p?.find((e=>"required"in e)),t=p?.find((e=>"fileType"in e)),n=p?.find((e=>"maxSizeInKb"in e)),i=p?.find((e=>"upload"in e&&e.upload));b.current=t?.fileType?t:{},S.current=n?.maxSizeInKb>0?n:{},A.current=i||{};const a=p?.find((e=>"length"in e)),o=p?.find((e=>"max"in e));E.current=a?{max:a.length,errorMessage:a.errorMessage}:o?{max:o.max,errorMessage:o.errorMessage}:{},x(r,DT().of(CT().shape({dataURL:hw(),fileId:hw(),fileName:hw(),fileUrl:hw(),uploadResponse:CT()})).test("is-empty-array",e?.errorMessage||nm.UPLOAD().REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",S.current.errorMessage||nm.UPLOAD().MAX_FILE_SIZE(S.current.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&S.current.maxSizeInKb)||y.filter((e=>e.status===exports.EFileStatus.UPLOADED)).every((e=>{if("base64"===f.type&&e.dataURL)return exports.FileHelper.getFilesizeFromBase64(e.dataURL)<=1024*S.current.maxSizeInKb;if("multipart"===f.type){let t=e.rawFile?.size||e.uploadResponse?.fileSize;return isNaN(t)&&(t=0),t<=1024*S.current.maxSizeInKb}})))).test("max-files",E.current.errorMessage||nm.UPLOAD().MAX_FILES(E.current.max),(e=>!(e&&Array.isArray(e)&&E.current.max)||e.length<=E.current.max)),p)}),[p,y.map((e=>e.status)).join(",")]),t.useEffect((()=>{if(!a&&!o){const e=Array.isArray(s)?s:[];if(!(Cz(e.map((({fileId:e})=>e)),_).length>0))return;const t=[];e.forEach((({dataURL:e,fileId:n,fileName:r,fileUrl:i,uploadResponse:a})=>{t.push({addedFrom:"schema",dataURL:e,fileItem:{id:n},uploadResponse:a,fileUrl:i,rawFile:{name:r},slot:null,status:exports.EFileStatus.INJECTED})})),L(t,[])}}),[L,a,o,_,s]),t.useEffect((()=>{if(i?.message)try{const{message:e,fileErrors:t}=JSON.parse(i.message);t&&v(D.current.map((e=>{const n=t[e.fileItem.id];return n?{...e,fileItem:{...e.fileItem,errorMessage:n}}:e}))),e&&N(e)}catch(e){N(i.message)}else N(void 0)}),[i?.message,v]);const I=t=>t?e.jsx(pI,{children:t}):null;return e.jsxs(e.Fragment,{children:[e.jsx(t.Suspense,{fallback:null,children:e.jsx(kz,{compressImages:!!u,fileTypeRule:b.current,hideThumbnail:c,id:r,maxFileSizeRule:S.current,upload:f,uploadRule:A.current,value:s})}),e.jsx(M.FileUpload,{...m,accept:b.current.fileType?.map((e=>`.${e}`)).join(","),description:I(l),errorMessage:I(C),fileItems:y.filter((({fileItem:e,status:t})=>!!e&&t!==exports.EFileStatus.INJECTED&&t!==exports.EFileStatus.INJECTING)).map((({fileItem:e})=>e)),id:r,maxFiles:E.current.max,onChange:e=>{L(e.map((e=>({addedFrom:"input",rawFile:e,slot:null,status:exports.EFileStatus.NONE}))),y)},onDelete:e=>{v(y.map((t=>t.fileItem.id!==e.id?t:{...t,status:exports.EFileStatus.TO_DELETE}))),T(r)},title:I(d),warning:I(g||h)})]})},Rz=t.createContext({images:[],setImages:()=>null,errorCount:0,setErrorCount:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),Fz=({children:n})=>{const[r,i]=t.useState([]),[a,o]=t.useState(0),[s,u]=t.useState([]);return e.jsx(Rz.Provider,{value:{images:r,setImages:i,errorCount:a,setErrorCount:o,currentFileIds:s,setCurrentFileIds:u},children:n})};var zz;!function(e){e.findAvailableSlot=e=>{const t=e.reduce(((e,{slot:t})=>t>e?t:e),0),n=Math.max(t,e.length),r=Array(n).fill(0).map(((e,t)=>t)),i=e.map((({slot:e})=>e));return r.filter((e=>!i.includes(e)))[0]??n}}(zz||(zz={}));const Pz=["jpg","gif","png","heic","heif","webp"];var jz;exports.EImageStatus=void 0,(jz=exports.EImageStatus||(exports.EImageStatus={}))[jz.INJECTED=-99]="INJECTED",jz[jz.ERROR_CUSTOM_MUTED=-7]="ERROR_CUSTOM_MUTED",jz[jz.ERROR_EXCEED=-6]="ERROR_EXCEED",jz[jz.ERROR_CUSTOM=-5]="ERROR_CUSTOM",jz[jz.TO_DELETE=-4]="TO_DELETE",jz[jz.ERROR_FORMAT=-3]="ERROR_FORMAT",jz[jz.ERROR_GENERIC=-2]="ERROR_GENERIC",jz[jz.ERROR_SIZE=-1]="ERROR_SIZE",jz[jz.NONE=0]="NONE",jz[jz.TO_RECOMPRESS=1]="TO_RECOMPRESS",jz[jz.COMPRESSED=2]="COMPRESSED",jz[jz.RECOMPRESSED=2]="RECOMPRESSED",jz[jz.CONVERTED=2]="CONVERTED",jz[jz.EDITED=3]="EDITED",jz[jz.UPLOAD_READY=4]="UPLOAD_READY",jz[jz.UPLOADING=5]="UPLOADING",jz[jz.UPLOADED=6]="UPLOADED",jz[jz.PENDING=7]="PENDING";var Zz,Uz={exports:{}},Bz={exports:{}},Vz={};var Hz,Gz,Yz,Wz,qz,Kz,Jz,Xz,Qz,eP,tP,nP,rP,iP,aP={};
437
+ `;var oz=Hr,sz=Gr,uz=Kt?Kt.isConcatSpreadable:void 0;var lz=ua,cz=function(e){return sz(e)||oz(e)||!!(uz&&e&&e[uz])};var dz=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=cz),a||(a=[]);++o<s;){var u=t[o];n>0&&r(u)?n>1?e(u,n-1,r,i,a):lz(a,u):i||(a[a.length]=u)}return a};var fz=Da,pz=function(){},hz=fz&&1/hA(new fz([,-0]))[1]==1/0?function(e){return new fz(e)}:pz,mz=pE,gz=EE,yz=SE,_z=AE,vz=hz,bz=hA;var Ez=function(e,t,n){var r=-1,i=gz,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=yz;else if(a>=200){var l=t?null:vz(e);if(l)return bz(l);o=!1,i=_z,u=new mz}else u=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,o&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(c)}else i(u,d,n)||(u!==s&&u.push(d),s.push(c))}return s},Sz=C$,Az=dz,xz=Ez;var wz=function(e,t,n){var r=e.length;if(r<2)return r?xz(e[0]):[];for(var i=-1,a=Array(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=Sz(a[i]||o,e[s],t,n));return xz(Az(a,1),t,n)},Tz=Ji,Mz=wz,Oz=WE,Cz=HE((function(e){return Mz(Tz(e,Oz))}));const Nz=t.createContext({files:[],setFiles:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),Dz=({children:n})=>{const[r,i]=t.useState([]),[a,o]=t.useState([]),s=t.useMemo((()=>({files:r,setFiles:i,currentFileIds:a,setCurrentFileIds:o})),[r,a]);return e.jsx(Nz.Provider,{value:s,children:n})};var Lz,Iz;!function(e){e.findAvailableSlot=e=>{const t=e.reduce(((e,{slot:t})=>t>e?t:e),0),n=Math.max(t,e.length),r=Array(n).fill(0).map(((e,t)=>t)),i=e.map((({slot:e})=>e));return r.filter((e=>!i.includes(e)))[0]??n}}(Lz||(Lz={})),exports.EFileStatus=void 0,(Iz=exports.EFileStatus||(exports.EFileStatus={}))[Iz.INJECTED=-99]="INJECTED",Iz[Iz.INJECTING=-98]="INJECTING",Iz[Iz.TO_DELETE=-4]="TO_DELETE",Iz[Iz.ERROR_FORMAT=-3]="ERROR_FORMAT",Iz[Iz.ERROR_GENERIC=-2]="ERROR_GENERIC",Iz[Iz.ERROR_SIZE=-1]="ERROR_SIZE",Iz[Iz.NONE=0]="NONE",Iz[Iz.UPLOAD_READY=4]="UPLOAD_READY",Iz[Iz.UPLOADING=5]="UPLOADING",Iz[Iz.UPLOADED=6]="UPLOADED";const kz=t.lazy((()=>Promise.resolve().then((function(){return require("./file-upload-manager.037bf56f.js")})))),$z=n=>{const{id:r,error:i,isDirty:a,isTouched:o,value:s,schema:{compressImages:u,description:l,hideThumbnail:c,label:d,uploadOnAddingFile:f,validation:p,warning:h,...m},warning:g}=n,{files:y,currentFileIds:_,setFiles:v}=t.useContext(Nz),b=t.useRef({}),E=t.useRef({}),S=t.useRef({}),A=t.useRef({}),{setFieldValidationConfig:x}=Hk(),{dispatchFieldEvent:w}=YI(),{clearErrors:T,setError:O}=we(),[C,N]=t.useState(),D=t.useRef(y),L=t.useCallback(((e,t)=>{const n=[...t],i=n.length;e.forEach(((e,t)=>{!E.current.max||i+t<E.current.max?(n.push({...e,slot:Lz.findAvailableSlot(n)}),T(r)):O(r,{type:"max",message:E.current.errorMessage||nm.UPLOAD().MAX_FILES(E.current.max)})})),v(n)}),[T,r,O,v]);t.useEffect((()=>{D.current=y}),[y]),t.useEffect((()=>{w("mount",r)}),[w,r]),t.useEffect((()=>{const e=p?.find((e=>"required"in e)),t=p?.find((e=>"fileType"in e)),n=p?.find((e=>"maxSizeInKb"in e)),i=p?.find((e=>"upload"in e&&e.upload));b.current=t?.fileType?t:{},S.current=n?.maxSizeInKb>0?n:{},A.current=i||{};const a=p?.find((e=>"length"in e)),o=p?.find((e=>"max"in e));E.current=a?{max:a.length,errorMessage:a.errorMessage}:o?{max:o.max,errorMessage:o.errorMessage}:{},x(r,DT().of(CT().shape({dataURL:hw(),fileId:hw(),fileName:hw(),fileUrl:hw(),uploadResponse:CT()})).test("is-empty-array",e?.errorMessage||nm.UPLOAD().REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",S.current.errorMessage||nm.UPLOAD().MAX_FILE_SIZE(S.current.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&S.current.maxSizeInKb)||y.filter((e=>e.status===exports.EFileStatus.UPLOADED)).every((e=>{if("base64"===f.type&&e.dataURL)return exports.FileHelper.getFilesizeFromBase64(e.dataURL)<=1024*S.current.maxSizeInKb;if("multipart"===f.type){const t=e.uploadResponse?.data||e.uploadResponse;let n=e.rawFile?.size||t?.fileSize;return isNaN(n)&&(n=0),n<=1024*S.current.maxSizeInKb}})))).test("max-files",E.current.errorMessage||nm.UPLOAD().MAX_FILES(E.current.max),(e=>!(e&&Array.isArray(e)&&E.current.max)||e.length<=E.current.max)).test("no-interim-statuses",nm.UPLOAD().UPLOADING,(()=>{const e=new Set([exports.EFileStatus.INJECTED,exports.EFileStatus.INJECTING,exports.EFileStatus.NONE,exports.EFileStatus.UPLOAD_READY,exports.EFileStatus.UPLOADING]);return!D.current.some((t=>e.has(t.status)))})),p)}),[p,y.map((e=>e.status)).join(",")]),t.useEffect((()=>{if(!a&&!o){const e=Array.isArray(s)?s:[];if(!(Cz(e.map((({fileId:e})=>e)),_).length>0))return;const t=[];e.forEach((({dataURL:e,fileId:n,fileName:r,fileUrl:i,uploadResponse:a})=>{t.push({addedFrom:"schema",dataURL:e,fileItem:{id:n},uploadResponse:a,fileUrl:i,rawFile:{name:r},slot:null,status:exports.EFileStatus.INJECTED})})),L(t,[])}}),[L,a,o,_,s]),t.useEffect((()=>{if(i?.message)try{const{message:e,fileErrors:t}=JSON.parse(i.message);t&&v(D.current.map((e=>{const n=t[e.fileItem.id];return n?{...e,fileItem:{...e.fileItem,errorMessage:n}}:e}))),e&&N(e)}catch(e){N(i.message)}else N(void 0)}),[i?.message,v]);const I=t=>t?e.jsx(pI,{children:t}):null;return e.jsxs(e.Fragment,{children:[e.jsx(t.Suspense,{fallback:null,children:e.jsx(kz,{compressImages:!!u,fileTypeRule:b.current,hideThumbnail:c,id:r,maxFileSizeRule:S.current,upload:f,uploadRule:A.current,value:s})}),e.jsx(M.FileUpload,{...m,accept:b.current.fileType?.map((e=>`.${e}`)).join(","),description:I(l),errorMessage:I(C),fileItems:y.filter((({fileItem:e,status:t})=>!!e&&t!==exports.EFileStatus.INJECTED&&t!==exports.EFileStatus.INJECTING)).map((({fileItem:e})=>e)),id:r,maxFiles:E.current.max,onChange:e=>{L(e.map((e=>({addedFrom:"input",rawFile:e,slot:null,status:exports.EFileStatus.NONE}))),y)},onDelete:e=>{v(y.map((t=>t.fileItem.id!==e.id?t:{...t,status:exports.EFileStatus.TO_DELETE}))),T(r)},title:I(d),warning:I(g||h)})]})},Rz=t.createContext({images:[],setImages:()=>null,errorCount:0,setErrorCount:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),Fz=({children:n})=>{const[r,i]=t.useState([]),[a,o]=t.useState(0),[s,u]=t.useState([]);return e.jsx(Rz.Provider,{value:{images:r,setImages:i,errorCount:a,setErrorCount:o,currentFileIds:s,setCurrentFileIds:u},children:n})};var zz;!function(e){e.findAvailableSlot=e=>{const t=e.reduce(((e,{slot:t})=>t>e?t:e),0),n=Math.max(t,e.length),r=Array(n).fill(0).map(((e,t)=>t)),i=e.map((({slot:e})=>e));return r.filter((e=>!i.includes(e)))[0]??n}}(zz||(zz={}));const Pz=["jpg","gif","png","heic","heif","webp"];var jz;exports.EImageStatus=void 0,(jz=exports.EImageStatus||(exports.EImageStatus={}))[jz.INJECTED=-99]="INJECTED",jz[jz.ERROR_CUSTOM_MUTED=-7]="ERROR_CUSTOM_MUTED",jz[jz.ERROR_EXCEED=-6]="ERROR_EXCEED",jz[jz.ERROR_CUSTOM=-5]="ERROR_CUSTOM",jz[jz.TO_DELETE=-4]="TO_DELETE",jz[jz.ERROR_FORMAT=-3]="ERROR_FORMAT",jz[jz.ERROR_GENERIC=-2]="ERROR_GENERIC",jz[jz.ERROR_SIZE=-1]="ERROR_SIZE",jz[jz.NONE=0]="NONE",jz[jz.TO_RECOMPRESS=1]="TO_RECOMPRESS",jz[jz.COMPRESSED=2]="COMPRESSED",jz[jz.RECOMPRESSED=2]="RECOMPRESSED",jz[jz.CONVERTED=2]="CONVERTED",jz[jz.EDITED=3]="EDITED",jz[jz.UPLOAD_READY=4]="UPLOAD_READY",jz[jz.UPLOADING=5]="UPLOADING",jz[jz.UPLOADED=6]="UPLOADED",jz[jz.PENDING=7]="PENDING";var Zz,Uz={exports:{}},Bz={exports:{}},Vz={};var Hz,Gz,Yz,Wz,qz,Kz,Jz,Xz,Qz,eP,tP,nP,rP,iP,aP={};
438
438
  /** @license React v16.13.1
439
439
  * react-is.development.js
440
440
  *
@@ -928,7 +928,7 @@ object-assign
928
928
  stroke: ${i.Color.Primary};
929
929
  stroke-width: 1;
930
930
  }
931
- `,SZ=n=>{const{accepts:r,activeFileIndex:i,capture:o,id:s="image-thumbnails",images:u,maxFiles:l,onClickThumbnail:c,onSelectFile:d,multiple:f}=n,p=t.useRef(null),h=a.useTheme(),m=async e=>{const t=Array.from(e.target.files||[]);t.length&&setTimeout((()=>{d(t)}),100)},g=()=>p?.current?.click();return e.jsxs(pZ,{id:exports.TestHelper.generateId(s),children:[u.map(((t,n)=>t.status===exports.EImageStatus.NONE?e.jsx(_Z,{children:[...Array(4)].map(((t,n)=>e.jsx(yZ,{},`dot-${n}`)))},n):t.status>exports.EImageStatus.NONE||t.status===exports.EImageStatus.ERROR_CUSTOM_MUTED?e.jsx(hZ,{id:exports.TestHelper.generateId(s,`item-${n+1}`),"data-testid":exports.TestHelper.generateId(s,`item-${n+1}`),src:t.thumbnailDataURL||t.dataURL||"https://assets.life.gov.sg/web-frontend-engine/img/icons/photo-placeholder-add.svg",type:"button","aria-label":`thumbnail of ${t.name}`,onClick:()=>c(n),children:e.jsx(vZ,{isSelected:i===n})},n):"reviewModal"===t.addedFrom||t.status<exports.EImageStatus.NONE?e.jsxs(hZ,{id:exports.TestHelper.generateId(s,`item-${n+1}`),"data-testid":exports.TestHelper.generateId(s,`item-${n+1}`),type:"button","aria-label":`error with ${t.name}`,onClick:()=>c(n),error:!0,children:[e.jsx(vZ,{isSelected:i===n}),e.jsx(mZ,{})]},n):void 0)),(u.filter((({status:e,addedFrom:t})=>e>=exports.EImageStatus.NONE||e===exports.EImageStatus.ERROR_CUSTOM_MUTED||"reviewModal"===t)).length<l||!l)&&e.jsxs(e.Fragment,{children:[e.jsx(bZ,{id:exports.TestHelper.generateId(s,"file-input"),"data-testid":exports.TestHelper.generateId(s,"file-input"),type:"file","aria-hidden":"true",tabIndex:-1,capture:o,ref:p,accept:r.map((e=>`.${e}`)).join(", "),onChange:m,multiple:f,value:""}),e.jsx(EZ,{type:"button",id:exports.TestHelper.generateId(s,"add-image-button"),"data-testid":exports.TestHelper.generateId(s,"add-image-button"),"aria-label":"add image",onClick:g,theme:h||k.BaseTheme,children:e.jsx($.PlusIcon,{})})]})]})},AZ=t.lazy((()=>Promise.resolve().then((function(){return require("./index.f8611425.js")})))),xZ=[{color:"#282828",label:"black"},{color:"#FFF",colorScheme:"light",label:"white"},{color:"#017cd3",label:"blue"},{color:"#fb0101",label:"red"},{color:"#22910c",label:"green"},{color:"#f8e821",label:"yellow"}],wZ=n=>{const{accepts:r,capture:i,className:a,compress:o,dimensions:u,id:l="image-review",maxFiles:c,maxSizeInKb:d,onExit:f,outputType:p,show:h,multiple:m,maxFilesErrorMessage:g,imageReviewModalStyles:y}=n,{images:_,setImages:v}=t.useContext(Rz),{dispatchFieldEvent:b,addFieldEventListener:E,removeFieldEventListener:S}=YI(),A=Wk(h),[x,w]=t.useState(_.length-1),[T,M]=t.useState(!1),[C,N]=t.useState(),D=!!_?.find((({status:e})=>e===exports.EImageStatus.NONE)),[L,I]=t.useState(xZ[0].color),[k,$]=t.useState(!1),R=t.useRef(null),F=!!_?.find((({addedFrom:e,status:t})=>"reviewModal"===e&&t<=exports.EImageStatus.NONE))||!_.length,z=t.useCallback((e=>{e.detail.removePendingImages&&v((e=>e.filter((({status:e})=>e===exports.EImageStatus.UPLOADED||e===exports.EImageStatus.ERROR_CUSTOM_MUTED)))),f()}),[f,v]),P=e=>{!c||e.length+_.filter((({status:e,addedFrom:t})=>e>=exports.EImageStatus.NONE||"reviewModal"===t)).length<=c?e.forEach((e=>{v((t=>{const n=zz.findAvailableSlot(t);return[...t,{id:im(),file:e,name:e.name,dimensions:u,status:exports.EImageStatus.NONE,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))})):v((t=>{const n=zz.findAvailableSlot(t);return[...t,{id:im(),file:e[0],name:e[0].name,dimensions:u,status:exports.EImageStatus.ERROR_EXCEED,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))},j=e=>{e&&(v((e=>e.map(((e,t)=>({...e,...t===x?{status:exports.EImageStatus.TO_DELETE}:{}}))))),w(Math.max(0,x-1))),N(null)},Z=t.useCallback((()=>{v((e=>e.filter((({status:e})=>e>=exports.EImageStatus.NONE||e===exports.EImageStatus.ERROR_CUSTOM_MUTED)).map((e=>{const t={...e};return e.drawingDataURL&&(t.dataURL=e.drawingDataURL),e.status<exports.EImageStatus.UPLOAD_READY&&e.status>exports.EImageStatus.NONE&&(t.status=exports.EImageStatus.UPLOAD_READY),t.drawingDataURL=void 0,t.drawing=void 0,t}))))}),[v]),U=()=>{!b("save-review-images",l,{images:_,retry:U})||(Z(),f())},B=()=>{M(!0),I(xZ[0].color)},V=async()=>{const{dataURL:e,drawing:t}=R.current?.export()||{},n=await exports.ImageHelper.dataUrlToImage(e),r=await exports.ImageHelper.resampleImage(n,{scale:96/n.width,type:exports.FileHelper.fileExtensionToMimeType(p)}),i=await exports.FileHelper.fileToDataUrl(r);v((n=>{const r=[...n];return r[x]={...r[x],thumbnailDataURL:i,drawingDataURL:e,drawing:t,status:o?exports.EImageStatus.TO_RECOMPRESS:exports.EImageStatus.EDITED},r})),M(!1),G()},H=()=>{G(),$(!0)},G=()=>{I(""),$(!1)};t.useEffect((()=>{const e={"trigger-save-review-images":Z,"dismiss-review-modal":z};return Object.entries(e).forEach((([e,t])=>{E(e,l,t)})),()=>{Object.entries(e).forEach((([e,t])=>{S(e,l,t)}))}}),[E,z,Z,l,S]),t.useEffect((()=>{w(_.length-1)}),[_.length]),t.useEffect((()=>{h?b("show-review-modal",l):A&&b("hide-review-modal",l)}),[h]);return e.jsx(s.Modal,{id:exports.TestHelper.generateId(l,void 0,h?"show":"hide"),className:a?`${a}-review`:void 0,show:h,children:e.jsx(Gj,{className:a?`${a}-review-modal-box`:void 0,imageReviewModalStyles:y,showCloseButton:!1,children:h?e.jsxs(e.Fragment,{children:[e.jsx(Yj,{className:a?`${a}-header`:void 0,$drawActive:T,children:T?e.jsxs(e.Fragment,{children:[e.jsx(Jj,{id:exports.TestHelper.generateId(l,"clear-drawing-button"),"data-testid":exports.TestHelper.generateId(l,"clear-drawing-button"),onClick:()=>N("clear-drawing"),children:"Clear"}),e.jsx(Jj,{id:exports.TestHelper.generateId(l,"save-drawing"),"data-testid":exports.TestHelper.generateId(l,"save-drawing"),onClick:V,children:"Save"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Wj,{id:exports.TestHelper.generateId(l,"close-button"),"data-testid":exports.TestHelper.generateId(l,"close-button"),"aria-label":"exit review modal",onClick:()=>N("exit"),children:e.jsx(O.CrossIcon,{type:"cross"})}),e.jsx(qj,{weight:"semibold",children:"Review photos"})]})}),e.jsxs(Xj,{children:[_.length>0&&e.jsx(aZ,{className:a?`${a}-editor`:void 0,children:e.jsx(t.Suspense,{fallback:null,children:e.jsx(AZ,{baseImageDataURL:_[x]?.dataURL,drawing:_[x]?.drawing,color:T?L:void 0,erase:!!T&&k,ref:R,maxSizeInKb:d})})}),_.length>0&&e.jsx(Qj,{children:"Loading Preview..."}),!T&&_[x]?.status>=exports.EImageStatus.NONE&&e.jsxs(eZ,{children:[e.jsxs(tZ,{id:exports.TestHelper.generateId(l,"draw-button"),"data-testid":exports.TestHelper.generateId(l,"draw-button"),onClick:B,disabled:D,children:[e.jsx(rZ,{$disabled:D}),e.jsx(nZ,{weight:"semibold",$disabled:D,children:"Draw"})]}),e.jsxs(tZ,{id:exports.TestHelper.generateId(l,"delete-button"),"data-testid":exports.TestHelper.generateId(l,"delete-button"),onClick:()=>N("delete"),disabled:D,children:[e.jsx(iZ,{$disabled:D}),e.jsx(nZ,{weight:"semibold",$disabled:D,children:"Delete"})]})]}),_[x]?.status<exports.EImageStatus.NONE&&e.jsx(Vj,{id:`${l}-photo-error`,image:_[x],accepts:r,maxSizeInKb:d,onClickOk:()=>j(!0),maxFilesErrorMessage:g,maxFiles:c})]}),e.jsx(oZ,{className:a?`${a}-footer`:void 0,children:T?e.jsxs(e.Fragment,{children:[e.jsx(uZ,{id:exports.TestHelper.generateId(l,"eraser-button"),"data-testid":exports.TestHelper.generateId(l,"eraser-button"),"aria-label":"eraser",onClick:H,children:e.jsx(lZ,{$eraseMode:k})}),e.jsx(dZ,{children:xZ.map((({color:t,colorScheme:n,label:r},i)=>e.jsx(fZ,{id:exports.TestHelper.generateId(l,`palette-color-${i}`),"aria-label":`${r} brush`,$color:t,$colorScheme:n,onClick:()=>(e=>{G(),I(e)})(t),children:L===t&&e.jsx(cZ,{$colorScheme:n})},t)))})]}):e.jsxs(e.Fragment,{children:[e.jsx(SZ,{id:`${l}-image-thumbnails`,activeFileIndex:x,accepts:r,capture:i,maxFiles:c,images:_,onClickThumbnail:w,onSelectFile:P,multiple:m}),e.jsx(sZ,{id:exports.TestHelper.generateId(l,"save-button"),"data-testid":exports.TestHelper.generateId(l,"save-button"),onClick:U,disabled:F,children:"Save"})]})}),e.jsx(Hj,{images:_,show:C,onDecideClearDrawing:e=>{e&&R.current.clearDrawing(),N(null)},onDecideDelete:j,onDecideExit:e=>{e&&(v(_.filter((({addedFrom:e,status:t})=>t>=exports.EImageStatus.UPLOADED||t<exports.EImageStatus.NONE&&"dragInput"===e)).map((e=>({...e,drawingDataURL:void 0,drawing:void 0})))),f()),N(null)}})]}):e.jsx(e.Fragment,{})})})},TZ=t.lazy((()=>Promise.resolve().then((function(){return require("./index.252a45d0.js")})))),MZ=n=>{const{schema:{buttonLabel:r,capture:i,className:a,compress:o,crop:s,description:u,dimensions:l={width:1e3,height:1e3},editImage:c,label:d,outputType:f="jpg",uploadOnAddingFile:p,validation:h,multiple:m,imageReviewModalStyles:g},id:y,isDirty:_,isTouched:v,value:b,warning:E,...S}=n,{images:A,setImages:x,currentFileIds:w}=t.useContext(Rz),T=Wk(A),[M,O]=t.useState([...Pz]),[C,N]=t.useState(0),[D,L]=t.useState(0),[I,k]=t.useState(!1),[$,R]=t.useState(!1),{setFieldValidationConfig:F}=Hk(),{dispatchFieldEvent:z}=YI();t.useEffect((()=>{z("mount",y)}),[z,y]),t.useEffect((()=>{if(!_&&!v){const e=Array.isArray(b)?b:[];if(!(Cz(e.map((({fileId:e})=>e)),w).length>0))return;const t=[];e.forEach((({fileId:e,fileName:n,dataURL:r,uploadResponse:i},a)=>{const o={id:e||im(),file:{},name:n,dimensions:{width:10,height:10},dataURL:r,status:exports.EImageStatus.INJECTED,addedFrom:"schema",uploadProgress:100,slot:a,uploadResponse:i};t.push(o)})),x(t)}}),[_,v,w,x,b]),t.useEffect((()=>{const e=h?.find((e=>"required"in e)),t=h?.find((e=>"fileType"in e)),n=h?.find((e=>"maxSizeInKb"in e));t?.fileType&&t?.fileType!==M&&O(t?.fileType),n?.maxSizeInKb&&n?.maxSizeInKb!==D&&L(n?.maxSizeInKb);const r=h?.find((e=>"length"in e)),i=h?.find((e=>"max"in e));let a;r?a={maxFiles:r.length,errorMessage:r.errorMessage}:i&&(a={maxFiles:i.max,errorMessage:i.errorMessage}),a?.maxFiles&&C!==a.maxFiles&&N(a.maxFiles),F(y,DT().of(CT().shape({fileName:hw(),dataURL:hw()})).test("is-empty-array",e?.errorMessage||nm.UPLOAD("photo").REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",n?.errorMessage||nm.UPLOAD("photo").MAX_FILE_SIZE(n?.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&n?.maxSizeInKb)||e.every((e=>exports.FileHelper.getFilesizeFromBase64(e.dataURL)<=1024*n?.maxSizeInKb)))),h)}),[h]),t.useEffect((()=>{A.some((e=>e.status===exports.EImageStatus.NONE))||(A.some(((e,t)=>{const n=T?.[t];if(e.status!==n?.status||e.dataURL!==n.dataURL)switch(e.status){case exports.EImageStatus.COMPRESSED:case exports.EImageStatus.CONVERTED:if(c&&!$)return exports.WindowHelper.isMobileView()?R(!0):k(!0),!0}})),0===A.length&&R(!1))}),[A.map((e=>e.status)).join(","),A.map((e=>e.dataURL)).join(",")]);const P=(e=!1)=>{e?c&&(document.body.classList.remove("lifesg-ds-overlay-open"),R(!0)):x((e=>e.map((e=>e.status<exports.EImageStatus.UPLOAD_READY&&e.status>exports.EImageStatus.NONE?{...e,status:exports.EImageStatus.UPLOAD_READY}:e)))),k(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(t.Suspense,{fallback:null,children:e.jsx(TZ,{accepts:M,compress:!!o,crop:!!s,dimensions:l,editImage:c,id:y,maxSizeInKb:D,outputType:f,upload:p,value:b})}),e.jsx(Fj,{id:y,capture:i,className:a,label:d,description:u,buttonLabel:r,accepts:M,maxFiles:C,maxSizeInKb:D,dimensions:l,errorMessage:S.error?.message,validation:h,multiple:m,warning:E}),e.jsx(WT,{id:`${y}-review-prompt`,title:"Review photos?",size:"large",show:I,description:"This lets you check if you've selected the correct photos, and draw on them to highlight the issue.",buttons:[{id:"ok",title:"Ok",onClick:()=>P(!0)},{id:"skip",title:"Skip",buttonStyle:"secondary",onClick:()=>P()}]}),(()=>{const t=h?.find((e=>"max"in e));return e.jsx(wZ,{accepts:M,dimensions:l,id:y,className:a,maxFiles:C,maxFilesErrorMessage:t?.errorMessage,maxSizeInKb:D,onExit:()=>R(!1),outputType:f,show:$,multiple:m,capture:i,imageReviewModalStyles:g})})()]})},OZ=a.css`
931
+ `,SZ=n=>{const{accepts:r,activeFileIndex:i,capture:o,id:s="image-thumbnails",images:u,maxFiles:l,onClickThumbnail:c,onSelectFile:d,multiple:f}=n,p=t.useRef(null),h=a.useTheme(),m=async e=>{const t=Array.from(e.target.files||[]);t.length&&setTimeout((()=>{d(t)}),100)},g=()=>p?.current?.click();return e.jsxs(pZ,{id:exports.TestHelper.generateId(s),children:[u.map(((t,n)=>t.status===exports.EImageStatus.NONE?e.jsx(_Z,{children:[...Array(4)].map(((t,n)=>e.jsx(yZ,{},`dot-${n}`)))},n):t.status>exports.EImageStatus.NONE||t.status===exports.EImageStatus.ERROR_CUSTOM_MUTED?e.jsx(hZ,{id:exports.TestHelper.generateId(s,`item-${n+1}`),"data-testid":exports.TestHelper.generateId(s,`item-${n+1}`),src:t.thumbnailDataURL||t.dataURL||"https://assets.life.gov.sg/web-frontend-engine/img/icons/photo-placeholder-add.svg",type:"button","aria-label":`thumbnail of ${t.name}`,onClick:()=>c(n),children:e.jsx(vZ,{isSelected:i===n})},n):"reviewModal"===t.addedFrom||t.status<exports.EImageStatus.NONE?e.jsxs(hZ,{id:exports.TestHelper.generateId(s,`item-${n+1}`),"data-testid":exports.TestHelper.generateId(s,`item-${n+1}`),type:"button","aria-label":`error with ${t.name}`,onClick:()=>c(n),error:!0,children:[e.jsx(vZ,{isSelected:i===n}),e.jsx(mZ,{})]},n):void 0)),(u.filter((({status:e,addedFrom:t})=>e>=exports.EImageStatus.NONE||e===exports.EImageStatus.ERROR_CUSTOM_MUTED||"reviewModal"===t)).length<l||!l)&&e.jsxs(e.Fragment,{children:[e.jsx(bZ,{id:exports.TestHelper.generateId(s,"file-input"),"data-testid":exports.TestHelper.generateId(s,"file-input"),type:"file","aria-hidden":"true",tabIndex:-1,capture:o,ref:p,accept:r.map((e=>`.${e}`)).join(", "),onChange:m,multiple:f,value:""}),e.jsx(EZ,{type:"button",id:exports.TestHelper.generateId(s,"add-image-button"),"data-testid":exports.TestHelper.generateId(s,"add-image-button"),"aria-label":"add image",onClick:g,theme:h||k.BaseTheme,children:e.jsx($.PlusIcon,{})})]})]})},AZ=t.lazy((()=>Promise.resolve().then((function(){return require("./index.1502ccf3.js")})))),xZ=[{color:"#282828",label:"black"},{color:"#FFF",colorScheme:"light",label:"white"},{color:"#017cd3",label:"blue"},{color:"#fb0101",label:"red"},{color:"#22910c",label:"green"},{color:"#f8e821",label:"yellow"}],wZ=n=>{const{accepts:r,capture:i,className:a,compress:o,dimensions:u,id:l="image-review",maxFiles:c,maxSizeInKb:d,onExit:f,outputType:p,show:h,multiple:m,maxFilesErrorMessage:g,imageReviewModalStyles:y}=n,{images:_,setImages:v}=t.useContext(Rz),{dispatchFieldEvent:b,addFieldEventListener:E,removeFieldEventListener:S}=YI(),A=Wk(h),[x,w]=t.useState(_.length-1),[T,M]=t.useState(!1),[C,N]=t.useState(),D=!!_?.find((({status:e})=>e===exports.EImageStatus.NONE)),[L,I]=t.useState(xZ[0].color),[k,$]=t.useState(!1),R=t.useRef(null),F=!!_?.find((({addedFrom:e,status:t})=>"reviewModal"===e&&t<=exports.EImageStatus.NONE))||!_.length,z=t.useCallback((e=>{e.detail.removePendingImages&&v((e=>e.filter((({status:e})=>e===exports.EImageStatus.UPLOADED||e===exports.EImageStatus.ERROR_CUSTOM_MUTED)))),f()}),[f,v]),P=e=>{!c||e.length+_.filter((({status:e,addedFrom:t})=>e>=exports.EImageStatus.NONE||"reviewModal"===t)).length<=c?e.forEach((e=>{v((t=>{const n=zz.findAvailableSlot(t);return[...t,{id:im(),file:e,name:e.name,dimensions:u,status:exports.EImageStatus.NONE,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))})):v((t=>{const n=zz.findAvailableSlot(t);return[...t,{id:im(),file:e[0],name:e[0].name,dimensions:u,status:exports.EImageStatus.ERROR_EXCEED,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))},j=e=>{e&&(v((e=>e.map(((e,t)=>({...e,...t===x?{status:exports.EImageStatus.TO_DELETE}:{}}))))),w(Math.max(0,x-1))),N(null)},Z=t.useCallback((()=>{v((e=>e.filter((({status:e})=>e>=exports.EImageStatus.NONE||e===exports.EImageStatus.ERROR_CUSTOM_MUTED)).map((e=>{const t={...e};return e.drawingDataURL&&(t.dataURL=e.drawingDataURL),e.status<exports.EImageStatus.UPLOAD_READY&&e.status>exports.EImageStatus.NONE&&(t.status=exports.EImageStatus.UPLOAD_READY),t.drawingDataURL=void 0,t.drawing=void 0,t}))))}),[v]),U=()=>{!b("save-review-images",l,{images:_,retry:U})||(Z(),f())},B=()=>{M(!0),I(xZ[0].color)},V=async()=>{const{dataURL:e,drawing:t}=R.current?.export()||{},n=await exports.ImageHelper.dataUrlToImage(e),r=await exports.ImageHelper.resampleImage(n,{scale:96/n.width,type:exports.FileHelper.fileExtensionToMimeType(p)}),i=await exports.FileHelper.fileToDataUrl(r);v((n=>{const r=[...n];return r[x]={...r[x],thumbnailDataURL:i,drawingDataURL:e,drawing:t,status:o?exports.EImageStatus.TO_RECOMPRESS:exports.EImageStatus.EDITED},r})),M(!1),G()},H=()=>{G(),$(!0)},G=()=>{I(""),$(!1)};t.useEffect((()=>{const e={"trigger-save-review-images":Z,"dismiss-review-modal":z};return Object.entries(e).forEach((([e,t])=>{E(e,l,t)})),()=>{Object.entries(e).forEach((([e,t])=>{S(e,l,t)}))}}),[E,z,Z,l,S]),t.useEffect((()=>{w(_.length-1)}),[_.length]),t.useEffect((()=>{h?b("show-review-modal",l):A&&b("hide-review-modal",l)}),[h]);return e.jsx(s.Modal,{id:exports.TestHelper.generateId(l,void 0,h?"show":"hide"),className:a?`${a}-review`:void 0,show:h,children:e.jsx(Gj,{className:a?`${a}-review-modal-box`:void 0,imageReviewModalStyles:y,showCloseButton:!1,children:h?e.jsxs(e.Fragment,{children:[e.jsx(Yj,{className:a?`${a}-header`:void 0,$drawActive:T,children:T?e.jsxs(e.Fragment,{children:[e.jsx(Jj,{id:exports.TestHelper.generateId(l,"clear-drawing-button"),"data-testid":exports.TestHelper.generateId(l,"clear-drawing-button"),onClick:()=>N("clear-drawing"),children:"Clear"}),e.jsx(Jj,{id:exports.TestHelper.generateId(l,"save-drawing"),"data-testid":exports.TestHelper.generateId(l,"save-drawing"),onClick:V,children:"Save"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Wj,{id:exports.TestHelper.generateId(l,"close-button"),"data-testid":exports.TestHelper.generateId(l,"close-button"),"aria-label":"exit review modal",onClick:()=>N("exit"),children:e.jsx(O.CrossIcon,{type:"cross"})}),e.jsx(qj,{weight:"semibold",children:"Review photos"})]})}),e.jsxs(Xj,{children:[_.length>0&&e.jsx(aZ,{className:a?`${a}-editor`:void 0,children:e.jsx(t.Suspense,{fallback:null,children:e.jsx(AZ,{baseImageDataURL:_[x]?.dataURL,drawing:_[x]?.drawing,color:T?L:void 0,erase:!!T&&k,ref:R,maxSizeInKb:d})})}),_.length>0&&e.jsx(Qj,{children:"Loading Preview..."}),!T&&_[x]?.status>=exports.EImageStatus.NONE&&e.jsxs(eZ,{children:[e.jsxs(tZ,{id:exports.TestHelper.generateId(l,"draw-button"),"data-testid":exports.TestHelper.generateId(l,"draw-button"),onClick:B,disabled:D,children:[e.jsx(rZ,{$disabled:D}),e.jsx(nZ,{weight:"semibold",$disabled:D,children:"Draw"})]}),e.jsxs(tZ,{id:exports.TestHelper.generateId(l,"delete-button"),"data-testid":exports.TestHelper.generateId(l,"delete-button"),onClick:()=>N("delete"),disabled:D,children:[e.jsx(iZ,{$disabled:D}),e.jsx(nZ,{weight:"semibold",$disabled:D,children:"Delete"})]})]}),_[x]?.status<exports.EImageStatus.NONE&&e.jsx(Vj,{id:`${l}-photo-error`,image:_[x],accepts:r,maxSizeInKb:d,onClickOk:()=>j(!0),maxFilesErrorMessage:g,maxFiles:c})]}),e.jsx(oZ,{className:a?`${a}-footer`:void 0,children:T?e.jsxs(e.Fragment,{children:[e.jsx(uZ,{id:exports.TestHelper.generateId(l,"eraser-button"),"data-testid":exports.TestHelper.generateId(l,"eraser-button"),"aria-label":"eraser",onClick:H,children:e.jsx(lZ,{$eraseMode:k})}),e.jsx(dZ,{children:xZ.map((({color:t,colorScheme:n,label:r},i)=>e.jsx(fZ,{id:exports.TestHelper.generateId(l,`palette-color-${i}`),"aria-label":`${r} brush`,$color:t,$colorScheme:n,onClick:()=>(e=>{G(),I(e)})(t),children:L===t&&e.jsx(cZ,{$colorScheme:n})},t)))})]}):e.jsxs(e.Fragment,{children:[e.jsx(SZ,{id:`${l}-image-thumbnails`,activeFileIndex:x,accepts:r,capture:i,maxFiles:c,images:_,onClickThumbnail:w,onSelectFile:P,multiple:m}),e.jsx(sZ,{id:exports.TestHelper.generateId(l,"save-button"),"data-testid":exports.TestHelper.generateId(l,"save-button"),onClick:U,disabled:F,children:"Save"})]})}),e.jsx(Hj,{images:_,show:C,onDecideClearDrawing:e=>{e&&R.current.clearDrawing(),N(null)},onDecideDelete:j,onDecideExit:e=>{e&&(v(_.filter((({addedFrom:e,status:t})=>t>=exports.EImageStatus.UPLOADED||t<exports.EImageStatus.NONE&&"dragInput"===e)).map((e=>({...e,drawingDataURL:void 0,drawing:void 0})))),f()),N(null)}})]}):e.jsx(e.Fragment,{})})})},TZ=t.lazy((()=>Promise.resolve().then((function(){return require("./index.ef5ba9a2.js")})))),MZ=n=>{const{schema:{buttonLabel:r,capture:i,className:a,compress:o,crop:s,description:u,dimensions:l={width:1e3,height:1e3},editImage:c,label:d,outputType:f="jpg",uploadOnAddingFile:p,validation:h,multiple:m,imageReviewModalStyles:g},id:y,isDirty:_,isTouched:v,value:b,warning:E,...S}=n,{images:A,setImages:x,currentFileIds:w}=t.useContext(Rz),T=Wk(A),[M,O]=t.useState([...Pz]),[C,N]=t.useState(0),[D,L]=t.useState(0),[I,k]=t.useState(!1),[$,R]=t.useState(!1),{setFieldValidationConfig:F}=Hk(),{dispatchFieldEvent:z}=YI();t.useEffect((()=>{z("mount",y)}),[z,y]),t.useEffect((()=>{if(!_&&!v){const e=Array.isArray(b)?b:[];if(!(Cz(e.map((({fileId:e})=>e)),w).length>0))return;const t=[];e.forEach((({fileId:e,fileName:n,dataURL:r,uploadResponse:i},a)=>{const o={id:e||im(),file:{},name:n,dimensions:{width:10,height:10},dataURL:r,status:exports.EImageStatus.INJECTED,addedFrom:"schema",uploadProgress:100,slot:a,uploadResponse:i};t.push(o)})),x(t)}}),[_,v,w,x,b]),t.useEffect((()=>{const e=h?.find((e=>"required"in e)),t=h?.find((e=>"fileType"in e)),n=h?.find((e=>"maxSizeInKb"in e));t?.fileType&&t?.fileType!==M&&O(t?.fileType),n?.maxSizeInKb&&n?.maxSizeInKb!==D&&L(n?.maxSizeInKb);const r=h?.find((e=>"length"in e)),i=h?.find((e=>"max"in e));let a;r?a={maxFiles:r.length,errorMessage:r.errorMessage}:i&&(a={maxFiles:i.max,errorMessage:i.errorMessage}),a?.maxFiles&&C!==a.maxFiles&&N(a.maxFiles),F(y,DT().of(CT().shape({fileName:hw(),dataURL:hw()})).test("is-empty-array",e?.errorMessage||nm.UPLOAD("photo").REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",n?.errorMessage||nm.UPLOAD("photo").MAX_FILE_SIZE(n?.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&n?.maxSizeInKb)||e.every((e=>exports.FileHelper.getFilesizeFromBase64(e.dataURL)<=1024*n?.maxSizeInKb)))),h)}),[h]),t.useEffect((()=>{A.some((e=>e.status===exports.EImageStatus.NONE))||(A.some(((e,t)=>{const n=T?.[t];if(e.status!==n?.status||e.dataURL!==n.dataURL)switch(e.status){case exports.EImageStatus.COMPRESSED:case exports.EImageStatus.CONVERTED:if(c&&!$)return exports.WindowHelper.isMobileView()?R(!0):k(!0),!0}})),0===A.length&&R(!1))}),[A.map((e=>e.status)).join(","),A.map((e=>e.dataURL)).join(",")]);const P=(e=!1)=>{e?c&&(document.body.classList.remove("lifesg-ds-overlay-open"),R(!0)):x((e=>e.map((e=>e.status<exports.EImageStatus.UPLOAD_READY&&e.status>exports.EImageStatus.NONE?{...e,status:exports.EImageStatus.UPLOAD_READY}:e)))),k(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(t.Suspense,{fallback:null,children:e.jsx(TZ,{accepts:M,compress:!!o,crop:!!s,dimensions:l,editImage:c,id:y,maxSizeInKb:D,outputType:f,upload:p,value:b})}),e.jsx(Fj,{id:y,capture:i,className:a,label:d,description:u,buttonLabel:r,accepts:M,maxFiles:C,maxSizeInKb:D,dimensions:l,errorMessage:S.error?.message,validation:h,multiple:m,warning:E}),e.jsx(WT,{id:`${y}-review-prompt`,title:"Review photos?",size:"large",show:I,description:"This lets you check if you've selected the correct photos, and draw on them to highlight the issue.",buttons:[{id:"ok",title:"Ok",onClick:()=>P(!0)},{id:"skip",title:"Skip",buttonStyle:"secondary",onClick:()=>P()}]}),(()=>{const t=h?.find((e=>"max"in e));return e.jsx(wZ,{accepts:M,dimensions:l,id:y,className:a,maxFiles:C,maxFilesErrorMessage:t?.errorMessage,maxSizeInKb:D,onExit:()=>R(!1),outputType:f,show:$,multiple:m,capture:i,imageReviewModalStyles:g})})()]})},OZ=a.css`
932
932
  border: 1px solid ${i.Color.Accent.Light[1]};
933
933
  box-shadow: none;
934
934
  `,CZ=a.css`
@@ -1011,7 +1011,7 @@ object-assign
1011
1011
  ${e=>a.css`
1012
1012
  margin-left: ${e.$readOnly?"0.25rem":"0.75rem"};
1013
1013
  `}
1014
- `,kZ=t=>{const{id:n,"data-testid":r,className:i,disabled:a,readOnly:o,onFocus:s,value:u,placeholder:l,error:c}=t;return e.jsxs(DZ,{id:n,"data-testid":r,type:"button",className:i,disabled:a,$readOnly:o,$error:c,onFocus:s,onClick:e=>{a||e.currentTarget.focus()},tabIndex:a?-1:0,"aria-disabled":a||void 0,"aria-haspopup":"dialog","aria-readonly":o,children:[l&&!u?e.jsx(LZ,{$placeholder:!0,$disabled:a,children:l}):e.jsx(LZ,{$disabled:a,children:u}),e.jsx(IZ,{$disabled:a,$readOnly:o,"aria-hidden":"true",children:e.jsx(F.PinFillIcon,{})})]})},$Z=t=>{const{id:n,label:r,className:i,locationInputPlaceholder:a="",onFocus:o,value:s,errorMessage:u,disabled:l,readOnly:c}=t;return e.jsx(x.Form.CustomField,{id:exports.TestHelper.generateId(n,"location-input"),"data-testid":exports.TestHelper.generateId(n,"location-input"),label:r,errorMessage:u,children:e.jsx(kZ,{id:exports.TestHelper.generateId(n,"location-input-base"),"data-testid":exports.TestHelper.generateId(n,"location-input-base"),disabled:l,readOnly:c,placeholder:a,onFocus:o,value:s,error:!!u,className:i})})},RZ=t.lazy((()=>Promise.resolve().then((function(){return require("./location-modal.17dc94b3.js")}))));class FZ extends Error{code;message;constructor(e){super(),Object.assign(this,e)}}const zZ=H.default(r.Text.BodySmall)`
1014
+ `,kZ=t=>{const{id:n,"data-testid":r,className:i,disabled:a,readOnly:o,onFocus:s,value:u,placeholder:l,error:c}=t;return e.jsxs(DZ,{id:n,"data-testid":r,type:"button",className:i,disabled:a,$readOnly:o,$error:c,onFocus:s,onClick:e=>{a||e.currentTarget.focus()},tabIndex:a?-1:0,"aria-disabled":a||void 0,"aria-haspopup":"dialog","aria-readonly":o,children:[l&&!u?e.jsx(LZ,{$placeholder:!0,$disabled:a,children:l}):e.jsx(LZ,{$disabled:a,children:u}),e.jsx(IZ,{$disabled:a,$readOnly:o,"aria-hidden":"true",children:e.jsx(F.PinFillIcon,{})})]})},$Z=t=>{const{id:n,label:r,className:i,locationInputPlaceholder:a="",onFocus:o,value:s,errorMessage:u,disabled:l,readOnly:c}=t;return e.jsx(x.Form.CustomField,{id:exports.TestHelper.generateId(n,"location-input"),"data-testid":exports.TestHelper.generateId(n,"location-input"),label:r,errorMessage:u,children:e.jsx(kZ,{id:exports.TestHelper.generateId(n,"location-input-base"),"data-testid":exports.TestHelper.generateId(n,"location-input-base"),disabled:l,readOnly:c,placeholder:a,onFocus:o,value:s,error:!!u,className:i})})},RZ=t.lazy((()=>Promise.resolve().then((function(){return require("./location-modal.c73280bf.js")}))));class FZ extends Error{code;message;constructor(e){super(),Object.assign(this,e)}}const zZ=H.default(r.Text.BodySmall)`
1015
1015
  cursor: ${e=>e.disabled?"not-allowed":"pointer"};
1016
1016
  `,PZ=H.default(j.RadioButton)`
1017
1017
  margin-right: 5px;
@@ -1052,4 +1052,4 @@ object-assign
1052
1052
  `,tU=H.default.div`
1053
1053
  flex: 1;
1054
1054
  `,nU=t=>{const{sectionSchema:{children:n,layoutType:r},...i}=t;switch(r){case"grid":return e.jsx(d.Layout.Section,{children:e.jsx(eU,{type:"grid",children:e.jsx(QZ,{...i,children:n})})});case"contain":return e.jsx(d.Layout.Content,{children:e.jsx(tU,{children:e.jsx(QZ,{...i,children:n})})});default:return e.jsx(QZ,{...i,children:n})}},rU=()=>{const{formSchema:{sections:t,overrides:n},overrideSchema:r}=Bk();return e.jsx(e.Fragment,{children:(()=>{const i=r(t,n);return i?Object.entries(i).map((([t,n],r)=>e.jsx(nU,{id:t,sectionSchema:n},`section-${r}`))):e.jsxs(e.Fragment,{children:["Unable to render Frontend Engine schema, make sure schema is declared within ",e.jsx("code",{children:"sections"}),"."]})})()})},iU=t.forwardRef(((n,r)=>{const{data:i,className:a=null,components:o,onSubmit:s,onSubmitError:u,wrapInForm:l=!0}=n,{className:c=null,defaultValues:d,id:f,stripUnknown:p,revalidationMode:h="onChange",validationMode:m="onTouched"}=i||{},{addFieldEventListener:g,dispatchFieldEvent:y,removeFieldEventListener:_}=YI(),{setCustomComponents:v}=HI(),{setSubmitHandler:b,setWrapInForm:E}=Gk(),{addWarnings:S,performSoftValidation:A,softValidationSchema:x,hardValidationSchema:w,rebuildValidationSchema:T,yupId:M}=qk(),O=function(e={}){const t=B.default.useRef(void 0),n=B.default.useRef(void 0),[r,i]=B.default.useState({isDirty:!1,isValidating:!1,isLoading:Ve(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ve(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...vt(e),formState:r});const a=t.current.control;return a._options=e,Le({subject:a._subjects.state,next:e=>{Ce(e,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),B.default.useEffect((()=>a._disableForm(e.disabled)),[a,e.disabled]),B.default.useEffect((()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}}),[a,r.isDirty]),B.default.useEffect((()=>{e.values&&!ot(e.values,n.current)?(a._reset(e.values,a._options.resetOptions),n.current=e.values,i((e=>({...e})))):a._resetDefaultValues()}),[e.values,a]),B.default.useEffect((()=>{e.errors&&a._setErrors(e.errors)}),[e.errors,a]),B.default.useEffect((()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()})),B.default.useEffect((()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})}),[e.shouldUnregister,a]),t.current.formState=Me(r,a),t.current}({mode:m,reValidateMode:h,defaultValues:d,resolver:async(e,t,n)=>(A(x,e),await function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var u=(t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then((function(e){return a.shouldUseNativeValidation&&Et({},a),{values:n.rawValues?r:e,errors:{}}})))}catch(e){return s(e)}return u&&u.then?u.then(void 0,s):u}(0,(function(e){if(!e.inner)throw e;return{values:{},errors:St((t=e,n=!a.shouldUseNativeValidation&&"all"===a.criteriaMode,(t.inner||[]).reduce((function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,i=r&&r[t.type];e[t.path]=ze(t.path,n,e,t.type,i?[].concat(i,t.message):t.message)}return e}),{})),a)};var t,n})))}catch(e){return Promise.reject(e)}}}(w)(e,t,n))}),{setFormSchema:C}=Bk(),{reset:N,handleSubmit:D,getValues:L,setValue:I,setError:k,trigger:$,formState:R,clearErrors:F}=O,{resetFields:z,setFields:P,getFormValues:j,registeredFields:Z}=Vk(O),U=t.useRef(Z),{checkIsFormValid:V}=((e,n)=>{const{data:r,onChange:i,onValueChange:a}=e,{stripUnknown:o}=r||{},{hardValidationSchema:s}=qk(),{formValidationConfig:u}=Hk(),{watch:l,getValues:c,formState:d,clearErrors:f}=n,{setFields:p,setField:h,getFormValues:m}=Vk(n),[g,y]=t.useState({}),[_,v]=t.useState(!1),b=Wk(u),E=Wk(s),S=t.useRef(void 0),A=t.useRef(void 0),x=t.useCallback(((e=!1)=>{if(!e)try{return s.validateSync(c()),!0}catch(e){return!1}return(async()=>{try{return await s.validate(c()),!0}catch(e){return!1}})()}),[c,s]),w=t.useRef((async()=>{}));return w.current=async()=>{const e=m(void 0,o),t=await x(!0);a&&Object.keys(u||{}).length&&(A.current===t&&LI(S.current,e)||a(e,t)),S.current=e,A.current=t},t.useEffect((()=>{const e=l(((e,{name:t})=>{t?h(t,e[t]):p(e)}));return()=>e.unsubscribe()}),[]),t.useEffect((()=>{if(i&&Object.keys(u||{}).length){const e=l((async()=>{const e=await x(!0);i(m(void 0,o),e)}));return x(!0).then((e=>i(m(void 0,o),e))),()=>e.unsubscribe()}}),[x,i,l,u]),t.useEffect((()=>{const e=l((async()=>{await w.current()}));return()=>e.unsubscribe()}),[l]),t.useEffect((()=>{if(b){const e=e=>Object.entries(e).map((([e,{validationRules:t}])=>[e,t])),t=e(b),n=e(u);LI(t,n)||v(!0)}}),[u]),t.useEffect((()=>{_&&E!==s&&w.current().then((()=>v(!1)))}),[_,s]),t.useEffect((()=>{const e=d.errors;if(e&&!rE(e)){const e=l((e=>{const t=Object.fromEntries(Object.entries(d.errors).filter((([e,t])=>"api"===t.type)));t&&!rE(t)&&Object.keys(t).forEach((t=>{g[t]!==e[t]&&f(t)})),y(e)}));return()=>e.unsubscribe()}}),[d,l]),{checkIsFormValid:x}})(n,O);t.useImperativeHandle(r,(()=>({addFieldEventListener:g,addCustomValidation:H,dispatchFieldEvent:y,getValues:e=>j(e,p),isDirty:R.isDirty,isValid:V,validate:$,removeFieldEventListener:_,reset:(e,t)=>{N(e,t),z("function"==typeof e?e(O.getValues())??d:e??d)},setErrors:W,clearErrors:F,setWarnings:q,setValue:I,submit:D(G,Y)})));const H=(e,t,n,r=!1)=>{MI.addCondition(e,t,n,M,r),T()},G=t.useCallback((()=>{s?.(j(void 0,p))}),[j,s,p]),Y=t.useCallback((e=>{setTimeout((()=>u?.(e)))}),[u]),W=e=>{Object.entries(e).forEach((([e,t])=>{U.current.includes(e)&&(Array.isArray(t)?k(e,{type:"api",message:t[0]}):k(e,"object"==typeof t?{type:"api",message:JSON.stringify(t)}:{type:"api",message:t}))}))},q=e=>{const t={};Object.entries(e).forEach((([e,n])=>{U.current.includes(e)&&(t[e]=n)})),S(t)};t.useEffect((()=>{P(L())}),[]),vs((()=>{N(fs(d))}),[d]),_s((()=>{C(i)}),[i||{}]),t.useEffect((()=>{v(o)}),[o]),t.useEffect((()=>{b((()=>D(G,Y)))}),[G,Y]),t.useEffect((()=>{E(l)}),[l]),t.useEffect((()=>{U.current=Z}),[Z]);const K=f?`frontend-engine-${f}`:"frontend-engine",J=[a,c].join(" ").trim(),X=l?"form":"div";return i?e.jsx(Te,{...O,children:e.jsx(X,{id:K,"data-testid":f?exports.TestHelper.generateId(f,"frontend-engine"):K,className:J,noValidate:!0,onSubmit:D(G,Y),ref:r,children:e.jsx(rU,{})})}):e.jsxs(e.Fragment,{children:["Missing ",e.jsx("code",{children:"data"})," prop, unable to render Frontend Engine."]})})),aU=t.forwardRef(((t,n)=>e.jsx(VI,{children:e.jsx(iU,{...t,ref:n})})));exports.AxiosApiClient=uc,exports.Description=GT,exports.ERROR_MESSAGES=nm,exports.FileUploadContext=Nz,exports.FrontendEngine=aU,exports.GeolocationPositionErrorWrapper=FZ,exports.ImageContext=Rz,exports.OneMapError=vI,exports.OneMapService=yI,exports.Prompt=WT,exports.Sanitize=pI,exports.commonjsGlobal=At,exports.generateRandomId=im,exports.lodash=hI,exports.useFieldEvent=YI,exports.useFormContext=we,exports.useFrontendEngineComponent=()=>{const{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n}=YI(),r=we(),{setFieldValidationConfig:i,removeFieldValidationConfig:a}=Hk();return{event:{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n},formContext:r,validation:{setValidation:i,removeValidation:a}}},exports.usePrevious=Wk;
1055
- //# sourceMappingURL=index.62020cb0.js.map
1055
+ //# sourceMappingURL=index.71069a70.js.map