(()=>{var e,t,r={7948:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},1291:(e,t,r)=>{"use strict";const o=r(6150),n=r(6086);class s extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t=(e=[...e].map((e=>e instanceof Error?e:null!==e&&"object"==typeof e?Object.assign(new Error(e.message),e):new Error(e)))).map((e=>"string"==typeof e.stack?n(e.stack).replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""):String(e))).join("\n");t="\n"+o(t,4),super(t),this.name="AggregateError",Object.defineProperty(this,"_errors",{value:e})}*[Symbol.iterator](){for(const e of this._errors)yield e}}e.exports=s},6086:(e,t,r)=>{"use strict";const o=r(1209),n=/\s+at.*(?:\(|\s)(.*)\)?/,s=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,a=void 0===o.homedir?"":o.homedir();e.exports=(e,t)=>(t=Object.assign({pretty:!1},t),e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(n);if(null===t||!t[1])return!0;const r=t[1];return!r.includes(".app/Contents/Resources/electron.asar")&&!r.includes(".app/Contents/Resources/default_app.asar")&&!s.test(r)})).filter((e=>""!==e.trim())).map((e=>t.pretty?e.replace(n,((e,t)=>e.replace(t,t.replace(a,"~")))):e)).join("\n"))},3531:e=>{e.exports=function(e){return btoa(e)}},8879:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",s="minute",a="hour",i="day",c="week",u="month",d="quarter",l="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,r){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),o=Math.floor(r/60),n=r%60;return(t<=0?"+":"-")+g(o,2,"0")+":"+g(n,2,"0")},m:function e(t,r){if(t.date(){"use strict";var t,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,o){function n(r){e.removeListener(t,s),o(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,r)}(e,n,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,r,o){var n,s,a,u;if(i(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]),void 0===a)a=s[t]=r,++e._eventsCount;else if("function"==typeof a?a=s[t]=o?[r,a]:[a,r]:o?a.unshift(r):a.push(r),(n=c(e))>0&&a.length>n&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=a.length,u=d,console&&console.warn&&console.warn(u)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=d.bind(o);return n.listener=r,o.wrapFn=n,n}function p(e,t,r){var o=e._events;if(void 0===o)return[];var n=o[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var i=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw i.context=a,i}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,d=h(c,u);for(r=0;r=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},9378:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var o,n,s;if(Array.isArray(t)){if((o=t.length)!=r.length)return!1;for(n=o;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((o=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(r,s[n]))return!1;for(n=o;0!=n--;){var a=s[n];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},6150:e=>{"use strict";e.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},"string"!=typeof e)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if("number"!=typeof t)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if("string"!=typeof r.indent)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(0===t)return e;const o=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(o,r.indent.repeat(t))}},9522:e=>{"use strict";var t=e.exports=function(e,t,o){"function"==typeof t&&(o=t,t={}),r(t,"function"==typeof(o=t.cb||o)?o:o.pre||function(){},o.post||function(){},e,"",e)};function r(e,o,n,s,a,i,c,u,d,l){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var p in o(s,a,i,c,u,d,l),s){var f=s[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var h=0;h1){t[0]=t[0].slice(0,-1);for(var o=t.length-1,n=1;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=f-h,k=Math.floor,C=String.fromCharCode;function T(e){throw new RangeError(S[e])}function j(e,t){for(var r=[],o=e.length;o--;)r[o]=t(e[o]);return r}function O(e,t){var r=e.split("@"),o="";return r.length>1&&(o=r[0]+"@",e=r[1]),o+j((e=e.replace(E,".")).split("."),t).join(".")}function x(e){for(var t=[],r=0,o=e.length;r=55296&&n<=56319&&r>1,e+=k(e/t);e>P*m>>1;o+=f)e=k(e/P);return k(o+(P+1)*e/(e+y))},D=function(e){var t=[],r=e.length,o=0,n=_,s=v,a=e.lastIndexOf(b);a<0&&(a=0);for(var i=0;i=128&&T("not-basic"),t.push(e.charCodeAt(i));for(var c=a>0?a+1:0;c=r&&T("invalid-input");var y=N(e.charCodeAt(c++));(y>=f||y>k((p-o)/d))&&T("overflow"),o+=y*d;var g=l<=s?h:l>=s+m?m:l-s;if(yk(p/w)&&T("overflow"),d*=w}var $=t.length+1;s=A(o-u,$,0==u),k(o/$)>p-n&&T("overflow"),n+=k(o/$),o%=$,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},R=function(e){var t=[],r=(e=x(e)).length,o=_,n=0,s=v,a=!0,i=!1,c=void 0;try{for(var u,d=e[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var l=u.value;l<128&&t.push(C(l))}}catch(e){i=!0,c=e}finally{try{!a&&d.return&&d.return()}finally{if(i)throw c}}var y=t.length,g=y;for(y&&t.push(b);g=o&&Ok((p-n)/N)&&T("overflow"),n+=(w-o)*N,o=w;var D=!0,R=!1,M=void 0;try{for(var L,U=e[Symbol.iterator]();!(D=(L=U.next()).done);D=!0){var q=L.value;if(qp&&T("overflow"),q==o){for(var z=n,F=f;;F+=f){var V=F<=s?h:F>=s+m?m:F-s;if(z>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function F(e){for(var t="",r=0,o=e.length;r=194&&n<224){if(o-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&n)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(n>=224){if(o-r>=9){var a=parseInt(e.substr(r+4,2),16),i=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&n)<<12|(63&a)<<6|63&i)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=F(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,z).replace(t.PCT_ENCODED,n)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,z).replace(t.PCT_ENCODED,n)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,z).replace(t.PCT_ENCODED,n)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,z).replace(t.PCT_ENCODED,n)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,z).replace(t.PCT_ENCODED,n)),e}function K(e){return e.replace(/^0*(.*)/,"$1")||"0"}function G(e,t){var r=e.match(t.IPV4ADDRESS)||[],o=d(r,2)[1];return o?o.split(".").map(K).join("."):e}function H(e,t){var r=e.match(t.IPV6ADDRESS)||[],o=d(r,3),n=o[1],s=o[2];if(n){for(var a=n.toLowerCase().split("::").reverse(),i=d(a,2),c=i[0],u=i[1],l=u?u.split(":").map(K):[],p=c.split(":").map(K),f=t.IPV4ADDRESS.test(p[p.length-1]),h=f?7:8,m=p.length-h,y=Array(h),g=0;g1){var b=y.slice(0,v.index),w=y.slice(v.index+v.length);_=b.join(":")+"::"+w.join(":")}else _=y.join(":");return s&&(_+="%"+s),_}return e}var B=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,J=void 0==="".match(/(){0}/)[1];function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},o=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var n=e.match(B);if(n){J?(r.scheme=n[1],r.userinfo=n[3],r.host=n[4],r.port=parseInt(n[5],10),r.path=n[6]||"",r.query=n[7],r.fragment=n[8],isNaN(r.port)&&(r.port=n[5])):(r.scheme=n[1]||void 0,r.userinfo=-1!==e.indexOf("@")?n[3]:void 0,r.host=-1!==e.indexOf("//")?n[4]:void 0,r.port=parseInt(n[5],10),r.path=n[6]||"",r.query=-1!==e.indexOf("?")?n[7]:void 0,r.fragment=-1!==e.indexOf("#")?n[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?n[4]:void 0)),r.host&&(r.host=H(G(r.host,o),o)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var s=q[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)V(r,o);else{if(r.host&&(t.domainHost||s&&s.domainHost))try{r.host=U.toASCII(r.host.replace(o.PCT_ENCODED,F).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}s&&s.parse&&s.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function Y(e,t){var r=!1!==t.iri?u:c,o=[];return void 0!==e.userinfo&&(o.push(e.userinfo),o.push("@")),void 0!==e.host&&o.push(H(G(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(o.push(":"),o.push(String(e.port))),o.length?o.join(""):void 0}var X=/^\.\.?\//,Z=/^\/\.(\/|$)/,Q=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(Q))e=e.replace(Q,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var o=r[0];e=e.slice(o.length),t.push(o)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,o=[],n=q[(t.scheme||e.scheme||"").toLowerCase()];if(n&&n.serialize&&n.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||n&&n.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,F).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(o.push(e.scheme),o.push(":"));var s=Y(e,t);if(void 0!==s&&("suffix"!==t.reference&&o.push("//"),o.push(s),e.path&&"/"!==e.path.charAt(0)&&o.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||n&&n.absolutePath||(a=te(a)),void 0===s&&(a=a.replace(/^\/\//,"/%2F")),o.push(a)}return void 0!==e.query&&(o.push("?"),o.push(e.query)),void 0!==e.fragment&&(o.push("#"),o.push(e.fragment)),o.join("")}function oe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={};return arguments[3]||(e=W(re(e,r),r),t=W(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=te(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=te(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=te(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function ne(e,t,r){var o=a({scheme:"null"},r);return re(oe(W(e,o),W(t,o),o,!0),o)}function se(e,t){return"string"==typeof e?e=re(W(e,t),t):"object"===o(e)&&(e=W(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(W(e,r),r):"object"===o(e)&&(e=re(e,r)),"string"==typeof t?t=re(W(t,r),r):"object"===o(t)&&(t=re(t,r)),e===t}function ie(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,F)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},de={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function le(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var pe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=le(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(le(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),o=d(r,2),n=o[0],s=o[1];e.path=n&&"/"!==n?n:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},fe={scheme:"wss",domainHost:pe.domainHost,parse:pe.parse,serialize:pe.serialize},he={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),ve="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",_e=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),be="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",we=new RegExp(me,"g"),$e=new RegExp(ge,"g"),Ee=new RegExp(t("[^]",ve,"[\\.]",'[\\"]',_e),"g"),Se=new RegExp(t("[^]",me,be),"g"),Pe=Se;function ke(e){var t=F(e);return t.match(we)?t:e}var Ce={scheme:"mailto",parse:function(e,t){var r=e,o=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var n=!1,s={},a=r.query.split("&"),i=0,c=a.length;i{"use strict";let o;r.d(t,{U:()=>n});try{o=new RegExp("\\[(?=\"|'|\\d)|\\.|(?<=\"|'|\\d)]+","g")}catch(e){o=/\[|\.|]+/g}function n(e,t){if(""===t||"."===t)return e;if(null===t||null==t)return;return(Array.isArray(t)?t:t.split(o).filter((e=>e)).map((e=>e.replace(/'|"/g,"")))).reduce(((e,t)=>e&&e[t]),e)}},3807:(e,t,r)=>{"use strict";r.d(t,{tY:()=>R,a8:()=>M,vs:()=>z});var o=r(7128),n=r(6933);function s(e){if(!(0,n.Kn)(e))return!1;const t=Object.keys(e);if(!t.some((e=>e.startsWith("@"))))return!1;return 0===t.filter((e=>!e.startsWith("@")&&"_metadata"!==e)).length}function a(e){if(Array.isArray(e))return e.map((e=>a(e)));if((0,n.Kn)(e)){const t=Object.assign({},e);return Object.keys(t).forEach((e=>{void 0===t[e]?delete t[e]:t[e]=a(t[e])})),t}return e}var i=r(1291),c=r.n(i),u=r(2501);class d extends u.CustomError{constructor(e,t=[]){super(`/${t.join("/")} ${e}.`)}}function l(e){const t=[];return e.forEach((e=>{e instanceof c()?t.push(...e):t.push(e)})),t}function p(e){const t=(0,n.X6)(e);return"object"===t&&Object.keys(e).some((e=>e.startsWith("@")))?"directive":t}const f={};function h(e,t=[]){if(!s(e)&&!(0,n.Kn)(e)){const r=(0,n.X6)(e);throw new d(`should be a directive object but it is ${C(r)} ${r}`,t)}const r=Object.keys(e),o=r.filter((e=>e.startsWith("@")));if(o.length>1)throw new d(`should only have one @-prefixed key but it has ${o.length} keys`,t);if(r.filter((e=>!e.startsWith("@")&&"_metadata"!==e)).length>0)throw new d(`should only have one @-prefixed key but it has ${r.length} keys`,t);const a=o[0],i=f[a];if("function"!=typeof i)throw new d(`has an invalid directive: ${a}`,t);i(e[a],t)}function m(e,t=[]){const r=p(e);switch(r){case"directive":return h(e,t);case"object":case"array":case"boolean":case"string":case"number":case"null":return;default:throw new d(`should be a mapping directive or a JSON value but it is ${C(r)} ${r}`,t)}}function y(e,t=[]){const r=p(e);switch(r){case"directive":return h(e,t);case"string":return;default:throw new d(`should be a string or a mapping directive but it is ${C(r)} ${r}`,t)}}function g(e,t=[]){const r=p(e);switch(r){case"directive":return h(e,t);case"object":return E(e,t);default:throw new d(`should be a object or a mapping directive but it is ${C(r)} ${r}`,t)}}function v(...e){return(t,r=[])=>{e.forEach((e=>{e(t,r)}))}}function _(e,t){return(r,o=[])=>{if("string"==typeof r&&r.lengtht)throw new d(`should be a string of length ${t} or less`,o)}}function b(e,t=[]){const r=p(e);if("string"!==r)throw new d(`should be a string but it is ${C(r)} ${r}`,t)}function w(...e){return(t,r=[])=>{b(t,r);const o=t;if(!e.includes(o.toLowerCase()))throw new d(`should be one of ${e.join(", ")} but it is ${JSON.stringify(o)}`,r)}}function $(e,t=[]){const r=p(e);if("boolean"!==r)throw new d(`should be a boolean but it is ${C(r)} ${r}`,t)}function E(e,t=[]){const r=p(e);if("object"!==r)throw new d(`should be an object but it is ${C(r)} ${r}`,t);const o=e,n=Object.keys(o),s=n.find((e=>"@"===e.charAt(0)));if(s)throw new d(`shouldn't have directive (@-prefixed) keys but it has ${JSON.stringify(s)}`,t);const a=[];if(n.forEach((e=>{try{T(o[e],[...t,e])}catch(e){a.push(e)}})),a.length)throw new(c())(l(a))}function S(e,t,r=[]){E(e,r);const o=[],n=e;if(Object.entries(t).forEach((([e,{required:t,optional:s}])=>{try{if(t){if(void 0===n[e])throw new d(`should have field ${JSON.stringify(e)} but it doesn't`,r);t(n[e],[...r,e])}else s&&void 0!==n[e]&&s(n[e],[...r,e])}catch(e){o.push(e)}})),o.length)throw new(c())(l(o))}function P(e,t=[]){const r=(0,n.X6)(e);if("array"!==r)throw new d(`should be an array but it is ${C(r)} ${r}`,t)}function k(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{f[e]=(r,o=[])=>{try{t(r,[...o,e])}catch(e){const t=e;if(e instanceof d||e instanceof c())throw e;throw new d(t.message,o)}}}))}function C(e){switch(e.charAt(0)){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}}function T(e,t=[]){switch(p(e)){case"directive":return h(e,t);case"object":return E(e,t);case"array":return P(e,t);default:return null}}function j(e,t=!0){return null==e?t?[]:e:(0,n.kJ)(e)?e:[e]}k("@if",((e,t)=>{S(e,{exists:{optional:m},then:{optional:m},else:{optional:m}},t)})),k("@case",((e,t)=>{S(e,{operator:{optional:b},value:{optional:y}},t)})),k("@replace",((e,t)=>{S(e,{pattern:{required:v(b,_(1,R))},replacement:{optional:v(b,_(0,M))},value:{required:y},ignorecase:{optional:$},global:{optional:$}},t)})),k("@arrayPath",((e,t)=>{const r=e;P(r,t),y(r[0],t),T(r[1],t)})),k("@path",((e,t)=>{y(e,t)})),k("@json",((e,t)=>{S(e,{value:{required:m},mode:{required:w("encode","decode")}},t)})),k("@flatten",((e,t)=>{S(e,{separator:{optional:b},value:{required:m}},t)})),k("@merge",((e,t)=>{S(e,{direction:{optional:w("left","right")},objects:{required:P}},t);e.objects.forEach((e=>{g(e)}))})),k("@template",((e,t)=>{y(e,t)})),k("@literal",((e,t)=>{m(e,t)})),k("@transform",((e,t)=>{S(e,{apply:{required:g},mapping:{required:g}},t)})),k("@excludeWhenNull",((e,t)=>{m(e,t)}));const O=(e,t="",r=".",o=!1)=>(0,n.Kn)(e)||!o&&(0,n.kJ)(e)?Object.entries(e).reduce(((e,[n,s])=>({...e,...O(s,t?`${t}${r}${n}`:n,r,o)})),{}):{[t]:e},x="__segment_internal_directive",N={},I=/^@[a-z][a-zA-Z0-9]+$/;function A(e,t){if(!I.exec(e))throw new Error(`"${e}" is an invalid directive name`);N[e]=t}function D(e,t){A(e,((r,o)=>{const s=q(r,o);if("string"!=typeof s)throw new Error(`${e}: expected string, got ${(0,n.X6)(s)}`);return t(s,o)}))}A("@if",((e,t)=>{let r=!1;if(!(0,n.Kn)(e))throw new Error('@if requires an object with an "exists" key');if(!e.exists&&!e.blank)throw new Error('@if requires an "exists" key or a "blank" key');if(void 0!==e.exists){const o=q(e.exists,t);r=null!=o}else if(void 0!==e.blank){const o=q(e.blank,t);r=null!=o&&""!=o}return r&&void 0!==e.then?q(e.then,t):!r&&e.else?q(e.else,t):void 0})),A("@case",((e,t)=>{if(!(0,n.Kn)(e))throw new Error('@case requires an object with a "operator" key');if(!e.operator)throw new Error('@case requires a "operator" key');const r=e.operator;if(e.value){const o=q(e.value,t);if("string"==typeof o)switch(r){case"lower":return o.toLowerCase();case"upper":return o.toUpperCase();default:throw new Error('operator key should have a value of "lower" or "upper"')}return o}}));const R=10,M=10;function L(e,t,r,o){if(t.length>R)throw new Error(`@replace requires a "pattern" less than ${R} characters`);if(r.length>M)throw new Error(`@replace requires a "replacement" less than ${M} characters`);return t=t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),e.replace(new RegExp(t,o),r)}function U(e){let t={...e};if(Object.keys(e).includes(x)){const r={};for(const t in e)t!==x&&(r[t]=e[t]);if(t=e[x],Object.keys(t).length>1)throw new Error("The root mapping must only have a single directive object");const o=t[Object.keys(t)[0]];if(!o||"object"!=typeof o)throw new Error("The root directive must be an object");o.mapping=r}return t}function q(e,t){if(!(0,n.Kn)(e)&&!(0,n.kJ)(e))return e;if(s(e))return function(e,t){const r=Object.keys(e).find((e=>e.startsWith("@"))),o=N[r],s=e[r];if("function"!=typeof o)throw new Error(`${r} is not a valid directive, got ${(0,n.X6)(o)}`);return o(s,t)}(e,t);if(Array.isArray(e))return e.map((e=>q(e,t)));const r={};for(const o of Object.keys(e))r[o]=q(e[o],t);return r}function z(e,t={}){const r=(0,n.X6)(t);if("object"!==r)throw new Error(`data must be an object, got ${r}`);const o=U(e);T(o);return a(q(o,t))}A("@replace",((e,t)=>{if(!(0,n.Kn)(e))throw new Error('@replace requires an object with a "pattern" key');if(!e.pattern)throw new Error('@replace requires a "pattern" key');null==e.replacement&&(e.replacement=""),e.pattern2&&null==e.replacement2&&(e.replacement2=""),null==e.ignorecase&&(e.ignorecase=!1),null==e.global&&(e.global=!0);const r=e.pattern,o=e.replacement,s=e.ignorecase,a=e.global;if(e.value){let n=q(e.value,t),i="";if("boolean"!=typeof n&&"number"!=typeof n||(n=String(n)),"string"==typeof n&&"string"==typeof r&&"string"==typeof o&&"boolean"==typeof s&&"boolean"==typeof a){let t="";a&&(t+="g"),s&&(t+="i"),i=L(n,r,o,t),e.pattern2&&"string"==typeof e.pattern2&&"string"==typeof e.replacement2&&(i=L(i,e.pattern2,e.replacement2,t))}return i}})),A("@arrayPath",((e,t)=>{if(!Array.isArray(e))throw new Error(`@arrayPath expected array, got ${(0,n.X6)(e)}`);const[r,s]=e,a="string"==typeof r?(0,o.U)(t,r.replace("$.","")):q(r,t);return["object","array"].includes((0,n.X6)(a))&&"object"===(0,n.X6)(s)&&Object.keys(s).length>0?j(a).map((e=>q(s,e))):a})),D("@path",((e,t)=>(0,o.U)(t,e.replace("$.","")))),D("@template",((e,t)=>function(e,t={}){if("string"!=typeof e)throw new TypeError(`Invalid template! Template should be a "string" but ${(0,n.X6)(e)} was given.`);function r(e){return r=>(r=r.slice(e,-e).trim(),(0,o.U)(t,r)??"")}return e.replace(/\{\{\{([^}]+)\}\}\}/g,r(3)).replace(/\{\{([^}]+)\}\}/g,r(2))}(e,t))),A("@literal",((e,t)=>q(e,t))),A("@flatten",((e,t)=>{if(!(0,n.Kn)(e))throw new Error('@flatten requires an object with a "separator" key');if(!e.separator)throw new Error('@flatten requires a "separator" key');const r=q(e.separator,t);if("string"!=typeof r)throw new Error("@flatten requires a string separator");const o=q(e.value,t);return O(o,"",r,Boolean(e.omitArrays))})),A("@json",((e,t)=>{if(!(0,n.Kn)(e))throw new Error('@json requires an object with a "value" key');if(!e.mode)throw new Error('@json requires a "mode" key');if(!e.value)throw new Error('@json requires a "value" key');const r=q(e.value,t);return"encode"===e.mode?JSON.stringify(r):"decode"===e.mode?"string"==typeof r?JSON.parse(r):r:void 0})),A("@merge",((e,t)=>{if(!(0,n.Kn)(e))throw new Error('@merge requires an object with an "objects" key and a "direction" key');if(!e.direction)throw new Error('@merge requires a "direction" key');const r=q(e.direction,t);if(!e.objects)throw new Error('@merge requires a "objects" key');if(!Array.isArray(e.objects))throw new Error("@merge: expected opts.array, got "+typeof e.objects);const o=e.objects.map((e=>q(e,t)));return"left"===r&&o.reverse(),Object.assign({},...o)})),A("@transform",((e,t)=>{if(!(0,n.Kn)(e))throw new Error('@transform requires an object with an "apply" key and a "mapping" key');if(!e.mapping)throw new Error('@transform requires a "mapping" key');if(!e.apply)throw new Error('@transform requires a "apply" key');if(!(0,n.Kn)(e.apply))throw new Error('@transform "apply" key should be an object');const r=z(e.apply,t);return q(e.mapping,r)})),A("@excludeWhenNull",((e,t)=>{const r=q(e,t);if(null!==r)return r}))},6933:(e,t,r)=>{"use strict";function o(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function n(e){return"object"===o(e)}function s(e){return Array.isArray(e)}r.d(t,{Kn:()=>n,X6:()=>o,kJ:()=>s})},1745:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(s,a),time:r(c,u),"date-time":r((function(e){const t=e.split(d);return 2===t.length&&s(t[0])&&c(t[1],!0)}),l),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return p.test(e)&&f.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(y.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:m},double:{type:"number",validate:m},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=o.exec(e);if(!t)return!1;const r=+t[1],s=+t[2],a=+t[3];return s>=1&&s<=12&&a>=1&&a<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:n[s])}function a(e,t){if(e&&t)return e>t?1:e(t=o[1]+o[2]+o[3]+(o[4]||""))?1:e{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1745),n=r(373),s=r(9143),a=new s.Name("fullFormats"),i=new s.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return u(e,t,o.fullFormats,a),e;const[r,s]="fast"===t.mode?[o.fastFormats,i]:[o.fullFormats,a];return u(e,t.formats||o.formatNames,r,s),t.keywords&&n.default(e),e};function u(e,t,r,o){var n,a;null!==(n=(a=e.opts.code).formats)&&void 0!==n||(a.formats=s._`require("ajv-formats/dist/formats").${o}`);for(const o of t)e.addFormat(o,r[o])}c.get=(e,t="full")=>{const r=("fast"===t?o.fastFormats:o.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},373:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const o=r(3944),n=r(9143),s=n.operators,a={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},i={message:({keyword:e,schemaCode:t})=>n.str`should be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${a[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:i,code(e){const{gen:t,data:r,schemaCode:s,keyword:i,it:c}=e,{opts:u,self:d}=c;if(!u.validateFormats)return;const l=new o.KeywordCxt(c,d.RULES.all.format.definition,"format");function p(e){return n._`${e}.compare(${r}, ${s}) ${a[i].fail} 0`}l.$data?function(){const r=t.scopeValue("formats",{ref:d.formats,code:u.code.formats}),o=t.const("fmt",n._`${r}[${l.schemaCode}]`);e.fail$data(n.or(n._`typeof ${o} != "object"`,n._`${o} instanceof RegExp`,n._`typeof ${o}.compare != "function"`,p(o)))}():function(){const r=l.schema,o=d.formats[r];if(!o||!0===o)return;if("object"!=typeof o||o instanceof RegExp||"function"!=typeof o.compare)throw new Error(`"${i}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:o,code:u.code.formats?n._`${u.code.formats}${n.getProperty(r)}`:void 0});e.fail$data(p(s))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},3944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const o=r(3993),n=r(7578),s=r(242),a=r(2081),i=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends o.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var d=r(5344);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var l=r(9143);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}})},9782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class o extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=o;class n extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof o&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let o=0;for(;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const o=r(9782),n=r(8167);var s=r(9782);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var a=r(8167);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new o._Code(">"),GTE:new o._Code(">="),LT:new o._Code("<"),LTE:new o._Code("<="),EQ:new o._Code("==="),NEQ:new o._Code("!=="),NOT:new o._Code("!"),OR:new o._Code("||"),AND:new o._Code("&&"),ADD:new o._Code("+")};class i{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends i{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof o._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof o.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,t),this}get names(){return O(this.lhs instanceof o.Name?{}:{...this.lhs.names},this.rhs)}}class d extends u{constructor(e,t,r,o){super(e,r,o),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends i{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends i{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof o._CodeOrName?this.code.names:{}}}class m extends i{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let o=r.length;for(;o--;){const n=r[o];n.optimizeNames(e,t)||(N(e,n.names),r.splice(o,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>j(e,t.names)),{})}}class y extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends m{}class v extends y{}v.kind="else";class _ extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(I(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){const e=super.names;return O(e,this.condition),this.else&&j(e,this.else.names),e}}_.kind="if";class b extends y{}b.kind="for";class w extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return j(super.names,this.iteration.names)}}class $ extends b{constructor(e,t,r,o){super(),this.varKind=e,this.name=t,this.from=r,this.to=o}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:o,to:s}=this;return`for(${t} ${r}=${o}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=O(super.names,this.from);return O(e,this.to)}}class E extends b{constructor(e,t,r,o){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return j(super.names,this.iterable.names)}}class S extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class P extends m{render(e){return"return "+super.render(e)}}P.kind="return";class k extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,o;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(o=this.finally)||void 0===o||o.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&j(e,this.catch.names),this.finally&&j(e,this.finally.names),e}}class C extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}C.kind="catch";class T extends y{render(e){return"finally"+super.render(e)}}T.kind="finally";function j(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function O(e,t){return t instanceof o._CodeOrName?j(e,t.names):e}function x(e,t,r){return e instanceof o.Name?s(e):(n=e)instanceof o._Code&&n._items.some((e=>e instanceof o.Name&&1===t[e.str]&&void 0!==r[e.str]))?new o._Code(e._items.reduce(((e,t)=>(t instanceof o.Name&&(t=s(t)),t instanceof o._Code?e.push(...t._items):e.push(t),e)),[])):e;var n;function s(e){const o=r[e.str];return void 0===o||1!==t[e.str]?e:(delete t[e.str],o)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function I(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:o._`!${M(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,o){const n=this._scope.toName(t);return void 0!==r&&o&&(this._constants[n.str]=r),this._leafNode(new c(e,n,r)),n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new u(e,t,r))}add(e,r){return this._leafNode(new d(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==o.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,n]of e)t.length>1&&t.push(","),t.push(r),(r!==n||this.opts.es5)&&(t.push(":"),(0,o.addCodeArg)(t,n));return t.push("}"),new o._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(_,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,o,s=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const a=this._scope.toName(e);return this._for(new $(s,a,t,r),(()=>o(a)))}forOf(e,t,r,s=n.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof o.Name?t:this.var("_arr",t);return this.forRange("_i",0,o._`${e}.length`,(t=>{this.var(a,o._`${e}[${t}]`),r(a)}))}return this._for(new E("of",s,a,t),(()=>r(a)))}forIn(e,t,r,s=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,o._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new E("in",s,a,t),(()=>r(a)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const o=new k;if(this._blockNode(o),this.code(e),t){const e=this.name("e");this._currNode=o.catch=new C(e),t(e)}return r&&(this._currNode=o.finally=new T,this.code(r)),this._endBlockNode(C,T)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=o.nil,r,n){return this._blockNode(new S(e,t,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=I;const A=R(t.operators.AND);t.and=function(...e){return e.reduce(A)};const D=R(t.operators.OR);function R(e){return(t,r)=>t===o.nil?r:r===o.nil?t:o._`${M(t)} ${e} ${M(r)}`}function M(e){return e instanceof o.Name?e:o._`(${e})`}t.or=function(...e){return e.reduce(D)}},8167:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const o=r(9782);class n extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new o.Name("const"),let:new o.Name("let"),var:new o.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof o.Name?e:this.name(e)}name(e){return new o.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class i extends o.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=o._`.${new o.Name(t)}[${r}]`}}t.ValueScopeName=i;const c=o._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:o.nil}}get(){return this._scope}name(e){return new i(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const o=this.toName(e),{prefix:n}=o,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[n];if(a){const e=a.get(s);if(e)return e}else a=this._values[n]=new Map;a.set(s,o);const i=this._scope[n]||(this._scope[n]=[]),c=i.length;return i[c]=t.ref,o.setValue(t,{property:n,itemIndex:c}),o}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return o._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},i){let c=o.nil;for(const u in e){const d=e[u];if(!d)continue;const l=a[u]=a[u]||new Map;d.forEach((e=>{if(l.has(e))return;l.set(e,s.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=o._`${c}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==i?void 0:i(e)))throw new n(e);c=o._`${c}${a}${this.opts._n}`}l.set(e,s.Completed)}))}return c}}},3127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const o=r(9143),n=r(2493),s=r(8460);function a(e,t){const r=e.const("err",t);e.if(o._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,o._`[${r}]`)),o._`${s.default.vErrors}.push(${r})`),e.code(o._`${s.default.errors}++`)}function i(e,t){const{gen:r,validateName:n,schemaEnv:s}=e;s.$async?r.throw(o._`new ${e.ValidationError}(${t})`):(r.assign(o._`${n}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>o.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?o.str`"${e}" keyword must be ${t} ($data)`:o.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,n,s){const{it:c}=e,{gen:d,compositeRule:l,allErrors:p}=c,f=u(e,r,n);(null!=s?s:l||p)?a(d,f):i(c,o._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,o){const{it:n}=e,{gen:c,compositeRule:d,allErrors:l}=n;a(c,u(e,r,o)),d||l||i(n,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(o._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(o._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:n,errsCount:a,it:i}){if(void 0===a)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",a,s.default.errors,(a=>{e.const(c,o._`${s.default.vErrors}[${a}]`),e.if(o._`${c}.instancePath === undefined`,(()=>e.assign(o._`${c}.instancePath`,(0,o.strConcat)(s.default.instancePath,i.errorPath)))),e.assign(o._`${c}.schemaPath`,o.str`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign(o._`${c}.schema`,r),e.assign(o._`${c}.data`,n))}))};const c={keyword:new o.Name("keyword"),schemaPath:new o.Name("schemaPath"),params:new o.Name("params"),propertyName:new o.Name("propertyName"),message:new o.Name("message"),schema:new o.Name("schema"),parentSchema:new o.Name("parentSchema")};function u(e,t,r){const{createErrors:n}=e.it;return!1===n?o._`{}`:function(e,t,r={}){const{gen:n,it:a}=e,i=[d(a,r),l(e,r)];return function(e,{params:t,message:r},n){const{keyword:a,data:i,schemaValue:u,it:d}=e,{opts:l,propertyName:p,topSchemaRef:f,schemaPath:h}=d;n.push([c.keyword,a],[c.params,"function"==typeof t?t(e):t||o._`{}`]),l.messages&&n.push([c.message,"function"==typeof r?r(e):r]);l.verbose&&n.push([c.schema,u],[c.parentSchema,o._`${f}${h}`],[s.default.data,i]);p&&n.push([c.propertyName,p])}(e,t,i),n.object(...i)}(e,t,r)}function d({errorPath:e},{instancePath:t}){const r=t?o.str`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,o.strConcat)(s.default.instancePath,r)]}function l({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let a=s?t:o.str`${t}/${e}`;return r&&(a=o.str`${a}${(0,n.getErrorPath)(r,n.Type.Str)}`),[c.schemaPath,a]}},4335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const o=r(9143),n=r(2569),s=r(8460),a=r(21),i=r(2493),c=r(5344),u=r(2854);class d{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,a.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function l(e){const t=f.call(this,e);if(t)return t;const r=(0,a.getFullPath)(e.root.baseId),{es5:i,lines:u}=this.opts.code,{ownProperties:d}=this.opts,l=new o.CodeGen(this.scope,{es5:i,lines:u,ownProperties:d});let p;e.$async&&(p=l.scopeValue("Error",{ref:n.default,code:o._`require("ajv/dist/runtime/validation_error").default`}));const h=l.scopeName("validate");e.validateName=h;const m={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,o.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:o.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:o._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const t=l.toString();y=`${l.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,y)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof o.Name?void 0:e,items:t instanceof o.Name?void 0:t,dynamicProps:e instanceof o.Name,dynamicItems:t instanceof o.Name},r.source&&(r.source.evaluated=(0,o.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function p(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function f(e){for(const o of this._compilations)if(r=e,(t=o).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return o;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=u.parse(t),o=(0,a._getFullPath)(r);let n=(0,a.getFullPath)(e.baseId);if(Object.keys(e.schema).length>0&&o===n)return g.call(this,r,e);const s=(0,a.normalizeId)(o),i=this.refs[s]||this.schemas[s];if("string"==typeof i){const t=m.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||l.call(this,i),s===(0,a.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,o=t[r];return o&&(n=(0,a.resolveUrl)(n,o)),new d({schema:t,schemaId:r,root:e,baseId:n})}return g.call(this,r,i)}}t.SchemaEnv=d,t.compileSchema=l,t.resolveRef=function(e,t,r){var o;r=(0,a.resolveUrl)(t,r);const n=e.refs[r];if(n)return n;let s=h.call(this,e,r);if(void 0===s){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:a}=this.opts;n&&(s=new d({schema:n,schemaId:a,root:e,baseId:t}))}return void 0!==s?e.refs[r]=p.call(this,s):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:o}){var n;if("/"!==(null===(n=e.fragment)||void 0===n?void 0:n[0]))return;for(const o of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,i.unescapeFragment)(o)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(o)&&n&&(t=(0,a.resolveUrl)(t,n))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,i.schemaHasRulesButRef)(r,this.RULES)){const e=(0,a.resolveUrl)(t,r.$ref);s=m.call(this,o,e)}const{schemaId:c}=this.opts;return s=s||new d({schema:r,schemaId:c,root:o,baseId:t}),s.schema!==s.root.schema?s:void 0}},8460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};t.default=n},2589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(21);class n extends Error{constructor(e,t,r){super(r||`can't resolve reference ${t} from id ${e}`),this.missingRef=(0,o.resolveUrl)(e,t),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(this.missingRef))}}t.default=n},21:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const o=r(2493),n=r(9378),s=r(9522),a=r(2854),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&d(e)<=t)};const c=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(c.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(u))return!0;if("object"==typeof r&&u(r))return!0}return!1}function d(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!i.has(r)&&("object"==typeof e[r]&&(0,o.eachItem)(e[r],(e=>t+=d(e))),t===1/0))return 1/0}return t}function l(e="",t){!1!==t&&(e=h(e));return p(a.parse(e))}function p(e){return a.serialize(e).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=p;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t){return t=h(t),a.resolve(e,t)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r}=this.opts,o=h(e[r]||t),i={"":o},c=l(o,!1),u={},d=new Set;return s(e,{allKeys:!0},((e,t,o,n)=>{if(void 0===n)return;const s=c+t;let l=i[n];function y(t){if(t=h(l?a.resolve(l,t):t),d.has(t))throw f(t);d.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?p(e,r.schema,t):t!==h(s)&&("#"===t[0]?(p(e,u[t],t),u[t]=e):this.refs[t]=s),t}function g(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);y.call(this,`#${e}`)}}"string"==typeof e[r]&&(l=y.call(this,e[r])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),i[t]=l})),u;function p(e,t,r){if(void 0!==t&&!n(e,t))throw f(r)}function f(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},5766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},2493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const o=r(9143),n=r(9782);function s(e,t=e.schema){const{opts:r,self:o}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const n=o.RULES.keywords;for(const r in t)n[r]||h(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function i(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function u({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,a,i,c)=>{const u=void 0===i?a:i instanceof o.Name?(a instanceof o.Name?e(s,a,i):t(s,a,i),i):a instanceof o.Name?(t(s,i,a),a):r(a,i);return c!==o.Name||u instanceof o.Name?u:n(s,u)}}function d(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",o._`{}`);return void 0!==t&&l(e,r,t),r}function l(e,t,r){Object.keys(r).forEach((r=>e.assign(o._`${t}${(0,o.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return o._`${r}`}return o._`${e}${t}${(0,o.getProperty)(n)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(i(e))},t.escapeJsonPointer=i,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:u({mergeNames:(e,t,r)=>e.if(o._`${r} !== true && ${t} !== undefined`,(()=>{e.if(o._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,o._`${r} || {}`).code(o._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(o._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,o._`${r} || {}`),l(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:u({mergeNames:(e,t,r)=>e.if(o._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,o._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(o._`${r} !== true`,(()=>e.assign(r,!0===t||o._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=l;const p={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof o.Name){const n=t===f.Num;return r?n?o._`"[" + ${e} + "]"`:o._`"['" + ${e} + "']"`:n?o._`"/" + ${e}`:o._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,o.getProperty)(e).toString():"/"+i(e)},t.checkStrictMode=h},9032:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>o(e,t)))}function o(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},o){const n=t.RULES.types[o];return n&&!0!==n&&r(e,n)},t.shouldUseGroup=r,t.shouldUseRule=o},4997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const o=r(3127),n=r(9143),s=r(8460),a={message:"boolean schema is false"};function i(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,o.reportError)(s,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:o}=e;!1===r?i(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(n._`${o}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:o}=e;!1===o?(r.var(t,!1),i(e)):r.var(t,!0)}},4327:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const o=r(5766),n=r(9032),s=r(3127),a=r(9143),i=r(2493);var c;function u(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(o.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=u(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=u,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:o,opts:s}=e,i=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),u=t.length>0&&!(0===i.length&&1===t.length&&(0,n.schemaHasRulesForType)(e,t[0]));if(u){const n=p(t,o,s.strictNumbers,c.Wrong);r.if(n,(()=>{i.length?function(e,t,r){const{gen:o,data:n,opts:s}=e,i=o.let("dataType",a._`typeof ${n}`),c=o.let("coerced",a._`undefined`);"array"===s.coerceTypes&&o.if(a._`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>o.assign(n,a._`${n}[0]`).assign(i,a._`typeof ${n}`).if(p(t,n,s.strictNumbers),(()=>o.assign(c,n)))));o.if(a._`${c} !== undefined`);for(const e of r)(d.has(e)||"array"===e&&"array"===s.coerceTypes)&&u(e);function u(e){switch(e){case"string":return void o.elseIf(a._`${i} == "number" || ${i} == "boolean"`).assign(c,a._`"" + ${n}`).elseIf(a._`${n} === null`).assign(c,a._`""`);case"number":return void o.elseIf(a._`${i} == "boolean" || ${n} === null || (${i} == "string" && ${n} && ${n} == +${n})`).assign(c,a._`+${n}`);case"integer":return void o.elseIf(a._`${i} === "boolean" || ${n} === null || (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(c,a._`+${n}`);case"boolean":return void o.elseIf(a._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(c,!1).elseIf(a._`${n} === "true" || ${n} === 1`).assign(c,!0);case"null":return o.elseIf(a._`${n} === "" || ${n} === 0 || ${n} === false`),void o.assign(c,null);case"array":o.elseIf(a._`${i} === "string" || ${i} === "number" || ${i} === "boolean" || ${n} === null`).assign(c,a._`[${n}]`)}}o.else(),h(e),o.endIf(),o.if(a._`${c} !== undefined`,(()=>{o.assign(n,c),function({gen:e,parentData:t,parentDataProperty:r},o){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,o)))}(e,c)}))}(e,t,i):h(e)}))}return u};const d=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,o=c.Correct){const n=o===c.Correct?a.operators.EQ:a.operators.NEQ;let s;switch(e){case"null":return a._`${t} ${n} null`;case"array":s=a._`Array.isArray(${t})`;break;case"object":s=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return a._`typeof ${t} ${n} ${e}`}return o===c.Correct?s:(0,a.not)(s);function i(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function p(e,t,r,o){if(1===e.length)return l(e[0],t,r,o);let n;const s=(0,i.toHash)(e);if(s.array&&s.object){const e=a._`typeof ${t} != "object"`;n=s.null?e:a._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else n=a.nil;s.number&&delete s.integer;for(const e in s)n=(0,a.and)(n,l(e,t,r,o));return n}t.checkDataType=l,t.checkDataTypes=p;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:o}=e,n=(0,i.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}(e);(0,s.reportError)(t,f)}t.reportTypeError=h},3633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const o=r(9143),n=r(2493);function s(e,t,r){const{gen:s,compositeRule:a,data:i,opts:c}=e;if(void 0===r)return;const u=o._`${i}${(0,o.getProperty)(t)}`;if(a)return void(0,n.checkStrictMode)(e,`default is ignored for: ${u}`);let d=o._`${u} === undefined`;"empty"===c.useDefaults&&(d=o._`${d} || ${u} === null || ${u} === ""`),s.if(d,o._`${u} = ${(0,o.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:o}=e.schema;if("object"===t&&r)for(const t in r)s(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach(((t,r)=>s(e,r,t.default)))}},5344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const o=r(4997),n=r(4327),s=r(9032),a=r(4327),i=r(3633),c=r(9264),u=r(692),d=r(9143),l=r(8460),p=r(21),f=r(2493),h=r(3127);function m({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},s){n.code.es5?e.func(t,d._`${l.default.data}, ${l.default.valCxt}`,o.$async,(()=>{e.code(d._`"use strict"; ${y(r,n)}`),function(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,d._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,d._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,d._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,d._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,d._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,d._`""`),e.var(l.default.parentData,d._`undefined`),e.var(l.default.parentDataProperty,d._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,d._`{}`)}))}(e,n),e.code(s)})):e.func(t,d._`${l.default.data}, ${function(e){return d._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?d._`, ${l.default.dynamicAnchors}={}`:d.nil}}={}`}(n)}`,o.$async,(()=>e.code(y(r,n)).code(s)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?d._`/*# sourceURL=${r} */`:d.nil}function g(e,t){_(e)&&(b(e),v(e))?function(e,t){const{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&$(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=o.const("_errs",l.default.errors);w(e,s),o.var(t,d._`${s} === ${l.default.errors}`)}(e,t):(0,o.boolOrEmptySchema)(e,t)}function v({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function _(e){return"boolean"!=typeof e.schema}function b(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,n.getSchemaTypes)(e.schema);E(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){const s=r.$comment;if(!0===n.$comment)e.code(d._`${l.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const r=d.str`${o}/$comment`,n=e.scopeValue("root",{ref:t.root});e.code(d._`${l.default.self}.opts.$comment(${s}, ${r}, ${n}.schema)`)}}function E(e,t,r,o){const{gen:n,schema:i,data:c,allErrors:u,opts:p,self:h}=e,{RULES:m}=h;function y(f){(0,s.shouldUseGroup)(i,f)&&(f.type?(n.if((0,a.checkDataType)(f.type,c,p.strictNumbers)),S(e,f),1===t.length&&t[0]===f.type&&r&&(n.else(),(0,a.reportTypeError)(e)),n.endIf()):S(e,f),u||n.if(d._`${l.default.errors} === ${o||0}`))}!i.$ref||!p.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(i,m)?(p.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{k(e.dataTypes,t)||C(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>k(t,e)))})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&C(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const o in r){const n=r[o];if("object"==typeof n&&(0,s.shouldUseRule)(e.schema,n)){const{type:r}=n.definition;r.length&&!r.some((e=>P(t,e)))&&C(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes)}(e,t),n.block((()=>{for(const e of m.rules)y(e);y(m.post)}))):n.block((()=>j(e,"$ref",m.all.$ref.definition)))}function S(e,t){const{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,i.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(o,r)&&j(e,r.keyword,r.definition,t.type)}))}function P(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function k(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function C(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){_(e)&&(b(e),v(e))?function(e){const{schema:t,opts:r,gen:o}=e;m(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),o.let(l.default.vErrors,null),o.let(l.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",d._`${r}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:s}=e;r.$async?t.if(d._`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw(d._`new ${n}(${l.default.vErrors})`))):(t.assign(d._`${o}.errors`,l.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:o}){r instanceof d.Name&&e.assign(d._`${t}.props`,r);o instanceof d.Name&&e.assign(d._`${t}.items`,o)}(e),t.return(d._`${l.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,o.topBoolOrEmptySchema)(e)))};class T{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:r,schemaCode:o,schemaType:n,def:s}=this;r.if((0,d.or)(d._`${o} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(n.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return d._`${(0,a.checkDataTypes)(e,t,n.opts.strictNumbers,a.DataType.Wrong)}`}return d.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return d._`!${r}(${t})`}return d.nil}())}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return g(o,t),o}mergeEvaluated(e,t){const{it:r,gen:o}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(o,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(o,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:o}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return o.if(t,(()=>this.mergeEvaluated(e,d.Name))),!0}}function j(e,t,r,o){const n=new T(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,c.funcKeywordCode)(n,r):"macro"in r?(0,c.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(n,r)}t.KeywordCxt=T;const O=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!O.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,s=l.default.rootData}else{const a=x.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+a[1];if(n=a[2],"#"===n){if(i>=t)throw new Error(c("property/index",i));return o[t-i]}if(i>t)throw new Error(c("data",i));if(s=r[t-i],!n)return s}let a=s;const i=n.split("/");for(const e of i)e&&(s=d._`${s}${(0,d.getProperty)((0,f.unescapeJsonPointer)(e))}`,a=d._`${a} && ${s}`);return a;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=N},9264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const o=r(9143),n=r(8460),s=r(5255),a=r(3127);function i(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,o._`${n.parentData}[${n.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,o.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:n,schema:s,parentSchema:a,it:i}=e,u=t.macro.call(i.self,s,a,i),d=c(r,n,u);!1!==i.opts.validateSchema&&i.self.validateSchema(u,!0);const l=r.name("valid");e.subschema({schema:u,schemaPath:o.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:u,keyword:d,schema:l,parentSchema:p,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,l,p,h):t.validate,y=c(u,d,m),g=u.let("valid");function v(r=(t.async?o._`await `:o.nil)){const a=h.opts.passContext?n.default.this:n.default.self,i=!("compile"in t&&!f||!1===t.schema);u.assign(g,o._`${r}${(0,s.callValidateCode)(e,y,a,i)}`,t.modifying)}function _(e){var r;u.if((0,o.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)v(),t.modifying&&i(e),_((()=>e.error()));else{const r=t.async?function(){const e=u.let("ruleErrs",null);return u.try((()=>v(o._`await `)),(t=>u.assign(g,!1).if(o._`${t} instanceof ${h.ValidationError}`,(()=>u.assign(e,o._`${t}.errors`)),(()=>u.throw(t))))),e}():function(){const e=o._`${y}.errors`;return u.assign(e,null),v(o.nil),e}();t.modifying&&i(e),_((()=>function(e,t){const{gen:r}=e;r.if(o._`Array.isArray(${t})`,(()=>{r.assign(n.default.vErrors,o._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,o._`${n.default.vErrors}.length`),(0,a.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:o},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const a=n.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},692:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const o=r(9143),n=r(2493);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:s,schemaPath:a,errSchemaPath:i,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:o._`${e.schemaPath}${(0,o.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:o._`${e.schemaPath}${(0,o.getProperty)(t)}${(0,o.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===a||void 0===i||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:a,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:s,data:a,dataTypes:i,propertyName:c}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(void 0!==r){const{errorPath:a,dataPathArr:i,opts:c}=t;d(u.let("data",o._`${t.data}${(0,o.getProperty)(r)}`,!0)),e.errorPath=o.str`${a}${(0,n.getErrorPath)(r,s,c.jsPropertySyntax)}`,e.parentDataProperty=o._`${r}`,e.dataPathArr=[...i,e.parentDataProperty]}if(void 0!==a){d(a instanceof o.Name?a:u.let("data",a,!0)),void 0!==c&&(e.propertyName=c)}function d(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}i&&(e.dataTypes=i)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:s}){void 0!==o&&(e.compositeRule=o),void 0!==n&&(e.createErrors=n),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},3993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var o=r(5344);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return o.KeywordCxt}});var n=r(9143);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const s=r(2569),a=r(2589),i=r(5766),c=r(4335),u=r(9143),d=r(21),l=r(4327),p=r(2493),f=r(7814),h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,o,n,s,a,i,c,u,d,l,p,f,h,m,y,g,v,_,b,w,$;const E=e.strict,S=null===(t=e.code)||void 0===t?void 0:t.optimize,P=!0===S||void 0===S?1:S||0;return{strictSchema:null===(o=null!==(r=e.strictSchema)&&void 0!==r?r:E)||void 0===o||o,strictNumbers:null===(s=null!==(n=e.strictNumbers)&&void 0!==n?n:E)||void 0===s||s,strictTypes:null!==(i=null!==(a=e.strictTypes)&&void 0!==a?a:E)&&void 0!==i?i:"log",strictTuples:null!==(u=null!==(c=e.strictTuples)&&void 0!==c?c:E)&&void 0!==u?u:"log",strictRequired:null!==(l=null!==(d=e.strictRequired)&&void 0!==d?d:E)&&void 0!==l&&l,code:e.code?{...e.code,optimize:P}:{optimize:P},loopRequired:null!==(p=e.loopRequired)&&void 0!==p?p:200,loopEnum:null!==(f=e.loopEnum)&&void 0!==f?f:200,meta:null===(h=e.meta)||void 0===h||h,messages:null===(m=e.messages)||void 0===m||m,inlineRefs:null===(y=e.inlineRefs)||void 0===y||y,schemaId:null!==(g=e.schemaId)&&void 0!==g?g:"$id",addUsedSchema:null===(v=e.addUsedSchema)||void 0===v||v,validateSchema:null===(_=e.validateSchema)||void 0===_||_,validateFormats:null===(b=e.validateFormats)||void 0===b||b,unicodeRegExp:null===(w=e.unicodeRegExp)||void 0===w||w,int32range:null===($=e.int32range)||void 0===$||$}}class _{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return k;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),b.call(this,y,e,"NOT SUPPORTED"),b.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let o=f;"id"===r&&(o={...f},o.id=o.$id,delete o.$id),t&&e&&this.addMetaSchema(o,o[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const o=r(t);return"$async"in r||(this.errors=r.errors),o}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return o.call(this,e,t);async function o(e,t){await n.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await o.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return i.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function i({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await u.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,o=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,o);return this}let n;if("object"==typeof e){const{schemaId:t}=this.opts;if(n=e[t],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,o,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const o=this.validate(r,e);if(!o&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return o}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,o=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,o,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,d.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>j.call(this,e))),this;x.call(this,t);const o={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===o.type.length?e=>j.call(this,e,o):e=>o.type.forEach((t=>j.call(this,e,o,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const o of t){const t=o.split("/").slice(1);let n=e;for(const e of t)n=n[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:o}=t.definition,s=n[e];o&&s&&(n[e]=I(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const o=e[r];t&&!t.test(r)||("string"==typeof o?delete e[r]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[r]))}}_addSchema(e,t,r,o=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(void 0!==i)return i;r=(0,d.normalizeId)(s||r);const u=d.getSchemaRefs.call(this,e,r);return i=new c.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:u}),this._cache.set(i.schema,i),n&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=i),o&&this.validateSchema(e,!0),i}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function b(e,t,r,o="error"){for(const n in e){const s=n;s in t&&this.logger[o](`${r}: option ${n}. ${e[s]}`)}}function w(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function P(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=_,_.ValidationError=s.default,_.MissingRefError=a.default;const k={log(){},warn(){},error(){}};const C=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!C.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function j(e,t,r){var o;const n=null==t?void 0:t.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let a=n?s.post:s.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?O.call(this,a,i,t.before):a.rules.push(i),s.all[e]=i,null===(o=t.implements)||void 0===o||o.forEach((e=>this.addKeyword(e)))}function O(e,t,r){const o=e.rules.findIndex((e=>e.keyword===r));o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}const N={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I(e){return{anyOf:[e,N]}}},3717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9378);o.code='require("ajv/dist/runtime/equal").default',t.default=o},158:(e,t)=>{"use strict";function r(e){const t=e.length;let r,o=0,n=0;for(;n=55296&&r<=56319&&n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},5971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const o=r(9143),n=r(2493),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>o.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>o._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:o}=t;Array.isArray(o)?a(e,o):(0,n.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:s,data:a,keyword:i,it:c}=e;c.items=!0;const u=r.const("len",o._`${a}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(o._`${u} <= ${t.length}`);else if("object"==typeof s&&!(0,n.alwaysValidSchema)(c,s)){const s=r.var("valid",o._`${u} <= ${t.length}`);r.if((0,o.not)(s),(()=>function(s){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:n.Type.Num},s),c.allErrors||r.if((0,o.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=a,t.default=s},2012:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5255),n=r(9143),s=r(8460),a=r(2493),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>n._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:c,errsCount:u,it:d}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:l,opts:p}=d;if(d.props=!0,"all"!==p.removeAdditional&&(0,a.alwaysValidSchema)(d,r))return;const f=(0,o.allSchemaProperties)(i.properties),h=(0,o.allSchemaProperties)(i.patternProperties);function m(e){t.code(n._`delete ${c}[${e}]`)}function y(o){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)m(o);else{if(!1===r)return e.setParams({additionalProperty:o}),e.error(),void(l||t.break());if("object"==typeof r&&!(0,a.alwaysValidSchema)(d,r)){const r=t.name("valid");"failing"===p.removeAdditional?(g(o,r,!1),t.if((0,n.not)(r),(()=>{e.reset(),m(o)}))):(g(o,r),l||t.if((0,n.not)(r),(()=>t.break())))}}}function g(t,r,o){const n={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===o&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}t.forIn("key",c,(r=>{f.length||h.length?t.if(function(r){let s;if(f.length>8){const e=(0,a.schemaRefOrVal)(d,i.properties,"properties");s=(0,o.isOwnProperty)(t,e,r)}else s=f.length?(0,n.or)(...f.map((e=>n._`${r} === ${e}`))):n.nil;return h.length&&(s=(0,n.or)(s,...h.map((t=>n._`${(0,o.usePattern)(e,t)}.test(${r})`)))),(0,n.not)(s)}(r),(()=>y(r))):y(r)})),e.ok(n._`${u} === ${s.default.errors}`)}};t.default=i},7206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(2493),n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,o.alwaysValidSchema)(n,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(a)}))}};t.default=n},569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(5255).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=o},2063:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?o.str`must contain at least ${e} valid item(s)`:o.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?o._`{minContains: ${e}}`:o._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:a,it:i}=e;let c,u;const{minContains:d,maxContains:l}=s;i.opts.next?(c=void 0===d?1:d,u=l):c=1;const p=t.const("len",o._`${a}.length`);if(e.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,n.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,n.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,n.alwaysValidSchema)(i,r)){let t=o._`${p} >= ${c}`;return void 0!==u&&(t=o._`${t} && ${p} <= ${u}`),void e.pass(t)}i.items=!0;const f=t.name("valid");if(void 0===u&&1===c)h(f,(()=>t.if(f,(()=>t.break()))));else{t.let(f,!1);const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(o._`${e}++`),void 0===u?t.if(o._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(o._`${e} > ${u}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(o._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function h(r,o){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n.Type.Num,compositeRule:!0},r),o()}))}e.result(f,(()=>e.reset()))}};t.default=s},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const o=r(9143),n=r(2493),s=r(5255);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=1===t?"property":"properties";return o.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>o._`{property: ${e}, missingProperty: ${n}, depsCount: ${t}, deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const o in e){if("__proto__"===o)continue;(Array.isArray(e[o])?t:r)[o]=e[o]}return[t,r]}(e);i(e,t),c(e,r)}};function i(e,t=e.schema){const{gen:r,data:n,it:a}=e;if(0===Object.keys(t).length)return;const i=r.let("missing");for(const c in t){const u=t[c];if(0===u.length)continue;const d=(0,s.propertyInData)(r,n,c,a.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),a.allErrors?r.if(d,(()=>{for(const t of u)(0,s.checkReportMissingProp)(e,t)})):(r.if(o._`${d} && (${(0,s.checkMissingProp)(e,u,i)})`),(0,s.reportMissingProp)(e,i),r.else())}}function c(e,t=e.schema){const{gen:r,data:o,keyword:a,it:i}=e,c=r.name("valid");for(const u in t)(0,n.alwaysValidSchema)(i,t[u])||(r.if((0,s.propertyInData)(r,o,u,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=i,t.validateSchemaDeps=c,t.default=a},599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>o.str`must match "${e.ifClause}" schema`,params:({params:e})=>o._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0,n.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const i=a(s,"then"),c=a(s,"else");if(!i&&!c)return;const u=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),i&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(d,l("then",r),l("else",r))}else i?t.if(d,l("then")):t.if((0,o.not)(d),l("else"));function l(r,n){return()=>{const s=e.subschema({keyword:r},d);t.assign(u,d),e.mergeValidEvaluated(s,u),n?t.assign(n,o._`${r}`):e.setParams({ifClause:r})}}e.pass(u,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!(0,n.alwaysValidSchema)(e,r)}t.default=s},5068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5971),n=r(2340),s=r(8606),a=r(7287),i=r(2063),c=r(337),u=r(7884),d=r(2012),l=r(4280),p=r(5295),f=r(3015),h=r(569),m=r(2336),y=r(7206),g=r(599),v=r(1277);t.default=function(e=!1){const t=[f.default,h.default,m.default,y.default,g.default,v.default,u.default,d.default,c.default,l.default,p.default];return e?t.push(n.default,a.default):t.push(o.default,s.default),t.push(i.default),t}},8606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const o=r(9143),n=r(2493),s=r(5255),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return i(e,"additionalItems",t);r.items=!0,(0,n.alwaysValidSchema)(r,t)||e.ok((0,s.validateArray)(e))}};function i(e,t,r=e.schema){const{gen:s,parentSchema:a,data:i,keyword:c,it:u}=e;!function(e){const{opts:o,errSchemaPath:s}=u,a=r.length,i=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(o.strictTuples&&!i){const e=`"${c}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,n.checkStrictMode)(u,e,o.strictTuples)}}(a),u.opts.unevaluated&&r.length&&!0!==u.items&&(u.items=n.mergeEvaluated.items(s,r.length,u.items));const d=s.name("valid"),l=s.const("len",o._`${i}.length`);r.forEach(((t,r)=>{(0,n.alwaysValidSchema)(u,t)||(s.if(o._`${l} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},d))),e.ok(d))}))}t.validateTuple=i,t.default=a},7287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s=r(5255),a=r(5971),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>o.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>o._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:o}=e,{prefixItems:i}=r;o.items=!0,(0,n.alwaysValidSchema)(o,t)||(i?(0,a.validateAdditionalItems)(e,i):e.ok((0,s.validateArray)(e)))}};t.default=i},3015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(2493),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,o.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=n},2336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>o._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;const i=r,c=t.let("valid",!1),u=t.let("passing",null),d=t.name("_valid");e.setParams({passing:u}),t.block((function(){i.forEach(((r,s)=>{let i;(0,n.alwaysValidSchema)(a,r)?t.var(d,!0):i=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(o._`${d} && ${c}`).assign(c,!1).assign(u,o._`[${u}, ${s}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(u,s),i&&e.mergeEvaluated(i,o.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},5295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5255),n=r(9143),s=r(2493),a=r(2493),i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:c,it:u}=e,{opts:d}=u,l=(0,o.allSchemaProperties)(r),p=l.filter((e=>(0,s.alwaysValidSchema)(u,r[e])));if(0===l.length||p.length===l.length&&(!u.opts.unevaluated||!0===u.props))return;const f=d.strictSchema&&!d.allowMatchingProperties&&c.properties,h=t.name("valid");!0===u.props||u.props instanceof n.Name||(u.props=(0,a.evaluatedPropsToName)(t,u.props));const{props:m}=u;function y(e){for(const t in f)new RegExp(e).test(t)&&(0,s.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",i,(s=>{t.if(n._`${(0,o.usePattern)(e,r)}.test(${s})`,(()=>{const o=p.includes(r);o||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:a.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign(n._`${m}[${s}]`,!0):o||u.allErrors||t.if((0,n.not)(h),(()=>t.break()))}))}))}!function(){for(const e of l)f&&y(e),u.allErrors?g(e):(t.var(h,!0),g(e),t.if(h))}()}};t.default=i},2340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(8606),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,o.validateTuple)(e,"items")};t.default=n},4280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5344),n=r(5255),s=r(2493),a=r(2012),i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:c,it:u}=e;"all"===u.opts.removeAdditional&&void 0===i.additionalProperties&&a.default.code(new o.KeywordCxt(u,a.default,"additionalProperties"));const d=(0,n.allSchemaProperties)(r);for(const e of d)u.definedProperties.add(e);u.opts.unevaluated&&d.length&&!0!==u.props&&(u.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),u.props));const l=d.filter((e=>!(0,s.alwaysValidSchema)(u,r[e])));if(0===l.length)return;const p=t.name("valid");for(const r of l)f(r)?h(r):(t.if((0,n.propertyInData)(t,c,r,u.opts.ownProperties)),h(r),u.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function f(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=i},7884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>o._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:a}=e;if((0,n.alwaysValidSchema)(a,r))return;const i=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},i),t.if((0,o.not)(i),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(i)}};t.default=s},1277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(2493),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,o.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=n},5255:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const o=r(9143),n=r(2493),s=r(8460);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:o._`Object.prototype.hasOwnProperty`})}function i(e,t,r){return o._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,n){const s=o._`${t}${(0,o.getProperty)(r)} === undefined`;return n?(0,o.or)(s,(0,o.not)(i(e,t,r))):s}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:n,it:s}=e;r.if(c(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:o._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},n,s){return(0,o.or)(...n.map((n=>(0,o.and)(c(e,t,n,r.ownProperties),o._`${s} = ${n}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=i,t.propertyInData=function(e,t,r,n){const s=o._`${t}${(0,o.getProperty)(r)} !== undefined`;return n?o._`${s} && ${i(e,t,r)}`:s},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,n.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:i},it:c},u,d,l){const p=l?o._`${e}, ${t}, ${n}${a}`:t,f=[[s.default.instancePath,(0,o.strConcat)(s.default.instancePath,i)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&f.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const h=o._`${p}, ${r.object(...f)}`;return d!==o.nil?o._`${u}.call(${d}, ${h})`:o._`${u}(${h})`},t.usePattern=function({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"";return e.scopeValue("pattern",{key:r,ref:new RegExp(r,n),code:o._`new RegExp(${r}, ${n})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:s,it:a}=e,i=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(i,!0),c((()=>t.break())),i;function c(a){const c=t.const("len",o._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},i),t.if((0,o.not)(i),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,n.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const i=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,n)=>{const a=e.subschema({keyword:s,schemaProp:n,compositeRule:!0},c);t.assign(i,o._`${i} || ${c}`);e.mergeValidEvaluated(a,c)||t.if((0,o.not)(i))})))),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}},4404:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},4031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4404),n=r(8126),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,n.default];t.default=s},8126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const o=r(2589),n=r(5255),s=r(9143),a=r(8460),i=r(4335),c=r(2493),u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:a,schemaEnv:c,validateName:u,opts:p,self:f}=n,{root:h}=c;if(("#"===r||"#/"===r)&&a===h.baseId)return function(){if(c===h)return l(e,u,c,c.$async);const r=t.scopeValue("root",{ref:h});return l(e,s._`${r}.validate`,h,h.$async)}();const m=i.resolveRef.call(f,h,a,r);if(void 0===m)throw new o.default(a,r);return m instanceof i.SchemaEnv?function(t){const r=d(e,t);l(e,r,t,t.$async)}(m):function(o){const n=t.scopeValue("schema",!0===p.code.source?{ref:o,code:(0,s.stringify)(o)}:{ref:o}),a=t.name("valid"),i=e.subschema({schema:o,dataTypes:[],schemaPath:s.nil,topSchemaRef:n,errSchemaPath:r},a);e.mergeEvaluated(i),e.ok(a)}(m)}};function d(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):s._`${r.scopeValue("wrapper",{ref:t})}.validate`}function l(e,t,r,o){const{gen:i,it:u}=e,{allErrors:d,schemaEnv:l,opts:p}=u,f=p.passContext?a.default.this:s.nil;function h(e){const t=s._`${e}.errors`;i.assign(a.default.vErrors,s._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),i.assign(a.default.errors,s._`${a.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;const o=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(o&&!o.dynamicProps)void 0!==o.props&&(u.props=c.mergeEvaluated.props(i,o.props,u.props));else{const t=i.var("props",s._`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(i,t,u.props,s.Name)}if(!0!==u.items)if(o&&!o.dynamicItems)void 0!==o.items&&(u.items=c.mergeEvaluated.items(i,o.items,u.items));else{const t=i.var("items",s._`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(i,t,u.items,s.Name)}}o?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code(s._`await ${(0,n.callValidateCode)(e,t,f)}`),m(t),d||i.assign(r,!0)}),(e=>{i.if(s._`!(${e} instanceof ${u.ValidationError})`,(()=>i.throw(e))),h(e),d||i.assign(r,!1)})),e.ok(r)}():e.result((0,n.callValidateCode)(e,t,f),(()=>m(t)),(()=>h(t)))}t.getValidate=d,t.callRef=l,t.default=u},242:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(448),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>o._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:a,it:i}=e,{oneOf:c}=a;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=s.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!c)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),l=t.const("tag",o._`${r}${(0,o.getProperty)(u)}`);function p(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,o.Name),n}t.if(o._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=n(a);let o=!0;for(let t=0;te.error(!1,{discrError:n.DiscrError.Tag,tag:l,tagName:u}))),e.ok(d)}};t.default=s},448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))},7578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4031),n=r(9013),s=r(5068),a=r(3610),i=r(508),c=[o.default,n.default,(0,s.default)(),a.default,i.metadataVocabulary,i.contentVocabulary];t.default=c},3095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match format "${e}"`,params:({schemaCode:e})=>o._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:s,schema:a,schemaCode:i,it:c}=e,{opts:u,errSchemaPath:d,schemaEnv:l,self:p}=c;u.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),a=r.const("fDef",o._`${s}[${i}]`),c=r.let("fType"),d=r.let("format");r.if(o._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(c,o._`${a}.type || "string"`).assign(d,o._`${a}.validate`)),(()=>r.assign(c,o._`"string"`).assign(d,a))),e.fail$data((0,o.or)(!1===u.strictSchema?o.nil:o._`${i} && !${d}`,function(){const e=l.$async?o._`(${a}.async ? await ${d}(${n}) : ${d}(${n}))`:o._`${d}(${n})`,r=o._`(typeof ${d} == "function" ? ${e} : ${d}.test(${n}))`;return o._`${d} && ${d} !== true && ${c} === ${t} && !${r}`}()))}():function(){const s=p.formats[a];if(!s)return void function(){if(!1===u.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${d}"`}}();if(!0===s)return;const[i,c,f]=function(e){const t=e instanceof RegExp?(0,o.regexpCode)(e):u.code.formats?o._`${u.code.formats}${(0,o.getProperty)(a)}`:void 0,n=r.scopeValue("formats",{key:a,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,o._`${n}.validate`];return["string",e,n]}(s);i===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return o._`await ${f}(${n})`}return"function"==typeof c?o._`${f}(${n})`:o._`${f}.test(${n})`}())}())}};t.default=n},3610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=[r(3095).default];t.default=o},508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},5684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s=r(3717),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>o._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:i,schema:c}=e;a||c&&"object"==typeof c?e.fail$data(o._`!${(0,n.useFunc)(t,s.default)}(${r}, ${i})`):e.fail(o._`${c} !== ${r}`)}};t.default=a},3216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s=r(3717),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>o._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:i,schemaCode:c,it:u}=e;if(!a&&0===i.length)throw new Error("enum must have non-empty array");const d=i.length>=u.opts.loopEnum,l=(0,n.useFunc)(t,s.default);let p;if(d||a)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",c,(e=>t.if(o._`${l}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",c);p=(0,o.or)(...i.map(((t,n)=>function(e,t){const n=i[t];return"object"==typeof n&&null!==n?o._`${l}(${r}, ${e}[${t}])`:o._`${r} === ${n}`}(e,n))))}e.pass(p)}};t.default=a},9013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(167),n=r(7935),s=r(905),a=r(7103),i=r(2267),c=r(4022),u=r(2999),d=r(8906),l=r(5684),p=r(3216),f=[o.default,n.default,s.default,a.default,i.default,c.default,u.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,p.default];t.default=f},2999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return o.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>o._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxItems"===t?o.operators.GT:o.operators.LT;e.fail$data(o._`${r}.length ${s} ${n}`)}};t.default=n},905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=r(2493),s=r(158),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return o.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>o._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:i}=e,c="maxLength"===t?o.operators.GT:o.operators.LT,u=!1===i.opts.unicode?o._`${r}.length`:o._`${(0,n.useFunc)(e.gen,s.default)}(${r})`;e.fail$data(o._`${u} ${c} ${a}`)}};t.default=a},167:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n=o.operators,s={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:e,schemaCode:t})=>o.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${s[e].okStr}, limit: ${t}}`},i={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(o._`${r} ${s[t].fail} ${n} || isNaN(${r})`)}};t.default=i},2267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return o.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>o._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxProperties"===t?o.operators.GT:o.operators.LT;e.fail$data(o._`Object.keys(${r}).length ${s} ${n}`)}};t.default=n},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9143),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>o.str`must be multiple of ${e}`,params:({schemaCode:e})=>o._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,a=s.opts.multipleOfPrecision,i=t.let("res"),c=a?o._`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:o._`${i} !== parseInt(${i})`;e.fail$data(o._`(${n} === 0 || (${i} = ${r}/${n}, ${c}))`)}};t.default=n},7103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5255),n=r(9143),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match pattern "${e}"`,params:({schemaCode:e})=>n._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:a,it:i}=e,c=i.opts.unicodeRegExp?"u":"",u=r?n._`(new RegExp(${a}, ${c}))`:(0,o.usePattern)(e,s);e.fail$data(n._`!${u}.test(${t})`)}};t.default=s},4022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5255),n=r(9143),s=r(2493),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>n.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>n._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:i,$data:c,it:u}=e,{opts:d}=u;if(!c&&0===r.length)return;const l=r.length>=d.loopRequired;if(u.allErrors?function(){if(l||c)e.block$data(n.nil,p);else for(const t of r)(0,o.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(l||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,a,(()=>{t.assign(s,(0,o.propertyInData)(t,i,r,d.ownProperties)),t.if((0,n.not)(s),(()=>{e.error(),t.break()}))}),n.nil)}(s,r))),e.ok(r)}else t.if((0,o.checkMissingProp)(e,r,s)),(0,o.reportMissingProp)(e,s),t.else()}(),d.strictRequired){const t=e.parentSchema.properties,{definedProperties:o}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!o.has(e)){const t=`required property "${e}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(u,t,u.opts.strictRequired)}}function p(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if((0,o.noPropertyInData)(t,i,r,d.ownProperties),(()=>e.error()))}))}}};t.default=a},8906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4327),n=r(9143),s=r(2493),a=r(3717),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>n.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>n._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:i,schema:c,parentSchema:u,schemaCode:d,it:l}=e;if(!i&&!c)return;const p=t.let("valid"),f=u.items?(0,o.getSchemaTypes)(u.items):[];function h(s,a){const i=t.name("item"),c=(0,o.checkDataTypes)(f,i,l.opts.strictNumbers,o.DataType.Wrong),u=t.const("indices",n._`{}`);t.for(n._`;${s}--;`,(()=>{t.let(i,n._`${r}[${s}]`),t.if(c,n._`continue`),f.length>1&&t.if(n._`typeof ${i} == "string"`,n._`${i} += "_"`),t.if(n._`typeof ${u}[${i}] == "number"`,(()=>{t.assign(a,n._`${u}[${i}]`),e.error(),t.assign(p,!1).break()})).code(n._`${u}[${i}] = ${s}`)}))}function m(o,i){const c=(0,s.useFunc)(t,a.default),u=t.name("outer");t.label(u).for(n._`;${o}--;`,(()=>t.for(n._`${i} = ${o}; ${i}--;`,(()=>t.if(n._`${c}(${r}[${o}], ${r}[${i}])`,(()=>{e.error(),t.assign(p,!1).break(u)}))))))}e.block$data(p,(function(){const o=t.let("i",n._`${r}.length`),s=t.let("j");e.setParams({i:o,j:s}),t.assign(p,!0),t.if(n._`${o} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(o,s)))}),n._`${d} === false`),e.ok(p)}};t.default=i},3033:function(e,t){var r="undefined"!=typeof self?self:this,o=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,o="Symbol"in e&&"iterator"in Symbol,n="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,a="ArrayBuffer"in e;if(a)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function m(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:n&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&n&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,r,o=f(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=h(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),o=0;o-1?o:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(n))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},g.call(_.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var $=[301,302,303,307,308];w.redirect=function(e,t){if(-1===$.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function E(e,r){return new Promise((function(o,s){var a=new _(e,r);if(a.signal&&a.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var i=new XMLHttpRequest;function c(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();t.append(o,n)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var n="response"in i?i.response:i.responseText;o(new w(n,r))},i.onerror=function(){s(new TypeError("Network request failed"))},i.ontimeout=function(){s(new TypeError("Network request failed"))},i.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},i.open(a.method,a.url,!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&n&&(i.responseType="blob"),a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",c)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}E.polyfill=!0,e.fetch||(e.fetch=E,e.Headers=p,e.Request=_,e.Response=w),t.Headers=p,t.Request=_,t.Response=w,t.fetch=E,Object.defineProperty(t,"__esModule",{value:!0})}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var n=o;(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},1209:()=>{},2501:(e,t,r)=>{"use strict";function o(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}r.d(t,{CustomError:()=>a});var n,s=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(e){function t(t){var r,n,s,a=this.constructor,i=e.call(this,t)||this;return Object.defineProperty(i,"name",{value:a.name,enumerable:!1,configurable:!0}),r=i,n=a.prototype,(s=Object.setPrototypeOf)?s(r,n):r.__proto__=n,o(i),i}return s(t,e),t}(Error)},7814:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},2081:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return r[e].call(s.exports,s,s.exports,n),s.exports}n.m=r,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>e+"/2d04d1da143afcea0dd4.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="Destination:",n.l=(r,o,s,a)=>{if(e[r])e[r].push(o);else{var i,c;if(void 0!==s)for(var u=document.getElementsByTagName("script"),d=0;d{i.onerror=i.onload=null,clearTimeout(f);var n=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((e=>e(o))),t)return t(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&!e;)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"})(),(()=>{var e={632:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var s=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=s);var a=n.p+n.u(t),i=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var s=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+s+": "+a+")",i.name="ChunkLoadError",i.type=s,i.request=a,o[1](i)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,s,[a,i,c]=r,u=0;if(a.some((t=>0!==e[t]))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(c)c(n)}for(t&&t(r);u{"use strict";n.d(s,{default:()=>ve});const e={label:"User Properties",description:"The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s [Custom user properties](https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties. ",type:"object",additionalProperties:!0,defaultObjectUI:"keyvalue"},t={label:"Event Parameters",description:"The event parameters to send to Google Analytics 4.",type:"object",additionalProperties:!0,defaultObjectUI:"keyvalue"},r={label:"User ID",type:"string",description:"A unique identifier for a user. See Google's [User-ID for cross-platform analysis](https://support.google.com/analytics/answer/9213390) and [Reporting: deduplicate user counts](https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier."},o={label:"Promotion ID",type:"string",description:"The ID of the promotion associated with the event."},a={label:"Promotion Name",type:"string",description:"The name of the promotion associated with the event."},i={label:"Creative Slot",type:"string",description:"The name of the promotional creative slot associated with the event."},c={label:"Creative Name",type:"string",description:"The name of the promotional creative."},u={label:"Tax",type:"number",description:"Total tax associated with the transaction.",default:{"@path":"$.properties.tax"}},d={label:"Shipping",type:"number",description:"Shipping cost associated with the transaction.",default:{"@path":"$.properties.shipping"}},l={label:"Order Id",type:"string",description:"The unique identifier of a transaction.",default:{"@path":"$.properties.order_id"}},p={label:"Currency",type:"string",description:"Currency of the items associated with the event, in 3-letter ISO 4217 format.",default:{"@path":"$.properties.currency"}},f={label:"Value",type:"number",description:"The monetary value of the event.",default:{"@path":"$.properties.value"}},h={label:"Coupon",type:"string",description:"Coupon code used for a purchase."},m={label:"Method",type:"string",description:"The method used to login.",default:{"@path":"$.properties.method"}},y={label:"Search Term",type:"string",description:"The term that was searched for.",default:{"@path":"$.properties.query"}},g={label:"Item List Name",description:"The name of the list in which the item was presented to the user.",type:"string",default:{"@path":"$.properties.item_list_name"}},v={label:"Item List Id",description:"The ID of the list in which the item was presented to the user.",type:"string",default:{"@path":"$.properties.item_list_id"}},_={label:"Location ID",type:"string",description:"The ID of the location.",default:{"@path":"$.properties.position"}},b={label:"Products",description:"The list of products purchased.",type:"object",multiple:!0,additionalProperties:!0,properties:{item_id:{label:"Product ID",type:"string",description:"Identifier for the product being purchased."},item_name:{label:"Name",type:"string",description:"Name of the product being purchased."},affiliation:{label:"Affiliation",type:"string",description:"A product affiliation to designate a supplying company or brick and mortar store location."},coupon:{label:"Coupon",type:"string",description:"Coupon code used for a purchase."},currency:{label:"Currency",type:"string",description:"Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format."},discount:{label:"Discount",type:"number",description:"Monetary value of discount associated with a purchase."},index:{label:"Index",type:"number",description:"The index/position of the item in a list."},item_brand:{label:"Brand",type:"string",description:"Brand associated with the product."},item_category:{label:"Category",type:"string",description:"Product category."},item_category2:{label:"Category 2",type:"string",description:"Product category 2."},item_category3:{label:"Category 3",type:"string",description:"Product category 3."},item_category4:{label:"Category 4",type:"string",description:"Product category 4."},item_category5:{label:"Category 5",type:"string",description:"Product category 5."},item_list_id:{label:"Item List ID",type:"string",description:"The ID of the list in which the item was presented to the user."},item_list_name:{label:"Item List Name",type:"string",description:"The name of the list in which the item was presented to the user."},item_variant:{label:"Variant",type:"string",description:"Variant of the product (e.g. Black)."},location_id:{label:"Location ID",type:"string",description:"The location associated with the item."},price:{label:"Price",type:"number",description:"Price of the product being purchased, in units of the specified currency parameter."},quantity:{label:"Quantity",type:"integer",description:"Item quantity."}}},w={...b,default:{"@arrayPath":["$.properties.products",{item_id:{"@path":"$.product_id"},item_name:{"@path":"$.name"},affiliation:{"@path":"$.affiliation"},coupon:{"@path":"$.coupon"},item_brand:{"@path":"$.brand"},item_category:{"@path":"$.category"},item_variant:{"@path":"$.variant"},price:{"@path":"$.price"},quantity:{"@path":"$.quantity"}}]}},$={...b,default:{"@arrayPath":["$.properties.products",{item_id:{"@path":"$.product_id"},item_name:{"@path":"$.name"},affiliation:{"@path":"$.affiliation"},coupon:{"@path":"$.coupon"},index:{"@path":"$.position"},item_brand:{"@path":"$.brand"},item_category:{"@path":"$.category"},item_variant:{"@path":"$.variant"},price:{"@path":"$.price"},quantity:{"@path":"$.quantity"}}]}},E={label:"Send To",type:"boolean",default:!0,description:"If the send_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag"},S={title:"Add Payment Info",description:"Send event when a user submits their payment information",defaultSubscription:'type = "track" and event = "Payment Info Entered"',platform:"web",fields:{user_id:{...r},currency:{...p},value:{...f},coupon:{...h},payment_type:{label:"Payment Type",type:"string",description:"The chosen method of payment.",default:{"@path":"$.properties.payment_method"}},items:{...$,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","add_payment_info",{currency:t.currency,value:t.value,coupon:t.coupon,payment_type:t.payment_type,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},P={title:"Add to Cart",description:"This event signifies that an item was added to a cart for purchase.",defaultSubscription:'type = "track" and event = "Product Added"',platform:"web",fields:{user_id:r,currency:p,items:{...w,required:!0},value:f,user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","add_to_cart",{currency:t.currency,value:t.value,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},k={title:"Add to Wishlist",description:"The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.",platform:"web",defaultSubscription:'type = "track" and event = "Product Added to Wishlist"',fields:{user_id:r,currency:p,value:f,items:{...w,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","add_to_wishlist",{currency:t.currency,value:t.value,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},C={title:"Begin Checkout",description:"This event signifies that a user has begun a checkout.",defaultSubscription:'type = "track" and event = "Checkout Started"',platform:"web",fields:{user_id:r,coupon:{...h,default:{"@path":"$.properties.coupon"}},currency:p,items:{...$,required:!0},value:f,params:t,user_properties:e,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","begin_checkout",{currency:t.currency,value:t.value,coupon:t.coupon,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},T={title:"Custom Event",description:"Send any custom event",defaultSubscription:'type = "track"',platform:"web",fields:{name:{label:"Event Name",description:"The unique name of the custom event created in GA4. GA4 does not accept spaces in event names so Segment will replace any spaces with underscores. More information about GA4 event name rules is available in [their docs](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules&zippy=%2Cin-this-article.%2Cin-this-article).",type:"string",required:!0,default:{"@path":"$.event"}},lowercase:{label:"Lowercase Event Name",description:"If true, the event name will be converted to lowercase before sending to Google. Event names are case sensitive in GA4 so enable this setting to avoid distinct events for casing differences. More information about GA4 event name rules is available in [their docs](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules&zippy=%2Cin-this-article.%2Cin-this-article).",type:"boolean",default:!1},user_id:{...r},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{var o,n;e("event",(o=t.name,n=t.lowercase,o=(o=o.trim()).replace(/\s/g,"_"),n&&(o=o.toLowerCase()),o),{user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},j={title:"Login",description:"Send event when a user logs in",platform:"web",defaultSubscription:'type = "track" and event = "Signed In"',fields:{user_id:r,method:m,user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","login",{method:t.method,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},O={title:"Generate Lead",description:"Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.",platform:"web",defaultSubscription:'type = "track"',fields:{user_id:r,currency:p,value:f,user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","generate_lead",{currency:t.currency,value:t.value,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},x={title:"Purchase",description:"This event signifies when one or more items is purchased by a user.",defaultSubscription:'type = "track" and event = "Order Completed"',platform:"web",fields:{user_id:r,coupon:{...h,default:{"@path":"$.properties.coupon"}},currency:{...p,required:!0},items:{...$,required:!0},transaction_id:{...l,required:!0},shipping:d,tax:u,value:{...f,default:{"@path":"$.properties.total"}},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","purchase",{currency:t.currency,transaction_id:t.transaction_id,value:t.value,coupon:t.coupon,tax:t.tax,shipping:t.shipping,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},N={title:"Refund",description:"This event signifies when one or more items is refunded to a user.",defaultSubscription:'type = "track" and event = "Order Refunded"',platform:"web",fields:{user_id:r,currency:p,transaction_id:{...l,required:!0},value:{...f,default:{"@path":"$.properties.total"}},affiliation:{label:"Affiliation",type:"string",description:"Store or affiliation from which this transaction occurred (e.g. Google Store).",default:{"@path":"$.properties.affiliation"}},coupon:h,shipping:d,tax:u,items:{...$},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","refund",{currency:t.currency,transaction_id:t.transaction_id,value:t.value,affiliation:t.affiliation,coupon:t.coupon,shipping:t.shipping,tax:t.tax,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},I={title:"Remove from Cart",description:"This event signifies that an item was removed from a cart.",platform:"web",defaultSubscription:'type = "track" and event = "Product Removed"',fields:{user_id:r,currency:p,value:f,items:{...w,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","remove_from_cart",{currency:t.currency,value:t.value,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},A={title:"Search",description:"The term that was searched for.",defaultSubscription:'type = "track" and event = "Products Searched"',platform:"web",fields:{user_id:r,user_properties:e,params:t,search_term:y,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","search",{search_term:t.search_term,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},D={title:"Select Item",description:"This event signifies an item was selected from a list.",defaultSubscription:'type = "track" and event = "Product Clicked"',platform:"web",fields:{user_id:r,item_list_name:g,item_list_id:v,items:{...w,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","select_item",{item_list_id:t.item_list_id,item_list_name:t.item_list_name,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},R={title:"Select Promotion",description:"This event signifies a promotion was selected from a list.",defaultSubscription:'type = "track" and event = "Promotion Clicked"',platform:"web",fields:{user_id:r,creative_name:c,creative_slot:{...i,default:{"@path":"$.properties.creative"}},location_id:_,promotion_id:{...o,default:{"@path":"$.properties.promotion_id"}},promotion_name:{...a,default:{"@path":"$.properties.name"}},items:{...w,properties:{...b.properties,creative_name:{...c},creative_slot:{...i},promotion_name:{...a},promotion_id:{...o}}},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","select_promotion",{creative_name:t.creative_name,creative_slot:t.creative_slot,location_id:t.location_id,promotion_id:t.promotion_id,promotion_name:t.promotion_name,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},M={title:"Sign Up",description:"The method used for sign up.",defaultSubscription:'type = "track" and event = "Signed Up"',platform:"web",fields:{user_id:r,method:m,user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","sign_up",{method:t.method,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},L={title:"View Cart",description:"This event signifies that a user viewed their cart.",defaultSubscription:'type = "track" and event = "Cart Viewed"',platform:"web",fields:{user_id:r,currency:p,value:f,items:{...$,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","view_cart",{currency:t.currency,value:t.value,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},U={title:"View Item",description:"This event signifies that some content was shown to the user. Use this event to discover the most popular items viewed.",defaultSubscription:'type = "track" and event = "Product Viewed"',platform:"web",fields:{user_id:r,currency:p,value:f,items:{...w,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","view_item",{currency:t.currency,value:t.value,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},q={title:"View Item List",description:"Log this event when the user has been presented with a list of items of a certain category.",platform:"web",defaultSubscription:'type = "track" and event = "Product List Viewed"',fields:{user_id:r,item_list_id:v,item_list_name:g,items:{...$,required:!0},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","view_item_list",{item_list_id:t.item_list_id,item_list_name:t.item_list_name,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},z={title:"View Promotion",description:"This event signifies a promotion was viewed from a list.",defaultSubscription:'type = "track" and event = "Promotion Viewed"',platform:"web",fields:{user_id:r,creative_name:c,creative_slot:{...i,default:{"@path":"$.properties.creative"}},location_id:_,promotion_id:{...o,default:{"@path":"$.properties.promotion_id"}},promotion_name:{...a,default:{"@path":"$.properties.name"}},items:{...w,required:!0,properties:{...b.properties,creative_name:{...c},creative_slot:{...i},promotion_name:{...a},promotion_id:{...o}}},user_properties:e,params:t,send_to:E},perform:(e,{payload:t,settings:r})=>{e("event","view_promotion",{creative_name:t.creative_name,creative_slot:t.creative_slot,location_id:t.location_id,promotion_id:t.promotion_id,promotion_name:t.promotion_name,items:t.items,user_id:t.user_id??void 0,user_properties:t.user_properties,send_to:1==t.send_to?r.measurementID:"default",...t.params})}},F={title:"Set Configuration Fields",description:"Set custom values for the GA4 configuration fields.",platform:"web",defaultSubscription:'type = "page"',lifecycleHook:"before",fields:{user_id:r,user_properties:e,ads_storage_consent_state:{description:"Consent state indicated by the user for ad cookies. Value must be “granted” or “denied.” This is only used if the Enable Consent Mode setting is on.",label:"Ads Storage Consent State",type:"string"},analytics_storage_consent_state:{description:"Consent state indicated by the user for ad cookies. Value must be “granted” or “denied.” This is only used if the Enable Consent Mode setting is on.",label:"Analytics Storage Consent State",type:"string"},ad_user_data_consent_state:{description:'Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.',label:"Ad User Data Consent State",type:"string",choices:[{label:"Granted",value:"granted"},{label:"Denied",value:"denied"}],default:void 0},ad_personalization_consent_state:{description:'Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.',label:"Ad Personalization Consent State",type:"string",choices:[{label:"Granted",value:"granted"},{label:"Denied",value:"denied"}],default:void 0},campaign_content:{description:"Use campaign content to differentiate ads or links that point to the same URL. Setting this value will override the utm_content query parameter.",label:"Campaign Content",type:"string"},campaign_id:{description:"Use campaign ID to identify a specific campaign. Setting this value will override the utm_id query parameter. ",label:"Campaign ID",type:"string"},campaign_medium:{description:"Use campaign medium to identify a medium such as email or cost-per-click. Setting this value will override the utm_medium query parameter.",label:"Campaign Medium",type:"string"},campaign_name:{description:"Use campaign name to identify a specific product promotion or strategic campaign. Setting this value will override the utm_name query parameter.",label:"Campaign Name",type:"string"},campaign_source:{description:"Use campaign source to identify a search engine, newsletter name, or other source. Setting this value will override the utm_source query parameter.",label:"Campaign Source",type:"string"},campaign_term:{description:"Use campaign term to note the keywords for this ad. Setting this value will override the utm_term query parameter.",label:"Campaign Term",type:"string"},content_group:{description:"Categorize pages and screens into custom buckets so you can see metrics for related groups of information. More information in [Google documentation](https://support.google.com/analytics/answer/11523339).",label:"Content Group",type:"string"},language:{description:"The language preference of the user. If not set, defaults to the user's navigator.language value.",label:"Language",type:"string"},page_location:{description:"The full URL of the page. If not set, defaults to the user's document.location value.",label:"Page Location",type:"string"},page_referrer:{description:"The referral source that brought traffic to a page. This value is also used to compute the traffic source. The format of this value is a URL. If not set, defaults to the user's document.referrer value.",label:"Page Referrer",type:"string"},page_title:{description:"The title of the page or document. If not set, defaults to the user's document.title value.",label:"Page Title",type:"string"},screen_resolution:{description:"The resolution of the screen. Format should be two positive integers separated by an x (i.e. 800x600). If not set, calculated from the user's window.screen value.",label:"Screen Resolution",type:"string"},send_page_view:{description:"Selection overrides toggled value set within Settings",label:"Send Page Views",type:"boolean",choices:[{label:"True",value:"true"},{label:"False",value:"false"}],default:!0},params:t},perform:(e,{payload:t,settings:r})=>{const o=null!=r.cookiePath&&1!==r.cookiePath?.length&&"/"!==r.cookiePath;if(r.enableConsentMode){const r={};t.ads_storage_consent_state&&(r.ad_storage=t.ads_storage_consent_state),t.analytics_storage_consent_state&&(r.analytics_storage=t.analytics_storage_consent_state),t.ad_user_data_consent_state&&(r.ad_user_data=t.ad_user_data_consent_state),t.ad_personalization_consent_state&&(r.ad_personalization=t.ad_personalization_consent_state),e("consent","update",r)}const n={allow_ad_personalization_signals:r.allowAdPersonalizationSignals,allow_google_signals:r.allowGoogleSignals,...t.params};1!=r.cookieUpdate&&(n.cookie_update=!1),"auto"!=r.cookieDomain&&(n.cookie_domain=r.cookieDomain),r.cookiePrefix&&(n.cookie_prefix=r.cookiePrefix),63072e3!=r.cookieExpirationInSeconds&&(n.cookie_expires=r.cookieExpirationInSeconds),o&&(n.cookie_path=r.cookiePath),1==t.send_page_view&&1==r.pageView||(n.send_page_view=t.send_page_view??r.pageView??!0),r.cookieFlags&&(n.cookie_flags=r.cookieFlags),t.screen_resolution&&(n.screen_resolution=t.screen_resolution),t.user_id&&(n.user_id=t.user_id),t.user_properties&&(n.user_properties=t.user_properties),t.page_title&&(n.page_title=t.page_title),t.page_referrer&&(n.page_referrer=t.page_referrer),t.page_location&&(n.page_location=t.page_location),t.language&&(n.language=t.language),t.content_group&&(n.content_group=t.content_group),t.campaign_term&&(n.campaign_term=t.campaign_term),t.campaign_source&&(n.campaign_source=t.campaign_source),t.campaign_name&&(n.campaign_name=t.campaign_name),t.campaign_medium&&(n.campaign_medium=t.campaign_medium),t.campaign_id&&(n.campaign_id=t.campaign_id),t.campaign_content&&(n.campaign_content=t.campaign_content),e("config",r.measurementID,n)}};n(2699);var V=n(3531),K=n.n(V);const G=e=>{if(e.username||e.password){const t=e.username||"",r=e.password||"";return{headers:{Authorization:`Basic ${K()(`${t}:${r}`)}`}}}},H=async(e,t,r)=>(Object.defineProperty(r.headers,"toJSON",{enumerable:!1,value:()=>(e=>{const t={};for(const[r,o]of e.entries())t[r]=o;return t})(r.headers)}),r),B=async(e,t,r)=>{const o=t.statsContext?.statsClient,n=r;let s;if(t.skipResponseCloning)s=await r.text();else{o?.incr("before-response-clone",1);const e=r.clone();s=await e.text(),o?.incr("after-response-clone",1)}const a=t.agent;let i;a&&a.destroy();try{i=n.headers.get("content-type")?.includes("application/json")?JSON.parse(s):s}catch(e){}return n.content=s,n.data=i,n};var J=n(7948),W=n.n(J),Y=n(2501),X=n(3033);const Z=n.n(X)();var Q=n(6933);if(null!=globalThis.process&&"object"==typeof globalThis.process.env&&globalThis.process.env.DEFAULT_REQUEST_TIMEOUT){const e=parseInt(globalThis.process.env.DEFAULT_REQUEST_TIMEOUT,10);Number.isNaN(e)}const ee=e=>null!==e&&"object"==typeof e;function te(e,t){const r=new X.Headers(e||{});return new X.Headers(t||{}).forEach(((e,t)=>{"undefined"===e?r.delete(t):r.set(t,e)})),r}function re(...e){let t={},r={};for(const o of e){if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(ee(o)){for(let[e,r]of Object.entries(o))ee(r)&&e in t&&(r=re(t[e],r)),t[e]=r;ee(o.headers)&&(r=te(r,o.headers))}t.headers=r}return t}function oe(...e){for(const t of e)if(!(0,Q.Kn)(t))throw new TypeError("The 'options' argument must be an object");return re({},...e)}function ne(e){return e.toUpperCase()}class se extends Y.CustomError{constructor(e,t,r){super(e.statusText??String(e.status??"Unknown response error")),this.response=e,this.request=t,this.options=r}}class ae extends Y.CustomError{constructor(e,t){super("Request timed out"),this.request=e,this.options=t,this.code="ETIMEDOUT"}}class ie{constructor(e,t={}){this.setOptions(e,t)}setOptions(e,t){if(this.options={...t,method:ne(t.method??"get"),throwHttpErrors:!1!==t.throwHttpErrors,timeout:t.timeout??1e4},this.abortController=new(W()),this.options.signal&&this.options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this.options.signal=this.abortController.signal,this.request=new X.Request(e,this.options),this.options.searchParams){const e=new URLSearchParams(this.options.searchParams),t=new URL(this.request.url);t.search=e.toString(),this.request=new X.Request(new X.Request(t.toString(),this.request),this.options)}void 0!==this.options.json&&(this.options.body=JSON.stringify(this.options.json),this.request.headers.set("content-type","application/json"),this.request=new X.Request(this.request,{body:this.options.body}))}async executeRequest(){let e=await this.fetch();for(const t of this.options.afterResponse??[]){const r=await t(this.request,this.options,e);r instanceof X.Response&&(e=r)}if(!e.ok&&this.options.throwHttpErrors)throw new se(e,this.request,this.options);return e}async fetch(){for(const e of this.options.beforeRequest??[]){const t=await e({...this.options});t&&(0,Q.Kn)(t)&&this.setOptions(this.request.url,oe(this.options,t))}return!1===this.options.timeout?Z(this.request.clone()):(e=this.request.clone(),t=this.abortController,r=this.options,new Promise(((o,n)=>{const s=setTimeout((()=>{t&&t.abort(),n(new ae(e,r))}),r.timeout);Z(e).then(o).catch(n).then((()=>clearTimeout(s)))})));var e,t,r}}(function e(t={}){const r=(e,r={})=>new ie(e,oe(t,r)).executeRequest();return r.extend=r=>e(oe(t,r)),r})({timeout:1e4,headers:{"user-agent":"Segment (Actions)"},beforeRequest:[G],afterResponse:[B,H]});n(3807);Error;Error,Symbol.iterator;var ce=n(3944),ue=n.n(ce),de=n(3052),le=n.n(de),pe=n(8879),fe=n.n(pe);const he=le()(new(ue())({coerceTypes:"array",allErrors:!0,allowUnionTypes:!0,verbose:!0,removeAdditional:!0}));he.addFormat("text",!0),he.addFormat("date-like",(e=>{let t=fe()(e);return String(Number(e))===e&&(13===e.length&&(t=fe()(Number(e))),t=fe().unix(Number(e))),t.isValid()}));var me;!function(e){e.INVALID_AUTHENTICATION="INVALID_AUTHENTICATION",e.PAYLOAD_VALIDATION_FAILED="PAYLOAD_VALIDATION_FAILED",e.INVALID_CURRENCY_CODE="INVALID_CURRENCY_CODE",e.RETRYABLE_ERROR="RETRYABLE_ERROR",e.REFRESH_TOKEN_EXPIRED="REFRESH_TOKEN_EXPIRED",e.OAUTH_REFRESH_FAILED="OAUTH_REFRESH_FAILED",e.SELF_TIMEOUT="SELF_TIMEOUT"}(me||(me={}));n(7128);for(var ye=256,ge=[];ye--;)ge[ye]=(ye+256).toString(16).substring(1);const ve=function(e){const t=async t=>(await n.e(845).then(n.bind(n,3962))).generatePlugins(e,t,t.subscriptions||[]);return t.pluginName=e.name,t}({name:"Google Analytics 4 Web",slug:"actions-google-analytics-4-web",mode:"device",settings:{measurementID:{description:"The measurement ID associated with the web stream. Found in the Google Analytics UI under: Admin > Data Streams > Web > Measurement ID.",label:"Measurement ID",type:"string",required:!0},allowGoogleSignals:{description:"Set to false to disable all advertising features. Set to true by default.",label:"Allow Google Signals",type:"boolean",default:!0},allowAdPersonalizationSignals:{description:"Set to false to disable all advertising features. Set to true by default.",label:"Allow Ad Personalization Signals",type:"boolean",default:!0},cookieDomain:{description:"Specifies the domain used to store the analytics cookie. Set to “auto” by default.",label:"Cookie Domain",type:"string",default:"auto"},cookieExpirationInSeconds:{description:"Every time a hit is sent to GA4, the analytics cookie expiration time is updated to be the current time plus the value of this field. The default value is two years (63072000 seconds). Please input the expiration value in seconds. More information in [Google Documentation](https://developers.google.com/analytics/devguides/collection/ga4/reference/config#)",label:"Cookie Expiration In Seconds",type:"number",default:63072e3},cookieFlags:{description:"Appends additional flags to the analytics cookie. See [write a new cookie](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie) for some examples of flags to set.",label:"Cookie Flag",type:"string",default:void 0,multiple:!0},cookiePath:{description:"Specifies the subpath used to store the analytics cookie. We recommend to add a forward slash, / , in the first field as it is the Default Value for GA4.",label:"Cookie Path",type:"string",default:"/"},cookiePrefix:{description:"Specifies a prefix to prepend to the analytics cookie name.",label:"Cookie Prefix",type:"string",default:void 0,multiple:!0},cookieUpdate:{description:"Set to false to not update cookies on each page load. This has the effect of cookie expiration being relative to the first time a user visited. Set to true by default so update cookies on each page load.",label:"Cookie Update",type:"boolean",default:!0},enableConsentMode:{description:"Set to true to enable Google’s [Consent Mode](https://support.google.com/analytics/answer/9976101?hl=en). Set to false by default.",label:"Enable Consent Mode",type:"boolean",default:!1},defaultAdsStorageConsentState:{description:"The default value for ad cookies consent state. This is only used if Enable Consent Mode is on. Set to “granted” if it is not explicitly set. Consent state can be updated for each user in the Set Configuration Fields action.",label:"Default Ads Storage Consent State",type:"string",choices:[{label:"Granted",value:"granted"},{label:"Denied",value:"denied"}],default:"granted",depends_on:{conditions:[{fieldKey:"enableConsentMode",operator:"is",value:!0}]}},defaultAnalyticsStorageConsentState:{description:"The default value for analytics cookies consent state. This is only used if Enable Consent Mode is on. Set to “granted” if it is not explicitly set. Consent state can be updated for each user in the Set Configuration Fields action.",label:"Default Analytics Storage Consent State",type:"string",choices:[{label:"Granted",value:"granted"},{label:"Denied",value:"denied"}],default:"granted",depends_on:{conditions:[{fieldKey:"enableConsentMode",operator:"is",value:!0}]}},adUserDataConsentState:{description:'Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.',label:"Ad User Data Consent State",type:"string",choices:[{label:"Granted",value:"granted"},{label:"Denied",value:"denied"}],default:void 0,depends_on:{conditions:[{fieldKey:"enableConsentMode",operator:"is",value:!0}]}},adPersonalizationConsentState:{description:'Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.',label:"Ad Personalization Consent State",type:"string",choices:[{label:"Granted",value:"granted"},{label:"Denied",value:"denied"}],default:void 0,depends_on:{conditions:[{fieldKey:"enableConsentMode",operator:"is",value:!0}]}},waitTimeToUpdateConsentStage:{description:"If your CMP loads asynchronously, it might not always run before the Google tag. To handle such situations, specify a millisecond value to control how long to wait before the consent state update is sent. Please input the wait_for_update in milliseconds.",label:"Wait Time to Update Consent State",type:"number"},pageView:{description:"Set to false to prevent the default snippet from sending page views. Enabled by default.",label:"Page Views",type:"boolean",default:!0}},initialize:async({settings:e},t)=>{if(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),e.enableConsentMode){const t={ad_storage:e.defaultAdsStorageConsentState,analytics_storage:e.defaultAnalyticsStorageConsentState,wait_for_update:e.waitTimeToUpdateConsentStage};e.adUserDataConsentState&&(t.ad_user_data=e.adUserDataConsentState),e.adPersonalizationConsentState&&(t.ad_personalization=e.adPersonalizationConsentState),gtag("consent","default",t)}const r=`https://www.googletagmanager.com/gtag/js?id=${e.measurementID}`;return await t.loadScript(r),window.gtag},presets:[{name:"Set Configuration Fields",subscribe:'type = "page"',partnerAction:"setConfigurationFields",mapping:function(e){const t={};for(const r of Object.keys(e)){const o=e[r].default;void 0!==o&&(t[r]=o)}return t}(F.fields),type:"automatic"}],actions:{addPaymentInfo:S,login:j,signUp:M,search:A,addToCart:P,addToWishlist:k,removeFromCart:I,selectItem:D,selectPromotion:R,viewItem:U,viewPromotion:z,beginCheckout:C,purchase:x,refund:N,viewCart:L,viewItemList:q,generateLead:O,customEvent:T,setConfigurationFields:F}})})(),window["google-analytics-4-webDestination"]=s.default})(); //# sourceMappingURL=696290db1b58ec303210.js.map