@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 uh=!1;uh||(uh=!0,ah.ENGLISH=new ah("en"),ah.US=new ah("en","US","en"),ah.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
- tp((function(e){Object.getOwnPropertyNames(ih.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatterBuilder.prototype[t]=ih.prototype[t])})),Object.getOwnPropertyNames(sh.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatter.prototype[t]=sh.prototype[t])})),e.DateTimeFormatter.RFC_1123_DATE_TIME=sh.RFC_1123_DATE_TIME}));var ch=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},lh=Mn,dh=ti;var fh=function(e){return"symbol"==typeof e||dh(e)&&"[object Symbol]"==lh(e)},ph=ch,hh=li,mh=fh,gh=mn?mn.prototype:void 0,yh=gh?gh.toString:void 0;var _h=function e(t){if("string"==typeof t)return t;if(hh(t))return ph(t,e)+"";if(mh(t))return yh?yh.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},vh=_h;var bh=function(e){return null==e?"":vh(e)};var Ah=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},Eh=Ah;var Sh=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Eh(e,t,n)},wh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var xh=function(e){return wh.test(e)};var Mh=function(e){return e.split("")},Th="\\ud800-\\udfff",Oh="["+Th+"]",Nh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ch="\\ud83c[\\udffb-\\udfff]",Dh="[^"+Th+"]",Lh="(?:\\ud83c[\\udde6-\\uddff]){2}",Ih="[\\ud800-\\udbff][\\udc00-\\udfff]",kh="(?:"+Nh+"|"+Ch+")"+"?",$h="[\\ufe0e\\ufe0f]?",Rh=$h+kh+("(?:\\u200d(?:"+[Dh,Lh,Ih].join("|")+")"+$h+kh+")*"),zh="(?:"+[Dh+Nh+"?",Nh,Lh,Ih,Oh].join("|")+")",Fh=RegExp(Ch+"(?="+Ch+")|"+zh+Rh,"g");var Ph=function(e){return e.match(Fh)||[]},Zh=Mh,Uh=xh,jh=Ph;var Bh=function(e){return Uh(e)?jh(e):Zh(e)},Vh=Sh,Gh=xh,Hh=Bh,Yh=bh;var Wh=function(e){return function(t){t=Yh(t);var n=Gh(t)?Hh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Vh(n,1).join(""):t.slice(1);return r[e]()+i}},qh=Wh("toUpperCase"),Kh=bh,Jh=qh;var Xh=function(e){return Jh(Kh(e).toLowerCase())};function Qh(e){return new DataView(e.buffer,e.byteOffset)}const em={len:1,get:(e,t)=>Qh(e).getUint8(t),put:(e,t,n)=>(Qh(e).setUint8(t,n),t+1)},tm={len:2,get:(e,t)=>Qh(e).getUint16(t,!0),put:(e,t,n)=>(Qh(e).setUint16(t,n,!0),t+2)},nm={len:2,get:(e,t)=>Qh(e).getUint16(t),put:(e,t,n)=>(Qh(e).setUint16(t,n),t+2)},rm={len:4,get:(e,t)=>Qh(e).getUint32(t,!0),put:(e,t,n)=>(Qh(e).setUint32(t,n,!0),t+4)},im={len:4,get:(e,t)=>Qh(e).getUint32(t),put:(e,t,n)=>(Qh(e).setUint32(t,n),t+4)},am={len:4,get:(e,t)=>Qh(e).getInt32(t),put:(e,t,n)=>(Qh(e).setInt32(t,n),t+4)},om={len:8,get:(e,t)=>Qh(e).getBigUint64(t,!0),put:(e,t,n)=>(Qh(e).setBigUint64(t,n,!0),t+8)};class sm{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 um extends Error{constructor(){super("End-Of-Stream")}}class cm{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 um;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 lm extends cm{constructor(e){super(),this.reader=e.getReader({mode:"byob"})}async readFromStream(e,t,n){if(this.endOfStream)throw new um;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 dm{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 um;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 um;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new um;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new um;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 fm extends dm{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 um;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 um)return 0;throw e}if(!n.mayBeLess&&r<n.length)throw new um}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 pm extends dm{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 um;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 hm(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 mm(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 gm={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},ym=4100;function _m(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 vm{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 pm(n,r)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await(n=e,r=this.tokenizerOptions,new fm(new lm(n),r));var n,r;try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:n=ym}=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 um))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 _m(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(ym),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(gm);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 sm(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 sm(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=mm(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 um))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),_m(s,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:_m(s,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_m(s,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_m(s,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_m(s,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_m(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 sm(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 c=10485760,l=new Uint8Array(Math.min(c,e.fileInfo.size));if(await e.readBuffer(l,{mayBeLess:!0}),function(e,t){return-1!==mm(e,t)}(l,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}catch(d){if(!(d instanceof um))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(em);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:hm(r),len:hm(i)}}async function g(t){for(;t>0;){const n=await m();if(17026===n.id){return(await e.readToken(new sm(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 sm(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 sm(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(am),type:await e.readToken(new sm(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 A(){const t=new Uint8Array(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(om))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const E=await A();let S=E.size-24;if(_m(E.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const w=new Uint8Array(16);if(S-=await e.readBuffer(w),_m(w,[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(_m(w,[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(S)}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 sm(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 x=new DataView(this.buffer.buffer).getUint32(12,!0);if(x>12&&this.buffer.length>=x+16)try{const M=(new TextDecoder).decode(this.buffer.slice(16,x+16));if(JSON.parse(M).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 sm(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?nm:tm);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?nm:tm);for(let n=0;n<t;++n){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?nm:tm).get(this.buffer,2),n=(e?im:rm).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"}}}var bm;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"]),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,c=t,l=c;for(;s<u;){if(n+=e.charAt(s),c=n+t+o,r.measureText(c).width>a){i=l;break}if(l=c,o=e.charAt(u)+o,c=n+t+o,r.measureText(c).width>a){i=l;break}l=c,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 vm).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})}}(bm||(bm={}));const Am={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:(e="file",r=`${e}s`)=>({REQUIRED:`Upload at least 1 ${e}.`,MAX_FILES:t=>`Upload failed. You can only upload a maximum of ${t} ${1!==t?r:e}.`,MAX_FILES_WITH_REMAINING:t=>`Upload failed. You can only upload ${t} more ${1===t?e:r}. To upload more ${r}, you may wish to delete your previously uploaded ${r}.`,MAX_FILE_SIZE:t=>`Upload failed. ${Xh(e)} exceeds the maximum size of ${t} KB.`,GENERIC:"Upload failed. Please try again.",FILE_TYPE:e=>`Upload failed. Only ${bm.extensionsToSentence(e)} files are accepted.`,MODAL:{FILE_TYPE:{TITLE:`Unsupported ${e} format`,DESCRIPTION:(e,r)=>t(n,{children:[e," could not be uploaded. Try again with a"," ",bm.extensionsToSentence(r)," file."]})},GENERIC_ERROR:{TITLE:`${Xh(e)} not uploaded`,DESCRIPTION:e=>t(n,{children:["There was a problem uploading ",e,". Please try again."]})},MAX_FILE_SIZE:{TITLE:`${Xh(e)} exceeds maximum size`,DESCRIPTION:(e,r)=>t(n,{children:[e," exceeds the maximum size of ",r," 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 Em,Sm;!function(e){function t(e,t,n){if(e)try{const r=mf.ofPattern(t).withResolverStyle(pd.STRICT).withLocale(ah.ENGLISH);switch(n){case"date":return kf.parse(e,r);case"time":return zf.parse(e,r);case"datetime":return Rf.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")||kf.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=mf.ofPattern(t).withResolverStyle(pd.STRICT).withLocale(ah.ENGLISH);switch(n){case"date":return kf.parse(e).format(i);case"time":return zf.parse(e).format(i);case"datetime":return Rf.parse(e).format(i);default:return r||Am.GENERIC.INVALID}}catch(e){return r||Am.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")||kf.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:c}=r;if(u>=0){const e=c?o.minusDays(1):o,t=s.plusDays(1);return a.isAfter(e)&&a.isBefore(t)}{const e=o.minusDays(1),t=c?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")||kf.now();return a>=0?i.isAfter(s.plusDays(a)):i.isBefore(s.plusDays(a))}}(Em||(Em={})),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"}}(Sm||(Sm={}));const wm=()=>Array(5).fill(0).map((()=>Math.random().toString(36).slice(2))).join("");class xm{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 Mm(e,t,n){try{return new DataView(e,t,n)}catch(r){return new xm(e,t,n)}}function Tm(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 Om(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 Nm(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,Tm(e,t+1,n)]}function Dm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Lm(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function Im(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 km(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 $m(e,t){return new Array(t+1).join(e)}const Rm=void 0;function zm(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 Fm=!0,Pm=!0;function Zm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Um(e){if(e.length>=8){const t=Zm(e.slice(0,8));if("ASCII\0\0\0"===t)return Zm(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 jm(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const Bm=18761,Vm=19789;var Gm={BIG_ENDIAN:Vm,LITTLE_ENDIAN:Bm,getByteOrder:function(e,t){if(e.getUint16(t)===Bm)return Bm;if(e.getUint16(t)===Vm)return Vm;throw new Error("Illegal byte order value. Faulty image.")}};var Hm={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===Gm.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};var Ym={isJpegFile:function(e){return!!e&&e.byteLength>=Wm&&e.getUint16(0)===qm},findJpegOffsets:function(e){let t,n,r,i,a,o,s,u,c,l=Km;for(;l+Jm+5<=e.byteLength;){if(Og(e,l))t=e.getUint16(l+Xm),n=l+Xm;else if(Ng(e,l))t=e.getUint16(l+Xm),r=l+Xm;else if(Lg(e,l))t=e.getUint16(l+Xm),i=l+Qm;else if(Ig(e,l))t=e.getUint16(l+Xm),a=l+eg;else if(kg(e,l))s||(s=[]),t=e.getUint16(l+Xm),s.push(Rg(l,t));else if($g(e,l))s||(s=[]),t=e.getUint16(l+Xm),s.push(zg(l,t));else if(Fg(e,l))t=e.getUint16(l+Xm),o=l+tg;else if(Cg(e,l)){t=e.getUint16(l+Xm);const n=l+ig,r=t-(ig-Xm),i=e.getUint8(l+sg),a=e.getUint8(l+ug);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:a})}else if(Dg(e,l))t=e.getUint16(l+Xm),c=l+ag;else{if(!Pg(e,l)){if(Zg(e,l)){l++;continue}break}t=e.getUint16(l+Xm)}l+=Xm+t}return{hasAppMarkers:l>Km,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:a,iptcDataOffset:o,xmpChunks:s,iccChunks:u,mpfDataOffset:c}}};const Wm=2,qm=65496,Km=2,Jm=4,Xm=2,Qm=2,eg=10,tg=18,ng=33,rg=79,ig=18,ag=8,og="ICC_PROFILE\0",sg=Jm+og.length,ug=sg+1,cg="MPF\0",lg=65472,dg=65474,fg=65476,pg=65499,hg=65501,mg=65498,gg=65504,yg=65505,_g=65506,vg=65517,bg=65519,Ag=65534,Eg=65535,Sg="JFIF",wg="Exif",xg="http://ns.adobe.com/xap/1.0/\0",Mg="http://ns.adobe.com/xmp/extension/\0",Tg="Photoshop 3.0";function Og(e,t){return e.getUint16(t)===lg}function Ng(e,t){return e.getUint16(t)===dg}function Cg(e,t){const n=og.length;return e.getUint16(t)===_g&&Tm(e,t+Jm,n)===og}function Dg(e,t){const n=cg.length;return e.getUint16(t)===_g&&Tm(e,t+Jm,n)===cg}function Lg(e,t){const n=Sg.length;return e.getUint16(t)===gg&&Tm(e,t+Jm,n)===Sg&&0===e.getUint8(t+Jm+n)}function Ig(e,t){const n=wg.length;return e.getUint16(t)===yg&&Tm(e,t+Jm,n)===wg&&0===e.getUint8(t+Jm+n)}function kg(e,t){return e.getUint16(t)===yg&&function(e,t){const n=xg.length;return Tm(e,t+Jm,n)===xg}(e,t)}function $g(e,t){return e.getUint16(t)===yg&&function(e,t){const n=Mg.length;return Tm(e,t+Jm,n)===Mg}(e,t)}function Rg(e,t){return{dataOffset:e+ng,length:t-(ng-Xm)}}function zg(e,t){return{dataOffset:e+rg,length:t-(rg-Xm)}}function Fg(e,t){const n=Tg.length;return e.getUint16(t)===vg&&Tm(e,t+Jm,n)===Tg&&0===e.getUint8(t+Jm+n)}function Pg(e,t){const n=e.getUint16(t);return n>=gg&&n<=bg||n===Ag||n===lg||n===dg||n===fg||n===pg||n===hg||n===mg}function Zg(e,t){return e.getUint16(t)===Eg}var Ug={isPngFile:function(e){return!!e&&Tm(e,0,jg.length)===jg},findPngOffsets:function(e,t){const n={hasAppMarkers:!1};let r=jg.length;for(;r+Bg+Vg<=e.byteLength;){if(ny(e,r))n.hasAppMarkers=!0,n.pngHeaderOffset=r+Yg;else if(ry(e,r)){const t=uy(e,r);void 0!==t&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:t,length:e.getUint32(r+Gg)-(t-(r+Yg))}])}else if(iy(e,r,t)){n.hasAppMarkers=!0;const t=Tm(e,r+Hg,Vg);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+Gg),type:t,offset:r+Yg})}else if(ay(e,r))n.hasAppMarkers=!0,n.tiffHeaderOffset=r+Yg;else if(t&&oy(e,r)){n.hasAppMarkers=!0;const t=e.getUint32(r+Gg),i=r+Yg,{profileName:a,compressionMethod:o,compressedProfileOffset:s}=cy(e,i);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:t-(s-i),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:o})}else sy(e,r)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+Gg));r+=e.getUint32(r+Gg)+Bg+Vg+4}return n}};const jg="‰PNG\r\n\n",Bg=4,Vg=4,Gg=0,Hg=Bg,Yg=Bg+Vg,Wg="XML:com.adobe.xmp\0",qg="tEXt",Kg="iTXt",Jg="zTXt",Xg="pHYs",Qg="tIME",ey="eXIf",ty="iCCP";function ny(e,t){return"IHDR"===Tm(e,t+Hg,Vg)}function ry(e,t){return Tm(e,t+Hg,Vg)===Kg&&Tm(e,t+Yg,Wg.length)===Wg}function iy(e,t,n){const r=Tm(e,t+Hg,Vg);return r===qg||r===Kg||r===Jg&&n}function ay(e,t){return Tm(e,t+Hg,Vg)===ey}function oy(e,t){return Tm(e,t+Hg,Vg)===ty}function sy(e,t){const n=[Xg,Qg],r=Tm(e,t+Hg,Vg);return n.includes(r)}function uy(e,t){t+=Yg+Wg.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function cy(e,t){const n=Om(e,t);t+=n.length+1;return{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function ly(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 c=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!==c?c:0;const l=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:dy(e,t,i,a,o,s,c,l),length:r}}function dy(e,t,n,r,i,a,o,s){if(void 0===s)return[];const u=[];let c=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=fy(e,c,t),c+=r.item.itemId,n.constructionMethod=1===t||2===t?15&e.getUint16(c):void 0,c+=r.item.constructionMethod,n.dataReferenceIndex=e.getUint16(c),c+=r.item.dataReferenceIndex,n.baseOffset=hy(e,c,r.item.baseOffset),c+=r.item.baseOffset,n.extentCount=e.getUint16(c),c+=r.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=py(e,t,c,o),c+=r.item.extent.extentIndex,s.extentOffset=hy(e,c,i),c+=r.item.extent.extentOffset,s.extentLength=hy(e,c,a),c+=r.item.extent.extentLength,n.extents.push(s)}u.push(n)}return u}function fy(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function py(e,t,n,r){if((1===t||2===t)&&r>0)return hy(e,n,r)}function hy(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 my=1165519206,gy=1835625829,yy=1970432288;function _y(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=Tm(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:Ey(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1768973167===i)return function(e,t,n,r){return{type:"ipco",properties:Ey(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1668246642===i)return function(e,t,n){return{type:"colr",icc:Ay(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:Ey(e,n+i,r-(n+i-t)),length:r}}(e,t,r+1,n):1768714083===i?ly(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:Ey(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=Om(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=Om(e,r),r+=a.itemName.length+1,a.itemType===gy?(a.contentType=Om(e,r),t+i>(r+=a.contentType.length+1)&&(a.contentEncoding=Om(e,r),r+=a.contentEncoding.length+1)):a.itemType===yy&&(a.itemUri=Om(e,r),r+=a.itemUri.length+1));return a}(e,t,a,r+1,n):{type:void 0,length:n}}function vy(e){{const t={},n=function(e){const t=4,n=4;let r=0;for(;r+t+n<=e.byteLength;){const t=_y(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===my))}(t).itemId,r=by(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===gy&&"application/rdf+xml"===e.contentType))}(e).itemId,n=by(e,t),r=by(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 by(e,t){return e.subBoxes.find((e=>"iloc"===e.type)).items.find((e=>e.itemId===t))}function Ay(e,t){const n=Tm(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function Ey(e,t,n){const r=[my,gy],i=[];let a=t;for(;a<t+n;){const t=_y(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 Sy={isHeicFile:function(e){if(!e)return!1;const t=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=_y(e,0);return n&&-1!==t.indexOf(n.majorBrand)}catch(e){return!1}},findHeicOffsets:function(e){return vy(e)}};var wy={isAvifFile:function(e){if(!e)return!1;try{const t=_y(e,0);return t&&"avif"===t.majorBrand}catch(e){return!1}},findAvifOffsets:function(e){return vy(e)}};var xy={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&Tm(e,0,4)===t&&Tm(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=Tm(e,o,4),c=e.getUint32(o+4,!0);"EXIF"===u?(s=!0,n=Tm(e,o+8,6)===t?o+8+6:o+8):"XMP "===u?(s=!0,r=[{dataOffset:o+8,length:c}]):"ICCP"===u?(s=!0,i=[{offset:o+8,length:c,chunkNumber:1,chunksTotal:1}]):"VP8X"===u&&(s=!0,a=o+8),o+=8+(c%2==0?c:c+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:r,iccChunks:i,vp8xChunkOffset:a}}};var My={isGifFile:function(e){return!!e&&Oy.includes(Tm(e,0,Ty))},findOffsets:function(){return{gifHeaderOffset:0}}};const Ty=6,Oy=["GIF87a","GIF89a"];var Ny={isXMLFile:function(e){return!!e&&Tm(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 Ly={parseAppMarkers:function(e,t){if(Hm.isTiffFile(e))return Iy(Hm.findTiffOffsets(),"tiff","TIFF");if(Ym.isJpegFile(e))return Iy(Ym.findJpegOffsets(e),"jpeg","JPEG");if(Ug.isPngFile(e))return Iy(Ug.findPngOffsets(e,t),"png","PNG");if(Sy.isHeicFile(e))return Iy(Sy.findHeicOffsets(e),"heic","HEIC");if(wy.isAvifFile(e))return Iy(wy.findAvifOffsets(e),"avif","AVIF");if(xy.isWebpFile(e))return Iy(xy.findOffsets(e),"webp","WebP");if(My.isGifFile(e))return Iy(My.findOffsets(e),"gif","GIF");if(Ny.isXMLFile(e))return Iy(Ny.findOffsets(e),"xml","XML");throw new Error("Invalid image format")}};function Iy(e,t,n){return Lm({},e,{fileType:{value:t,description:n}})}var ky={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])},$y={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:ky.XResolution},283:{name:"YResolution",description:ky.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:ky.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:Ry},40092:{name:"XPComment",description:Ry},40093:{name:"XPAuthor",description:Ry},40094:{name:"XPKeywords",description:Ry},40095:{name:"XPSubject",description:Ry},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:ky.LightSource},50779:{name:"CalibrationIlluminant2",description:ky.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 Ry(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}var zy={33434:{name:"ExposureTime",description:ky.ExposureTime},33437:{name:"FNumber",description:ky.FNumber},34850:{name:"ExposureProgram",description:ky.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=>Zm(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:ky.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:ky.ShutterSpeedValue},37378:{name:"ApertureValue",description:ky.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:ky.MeteringMode},37384:{name:"LightSource",description:ky.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:ky.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:Um},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:ky.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:ky.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:ky.CustomRendered},41986:{name:"ExposureMode",description:ky.ExposureMode},41987:{name:"WhiteBalance",description:ky.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:ky.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:ky.Contrast},41993:{name:"Saturation",description:ky.Saturation},41994:{name:"Sharpness",description:ky.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"},Fy={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:jm},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:jm},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:Um},28:{name:"GPSAreaInformation",description:Um},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},Py={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>Zm(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Zy={45056:{name:"MPFVersion",description:e=>Zm(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};const Uy=Lm({},$y,zy),jy="0th",By="1st",Vy="exif",Gy="gps",Hy="interoperability",Yy="mpf",Wy="canon";var qy={[jy]:Uy,[By]:$y,[Vy]:Uy,[Gy]:Fy,[Hy]:Py,[Yy]:Zy,[Wy]:{4:{name:"ShotInfo",description:e=>e}}};const Ky={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Jy={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13};var Xy={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:Qy,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===Gm.LITTLE_ENDIAN)},getLongAt:e_,getRationalAt:function(e,t,n){return[e_(e,t,n),e_(e,t+4,n)]},getUndefinedAt:function(e,t){return Qy(e,t)},getSlongAt:t_,getSrationalAt:function(e,t,n){return[t_(e,t,n),t_(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return e_(e,t,n)},typeSizes:Ky,tagTypes:Jy,getTypeSize:function(e){if(void 0===Jy[e])throw new Error("No such type found.");return Ky[Jy[e]]}};function Qy(e,t){return e.getUint8(t)}function e_(e,t,n){return e.getUint32(t,n===Gm.LITTLE_ENDIAN)}function t_(e,t,n){return e.getInt32(t,n===Gm.LITTLE_ENDIAN)}const n_={1:Xy.getByteAt,2:Xy.getAsciiAt,3:Xy.getShortAt,4:Xy.getLongAt,5:Xy.getRationalAt,7:Xy.getUndefinedAt,9:Xy.getSlongAt,10:Xy.getSrationalAt,13:Xy.getIfdPointerAt};function r_(e,t,n){return t+Xy.getLongAt(e,t+4,n)}function i_(e,t,n,r,i,a){const o=Xy.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+Xy.getTypeSize("SHORT")<=e.byteLength)return Xy.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(let o=0;o<u&&!(r+12>e.byteLength);o++){const o=a_(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-Xy.getTypeSize("LONG")){const o=Xy.getLongAt(e,r,i);0!==o&&t===jy&&(s.Thumbnail=i_(e,"1st",n,n+o,i,a))}return s}function a_(e,t,n,r,i,a){const o=Xy.getTypeSize("SHORT"),s=o+Xy.getTypeSize("SHORT"),u=s+Xy.getTypeSize("LONG"),c=Xy.getShortAt(e,r,i),l=Xy.getShortAt(e,r+o,i),d=Xy.getLongAt(e,r+s,i);let f,p;if(void 0===Xy.typeSizes[l]||!a&&void 0===qy[t][c])return;if(function(e,t){return Xy.typeSizes[e]*t<=Xy.getTypeSize("LONG")}(l,d))p=r+u,f=o_(e,p,l,d,i);else if(p=Xy.getLongAt(e,r+u,i),function(e,t,n,r,i){return t+n+Xy.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)){f=o_(e,n+p,l,d,i,33723===c)}else f="<faulty value>";l===Xy.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-${c}`,m=f;if(void 0!==qy[t][c])if(void 0!==qy[t][c].name&&void 0!==qy[t][c].description){h=qy[t][c].name;try{m=qy[t][c].description(f)}catch(e){m=s_(f)}}else l===Xy.tagTypes.RATIONAL||l===Xy.tagTypes.SRATIONAL?(h=qy[t][c],m=""+f[0]/f[1]):(h=qy[t][c],m=s_(f));return{id:c,name:h,value:f,description:m,__offset:p}}function o_(e,t,n,r,i,a=!1){let o=[];a&&(r*=Xy.typeSizes[n],n=Xy.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(n_[n](e,t,i)),t+=Xy.typeSizes[n];return n===Xy.tagTypes.ASCII?o=Xy.getAsciiValue(o):1===o.length&&(o=o[0]),o}function s_(e){return e instanceof Array?e.join(", "):e}const u_="Exif IFD Pointer",c_="GPS Info IFD Pointer",l_="Interoperability IFD Pointer";var d_={read:function(e,t,n){const r=Gm.getByteOrder(e,t);let i=function(e,t,n,r){return i_(e,jy,t,r_(e,t,n),n,r)}(e,t,r,n);return i=f_(i,e,t,r,n),i=p_(i,e,t,r,n),i=h_(i,e,t,r,n),{tags:i,byteOrder:r}}};function f_(e,t,n,r,i){return void 0!==e[u_]?Lm(e,i_(t,Vy,n,n+e[u_].value,r,i)):e}function p_(e,t,n,r,i){return void 0!==e[c_]?Lm(e,i_(t,"gps",n,n+e[c_].value,r,i)):e}function h_(e,t,n,r,i){return void 0!==e[l_]?Lm(e,i_(t,Hy,n,n+e[l_].value,r,i)):e}var m_={read:function(e,t,n){const r=Gm.getByteOrder(e,t),i=i_(e,"mpf",t,r_(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/g_);a++){i[a]={};const o=y_(n.MPEntry.value,a*g_,Xy.getTypeSize("LONG"),r);i[a].ImageFlags=__(o),i[a].ImageFormat=v_(o),i[a].ImageType=b_(o);const s=y_(n.MPEntry.value,a*g_+4,Xy.getTypeSize("LONG"),r);i[a].ImageSize={value:s,description:""+s};const u=A_(a,n.MPEntry,r,t);i[a].ImageOffset={value:u,description:""+u};const c=y_(n.MPEntry.value,a*g_+12,Xy.getTypeSize("SHORT"),r);i[a].DependentImage1EntryNumber={value:c,description:""+c};const l=y_(n.MPEntry.value,a*g_+14,Xy.getTypeSize("SHORT"),r);i[a].DependentImage2EntryNumber={value:l,description:""+l},i[a].image=e.buffer.slice(u,u+s),Im(i[a],"base64",(function(){return km(this.image)}))}return n.Images=i,n}(e,t,i,r)}};const g_=16;function y_(e,t,n,r){if(r===Gm.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 __(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 v_(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function b_(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 A_(e,t,n,r){return function(e){return 0===e}(e)?0:y_(t.value,e*g_+8,Xy.getTypeSize("LONG"),n)+r}var E_={read:function(e,t){const n=function(e,t){return Xy.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=Xy.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":S_(e,t,n),"Image Height":w_(e,t,n),"Image Width":x_(e,t,n),"Color Components":r,Subsampling:r&&M_(e,t,r.value,n)}}};function S_(e,t,n){if(3>n)return;const r=Xy.getByteAt(e,t+2);return{value:r,description:""+r}}function w_(e,t,n){if(5>n)return;const r=Xy.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function x_(e,t,n){if(7>n)return;const r=Xy.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function M_(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([Xy.getByteAt(e,n),Xy.getByteAt(e,n+1),Xy.getByteAt(e,n+2)])}return{value:i,description:i.length>1?T_(i)+O_(i):""}}function T_(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function O_(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 N_={read:function(e,t){const n=function(e,t){return Xy.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=Xy.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=Xy.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:I_(e,t,n),YResolution:k_(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=Xy.getByteAt(e,t+7),i=Xy.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function D_(e,t,n){if(10>n)return;const r=Xy.getByteAt(e,t+9);return{value:r,description:L_(r)}}function L_(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function I_(e,t,n){if(12>n)return;const r=Xy.getShortAt(e,t+10);return{value:r,description:""+r}}function k_(e,t,n){if(14>n)return;const r=Xy.getShortAt(e,t+12);return{value:r,description:""+r}}var $_={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:R_},336:{name:"Time Sent",description:z_},346:{name:"Coded Character Set",description:F_,encoding_name:F_},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"===Zm(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=Zm(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=Zm(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:R_},572:{name:"Time Created",description:z_},574:{name:"Digital Creation Date",description:R_},575:{name:"Digital Creation Time",description:z_},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=Zm(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=Zm(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=Zm(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(Zm(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(Zm(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=Zm(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 Zm(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=Zm(e);if(t["ObjectData Preview File Format"]){const e=Zm(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 R_(e){const t=Zm(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function z_(e){const t=Zm(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 F_(e){const t=Zm(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 P_={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var Z_={decode:function(e,t){const n=P_.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 U_={read:function(e,t,n){try{if(Array.isArray(e))return G_(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=j_(e,t);if(B_(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+V_(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return G_(e,r,i,n)}catch(e){return{}}}};function j_(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 B_(e){return 1028===e.type}function V_(e){return e.size%2!=0?1:0}function G_(e,t,n,r){const i={};let a;const o=n+t.size;for(;n<o&&n<e.byteLength;){const{tag:t,tagSize:o}=H_(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 H_(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&&!$_.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:Y_($_.iptc[a],a,s),value:s,description:W_($_.iptc[a],s,n,r)};return function(e){return $_.iptc[e]&&$_.iptc[e].repeatable}(a)&&(u.repeatable=!0),function(e){return $_.iptc[e]&&void 0!==$_.iptc[e].encoding_name}(a)&&(u.encoding=$_.iptc[a].encoding_name(s)),{tag:u,tagSize:o}}function Y_(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 W_(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)?Z_.decode(r,t):t}var q_={"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=>ky.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>K_(ky.XResolution,e),"tiff:YResolution":e=>K_(ky.YResolution,e),"exif:ApertureValue":e=>K_(ky.ApertureValue,e),"exif:GPSLatitude":X_,"exif:GPSLongitude":X_,"exif:FNumber":e=>K_(ky.FNumber,e),"exif:FocalLength":e=>K_(ky.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>ky.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>ky.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 ky.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>ky.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>ky.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>ky.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>ky.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>J_(e)?ky.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>ky.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>ky.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>ky.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>ky.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>K_(ky.ShutterSpeedValue,e),"exif:WhiteBalance":e=>ky.WhiteBalance(parseInt(e,10))};function K_(e,t){return J_(t)?e(t.split("/")):t}function J_(e){return/^-?\d+\/-?\d+$/.test(e)}function X_(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 Q_={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 ev={read:function(e,t){const n={};if("string"==typeof e)return nv(n,e),n;const[r,i]=function(e,t){if(0===t.length)return[];const n=[tv(e,t.slice(0,1))];t.length>1&&n.push(tv(e,t.slice(1)));return n}(e,t),a=nv(n,r);if(i){const r=nv(n,i);a||r||(delete n._raw,nv(n,tv(e,t)))}return n}};function tv(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 nv(e,t){try{const{doc:n,raw:r}=function(e){const t=Q_.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:Tm(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 Lm(e,ov(iv(rv(n),!0))),!0}catch(e){return!1}}function rv(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return rv(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function iv(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:av(e),value:iv(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 av(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 ov(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=>{Lm(t,sv(e.attributes)),"object"==typeof e.value&&Lm(t,pv(e.value))}))}return t}function sv(e){const t={};for(const n in e)try{uv(n)&&(t[lv(n)]={value:e[n],attributes:{},description:dv(e[n],n)})}catch(e){}return t}function uv(e){return"rdf:parseType"!==e&&!cv(e)}function cv(e){return"xmlns"===e.split(":")[0]}function lv(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function dv(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?dv(e.value):dv(e))).join(", ")}(e);return t&&"function"==typeof q_[t]?q_[t](e,n):n}if("object"==typeof e)return function(e){const t=[];for(const n in e)t.push(`${fv(n)}: ${dv(e[n].value)}`);return t.join("; ")}(e);try{return t&&"function"==typeof q_[t]?q_[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function fv(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 pv(e){const t={};for(const n in e)try{cv(n)||(t[lv(n)]=hv(e[n],n))}catch(e){}return t}function hv(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Sv(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:""}:mv(e)?gv(e,t):_v(e)?vv(e,t):bv(e)?Av(e,t):function(e){return void 0!==Ev(e.value)}(e)?function(e,t){let n=Ev(e.value).value["rdf:li"];const r=yv(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(mv(e))return gv(e);if(_v(e))return vv(e).value;if(bv(e))return Av(e).value;return Sv(e)}(e))})),{value:i,attributes:r,description:dv(i,t)}}(e,t):Sv(e,t)}function mv(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 gv(e,t){const n=yv(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),Lm(n,yv(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||cv(n)||(t[lv(n)]=e.value[n].value);return t}(e));const r=function(e){return wv(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:dv(r,t)}}function yv(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||cv(n)||(t[lv(n)]=e.attributes[n]);return t}function _v(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function vv(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(Lm(n.value,sv(e.value["rdf:Description"].attributes)),Lm(n.attributes,yv(e)),e=e.value["rdf:Description"]),Lm(n.value,pv(e.value)),n.description=dv(n.value,t),n}function bv(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function Av(e,t){const n=sv(e.attributes);return{value:n,attributes:{},description:dv(n,t)}}function Ev(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Sv(e,t){const n=wv(e)||ov(e.value);return{value:n,attributes:yv(e),description:dv(n,t)}}function wv(e){return e.attributes&&e.attributes["rdf:resource"]}const xv=0,Mv=1,Tv=2,Ov=3,Nv=4,Cv=5,Dv=6,Lv=7,Iv=8;var kv={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=Xy.getShortAt(e,r);$v[i]&&(t[i]||(t[i]=$v[i].description),n.push({type:i,path:$v[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 $v={[xv]:{description:"Closed subpath length",path:(e,t)=>[Xy.getShortAt(e,t)]},[Mv]:{description:"Closed subpath Bezier knot, linked",path:Rv},[Tv]:{description:"Closed subpath Bezier knot, unlinked",path:Rv},[Ov]:{description:"Open subpath length",path:(e,t)=>[Xy.getShortAt(e,t)]},[Nv]:{description:"Open subpath Bezier knot, linked",path:Rv},[Cv]:{description:"Open subpath Bezier knot, unlinked",path:Rv},[Dv]:{description:"Path fill rule",path:()=>[]},[Iv]:{description:"Initial fill rule",path:(e,t)=>[Xy.getShortAt(e,t)]},[Lv]:{description:"Clipboard",path:function(e,t){return[[Fv(e,t,8),Fv(e,t+4,8),Fv(e,t+8,8),Fv(e,t+12,8)],Fv(e,t+16,8)]}}};function Rv(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(zv(e,t+r));return n}function zv(e,t){const n=Fv(e,t,8);return[Fv(e,t+4,8),n]}function Fv(e,t,n){const r=Xy.getLongAt(e,t),i=r>>>31==0?1:-1,a=(2130706432&r)>>>32-n,o=r&parseInt($m("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 $m(n,t-e.length)+e}(o.toString(2),32-n,"0"),2)}var Pv={read:function(e,t){const n=Mm(new Uint8Array(e).buffer),r={};let i=0;for(;i<e.length;){const e=Tm(n,i,Bv);i+=Bv;const a=Xy.getShortAt(n,i);i+=Uv;const{tagName:o,tagNameSize:s}=Vv(n,i);i+=s;const u=Xy.getLongAt(n,i);if(i+=jv,e===Zv){const e=Mm(n.buffer,i,u),s={id:a,value:Tm(e,0,u)};if(kv[a]){try{s.description=kv[a].description(e)}catch(e){s.description="<no description formatter>"}r[o||kv[a].name]=s}else t&&(r[`undefined-${a}`]=s)}i+=u+u%2}return r}};const Zv="8BIM",Uv=2,jv=4,Bv=Zv.length;function Vv(e,t){const[n,r]=Cm(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const Gv={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"}},Hv={4:{name:"Preferred CMM type",value:(e,t)=>Tm(e,t,4),description:e=>null!==e?Yv(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)=>Tm(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)=>Tm(e,t,4)},20:{name:"Connection Space",value:(e,t)=>Tm(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)=>Tm(e,t,4),description:e=>Yv(e)},48:{name:"Device Manufacturer",value:(e,t)=>Tm(e,t,4),description:e=>Yv(e)},52:{name:"Device Model Number",value:(e,t)=>Tm(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)=>Tm(e,t,4)}};function Yv(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 Wv={read:function(e,t,n){if(n&&t[0].compressionMethod!==Rm)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 zm(r,t[0].compressionMethod,"utf-8","dataview").then(ib).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 ib(new DataView(r.buffer))}catch(e){return{}}}(e,t)}};const qv=84,Kv=128,Jv="acsp",Xv="desc",Qv="mluc",eb="text",tb="sig ",nb=12;function rb(e,t){return e.length<t+nb}function ib(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<qv)throw new Error("ICC profile too short");const r={},i=Object.keys(Hv);for(let t=0;t<i.length;t++){const n=i[t],a=Hv[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(ab(t.slice(36,40))!==Jv)throw new Error("ICC profile: missing signature");if(function(e){return e.length<Kv+4}(t))return r;const a=e.getUint32(128);let o=132;for(let n=0;n<a;n++){if(rb(t,o))return r;const n=Tm(e,o,4),i=e.getUint32(o+4),a=e.getUint32(o+8);if(i>t.length)return r;const s=Tm(e,i,4);if(s===Xv){const o=e.getUint32(i+8);if(o>a)return r;ob(r,n,ab(t.slice(i+12,i+o+11)))}else if(s===Qv){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=Tm(e,o+0,2),n=Tm(e,o+2,2),r=e.getUint32(o+4),u=e.getUint32(o+8),c=Nm(e,i+u,r);s.push({languageCode:t,countryCode:n,text:c}),o+=a}if(1===t)ob(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;ob(r,n,e)}}else if(s===eb){ob(r,n,ab(t.slice(i+8,i+a-7)))}else if(s===tb){ob(r,n,ab(t.slice(i+8,i+12)))}o+=12}return r}function ab(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function ob(e,t,n){Gv[t]?e[Gv[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const sb=27;var ub={read:function(e,t,n,r,i){let a=i_(e,Wy,t,t+n,r,i);a.ShotInfo&&(a=Lm({},a,function(e){const t={};void 0!==e[27]&&(t.AutoRotate={value:e[27],description:cb(e[27])});return t}(a.ShotInfo.value)),delete a.ShotInfo);return a},SHOT_INFO_AUTO_ROTATE:sb};function cb(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var lb={read:function(e,t){return{"Image Width":db(e,t),"Image Height":fb(e,t),"Bit Depth":pb(e,t),"Color Type":hb(e,t),Compression:mb(e,t),Filter:gb(e,t),Interlace:yb(e,t)}}};function db(e,t){if(t+0+4>e.byteLength)return;const n=Xy.getLongAt(e,t);return{value:n,description:`${n}px`}}function fb(e,t){if(t+4+4>e.byteLength)return;const n=Xy.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function pb(e,t){if(t+8+1>e.byteLength)return;const n=Xy.getByteAt(e,t+8);return{value:n,description:`${n}`}}function hb(e,t){if(t+9+1>e.byteLength)return;const n=Xy.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 mb(e,t){if(t+10+1>e.byteLength)return;const n=Xy.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function gb(e,t){if(t+11+1>e.byteLength)return;const n=Xy.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function yb(e,t){if(t+12+1>e.byteLength)return;const n=Xy.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}var _b={read:function(e,t,n,r){const i={},a=[];for(let o=0;o<t.length;o++){const{offset:s,length:u,type:c}=t[o],l=Tb(e,s,u,c,n);if(l instanceof Promise)a.push(l.then((({name:e,value:t,description:n})=>{try{if(Fm&&Ib(e,t))return{__exif:d_.read($b(t),Mb,r).tags};if(Pm&&kb(e,t))return{__iptc:U_.read($b(t),0,r)};if(e&&!Ib(e,t)&&!kb(e,t))return{[e]:{value:t,description:n}}}catch(e){}return{}})));else{const{name:e,value:t,description:n}=l;e&&(i[e]={value:t,description:n})}}return{readTags:i,readTagsPromise:a.length>0?Promise.all(a):void 0}}};const vb="STATE_KEYWORD",bb="STATE_COMPRESSION",Ab="STATE_LANG",Eb="STATE_TRANSLATED_KEYWORD",Sb="STATE_TEXT",wb=1,xb=1,Mb=6;function Tb(e,t,n,r,i){const a=[],o=[];let s,u=vb,c=Rm;for(let i=0;i<n&&t+i<e.byteLength;i++){if(u===bb){c=Ob({type:r,dataView:e,offset:t+i}),r===Kg&&(i+=wb),u=Nb(r,u);continue}if(u===Sb){s=new DataView(e.buffer.slice(t+i,t+n));break}const l=e.getUint8(t+i);0===l?u=Nb(r,u):u===vb?a.push(l):u===Ab&&o.push(l)}if(c!==Rm&&!i)return{};const l=zm(s,c,function(e){if(e===qg||e===Jg)return"latin1";return"utf-8"}(r));return l instanceof Promise?l.then((e=>Cb(e,r,o,a))).catch((()=>Cb("<text using unknown compression>".split(""),r,o,a))):Cb(l,r,o,a)}function Ob({type:e,dataView:t,offset:n}){if(e===Kg){if(t.getUint8(n)===xb)return t.getUint8(n+1)}else if(e===Jg)return t.getUint8(n);return Rm}function Nb(e,t){return t===vb&&[Kg,Jg].includes(e)?bb:t===bb?e===Kg?Ab:Sb:t===Ab?Eb:Sb}function Cb(e,t,n,r){const i=function(e){if(e instanceof DataView)return Tm(e,0,e.byteLength);return e}(e);return{name:Db(t,n,r),value:i,description:t===Kg?Lb(e):i}}function Db(e,t,n){const r=Dm(n);if(e===qg||0===t.length)return r;return`${r} (${Dm(t)})`}function Lb(e){return Z_.decode("UTF-8",e)}function Ib(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function kb(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function $b(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 Rb={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=Xy.getLongAt(e,t[r]+Gg),a=Tm(e,t[r]+Hg,Vg);a===Xg?(n["Pixels Per Unit X"]=zb(e,t[r],i),n["Pixels Per Unit Y"]=Fb(e,t[r],i),n["Pixel Units"]=Pb(e,t[r],i)):a===Qg&&(n["Modify Date"]=Zb(e,t[r],i))}return n}};function zb(e,t,n){if(!Ub(e,t,n,0,4))return;const r=Xy.getLongAt(e,t+Yg+0);return{value:r,description:""+r}}function Fb(e,t,n){if(!Ub(e,t,n,4,4))return;const r=Xy.getLongAt(e,t+Yg+4);return{value:r,description:""+r}}function Pb(e,t,n){if(!Ub(e,t,n,8,1))return;const r=Xy.getByteAt(e,t+Yg+8);return{value:r,description:1===r?"meters":"Unknown"}}function Zb(e,t,n){if(!Ub(e,t,n,0,7))return;const r=Xy.getShortAt(e,t+Yg),i=Xy.getByteAt(e,t+Yg+2),a=Xy.getByteAt(e,t+Yg+3),o=Xy.getByteAt(e,t+Yg+4),s=Xy.getByteAt(e,t+Yg+5),u=Xy.getByteAt(e,t+Yg+6);return{value:[r,i,a,o,s,u],description:`${jb(r,4)}-${jb(i,2)}-${jb(a,2)} ${jb(o,2)}:${jb(s,2)}:${jb(u,2)}`}}function Ub(e,t,n,r,i){return r+i<=n&&t+Yg+r+i<=e.byteLength}function jb(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}var Bb={read:function(e,t){const n={},r=Xy.getByteAt(e,t);return n.Alpha=Hb(r),n.Animation=Yb(r),n.ImageWidth=Wb(e,t+Vb),n.ImageHeight=Wb(e,t+Gb),n}};const Vb=4,Gb=7;function Hb(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function Yb(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function Wb(e,t){const n=Xy.getByteAt(e,t)+256*Xy.getByteAt(e,t+1)+65536*Xy.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var qb={read:function(e){return{"GIF Version":Kb(e),"Image Width":Jb(e),"Image Height":Xb(e),"Global Color Map":Qb(e),"Bits Per Pixel":tA(e),"Color Resolution Depth":eA(e)}}};function Kb(e){if(6>e.byteLength)return;const t=Tm(e,3,3);return{value:t,description:t}}function Jb(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function Xb(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function Qb(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function eA(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function tA(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const nA=[6,7,99];var rA={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||nA.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),Im(t,"base64",(function(){return km(this.image)}))}var r;return t}};function iA(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}iA.prototype=new Error;var aA,oA,sA={MetadataMissingError:iA},uA={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),c={buffer:u,length:a};i.read(o,c,(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=>cA(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=>cA(e,t)));var n;return cA(e,t)},loadView:lA,errors:sA};function cA(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),lA(function(e){try{return new DataView(e)}catch(t){return new xm(e)}}(e),t)}function lA(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:c,tiffHeaderOffset:l,iptcDataOffset:d,xmpChunks:f,iccChunks:p,mpfDataOffset:h,pngHeaderOffset:m,pngTextChunks:g,pngChunkOffsets:y,vp8xChunkOffset:_,gifHeaderOffset:v}=Ly.parseAppMarkers(e,n);if(function(e){return void 0!==e}(u)){i=!0;const n=E_.read(e,u);t?a.file=n:a=Lm({},a,n)}if(function(e){return void 0!==e}(c)){i=!0;const n=N_.read(e,c);t?a.jfif=n:a=Lm({},a,n)}if(function(e){return void 0!==e}(l)){i=!0;const{tags:n,byteOrder:o}=d_.read(e,l,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=jm(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=jm(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=Lm({},a,n),n["IPTC-NAA"]&&!dA(d)){const e=U_.read(n["IPTC-NAA"].value,0,r);t?a.iptc=e:a=Lm({},a,e)}if(n.ApplicationNotes&&!fA(f)){const e=ev.read(Dm(n.ApplicationNotes.value));t?a.xmp=e:(delete e._raw,a=Lm({},a,e))}if(n.ImageSourceData){const e=Pv.read(n.PhotoshopSettings.value,r);t?a.photoshop=e:a=Lm({},a,e)}if(n.ICC_Profile&&!pA(p)){const e=Wv.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?a.icc=e:a=Lm({},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=ub.read(e,l,n.MakerNote.__offset,o,r);t?a.makerNotes=i:a=Lm({},a,i)}n.MakerNote&&delete n.MakerNote.__offset}if(dA(d)){i=!0;const n=U_.read(e,d,r);t?a.iptc=n:a=Lm({},a,n)}if(fA(f)){i=!0;const n=ev.read(e,f);t?a.xmp=n:(delete n._raw,a=Lm({},a,n))}if(pA(p)){i=!0;const t=Wv.read(e,p,n);t instanceof Promise?o.push(t.then(A)):A(t)}if(function(e){return void 0!==e}(h)){i=!0;const n=m_.read(e,h,r);t?a.mpf=n:a=Lm({},a,n)}if(void 0!==m){i=!0;const n=lb.read(e,m);t?(a.png=a.png?Lm({},a.png,n):n,a.pngFile=n):a=Lm({},a,n)}if(function(e){return void 0!==e}(g)){i=!0;const{readTags:t,readTagsPromise:a}=_b.read(e,g,n,r);E(t),a&&o.push(a.then((e=>e.forEach(E))))}if(function(e){return void 0!==e}(y)){i=!0;const n=Rb.read(e,y);t?a.png=a.png?Lm({},a.png,n):n:a=Lm({},a,n)}if(function(e){return void 0!==e}(_)){i=!0;const n=Bb.read(e,_);t?a.riff=a.riff?Lm({},a.riff,n):n:a=Lm({},a,n)}if(function(e){return void 0!==e}(v)){i=!0;const n=qb.read(e,v);t?a.gif=a.gif?Lm({},a.gif,n):n:a=Lm({},a,n)}const b=rA.get(e,a.Thumbnail,l);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 sA.MetadataMissingError;return n?Promise.all(o).then((()=>a)):a;function A(e){t?a.icc=e:a=Lm({},a,e)}function E(e){if(t){for(const t of["exif","iptc"]){const n=`__${t}`;e[n]&&(a[t]=a[t]?Lm({},a.exif,e[n]):e[n],delete e[n])}a.png=a.png?Lm({},a.png,e):e,a.pngText=a.pngText?Lm({},a.png,e):e}else a=Lm({},a,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e),delete a.__exif,delete a.__iptc}}function dA(e){return void 0!==e}function fA(e){return Array.isArray(e)&&e.length>0}function pA(e){return Array.isArray(e)&&e.length>0}!function(e){e.convertBlob=async(t,n="image/jpeg")=>{const r=(await bm.getType(t)).mime;if("image/heic"===r||"image/heif"===r){const{heicTo:e}=await import("./heic-to.bf3a4739.js");t=await e({blob:t,type:n})}const i=await e.blobToImage(t),a=document.createElement("canvas");return a.width=i.width,a.height=i.height,a.getContext("2d").drawImage(i,0,0),a.toDataURL(n)},e.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})),e.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}))},e.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"),c=u.getContext("2d");if(r)u.width=e.width*r,u.height=e.height*r,c.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),c.drawImage(e,o,s,t,r,0,0,i,a)}return new Promise((e=>u.toBlob((t=>e(t)),s,o)))},e.compressImage=async(t,n)=>{const{quality:r=1,fileSize:i,attempts:a=0,maxAttempts:o}=n,s=await e.blobToImage(t);if(t.size<=1024*i||r<0)return t;const u=await e.resampleImage(s,{scale:1,quality:r});return u.size>1024*i&&(a<o||!o)?e.compressImage(t,{...n,quality:r-.1,attempts:a+1}):u},e.getMetadata=async e=>{try{const t=await uA.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{}}}(aA||(aA={})),function(e){e.degreesToRadians=e=>Math.PI*e/180,e.radiansToDegrees=e=>180*e/Math.PI,e.nauticalMilesToMetres=e=>1852*e}(oA||(oA={}));var hA=Bi,mA=mo,gA=ci,yA=li,_A=Hi,vA=di.exports,bA=zi,AA=Ti,EA=Object.prototype.hasOwnProperty;var SA=function(e){if(null==e)return!0;if(_A(e)&&(yA(e)||"string"==typeof e||"function"==typeof e.splice||vA(e)||AA(e)||gA(e)))return!e.length;var t=mA(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(bA(e))return!hA(e).length;for(var n in e)if(EA.call(e,n))return!1;return!0};var wA,xA,MA,TA=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(!SA(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);TA(i)?delete n[t]:n[t]=i})),SA(n)?void 0:n}return t}}}(wA||(wA={})),function(e){e.generateId=(e,t,n)=>{let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r},e.getError=e=>{try{return e()}catch(e){return e}}}(xA||(xA={})),function(e){e.isMobileView=()=>window.innerWidth<=A.mobileL||window.innerWidth>window.innerHeight&&window.innerHeight<A.mobileL}(MA||(MA={}));const OA=a({formValidationConfig:null,setFormValidationConfig:()=>null,warnings:null,setWarnings:()=>null,yupId:null}),NA=({children:t})=>{const[n,r]=o(),[i,a]=o(),[s]=o(wm()),u=c((()=>({formValidationConfig:n,setFormValidationConfig:r,warnings:i,setWarnings:a,yupId:s})),[n,i,s]);return e(OA.Provider,{value:u,children:t})};var CA=Cr,DA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},LA=function(e){return this.__data__.has(e)};function IA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new CA;++t<n;)this.add(e[t])}IA.prototype.add=IA.prototype.push=DA,IA.prototype.has=LA;var kA=IA;var $A=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 RA=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},zA=$A,FA=function(e){return e!=e},PA=RA;var ZA=function(e,t,n){return t==t?PA(e,t,n):zA(e,FA,n)},UA=ZA;var jA=function(e,t){return!!(null==e?0:e.length)&&UA(e,t,0)>-1};var BA=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 VA=function(e,t){return e.has(t)},GA=kA,HA=jA,YA=BA,WA=ch,qA=Ai,KA=VA,JA=Math.min;var XA=function(e,t,n){for(var r=n?YA:HA,i=e[0].length,a=e.length,o=a,s=Array(a),u=1/0,c=[];o--;){var l=e[o];o&&t&&(l=WA(l,qA(t))),u=JA(l.length,u),s[o]=!n&&(t||i>=120&&l.length>=120)?new GA(o&&l):void 0}l=e[0];var d=-1,f=s[0];e:for(;++d<i&&c.length<u;){var p=l[d],h=t?t(p):p;if(p=n||0!==p?p:0,!(f?KA(f,h):r(c,h,n))){for(o=a;--o;){var m=s[o];if(!(m?KA(m,h):r(e[o],h,n)))continue e}f&&f.push(h),c.push(p)}}return c};var QA=function(e){return e};var eE=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)},tE=Math.max;var nE=function(e,t,n){return t=tE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=tE(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),eE(e,this,s)}};var rE=function(e){return function(){return e}},iE=Vr,aE=iE?function(e,t){return iE(e,"toString",{configurable:!0,enumerable:!1,value:rE(t),writable:!0})}:QA,oE=aE,sE=Date.now;var uE=function(e){var t=0,n=0;return function(){var r=sE(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(oE),cE=QA,lE=nE,dE=uE;var fE=function(e,t){return dE(lE(e,t,cE),e+"")},pE=Hi,hE=ti;var mE=function(e){return hE(e)&&pE(e)},gE=mE;var yE,_E,vE=ch,bE=XA,AE=function(e){return gE(e)?e:[]},EE=fE((function(e){var t=vE(e,AE);return t.length&&t[0]===e[0]?bE(t):[]}));try{yE=Map}catch(Qf){}try{_E=Set}catch(Qf){}function SE(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(wE);if(yE&&e instanceof yE)return new Map(Array.from(e.entries()));if(_E&&e instanceof _E)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]:SE(e[i],t,n)}return r}return e}function wE(e){return SE(e,[],[])}const xE=Object.prototype.toString,ME=Error.prototype.toString,TE=RegExp.prototype.toString,OE="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",NE=/^Symbol\((.*)\)(.*)$/;function CE(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 OE.call(e).replace(NE,"Symbol($1)");const r=xE.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+ME.call(e)+"]":"RegExp"===r?TE.call(e):null}function DE(e,t){let n=CE(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=CE(this[e],t);return null!==r?r:n}),2)}let LE={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: \`${DE(n,!0)}\``+(i?` (cast from the value \`${DE(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"},IE={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"},kE={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"},$E={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},RE={isValue:"${path} field must be ${value}"},zE={noUnknown:"${path} field has unspecified keys: ${unknown}"},FE={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 PE=Object.assign(Object.create(null),{mixed:LE,string:IE,number:kE,date:$E,object:zE,array:FE,boolean:RE}),ZE=Object.prototype.hasOwnProperty;var UE=function(e,t){return null!=e&&ZE.call(e,t)},jE=li,BE=fh,VE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GE=/^\w*$/;var HE=function(e,t){if(jE(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!BE(e))||(GE.test(e)||!VE.test(e)||null!=t&&e in Object(t))},YE=Cr;function WE(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(WE.Cache||YE),n}WE.Cache=YE;var qE=WE;var KE=function(e){var t=qE(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},JE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XE=/\\(\\)?/g,QE=KE((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(JE,(function(e,n,r,i){t.push(r?i.replace(XE,"$1"):n||e)})),t})),eS=li,tS=HE,nS=QE,rS=bh;var iS=function(e,t){return eS(e)?e:tS(e,t)?[e]:nS(rS(e))},aS=fh;var oS=function(e){if("string"==typeof e||aS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},sS=iS,uS=ci,cS=li,lS=hi,dS=mi,fS=oS;var pS=function(e,t,n){for(var r=-1,i=(t=sS(t,e)).length,a=!1;++r<i;){var o=fS(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&dS(i)&&lS(o,i)&&(cS(e)||uS(e))},hS=UE,mS=pS;var gS=function(e,t){return null!=e&&mS(e,t,hS)};const yS=e=>e&&e.__isYupSchema__;class _S{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!gS(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(!yS(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function vS(e){return null==e?[]:[].concat(e)}function bS(){return bS=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},bS.apply(this,arguments)}let AS=/\$\{\s*(\w+)\s*\}/g;class ES extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=bS({},t,{path:n})),"string"==typeof e?e.replace(AS,((e,n)=>DE(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=[],vS(e).forEach((e=>{ES.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,ES)}}function SS(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,c=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),l=r.length;const d=[];if(o=o||[],!l)return o.length?c(new ES(o,a,u)):c(null,a);for(let e=0;e<r.length;e++){(0,r[e])(i,(function(e){if(e){if(!ES.isError(e))return c(e,a);if(n)return e.value=a,c(e,a);d.push(e)}if(--l<=0){if(d.length&&(s&&d.sort(s),o.length&&d.push(...o),o=d),o.length)return void c(new ES(o,a,u),a);c(null,a)}}))}}var wS=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}},xS=wS(),MS=xS,TS=Ki;var OS=function(e,t){return e&&MS(e,t,TS)};var NS=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},CS=kA,DS=NS,LS=VA;var IS=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 c=a.get(e),l=a.get(t);if(c&&l)return c==t&&l==e;var d=-1,f=!0,p=2&n?new CS: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(!DS(t,(function(e,t){if(!LS(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 kS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var $S=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},RS=_o,zS=Vt,FS=IS,PS=kS,ZS=$S,US=mn?mn.prototype:void 0,jS=US?US.valueOf:void 0;var BS=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 RS(e),new RS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zS(+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=PS;case"[object Set]":var u=1&r;if(s||(s=ZS),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var l=FS(s(e),s(t),r,i,a,o);return o.delete(e),l;case"[object Symbol]":if(jS)return jS.call(e)==jS.call(t)}return!1},VS=ja,GS=Object.prototype.hasOwnProperty;var HS=function(e,t,n,r,i,a){var o=1&n,s=VS(e),u=s.length;if(u!=VS(t).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in t:GS.call(t,l)))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;++c<u;){var m=e[l=s[c]],g=t[l];if(r)var y=o?r(g,m,l,t,e,a):r(m,g,l,e,t,a);if(!(void 0===y?m===g||i(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==l)}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},YS=Ur,WS=IS,qS=BS,KS=HS,JS=mo,XS=li,QS=di.exports,ew=Ti,tw="[object Arguments]",nw="[object Array]",rw="[object Object]",iw=Object.prototype.hasOwnProperty;var aw=function(e,t,n,r,i,a){var o=XS(e),s=XS(t),u=o?nw:JS(e),c=s?nw:JS(t),l=(u=u==tw?rw:u)==rw,d=(c=c==tw?rw:c)==rw,f=u==c;if(f&&QS(e)){if(!QS(t))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new YS),o||ew(e)?WS(e,t,n,r,i,a):qS(e,t,u,n,r,i,a);if(!(1&n)){var p=l&&iw.call(e,"__wrapped__"),h=d&&iw.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new YS),i(m,g,n,r,a)}}return!!f&&(a||(a=new YS),KS(e,t,n,r,i,a))},ow=aw,sw=ti;var uw=function e(t,n,r,i,a){return t===n||(null==t||null==n||!sw(t)&&!sw(n)?t!=t&&n!=n:ow(t,n,r,i,e,a))},cw=Ur,lw=uw;var dw=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],c=e[u],l=s[1];if(o&&s[2]){if(void 0===c&&!(u in e))return!1}else{var d=new cw;if(r)var f=r(c,l,u,e,t,d);if(!(void 0===f?lw(l,c,3,r,d):f))return!1}}return!0},fw=Tn;var pw=function(e){return e==e&&!fw(e)},hw=pw,mw=Ki;var gw=function(e){for(var t=mw(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,hw(i)]}return t};var yw=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},_w=dw,vw=gw,bw=yw;var Aw=function(e){var t=vw(e);return 1==t.length&&t[0][2]?bw(t[0][0],t[0][1]):function(n){return n===e||_w(n,e,t)}},Ew=iS,Sw=oS;var ww=function(e,t){for(var n=0,r=(t=Ew(t,e)).length;null!=e&&n<r;)e=e[Sw(t[n++])];return n&&n==r?e:void 0},xw=ww;var Mw=function(e,t,n){var r=null==e?void 0:xw(e,t);return void 0===r?n:r};var Tw=function(e,t){return null!=e&&t in Object(e)},Ow=Tw,Nw=pS;var Cw=function(e,t){return null!=e&&Nw(e,t,Ow)},Dw=uw,Lw=Mw,Iw=Cw,kw=HE,$w=pw,Rw=yw,zw=oS;var Fw=function(e,t){return kw(e)&&$w(t)?Rw(zw(e),t):function(n){var r=Lw(n,e);return void 0===r&&r===t?Iw(n,e):Dw(t,r,3)}};var Pw=function(e){return function(t){return null==t?void 0:t[e]}},Zw=ww;var Uw=function(e){return function(t){return Zw(t,e)}},jw=Pw,Bw=Uw,Vw=HE,Gw=oS;var Hw=Aw,Yw=Fw,Ww=QA,qw=li,Kw=function(e){return Vw(e)?jw(Gw(e)):Bw(e)};var Jw=function(e){return"function"==typeof e?e:null==e?Ww:"object"==typeof e?qw(e)?Yw(e[0],e[1]):Hw(e):Kw(e)},Xw=Hr,Qw=OS,ex=Jw;var tx=function(e,t){var n={};return t=ex(t),Qw(e,(function(e,r,i){Xw(n,r,t(e,r,i))})),n};function nx(e){this._maxSize=e,this.clear()}nx.prototype.clear=function(){this._size=0,this._values=Object.create(null)},nx.prototype.get=function(e){return this._values[e]},nx.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,ix=/^\d+$/,ax=/^\d/,ox=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,sx=/^\s*(['"]?)(.*?)(\1)\s*$/,ux=new nx(512),cx=new nx(512),lx=new nx(512),dx={Cache:nx,split:px,normalizePath:fx,setter:function(e){var t=fx(e);return cx.get(e)||cx.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=fx(e);return lx.get(e)||lx.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+(hx(t)||ix.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])&&(mx(r)&&(r='"'+r+'"'),a=!(o=hx(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:px(e),t,n)}};function fx(e){return ux.get(e)||ux.set(e,px(e).map((function(e){return e.replace(sx,"$2")})))}function px(e){return e.match(rx)||[""]}function hx(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function mx(e){return!hx(e)&&(function(e){return e.match(ax)&&!e.match(ix)}(e)||function(e){return ox.test(e)}(e))}const gx="$",yx=".";class _x{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]===gx,this.isValue=this.key[0]===yx,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?gx:this.isValue?yx:"";this.path=this.key.slice(n.length),this.getter=this.path&&dx.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 vx(){return vx=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},vx.apply(this,arguments)}function bx(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,c=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:l,test:d,params:f,message:p}=e;let{parent:h,context:m}=o;function g(e){return _x.isRef(e)?e.getValue(r,h,m):e}function y(e={}){const t=tx(vx({value:r,originalValue:s,label:a,path:e.path||i},f,e.params),g),n=new ES(ES.formatError(e.message||p,t),r,t.path,e.type||l);return n.params=t,n}let _,v=vx({path:i,parent:h,type:l,createError:y,resolve:g,options:o,originalValue:s},c);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)}ES.isError(_)?n(_):_?n(null,_):n(y())}else try{Promise.resolve(d.call(v,r,v)).then((e=>{ES.isError(e)?n(e):e?n(null,e):n(y())})).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}_x.prototype.__isYupRef=!0;function Ax(e,t,n,r=n){let i,a,o;return t?(dx.forEach(t,((s,u,c)=>{let l=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=c?parseInt(l,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(!c){if(!e.fields||!e.fields[l])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[l],e=e.fields[l]}a=l,o=u?"["+s+"]":"."+s})),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Ex{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(_x.isRef(n)?e(n):n)),[])}add(e){_x.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){_x.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new Ex;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 Sx(){return Sx=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},Sx.apply(this,arguments)}class wx{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 Ex,this._blacklist=new Ex,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(LE.notType)})),this.type=(null==e?void 0:e.type)||"mixed",this.spec=Sx({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=Sx({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=wE(Sx({},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=Sx({},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(Sx({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=DE(e),a=DE(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,c=e;s||(c=this._cast(c,Sx({assert:!1},t)));let l={value:c,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),SS({args:l,value:c,path:i,sync:r,tests:d,endEarly:u},(e=>{e?n(e,c):SS({tests:this.tests.concat(f),args:l,path:i,sync:r,value:c,endEarly:u},n)}))}validate(e,t,n){let r=this.resolve(Sx({},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(Sx({},t,{value:e}))._validate(e,Sx({},t,{sync:!0}),((e,t)=>{if(e)throw e;n=t})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(ES.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ES.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):wE(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=LE.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=LE.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=LE.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=bx(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=vS(e).map((e=>new _x(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new _S(r,t)),n}typeError(e){let t=this.clone();return t._typeError=bx({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=LE.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=bx({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=LE.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=bx({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}}wx.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])wx.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Ax(this,t,n,r.context);return o[e](i&&i[a],Sx({},r,{parent:i,path:t}))};for(const e of["equals","is"])wx.prototype[e]=wx.prototype.oneOf;for(const e of["not","nope"])wx.prototype[e]=wx.prototype.notOneOf;wx.prototype.optional=wx.prototype.notRequired;const xx=wx;function Mx(){return new xx}Mx.prototype=xx.prototype;const Tx=e=>null==e;function Ox(){return new Nx}class Nx extends wx{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=RE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>Tx(e)||!0===e})}isFalse(e=RE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>Tx(e)||!1===e})}}Ox.prototype=Nx.prototype;let Cx=/^((([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,Dx=/^((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,Lx=/^(?:[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,Ix=e=>Tx(e)||e===e.trim(),kx={}.toString();function $x(){return new Rx}class Rx extends wx{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===kx?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=IE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return Tx(t)||t.length===this.resolve(e)}})}min(e,t=IE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return Tx(t)||t.length>=this.resolve(e)}})}max(e,t=IE.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return Tx(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||IE.matches,params:{regex:e},test:t=>Tx(t)||""===t&&i||-1!==t.search(e)})}email(e=IE.email){return this.matches(Cx,{name:"email",message:e,excludeEmptyString:!0})}url(e=IE.url){return this.matches(Dx,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=IE.uuid){return this.matches(Lx,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=IE.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:Ix})}lowercase(e=IE.lowercase){return this.transform((e=>Tx(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>Tx(e)||e===e.toLowerCase()})}uppercase(e=IE.uppercase){return this.transform((e=>Tx(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>Tx(e)||e===e.toUpperCase()})}}$x.prototype=Rx.prototype;function zx(){return new Fx}class Fx extends wx{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=kE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return Tx(t)||t>=this.resolve(e)}})}max(e,t=kE.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return Tx(t)||t<=this.resolve(e)}})}lessThan(e,t=kE.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return Tx(t)||t<this.resolve(e)}})}moreThan(e,t=kE.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return Tx(t)||t>this.resolve(e)}})}positive(e=kE.positive){return this.moreThan(0,e)}negative(e=kE.negative){return this.lessThan(0,e)}integer(e=kE.integer){return this.test({name:"integer",message:e,test:e=>Tx(e)||Number.isInteger(e)})}truncate(){return this.transform((e=>Tx(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=>Tx(t)?t:Math[e](t)))}}zx.prototype=Fx.prototype;var Px=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let Zx=new Date("");function Ux(){return new jx}class jx extends wx{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=Px.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)?Zx: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(_x.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=$E.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return Tx(e)||e>=this.resolve(n)}})}max(e,t=$E.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return Tx(e)||e<=this.resolve(n)}})}}jx.INVALID_DATE=Zx,Ux.prototype=jx.prototype,Ux.INVALID_DATE=Zx;var Bx=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 Vx=function(e){return function(t){return null==e?void 0:e[t]}},Gx=Vx({"À":"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"}),Hx=bh,Yx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wx=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var qx=function(e){return(e=Hx(e))&&e.replace(Yx,Gx).replace(Wx,"")},Kx=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Jx=function(e){return e.match(Kx)||[]},Xx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Qx=function(e){return Xx.test(e)},eM="\\ud800-\\udfff",tM="\\u2700-\\u27bf",nM="a-z\\xdf-\\xf6\\xf8-\\xff",rM="A-Z\\xc0-\\xd6\\xd8-\\xde",iM="\\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",aM="["+iM+"]",oM="\\d+",sM="["+tM+"]",uM="["+nM+"]",cM="[^"+eM+iM+oM+tM+nM+rM+"]",lM="(?:\\ud83c[\\udde6-\\uddff]){2}",dM="[\\ud800-\\udbff][\\udc00-\\udfff]",fM="["+rM+"]",pM="(?:"+uM+"|"+cM+")",hM="(?:"+fM+"|"+cM+")",mM="(?:['’](?:d|ll|m|re|s|t|ve))?",gM="(?:['’](?:D|LL|M|RE|S|T|VE))?",yM="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_M="[\\ufe0e\\ufe0f]?",vM=_M+yM+("(?:\\u200d(?:"+["[^"+eM+"]",lM,dM].join("|")+")"+_M+yM+")*"),bM="(?:"+[sM,lM,dM].join("|")+")"+vM,AM=RegExp([fM+"?"+uM+"+"+mM+"(?="+[aM,fM,"$"].join("|")+")",hM+"+"+gM+"(?="+[aM,fM+pM,"$"].join("|")+")",fM+"?"+pM+"+"+mM,fM+"+"+gM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oM,bM].join("|"),"g");var EM=function(e){return e.match(AM)||[]},SM=Jx,wM=Qx,xM=bh,MM=EM;var TM=function(e,t,n){return e=xM(e),void 0===(t=n?void 0:t)?wM(e)?MM(e):SM(e):e.match(t)||[]},OM=Bx,NM=qx,CM=TM,DM=RegExp("['’]","g");var LM=function(e){return function(t){return OM(CM(NM(t).replace(DM,"")),e,"")}},IM=LM((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),kM=IM,$M=Xh,RM=LM((function(e,t,n){return t=t.toLowerCase(),e+(n?$M(t):t)})),zM=RM,FM=Hr,PM=OS,ZM=Jw;var UM=function(e,t){var n={};return t=ZM(t),PM(e,(function(e,r,i){FM(n,t(e,r,i),e)})),n},jM={exports:{}};function BM(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 c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}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 l=o.get(e)||new Set;if(t=(l=Array.from(l)).length){a.add(e);do{var d=l[--t];u(d,s.get(d),a)}while(t);a.delete(e)}r[--n]=e}}}function VM(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 GM(e){return(t,n)=>VM(e,t)-VM(e,n)}function HM(){return HM=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},HM.apply(this,arguments)}jM.exports=function(e){return BM(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)},jM.exports.array=BM;let YM=e=>"[object Object]"===Object.prototype.toString.call(e);const WM=GM([]);class qM extends wx{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=WM,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 YM(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=HM({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=i[e],o=gS(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,l=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||e in r;continue}i=t.__validating&&l?r[e]:n.cast(r[e],u),void 0!==i&&(s[e]=i)}else o&&!a&&(s[e]=r[e]);s[e]!==r[e]&&(c=!0)}return c?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,c)=>{if(e){if(!ES.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!YM(c))return void n(r[0]||null,c);o=o||c;let l=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(c[e],HM({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r):r(null)}));SS({sync:i,tests:l,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)}))}clone(e){const t=super.clone(e);return t.fields=HM({},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 wx&&t instanceof wx&&(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=GM(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=dx.split(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(const t in e)if(gS(e,t)){let n=e[t];r.add(t),_x.isRef(n)&&n.isSibling?a(n.path,t):yS(n)&&"deps"in n&&n.deps.forEach((e=>a(e,t)))}return jM.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=dx.getter(e,!0);return this.transform((i=>{if(null==i)return i;let a=i;return gS(i,e)&&(a=HM({},i),n||delete a[e],a[t]=r(i)),a}))}noUnknown(e=!0,t=zE.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=zE.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>t&&UM(t,((t,n)=>e(n)))))}camelCase(){return this.transformKeys(zM)}snakeCase(){return this.transformKeys(kM)}constantCase(){return this.transformKeys((e=>kM(e).toUpperCase()))}describe(){let e=super.describe();return e.fields=tx(this.fields,(e=>e.describe())),e}}function KM(e){return new qM(e)}function JM(){return JM=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},JM.apply(this,arguments)}function XM(e){return new QM(e)}KM.prototype=qM.prototype;class QM extends wx{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,JM({},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,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,l=null!=(i=t.recursive)?i:this.spec.recursive,d=null!=t.originalValue?t.originalValue:e;super._validate(e,t,((e,r)=>{if(e){if(!ES.isError(e)||c)return void n(e,r);a.push(e)}if(!l||!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=JM({},t,{path:a,strict:!0,parent:r,index:e,originalValue:d[e]});i[e]=(e,t)=>u.validate(n,o,t)}SS({sync:o,path:s,value:r,errors:a,endEarly:c,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(!yS(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+DE(e));return t.innerType=e,t}length(e,t=FE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return Tx(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||FE.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return Tx(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||FE.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return Tx(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)}}XM.prototype=QM.prototype;class eT{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(!yS(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 tT(e,t,n){if(!e||!yS(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 nT=Object.freeze({__proto__:null,mixed:Mx,bool:Ox,boolean:Ox,string:$x,number:zx,date:Ux,object:KM,array:XM,ref:function(e,t){return new _x(e,t)},lazy:function(e){return new eT(e)},reach:(e,t,n,r)=>Ax(e,t,n,r).schema,isSchema:yS,addMethod:tT,setLocale:function(e){Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((n=>{PE[t][n]=e[t][n]}))}))},ValidationError:ES,BaseSchema:wx,MixedSchema:xx,BooleanSchema:Nx,StringSchema:Rx,NumberSchema:Fx,DateSchema:jx,ObjectSchema:qM,ArraySchema:QM});const rT=M.button`
179
+ tp((function(e){Object.getOwnPropertyNames(ih.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatterBuilder.prototype[t]=ih.prototype[t])})),Object.getOwnPropertyNames(sh.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatter.prototype[t]=sh.prototype[t])})),e.DateTimeFormatter.RFC_1123_DATE_TIME=sh.RFC_1123_DATE_TIME}));var ch=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},lh=Mn,dh=ti;var fh=function(e){return"symbol"==typeof e||dh(e)&&"[object Symbol]"==lh(e)},ph=ch,hh=li,mh=fh,gh=mn?mn.prototype:void 0,yh=gh?gh.toString:void 0;var _h=function e(t){if("string"==typeof t)return t;if(hh(t))return ph(t,e)+"";if(mh(t))return yh?yh.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},vh=_h;var bh=function(e){return null==e?"":vh(e)};var Ah=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},Eh=Ah;var Sh=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Eh(e,t,n)},wh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var xh=function(e){return wh.test(e)};var Mh=function(e){return e.split("")},Th="\\ud800-\\udfff",Oh="["+Th+"]",Nh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ch="\\ud83c[\\udffb-\\udfff]",Dh="[^"+Th+"]",Lh="(?:\\ud83c[\\udde6-\\uddff]){2}",Ih="[\\ud800-\\udbff][\\udc00-\\udfff]",kh="(?:"+Nh+"|"+Ch+")"+"?",$h="[\\ufe0e\\ufe0f]?",Rh=$h+kh+("(?:\\u200d(?:"+[Dh,Lh,Ih].join("|")+")"+$h+kh+")*"),zh="(?:"+[Dh+Nh+"?",Nh,Lh,Ih,Oh].join("|")+")",Fh=RegExp(Ch+"(?="+Ch+")|"+zh+Rh,"g");var Ph=function(e){return e.match(Fh)||[]},Zh=Mh,Uh=xh,jh=Ph;var Bh=function(e){return Uh(e)?jh(e):Zh(e)},Vh=Sh,Gh=xh,Hh=Bh,Yh=bh;var Wh=function(e){return function(t){t=Yh(t);var n=Gh(t)?Hh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Vh(n,1).join(""):t.slice(1);return r[e]()+i}},qh=Wh("toUpperCase"),Kh=bh,Jh=qh;var Xh=function(e){return Jh(Kh(e).toLowerCase())};function Qh(e){return new DataView(e.buffer,e.byteOffset)}const em={len:1,get:(e,t)=>Qh(e).getUint8(t),put:(e,t,n)=>(Qh(e).setUint8(t,n),t+1)},tm={len:2,get:(e,t)=>Qh(e).getUint16(t,!0),put:(e,t,n)=>(Qh(e).setUint16(t,n,!0),t+2)},nm={len:2,get:(e,t)=>Qh(e).getUint16(t),put:(e,t,n)=>(Qh(e).setUint16(t,n),t+2)},rm={len:4,get:(e,t)=>Qh(e).getUint32(t,!0),put:(e,t,n)=>(Qh(e).setUint32(t,n,!0),t+4)},im={len:4,get:(e,t)=>Qh(e).getUint32(t),put:(e,t,n)=>(Qh(e).setUint32(t,n),t+4)},am={len:4,get:(e,t)=>Qh(e).getInt32(t),put:(e,t,n)=>(Qh(e).setInt32(t,n),t+4)},om={len:8,get:(e,t)=>Qh(e).getBigUint64(t,!0),put:(e,t,n)=>(Qh(e).setBigUint64(t,n,!0),t+8)};class sm{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 um extends Error{constructor(){super("End-Of-Stream")}}class cm{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 um;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 lm extends cm{constructor(e){super(),this.reader=e.getReader({mode:"byob"})}async readFromStream(e,t,n){if(this.endOfStream)throw new um;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 dm{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 um;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 um;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new um;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new um;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 fm extends dm{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 um;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 um)return 0;throw e}if(!n.mayBeLess&&r<n.length)throw new um}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 pm extends dm{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 um;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 hm(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 mm(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 gm={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},ym=4100;function _m(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 vm{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 pm(n,r)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await(n=e,r=this.tokenizerOptions,new fm(new lm(n),r));var n,r;try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:n=ym}=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 um))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 _m(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(ym),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(gm);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 sm(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 sm(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=mm(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 um))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),_m(s,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:_m(s,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_m(s,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_m(s,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_m(s,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_m(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 sm(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 c=10485760,l=new Uint8Array(Math.min(c,e.fileInfo.size));if(await e.readBuffer(l,{mayBeLess:!0}),function(e,t){return-1!==mm(e,t)}(l,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}catch(d){if(!(d instanceof um))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(em);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:hm(r),len:hm(i)}}async function g(t){for(;t>0;){const n=await m();if(17026===n.id){return(await e.readToken(new sm(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 sm(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 sm(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(am),type:await e.readToken(new sm(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 A(){const t=new Uint8Array(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(om))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const E=await A();let S=E.size-24;if(_m(E.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const w=new Uint8Array(16);if(S-=await e.readBuffer(w),_m(w,[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(_m(w,[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(S)}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 sm(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 x=new DataView(this.buffer.buffer).getUint32(12,!0);if(x>12&&this.buffer.length>=x+16)try{const M=(new TextDecoder).decode(this.buffer.slice(16,x+16));if(JSON.parse(M).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 sm(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?nm:tm);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?nm:tm);for(let n=0;n<t;++n){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?nm:tm).get(this.buffer,2),n=(e?im:rm).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"}}}var bm;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"]),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,c=t,l=c;for(;s<u;){if(n+=e.charAt(s),c=n+t+o,r.measureText(c).width>a){i=l;break}if(l=c,o=e.charAt(u)+o,c=n+t+o,r.measureText(c).width>a){i=l;break}l=c,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 vm).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})}}(bm||(bm={}));const Am={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:(e="file",r=`${e}s`)=>({REQUIRED:`Upload at least 1 ${e}.`,MAX_FILES:t=>`Upload failed. You can only upload a maximum of ${t} ${1!==t?r:e}.`,MAX_FILES_WITH_REMAINING:t=>`Upload failed. You can only upload ${t} more ${1===t?e:r}. To upload more ${r}, you may wish to delete your previously uploaded ${r}.`,MAX_FILE_SIZE:t=>`Upload failed. ${Xh(e)} exceeds the maximum size of ${t} KB.`,GENERIC:"Upload failed. Please try again.",FILE_TYPE:e=>`Upload failed. Only ${bm.extensionsToSentence(e)} files are accepted.`,UPLOADING:`Please wait for all ${r} to finish uploading.`,MODAL:{FILE_TYPE:{TITLE:`Unsupported ${e} format`,DESCRIPTION:(e,r)=>t(n,{children:[e," could not be uploaded. Try again with a"," ",bm.extensionsToSentence(r)," file."]})},GENERIC_ERROR:{TITLE:`${Xh(e)} not uploaded`,DESCRIPTION:e=>t(n,{children:["There was a problem uploading ",e,". Please try again."]})},MAX_FILE_SIZE:{TITLE:`${Xh(e)} exceeds maximum size`,DESCRIPTION:(e,r)=>t(n,{children:[e," exceeds the maximum size of ",r," 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 Em,Sm;!function(e){function t(e,t,n){if(e)try{const r=mf.ofPattern(t).withResolverStyle(pd.STRICT).withLocale(ah.ENGLISH);switch(n){case"date":return kf.parse(e,r);case"time":return zf.parse(e,r);case"datetime":return Rf.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")||kf.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=mf.ofPattern(t).withResolverStyle(pd.STRICT).withLocale(ah.ENGLISH);switch(n){case"date":return kf.parse(e).format(i);case"time":return zf.parse(e).format(i);case"datetime":return Rf.parse(e).format(i);default:return r||Am.GENERIC.INVALID}}catch(e){return r||Am.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")||kf.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:c}=r;if(u>=0){const e=c?o.minusDays(1):o,t=s.plusDays(1);return a.isAfter(e)&&a.isBefore(t)}{const e=o.minusDays(1),t=c?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")||kf.now();return a>=0?i.isAfter(s.plusDays(a)):i.isBefore(s.plusDays(a))}}(Em||(Em={})),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"}}(Sm||(Sm={}));const wm=()=>Array(5).fill(0).map((()=>Math.random().toString(36).slice(2))).join("");class xm{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 Mm(e,t,n){try{return new DataView(e,t,n)}catch(r){return new xm(e,t,n)}}function Tm(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 Om(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 Nm(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,Tm(e,t+1,n)]}function Dm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Lm(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function Im(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 km(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 $m(e,t){return new Array(t+1).join(e)}const Rm=void 0;function zm(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 Fm=!0,Pm=!0;function Zm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Um(e){if(e.length>=8){const t=Zm(e.slice(0,8));if("ASCII\0\0\0"===t)return Zm(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 jm(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const Bm=18761,Vm=19789;var Gm={BIG_ENDIAN:Vm,LITTLE_ENDIAN:Bm,getByteOrder:function(e,t){if(e.getUint16(t)===Bm)return Bm;if(e.getUint16(t)===Vm)return Vm;throw new Error("Illegal byte order value. Faulty image.")}};var Hm={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===Gm.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};var Ym={isJpegFile:function(e){return!!e&&e.byteLength>=Wm&&e.getUint16(0)===qm},findJpegOffsets:function(e){let t,n,r,i,a,o,s,u,c,l=Km;for(;l+Jm+5<=e.byteLength;){if(Og(e,l))t=e.getUint16(l+Xm),n=l+Xm;else if(Ng(e,l))t=e.getUint16(l+Xm),r=l+Xm;else if(Lg(e,l))t=e.getUint16(l+Xm),i=l+Qm;else if(Ig(e,l))t=e.getUint16(l+Xm),a=l+eg;else if(kg(e,l))s||(s=[]),t=e.getUint16(l+Xm),s.push(Rg(l,t));else if($g(e,l))s||(s=[]),t=e.getUint16(l+Xm),s.push(zg(l,t));else if(Fg(e,l))t=e.getUint16(l+Xm),o=l+tg;else if(Cg(e,l)){t=e.getUint16(l+Xm);const n=l+ig,r=t-(ig-Xm),i=e.getUint8(l+sg),a=e.getUint8(l+ug);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:a})}else if(Dg(e,l))t=e.getUint16(l+Xm),c=l+ag;else{if(!Pg(e,l)){if(Zg(e,l)){l++;continue}break}t=e.getUint16(l+Xm)}l+=Xm+t}return{hasAppMarkers:l>Km,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:a,iptcDataOffset:o,xmpChunks:s,iccChunks:u,mpfDataOffset:c}}};const Wm=2,qm=65496,Km=2,Jm=4,Xm=2,Qm=2,eg=10,tg=18,ng=33,rg=79,ig=18,ag=8,og="ICC_PROFILE\0",sg=Jm+og.length,ug=sg+1,cg="MPF\0",lg=65472,dg=65474,fg=65476,pg=65499,hg=65501,mg=65498,gg=65504,yg=65505,_g=65506,vg=65517,bg=65519,Ag=65534,Eg=65535,Sg="JFIF",wg="Exif",xg="http://ns.adobe.com/xap/1.0/\0",Mg="http://ns.adobe.com/xmp/extension/\0",Tg="Photoshop 3.0";function Og(e,t){return e.getUint16(t)===lg}function Ng(e,t){return e.getUint16(t)===dg}function Cg(e,t){const n=og.length;return e.getUint16(t)===_g&&Tm(e,t+Jm,n)===og}function Dg(e,t){const n=cg.length;return e.getUint16(t)===_g&&Tm(e,t+Jm,n)===cg}function Lg(e,t){const n=Sg.length;return e.getUint16(t)===gg&&Tm(e,t+Jm,n)===Sg&&0===e.getUint8(t+Jm+n)}function Ig(e,t){const n=wg.length;return e.getUint16(t)===yg&&Tm(e,t+Jm,n)===wg&&0===e.getUint8(t+Jm+n)}function kg(e,t){return e.getUint16(t)===yg&&function(e,t){const n=xg.length;return Tm(e,t+Jm,n)===xg}(e,t)}function $g(e,t){return e.getUint16(t)===yg&&function(e,t){const n=Mg.length;return Tm(e,t+Jm,n)===Mg}(e,t)}function Rg(e,t){return{dataOffset:e+ng,length:t-(ng-Xm)}}function zg(e,t){return{dataOffset:e+rg,length:t-(rg-Xm)}}function Fg(e,t){const n=Tg.length;return e.getUint16(t)===vg&&Tm(e,t+Jm,n)===Tg&&0===e.getUint8(t+Jm+n)}function Pg(e,t){const n=e.getUint16(t);return n>=gg&&n<=bg||n===Ag||n===lg||n===dg||n===fg||n===pg||n===hg||n===mg}function Zg(e,t){return e.getUint16(t)===Eg}var Ug={isPngFile:function(e){return!!e&&Tm(e,0,jg.length)===jg},findPngOffsets:function(e,t){const n={hasAppMarkers:!1};let r=jg.length;for(;r+Bg+Vg<=e.byteLength;){if(ny(e,r))n.hasAppMarkers=!0,n.pngHeaderOffset=r+Yg;else if(ry(e,r)){const t=uy(e,r);void 0!==t&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:t,length:e.getUint32(r+Gg)-(t-(r+Yg))}])}else if(iy(e,r,t)){n.hasAppMarkers=!0;const t=Tm(e,r+Hg,Vg);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+Gg),type:t,offset:r+Yg})}else if(ay(e,r))n.hasAppMarkers=!0,n.tiffHeaderOffset=r+Yg;else if(t&&oy(e,r)){n.hasAppMarkers=!0;const t=e.getUint32(r+Gg),i=r+Yg,{profileName:a,compressionMethod:o,compressedProfileOffset:s}=cy(e,i);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:t-(s-i),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:o})}else sy(e,r)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+Gg));r+=e.getUint32(r+Gg)+Bg+Vg+4}return n}};const jg="‰PNG\r\n\n",Bg=4,Vg=4,Gg=0,Hg=Bg,Yg=Bg+Vg,Wg="XML:com.adobe.xmp\0",qg="tEXt",Kg="iTXt",Jg="zTXt",Xg="pHYs",Qg="tIME",ey="eXIf",ty="iCCP";function ny(e,t){return"IHDR"===Tm(e,t+Hg,Vg)}function ry(e,t){return Tm(e,t+Hg,Vg)===Kg&&Tm(e,t+Yg,Wg.length)===Wg}function iy(e,t,n){const r=Tm(e,t+Hg,Vg);return r===qg||r===Kg||r===Jg&&n}function ay(e,t){return Tm(e,t+Hg,Vg)===ey}function oy(e,t){return Tm(e,t+Hg,Vg)===ty}function sy(e,t){const n=[Xg,Qg],r=Tm(e,t+Hg,Vg);return n.includes(r)}function uy(e,t){t+=Yg+Wg.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function cy(e,t){const n=Om(e,t);t+=n.length+1;return{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function ly(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 c=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!==c?c:0;const l=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:dy(e,t,i,a,o,s,c,l),length:r}}function dy(e,t,n,r,i,a,o,s){if(void 0===s)return[];const u=[];let c=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=fy(e,c,t),c+=r.item.itemId,n.constructionMethod=1===t||2===t?15&e.getUint16(c):void 0,c+=r.item.constructionMethod,n.dataReferenceIndex=e.getUint16(c),c+=r.item.dataReferenceIndex,n.baseOffset=hy(e,c,r.item.baseOffset),c+=r.item.baseOffset,n.extentCount=e.getUint16(c),c+=r.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=py(e,t,c,o),c+=r.item.extent.extentIndex,s.extentOffset=hy(e,c,i),c+=r.item.extent.extentOffset,s.extentLength=hy(e,c,a),c+=r.item.extent.extentLength,n.extents.push(s)}u.push(n)}return u}function fy(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function py(e,t,n,r){if((1===t||2===t)&&r>0)return hy(e,n,r)}function hy(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 my=1165519206,gy=1835625829,yy=1970432288;function _y(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=Tm(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:Ey(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1768973167===i)return function(e,t,n,r){return{type:"ipco",properties:Ey(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1668246642===i)return function(e,t,n){return{type:"colr",icc:Ay(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:Ey(e,n+i,r-(n+i-t)),length:r}}(e,t,r+1,n):1768714083===i?ly(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:Ey(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=Om(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=Om(e,r),r+=a.itemName.length+1,a.itemType===gy?(a.contentType=Om(e,r),t+i>(r+=a.contentType.length+1)&&(a.contentEncoding=Om(e,r),r+=a.contentEncoding.length+1)):a.itemType===yy&&(a.itemUri=Om(e,r),r+=a.itemUri.length+1));return a}(e,t,a,r+1,n):{type:void 0,length:n}}function vy(e){{const t={},n=function(e){const t=4,n=4;let r=0;for(;r+t+n<=e.byteLength;){const t=_y(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===my))}(t).itemId,r=by(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===gy&&"application/rdf+xml"===e.contentType))}(e).itemId,n=by(e,t),r=by(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 by(e,t){return e.subBoxes.find((e=>"iloc"===e.type)).items.find((e=>e.itemId===t))}function Ay(e,t){const n=Tm(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function Ey(e,t,n){const r=[my,gy],i=[];let a=t;for(;a<t+n;){const t=_y(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 Sy={isHeicFile:function(e){if(!e)return!1;const t=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=_y(e,0);return n&&-1!==t.indexOf(n.majorBrand)}catch(e){return!1}},findHeicOffsets:function(e){return vy(e)}};var wy={isAvifFile:function(e){if(!e)return!1;try{const t=_y(e,0);return t&&"avif"===t.majorBrand}catch(e){return!1}},findAvifOffsets:function(e){return vy(e)}};var xy={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&Tm(e,0,4)===t&&Tm(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=Tm(e,o,4),c=e.getUint32(o+4,!0);"EXIF"===u?(s=!0,n=Tm(e,o+8,6)===t?o+8+6:o+8):"XMP "===u?(s=!0,r=[{dataOffset:o+8,length:c}]):"ICCP"===u?(s=!0,i=[{offset:o+8,length:c,chunkNumber:1,chunksTotal:1}]):"VP8X"===u&&(s=!0,a=o+8),o+=8+(c%2==0?c:c+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:r,iccChunks:i,vp8xChunkOffset:a}}};var My={isGifFile:function(e){return!!e&&Oy.includes(Tm(e,0,Ty))},findOffsets:function(){return{gifHeaderOffset:0}}};const Ty=6,Oy=["GIF87a","GIF89a"];var Ny={isXMLFile:function(e){return!!e&&Tm(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 Ly={parseAppMarkers:function(e,t){if(Hm.isTiffFile(e))return Iy(Hm.findTiffOffsets(),"tiff","TIFF");if(Ym.isJpegFile(e))return Iy(Ym.findJpegOffsets(e),"jpeg","JPEG");if(Ug.isPngFile(e))return Iy(Ug.findPngOffsets(e,t),"png","PNG");if(Sy.isHeicFile(e))return Iy(Sy.findHeicOffsets(e),"heic","HEIC");if(wy.isAvifFile(e))return Iy(wy.findAvifOffsets(e),"avif","AVIF");if(xy.isWebpFile(e))return Iy(xy.findOffsets(e),"webp","WebP");if(My.isGifFile(e))return Iy(My.findOffsets(e),"gif","GIF");if(Ny.isXMLFile(e))return Iy(Ny.findOffsets(e),"xml","XML");throw new Error("Invalid image format")}};function Iy(e,t,n){return Lm({},e,{fileType:{value:t,description:n}})}var ky={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])},$y={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:ky.XResolution},283:{name:"YResolution",description:ky.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:ky.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:Ry},40092:{name:"XPComment",description:Ry},40093:{name:"XPAuthor",description:Ry},40094:{name:"XPKeywords",description:Ry},40095:{name:"XPSubject",description:Ry},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:ky.LightSource},50779:{name:"CalibrationIlluminant2",description:ky.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 Ry(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}var zy={33434:{name:"ExposureTime",description:ky.ExposureTime},33437:{name:"FNumber",description:ky.FNumber},34850:{name:"ExposureProgram",description:ky.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=>Zm(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:ky.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:ky.ShutterSpeedValue},37378:{name:"ApertureValue",description:ky.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:ky.MeteringMode},37384:{name:"LightSource",description:ky.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:ky.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:Um},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:ky.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:ky.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:ky.CustomRendered},41986:{name:"ExposureMode",description:ky.ExposureMode},41987:{name:"WhiteBalance",description:ky.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:ky.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:ky.Contrast},41993:{name:"Saturation",description:ky.Saturation},41994:{name:"Sharpness",description:ky.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"},Fy={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:jm},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:jm},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:Um},28:{name:"GPSAreaInformation",description:Um},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},Py={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>Zm(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Zy={45056:{name:"MPFVersion",description:e=>Zm(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};const Uy=Lm({},$y,zy),jy="0th",By="1st",Vy="exif",Gy="gps",Hy="interoperability",Yy="mpf",Wy="canon";var qy={[jy]:Uy,[By]:$y,[Vy]:Uy,[Gy]:Fy,[Hy]:Py,[Yy]:Zy,[Wy]:{4:{name:"ShotInfo",description:e=>e}}};const Ky={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Jy={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13};var Xy={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:Qy,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===Gm.LITTLE_ENDIAN)},getLongAt:e_,getRationalAt:function(e,t,n){return[e_(e,t,n),e_(e,t+4,n)]},getUndefinedAt:function(e,t){return Qy(e,t)},getSlongAt:t_,getSrationalAt:function(e,t,n){return[t_(e,t,n),t_(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return e_(e,t,n)},typeSizes:Ky,tagTypes:Jy,getTypeSize:function(e){if(void 0===Jy[e])throw new Error("No such type found.");return Ky[Jy[e]]}};function Qy(e,t){return e.getUint8(t)}function e_(e,t,n){return e.getUint32(t,n===Gm.LITTLE_ENDIAN)}function t_(e,t,n){return e.getInt32(t,n===Gm.LITTLE_ENDIAN)}const n_={1:Xy.getByteAt,2:Xy.getAsciiAt,3:Xy.getShortAt,4:Xy.getLongAt,5:Xy.getRationalAt,7:Xy.getUndefinedAt,9:Xy.getSlongAt,10:Xy.getSrationalAt,13:Xy.getIfdPointerAt};function r_(e,t,n){return t+Xy.getLongAt(e,t+4,n)}function i_(e,t,n,r,i,a){const o=Xy.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+Xy.getTypeSize("SHORT")<=e.byteLength)return Xy.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(let o=0;o<u&&!(r+12>e.byteLength);o++){const o=a_(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-Xy.getTypeSize("LONG")){const o=Xy.getLongAt(e,r,i);0!==o&&t===jy&&(s.Thumbnail=i_(e,"1st",n,n+o,i,a))}return s}function a_(e,t,n,r,i,a){const o=Xy.getTypeSize("SHORT"),s=o+Xy.getTypeSize("SHORT"),u=s+Xy.getTypeSize("LONG"),c=Xy.getShortAt(e,r,i),l=Xy.getShortAt(e,r+o,i),d=Xy.getLongAt(e,r+s,i);let f,p;if(void 0===Xy.typeSizes[l]||!a&&void 0===qy[t][c])return;if(function(e,t){return Xy.typeSizes[e]*t<=Xy.getTypeSize("LONG")}(l,d))p=r+u,f=o_(e,p,l,d,i);else if(p=Xy.getLongAt(e,r+u,i),function(e,t,n,r,i){return t+n+Xy.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)){f=o_(e,n+p,l,d,i,33723===c)}else f="<faulty value>";l===Xy.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-${c}`,m=f;if(void 0!==qy[t][c])if(void 0!==qy[t][c].name&&void 0!==qy[t][c].description){h=qy[t][c].name;try{m=qy[t][c].description(f)}catch(e){m=s_(f)}}else l===Xy.tagTypes.RATIONAL||l===Xy.tagTypes.SRATIONAL?(h=qy[t][c],m=""+f[0]/f[1]):(h=qy[t][c],m=s_(f));return{id:c,name:h,value:f,description:m,__offset:p}}function o_(e,t,n,r,i,a=!1){let o=[];a&&(r*=Xy.typeSizes[n],n=Xy.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(n_[n](e,t,i)),t+=Xy.typeSizes[n];return n===Xy.tagTypes.ASCII?o=Xy.getAsciiValue(o):1===o.length&&(o=o[0]),o}function s_(e){return e instanceof Array?e.join(", "):e}const u_="Exif IFD Pointer",c_="GPS Info IFD Pointer",l_="Interoperability IFD Pointer";var d_={read:function(e,t,n){const r=Gm.getByteOrder(e,t);let i=function(e,t,n,r){return i_(e,jy,t,r_(e,t,n),n,r)}(e,t,r,n);return i=f_(i,e,t,r,n),i=p_(i,e,t,r,n),i=h_(i,e,t,r,n),{tags:i,byteOrder:r}}};function f_(e,t,n,r,i){return void 0!==e[u_]?Lm(e,i_(t,Vy,n,n+e[u_].value,r,i)):e}function p_(e,t,n,r,i){return void 0!==e[c_]?Lm(e,i_(t,"gps",n,n+e[c_].value,r,i)):e}function h_(e,t,n,r,i){return void 0!==e[l_]?Lm(e,i_(t,Hy,n,n+e[l_].value,r,i)):e}var m_={read:function(e,t,n){const r=Gm.getByteOrder(e,t),i=i_(e,"mpf",t,r_(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/g_);a++){i[a]={};const o=y_(n.MPEntry.value,a*g_,Xy.getTypeSize("LONG"),r);i[a].ImageFlags=__(o),i[a].ImageFormat=v_(o),i[a].ImageType=b_(o);const s=y_(n.MPEntry.value,a*g_+4,Xy.getTypeSize("LONG"),r);i[a].ImageSize={value:s,description:""+s};const u=A_(a,n.MPEntry,r,t);i[a].ImageOffset={value:u,description:""+u};const c=y_(n.MPEntry.value,a*g_+12,Xy.getTypeSize("SHORT"),r);i[a].DependentImage1EntryNumber={value:c,description:""+c};const l=y_(n.MPEntry.value,a*g_+14,Xy.getTypeSize("SHORT"),r);i[a].DependentImage2EntryNumber={value:l,description:""+l},i[a].image=e.buffer.slice(u,u+s),Im(i[a],"base64",(function(){return km(this.image)}))}return n.Images=i,n}(e,t,i,r)}};const g_=16;function y_(e,t,n,r){if(r===Gm.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 __(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 v_(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function b_(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 A_(e,t,n,r){return function(e){return 0===e}(e)?0:y_(t.value,e*g_+8,Xy.getTypeSize("LONG"),n)+r}var E_={read:function(e,t){const n=function(e,t){return Xy.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=Xy.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":S_(e,t,n),"Image Height":w_(e,t,n),"Image Width":x_(e,t,n),"Color Components":r,Subsampling:r&&M_(e,t,r.value,n)}}};function S_(e,t,n){if(3>n)return;const r=Xy.getByteAt(e,t+2);return{value:r,description:""+r}}function w_(e,t,n){if(5>n)return;const r=Xy.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function x_(e,t,n){if(7>n)return;const r=Xy.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function M_(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([Xy.getByteAt(e,n),Xy.getByteAt(e,n+1),Xy.getByteAt(e,n+2)])}return{value:i,description:i.length>1?T_(i)+O_(i):""}}function T_(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function O_(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 N_={read:function(e,t){const n=function(e,t){return Xy.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=Xy.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=Xy.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:I_(e,t,n),YResolution:k_(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=Xy.getByteAt(e,t+7),i=Xy.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function D_(e,t,n){if(10>n)return;const r=Xy.getByteAt(e,t+9);return{value:r,description:L_(r)}}function L_(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function I_(e,t,n){if(12>n)return;const r=Xy.getShortAt(e,t+10);return{value:r,description:""+r}}function k_(e,t,n){if(14>n)return;const r=Xy.getShortAt(e,t+12);return{value:r,description:""+r}}var $_={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:R_},336:{name:"Time Sent",description:z_},346:{name:"Coded Character Set",description:F_,encoding_name:F_},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"===Zm(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=Zm(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=Zm(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:R_},572:{name:"Time Created",description:z_},574:{name:"Digital Creation Date",description:R_},575:{name:"Digital Creation Time",description:z_},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=Zm(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=Zm(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=Zm(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(Zm(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(Zm(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=Zm(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 Zm(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=Zm(e);if(t["ObjectData Preview File Format"]){const e=Zm(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 R_(e){const t=Zm(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function z_(e){const t=Zm(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 F_(e){const t=Zm(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 P_={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var Z_={decode:function(e,t){const n=P_.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 U_={read:function(e,t,n){try{if(Array.isArray(e))return G_(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=j_(e,t);if(B_(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+V_(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return G_(e,r,i,n)}catch(e){return{}}}};function j_(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 B_(e){return 1028===e.type}function V_(e){return e.size%2!=0?1:0}function G_(e,t,n,r){const i={};let a;const o=n+t.size;for(;n<o&&n<e.byteLength;){const{tag:t,tagSize:o}=H_(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 H_(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&&!$_.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:Y_($_.iptc[a],a,s),value:s,description:W_($_.iptc[a],s,n,r)};return function(e){return $_.iptc[e]&&$_.iptc[e].repeatable}(a)&&(u.repeatable=!0),function(e){return $_.iptc[e]&&void 0!==$_.iptc[e].encoding_name}(a)&&(u.encoding=$_.iptc[a].encoding_name(s)),{tag:u,tagSize:o}}function Y_(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 W_(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)?Z_.decode(r,t):t}var q_={"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=>ky.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>K_(ky.XResolution,e),"tiff:YResolution":e=>K_(ky.YResolution,e),"exif:ApertureValue":e=>K_(ky.ApertureValue,e),"exif:GPSLatitude":X_,"exif:GPSLongitude":X_,"exif:FNumber":e=>K_(ky.FNumber,e),"exif:FocalLength":e=>K_(ky.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>ky.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>ky.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 ky.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>ky.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>ky.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>ky.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>ky.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>J_(e)?ky.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>ky.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>ky.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>ky.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>ky.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>K_(ky.ShutterSpeedValue,e),"exif:WhiteBalance":e=>ky.WhiteBalance(parseInt(e,10))};function K_(e,t){return J_(t)?e(t.split("/")):t}function J_(e){return/^-?\d+\/-?\d+$/.test(e)}function X_(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 Q_={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 ev={read:function(e,t){const n={};if("string"==typeof e)return nv(n,e),n;const[r,i]=function(e,t){if(0===t.length)return[];const n=[tv(e,t.slice(0,1))];t.length>1&&n.push(tv(e,t.slice(1)));return n}(e,t),a=nv(n,r);if(i){const r=nv(n,i);a||r||(delete n._raw,nv(n,tv(e,t)))}return n}};function tv(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 nv(e,t){try{const{doc:n,raw:r}=function(e){const t=Q_.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:Tm(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 Lm(e,ov(iv(rv(n),!0))),!0}catch(e){return!1}}function rv(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return rv(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function iv(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:av(e),value:iv(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 av(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 ov(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=>{Lm(t,sv(e.attributes)),"object"==typeof e.value&&Lm(t,pv(e.value))}))}return t}function sv(e){const t={};for(const n in e)try{uv(n)&&(t[lv(n)]={value:e[n],attributes:{},description:dv(e[n],n)})}catch(e){}return t}function uv(e){return"rdf:parseType"!==e&&!cv(e)}function cv(e){return"xmlns"===e.split(":")[0]}function lv(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function dv(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?dv(e.value):dv(e))).join(", ")}(e);return t&&"function"==typeof q_[t]?q_[t](e,n):n}if("object"==typeof e)return function(e){const t=[];for(const n in e)t.push(`${fv(n)}: ${dv(e[n].value)}`);return t.join("; ")}(e);try{return t&&"function"==typeof q_[t]?q_[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function fv(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 pv(e){const t={};for(const n in e)try{cv(n)||(t[lv(n)]=hv(e[n],n))}catch(e){}return t}function hv(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Sv(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:""}:mv(e)?gv(e,t):_v(e)?vv(e,t):bv(e)?Av(e,t):function(e){return void 0!==Ev(e.value)}(e)?function(e,t){let n=Ev(e.value).value["rdf:li"];const r=yv(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(mv(e))return gv(e);if(_v(e))return vv(e).value;if(bv(e))return Av(e).value;return Sv(e)}(e))})),{value:i,attributes:r,description:dv(i,t)}}(e,t):Sv(e,t)}function mv(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 gv(e,t){const n=yv(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),Lm(n,yv(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||cv(n)||(t[lv(n)]=e.value[n].value);return t}(e));const r=function(e){return wv(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:dv(r,t)}}function yv(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||cv(n)||(t[lv(n)]=e.attributes[n]);return t}function _v(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function vv(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(Lm(n.value,sv(e.value["rdf:Description"].attributes)),Lm(n.attributes,yv(e)),e=e.value["rdf:Description"]),Lm(n.value,pv(e.value)),n.description=dv(n.value,t),n}function bv(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function Av(e,t){const n=sv(e.attributes);return{value:n,attributes:{},description:dv(n,t)}}function Ev(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Sv(e,t){const n=wv(e)||ov(e.value);return{value:n,attributes:yv(e),description:dv(n,t)}}function wv(e){return e.attributes&&e.attributes["rdf:resource"]}const xv=0,Mv=1,Tv=2,Ov=3,Nv=4,Cv=5,Dv=6,Lv=7,Iv=8;var kv={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=Xy.getShortAt(e,r);$v[i]&&(t[i]||(t[i]=$v[i].description),n.push({type:i,path:$v[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 $v={[xv]:{description:"Closed subpath length",path:(e,t)=>[Xy.getShortAt(e,t)]},[Mv]:{description:"Closed subpath Bezier knot, linked",path:Rv},[Tv]:{description:"Closed subpath Bezier knot, unlinked",path:Rv},[Ov]:{description:"Open subpath length",path:(e,t)=>[Xy.getShortAt(e,t)]},[Nv]:{description:"Open subpath Bezier knot, linked",path:Rv},[Cv]:{description:"Open subpath Bezier knot, unlinked",path:Rv},[Dv]:{description:"Path fill rule",path:()=>[]},[Iv]:{description:"Initial fill rule",path:(e,t)=>[Xy.getShortAt(e,t)]},[Lv]:{description:"Clipboard",path:function(e,t){return[[Fv(e,t,8),Fv(e,t+4,8),Fv(e,t+8,8),Fv(e,t+12,8)],Fv(e,t+16,8)]}}};function Rv(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(zv(e,t+r));return n}function zv(e,t){const n=Fv(e,t,8);return[Fv(e,t+4,8),n]}function Fv(e,t,n){const r=Xy.getLongAt(e,t),i=r>>>31==0?1:-1,a=(2130706432&r)>>>32-n,o=r&parseInt($m("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 $m(n,t-e.length)+e}(o.toString(2),32-n,"0"),2)}var Pv={read:function(e,t){const n=Mm(new Uint8Array(e).buffer),r={};let i=0;for(;i<e.length;){const e=Tm(n,i,Bv);i+=Bv;const a=Xy.getShortAt(n,i);i+=Uv;const{tagName:o,tagNameSize:s}=Vv(n,i);i+=s;const u=Xy.getLongAt(n,i);if(i+=jv,e===Zv){const e=Mm(n.buffer,i,u),s={id:a,value:Tm(e,0,u)};if(kv[a]){try{s.description=kv[a].description(e)}catch(e){s.description="<no description formatter>"}r[o||kv[a].name]=s}else t&&(r[`undefined-${a}`]=s)}i+=u+u%2}return r}};const Zv="8BIM",Uv=2,jv=4,Bv=Zv.length;function Vv(e,t){const[n,r]=Cm(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const Gv={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"}},Hv={4:{name:"Preferred CMM type",value:(e,t)=>Tm(e,t,4),description:e=>null!==e?Yv(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)=>Tm(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)=>Tm(e,t,4)},20:{name:"Connection Space",value:(e,t)=>Tm(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)=>Tm(e,t,4),description:e=>Yv(e)},48:{name:"Device Manufacturer",value:(e,t)=>Tm(e,t,4),description:e=>Yv(e)},52:{name:"Device Model Number",value:(e,t)=>Tm(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)=>Tm(e,t,4)}};function Yv(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 Wv={read:function(e,t,n){if(n&&t[0].compressionMethod!==Rm)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 zm(r,t[0].compressionMethod,"utf-8","dataview").then(ib).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 ib(new DataView(r.buffer))}catch(e){return{}}}(e,t)}};const qv=84,Kv=128,Jv="acsp",Xv="desc",Qv="mluc",eb="text",tb="sig ",nb=12;function rb(e,t){return e.length<t+nb}function ib(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<qv)throw new Error("ICC profile too short");const r={},i=Object.keys(Hv);for(let t=0;t<i.length;t++){const n=i[t],a=Hv[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(ab(t.slice(36,40))!==Jv)throw new Error("ICC profile: missing signature");if(function(e){return e.length<Kv+4}(t))return r;const a=e.getUint32(128);let o=132;for(let n=0;n<a;n++){if(rb(t,o))return r;const n=Tm(e,o,4),i=e.getUint32(o+4),a=e.getUint32(o+8);if(i>t.length)return r;const s=Tm(e,i,4);if(s===Xv){const o=e.getUint32(i+8);if(o>a)return r;ob(r,n,ab(t.slice(i+12,i+o+11)))}else if(s===Qv){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=Tm(e,o+0,2),n=Tm(e,o+2,2),r=e.getUint32(o+4),u=e.getUint32(o+8),c=Nm(e,i+u,r);s.push({languageCode:t,countryCode:n,text:c}),o+=a}if(1===t)ob(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;ob(r,n,e)}}else if(s===eb){ob(r,n,ab(t.slice(i+8,i+a-7)))}else if(s===tb){ob(r,n,ab(t.slice(i+8,i+12)))}o+=12}return r}function ab(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function ob(e,t,n){Gv[t]?e[Gv[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const sb=27;var ub={read:function(e,t,n,r,i){let a=i_(e,Wy,t,t+n,r,i);a.ShotInfo&&(a=Lm({},a,function(e){const t={};void 0!==e[27]&&(t.AutoRotate={value:e[27],description:cb(e[27])});return t}(a.ShotInfo.value)),delete a.ShotInfo);return a},SHOT_INFO_AUTO_ROTATE:sb};function cb(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var lb={read:function(e,t){return{"Image Width":db(e,t),"Image Height":fb(e,t),"Bit Depth":pb(e,t),"Color Type":hb(e,t),Compression:mb(e,t),Filter:gb(e,t),Interlace:yb(e,t)}}};function db(e,t){if(t+0+4>e.byteLength)return;const n=Xy.getLongAt(e,t);return{value:n,description:`${n}px`}}function fb(e,t){if(t+4+4>e.byteLength)return;const n=Xy.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function pb(e,t){if(t+8+1>e.byteLength)return;const n=Xy.getByteAt(e,t+8);return{value:n,description:`${n}`}}function hb(e,t){if(t+9+1>e.byteLength)return;const n=Xy.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 mb(e,t){if(t+10+1>e.byteLength)return;const n=Xy.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function gb(e,t){if(t+11+1>e.byteLength)return;const n=Xy.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function yb(e,t){if(t+12+1>e.byteLength)return;const n=Xy.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}var _b={read:function(e,t,n,r){const i={},a=[];for(let o=0;o<t.length;o++){const{offset:s,length:u,type:c}=t[o],l=Tb(e,s,u,c,n);if(l instanceof Promise)a.push(l.then((({name:e,value:t,description:n})=>{try{if(Fm&&Ib(e,t))return{__exif:d_.read($b(t),Mb,r).tags};if(Pm&&kb(e,t))return{__iptc:U_.read($b(t),0,r)};if(e&&!Ib(e,t)&&!kb(e,t))return{[e]:{value:t,description:n}}}catch(e){}return{}})));else{const{name:e,value:t,description:n}=l;e&&(i[e]={value:t,description:n})}}return{readTags:i,readTagsPromise:a.length>0?Promise.all(a):void 0}}};const vb="STATE_KEYWORD",bb="STATE_COMPRESSION",Ab="STATE_LANG",Eb="STATE_TRANSLATED_KEYWORD",Sb="STATE_TEXT",wb=1,xb=1,Mb=6;function Tb(e,t,n,r,i){const a=[],o=[];let s,u=vb,c=Rm;for(let i=0;i<n&&t+i<e.byteLength;i++){if(u===bb){c=Ob({type:r,dataView:e,offset:t+i}),r===Kg&&(i+=wb),u=Nb(r,u);continue}if(u===Sb){s=new DataView(e.buffer.slice(t+i,t+n));break}const l=e.getUint8(t+i);0===l?u=Nb(r,u):u===vb?a.push(l):u===Ab&&o.push(l)}if(c!==Rm&&!i)return{};const l=zm(s,c,function(e){if(e===qg||e===Jg)return"latin1";return"utf-8"}(r));return l instanceof Promise?l.then((e=>Cb(e,r,o,a))).catch((()=>Cb("<text using unknown compression>".split(""),r,o,a))):Cb(l,r,o,a)}function Ob({type:e,dataView:t,offset:n}){if(e===Kg){if(t.getUint8(n)===xb)return t.getUint8(n+1)}else if(e===Jg)return t.getUint8(n);return Rm}function Nb(e,t){return t===vb&&[Kg,Jg].includes(e)?bb:t===bb?e===Kg?Ab:Sb:t===Ab?Eb:Sb}function Cb(e,t,n,r){const i=function(e){if(e instanceof DataView)return Tm(e,0,e.byteLength);return e}(e);return{name:Db(t,n,r),value:i,description:t===Kg?Lb(e):i}}function Db(e,t,n){const r=Dm(n);if(e===qg||0===t.length)return r;return`${r} (${Dm(t)})`}function Lb(e){return Z_.decode("UTF-8",e)}function Ib(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function kb(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function $b(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 Rb={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=Xy.getLongAt(e,t[r]+Gg),a=Tm(e,t[r]+Hg,Vg);a===Xg?(n["Pixels Per Unit X"]=zb(e,t[r],i),n["Pixels Per Unit Y"]=Fb(e,t[r],i),n["Pixel Units"]=Pb(e,t[r],i)):a===Qg&&(n["Modify Date"]=Zb(e,t[r],i))}return n}};function zb(e,t,n){if(!Ub(e,t,n,0,4))return;const r=Xy.getLongAt(e,t+Yg+0);return{value:r,description:""+r}}function Fb(e,t,n){if(!Ub(e,t,n,4,4))return;const r=Xy.getLongAt(e,t+Yg+4);return{value:r,description:""+r}}function Pb(e,t,n){if(!Ub(e,t,n,8,1))return;const r=Xy.getByteAt(e,t+Yg+8);return{value:r,description:1===r?"meters":"Unknown"}}function Zb(e,t,n){if(!Ub(e,t,n,0,7))return;const r=Xy.getShortAt(e,t+Yg),i=Xy.getByteAt(e,t+Yg+2),a=Xy.getByteAt(e,t+Yg+3),o=Xy.getByteAt(e,t+Yg+4),s=Xy.getByteAt(e,t+Yg+5),u=Xy.getByteAt(e,t+Yg+6);return{value:[r,i,a,o,s,u],description:`${jb(r,4)}-${jb(i,2)}-${jb(a,2)} ${jb(o,2)}:${jb(s,2)}:${jb(u,2)}`}}function Ub(e,t,n,r,i){return r+i<=n&&t+Yg+r+i<=e.byteLength}function jb(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}var Bb={read:function(e,t){const n={},r=Xy.getByteAt(e,t);return n.Alpha=Hb(r),n.Animation=Yb(r),n.ImageWidth=Wb(e,t+Vb),n.ImageHeight=Wb(e,t+Gb),n}};const Vb=4,Gb=7;function Hb(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function Yb(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function Wb(e,t){const n=Xy.getByteAt(e,t)+256*Xy.getByteAt(e,t+1)+65536*Xy.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var qb={read:function(e){return{"GIF Version":Kb(e),"Image Width":Jb(e),"Image Height":Xb(e),"Global Color Map":Qb(e),"Bits Per Pixel":tA(e),"Color Resolution Depth":eA(e)}}};function Kb(e){if(6>e.byteLength)return;const t=Tm(e,3,3);return{value:t,description:t}}function Jb(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function Xb(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function Qb(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function eA(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function tA(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const nA=[6,7,99];var rA={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||nA.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),Im(t,"base64",(function(){return km(this.image)}))}var r;return t}};function iA(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}iA.prototype=new Error;var aA,oA,sA={MetadataMissingError:iA},uA={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),c={buffer:u,length:a};i.read(o,c,(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=>cA(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=>cA(e,t)));var n;return cA(e,t)},loadView:lA,errors:sA};function cA(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),lA(function(e){try{return new DataView(e)}catch(t){return new xm(e)}}(e),t)}function lA(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:c,tiffHeaderOffset:l,iptcDataOffset:d,xmpChunks:f,iccChunks:p,mpfDataOffset:h,pngHeaderOffset:m,pngTextChunks:g,pngChunkOffsets:y,vp8xChunkOffset:_,gifHeaderOffset:v}=Ly.parseAppMarkers(e,n);if(function(e){return void 0!==e}(u)){i=!0;const n=E_.read(e,u);t?a.file=n:a=Lm({},a,n)}if(function(e){return void 0!==e}(c)){i=!0;const n=N_.read(e,c);t?a.jfif=n:a=Lm({},a,n)}if(function(e){return void 0!==e}(l)){i=!0;const{tags:n,byteOrder:o}=d_.read(e,l,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=jm(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=jm(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=Lm({},a,n),n["IPTC-NAA"]&&!dA(d)){const e=U_.read(n["IPTC-NAA"].value,0,r);t?a.iptc=e:a=Lm({},a,e)}if(n.ApplicationNotes&&!fA(f)){const e=ev.read(Dm(n.ApplicationNotes.value));t?a.xmp=e:(delete e._raw,a=Lm({},a,e))}if(n.ImageSourceData){const e=Pv.read(n.PhotoshopSettings.value,r);t?a.photoshop=e:a=Lm({},a,e)}if(n.ICC_Profile&&!pA(p)){const e=Wv.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?a.icc=e:a=Lm({},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=ub.read(e,l,n.MakerNote.__offset,o,r);t?a.makerNotes=i:a=Lm({},a,i)}n.MakerNote&&delete n.MakerNote.__offset}if(dA(d)){i=!0;const n=U_.read(e,d,r);t?a.iptc=n:a=Lm({},a,n)}if(fA(f)){i=!0;const n=ev.read(e,f);t?a.xmp=n:(delete n._raw,a=Lm({},a,n))}if(pA(p)){i=!0;const t=Wv.read(e,p,n);t instanceof Promise?o.push(t.then(A)):A(t)}if(function(e){return void 0!==e}(h)){i=!0;const n=m_.read(e,h,r);t?a.mpf=n:a=Lm({},a,n)}if(void 0!==m){i=!0;const n=lb.read(e,m);t?(a.png=a.png?Lm({},a.png,n):n,a.pngFile=n):a=Lm({},a,n)}if(function(e){return void 0!==e}(g)){i=!0;const{readTags:t,readTagsPromise:a}=_b.read(e,g,n,r);E(t),a&&o.push(a.then((e=>e.forEach(E))))}if(function(e){return void 0!==e}(y)){i=!0;const n=Rb.read(e,y);t?a.png=a.png?Lm({},a.png,n):n:a=Lm({},a,n)}if(function(e){return void 0!==e}(_)){i=!0;const n=Bb.read(e,_);t?a.riff=a.riff?Lm({},a.riff,n):n:a=Lm({},a,n)}if(function(e){return void 0!==e}(v)){i=!0;const n=qb.read(e,v);t?a.gif=a.gif?Lm({},a.gif,n):n:a=Lm({},a,n)}const b=rA.get(e,a.Thumbnail,l);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 sA.MetadataMissingError;return n?Promise.all(o).then((()=>a)):a;function A(e){t?a.icc=e:a=Lm({},a,e)}function E(e){if(t){for(const t of["exif","iptc"]){const n=`__${t}`;e[n]&&(a[t]=a[t]?Lm({},a.exif,e[n]):e[n],delete e[n])}a.png=a.png?Lm({},a.png,e):e,a.pngText=a.pngText?Lm({},a.png,e):e}else a=Lm({},a,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e),delete a.__exif,delete a.__iptc}}function dA(e){return void 0!==e}function fA(e){return Array.isArray(e)&&e.length>0}function pA(e){return Array.isArray(e)&&e.length>0}!function(e){e.convertBlob=async(t,n="image/jpeg")=>{const r=(await bm.getType(t)).mime;if("image/heic"===r||"image/heif"===r){const{heicTo:e}=await import("./heic-to.bf3a4739.js");t=await e({blob:t,type:n})}const i=await e.blobToImage(t),a=document.createElement("canvas");return a.width=i.width,a.height=i.height,a.getContext("2d").drawImage(i,0,0),a.toDataURL(n)},e.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})),e.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}))},e.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"),c=u.getContext("2d");if(r)u.width=e.width*r,u.height=e.height*r,c.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),c.drawImage(e,o,s,t,r,0,0,i,a)}return new Promise((e=>u.toBlob((t=>e(t)),s,o)))},e.compressImage=async(t,n)=>{const{quality:r=1,fileSize:i,attempts:a=0,maxAttempts:o}=n,s=await e.blobToImage(t);if(t.size<=1024*i||r<0)return t;const u=await e.resampleImage(s,{scale:1,quality:r});return u.size>1024*i&&(a<o||!o)?e.compressImage(t,{...n,quality:r-.1,attempts:a+1}):u},e.getMetadata=async e=>{try{const t=await uA.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{}}}(aA||(aA={})),function(e){e.degreesToRadians=e=>Math.PI*e/180,e.radiansToDegrees=e=>180*e/Math.PI,e.nauticalMilesToMetres=e=>1852*e}(oA||(oA={}));var hA=Bi,mA=mo,gA=ci,yA=li,_A=Hi,vA=di.exports,bA=zi,AA=Ti,EA=Object.prototype.hasOwnProperty;var SA=function(e){if(null==e)return!0;if(_A(e)&&(yA(e)||"string"==typeof e||"function"==typeof e.splice||vA(e)||AA(e)||gA(e)))return!e.length;var t=mA(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(bA(e))return!hA(e).length;for(var n in e)if(EA.call(e,n))return!1;return!0};var wA,xA,MA,TA=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(!SA(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);TA(i)?delete n[t]:n[t]=i})),SA(n)?void 0:n}return t}}}(wA||(wA={})),function(e){e.generateId=(e,t,n)=>{let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r},e.getError=e=>{try{return e()}catch(e){return e}}}(xA||(xA={})),function(e){e.isMobileView=()=>window.innerWidth<=A.mobileL||window.innerWidth>window.innerHeight&&window.innerHeight<A.mobileL}(MA||(MA={}));const OA=a({formValidationConfig:null,setFormValidationConfig:()=>null,warnings:null,setWarnings:()=>null,yupId:null}),NA=({children:t})=>{const[n,r]=o(),[i,a]=o(),[s]=o(wm()),u=c((()=>({formValidationConfig:n,setFormValidationConfig:r,warnings:i,setWarnings:a,yupId:s})),[n,i,s]);return e(OA.Provider,{value:u,children:t})};var CA=Cr,DA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},LA=function(e){return this.__data__.has(e)};function IA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new CA;++t<n;)this.add(e[t])}IA.prototype.add=IA.prototype.push=DA,IA.prototype.has=LA;var kA=IA;var $A=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 RA=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},zA=$A,FA=function(e){return e!=e},PA=RA;var ZA=function(e,t,n){return t==t?PA(e,t,n):zA(e,FA,n)},UA=ZA;var jA=function(e,t){return!!(null==e?0:e.length)&&UA(e,t,0)>-1};var BA=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 VA=function(e,t){return e.has(t)},GA=kA,HA=jA,YA=BA,WA=ch,qA=Ai,KA=VA,JA=Math.min;var XA=function(e,t,n){for(var r=n?YA:HA,i=e[0].length,a=e.length,o=a,s=Array(a),u=1/0,c=[];o--;){var l=e[o];o&&t&&(l=WA(l,qA(t))),u=JA(l.length,u),s[o]=!n&&(t||i>=120&&l.length>=120)?new GA(o&&l):void 0}l=e[0];var d=-1,f=s[0];e:for(;++d<i&&c.length<u;){var p=l[d],h=t?t(p):p;if(p=n||0!==p?p:0,!(f?KA(f,h):r(c,h,n))){for(o=a;--o;){var m=s[o];if(!(m?KA(m,h):r(e[o],h,n)))continue e}f&&f.push(h),c.push(p)}}return c};var QA=function(e){return e};var eE=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)},tE=Math.max;var nE=function(e,t,n){return t=tE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=tE(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),eE(e,this,s)}};var rE=function(e){return function(){return e}},iE=Vr,aE=iE?function(e,t){return iE(e,"toString",{configurable:!0,enumerable:!1,value:rE(t),writable:!0})}:QA,oE=aE,sE=Date.now;var uE=function(e){var t=0,n=0;return function(){var r=sE(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(oE),cE=QA,lE=nE,dE=uE;var fE=function(e,t){return dE(lE(e,t,cE),e+"")},pE=Hi,hE=ti;var mE=function(e){return hE(e)&&pE(e)},gE=mE;var yE,_E,vE=ch,bE=XA,AE=function(e){return gE(e)?e:[]},EE=fE((function(e){var t=vE(e,AE);return t.length&&t[0]===e[0]?bE(t):[]}));try{yE=Map}catch(Qf){}try{_E=Set}catch(Qf){}function SE(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(wE);if(yE&&e instanceof yE)return new Map(Array.from(e.entries()));if(_E&&e instanceof _E)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]:SE(e[i],t,n)}return r}return e}function wE(e){return SE(e,[],[])}const xE=Object.prototype.toString,ME=Error.prototype.toString,TE=RegExp.prototype.toString,OE="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",NE=/^Symbol\((.*)\)(.*)$/;function CE(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 OE.call(e).replace(NE,"Symbol($1)");const r=xE.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+ME.call(e)+"]":"RegExp"===r?TE.call(e):null}function DE(e,t){let n=CE(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=CE(this[e],t);return null!==r?r:n}),2)}let LE={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: \`${DE(n,!0)}\``+(i?` (cast from the value \`${DE(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"},IE={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"},kE={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"},$E={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},RE={isValue:"${path} field must be ${value}"},zE={noUnknown:"${path} field has unspecified keys: ${unknown}"},FE={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 PE=Object.assign(Object.create(null),{mixed:LE,string:IE,number:kE,date:$E,object:zE,array:FE,boolean:RE}),ZE=Object.prototype.hasOwnProperty;var UE=function(e,t){return null!=e&&ZE.call(e,t)},jE=li,BE=fh,VE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GE=/^\w*$/;var HE=function(e,t){if(jE(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!BE(e))||(GE.test(e)||!VE.test(e)||null!=t&&e in Object(t))},YE=Cr;function WE(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(WE.Cache||YE),n}WE.Cache=YE;var qE=WE;var KE=function(e){var t=qE(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},JE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XE=/\\(\\)?/g,QE=KE((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(JE,(function(e,n,r,i){t.push(r?i.replace(XE,"$1"):n||e)})),t})),eS=li,tS=HE,nS=QE,rS=bh;var iS=function(e,t){return eS(e)?e:tS(e,t)?[e]:nS(rS(e))},aS=fh;var oS=function(e){if("string"==typeof e||aS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},sS=iS,uS=ci,cS=li,lS=hi,dS=mi,fS=oS;var pS=function(e,t,n){for(var r=-1,i=(t=sS(t,e)).length,a=!1;++r<i;){var o=fS(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&dS(i)&&lS(o,i)&&(cS(e)||uS(e))},hS=UE,mS=pS;var gS=function(e,t){return null!=e&&mS(e,t,hS)};const yS=e=>e&&e.__isYupSchema__;class _S{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!gS(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(!yS(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function vS(e){return null==e?[]:[].concat(e)}function bS(){return bS=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},bS.apply(this,arguments)}let AS=/\$\{\s*(\w+)\s*\}/g;class ES extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=bS({},t,{path:n})),"string"==typeof e?e.replace(AS,((e,n)=>DE(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=[],vS(e).forEach((e=>{ES.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,ES)}}function SS(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,c=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),l=r.length;const d=[];if(o=o||[],!l)return o.length?c(new ES(o,a,u)):c(null,a);for(let e=0;e<r.length;e++){(0,r[e])(i,(function(e){if(e){if(!ES.isError(e))return c(e,a);if(n)return e.value=a,c(e,a);d.push(e)}if(--l<=0){if(d.length&&(s&&d.sort(s),o.length&&d.push(...o),o=d),o.length)return void c(new ES(o,a,u),a);c(null,a)}}))}}var wS=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}},xS=wS(),MS=xS,TS=Ki;var OS=function(e,t){return e&&MS(e,t,TS)};var NS=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},CS=kA,DS=NS,LS=VA;var IS=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 c=a.get(e),l=a.get(t);if(c&&l)return c==t&&l==e;var d=-1,f=!0,p=2&n?new CS: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(!DS(t,(function(e,t){if(!LS(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 kS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var $S=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},RS=_o,zS=Vt,FS=IS,PS=kS,ZS=$S,US=mn?mn.prototype:void 0,jS=US?US.valueOf:void 0;var BS=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 RS(e),new RS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zS(+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=PS;case"[object Set]":var u=1&r;if(s||(s=ZS),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var l=FS(s(e),s(t),r,i,a,o);return o.delete(e),l;case"[object Symbol]":if(jS)return jS.call(e)==jS.call(t)}return!1},VS=ja,GS=Object.prototype.hasOwnProperty;var HS=function(e,t,n,r,i,a){var o=1&n,s=VS(e),u=s.length;if(u!=VS(t).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in t:GS.call(t,l)))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;++c<u;){var m=e[l=s[c]],g=t[l];if(r)var y=o?r(g,m,l,t,e,a):r(m,g,l,e,t,a);if(!(void 0===y?m===g||i(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==l)}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},YS=Ur,WS=IS,qS=BS,KS=HS,JS=mo,XS=li,QS=di.exports,ew=Ti,tw="[object Arguments]",nw="[object Array]",rw="[object Object]",iw=Object.prototype.hasOwnProperty;var aw=function(e,t,n,r,i,a){var o=XS(e),s=XS(t),u=o?nw:JS(e),c=s?nw:JS(t),l=(u=u==tw?rw:u)==rw,d=(c=c==tw?rw:c)==rw,f=u==c;if(f&&QS(e)){if(!QS(t))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new YS),o||ew(e)?WS(e,t,n,r,i,a):qS(e,t,u,n,r,i,a);if(!(1&n)){var p=l&&iw.call(e,"__wrapped__"),h=d&&iw.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new YS),i(m,g,n,r,a)}}return!!f&&(a||(a=new YS),KS(e,t,n,r,i,a))},ow=aw,sw=ti;var uw=function e(t,n,r,i,a){return t===n||(null==t||null==n||!sw(t)&&!sw(n)?t!=t&&n!=n:ow(t,n,r,i,e,a))},cw=Ur,lw=uw;var dw=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],c=e[u],l=s[1];if(o&&s[2]){if(void 0===c&&!(u in e))return!1}else{var d=new cw;if(r)var f=r(c,l,u,e,t,d);if(!(void 0===f?lw(l,c,3,r,d):f))return!1}}return!0},fw=Tn;var pw=function(e){return e==e&&!fw(e)},hw=pw,mw=Ki;var gw=function(e){for(var t=mw(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,hw(i)]}return t};var yw=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},_w=dw,vw=gw,bw=yw;var Aw=function(e){var t=vw(e);return 1==t.length&&t[0][2]?bw(t[0][0],t[0][1]):function(n){return n===e||_w(n,e,t)}},Ew=iS,Sw=oS;var ww=function(e,t){for(var n=0,r=(t=Ew(t,e)).length;null!=e&&n<r;)e=e[Sw(t[n++])];return n&&n==r?e:void 0},xw=ww;var Mw=function(e,t,n){var r=null==e?void 0:xw(e,t);return void 0===r?n:r};var Tw=function(e,t){return null!=e&&t in Object(e)},Ow=Tw,Nw=pS;var Cw=function(e,t){return null!=e&&Nw(e,t,Ow)},Dw=uw,Lw=Mw,Iw=Cw,kw=HE,$w=pw,Rw=yw,zw=oS;var Fw=function(e,t){return kw(e)&&$w(t)?Rw(zw(e),t):function(n){var r=Lw(n,e);return void 0===r&&r===t?Iw(n,e):Dw(t,r,3)}};var Pw=function(e){return function(t){return null==t?void 0:t[e]}},Zw=ww;var Uw=function(e){return function(t){return Zw(t,e)}},jw=Pw,Bw=Uw,Vw=HE,Gw=oS;var Hw=Aw,Yw=Fw,Ww=QA,qw=li,Kw=function(e){return Vw(e)?jw(Gw(e)):Bw(e)};var Jw=function(e){return"function"==typeof e?e:null==e?Ww:"object"==typeof e?qw(e)?Yw(e[0],e[1]):Hw(e):Kw(e)},Xw=Hr,Qw=OS,ex=Jw;var tx=function(e,t){var n={};return t=ex(t),Qw(e,(function(e,r,i){Xw(n,r,t(e,r,i))})),n};function nx(e){this._maxSize=e,this.clear()}nx.prototype.clear=function(){this._size=0,this._values=Object.create(null)},nx.prototype.get=function(e){return this._values[e]},nx.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,ix=/^\d+$/,ax=/^\d/,ox=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,sx=/^\s*(['"]?)(.*?)(\1)\s*$/,ux=new nx(512),cx=new nx(512),lx=new nx(512),dx={Cache:nx,split:px,normalizePath:fx,setter:function(e){var t=fx(e);return cx.get(e)||cx.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=fx(e);return lx.get(e)||lx.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+(hx(t)||ix.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])&&(mx(r)&&(r='"'+r+'"'),a=!(o=hx(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:px(e),t,n)}};function fx(e){return ux.get(e)||ux.set(e,px(e).map((function(e){return e.replace(sx,"$2")})))}function px(e){return e.match(rx)||[""]}function hx(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function mx(e){return!hx(e)&&(function(e){return e.match(ax)&&!e.match(ix)}(e)||function(e){return ox.test(e)}(e))}const gx="$",yx=".";class _x{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]===gx,this.isValue=this.key[0]===yx,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?gx:this.isValue?yx:"";this.path=this.key.slice(n.length),this.getter=this.path&&dx.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 vx(){return vx=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},vx.apply(this,arguments)}function bx(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,c=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:l,test:d,params:f,message:p}=e;let{parent:h,context:m}=o;function g(e){return _x.isRef(e)?e.getValue(r,h,m):e}function y(e={}){const t=tx(vx({value:r,originalValue:s,label:a,path:e.path||i},f,e.params),g),n=new ES(ES.formatError(e.message||p,t),r,t.path,e.type||l);return n.params=t,n}let _,v=vx({path:i,parent:h,type:l,createError:y,resolve:g,options:o,originalValue:s},c);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)}ES.isError(_)?n(_):_?n(null,_):n(y())}else try{Promise.resolve(d.call(v,r,v)).then((e=>{ES.isError(e)?n(e):e?n(null,e):n(y())})).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}_x.prototype.__isYupRef=!0;function Ax(e,t,n,r=n){let i,a,o;return t?(dx.forEach(t,((s,u,c)=>{let l=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=c?parseInt(l,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(!c){if(!e.fields||!e.fields[l])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[l],e=e.fields[l]}a=l,o=u?"["+s+"]":"."+s})),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Ex{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(_x.isRef(n)?e(n):n)),[])}add(e){_x.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){_x.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new Ex;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 Sx(){return Sx=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},Sx.apply(this,arguments)}class wx{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 Ex,this._blacklist=new Ex,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(LE.notType)})),this.type=(null==e?void 0:e.type)||"mixed",this.spec=Sx({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=Sx({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=wE(Sx({},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=Sx({},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(Sx({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=DE(e),a=DE(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,c=e;s||(c=this._cast(c,Sx({assert:!1},t)));let l={value:c,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),SS({args:l,value:c,path:i,sync:r,tests:d,endEarly:u},(e=>{e?n(e,c):SS({tests:this.tests.concat(f),args:l,path:i,sync:r,value:c,endEarly:u},n)}))}validate(e,t,n){let r=this.resolve(Sx({},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(Sx({},t,{value:e}))._validate(e,Sx({},t,{sync:!0}),((e,t)=>{if(e)throw e;n=t})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(ES.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ES.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):wE(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=LE.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=LE.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=LE.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=bx(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=vS(e).map((e=>new _x(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new _S(r,t)),n}typeError(e){let t=this.clone();return t._typeError=bx({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=LE.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=bx({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=LE.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=bx({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}}wx.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])wx.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Ax(this,t,n,r.context);return o[e](i&&i[a],Sx({},r,{parent:i,path:t}))};for(const e of["equals","is"])wx.prototype[e]=wx.prototype.oneOf;for(const e of["not","nope"])wx.prototype[e]=wx.prototype.notOneOf;wx.prototype.optional=wx.prototype.notRequired;const xx=wx;function Mx(){return new xx}Mx.prototype=xx.prototype;const Tx=e=>null==e;function Ox(){return new Nx}class Nx extends wx{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=RE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>Tx(e)||!0===e})}isFalse(e=RE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>Tx(e)||!1===e})}}Ox.prototype=Nx.prototype;let Cx=/^((([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,Dx=/^((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,Lx=/^(?:[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,Ix=e=>Tx(e)||e===e.trim(),kx={}.toString();function $x(){return new Rx}class Rx extends wx{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===kx?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=IE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return Tx(t)||t.length===this.resolve(e)}})}min(e,t=IE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return Tx(t)||t.length>=this.resolve(e)}})}max(e,t=IE.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return Tx(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||IE.matches,params:{regex:e},test:t=>Tx(t)||""===t&&i||-1!==t.search(e)})}email(e=IE.email){return this.matches(Cx,{name:"email",message:e,excludeEmptyString:!0})}url(e=IE.url){return this.matches(Dx,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=IE.uuid){return this.matches(Lx,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=IE.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:Ix})}lowercase(e=IE.lowercase){return this.transform((e=>Tx(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>Tx(e)||e===e.toLowerCase()})}uppercase(e=IE.uppercase){return this.transform((e=>Tx(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>Tx(e)||e===e.toUpperCase()})}}$x.prototype=Rx.prototype;function zx(){return new Fx}class Fx extends wx{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=kE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return Tx(t)||t>=this.resolve(e)}})}max(e,t=kE.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return Tx(t)||t<=this.resolve(e)}})}lessThan(e,t=kE.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return Tx(t)||t<this.resolve(e)}})}moreThan(e,t=kE.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return Tx(t)||t>this.resolve(e)}})}positive(e=kE.positive){return this.moreThan(0,e)}negative(e=kE.negative){return this.lessThan(0,e)}integer(e=kE.integer){return this.test({name:"integer",message:e,test:e=>Tx(e)||Number.isInteger(e)})}truncate(){return this.transform((e=>Tx(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=>Tx(t)?t:Math[e](t)))}}zx.prototype=Fx.prototype;var Px=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let Zx=new Date("");function Ux(){return new jx}class jx extends wx{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=Px.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)?Zx: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(_x.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=$E.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return Tx(e)||e>=this.resolve(n)}})}max(e,t=$E.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return Tx(e)||e<=this.resolve(n)}})}}jx.INVALID_DATE=Zx,Ux.prototype=jx.prototype,Ux.INVALID_DATE=Zx;var Bx=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 Vx=function(e){return function(t){return null==e?void 0:e[t]}},Gx=Vx({"À":"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"}),Hx=bh,Yx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wx=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var qx=function(e){return(e=Hx(e))&&e.replace(Yx,Gx).replace(Wx,"")},Kx=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Jx=function(e){return e.match(Kx)||[]},Xx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Qx=function(e){return Xx.test(e)},eM="\\ud800-\\udfff",tM="\\u2700-\\u27bf",nM="a-z\\xdf-\\xf6\\xf8-\\xff",rM="A-Z\\xc0-\\xd6\\xd8-\\xde",iM="\\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",aM="["+iM+"]",oM="\\d+",sM="["+tM+"]",uM="["+nM+"]",cM="[^"+eM+iM+oM+tM+nM+rM+"]",lM="(?:\\ud83c[\\udde6-\\uddff]){2}",dM="[\\ud800-\\udbff][\\udc00-\\udfff]",fM="["+rM+"]",pM="(?:"+uM+"|"+cM+")",hM="(?:"+fM+"|"+cM+")",mM="(?:['’](?:d|ll|m|re|s|t|ve))?",gM="(?:['’](?:D|LL|M|RE|S|T|VE))?",yM="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_M="[\\ufe0e\\ufe0f]?",vM=_M+yM+("(?:\\u200d(?:"+["[^"+eM+"]",lM,dM].join("|")+")"+_M+yM+")*"),bM="(?:"+[sM,lM,dM].join("|")+")"+vM,AM=RegExp([fM+"?"+uM+"+"+mM+"(?="+[aM,fM,"$"].join("|")+")",hM+"+"+gM+"(?="+[aM,fM+pM,"$"].join("|")+")",fM+"?"+pM+"+"+mM,fM+"+"+gM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oM,bM].join("|"),"g");var EM=function(e){return e.match(AM)||[]},SM=Jx,wM=Qx,xM=bh,MM=EM;var TM=function(e,t,n){return e=xM(e),void 0===(t=n?void 0:t)?wM(e)?MM(e):SM(e):e.match(t)||[]},OM=Bx,NM=qx,CM=TM,DM=RegExp("['’]","g");var LM=function(e){return function(t){return OM(CM(NM(t).replace(DM,"")),e,"")}},IM=LM((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),kM=IM,$M=Xh,RM=LM((function(e,t,n){return t=t.toLowerCase(),e+(n?$M(t):t)})),zM=RM,FM=Hr,PM=OS,ZM=Jw;var UM=function(e,t){var n={};return t=ZM(t),PM(e,(function(e,r,i){FM(n,t(e,r,i),e)})),n},jM={exports:{}};function BM(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 c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}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 l=o.get(e)||new Set;if(t=(l=Array.from(l)).length){a.add(e);do{var d=l[--t];u(d,s.get(d),a)}while(t);a.delete(e)}r[--n]=e}}}function VM(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 GM(e){return(t,n)=>VM(e,t)-VM(e,n)}function HM(){return HM=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},HM.apply(this,arguments)}jM.exports=function(e){return BM(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)},jM.exports.array=BM;let YM=e=>"[object Object]"===Object.prototype.toString.call(e);const WM=GM([]);class qM extends wx{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=WM,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 YM(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=HM({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=i[e],o=gS(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,l=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||e in r;continue}i=t.__validating&&l?r[e]:n.cast(r[e],u),void 0!==i&&(s[e]=i)}else o&&!a&&(s[e]=r[e]);s[e]!==r[e]&&(c=!0)}return c?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,c)=>{if(e){if(!ES.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!YM(c))return void n(r[0]||null,c);o=o||c;let l=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(c[e],HM({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r):r(null)}));SS({sync:i,tests:l,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)}))}clone(e){const t=super.clone(e);return t.fields=HM({},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 wx&&t instanceof wx&&(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=GM(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=dx.split(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(const t in e)if(gS(e,t)){let n=e[t];r.add(t),_x.isRef(n)&&n.isSibling?a(n.path,t):yS(n)&&"deps"in n&&n.deps.forEach((e=>a(e,t)))}return jM.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=dx.getter(e,!0);return this.transform((i=>{if(null==i)return i;let a=i;return gS(i,e)&&(a=HM({},i),n||delete a[e],a[t]=r(i)),a}))}noUnknown(e=!0,t=zE.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=zE.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>t&&UM(t,((t,n)=>e(n)))))}camelCase(){return this.transformKeys(zM)}snakeCase(){return this.transformKeys(kM)}constantCase(){return this.transformKeys((e=>kM(e).toUpperCase()))}describe(){let e=super.describe();return e.fields=tx(this.fields,(e=>e.describe())),e}}function KM(e){return new qM(e)}function JM(){return JM=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},JM.apply(this,arguments)}function XM(e){return new QM(e)}KM.prototype=qM.prototype;class QM extends wx{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,JM({},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,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,l=null!=(i=t.recursive)?i:this.spec.recursive,d=null!=t.originalValue?t.originalValue:e;super._validate(e,t,((e,r)=>{if(e){if(!ES.isError(e)||c)return void n(e,r);a.push(e)}if(!l||!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=JM({},t,{path:a,strict:!0,parent:r,index:e,originalValue:d[e]});i[e]=(e,t)=>u.validate(n,o,t)}SS({sync:o,path:s,value:r,errors:a,endEarly:c,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(!yS(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+DE(e));return t.innerType=e,t}length(e,t=FE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return Tx(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||FE.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return Tx(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||FE.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return Tx(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)}}XM.prototype=QM.prototype;class eT{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(!yS(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 tT(e,t,n){if(!e||!yS(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 nT=Object.freeze({__proto__:null,mixed:Mx,bool:Ox,boolean:Ox,string:$x,number:zx,date:Ux,object:KM,array:XM,ref:function(e,t){return new _x(e,t)},lazy:function(e){return new eT(e)},reach:(e,t,n,r)=>Ax(e,t,n,r).schema,isSchema:yS,addMethod:tT,setLocale:function(e){Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((n=>{PE[t][n]=e[t][n]}))}))},ValidationError:ES,BaseSchema:wx,MixedSchema:xx,BooleanSchema:Nx,StringSchema:Rx,NumberSchema:Fx,DateSchema:jx,ObjectSchema:qM,ArraySchema:QM});const rT=M.button`
180
180
  background-color: ${x.Neutral[8]};
181
181
  border: 1px solid ${x.Neutral[5]};
182
182
  border-radius: 1rem;
@@ -294,7 +294,7 @@ function vN(e){return"[object Object]"===Object.prototype.toString.call(e)}Objec
294
294
  height: auto;
295
295
  `,GI=({id:t,lat:n,lng:r,address:i,staticMapPinColor:a={r:28,g:118,b:213},className:c,onClick:l,disabled:d})=>{const f=s(!1),[p,h]=o(""),m=s([0,0]);u((()=>(window.addEventListener("resize",g),n&&r&&g(),()=>{window.removeEventListener("resize",g)})),[n,r]);const g=()=>{if(!n||!r)return;const e=window.matchMedia(`(max-width: ${A.mobileL}px)`).matches;if(f.current!==e||m.current[0]!==n||m.current[1]!==r){f.current=e;const t=e?jI.mobile:jI.desktop,i=15,o=t.height+i;h(ZI.getStaticMapUrl(n,r,t.width,o,a)),m.current=[n,r]}};return n&&r?e(BI,{id:xA.generateId(t,"static-map"),"data-testid":xA.generateId(t,"static-map"),className:c,onClick:l,"aria-disabled":d,children:e(VI,{alt:i||"Location Map",src:p,onError:e=>{e.currentTarget.src="https://assets.life.gov.sg/web-frontend-engine/img/map/static_map_placeholder.png"}})}):null},HI=({id:t,message:n,className:r})=>n?e(YI,{type:"warning","data-testid":xA.generateId(t,"warning"),className:r,children:n}):null,YI=M(k)`
296
296
  margin: -1rem 0rem 2rem;
297
- `,WI=["required","length","min","max","matches","email","url","uuid","positive","negative","integer","lessThan","moreThan","when","filled","empty","equals","notEquals","includes","excludes","uinfin","equalsField","withinDays"];var qI;!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)})),KM().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=>EE(WI,Object.keys(e)).length>0||EE(t,Object.keys(e)).length>0));return e.mapRules(n,i)},e.mapSchemaType=e=>{switch(e){case"string":return $x().typeError("Only string values are allowed");case"number":return zx().typeError("Only number values are allowed");case"boolean":return Ox().strict().typeError("Only boolean values are allowed");case"array":return XM().typeError("Only array values are allowed");case"object":return KM().typeError("Only object values are allowed");default:return Mx()}},e.mapRules=(n,r)=>(r.forEach((r=>{const i=Object.keys(r).filter((e=>WI.includes(e)))?.[0];switch(!0){case r.required:n=n.required(r.errorMessage||Am.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),tT(nT[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)}})}))}}(qI||(qI={}));var KI=Mn,JI=ti;var XI=function(e){return!0===e||!1===e||JI(e)&&"[object Boolean]"==KI(e)},QI=uw;var ek=function(e,t){return QI(e,t)},tk=Mn,nk=ti;var rk,ik=function(e){return"number"==typeof e||nk(e)&&"[object Number]"==tk(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"}(rk||(rk={}));const ak=[2,7,6,5,4,3,2],ok=["J","Z","I","H","G","F","E","D","C","B","A"],sk=["X","W","U","T","R","Q","P","N","M","L","K"],uk=["X","W","U","T","R","Q","P","N","J","L","K"];function ck(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))*ak[n];const n=e.charAt(0);n!==rk.LOCAL_T_PREFIX&&n!==rk.FOREIGN_G_PREFIX||(t+=4);n===rk.FOREIGN_M_PREFIX&&(t+=3);let r;r=n===rk.LOCAL_S_PREFIX||n===rk.LOCAL_T_PREFIX?ok[t%11]:n===rk.FOREIGN_M_PREFIX?uk[t%11]:sk[t%11];return r}(e);return t&&n}return!1}qI.addCondition("string","uinfin",(e=>!!SA(e)||ck(e)));const lk=["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"];qI.addCondition("string","uen",(e=>!!SA(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})(`+lk.join("|")+String.raw`)([\d]{4})([A-Z]))$`;if(e.match(t))return!0}return!1}(e)));const dk=e=>ik(e)?TA(e):SA(e)&&!XI(e);qI.addCondition("mixed","filled",(e=>!dk(e))),qI.addCondition("mixed","empty",(e=>dk(e))),qI.addCondition("mixed","equals",((e,t)=>!dk(e)&&ek(e,t))),qI.addCondition("mixed","notEquals",((e,t)=>!dk(e)&&!ek(e,t))),qI.addCondition("string","notMatches",((e,t)=>{if(dk(e))return!0;const n=t.match(/\/(.*)\/([a-z]+)?/);return!new RegExp(n[1],n[2]).test(e)})),qI.addCondition("string","noWhitespaceOnly",((e,t)=>!(!dk(e)&&t)||/\S/.test(e))),qI.addCondition("array","includes",((e,t)=>!e?.length||(Array.isArray(t)?t.filter((t=>e.includes(t))).length===t.length:e.includes(t)))),qI.addCondition("array","excludes",((e,t)=>!e?.length||(Array.isArray(t)?e.length&&0===t.filter((t=>e.includes(t))).length:!e.includes(t)))),qI.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 ek(r,i)}return ek(e,n.parent[`${t}`])}return ek(e,n.parent[`${t}`])})),qI.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!ek(r,i)}return!ek(e,n.parent[`${t}`])}return!ek(e,n.parent[`${t}`])})),qI.addCondition("mixed","withinDays",((e,t)=>!!SA(e)||Em.checkWithinDays(e,t))),qI.addCondition("mixed","beyondDays",((e,t)=>!!SA(e)||Em.checkBeyondDays(e,t)));const fk=({children:t})=>e(NA,{children:e(Us,{children:e(Bs,{children:e(Gs,{children:e(Ps,{children:e(Ys,{children:t})})})})})}),pk=()=>{const{customComponents:e,setCustomComponents:t}=l(Fs),n=d((t=>e?.[t]),[e]);return{customComponents:e,getCustomComponent:n,setCustomComponents:t}},hk="undefined"!=typeof window?(e,t)=>{const n=s(t),r=s(0);return ek(t,n.current)||(n.current=t,r.current+=1),f(e,[r.current])}:zs,mk=()=>{const{eventManagerRef:e}=l(Zs),t=d(((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,c,l]=[t,n,r,i,a];e.current?.addEventListener(`${u}:${s}`,c,l)}}),[e]),n=d(((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,c,l]=[t,n,r,i,a];e.current?.removeEventListener(`${u}:${s}`,c,l)}}),[e]);return{addFieldEventListener:t,dispatchFieldEvent:d(((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:n}};var gk=Hr,yk=Vt;var _k=function(e,t,n){(void 0!==n&&!yk(e[t],n)||void 0===n&&!(t in e))&&gk(e,t,n)},vk=Mn,bk=Ta,Ak=ti,Ek=Function.prototype,Sk=Object.prototype,wk=Ek.toString,xk=Sk.hasOwnProperty,Mk=wk.call(Object);var Tk=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Ok=Qr,Nk=ca;var Ck=_k,Dk=pa.exports,Lk=Oo,Ik=ha,kk=Uo,$k=ci,Rk=li,zk=mE,Fk=di.exports,Pk=Dn,Zk=Tn,Uk=function(e){if(!Ak(e)||"[object Object]"!=vk(e))return!1;var t=bk(e);if(null===t)return!0;var n=xk.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&wk.call(n)==Mk},jk=Ti,Bk=Tk,Vk=function(e){return Ok(e,Nk(e))};var Gk=function(e,t,n,r,i,a,o){var s=Bk(e,n),u=Bk(t,n),c=o.get(u);if(c)Ck(e,n,c);else{var l=a?a(s,u,n+"",e,t,o):void 0,d=void 0===l;if(d){var f=Rk(u),p=!f&&Fk(u),h=!f&&!p&&jk(u);l=u,f||p||h?Rk(s)?l=s:zk(s)?l=Ik(s):p?(d=!1,l=Dk(u,!0)):h?(d=!1,l=Lk(u,!0)):l=[]:Uk(u)||$k(u)?(l=s,$k(s)?l=Vk(s):Zk(s)&&!Pk(s)||(l=kk(u))):d=!1}d&&(o.set(u,l),i(l,u,r,a,o),o.delete(u)),Ck(e,n,l)}},Hk=Ur,Yk=_k,Wk=xS,qk=Gk,Kk=Tn,Jk=ca,Xk=Tk;var Qk=function e(t,n,r,i,a){t!==n&&Wk(n,(function(o,s){if(a||(a=new Hk),Kk(o))qk(t,n,s,r,e,i,a);else{var u=i?i(Xk(t,s),o,s+"",t,n,a):void 0;void 0===u&&(u=o),Yk(t,s,u)}}),Jk)},e$=Vt,t$=Hi,n$=hi,r$=Tn;var i$=function(e,t,n){if(!r$(n))return!1;var r=typeof t;return!!("number"==r?t$(n)&&n$(t,n.length):"string"==r&&t in n)&&e$(n[t],e)},a$=fE,o$=i$;var s$=function(e){return a$((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&&o$(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}))},u$=Qk,c$=s$((function(e,t,n){u$(e,t,n)})),l$=c$;const d$=()=>{const{setFormSchema:e,formSchema:t}=l(js);return{setFormSchema:e,formSchema:t,overrideSchema:d(((e,t)=>{if(SA(t)||"string"==typeof e)return e;let n={};if(Object.keys(e).forEach((e=>{const r=wA.getNestedValueByKey(t,e,{searchIn:["children"]});SA(r)||(n={...n,...r})})),!SA(n)){const t=Cs(e),r=l$(t,n);return wA.removeNil(r)}return e}),[])}},f$=e=>{const t=Be(),{setFormValues:n,formValues:r,formValuesRef:i,registeredFields:a,setRegisteredFields:o}=l(Vs),s=d(((n,r=!1)=>{if("string"!=typeof n){if(Array.isArray(n)){if(r){const r=n.filter((e=>a.includes(e)));return e?.getValues(r)||t?.getValues(r)}return e?.getValues(n)||t?.getValues(n)}{const n=e?.getValues()||t?.getValues();if(r){const e={};return Object.entries(n).forEach((([t,n])=>{a.includes(t)&&(e[t]=n)})),e}return n}}if(!r||r&&a.includes(n))return e?.getValues(n)||t?.getValues(n)}),[t?.getValues,e?.getValues,a]);return{formValues:r,getField:e=>i.current[e],setFields:e=>{i.current={...i.current,...e},n((t=>({...t,...e})))},setField:(e,t)=>{i.current[e]=t,n((n=>({...n,[e]:t})))},resetFields:e=>{i.current={...e},n((()=>({...e})))},registeredFields:a,setRegisteredFields:o,getFormValues:s}},p$=()=>{const{formValidationConfig:e,setFormValidationConfig:t}=l(OA);return{formValidationConfig:e,setFieldValidationConfig:(e,n,r=[])=>{t((t=>({...t,[e]:{schema:n,validationRules:r}})))},removeFieldValidationConfig:e=>t((t=>{const n={...t};return delete n[e],n}))}},h$=()=>{const{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n}=mk(),r=Be(),{setFieldValidationConfig:i,removeFieldValidationConfig:a}=p$();return{event:{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n},formContext:r,validation:{setValidation:i,removeValidation:a}}},m$=()=>{const{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}=l(Hs);return{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}},g$=(e,t)=>{u((()=>{const n=n=>{n.data.type===e&&t(n)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}}),[e,t])},y$=e=>{const t=s();return u((()=>{t.current=e}),[e]),t.current},_$=()=>{const{formValidationConfig:e,warnings:t,setWarnings:n,yupId:r}=l(OA),[i,a]=o(KM()),[s,c]=o(KM()),f=d((()=>{if(e){let t={},n={};Object.entries(e).forEach((([e,r])=>{if(!r.validationRules||0===r.validationRules.length)return void(t=wA.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=wA.upsert(n,e,{schema:r.schema,validationRules:i})),a.length&&(t=wA.upsert(t,e,{schema:r.schema,validationRules:a}))})),c(qI.buildSchema(n,r)),a(qI.buildSchema(t,r))}}),[e,r]);u((()=>{f()}),[f]);return{warnings:t,softValidationSchema:s,hardValidationSchema:i,rebuildValidationSchema:f,performSoftValidation:(e,t)=>{e.validate(t,{abortEarly:!1}).then((()=>{n({})})).catch((e=>{const t=e;if(SA(t))return;const r=t.inner.reduce(((e,t)=>(e[t.path]=t.message,e)),{});n(r)}))},addWarnings:e=>{n({...t,...e})},yupId:r}},v$=M.div`
297
+ `,WI=["required","length","min","max","matches","email","url","uuid","positive","negative","integer","lessThan","moreThan","when","filled","empty","equals","notEquals","includes","excludes","uinfin","equalsField","withinDays"];var qI;!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)})),KM().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=>EE(WI,Object.keys(e)).length>0||EE(t,Object.keys(e)).length>0));return e.mapRules(n,i)},e.mapSchemaType=e=>{switch(e){case"string":return $x().typeError("Only string values are allowed");case"number":return zx().typeError("Only number values are allowed");case"boolean":return Ox().strict().typeError("Only boolean values are allowed");case"array":return XM().typeError("Only array values are allowed");case"object":return KM().typeError("Only object values are allowed");default:return Mx()}},e.mapRules=(n,r)=>(r.forEach((r=>{const i=Object.keys(r).filter((e=>WI.includes(e)))?.[0];switch(!0){case r.required:n=n.required(r.errorMessage||Am.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),tT(nT[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)}})}))}}(qI||(qI={}));var KI=Mn,JI=ti;var XI=function(e){return!0===e||!1===e||JI(e)&&"[object Boolean]"==KI(e)},QI=uw;var ek=function(e,t){return QI(e,t)},tk=Mn,nk=ti;var rk,ik=function(e){return"number"==typeof e||nk(e)&&"[object Number]"==tk(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"}(rk||(rk={}));const ak=[2,7,6,5,4,3,2],ok=["J","Z","I","H","G","F","E","D","C","B","A"],sk=["X","W","U","T","R","Q","P","N","M","L","K"],uk=["X","W","U","T","R","Q","P","N","J","L","K"];function ck(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))*ak[n];const n=e.charAt(0);n!==rk.LOCAL_T_PREFIX&&n!==rk.FOREIGN_G_PREFIX||(t+=4);n===rk.FOREIGN_M_PREFIX&&(t+=3);let r;r=n===rk.LOCAL_S_PREFIX||n===rk.LOCAL_T_PREFIX?ok[t%11]:n===rk.FOREIGN_M_PREFIX?uk[t%11]:sk[t%11];return r}(e);return t&&n}return!1}qI.addCondition("string","uinfin",(e=>!!SA(e)||ck(e)));const lk=["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"];qI.addCondition("string","uen",(e=>!!SA(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})(`+lk.join("|")+String.raw`)([\d]{4})([A-Z]))$`;if(e.match(t))return!0}return!1}(e)));const dk=e=>ik(e)?TA(e):SA(e)&&!XI(e);qI.addCondition("mixed","filled",(e=>!dk(e))),qI.addCondition("mixed","empty",(e=>dk(e))),qI.addCondition("mixed","equals",((e,t)=>!dk(e)&&ek(e,t))),qI.addCondition("mixed","notEquals",((e,t)=>!dk(e)&&!ek(e,t))),qI.addCondition("string","notMatches",((e,t)=>{if(dk(e))return!0;const n=t.match(/\/(.*)\/([a-z]+)?/);return!new RegExp(n[1],n[2]).test(e)})),qI.addCondition("string","noWhitespaceOnly",((e,t)=>!(!dk(e)&&t)||/\S/.test(e))),qI.addCondition("string","whitespace",((e,t)=>!(!dk(e)&&t&&("object"!=typeof t||XI(t.noLeadingOrTrailingWhitespace)))||("object"!=typeof t||t.noLeadingOrTrailingWhitespace?/^(?!\s+$)(?!\s).*(?<!\s)$/.test(e):/\S/.test(e)))),qI.addCondition("array","includes",((e,t)=>!e?.length||(Array.isArray(t)?t.filter((t=>e.includes(t))).length===t.length:e.includes(t)))),qI.addCondition("array","excludes",((e,t)=>!e?.length||(Array.isArray(t)?e.length&&0===t.filter((t=>e.includes(t))).length:!e.includes(t)))),qI.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 ek(r,i)}return ek(e,n.parent[`${t}`])}return ek(e,n.parent[`${t}`])})),qI.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!ek(r,i)}return!ek(e,n.parent[`${t}`])}return!ek(e,n.parent[`${t}`])})),qI.addCondition("mixed","withinDays",((e,t)=>!!SA(e)||Em.checkWithinDays(e,t))),qI.addCondition("mixed","beyondDays",((e,t)=>!!SA(e)||Em.checkBeyondDays(e,t)));const fk=({children:t})=>e(NA,{children:e(Us,{children:e(Bs,{children:e(Gs,{children:e(Ps,{children:e(Ys,{children:t})})})})})}),pk=()=>{const{customComponents:e,setCustomComponents:t}=l(Fs),n=d((t=>e?.[t]),[e]);return{customComponents:e,getCustomComponent:n,setCustomComponents:t}},hk="undefined"!=typeof window?(e,t)=>{const n=s(t),r=s(0);return ek(t,n.current)||(n.current=t,r.current+=1),f(e,[r.current])}:zs,mk=()=>{const{eventManagerRef:e}=l(Zs),t=d(((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,c,l]=[t,n,r,i,a];e.current?.addEventListener(`${u}:${s}`,c,l)}}),[e]),n=d(((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,c,l]=[t,n,r,i,a];e.current?.removeEventListener(`${u}:${s}`,c,l)}}),[e]);return{addFieldEventListener:t,dispatchFieldEvent:d(((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:n}};var gk=Hr,yk=Vt;var _k=function(e,t,n){(void 0!==n&&!yk(e[t],n)||void 0===n&&!(t in e))&&gk(e,t,n)},vk=Mn,bk=Ta,Ak=ti,Ek=Function.prototype,Sk=Object.prototype,wk=Ek.toString,xk=Sk.hasOwnProperty,Mk=wk.call(Object);var Tk=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Ok=Qr,Nk=ca;var Ck=_k,Dk=pa.exports,Lk=Oo,Ik=ha,kk=Uo,$k=ci,Rk=li,zk=mE,Fk=di.exports,Pk=Dn,Zk=Tn,Uk=function(e){if(!Ak(e)||"[object Object]"!=vk(e))return!1;var t=bk(e);if(null===t)return!0;var n=xk.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&wk.call(n)==Mk},jk=Ti,Bk=Tk,Vk=function(e){return Ok(e,Nk(e))};var Gk=function(e,t,n,r,i,a,o){var s=Bk(e,n),u=Bk(t,n),c=o.get(u);if(c)Ck(e,n,c);else{var l=a?a(s,u,n+"",e,t,o):void 0,d=void 0===l;if(d){var f=Rk(u),p=!f&&Fk(u),h=!f&&!p&&jk(u);l=u,f||p||h?Rk(s)?l=s:zk(s)?l=Ik(s):p?(d=!1,l=Dk(u,!0)):h?(d=!1,l=Lk(u,!0)):l=[]:Uk(u)||$k(u)?(l=s,$k(s)?l=Vk(s):Zk(s)&&!Pk(s)||(l=kk(u))):d=!1}d&&(o.set(u,l),i(l,u,r,a,o),o.delete(u)),Ck(e,n,l)}},Hk=Ur,Yk=_k,Wk=xS,qk=Gk,Kk=Tn,Jk=ca,Xk=Tk;var Qk=function e(t,n,r,i,a){t!==n&&Wk(n,(function(o,s){if(a||(a=new Hk),Kk(o))qk(t,n,s,r,e,i,a);else{var u=i?i(Xk(t,s),o,s+"",t,n,a):void 0;void 0===u&&(u=o),Yk(t,s,u)}}),Jk)},e$=Vt,t$=Hi,n$=hi,r$=Tn;var i$=function(e,t,n){if(!r$(n))return!1;var r=typeof t;return!!("number"==r?t$(n)&&n$(t,n.length):"string"==r&&t in n)&&e$(n[t],e)},a$=fE,o$=i$;var s$=function(e){return a$((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&&o$(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}))},u$=Qk,c$=s$((function(e,t,n){u$(e,t,n)})),l$=c$;const d$=()=>{const{setFormSchema:e,formSchema:t}=l(js);return{setFormSchema:e,formSchema:t,overrideSchema:d(((e,t)=>{if(SA(t)||"string"==typeof e)return e;let n={};if(Object.keys(e).forEach((e=>{const r=wA.getNestedValueByKey(t,e,{searchIn:["children"]});SA(r)||(n={...n,...r})})),!SA(n)){const t=Cs(e),r=l$(t,n);return wA.removeNil(r)}return e}),[])}},f$=e=>{const t=Be(),{setFormValues:n,formValues:r,formValuesRef:i,registeredFields:a,setRegisteredFields:o}=l(Vs),s=d(((n,r=!1)=>{if("string"!=typeof n){if(Array.isArray(n)){if(r){const r=n.filter((e=>a.includes(e)));return e?.getValues(r)||t?.getValues(r)}return e?.getValues(n)||t?.getValues(n)}{const n=e?.getValues()||t?.getValues();if(r){const e={};return Object.entries(n).forEach((([t,n])=>{a.includes(t)&&(e[t]=n)})),e}return n}}if(!r||r&&a.includes(n))return e?.getValues(n)||t?.getValues(n)}),[t?.getValues,e?.getValues,a]);return{formValues:r,getField:e=>i.current[e],setFields:e=>{i.current={...i.current,...e},n((t=>({...t,...e})))},setField:(e,t)=>{i.current[e]=t,n((n=>({...n,[e]:t})))},resetFields:e=>{i.current={...e},n((()=>({...e})))},registeredFields:a,setRegisteredFields:o,getFormValues:s}},p$=()=>{const{formValidationConfig:e,setFormValidationConfig:t}=l(OA);return{formValidationConfig:e,setFieldValidationConfig:(e,n,r=[])=>{t((t=>({...t,[e]:{schema:n,validationRules:r}})))},removeFieldValidationConfig:e=>t((t=>{const n={...t};return delete n[e],n}))}},h$=()=>{const{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n}=mk(),r=Be(),{setFieldValidationConfig:i,removeFieldValidationConfig:a}=p$();return{event:{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n},formContext:r,validation:{setValidation:i,removeValidation:a}}},m$=()=>{const{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}=l(Hs);return{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}},g$=(e,t)=>{u((()=>{const n=n=>{n.data.type===e&&t(n)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}}),[e,t])},y$=e=>{const t=s();return u((()=>{t.current=e}),[e]),t.current},_$=()=>{const{formValidationConfig:e,warnings:t,setWarnings:n,yupId:r}=l(OA),[i,a]=o(KM()),[s,c]=o(KM()),f=d((()=>{if(e){let t={},n={};Object.entries(e).forEach((([e,r])=>{if(!r.validationRules||0===r.validationRules.length)return void(t=wA.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=wA.upsert(n,e,{schema:r.schema,validationRules:i})),a.length&&(t=wA.upsert(t,e,{schema:r.schema,validationRules:a}))})),c(qI.buildSchema(n,r)),a(qI.buildSchema(t,r))}}),[e,r]);u((()=>{f()}),[f]);return{warnings:t,softValidationSchema:s,hardValidationSchema:i,rebuildValidationSchema:f,performSoftValidation:(e,t)=>{e.validate(t,{abortEarly:!1}).then((()=>{n({})})).catch((e=>{const t=e;if(SA(t))return;const r=t.inner.reduce(((e,t)=>(e[t.path]=t.message,e)),{});n(r)}))},addWarnings:e=>{n({...t,...e})},yupId:r}},v$=M.div`
298
298
  flex: 1;
299
299
  padding: 2rem 0;
300
300
  `,b$=M(z)`
@@ -434,7 +434,7 @@ function vN(e){return"[object Object]"===Object.prototype.toString.call(e)}Objec
434
434
  cursor: pointer;
435
435
  `,OF=M(k)`
436
436
  margin-top: 0.5rem;
437
- `;var NF=ci,CF=li,DF=mn?mn.isConcatSpreadable:void 0;var LF=Ma,IF=function(e){return CF(e)||NF(e)||!!(DF&&e&&e[DF])};var kF=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=IF),a||(a=[]);++o<s;){var u=t[o];n>0&&r(u)?n>1?e(u,n-1,r,i,a):LF(a,u):i||(a[a.length]=u)}return a};var $F=qa,RF=function(){},zF=$F&&1/$S(new $F([,-0]))[1]==1/0?function(e){return new $F(e)}:RF,FF=kA,PF=jA,ZF=BA,UF=VA,jF=zF,BF=$S;var VF=function(e,t,n){var r=-1,i=PF,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=ZF;else if(a>=200){var c=t?null:jF(e);if(c)return BF(c);o=!1,i=UF,u=new FF}else u=t?[]:s;e:for(;++r<a;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,o&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s},GF=X$,HF=kF,YF=VF;var WF=function(e,t,n){var r=e.length;if(r<2)return r?YF(e[0]):[];for(var i=-1,a=Array(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=GF(a[i]||o,e[s],t,n));return YF(HF(a,1),t,n)},qF=ma,KF=WF,JF=mE,XF=fE((function(e){return KF(qF(e,JF))}));const QF=a({files:[],setFiles:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),eP=({children:t})=>{const[n,r]=o([]),[i,a]=o([]),s=c((()=>({files:n,setFiles:r,currentFileIds:i,setCurrentFileIds:a})),[n,i]);return e(QF.Provider,{value:s,children:t})};var tP,nP;!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}}(tP||(tP={})),function(e){e[e.INJECTED=-99]="INJECTED",e[e.INJECTING=-98]="INJECTING",e[e.TO_DELETE=-4]="TO_DELETE",e[e.ERROR_FORMAT=-3]="ERROR_FORMAT",e[e.ERROR_GENERIC=-2]="ERROR_GENERIC",e[e.ERROR_SIZE=-1]="ERROR_SIZE",e[e.NONE=0]="NONE",e[e.UPLOAD_READY=4]="UPLOAD_READY",e[e.UPLOADING=5]="UPLOADING",e[e.UPLOADED=6]="UPLOADED"}(nP||(nP={}));const rP=y((()=>import("./file-upload-manager.58d10a8b.js"))),iP=r=>{const{id:i,error:a,isDirty:c,isTouched:f,value:p,schema:{compressImages:h,description:m,hideThumbnail:g,label:y,uploadOnAddingFile:v,validation:b,warning:A,...E},warning:S}=r,{files:w,currentFileIds:x,setFiles:M}=l(QF),T=s({}),O=s({}),N=s({}),C=s({}),{setFieldValidationConfig:D}=p$(),{dispatchFieldEvent:L}=mk(),{clearErrors:I,setError:k}=Be(),[$,R]=o(),z=s(w),F=d(((e,t)=>{const n=[...t],r=n.length;e.forEach(((e,t)=>{!O.current.max||r+t<O.current.max?(n.push({...e,slot:tP.findAvailableSlot(n)}),I(i)):k(i,{type:"max",message:O.current.errorMessage||Am.UPLOAD().MAX_FILES(O.current.max)})})),M(n)}),[I,i,k,M]);u((()=>{z.current=w}),[w]),u((()=>{L("mount",i)}),[L,i]),u((()=>{const e=b?.find((e=>"required"in e)),t=b?.find((e=>"fileType"in e)),n=b?.find((e=>"maxSizeInKb"in e)),r=b?.find((e=>"upload"in e&&e.upload));T.current=t?.fileType?t:{},N.current=n?.maxSizeInKb>0?n:{},C.current=r||{};const a=b?.find((e=>"length"in e)),o=b?.find((e=>"max"in e));O.current=a?{max:a.length,errorMessage:a.errorMessage}:o?{max:o.max,errorMessage:o.errorMessage}:{},D(i,XM().of(KM().shape({dataURL:$x(),fileId:$x(),fileName:$x(),fileUrl:$x(),uploadResponse:KM()})).test("is-empty-array",e?.errorMessage||Am.UPLOAD().REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",N.current.errorMessage||Am.UPLOAD().MAX_FILE_SIZE(N.current.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&N.current.maxSizeInKb)||w.filter((e=>e.status===nP.UPLOADED)).every((e=>{if("base64"===v.type&&e.dataURL)return bm.getFilesizeFromBase64(e.dataURL)<=1024*N.current.maxSizeInKb;if("multipart"===v.type){let t=e.rawFile?.size||e.uploadResponse?.fileSize;return isNaN(t)&&(t=0),t<=1024*N.current.maxSizeInKb}})))).test("max-files",O.current.errorMessage||Am.UPLOAD().MAX_FILES(O.current.max),(e=>!(e&&Array.isArray(e)&&O.current.max)||e.length<=O.current.max)),b)}),[b,w.map((e=>e.status)).join(",")]),u((()=>{if(!c&&!f){const e=Array.isArray(p)?p:[];if(!(XF(e.map((({fileId:e})=>e)),x).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:nP.INJECTED})})),F(t,[])}}),[F,c,f,x,p]),u((()=>{if(a?.message)try{const{message:e,fileErrors:t}=JSON.parse(a.message);t&&M(z.current.map((e=>{const n=t[e.fileItem.id];return n?{...e,fileItem:{...e.fileItem,errorMessage:n}}:e}))),e&&R(e)}catch(e){R(a.message)}else R(void 0)}),[a?.message,M]);const P=t=>t?e(kI,{children:t}):null;return t(n,{children:[e(_,{fallback:null,children:e(rP,{compressImages:!!h,fileTypeRule:T.current,hideThumbnail:g,id:i,maxFileSizeRule:N.current,upload:v,uploadRule:C.current,value:p})}),e(J,{...E,accept:T.current.fileType?.map((e=>`.${e}`)).join(","),description:P(m),errorMessage:P($),fileItems:w.filter((({fileItem:e,status:t})=>!!e&&t!==nP.INJECTED&&t!==nP.INJECTING)).map((({fileItem:e})=>e)),id:i,maxFiles:O.current.max,onChange:e=>{F(e.map((e=>({addedFrom:"input",rawFile:e,slot:null,status:nP.NONE}))),w)},onDelete:e=>{M(w.map((t=>t.fileItem.id!==e.id?t:{...t,status:nP.TO_DELETE}))),I(i)},title:P(y),warning:P(S||A)})]})},aP=a({images:[],setImages:()=>null,errorCount:0,setErrorCount:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),oP=({children:t})=>{const[n,r]=o([]),[i,a]=o(0),[s,u]=o([]);return e(aP.Provider,{value:{images:n,setImages:r,errorCount:i,setErrorCount:a,currentFileIds:s,setCurrentFileIds:u},children:t})};var sP;!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}}(sP||(sP={}));const uP=["jpg","gif","png","heic","heif","webp"];var cP;!function(e){e[e.INJECTED=-99]="INJECTED",e[e.ERROR_CUSTOM_MUTED=-7]="ERROR_CUSTOM_MUTED",e[e.ERROR_EXCEED=-6]="ERROR_EXCEED",e[e.ERROR_CUSTOM=-5]="ERROR_CUSTOM",e[e.TO_DELETE=-4]="TO_DELETE",e[e.ERROR_FORMAT=-3]="ERROR_FORMAT",e[e.ERROR_GENERIC=-2]="ERROR_GENERIC",e[e.ERROR_SIZE=-1]="ERROR_SIZE",e[e.NONE=0]="NONE",e[e.TO_RECOMPRESS=1]="TO_RECOMPRESS",e[e.COMPRESSED=2]="COMPRESSED",e[e.RECOMPRESSED=2]="RECOMPRESSED",e[e.CONVERTED=2]="CONVERTED",e[e.EDITED=3]="EDITED",e[e.UPLOAD_READY=4]="UPLOAD_READY",e[e.UPLOADING=5]="UPLOADING",e[e.UPLOADED=6]="UPLOADED",e[e.PENDING=7]="PENDING"}(cP||(cP={}));var lP,dP={exports:{}},fP={exports:{}},pP={};var hP,mP,gP,yP,_P,vP,bP,AP,EP,SP,wP,xP,MP,TP,OP={};
437
+ `;var NF=ci,CF=li,DF=mn?mn.isConcatSpreadable:void 0;var LF=Ma,IF=function(e){return CF(e)||NF(e)||!!(DF&&e&&e[DF])};var kF=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=IF),a||(a=[]);++o<s;){var u=t[o];n>0&&r(u)?n>1?e(u,n-1,r,i,a):LF(a,u):i||(a[a.length]=u)}return a};var $F=qa,RF=function(){},zF=$F&&1/$S(new $F([,-0]))[1]==1/0?function(e){return new $F(e)}:RF,FF=kA,PF=jA,ZF=BA,UF=VA,jF=zF,BF=$S;var VF=function(e,t,n){var r=-1,i=PF,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=ZF;else if(a>=200){var c=t?null:jF(e);if(c)return BF(c);o=!1,i=UF,u=new FF}else u=t?[]:s;e:for(;++r<a;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,o&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s},GF=X$,HF=kF,YF=VF;var WF=function(e,t,n){var r=e.length;if(r<2)return r?YF(e[0]):[];for(var i=-1,a=Array(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=GF(a[i]||o,e[s],t,n));return YF(HF(a,1),t,n)},qF=ma,KF=WF,JF=mE,XF=fE((function(e){return KF(qF(e,JF))}));const QF=a({files:[],setFiles:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),eP=({children:t})=>{const[n,r]=o([]),[i,a]=o([]),s=c((()=>({files:n,setFiles:r,currentFileIds:i,setCurrentFileIds:a})),[n,i]);return e(QF.Provider,{value:s,children:t})};var tP,nP;!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}}(tP||(tP={})),function(e){e[e.INJECTED=-99]="INJECTED",e[e.INJECTING=-98]="INJECTING",e[e.TO_DELETE=-4]="TO_DELETE",e[e.ERROR_FORMAT=-3]="ERROR_FORMAT",e[e.ERROR_GENERIC=-2]="ERROR_GENERIC",e[e.ERROR_SIZE=-1]="ERROR_SIZE",e[e.NONE=0]="NONE",e[e.UPLOAD_READY=4]="UPLOAD_READY",e[e.UPLOADING=5]="UPLOADING",e[e.UPLOADED=6]="UPLOADED"}(nP||(nP={}));const rP=y((()=>import("./file-upload-manager.ea8e699a.js"))),iP=r=>{const{id:i,error:a,isDirty:c,isTouched:f,value:p,schema:{compressImages:h,description:m,hideThumbnail:g,label:y,uploadOnAddingFile:v,validation:b,warning:A,...E},warning:S}=r,{files:w,currentFileIds:x,setFiles:M}=l(QF),T=s({}),O=s({}),N=s({}),C=s({}),{setFieldValidationConfig:D}=p$(),{dispatchFieldEvent:L}=mk(),{clearErrors:I,setError:k}=Be(),[$,R]=o(),z=s(w),F=d(((e,t)=>{const n=[...t],r=n.length;e.forEach(((e,t)=>{!O.current.max||r+t<O.current.max?(n.push({...e,slot:tP.findAvailableSlot(n)}),I(i)):k(i,{type:"max",message:O.current.errorMessage||Am.UPLOAD().MAX_FILES(O.current.max)})})),M(n)}),[I,i,k,M]);u((()=>{z.current=w}),[w]),u((()=>{L("mount",i)}),[L,i]),u((()=>{const e=b?.find((e=>"required"in e)),t=b?.find((e=>"fileType"in e)),n=b?.find((e=>"maxSizeInKb"in e)),r=b?.find((e=>"upload"in e&&e.upload));T.current=t?.fileType?t:{},N.current=n?.maxSizeInKb>0?n:{},C.current=r||{};const a=b?.find((e=>"length"in e)),o=b?.find((e=>"max"in e));O.current=a?{max:a.length,errorMessage:a.errorMessage}:o?{max:o.max,errorMessage:o.errorMessage}:{},D(i,XM().of(KM().shape({dataURL:$x(),fileId:$x(),fileName:$x(),fileUrl:$x(),uploadResponse:KM()})).test("is-empty-array",e?.errorMessage||Am.UPLOAD().REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",N.current.errorMessage||Am.UPLOAD().MAX_FILE_SIZE(N.current.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&N.current.maxSizeInKb)||w.filter((e=>e.status===nP.UPLOADED)).every((e=>{if("base64"===v.type&&e.dataURL)return bm.getFilesizeFromBase64(e.dataURL)<=1024*N.current.maxSizeInKb;if("multipart"===v.type){const t=e.uploadResponse?.data||e.uploadResponse;let n=e.rawFile?.size||t?.fileSize;return isNaN(n)&&(n=0),n<=1024*N.current.maxSizeInKb}})))).test("max-files",O.current.errorMessage||Am.UPLOAD().MAX_FILES(O.current.max),(e=>!(e&&Array.isArray(e)&&O.current.max)||e.length<=O.current.max)).test("no-interim-statuses",Am.UPLOAD().UPLOADING,(()=>{const e=new Set([nP.INJECTED,nP.INJECTING,nP.NONE,nP.UPLOAD_READY,nP.UPLOADING]);return!z.current.some((t=>e.has(t.status)))})),b)}),[b,w.map((e=>e.status)).join(",")]),u((()=>{if(!c&&!f){const e=Array.isArray(p)?p:[];if(!(XF(e.map((({fileId:e})=>e)),x).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:nP.INJECTED})})),F(t,[])}}),[F,c,f,x,p]),u((()=>{if(a?.message)try{const{message:e,fileErrors:t}=JSON.parse(a.message);t&&M(z.current.map((e=>{const n=t[e.fileItem.id];return n?{...e,fileItem:{...e.fileItem,errorMessage:n}}:e}))),e&&R(e)}catch(e){R(a.message)}else R(void 0)}),[a?.message,M]);const P=t=>t?e(kI,{children:t}):null;return t(n,{children:[e(_,{fallback:null,children:e(rP,{compressImages:!!h,fileTypeRule:T.current,hideThumbnail:g,id:i,maxFileSizeRule:N.current,upload:v,uploadRule:C.current,value:p})}),e(J,{...E,accept:T.current.fileType?.map((e=>`.${e}`)).join(","),description:P(m),errorMessage:P($),fileItems:w.filter((({fileItem:e,status:t})=>!!e&&t!==nP.INJECTED&&t!==nP.INJECTING)).map((({fileItem:e})=>e)),id:i,maxFiles:O.current.max,onChange:e=>{F(e.map((e=>({addedFrom:"input",rawFile:e,slot:null,status:nP.NONE}))),w)},onDelete:e=>{M(w.map((t=>t.fileItem.id!==e.id?t:{...t,status:nP.TO_DELETE}))),I(i)},title:P(y),warning:P(S||A)})]})},aP=a({images:[],setImages:()=>null,errorCount:0,setErrorCount:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),oP=({children:t})=>{const[n,r]=o([]),[i,a]=o(0),[s,u]=o([]);return e(aP.Provider,{value:{images:n,setImages:r,errorCount:i,setErrorCount:a,currentFileIds:s,setCurrentFileIds:u},children:t})};var sP;!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}}(sP||(sP={}));const uP=["jpg","gif","png","heic","heif","webp"];var cP;!function(e){e[e.INJECTED=-99]="INJECTED",e[e.ERROR_CUSTOM_MUTED=-7]="ERROR_CUSTOM_MUTED",e[e.ERROR_EXCEED=-6]="ERROR_EXCEED",e[e.ERROR_CUSTOM=-5]="ERROR_CUSTOM",e[e.TO_DELETE=-4]="TO_DELETE",e[e.ERROR_FORMAT=-3]="ERROR_FORMAT",e[e.ERROR_GENERIC=-2]="ERROR_GENERIC",e[e.ERROR_SIZE=-1]="ERROR_SIZE",e[e.NONE=0]="NONE",e[e.TO_RECOMPRESS=1]="TO_RECOMPRESS",e[e.COMPRESSED=2]="COMPRESSED",e[e.RECOMPRESSED=2]="RECOMPRESSED",e[e.CONVERTED=2]="CONVERTED",e[e.EDITED=3]="EDITED",e[e.UPLOAD_READY=4]="UPLOAD_READY",e[e.UPLOADING=5]="UPLOADING",e[e.UPLOADED=6]="UPLOADED",e[e.PENDING=7]="PENDING"}(cP||(cP={}));var lP,dP={exports:{}},fP={exports:{}},pP={};var hP,mP,gP,yP,_P,vP,bP,AP,EP,SP,wP,xP,MP,TP,OP={};
438
438
  /** @license React v16.13.1
439
439
  * react-is.development.js
440
440
  *
@@ -928,7 +928,7 @@ object-assign
928
928
  stroke: ${x.Primary};
929
929
  stroke-width: 1;
930
930
  }
931
- `,GU=r=>{const{accepts:i,activeFileIndex:a,capture:o,id:u="image-thumbnails",images:c,maxFiles:l,onClickThumbnail:d,onSelectFile:f,multiple:p}=r,h=s(null),m=N(),g=async e=>{const t=Array.from(e.target.files||[]);t.length&&setTimeout((()=>{f(t)}),100)},y=()=>h?.current?.click();return t(RU,{id:xA.generateId(u),children:[c.map(((n,r)=>n.status===cP.NONE?e(UU,{children:[...Array(4)].map(((t,n)=>e(ZU,{},`dot-${n}`)))},r):n.status>cP.NONE||n.status===cP.ERROR_CUSTOM_MUTED?e(zU,{id:xA.generateId(u,`item-${r+1}`),"data-testid":xA.generateId(u,`item-${r+1}`),src:n.thumbnailDataURL||n.dataURL||"https://assets.life.gov.sg/web-frontend-engine/img/icons/photo-placeholder-add.svg",type:"button","aria-label":`thumbnail of ${n.name}`,onClick:()=>d(r),children:e(jU,{isSelected:a===r})},r):"reviewModal"===n.addedFrom||n.status<cP.NONE?t(zU,{id:xA.generateId(u,`item-${r+1}`),"data-testid":xA.generateId(u,`item-${r+1}`),type:"button","aria-label":`error with ${n.name}`,onClick:()=>d(r),error:!0,children:[e(jU,{isSelected:a===r}),e(FU,{})]},r):void 0)),(c.filter((({status:e,addedFrom:t})=>e>=cP.NONE||e===cP.ERROR_CUSTOM_MUTED||"reviewModal"===t)).length<l||!l)&&t(n,{children:[e(BU,{id:xA.generateId(u,"file-input"),"data-testid":xA.generateId(u,"file-input"),type:"file","aria-hidden":"true",tabIndex:-1,capture:o,ref:h,accept:i.map((e=>`.${e}`)).join(", "),onChange:g,multiple:p,value:""}),e(VU,{type:"button",id:xA.generateId(u,"add-image-button"),"data-testid":xA.generateId(u,"add-image-button"),"aria-label":"add image",onClick:y,theme:m||ie,children:e(ae,{})})]})]})},HU=y((()=>import("./index.3396b1bb.js"))),YU=[{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"}],WU=r=>{const{accepts:i,capture:a,className:c,compress:f,dimensions:p,id:h="image-review",maxFiles:m,maxSizeInKb:g,onExit:y,outputType:v,show:b,multiple:A,maxFilesErrorMessage:E,imageReviewModalStyles:S}=r,{images:w,setImages:x}=l(aP),{dispatchFieldEvent:M,addFieldEventListener:T,removeFieldEventListener:O}=mk(),N=y$(b),[C,L]=o(w.length-1),[I,k]=o(!1),[$,R]=o(),z=!!w?.find((({status:e})=>e===cP.NONE)),[F,P]=o(YU[0].color),[Z,U]=o(!1),j=s(null),B=!!w?.find((({addedFrom:e,status:t})=>"reviewModal"===e&&t<=cP.NONE))||!w.length,V=d((e=>{e.detail.removePendingImages&&x((e=>e.filter((({status:e})=>e===cP.UPLOADED||e===cP.ERROR_CUSTOM_MUTED)))),y()}),[y,x]),G=e=>{!m||e.length+w.filter((({status:e,addedFrom:t})=>e>=cP.NONE||"reviewModal"===t)).length<=m?e.forEach((e=>{x((t=>{const n=sP.findAvailableSlot(t);return[...t,{id:wm(),file:e,name:e.name,dimensions:p,status:cP.NONE,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))})):x((t=>{const n=sP.findAvailableSlot(t);return[...t,{id:wm(),file:e[0],name:e[0].name,dimensions:p,status:cP.ERROR_EXCEED,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))},H=e=>{e&&(x((e=>e.map(((e,t)=>({...e,...t===C?{status:cP.TO_DELETE}:{}}))))),L(Math.max(0,C-1))),R(null)},Y=d((()=>{x((e=>e.filter((({status:e})=>e>=cP.NONE||e===cP.ERROR_CUSTOM_MUTED)).map((e=>{const t={...e};return e.drawingDataURL&&(t.dataURL=e.drawingDataURL),e.status<cP.UPLOAD_READY&&e.status>cP.NONE&&(t.status=cP.UPLOAD_READY),t.drawingDataURL=void 0,t.drawing=void 0,t}))))}),[x]),W=()=>{!M("save-review-images",h,{images:w,retry:W})||(Y(),y())},q=()=>{k(!0),P(YU[0].color)},K=async()=>{const{dataURL:e,drawing:t}=j.current?.export()||{},n=await aA.dataUrlToImage(e),r=await aA.resampleImage(n,{scale:96/n.width,type:bm.fileExtensionToMimeType(v)}),i=await bm.fileToDataUrl(r);x((n=>{const r=[...n];return r[C]={...r[C],thumbnailDataURL:i,drawingDataURL:e,drawing:t,status:f?cP.TO_RECOMPRESS:cP.EDITED},r})),k(!1),Q()},J=()=>{Q(),U(!0)},Q=()=>{P(""),U(!1)};u((()=>{const e={"trigger-save-review-images":Y,"dismiss-review-modal":V};return Object.entries(e).forEach((([e,t])=>{T(e,h,t)})),()=>{Object.entries(e).forEach((([e,t])=>{O(e,h,t)}))}}),[T,V,Y,h,O]),u((()=>{L(w.length-1)}),[w.length]),u((()=>{b?M("show-review-modal",h):N&&M("hide-review-modal",h)}),[b]);return e(D,{id:xA.generateId(h,void 0,b?"show":"hide"),className:c?`${c}-review`:void 0,show:b,children:e(mU,{className:c?`${c}-review-modal-box`:void 0,imageReviewModalStyles:S,showCloseButton:!1,children:b?t(n,{children:[e(gU,{className:c?`${c}-header`:void 0,$drawActive:I,children:t(n,I?{children:[e(bU,{id:xA.generateId(h,"clear-drawing-button"),"data-testid":xA.generateId(h,"clear-drawing-button"),onClick:()=>R("clear-drawing"),children:"Clear"}),e(bU,{id:xA.generateId(h,"save-drawing"),"data-testid":xA.generateId(h,"save-drawing"),onClick:K,children:"Save"})]}:{children:[e(yU,{id:xA.generateId(h,"close-button"),"data-testid":xA.generateId(h,"close-button"),"aria-label":"exit review modal",onClick:()=>R("exit"),children:e(X,{type:"cross"})}),e(_U,{weight:"semibold",children:"Review photos"})]})}),t(AU,{children:[w.length>0&&e(OU,{className:c?`${c}-editor`:void 0,children:e(_,{fallback:null,children:e(HU,{baseImageDataURL:w[C]?.dataURL,drawing:w[C]?.drawing,color:I?F:void 0,erase:!!I&&Z,ref:j,maxSizeInKb:g})})}),w.length>0&&e(EU,{children:"Loading Preview..."}),!I&&w[C]?.status>=cP.NONE&&t(SU,{children:[t(wU,{id:xA.generateId(h,"draw-button"),"data-testid":xA.generateId(h,"draw-button"),onClick:q,disabled:z,children:[e(MU,{$disabled:z}),e(xU,{weight:"semibold",$disabled:z,children:"Draw"})]}),t(wU,{id:xA.generateId(h,"delete-button"),"data-testid":xA.generateId(h,"delete-button"),onClick:()=>R("delete"),disabled:z,children:[e(TU,{$disabled:z}),e(xU,{weight:"semibold",$disabled:z,children:"Delete"})]})]}),w[C]?.status<cP.NONE&&e(pU,{id:`${h}-photo-error`,image:w[C],accepts:i,maxSizeInKb:g,onClickOk:()=>H(!0),maxFilesErrorMessage:E,maxFiles:m})]}),e(NU,{className:c?`${c}-footer`:void 0,children:t(n,I?{children:[e(DU,{id:xA.generateId(h,"eraser-button"),"data-testid":xA.generateId(h,"eraser-button"),"aria-label":"eraser",onClick:J,children:e(LU,{$eraseMode:Z})}),e(kU,{children:YU.map((({color:t,colorScheme:n,label:r},i)=>e($U,{id:xA.generateId(h,`palette-color-${i}`),"aria-label":`${r} brush`,$color:t,$colorScheme:n,onClick:()=>(e=>{Q(),P(e)})(t),children:F===t&&e(IU,{$colorScheme:n})},t)))})]}:{children:[e(GU,{id:`${h}-image-thumbnails`,activeFileIndex:C,accepts:i,capture:a,maxFiles:m,images:w,onClickThumbnail:L,onSelectFile:G,multiple:A}),e(CU,{id:xA.generateId(h,"save-button"),"data-testid":xA.generateId(h,"save-button"),onClick:W,disabled:B,children:"Save"})]})}),e(hU,{images:w,show:$,onDecideClearDrawing:e=>{e&&j.current.clearDrawing(),R(null)},onDecideDelete:H,onDecideExit:e=>{e&&(x(w.filter((({addedFrom:e,status:t})=>t>=cP.UPLOADED||t<cP.NONE&&"dragInput"===e)).map((e=>({...e,drawingDataURL:void 0,drawing:void 0})))),y()),R(null)}})]}):e(n,{})})})},qU=y((()=>import("./index.e11ec601.js"))),KU=r=>{const{schema:{buttonLabel:i,capture:a,className:s,compress:c,crop:d,description:f,dimensions:p={width:1e3,height:1e3},editImage:h,label:m,outputType:g="jpg",uploadOnAddingFile:y,validation:v,multiple:b,imageReviewModalStyles:A},id:E,isDirty:S,isTouched:w,value:x,warning:M,...T}=r,{images:O,setImages:N,currentFileIds:C}=l(aP),D=y$(O),[L,I]=o([...uP]),[k,$]=o(0),[R,z]=o(0),[F,P]=o(!1),[Z,U]=o(!1),{setFieldValidationConfig:j}=p$(),{dispatchFieldEvent:B}=mk();u((()=>{B("mount",E)}),[B,E]),u((()=>{if(!S&&!w){const e=Array.isArray(x)?x:[];if(!(XF(e.map((({fileId:e})=>e)),C).length>0))return;const t=[];e.forEach((({fileId:e,fileName:n,dataURL:r,uploadResponse:i},a)=>{const o={id:e||wm(),file:{},name:n,dimensions:{width:10,height:10},dataURL:r,status:cP.INJECTED,addedFrom:"schema",uploadProgress:100,slot:a,uploadResponse:i};t.push(o)})),N(t)}}),[S,w,C,N,x]),u((()=>{const e=v?.find((e=>"required"in e)),t=v?.find((e=>"fileType"in e)),n=v?.find((e=>"maxSizeInKb"in e));t?.fileType&&t?.fileType!==L&&I(t?.fileType),n?.maxSizeInKb&&n?.maxSizeInKb!==R&&z(n?.maxSizeInKb);const r=v?.find((e=>"length"in e)),i=v?.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&&k!==a.maxFiles&&$(a.maxFiles),j(E,XM().of(KM().shape({fileName:$x(),dataURL:$x()})).test("is-empty-array",e?.errorMessage||Am.UPLOAD("photo").REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",n?.errorMessage||Am.UPLOAD("photo").MAX_FILE_SIZE(n?.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&n?.maxSizeInKb)||e.every((e=>bm.getFilesizeFromBase64(e.dataURL)<=1024*n?.maxSizeInKb)))),v)}),[v]),u((()=>{O.some((e=>e.status===cP.NONE))||(O.some(((e,t)=>{const n=D?.[t];if(e.status!==n?.status||e.dataURL!==n.dataURL)switch(e.status){case cP.COMPRESSED:case cP.CONVERTED:if(h&&!Z)return MA.isMobileView()?U(!0):P(!0),!0}})),0===O.length&&U(!1))}),[O.map((e=>e.status)).join(","),O.map((e=>e.dataURL)).join(",")]);const V=(e=!1)=>{e?h&&(document.body.classList.remove("lifesg-ds-overlay-open"),U(!0)):N((e=>e.map((e=>e.status<cP.UPLOAD_READY&&e.status>cP.NONE?{...e,status:cP.UPLOAD_READY}:e)))),P(!1)};return t(n,{children:[e(_,{fallback:null,children:e(qU,{accepts:L,compress:!!c,crop:!!d,dimensions:p,editImage:h,id:E,maxSizeInKb:R,outputType:g,upload:y,value:x})}),e(oU,{id:E,capture:a,className:s,label:m,description:f,buttonLabel:i,accepts:L,maxFiles:k,maxSizeInKb:R,dimensions:p,errorMessage:T.error?.message,validation:v,multiple:b,warning:M}),e(mT,{id:`${E}-review-prompt`,title:"Review photos?",size:"large",show:F,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:()=>V(!0)},{id:"skip",title:"Skip",buttonStyle:"secondary",onClick:()=>V()}]}),(()=>{const t=v?.find((e=>"max"in e));return e(WU,{accepts:L,dimensions:p,id:E,className:s,maxFiles:k,maxFilesErrorMessage:t?.errorMessage,maxSizeInKb:R,onExit:()=>U(!1),outputType:g,show:Z,multiple:b,capture:a,imageReviewModalStyles:A})})()]})},JU=T`
931
+ `,GU=r=>{const{accepts:i,activeFileIndex:a,capture:o,id:u="image-thumbnails",images:c,maxFiles:l,onClickThumbnail:d,onSelectFile:f,multiple:p}=r,h=s(null),m=N(),g=async e=>{const t=Array.from(e.target.files||[]);t.length&&setTimeout((()=>{f(t)}),100)},y=()=>h?.current?.click();return t(RU,{id:xA.generateId(u),children:[c.map(((n,r)=>n.status===cP.NONE?e(UU,{children:[...Array(4)].map(((t,n)=>e(ZU,{},`dot-${n}`)))},r):n.status>cP.NONE||n.status===cP.ERROR_CUSTOM_MUTED?e(zU,{id:xA.generateId(u,`item-${r+1}`),"data-testid":xA.generateId(u,`item-${r+1}`),src:n.thumbnailDataURL||n.dataURL||"https://assets.life.gov.sg/web-frontend-engine/img/icons/photo-placeholder-add.svg",type:"button","aria-label":`thumbnail of ${n.name}`,onClick:()=>d(r),children:e(jU,{isSelected:a===r})},r):"reviewModal"===n.addedFrom||n.status<cP.NONE?t(zU,{id:xA.generateId(u,`item-${r+1}`),"data-testid":xA.generateId(u,`item-${r+1}`),type:"button","aria-label":`error with ${n.name}`,onClick:()=>d(r),error:!0,children:[e(jU,{isSelected:a===r}),e(FU,{})]},r):void 0)),(c.filter((({status:e,addedFrom:t})=>e>=cP.NONE||e===cP.ERROR_CUSTOM_MUTED||"reviewModal"===t)).length<l||!l)&&t(n,{children:[e(BU,{id:xA.generateId(u,"file-input"),"data-testid":xA.generateId(u,"file-input"),type:"file","aria-hidden":"true",tabIndex:-1,capture:o,ref:h,accept:i.map((e=>`.${e}`)).join(", "),onChange:g,multiple:p,value:""}),e(VU,{type:"button",id:xA.generateId(u,"add-image-button"),"data-testid":xA.generateId(u,"add-image-button"),"aria-label":"add image",onClick:y,theme:m||ie,children:e(ae,{})})]})]})},HU=y((()=>import("./index.3ad3ddcb.js"))),YU=[{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"}],WU=r=>{const{accepts:i,capture:a,className:c,compress:f,dimensions:p,id:h="image-review",maxFiles:m,maxSizeInKb:g,onExit:y,outputType:v,show:b,multiple:A,maxFilesErrorMessage:E,imageReviewModalStyles:S}=r,{images:w,setImages:x}=l(aP),{dispatchFieldEvent:M,addFieldEventListener:T,removeFieldEventListener:O}=mk(),N=y$(b),[C,L]=o(w.length-1),[I,k]=o(!1),[$,R]=o(),z=!!w?.find((({status:e})=>e===cP.NONE)),[F,P]=o(YU[0].color),[Z,U]=o(!1),j=s(null),B=!!w?.find((({addedFrom:e,status:t})=>"reviewModal"===e&&t<=cP.NONE))||!w.length,V=d((e=>{e.detail.removePendingImages&&x((e=>e.filter((({status:e})=>e===cP.UPLOADED||e===cP.ERROR_CUSTOM_MUTED)))),y()}),[y,x]),G=e=>{!m||e.length+w.filter((({status:e,addedFrom:t})=>e>=cP.NONE||"reviewModal"===t)).length<=m?e.forEach((e=>{x((t=>{const n=sP.findAvailableSlot(t);return[...t,{id:wm(),file:e,name:e.name,dimensions:p,status:cP.NONE,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))})):x((t=>{const n=sP.findAvailableSlot(t);return[...t,{id:wm(),file:e[0],name:e[0].name,dimensions:p,status:cP.ERROR_EXCEED,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))},H=e=>{e&&(x((e=>e.map(((e,t)=>({...e,...t===C?{status:cP.TO_DELETE}:{}}))))),L(Math.max(0,C-1))),R(null)},Y=d((()=>{x((e=>e.filter((({status:e})=>e>=cP.NONE||e===cP.ERROR_CUSTOM_MUTED)).map((e=>{const t={...e};return e.drawingDataURL&&(t.dataURL=e.drawingDataURL),e.status<cP.UPLOAD_READY&&e.status>cP.NONE&&(t.status=cP.UPLOAD_READY),t.drawingDataURL=void 0,t.drawing=void 0,t}))))}),[x]),W=()=>{!M("save-review-images",h,{images:w,retry:W})||(Y(),y())},q=()=>{k(!0),P(YU[0].color)},K=async()=>{const{dataURL:e,drawing:t}=j.current?.export()||{},n=await aA.dataUrlToImage(e),r=await aA.resampleImage(n,{scale:96/n.width,type:bm.fileExtensionToMimeType(v)}),i=await bm.fileToDataUrl(r);x((n=>{const r=[...n];return r[C]={...r[C],thumbnailDataURL:i,drawingDataURL:e,drawing:t,status:f?cP.TO_RECOMPRESS:cP.EDITED},r})),k(!1),Q()},J=()=>{Q(),U(!0)},Q=()=>{P(""),U(!1)};u((()=>{const e={"trigger-save-review-images":Y,"dismiss-review-modal":V};return Object.entries(e).forEach((([e,t])=>{T(e,h,t)})),()=>{Object.entries(e).forEach((([e,t])=>{O(e,h,t)}))}}),[T,V,Y,h,O]),u((()=>{L(w.length-1)}),[w.length]),u((()=>{b?M("show-review-modal",h):N&&M("hide-review-modal",h)}),[b]);return e(D,{id:xA.generateId(h,void 0,b?"show":"hide"),className:c?`${c}-review`:void 0,show:b,children:e(mU,{className:c?`${c}-review-modal-box`:void 0,imageReviewModalStyles:S,showCloseButton:!1,children:b?t(n,{children:[e(gU,{className:c?`${c}-header`:void 0,$drawActive:I,children:t(n,I?{children:[e(bU,{id:xA.generateId(h,"clear-drawing-button"),"data-testid":xA.generateId(h,"clear-drawing-button"),onClick:()=>R("clear-drawing"),children:"Clear"}),e(bU,{id:xA.generateId(h,"save-drawing"),"data-testid":xA.generateId(h,"save-drawing"),onClick:K,children:"Save"})]}:{children:[e(yU,{id:xA.generateId(h,"close-button"),"data-testid":xA.generateId(h,"close-button"),"aria-label":"exit review modal",onClick:()=>R("exit"),children:e(X,{type:"cross"})}),e(_U,{weight:"semibold",children:"Review photos"})]})}),t(AU,{children:[w.length>0&&e(OU,{className:c?`${c}-editor`:void 0,children:e(_,{fallback:null,children:e(HU,{baseImageDataURL:w[C]?.dataURL,drawing:w[C]?.drawing,color:I?F:void 0,erase:!!I&&Z,ref:j,maxSizeInKb:g})})}),w.length>0&&e(EU,{children:"Loading Preview..."}),!I&&w[C]?.status>=cP.NONE&&t(SU,{children:[t(wU,{id:xA.generateId(h,"draw-button"),"data-testid":xA.generateId(h,"draw-button"),onClick:q,disabled:z,children:[e(MU,{$disabled:z}),e(xU,{weight:"semibold",$disabled:z,children:"Draw"})]}),t(wU,{id:xA.generateId(h,"delete-button"),"data-testid":xA.generateId(h,"delete-button"),onClick:()=>R("delete"),disabled:z,children:[e(TU,{$disabled:z}),e(xU,{weight:"semibold",$disabled:z,children:"Delete"})]})]}),w[C]?.status<cP.NONE&&e(pU,{id:`${h}-photo-error`,image:w[C],accepts:i,maxSizeInKb:g,onClickOk:()=>H(!0),maxFilesErrorMessage:E,maxFiles:m})]}),e(NU,{className:c?`${c}-footer`:void 0,children:t(n,I?{children:[e(DU,{id:xA.generateId(h,"eraser-button"),"data-testid":xA.generateId(h,"eraser-button"),"aria-label":"eraser",onClick:J,children:e(LU,{$eraseMode:Z})}),e(kU,{children:YU.map((({color:t,colorScheme:n,label:r},i)=>e($U,{id:xA.generateId(h,`palette-color-${i}`),"aria-label":`${r} brush`,$color:t,$colorScheme:n,onClick:()=>(e=>{Q(),P(e)})(t),children:F===t&&e(IU,{$colorScheme:n})},t)))})]}:{children:[e(GU,{id:`${h}-image-thumbnails`,activeFileIndex:C,accepts:i,capture:a,maxFiles:m,images:w,onClickThumbnail:L,onSelectFile:G,multiple:A}),e(CU,{id:xA.generateId(h,"save-button"),"data-testid":xA.generateId(h,"save-button"),onClick:W,disabled:B,children:"Save"})]})}),e(hU,{images:w,show:$,onDecideClearDrawing:e=>{e&&j.current.clearDrawing(),R(null)},onDecideDelete:H,onDecideExit:e=>{e&&(x(w.filter((({addedFrom:e,status:t})=>t>=cP.UPLOADED||t<cP.NONE&&"dragInput"===e)).map((e=>({...e,drawingDataURL:void 0,drawing:void 0})))),y()),R(null)}})]}):e(n,{})})})},qU=y((()=>import("./index.35f47b02.js"))),KU=r=>{const{schema:{buttonLabel:i,capture:a,className:s,compress:c,crop:d,description:f,dimensions:p={width:1e3,height:1e3},editImage:h,label:m,outputType:g="jpg",uploadOnAddingFile:y,validation:v,multiple:b,imageReviewModalStyles:A},id:E,isDirty:S,isTouched:w,value:x,warning:M,...T}=r,{images:O,setImages:N,currentFileIds:C}=l(aP),D=y$(O),[L,I]=o([...uP]),[k,$]=o(0),[R,z]=o(0),[F,P]=o(!1),[Z,U]=o(!1),{setFieldValidationConfig:j}=p$(),{dispatchFieldEvent:B}=mk();u((()=>{B("mount",E)}),[B,E]),u((()=>{if(!S&&!w){const e=Array.isArray(x)?x:[];if(!(XF(e.map((({fileId:e})=>e)),C).length>0))return;const t=[];e.forEach((({fileId:e,fileName:n,dataURL:r,uploadResponse:i},a)=>{const o={id:e||wm(),file:{},name:n,dimensions:{width:10,height:10},dataURL:r,status:cP.INJECTED,addedFrom:"schema",uploadProgress:100,slot:a,uploadResponse:i};t.push(o)})),N(t)}}),[S,w,C,N,x]),u((()=>{const e=v?.find((e=>"required"in e)),t=v?.find((e=>"fileType"in e)),n=v?.find((e=>"maxSizeInKb"in e));t?.fileType&&t?.fileType!==L&&I(t?.fileType),n?.maxSizeInKb&&n?.maxSizeInKb!==R&&z(n?.maxSizeInKb);const r=v?.find((e=>"length"in e)),i=v?.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&&k!==a.maxFiles&&$(a.maxFiles),j(E,XM().of(KM().shape({fileName:$x(),dataURL:$x()})).test("is-empty-array",e?.errorMessage||Am.UPLOAD("photo").REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",n?.errorMessage||Am.UPLOAD("photo").MAX_FILE_SIZE(n?.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&n?.maxSizeInKb)||e.every((e=>bm.getFilesizeFromBase64(e.dataURL)<=1024*n?.maxSizeInKb)))),v)}),[v]),u((()=>{O.some((e=>e.status===cP.NONE))||(O.some(((e,t)=>{const n=D?.[t];if(e.status!==n?.status||e.dataURL!==n.dataURL)switch(e.status){case cP.COMPRESSED:case cP.CONVERTED:if(h&&!Z)return MA.isMobileView()?U(!0):P(!0),!0}})),0===O.length&&U(!1))}),[O.map((e=>e.status)).join(","),O.map((e=>e.dataURL)).join(",")]);const V=(e=!1)=>{e?h&&(document.body.classList.remove("lifesg-ds-overlay-open"),U(!0)):N((e=>e.map((e=>e.status<cP.UPLOAD_READY&&e.status>cP.NONE?{...e,status:cP.UPLOAD_READY}:e)))),P(!1)};return t(n,{children:[e(_,{fallback:null,children:e(qU,{accepts:L,compress:!!c,crop:!!d,dimensions:p,editImage:h,id:E,maxSizeInKb:R,outputType:g,upload:y,value:x})}),e(oU,{id:E,capture:a,className:s,label:m,description:f,buttonLabel:i,accepts:L,maxFiles:k,maxSizeInKb:R,dimensions:p,errorMessage:T.error?.message,validation:v,multiple:b,warning:M}),e(mT,{id:`${E}-review-prompt`,title:"Review photos?",size:"large",show:F,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:()=>V(!0)},{id:"skip",title:"Skip",buttonStyle:"secondary",onClick:()=>V()}]}),(()=>{const t=v?.find((e=>"max"in e));return e(WU,{accepts:L,dimensions:p,id:E,className:s,maxFiles:k,maxFilesErrorMessage:t?.errorMessage,maxSizeInKb:R,onExit:()=>U(!1),outputType:g,show:Z,multiple:b,capture:a,imageReviewModalStyles:A})})()]})},JU=T`
932
932
  border: 1px solid ${x.Accent.Light[1]};
933
933
  box-shadow: none;
934
934
  `,XU=T`
@@ -1011,7 +1011,7 @@ object-assign
1011
1011
  ${e=>T`
1012
1012
  margin-left: ${e.$readOnly?"0.25rem":"0.75rem"};
1013
1013
  `}
1014
- `,rj=n=>{const{id:r,"data-testid":i,className:a,disabled:o,readOnly:s,onFocus:u,value:c,placeholder:l,error:d}=n;return t(ej,{id:r,"data-testid":i,type:"button",className:a,disabled:o,$readOnly:s,$error:d,onFocus:u,onClick:e=>{o||e.currentTarget.focus()},tabIndex:o?-1:0,"aria-disabled":o||void 0,"aria-haspopup":"dialog","aria-readonly":s,children:[e(tj,l&&!c?{$placeholder:!0,$disabled:o,children:l}:{$disabled:o,children:c}),e(nj,{$disabled:o,$readOnly:s,"aria-hidden":"true",children:e(se,{})})]})},ij=t=>{const{id:n,label:r,className:i,locationInputPlaceholder:a="",onFocus:o,value:s,errorMessage:u,disabled:c,readOnly:l}=t;return e(W.CustomField,{id:xA.generateId(n,"location-input"),"data-testid":xA.generateId(n,"location-input"),label:r,errorMessage:u,children:e(rj,{id:xA.generateId(n,"location-input-base"),"data-testid":xA.generateId(n,"location-input-base"),disabled:c,readOnly:l,placeholder:a,onFocus:o,value:s,error:!!u,className:i})})},aj=y((()=>import("./location-modal.559a916a.js")));class oj extends Error{code;message;constructor(e){super(),Object.assign(this,e)}}const sj=M(S.BodySmall)`
1014
+ `,rj=n=>{const{id:r,"data-testid":i,className:a,disabled:o,readOnly:s,onFocus:u,value:c,placeholder:l,error:d}=n;return t(ej,{id:r,"data-testid":i,type:"button",className:a,disabled:o,$readOnly:s,$error:d,onFocus:u,onClick:e=>{o||e.currentTarget.focus()},tabIndex:o?-1:0,"aria-disabled":o||void 0,"aria-haspopup":"dialog","aria-readonly":s,children:[e(tj,l&&!c?{$placeholder:!0,$disabled:o,children:l}:{$disabled:o,children:c}),e(nj,{$disabled:o,$readOnly:s,"aria-hidden":"true",children:e(se,{})})]})},ij=t=>{const{id:n,label:r,className:i,locationInputPlaceholder:a="",onFocus:o,value:s,errorMessage:u,disabled:c,readOnly:l}=t;return e(W.CustomField,{id:xA.generateId(n,"location-input"),"data-testid":xA.generateId(n,"location-input"),label:r,errorMessage:u,children:e(rj,{id:xA.generateId(n,"location-input-base"),"data-testid":xA.generateId(n,"location-input-base"),disabled:c,readOnly:l,placeholder:a,onFocus:o,value:s,error:!!u,className:i})})},aj=y((()=>import("./location-modal.f2d21ab1.js")));class oj extends Error{code;message;constructor(e){super(),Object.assign(this,e)}}const sj=M(S.BodySmall)`
1015
1015
  cursor: ${e=>e.disabled?"not-allowed":"pointer"};
1016
1016
  `,uj=M(le)`
1017
1017
  margin-right: 5px;
@@ -1052,4 +1052,4 @@ object-assign
1052
1052
  `,wj=M.div`
1053
1053
  flex: 1;
1054
1054
  `,xj=t=>{const{sectionSchema:{children:n,layoutType:r},...i}=t;switch(r){case"grid":return e($.Section,{children:e(Sj,{type:"grid",children:e(Ej,{...i,children:n})})});case"contain":return e($.Content,{children:e(wj,{children:e(Ej,{...i,children:n})})});default:return e(Ej,{...i,children:n})}},Mj=()=>{const{formSchema:{sections:r,overrides:i},overrideSchema:a}=d$();return e(n,{children:(()=>{const o=a(r,i);return o?Object.entries(o).map((([t,n],r)=>e(xj,{id:t,sectionSchema:n},`section-${r}`))):t(n,{children:["Unable to render Frontend Engine schema, make sure schema is declared within ",e("code",{children:"sections"}),"."]})})()})},Tj=h(((r,a)=>{const{data:c,className:l=null,components:f,onSubmit:p,onSubmitError:h,wrapInForm:g=!0}=r,{className:y=null,defaultValues:_,id:v,stripUnknown:b,revalidationMode:A="onChange",validationMode:E="onTouched"}=c||{},{addFieldEventListener:S,dispatchFieldEvent:w,removeFieldEventListener:x}=mk(),{setCustomComponents:M}=pk(),{setSubmitHandler:T,setWrapInForm:O}=m$(),{addWarnings:N,performSoftValidation:C,softValidationSchema:D,hardValidationSchema:L,rebuildValidationSchema:I,yupId:k}=_$(),$=function(e={}){const t=i.useRef(void 0),n=i.useRef(void 0),[r,a]=i.useState({isDirty:!1,isValidating:!1,isLoading:ut(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ut(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...zt(e),formState:r});const o=t.current.control;return o._options=e,Ke({subject:o._subjects.state,next:e=>{Ye(e,o._proxyFormState,o._updateFormState,!0)&&a({...o._formState})}}),i.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),i.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),i.useEffect((()=>{e.values&&!wt(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),i.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),i.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),i.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=Ge(r,o),t.current}({mode:E,reValidateMode:A,defaultValues:_,resolver:async(e,t,n)=>(C(D,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&&Pt({},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:Zt((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]=nt(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)}}}(L)(e,t,n))}),{setFormSchema:R}=d$(),{reset:z,handleSubmit:F,getValues:P,setValue:Z,setError:U,trigger:j,formState:B,clearErrors:V}=$,{resetFields:G,setFields:H,getFormValues:Y,registeredFields:W}=f$($),q=s(W),{checkIsFormValid:K}=((e,t)=>{const{data:n,onChange:r,onValueChange:i}=e,{stripUnknown:a}=n||{},{hardValidationSchema:c}=_$(),{formValidationConfig:l}=p$(),{watch:f,getValues:p,formState:h,clearErrors:m}=t,{setFields:g,setField:y,getFormValues:_}=f$(t),[v,b]=o({}),[A,E]=o(!1),S=y$(l),w=y$(c),x=s(void 0),M=s(void 0),T=d(((e=!1)=>{if(!e)try{return c.validateSync(p()),!0}catch(e){return!1}return(async()=>{try{return await c.validate(p()),!0}catch(e){return!1}})()}),[p,c]),O=s((async()=>{}));return O.current=async()=>{const e=_(void 0,a),t=await T(!0);i&&Object.keys(l||{}).length&&(M.current===t&&ek(x.current,e)||i(e,t)),x.current=e,M.current=t},u((()=>{const e=f(((e,{name:t})=>{t?y(t,e[t]):g(e)}));return()=>e.unsubscribe()}),[]),u((()=>{if(r&&Object.keys(l||{}).length){const e=f((async()=>{const e=await T(!0);r(_(void 0,a),e)}));return T(!0).then((e=>r(_(void 0,a),e))),()=>e.unsubscribe()}}),[T,r,f,l]),u((()=>{const e=f((async()=>{await O.current()}));return()=>e.unsubscribe()}),[f]),u((()=>{if(S){const e=e=>Object.entries(e).map((([e,{validationRules:t}])=>[e,t])),t=e(S),n=e(l);ek(t,n)||E(!0)}}),[l]),u((()=>{A&&w!==c&&O.current().then((()=>E(!1)))}),[A,c]),u((()=>{const e=h.errors;if(e&&!SA(e)){const e=f((e=>{const t=Object.fromEntries(Object.entries(h.errors).filter((([e,t])=>"api"===t.type)));t&&!SA(t)&&Object.keys(t).forEach((t=>{v[t]!==e[t]&&m(t)})),b(e)}));return()=>e.unsubscribe()}}),[h,f]),{checkIsFormValid:T}})(r,$);m(a,(()=>({addFieldEventListener:S,addCustomValidation:J,dispatchFieldEvent:w,getValues:e=>Y(e,b),isDirty:B.isDirty,isValid:K,validate:j,removeFieldEventListener:x,reset:(e,t)=>{z(e,t),G("function"==typeof e?e($.getValues())??_:e??_)},setErrors:ee,clearErrors:V,setWarnings:te,setValue:Z,submit:F(X,Q)})));const J=(e,t,n,r=!1)=>{qI.addCondition(e,t,n,k,r),I()},X=d((()=>{p?.(Y(void 0,b))}),[Y,p,b]),Q=d((e=>{setTimeout((()=>h?.(e)))}),[h]),ee=e=>{Object.entries(e).forEach((([e,t])=>{q.current.includes(e)&&(Array.isArray(t)?U(e,{type:"api",message:t[0]}):U(e,"object"==typeof t?{type:"api",message:JSON.stringify(t)}:{type:"api",message:t}))}))},te=e=>{const t={};Object.entries(e).forEach((([e,n])=>{q.current.includes(e)&&(t[e]=n)})),N(t)};u((()=>{H(P())}),[]),zs((()=>{z(Cs(_))}),[_]),Rs((()=>{R(c)}),[c||{}]),u((()=>{M(f)}),[f]),u((()=>{T((()=>F(X,Q)))}),[X,Q]),u((()=>{O(g)}),[g]),u((()=>{q.current=W}),[W]);const ne=v?`frontend-engine-${v}`:"frontend-engine",re=[l,y].join(" ").trim(),ie=g?"form":"div";return c?e(Ve,{...$,children:e(ie,{id:ne,"data-testid":v?xA.generateId(v,"frontend-engine"):ne,className:re,noValidate:!0,onSubmit:F(X,Q),ref:a,children:e(Mj,{})})}):t(n,{children:["Missing ",e("code",{children:"data"})," prop, unable to render Frontend Engine."]})})),Oj=h(((t,n)=>e(fk,{children:e(Tj,{...t,ref:n})})));export{Ml as A,pT as D,nP as E,QF as F,oj as G,aA as I,ZI as L,UI as O,mT as P,kI as S,xA as T,MA as W,Be as a,mk as b,Am as c,bm as d,aP as e,cP as f,wm as g,Ut as h,FI as i,PI as j,Sm as k,$I as l,h$ as m,Oj as n,w$ as o,gj as p,y$ as u};
1055
- //# sourceMappingURL=index.2a117e92.js.map
1055
+ //# sourceMappingURL=index.2eea32e5.js.map