@lifesg/web-frontend-engine 2.0.0-alpha.18 → 2.0.0-alpha.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.
- package/chunks/{file-upload-manager.6f91498f.js → file-upload-manager.6091aa9e.js} +2 -2
- package/chunks/file-upload-manager.6091aa9e.js.map +1 -0
- package/chunks/{index.01911ac9.js → index.cb4c93a5.js} +6 -6
- package/{cjs/chunks/index.33c9bcbb.js.map → chunks/index.cb4c93a5.js.map} +1 -1
- package/chunks/{index.c8228568.js → index.dcdbe23e.js} +2 -2
- package/chunks/{index.c8228568.js.map → index.dcdbe23e.js.map} +1 -1
- package/chunks/{index.94a6f552.js → index.df1ee6f5.js} +2 -2
- package/chunks/{index.94a6f552.js.map → index.df1ee6f5.js.map} +1 -1
- package/chunks/{location-modal.96339252.js → location-modal.b47d92b7.js} +2 -2
- package/chunks/{location-modal.96339252.js.map → location-modal.b47d92b7.js.map} +1 -1
- package/cjs/chunks/{file-upload-manager.2465d276.js → file-upload-manager.858f342f.js} +2 -2
- package/cjs/chunks/file-upload-manager.858f342f.js.map +1 -0
- package/cjs/chunks/{index.c8a96a82.js → index.3cfca5cf.js} +2 -2
- package/cjs/chunks/{index.c8a96a82.js.map → index.3cfca5cf.js.map} +1 -1
- package/cjs/chunks/{index.33c9bcbb.js → index.7db1a25b.js} +6 -6
- package/cjs/chunks/index.7db1a25b.js.map +1 -0
- package/cjs/chunks/{index.dbac2c71.js → index.ade37699.js} +2 -2
- package/cjs/chunks/{index.dbac2c71.js.map → index.ade37699.js.map} +1 -1
- package/cjs/chunks/{location-modal.07158be4.js → location-modal.ff0cd21c.js} +2 -2
- package/cjs/chunks/{location-modal.07158be4.js.map → location-modal.ff0cd21c.js.map} +1 -1
- package/cjs/index.js +1 -1
- package/components/shared/error-messages.d.ts +1 -0
- package/context-providers/yup/types.d.ts +8 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/chunks/file-upload-manager.6f91498f.js.map +0 -1
- package/chunks/index.01911ac9.js.map +0 -1
- package/cjs/chunks/file-upload-manager.2465d276.js.map +0 -1
|
@@ -176,7 +176,7 @@ var fh=!1;fh||(fh=!0,ch.ENGLISH=new ch("en"),ch.US=new ch("en","US","en"),ch.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
|
-
ap((function(e){Object.getOwnPropertyNames(uh.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatterBuilder.prototype[t]=uh.prototype[t])})),Object.getOwnPropertyNames(dh.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatter.prototype[t]=dh.prototype[t])})),e.DateTimeFormatter.RFC_1123_DATE_TIME=dh.RFC_1123_DATE_TIME}));var ph=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},hh=Cn,mh=ai;var gh=function(e){return"symbol"==typeof e||mh(e)&&"[object Symbol]"==hh(e)},yh=ph,_h=hi,vh=gh,bh=vn?vn.prototype:void 0,Ah=bh?bh.toString:void 0;var Eh=function e(t){if("string"==typeof t)return t;if(_h(t))return yh(t,e)+"";if(vh(t))return Ah?Ah.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Sh=Eh;var wh=function(e){return null==e?"":Sh(e)};var xh=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},Mh=xh;var Th=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Mh(e,t,n)},Oh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Nh=function(e){return Oh.test(e)};var Ch=function(e){return e.split("")},Dh="\\ud800-\\udfff",Lh="["+Dh+"]",Ih="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kh="\\ud83c[\\udffb-\\udfff]",$h="[^"+Dh+"]",Rh="(?:\\ud83c[\\udde6-\\uddff]){2}",zh="[\\ud800-\\udbff][\\udc00-\\udfff]",Fh="(?:"+Ih+"|"+kh+")"+"?",Ph="[\\ufe0e\\ufe0f]?",Zh=Ph+Fh+("(?:\\u200d(?:"+[$h,Rh,zh].join("|")+")"+Ph+Fh+")*"),Uh="(?:"+[$h+Ih+"?",Ih,Rh,zh,Lh].join("|")+")",Bh=RegExp(kh+"(?="+kh+")|"+Uh+Zh,"g");var jh=function(e){return e.match(Bh)||[]},Vh=Ch,Gh=Nh,Hh=jh;var Yh=function(e){return Gh(e)?Hh(e):Vh(e)},Wh=Th,qh=Nh,Kh=Yh,Jh=wh;var Xh=function(e){return function(t){t=Jh(t);var n=qh(t)?Kh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Wh(n,1).join(""):t.slice(1);return r[e]()+i}},Qh=Xh("toUpperCase"),em=wh,tm=Qh;var nm=function(e){return tm(em(e).toLowerCase())};function rm(e){return new DataView(e.buffer,e.byteOffset)}const im={len:1,get:(e,t)=>rm(e).getUint8(t),put:(e,t,n)=>(rm(e).setUint8(t,n),t+1)},am={len:2,get:(e,t)=>rm(e).getUint16(t,!0),put:(e,t,n)=>(rm(e).setUint16(t,n,!0),t+2)},om={len:2,get:(e,t)=>rm(e).getUint16(t),put:(e,t,n)=>(rm(e).setUint16(t,n),t+2)},sm={len:4,get:(e,t)=>rm(e).getUint32(t,!0),put:(e,t,n)=>(rm(e).setUint32(t,n,!0),t+4)},um={len:4,get:(e,t)=>rm(e).getUint32(t),put:(e,t,n)=>(rm(e).setUint32(t,n),t+4)},cm={len:4,get:(e,t)=>rm(e).getInt32(t),put:(e,t,n)=>(rm(e).setInt32(t,n),t+4)},lm={len:8,get:(e,t)=>rm(e).getBigUint64(t,!0),put:(e,t,n)=>(rm(e).setBigUint64(t,n,!0),t+8)};class dm{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 fm extends Error{constructor(){super("End-Of-Stream")}}class pm{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 fm;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 hm extends pm{constructor(e){super(),this.reader=e.getReader({mode:"byob"})}async readFromStream(e,t,n){if(this.endOfStream)throw new fm;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 mm{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 fm;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 fm;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new fm;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new fm;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 gm extends mm{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 fm;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 fm)return 0;throw e}if(!n.mayBeLess&&r<n.length)throw new fm}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 ym extends mm{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 fm;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 _m(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 vm(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 bm={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},Am=4100;function Em(e,t,n){n={offset:0,...n};for(const[r,i]of t.entries())if(n.mask){if(i!==(n.mask[r]&e[r+n.offset]))return!1}else if(i!==e[r+n.offset])return!1;return!0}class Sm{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 ym(n,r)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await(n=e,r=this.tokenizerOptions,new gm(new hm(n),r));var n,r;try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:n=Am}=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 fm))throw e;r=void 0}i=e}finally{a.releaseLock()}const o=new TransformStream({async start(e){e.enqueue(i)},transform(e,t){t.enqueue(e)}}),s=e.pipeThrough(o);return s.fileType=r,s}check(e,t){return Em(this.buffer,e,t)}checkString(e,t){return this.check(function(e){return[...e].map((e=>e.charCodeAt(0)))}(e),t)}async parse(e){if(this.buffer=new Uint8Array(Am),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(bm);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 dm(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 dm(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=vm(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 fm))throw o}return{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);const s=new Uint8Array(8);return await e.readBuffer(s),Em(s,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:Em(s,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:Em(s,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:Em(s,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:Em(s,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:Em(s,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const u=new dm(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!==vm(e,t)}(l,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}catch(d){if(!(d instanceof fm))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(im);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:_m(r),len:_m(i)}}async function g(t){for(;t>0;){const n=await m();if(17026===n.id){return(await e.readToken(new dm(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 dm(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 dm(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(cm),type:await e.readToken(new dm(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(lm))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const E=await A();let S=E.size-24;if(Em(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),Em(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(Em(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 dm(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 dm(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?om:am);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?om:am);for(let n=0;n<t;++n){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?om:am).get(this.buffer,2),n=(e?um:sm).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 wm;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 Sm).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})}}(wm||(wm={}));const xm={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. ${nm(e)} exceeds the maximum size of ${t} KB.`,GENERIC:"Upload failed. Please try again.",FILE_TYPE:e=>`Upload failed. Only ${wm.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"," ",wm.extensionsToSentence(r)," file."]})},GENERIC_ERROR:{TITLE:`${nm(e)} not uploaded`,DESCRIPTION:e=>t(n,{children:["There was a problem uploading ",e,". Please try again."]})},MAX_FILE_SIZE:{TITLE:`${nm(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 Mm,Tm;!function(e){function t(e,t,n){if(e)try{const r=vf.ofPattern(t).withResolverStyle(yd.STRICT).withLocale(ch.ENGLISH);switch(n){case"date":return Ff.parse(e,r);case"time":return Uf.parse(e,r);case"datetime":return Zf.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")||Ff.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=vf.ofPattern(t).withResolverStyle(yd.STRICT).withLocale(ch.ENGLISH);switch(n){case"date":return Ff.parse(e).format(i);case"time":return Uf.parse(e).format(i);case"datetime":return Zf.parse(e).format(i);default:return r||xm.GENERIC.INVALID}}catch(e){return r||xm.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")||Ff.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")||Ff.now();return a>=0?i.isAfter(s.plusDays(a)):i.isBefore(s.plusDays(a))}}(Mm||(Mm={})),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"}}(Tm||(Tm={}));const Om=()=>Array(5).fill(0).map((()=>Math.random().toString(36).slice(2))).join("");class Nm{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 Cm(e,t,n){try{return new DataView(e,t,n)}catch(r){return new Nm(e,t,n)}}function Dm(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return $m(r)}function Lm(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 $m(n)}function Im(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(),$m(r)}function km(e,t){const n=e.getUint8(t);return[n,Dm(e,t+1,n)]}function $m(e){return e.map((e=>String.fromCharCode(e))).join("")}function Rm(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function zm(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 Fm(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 Pm(e,t){return new Array(t+1).join(e)}const Zm=void 0;function Um(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 Bm=!0,jm=!0;function Vm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Gm(e){if(e.length>=8){const t=Vm(e.slice(0,8));if("ASCII\0\0\0"===t)return Vm(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 Hm(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const Ym=18761,Wm=19789;var qm={BIG_ENDIAN:Wm,LITTLE_ENDIAN:Ym,getByteOrder:function(e,t){if(e.getUint16(t)===Ym)return Ym;if(e.getUint16(t)===Wm)return Wm;throw new Error("Illegal byte order value. Faulty image.")}};var Km={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===qm.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};var Jm={isJpegFile:function(e){return!!e&&e.byteLength>=Xm&&e.getUint16(0)===Qm},findJpegOffsets:function(e){let t,n,r,i,a,o,s,u,c,l=eg;for(;l+tg+5<=e.byteLength;){if(Lg(e,l))t=e.getUint16(l+ng),n=l+ng;else if(Ig(e,l))t=e.getUint16(l+ng),r=l+ng;else if(Rg(e,l))t=e.getUint16(l+ng),i=l+rg;else if(zg(e,l))t=e.getUint16(l+ng),a=l+ig;else if(Fg(e,l))s||(s=[]),t=e.getUint16(l+ng),s.push(Zg(l,t));else if(Pg(e,l))s||(s=[]),t=e.getUint16(l+ng),s.push(Ug(l,t));else if(Bg(e,l))t=e.getUint16(l+ng),o=l+ag;else if(kg(e,l)){t=e.getUint16(l+ng);const n=l+ug,r=t-(ug-ng),i=e.getUint8(l+dg),a=e.getUint8(l+fg);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:a})}else if($g(e,l))t=e.getUint16(l+ng),c=l+cg;else{if(!jg(e,l)){if(Vg(e,l)){l++;continue}break}t=e.getUint16(l+ng)}l+=ng+t}return{hasAppMarkers:l>eg,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:a,iptcDataOffset:o,xmpChunks:s,iccChunks:u,mpfDataOffset:c}}};const Xm=2,Qm=65496,eg=2,tg=4,ng=2,rg=2,ig=10,ag=18,og=33,sg=79,ug=18,cg=8,lg="ICC_PROFILE\0",dg=tg+lg.length,fg=dg+1,pg="MPF\0",hg=65472,mg=65474,gg=65476,yg=65499,_g=65501,vg=65498,bg=65504,Ag=65505,Eg=65506,Sg=65517,wg=65519,xg=65534,Mg=65535,Tg="JFIF",Og="Exif",Ng="http://ns.adobe.com/xap/1.0/\0",Cg="http://ns.adobe.com/xmp/extension/\0",Dg="Photoshop 3.0";function Lg(e,t){return e.getUint16(t)===hg}function Ig(e,t){return e.getUint16(t)===mg}function kg(e,t){const n=lg.length;return e.getUint16(t)===Eg&&Dm(e,t+tg,n)===lg}function $g(e,t){const n=pg.length;return e.getUint16(t)===Eg&&Dm(e,t+tg,n)===pg}function Rg(e,t){const n=Tg.length;return e.getUint16(t)===bg&&Dm(e,t+tg,n)===Tg&&0===e.getUint8(t+tg+n)}function zg(e,t){const n=Og.length;return e.getUint16(t)===Ag&&Dm(e,t+tg,n)===Og&&0===e.getUint8(t+tg+n)}function Fg(e,t){return e.getUint16(t)===Ag&&function(e,t){const n=Ng.length;return Dm(e,t+tg,n)===Ng}(e,t)}function Pg(e,t){return e.getUint16(t)===Ag&&function(e,t){const n=Cg.length;return Dm(e,t+tg,n)===Cg}(e,t)}function Zg(e,t){return{dataOffset:e+og,length:t-(og-ng)}}function Ug(e,t){return{dataOffset:e+sg,length:t-(sg-ng)}}function Bg(e,t){const n=Dg.length;return e.getUint16(t)===Sg&&Dm(e,t+tg,n)===Dg&&0===e.getUint8(t+tg+n)}function jg(e,t){const n=e.getUint16(t);return n>=bg&&n<=wg||n===xg||n===hg||n===mg||n===gg||n===yg||n===_g||n===vg}function Vg(e,t){return e.getUint16(t)===Mg}var Gg={isPngFile:function(e){return!!e&&Dm(e,0,Hg.length)===Hg},findPngOffsets:function(e,t){const n={hasAppMarkers:!1};let r=Hg.length;for(;r+Yg+Wg<=e.byteLength;){if(oy(e,r))n.hasAppMarkers=!0,n.pngHeaderOffset=r+Jg;else if(sy(e,r)){const t=fy(e,r);void 0!==t&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:t,length:e.getUint32(r+qg)-(t-(r+Jg))}])}else if(uy(e,r,t)){n.hasAppMarkers=!0;const t=Dm(e,r+Kg,Wg);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+qg),type:t,offset:r+Jg})}else if(cy(e,r))n.hasAppMarkers=!0,n.tiffHeaderOffset=r+Jg;else if(t&&ly(e,r)){n.hasAppMarkers=!0;const t=e.getUint32(r+qg),i=r+Jg,{profileName:a,compressionMethod:o,compressedProfileOffset:s}=py(e,i);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:t-(s-i),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:o})}else dy(e,r)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+qg));r+=e.getUint32(r+qg)+Yg+Wg+4}return n}};const Hg="PNG\r\n\n",Yg=4,Wg=4,qg=0,Kg=Yg,Jg=Yg+Wg,Xg="XML:com.adobe.xmp\0",Qg="tEXt",ey="iTXt",ty="zTXt",ny="pHYs",ry="tIME",iy="eXIf",ay="iCCP";function oy(e,t){return"IHDR"===Dm(e,t+Kg,Wg)}function sy(e,t){return Dm(e,t+Kg,Wg)===ey&&Dm(e,t+Jg,Xg.length)===Xg}function uy(e,t,n){const r=Dm(e,t+Kg,Wg);return r===Qg||r===ey||r===ty&&n}function cy(e,t){return Dm(e,t+Kg,Wg)===iy}function ly(e,t){return Dm(e,t+Kg,Wg)===ay}function dy(e,t){const n=[ny,ry],r=Dm(e,t+Kg,Wg);return n.includes(r)}function fy(e,t){t+=Jg+Xg.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function py(e,t){const n=Lm(e,t);t+=n.length+1;return{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function hy(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:my(e,t,i,a,o,s,c,l),length:r}}function my(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=gy(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=_y(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=yy(e,t,c,o),c+=r.item.extent.extentIndex,s.extentOffset=_y(e,c,i),c+=r.item.extent.extentOffset,s.extentLength=_y(e,c,a),c+=r.item.extent.extentLength,n.extents.push(s)}u.push(n)}return u}function gy(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function yy(e,t,n,r){if((1===t||2===t)&&r>0)return _y(e,n,r)}function _y(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 vy=1165519206,by=1835625829,Ay=1970432288;function Ey(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=Dm(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:My(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1768973167===i)return function(e,t,n,r){return{type:"ipco",properties:My(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1668246642===i)return function(e,t,n){return{type:"colr",icc:xy(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:My(e,n+i,r-(n+i-t)),length:r}}(e,t,r+1,n):1768714083===i?hy(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:My(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=Lm(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=Lm(e,r),r+=a.itemName.length+1,a.itemType===by?(a.contentType=Lm(e,r),t+i>(r+=a.contentType.length+1)&&(a.contentEncoding=Lm(e,r),r+=a.contentEncoding.length+1)):a.itemType===Ay&&(a.itemUri=Lm(e,r),r+=a.itemUri.length+1));return a}(e,t,a,r+1,n):{type:void 0,length:n}}function Sy(e){{const t={},n=function(e){const t=4,n=4;let r=0;for(;r+t+n<=e.byteLength;){const t=Ey(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===vy))}(t).itemId,r=wy(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===by&&"application/rdf+xml"===e.contentType))}(e).itemId,n=wy(e,t),r=wy(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 wy(e,t){return e.subBoxes.find((e=>"iloc"===e.type)).items.find((e=>e.itemId===t))}function xy(e,t){const n=Dm(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function My(e,t,n){const r=[vy,by],i=[];let a=t;for(;a<t+n;){const t=Ey(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 Ty={isHeicFile:function(e){if(!e)return!1;const t=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Ey(e,0);return n&&-1!==t.indexOf(n.majorBrand)}catch(e){return!1}},findHeicOffsets:function(e){return Sy(e)}};var Oy={isAvifFile:function(e){if(!e)return!1;try{const t=Ey(e,0);return t&&"avif"===t.majorBrand}catch(e){return!1}},findAvifOffsets:function(e){return Sy(e)}};var Ny={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&Dm(e,0,4)===t&&Dm(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=Dm(e,o,4),c=e.getUint32(o+4,!0);"EXIF"===u?(s=!0,n=Dm(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 Cy={isGifFile:function(e){return!!e&&Ly.includes(Dm(e,0,Dy))},findOffsets:function(){return{gifHeaderOffset:0}}};const Dy=6,Ly=["GIF87a","GIF89a"];var Iy={isXMLFile:function(e){return!!e&&Dm(e,ky,$y.length)===$y},findOffsets:function(e){const t=[];return t.push({dataOffset:ky,length:e.byteLength}),{xmpChunks:t}}};const ky=0,$y="<?xpacket begin";var Ry={parseAppMarkers:function(e,t){if(Km.isTiffFile(e))return zy(Km.findTiffOffsets(),"tiff","TIFF");if(Jm.isJpegFile(e))return zy(Jm.findJpegOffsets(e),"jpeg","JPEG");if(Gg.isPngFile(e))return zy(Gg.findPngOffsets(e,t),"png","PNG");if(Ty.isHeicFile(e))return zy(Ty.findHeicOffsets(e),"heic","HEIC");if(Oy.isAvifFile(e))return zy(Oy.findAvifOffsets(e),"avif","AVIF");if(Ny.isWebpFile(e))return zy(Ny.findOffsets(e),"webp","WebP");if(Cy.isGifFile(e))return zy(Cy.findOffsets(e),"gif","GIF");if(Iy.isXMLFile(e))return zy(Iy.findOffsets(e),"xml","XML");throw new Error("Invalid image format")}};function zy(e,t,n){return Rm({},e,{fileType:{value:t,description:n}})}var Fy={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])},Py={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:Fy.XResolution},283:{name:"YResolution",description:Fy.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:Fy.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:Zy},40092:{name:"XPComment",description:Zy},40093:{name:"XPAuthor",description:Zy},40094:{name:"XPKeywords",description:Zy},40095:{name:"XPSubject",description:Zy},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:Fy.LightSource},50779:{name:"CalibrationIlluminant2",description:Fy.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 Zy(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}var Uy={33434:{name:"ExposureTime",description:Fy.ExposureTime},33437:{name:"FNumber",description:Fy.FNumber},34850:{name:"ExposureProgram",description:Fy.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=>Vm(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Fy.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Fy.ShutterSpeedValue},37378:{name:"ApertureValue",description:Fy.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:Fy.MeteringMode},37384:{name:"LightSource",description:Fy.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:Fy.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:Gm},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:Fy.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:Fy.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:Fy.CustomRendered},41986:{name:"ExposureMode",description:Fy.ExposureMode},41987:{name:"WhiteBalance",description:Fy.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:Fy.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:Fy.Contrast},41993:{name:"Saturation",description:Fy.Saturation},41994:{name:"Sharpness",description:Fy.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"},By={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:Hm},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Hm},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:Gm},28:{name:"GPSAreaInformation",description:Gm},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},jy={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>Vm(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Vy={45056:{name:"MPFVersion",description:e=>Vm(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};const Gy=Rm({},Py,Uy),Hy="0th",Yy="1st",Wy="exif",qy="gps",Ky="interoperability",Jy="mpf",Xy="canon";var Qy={[Hy]:Gy,[Yy]:Py,[Wy]:Gy,[qy]:By,[Ky]:jy,[Jy]:Vy,[Xy]:{4:{name:"ShotInfo",description:e=>e}}};const e_={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},t_={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13};var n_={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:r_,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===qm.LITTLE_ENDIAN)},getLongAt:i_,getRationalAt:function(e,t,n){return[i_(e,t,n),i_(e,t+4,n)]},getUndefinedAt:function(e,t){return r_(e,t)},getSlongAt:a_,getSrationalAt:function(e,t,n){return[a_(e,t,n),a_(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return i_(e,t,n)},typeSizes:e_,tagTypes:t_,getTypeSize:function(e){if(void 0===t_[e])throw new Error("No such type found.");return e_[t_[e]]}};function r_(e,t){return e.getUint8(t)}function i_(e,t,n){return e.getUint32(t,n===qm.LITTLE_ENDIAN)}function a_(e,t,n){return e.getInt32(t,n===qm.LITTLE_ENDIAN)}const o_={1:n_.getByteAt,2:n_.getAsciiAt,3:n_.getShortAt,4:n_.getLongAt,5:n_.getRationalAt,7:n_.getUndefinedAt,9:n_.getSlongAt,10:n_.getSrationalAt,13:n_.getIfdPointerAt};function s_(e,t,n){return t+n_.getLongAt(e,t+4,n)}function u_(e,t,n,r,i,a){const o=n_.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+n_.getTypeSize("SHORT")<=e.byteLength)return n_.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(let o=0;o<u&&!(r+12>e.byteLength);o++){const o=c_(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-n_.getTypeSize("LONG")){const o=n_.getLongAt(e,r,i);0!==o&&t===Hy&&(s.Thumbnail=u_(e,"1st",n,n+o,i,a))}return s}function c_(e,t,n,r,i,a){const o=n_.getTypeSize("SHORT"),s=o+n_.getTypeSize("SHORT"),u=s+n_.getTypeSize("LONG"),c=n_.getShortAt(e,r,i),l=n_.getShortAt(e,r+o,i),d=n_.getLongAt(e,r+s,i);let f,p;if(void 0===n_.typeSizes[l]||!a&&void 0===Qy[t][c])return;if(function(e,t){return n_.typeSizes[e]*t<=n_.getTypeSize("LONG")}(l,d))p=r+u,f=l_(e,p,l,d,i);else if(p=n_.getLongAt(e,r+u,i),function(e,t,n,r,i){return t+n+n_.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)){f=l_(e,n+p,l,d,i,33723===c)}else f="<faulty value>";l===n_.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=d_(f)}}else l===n_.tagTypes.RATIONAL||l===n_.tagTypes.SRATIONAL?(h=Qy[t][c],m=""+f[0]/f[1]):(h=Qy[t][c],m=d_(f));return{id:c,name:h,value:f,description:m,__offset:p}}function l_(e,t,n,r,i,a=!1){let o=[];a&&(r*=n_.typeSizes[n],n=n_.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(o_[n](e,t,i)),t+=n_.typeSizes[n];return n===n_.tagTypes.ASCII?o=n_.getAsciiValue(o):1===o.length&&(o=o[0]),o}function d_(e){return e instanceof Array?e.join(", "):e}const f_="Exif IFD Pointer",p_="GPS Info IFD Pointer",h_="Interoperability IFD Pointer";var m_={read:function(e,t,n){const r=qm.getByteOrder(e,t);let i=function(e,t,n,r){return u_(e,Hy,t,s_(e,t,n),n,r)}(e,t,r,n);return i=g_(i,e,t,r,n),i=y_(i,e,t,r,n),i=__(i,e,t,r,n),{tags:i,byteOrder:r}}};function g_(e,t,n,r,i){return void 0!==e[f_]?Rm(e,u_(t,Wy,n,n+e[f_].value,r,i)):e}function y_(e,t,n,r,i){return void 0!==e[p_]?Rm(e,u_(t,"gps",n,n+e[p_].value,r,i)):e}function __(e,t,n,r,i){return void 0!==e[h_]?Rm(e,u_(t,Ky,n,n+e[h_].value,r,i)):e}var v_={read:function(e,t,n){const r=qm.getByteOrder(e,t),i=u_(e,"mpf",t,s_(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/b_);a++){i[a]={};const o=A_(n.MPEntry.value,a*b_,n_.getTypeSize("LONG"),r);i[a].ImageFlags=E_(o),i[a].ImageFormat=S_(o),i[a].ImageType=w_(o);const s=A_(n.MPEntry.value,a*b_+4,n_.getTypeSize("LONG"),r);i[a].ImageSize={value:s,description:""+s};const u=x_(a,n.MPEntry,r,t);i[a].ImageOffset={value:u,description:""+u};const c=A_(n.MPEntry.value,a*b_+12,n_.getTypeSize("SHORT"),r);i[a].DependentImage1EntryNumber={value:c,description:""+c};const l=A_(n.MPEntry.value,a*b_+14,n_.getTypeSize("SHORT"),r);i[a].DependentImage2EntryNumber={value:l,description:""+l},i[a].image=e.buffer.slice(u,u+s),zm(i[a],"base64",(function(){return Fm(this.image)}))}return n.Images=i,n}(e,t,i,r)}};const b_=16;function A_(e,t,n,r){if(r===qm.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_(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 S_(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function w_(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 x_(e,t,n,r){return function(e){return 0===e}(e)?0:A_(t.value,e*b_+8,n_.getTypeSize("LONG"),n)+r}var M_={read:function(e,t){const n=function(e,t){return n_.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=n_.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":T_(e,t,n),"Image Height":O_(e,t,n),"Image Width":N_(e,t,n),"Color Components":r,Subsampling:r&&C_(e,t,r.value,n)}}};function T_(e,t,n){if(3>n)return;const r=n_.getByteAt(e,t+2);return{value:r,description:""+r}}function O_(e,t,n){if(5>n)return;const r=n_.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function N_(e,t,n){if(7>n)return;const r=n_.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function C_(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([n_.getByteAt(e,n),n_.getByteAt(e,n+1),n_.getByteAt(e,n+2)])}return{value:i,description:i.length>1?D_(i)+L_(i):""}}function D_(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function L_(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 I_={read:function(e,t){const n=function(e,t){return n_.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=n_.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=n_.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),a={"JFIF Version":k_(e,t,n),"Resolution Unit":$_(e,t,n),XResolution:z_(e,t,n),YResolution:F_(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 k_(e,t,n){if(9>n)return;const r=n_.getByteAt(e,t+7),i=n_.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function $_(e,t,n){if(10>n)return;const r=n_.getByteAt(e,t+9);return{value:r,description:R_(r)}}function R_(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function z_(e,t,n){if(12>n)return;const r=n_.getShortAt(e,t+10);return{value:r,description:""+r}}function F_(e,t,n){if(14>n)return;const r=n_.getShortAt(e,t+12);return{value:r,description:""+r}}var P_={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:Z_},336:{name:"Time Sent",description:U_},346:{name:"Coded Character Set",description:B_,encoding_name:B_},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"===Vm(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=Vm(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=Vm(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:Z_},572:{name:"Time Created",description:U_},574:{name:"Digital Creation Date",description:Z_},575:{name:"Digital Creation Time",description:U_},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=Vm(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=Vm(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=Vm(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(Vm(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(Vm(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=Vm(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 Vm(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=Vm(e);if(t["ObjectData Preview File Format"]){const e=Vm(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 Z_(e){const t=Vm(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function U_(e){const t=Vm(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 B_(e){const t=Vm(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 j_={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var V_={decode:function(e,t){const n=j_.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 G_={read:function(e,t,n){try{if(Array.isArray(e))return q_(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=H_(e,t);if(Y_(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+W_(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return q_(e,r,i,n)}catch(e){return{}}}};function H_(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 Y_(e){return 1028===e.type}function W_(e){return e.size%2!=0?1:0}function q_(e,t,n,r){const i={};let a;const o=n+t.size;for(;n<o&&n<e.byteLength;){const{tag:t,tagSize:o}=K_(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 K_(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&&!P_.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:J_(P_.iptc[a],a,s),value:s,description:X_(P_.iptc[a],s,n,r)};return function(e){return P_.iptc[e]&&P_.iptc[e].repeatable}(a)&&(u.repeatable=!0),function(e){return P_.iptc[e]&&void 0!==P_.iptc[e].encoding_name}(a)&&(u.encoding=P_.iptc[a].encoding_name(s)),{tag:u,tagSize:o}}function J_(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 X_(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)?V_.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=>Fy.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>ev(Fy.XResolution,e),"tiff:YResolution":e=>ev(Fy.YResolution,e),"exif:ApertureValue":e=>ev(Fy.ApertureValue,e),"exif:GPSLatitude":nv,"exif:GPSLongitude":nv,"exif:FNumber":e=>ev(Fy.FNumber,e),"exif:FocalLength":e=>ev(Fy.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>Fy.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>Fy.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 Fy.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>Fy.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>Fy.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>Fy.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>Fy.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>tv(e)?Fy.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>Fy.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>Fy.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>Fy.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>Fy.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>ev(Fy.ShutterSpeedValue,e),"exif:WhiteBalance":e=>Fy.WhiteBalance(parseInt(e,10))};function ev(e,t){return tv(t)?e(t.split("/")):t}function tv(e){return/^-?\d+\/-?\d+$/.test(e)}function nv(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 rv={get:function(e){if(e)return e;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}}};function iv(e){const t=e.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!t)return e;const n=t[1],r=function(e){const t=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let r;for(;null!==(r=n.exec(e));)-1===t.indexOf(r[1])&&t.push(r[1]);return t}(e),i=function(e){const t=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let r;for(;null!==(r=n.exec(e));){const e=r[1];"xmlns"!==e&&"xml"!==e&&(-1===t.indexOf(e)&&t.push(e))}return t}(e),a=i.filter((e=>-1===r.indexOf(e)));if(0===a.length)return e;const o=function(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=av[r]||"http://fallback.namespace/"+r;t.push(" xmlns:"+r+'="'+i+'"')}return t.join("")}(a);return function(e,t,n){const r=new RegExp("<"+t+"([^>]*)>");return e.replace(r,"<"+t+"$1"+n+">")}(e,n,o)}const av={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};var ov={read:function(e,t,n){const r={};if("string"==typeof e)return cv(r,e,n),r;const[i,a]=function(e,t){if(0===t.length)return[];const n=[uv(e,t.slice(0,1))];t.length>1&&n.push(uv(e,t.slice(1)));return n}(e,t),o=cv(r,i,n);if(a){const i=cv(r,a,n);o||i||(delete r._raw,cv(r,uv(e,t),n))}return r}};class sv extends Error{constructor(e){super(e),this.name="ParseError"}}function uv(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 cv(e,t,n){try{const{doc:r,raw:i}=function(e,t){const n=rv.get(t);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const r="string"==typeof e?e:Dm(e,0,e.byteLength),i=lv(n,(a=r,a.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")));var a;return{doc:i,raw:r}}(t,n);e._raw=(e._raw||"")+i;return Rm(e,hv(fv(dv(r),!0))),!0}catch(e){return!1}}function lv(e,t,n=!1){try{const n=e.parseFromString(t,"application/xml"),r=n.getElementsByTagName("parsererror");if(r.length>0)throw new sv(r[0].textContent);return n}catch(r){if("ParseError"===r.name&&function(e){const t=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<t.length;n++)if(new RegExp(t[n]).test(e.message))return!0;return!1}(r)&&!n)return lv(e,iv(t),!0);throw r}}function dv(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return dv(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function fv(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:pv(e),value:fv(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 pv(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 hv(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=>{Rm(t,mv(e.attributes)),"object"==typeof e.value&&Rm(t,Av(e.value))}))}return t}function mv(e){const t={};for(const n in e)try{gv(n)&&(t[_v(n)]={value:e[n],attributes:{},description:vv(e[n],n)})}catch(e){}return t}function gv(e){return"rdf:parseType"!==e&&!yv(e)}function yv(e){return"xmlns"===e.split(":")[0]}function _v(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function vv(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?vv(e.value):vv(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(`${bv(n)}: ${vv(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 bv(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 Av(e){const t={};for(const n in e)try{yv(n)||(t[_v(n)]=Ev(e[n],n))}catch(e){}return t}function Ev(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Dv(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:""}:Sv(e)?wv(e,t):Mv(e)?Tv(e,t):Ov(e)?Nv(e,t):function(e){return void 0!==Cv(e.value)}(e)?function(e,t){let n=Cv(e.value).value["rdf:li"];const r=xv(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(Sv(e))return wv(e);if(Mv(e))return Tv(e).value;if(Ov(e))return Nv(e).value;return Dv(e)}(e))})),{value:i,attributes:r,description:vv(i,t)}}(e,t):Dv(e,t)}function Sv(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 wv(e,t){const n=xv(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),Rm(n,xv(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||yv(n)||(t[_v(n)]=e.value[n].value);return t}(e));const r=function(e){return Lv(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:vv(r,t)}}function xv(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||yv(n)||(t[_v(n)]=e.attributes[n]);return t}function Mv(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Tv(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(Rm(n.value,mv(e.value["rdf:Description"].attributes)),Rm(n.attributes,xv(e)),e=e.value["rdf:Description"]),Rm(n.value,Av(e.value)),n.description=vv(n.value,t),n}function Ov(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function Nv(e,t){const n=mv(e.attributes);return{value:n,attributes:{},description:vv(n,t)}}function Cv(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Dv(e,t){const n=Lv(e)||hv(e.value);return{value:n,attributes:xv(e),description:vv(n,t)}}function Lv(e){return e.attributes&&e.attributes["rdf:resource"]}const Iv=0,kv=1,$v=2,Rv=3,zv=4,Fv=5,Pv=6,Zv=7,Uv=8;var Bv={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=n_.getShortAt(e,r);jv[i]&&(t[i]||(t[i]=jv[i].description),n.push({type:i,path:jv[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description(e){const[,t]=km(e,0);return t}}};const jv={[Iv]:{description:"Closed subpath length",path:(e,t)=>[n_.getShortAt(e,t)]},[kv]:{description:"Closed subpath Bezier knot, linked",path:Vv},[$v]:{description:"Closed subpath Bezier knot, unlinked",path:Vv},[Rv]:{description:"Open subpath length",path:(e,t)=>[n_.getShortAt(e,t)]},[zv]:{description:"Open subpath Bezier knot, linked",path:Vv},[Fv]:{description:"Open subpath Bezier knot, unlinked",path:Vv},[Pv]:{description:"Path fill rule",path:()=>[]},[Uv]:{description:"Initial fill rule",path:(e,t)=>[n_.getShortAt(e,t)]},[Zv]:{description:"Clipboard",path:function(e,t){return[[Hv(e,t,8),Hv(e,t+4,8),Hv(e,t+8,8),Hv(e,t+12,8)],Hv(e,t+16,8)]}}};function Vv(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(Gv(e,t+r));return n}function Gv(e,t){const n=Hv(e,t,8);return[Hv(e,t+4,8),n]}function Hv(e,t,n){const r=n_.getLongAt(e,t),i=r>>>31==0?1:-1,a=(2130706432&r)>>>32-n,o=r&parseInt(Pm("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 Pm(n,t-e.length)+e}(o.toString(2),32-n,"0"),2)}var Yv={read:function(e,t){const n=Cm(new Uint8Array(e).buffer),r={};let i=0;for(;i<e.length;){const e=Dm(n,i,Jv);i+=Jv;const a=n_.getShortAt(n,i);i+=qv;const{tagName:o,tagNameSize:s}=Xv(n,i);i+=s;const u=n_.getLongAt(n,i);if(i+=Kv,e===Wv){const e=Cm(n.buffer,i,u),s={id:a,value:Dm(e,0,u)};if(Bv[a]){try{s.description=Bv[a].description(e)}catch(e){s.description="<no description formatter>"}r[o||Bv[a].name]=s}else t&&(r[`undefined-${a}`]=s)}i+=u+u%2}return r}};const Wv="8BIM",qv=2,Kv=4,Jv=Wv.length;function Xv(e,t){const[n,r]=km(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const Qv={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"}},eb={4:{name:"Preferred CMM type",value:(e,t)=>Dm(e,t,4),description:e=>null!==e?tb(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)=>Dm(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)=>Dm(e,t,4)},20:{name:"Connection Space",value:(e,t)=>Dm(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)=>Dm(e,t,4),description:e=>tb(e)},48:{name:"Device Manufacturer",value:(e,t)=>Dm(e,t,4),description:e=>tb(e)},52:{name:"Device Model Number",value:(e,t)=>Dm(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)=>Dm(e,t,4)}};function tb(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 nb={read:function(e,t,n){if(n&&t[0].compressionMethod!==Zm)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 Um(r,t[0].compressionMethod,"utf-8","dataview").then(fb).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 fb(new DataView(r.buffer))}catch(e){return{}}}(e,t)}};const rb=84,ib=128,ab="acsp",ob="desc",sb="mluc",ub="text",cb="sig ",lb=12;function db(e,t){return e.length<t+lb}function fb(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<rb)throw new Error("ICC profile too short");const r={},i=Object.keys(eb);for(let t=0;t<i.length;t++){const n=i[t],a=eb[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(pb(t.slice(36,40))!==ab)throw new Error("ICC profile: missing signature");if(function(e){return e.length<ib+4}(t))return r;const a=e.getUint32(128);let o=132;for(let n=0;n<a;n++){if(db(t,o))return r;const n=Dm(e,o,4),i=e.getUint32(o+4),a=e.getUint32(o+8);if(i>t.length)return r;const s=Dm(e,i,4);if(s===ob){const o=e.getUint32(i+8);if(o>a)return r;hb(r,n,pb(t.slice(i+12,i+o+11)))}else if(s===sb){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=Dm(e,o+0,2),n=Dm(e,o+2,2),r=e.getUint32(o+4),u=e.getUint32(o+8),c=Im(e,i+u,r);s.push({languageCode:t,countryCode:n,text:c}),o+=a}if(1===t)hb(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;hb(r,n,e)}}else if(s===ub){hb(r,n,pb(t.slice(i+8,i+a-7)))}else if(s===cb){hb(r,n,pb(t.slice(i+8,i+12)))}o+=12}return r}function pb(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function hb(e,t,n){Qv[t]?e[Qv[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const mb=27;var gb={read:function(e,t,n,r,i){let a=u_(e,Xy,t,t+n,r,i);a.ShotInfo&&(a=Rm({},a,function(e){const t={};void 0!==e[27]&&(t.AutoRotate={value:e[27],description:yb(e[27])});return t}(a.ShotInfo.value)),delete a.ShotInfo);return a},SHOT_INFO_AUTO_ROTATE:mb};function yb(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var _b={read:function(e,t){return{"Image Width":vb(e,t),"Image Height":bb(e,t),"Bit Depth":Ab(e,t),"Color Type":Eb(e,t),Compression:Sb(e,t),Filter:wb(e,t),Interlace:xb(e,t)}}};function vb(e,t){if(t+0+4>e.byteLength)return;const n=n_.getLongAt(e,t);return{value:n,description:`${n}px`}}function bb(e,t){if(t+4+4>e.byteLength)return;const n=n_.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function Ab(e,t){if(t+8+1>e.byteLength)return;const n=n_.getByteAt(e,t+8);return{value:n,description:`${n}`}}function Eb(e,t){if(t+9+1>e.byteLength)return;const n=n_.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 Sb(e,t){if(t+10+1>e.byteLength)return;const n=n_.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function wb(e,t){if(t+11+1>e.byteLength)return;const n=n_.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function xb(e,t){if(t+12+1>e.byteLength)return;const n=n_.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}var Mb={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=$b(e,s,u,c,n);if(l instanceof Promise)a.push(l.then((({name:e,value:t,description:n})=>{try{if(Bm&&Ub(e,t))return{__exif:m_.read(jb(t),kb,r).tags};if(jm&&Bb(e,t))return{__iptc:G_.read(jb(t),0,r)};if(e&&!Ub(e,t)&&!Bb(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 Tb="STATE_KEYWORD",Ob="STATE_COMPRESSION",Nb="STATE_LANG",Cb="STATE_TRANSLATED_KEYWORD",Db="STATE_TEXT",Lb=1,Ib=1,kb=6;function $b(e,t,n,r,i){const a=[],o=[];let s,u=Tb,c=Zm;for(let i=0;i<n&&t+i<e.byteLength;i++){if(u===Ob){c=Rb({type:r,dataView:e,offset:t+i}),r===ey&&(i+=Lb),u=zb(r,u);continue}if(u===Db){s=new DataView(e.buffer.slice(t+i,t+n));break}const l=e.getUint8(t+i);0===l?u=zb(r,u):u===Tb?a.push(l):u===Nb&&o.push(l)}if(c!==Zm&&!i)return{};const l=Um(s,c,function(e){if(e===Qg||e===ty)return"latin1";return"utf-8"}(r));return l instanceof Promise?l.then((e=>Fb(e,r,o,a))).catch((()=>Fb("<text using unknown compression>".split(""),r,o,a))):Fb(l,r,o,a)}function Rb({type:e,dataView:t,offset:n}){if(e===ey){if(t.getUint8(n)===Ib)return t.getUint8(n+1)}else if(e===ty)return t.getUint8(n);return Zm}function zb(e,t){return t===Tb&&[ey,ty].includes(e)?Ob:t===Ob?e===ey?Nb:Db:t===Nb?Cb:Db}function Fb(e,t,n,r){const i=function(e){if(e instanceof DataView)return Dm(e,0,e.byteLength);return e}(e);return{name:Pb(t,n,r),value:i,description:t===ey?Zb(e):i}}function Pb(e,t,n){const r=$m(n);if(e===Qg||0===t.length)return r;return`${r} (${$m(t)})`}function Zb(e){return V_.decode("UTF-8",e)}function Ub(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function Bb(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function jb(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 Vb={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=n_.getLongAt(e,t[r]+qg),a=Dm(e,t[r]+Kg,Wg);a===ny?(n["Pixels Per Unit X"]=Gb(e,t[r],i),n["Pixels Per Unit Y"]=Hb(e,t[r],i),n["Pixel Units"]=Yb(e,t[r],i)):a===ry&&(n["Modify Date"]=Wb(e,t[r],i))}return n}};function Gb(e,t,n){if(!qb(e,t,n,0,4))return;const r=n_.getLongAt(e,t+Jg+0);return{value:r,description:""+r}}function Hb(e,t,n){if(!qb(e,t,n,4,4))return;const r=n_.getLongAt(e,t+Jg+4);return{value:r,description:""+r}}function Yb(e,t,n){if(!qb(e,t,n,8,1))return;const r=n_.getByteAt(e,t+Jg+8);return{value:r,description:1===r?"meters":"Unknown"}}function Wb(e,t,n){if(!qb(e,t,n,0,7))return;const r=n_.getShortAt(e,t+Jg),i=n_.getByteAt(e,t+Jg+2),a=n_.getByteAt(e,t+Jg+3),o=n_.getByteAt(e,t+Jg+4),s=n_.getByteAt(e,t+Jg+5),u=n_.getByteAt(e,t+Jg+6);return{value:[r,i,a,o,s,u],description:`${Kb(r,4)}-${Kb(i,2)}-${Kb(a,2)} ${Kb(o,2)}:${Kb(s,2)}:${Kb(u,2)}`}}function qb(e,t,n,r,i){return r+i<=n&&t+Jg+r+i<=e.byteLength}function Kb(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}var Jb={read:function(e,t){const n={},r=n_.getByteAt(e,t);return n.Alpha=eA(r),n.Animation=tA(r),n.ImageWidth=nA(e,t+Xb),n.ImageHeight=nA(e,t+Qb),n}};const Xb=4,Qb=7;function eA(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function tA(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function nA(e,t){const n=n_.getByteAt(e,t)+256*n_.getByteAt(e,t+1)+65536*n_.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var rA={read:function(e){return{"GIF Version":iA(e),"Image Width":aA(e),"Image Height":oA(e),"Global Color Map":sA(e),"Bits Per Pixel":cA(e),"Color Resolution Depth":uA(e)}}};function iA(e){if(6>e.byteLength)return;const t=Dm(e,3,3);return{value:t,description:t}}function aA(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function oA(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function sA(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function uA(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function cA(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const lA=[6,7,99];var dA={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||lA.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),zm(t,"base64",(function(){return Fm(this.image)}))}var r;return t}};function fA(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}fA.prototype=new Error;var pA,hA,mA={MetadataMissingError:fA},gA={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=>yA(e,t)));if(function(e){return"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=>yA(e,t)));var n;return yA(e,t)},loadView:_A,errors:mA};function yA(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),_A(function(e){try{return new DataView(e)}catch(t){return new Nm(e)}}(e),t)}function _A(e,{expanded:t=!1,async:n=!1,includeUnknown:r=!1,domParser:i}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let a=!1,o={};const s=[],{fileType:u,fileDataOffset:c,jfifDataOffset:l,tiffHeaderOffset:d,iptcDataOffset:f,xmpChunks:p,iccChunks:h,mpfDataOffset:m,pngHeaderOffset:g,pngTextChunks:y,pngChunkOffsets:_,vp8xChunkOffset:v,gifHeaderOffset:b}=Ry.parseAppMarkers(e,n);if(function(e){return void 0!==e}(c)){a=!0;const n=M_.read(e,c);t?o.file=n:o=Rm({},o,n)}if(function(e){return void 0!==e}(l)){a=!0;const n=I_.read(e,l);t?o.jfif=n:o=Rm({},o,n)}if(function(e){return void 0!==e}(d)){a=!0;const{tags:n,byteOrder:s}=m_.read(e,d,r);if(n.Thumbnail&&(o.Thumbnail=n.Thumbnail,delete n.Thumbnail),t?(o.exif=n,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=Hm(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=Hm(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){}}}(o)):o=Rm({},o,n),n["IPTC-NAA"]&&!vA(f)){const e=G_.read(n["IPTC-NAA"].value,0,r);t?o.iptc=e:o=Rm({},o,e)}if(n.ApplicationNotes&&!bA(p)){const e=ov.read($m(n.ApplicationNotes.value),void 0,i);t?o.xmp=e:(delete e._raw,o=Rm({},o,e))}if(n.ImageSourceData){const e=Yv.read(n.PhotoshopSettings.value,r);t?o.photoshop=e:o=Rm({},o,e)}if(n.ICC_Profile&&!AA(h)){const e=nb.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?o.icc=e:o=Rm({},o,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=gb.read(e,d,n.MakerNote.__offset,s,r);t?o.makerNotes=i:o=Rm({},o,i)}n.MakerNote&&delete n.MakerNote.__offset}if(vA(f)){a=!0;const n=G_.read(e,f,r);t?o.iptc=n:o=Rm({},o,n)}if(bA(p)){a=!0;const n=ov.read(e,p,i);t?o.xmp=n:(delete n._raw,o=Rm({},o,n))}if(AA(h)){a=!0;const t=nb.read(e,h,n);t instanceof Promise?s.push(t.then(E)):E(t)}if(function(e){return void 0!==e}(m)){a=!0;const n=v_.read(e,m,r);t?o.mpf=n:o=Rm({},o,n)}if(void 0!==g){a=!0;const n=_b.read(e,g);t?(o.png=o.png?Rm({},o.png,n):n,o.pngFile=n):o=Rm({},o,n)}if(function(e){return void 0!==e}(y)){a=!0;const{readTags:t,readTagsPromise:i}=Mb.read(e,y,n,r);S(t),i&&s.push(i.then((e=>e.forEach(S))))}if(function(e){return void 0!==e}(_)){a=!0;const n=Vb.read(e,_);t?o.png=o.png?Rm({},o.png,n):n:o=Rm({},o,n)}if(function(e){return void 0!==e}(v)){a=!0;const n=Jb.read(e,v);t?o.riff=o.riff?Rm({},o.riff,n):n:o=Rm({},o,n)}if(function(e){return void 0!==e}(b)){a=!0;const n=rA.read(e,b);t?o.gif=o.gif?Rm({},o.gif,n):n:o=Rm({},o,n)}const A=dA.get(e,o.Thumbnail,d);if(A?(a=!0,o.Thumbnail=A):delete o.Thumbnail,u&&(t?(o.file||(o.file={}),o.file.FileType=u):o.FileType=u,a=!0),!a)throw new mA.MetadataMissingError;return n?Promise.all(s).then((()=>o)):o;function E(e){t?o.icc=e:o=Rm({},o,e)}function S(e){if(t){for(const t of["exif","iptc"]){const n=`__${t}`;e[n]&&(o[t]=o[t]?Rm({},o.exif,e[n]):e[n],delete e[n])}o.png=o.png?Rm({},o.png,e):e,o.pngText=o.pngText?Rm({},o.png,e):e}else o=Rm({},o,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e),delete o.__exif,delete o.__iptc}}function vA(e){return void 0!==e}function bA(e){return Array.isArray(e)&&e.length>0}function AA(e){return Array.isArray(e)&&e.length>0}!function(e){e.convertBlob=async(t,n="image/jpeg")=>{const r=(await wm.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 gA.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{}}}(pA||(pA={})),function(e){e.degreesToRadians=e=>Math.PI*e/180,e.radiansToDegrees=e=>180*e/Math.PI,e.nauticalMilesToMetres=e=>1852*e}(hA||(hA={}));var EA=Yi,SA=vo,wA=pi,xA=hi,MA=Ki,TA=mi.exports,OA=Ui,NA=Di,CA=Object.prototype.hasOwnProperty;var DA=function(e){if(null==e)return!0;if(MA(e)&&(xA(e)||"string"==typeof e||"function"==typeof e.splice||TA(e)||NA(e)||wA(e)))return!e.length;var t=SA(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(OA(e))return!EA(e).length;for(var n in e)if(CA.call(e,n))return!1;return!0};var LA,IA,kA=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(!DA(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);kA(i)?delete n[t]:n[t]=i})),DA(n)?void 0:n}return t}}}(LA||(LA={})),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}}}(IA||(IA={}));const $A=a({formValidationConfig:null,setFormValidationConfig:()=>null,warnings:null,setWarnings:()=>null,yupId:null}),RA=({children:t})=>{const[n,r]=o(),[i,a]=o(),[s]=o(Om()),u=c((()=>({formValidationConfig:n,setFormValidationConfig:r,warnings:i,setWarnings:a,yupId:s})),[n,i,s]);return e($A.Provider,{value:u,children:t})};var zA=kr,FA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},PA=function(e){return this.__data__.has(e)};function ZA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zA;++t<n;)this.add(e[t])}ZA.prototype.add=ZA.prototype.push=FA,ZA.prototype.has=PA;var UA=ZA;var BA=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 jA=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},VA=BA,GA=function(e){return e!=e},HA=jA;var YA=function(e,t,n){return t==t?HA(e,t,n):VA(e,GA,n)},WA=YA;var qA=function(e,t){return!!(null==e?0:e.length)&&WA(e,t,0)>-1};var KA=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 JA=function(e,t){return e.has(t)},XA=UA,QA=qA,eE=KA,tE=ph,nE=xi,rE=JA,iE=Math.min;var aE=function(e,t,n){for(var r=n?eE:QA,i=e[0].length,a=e.length,o=a,s=Array(a),u=1/0,c=[];o--;){var l=e[o];o&&t&&(l=tE(l,nE(t))),u=iE(l.length,u),s[o]=!n&&(t||i>=120&&l.length>=120)?new XA(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?rE(f,h):r(c,h,n))){for(o=a;--o;){var m=s[o];if(!(m?rE(m,h):r(e[o],h,n)))continue e}f&&f.push(h),c.push(p)}}return c};var oE=function(e){return e};var sE=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)},uE=Math.max;var cE=function(e,t,n){return t=uE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=uE(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),sE(e,this,s)}};var lE=function(e){return function(){return e}},dE=Wr,fE=dE?function(e,t){return dE(e,"toString",{configurable:!0,enumerable:!1,value:lE(t),writable:!0})}:oE,pE=fE,hE=Date.now;var mE=function(e){var t=0,n=0;return function(){var r=hE(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(pE),gE=oE,yE=cE,_E=mE;var vE=function(e,t){return _E(yE(e,t,gE),e+"")},bE=Ki,AE=ai;var EE=function(e){return AE(e)&&bE(e)},SE=EE;var wE,xE,ME=ph,TE=aE,OE=function(e){return SE(e)?e:[]},NE=vE((function(e){var t=ME(e,OE);return t.length&&t[0]===e[0]?TE(t):[]}));try{wE=Map}catch(rp){}try{xE=Set}catch(rp){}function CE(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(DE);if(wE&&e instanceof wE)return new Map(Array.from(e.entries()));if(xE&&e instanceof xE)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]:CE(e[i],t,n)}return r}return e}function DE(e){return CE(e,[],[])}const LE=Object.prototype.toString,IE=Error.prototype.toString,kE=RegExp.prototype.toString,$E="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",RE=/^Symbol\((.*)\)(.*)$/;function zE(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 $E.call(e).replace(RE,"Symbol($1)");const r=LE.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+IE.call(e)+"]":"RegExp"===r?kE.call(e):null}function FE(e,t){let n=zE(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=zE(this[e],t);return null!==r?r:n}),2)}let PE={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: \`${FE(n,!0)}\``+(i?` (cast from the value \`${FE(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"},ZE={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"},UE={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"},BE={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},jE={isValue:"${path} field must be ${value}"},VE={noUnknown:"${path} field has unspecified keys: ${unknown}"},GE={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 HE=Object.assign(Object.create(null),{mixed:PE,string:ZE,number:UE,date:BE,object:VE,array:GE,boolean:jE}),YE=Object.prototype.hasOwnProperty;var WE=function(e,t){return null!=e&&YE.call(e,t)},qE=hi,KE=gh,JE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XE=/^\w*$/;var QE=function(e,t){if(qE(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!KE(e))||(XE.test(e)||!JE.test(e)||null!=t&&e in Object(t))},eS=kr;function tS(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(tS.Cache||eS),n}tS.Cache=eS;var nS=tS;var rS=function(e){var t=nS(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},iS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aS=/\\(\\)?/g,oS=rS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(iS,(function(e,n,r,i){t.push(r?i.replace(aS,"$1"):n||e)})),t})),sS=hi,uS=QE,cS=oS,lS=wh;var dS=function(e,t){return sS(e)?e:uS(e,t)?[e]:cS(lS(e))},fS=gh;var pS=function(e){if("string"==typeof e||fS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},hS=dS,mS=pi,gS=hi,yS=_i,_S=vi,vS=pS;var bS=function(e,t,n){for(var r=-1,i=(t=hS(t,e)).length,a=!1;++r<i;){var o=vS(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&_S(i)&&yS(o,i)&&(gS(e)||mS(e))},AS=WE,ES=bS;var SS=function(e,t){return null!=e&&ES(e,t,AS)};const wS=e=>e&&e.__isYupSchema__;class xS{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!SS(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(!wS(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function MS(e){return null==e?[]:[].concat(e)}function TS(){return TS=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},TS.apply(this,arguments)}let OS=/\$\{\s*(\w+)\s*\}/g;class NS extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=TS({},t,{path:n})),"string"==typeof e?e.replace(OS,((e,n)=>FE(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=[],MS(e).forEach((e=>{NS.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,NS)}}function CS(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 NS(o,a,u)):c(null,a);for(let e=0;e<r.length;e++){(0,r[e])(i,(function(e){if(e){if(!NS.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 NS(o,a,u),a);c(null,a)}}))}}var DS=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}},LS=DS(),IS=LS,kS=ea;var $S=function(e,t){return e&&IS(e,t,kS)};var RS=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},zS=UA,FS=RS,PS=JA;var ZS=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 zS: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(!FS(t,(function(e,t){if(!PS(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 US=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var BS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},jS=Eo,VS=Wt,GS=ZS,HS=US,YS=BS,WS=vn?vn.prototype:void 0,qS=WS?WS.valueOf:void 0;var KS=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 jS(e),new jS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return VS(+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=HS;case"[object Set]":var u=1&r;if(s||(s=YS),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=GS(s(e),s(t),r,i,a,o);return o.delete(e),l;case"[object Symbol]":if(qS)return qS.call(e)==qS.call(t)}return!1},JS=Ha,XS=Object.prototype.hasOwnProperty;var QS=function(e,t,n,r,i,a){var o=1&n,s=JS(e),u=s.length;if(u!=JS(t).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in t:XS.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},ew=Gr,tw=ZS,nw=KS,rw=QS,iw=vo,aw=hi,ow=mi.exports,sw=Di,uw="[object Arguments]",cw="[object Array]",lw="[object Object]",dw=Object.prototype.hasOwnProperty;var fw=function(e,t,n,r,i,a){var o=aw(e),s=aw(t),u=o?cw:iw(e),c=s?cw:iw(t),l=(u=u==uw?lw:u)==lw,d=(c=c==uw?lw:c)==lw,f=u==c;if(f&&ow(e)){if(!ow(t))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new ew),o||sw(e)?tw(e,t,n,r,i,a):nw(e,t,u,n,r,i,a);if(!(1&n)){var p=l&&dw.call(e,"__wrapped__"),h=d&&dw.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new ew),i(m,g,n,r,a)}}return!!f&&(a||(a=new ew),rw(e,t,n,r,i,a))},pw=fw,hw=ai;var mw=function e(t,n,r,i,a){return t===n||(null==t||null==n||!hw(t)&&!hw(n)?t!=t&&n!=n:pw(t,n,r,i,e,a))},gw=Gr,yw=mw;var _w=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 gw;if(r)var f=r(c,l,u,e,t,d);if(!(void 0===f?yw(l,c,3,r,d):f))return!1}}return!0},vw=Dn;var bw=function(e){return e==e&&!vw(e)},Aw=bw,Ew=ea;var Sw=function(e){for(var t=Ew(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Aw(i)]}return t};var ww=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},xw=_w,Mw=Sw,Tw=ww;var Ow=function(e){var t=Mw(e);return 1==t.length&&t[0][2]?Tw(t[0][0],t[0][1]):function(n){return n===e||xw(n,e,t)}},Nw=dS,Cw=pS;var Dw=function(e,t){for(var n=0,r=(t=Nw(t,e)).length;null!=e&&n<r;)e=e[Cw(t[n++])];return n&&n==r?e:void 0},Lw=Dw;var Iw=function(e,t,n){var r=null==e?void 0:Lw(e,t);return void 0===r?n:r};var kw=function(e,t){return null!=e&&t in Object(e)},$w=kw,Rw=bS;var zw=function(e,t){return null!=e&&Rw(e,t,$w)},Fw=mw,Pw=Iw,Zw=zw,Uw=QE,Bw=bw,jw=ww,Vw=pS;var Gw=function(e,t){return Uw(e)&&Bw(t)?jw(Vw(e),t):function(n){var r=Pw(n,e);return void 0===r&&r===t?Zw(n,e):Fw(t,r,3)}};var Hw=function(e){return function(t){return null==t?void 0:t[e]}},Yw=Dw;var Ww=function(e){return function(t){return Yw(t,e)}},qw=Hw,Kw=Ww,Jw=QE,Xw=pS;var Qw=Ow,ex=Gw,tx=oE,nx=hi,rx=function(e){return Jw(e)?qw(Xw(e)):Kw(e)};var ix=function(e){return"function"==typeof e?e:null==e?tx:"object"==typeof e?nx(e)?ex(e[0],e[1]):Qw(e):rx(e)},ax=Kr,ox=$S,sx=ix;var ux=function(e,t){var n={};return t=sx(t),ox(e,(function(e,r,i){ax(n,r,t(e,r,i))})),n};function cx(e){this._maxSize=e,this.clear()}cx.prototype.clear=function(){this._size=0,this._values=Object.create(null)},cx.prototype.get=function(e){return this._values[e]},cx.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var lx=/[^.^\]^[]+|(?=\[\]|\.\.)/g,dx=/^\d+$/,fx=/^\d/,px=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,hx=/^\s*(['"]?)(.*?)(\1)\s*$/,mx=new cx(512),gx=new cx(512),yx=new cx(512),_x={Cache:cx,split:bx,normalizePath:vx,setter:function(e){var t=vx(e);return gx.get(e)||gx.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=vx(e);return yx.get(e)||yx.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+(Ax(t)||dx.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])&&(Ex(r)&&(r='"'+r+'"'),a=!(o=Ax(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:bx(e),t,n)}};function vx(e){return mx.get(e)||mx.set(e,bx(e).map((function(e){return e.replace(hx,"$2")})))}function bx(e){return e.match(lx)||[""]}function Ax(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function Ex(e){return!Ax(e)&&(function(e){return e.match(fx)&&!e.match(dx)}(e)||function(e){return px.test(e)}(e))}const Sx="$",wx=".";class xx{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]===Sx,this.isValue=this.key[0]===wx,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Sx:this.isValue?wx:"";this.path=this.key.slice(n.length),this.getter=this.path&&_x.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 Mx(){return Mx=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},Mx.apply(this,arguments)}function Tx(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 xx.isRef(e)?e.getValue(r,h,m):e}function y(e={}){const t=ux(Mx({value:r,originalValue:s,label:a,path:e.path||i},f,e.params),g),n=new NS(NS.formatError(e.message||p,t),r,t.path,e.type||l);return n.params=t,n}let _,v=Mx({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)}NS.isError(_)?n(_):_?n(null,_):n(y())}else try{Promise.resolve(d.call(v,r,v)).then((e=>{NS.isError(e)?n(e):e?n(null,e):n(y())})).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}xx.prototype.__isYupRef=!0;function Ox(e,t,n,r=n){let i,a,o;return t?(_x.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 Nx{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(xx.isRef(n)?e(n):n)),[])}add(e){xx.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){xx.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new Nx;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 Cx(){return Cx=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},Cx.apply(this,arguments)}class Dx{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 Nx,this._blacklist=new Nx,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(PE.notType)})),this.type=(null==e?void 0:e.type)||"mixed",this.spec=Cx({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=Cx({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=DE(Cx({},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=Cx({},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(Cx({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=FE(e),a=FE(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,Cx({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),CS({args:l,value:c,path:i,sync:r,tests:d,endEarly:u},(e=>{e?n(e,c):CS({tests:this.tests.concat(f),args:l,path:i,sync:r,value:c,endEarly:u},n)}))}validate(e,t,n){let r=this.resolve(Cx({},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(Cx({},t,{value:e}))._validate(e,Cx({},t,{sync:!0}),((e,t)=>{if(e)throw e;n=t})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(NS.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(NS.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):DE(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=PE.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=PE.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=PE.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Tx(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=MS(e).map((e=>new xx(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new xS(r,t)),n}typeError(e){let t=this.clone();return t._typeError=Tx({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=PE.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=Tx({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=PE.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=Tx({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}}Dx.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Dx.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Ox(this,t,n,r.context);return o[e](i&&i[a],Cx({},r,{parent:i,path:t}))};for(const e of["equals","is"])Dx.prototype[e]=Dx.prototype.oneOf;for(const e of["not","nope"])Dx.prototype[e]=Dx.prototype.notOneOf;Dx.prototype.optional=Dx.prototype.notRequired;const Lx=Dx;function Ix(){return new Lx}Ix.prototype=Lx.prototype;const kx=e=>null==e;function $x(){return new Rx}class Rx extends Dx{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=jE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>kx(e)||!0===e})}isFalse(e=jE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>kx(e)||!1===e})}}$x.prototype=Rx.prototype;let zx=/^((([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,Fx=/^((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,Px=/^(?:[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,Zx=e=>kx(e)||e===e.trim(),Ux={}.toString();function Bx(){return new jx}class jx extends Dx{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===Ux?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=ZE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return kx(t)||t.length===this.resolve(e)}})}min(e,t=ZE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return kx(t)||t.length>=this.resolve(e)}})}max(e,t=ZE.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return kx(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||ZE.matches,params:{regex:e},test:t=>kx(t)||""===t&&i||-1!==t.search(e)})}email(e=ZE.email){return this.matches(zx,{name:"email",message:e,excludeEmptyString:!0})}url(e=ZE.url){return this.matches(Fx,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ZE.uuid){return this.matches(Px,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=ZE.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:Zx})}lowercase(e=ZE.lowercase){return this.transform((e=>kx(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>kx(e)||e===e.toLowerCase()})}uppercase(e=ZE.uppercase){return this.transform((e=>kx(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>kx(e)||e===e.toUpperCase()})}}Bx.prototype=jx.prototype;function Vx(){return new Gx}class Gx extends Dx{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=UE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return kx(t)||t>=this.resolve(e)}})}max(e,t=UE.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return kx(t)||t<=this.resolve(e)}})}lessThan(e,t=UE.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return kx(t)||t<this.resolve(e)}})}moreThan(e,t=UE.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return kx(t)||t>this.resolve(e)}})}positive(e=UE.positive){return this.moreThan(0,e)}negative(e=UE.negative){return this.lessThan(0,e)}integer(e=UE.integer){return this.test({name:"integer",message:e,test:e=>kx(e)||Number.isInteger(e)})}truncate(){return this.transform((e=>kx(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=>kx(t)?t:Math[e](t)))}}Vx.prototype=Gx.prototype;var Hx=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let Yx=new Date("");function Wx(){return new qx}class qx extends Dx{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=Hx.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)?Yx: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(xx.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=BE.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return kx(e)||e>=this.resolve(n)}})}max(e,t=BE.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return kx(e)||e<=this.resolve(n)}})}}qx.INVALID_DATE=Yx,Wx.prototype=qx.prototype,Wx.INVALID_DATE=Yx;var Kx=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 Jx=function(e){return function(t){return null==e?void 0:e[t]}},Xx=Jx({"À":"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"}),Qx=wh,eM=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tM=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var nM=function(e){return(e=Qx(e))&&e.replace(eM,Xx).replace(tM,"")},rM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var iM=function(e){return e.match(rM)||[]},aM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var oM=function(e){return aM.test(e)},sM="\\ud800-\\udfff",uM="\\u2700-\\u27bf",cM="a-z\\xdf-\\xf6\\xf8-\\xff",lM="A-Z\\xc0-\\xd6\\xd8-\\xde",dM="\\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",fM="["+dM+"]",pM="\\d+",hM="["+uM+"]",mM="["+cM+"]",gM="[^"+sM+dM+pM+uM+cM+lM+"]",yM="(?:\\ud83c[\\udde6-\\uddff]){2}",_M="[\\ud800-\\udbff][\\udc00-\\udfff]",vM="["+lM+"]",bM="(?:"+mM+"|"+gM+")",AM="(?:"+vM+"|"+gM+")",EM="(?:['’](?:d|ll|m|re|s|t|ve))?",SM="(?:['’](?:D|LL|M|RE|S|T|VE))?",wM="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",xM="[\\ufe0e\\ufe0f]?",MM=xM+wM+("(?:\\u200d(?:"+["[^"+sM+"]",yM,_M].join("|")+")"+xM+wM+")*"),TM="(?:"+[hM,yM,_M].join("|")+")"+MM,OM=RegExp([vM+"?"+mM+"+"+EM+"(?="+[fM,vM,"$"].join("|")+")",AM+"+"+SM+"(?="+[fM,vM+bM,"$"].join("|")+")",vM+"?"+bM+"+"+EM,vM+"+"+SM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pM,TM].join("|"),"g");var NM=function(e){return e.match(OM)||[]},CM=iM,DM=oM,LM=wh,IM=NM;var kM=function(e,t,n){return e=LM(e),void 0===(t=n?void 0:t)?DM(e)?IM(e):CM(e):e.match(t)||[]},$M=Kx,RM=nM,zM=kM,FM=RegExp("['’]","g");var PM=function(e){return function(t){return $M(zM(RM(t).replace(FM,"")),e,"")}},ZM=PM((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),UM=ZM,BM=nm,jM=PM((function(e,t,n){return t=t.toLowerCase(),e+(n?BM(t):t)})),VM=jM,GM=Kr,HM=$S,YM=ix;var WM=function(e,t){var n={};return t=YM(t),HM(e,(function(e,r,i){GM(n,t(e,r,i),e)})),n},qM={exports:{}};function KM(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 JM(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 XM(e){return(t,n)=>JM(e,t)-JM(e,n)}function QM(){return QM=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},QM.apply(this,arguments)}qM.exports=function(e){return KM(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)},qM.exports.array=KM;let eT=e=>"[object Object]"===Object.prototype.toString.call(e);const tT=XM([]);class nT extends Dx{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=tT,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 eT(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=QM({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=i[e],o=SS(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(!NS.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!eT(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],QM({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r):r(null)}));CS({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=QM({},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 Dx&&t instanceof Dx&&(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=XM(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=_x.split(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(const t in e)if(SS(e,t)){let n=e[t];r.add(t),xx.isRef(n)&&n.isSibling?a(n.path,t):wS(n)&&"deps"in n&&n.deps.forEach((e=>a(e,t)))}return qM.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=_x.getter(e,!0);return this.transform((i=>{if(null==i)return i;let a=i;return SS(i,e)&&(a=QM({},i),n||delete a[e],a[t]=r(i)),a}))}noUnknown(e=!0,t=VE.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=VE.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>t&&WM(t,((t,n)=>e(n)))))}camelCase(){return this.transformKeys(VM)}snakeCase(){return this.transformKeys(UM)}constantCase(){return this.transformKeys((e=>UM(e).toUpperCase()))}describe(){let e=super.describe();return e.fields=ux(this.fields,(e=>e.describe())),e}}function rT(e){return new nT(e)}function iT(){return iT=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},iT.apply(this,arguments)}function aT(e){return new oT(e)}rT.prototype=nT.prototype;class oT extends Dx{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,iT({},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(!NS.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=iT({},t,{path:a,strict:!0,parent:r,index:e,originalValue:d[e]});i[e]=(e,t)=>u.validate(n,o,t)}CS({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(!wS(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+FE(e));return t.innerType=e,t}length(e,t=GE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return kx(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||GE.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return kx(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||GE.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return kx(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)}}aT.prototype=oT.prototype;class sT{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(!wS(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 uT(e,t,n){if(!e||!wS(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 cT=Object.freeze({__proto__:null,mixed:Ix,bool:$x,boolean:$x,string:Bx,number:Vx,date:Wx,object:rT,array:aT,ref:function(e,t){return new xx(e,t)},lazy:function(e){return new sT(e)},reach:(e,t,n,r)=>Ox(e,t,n,r).schema,isSchema:wS,addMethod:uT,setLocale:function(e){Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((n=>{HE[t][n]=e[t][n]}))}))},ValidationError:NS,BaseSchema:Dx,MixedSchema:Lx,BooleanSchema:Rx,StringSchema:jx,NumberSchema:Gx,DateSchema:qx,ObjectSchema:nT,ArraySchema:oT});const lT=C.button`
|
|
179
|
+
ap((function(e){Object.getOwnPropertyNames(uh.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatterBuilder.prototype[t]=uh.prototype[t])})),Object.getOwnPropertyNames(dh.prototype).forEach((function(t){"constructor"!==t&&(e.DateTimeFormatter.prototype[t]=dh.prototype[t])})),e.DateTimeFormatter.RFC_1123_DATE_TIME=dh.RFC_1123_DATE_TIME}));var ph=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},hh=Cn,mh=ai;var gh=function(e){return"symbol"==typeof e||mh(e)&&"[object Symbol]"==hh(e)},yh=ph,_h=hi,vh=gh,bh=vn?vn.prototype:void 0,Ah=bh?bh.toString:void 0;var Eh=function e(t){if("string"==typeof t)return t;if(_h(t))return yh(t,e)+"";if(vh(t))return Ah?Ah.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Sh=Eh;var wh=function(e){return null==e?"":Sh(e)};var xh=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},Mh=xh;var Th=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Mh(e,t,n)},Oh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Nh=function(e){return Oh.test(e)};var Ch=function(e){return e.split("")},Dh="\\ud800-\\udfff",Lh="["+Dh+"]",Ih="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kh="\\ud83c[\\udffb-\\udfff]",$h="[^"+Dh+"]",Rh="(?:\\ud83c[\\udde6-\\uddff]){2}",zh="[\\ud800-\\udbff][\\udc00-\\udfff]",Fh="(?:"+Ih+"|"+kh+")"+"?",Ph="[\\ufe0e\\ufe0f]?",Zh=Ph+Fh+("(?:\\u200d(?:"+[$h,Rh,zh].join("|")+")"+Ph+Fh+")*"),Uh="(?:"+[$h+Ih+"?",Ih,Rh,zh,Lh].join("|")+")",Bh=RegExp(kh+"(?="+kh+")|"+Uh+Zh,"g");var jh=function(e){return e.match(Bh)||[]},Vh=Ch,Gh=Nh,Hh=jh;var Yh=function(e){return Gh(e)?Hh(e):Vh(e)},Wh=Th,qh=Nh,Kh=Yh,Jh=wh;var Xh=function(e){return function(t){t=Jh(t);var n=qh(t)?Kh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Wh(n,1).join(""):t.slice(1);return r[e]()+i}},Qh=Xh("toUpperCase"),em=wh,tm=Qh;var nm=function(e){return tm(em(e).toLowerCase())};function rm(e){return new DataView(e.buffer,e.byteOffset)}const im={len:1,get:(e,t)=>rm(e).getUint8(t),put:(e,t,n)=>(rm(e).setUint8(t,n),t+1)},am={len:2,get:(e,t)=>rm(e).getUint16(t,!0),put:(e,t,n)=>(rm(e).setUint16(t,n,!0),t+2)},om={len:2,get:(e,t)=>rm(e).getUint16(t),put:(e,t,n)=>(rm(e).setUint16(t,n),t+2)},sm={len:4,get:(e,t)=>rm(e).getUint32(t,!0),put:(e,t,n)=>(rm(e).setUint32(t,n,!0),t+4)},um={len:4,get:(e,t)=>rm(e).getUint32(t),put:(e,t,n)=>(rm(e).setUint32(t,n),t+4)},cm={len:4,get:(e,t)=>rm(e).getInt32(t),put:(e,t,n)=>(rm(e).setInt32(t,n),t+4)},lm={len:8,get:(e,t)=>rm(e).getBigUint64(t,!0),put:(e,t,n)=>(rm(e).setBigUint64(t,n,!0),t+8)};class dm{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 fm extends Error{constructor(){super("End-Of-Stream")}}class pm{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 fm;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 hm extends pm{constructor(e){super(),this.reader=e.getReader({mode:"byob"})}async readFromStream(e,t,n){if(this.endOfStream)throw new fm;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 mm{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 fm;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 fm;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new fm;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new fm;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 gm extends mm{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 fm;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 fm)return 0;throw e}if(!n.mayBeLess&&r<n.length)throw new fm}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 ym extends mm{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 fm;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 _m(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 vm(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 bm={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},Am=4100;function Em(e,t,n){n={offset:0,...n};for(const[r,i]of t.entries())if(n.mask){if(i!==(n.mask[r]&e[r+n.offset]))return!1}else if(i!==e[r+n.offset])return!1;return!0}class Sm{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 ym(n,r)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await(n=e,r=this.tokenizerOptions,new gm(new hm(n),r));var n,r;try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:n=Am}=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 fm))throw e;r=void 0}i=e}finally{a.releaseLock()}const o=new TransformStream({async start(e){e.enqueue(i)},transform(e,t){t.enqueue(e)}}),s=e.pipeThrough(o);return s.fileType=r,s}check(e,t){return Em(this.buffer,e,t)}checkString(e,t){return this.check(function(e){return[...e].map((e=>e.charCodeAt(0)))}(e),t)}async parse(e){if(this.buffer=new Uint8Array(Am),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(bm);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 dm(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 dm(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=vm(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 fm))throw o}return{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);const s=new Uint8Array(8);return await e.readBuffer(s),Em(s,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:Em(s,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:Em(s,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:Em(s,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:Em(s,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:Em(s,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const u=new dm(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!==vm(e,t)}(l,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}catch(d){if(!(d instanceof fm))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(im);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:_m(r),len:_m(i)}}async function g(t){for(;t>0;){const n=await m();if(17026===n.id){return(await e.readToken(new dm(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 dm(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 dm(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(cm),type:await e.readToken(new dm(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(lm))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const E=await A();let S=E.size-24;if(Em(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),Em(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(Em(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 dm(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 dm(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?om:am);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?om:am);for(let n=0;n<t;++n){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?om:am).get(this.buffer,2),n=(e?um:sm).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 wm;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 Sm).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})}}(wm||(wm={}));const xm={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. ${nm(e)} exceeds the maximum size of ${t} KB.`,GENERIC:"Upload failed. Please try again.",FILE_TYPE:e=>`Upload failed. Only ${wm.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"," ",wm.extensionsToSentence(r)," file."]})},GENERIC_ERROR:{TITLE:`${nm(e)} not uploaded`,DESCRIPTION:e=>t(n,{children:["There was a problem uploading ",e,". Please try again."]})},MAX_FILE_SIZE:{TITLE:`${nm(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 Mm,Tm;!function(e){function t(e,t,n){if(e)try{const r=vf.ofPattern(t).withResolverStyle(yd.STRICT).withLocale(ch.ENGLISH);switch(n){case"date":return Ff.parse(e,r);case"time":return Uf.parse(e,r);case"datetime":return Zf.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")||Ff.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=vf.ofPattern(t).withResolverStyle(yd.STRICT).withLocale(ch.ENGLISH);switch(n){case"date":return Ff.parse(e).format(i);case"time":return Uf.parse(e).format(i);case"datetime":return Zf.parse(e).format(i);default:return r||xm.GENERIC.INVALID}}catch(e){return r||xm.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")||Ff.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")||Ff.now();return a>=0?i.isAfter(s.plusDays(a)):i.isBefore(s.plusDays(a))}}(Mm||(Mm={})),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"}}(Tm||(Tm={}));const Om=()=>Array(5).fill(0).map((()=>Math.random().toString(36).slice(2))).join("");class Nm{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 Cm(e,t,n){try{return new DataView(e,t,n)}catch(r){return new Nm(e,t,n)}}function Dm(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return $m(r)}function Lm(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 $m(n)}function Im(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(),$m(r)}function km(e,t){const n=e.getUint8(t);return[n,Dm(e,t+1,n)]}function $m(e){return e.map((e=>String.fromCharCode(e))).join("")}function Rm(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function zm(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 Fm(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 Pm(e,t){return new Array(t+1).join(e)}const Zm=void 0;function Um(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 Bm=!0,jm=!0;function Vm(e){return e.map((e=>String.fromCharCode(e))).join("")}function Gm(e){if(e.length>=8){const t=Vm(e.slice(0,8));if("ASCII\0\0\0"===t)return Vm(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 Hm(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const Ym=18761,Wm=19789;var qm={BIG_ENDIAN:Wm,LITTLE_ENDIAN:Ym,getByteOrder:function(e,t){if(e.getUint16(t)===Ym)return Ym;if(e.getUint16(t)===Wm)return Wm;throw new Error("Illegal byte order value. Faulty image.")}};var Km={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===qm.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};var Jm={isJpegFile:function(e){return!!e&&e.byteLength>=Xm&&e.getUint16(0)===Qm},findJpegOffsets:function(e){let t,n,r,i,a,o,s,u,c,l=eg;for(;l+tg+5<=e.byteLength;){if(Lg(e,l))t=e.getUint16(l+ng),n=l+ng;else if(Ig(e,l))t=e.getUint16(l+ng),r=l+ng;else if(Rg(e,l))t=e.getUint16(l+ng),i=l+rg;else if(zg(e,l))t=e.getUint16(l+ng),a=l+ig;else if(Fg(e,l))s||(s=[]),t=e.getUint16(l+ng),s.push(Zg(l,t));else if(Pg(e,l))s||(s=[]),t=e.getUint16(l+ng),s.push(Ug(l,t));else if(Bg(e,l))t=e.getUint16(l+ng),o=l+ag;else if(kg(e,l)){t=e.getUint16(l+ng);const n=l+ug,r=t-(ug-ng),i=e.getUint8(l+dg),a=e.getUint8(l+fg);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:a})}else if($g(e,l))t=e.getUint16(l+ng),c=l+cg;else{if(!jg(e,l)){if(Vg(e,l)){l++;continue}break}t=e.getUint16(l+ng)}l+=ng+t}return{hasAppMarkers:l>eg,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:a,iptcDataOffset:o,xmpChunks:s,iccChunks:u,mpfDataOffset:c}}};const Xm=2,Qm=65496,eg=2,tg=4,ng=2,rg=2,ig=10,ag=18,og=33,sg=79,ug=18,cg=8,lg="ICC_PROFILE\0",dg=tg+lg.length,fg=dg+1,pg="MPF\0",hg=65472,mg=65474,gg=65476,yg=65499,_g=65501,vg=65498,bg=65504,Ag=65505,Eg=65506,Sg=65517,wg=65519,xg=65534,Mg=65535,Tg="JFIF",Og="Exif",Ng="http://ns.adobe.com/xap/1.0/\0",Cg="http://ns.adobe.com/xmp/extension/\0",Dg="Photoshop 3.0";function Lg(e,t){return e.getUint16(t)===hg}function Ig(e,t){return e.getUint16(t)===mg}function kg(e,t){const n=lg.length;return e.getUint16(t)===Eg&&Dm(e,t+tg,n)===lg}function $g(e,t){const n=pg.length;return e.getUint16(t)===Eg&&Dm(e,t+tg,n)===pg}function Rg(e,t){const n=Tg.length;return e.getUint16(t)===bg&&Dm(e,t+tg,n)===Tg&&0===e.getUint8(t+tg+n)}function zg(e,t){const n=Og.length;return e.getUint16(t)===Ag&&Dm(e,t+tg,n)===Og&&0===e.getUint8(t+tg+n)}function Fg(e,t){return e.getUint16(t)===Ag&&function(e,t){const n=Ng.length;return Dm(e,t+tg,n)===Ng}(e,t)}function Pg(e,t){return e.getUint16(t)===Ag&&function(e,t){const n=Cg.length;return Dm(e,t+tg,n)===Cg}(e,t)}function Zg(e,t){return{dataOffset:e+og,length:t-(og-ng)}}function Ug(e,t){return{dataOffset:e+sg,length:t-(sg-ng)}}function Bg(e,t){const n=Dg.length;return e.getUint16(t)===Sg&&Dm(e,t+tg,n)===Dg&&0===e.getUint8(t+tg+n)}function jg(e,t){const n=e.getUint16(t);return n>=bg&&n<=wg||n===xg||n===hg||n===mg||n===gg||n===yg||n===_g||n===vg}function Vg(e,t){return e.getUint16(t)===Mg}var Gg={isPngFile:function(e){return!!e&&Dm(e,0,Hg.length)===Hg},findPngOffsets:function(e,t){const n={hasAppMarkers:!1};let r=Hg.length;for(;r+Yg+Wg<=e.byteLength;){if(oy(e,r))n.hasAppMarkers=!0,n.pngHeaderOffset=r+Jg;else if(sy(e,r)){const t=fy(e,r);void 0!==t&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:t,length:e.getUint32(r+qg)-(t-(r+Jg))}])}else if(uy(e,r,t)){n.hasAppMarkers=!0;const t=Dm(e,r+Kg,Wg);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+qg),type:t,offset:r+Jg})}else if(cy(e,r))n.hasAppMarkers=!0,n.tiffHeaderOffset=r+Jg;else if(t&&ly(e,r)){n.hasAppMarkers=!0;const t=e.getUint32(r+qg),i=r+Jg,{profileName:a,compressionMethod:o,compressedProfileOffset:s}=py(e,i);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:t-(s-i),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:o})}else dy(e,r)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+qg));r+=e.getUint32(r+qg)+Yg+Wg+4}return n}};const Hg="PNG\r\n\n",Yg=4,Wg=4,qg=0,Kg=Yg,Jg=Yg+Wg,Xg="XML:com.adobe.xmp\0",Qg="tEXt",ey="iTXt",ty="zTXt",ny="pHYs",ry="tIME",iy="eXIf",ay="iCCP";function oy(e,t){return"IHDR"===Dm(e,t+Kg,Wg)}function sy(e,t){return Dm(e,t+Kg,Wg)===ey&&Dm(e,t+Jg,Xg.length)===Xg}function uy(e,t,n){const r=Dm(e,t+Kg,Wg);return r===Qg||r===ey||r===ty&&n}function cy(e,t){return Dm(e,t+Kg,Wg)===iy}function ly(e,t){return Dm(e,t+Kg,Wg)===ay}function dy(e,t){const n=[ny,ry],r=Dm(e,t+Kg,Wg);return n.includes(r)}function fy(e,t){t+=Jg+Xg.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function py(e,t){const n=Lm(e,t);t+=n.length+1;return{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function hy(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:my(e,t,i,a,o,s,c,l),length:r}}function my(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=gy(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=_y(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=yy(e,t,c,o),c+=r.item.extent.extentIndex,s.extentOffset=_y(e,c,i),c+=r.item.extent.extentOffset,s.extentLength=_y(e,c,a),c+=r.item.extent.extentLength,n.extents.push(s)}u.push(n)}return u}function gy(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function yy(e,t,n,r){if((1===t||2===t)&&r>0)return _y(e,n,r)}function _y(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 vy=1165519206,by=1835625829,Ay=1970432288;function Ey(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=Dm(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:My(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1768973167===i)return function(e,t,n,r){return{type:"ipco",properties:My(e,n,r-(n-t)),length:r}}(e,t,r,n);if(1668246642===i)return function(e,t,n){return{type:"colr",icc:xy(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:My(e,n+i,r-(n+i-t)),length:r}}(e,t,r+1,n):1768714083===i?hy(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:My(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=Lm(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=Lm(e,r),r+=a.itemName.length+1,a.itemType===by?(a.contentType=Lm(e,r),t+i>(r+=a.contentType.length+1)&&(a.contentEncoding=Lm(e,r),r+=a.contentEncoding.length+1)):a.itemType===Ay&&(a.itemUri=Lm(e,r),r+=a.itemUri.length+1));return a}(e,t,a,r+1,n):{type:void 0,length:n}}function Sy(e){{const t={},n=function(e){const t=4,n=4;let r=0;for(;r+t+n<=e.byteLength;){const t=Ey(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===vy))}(t).itemId,r=wy(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===by&&"application/rdf+xml"===e.contentType))}(e).itemId,n=wy(e,t),r=wy(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 wy(e,t){return e.subBoxes.find((e=>"iloc"===e.type)).items.find((e=>e.itemId===t))}function xy(e,t){const n=Dm(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function My(e,t,n){const r=[vy,by],i=[];let a=t;for(;a<t+n;){const t=Ey(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 Ty={isHeicFile:function(e){if(!e)return!1;const t=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Ey(e,0);return n&&-1!==t.indexOf(n.majorBrand)}catch(e){return!1}},findHeicOffsets:function(e){return Sy(e)}};var Oy={isAvifFile:function(e){if(!e)return!1;try{const t=Ey(e,0);return t&&"avif"===t.majorBrand}catch(e){return!1}},findAvifOffsets:function(e){return Sy(e)}};var Ny={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&Dm(e,0,4)===t&&Dm(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=Dm(e,o,4),c=e.getUint32(o+4,!0);"EXIF"===u?(s=!0,n=Dm(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 Cy={isGifFile:function(e){return!!e&&Ly.includes(Dm(e,0,Dy))},findOffsets:function(){return{gifHeaderOffset:0}}};const Dy=6,Ly=["GIF87a","GIF89a"];var Iy={isXMLFile:function(e){return!!e&&Dm(e,ky,$y.length)===$y},findOffsets:function(e){const t=[];return t.push({dataOffset:ky,length:e.byteLength}),{xmpChunks:t}}};const ky=0,$y="<?xpacket begin";var Ry={parseAppMarkers:function(e,t){if(Km.isTiffFile(e))return zy(Km.findTiffOffsets(),"tiff","TIFF");if(Jm.isJpegFile(e))return zy(Jm.findJpegOffsets(e),"jpeg","JPEG");if(Gg.isPngFile(e))return zy(Gg.findPngOffsets(e,t),"png","PNG");if(Ty.isHeicFile(e))return zy(Ty.findHeicOffsets(e),"heic","HEIC");if(Oy.isAvifFile(e))return zy(Oy.findAvifOffsets(e),"avif","AVIF");if(Ny.isWebpFile(e))return zy(Ny.findOffsets(e),"webp","WebP");if(Cy.isGifFile(e))return zy(Cy.findOffsets(e),"gif","GIF");if(Iy.isXMLFile(e))return zy(Iy.findOffsets(e),"xml","XML");throw new Error("Invalid image format")}};function zy(e,t,n){return Rm({},e,{fileType:{value:t,description:n}})}var Fy={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])},Py={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:Fy.XResolution},283:{name:"YResolution",description:Fy.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:Fy.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:Zy},40092:{name:"XPComment",description:Zy},40093:{name:"XPAuthor",description:Zy},40094:{name:"XPKeywords",description:Zy},40095:{name:"XPSubject",description:Zy},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:Fy.LightSource},50779:{name:"CalibrationIlluminant2",description:Fy.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 Zy(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}var Uy={33434:{name:"ExposureTime",description:Fy.ExposureTime},33437:{name:"FNumber",description:Fy.FNumber},34850:{name:"ExposureProgram",description:Fy.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=>Vm(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Fy.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Fy.ShutterSpeedValue},37378:{name:"ApertureValue",description:Fy.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:Fy.MeteringMode},37384:{name:"LightSource",description:Fy.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:Fy.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:Gm},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:Fy.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:Fy.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:Fy.CustomRendered},41986:{name:"ExposureMode",description:Fy.ExposureMode},41987:{name:"WhiteBalance",description:Fy.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:Fy.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:Fy.Contrast},41993:{name:"Saturation",description:Fy.Saturation},41994:{name:"Sharpness",description:Fy.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"},By={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:Hm},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Hm},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:Gm},28:{name:"GPSAreaInformation",description:Gm},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},jy={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>Vm(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Vy={45056:{name:"MPFVersion",description:e=>Vm(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};const Gy=Rm({},Py,Uy),Hy="0th",Yy="1st",Wy="exif",qy="gps",Ky="interoperability",Jy="mpf",Xy="canon";var Qy={[Hy]:Gy,[Yy]:Py,[Wy]:Gy,[qy]:By,[Ky]:jy,[Jy]:Vy,[Xy]:{4:{name:"ShotInfo",description:e=>e}}};const e_={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},t_={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13};var n_={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:r_,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===qm.LITTLE_ENDIAN)},getLongAt:i_,getRationalAt:function(e,t,n){return[i_(e,t,n),i_(e,t+4,n)]},getUndefinedAt:function(e,t){return r_(e,t)},getSlongAt:a_,getSrationalAt:function(e,t,n){return[a_(e,t,n),a_(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return i_(e,t,n)},typeSizes:e_,tagTypes:t_,getTypeSize:function(e){if(void 0===t_[e])throw new Error("No such type found.");return e_[t_[e]]}};function r_(e,t){return e.getUint8(t)}function i_(e,t,n){return e.getUint32(t,n===qm.LITTLE_ENDIAN)}function a_(e,t,n){return e.getInt32(t,n===qm.LITTLE_ENDIAN)}const o_={1:n_.getByteAt,2:n_.getAsciiAt,3:n_.getShortAt,4:n_.getLongAt,5:n_.getRationalAt,7:n_.getUndefinedAt,9:n_.getSlongAt,10:n_.getSrationalAt,13:n_.getIfdPointerAt};function s_(e,t,n){return t+n_.getLongAt(e,t+4,n)}function u_(e,t,n,r,i,a){const o=n_.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+n_.getTypeSize("SHORT")<=e.byteLength)return n_.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(let o=0;o<u&&!(r+12>e.byteLength);o++){const o=c_(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-n_.getTypeSize("LONG")){const o=n_.getLongAt(e,r,i);0!==o&&t===Hy&&(s.Thumbnail=u_(e,"1st",n,n+o,i,a))}return s}function c_(e,t,n,r,i,a){const o=n_.getTypeSize("SHORT"),s=o+n_.getTypeSize("SHORT"),u=s+n_.getTypeSize("LONG"),c=n_.getShortAt(e,r,i),l=n_.getShortAt(e,r+o,i),d=n_.getLongAt(e,r+s,i);let f,p;if(void 0===n_.typeSizes[l]||!a&&void 0===Qy[t][c])return;if(function(e,t){return n_.typeSizes[e]*t<=n_.getTypeSize("LONG")}(l,d))p=r+u,f=l_(e,p,l,d,i);else if(p=n_.getLongAt(e,r+u,i),function(e,t,n,r,i){return t+n+n_.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)){f=l_(e,n+p,l,d,i,33723===c)}else f="<faulty value>";l===n_.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=d_(f)}}else l===n_.tagTypes.RATIONAL||l===n_.tagTypes.SRATIONAL?(h=Qy[t][c],m=""+f[0]/f[1]):(h=Qy[t][c],m=d_(f));return{id:c,name:h,value:f,description:m,__offset:p}}function l_(e,t,n,r,i,a=!1){let o=[];a&&(r*=n_.typeSizes[n],n=n_.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(o_[n](e,t,i)),t+=n_.typeSizes[n];return n===n_.tagTypes.ASCII?o=n_.getAsciiValue(o):1===o.length&&(o=o[0]),o}function d_(e){return e instanceof Array?e.join(", "):e}const f_="Exif IFD Pointer",p_="GPS Info IFD Pointer",h_="Interoperability IFD Pointer";var m_={read:function(e,t,n){const r=qm.getByteOrder(e,t);let i=function(e,t,n,r){return u_(e,Hy,t,s_(e,t,n),n,r)}(e,t,r,n);return i=g_(i,e,t,r,n),i=y_(i,e,t,r,n),i=__(i,e,t,r,n),{tags:i,byteOrder:r}}};function g_(e,t,n,r,i){return void 0!==e[f_]?Rm(e,u_(t,Wy,n,n+e[f_].value,r,i)):e}function y_(e,t,n,r,i){return void 0!==e[p_]?Rm(e,u_(t,"gps",n,n+e[p_].value,r,i)):e}function __(e,t,n,r,i){return void 0!==e[h_]?Rm(e,u_(t,Ky,n,n+e[h_].value,r,i)):e}var v_={read:function(e,t,n){const r=qm.getByteOrder(e,t),i=u_(e,"mpf",t,s_(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/b_);a++){i[a]={};const o=A_(n.MPEntry.value,a*b_,n_.getTypeSize("LONG"),r);i[a].ImageFlags=E_(o),i[a].ImageFormat=S_(o),i[a].ImageType=w_(o);const s=A_(n.MPEntry.value,a*b_+4,n_.getTypeSize("LONG"),r);i[a].ImageSize={value:s,description:""+s};const u=x_(a,n.MPEntry,r,t);i[a].ImageOffset={value:u,description:""+u};const c=A_(n.MPEntry.value,a*b_+12,n_.getTypeSize("SHORT"),r);i[a].DependentImage1EntryNumber={value:c,description:""+c};const l=A_(n.MPEntry.value,a*b_+14,n_.getTypeSize("SHORT"),r);i[a].DependentImage2EntryNumber={value:l,description:""+l},i[a].image=e.buffer.slice(u,u+s),zm(i[a],"base64",(function(){return Fm(this.image)}))}return n.Images=i,n}(e,t,i,r)}};const b_=16;function A_(e,t,n,r){if(r===qm.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_(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 S_(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function w_(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 x_(e,t,n,r){return function(e){return 0===e}(e)?0:A_(t.value,e*b_+8,n_.getTypeSize("LONG"),n)+r}var M_={read:function(e,t){const n=function(e,t){return n_.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=n_.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":T_(e,t,n),"Image Height":O_(e,t,n),"Image Width":N_(e,t,n),"Color Components":r,Subsampling:r&&C_(e,t,r.value,n)}}};function T_(e,t,n){if(3>n)return;const r=n_.getByteAt(e,t+2);return{value:r,description:""+r}}function O_(e,t,n){if(5>n)return;const r=n_.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function N_(e,t,n){if(7>n)return;const r=n_.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function C_(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([n_.getByteAt(e,n),n_.getByteAt(e,n+1),n_.getByteAt(e,n+2)])}return{value:i,description:i.length>1?D_(i)+L_(i):""}}function D_(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function L_(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 I_={read:function(e,t){const n=function(e,t){return n_.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=n_.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=n_.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),a={"JFIF Version":k_(e,t,n),"Resolution Unit":$_(e,t,n),XResolution:z_(e,t,n),YResolution:F_(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 k_(e,t,n){if(9>n)return;const r=n_.getByteAt(e,t+7),i=n_.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function $_(e,t,n){if(10>n)return;const r=n_.getByteAt(e,t+9);return{value:r,description:R_(r)}}function R_(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function z_(e,t,n){if(12>n)return;const r=n_.getShortAt(e,t+10);return{value:r,description:""+r}}function F_(e,t,n){if(14>n)return;const r=n_.getShortAt(e,t+12);return{value:r,description:""+r}}var P_={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:Z_},336:{name:"Time Sent",description:U_},346:{name:"Coded Character Set",description:B_,encoding_name:B_},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"===Vm(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=Vm(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=Vm(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:Z_},572:{name:"Time Created",description:U_},574:{name:"Digital Creation Date",description:Z_},575:{name:"Digital Creation Time",description:U_},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=Vm(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=Vm(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=Vm(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(Vm(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(Vm(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=Vm(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 Vm(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=Vm(e);if(t["ObjectData Preview File Format"]){const e=Vm(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 Z_(e){const t=Vm(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function U_(e){const t=Vm(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 B_(e){const t=Vm(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 j_={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var V_={decode:function(e,t){const n=j_.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 G_={read:function(e,t,n){try{if(Array.isArray(e))return q_(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=H_(e,t);if(Y_(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+W_(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return q_(e,r,i,n)}catch(e){return{}}}};function H_(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 Y_(e){return 1028===e.type}function W_(e){return e.size%2!=0?1:0}function q_(e,t,n,r){const i={};let a;const o=n+t.size;for(;n<o&&n<e.byteLength;){const{tag:t,tagSize:o}=K_(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 K_(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&&!P_.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:J_(P_.iptc[a],a,s),value:s,description:X_(P_.iptc[a],s,n,r)};return function(e){return P_.iptc[e]&&P_.iptc[e].repeatable}(a)&&(u.repeatable=!0),function(e){return P_.iptc[e]&&void 0!==P_.iptc[e].encoding_name}(a)&&(u.encoding=P_.iptc[a].encoding_name(s)),{tag:u,tagSize:o}}function J_(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 X_(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)?V_.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=>Fy.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>ev(Fy.XResolution,e),"tiff:YResolution":e=>ev(Fy.YResolution,e),"exif:ApertureValue":e=>ev(Fy.ApertureValue,e),"exif:GPSLatitude":nv,"exif:GPSLongitude":nv,"exif:FNumber":e=>ev(Fy.FNumber,e),"exif:FocalLength":e=>ev(Fy.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>Fy.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>Fy.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 Fy.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>Fy.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>Fy.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>Fy.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>Fy.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>tv(e)?Fy.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>Fy.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>Fy.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>Fy.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>Fy.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>ev(Fy.ShutterSpeedValue,e),"exif:WhiteBalance":e=>Fy.WhiteBalance(parseInt(e,10))};function ev(e,t){return tv(t)?e(t.split("/")):t}function tv(e){return/^-?\d+\/-?\d+$/.test(e)}function nv(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 rv={get:function(e){if(e)return e;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}}};function iv(e){const t=e.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!t)return e;const n=t[1],r=function(e){const t=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let r;for(;null!==(r=n.exec(e));)-1===t.indexOf(r[1])&&t.push(r[1]);return t}(e),i=function(e){const t=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let r;for(;null!==(r=n.exec(e));){const e=r[1];"xmlns"!==e&&"xml"!==e&&(-1===t.indexOf(e)&&t.push(e))}return t}(e),a=i.filter((e=>-1===r.indexOf(e)));if(0===a.length)return e;const o=function(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=av[r]||"http://fallback.namespace/"+r;t.push(" xmlns:"+r+'="'+i+'"')}return t.join("")}(a);return function(e,t,n){const r=new RegExp("<"+t+"([^>]*)>");return e.replace(r,"<"+t+"$1"+n+">")}(e,n,o)}const av={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};var ov={read:function(e,t,n){const r={};if("string"==typeof e)return cv(r,e,n),r;const[i,a]=function(e,t){if(0===t.length)return[];const n=[uv(e,t.slice(0,1))];t.length>1&&n.push(uv(e,t.slice(1)));return n}(e,t),o=cv(r,i,n);if(a){const i=cv(r,a,n);o||i||(delete r._raw,cv(r,uv(e,t),n))}return r}};class sv extends Error{constructor(e){super(e),this.name="ParseError"}}function uv(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 cv(e,t,n){try{const{doc:r,raw:i}=function(e,t){const n=rv.get(t);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const r="string"==typeof e?e:Dm(e,0,e.byteLength),i=lv(n,(a=r,a.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")));var a;return{doc:i,raw:r}}(t,n);e._raw=(e._raw||"")+i;return Rm(e,hv(fv(dv(r),!0))),!0}catch(e){return!1}}function lv(e,t,n=!1){try{const n=e.parseFromString(t,"application/xml"),r=n.getElementsByTagName("parsererror");if(r.length>0)throw new sv(r[0].textContent);return n}catch(r){if("ParseError"===r.name&&function(e){const t=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<t.length;n++)if(new RegExp(t[n]).test(e.message))return!0;return!1}(r)&&!n)return lv(e,iv(t),!0);throw r}}function dv(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return dv(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function fv(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:pv(e),value:fv(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 pv(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 hv(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=>{Rm(t,mv(e.attributes)),"object"==typeof e.value&&Rm(t,Av(e.value))}))}return t}function mv(e){const t={};for(const n in e)try{gv(n)&&(t[_v(n)]={value:e[n],attributes:{},description:vv(e[n],n)})}catch(e){}return t}function gv(e){return"rdf:parseType"!==e&&!yv(e)}function yv(e){return"xmlns"===e.split(":")[0]}function _v(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function vv(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?vv(e.value):vv(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(`${bv(n)}: ${vv(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 bv(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 Av(e){const t={};for(const n in e)try{yv(n)||(t[_v(n)]=Ev(e[n],n))}catch(e){}return t}function Ev(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Dv(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:""}:Sv(e)?wv(e,t):Mv(e)?Tv(e,t):Ov(e)?Nv(e,t):function(e){return void 0!==Cv(e.value)}(e)?function(e,t){let n=Cv(e.value).value["rdf:li"];const r=xv(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(Sv(e))return wv(e);if(Mv(e))return Tv(e).value;if(Ov(e))return Nv(e).value;return Dv(e)}(e))})),{value:i,attributes:r,description:vv(i,t)}}(e,t):Dv(e,t)}function Sv(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 wv(e,t){const n=xv(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),Rm(n,xv(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||yv(n)||(t[_v(n)]=e.value[n].value);return t}(e));const r=function(e){return Lv(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:vv(r,t)}}function xv(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||yv(n)||(t[_v(n)]=e.attributes[n]);return t}function Mv(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Tv(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(Rm(n.value,mv(e.value["rdf:Description"].attributes)),Rm(n.attributes,xv(e)),e=e.value["rdf:Description"]),Rm(n.value,Av(e.value)),n.description=vv(n.value,t),n}function Ov(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function Nv(e,t){const n=mv(e.attributes);return{value:n,attributes:{},description:vv(n,t)}}function Cv(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Dv(e,t){const n=Lv(e)||hv(e.value);return{value:n,attributes:xv(e),description:vv(n,t)}}function Lv(e){return e.attributes&&e.attributes["rdf:resource"]}const Iv=0,kv=1,$v=2,Rv=3,zv=4,Fv=5,Pv=6,Zv=7,Uv=8;var Bv={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=n_.getShortAt(e,r);jv[i]&&(t[i]||(t[i]=jv[i].description),n.push({type:i,path:jv[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description(e){const[,t]=km(e,0);return t}}};const jv={[Iv]:{description:"Closed subpath length",path:(e,t)=>[n_.getShortAt(e,t)]},[kv]:{description:"Closed subpath Bezier knot, linked",path:Vv},[$v]:{description:"Closed subpath Bezier knot, unlinked",path:Vv},[Rv]:{description:"Open subpath length",path:(e,t)=>[n_.getShortAt(e,t)]},[zv]:{description:"Open subpath Bezier knot, linked",path:Vv},[Fv]:{description:"Open subpath Bezier knot, unlinked",path:Vv},[Pv]:{description:"Path fill rule",path:()=>[]},[Uv]:{description:"Initial fill rule",path:(e,t)=>[n_.getShortAt(e,t)]},[Zv]:{description:"Clipboard",path:function(e,t){return[[Hv(e,t,8),Hv(e,t+4,8),Hv(e,t+8,8),Hv(e,t+12,8)],Hv(e,t+16,8)]}}};function Vv(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(Gv(e,t+r));return n}function Gv(e,t){const n=Hv(e,t,8);return[Hv(e,t+4,8),n]}function Hv(e,t,n){const r=n_.getLongAt(e,t),i=r>>>31==0?1:-1,a=(2130706432&r)>>>32-n,o=r&parseInt(Pm("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 Pm(n,t-e.length)+e}(o.toString(2),32-n,"0"),2)}var Yv={read:function(e,t){const n=Cm(new Uint8Array(e).buffer),r={};let i=0;for(;i<e.length;){const e=Dm(n,i,Jv);i+=Jv;const a=n_.getShortAt(n,i);i+=qv;const{tagName:o,tagNameSize:s}=Xv(n,i);i+=s;const u=n_.getLongAt(n,i);if(i+=Kv,e===Wv){const e=Cm(n.buffer,i,u),s={id:a,value:Dm(e,0,u)};if(Bv[a]){try{s.description=Bv[a].description(e)}catch(e){s.description="<no description formatter>"}r[o||Bv[a].name]=s}else t&&(r[`undefined-${a}`]=s)}i+=u+u%2}return r}};const Wv="8BIM",qv=2,Kv=4,Jv=Wv.length;function Xv(e,t){const[n,r]=km(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const Qv={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"}},eb={4:{name:"Preferred CMM type",value:(e,t)=>Dm(e,t,4),description:e=>null!==e?tb(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)=>Dm(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)=>Dm(e,t,4)},20:{name:"Connection Space",value:(e,t)=>Dm(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)=>Dm(e,t,4),description:e=>tb(e)},48:{name:"Device Manufacturer",value:(e,t)=>Dm(e,t,4),description:e=>tb(e)},52:{name:"Device Model Number",value:(e,t)=>Dm(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)=>Dm(e,t,4)}};function tb(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 nb={read:function(e,t,n){if(n&&t[0].compressionMethod!==Zm)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 Um(r,t[0].compressionMethod,"utf-8","dataview").then(fb).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 fb(new DataView(r.buffer))}catch(e){return{}}}(e,t)}};const rb=84,ib=128,ab="acsp",ob="desc",sb="mluc",ub="text",cb="sig ",lb=12;function db(e,t){return e.length<t+lb}function fb(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<rb)throw new Error("ICC profile too short");const r={},i=Object.keys(eb);for(let t=0;t<i.length;t++){const n=i[t],a=eb[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(pb(t.slice(36,40))!==ab)throw new Error("ICC profile: missing signature");if(function(e){return e.length<ib+4}(t))return r;const a=e.getUint32(128);let o=132;for(let n=0;n<a;n++){if(db(t,o))return r;const n=Dm(e,o,4),i=e.getUint32(o+4),a=e.getUint32(o+8);if(i>t.length)return r;const s=Dm(e,i,4);if(s===ob){const o=e.getUint32(i+8);if(o>a)return r;hb(r,n,pb(t.slice(i+12,i+o+11)))}else if(s===sb){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=Dm(e,o+0,2),n=Dm(e,o+2,2),r=e.getUint32(o+4),u=e.getUint32(o+8),c=Im(e,i+u,r);s.push({languageCode:t,countryCode:n,text:c}),o+=a}if(1===t)hb(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;hb(r,n,e)}}else if(s===ub){hb(r,n,pb(t.slice(i+8,i+a-7)))}else if(s===cb){hb(r,n,pb(t.slice(i+8,i+12)))}o+=12}return r}function pb(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function hb(e,t,n){Qv[t]?e[Qv[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const mb=27;var gb={read:function(e,t,n,r,i){let a=u_(e,Xy,t,t+n,r,i);a.ShotInfo&&(a=Rm({},a,function(e){const t={};void 0!==e[27]&&(t.AutoRotate={value:e[27],description:yb(e[27])});return t}(a.ShotInfo.value)),delete a.ShotInfo);return a},SHOT_INFO_AUTO_ROTATE:mb};function yb(e){return 0===e?"None":1===e?"Rotate 90 CW":2===e?"Rotate 180":3===e?"Rotate 270 CW":"Unknown"}var _b={read:function(e,t){return{"Image Width":vb(e,t),"Image Height":bb(e,t),"Bit Depth":Ab(e,t),"Color Type":Eb(e,t),Compression:Sb(e,t),Filter:wb(e,t),Interlace:xb(e,t)}}};function vb(e,t){if(t+0+4>e.byteLength)return;const n=n_.getLongAt(e,t);return{value:n,description:`${n}px`}}function bb(e,t){if(t+4+4>e.byteLength)return;const n=n_.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function Ab(e,t){if(t+8+1>e.byteLength)return;const n=n_.getByteAt(e,t+8);return{value:n,description:`${n}`}}function Eb(e,t){if(t+9+1>e.byteLength)return;const n=n_.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 Sb(e,t){if(t+10+1>e.byteLength)return;const n=n_.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function wb(e,t){if(t+11+1>e.byteLength)return;const n=n_.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function xb(e,t){if(t+12+1>e.byteLength)return;const n=n_.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}var Mb={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=$b(e,s,u,c,n);if(l instanceof Promise)a.push(l.then((({name:e,value:t,description:n})=>{try{if(Bm&&Ub(e,t))return{__exif:m_.read(jb(t),kb,r).tags};if(jm&&Bb(e,t))return{__iptc:G_.read(jb(t),0,r)};if(e&&!Ub(e,t)&&!Bb(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 Tb="STATE_KEYWORD",Ob="STATE_COMPRESSION",Nb="STATE_LANG",Cb="STATE_TRANSLATED_KEYWORD",Db="STATE_TEXT",Lb=1,Ib=1,kb=6;function $b(e,t,n,r,i){const a=[],o=[];let s,u=Tb,c=Zm;for(let i=0;i<n&&t+i<e.byteLength;i++){if(u===Ob){c=Rb({type:r,dataView:e,offset:t+i}),r===ey&&(i+=Lb),u=zb(r,u);continue}if(u===Db){s=new DataView(e.buffer.slice(t+i,t+n));break}const l=e.getUint8(t+i);0===l?u=zb(r,u):u===Tb?a.push(l):u===Nb&&o.push(l)}if(c!==Zm&&!i)return{};const l=Um(s,c,function(e){if(e===Qg||e===ty)return"latin1";return"utf-8"}(r));return l instanceof Promise?l.then((e=>Fb(e,r,o,a))).catch((()=>Fb("<text using unknown compression>".split(""),r,o,a))):Fb(l,r,o,a)}function Rb({type:e,dataView:t,offset:n}){if(e===ey){if(t.getUint8(n)===Ib)return t.getUint8(n+1)}else if(e===ty)return t.getUint8(n);return Zm}function zb(e,t){return t===Tb&&[ey,ty].includes(e)?Ob:t===Ob?e===ey?Nb:Db:t===Nb?Cb:Db}function Fb(e,t,n,r){const i=function(e){if(e instanceof DataView)return Dm(e,0,e.byteLength);return e}(e);return{name:Pb(t,n,r),value:i,description:t===ey?Zb(e):i}}function Pb(e,t,n){const r=$m(n);if(e===Qg||0===t.length)return r;return`${r} (${$m(t)})`}function Zb(e){return V_.decode("UTF-8",e)}function Ub(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function Bb(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function jb(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 Vb={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=n_.getLongAt(e,t[r]+qg),a=Dm(e,t[r]+Kg,Wg);a===ny?(n["Pixels Per Unit X"]=Gb(e,t[r],i),n["Pixels Per Unit Y"]=Hb(e,t[r],i),n["Pixel Units"]=Yb(e,t[r],i)):a===ry&&(n["Modify Date"]=Wb(e,t[r],i))}return n}};function Gb(e,t,n){if(!qb(e,t,n,0,4))return;const r=n_.getLongAt(e,t+Jg+0);return{value:r,description:""+r}}function Hb(e,t,n){if(!qb(e,t,n,4,4))return;const r=n_.getLongAt(e,t+Jg+4);return{value:r,description:""+r}}function Yb(e,t,n){if(!qb(e,t,n,8,1))return;const r=n_.getByteAt(e,t+Jg+8);return{value:r,description:1===r?"meters":"Unknown"}}function Wb(e,t,n){if(!qb(e,t,n,0,7))return;const r=n_.getShortAt(e,t+Jg),i=n_.getByteAt(e,t+Jg+2),a=n_.getByteAt(e,t+Jg+3),o=n_.getByteAt(e,t+Jg+4),s=n_.getByteAt(e,t+Jg+5),u=n_.getByteAt(e,t+Jg+6);return{value:[r,i,a,o,s,u],description:`${Kb(r,4)}-${Kb(i,2)}-${Kb(a,2)} ${Kb(o,2)}:${Kb(s,2)}:${Kb(u,2)}`}}function qb(e,t,n,r,i){return r+i<=n&&t+Jg+r+i<=e.byteLength}function Kb(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}var Jb={read:function(e,t){const n={},r=n_.getByteAt(e,t);return n.Alpha=eA(r),n.Animation=tA(r),n.ImageWidth=nA(e,t+Xb),n.ImageHeight=nA(e,t+Qb),n}};const Xb=4,Qb=7;function eA(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function tA(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function nA(e,t){const n=n_.getByteAt(e,t)+256*n_.getByteAt(e,t+1)+65536*n_.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var rA={read:function(e){return{"GIF Version":iA(e),"Image Width":aA(e),"Image Height":oA(e),"Global Color Map":sA(e),"Bits Per Pixel":cA(e),"Color Resolution Depth":uA(e)}}};function iA(e){if(6>e.byteLength)return;const t=Dm(e,3,3);return{value:t,description:t}}function aA(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function oA(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function sA(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function uA(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function cA(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const lA=[6,7,99];var dA={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||lA.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),zm(t,"base64",(function(){return Fm(this.image)}))}var r;return t}};function fA(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}fA.prototype=new Error;var pA,hA,mA={MetadataMissingError:fA},gA={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=>yA(e,t)));if(function(e){return"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=>yA(e,t)));var n;return yA(e,t)},loadView:_A,errors:mA};function yA(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),_A(function(e){try{return new DataView(e)}catch(t){return new Nm(e)}}(e),t)}function _A(e,{expanded:t=!1,async:n=!1,includeUnknown:r=!1,domParser:i}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let a=!1,o={};const s=[],{fileType:u,fileDataOffset:c,jfifDataOffset:l,tiffHeaderOffset:d,iptcDataOffset:f,xmpChunks:p,iccChunks:h,mpfDataOffset:m,pngHeaderOffset:g,pngTextChunks:y,pngChunkOffsets:_,vp8xChunkOffset:v,gifHeaderOffset:b}=Ry.parseAppMarkers(e,n);if(function(e){return void 0!==e}(c)){a=!0;const n=M_.read(e,c);t?o.file=n:o=Rm({},o,n)}if(function(e){return void 0!==e}(l)){a=!0;const n=I_.read(e,l);t?o.jfif=n:o=Rm({},o,n)}if(function(e){return void 0!==e}(d)){a=!0;const{tags:n,byteOrder:s}=m_.read(e,d,r);if(n.Thumbnail&&(o.Thumbnail=n.Thumbnail,delete n.Thumbnail),t?(o.exif=n,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=Hm(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=Hm(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){}}}(o)):o=Rm({},o,n),n["IPTC-NAA"]&&!vA(f)){const e=G_.read(n["IPTC-NAA"].value,0,r);t?o.iptc=e:o=Rm({},o,e)}if(n.ApplicationNotes&&!bA(p)){const e=ov.read($m(n.ApplicationNotes.value),void 0,i);t?o.xmp=e:(delete e._raw,o=Rm({},o,e))}if(n.ImageSourceData){const e=Yv.read(n.PhotoshopSettings.value,r);t?o.photoshop=e:o=Rm({},o,e)}if(n.ICC_Profile&&!AA(h)){const e=nb.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?o.icc=e:o=Rm({},o,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=gb.read(e,d,n.MakerNote.__offset,s,r);t?o.makerNotes=i:o=Rm({},o,i)}n.MakerNote&&delete n.MakerNote.__offset}if(vA(f)){a=!0;const n=G_.read(e,f,r);t?o.iptc=n:o=Rm({},o,n)}if(bA(p)){a=!0;const n=ov.read(e,p,i);t?o.xmp=n:(delete n._raw,o=Rm({},o,n))}if(AA(h)){a=!0;const t=nb.read(e,h,n);t instanceof Promise?s.push(t.then(E)):E(t)}if(function(e){return void 0!==e}(m)){a=!0;const n=v_.read(e,m,r);t?o.mpf=n:o=Rm({},o,n)}if(void 0!==g){a=!0;const n=_b.read(e,g);t?(o.png=o.png?Rm({},o.png,n):n,o.pngFile=n):o=Rm({},o,n)}if(function(e){return void 0!==e}(y)){a=!0;const{readTags:t,readTagsPromise:i}=Mb.read(e,y,n,r);S(t),i&&s.push(i.then((e=>e.forEach(S))))}if(function(e){return void 0!==e}(_)){a=!0;const n=Vb.read(e,_);t?o.png=o.png?Rm({},o.png,n):n:o=Rm({},o,n)}if(function(e){return void 0!==e}(v)){a=!0;const n=Jb.read(e,v);t?o.riff=o.riff?Rm({},o.riff,n):n:o=Rm({},o,n)}if(function(e){return void 0!==e}(b)){a=!0;const n=rA.read(e,b);t?o.gif=o.gif?Rm({},o.gif,n):n:o=Rm({},o,n)}const A=dA.get(e,o.Thumbnail,d);if(A?(a=!0,o.Thumbnail=A):delete o.Thumbnail,u&&(t?(o.file||(o.file={}),o.file.FileType=u):o.FileType=u,a=!0),!a)throw new mA.MetadataMissingError;return n?Promise.all(s).then((()=>o)):o;function E(e){t?o.icc=e:o=Rm({},o,e)}function S(e){if(t){for(const t of["exif","iptc"]){const n=`__${t}`;e[n]&&(o[t]=o[t]?Rm({},o.exif,e[n]):e[n],delete e[n])}o.png=o.png?Rm({},o.png,e):e,o.pngText=o.pngText?Rm({},o.png,e):e}else o=Rm({},o,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e),delete o.__exif,delete o.__iptc}}function vA(e){return void 0!==e}function bA(e){return Array.isArray(e)&&e.length>0}function AA(e){return Array.isArray(e)&&e.length>0}!function(e){e.convertBlob=async(t,n="image/jpeg")=>{const r=(await wm.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 gA.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{}}}(pA||(pA={})),function(e){e.degreesToRadians=e=>Math.PI*e/180,e.radiansToDegrees=e=>180*e/Math.PI,e.nauticalMilesToMetres=e=>1852*e}(hA||(hA={}));var EA=Yi,SA=vo,wA=pi,xA=hi,MA=Ki,TA=mi.exports,OA=Ui,NA=Di,CA=Object.prototype.hasOwnProperty;var DA=function(e){if(null==e)return!0;if(MA(e)&&(xA(e)||"string"==typeof e||"function"==typeof e.splice||TA(e)||NA(e)||wA(e)))return!e.length;var t=SA(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(OA(e))return!EA(e).length;for(var n in e)if(CA.call(e,n))return!1;return!0};var LA,IA,kA=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(!DA(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);kA(i)?delete n[t]:n[t]=i})),DA(n)?void 0:n}return t}}}(LA||(LA={})),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}}}(IA||(IA={}));const $A=a({formValidationConfig:null,setFormValidationConfig:()=>null,warnings:null,setWarnings:()=>null,yupId:null}),RA=({children:t})=>{const[n,r]=o(),[i,a]=o(),[s]=o(Om()),u=c((()=>({formValidationConfig:n,setFormValidationConfig:r,warnings:i,setWarnings:a,yupId:s})),[n,i,s]);return e($A.Provider,{value:u,children:t})};var zA=kr,FA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},PA=function(e){return this.__data__.has(e)};function ZA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zA;++t<n;)this.add(e[t])}ZA.prototype.add=ZA.prototype.push=FA,ZA.prototype.has=PA;var UA=ZA;var BA=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 jA=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},VA=BA,GA=function(e){return e!=e},HA=jA;var YA=function(e,t,n){return t==t?HA(e,t,n):VA(e,GA,n)},WA=YA;var qA=function(e,t){return!!(null==e?0:e.length)&&WA(e,t,0)>-1};var KA=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 JA=function(e,t){return e.has(t)},XA=UA,QA=qA,eE=KA,tE=ph,nE=xi,rE=JA,iE=Math.min;var aE=function(e,t,n){for(var r=n?eE:QA,i=e[0].length,a=e.length,o=a,s=Array(a),u=1/0,c=[];o--;){var l=e[o];o&&t&&(l=tE(l,nE(t))),u=iE(l.length,u),s[o]=!n&&(t||i>=120&&l.length>=120)?new XA(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?rE(f,h):r(c,h,n))){for(o=a;--o;){var m=s[o];if(!(m?rE(m,h):r(e[o],h,n)))continue e}f&&f.push(h),c.push(p)}}return c};var oE=function(e){return e};var sE=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)},uE=Math.max;var cE=function(e,t,n){return t=uE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=uE(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),sE(e,this,s)}};var lE=function(e){return function(){return e}},dE=Wr,fE=dE?function(e,t){return dE(e,"toString",{configurable:!0,enumerable:!1,value:lE(t),writable:!0})}:oE,pE=fE,hE=Date.now;var mE=function(e){var t=0,n=0;return function(){var r=hE(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(pE),gE=oE,yE=cE,_E=mE;var vE=function(e,t){return _E(yE(e,t,gE),e+"")},bE=Ki,AE=ai;var EE=function(e){return AE(e)&&bE(e)},SE=EE;var wE,xE,ME=ph,TE=aE,OE=function(e){return SE(e)?e:[]},NE=vE((function(e){var t=ME(e,OE);return t.length&&t[0]===e[0]?TE(t):[]}));try{wE=Map}catch(rp){}try{xE=Set}catch(rp){}function CE(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(DE);if(wE&&e instanceof wE)return new Map(Array.from(e.entries()));if(xE&&e instanceof xE)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]:CE(e[i],t,n)}return r}return e}function DE(e){return CE(e,[],[])}const LE=Object.prototype.toString,IE=Error.prototype.toString,kE=RegExp.prototype.toString,$E="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",RE=/^Symbol\((.*)\)(.*)$/;function zE(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 $E.call(e).replace(RE,"Symbol($1)");const r=LE.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+IE.call(e)+"]":"RegExp"===r?kE.call(e):null}function FE(e,t){let n=zE(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){let r=zE(this[e],t);return null!==r?r:n}),2)}let PE={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: \`${FE(n,!0)}\``+(i?` (cast from the value \`${FE(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"},ZE={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"},UE={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"},BE={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},jE={isValue:"${path} field must be ${value}"},VE={noUnknown:"${path} field has unspecified keys: ${unknown}"},GE={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 HE=Object.assign(Object.create(null),{mixed:PE,string:ZE,number:UE,date:BE,object:VE,array:GE,boolean:jE}),YE=Object.prototype.hasOwnProperty;var WE=function(e,t){return null!=e&&YE.call(e,t)},qE=hi,KE=gh,JE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XE=/^\w*$/;var QE=function(e,t){if(qE(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!KE(e))||(XE.test(e)||!JE.test(e)||null!=t&&e in Object(t))},eS=kr;function tS(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(tS.Cache||eS),n}tS.Cache=eS;var nS=tS;var rS=function(e){var t=nS(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},iS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aS=/\\(\\)?/g,oS=rS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(iS,(function(e,n,r,i){t.push(r?i.replace(aS,"$1"):n||e)})),t})),sS=hi,uS=QE,cS=oS,lS=wh;var dS=function(e,t){return sS(e)?e:uS(e,t)?[e]:cS(lS(e))},fS=gh;var pS=function(e){if("string"==typeof e||fS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},hS=dS,mS=pi,gS=hi,yS=_i,_S=vi,vS=pS;var bS=function(e,t,n){for(var r=-1,i=(t=hS(t,e)).length,a=!1;++r<i;){var o=vS(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&_S(i)&&yS(o,i)&&(gS(e)||mS(e))},AS=WE,ES=bS;var SS=function(e,t){return null!=e&&ES(e,t,AS)};const wS=e=>e&&e.__isYupSchema__;class xS{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!SS(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(!wS(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function MS(e){return null==e?[]:[].concat(e)}function TS(){return TS=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},TS.apply(this,arguments)}let OS=/\$\{\s*(\w+)\s*\}/g;class NS extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=TS({},t,{path:n})),"string"==typeof e?e.replace(OS,((e,n)=>FE(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=[],MS(e).forEach((e=>{NS.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,NS)}}function CS(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 NS(o,a,u)):c(null,a);for(let e=0;e<r.length;e++){(0,r[e])(i,(function(e){if(e){if(!NS.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 NS(o,a,u),a);c(null,a)}}))}}var DS=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}},LS=DS(),IS=LS,kS=ea;var $S=function(e,t){return e&&IS(e,t,kS)};var RS=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},zS=UA,FS=RS,PS=JA;var ZS=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 zS: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(!FS(t,(function(e,t){if(!PS(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 US=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var BS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},jS=Eo,VS=Wt,GS=ZS,HS=US,YS=BS,WS=vn?vn.prototype:void 0,qS=WS?WS.valueOf:void 0;var KS=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 jS(e),new jS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return VS(+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=HS;case"[object Set]":var u=1&r;if(s||(s=YS),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=GS(s(e),s(t),r,i,a,o);return o.delete(e),l;case"[object Symbol]":if(qS)return qS.call(e)==qS.call(t)}return!1},JS=Ha,XS=Object.prototype.hasOwnProperty;var QS=function(e,t,n,r,i,a){var o=1&n,s=JS(e),u=s.length;if(u!=JS(t).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in t:XS.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},ew=Gr,tw=ZS,nw=KS,rw=QS,iw=vo,aw=hi,ow=mi.exports,sw=Di,uw="[object Arguments]",cw="[object Array]",lw="[object Object]",dw=Object.prototype.hasOwnProperty;var fw=function(e,t,n,r,i,a){var o=aw(e),s=aw(t),u=o?cw:iw(e),c=s?cw:iw(t),l=(u=u==uw?lw:u)==lw,d=(c=c==uw?lw:c)==lw,f=u==c;if(f&&ow(e)){if(!ow(t))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new ew),o||sw(e)?tw(e,t,n,r,i,a):nw(e,t,u,n,r,i,a);if(!(1&n)){var p=l&&dw.call(e,"__wrapped__"),h=d&&dw.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new ew),i(m,g,n,r,a)}}return!!f&&(a||(a=new ew),rw(e,t,n,r,i,a))},pw=fw,hw=ai;var mw=function e(t,n,r,i,a){return t===n||(null==t||null==n||!hw(t)&&!hw(n)?t!=t&&n!=n:pw(t,n,r,i,e,a))},gw=Gr,yw=mw;var _w=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 gw;if(r)var f=r(c,l,u,e,t,d);if(!(void 0===f?yw(l,c,3,r,d):f))return!1}}return!0},vw=Dn;var bw=function(e){return e==e&&!vw(e)},Aw=bw,Ew=ea;var Sw=function(e){for(var t=Ew(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Aw(i)]}return t};var ww=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},xw=_w,Mw=Sw,Tw=ww;var Ow=function(e){var t=Mw(e);return 1==t.length&&t[0][2]?Tw(t[0][0],t[0][1]):function(n){return n===e||xw(n,e,t)}},Nw=dS,Cw=pS;var Dw=function(e,t){for(var n=0,r=(t=Nw(t,e)).length;null!=e&&n<r;)e=e[Cw(t[n++])];return n&&n==r?e:void 0},Lw=Dw;var Iw=function(e,t,n){var r=null==e?void 0:Lw(e,t);return void 0===r?n:r};var kw=function(e,t){return null!=e&&t in Object(e)},$w=kw,Rw=bS;var zw=function(e,t){return null!=e&&Rw(e,t,$w)},Fw=mw,Pw=Iw,Zw=zw,Uw=QE,Bw=bw,jw=ww,Vw=pS;var Gw=function(e,t){return Uw(e)&&Bw(t)?jw(Vw(e),t):function(n){var r=Pw(n,e);return void 0===r&&r===t?Zw(n,e):Fw(t,r,3)}};var Hw=function(e){return function(t){return null==t?void 0:t[e]}},Yw=Dw;var Ww=function(e){return function(t){return Yw(t,e)}},qw=Hw,Kw=Ww,Jw=QE,Xw=pS;var Qw=Ow,ex=Gw,tx=oE,nx=hi,rx=function(e){return Jw(e)?qw(Xw(e)):Kw(e)};var ix=function(e){return"function"==typeof e?e:null==e?tx:"object"==typeof e?nx(e)?ex(e[0],e[1]):Qw(e):rx(e)},ax=Kr,ox=$S,sx=ix;var ux=function(e,t){var n={};return t=sx(t),ox(e,(function(e,r,i){ax(n,r,t(e,r,i))})),n};function cx(e){this._maxSize=e,this.clear()}cx.prototype.clear=function(){this._size=0,this._values=Object.create(null)},cx.prototype.get=function(e){return this._values[e]},cx.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var lx=/[^.^\]^[]+|(?=\[\]|\.\.)/g,dx=/^\d+$/,fx=/^\d/,px=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,hx=/^\s*(['"]?)(.*?)(\1)\s*$/,mx=new cx(512),gx=new cx(512),yx=new cx(512),_x={Cache:cx,split:bx,normalizePath:vx,setter:function(e){var t=vx(e);return gx.get(e)||gx.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=vx(e);return yx.get(e)||yx.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+(Ax(t)||dx.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])&&(Ex(r)&&(r='"'+r+'"'),a=!(o=Ax(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:bx(e),t,n)}};function vx(e){return mx.get(e)||mx.set(e,bx(e).map((function(e){return e.replace(hx,"$2")})))}function bx(e){return e.match(lx)||[""]}function Ax(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function Ex(e){return!Ax(e)&&(function(e){return e.match(fx)&&!e.match(dx)}(e)||function(e){return px.test(e)}(e))}const Sx="$",wx=".";class xx{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]===Sx,this.isValue=this.key[0]===wx,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Sx:this.isValue?wx:"";this.path=this.key.slice(n.length),this.getter=this.path&&_x.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 Mx(){return Mx=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},Mx.apply(this,arguments)}function Tx(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 xx.isRef(e)?e.getValue(r,h,m):e}function y(e={}){const t=ux(Mx({value:r,originalValue:s,label:a,path:e.path||i},f,e.params),g),n=new NS(NS.formatError(e.message||p,t),r,t.path,e.type||l);return n.params=t,n}let _,v=Mx({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)}NS.isError(_)?n(_):_?n(null,_):n(y())}else try{Promise.resolve(d.call(v,r,v)).then((e=>{NS.isError(e)?n(e):e?n(null,e):n(y())})).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}xx.prototype.__isYupRef=!0;function Ox(e,t,n,r=n){let i,a,o;return t?(_x.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 Nx{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(xx.isRef(n)?e(n):n)),[])}add(e){xx.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){xx.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new Nx;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 Cx(){return Cx=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},Cx.apply(this,arguments)}class Dx{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 Nx,this._blacklist=new Nx,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(PE.notType)})),this.type=(null==e?void 0:e.type)||"mixed",this.spec=Cx({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=Cx({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=DE(Cx({},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=Cx({},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(Cx({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=FE(e),a=FE(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,Cx({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),CS({args:l,value:c,path:i,sync:r,tests:d,endEarly:u},(e=>{e?n(e,c):CS({tests:this.tests.concat(f),args:l,path:i,sync:r,value:c,endEarly:u},n)}))}validate(e,t,n){let r=this.resolve(Cx({},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(Cx({},t,{value:e}))._validate(e,Cx({},t,{sync:!0}),((e,t)=>{if(e)throw e;n=t})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(NS.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(NS.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):DE(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=PE.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=PE.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=PE.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Tx(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=MS(e).map((e=>new xx(e)));return r.forEach((e=>{e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new xS(r,t)),n}typeError(e){let t=this.clone();return t._typeError=Tx({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=PE.oneOf){let n=this.clone();return e.forEach((e=>{n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=Tx({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=PE.notOneOf){let n=this.clone();return e.forEach((e=>{n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=Tx({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}}Dx.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Dx.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:a,schema:o}=Ox(this,t,n,r.context);return o[e](i&&i[a],Cx({},r,{parent:i,path:t}))};for(const e of["equals","is"])Dx.prototype[e]=Dx.prototype.oneOf;for(const e of["not","nope"])Dx.prototype[e]=Dx.prototype.notOneOf;Dx.prototype.optional=Dx.prototype.notRequired;const Lx=Dx;function Ix(){return new Lx}Ix.prototype=Lx.prototype;const kx=e=>null==e;function $x(){return new Rx}class Rx extends Dx{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=jE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>kx(e)||!0===e})}isFalse(e=jE.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>kx(e)||!1===e})}}$x.prototype=Rx.prototype;let zx=/^((([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,Fx=/^((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,Px=/^(?:[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,Zx=e=>kx(e)||e===e.trim(),Ux={}.toString();function Bx(){return new jx}class jx extends Dx{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===Ux?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=ZE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return kx(t)||t.length===this.resolve(e)}})}min(e,t=ZE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return kx(t)||t.length>=this.resolve(e)}})}max(e,t=ZE.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return kx(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||ZE.matches,params:{regex:e},test:t=>kx(t)||""===t&&i||-1!==t.search(e)})}email(e=ZE.email){return this.matches(zx,{name:"email",message:e,excludeEmptyString:!0})}url(e=ZE.url){return this.matches(Fx,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ZE.uuid){return this.matches(Px,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=ZE.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:Zx})}lowercase(e=ZE.lowercase){return this.transform((e=>kx(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>kx(e)||e===e.toLowerCase()})}uppercase(e=ZE.uppercase){return this.transform((e=>kx(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,test:e=>kx(e)||e===e.toUpperCase()})}}Bx.prototype=jx.prototype;function Vx(){return new Gx}class Gx extends Dx{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=UE.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return kx(t)||t>=this.resolve(e)}})}max(e,t=UE.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return kx(t)||t<=this.resolve(e)}})}lessThan(e,t=UE.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return kx(t)||t<this.resolve(e)}})}moreThan(e,t=UE.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return kx(t)||t>this.resolve(e)}})}positive(e=UE.positive){return this.moreThan(0,e)}negative(e=UE.negative){return this.lessThan(0,e)}integer(e=UE.integer){return this.test({name:"integer",message:e,test:e=>kx(e)||Number.isInteger(e)})}truncate(){return this.transform((e=>kx(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=>kx(t)?t:Math[e](t)))}}Vx.prototype=Gx.prototype;var Hx=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let Yx=new Date("");function Wx(){return new qx}class qx extends Dx{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=Hx.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)?Yx: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(xx.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=BE.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return kx(e)||e>=this.resolve(n)}})}max(e,t=BE.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return kx(e)||e<=this.resolve(n)}})}}qx.INVALID_DATE=Yx,Wx.prototype=qx.prototype,Wx.INVALID_DATE=Yx;var Kx=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 Jx=function(e){return function(t){return null==e?void 0:e[t]}},Xx=Jx({"À":"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"}),Qx=wh,eM=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tM=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var nM=function(e){return(e=Qx(e))&&e.replace(eM,Xx).replace(tM,"")},rM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var iM=function(e){return e.match(rM)||[]},aM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var oM=function(e){return aM.test(e)},sM="\\ud800-\\udfff",uM="\\u2700-\\u27bf",cM="a-z\\xdf-\\xf6\\xf8-\\xff",lM="A-Z\\xc0-\\xd6\\xd8-\\xde",dM="\\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",fM="["+dM+"]",pM="\\d+",hM="["+uM+"]",mM="["+cM+"]",gM="[^"+sM+dM+pM+uM+cM+lM+"]",yM="(?:\\ud83c[\\udde6-\\uddff]){2}",_M="[\\ud800-\\udbff][\\udc00-\\udfff]",vM="["+lM+"]",bM="(?:"+mM+"|"+gM+")",AM="(?:"+vM+"|"+gM+")",EM="(?:['’](?:d|ll|m|re|s|t|ve))?",SM="(?:['’](?:D|LL|M|RE|S|T|VE))?",wM="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",xM="[\\ufe0e\\ufe0f]?",MM=xM+wM+("(?:\\u200d(?:"+["[^"+sM+"]",yM,_M].join("|")+")"+xM+wM+")*"),TM="(?:"+[hM,yM,_M].join("|")+")"+MM,OM=RegExp([vM+"?"+mM+"+"+EM+"(?="+[fM,vM,"$"].join("|")+")",AM+"+"+SM+"(?="+[fM,vM+bM,"$"].join("|")+")",vM+"?"+bM+"+"+EM,vM+"+"+SM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pM,TM].join("|"),"g");var NM=function(e){return e.match(OM)||[]},CM=iM,DM=oM,LM=wh,IM=NM;var kM=function(e,t,n){return e=LM(e),void 0===(t=n?void 0:t)?DM(e)?IM(e):CM(e):e.match(t)||[]},$M=Kx,RM=nM,zM=kM,FM=RegExp("['’]","g");var PM=function(e){return function(t){return $M(zM(RM(t).replace(FM,"")),e,"")}},ZM=PM((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),UM=ZM,BM=nm,jM=PM((function(e,t,n){return t=t.toLowerCase(),e+(n?BM(t):t)})),VM=jM,GM=Kr,HM=$S,YM=ix;var WM=function(e,t){var n={};return t=YM(t),HM(e,(function(e,r,i){GM(n,t(e,r,i),e)})),n},qM={exports:{}};function KM(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 JM(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 XM(e){return(t,n)=>JM(e,t)-JM(e,n)}function QM(){return QM=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},QM.apply(this,arguments)}qM.exports=function(e){return KM(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)},qM.exports.array=KM;let eT=e=>"[object Object]"===Object.prototype.toString.call(e);const tT=XM([]);class nT extends Dx{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=tT,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 eT(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=QM({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=i[e],o=SS(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(!NS.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!eT(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],QM({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r):r(null)}));CS({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=QM({},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 Dx&&t instanceof Dx&&(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=XM(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=_x.split(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(const t in e)if(SS(e,t)){let n=e[t];r.add(t),xx.isRef(n)&&n.isSibling?a(n.path,t):wS(n)&&"deps"in n&&n.deps.forEach((e=>a(e,t)))}return qM.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=_x.getter(e,!0);return this.transform((i=>{if(null==i)return i;let a=i;return SS(i,e)&&(a=QM({},i),n||delete a[e],a[t]=r(i)),a}))}noUnknown(e=!0,t=VE.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=VE.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>t&&WM(t,((t,n)=>e(n)))))}camelCase(){return this.transformKeys(VM)}snakeCase(){return this.transformKeys(UM)}constantCase(){return this.transformKeys((e=>UM(e).toUpperCase()))}describe(){let e=super.describe();return e.fields=ux(this.fields,(e=>e.describe())),e}}function rT(e){return new nT(e)}function iT(){return iT=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},iT.apply(this,arguments)}function aT(e){return new oT(e)}rT.prototype=nT.prototype;class oT extends Dx{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,iT({},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(!NS.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=iT({},t,{path:a,strict:!0,parent:r,index:e,originalValue:d[e]});i[e]=(e,t)=>u.validate(n,o,t)}CS({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(!wS(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+FE(e));return t.innerType=e,t}length(e,t=GE.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return kx(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||GE.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return kx(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||GE.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return kx(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)}}aT.prototype=oT.prototype;class sT{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(!wS(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 uT(e,t,n){if(!e||!wS(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 cT=Object.freeze({__proto__:null,mixed:Ix,bool:$x,boolean:$x,string:Bx,number:Vx,date:Wx,object:rT,array:aT,ref:function(e,t){return new xx(e,t)},lazy:function(e){return new sT(e)},reach:(e,t,n,r)=>Ox(e,t,n,r).schema,isSchema:wS,addMethod:uT,setLocale:function(e){Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((n=>{HE[t][n]=e[t][n]}))}))},ValidationError:NS,BaseSchema:Dx,MixedSchema:Lx,BooleanSchema:Rx,StringSchema:jx,NumberSchema:Gx,DateSchema:qx,ObjectSchema:nT,ArraySchema:oT});const lT=C.button`
|
|
180
180
|
background-color: ${A.bg};
|
|
181
181
|
border: ${E["width-010"]} ${E.solid} ${A.border};
|
|
182
182
|
border-radius: 1rem;
|
|
@@ -303,7 +303,7 @@ function MN(e){return"[object Object]"===Object.prototype.toString.call(e)}Objec
|
|
|
303
303
|
height: auto;
|
|
304
304
|
`,JI=({id:t,lat:n,lng:r,address:i,staticMapPinColor:a={r:28,g:118,b:213},className:c,onClick:d,disabled:f})=>{const p=s(!1),[h,m]=o(""),g=s([0,0]),y=l(L);u((()=>(window.addEventListener("resize",_),n&&r&&_(),()=>{window.removeEventListener("resize",_)})),[n,r]);const _=()=>{if(!n||!r)return;const e=window.matchMedia(`(max-width: ${M["sm-max"]({theme:y})}px)`).matches;if(p.current!==e||g.current[0]!==n||g.current[1]!==r){p.current=e;const t=e?WI.mobile:WI.desktop,i=15,o=t.height+i;m(HI.getStaticMapUrl(n,r,t.width,o,a)),g.current=[n,r]}};return n&&r?e(qI,{id:IA.generateId(t,"static-map"),"data-testid":IA.generateId(t,"static-map"),className:c,onClick:d,"aria-disabled":f,children:e(KI,{alt:i||"Location Map",src:h,onError:e=>{e.currentTarget.src="https://assets.life.gov.sg/web-frontend-engine/img/map/static_map_placeholder.png"}})}):null},XI=({id:t,message:n,className:r})=>n?e(QI,{type:"warning","data-testid":IA.generateId(t,"warning"),className:r,children:n}):null,QI=C(F)`
|
|
305
305
|
margin: -1rem 0rem 2rem;
|
|
306
|
-
`,ek=["required","length","min","max","matches","email","url","uuid","positive","negative","integer","lessThan","moreThan","when","filled","empty","equals","notEquals","includes","excludes","uinfin","equalsField","withinDays"];var tk;!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)})),rT().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=>NE(ek,Object.keys(e)).length>0||NE(t,Object.keys(e)).length>0));return e.mapRules(n,i)},e.mapSchemaType=e=>{switch(e){case"string":return Bx().typeError("Only string values are allowed");case"number":return Vx().typeError("Only number values are allowed");case"boolean":return $x().strict().typeError("Only boolean values are allowed");case"array":return aT().typeError("Only array values are allowed");case"object":return rT().typeError("Only object values are allowed");default:return Ix()}},e.mapRules=(n,r)=>(r.forEach((r=>{const i=Object.keys(r).filter((e=>ek.includes(e)))?.[0];switch(!0){case r.required:n=n.required(r.errorMessage||xm.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),uT(cT[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)}})}))}}(tk||(tk={}));var nk=Cn,rk=ai;var ik=function(e){return!0===e||!1===e||rk(e)&&"[object Boolean]"==nk(e)},ak=mw;var ok=function(e,t){return ak(e,t)},sk=Cn,uk=ai;var ck,lk=function(e){return"number"==typeof e||uk(e)&&"[object Number]"==sk(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"}(ck||(ck={}));const dk=[2,7,6,5,4,3,2],fk=["J","Z","I","H","G","F","E","D","C","B","A"],pk=["X","W","U","T","R","Q","P","N","M","L","K"],hk=["X","W","U","T","R","Q","P","N","J","L","K"];function mk(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))*dk[n];const n=e.charAt(0);n!==ck.LOCAL_T_PREFIX&&n!==ck.FOREIGN_G_PREFIX||(t+=4);n===ck.FOREIGN_M_PREFIX&&(t+=3);let r;r=n===ck.LOCAL_S_PREFIX||n===ck.LOCAL_T_PREFIX?fk[t%11]:n===ck.FOREIGN_M_PREFIX?hk[t%11]:pk[t%11];return r}(e);return t&&n}return!1}tk.addCondition("string","uinfin",(e=>!!DA(e)||mk(e)));const gk=["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"];tk.addCondition("string","uen",(e=>!!DA(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})(`+gk.join("|")+String.raw`)([\d]{4})([A-Z]))$`;if(e.match(t))return!0}return!1}(e)));const yk=e=>lk(e)?kA(e):DA(e)&&!ik(e);tk.addCondition("mixed","filled",(e=>!yk(e))),tk.addCondition("mixed","empty",(e=>yk(e))),tk.addCondition("mixed","equals",((e,t)=>!yk(e)&&ok(e,t))),tk.addCondition("mixed","notEquals",((e,t)=>!yk(e)&&!ok(e,t))),tk.addCondition("string","notMatches",((e,t)=>{if(yk(e))return!0;const n=t.match(/\/(.*)\/([a-z]+)?/);return!new RegExp(n[1],n[2]).test(e)})),tk.addCondition("string","noWhitespaceOnly",((e,t)=>!(!yk(e)&&t)||/\S/.test(e))),tk.addCondition("array","includes",((e,t)=>!e?.length||(Array.isArray(t)?t.filter((t=>e.includes(t))).length===t.length:e.includes(t)))),tk.addCondition("array","excludes",((e,t)=>!e?.length||(Array.isArray(t)?e.length&&0===t.filter((t=>e.includes(t))).length:!e.includes(t)))),tk.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 ok(r,i)}return ok(e,n.parent[`${t}`])}return ok(e,n.parent[`${t}`])})),tk.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!ok(r,i)}return!ok(e,n.parent[`${t}`])}return!ok(e,n.parent[`${t}`])})),tk.addCondition("mixed","withinDays",((e,t)=>!!DA(e)||Mm.checkWithinDays(e,t))),tk.addCondition("mixed","beyondDays",((e,t)=>!!DA(e)||Mm.checkBeyondDays(e,t)));const _k=({children:t})=>e(RA,{children:e(Gs,{children:e(Ys,{children:e(qs,{children:e(js,{children:e(Js,{children:t})})})})})}),vk=()=>{const{customComponents:e,setCustomComponents:t}=l(Bs),n=d((t=>e?.[t]),[e]);return{customComponents:e,getCustomComponent:n,setCustomComponents:t}},bk="undefined"!=typeof window?(e,t)=>{const n=s(t),r=s(0);return ok(t,n.current)||(n.current=t,r.current+=1),f(e,[r.current])}:Us,Ak=()=>{const{eventManagerRef:e}=l(Vs),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 Ek=Kr,Sk=Wt;var wk=function(e,t,n){(void 0!==n&&!Sk(e[t],n)||void 0===n&&!(t in e))&&Ek(e,t,n)},xk=Cn,Mk=Da,Tk=ai,Ok=Function.prototype,Nk=Object.prototype,Ck=Ok.toString,Dk=Nk.hasOwnProperty,Lk=Ck.call(Object);var Ik=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},kk=ri,$k=pa;var Rk=wk,zk=ya.exports,Fk=Lo,Pk=_a,Zk=Go,Uk=pi,Bk=hi,jk=EE,Vk=mi.exports,Gk=$n,Hk=Dn,Yk=function(e){if(!Tk(e)||"[object Object]"!=xk(e))return!1;var t=Mk(e);if(null===t)return!0;var n=Dk.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ck.call(n)==Lk},Wk=Di,qk=Ik,Kk=function(e){return kk(e,$k(e))};var Jk=function(e,t,n,r,i,a,o){var s=qk(e,n),u=qk(t,n),c=o.get(u);if(c)Rk(e,n,c);else{var l=a?a(s,u,n+"",e,t,o):void 0,d=void 0===l;if(d){var f=Bk(u),p=!f&&Vk(u),h=!f&&!p&&Wk(u);l=u,f||p||h?Bk(s)?l=s:jk(s)?l=Pk(s):p?(d=!1,l=zk(u,!0)):h?(d=!1,l=Fk(u,!0)):l=[]:Yk(u)||Uk(u)?(l=s,Uk(s)?l=Kk(s):Hk(s)&&!Gk(s)||(l=Zk(u))):d=!1}d&&(o.set(u,l),i(l,u,r,a,o),o.delete(u)),Rk(e,n,l)}},Xk=Gr,Qk=wk,e$=LS,t$=Jk,n$=Dn,r$=pa,i$=Ik;var a$=function e(t,n,r,i,a){t!==n&&e$(n,(function(o,s){if(a||(a=new Xk),n$(o))t$(t,n,s,r,e,i,a);else{var u=i?i(i$(t,s),o,s+"",t,n,a):void 0;void 0===u&&(u=o),Qk(t,s,u)}}),r$)},o$=Wt,s$=Ki,u$=_i,c$=Dn;var l$=function(e,t,n){if(!c$(n))return!1;var r=typeof t;return!!("number"==r?s$(n)&&u$(t,n.length):"string"==r&&t in n)&&o$(n[t],e)},d$=vE,f$=l$;var p$=function(e){return d$((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&&f$(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}))},h$=a$,m$=p$((function(e,t,n){h$(e,t,n)})),g$=m$;const y$=()=>{const{setFormSchema:e,formSchema:t}=l(Hs);return{setFormSchema:e,formSchema:t,overrideSchema:d(((e,t)=>{if(DA(t)||"string"==typeof e)return e;let n={};if(Object.keys(e).forEach((e=>{const r=LA.getNestedValueByKey(t,e,{searchIn:["children"]});DA(r)||(n={...n,...r})})),!DA(n)){const t=ks(e),r=g$(t,n);return LA.removeNil(r)}return e}),[])}},_$=e=>{const t=Ye(),{setFormValues:n,formValues:r,formValuesRef:i,registeredFields:a,setRegisteredFields:o}=l(Ws),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}},v$=()=>{const{formValidationConfig:e,setFormValidationConfig:t}=l($A);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}))}},b$=()=>{const{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n}=Ak(),r=Ye(),{setFieldValidationConfig:i,removeFieldValidationConfig:a}=v$();return{event:{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n},formContext:r,validation:{setValidation:i,removeValidation:a}}},A$=()=>{const{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}=l(Ks);return{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}},E$=(e,t)=>{u((()=>{const n=n=>{n.data.type===e&&t(n)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}}),[e,t])},S$=e=>{const t=s();return u((()=>{t.current=e}),[e]),t.current},w$=()=>{const{formValidationConfig:e,warnings:t,setWarnings:n,yupId:r}=l($A),[i,a]=o(rT()),[s,c]=o(rT()),f=d((()=>{if(e){let t={},n={};Object.entries(e).forEach((([e,r])=>{if(!r.validationRules||0===r.validationRules.length)return void(t=LA.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=LA.upsert(n,e,{schema:r.schema,validationRules:i})),a.length&&(t=LA.upsert(t,e,{schema:r.schema,validationRules:a}))})),c(tk.buildSchema(n,r)),a(tk.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(DA(t))return;const r=t.inner.reduce(((e,t)=>(e[t.path]=t.message,e)),{});n(r)}))},addWarnings:e=>{n({...t,...e})},yupId:r}},x$=()=>{const e=l(L);return d((()=>window.innerWidth<=M["sm-max"]({theme:e})||window.innerWidth>window.innerHeight&&window.innerHeight<M["sm-max"]({theme:e})),[e])},M$=C.div`
|
|
306
|
+
`,ek=["required","length","min","max","matches","email","url","uuid","positive","negative","integer","lessThan","moreThan","when","filled","empty","equals","notEquals","includes","excludes","uinfin","equalsField","withinDays"];var tk;!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)})),rT().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=>NE(ek,Object.keys(e)).length>0||NE(t,Object.keys(e)).length>0));return e.mapRules(n,i)},e.mapSchemaType=e=>{switch(e){case"string":return Bx().typeError("Only string values are allowed");case"number":return Vx().typeError("Only number values are allowed");case"boolean":return $x().strict().typeError("Only boolean values are allowed");case"array":return aT().typeError("Only array values are allowed");case"object":return rT().typeError("Only object values are allowed");default:return Ix()}},e.mapRules=(n,r)=>(r.forEach((r=>{const i=Object.keys(r).filter((e=>ek.includes(e)))?.[0];switch(!0){case r.required:n=n.required(r.errorMessage||xm.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),uT(cT[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)}})}))}}(tk||(tk={}));var nk=Cn,rk=ai;var ik=function(e){return!0===e||!1===e||rk(e)&&"[object Boolean]"==nk(e)},ak=mw;var ok=function(e,t){return ak(e,t)},sk=Cn,uk=ai;var ck,lk=function(e){return"number"==typeof e||uk(e)&&"[object Number]"==sk(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"}(ck||(ck={}));const dk=[2,7,6,5,4,3,2],fk=["J","Z","I","H","G","F","E","D","C","B","A"],pk=["X","W","U","T","R","Q","P","N","M","L","K"],hk=["X","W","U","T","R","Q","P","N","J","L","K"];function mk(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))*dk[n];const n=e.charAt(0);n!==ck.LOCAL_T_PREFIX&&n!==ck.FOREIGN_G_PREFIX||(t+=4);n===ck.FOREIGN_M_PREFIX&&(t+=3);let r;r=n===ck.LOCAL_S_PREFIX||n===ck.LOCAL_T_PREFIX?fk[t%11]:n===ck.FOREIGN_M_PREFIX?hk[t%11]:pk[t%11];return r}(e);return t&&n}return!1}tk.addCondition("string","uinfin",(e=>!!DA(e)||mk(e)));const gk=["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"];tk.addCondition("string","uen",(e=>!!DA(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})(`+gk.join("|")+String.raw`)([\d]{4})([A-Z]))$`;if(e.match(t))return!0}return!1}(e)));const yk=e=>lk(e)?kA(e):DA(e)&&!ik(e);tk.addCondition("mixed","filled",(e=>!yk(e))),tk.addCondition("mixed","empty",(e=>yk(e))),tk.addCondition("mixed","equals",((e,t)=>!yk(e)&&ok(e,t))),tk.addCondition("mixed","notEquals",((e,t)=>!yk(e)&&!ok(e,t))),tk.addCondition("string","notMatches",((e,t)=>{if(yk(e))return!0;const n=t.match(/\/(.*)\/([a-z]+)?/);return!new RegExp(n[1],n[2]).test(e)})),tk.addCondition("string","noWhitespaceOnly",((e,t)=>!(!yk(e)&&t)||/\S/.test(e))),tk.addCondition("string","whitespace",((e,t)=>!(!yk(e)&&t&&("object"!=typeof t||ik(t.noLeadingOrTrailingWhitespace)))||("object"!=typeof t||t.noLeadingOrTrailingWhitespace?/^(?!\s+$)(?!\s).*(?<!\s)$/.test(e):/\S/.test(e)))),tk.addCondition("array","includes",((e,t)=>!e?.length||(Array.isArray(t)?t.filter((t=>e.includes(t))).length===t.length:e.includes(t)))),tk.addCondition("array","excludes",((e,t)=>!e?.length||(Array.isArray(t)?e.length&&0===t.filter((t=>e.includes(t))).length:!e.includes(t)))),tk.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 ok(r,i)}return ok(e,n.parent[`${t}`])}return ok(e,n.parent[`${t}`])})),tk.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!ok(r,i)}return!ok(e,n.parent[`${t}`])}return!ok(e,n.parent[`${t}`])})),tk.addCondition("mixed","withinDays",((e,t)=>!!DA(e)||Mm.checkWithinDays(e,t))),tk.addCondition("mixed","beyondDays",((e,t)=>!!DA(e)||Mm.checkBeyondDays(e,t)));const _k=({children:t})=>e(RA,{children:e(Gs,{children:e(Ys,{children:e(qs,{children:e(js,{children:e(Js,{children:t})})})})})}),vk=()=>{const{customComponents:e,setCustomComponents:t}=l(Bs),n=d((t=>e?.[t]),[e]);return{customComponents:e,getCustomComponent:n,setCustomComponents:t}},bk="undefined"!=typeof window?(e,t)=>{const n=s(t),r=s(0);return ok(t,n.current)||(n.current=t,r.current+=1),f(e,[r.current])}:Us,Ak=()=>{const{eventManagerRef:e}=l(Vs),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 Ek=Kr,Sk=Wt;var wk=function(e,t,n){(void 0!==n&&!Sk(e[t],n)||void 0===n&&!(t in e))&&Ek(e,t,n)},xk=Cn,Mk=Da,Tk=ai,Ok=Function.prototype,Nk=Object.prototype,Ck=Ok.toString,Dk=Nk.hasOwnProperty,Lk=Ck.call(Object);var Ik=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},kk=ri,$k=pa;var Rk=wk,zk=ya.exports,Fk=Lo,Pk=_a,Zk=Go,Uk=pi,Bk=hi,jk=EE,Vk=mi.exports,Gk=$n,Hk=Dn,Yk=function(e){if(!Tk(e)||"[object Object]"!=xk(e))return!1;var t=Mk(e);if(null===t)return!0;var n=Dk.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ck.call(n)==Lk},Wk=Di,qk=Ik,Kk=function(e){return kk(e,$k(e))};var Jk=function(e,t,n,r,i,a,o){var s=qk(e,n),u=qk(t,n),c=o.get(u);if(c)Rk(e,n,c);else{var l=a?a(s,u,n+"",e,t,o):void 0,d=void 0===l;if(d){var f=Bk(u),p=!f&&Vk(u),h=!f&&!p&&Wk(u);l=u,f||p||h?Bk(s)?l=s:jk(s)?l=Pk(s):p?(d=!1,l=zk(u,!0)):h?(d=!1,l=Fk(u,!0)):l=[]:Yk(u)||Uk(u)?(l=s,Uk(s)?l=Kk(s):Hk(s)&&!Gk(s)||(l=Zk(u))):d=!1}d&&(o.set(u,l),i(l,u,r,a,o),o.delete(u)),Rk(e,n,l)}},Xk=Gr,Qk=wk,e$=LS,t$=Jk,n$=Dn,r$=pa,i$=Ik;var a$=function e(t,n,r,i,a){t!==n&&e$(n,(function(o,s){if(a||(a=new Xk),n$(o))t$(t,n,s,r,e,i,a);else{var u=i?i(i$(t,s),o,s+"",t,n,a):void 0;void 0===u&&(u=o),Qk(t,s,u)}}),r$)},o$=Wt,s$=Ki,u$=_i,c$=Dn;var l$=function(e,t,n){if(!c$(n))return!1;var r=typeof t;return!!("number"==r?s$(n)&&u$(t,n.length):"string"==r&&t in n)&&o$(n[t],e)},d$=vE,f$=l$;var p$=function(e){return d$((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&&f$(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}))},h$=a$,m$=p$((function(e,t,n){h$(e,t,n)})),g$=m$;const y$=()=>{const{setFormSchema:e,formSchema:t}=l(Hs);return{setFormSchema:e,formSchema:t,overrideSchema:d(((e,t)=>{if(DA(t)||"string"==typeof e)return e;let n={};if(Object.keys(e).forEach((e=>{const r=LA.getNestedValueByKey(t,e,{searchIn:["children"]});DA(r)||(n={...n,...r})})),!DA(n)){const t=ks(e),r=g$(t,n);return LA.removeNil(r)}return e}),[])}},_$=e=>{const t=Ye(),{setFormValues:n,formValues:r,formValuesRef:i,registeredFields:a,setRegisteredFields:o}=l(Ws),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}},v$=()=>{const{formValidationConfig:e,setFormValidationConfig:t}=l($A);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}))}},b$=()=>{const{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n}=Ak(),r=Ye(),{setFieldValidationConfig:i,removeFieldValidationConfig:a}=v$();return{event:{addFieldEventListener:e,dispatchFieldEvent:t,removeFieldEventListener:n},formContext:r,validation:{setValidation:i,removeValidation:a}}},A$=()=>{const{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}=l(Ks);return{submitHandler:e,setSubmitHandler:t,wrapInForm:n,setWrapInForm:r}},E$=(e,t)=>{u((()=>{const n=n=>{n.data.type===e&&t(n)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}}),[e,t])},S$=e=>{const t=s();return u((()=>{t.current=e}),[e]),t.current},w$=()=>{const{formValidationConfig:e,warnings:t,setWarnings:n,yupId:r}=l($A),[i,a]=o(rT()),[s,c]=o(rT()),f=d((()=>{if(e){let t={},n={};Object.entries(e).forEach((([e,r])=>{if(!r.validationRules||0===r.validationRules.length)return void(t=LA.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=LA.upsert(n,e,{schema:r.schema,validationRules:i})),a.length&&(t=LA.upsert(t,e,{schema:r.schema,validationRules:a}))})),c(tk.buildSchema(n,r)),a(tk.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(DA(t))return;const r=t.inner.reduce(((e,t)=>(e[t.path]=t.message,e)),{});n(r)}))},addWarnings:e=>{n({...t,...e})},yupId:r}},x$=()=>{const e=l(L);return d((()=>window.innerWidth<=M["sm-max"]({theme:e})||window.innerWidth>window.innerHeight&&window.innerHeight<M["sm-max"]({theme:e})),[e])},M$=C.div`
|
|
307
307
|
padding: ${S["spacing-32"]};
|
|
308
308
|
${w.MaxWidth.sm} {
|
|
309
309
|
padding: ${S["spacing-32"]} ${S["spacing-20"]};
|
|
@@ -476,7 +476,7 @@ function MN(e){return"[object Object]"===Object.prototype.toString.call(e)}Objec
|
|
|
476
476
|
cursor: pointer;
|
|
477
477
|
`,jF=C(F)`
|
|
478
478
|
margin-top: ${S["spacing-8"]};
|
|
479
|
-
`;var VF=pi,GF=hi,HF=vn?vn.isConcatSpreadable:void 0;var YF=Ca,WF=function(e){return GF(e)||VF(e)||!!(HF&&e&&e[HF])};var qF=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=WF),a||(a=[]);++o<s;){var u=t[o];n>0&&r(u)?n>1?e(u,n-1,r,i,a):YF(a,u):i||(a[a.length]=u)}return a};var KF=Qa,JF=function(){},XF=KF&&1/BS(new KF([,-0]))[1]==1/0?function(e){return new KF(e)}:JF,QF=UA,eP=qA,tP=KA,nP=JA,rP=XF,iP=BS;var aP=function(e,t,n){var r=-1,i=eP,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=tP;else if(a>=200){var c=t?null:rP(e);if(c)return iP(c);o=!1,i=nP,u=new QF}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},oP=dR,sP=qF,uP=aP;var cP=function(e,t,n){var r=e.length;if(r<2)return r?uP(e[0]):[];for(var i=-1,a=Array(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=oP(a[i]||o,e[s],t,n));return uP(sP(a,1),t,n)},lP=va,dP=cP,fP=EE,pP=vE((function(e){return dP(lP(e,fP))}));const hP=a({files:[],setFiles:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),mP=({children:t})=>{const[n,r]=o([]),[i,a]=o([]),s=c((()=>({files:n,setFiles:r,currentFileIds:i,setCurrentFileIds:a})),[n,i]);return e(hP.Provider,{value:s,children:t})};var gP,yP;!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}}(gP||(gP={})),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"}(yP||(yP={}));const _P=y((()=>import("./file-upload-manager.
|
|
479
|
+
`;var VF=pi,GF=hi,HF=vn?vn.isConcatSpreadable:void 0;var YF=Ca,WF=function(e){return GF(e)||VF(e)||!!(HF&&e&&e[HF])};var qF=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=WF),a||(a=[]);++o<s;){var u=t[o];n>0&&r(u)?n>1?e(u,n-1,r,i,a):YF(a,u):i||(a[a.length]=u)}return a};var KF=Qa,JF=function(){},XF=KF&&1/BS(new KF([,-0]))[1]==1/0?function(e){return new KF(e)}:JF,QF=UA,eP=qA,tP=KA,nP=JA,rP=XF,iP=BS;var aP=function(e,t,n){var r=-1,i=eP,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=tP;else if(a>=200){var c=t?null:rP(e);if(c)return iP(c);o=!1,i=nP,u=new QF}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},oP=dR,sP=qF,uP=aP;var cP=function(e,t,n){var r=e.length;if(r<2)return r?uP(e[0]):[];for(var i=-1,a=Array(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=oP(a[i]||o,e[s],t,n));return uP(sP(a,1),t,n)},lP=va,dP=cP,fP=EE,pP=vE((function(e){return dP(lP(e,fP))}));const hP=a({files:[],setFiles:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),mP=({children:t})=>{const[n,r]=o([]),[i,a]=o([]),s=c((()=>({files:n,setFiles:r,currentFileIds:i,setCurrentFileIds:a})),[n,i]);return e(hP.Provider,{value:s,children:t})};var gP,yP;!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}}(gP||(gP={})),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"}(yP||(yP={}));const _P=y((()=>import("./file-upload-manager.6091aa9e.js"))),vP=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(hP),T=s({}),O=s({}),N=s({}),C=s({}),{setFieldValidationConfig:D}=v$(),{dispatchFieldEvent:L}=Ak(),{clearErrors:I,setError:k}=Ye(),[$,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:gP.findAvailableSlot(n)}),I(i)):k(i,{type:"max",message:O.current.errorMessage||xm.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,aT().of(rT().shape({dataURL:Bx(),fileId:Bx(),fileName:Bx(),fileUrl:Bx(),uploadResponse:rT()})).test("is-empty-array",e?.errorMessage||xm.UPLOAD().REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",N.current.errorMessage||xm.UPLOAD().MAX_FILE_SIZE(N.current.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&N.current.maxSizeInKb)||w.filter((e=>e.status===yP.UPLOADED)).every((e=>{if("base64"===v.type&&e.dataURL)return wm.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||xm.UPLOAD().MAX_FILES(O.current.max),(e=>!(e&&Array.isArray(e)&&O.current.max)||e.length<=O.current.max)).test("no-interim-statuses",xm.UPLOAD().UPLOADING,(()=>{const e=new Set([yP.INJECTED,yP.INJECTING,yP.NONE,yP.UPLOAD_READY,yP.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(!(pP(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:yP.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(ZI,{children:t}):null;return t(n,{children:[e(_,{fallback:null,children:e(_P,{compressImages:!!h,fileTypeRule:T.current,hideThumbnail:g,id:i,maxFileSizeRule:N.current,upload:v,uploadRule:C.current,value:p})}),e(ne,{...E,accept:T.current.fileType?.map((e=>`.${e}`)).join(","),description:P(m),errorMessage:P($),fileItems:w.filter((({fileItem:e,status:t})=>!!e&&t!==yP.INJECTED&&t!==yP.INJECTING)).map((({fileItem:e})=>e)),id:i,maxFiles:O.current.max,onChange:e=>{F(e.map((e=>({addedFrom:"input",rawFile:e,slot:null,status:yP.NONE}))),w)},onDelete:e=>{M(w.map((t=>t.fileItem.id!==e.id?t:{...t,status:yP.TO_DELETE}))),I(i)},title:P(y),warning:P(S||A)})]})},bP=a({images:[],setImages:()=>null,errorCount:0,setErrorCount:()=>null,currentFileIds:[],setCurrentFileIds:()=>null}),AP=({children:t})=>{const[n,r]=o([]),[i,a]=o(0),[s,u]=o([]);return e(bP.Provider,{value:{images:n,setImages:r,errorCount:i,setErrorCount:a,currentFileIds:s,setCurrentFileIds:u},children:t})};var EP;!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}}(EP||(EP={}));const SP=["jpg","gif","png","heic","heif","webp"];var wP;!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"}(wP||(wP={}));var xP,MP={exports:{}},TP={exports:{}},OP={};var NP,CP,DP,LP,IP,kP,$P,RP,zP,FP,PP,ZP,UP,BP,jP={};
|
|
480
480
|
/** @license React v16.13.1
|
|
481
481
|
* react-is.development.js
|
|
482
482
|
*
|
|
@@ -982,7 +982,7 @@ object-assign
|
|
|
982
982
|
stroke: ${A["icon-primary"]};
|
|
983
983
|
stroke-width: 1;
|
|
984
984
|
}
|
|
985
|
-
`,sB=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=async e=>{const t=Array.from(e.target.files||[]);t.length&&setTimeout((()=>{f(t)}),100)},g=()=>h?.current?.click();return t(XU,{id:IA.generateId(u),children:[c.map(((n,r)=>n.status===wP.NONE?e(rB,{children:[...Array(4)].map(((t,n)=>e(nB,{},`dot-${n}`)))},r):n.status>wP.NONE||n.status===wP.ERROR_CUSTOM_MUTED?e(QU,{id:IA.generateId(u,`item-${r+1}`),"data-testid":IA.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(iB,{isSelected:a===r})},r):"reviewModal"===n.addedFrom||n.status<wP.NONE?t(QU,{id:IA.generateId(u,`item-${r+1}`),"data-testid":IA.generateId(u,`item-${r+1}`),type:"button","aria-label":`error with ${n.name}`,onClick:()=>d(r),error:!0,children:[e(iB,{isSelected:a===r}),e(eB,{})]},r):void 0)),(c.filter((({status:e,addedFrom:t})=>e>=wP.NONE||e===wP.ERROR_CUSTOM_MUTED||"reviewModal"===t)).length<l||!l)&&t(n,{children:[e(aB,{id:IA.generateId(u,"file-input"),"data-testid":IA.generateId(u,"file-input"),type:"file","aria-hidden":"true",tabIndex:-1,capture:o,ref:h,accept:i.map((e=>`.${e}`)).join(", "),onChange:m,multiple:p,value:""}),e(oB,{type:"button",id:IA.generateId(u,"add-image-button"),"data-testid":IA.generateId(u,"add-image-button"),"aria-label":"add image",styleType:"secondary",onClick:g,children:e(ce,{})})]})]})},uB=y((()=>import("./index.
|
|
985
|
+
`,sB=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=async e=>{const t=Array.from(e.target.files||[]);t.length&&setTimeout((()=>{f(t)}),100)},g=()=>h?.current?.click();return t(XU,{id:IA.generateId(u),children:[c.map(((n,r)=>n.status===wP.NONE?e(rB,{children:[...Array(4)].map(((t,n)=>e(nB,{},`dot-${n}`)))},r):n.status>wP.NONE||n.status===wP.ERROR_CUSTOM_MUTED?e(QU,{id:IA.generateId(u,`item-${r+1}`),"data-testid":IA.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(iB,{isSelected:a===r})},r):"reviewModal"===n.addedFrom||n.status<wP.NONE?t(QU,{id:IA.generateId(u,`item-${r+1}`),"data-testid":IA.generateId(u,`item-${r+1}`),type:"button","aria-label":`error with ${n.name}`,onClick:()=>d(r),error:!0,children:[e(iB,{isSelected:a===r}),e(eB,{})]},r):void 0)),(c.filter((({status:e,addedFrom:t})=>e>=wP.NONE||e===wP.ERROR_CUSTOM_MUTED||"reviewModal"===t)).length<l||!l)&&t(n,{children:[e(aB,{id:IA.generateId(u,"file-input"),"data-testid":IA.generateId(u,"file-input"),type:"file","aria-hidden":"true",tabIndex:-1,capture:o,ref:h,accept:i.map((e=>`.${e}`)).join(", "),onChange:m,multiple:p,value:""}),e(oB,{type:"button",id:IA.generateId(u,"add-image-button"),"data-testid":IA.generateId(u,"add-image-button"),"aria-label":"add image",styleType:"secondary",onClick:g,children:e(ce,{})})]})]})},uB=y((()=>import("./index.df1ee6f5.js"))),cB=[{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"}],lB=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(bP),{dispatchFieldEvent:M,addFieldEventListener:T,removeFieldEventListener:O}=Ak(),N=S$(b),[C,D]=o(w.length-1),[L,I]=o(!1),[k,R]=o(),z=!!w?.find((({status:e})=>e===wP.NONE)),[F,P]=o(cB[0].color),[Z,U]=o(!1),B=s(null),j=!!w?.find((({addedFrom:e,status:t})=>"reviewModal"===e&&t<=wP.NONE))||!w.length,V=d((e=>{e.detail.removePendingImages&&x((e=>e.filter((({status:e})=>e===wP.UPLOADED||e===wP.ERROR_CUSTOM_MUTED)))),y()}),[y,x]),G=e=>{!m||e.length+w.filter((({status:e,addedFrom:t})=>e>=wP.NONE||"reviewModal"===t)).length<=m?e.forEach((e=>{x((t=>{const n=EP.findAvailableSlot(t);return[...t,{id:Om(),file:e,name:e.name,dimensions:p,status:wP.NONE,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))})):x((t=>{const n=EP.findAvailableSlot(t);return[...t,{id:Om(),file:e[0],name:e[0].name,dimensions:p,status:wP.ERROR_EXCEED,uploadProgress:0,addedFrom:"reviewModal",slot:n}]}))},H=e=>{e&&(x((e=>e.map(((e,t)=>({...e,...t===C?{status:wP.TO_DELETE}:{}}))))),D(Math.max(0,C-1))),R(null)},Y=d((()=>{x((e=>e.filter((({status:e})=>e>=wP.NONE||e===wP.ERROR_CUSTOM_MUTED)).map((e=>{const t={...e};return e.drawingDataURL&&(t.dataURL=e.drawingDataURL),e.status<wP.UPLOAD_READY&&e.status>wP.NONE&&(t.status=wP.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=()=>{I(!0),P(cB[0].color)},K=async()=>{const{dataURL:e,drawing:t}=B.current?.export()||{},n=await pA.dataUrlToImage(e),r=await pA.resampleImage(n,{scale:96/n.width,type:wm.fileExtensionToMimeType(v)}),i=await wm.fileToDataUrl(r);x((n=>{const r=[...n];return r[C]={...r[C],thumbnailDataURL:i,drawingDataURL:e,drawing:t,status:f?wP.TO_RECOMPRESS:wP.EDITED},r})),I(!1),X()},J=()=>{X(),U(!0)},X=()=>{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((()=>{D(w.length-1)}),[w.length]),u((()=>{b?M("show-review-modal",h):N&&M("hide-review-modal",h)}),[b]);return e($,{id:IA.generateId(h,void 0,b?"show":"hide"),className:c?`${c}-review`:void 0,show:b,children:e(DU,{className:c?`${c}-review-modal-box`:void 0,imageReviewModalStyles:S,showCloseButton:!1,children:b?t(n,{children:[e(LU,{className:c?`${c}-header`:void 0,$drawActive:L,children:t(n,L?{children:[e(RU,{id:IA.generateId(h,"clear-drawing-button"),"data-testid":IA.generateId(h,"clear-drawing-button"),onClick:()=>R("clear-drawing"),children:"Clear"}),e(RU,{id:IA.generateId(h,"save-drawing"),"data-testid":IA.generateId(h,"save-drawing"),onClick:K,children:"Save"})]}:{children:[e(IU,{id:IA.generateId(h,"close-button"),"data-testid":IA.generateId(h,"close-button"),"aria-label":"exit review modal",onClick:()=>R("exit"),children:e(re,{type:"cross"})}),e(kU,{weight:"semibold",children:"Review photos"})]})}),t(zU,{children:[w.length>0&&e(VU,{className:c?`${c}-editor`:void 0,children:e(_,{fallback:null,children:e(uB,{baseImageDataURL:w[C]?.dataURL,drawing:w[C]?.drawing,color:L?F:void 0,erase:!!L&&Z,ref:B,maxSizeInKb:g})})}),w.length>0&&e(FU,{children:"Loading Preview..."}),!L&&w[C]?.status>=wP.NONE&&t(PU,{children:[t(ZU,{id:IA.generateId(h,"draw-button"),"data-testid":IA.generateId(h,"draw-button"),onClick:q,disabled:z,children:[e(BU,{$disabled:z}),e(UU,{weight:"semibold",$disabled:z,children:"Draw"})]}),t(ZU,{id:IA.generateId(h,"delete-button"),"data-testid":IA.generateId(h,"delete-button"),onClick:()=>R("delete"),disabled:z,children:[e(jU,{$disabled:z}),e(UU,{weight:"semibold",$disabled:z,children:"Delete"})]})]}),w[C]?.status<wP.NONE&&e(NU,{id:`${h}-photo-error`,image:w[C],accepts:i,maxSizeInKb:g,onClickOk:()=>H(!0),maxFilesErrorMessage:E,maxFiles:m})]}),e(GU,{className:c?`${c}-footer`:void 0,children:t(n,L?{children:[e(YU,{id:IA.generateId(h,"eraser-button"),"data-testid":IA.generateId(h,"eraser-button"),"aria-label":"eraser",onClick:J,children:e(WU,{$eraseMode:Z})}),e(KU,{children:cB.map((({color:t,colorScheme:n,label:r},i)=>e(JU,{id:IA.generateId(h,`palette-color-${i}`),"aria-label":`${r} brush`,$color:t,$colorScheme:n,onClick:()=>(e=>{X(),P(e)})(t),children:F===t&&e(qU,{$colorScheme:n})},t)))})]}:{children:[e(sB,{id:`${h}-image-thumbnails`,activeFileIndex:C,accepts:i,capture:a,maxFiles:m,images:w,onClickThumbnail:D,onSelectFile:G,multiple:A}),e(HU,{id:IA.generateId(h,"save-button"),"data-testid":IA.generateId(h,"save-button"),onClick:W,disabled:j,children:"Save"})]})}),e(CU,{images:w,show:k,onDecideClearDrawing:e=>{e&&B.current.clearDrawing(),R(null)},onDecideDelete:H,onDecideExit:e=>{e&&(x(w.filter((({addedFrom:e,status:t})=>t>=wP.UPLOADED||t<wP.NONE&&"dragInput"===e)).map((e=>({...e,drawingDataURL:void 0,drawing:void 0})))),y()),R(null)}})]}):e(n,{})})})},dB=y((()=>import("./index.dcdbe23e.js"))),fB=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(bP),D=S$(O),[L,I]=o([...SP]),[k,$]=o(0),[R,z]=o(0),[F,P]=o(!1),[Z,U]=o(!1),{setFieldValidationConfig:B}=v$(),{dispatchFieldEvent:j}=Ak(),V=x$();u((()=>{j("mount",E)}),[j,E]),u((()=>{if(!S&&!w){const e=Array.isArray(x)?x:[];if(!(pP(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||Om(),file:{},name:n,dimensions:{width:10,height:10},dataURL:r,status:wP.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),B(E,aT().of(rT().shape({fileName:Bx(),dataURL:Bx()})).test("is-empty-array",e?.errorMessage||xm.UPLOAD("photo").REQUIRED,(t=>!t||!e?.required||t.length>0)).test("max-size-in-kb",n?.errorMessage||xm.UPLOAD("photo").MAX_FILE_SIZE(n?.maxSizeInKb),(e=>!(e&&Array.isArray(e)&&n?.maxSizeInKb)||e.every((e=>wm.getFilesizeFromBase64(e.dataURL)<=1024*n?.maxSizeInKb)))),v)}),[v]),u((()=>{O.some((e=>e.status===wP.NONE))||(O.some(((e,t)=>{const n=D?.[t];if(e.status!==n?.status||e.dataURL!==n.dataURL)switch(e.status){case wP.COMPRESSED:case wP.CONVERTED:if(h&&!Z)return V()?U(!0):P(!0),!0}})),0===O.length&&U(!1))}),[O.map((e=>e.status)).join(","),O.map((e=>e.dataURL)).join(",")]);const G=(e=!1)=>{e?h&&(document.body.classList.remove("lifesg-ds-overlay-open"),U(!0)):N((e=>e.map((e=>e.status<wP.UPLOAD_READY&&e.status>wP.NONE?{...e,status:wP.UPLOAD_READY}:e)))),P(!1)};return t(n,{children:[e(_,{fallback:null,children:e(dB,{accepts:L,compress:!!c,crop:!!d,dimensions:p,editImage:h,id:E,maxSizeInKb:R,outputType:g,upload:y,value:x})}),e(AU,{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(ET,{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:()=>G(!0)},{id:"skip",title:"Skip",buttonStyle:"secondary",onClick:()=>G()}]}),(()=>{const t=v?.find((e=>"max"in e));return e(lB,{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})})()]})},pB=D`
|
|
986
986
|
border: ${E["width-010"]} ${E.solid} ${A["border-focus"]};
|
|
987
987
|
box-shadow: none;
|
|
988
988
|
`,hB=D`
|
|
@@ -1061,7 +1061,7 @@ object-assign
|
|
|
1061
1061
|
${e=>D`
|
|
1062
1062
|
margin-left: ${e.$readOnly?S["spacing-4"]:S["spacing-12"]};
|
|
1063
1063
|
`}
|
|
1064
|
-
`,vB=n=>{const{id:r,"data-testid":i,className:a,disabled:o,readOnly:s,onFocus:u,value:c,placeholder:l,error:d}=n;return t(gB,{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(yB,l&&!c?{$placeholder:!0,$disabled:o,children:l}:{$disabled:o,children:c}),e(_B,{$disabled:o,$readOnly:s,"aria-hidden":"true",children:e(de,{})})]})},bB=t=>{const{id:n,label:r,className:i,locationInputPlaceholder:a="",onFocus:o,value:s,errorMessage:u,disabled:c,readOnly:l}=t;return e(Q.CustomField,{id:IA.generateId(n,"location-input"),"data-testid":IA.generateId(n,"location-input"),label:r,errorMessage:u,children:e(vB,{id:IA.generateId(n,"location-input-base"),"data-testid":IA.generateId(n,"location-input-base"),disabled:c,readOnly:l,placeholder:a,onFocus:o,value:s,error:!!u,className:i})})},AB=y((()=>import("./location-modal.
|
|
1064
|
+
`,vB=n=>{const{id:r,"data-testid":i,className:a,disabled:o,readOnly:s,onFocus:u,value:c,placeholder:l,error:d}=n;return t(gB,{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(yB,l&&!c?{$placeholder:!0,$disabled:o,children:l}:{$disabled:o,children:c}),e(_B,{$disabled:o,$readOnly:s,"aria-hidden":"true",children:e(de,{})})]})},bB=t=>{const{id:n,label:r,className:i,locationInputPlaceholder:a="",onFocus:o,value:s,errorMessage:u,disabled:c,readOnly:l}=t;return e(Q.CustomField,{id:IA.generateId(n,"location-input"),"data-testid":IA.generateId(n,"location-input"),label:r,errorMessage:u,children:e(vB,{id:IA.generateId(n,"location-input-base"),"data-testid":IA.generateId(n,"location-input-base"),disabled:c,readOnly:l,placeholder:a,onFocus:o,value:s,error:!!u,className:i})})},AB=y((()=>import("./location-modal.b47d92b7.js")));class EB extends Error{code;message;constructor(e){super(),Object.assign(this,e)}}const SB=C(N.BodyMD)`
|
|
1065
1065
|
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
1066
1066
|
`,wB=C(pe)`
|
|
1067
1067
|
margin-right: ${S["spacing-4"]};
|
|
@@ -1114,4 +1114,4 @@ object-assign
|
|
|
1114
1114
|
`,UB=C.div`
|
|
1115
1115
|
flex: 1;
|
|
1116
1116
|
`,BB=t=>{const{sectionSchema:{children:n,layoutType:r,customOptions:i={gridType:"v2"}},...a}=t;switch(r){case"grid":return(()=>{const t="v3"===i.gridType?PB:ZB,r="v3"===i.gridType?"grid":"flex";return e(P.Section,{children:e(t,{type:r,children:e(FB,{...a,children:n})})})})();case"contain":return e(P.Content,{children:e(UB,{children:e(FB,{...a,children:n})})});default:return e(FB,{...a,children:n})}},jB=()=>{const{formSchema:{sections:r,overrides:i},overrideSchema:a}=y$();return e(n,{children:(()=>{const o=a(r,i);return o?Object.entries(o).map((([t,n],r)=>e(BB,{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"}),"."]})})()})},VB=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}=Ak(),{setCustomComponents:M}=vk(),{setSubmitHandler:T,setWrapInForm:O}=A$(),{addWarnings:N,performSoftValidation:C,softValidationSchema:D,hardValidationSchema:L,rebuildValidationSchema:I,yupId:k}=w$(),$=function(e={}){const t=i.useRef(void 0),n=i.useRef(void 0),[r,a]=i.useState({isDirty:!1,isValidating:!1,isLoading:ft(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ft(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Ut(e),formState:r});const o=t.current.control;return o._options=e,et({subject:o._subjects.state,next:e=>{Je(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&&!Ot(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=qe(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&&jt({},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:Vt((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]=ot(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}=y$(),{reset:z,handleSubmit:F,getValues:P,setValue:Z,setError:U,trigger:B,formState:j,clearErrors:V}=$,{resetFields:G,setFields:H,getFormValues:Y,registeredFields:W}=_$($),q=s(W),{checkIsFormValid:K}=((e,t)=>{const{data:n,onChange:r,onValueChange:i}=e,{stripUnknown:a}=n||{},{hardValidationSchema:c}=w$(),{formValidationConfig:l}=v$(),{watch:f,getValues:p,formState:h,clearErrors:m}=t,{setFields:g,setField:y,getFormValues:_}=_$(t),[v,b]=o({}),[A,E]=o(!1),S=S$(l),w=S$(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&&ok(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);ok(t,n)||E(!0)}}),[l]),u((()=>{A&&w!==c&&O.current().then((()=>E(!1)))}),[A,c]),u((()=>{const e=h.errors;if(e&&!DA(e)){const e=f((e=>{const t=Object.fromEntries(Object.entries(h.errors).filter((([e,t])=>"api"===t.type)));t&&!DA(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:j.isDirty,isValid:K,validate:B,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)=>{tk.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())}),[]),Us((()=>{z(ks(_))}),[_]),Zs((()=>{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(We,{...$,children:e(ie,{id:ne,"data-testid":v?IA.generateId(v,"frontend-engine"):ne,className:re,noValidate:!0,onSubmit:F(X,Q),ref:a,children:e(jB,{})})}):t(n,{children:["Missing ",e("code",{children:"data"})," prop, unable to render Frontend Engine."]})})),GB=h(((t,n)=>e(_k,{children:e(VB,{...t,ref:n})})));export{Cl as A,bT as D,yP as E,hP as F,EB as G,pA as I,HI as L,YI as O,ET as P,ZI as S,IA as T,Ye as a,Ak as b,xm as c,wm as d,bP as e,wP as f,Om as g,Gt as h,VI as i,GI as j,Tm as k,UI as l,x$ as m,b$ as n,GB as o,R$ as p,LB as q,S$ as u};
|
|
1117
|
-
//# sourceMappingURL=index.
|
|
1117
|
+
//# sourceMappingURL=index.cb4c93a5.js.map
|