/*! For license information please see vendors~signup_forms.e707d6d405eecdf67185.js.LICENSE.txt */ (self.webpackChunk_klaviyo_onsite_modules=self.webpackChunk_klaviyo_onsite_modules||[]).push([[1885],{6199:function(t,e,n){"use strict";function r(t){return!(!t||"function"!=typeof t.hasOwnProperty||!(t.hasOwnProperty("__ownerID")||t._map&&t._map.hasOwnProperty("__ownerID")))}function o(t,e,n){return Object.keys(t).reduce((function(e,r){var o=""+r;return e.has(o)?e.set(o,n(e.get(o),t[o])):e}),e)}n.d(e,{Fv:function(){return k},fK:function(){return P}});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},c=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u(this,t),!e||"string"!=typeof e)throw new Error("Expected a string key for Entity, but found "+e+".");var o=r.idAttribute,i=void 0===o?"id":o,c=r.mergeStrategy,s=void 0===c?function(t,e){return a({},t,e)}:c,f=r.processStrategy,l=void 0===f?function(t){return a({},t)}:f;this._key=e,this._getId="function"==typeof i?i:h(i),this._idAttribute=i,this._mergeStrategy=s,this._processStrategy=l,this.define(n)}return t.prototype.define=function(t){this.schema=Object.keys(t).reduce((function(e,n){var r,o=t[n];return a({},e,((r={})[n]=o,r))}),this.schema||{})},t.prototype.getId=function(t,e,n){return this._getId(t,e,n)},t.prototype.merge=function(t,e){return this._mergeStrategy(t,e)},t.prototype.normalize=function(t,e,n,r,o){var u=this,c=this._processStrategy(t,e,n);return Object.keys(this.schema).forEach((function(t){if(c.hasOwnProperty(t)&&"object"===i(c[t])){var e=u.schema[t];c[t]=r(c[t],c,t,e,o)}})),o(this,c,t,e,n),this.getId(t,e,n)},t.prototype.denormalize=function(t,e){var n=this;return r(t)?o(this.schema,t,e):(Object.keys(this.schema).forEach((function(r){if(t.hasOwnProperty(r)){var o=n.schema[r];t[r]=e(t[r],o)}})),t)},c(t,[{key:"key",get:function(){return this._key}},{key:"idAttribute",get:function(){return this._idAttribute}}]),t}(),p=function(){function t(e,n){u(this,t),n&&(this._schemaAttribute="string"==typeof n?function(t){return t[n]}:n),this.define(e)}return t.prototype.define=function(t){this.schema=t},t.prototype.getSchemaAttribute=function(t,e,n){return!this.isSingleSchema&&this._schemaAttribute(t,e,n)},t.prototype.inferSchema=function(t,e,n){if(this.isSingleSchema)return this.schema;var r=this.getSchemaAttribute(t,e,n);return this.schema[r]},t.prototype.normalizeValue=function(t,e,n,r,o){var i=this.inferSchema(t,e,n);if(!i)return t;var u=r(t,e,n,i,o);return this.isSingleSchema||null==u?u:{id:u,schema:this.getSchemaAttribute(t,e,n)}},t.prototype.denormalizeValue=function(t,e){var n=r(t)?t.get("schema"):t.schema;return this.isSingleSchema||n?e((r(t)?t.get("id"):t.id)||t,this.isSingleSchema?this.schema:this.schema[n]):t},c(t,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),t}(),y=function(t){function e(n,r){if(u(this,e),!r)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return f(this,t.call(this,n,r))}return s(e,t),e.prototype.normalize=function(t,e,n,r,o){return this.normalizeValue(t,e,n,r,o)},e.prototype.denormalize=function(t,e){return this.denormalizeValue(t,e)},e}(p),m=function(t){function e(){return u(this,e),f(this,t.apply(this,arguments))}return s(e,t),e.prototype.normalize=function(t,e,n,r,o){var i=this;return Object.keys(t).reduce((function(e,n,u){var c,s=t[n];return null!=s?a({},e,((c={})[n]=i.normalizeValue(s,t,n,r,o),c)):e}),{})},e.prototype.denormalize=function(t,e){var n=this;return Object.keys(t).reduce((function(r,o){var i,u=t[o];return a({},r,((i={})[o]=n.denormalizeValue(u,e),i))}),{})},e}(p),d=function(t){if(Array.isArray(t)&&t.length>1)throw new Error("Expected schema definition to be a single schema, but found "+t.length+".");return t[0]},v=function(t){return Array.isArray(t)?t:Object.keys(t).map((function(e){return t[e]}))},g=function(t,e,n,r,o,i){return t=d(t),v(e).map((function(e,u){return o(e,n,r,t,i)}))},b=function(t){function e(){return u(this,e),f(this,t.apply(this,arguments))}return s(e,t),e.prototype.normalize=function(t,e,n,r,o){var i=this;return v(t).map((function(t,u){return i.normalizeValue(t,e,n,r,o)})).filter((function(t){return null!=t}))},e.prototype.denormalize=function(t,e){var n=this;return t&&t.map?t.map((function(t){return n.denormalizeValue(t,e)})):t},e}(p),S=function(t,e,n,r,o,i){var u=a({},e);return Object.keys(t).forEach((function(n){var r=t[n],c=o(e[n],e,n,r,i);null==c?delete u[n]:u[n]=c})),u},_=function(t,e,n){if(r(e))return o(t,e,n);var i=a({},e);return Object.keys(t).forEach((function(e){i[e]&&(i[e]=n(i[e],t[e]))})),i},w=function(){function t(e){u(this,t),this.define(e)}return t.prototype.define=function(t){this.schema=Object.keys(t).reduce((function(e,n){var r,o=t[n];return a({},e,((r={})[n]=o,r))}),this.schema||{})},t.prototype.normalize=function(){for(var t=arguments.length,e=Array(t),n=0;n1)for(var n=1;n