Google
Edit File: simple-liking-fc2c5ed7f41f0ce04175-min.js
webpackJsonp([20],{0:function(p,c,a){a(3399);a(1137);a(461);a(556);a(558);a(1131);a(1145);a(1132);a(1133);a(1135);a(557);a(1126);a(1134);a(1136);a(1130);a(984);a(890);a(983);a(982);a(1138);a(1139);a(1140);a(1141);a(1143);a(1144);a(1146)},13:function(p,c,a){c.__esModule=!0;p=a(17);c.default=(p&&p.__esModule?p:{"default":p}).default||function(a){for(var c=1;c<arguments.length;c++){var g=arguments[c],e;for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(a[e]=g[e])}return a}},19:function(p,c,a){p.exports= {"default":a(295),__esModule:!0}},23:function(p,c,a){(function(a,c){p.exports=c()})(this,function(){function a(b,h){h&&(b.prototype=Object.create(h.prototype));b.prototype.constructor=b}function c(b){return d(b)?b:G(b)}function g(b){return f(b)?b:P(b)}function e(b){return q(b)?b:F(b)}function m(b){return d(b)&&!s(b)?b:W(b)}function d(b){return!(!b||!b[Jb])}function f(b){return!(!b||!b[Kb])}function q(b){return!(!b||!b[Lb])}function s(b){return f(b)||q(b)}function r(b){return!(!b||!b[ua])}function y(b){b.value= !1;return b}function k(b){b&&(b.value=!0)}function p(){}function z(b,h){h=h||0;for(var a=Math.max(0,b.length-h),d=Array(a),e=0;e<a;e++)d[e]=b[e+h];return d}function qa(b){void 0===b.size&&(b.size=b.__iterate(wa));return b.size}function X(b,h){if("number"!==typeof h){var a=h>>>0;if(""+a!==h||4294967295===a)return NaN;h=a}return 0>h?qa(b)+h:h}function wa(){return!0}function la(b,h,a){return(0===b||void 0!==a&&b<=-a)&&(void 0===h||void 0!==a&&h>=a)}function K(b,h,a){return void 0===b?a:0>b?Math.max(0, h+b):void 0===h?b:Math.min(h,b)}function u(b){this.next=b}function w(b,h,a,d){b=0===b?h:1===b?a:[h,a];d?d.value=b:d={value:b,done:!1};return d}function t(){return{value:void 0,done:!0}}function Y(b){return b&&"function"===typeof b.next}function Z(b){var h=Ga(b);return h&&h.call(b)}function Ga(b){b=b&&(db&&b[db]||b[Mb]);if("function"===typeof b)return b}function G(b){if(null===b||void 0===b)b=Sa();else if(d(b))b=b.toSeq();else{var h=Nb(b)||"object"===typeof b&&new ma(b);if(!h)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+ b);b=h}return b}function P(b){return null===b||void 0===b?Sa().toKeyedSeq():d(b)?f(b)?b.toSeq():b.fromEntrySeq():Ob(b)}function F(b){return null===b||void 0===b?Sa():!d(b)?eb(b):f(b)?b.entrySeq():b.toIndexedSeq()}function W(b){return(null===b||void 0===b?Sa():!d(b)?eb(b):f(b)?b.entrySeq():b).toSetSeq()}function ea(b){this._array=b;this.size=b.length}function ma(b){var h=Object.keys(b);this._object=b;this._keys=h;this.size=h.length}function Ha(b){this._iterable=b;this.size=b.length||b.size}function Ia(b){this._iterator= b;this._iteratorCache=[]}function fb(b){return!(!b||!b[Pb])}function Sa(){return Qb||(Qb=new ea([]))}function Ob(b){var h=Array.isArray(b)?(new ea(b)).fromEntrySeq():Y(b)?(new Ia(b)).fromEntrySeq():Ga(b)?(new Ha(b)).fromEntrySeq():"object"===typeof b?new ma(b):void 0;if(!h)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+b);return h}function eb(b){var h=Nb(b);if(!h)throw new TypeError("Expected Array or iterable object of values: "+b);return h}function Nb(b){return b&& "number"===typeof b.length?new ea(b):Y(b)?new Ia(b):Ga(b)?new Ha(b):void 0}function Rb(b,h,a,d){var e=b._cache;if(e){for(var f=e.length-1,k=0;k<=f;k++){var c=e[a?f-k:k];if(!1===h(c[1],d?c[0]:k,b))return k+1}return k}return b.__iterateUncached(h,a)}function Sb(b,h,a,d){var e=b._cache;if(e){var f=e.length-1,k=0;return new u(function(){var b=e[a?f-k:k];return k++>f?t():w(h,d?b[0]:k-1,b[1])})}return b.__iteratorUncached(h,a)}function gb(b,h){return h?hb(h,b,"",{"":b}):ib(b)}function hb(b,h,a,d){return Array.isArray(h)? b.call(d,a,F(h).map(function(a,va){return hb(b,a,va,h)})):h&&(h.constructor===Object||void 0===h.constructor)?b.call(d,a,P(h).map(function(a,va){return hb(b,a,va,h)})):h}function ib(b){return Array.isArray(b)?F(b).map(ib).toList():b&&(b.constructor===Object||void 0===b.constructor)?P(b).map(ib).toMap():b}function H(b,h){if(b===h||b!==b&&h!==h)return!0;if(!b||!h)return!1;if("function"===typeof b.valueOf&&"function"===typeof h.valueOf){b=b.valueOf();h=h.valueOf();if(b===h||b!==b&&h!==h)return!0;if(!b|| !h)return!1}return"function"===typeof b.equals&&"function"===typeof h.equals&&b.equals(h)?!0:!1}function jb(b,h){if(b===h)return!0;if(!d(h)||void 0!==b.size&&void 0!==h.size&&b.size!==h.size||void 0!==b.__hash&&void 0!==h.__hash&&b.__hash!==h.__hash||f(b)!==f(h)||q(b)!==q(h)||r(b)!==r(h))return!1;if(0===b.size&&0===h.size)return!0;var a=!s(b);if(r(b)){var e=b.entries();return h.every(function(b,h){var d=e.next().value;return d&&H(d[1],b)&&(a||H(d[0],h))})&&e.next().done}var k=!1;if(void 0===b.size)if(void 0=== h.size)"function"===typeof b.cacheResult&&b.cacheResult();else{var k=!0,c=b;b=h;h=c}var g=!0,c=h.__iterate(function(h,d){if(a?!b.has(h):k?!H(h,b.get(d,x)):!H(b.get(d,x),h))return g=!1});return g&&b.size===c}function M(b,h){if(!(this instanceof M))return new M(b,h);this._value=b;this.size=void 0===h?Infinity:Math.max(0,h);if(0===this.size){if(kb)return kb;kb=this}}function Ta(b,h){if(!b)throw Error(h);}function N(b,h,a){if(!(this instanceof N))return new N(b,h,a);Ta(0!==a,"Cannot step a Range by 0"); b=b||0;void 0===h&&(h=Infinity);a=void 0===a?1:Math.abs(a);h<b&&(a=-a);this._start=b;this._end=h;this._step=a;this.size=Math.max(0,Math.ceil((h-b)/a-1)+1);if(0===this.size){if(lb)return lb;lb=this}}function na(){throw TypeError("Abstract");}function Ja(){}function xa(){}function Ua(){}function S(b){if(!1===b||(null===b||void 0===b)||"function"===typeof b.valueOf&&(b=b.valueOf(),!1===b||null===b||void 0===b))return 0;if(!0===b)return 1;var h=typeof b;if("number"===h){h=b|0;for(h!==b&&(h^=4294967295* b);4294967295<b;)b/=4294967295,h^=b;return h>>>1&1073741824|h&3221225471}if("string"===h)return b.length>Gc?(h=mb[b],void 0===h&&(h=nb(b),ob===Hc&&(ob=0,mb={}),ob++,mb[b]=h),b=h):b=nb(b),b;if("function"===typeof b.hashCode)return b.hashCode();if("object"===h)return Ic(b);if("function"===typeof b.toString)return nb(b.toString());throw Error("Value type "+h+" cannot be hashed.");}function nb(b){for(var h=0,a=0;a<b.length;a++)h=31*h+b.charCodeAt(a)|0;return h>>>1&1073741824|h&3221225471}function Ic(b){var h; if(pb&&(h=qb.get(b),void 0!==h))return h;h=b[ra];if(void 0!==h)return h;if(!Va){h=b.propertyIsEnumerable&&b.propertyIsEnumerable[ra];if(void 0!==h)return h;a:{if(b&&0<b.nodeType)switch(b.nodeType){case 1:h=b.uniqueID;break a;case 9:h=b.documentElement&&b.documentElement.uniqueID;break a}h=void 0}if(void 0!==h)return h}h=++rb;rb&1073741824&&(rb=0);if(pb)qb.set(b,h);else{if(void 0!==Tb&&!1===Tb(b))throw Error("Non-extensible objects are not allowed as keys.");if(Va)Object.defineProperty(b,ra,{enumerable:!1, configurable:!1,writable:!1,value:h});else if(void 0!==b.propertyIsEnumerable&&b.propertyIsEnumerable===b.constructor.prototype.propertyIsEnumerable)b.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},b.propertyIsEnumerable[ra]=h;else if(void 0!==b.nodeType)b[ra]=h;else throw Error("Unable to set a non-enumerable property on object.");}return h}function T(b){Ta(Infinity!==b,"Cannot perform this action with an infinite size.")}function A(b){return null=== b||void 0===b?fa():sb(b)&&!r(b)?b:fa().withMutations(function(h){var a=g(b);T(a.size);a.forEach(function(b,a){return h.set(a,b)})})}function sb(b){return!(!b||!b[Ub])}function Ka(b,h){this.ownerID=b;this.entries=h}function ya(b,h,a){this.ownerID=b;this.bitmap=h;this.nodes=a}function La(b,h,a){this.ownerID=b;this.count=h;this.nodes=a}function sa(b,h,a){this.ownerID=b;this.keyHash=h;this.entries=a}function ga(b,h,a){this.ownerID=b;this.keyHash=h;this.entry=a}function tb(b,h,a){this._type=h;this._reverse= a;this._stack=b._root&&{node:b._root,index:0,__prev:void 0}}function ub(b,h,a,d){var e=Object.create(v);e.size=b;e._root=h;e.__ownerID=a;e.__hash=d;e.__altered=!1;return e}function fa(){return Vb||(Vb=ub(0))}function Wb(b,h,a){var d;if(b._root){d=y(Jc);var e=y(Xb);h=vb(b._root,b.__ownerID,0,void 0,h,a,d,e);if(!e.value)return b;d=b.size+(d.value?a===x?-1:1:0)}else{if(a===x)return b;d=1;h=new Ka(b.__ownerID,[[h,a]])}return b.__ownerID?(b.size=d,b._root=h,b.__hash=void 0,b.__altered=!0,b):h?ub(d,h): fa()}function vb(b,h,a,d,e,f,c,q){if(!b){if(f===x)return b;k(q);k(c);return new ga(h,d,[e,f])}return b.update(h,a,d,e,f,c,q)}function wb(b,h,a,d,e){if(b.keyHash===d)return new sa(h,d,[b.entry,e]);var f=(0===a?b.keyHash:b.keyHash>>>a)&Q,k=(0===a?d:d>>>a)&Q,c;b=f===k?[wb(b,h,a+C,d,e)]:(c=new ga(h,d,e),f<k?[b,c]:[c,b]);return new ya(h,1<<f|1<<k,b)}function Wa(b,h,a){for(var e=[],f=0;f<a.length;f++){var k=a[f],c=g(k);d(k)||(c=c.map(function(b){return gb(b)}));e.push(c)}return Yb(b,h,e)}function Zb(b, h,a){return b&&b.mergeDeep&&d(h)?b.mergeDeep(h):H(b,h)?b:h}function $b(b){return function(h,a,e){if(h&&h.mergeDeepWith&&d(a))return h.mergeDeepWith(b,a);a=b(h,a,e);return H(h,a)?h:a}}function Yb(b,h,a){a=a.filter(function(b){return 0!==b.size});return 0===a.length?b:0===b.size&&!b.__ownerID&&1===a.length?b.constructor(a[0]):b.withMutations(function(b){for(var d=h?function(a,d){b.update(d,x,function(b){return b===x?a:h(b,a,d)})}:function(h,a){b.set(a,h)},e=0;e<a.length;e++)a[e].forEach(d)})}function ac(b, h,a,d){var e=b===x,f=h.next();if(f.done)return e=e?a:b,d=d(e),d===e?b:d;Ta(e||b&&b.set,"invalid keyPath");var f=f.value,k=e?x:b.get(f,x);d=ac(k,h,a,d);return d===k?b:d===x?b.remove(f):(e?fa():b).set(f,d)}function bc(b){b-=b>>1&1431655765;b=(b&858993459)+(b>>2&858993459);b=b+(b>>4)&252645135;b+=b>>8;return b+(b>>16)&127}function D(b){var h=xb();if(null===b||void 0===b)return h;if(cc(b))return b;var a=e(b),d=a.size;if(0===d)return h;T(d);return 0<d&&d<$?Ma(0,d,C,null,new oa(a.toArray())):h.withMutations(function(b){b.setSize(d); a.forEach(function(h,a){return b.set(a,h)})})}function cc(b){return!(!b||!b[dc])}function oa(b,h){this.array=b;this.ownerID=h}function ec(b,h){function a(b,d){var va=d===k?c&&c.array:b&&b.array,q=d>e?0:e-d,Ra=f-d;Ra>$&&(Ra=$);return function(){if(q===Ra)return Na;var b=h?--Ra:q++;return va&&va[b]}}function d(b,k,c){var q,g=b&&b.array,m=c>e?0:e-c>>k,r=(f-c>>k)+1;r>$&&(r=$);return function(){do{if(q){var b=q();if(b!==Na)return b;q=null}if(m===r)return Na;b=h?--r:m++;q=0===k-C?a(g&&g[b],c+(b<<k)):d(g&& g[b],k-C,c+(b<<k))}while(1)}}var e=b._origin,f=b._capacity,k=Oa(f),c=b._tail;return 0===b._level?a(b._root,0):d(b._root,b._level,0)}function Ma(b,h,a,d,e,f,k){var c=Object.create(R);c.size=h-b;c._origin=b;c._capacity=h;c._level=a;c._root=d;c._tail=e;c.__ownerID=f;c.__hash=k;c.__altered=!1;return c}function xb(){return fc||(fc=Ma(0,0,C))}function Kc(b,h,a){h=X(b,h);if(h!==h)return b;if(h>=b.size||0>h)return b.withMutations(function(b){0>h?pa(b,h).set(0,a):pa(b,0,h+1).set(h,a)});h+=b._origin;var d= b._tail,e=b._root,f=y(Xb);h>=Oa(b._capacity)?d=yb(d,b.__ownerID,0,h,a,f):e=yb(e,b.__ownerID,b._level,h,a,f);return!f.value?b:b.__ownerID?(b._root=e,b._tail=d,b.__hash=void 0,b.__altered=!0,b):Ma(b._origin,b._capacity,b._level,e,d)}function yb(b,h,a,d,e,f){var c=d>>>a&Q,q=b&&c<b.array.length;if(!q&&void 0===e)return b;if(0<a){q=b&&b.array[c];e=yb(q,h,a-C,d,e,f);if(e===q)return b;b=za(b,h);b.array[c]=e;return b}if(q&&b.array[c]===e)return b;k(f);b=za(b,h);void 0===e&&c===b.array.length-1?b.array.pop(): b.array[c]=e;return b}function za(b,h){return h&&b&&h===b.ownerID?b:new oa(b?b.array.slice():[],h)}function gc(b,h){if(h>=Oa(b._capacity))return b._tail;if(h<1<<b._level+C){for(var a=b._root,d=b._level;a&&0<d;)a=a.array[h>>>d&Q],d-=C;return a}}function pa(b,h,a){void 0!==h&&(h|=0);void 0!==a&&(a|=0);var d=b.__ownerID||new p,e=b._origin,f=b._capacity;h=e+h;a=void 0===a?f:0>a?f+a:e+a;if(h===e&&a===f)return b;if(h>=a)return b.clear();for(var c=b._level,k=b._root,q=0;0>h+q;)k=new oa(k&&k.array.length? [void 0,k]:[],d),c+=C,q+=1<<c;q&&(h+=q,e+=q,a+=q,f+=q);for(var g=Oa(f),m=Oa(a);m>=1<<c+C;)k=new oa(k&&k.array.length?[k]:[],d),c+=C;var q=b._tail,r=m<g?gc(b,a-1):m>g?new oa([],d):q;if(q&&m>g&&h<f&&q.array.length){for(var z=k=za(k,d),l=c;l>C;l-=C)var s=g>>>l&Q,z=z.array[s]=za(z.array[s],d);z.array[g>>>C&Q]=q}a<f&&(r=r&&r.removeAfter(d,0,a));if(h>=m)h-=m,a-=m,c=C,k=null,r=r&&r.removeBefore(d,0,h);else if(h>e||m<g){for(q=0;k;){f=h>>>c&Q;if(f!==m>>>c&Q)break;f&&(q+=(1<<c)*f);c-=C;k=k.array[f]}k&&h>e&& (k=k.removeBefore(d,c,h-q));k&&m<g&&(k=k.removeAfter(d,c,m-q));q&&(h-=q,a-=q)}return b.__ownerID?(b.size=a-h,b._origin=h,b._capacity=a,b._level=c,b._root=k,b._tail=r,b.__hash=void 0,b.__altered=!0,b):Ma(h,a,c,k,r)}function Xa(b,h,a){for(var f=[],c=0,k=0;k<a.length;k++){var q=a[k],g=e(q);g.size>c&&(c=g.size);d(q)||(g=g.map(function(b){return gb(b)}));f.push(g)}c>b.size&&(b=b.setSize(c));return Yb(b,h,f)}function Oa(b){return b<$?0:b-1>>>C<<C}function I(b){return null===b||void 0===b?Ya():hc(b)?b:Ya().withMutations(function(h){var a= g(b);T(a.size);a.forEach(function(b,a){return h.set(a,b)})})}function hc(b){return sb(b)&&r(b)}function zb(b,h,a,d){var e=Object.create(I.prototype);e.size=b?b.size:0;e._map=b;e._list=h;e.__ownerID=a;e.__hash=d;return e}function Ya(){return ic||(ic=zb(fa(),xb()))}function jc(b,h,a){var d=b._map,e=b._list,f=d.get(h),c=void 0!==f;if(a===x){if(!c)return b;e.size>=$&&e.size>=2*d.size?(h=e.filter(function(b,h){return void 0!==b&&f!==h}),d=h.toKeyedSeq().map(function(b){return b[0]}).flip().toMap(),b.__ownerID&& (d.__ownerID=h.__ownerID=b.__ownerID)):(d=d.remove(h),h=f===e.size-1?e.pop():e.set(f,void 0))}else if(c){if(a===e.get(f)[1])return b;h=e.set(f,[h,a])}else d=d.set(h,e.size),h=e.set(e.size,[h,a]);return b.__ownerID?(b.size=d.size,b._map=d,b._list=h,b.__hash=void 0,b):zb(d,h)}function aa(b,h){this._iter=b;this._useKeys=h;this.size=b.size}function Aa(b){this._iter=b;this.size=b.size}function Ba(b){this._iter=b;this.size=b.size}function Ca(b){this._iter=b;this.size=b.size}function kc(b){var h=ha(b);h._iter= b;h.size=b.size;h.flip=function(){return b};h.reverse=function(){var h=b.reverse.apply(this);h.flip=function(){return b.reverse()};return h};h.has=function(h){return b.includes(h)};h.includes=function(h){return b.has(h)};h.cacheResult=Ab;h.__iterateUncached=function(h,a){var d=this;return b.__iterate(function(b,a){return!1!==h(a,b,d)},a)};h.__iteratorUncached=function(h,a){if(h===ia){var d=b.__iterator(h,a);return new u(function(){var b=d.next();if(!b.done){var h=b.value[0];b.value[0]=b.value[1]; b.value[1]=h}return b})}return b.__iterator(h===ba?Pa:ba,a)};return h}function lc(b,h,a){var d=ha(b);d.size=b.size;d.has=function(h){return b.has(h)};d.get=function(d,e){var f=b.get(d,x);return f===x?e:h.call(a,f,d,b)};d.__iterateUncached=function(d,e){var f=this;return b.__iterate(function(b,e,c){return!1!==d(h.call(a,b,e,c),e,f)},e)};d.__iteratorUncached=function(d,e){var f=b.__iterator(ia,e);return new u(function(){var e=f.next();if(e.done)return e;var c=e.value,k=c[0];return w(d,k,h.call(a,c[1], k,b),e)})};return d}function Bb(b,h){var a=ha(b);a._iter=b;a.size=b.size;a.reverse=function(){return b};b.flip&&(a.flip=function(){var h=kc(b);h.reverse=function(){return b.flip()};return h});a.get=function(a,d){return b.get(h?a:-1-a,d)};a.has=function(a){return b.has(h?a:-1-a)};a.includes=function(h){return b.includes(h)};a.cacheResult=Ab;a.__iterate=function(h,a){var d=this;return b.__iterate(function(b,a){return h(b,a,d)},!a)};a.__iterator=function(h,a){return b.__iterator(h,!a)};return a}function mc(b, h,a,d){var e=ha(b);d&&(e.has=function(d){var e=b.get(d,x);return e!==x&&!!h.call(a,e,d,b)},e.get=function(d,e){var f=b.get(d,x);return f!==x&&h.call(a,f,d,b)?f:e});e.__iterateUncached=function(e,f){var c=this,k=0;b.__iterate(function(b,f,q){if(h.call(a,b,f,q))return k++,e(b,d?f:k-1,c)},f);return k};e.__iteratorUncached=function(e,f){var c=b.__iterator(ia,f),k=0;return new u(function(){for(;;){var f=c.next();if(f.done)return f;var q=f.value,g=q[0],q=q[1];if(h.call(a,q,g,b))return w(e,d?g:k++,q,f)}})}; return e}function Lc(b,a,d){var e=A().asMutable();b.__iterate(function(f,c){e.update(a.call(d,f,c,b),0,function(b){return b+1})});return e.asImmutable()}function Mc(b,a,d){var c=f(b),k=(r(b)?I():A()).asMutable();b.__iterate(function(e,f){k.update(a.call(d,e,f,b),function(b){return b=b||[],b.push(c?[f,e]:e),b})});var z=f(b)?g:q(b)?e:m;return k.map(function(a){return B(b,z(a))})}function Cb(b,a,d,e){var f=b.size;void 0!==a&&(a|=0);void 0!==d&&(d|=0);if(la(a,d,f))return b;var c=K(a,f,0),f=K(d,f,f);if(c!== c||f!==f)return Cb(b.toSeq().cacheResult(),a,d,e);a=f-c;var k;a===a&&(k=0>a?0:a);a=ha(b);a.size=0===k?k:b.size&&k||void 0;!e&&(fb(b)&&0<=k)&&(a.get=function(a,h){a=X(this,a);return 0<=a&&a<k?b.get(a+c,h):h});a.__iterateUncached=function(a,h){var d=this;if(0===k)return 0;if(h)return this.cacheResult().__iterate(a,h);var f=0,q=!0,g=0;b.__iterate(function(b,h){if(!q||!(q=f++<c))return g++,!1!==a(b,e?h:g-1,d)&&g!==k});return g};a.__iteratorUncached=function(a,h){if(0!==k&&h)return this.cacheResult().__iterator(a, h);var d=0!==k&&b.__iterator(a,h),f=0,q=0;return new u(function(){for(;f++<c;)d.next();if(++q>k)return t();var b=d.next();return e||a===ba?b:a===Pa?w(a,q-1,void 0,b):w(a,q-1,b.value[1],b)})};return a}function Nc(b,a,d){var e=ha(b);e.__iterateUncached=function(e,f){var c=this;if(f)return this.cacheResult().__iterate(e,f);var k=0;b.__iterate(function(b,f,q){return a.call(d,b,f,q)&&++k&&e(b,f,c)});return k};e.__iteratorUncached=function(e,f){var k=this;if(f)return this.cacheResult().__iterator(e,f); var c=b.__iterator(ia,f),q=!0;return new u(function(){if(!q)return t();var b=c.next();if(b.done)return b;var f=b.value,g=f[0],f=f[1];return!a.call(d,f,g,k)?(q=!1,t()):e===ia?b:w(e,g,f,b)})};return e}function nc(b,a,d,e){var f=ha(b);f.__iterateUncached=function(f,k){var c=this;if(k)return this.cacheResult().__iterate(f,k);var q=!0,g=0;b.__iterate(function(b,k,m){if(!q||!(q=a.call(d,b,k,m)))return g++,f(b,e?k:g-1,c)});return g};f.__iteratorUncached=function(f,k){var c=this;if(k)return this.cacheResult().__iterator(f, k);var q=b.__iterator(ia,k),g=!0,m=0;return new u(function(){var b,k,r;do{b=q.next();if(b.done)return e||f===ba?b:f===Pa?w(f,m++,void 0,b):w(f,m++,b.value[1],b);r=b.value;k=r[0];r=r[1];g&&(g=a.call(d,r,k,c))}while(g);return f===ia?b:w(f,k,r,b)})};return f}function Oc(b,a){var e=f(b),k=[b].concat(a).map(function(b){d(b)?e&&(b=g(b)):b=e?Ob(b):eb(Array.isArray(b)?b:[b]);return b}).filter(function(b){return 0!==b.size});if(0===k.length)return b;if(1===k.length){var c=k[0];if(c===b||e&&f(c)||q(b)&&q(c))return c}c= new ea(k);e?c=c.toKeyedSeq():q(b)||(c=c.toSetSeq());c=c.flatten(!0);c.size=k.reduce(function(b,a){if(void 0!==b){var h=a.size;if(void 0!==h)return b+h}},0);return c}function oc(b,a,e){var f=ha(b);f.__iterateUncached=function(f,k){function c(b,m){var r=this;b.__iterate(function(b,k){if((!a||m<a)&&d(b))c(b,m+1);else if(!1===f(b,e?k:q++,r))g=!0;return!g},k)}var q=0,g=!1;c(b,0);return q};f.__iteratorUncached=function(f,k){var c=b.__iterator(f,k),q=[],g=0;return new u(function(){for(;c;){var b=c.next(); if(!1!==b.done)c=q.pop();else{var m=b.value;f===ia&&(m=m[1]);if((!a||q.length<a)&&d(m))q.push(c),c=m.__iterator(f,k);else return e?b:w(f,g++,m,b)}}return t()})};return f}function Pc(b,a,d){var k=f(b)?g:q(b)?e:m;return b.toSeq().map(function(e,f){return k(a.call(d,e,f,b))}).flatten(!0)}function Qc(b,a){var d=ha(b);d.size=b.size&&2*b.size-1;d.__iterateUncached=function(d,e){var f=this,k=0;b.__iterate(function(b,e){return(!k||!1!==d(a,k++,f))&&!1!==d(b,k++,f)},e);return k};d.__iteratorUncached=function(d, e){var f=b.__iterator(ba,e),k=0,c;return new u(function(){if(!c||k%2)if(c=f.next(),c.done)return c;return k%2?w(d,k++,a):w(d,k++,c.value,c)})};return d}function Da(b,a,d){a||(a=pc);var e=f(b),k=0,c=b.toSeq().map(function(a,h){return[h,a,k++,d?d(a,h,b):a]}).toArray();c.sort(function(b,d){return a(b[3],d[3])||b[2]-d[2]}).forEach(e?function(b,a){c[a].length=2}:function(b,a){c[a]=b[1]});return e?P(c):q(b)?F(c):W(c)}function Za(b,a,d){a||(a=pc);if(d){var e=b.toSeq().map(function(a,h){return[a,d(a,h,b)]}).reduce(function(b, d){return qc(a,b[1],d[1])?d:b});return e&&e[0]}return b.reduce(function(b,d){return qc(a,b,d)?d:b})}function qc(b,a,d){b=b(d,a);return 0===b&&d!==a&&(void 0===d||null===d||d!==d)||0<b}function Db(b,a,d){b=ha(b);b.size=(new ea(d)).map(function(b){return b.size}).min();b.__iterate=function(b,a){for(var h=this.__iterator(ba,a),d,e=0;!(d=h.next()).done&&!1!==b(d.value,e++,this););return e};b.__iteratorUncached=function(b,e){var f=d.map(function(b){return b=c(b),Z(e?b.reverse():b)}),k=0,q=!1;return new u(function(){var d; q||(d=f.map(function(b){return b.next()}),q=d.some(function(b){return b.done}));return q?t():w(b,k++,a.apply(null,d.map(function(b){return b.value})))})};return b}function B(b,a){return fb(b)?a:b.constructor(a)}function rc(b){if(b!==Object(b))throw new TypeError("Expected [K, V] tuple: "+b);}function sc(b){T(b.size);return qa(b)}function ha(b){return Object.create((f(b)?P:q(b)?F:W).prototype)}function Ab(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)} function pc(b,a){return b>a?1:b<a?-1:0}function tc(b){var a=Z(b);if(!a){if(!(b&&"number"===typeof b.length))throw new TypeError("Expected iterable or array-like: "+b);a=Z(c(b))}return a}function U(b,a){var d,e=function(k){if(k instanceof e)return k;if(!(this instanceof e))return new e(k);if(!d){d=!0;var c=Object.keys(b);try{c.forEach(Rc.bind(void 0,f))}catch(q){}f.size=c.length;f._name=a;f._keys=c;f._defaultValues=b}this._map=A(k)},f=e.prototype=Object.create(L);return f.constructor=e}function $a(b, a,d){b=Object.create(Object.getPrototypeOf(b));b._map=a;b.__ownerID=d;return b}function Rc(b,a){Object.defineProperty(b,a,{get:function(){return this.get(a)},set:function(b){Ta(this.__ownerID,"Cannot set on an immutable record.");this.set(a,b)}})}function E(b){return null===b||void 0===b?Eb():Fb(b)&&!r(b)?b:Eb().withMutations(function(a){var d=m(b);T(d.size);d.forEach(function(b){return a.add(b)})})}function Fb(b){return!(!b||!b[uc])}function Gb(b,a){return b.__ownerID?(b.size=a.size,b._map=a,b): a===b._map?b:0===a.size?b.__empty():b.__make(a)}function vc(b,a){var d=Object.create(V);d.size=b?b.size:0;d._map=b;d.__ownerID=a;return d}function Eb(){return wc||(wc=vc(fa()))}function ja(b){return null===b||void 0===b?Hb():xc(b)?b:Hb().withMutations(function(a){var d=m(b);T(d.size);d.forEach(function(b){return a.add(b)})})}function xc(b){return Fb(b)&&r(b)}function yc(b,a){var d=Object.create(ab);d.size=b?b.size:0;d._map=b;d.__ownerID=a;return d}function Hb(){return zc||(zc=yc(Ya()))}function J(b){return null=== b||void 0===b?Ea||(Ea=ta(0)):Ac(b)?b:(Ea||(Ea=ta(0))).unshiftAll(b)}function Ac(b){return!(!b||!b[Bc])}function ta(b,a,d,e){var f=Object.create(Fa);f.size=b;f._head=a;f.__ownerID=d;f.__hash=e;f.__altered=!1;return f}function ka(b,a){var d=function(d){b.prototype[d]=a[d]};Object.keys(a).forEach(d);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(a).forEach(d);return b}function Sc(b,a){return a}function Tc(b,a){return[a,b]}function bb(b){return function(){return!b.apply(this,arguments)}}function Cc(b){return function(){return-b.apply(this, arguments)}}function Dc(b){return"string"===typeof b?JSON.stringify(b):b}function Uc(){return z(arguments)}function Ec(b,a){return b<a?1:b>a?-1:0}function Vc(b){if(Infinity===b.size)return 0;var a=r(b),d=f(b),e=a?1:0;b=b.__iterate(d?a?function(b,a){e=31*e+Fc(S(b),S(a))|0}:function(b,a){e=e+Fc(S(b),S(a))|0}:a?function(b){e=31*e+S(b)|0}:function(b){e=e+S(b)|0});return Wc(b,e)}function Wc(b,a){a=Qa(a,3432918353);a=Qa(a<<15|a>>>-15,461845907);a=Qa(a<<13|a>>>-13,5);a=(a+3864292196|0)^b;a=Qa(a^a>>>16,2246822507); a=Qa(a^a>>>13,3266489909);return(a^a>>>16)>>>1&1073741824|(a^a>>>16)&3221225471}function Fc(b,a){return b^a+2654435769+(b<<6)+(b>>2)|0}var ca=Array.prototype.slice;a(g,c);a(e,c);a(m,c);c.isIterable=d;c.isKeyed=f;c.isIndexed=q;c.isAssociative=s;c.isOrdered=r;c.Keyed=g;c.Indexed=e;c.Set=m;var Jb="@@__IMMUTABLE_ITERABLE__@@",Kb="@@__IMMUTABLE_KEYED__@@",Lb="@@__IMMUTABLE_INDEXED__@@",ua="@@__IMMUTABLE_ORDERED__@@",C=5,$=1<<C,Q=$-1,x={},Jc={value:!1},Xb={value:!1},Pa=0,ba=1,ia=2,db="function"===typeof Symbol&& Symbol.iterator,Mb="@@iterator",Ib=db||Mb;u.prototype.toString=function(){return"[Iterator]"};u.KEYS=Pa;u.VALUES=ba;u.ENTRIES=ia;u.prototype.inspect=u.prototype.toSource=function(){return this.toString()};u.prototype[Ib]=function(){return this};a(G,c);G.of=function(){return G(arguments)};G.prototype.toSeq=function(){return this};G.prototype.toString=function(){return this.__toString("Seq {","}")};G.prototype.cacheResult=function(){!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(), this.size=this._cache.length);return this};G.prototype.__iterate=function(b,a){return Rb(this,b,a,!0)};G.prototype.__iterator=function(b,a){return Sb(this,b,a,!0)};a(P,G);P.prototype.toKeyedSeq=function(){return this};a(F,G);F.of=function(){return F(arguments)};F.prototype.toIndexedSeq=function(){return this};F.prototype.toString=function(){return this.__toString("Seq [","]")};F.prototype.__iterate=function(b,a){return Rb(this,b,a,!1)};F.prototype.__iterator=function(b,a){return Sb(this,b,a,!1)}; a(W,G);W.of=function(){return W(arguments)};W.prototype.toSetSeq=function(){return this};G.isSeq=fb;G.Keyed=P;G.Set=W;G.Indexed=F;var Pb="@@__IMMUTABLE_SEQ__@@";G.prototype[Pb]=!0;a(ea,F);ea.prototype.get=function(b,a){return this.has(b)?this._array[X(this,b)]:a};ea.prototype.__iterate=function(b,a){for(var d=this._array,e=d.length-1,f=0;f<=e;f++)if(!1===b(d[a?e-f:f],f,this))return f+1;return f};ea.prototype.__iterator=function(b,a){var d=this._array,e=d.length-1,f=0;return new u(function(){return f> e?t():w(b,f,d[a?e-f++:f++])})};a(ma,P);ma.prototype.get=function(b,a){return void 0!==a&&!this.has(b)?a:this._object[b]};ma.prototype.has=function(b){return this._object.hasOwnProperty(b)};ma.prototype.__iterate=function(b,a){for(var d=this._object,e=this._keys,f=e.length-1,k=0;k<=f;k++){var c=e[a?f-k:k];if(!1===b(d[c],c,this))return k+1}return k};ma.prototype.__iterator=function(b,a){var d=this._object,e=this._keys,f=e.length-1,k=0;return new u(function(){var c=e[a?f-k:k];return k++>f?t():w(b,c, d[c])})};ma.prototype[ua]=!0;a(Ha,F);Ha.prototype.__iterateUncached=function(b,a){if(a)return this.cacheResult().__iterate(b,a);var d=Z(this._iterable),e=0;if(Y(d))for(var f;!(f=d.next()).done&&!1!==b(f.value,e++,this););return e};Ha.prototype.__iteratorUncached=function(b,a){if(a)return this.cacheResult().__iterator(b,a);var d=Z(this._iterable);if(!Y(d))return new u(t);var e=0;return new u(function(){var a=d.next();return a.done?a:w(b,e++,a.value)})};a(Ia,F);Ia.prototype.__iterateUncached=function(b, a){if(a)return this.cacheResult().__iterate(b,a);for(var d=this._iterator,e=this._iteratorCache,f=0;f<e.length;)if(!1===b(e[f],f++,this))return f;for(var k;!(k=d.next()).done&&!(k=k.value,e[f]=k,!1===b(k,f++,this)););return f};Ia.prototype.__iteratorUncached=function(b,a){if(a)return this.cacheResult().__iterator(b,a);var d=this._iterator,e=this._iteratorCache,f=0;return new u(function(){if(f>=e.length){var a=d.next();if(a.done)return a;e[f]=a.value}return w(b,f,e[f++])})};var Qb;a(M,F);M.prototype.toString= function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"};M.prototype.get=function(b,a){return this.has(b)?this._value:a};M.prototype.includes=function(b){return H(this._value,b)};M.prototype.slice=function(b,a){var d=this.size;return la(b,a,d)?this:new M(this._value,K(a,d,d)-K(b,d,0))};M.prototype.reverse=function(){return this};M.prototype.indexOf=function(b){return H(this._value,b)?0:-1};M.prototype.lastIndexOf=function(b){return H(this._value,b)?this.size:-1}; M.prototype.__iterate=function(b,a){for(var d=0;d<this.size;d++)if(!1===b(this._value,d,this))return d+1;return d};M.prototype.__iterator=function(b,a){var d=this,e=0;return new u(function(){return e<d.size?w(b,e++,d._value):t()})};M.prototype.equals=function(b){return b instanceof M?H(this._value,b._value):jb(b)};var kb;a(N,F);N.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1<this._step?" by "+this._step:"")+" ]"};N.prototype.get=function(b, a){return this.has(b)?this._start+X(this,b)*this._step:a};N.prototype.includes=function(b){b=(b-this._start)/this._step;return 0<=b&&b<this.size&&b===Math.floor(b)};N.prototype.slice=function(b,a){if(la(b,a,this.size))return this;b=K(b,this.size,0);a=K(a,this.size,this.size);return a<=b?new N(0,0):new N(this.get(b,this._end),this.get(a,this._end),this._step)};N.prototype.indexOf=function(b){b-=this._start;return 0===b%this._step&&(b/=this._step,0<=b&&b<this.size)?b:-1};N.prototype.lastIndexOf=function(b){return this.indexOf(b)}; N.prototype.__iterate=function(b,a){for(var d=this.size-1,e=this._step,f=a?this._start+d*e:this._start,k=0;k<=d;k++){if(!1===b(f,k,this))return k+1;f+=a?-e:e}return k};N.prototype.__iterator=function(b,a){var d=this.size-1,e=this._step,f=a?this._start+d*e:this._start,k=0;return new u(function(){var c=f;f+=a?-e:e;return k>d?t():w(b,k++,c)})};N.prototype.equals=function(b){return b instanceof N?this._start===b._start&&this._end===b._end&&this._step===b._step:jb(this,b)};var lb;a(na,c);a(Ja,na);a(xa, na);a(Ua,na);na.Keyed=Ja;na.Indexed=xa;na.Set=Ua;var Qa="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(b,a){b|=0;a|=0;var d=b&65535,e=a&65535;return d*e+((b>>>16)*e+d*(a>>>16)<<16>>>0)|0},Tb=Object.isExtensible,Va;try{Object.defineProperty({},"@",{}),Va=!0}catch($c){Va=!1}var pb="function"===typeof WeakMap,qb;pb&&(qb=new WeakMap);var rb=0,ra="__immutablehash__";"function"===typeof Symbol&&(ra=Symbol(ra));var Gc=16,Hc=255,ob=0,mb={};a(A,Ja);A.prototype.toString=function(){return this.__toString("Map {", "}")};A.prototype.get=function(b,a){return this._root?this._root.get(0,void 0,b,a):a};A.prototype.set=function(b,a){return Wb(this,b,a)};A.prototype.setIn=function(b,a){return this.updateIn(b,x,function(){return a})};A.prototype.remove=function(b){return Wb(this,b,x)};A.prototype.deleteIn=function(b){return this.updateIn(b,function(){return x})};A.prototype.update=function(b,a,d){return 1===arguments.length?b(this):this.updateIn([b],a,d)};A.prototype.updateIn=function(b,a,d){d||(d=a,a=void 0);b=ac(this, tc(b),a,d);return b===x?void 0:b};A.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):fa()};A.prototype.merge=function(){return Wa(this,void 0,arguments)};A.prototype.mergeWith=function(b){var a=ca.call(arguments,1);return Wa(this,b,a)};A.prototype.mergeIn=function(b){var a=ca.call(arguments,1);return this.updateIn(b,fa(),function(b){return"function"===typeof b.merge?b.merge.apply(b,a):a[a.length-1]})};A.prototype.mergeDeep= function(){return Wa(this,Zb,arguments)};A.prototype.mergeDeepWith=function(b){var a=ca.call(arguments,1);return Wa(this,$b(b),a)};A.prototype.mergeDeepIn=function(b){var a=ca.call(arguments,1);return this.updateIn(b,fa(),function(b){return"function"===typeof b.mergeDeep?b.mergeDeep.apply(b,a):a[a.length-1]})};A.prototype.sort=function(b){return I(Da(this,b))};A.prototype.sortBy=function(b,a){return I(Da(this,a,b))};A.prototype.withMutations=function(b){var a=this.asMutable();b(a);return a.wasAltered()? a.__ensureOwner(this.__ownerID):this};A.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new p)};A.prototype.asImmutable=function(){return this.__ensureOwner()};A.prototype.wasAltered=function(){return this.__altered};A.prototype.__iterator=function(b,a){return new tb(this,b,a)};A.prototype.__iterate=function(b,a){var d=this,e=0;this._root&&this._root.iterate(function(a){e++;return b(a[1],a[0],d)},a);return e};A.prototype.__ensureOwner=function(b){return b===this.__ownerID? this:!b?(this.__ownerID=b,this.__altered=!1,this):ub(this.size,this._root,b,this.__hash)};A.isMap=sb;var Ub="@@__IMMUTABLE_MAP__@@",v=A.prototype;v[Ub]=!0;v["delete"]=v.remove;v.removeIn=v.deleteIn;Ka.prototype.get=function(b,a,d,e){b=this.entries;a=0;for(var f=b.length;a<f;a++)if(H(d,b[a][0]))return b[a][1];return e};Ka.prototype.update=function(b,a,d,e,f,c,q){d=f===x;a=this.entries;for(var g=0,m=a.length;g<m&&!H(e,a[g][0]);g++);var r=g<m;if(r?a[g][1]===f:d)return this;k(q);(d||!r)&&k(c);if(!(d&& 1===a.length)){if(!r&&!d&&a.length>=Xc){b||(b=new p);e=new ga(b,S(e),[e,f]);for(f=0;f<a.length;f++)c=a[f],e=e.update(b,0,void 0,c[0],c[1]);return e}a=(c=b&&b===this.ownerID)?a:z(a);r?d?g===m-1?a.pop():a[g]=a.pop():a[g]=[e,f]:a.push([e,f]);return c?(this.entries=a,this):new Ka(b,a)}};ya.prototype.get=function(b,a,d,e){void 0===a&&(a=S(d));var f=1<<((0===b?a:a>>>b)&Q),k=this.bitmap;return 0===(k&f)?e:this.nodes[bc(k&f-1)].get(b+C,a,d,e)};ya.prototype.update=function(b,a,d,e,f,k,c){void 0===d&&(d=S(e)); var q=(0===a?d:d>>>a)&Q,g=1<<q,m=this.bitmap,r=0!==(m&g);if(!r&&f===x)return this;var l=bc(m&g-1),s=this.nodes,n=r?s[l]:void 0;a=vb(n,b,a+C,d,e,f,k,c);if(a===n)return this;if(!r&&a&&s.length>=Yc){l=m;g=0;r=Array($);for(m=0;0!==l;m++,l>>>=1)r[m]=l&1?s[g++]:void 0;r[q]=a;return new La(b,g+1,r)}if(r&&!a&&2===s.length&&(s[l^1].constructor===ga||s[l^1].constructor===sa))return s[l^1];if(r&&a&&1===s.length&&(a.constructor===ga||a.constructor===sa))return a;q=b&&b===this.ownerID;g=r?a?m:m^g:m|g;if(r)if(a)s= q?s:z(s),s[l]=a;else if(a=s.length-1,q&&l===a)s.pop();else{r=Array(a);for(n=m=0;n<a;n++)n===l&&(m=1),r[n]=s[n+m];s=r}else if(r=s.length+1,q&&l+1===r)s[l]=a;else{m=Array(r);for(d=n=0;d<r;d++)d===l?(m[d]=a,n=-1):m[d]=s[d+n];s=m}return q?(this.bitmap=g,this.nodes=s,this):new ya(b,g,s)};La.prototype.get=function(b,a,d,e){void 0===a&&(a=S(d));var f=this.nodes[(0===b?a:a>>>b)&Q];return f?f.get(b+C,a,d,e):e};La.prototype.update=function(b,a,d,e,f,k,c){void 0===d&&(d=S(e));var q=(0===a?d:d>>>a)&Q,g=this.nodes, m=g[q];if(f===x&&!m)return this;a=vb(m,b,a+C,d,e,f,k,c);if(a===m)return this;d=this.count;if(m){if(!a&&(d--,d<Zc)){a=m=0;d=Array(d);e=0;f=1;for(k=g.length;e<k;e++,f<<=1)c=g[e],void 0!==c&&e!==q&&(m|=f,d[a++]=c);return new ya(b,m,d)}}else d++;g=(m=b&&b===this.ownerID)?g:z(g);g[q]=a;return m?(this.count=d,this.nodes=g,this):new La(b,d,g)};sa.prototype.get=function(b,a,d,e){b=this.entries;a=0;for(var f=b.length;a<f;a++)if(H(d,b[a][0]))return b[a][1];return e};sa.prototype.update=function(b,a,d,e,f,c, q){void 0===d&&(d=S(e));var g=f===x;if(d!==this.keyHash){if(g)return this;k(q);k(c);return wb(this,b,a,d,[e,f])}var m=this.entries;a=0;for(d=m.length;a<d&&!H(e,m[a][0]);a++);var r=a<d;if(r?m[a][1]===f:g)return this;k(q);(g||!r)&&k(c);if(g&&2===d)return new ga(b,this.keyHash,m[a^1]);q=(c=b&&b===this.ownerID)?m:z(m);r?g?a===d-1?q.pop():q[a]=q.pop():q[a]=[e,f]:q.push([e,f]);return c?(this.entries=q,this):new sa(b,this.keyHash,q)};ga.prototype.get=function(b,a,d,e){return H(d,this.entry[0])?this.entry[1]: e};ga.prototype.update=function(b,a,d,e,f,c,q){d=f===x;var g=H(e,this.entry[0]);if(g?f===this.entry[1]:d)return this;k(q);if(d)k(c);else{if(g)return b&&b===this.ownerID?(this.entry[1]=f,this):new ga(b,this.keyHash,[e,f]);k(c);return wb(this,b,a,S(e),[e,f])}};Ka.prototype.iterate=sa.prototype.iterate=function(b,a){for(var d=this.entries,e=0,f=d.length-1;e<=f;e++)if(!1===b(d[a?f-e:e]))return!1};ya.prototype.iterate=La.prototype.iterate=function(b,a){for(var d=this.nodes,e=0,f=d.length-1;e<=f;e++){var k= d[a?f-e:e];if(k&&!1===k.iterate(b,a))return!1}};ga.prototype.iterate=function(b,a){return b(this.entry)};a(tb,u);tb.prototype.next=function(){for(var b=this._type,a=this._stack;a;){var d=a.node,e=a.index++,f;if(d.entry){if(0===e)return w(b,d.entry[0],d.entry[1])}else if(d.entries){if(f=d.entries.length-1,e<=f)return w(b,d.entries[this._reverse?f-e:e][0],d.entries[this._reverse?f-e:e][1])}else if(f=d.nodes.length-1,e<=f){if(d=d.nodes[this._reverse?f-e:e]){if(d.entry)return w(b,d.entry[0],d.entry[1]); a=this._stack={node:d,index:0,__prev:a}}continue}a=this._stack=this._stack.__prev}return t()};var Vb,Xc=$/4,Yc=$/2,Zc=$/4;a(D,xa);D.of=function(){return this(arguments)};D.prototype.toString=function(){return this.__toString("List [","]")};D.prototype.get=function(b,a){b=X(this,b);if(0<=b&&b<this.size){b+=this._origin;var d=gc(this,b);return d&&d.array[b&Q]}return a};D.prototype.set=function(b,a){return Kc(this,b,a)};D.prototype.remove=function(b){return!this.has(b)?this:0===b?this.shift():b===this.size- 1?this.pop():this.splice(b,1)};D.prototype.insert=function(b,a){return this.splice(b,0,a)};D.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=C,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):xb()};D.prototype.push=function(){var b=arguments,a=this.size;return this.withMutations(function(d){pa(d,0,a+b.length);for(var e=0;e<b.length;e++)d.set(a+e,b[e])})};D.prototype.pop=function(){return pa(this,0,-1)};D.prototype.unshift= function(){var b=arguments;return this.withMutations(function(a){pa(a,-b.length);for(var d=0;d<b.length;d++)a.set(d,b[d])})};D.prototype.shift=function(){return pa(this,1)};D.prototype.merge=function(){return Xa(this,void 0,arguments)};D.prototype.mergeWith=function(b){var a=ca.call(arguments,1);return Xa(this,b,a)};D.prototype.mergeDeep=function(){return Xa(this,Zb,arguments)};D.prototype.mergeDeepWith=function(b){var a=ca.call(arguments,1);return Xa(this,$b(b),a)};D.prototype.setSize=function(b){return pa(this, 0,b)};D.prototype.slice=function(b,a){var d=this.size;return la(b,a,d)?this:pa(this,K(b,d,0),K(a,d,d))};D.prototype.__iterator=function(b,a){var d=0,e=ec(this,a);return new u(function(){var a=e();return a===Na?t():w(b,d++,a)})};D.prototype.__iterate=function(b,a){for(var d=0,e=ec(this,a),f;(f=e())!==Na&&!1!==b(f,d++,this););return d};D.prototype.__ensureOwner=function(b){return b===this.__ownerID?this:!b?(this.__ownerID=b,this):Ma(this._origin,this._capacity,this._level,this._root,this._tail,b,this.__hash)}; D.isList=cc;var dc="@@__IMMUTABLE_LIST__@@",R=D.prototype;R[dc]=!0;R["delete"]=R.remove;R.setIn=v.setIn;R.deleteIn=R.removeIn=v.removeIn;R.update=v.update;R.updateIn=v.updateIn;R.mergeIn=v.mergeIn;R.mergeDeepIn=v.mergeDeepIn;R.withMutations=v.withMutations;R.asMutable=v.asMutable;R.asImmutable=v.asImmutable;R.wasAltered=v.wasAltered;oa.prototype.removeBefore=function(b,a,d){if(d===a?1<<a:0===this.array.length)return this;var e=d>>>a&Q;if(e>=this.array.length)return new oa([],b);var f=0===e,k;if(0< a){var c=this.array[e];k=c&&c.removeBefore(b,a-C,d);if(k===c&&f)return this}if(f&&!k)return this;b=za(this,b);if(!f)for(f=0;f<e;f++)b.array[f]=void 0;k&&(b.array[e]=k);return b};oa.prototype.removeAfter=function(b,a,d){if(d===(a?1<<a:0)||0===this.array.length)return this;var e=d-1>>>a&Q;if(e>=this.array.length)return this;var f;if(0<a){var k=this.array[e];f=k&&k.removeAfter(b,a-C,d);if(f===k&&e===this.array.length-1)return this}b=za(this,b);b.array.splice(e+1);f&&(b.array[e]=f);return b};var Na={}, fc;a(I,A);I.of=function(){return this(arguments)};I.prototype.toString=function(){return this.__toString("OrderedMap {","}")};I.prototype.get=function(b,a){var d=this._map.get(b);return void 0!==d?this._list.get(d)[1]:a};I.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ya()};I.prototype.set=function(b,a){return jc(this,b,a)};I.prototype.remove=function(b){return jc(this,b,x)};I.prototype.wasAltered=function(){return this._map.wasAltered()|| this._list.wasAltered()};I.prototype.__iterate=function(b,a){var d=this;return this._list.__iterate(function(a){return a&&b(a[1],a[0],d)},a)};I.prototype.__iterator=function(b,a){return this._list.fromEntrySeq().__iterator(b,a)};I.prototype.__ensureOwner=function(b){if(b===this.__ownerID)return this;var a=this._map.__ensureOwner(b),d=this._list.__ensureOwner(b);return!b?(this.__ownerID=b,this._map=a,this._list=d,this):zb(a,d,b,this.__hash)};I.isOrderedMap=hc;I.prototype[ua]=!0;I.prototype["delete"]= I.prototype.remove;var ic;a(aa,P);aa.prototype.get=function(b,a){return this._iter.get(b,a)};aa.prototype.has=function(b){return this._iter.has(b)};aa.prototype.valueSeq=function(){return this._iter.valueSeq()};aa.prototype.reverse=function(){var b=this,a=Bb(this,!0);this._useKeys||(a.valueSeq=function(){return b._iter.toSeq().reverse()});return a};aa.prototype.map=function(b,a){var d=this,e=lc(this,b,a);this._useKeys||(e.valueSeq=function(){return d._iter.toSeq().map(b,a)});return e};aa.prototype.__iterate= function(b,a){var d=this,e;return this._iter.__iterate(this._useKeys?function(a,e){return b(a,e,d)}:(e=a?sc(this):0,function(f){return b(f,a?--e:e++,d)}),a)};aa.prototype.__iterator=function(b,a){if(this._useKeys)return this._iter.__iterator(b,a);var d=this._iter.__iterator(ba,a),e=a?sc(this):0;return new u(function(){var f=d.next();return f.done?f:w(b,a?--e:e++,f.value,f)})};aa.prototype[ua]=!0;a(Aa,F);Aa.prototype.includes=function(b){return this._iter.includes(b)};Aa.prototype.__iterate=function(b, a){var d=this,e=0;return this._iter.__iterate(function(a){return b(a,e++,d)},a)};Aa.prototype.__iterator=function(b,a){var d=this._iter.__iterator(ba,a),e=0;return new u(function(){var a=d.next();return a.done?a:w(b,e++,a.value,a)})};a(Ba,W);Ba.prototype.has=function(b){return this._iter.includes(b)};Ba.prototype.__iterate=function(b,a){var d=this;return this._iter.__iterate(function(a){return b(a,a,d)},a)};Ba.prototype.__iterator=function(b,a){var d=this._iter.__iterator(ba,a);return new u(function(){var a= d.next();return a.done?a:w(b,a.value,a.value,a)})};a(Ca,P);Ca.prototype.entrySeq=function(){return this._iter.toSeq()};Ca.prototype.__iterate=function(b,a){var e=this;return this._iter.__iterate(function(a){if(a){rc(a);var f=d(a);return b(f?a.get(1):a[1],f?a.get(0):a[0],e)}},a)};Ca.prototype.__iterator=function(b,a){var e=this._iter.__iterator(ba,a);return new u(function(){for(;;){var a=e.next();if(a.done)return a;var f=a.value;if(f){rc(f);var k=d(f);return w(b,k?f.get(0):f[0],k?f.get(1):f[1],a)}}})}; Aa.prototype.cacheResult=aa.prototype.cacheResult=Ba.prototype.cacheResult=Ca.prototype.cacheResult=Ab;a(U,Ja);U.prototype.toString=function(){return this.__toString((this._name||this.constructor.name||"Record")+" {","}")};U.prototype.has=function(b){return this._defaultValues.hasOwnProperty(b)};U.prototype.get=function(b,a){if(!this.has(b))return a;var d=this._defaultValues[b];return this._map?this._map.get(b,d):d};U.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(), this;var b=this.constructor;return b._empty||(b._empty=$a(this,fa()))};U.prototype.set=function(b,a){if(!this.has(b))throw Error('Cannot set unknown key "'+b+'" on '+(this._name||this.constructor.name||"Record"));var d=this._map&&this._map.set(b,a);return this.__ownerID||d===this._map?this:$a(this,d)};U.prototype.remove=function(b){if(!this.has(b))return this;b=this._map&&this._map.remove(b);return this.__ownerID||b===this._map?this:$a(this,b)};U.prototype.wasAltered=function(){return this._map.wasAltered()}; U.prototype.__iterator=function(b,a){var d=this;return g(this._defaultValues).map(function(b,a){return d.get(a)}).__iterator(b,a)};U.prototype.__iterate=function(b,a){var d=this;return g(this._defaultValues).map(function(b,a){return d.get(a)}).__iterate(b,a)};U.prototype.__ensureOwner=function(b){if(b===this.__ownerID)return this;var a=this._map&&this._map.__ensureOwner(b);return!b?(this.__ownerID=b,this._map=a,this):$a(this,a,b)};var L=U.prototype;L["delete"]=L.remove;L.deleteIn=L.removeIn=v.removeIn; L.merge=v.merge;L.mergeWith=v.mergeWith;L.mergeIn=v.mergeIn;L.mergeDeep=v.mergeDeep;L.mergeDeepWith=v.mergeDeepWith;L.mergeDeepIn=v.mergeDeepIn;L.setIn=v.setIn;L.update=v.update;L.updateIn=v.updateIn;L.withMutations=v.withMutations;L.asMutable=v.asMutable;L.asImmutable=v.asImmutable;a(E,Ua);E.of=function(){return this(arguments)};E.fromKeys=function(b){return this(g(b).keySeq())};E.prototype.toString=function(){return this.__toString("Set {","}")};E.prototype.has=function(b){return this._map.has(b)}; E.prototype.add=function(b){return Gb(this,this._map.set(b,!0))};E.prototype.remove=function(b){return Gb(this,this._map.remove(b))};E.prototype.clear=function(){return Gb(this,this._map.clear())};E.prototype.union=function(){var b=ca.call(arguments,0),b=b.filter(function(b){return 0!==b.size});return 0===b.length?this:0===this.size&&!this.__ownerID&&1===b.length?this.constructor(b[0]):this.withMutations(function(a){for(var d=0;d<b.length;d++)m(b[d]).forEach(function(b){return a.add(b)})})};E.prototype.intersect= function(){var b=ca.call(arguments,0);if(0===b.length)return this;var b=b.map(function(b){return m(b)}),a=this;return this.withMutations(function(d){a.forEach(function(a){b.every(function(b){return b.includes(a)})||d.remove(a)})})};E.prototype.subtract=function(){var b=ca.call(arguments,0);if(0===b.length)return this;var b=b.map(function(b){return m(b)}),a=this;return this.withMutations(function(d){a.forEach(function(a){b.some(function(b){return b.includes(a)})&&d.remove(a)})})};E.prototype.merge= function(){return this.union.apply(this,arguments)};E.prototype.mergeWith=function(b){var a=ca.call(arguments,1);return this.union.apply(this,a)};E.prototype.sort=function(b){return ja(Da(this,b))};E.prototype.sortBy=function(b,a){return ja(Da(this,a,b))};E.prototype.wasAltered=function(){return this._map.wasAltered()};E.prototype.__iterate=function(b,a){var d=this;return this._map.__iterate(function(a,e){return b(e,e,d)},a)};E.prototype.__iterator=function(b,a){return this._map.map(function(b,a){return a}).__iterator(b, a)};E.prototype.__ensureOwner=function(b){if(b===this.__ownerID)return this;var a=this._map.__ensureOwner(b);return!b?(this.__ownerID=b,this._map=a,this):this.__make(a,b)};E.isSet=Fb;var uc="@@__IMMUTABLE_SET__@@",V=E.prototype;V[uc]=!0;V["delete"]=V.remove;V.mergeDeep=V.merge;V.mergeDeepWith=V.mergeWith;V.withMutations=v.withMutations;V.asMutable=v.asMutable;V.asImmutable=v.asImmutable;V.__empty=Eb;V.__make=vc;var wc;a(ja,E);ja.of=function(){return this(arguments)};ja.fromKeys=function(b){return this(g(b).keySeq())}; ja.prototype.toString=function(){return this.__toString("OrderedSet {","}")};ja.isOrderedSet=xc;var ab=ja.prototype;ab[ua]=!0;ab.__empty=Hb;ab.__make=yc;var zc;a(J,xa);J.of=function(){return this(arguments)};J.prototype.toString=function(){return this.__toString("Stack [","]")};J.prototype.get=function(b,a){var d=this._head;for(b=X(this,b);d&&b--;)d=d.next;return d?d.value:a};J.prototype.peek=function(){return this._head&&this._head.value};J.prototype.push=function(){if(0===arguments.length)return this; for(var b=this.size+arguments.length,a=this._head,d=arguments.length-1;0<=d;d--)a={value:arguments[d],next:a};return this.__ownerID?(this.size=b,this._head=a,this.__hash=void 0,this.__altered=!0,this):ta(b,a)};J.prototype.pushAll=function(b){b=e(b);if(0===b.size)return this;T(b.size);var a=this.size,d=this._head;b.reverse().forEach(function(b){a++;d={value:b,next:d}});return this.__ownerID?(this.size=a,this._head=d,this.__hash=void 0,this.__altered=!0,this):ta(a,d)};J.prototype.pop=function(){return this.slice(1)}; J.prototype.unshift=function(){return this.push.apply(this,arguments)};J.prototype.unshiftAll=function(b){return this.pushAll(b)};J.prototype.shift=function(){return this.pop.apply(this,arguments)};J.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this.__hash=this._head=void 0,this.__altered=!0,this):Ea||(Ea=ta(0))};J.prototype.slice=function(b,a){if(la(b,a,this.size))return this;var d=K(b,this.size,0);if(K(a,this.size,this.size)!==this.size)return xa.prototype.slice.call(this, b,a);for(var e=this.size-d,f=this._head;d--;)f=f.next;return this.__ownerID?(this.size=e,this._head=f,this.__hash=void 0,this.__altered=!0,this):ta(e,f)};J.prototype.__ensureOwner=function(b){return b===this.__ownerID?this:!b?(this.__ownerID=b,this.__altered=!1,this):ta(this.size,this._head,b,this.__hash)};J.prototype.__iterate=function(b,a){if(a)return this.reverse().__iterate(b);for(var d=0,e=this._head;e&&!1!==b(e.value,d++,this);)e=e.next;return d};J.prototype.__iterator=function(b,a){if(a)return this.reverse().__iterator(b); var d=0,e=this._head;return new u(function(){if(e){var a=e.value;e=e.next;return w(b,d++,a)}return t()})};J.isStack=Ac;var Bc="@@__IMMUTABLE_STACK__@@",Fa=J.prototype;Fa[Bc]=!0;Fa.withMutations=v.withMutations;Fa.asMutable=v.asMutable;Fa.asImmutable=v.asImmutable;Fa.wasAltered=v.wasAltered;var Ea;c.Iterator=u;ka(c,{toArray:function(){T(this.size);var b=Array(this.size||0);this.valueSeq().__iterate(function(a,d){b[d]=a});return b},toIndexedSeq:function(){return new Aa(this)},toJS:function(){return this.toSeq().map(function(b){return b&& "function"===typeof b.toJS?b.toJS():b}).__toJS()},toJSON:function(){return this.toSeq().map(function(b){return b&&"function"===typeof b.toJSON?b.toJSON():b}).__toJS()},toKeyedSeq:function(){return new aa(this,!0)},toMap:function(){return A(this.toKeyedSeq())},toObject:function(){T(this.size);var b={};this.__iterate(function(a,d){b[d]=a});return b},toOrderedMap:function(){return I(this.toKeyedSeq())},toOrderedSet:function(){return ja(f(this)?this.valueSeq():this)},toSet:function(){return E(f(this)? this.valueSeq():this)},toSetSeq:function(){return new Ba(this)},toSeq:function(){return q(this)?this.toIndexedSeq():f(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return J(f(this)?this.valueSeq():this)},toList:function(){return D(f(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(b,a){return 0===this.size?b+a:b+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+a},concat:function(){var b=ca.call(arguments,0);return B(this,Oc(this,b))}, includes:function(b){return this.some(function(a){return H(a,b)})},entries:function(){return this.__iterator(ia)},every:function(b,a){T(this.size);var d=!0;this.__iterate(function(e,f,k){if(!b.call(a,e,f,k))return d=!1});return d},filter:function(b,a){return B(this,mc(this,b,a,!0))},find:function(b,a,d){return(b=this.findEntry(b,a))?b[1]:d},findEntry:function(b,a){var d;this.__iterate(function(e,f,k){if(b.call(a,e,f,k))return d=[f,e],!1});return d},findLastEntry:function(b,a){return this.toSeq().reverse().findEntry(b, a)},forEach:function(b,a){T(this.size);return this.__iterate(a?b.bind(a):b)},join:function(b){T(this.size);b=void 0!==b?""+b:",";var a="",d=!0;this.__iterate(function(e){d?d=!1:a+=b;a+=null!==e&&void 0!==e?e.toString():""});return a},keys:function(){return this.__iterator(Pa)},map:function(b,a){return B(this,lc(this,b,a))},reduce:function(b,a,d){T(this.size);var e,f;2>arguments.length?f=!0:e=a;this.__iterate(function(a,k,c){f?(f=!1,e=a):e=b.call(d,e,a,k,c)});return e},reduceRight:function(b,a,d){var e= this.toKeyedSeq().reverse();return e.reduce.apply(e,arguments)},reverse:function(){return B(this,Bb(this,!0))},slice:function(b,a){return B(this,Cb(this,b,a,!0))},some:function(b,a){return!this.every(bb(b),a)},sort:function(b){return B(this,Da(this,b))},values:function(){return this.__iterator(ba)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(b,a){return qa(b?this.toSeq().filter(b,a):this)}, countBy:function(b,a){return Lc(this,b,a)},equals:function(b){return jb(this,b)},entrySeq:function(){var b=this;if(b._cache)return new ea(b._cache);var a=b.toSeq().map(Tc).toIndexedSeq();a.fromEntrySeq=function(){return b.toSeq()};return a},filterNot:function(b,a){return this.filter(bb(b),a)},findLast:function(b,a,d){return this.toKeyedSeq().reverse().find(b,a,d)},first:function(){return this.find(wa)},flatMap:function(b,a){return B(this,Pc(this,b,a))},flatten:function(b){return B(this,oc(this,b, !0))},fromEntrySeq:function(){return new Ca(this)},get:function(b,a){return this.find(function(a,d){return H(d,b)},void 0,a)},getIn:function(b,a){for(var d=this,e=tc(b),f;!(f=e.next()).done;)if(f=f.value,d=d&&d.get?d.get(f,x):x,d===x)return a;return d},groupBy:function(b,a){return Mc(this,b,a)},has:function(b){return this.get(b,x)!==x},hasIn:function(b){return this.getIn(b,x)!==x},isSubset:function(b){b="function"===typeof b.includes?b:c(b);return this.every(function(a){return b.includes(a)})},isSuperset:function(b){b= "function"===typeof b.isSubset?b:c(b);return b.isSubset(this)},keySeq:function(){return this.toSeq().map(Sc).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(b){return Za(this,b)},maxBy:function(b,a){return Za(this,a,b)},min:function(b){return Za(this,b?Cc(b):Ec)},minBy:function(b,a){return Za(this,a?Cc(a):Ec,b)},rest:function(){return this.slice(1)},skip:function(b){return this.slice(Math.max(0,b))},skipLast:function(b){return B(this,this.toSeq().reverse().skip(b).reverse())}, skipWhile:function(b,a){return B(this,nc(this,b,a,!0))},skipUntil:function(b,a){return this.skipWhile(bb(b),a)},sortBy:function(b,a){return B(this,Da(this,a,b))},take:function(b){return this.slice(0,Math.max(0,b))},takeLast:function(b){return B(this,this.toSeq().reverse().take(b).reverse())},takeWhile:function(b,a){return B(this,Nc(this,b,a))},takeUntil:function(b,a){return this.takeWhile(bb(b),a)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash= Vc(this))}});var O=c.prototype;O[Jb]=!0;O[Ib]=O.values;O.__toJS=O.toArray;O.__toStringMapper=Dc;O.inspect=O.toSource=function(){return this.toString()};O.chain=O.flatMap;O.contains=O.includes;(function(){try{Object.defineProperty(O,"length",{get:function(){if(!c.noLengthWarning){var b;try{throw Error();}catch(a){b=a.stack}if(-1===b.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+ b),this.size}}})}catch(b){}})();ka(g,{flip:function(){return B(this,kc(this))},findKey:function(b,a){var d=this.findEntry(b,a);return d&&d[0]},findLastKey:function(b,a){return this.toSeq().reverse().findKey(b,a)},keyOf:function(b){return this.findKey(function(a){return H(a,b)})},lastKeyOf:function(a){return this.findLastKey(function(d){return H(d,a)})},mapEntries:function(a,d){var e=this,f=0;return B(this,this.toSeq().map(function(k,c){return a.call(d,[c,k],f++,e)}).fromEntrySeq())},mapKeys:function(a, d){var e=this;return B(this,this.toSeq().flip().map(function(f,k){return a.call(d,f,k,e)}).flip())}});var cb=g.prototype;cb[Kb]=!0;cb[Ib]=O.entries;cb.__toJS=O.toObject;cb.__toStringMapper=function(a,d){return JSON.stringify(d)+": "+Dc(a)};ka(e,{toKeyedSeq:function(){return new aa(this,!1)},filter:function(a,d){return B(this,mc(this,a,d,!1))},findIndex:function(a,d){var e=this.findEntry(a,d);return e?e[0]:-1},indexOf:function(a){a=this.toKeyedSeq().keyOf(a);return void 0===a?-1:a},lastIndexOf:function(a){a= this.toKeyedSeq().reverse().keyOf(a);return void 0===a?-1:a},reverse:function(){return B(this,Bb(this,!1))},slice:function(a,d){return B(this,Cb(this,a,d,!1))},splice:function(a,d){var e=arguments.length;d=Math.max(d|0,0);if(0===e||2===e&&!d)return this;var f=0>a?this.count():this.size;a=K(a,f,0);f=this.slice(0,a);return B(this,1===e?f:f.concat(z(arguments,2),this.slice(a+d)))},findLastIndex:function(a,d){var e=this.toKeyedSeq().findLastKey(a,d);return void 0===e?-1:e},first:function(){return this.get(0)}, flatten:function(a){return B(this,oc(this,a,!1))},get:function(a,d){a=X(this,a);return 0>a||Infinity===this.size||void 0!==this.size&&a>this.size?d:this.find(function(d,e){return e===a},void 0,d)},has:function(a){a=X(this,a);return 0<=a&&(void 0!==this.size?Infinity===this.size||a<this.size:-1!==this.indexOf(a))},interpose:function(a){return B(this,Qc(this,a))},interleave:function(){var a=[this].concat(z(arguments)),d=Db(this.toSeq(),F.of,a),e=d.flatten(!0);d.size&&(e.size=d.size*a.length);return B(this, e)},last:function(){return this.get(-1)},skipWhile:function(a,d){return B(this,nc(this,a,d,!1))},zip:function(){var a=[this].concat(z(arguments));return B(this,Db(this,Uc,a))},zipWith:function(a){var d=z(arguments);d[0]=this;return B(this,Db(this,a,d))}});e.prototype[Lb]=!0;e.prototype[ua]=!0;ka(m,{get:function(a,d){return this.has(a)?a:d},includes:function(a){return this.has(a)},keySeq:function(){return this.valueSeq()}});m.prototype.has=O.includes;ka(P,g.prototype);ka(F,e.prototype);ka(W,m.prototype); ka(Ja,g.prototype);ka(xa,e.prototype);ka(Ua,m.prototype);return{Iterable:c,Seq:G,Collection:na,Map:A,OrderedMap:I,List:D,Stack:J,Set:E,OrderedSet:ja,Record:U,Range:N,Repeat:M,is:H,fromJS:gb}})},37:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};a=a(7);c=function(){function a(){(0,n.default)(this,a)}(0,l.default)(a,[{key:"bootstrap",value:function(a){return a}}]);return a}();a=a.createActions(c);window.StaticActions=a;p.exports=a},40:function(p, c,a){p.exports={"default":a(294),__esModule:!0}},47:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;p=a(291);var l=n(p);p=a(211);var g=n(p);a=a(73);var e=n(a);c.default=function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof d?"undefined":(0,e.default)(d)));a.prototype=(0,g.default)(d&&d.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});d&&(l.default? (0,l.default)(a,d):a.__proto__=d)}},48:function(p,c,a){c.__esModule=!0;var n=(p=a(73))&&p.__esModule?p:{"default":p};c.default=function(a,c){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&("object"===("undefined"===typeof c?"undefined":(0,n.default)(c))||"function"===typeof c)?c:a}},52:function(p,c,a){Object.defineProperty(c,"__esModule",{value:!0});var n=a(23),l=n&&n.__esModule?n:{"default":n},g=a(204);c["default"]=function(a,c){a.config=(0, g.assign)({setState:function(a,e){return this.state=e},getState:function(a){return a},onSerialize:function(a){return a.toJS()},onDeserialize:function(a){return l["default"].fromJS(a)}},c);return a};p.exports=c["default"]},70:function(p,c,a){var n=a(64),l=a(27),g=a(206);p.exports=function(a,c){var d=(l.Object||{})[a]||Object[a],f={};f[a]=c(d);n(n.S+n.F*g(function(){d(1)}),"Object",f)}},72:function(p,c,a){var n=a(123),l=a(208),g=a(283);c=a(209);var e=a(258);a=c(function(a,d){return null==a?{}:g(a,n(l(d, 1),e))});p.exports=a},87:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};c=a(7);var g=a(52),e=a(37),m=a(320),d=a(469);a=function(){function a(){(0,n.default)(this,a);this.state=new d;this.bindActions(m);this.bindListeners({onStaticBootstrap:e.BOOTSTRAP});this.exportPublicMethods({save:this.save})}(0,l.default)(a,[{key:"onStaticBootstrap",value:function(a){this.setState(new d(a.websiteSettings))}},{key:"onUpdate",value:function(a){this.setState(this.state.merge(a))}}, {key:"save",value:function(a){var d=1>=arguments.length||void 0===arguments[1]?{}:arguments[1],e=this.getState().mergeDeep(a).toJS();return m.save(e,d)}}]);return a}();p.exports=c.createStore(g(a),"WebsiteSettingsStore")},93:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c=a(19);var l=n(c);c=a(17);var g=n(c);c=a(3);var e=n(c);c=a(4);var m=n(c),d=a(259);c=a(7);var f=a(709),q=a(37),s=a(278),r=a(157),y=a(490);a=a(1025);var k=a.DEFAULT_COLLECTION_CONFIGURATIONS,da=a.DEFAULT_COLLECTION_CONFIGURATION, z=a.DEFAULT_TEMPLATE_PAGE_CONFIGURATION;a=function(){function a(){(0,e.default)(this,a);this.bindListeners({handleLoadTemplate:s.LOAD_TEMPLATE,staticInitialized:q.BOOTSTRAP});this.exportPublicMethods({isTemplateOwner:this.isTemplateOwner,getCollectionConfig:this.getCollectionConfig,getCustomType:this.getCustomType,getPageConfig:this.getPageConfig})}(0,m.default)(a,[{key:"getCollectionConfig",value:function(a){return this.getState().collectionConfigs[a]}},{key:"getCustomType",value:function(a){return this.getState().customTypes[a]}}, {key:"getPageConfig",value:function(a){return this.getState().pageConfigs[a]}},{key:"isTemplateOwner",value:function(){var a=this.getState();return a.ownerWebsiteId===a.websiteId}},{key:"staticInitialized",value:function(a){this.setTemplateData(a.template);this.demoCollections=this.processDemoCollections(a.demoCollections);this.websiteId=a.website.id}},{key:"handleLoadTemplate",value:function(a){this.waitFor(f.dispatchToken);a.error?this.error=a.response:(this.error=null,this.setTemplateData(a.template), this.demoCollections=this.processDemoCollections(a.demoCollections))}},{key:"setTemplateData",value:function(a){a&&(this.id=a.id,this.name=a.name,this.updatedOn=a.updatedOn,this.ownerWebsiteId=a.ownerWebsiteId,this.collectionConfigs=this.processCollectionConfigs(a.collectionConfigs),this.pageConfigs=this.processPageConfigs(a.pageConfigs),this.customTypes=this.processCustomTypes(a.customTypes),this.layouts=this.processLayouts(a.layouts),this.navigations=a.navigations)}},{key:"processCollectionConfigs", value:function(a){a.products&&(a.products=(0,g.default)({},k.products,a.products),a.products.acceptTypes&&0===a.products.acceptTypes.length&&(a.products.acceptTypes=k.products.acceptTypes),a.products.ordering=r.USER);a.page&&(a.page=(0,g.default)({},k.page,a.page));a=(0,g.default)({},k,a);a=d(a,function(a){a=(0,g.default)({},da,a);!0===a.index?a.folderBehavior=y.INDEX:!0===a.folder&&(a.folderBehavior=y.NONE);return a});var e=a.folders||a.folder;e&&(e.acceptTypes=this.calculateFolderAcceptTypes(a)); return a}},{key:"calculateFolderAcceptTypes",value:function(a){var d=["subscription","gallery-block","template-page"];return(0,l.default)(a).filter(function(e){return a[e].folder?!1:-1===d.indexOf(e)}).concat(["link"])}},{key:"processPageConfigs",value:function(a){return d(a,function(a){return(0,g.default)({},z,a)})}},{key:"processCustomTypes",value:function(){return(0>=arguments.length||void 0===arguments[0]?[]:arguments[0]).reduce(function(a,d){a[d.name]=d;return a},{})}},{key:"processDemoCollections", value:function(a){return a||[]}},{key:"processLayouts",value:function(a){return a||{}}}]);return a}();p.exports=c.createStore(a,"TemplateStore")},123:function(p,c){p.exports=function(a,c){for(var l=-1,g=a?a.length:0,e=Array(g);++l<g;)e[l]=c(a[l],l,a);return e}},125:function(p,c){p.exports={ADD_PAGES:1,ADD_CONTRIBUTORS:2,ADD_COMMERCE_PRODUCTS:3,DEVELOPER_SDK:4,MOBILE_PORTFOLIO:5,COMMERCE:6,ACCOUNTING:7,SHIPSTATION_INTEGRATION:8,ABANDONED_CART_RECOVERY:9,REAL_TIME_SHIPPING_RATES:10,COMMERCE_TRANSACTION_FEE:11, FREE_GOOGLE_APPS_INBOX:12,GOOGLE_AD_WORDS_CREDIT:13,VAT_COLLECTION_BETA:14,MULTICURRENCY_BETA:15,STRICT_GOOGLE_APPS_FREE_INBOX_POLICY:16,CRM:17}},130:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c=a(24);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c);c=a(7);var m=a(408);a=function(){function a(){(0,g.default)(this,a);this.generateActions("insert")}(0,e.default)(a,[{key:"read",value:function(a){var d=this,e=1>=arguments.length||void 0===arguments[1]?!1:arguments[1],c=arguments[2]; return function(g){g(a);return m.read(a,e,c).then(function(a){return d.insert(a.data)}).catch(function(a){a=a.data;return l.default.reject(a.message||a)})}}},{key:"readForCollection",value:function(a){var d=this;return function(e){e(a);return m.readForCollection(a).then(function(a){(a=a.data)&&a.results.forEach(function(a){return d.insert(a)});return l.default.resolve(a)}).catch(function(a){a=a.data;return l.default.reject(a.message||a)})}}},{key:"update",value:function(a,d){var e=this;return function(c){c(a.id); return a.field?m.updateField(a).then(function(a){return e.insert(a.data.item)}).catch(function(a){a=a.data;return l.default.reject(a.message||a)}):m.update(a,d).then(function(a){a=a.data;e.insert(a);return a}).catch(function(a){a=a.data;return l.default.reject(a.message||a)})}}},{key:"updateForCollection",value:function(a,d){var e=this;return m.updateForCollection(a,d).then(function(a){return e.insert(a.data)}).catch(function(a){a=a.data;return l.default.reject(a.message||a)})}},{key:"create",value:function(a, d,e){var c=this;return m.create(a,d,e).then(function(a){a=a.data;c.insert(a);return a}).catch(function(a){a=a.data;return l.default.reject(a.message||a)})}},{key:"createForCollection",value:function(a,d,e){var c=this;return m.createForCollection(a,d,e).then(function(a){a=a.data;c.insert(a);return a}).catch(function(a){a=a.data;return l.default.reject(a.message||a)})}},{key:"delete",value:function(a,d){return function(e){e(a);return m.delete(a,d).catch(function(a){a=a.data;return l.default.reject(a.message|| a)})}}},{key:"deleteMany",value:function(a){return function(d){d(a);return m.deleteMany(a)}}}]);return a}();p.exports=c.createActions(a)},131:function(p,c,a){p.exports={"default":a(451),__esModule:!0}},145:function(p,c,a){c.__esModule=!0;var n=(p=a(40))&&p.__esModule?p:{"default":p},l=(a=a(290))&&a.__esModule?a:{"default":a};c.default=function e(a,d,f){null===a&&(a=Function.prototype);var c=(0,l.default)(a,d);if(void 0===c)return a=(0,n.default)(a),null===a?void 0:e(a,d,f);if("value"in c)return c.value; d=c.get;return void 0===d?void 0:d.call(f)}},156:function(p,c){p.exports={AUTHENTICATED:0,CONFIG:1,ADMIN:2,CONFIG_CONTENT_MANAGER:11,CONFIG_SETTINGS:12,CONFIG_ACTIVITY:13,CONFIG_COMMERCE:14,CONFIG_NEWSLETTER:15,CONFIG_DAMASK:17,CONFIG_CHANGE_STRUCTURE:1110,CONFIG_TRUSTED_COMMENTER:1111,CONFIG_SETTINGS_GENERAL:1210,CONFIG_SETTINGS_LOCALE:1211,CONFIG_SETTINGS_SOCIAL_ACCOUNT:1212,CONFIG_SETTINGS_FACEBOOK:1213,CONFIG_SETTINGS_SOCIAL_SETTINGS:1214,CONFIG_SETTINGS_MEMBER_ACCOUNTS:1215,CONFIG_SETTINGS_DOMAIN:1216, CONFIG_SETTINGS_TEMPLATE:1217,CONFIG_SETTINGS_IMPORT:1218,CONFIG_SETTINGS_CODEINJECT:1219,CONFIG_SETTINGS_ADVANCED:1220,CONFIG_SETTINGS_DEVELOPER:1221,CONFIG_SETTINGS_SESSIONS:1222,CONFIG_SETTINGS_MOBILE:1223,CONFIG_SETTINGS_BILLING:1224,CONFIG_SETTINGS_SUPPORT:1225,CONFIG_SETTINGS_SITE:1226,CONFIG_SETTINGS_LABS:1227,CONFIG_SETTINGS_ADVERTISING:1228,CONFIG_ACTIVITY_STATS:1310,CONFIG_ACTIVITY_COMMENTS:1311,CONFIG_COMMERCE_ORDERS:1410,CONFIG_COMMERCE_STORE_SETTINGS:1411,CONFIG_COMMERCE_SHIPPING:1412, CONFIG_COMMERCE_COUPONS:1413,CONFIG_COMMERCE_TAXES:1414,CONFIG_COMMERCE_EMAIL_NOTIFICATIONS:1415,CONFIG_COMMERCE_INVENTORY:1416,CONFIG_COMMERCE_DONATIONS:1417,CONFIG_COMMERCE_ACCOUNTING:1418,CONFIG_COMMERCE_DISCOUNTS:1419,CONFIG_NEWSLETTER_READ_SUBSCRIBER:1510,CONFIG_NEWSLETTER_WRITE_SUBSCRIBER:1511,CONFIG_NEWSLETTER_READ_GROUP:1512,CONFIG_NEWSLETTER_WRITE_GROUP:1513,CONFIG_NEWSLETTER_READ_MESSAGE:1514,CONFIG_NEWSLETTER_WRITE_MESSAGE:1515,CONFIG_NEWSLETTER_READ_SETTINGS:1516,CONFIG_NEWSLETTER_WRITE_SETTINGS:1517, CONFIG_ACCEPT_TOS:1610,CONFIG_DOMAINS_REMOVE:1611,CONFIG_DOMAINS_ADD:1612,ADMIN_GRANT_ACCESS:2010,ADMIN_BILLING_READ:2011,ADMIN_BILLING_WRITE:2012,ADMIN_READ_CUSTOMER_DATA:2013,ADMIN_WRITE_CUSTOMER_DATA:2014,ADMIN_DEV_SETTINGS:2015,ADMIN_MARKETING_READ:2016,ADMIN_MARKETING_WRITE:2017,ADMIN_LOGINAS:2018,ADMIN_TEMPLATE_SETTINGS:2019,ADMIN_SYSTEM_JSON_VIEW:2020,ADMIN_TAXONOMY:2021,ADMIN_CHANGE_USER_EMAIL:2022,ADMIN_ADD_NOTE:2023,ADMIN_EDIT_OTHER_NOTES:2024,ADMIN_EXTEND_TRIAL:2025,ADMIN_BIZPIPE_STATS_MOBILE_ACCESS:2026, ADMIN_REFERRALS:2027,ADMIN_BILLING_REFUND:2028,ADMIN_BILLING_APPLY_EDU_DISCOUNT:2029,ADMIN_DEACTIVATE_SQUARESPACE_ACCOUNT:2030,ADMIN_BILLING_EXPIRE:2031,ADMIN_CHANGE_MAX_COMPS:2032,ADMIN_CHANGE_GUILDS:2033,ADMIN_DOMAIN_WRITE:2034,ADMIN_GOOGLE_APPS_WRITE:2035,ADMIN_ADD_CONTRIBUTER:2036,ADMIN_CHANGE_WEBSITE_OWNER:2037,ADMIN_REMOVE_CONTRIBUTER:2038,ADMIN_TAXATION_READ:2039,ADMIN_SUSPEND:2040,ADMIN_TAXATION_WRITE:2041,ADMIN_LOGINAS_PUBLIC:2042,ADMIN_MASS_REMOVAL:2043,ADMIN_REMOVE_SITE:2044}},158:function(p, c,a){function n(a){return{url:F[a.action].replace("{collectionId}",a.collectionId),isFallback:!0}}function l(a){return{url:G[a.collectionType][a.action].replace("{collectionId}",a.collectionId).replace("{parentId}",a.parentId),isFallback:!1}}function g(){var a=0>=arguments.length||void 0===arguments[0]?{}:arguments[0];if(!a.collectionId)return{url:W[a.action],isFallback:!0};if(a.parentId)return a.collectionType===Z.PRODUCTS?l(a):n(a);var d=Ga[a.collectionOrdering];if(!d)return n(a);d=d[a.recordType]; return!d?n(a):{url:d[a.action].replace("{collectionId}",a.collectionId),isFallback:!1}}var e=(c=a(13))&&c.__esModule?c:{"default":c},m,d,f,q,s,r,y,k,da,z,qa,X,wa,la,K,u,w,t=a(162),Y=a(85);c=a(157);var Z=a(33),Ga=(da={},da[c.CHRONOLOGICAL]=(q={},q[Y.TEXT]=(m={},m[t.GET]="/api/content/blogs/{collectionId}/text-posts/{id}",m[t.POST]="/api/content/blogs/{collectionId}/text-posts",m[t.PUT]="/api/content/blogs/{collectionId}/text-posts/{id}",m[t.DELETE]="/api/content/blogs/{collectionId}/text-posts/{id}", m),q[Y.IMAGE]=(d={},d[t.GET]="/api/content/blogs/{collectionId}/image-posts/{id}",d[t.POST]="/api/content/blogs/{collectionId}/image-posts",d[t.PUT]="/api/content/blogs/{collectionId}/image-posts/{id}",d[t.DELETE]="/api/content/blogs/{collectionId}/image-posts/{id}",d),q[Y.VIDEO]=(f={},f[t.GET]="/api/content/blogs/{collectionId}/video-posts/{id}",f[t.POST]="/api/content/blogs/{collectionId}/video-posts",f[t.PUT]="/api/content/blogs/{collectionId}/video-posts/{id}",f[t.DELETE]="/api/content/blogs/{collectionId}/video-posts/{id}", f),q),da[c.CALENDAR]=(r={},r[Y.EVENT]=(s={},s[t.GET]="/api/content/calendars/{collectionId}/events/{id}",s[t.POST]="/api/content/calendars/{collectionId}/events",s[t.PUT]="/api/content/calendars/{collectionId}/events/{id}",s[t.DELETE]="/api/content/calendars/{collectionId}/events/{id}",s),r),da[c.USER]=(k={},k[Y.STORE_ITEM]=(y={},y[t.GET]="/api/content/product-pages/{collectionId}/products/{id}",y[t.POST]="/api/content/product-pages/{collectionId}/products",y[t.PUT]="/api/content/product-pages/{collectionId}/products/{id}", y[t.DELETE]="/api/content/product-pages/{collectionId}/products/{id}",y),k),da),G=(qa={},qa[Z.PRODUCTS]=(z={},z[t.GET]="/api/content/product-pages/{collectionId}/products/{parentId}/images/{id}",z[t.POST]="/api/content/product-pages/{collectionId}/products/{parentId}/images",z[t.PUT]="/api/content/product-pages/{collectionId}/products/{parentId}/images/{id}",z[t.DELETE]="/api/content/product-pages/{collectionId}/products/{parentId}/images/{id}",z),qa),P=(K={},K[c.CHRONOLOGICAL]=(X={},X[Z.COLLECTION_TYPE_GENERIC]= "/api/content/blogs/{collectionId}/posts",X),K[c.CALENDAR]=(wa={},wa[Z.COLLECTION_TYPE_GENERIC]="/api/content/calendars/{collectionId}/events",wa),K[c.USER]=(la={},la[Z.PRODUCTS]="/api/content/product-pages/{collectionId}/products",la),K),F=(u={},u[t.GET]="/api/content-collections/{collectionId}/content-items/{id}",u[t.POST]="/api/content-collections/{collectionId}/content-items",u[t.PUT]="/api/content-collections/{collectionId}/content-items/{id}",u[t.DELETE]="/api/content-collections/{collectionId}/content-items/{id}", u),W=(w={},w[t.GET]="/api/content-items/{id}",w[t.POST]="/api/content-items",w[t.PUT]="/api/content-items/{id}",w[t.DELETE]="/api/content-items/{id}",w);p.exports={getTemplateForSingleItem:function(){return g(0>=arguments.length||void 0===arguments[0]?{}:arguments[0]).url},getTemplateForCollectionItems:function(a,d){if(!a)return"/api/content-collections/{collectionId}/content-items";var e=void 0;P.hasOwnProperty(a)&&(e=P[a][d]);return!e?"/api/content-collections/{collectionId}/content-items":e},getMainImageUploadUrl:function(){var a= 0>=arguments.length||void 0===arguments[0]?{}:arguments[0],a=g((0,e.default)({},a,{action:t.DELETE}));return a.isFallback?"/api/commondata/SaveMedia":a.url+"/main-image"},getMainImageDeletionUrl:function(){var a=0>=arguments.length||void 0===arguments[0]?{}:arguments[0],a=g((0,e.default)({},a,{action:t.DELETE}));return a.isFallback?"/api/commondata/ClearEmbeddedAsset":a.url+"/main-image"},getChildImageUploadUrl:function(){var a=0>=arguments.length||void 0===arguments[0]?{}:arguments[0];return a.recordType=== Y.STORE_ITEM?l({collectionType:Z.PRODUCTS,recordType:Y.STORE_ITEM,action:t.POST,parentId:a.parentId,collectionId:a.collectionId}).url:"/api/commondata/SaveMedia"}}},162:function(p,c){p.exports={GET:1,POST:2,PUT:3,DELETE:4}},164:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c=a(24);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c);c=a(23);var m=c.Map,d=c.fromJS;c=a(7);var f=a(130);a=a(52);var q=function(){function a(){(0,g.default)(this,a);this.state=m();this.bindActions(f);this.exportPublicMethods({fetch:this.fetch, fetchForCollection:this.fetchForCollection,getForCollection:this.getForCollection})}(0,e.default)(a,[{key:"onInsert",value:function(a){this.setState(this.state.set(a.id,d(a)))}},{key:"onDelete",value:function(a){this.setState(this.state.delete(a))}},{key:"onDeleteMany",value:function(a){this.setState(this.state.filter(function(d,e){return-1===a.indexOf(e)}))}},{key:"fetch",value:function(a){var d=this,e=1>=arguments.length||void 0===arguments[1]?!1:arguments[1],c=arguments[2];if(!a)return l.default.resolve(); var q=this.getState().get(a);return q?l.default.resolve(q):f.read(a,e,c).then(function(){return d.getState().get(a)})}},{key:"fetchForCollection",value:function(a){var d=this,e=this.getForCollection(a);return 0<e.size?l.default.resolve(e):f.readForCollection(a).then(function(){return d.getForCollection(a)})}},{key:"getForCollection",value:function(a){return this.getState().filter(function(d){return d.get("collectionId")===a})}}]);return a}();p.exports=c.createStore(a(q),"ContentItemStore")},204:function(p, c){function a(a,c){c.forEach(function(e){Object.keys(Object(e)).forEach(function(c){a(c,e[c])})})}Object.defineProperty(c,"__esModule",{value:!0});c.isPojo=function(a){var c=a.constructor;return!!a&&"object"===typeof a&&"[object Object]"===Object.prototype.toString.call(a)&&n(c)&&(c instanceof c||"AltStore"===a.type)};c.isPromise=function(a){return!!a&&("object"===typeof a||"function"===typeof a)&&"function"===typeof a.then};c.eachObject=a;c.assign=function(c){for(var g=arguments.length,e=Array(1< g?g-1:0),m=1;m<g;m++)e[m-1]=arguments[m];a(function(a,e){return c[a]=e},e);return c};var n=function(a){return"function"===typeof a};c.isFunction=n},205:function(p,c,a){c=a(271);a=a(458)(c);p.exports=a},208:function(p,c,a){function n(a,c,d,f,q){var s=-1,r=a.length;d||(d=g);for(q||(q=[]);++s<r;){var p=a[s];0<c&&d(p)?1<c?n(p,c-1,d,f,q):l(q,p):f||(q[q.length]=p)}return q}var l=a(225),g=a(459);p.exports=n},209:function(p,c,a){var n=a(455),l=Math.max;p.exports=function(a,e){e=l(void 0===e?a.length-1:e, 0);return function(){for(var c=arguments,d=-1,f=l(c.length-e,0),q=Array(f);++d<f;)q[d]=c[e+d];d=-1;for(f=Array(e+1);++d<e;)f[d]=c[d];f[e]=q;return n(a,this,f)}}},211:function(p,c,a){p.exports={"default":a(292),__esModule:!0}},214:function(p,c,a){var n=a(223),l=Object.prototype.toString;p.exports=function(a){return"number"==typeof a||n(a)&&"[object Number]"==l.call(a)}},225:function(p,c){p.exports=function(a,c){for(var l=-1,g=c.length,e=a.length;++l<g;)a[e+l]=c[l];return a}},261:function(p,c){p.exports= {QUEUED:1,PROCESSING:2,READY:3,ERROR:4,DOWNLOAD_ERROR:5,ERROR_TOO_LARGE:6,ERROR_FILE_NOT_FOUND:7,ERROR_UNSUPPORTED_IMAGE_TYPE:8,ERROR_UNSUPPORTED_AUDIO_TYPE:9}},268:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c},g=a(23).Set,e=a(572),m=a(273);c=a(7);var d=a(52),f=a(156),q=a(37),s=a(53),r=a(214),y=function(a){return s(a)&&a.every(function(a){return r(a)})};a=function(){function a(){(0,n.default)(this,a);this.state=g();this.bindListeners({onStaticBootstrap:q.BOOTSTRAP}); this.exportPublicMethods({hasPermission:this.hasPermission,hasAllPermissions:this.hasAllPermissions,hasAnyPermission:this.hasAnyPermission,isAdmin:this.isAdmin})}(0,l.default)(a,[{key:"onStaticBootstrap",value:function(a){a=a.accessPermissions;return y(a)?(this.setState(g(a)),!0):!1}},{key:"hasPermission",value:function(a){var d=this.getState(),e="string"===typeof a?f[a]:a;if(void 0===e)throw Error(a?"Permission '"+a+"' not found.":"Permission is undefined.");return d.has(e)}},{key:"hasAllPermissions", value:function(a){return e(a,this.hasPermission.bind(this))}},{key:"hasAnyPermission",value:function(a){return m(a,this.hasPermission.bind(this))}},{key:"isAdmin",value:function(){return this.hasPermission(f.ADMIN)}}]);return a}();p.exports=c.createStore(d(a),"AccessPermissionStore")},273:function(p,c,a){var n=a(700),l=a(94),g=a(457),e=a(53),m=a(276);p.exports=function(a,f,c){var s=e(a)?n:g;c&&m(a,f,c)&&(f=void 0);return s(a,l(f,3))}},278:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c}, l=(c=a(4))&&c.__esModule?c:{"default":c};c=a(7);var g=a(939);a=function(){function a(){(0,n.default)(this,a)}(0,l.default)(a,[{key:"loadTemplate",value:function(a){return function(d){g.getTemplate(a).then(function(a){d(a.data)},function(a){d({error:!0,response:a})})}}}]);return a}();p.exports=c.createActions(a)},279:function(p,c,a){c=(c=a(131))&&c.__esModule?c:{"default":c};p.exports=(0,c.default)({TRIAL_UPGRADE_PLAN:"trial-upgrade",TRIAL_SWITCH_PRODUCT:"trial-switch",UPGRADE_PLAN:"upgrade",SWITCH_PRODUCT:"switch"})}, 282:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c=a(269);var l=n(c);c=a(73);var g=n(c);a=a(19);var e=n(a);p.exports=function(a){var d={};(0,e.default)(a).map(function(e){var c=a[e];"object"===("undefined"===typeof c?"undefined":(0,g.default)(c))?d[e]=(0,l.default)(c):void 0!==c&&(d[e]=c)});return d}},283:function(p,c,a){var n=a(456);p.exports=function(a,c){a=Object(a);return n(a,c,function(e,c){return c in a})}},285:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}} c=a(24);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c),m=a(710);a=a(7);c=function(){function a(){(0,g.default)(this,a);this.generateActions("insert","insertMany","deleteSuccess","deleteFailure")}(0,e.default)(a,[{key:"create",value:function(a){var d=this;return function(e){e(a);return m.create(a).then(function(a){a=a.data;d.insert(a);return a.id})}}},{key:"read",value:function(a){var d=this;return function(e){e(a);return m.read(a).then(function(a){return d.insert(a.data)})}}},{key:"readAll",value:function(){var a= this;return m.readAll().then(function(d){return a.insertMany(d.data)}).catch(function(a){return l.default.reject(a.data.message)})}},{key:"delete",value:function(a){var d=this;return function(e){e(a);return m.delete(a).then(function(e){d.deleteSuccess(a);return e},function(e){e=e.data;d.deleteFailure(a,e);return l.default.reject(e.message)})}}},{key:"deleteUnusedCollectionPermanently",value:function(a){var d=this;return function(e){e(a);return m.deleteUnusedPageCollectionPermanently(a).then(function(e){d.deleteSuccess(a); return e},function(e){e=e.data;d.deleteFailure(a,e);return l.default.reject(e.message)})}}},{key:"update",value:function(a){var d=this;return a.id&&!a.urlId?m.generateUrl(a).then(function(e){a.urlId=e.data.urlId;return m.create(a).then(function(a){d.insert(a.data);return a.data})}).catch(function(a){return l.default.reject(a.data.message)}):m.create(a).then(function(a){a=a.data;d.insert(a);return a})}}]);return a}();p.exports=a.createActions(c)},286:function(p,c,a){function n(a){return a&&a.__esModule? a:{"default":a}}c=a(17);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c),m=a(891),d=a(940);c=a(7);var f=a(505),q=a(278);a=function(){function a(){(0,g.default)(this,a);this.generateActions("loadSuccess","loadFailure")}(0,e.default)(a,[{key:"loadAll",value:function(){var a=this;return function(e){e();return d.loadTemplateInstallations().then(function(d){a.loadSuccess(d.data)},function(d){a.loadFailure(d.error)})}}},{key:"setPreviewInstallation",value:function(a,d,e){return function(c){var g=(0,l.default)({}, a,{previewInstallationId:d});m.save(a.id,g).then(function(a){q.loadTemplate.defer(e);c(d);setTimeout(function(){return f.setUrl("/")},1E3)},function(a){})}}},{key:"setLiveInstallation",value:function(a,e){return function(c){d.setLiveInstallation(a).then(function(d){q.loadTemplate.defer(e);c(a);setTimeout(f.refresh,1E3)},function(a){})}}},{key:"setHomepageCollectionId",value:function(a){return function(e){return d.setHomepageCollectionId(a).then(function(d){d={homepageCollectionId:a};e(d);return d}, function(d){d={homepageCollectionId:a,error:!0};e(d);return d})}}},{key:"updateInstallation",value:function(a){return d.updateInstallation(a).then(this.loadAll)}}]);return a}();p.exports=c.createActions(a)},290:function(p,c,a){p.exports={"default":a(293),__esModule:!0}},291:function(p,c,a){p.exports={"default":a(296),__esModule:!0}},292:function(p,c,a){a(298);var n=a(27).Object;p.exports=function(a,c){return n.create(a,c)}},293:function(p,c,a){a(299);var n=a(27).Object;p.exports=function(a,c){return n.getOwnPropertyDescriptor(a, c)}},294:function(p,c,a){a(300);p.exports=a(27).Object.getPrototypeOf},295:function(p,c,a){a(301);p.exports=a(27).Object.keys},296:function(p,c,a){a(302);p.exports=a(27).Object.setPrototypeOf},297:function(p,c,a){var n=a(99),l=a(127),g=function(a,c){l(a);if(!n(c)&&null!==c)throw TypeError(c+": can't set as prototype!");};p.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,c,d){try{d=a(203)(Function.call,a(228).f(Object.prototype,"__proto__").set,2),d(e,[]),c=!(e instanceof Array)}catch(f){c= !0}return function(a,e){g(a,e);c?a.__proto__=e:d(a,e);return a}}({},!1):void 0),check:g}},298:function(p,c,a){p=a(64);p(p.S,"Object",{create:a(410)})},299:function(p,c,a){var n=a(128),l=a(228).f;a(70)("getOwnPropertyDescriptor",function(){return function(a,e){return l(n(a),e)}})},300:function(p,c,a){var n=a(141),l=a(565);a(70)("getPrototypeOf",function(){return function(a){return l(n(a))}})},301:function(p,c,a){var n=a(141),l=a(159);a(70)("keys",function(){return function(a){return l(n(a))}})},302:function(p, c,a){p=a(64);p(p.S,"Object",{setPrototypeOf:a(297).set})},320:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};c=a(7);var g=a(22);a=function(){function a(){(0,n.default)(this,a);this.generateActions("update")}(0,l.default)(a,[{key:"save",value:function(a,d){var e=this;return g.put("/api/settings",a,{params:d}).then(function(a){return e.update(a.data)})}}]);return a}();p.exports=c.createActions(a)},321:function(p,c,a){var n=(c=a(3))&&c.__esModule? c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};c=a(7);var g=a(37),e=a(286);a=function(){function a(){(0,n.default)(this,a);this.templateInstallations={};this.bindListeners({handleLoadSuccess:e.LOAD_SUCCESS,handleLoadFailure:e.LOAD_FAILURE,handleStaticInitialized:g.BOOTSTRAP,handlePreviewSet:e.SET_PREVIEW_INSTALLATION,handleTemplateSet:e.SET_LIVE_INSTALLATION,handleHomepageCollectionIdSet:e.SET_HOMEPAGE_COLLECTION_ID});this.exportPublicMethods({getHomepageCollectionId:this.getHomepageCollectionId})} (0,l.default)(a,[{key:"getHomepageCollectionId",value:function(){return this.getState().activeInstallation?this.getState().activeInstallation.homepageCollectionId:this.getState().homepageCollectionId}},{key:"handleStaticInitialized",value:function(a){var e=a.authenticatedAccountWebsiteSettings;this.previewInstallationId=e?e.previewInstallationId:null;this.homepageCollectionId=a.homepageCollectionId;a.templateInstallation?(this.liveInstallationId=a.templateInstallation.id,this.templateInstallations[this.liveInstallationId]= a.templateInstallation):this.liveInstallationId=null;this.updateInstallationReferences()}},{key:"updateInstallationReferences",value:function(){this.liveInstallation=this.getTemplateInstallation(this.liveInstallationId);this.previewInstallation=null;this.previewInstallationId!==this.liveInstallationId&&(this.previewInstallation=this.getTemplateInstallation(this.previewInstallationId));this.activeInstallation=this.previewInstallation||this.liveInstallation}},{key:"getTemplateInstallation",value:function(a){return!a|| !this.templateInstallations[a]?null:this.templateInstallations[a]}},{key:"handleHomepageCollectionIdSet",value:function(a){a.error||(this.homepageCollectionId=a.homepageCollectionId,this.activeInstallation&&(this.activeInstallation.homepageCollectionId=a.homepageCollectionId))}},{key:"handlePreviewSet",value:function(a){this.previewInstallationId=a;this.updateInstallationReferences()}},{key:"handleTemplateSet",value:function(a){this.liveInstallationId=a;this.previewInstallationId=null;this.updateInstallationReferences()}}, {key:"handleLoadSuccess",value:function(a){var e={};a.forEach(function(a){this[a.id]=a},e);this.maintainMissingInstallation(e,this.liveInstallationId);this.maintainMissingInstallation(e,this.previewInstallationId);this.templateInstallations=e;this.updateInstallationReferences()}},{key:"maintainMissingInstallation",value:function(a,e){e&&!a[e]&&(a[e]=this.templateInstallations[e])}},{key:"handleLoadFailure",value:function(){console.error("Unable to load installations")}}]);return a}();p.exports=c.createStore(a, "TemplateInstallationsStore")},324:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};a=a(7);c=function(){function a(){(0,n.default)(this,a);this.generateActions("reset")}(0,l.default)(a,[{key:"updateAttributes",value:function(a,c){return function(d){a&&d({itemId:a,attrs:c})}}}]);return a}();p.exports=a.createActions(c)},407:function(p,c){p.exports={WEBSITE_LEGACY_TRIAL:"website-legacy-trial",WEBSITE_CLASSIC_TRIAL:"website-classic-trial",WEBSITE_CLASSIC_PERSONAL:"website-classic-personal", WEBSITE_CLASSIC_PROFESSIONAL:"website-classic-professional",WEBSITE_CLASSIC_COMPED:"website-classic-comped",WEBSITE_LEGACY_COMPED:"website-legacy-comped",WEBSITE_LEGACY_PROFESSIONAL:"website-legacy-professional",WEBSITE_LEGACY_PERSONAL:"website-legacy-personal",WEBSITE_LEGACY_COMMERCE:"website-legacy-commerce",WEBSITE_COVER_PAGE:"website-starter",WEBSITE_COVER_PAGE_TRIAL:"website-starter-trial",WEBSITE_COMMERCE_TRIAL:"website-commerce-trial",WEBSITE_COMMERCE_BASIC:"website-commerce-basic",WEBSITE_COMMERCE_ADVANCED:"website-commerce-advanced", PARKING_PAGE_REMOVED:"parking-page-removed",WEBSITE_V5_LINKED_LOW:"website-v5-linked-low",WEBSITE_V5_LINKED_HIGH:"website-v5-linked-high",WEBSITE_PARKING_PAGE:"website-parking-page"}},408:function(p,c,a){function n(a){var e=1>=arguments.length||void 0===arguments[1]?{}:arguments[1],f=2>=arguments.length||void 0===arguments[2]?"":arguments[2];return d.getTemplateForSingleItem((0,l.default)({},e,{action:a})).replace("{id}",f)}var l=(c=a(13))&&c.__esModule?c:{"default":c},g=a(129),e=a(22),m=a(282),d= a(158),f=a(162);p.exports={read:function(a){var d=arguments[2];return(1>=arguments.length||void 0===arguments[1]?0:arguments[1])?e.get("/api/rest/global-content-items/"+a):e.get(n(f.GET,d,a))},readForCollection:function(a,f){var c=d.getTemplateForCollectionItems(f).replace("{collectionId}",a);return e.get(c)},update:function(a,d){delete a.author;delete a.pendingPushedServices;delete a.pushedServices;return e.put(n(f.PUT,d,a.id),a)},updateForCollection:function(a,d){delete a.author;delete a.pendingPushedServices; delete a.pushedServices;return e.put(n(f.PUT,d,a.id),a)},create:function(a,d,c){return e.post(n(f.POST,c),a,d)},createForCollection:function(a,d,c){return e.post(n(f.POST,c),a,d)},updateField:function(a){a=m(a);return e.post("/api/commondata/SaveItemField",g.stringify(a))},"delete":function(a,d){return e.delete(n(f.DELETE,d,a))},deleteMany:function(a){a=g.stringify({items:a});return e.post("/api/commondata/RemoveItems",a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}},449:function(p, c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c},g=a(23),e=a(467),m=a(125);c=a(7);var d=a(52),f=a(1027),q=a(37),s=e(m);a=function(){function a(){(0,n.default)(this,a);this.bindListeners({onStaticBootstrap:q.BOOTSTRAP});this.exportPublicMethods({isFeatureEnabled:this.isFeatureEnabled,getLimit:this.getLimit,getFeatureUpsellInfo:this.getFeatureUpsellInfo})}(0,l.default)(a,[{key:"onStaticBootstrap",value:function(){var a=0>=arguments.length||void 0===arguments[0]? {}:arguments[0];this.setState(g.fromJS({features:a.features,featureSetIdentifier:a.featureSetId}))}},{key:"getLimit",value:function(a){a=s[a];return this.getState().getIn(["features","limits",a])||Number.MAX_VALUE}},{key:"isFeatureEnabled",value:function(a){a=s[a];return this.getState().hasIn(["features","enabledFeatures",a])}},{key:"getFeatureUpsellInfo",value:function(a){var d=this.getState().get("featureSetIdentifier");return f.getIn([a,d])}}]);return a}();p.exports=c.createStore(d(a),"FeaturesStore")}, 451:function(p,c,a){a(454);p.exports=a(27).Object.freeze},454:function(p,c,a){var n=a(99),l=a(466).onFreeze;a(70)("freeze",function(a){return function(e){return a&&n(e)?a(l(e)):e}})},455:function(p,c){p.exports=function(a,c,l){switch(l.length){case 0:return a.call(c);case 1:return a.call(c,l[0]);case 2:return a.call(c,l[0],l[1]);case 3:return a.call(c,l[0],l[1],l[2])}return a.apply(c,l)}},456:function(p,c){p.exports=function(a,c,l){for(var g=-1,e=c.length,m={};++g<e;){var d=c[g],f=a[d];l(f,d)&&(m[d]= f)}return m}},457:function(p,c,a){var n=a(205);p.exports=function(a,c){var e;n(a,function(a,d,f){e=c(a,d,f);return!e});return!!e}},458:function(p,c,a){var n=a(155);p.exports=function(a,c){return function(e,m){if(null==e)return e;if(!n(e))return a(e,m);for(var d=e.length,f=c?d:-1,q=Object(e);(c?f--:++f<d)&&!1!==m(q[f],f,q););return e}}},459:function(p,c,a){c=a(308);var n=a(444),l=a(53),g=c?c.isConcatSpreadable:void 0;p.exports=function(a){return l(a)||n(a)||!(!g||!a||!a[g])}},461:function(p,c){YUI.add("model", function(a,c){function l(){l.superclass.constructor.apply(this,arguments)}var g=YUI.namespace("Env.Model"),e=a.Lang,m=a.Array,d=a.Object,f="error";a.Model=a.extend(l,a.Base,{idAttribute:"id",_allowAdHocAttrs:!0,_isYUIModel:!0,initializer:function(a){this.changed={};this.lastChange={};this.lists=[]},destroy:function(a,d){var e=this;"function"===typeof a&&(d=a,a=null);e.onceAfter("destroy",function(){function c(f){f||m.each(e.lists.concat(),function(d){d.remove(e,a)});d&&d.apply(null,arguments)}a&& (a.remove||a["delete"])?e.sync("delete",a,c):c()});return l.superclass.destroy.call(e)},generateClientId:function(){g.lastId||(g.lastId=0);return this.constructor.NAME+"_"+(g.lastId+=1)},getAsHTML:function(d){d=this.get(d);return a.Escape.html(e.isValue(d)?String(d):"")},getAsURL:function(a){a=this.get(a);return encodeURIComponent(e.isValue(a)?String(a):"")},isModified:function(){return this.isNew()||!d.isEmpty(this.changed)},isNew:function(){return!e.isValue(this.get("id"))},load:function(a,d){var e= this;"function"===typeof a&&(d=a,a={});a||(a={});e.sync("read",a,function(c,k){var g={options:a,response:k},m;c?(g.error=c,g.src="load",e.fire(f,g)):(e._loadEvent||(e._loadEvent=e.publish("load",{preventable:!1})),m=g.parsed=e._parse(k),e.setAttrs(m,a),e.changed={},e.fire("load",g));d&&d.apply(null,arguments)});return e},parse:function(d){if("string"===typeof d)try{return a.JSON.parse(d)}catch(e){return this.fire(f,{error:e,response:d,src:"parse"}),null}return d},save:function(a,d){var e=this;"function"=== typeof a&&(d=a,a={});a||(a={});e._validate(e.toJSON(),function(c){c?d&&d.call(null,c):e.sync(e.isNew()?"create":"update",a,function(c,g){var m={options:a,response:g},l;c?(m.error=c,m.src="save",e.fire(f,m)):(e._saveEvent||(e._saveEvent=e.publish("save",{preventable:!1})),g&&(l=m.parsed=e._parse(g),e.setAttrs(l,a)),e.changed={},e.fire("save",m));d&&d.apply(null,arguments)})});return e},set:function(a,d,e){var c={};c[a]=d;return this.setAttrs(c,e)},setAttrs:function(e,c){var f=this.idAttribute,g,k, m,z;c=a.merge(c);z=c._transaction={};"id"!==f&&(e=a.merge(e),d.owns(e,f)?e.id=e[f]:d.owns(e,"id")&&(e[f]=e.id));for(k in e)d.owns(e,k)&&this._setAttr(k,e[k],c);if(!d.isEmpty(z)){f=this.changed;m=this.lastChange={};for(k in z)d.owns(z,k)&&(g=z[k],f[k]=g.newVal,m[k]={newVal:g.newVal,prevVal:g.prevVal,src:g.src||null});c.silent||(this._changeEvent||(this._changeEvent=this.publish("change",{preventable:!1})),c.changed=m,this.fire("change",c))}return this},sync:function(){var a=m(arguments,0,!0).pop(); "function"===typeof a&&a()},toJSON:function(){var a=this.getAttrs();delete a.clientId;delete a.destroyed;delete a.initialized;"id"!==this.idAttribute&&delete a.id;return a},undo:function(a,e){var c=this.lastChange,f=this.idAttribute,k={},g;a||(a=d.keys(c));m.each(a,function(a){d.owns(c,a)&&(a=a===f?"id":a,g=!0,k[a]=c[a].prevVal)});return g?this.setAttrs(k,e):this},validate:function(a,d){d&&d()},addAttr:function(a,d,c){var f=this.idAttribute,k;f&&a===f&&(f=this._isLazyAttr("id")||this._getAttrCfg("id"), k=d.value===d.defaultValue?null:d.value,e.isValue(k)||(k=f.value===f.defaultValue?null:f.value,e.isValue(k)||(k=e.isValue(d.defaultValue)?d.defaultValue:f.defaultValue)),d.value=k,f.value!==k&&(f.value=k,this._isLazyAttr("id")?this._state.add("id","lazy",f):this._state.add("id","value",k)));return l.superclass.addAttr.apply(this,arguments)},_parse:function(a){return this.parse(a)},_validate:function(a,d){function c(k){e.isValue(k)?(g.fire(f,{attributes:a,error:k,src:"validate"}),d(k)):d()}var g=this; 1===g.validate.length?c(g.validate(a,c)):g.validate(a,c)},_setAttrVal:function(a,d,e,c,f,g){var m=l.superclass._setAttrVal.apply(this,arguments),n=f&&f._transaction,p=g&&g.initializing;m&&(n&&!p)&&(n[a]={newVal:this.get(a),prevVal:e,src:f.src||null});return m}},{NAME:"model",ATTRS:{clientId:{valueFn:"generateClientId",readOnly:!0},id:{value:null}}})},"3.17.2",{requires:["base-build","escape","json-parse"]})},464:function(p,c){p.exports={ENABLED:1,DISABLED:2}},469:function(p,c,a){function n(a){return a&& a.__esModule?a:{"default":a}}c=a(40);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c);c=a(48);var m=n(c);c=a(145);var d=n(c);c=a(47);var f=n(c);c=a(19);c=n(c);var q=a(23),s=q.Record,r=q.Set,y=q.Map,k=a(72),da=a(470);a={allowSquarespacePromotion:!0,amazonAssociateTag:void 0,announcementBarSettings:y(),assetPurchasesByNonAdminsAllowed:!0,businessHours:y(),collectionTitleFormat:void 0,commentAnonAllowed:void 0,commentApprovalRequired:void 0,commentAvatarsOn:void 0,commentDisableAfterDaysDefault:0,commentEnableByDefault:void 0, commentFlagThreshold:0,commentFlagsAllowed:void 0,commentLikesAllowed:void 0,commentSortType:void 0,commentThreaded:void 0,commentsEnabled:!0,configurationMenuItems:void 0,contactEmail:void 0,contactPhoneNumber:void 0,country:void 0,defaultPostFormat:void 0,disqusShortname:"",homepageTitleFormat:void 0,hours:void 0,id:void 0,itemTitleFormat:void 0,lastAgreedTermsOfService:void 0,markdownMode:void 0,mobileInfoBarSettings:y(),notFoundPageId:null,ownerId:void 0,pinterestOverlayOptions:y(),simpleLikingEnabled:void 0, socialAccountDisplayOrder:void 0,ssBadgeDevices:void 0,ssBadgePosition:void 0,ssBadgeType:void 0,ssBadgeVisibility:void 0,state:void 0,storeSettings:void 0,subjects:void 0,tutorialsCompleted:r(),type:void 0,contentDescription:y(),goals:y(),useDeviceView:!0,useEscapeKeyToLogin:!0,websiteId:void 0};var z=(0,c.default)(a);p.exports=function(a){function c(){var a=0>=arguments.length||void 0===arguments[0]?{}:arguments[0];(0,g.default)(this,c);return(0,m.default)(this,(c.__proto__||(0,l.default)(c)).call(this, q.fromJS(da(a))))}(0,f.default)(c,a);(0,e.default)(c,[{key:"merge",value:function(a){a=a instanceof s?a:k(da(a),z);return(0,d.default)(c.prototype.__proto__||(0,l.default)(c.prototype),"merge",this).call(this,a)}},{key:"serializeToModel",value:function(){var a=this.toJS(),d=a.tutorialsCompleted;null===a.notFoundPageId&&(a.notFoundPageId="system-default");d&&(a.tutorialsCompleted=d.reduce(function(a,d){a[d]=!0;return a},{}));return a}}]);return c}(s(a))},470:function(p,c,a){var n=(c=a(19))&&c.__esModule? c:{"default":c},l=(c=a(17))&&c.__esModule?c:{"default":c},g=a(23).Set;p.exports=function(a){var c=a.notFoundPageId,d=a.tutorialsCompleted;a=(0,l.default)({},a);d&&(a.tutorialsCompleted=g((0,n.default)(d)));"system-default"===c&&(a.notFoundPageId=null);return a}},477:function(p,c){function a(a){this.dispatcher=a.dispatcher;this.listeners={}}Object.defineProperty(c,"__esModule",{value:!0});a.prototype.addActionListener=function(a,c){var g=this.dispatcher.register(function(e){a===e.action&&c(e.data, e.details)});this.listeners[g]=!0;return g};a.prototype.removeActionListener=function(a){delete this.listeners[a];this.dispatcher.unregister(a)};a.prototype.removeAllActionListeners=function(){Object.keys(this.listeners).forEach(this.removeActionListener.bind(this));this.listeners={}};c["default"]=a;p.exports=c["default"]},487:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c=a(24);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c);c=a(23);var m=c.Map,d=c.fromJS;c=a(7);var f=a(285); a=a(52);var q=function(){function a(){(0,g.default)(this,a);this.state=m();this.bindListeners({onInsert:f.insert,onInsertMany:f.insertMany,onDelete:[f.delete,f.deleteUnusedCollectionPermanently]});this.exportPublicMethods({fetch:this.fetch,fetchFromServer:this.fetchFromServer})}(0,e.default)(a,[{key:"onInsert",value:function(a){this.setState(this.state.set(a.id,d(a)))}},{key:"onInsertMany",value:function(a){var e=this.state;a.forEach(function(a){return e=e.set(a.id,d(a))});this.setState(e)}},{key:"onDelete", value:function(a){this.setState(this.state.delete(a))}},{key:"fetch",value:function(a){var d=this.getState().get(a);return d?l.default.resolve(d):this.fetchFromServer(a)}},{key:"fetchFromServer",value:function(a){var d=this;return f.read(a).then(function(){return d.getState().get(a)})}}]);return a}();p.exports=c.createStore(a(q),"ContentCollectionStore")},505:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};a=a(7);c=function(){function a(){(0,n.default)(this, a);this.generateActions("refresh","setUrl","removeLoadHandler","disableEditing","enableEditing")}(0,l.default)(a,[{key:"addLoadHandler",value:function(a,c){return{key:a,callback:c}}}]);return a}();p.exports=a.createActions(c)},556:function(p,c){YUI.add("squarespace-model-sync-rest",function(a){function c(){this._ioConfigCache={}}c.prototype={sync:function(c,g,e){a.Lang.isValue(g.timeout)||(g.timeout=1E7);a.ModelSync.REST.prototype.sync.apply(this,arguments)},_storeRequest:function(c,g){this._ioConfigCache[c.id]= a.merge(g,{})},_retrieveAndEvict:function(a){var c=this._ioConfigCache[a];this._ioConfigCache[a]=null;return c},_isCrumbFailure:function(a){return a&&a.crumbFail&&a.crumb},_sendSyncIORequest:function(c){var g=a.ModelSync.REST.prototype._sendSyncIORequest.apply(this,arguments);this._storeRequest(g,c);return g},_onSyncIOEnd:function(c,g){this._retrieveAndEvict(c);a.ModelSync.REST.prototype._onSyncIOEnd.apply(this,arguments)},_onSyncIOSuccess:function(c,g,e){var m=this._retrieveAndEvict(c),d={},f=g.responseText; a.Lang.isValue(f)&&f.trim()&&(d=a.JSON.parse(f));this._isCrumbFailure(d)?(d=d.crumb,a.ModelSync.REST.CSRF_TOKEN=d,a.Env.CSRF_TOKEN=d,m.headers["X-CSRF-Token"]=d,this._sendSyncIORequest(m)):a.ModelSync.REST.prototype._onSyncIOSuccess.apply(this,arguments)},_onSyncIOFailure:function(c,g,e){if(c=e.callback){e={};var m=g.responseText;a.Lang.isValue(m)&&m.trim()&&(e=a.JSON.parse(m));c({code:g.status,msg:g.statusText,responseJSON:e},g)}}};a.mix(c,a.ModelSync.REST,!1,null,1);a.namespace("Squarespace.ModelSync").REST= c},"1.0",{requires:["model-sync-rest"]})},557:function(p,c){YUI.add("model-list",function(a,c){function l(){l.superclass.constructor.apply(this,arguments)}var g=a.Attribute.prototype,e=a.Lang,m=a.Array;a.ModelList=a.extend(l,a.Base,{model:a.Model,_isYUIModelList:!0,initializer:function(d){d||(d={});var e=this.model=d.model||this.model;"string"===typeof e&&((this.model=a.Object.getValue(a,e.split(".")))||a.error("ModelList: Model class not found: "+e));this.publish("add",{defaultFn:this._defAddFn}); this.publish("reset",{defaultFn:this._defResetFn});this.publish("remove",{defaultFn:this._defRemoveFn});this.after("*:idChange",this._afterIdChange);this._clear();d.items&&this.add(d.items,{silent:!0})},destructor:function(){this._clear()},add:function(d,c){var g=d._isYUIModelList;return g||e.isArray(d)?m.map(g?d.toArray():d,function(d,e){var g=c||{};"index"in g&&(g=a.merge(g,{index:g.index+e}));return this._add(d,g)},this):this._add(d,c)},create:function(d,e,c){var g=this;"function"===typeof e&& (c=e,e={});e||(e={});d._isYUIModel||(d=new this.model(d));g.fire("create",a.merge(e,{model:d}));return d.save(e,function(a){a||g.add(d,e);c&&c.apply(null,arguments)})},each:function(a,e){var c=this._items.concat(),g,m,l;g=0;for(l=c.length;g<l;g++)m=c[g],a.call(e||m,m,g,this);return this},filter:function(a,e){var c=[],g=this._items,m,l,k;"function"===typeof a&&(e=a,a={});m=0;for(k=g.length;m<k;++m)l=g[m],e.call(this,l,m,this)&&c.push(l);return a.asList?(g=new this.constructor({model:this.model}),c.length&& g.add(c,{silent:!0}),g):c},get:function(a){return this.attrAdded(a)?g.get.apply(this,arguments):this.invoke("get",a)},getAsHTML:function(d){return this.attrAdded(d)?a.Escape.html(g.get.apply(this,arguments)):this.invoke("getAsHTML",d)},getAsURL:function(a){return this.attrAdded(a)?encodeURIComponent(g.get.apply(this,arguments)):this.invoke("getAsURL",a)},getByClientId:function(a){return this._clientIdMap[a]||null},getById:function(a){return this._idMap[a]||null},invoke:function(a){var e=[this._items, a].concat(m(arguments,1,!0));return m.invoke.apply(m,e)},load:function(a,e){var c=this;"function"===typeof a&&(e=a,a={});a||(a={});this.sync("read",a,function(g,m){var l={options:a,response:m},k;g?(l.error=g,l.src="load",c.fire("error",l)):(c._loadEvent||(c._loadEvent=c.publish("load",{preventable:!1})),k=l.parsed=c._parse(m),c.reset(k,a),c.fire("load",l));e&&e.apply(null,arguments)});return this},map:function(a,e){return m.map(this._items,a,e)},parse:function(d){if("string"===typeof d)try{return a.JSON.parse(d)|| []}catch(e){return this.fire("error",{error:e,response:d,src:"parse"}),null}return d||[]},remove:function(a,c){var g=a._isYUIModelList;return g||e.isArray(a)?(a=m.map(g?a.toArray():a,function(a){return e.isNumber(a)?this.item(a):a},this),m.map(a,function(a){return this._remove(a,c)},this)):this._remove(a,c)},reset:function(d,e){d||(d=[]);e||(e={});var c=a.merge({src:"reset"},e);d=d._isYUIModelList?d.toArray():m.map(d,function(a){return a._isYUIModel?a:new this.model(a)},this);c.models=d;e.silent? this._defResetFn(c):(this.comparator&&d.sort(a.bind(this._sort,this)),this.fire("reset",c));return this},some:function(a,e){var c=this._items.concat(),g,m,l;g=0;for(l=c.length;g<l;g++)if(m=c[g],a.call(e||m,m,g,this))return!0;return!1},sort:function(d){if(!this.comparator)return this;var e=this._items.concat();d||(d={});e.sort(a.rbind(this._sort,this,d));e=a.merge(d,{models:e,src:"sort"});d.silent?this._defResetFn(e):this.fire("reset",e);return this},sync:function(){var a=m(arguments,0,!0).pop();"function"=== typeof a&&a()},toArray:function(){return this._items.concat()},toJSON:function(){return this.map(function(a){return a.toJSON()})},_add:function(d,c){var g;c||(c={});d._isYUIModel||(d=new this.model(d));g=d.get("id");if(this._clientIdMap[d.get("clientId")]||e.isValue(g)&&this._idMap[g])this.fire("error",{error:"Model is already in the list.",model:d,src:"add"});else return g=a.merge(c,{index:"index"in c?c.index:this._findIndex(d),model:d}),c.silent?this._defAddFn(g):this.fire("add",g),d},_attachList:function(a){a.lists.push(this); a.addTarget(this)},_clear:function(){m.each(this._items,this._detachList,this);this._clientIdMap={};this._idMap={};this._items=[]},_compare:function(a,e){return a<e?-1:a>e?1:0},_detachList:function(a){var e=m.indexOf(a.lists,this);-1<e&&(a.lists.splice(e,1),a.removeTarget(this))},_findIndex:function(a){var e=this._items,c=e.length,g=0,m,l;if(!this.comparator||!c)return c;for(l=this.comparator(a);g<c;)m=g+c>>1,a=e[m],0>this._compare(this.comparator(a),l)?g=m+1:c=m;return g},_parse:function(a){return this.parse(a)}, _remove:function(d,c){var g;c||(c={});e.isNumber(d)?(g=d,d=this.item(g)):g=this.indexOf(d);if(-1===g||!d)this.fire("error",{error:"Model is not in the list.",index:g,model:d,src:"remove"});else return g=a.merge(c,{index:g,model:d}),c.silent?this._defRemoveFn(g):this.fire("remove",g),d},_sort:function(a,e,c){a=this._compare(this.comparator(a),this.comparator(e));return 0===a?a:c&&c.descending?-a:a},_afterIdChange:function(a){var c=a.newVal,g=a.prevVal;a=a.target;if(e.isValue(g))if(this._idMap[g]=== a)delete this._idMap[g];else return;else if(-1===this.indexOf(a))return;e.isValue(c)&&(this._idMap[c]=a)},_defAddFn:function(a){var c=a.model,g=c.get("id");this._clientIdMap[c.get("clientId")]=c;e.isValue(g)&&(this._idMap[g]=c);this._attachList(c);this._items.splice(a.index,0,c)},_defRemoveFn:function(a){var c=a.model,g=c.get("id");this._detachList(c);delete this._clientIdMap[c.get("clientId")];e.isValue(g)&&delete this._idMap[g];this._items.splice(a.index,1)},_defResetFn:function(a){"sort"===a.src? this._items=a.models.concat():(this._clear(),a.models.length&&this.add(a.models,{silent:!0}))}},{NAME:"modelList"});a.augment(l,a.ArrayList)},"3.17.2",{requires:"array-extras array-invoke arraylist base-build escape json-parse model".split(" ")})},558:function(p,c){YUI.add("model-sync-rest",function(a,c){function l(){}var g=a.Lang;l.CSRF_TOKEN=YUI.Env.CSRF_TOKEN;l.EMULATE_HTTP=!1;l.HTTP_HEADERS={Accept:"application/json","Content-Type":"application/json"};l.HTTP_METHODS={create:"POST",read:"GET", update:"PUT","delete":"DELETE"};l.HTTP_TIMEOUT=3E4;l._NON_ATTRS_CFG=["root","url"];l.prototype={root:"",url:"",initializer:function(a){a||(a={});"root"in a&&(this.root=a.root||"");"url"in a&&(this.url=a.url||"")},getURL:function(e,c){var d=this.root,f=this.url;return this._isYUIModelList?!f?this.model.prototype.root:this._substituteURL(f,a.merge(this.getAttrs(),c)):d&&("create"===e||this.isNew())?d:!f?this._joinURL(this.getAsURL("id")||""):this._substituteURL(f,a.merge(this.getAttrs(),c))},parseIOResponse:function(a){return a.responseText}, serialize:function(e){return a.JSON.stringify(this)},sync:function(e,c,d){c||(c={});var f=this.getURL(e,c),g=l.HTTP_METHODS[e],n=a.merge(l.HTTP_HEADERS,c.headers),p=c.timeout||l.HTTP_TIMEOUT;c=c.csrfToken||l.CSRF_TOKEN;var y;"POST"===g||"PUT"===g?y=this.serialize(e):delete n["Content-Type"];if(l.EMULATE_HTTP&&("PUT"===g||"DELETE"===g))n["X-HTTP-Method-Override"]=g,g="POST";if(c&&("POST"===g||"PUT"===g||"DELETE"===g))n["X-CSRF-Token"]=c;this._sendSyncIORequest({action:e,callback:d,entity:y,headers:n, method:g,timeout:p,url:f})},_joinURL:function(a){var c=this.root;if(!c&&!a)return"";"/"===a.charAt(0)&&(a=a.substring(1));return c&&"/"===c.charAt(c.length-1)?c+a+"/":c+"/"+a},_parse:function(a){"function"===typeof this.parseIOResponse&&(a=this.parseIOResponse(a));return this.parse(a)},_sendSyncIORequest:function(e){return a.io(e.url,{arguments:{action:e.action,callback:e.callback,url:e.url},context:this,data:e.entity,headers:e.headers,method:e.method,timeout:e.timeout,on:{start:this._onSyncIOStart, failure:this._onSyncIOFailure,success:this._onSyncIOSuccess,end:this._onSyncIOEnd}})},_substituteURL:function(e,c){if(!e)return"";var d={};a.Object.each(c,function(a,e){if(g.isString(a)||g.isNumber(a))d[e]=encodeURIComponent(a)});return g.sub(e,d)},_onSyncIOEnd:function(a,c){},_onSyncIOFailure:function(a,c,d){(a=d.callback)&&a({code:c.status,msg:c.statusText},c)},_onSyncIOSuccess:function(a,c,d){(a=d.callback)&&a(null,c)},_onSyncIOStart:function(a,c){}};a.namespace("ModelSync").REST=l},"3.17.2",{requires:["model", "io-base","json-stringify"]})},572:function(p,c,a){var n=a(865),l=a(868),g=a(94),e=a(53),m=a(276);p.exports=function(a,c,q){var p=e(a)?n:l;q&&m(a,c,q)&&(c=void 0);return p(a,g(c,3))}},697:function(p,c,a){c=a(7);a=new (a(477))(c);p.exports=a},706:function(p,c,a){c=a(7);p.exports=c.generateActions("update")},709:function(p,c,a){function n(a){return a&&a.__esModule?a:{"default":a}}c=a(17);var l=n(c);c=a(3);var g=n(c);c=a(4);var e=n(c);c=a(7);var m=a(37),d=a(278),f=a(285),q=a(706),s=a(487),r=a(72);a= function(){function a(){(0,g.default)(this,a);this.state={};this.bindListeners({onSiteLayoutReset:[m.bootstrap,d.loadTemplate],onSiteLayoutUpdate:q.update,onRemoveCollection:f.deleteSuccess});this.exportPublicMethods({getCollectionLinks:this.getCollectionLinks,getCollectionLink:this.getCollectionLink,filterChildren:this.filterChildren})}(0,e.default)(a,[{key:"onSiteLayoutReset",value:function(a){a=a.siteLayout;if(!a)return!1;var d={};a.forEach(function(a){d[a.identifier]=a});this.setState(d)}},{key:"onSiteLayoutUpdate", value:function(a){var d=this,e,c=a.widgetName;a=a.navigationData.items.map(function(a){return d.formatItemData(c,a)});this.setState((e={},e[c]=(0,l.default)({},this.state[c],{links:a}),e))}},{key:"formatItemData",value:function(a,d){var e=this;if(d.externalLink)return d;var c=s.getState().get(d.collectionId),c=c?c.toJS():this.findNavItem(a,d.collectionId);d.items&&d.items.forEach(function(d){return e.formatItemData(a,d)});return this.composeNavItem(d,c)}},{key:"composeNavItem",value:function(a){var d= r(1>=arguments.length||void 0===arguments[1]?{}:arguments[1],"collectionType enabled passwordProtected title typeName urlId".split(" "));a.items&&(a.children=a.items,delete a.items);return(0,l.default)(a,d)}},{key:"findNavItem",value:function(a,d){for(var e=this.state[a].links;e.length;){var c=e.pop();if(c.collectionId===d)return c;c.children&&(e=e.concat(c.children))}}},{key:"onRemoveCollection",value:function(a){var d=(0,l.default)({},this.state),e;for(e in d){var c=this.filterChildren(this.state[e].links, a);d[e]=(0,l.default)({},this.state[e],{links:c})}this.setState(d)}},{key:"filterChildren",value:function(a,d){var e=this;a=a.slice();return a.filter(function(a){a.children&&a.children.length&&(a.children=e.filterChildren(a.children,d));return a.collectionId!==d})}},{key:"getCollectionLinks",value:function(){return this.state.reduce(function(a,d){a.push(d.links.filter(function(a){return!!a.collectionId}));return a},[])}},{key:"getCollectionLink",value:function(a){for(var d=[].concat(this.getCollectionLinks()), e=0;e<d.length;e++){if(d[e].collectionId===a)return d[e];d=d.concat(d[e].children)}}}]);return a}();p.exports=c.createStore(a,"SiteNavigationStore")},710:function(p,c,a){var n=a(129),l=a(22),g=a(282),e=a(1098);p.exports={generateUrl:function(a){if(a.id){var d=3>a.title.length?a.typeName+"-"+a.title:a.title,d=e(d);return l.post("/api/content-collections/"+a.id+"/generate-url",{title:a.title,urlId:d})}},create:function(a){a=g(a);a=n.stringify(a);return l.post("/api/commondata/SaveCollection",a,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}})}, read:function(a){return l.get("/api/commondata/GetCollection",{params:{collectionId:a}})},readAll:function(){return l.get("/api/commondata/GetCollections")},"delete":function(a){return l.post("/api/commondata/RemoveCollection",n.stringify({collectionId:a}))},deleteUnusedPageCollectionPermanently:function(a){return l.post("/api/commondata/unused-start-page-collection",n.stringify({collectionId:a}))}}},865:function(p,c){p.exports=function(a,c){for(var l=-1,g=a?a.length:0;++l<g;)if(!c(a[l],l,a))return!1; return!0}},868:function(p,c,a){var n=a(205);p.exports=function(a,c){var e=!0;n(a,function(a,d,f){return e=!!c(a,d,f)});return e}},890:function(p,c){YUI.add("datatype-date-format",function(a,c){var l=function(a,c,d){"undefined"===typeof d&&(d=10);for(c+="";parseInt(a,10)<d&&1<d;d/=10)a=c+a;return a.toString()},g={formats:{a:function(a,c){return c.a[a.getDay()]},A:function(a,c){return c.A[a.getDay()]},b:function(a,c){return c.b[a.getMonth()]},B:function(a,c){return c.B[a.getMonth()]},C:function(a){return l(parseInt(a.getFullYear()/ 100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return l(parseInt(g.formats.G(a)%100,10),0)},G:function(a){var c=a.getFullYear(),d=parseInt(g.formats.V(a),10);a=parseInt(g.formats.W(a),10);a>d?c++:0===a&&52<=d&&c--;return c},H:["getHours","0"],I:function(a){a=a.getHours()%12;return l(0===a?12:a,0)},j:function(a){var c=new Date(""+a.getFullYear()+"/1/1 GMT");a=new Date(""+a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()+" GMT")-c;a=parseInt(a/6E4/60/24,10)+1;return l(a,0,100)},k:["getHours", " "],l:function(a){a=a.getHours()%12;return l(0===a?12:a," ")},m:function(a){return l(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a,c){return c.p[12<=a.getHours()?1:0]},P:function(a,c){return c.P[12<=a.getHours()?1:0]},s:function(a,c){return parseInt(a.getTime()/1E3,10)},S:["getSeconds","0"],u:function(a){a=a.getDay();return 0===a?7:a},U:function(a){var c=parseInt(g.formats.j(a),10);a=6-a.getDay();c=parseInt((c+a)/7,10);return l(c,0)},V:function(a){var c=parseInt(g.formats.W(a),10),d=(new Date(""+ a.getFullYear()+"/1/1")).getDay(),c=c+(4<d||1>=d?0:1);53===c&&4>(new Date(""+a.getFullYear()+"/12/31")).getDay()?c=1:0===c&&(c=g.formats.V(new Date(""+(a.getFullYear()-1)+"/12/31")));return l(c,0)},w:"getDay",W:function(a){var c=parseInt(g.formats.j(a),10);a=7-g.formats.u(a);c=parseInt((c+a)/7,10);return l(c,0,10)},y:function(a){return l(a.getFullYear()%100,0)},Y:"getFullYear",z:function(a){a=a.getTimezoneOffset();var c=l(parseInt(Math.abs(a/60),10),0),d=l(Math.abs(a%60),0);return(0<a?"-":"+")+c+ d},Z:function(a){var c=a.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");4<c.length&&(c=g.formats.z(a));return c},"%":function(a){return"%"}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(c,m){m=m||{};if(!a.Lang.isDate(c))return a.Lang.isValue(c)?c:"";var d,f;d=m.format||"%Y-%m-%d";f=a.Intl.get("datatype-date-format");for(var n=function(a,d){var c=g.aggregates[d]; return"locale"===c?f[d]:c},p=function(d,m){var k=g.formats[m];switch(a.Lang.type(k)){case "string":return c[k]();case "function":return k.call(c,c,f);case "array":if("string"===a.Lang.type(k[0]))return l(c[k[0]](),k[1]);default:return m}};d.match(/%[cDFhnrRtTxX]/);)d=d.replace(/%([cDFhnrRtTxX])/g,n);d=d.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,p);n=p=void 0;return d}};a.mix(a.namespace("Date"),g);a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2",{lang:"ar ar-JO ca ca-ES da da-DK de de-AT de-DE el el-GR en en-AU en-CA en-GB en-IE en-IN en-JO en-MY en-NZ en-PH en-SG en-US es es-AR es-BO es-CL es-CO es-EC es-ES es-MX es-PE es-PY es-US es-UY es-VE fi fi-FI fr fr-BE fr-CA fr-FR hi hi-IN hu id id-ID it it-IT ja ja-JP ko ko-KR ms ms-MY nb nb-NO nl nl-BE nl-NL pl pl-PL pt pt-BR ro ro-RO ru ru-RU sv sv-SE th th-TH tr tr-TR vi vi-VN zh-Hans zh-Hans-CN zh-Hant zh-Hant-HK zh-Hant-TW".split(" ")})}, 891:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c};c=a(7);var g=a(907);a=function(){function a(){(0,n.default)(this,a);this.generateActions("saveSuccess")}(0,l.default)(a,[{key:"save",value:function(a,d){var c=this;return function(e){e();return g.save(a,d).then(function(a){c.saveSuccess(a)})}}}]);return a}();p.exports=c.createActions(a)},907:function(p,c,a){var n=a(22);p.exports={save:function(a,c){return n.put("/api/member-website-settings/"+ a,c)},commerceUpsellShown:function(a){return n.post("/api/member-website-settings/"+a+"/commerce-upsell-shown")}}},939:function(p,c,a){var n=a(22);p.exports={getTemplate:function(a){return n.get("/api/templates/"+a)}}},940:function(p,c,a){var n=a(22),l=a(129);p.exports={loadTemplateInstallations:function(){return n.get("/api/template-installations")},setLiveInstallation:function(a){return n.post("/api/template/SetTemplate",l.stringify({installationId:a}))},updateInstallation:function(a){return n.put("/api/template-installations/"+ a.id,a)},setHomepageCollectionId:function(a){return n.post("/api/template/SetHomepageCollection",l.stringify({collectionId:a}))}}},982:function(p,c,a){var n=a(268),l=a(86);YUI.add("squarespace-util-authenticated",function(a){a.namespace("Squarespace");a.Squarespace.UtilAuthenticated={userHasAccessPermission:function(a){return n.hasPermission(a)},isSquarespaceAdmin:function(){return n.isAdmin()},isBetaFeatureEnabled:function(a){return l.isFeatureEnabled(a)}}},"1.0",{requires:["squarespace-util"]})}, 983:function(p,c){YUI.add("datatype-date-math",function(a,c){var l=a.Lang;a.mix(a.namespace("Date"),{isValidDate:function(a){return l.isDate(a)&&isFinite(a)&&"Invalid Date"!=a&&!isNaN(a)&&null!=a?!0:!1},areEqual:function(a,c){return this.isValidDate(a)&&this.isValidDate(c)&&a.getTime()==c.getTime()},isGreater:function(a,c){return this.isValidDate(a)&&this.isValidDate(c)&&a.getTime()>c.getTime()},isGreaterOrEqual:function(a,c){return this.isValidDate(a)&&this.isValidDate(c)&&a.getTime()>=c.getTime()}, isInRange:function(a,c,m){return this.isGreaterOrEqual(a,c)&&this.isGreaterOrEqual(m,a)},addDays:function(a,c){return new Date(a.getTime()+864E5*c)},addMonths:function(a,c){var m=a.getFullYear(),d=a.getMonth()+c,m=Math.floor(m+d/12),d=(d%12+12)%12,f=new Date(a.getTime());f.setFullYear(m);f.setMonth(d);return f},addYears:function(a,c){var m=a.getFullYear()+c,d=new Date(a.getTime());d.setFullYear(m);return d},listOfDatesInMonth:function(a){if(!this.isValidDate(a))return[];var c=this.daysInMonth(a), m=a.getFullYear();a=a.getMonth();for(var d=[],f=1;f<=c;f++)d.push(new Date(m,a,f,12,0,0));return d},daysInMonth:function(a){if(!this.isValidDate(a))return 0;var c=a.getMonth(),m=[31,28,31,30,31,30,31,31,30,31,30,31];if(1!=c)return m[c];a=a.getFullYear();return 0===a%400?29:0===a%100?28:0===a%4?29:28}});a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2",{requires:["yui-base"]})},984:function(p,c){YUI.add("datatype-date-parse",function(a,c){a.mix(a.namespace("Date"),{parse:function(c){c=new Date(+c|| c);return a.Lang.isDate(c)?c:null}});a.namespace("Parsers").date=a.Date.parse;a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2")},1025:function(p,c,a){c=a(157);var n=a(33);a=a(1033);p.exports={DEFAULT_COLLECTION_CONFIGURATIONS:{page:{collectionType:n.COLLECTION_TYPE_PAGE,typeName:"page",title:"Page",ordering:c.CUSTOM,icon:"page",addText:"Add Block"},"gallery-block":{collectionType:n.GALLERY_BLOCK,typeName:"gallery-block",title:"Gallery Block",ordering:c.USER,acceptTypes:["image","video"]}, products:{collectionType:n.PRODUCTS,typeName:"products",title:"Products",pageSize:20,ordering:c.USER,acceptTypes:["store_item"],view:a.PRODUCT_TABLE,icon:"products",addText:"Add Product"},"template-page":{collectionType:n.TEMPLATE_PAGE,title:"Template Page",icon:"projects"},"splash-page":{collectionType:n.SPLASH_PAGE,typeName:"splash-page",title:"Cover Page",ordering:c.CUSTOM,icon:"splash-page"},subscription:{collectionType:n.COLLECTION_TYPE_SUBSCRIPTION,typeName:"subscription",title:"Subscription", ordering:c.CHRONOLOGICAL}},DEFAULT_COLLECTION_CONFIGURATION:{collectionType:n.COLLECTION_TYPE_GENERIC,supported:!0,supportsVideoBackgrounds:!1},DEFAULT_TEMPLATE_PAGE_CONFIGURATION:{icon:"template-page",collectionType:n.TEMPLATE_PAGE,supported:!0,folder:!1,supportsVideoBackgrounds:!1}}},1027:function(p,c,a){c=(c=a(131))&&c.__esModule?c:{"default":c};var n=a(279),l=a(125),g=a(407);a=a(23);a=a.Map().set(l.ABANDONED_CART_RECOVERY,a.Map().set(g.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Switch Product Line", message:"Switch to the new Squarespace Commerce product to get Abandoned Checkout. Your current plan doesn't include this feature.",destination:n.TRIAL_SWITCH_PRODUCT})).set(g.WEBSITE_LEGACY_BUSINESS,(0,c.default)({title:"Switch Product Line",message:"Switch to the new Squarespace Commerce product to get Abandoned Checkout. Your current plan doesn't include this feature.",destination:n.SWITCH_PRODUCT})).set(g.WEBSITE_COMMERCE_TRIAL,(0,c.default)({isSoftWarning:!0,title:"Note",message:"To continue using Abandoned Checkout after your trial, subscribe to the Advanced plan.", destination:n.TRIAL_UPGRADE_PLAN})).set(g.WEBSITE_COMMERCE_BASIC,(0,c.default)({title:"Upgrade Needed",message:"Upgrade to the Advanced plan to get Abandoned Checkout. Your current plan doesn't include this feature.",destination:n.UPGRADE_PLAN}))).set(l.REAL_TIME_SHIPPING_RATES,a.Map().set(g.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Switch Product Line",message:"To use Real‑Time Carrier Rates, you must switch to the new Squarespace Commerce product.",destination:n.TRIAL_SWITCH_PRODUCT})).set(g.WEBSITE_COMMERCE_TRIAL, (0,c.default)({isSoftWarning:!0,title:"Note",message:"To continue using Real‑Time Carrier Rates after your trial, subscribe to the Advanced plan.",destination:n.TRIAL_UPGRADE_PLAN})).set(g.WEBSITE_COMMERCE_BASIC,(0,c.default)({title:"Upgrade Needed",message:"Upgrade to the Advanced plan to get Real‑Time Carrier Rates. Your current plan doesn't include this feature.",destination:n.UPGRADE_PLAN}))).set(l.SHIPSTATION_INTEGRATION,a.Map().set(g.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Switch Product Line", message:"To connect ShipStation, you must switch to the new Squarespace Commerce product.",destination:n.TRIAL_SWITCH_PRODUCT}))).set(l.COMMERCE,a.Map().set(g.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Cannot Go Live",message:"Subscribe to a paid plan to launch your store and start accepting payments.",destination:n.TRIAL_UPGRADE_PLAN})).set(g.WEBSITE_CLASSIC_TRIAL,(0,c.default)({title:"Cannot Go Live",message:"Subscribe to a paid plan to launch your store and start accepting payments.",destination:n.TRIAL_UPGRADE_PLAN})).set(g.WEBSITE_COMMERCE_TRIAL, (0,c.default)({title:"Cannot Go Live",message:"Subscribe to a paid plan to launch your store and start accepting payments.",destination:n.TRIAL_UPGRADE_PLAN}))).set(l.CRM,a.Map().set(g.WEBSITE_LEGACY_COMMERCE,(0,c.default)({title:"Switch to Squarespace Commerce",message:"Switch to the Squarespace Commerce product to view and manage your customers. Your current plan doesn't include this feature.",destination:n.SWITCH_PRODUCT,isSoftWarning:!0})));p.exports=a},1033:function(p,c){p.exports={LIST:"list", GRID:"grid",PRODUCT:"product"}},1095:function(p,c,a){var n=(c=a(3))&&c.__esModule?c:{"default":c},l=(c=a(4))&&c.__esModule?c:{"default":c},g=a(23);c=a(7);var e=a(324),m=a(130),d=a(164);a=a(52);var f=g.Map,q=function(){function a(){(0,n.default)(this,a);this.state=f();this.bindListeners({onUpdateAttributes:e.updateAttributes,unstageChanges:[m.insert,m.delete,e.reset]});this.exportPublicMethods({fetchStaged:this.fetchStaged,getItemDirtyState:this.getItemDirtyState,getItemState:this.getItemState,unstageChanges:this.unstageChanges})} (0,l.default)(a,[{key:"onUpdateAttributes",value:function(a){var d=g.fromJS(a.attrs),c=this.state.get(a.itemId);c&&(d=c.merge(a.attrs));this.setState(this.state.set(a.itemId,d))}},{key:"unstageChanges",value:function(a){a&&a.id&&this.setState(this.state.delete(a.id))}},{key:"getItemState",value:function(a){if(a=this.state.get(a))return a.toJS()}},{key:"getItemDirtyState",value:function(a){return!!this.state.get(a)}},{key:"fetchStaged",value:function(a,c){var e=this.state.get(a);return d.fetch(a,!1, c).then(function(a){return e?a.merge(e.toJS()):a})}}]);return a}();p.exports=c.createStore(a(q),"YUIStagedContentItemStore")},1098:function(p,c){p.exports=function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"").toLowerCase().replace(/[^a-z0-9_\s]+/g,"").replace(/[\s]+/g,"-")}},1126:function(p,c,a){var n=a(93),l=a(449),g=a(125),e=a(33),m=a(490);YUI.add("squarespace-content-collection-utils",function(a){a.namespace("Squarespace").ContentCollectionUtils={groupCollectionsByTypeName:function(c){for(var e= {},g=0;g<c.length;g++){var m=c[g];if(!m.get("isDemoCollection")){m=m.get("typeName");if(!e[m]){var l=n.getState().collectionConfigs[m];e[m]={title:l?l.title:"Unknown",collections:[]}}e[m].collections.push(c[g])}}return a.Object.values(e)},getIconClassNames:function(a){var d=a.getTemplateConfiguration(),c="";d&&d.get("supported")&&(c=d.get("icon"));""===c&&(d&&d.get("collectionType")===e.TEMPLATE_PAGE)&&(c="template-page");""===c&&(c=a.get("typeName"));return c},filterCollections:function(c,g){var m= ["collectionType","ordering","folder","index"];return a.Squarespace.ContentCollectionCache.filter(function(l){if(a.Lang.isArray(g)&&-1!==g.indexOf(l.get("id"))||l.get("isDemoCollection")&&l.get("type")!==e.TEMPLATE_PAGE)return!1;var n=!0,k=l.getTemplateConfiguration(),p;for(p in c)if(n=c[p],a.Lang.isArray(n)||(n=[n]),n=a.Array.some(n,function(c,e){var f;f=p;f=-1!==m.indexOf(f)?a.Lang.isValue(k)&&k.get(f)===c:l.get(f)===c;return f}),!n)break;return n})},getCollectionFilter:function(a,d){return a=== e.PRODUCTS?{collectionType:a}:{collectionType:a,ordering:d}},isTemplatePage:function(a){return a.get("type")===e.TEMPLATE_PAGE},isIndex:function(a){return(a=a.getTemplateConfiguration())&&a.get("folderBehavior")==m.INDEX?!0:!1},isFolder:function(a){return(a=a.getTemplateConfiguration())&&a.get("folder")},isVanillaFolder:function(a){return this.isFolder(a)&&!this.isIndex(a)},isAdjustablePageSizeCollection:function(c){var g=n.getCollectionConfig(c.get("typeName")),g=g&&g.forcePageSize,m=c.get("type")=== e.COLLECTION_TYPE_GENERIC,l=this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL;return!g&&!this.isIndex(c)&&!this.isFolder(c)&&m&&l},isBlog:function(c){return!this.isGenericOrProduct(c)||this.isFolder(c)||this.isIndex(c)?!1:this._getCollectionOrdering(c)==a.Squarespace.CollectionOrdering.CHRONOLOGICAL?!0:!1},_getCollectionOrdering:function(a){return a.get("ordering")||a.getTemplateConfiguration().get("ordering")},isPostableByEmailAddress:function(c){var g=this._getCollectionOrdering(c); return!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===e.COLLECTION_TYPE_GENERIC&&g!==a.Squarespace.CollectionOrdering.CALENDAR&&g!==a.Squarespace.CollectionOrdering.CUSTOM&&g!==a.Squarespace.CollectionOrdering.MUSIC_ALBUM},isSupportedByBookmarklet:function(c){return!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===e.COLLECTION_TYPE_GENERIC&&this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL},hasSupportForInjectableCodePerItem:function(c){return!this.isIndex(c)&& !this.isFolder(c)&&c.get("type")===e.COLLECTION_TYPE_GENERIC&&this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL},hasSupportForSyndication:function(c){return!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===e.COLLECTION_TYPE_GENERIC&&this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL},isDemoCollectionId:function(c){var e=n.getState().demoCollections;return!e?!1:!!a.Array.find(e,function(a){return a.collectionId==c})},isGenericOrProduct:function(a){a= a.getTemplateConfiguration();return!a?!1:!1===a.get("folder")&&(a.get("collectionType")===e.PRODUCTS||a.get("collectionType")===e.COLLECTION_TYPE_GENERIC)},isProduct:function(a){var c=a.getTemplateConfiguration();return!c||a.get("isDemoCollection")?!1:!1===c.get("folder")&&c.get("collectionType")===e.PRODUCTS},isPage:function(a){a=a.getTemplateConfiguration();return!a?!1:!1===a.get("folder")&&a.get("collectionType")===e.COLLECTION_TYPE_PAGE},isNotCalendar:function(c){return c.getTemplateConfiguration().get("ordering")=== a.Squarespace.CollectionOrdering.CALENDAR?!1:!0},usesDisplayIndex:function(c){return[a.Squarespace.CollectionOrdering.MUSIC_ALBUM,a.Squarespace.CollectionOrdering.USER].includes(c)},getIdentifierForCollection:function(c){if(!a.Lang.isValue(c))return null;var g=c.get("typeName");!g&&c.get("type")===e.COLLECTION_TYPE_PAGE&&(c.set("typeName","page"),g="page");var m=c.get("type");if(m===e.COLLECTION_TYPE_GENERIC){var l=c.get("ordering");a.Lang.isValue(l)||(l=n.getCollectionConfig(g),g=n.getPageConfig(g), l=(l||g).ordering);if(a.Squarespace.ContentCollectionUtils.isIndex(c))return"INDEX";if(l===a.Squarespace.CollectionOrdering.USER)return"GALLERY";if(l===a.Squarespace.CollectionOrdering.CHRONOLOGICAL)return"BLOG";if(l===a.Squarespace.CollectionOrdering.CALENDAR)return"CALENDAR";if(l===a.Squarespace.CollectionOrdering.MUSIC_ALBUM)return"MUSIC_ALBUM";if(l===a.Squarespace.CollectionOrdering.KNOWLEDGE_BASE)return"KNOWLEDGE_BASE"}if(m===e.COLLECTION_TYPE_PAGE)return"PAGE";if(m===e.PRODUCTS)return"PRODUCT"; if(m===e.TEMPLATE_PAGE)return"TEMPLATE_PAGE"},alreadyHasTooManyPagesEnabled:function(){return a.Squarespace.ContentCollectionCache.filter(function(a){return!a.get("isDemoCollection")&&!a.get("folder")&&a.get("enabled")}).length>l.getLimit(g.ADD_PAGES)?!0:!1}}},"1.0",{requires:["squarespace-models-content-collection"]})},1130:function(p,c,a){var n=a(1);YUI.add("squarespace-mixins-event-list",function(a){a.namespace("Squarespace.Mixins");a.Squarespace.Mixins.EventList=a.Base.create("EventList",a.Base, [],{initializer:function(){a.Do.before(function(c){var e=a.Object.hasKey(c,"upcoming"),m=a.Object.hasKey(c,"past");if(e&&m)return new a.Do.AlterArgs(n("Parsing calendar-specific response"),[[].concat(c.upcoming).concat(c.past)])},this,"parse",this)},getPastEvents:function(){var c=new Date;return this.filter(function(e){e=e.get("structuredContent");if(null===e)return!1;e=a.DataType.Date.parse(e.get("endDate"));return a.DataType.Date.isGreater(c,e)})},getUpcomingEvents:function(){var c=new Date;return this.filter(function(e){e= e.get("structuredContent");if(null===e)return!1;e=a.DataType.Date.parse(e.get("endDate"));return!a.DataType.Date.isGreater(c,e)})}})},"1.0",{requires:["base","datatype-date","event-custom","json"]})},1131:function(p,c){YUI.add("squarespace-models-audio",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Audio=a.Base.create("Audio",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Audio",validator:function(a){return"Audio"===a},readOnly:!0},embed:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, audioAssetUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},artistName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},lengthInMilliSeconds:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},bitRate:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},sampleRate:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})}, 1132:function(p,c){YUI.add("squarespace-models-calendar-event",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.CalendarEvent=a.Base.create("CalendarEvent",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"CalendarEvent",validator:function(a){return"CalendarEvent"===a},readOnly:!0},startDate:{valueFn:function(){var a=new Date,c=a.getMinutes();a.setSeconds(0);a.setMilliseconds(0);30<=c?(a.addHours(1),a.setMinutes(0)):a.setMinutes(30);return a.getTime()},validator:a.Squarespace.AttrValidators.isNumber}, endDate:{valueFn:function(){var a=new Date(this.get("startDate"));a.addHours(1);return a.getTime()},validator:a.Squarespace.AttrValidators.isNumber}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1133:function(p,c){YUI.add("squarespace-models-check-in",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.CheckIn=a.Base.create("CheckIn",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"CheckIn",validator:function(a){return"CheckIn"=== a},readOnly:!0},checkinId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},venueId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},timeZone:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},venueName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},address:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},crossStreet:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},city:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, state:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},country:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},postalCode:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryPluralName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryShortName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryIcon:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})}, "1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1134:function(p,c,a){var n=a(33),l=a(490);YUI.add("squarespace-models-collection-configuration",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.CollectionConfiguration=a.Base.create("CollectionConfiguration",a.Model,[],{initializer:function(c){a.Lang.isBoolean(c.index)&&c.index?this.set("folderBehavior",l.INDEX):a.Lang.isBoolean(c.folder)&&c.folder&&this.set("folderBehavior",l.NONE)}}, {ATTRS:{collectionType:{value:n.COLLECTION_TYPE_GENERIC},folder:{value:!1},folderBehavior:{},supported:{value:!0}}})},"1.0",{requires:["base","model"]})},1135:function(p,c,a){a(7);var n=a(321),l=a(286),g=a(93),e=a(285),m=a(487),d=a(33),f=a(134),q=a(261),s=a(157);YUI.add("squarespace-models-content-collection",function(a){a.namespace("Squarespace.Models");var c=a.Squarespace.Models.ContentCollection=a.Base.create("Collection",a.Model,[],{initializer:function(c){this.items=c?new a.Squarespace.Models.ContentItemList({items:c.items|| [],parent:this,limit:this.get("itemLimit")}):new a.Squarespace.Models.ContentItemList({parent:this,limit:this.get("itemLimit")});this._itemsEventHandle=this.items.after(["load","add","remove"],this._updateItemCount,this);this._syncFolderChange(this.get("folder"));this.after("folderChange",function(a){this._syncFolderChange(a.newVal)});this._initialAttrs=this.getAttrs();this.unlistenToModelStore=m.listen(this._handleStoreChange.bind(this))},destructor:function(){this.unlistenToModelStore();this._itemsEventHandle.detach(); this._itemsEventHandle=null;this.items.destroy();this.items=null},toDebugString:function(){return a.JSON.stringify(this.getAttrs(["navigationTitle","urlId","id"]))},toJSON:function(){var a=this.constructor.superclass.toJSON.call(this);a.items=this.items.toJSON();return a},parse:function(a){a=c.superclass.parse.apply(this,arguments);a.passwordProtected&&(a.password=f.PASSWORD_MASK);return a},sync:function(a,c,d){switch(a){case "create":this._ensureDemoCloneAndSave(d);break;case "delete":c.isUnusedStarterPage? this._deleteUnusedCollectionPermanently(d):this._delete(d);break;case "read":this._read(c,d);break;case "update":this._ensureDemoCloneAndSave(d)}},load:function(c,d,e){"function"===typeof c&&(e=d,d=c,c={});if(this._readInProgress)this.onceAfter("load",d,e);else a.Model.prototype.load.call(this,c,d?a.bind(d,e||this):null)},resetToLastRead:function(){return m.fetch(this.get("id")).then(function(c){var d=this.getAttrs();a.Object.keys(d).map(function(a){d[a]=void 0});c=a.merge(d,this._initialAttrs,this.parse(c.toJS())); this.setAttrs(c);this.set("dirty",!1)}.bind(this)).catch(this._errorHandler)},updateAttributes:function(a,c){this.setAttrs(a,c)},ensureProcessedItems:function(){var c=function(d){this.items.load({fields:["mediaProcessingState"]},function(){this.items.some(function(a){return a.get("mediaProcessingState")!==q.READY})?a.later(500,this,c,d):d()}.bind(this))}.bind(this);return new a.Promise(function(a){c(a)}.bind(this))},_syncFolderChange:function(a){a&&this.set("dropdown",!0)},_ensureDemoCloneAndSave:function(c){if(this._shouldCloneCollection()){var d= this.toJSON();delete d.id;this.cloneToNewCollection({silent:!0}).then(a.bind(this._save,this,c,d))}else this._save(c)},_handleStoreChange:function(a){if(a=a.get(this.getId()))this.setAttrs(this.parse(a.toJS())),this.set("dirty",!1)},serialize:function(c){c=a.merge(c,this.toJSON());c.collectionId=c.id;delete c.dirty;delete c.body;delete c.tags;delete c.categories;delete c.iTunesImage;delete c.items;a.Lang.isValue(c.mainImage)&&(c.mainImageId=a.instanceOf(c.mainImage,a.Squarespace.Models.ContentItem)? c.mainImage.get("id"):c.mainImage.id);delete c.mainImage;c.metadata&&c.metadata.albumCover&&delete c.metadata.albumCover;c.productQuickViewEnabled&&(c.features.productQuickView.isEnabled=c.productQuickViewEnabled,delete c.productQuickViewEnabled);c.relatedItemsEnabled&&(c.features.relatedItems.isEnabled=c.relatedItemsEnabled,delete c.relatedItemsEnabled);return c},_errorHandler:function(a){console.error(a.stack)},_save:function(a,c){c=this.serialize(c);e.update(c).then(function(c){c.error?a(c,null): (this._initialAttrs=c,a(null,c))}).catch(this._errorHandler)},_delete:function(a){e.delete(this.get("id")).then(function(c){a(null,c)},function(c){a(c,null)}).catch(this._errorHandler)},_deleteUnusedCollectionPermanently:function(a){e.deleteUnusedCollectionPermanently(this.get("id")).then(function(c){a(null,c)},function(c){a(c,null)}).catch(this._errorHandler)},_read:function(c,d){this._readInProgress=!0;m.fetch(this.get("id")).then(function(c){var e=this.parse(c.toJS());a.Squarespace.ContentCollectionUtils.usesDisplayIndex(e.ordering)? this._fetchItemCount(e.id).then(function(a){this._readInProgress=!1;e.itemCount=a;d(null,e)}.bind(this)):(this._readInProgress=!1,d(null,e))}.bind(this),function(a){this._readInProgress=!1;d(a,null)}.bind(this)).catch(this._errorHandler)},_updateItemCount:function(){a.Squarespace.ContentCollectionUtils.usesDisplayIndex(this.get("ordering"))&&(this.isNew()?this.set("itemCount",0):this._fetchItemCount(this.get("id")).then(function(a){this.set("itemCount",a)}.bind(this)).catch(this._errorHandler))}, _fetchItemCount:function(c){return new a.Promise(function(d,e){a.Data.get({url:"/api/content-collections/"+c+"/item-count",success:function(a){d(a)},failure:e},this)})},getTemplateConfiguration:function(){var c;c=this.get("typeName");var e=this.get("type");return(c=e===d.TEMPLATE_PAGE?g.getPageConfig(c):g.getCollectionConfig(c))?new a.Squarespace.Models.CollectionConfiguration(c):new a.Squarespace.Models.CollectionConfiguration({collectionType:e||d.COLLECTION_TYPE_GENERIC,ordering:this.get("ordering"), folder:this.get("folder"),supported:!1})},cloneToNewCollection:function(c){return new a.Promise(a.bind(function(d,e){var f=a.Squarespace.Singletons.TemplateNavigationList.getItemByCollectionId(this.get("id"));this._cloneExampleContent(c).then(a.bind(function(a){f.set("collectionId",a);f.save(d)},this))},this))},_cloneExampleContent:function(c){c=c||{};var d=new a.Promise(a.bind(function(d,e){var f=this.get("id");a.Data.post({url:"/api/commondata/CopyCollection",data:{collectionId:this.get("id"),processPointedCollectionItems:!!c.processPointedCollectionItems}, success:function(c){this.setAttrs(a.merge({mainImageId:null,mainImage:null},c));var g=c.id;n.getHomepageCollectionId()===f?l.setHomepageCollectionId(g).then(function(a){a.error?e():d(g)}):d(g)}},this)},this));d.then(a.bind(function(){this.fire("clonedExampleContent",{silent:!!c.silent})},this));return d},_shouldCloneCollection:function(){return this.get("isDemoCollection")&&this.get("type")===d.COLLECTION_TYPE_PAGE},deleteTrashItems:function(c){a.Data.del({url:"/api/recycle-bin/collection/"+this.get("id")+ "/items",success:function(a){c(a,null)},failure:function(a){c(null,a)}})},getId:function(){return this.get("id")},_set:function(a,c,d){return this.constructor.superclass._set.call(this,a,c,d)}},{ATTRS:{dirty:{value:!1},body:{value:null},title:{validator:a.Lang.isString},navigationTitle:{validator:a.Lang.isString},description:{value:{html:"",source:""}},websiteId:{},id:{value:null},enabled:{value:!0,validator:a.Lang.isBoolean},deleted:{value:!1,validator:a.Lang.isBoolean},homepage:{validator:a.Lang.isBoolean}, starred:{validator:a.Lang.isBoolean},synchronizing:{validator:a.Lang.isBoolean},updatedOn:{},folder:{value:!1},isDemoCollection:{getter:function(){return a.Squarespace.ContentCollectionUtils.isDemoCollectionId(this.get("id"))}},itemCountExceeded:{getter:function(){return this.get("type")==d.PRODUCTS&&this.get("itemCount")>=this.get("maxItemCount")?!0:!1}},itemCount:{validator:a.Lang.isNumber},isEmpty:{getter:function(){return 0===this.items.size()}},maxItemCount:{getter:function(){return this.get("type")== d.PRODUCTS?200:9999}},tags:{value:[],validator:a.Lang.isArray},categories:{value:[],validator:a.Lang.isArray},pageSize:{validator:a.Lang.isNumber,valueFn:function(){if(this.getTemplateConfiguration().get("ordering")===s.CHRONOLOGICAL)return 20}},itemLimit:{value:20,validator:a.Squarespace.AttrValidators.isNumber},ordering:{validator:function(c){return a.Object.values(s).includes(c)}},type:{validator:function(c){return a.Object.values(d).includes(c)}},typeName:{validator:a.Lang.isString},video:{validator:a.Lang.isObject}, fullUrl:{validator:a.Lang.isString},urlId:{validator:a.Squarespace.AttrValidators.isNullOrString},nextDisplayIndex:{getter:function(){return this.get("itemCount")}},regionName:{value:"default",validator:function(c){return!a.Lang.isString(c)||0===c.length?!1:a.Object.keys(g.getState().layouts).includes(c)}},postByEmailAddress:{getter:function(a){return a?a+"@squarespace.com":""}}}});a.Squarespace.Models.ContentCollectionList=a.Base.create("Collections",a.ModelList,[],{model:a.Squarespace.Models.ContentCollection, sync:function(a,c,d){"read"==a&&e.readAll().then(function(a){d(null,a)},function(a){d(a,null)}).catch(this._errorHandler)},getCollectionById:function(c,d,e){var f=this.getById(c);f?d.call(e,f):(f=new a.Squarespace.Models.ContentCollection({id:c}),f.load({},function(){this.add(f);d.call(e,f)},this))},getCollectionFromData:function(c,d){if(!c)return null;if(!c.id)throw Error("getCollectionFromData needs at least an ID in the data to work.");var e=this.getById(c.id);e?d||e.setAttrs(c):e=this.add(new a.Squarespace.Models.ContentCollection(c)); return e}});a.Squarespace.Utils.isInDamaskFrame()?a.Squarespace.ContentCollectionCache=a.config.win.top.Y.Squarespace.ContentCollectionCache:a.Squarespace.ContentCollectionCache=new a.Squarespace.Models.ContentCollectionList},"2.0",{requires:"base model model-list promise squarespace-content-collection-utils squarespace-models-collection-configuration squarespace-models-content-item squarespace-models-content-item-list squarespace-util squarespace-util-authenticated".split(" ")})},1136:function(p, c,a){var n=a(158),l=a(324);YUI.add("squarespace-models-content-item-list",function(a){a.namespace("Squarespace.Models");var c=a.Squarespace.Models.ContentItemList=a.Base.create("ContentItemList",a.ModelList,[a.Squarespace.Mixins.EventList],{initializer:function(c){this.model=a.Squarespace.Models.ContentItem;c=c||{};(c=c.items)&&this.reset(c)},sync:function(a,c,e){switch(a){case "create":console.error("Squarespace.Models.ContentItemList: Create not implemented.");break;case "delete":console.error("Squarespace.Models.ContentItemList: Create not implemented."); break;case "read":this._read(c,e);break;case "update":console.error("Squarespace.Models.ContentItemList: Create not implemented.")}},load:function(a,d){if(this.get("isChildItemList"))throw Error("Squarespace.Models.ContentItemList: Child items are loaded with their parent item. Loading them manually is not supported");c.superclass.load.call(this,a,d)},removeItems:function(c,d){this.remove(c,{source:"bulk-remove"});var e=a.Array.map(c,function(a){var c=a.get("id");a.destroy();return c},this);a.Data.post({url:"/api/commondata/RemoveItems", data:{items:e},success:function(e){this.get("parent").load();a.Lang.isFunction(d)&&d(null,e);this.fire("bulk-remove",c)},failure:function(c){a.Lang.isFunction(d)&&d(c,null)}},this)},moveItems:function(c,d,e){if(this.get("isChildItemList"))throw Error("Squarespace.Models.ContentItemList: Moving child items is not currently supported.");var n=a.Array.map(c,function(a){return null!==this.getById(a.get("id"))?this.remove(this.getById(a.get("id"))):a},this),p=d.get("id"),r=d.items;r.load(a.bind(function(){r.add(n)}, this));var y=a.Array.map(n,function(a){a.set("collectionId",p);a.get("items").each(function(a){a.set("collectionId",p)});l.updateAttributes(a.get("id"),{collectionId:p});return a.get("id")},this);a.Data.post({url:"/api/commondata/MoveItems",data:{toCollectionId:p,items:y},success:function(k){this.get("parent").load();a.Lang.isFunction(e)&&e(null,k);this.fire("move-items",c,d)},failure:function(c){a.Lang.isFunction(e)&&e(c,null)}},this)},reorderItems:function(c,d,e){var l=this.get("parent"),n={};this.get("isChildItemList")? (n.collectionId=l.get("collectionId"),n.parentId=l.get("id")):n.collectionId=l.get("id");var p=1===c.length,y;p?(c=c[0],y=this.indexOf(this.getById(c.get("id"))),this._reorder([c],d),0!==d&&(n.afterId=this.item(d-1).get("id")),n.itemId=c.get("id")):(this._reorder(c,d),0!==d&&(n.afterId=this.item(d-1).get("id")),c=a.Array.map(c,function(a){return a.get("id")},this),n.itemIds=a.JSON.stringify(c));var k=a.bind(function(c){a.Data.post({url:"/api/commondata/ReorderItems",data:c,success:function(c){p&& (0===y||0===d)&&l.load();a.Lang.isUndefined(c.items)||a.Array.each(c.items,function(a,c){var d=this.getById(a.id);d&&d.set("displayIndex",a.displayIndex)},this);this.fire("reordered");a.Lang.isFunction(e)&&e(null,c);0<this._reorderQueue.size()&&k(thie._reorderQueue.next())},failure:function(c){a.Lang.isFunction(e)&&e(c,null)}},this)},this);this._reorderQueue||(this._reorderQueue=new a.Queue);this._reorderQueue.add(n);k(this._reorderQueue.next())},_reorder:function(a,c){var e=a.map(function(a){return this.getById(a.get("id"))}, this);this.remove(e,{onReorder:!0,source:"reorder"});this.add(e,{onReorder:!0,source:"reorder",index:c})},_read:function(c,d){a.Data.get({url:this._getReadUrl(),data:a.merge({limit:this.get("limit")},c),success:function(a){this.set("pagination",{hasNextPage:a.hasNextPage,hasPreviousPage:a.hasPreviousPage,nextPageStart:a.nextPageStart,previousPageStart:a.previousPageStart});d(null,a.results)},failure:function(a){d(a,null)}},this)},_getReadUrl:function(){var c=this.get("parent"),d=n.getTemplateForCollectionItems(c.get("ordering"), c.get("type"));return a.Lang.sub(d,{collectionId:c.get("id")})}},{ATTRS:{parent:{value:null,validator:function(c){return c instanceof a.Squarespace.Models.ContentCollection||c instanceof a.Squarespace.Models.ContentItem}},isChildItemList:{getter:function(){return this.get("parent")instanceof a.Squarespace.Models.ContentItem}},pagination:{value:null},limit:{value:20,validator:a.Squarespace.AttrValidators.isNumber}}})},"1.0",{requires:"base json model-list squarespace-content-collection-utils squarespace-mixins-event-list squarespace-models-content-collection squarespace-models-content-item squarespace-util".split(" ")})}, 1137:function(p,c,a){var n=a(464),l=a(261),g=a(85),e=a(465),m=a(697),d=a(130),f=a(164),q=a(324),s=a(1095),r=a(87);a(162);var y=a(158);YUI.add("squarespace-models-content-item",function(a){a.namespace("Squarespace.Models");var c=a.Squarespace.Models.ContentItem=a.Base.create("Item",a.Model,[],{sync:function(a,c,d){switch(a){case "delete":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._delete.bind(this,d));break;case "read":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._read.bind(this, c,d));break;case "update":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._save.bind(this,d));break;case "create":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._create.bind(this,c,d))}},_errorHandler:function(a){console.error(a.stack)},_save:function(a,c){var e=this.serialize();e.id||this._create(a);e.collectionId?d.updateForCollection(e,c).then(function(c){this._initialAttrs=c;a(null,c)},function(c){a(c,null)}).catch(this._errorHandler): d.update(e).then(function(c){this._initialAttrs=c;a(null,c)},function(c){a(c,null)}).catch(this._errorHandler)},_create:function(a,c,e){var f=this.serialize();f.collectionId?d.createForCollection(f,a,e).then(function(a){c(null,a)},function(a){c(a,null)}).catch(this._errorHandler):d.create(f,a).then(function(a){c(null,a)},function(a){c(a,null)}).catch(this._errorHandler)},_delete:function(a,c){d.delete(this.get("id"),c).then(function(c){a(null,c)},function(c){a(c,null)}).catch(this._errorHandler)}, _read:function(a,c,e){this.get("isGlobalFakeContentItem")?this._readGlobalFakeContentItem(this.get("id"),a,c):(this._readInProgress=!0,a.forceReload?d.read(this.get("id"),!1,e).then(function(a){this._readInProgress=!1;c(null,a)}.bind(this),function(a){this._readInProgress=!1;c(a,null)}.bind(this)).catch(this._errorHandler):s.fetchStaged(this.get("id"),e).then(function(a){this._readInProgress=!1;c(null,a.toJS())}.bind(this),function(a){this._readInProgress=!1;c(a,null)}.bind(this)).catch(this._errorHandler))}, _readGlobalFakeContentItem:function(c,d,e){a.Data.get({url:"/api/rest/global-content-items/"+c,success:function(a){e(null,a)},failure:function(a){e(a,null)}},this)},_getUrlDeterminants:function(a){var c={recordType:this.get("recordType")};a&&(c.collectionOrdering=a.get("ordering"),c.collectionType=a.get("type"),c.collectionId=a.get("id"),c.parentId=this.get("parentId"));return c},resetToLastRead:function(){q.reset(this.toJSON())},initializer:function(a){this._needsJobListener()&&this._bindJobListener(); this._updateNextDisplayIndex();a=this.get("items");a.after(["add","remove"],function(){this._updateNextDisplayIndex();q.updateAttributes(this.getId(),{items:this.get("items")})},this);this.items=a;this._initialAttrs=this.getAttrs();this.bindListenersToContentStores()},destructor:function(){this._jobListener&&(this._jobListener.detach(),this._jobListener=null);this._actionListeners&&this._actionListeners.forEach(function(a){m.removeActionListener(a)})},bindListenersToContentStores:function(){this._actionListeners= [];this._actionListeners.push(m.addActionListener(q.UPDATE_ATTRIBUTES,this._onUpdate.bind(this)));this._actionListeners.push(m.addActionListener(q.RESET,this._onReset.bind(this)));this._actionListeners.push(m.addActionListener(d.INSERT,this._onInsert.bind(this)))},_onUpdate:function(c){this.get("id")===a.Object.getValue(c,["itemId"])&&this._setAttrsInOrder(c.attrs)},_onReset:function(c){this.get("id")===a.Object.getValue(c,["id"])&&f.fetch(this.get("id")).then(function(c){var d=this.getAttrs();a.Object.keys(d).map(function(a){d[a]= void 0});c=a.merge(d,this._initialAttrs,c.toJS());this._setAttrsInOrder(c)}.bind(this)).catch(this._errorHandler)},_onInsert:function(c){if(this.get("id")===a.Object.getValue(c,["id"])){var d=s.getItemState(this.getId());this._setAttrsInOrder(a.merge(c,d))}},_getParentCollection:function(){return new a.Promise(function(c,d){var e=this.get("collectionId");e?a.Squarespace.ContentCollectionCache.getCollectionById(e,c):c(null)}.bind(this))},_setAttrsInOrder:function(a){if(a&&a.mediaProcessingState){var c= Object.keys(a).filter(function(a){return"mediaProcessingState"!==a}).reduce(function(c,d){c[d]=a[d];return c},{});this.setAttrs(c);this.set("mediaProcessingState",a.mediaProcessingState)}else this.setAttrs(a)},updateAttributes:function(a,c){this.setAttrs(a,c);q.updateAttributes(this.getId(),a)},toJSON:function(){var d=c.superclass.toJSON.call(this),e=d.structuredContent;a.Lang.isValue(e)&&(d.structuredContent=e.toJSON());d.items=d.items.toJSON();a.Lang.isObject(d.pushedServices)&&(d.pushedServices= a.Object.keys(d.pushedServices));a.Lang.isObject(d.pendingPushedServices)&&(d.pendingPushedServices=a.Object.keys(d.pendingPushedServices));return d},serialize:function(){var a=this.toJSON();delete a.dirty;delete a.items;delete a.author;delete a.fullUrl;delete a.assetUrl;delete a.resolved;delete a.postItemInjectCode;delete a.promotedBlock;delete a.promotedBlockType;delete a.nextDisplayIndex;delete a.mediaIsUploading;delete a.hasFileData;delete a.isGlobalFakeContentItem;delete a.childrenGroups;delete a.colorData; delete a.mainImage;delete a.gallery;this._normalizeDates(a);this._attachCommentingToData(a);this._attachWorkflowToData(a);this._updateStructuredContent(a);return a},_updateStructuredContent:function(c){c.structuredContent&&c.startDate&&(c.structuredContent=a.merge(c.structuredContent,{startDate:c.startDate,endDate:c.endDate}))},_getWorkflowStateForString:function(c){return a.Object.getValue({published:e.PUBLISHED,scheduled:e.SCHEDULED,needsreview:e.NEEDS_REVIEW,draft:e.DRAFT},c)},_attachWorkflowToData:function(c){a.Lang.isValue(c.workflow)&& (c.workflowState=this._getWorkflowStateForString(c.workflow.state),c.publishOn=c.workflow.date,delete c.workflow)},_attachCommentingToData:function(c){a.Lang.isValue(c.commenting)&&(c.commentState=a.Squarespace.CommentStates["allow"===c.commenting.state?"ENABLED":"DISABLED"],c.commentDisableOn=c.commenting.date,delete c.commenting)},_normalizeDates:function(c){a.Array.each("addedOn publishOn updatedOn commentDisableOn startDate endDate".split(" "),function(d,e){a.Lang.isDate(c[d])&&(c[d]=c[d].getTime())}, this)},save:function(d,e){this.isNew()||!a.Lang.isObject(d)||!d.fields?c.superclass.save.call(this,d,e):this._saveFields(d.fields,e)},autoSave:function(c,d){a.Lang.isFunction(c)?(d=c,c={}):a.Lang.isValue(c)||(c={});c.headers=a.merge(c.headers,{"X-AutoSave":!0});this.save(c,d)},like:function(c){a.Data.post({url:"/api/content-items/"+this.getId()+"/sentiment/like",success:function(d){a.Lang.isFunction(c)&&c(null,d)},failure:function(d){a.Lang.isFunction(c)&&c(d,null)}},this)},dislike:function(c){a.Data.post({url:"/api/content-items/"+ this.getId()+"/sentiment/dislike",success:function(d){a.Lang.isFunction(c)&&c(null,d)},failure:function(d){a.Lang.isFunction(c)&&c(d,null)}},this)},clearFileData:function(c){this.setAttrs({systemDataId:null,systemDataOrigin:null,mediaProcessingState:null,systemDataSourceType:null,systemDataVariants:null,filename:null});this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(function(c){var d=this.get("id");c=y.getMainImageDeletionUrl(c).replace("{id}",d);a.Data.del({url:c,data:{itemId:d}})}.bind(this))}, clearChildGroup:function(c,d){a.Data.post({url:"/api/commondata/ClearChildGroup",data:{childType:c,itemId:this.get("id")},success:function(c){a.Lang.isFunction(d)&&d(null,c)},failure:function(c){a.Lang.isFunction(d)&&d(c,null)}})},getAssetUrlForFormat:function(c){return a.Lang.sub("{assetUrl}?format={format}",{assetUrl:this.get("assetUrl"),format:c})},getId:function(){return this.get("id")},isLicensedAssetPreview:function(){return a.Lang.isValue(this.get("licensedAssetPreview"))},isLicensedAsset:function(){return a.Lang.isValue(this.get("licensedAssetId"))}, getMainImageUploadUrl:function(a){this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(function(c){a(y.getMainImageUploadUrl(c).replace("{id}",this.get("id")))}.bind(this))},_needsJobListener:function(){var a=this.get("mediaProcessingState");return a===l.QUEUED||a===l.PROCESSING},_bindJobListener:function(){Static&&Static.JOB_MANAGER&&(this._jobListener=a.config.win.Static.JOB_MANAGER.on("completed",function(c){var d=c.job;c=this.get("id");var e=d.get("data.contentItemId"),d= d.get("data.globalContentItemId");e===c?(this.load({forceReload:!0}),this._jobListener.detach()):a.Lang.isValue(d)&&d===c&&(this._readGlobalFakeContentItem(d,{},function(a,c){a?console.log("error loading model",a):(this.set("assetUrl",c.assetUrl),this.setAttrs(c))}.bind(this)),this._jobListener.detach())},this))},_updateNextDisplayIndex:function(){var a=0;this.get("items").each(function(c){c=c.get("displayIndex");c>=a&&(a=c+1)},this);this._set("nextDisplayIndex",a)},_saveFields:function(c,e){if(1< c.length)throw Error("Saving multiple fields is not currently supported.");var f=c[0],f={field:f,itemId:this.get("id"),value:this.get(f)};d.update(f).then(function(c){a.Lang.isFunction(e)&&e(null,c.item)},function(c){a.Lang.isFunction(e)&&e.call(c,null)}).catch(this._errorHandler)},_getStructuredContentCtor:function(){switch(this.get("recordType")){case g.AUDIO:return a.Squarespace.Models.Audio;case g.EVENT:return a.Squarespace.Models.CalendarEvent;case g.CHECKIN:return a.Squarespace.Models.CheckIn; case g.VIDEO:return a.Squarespace.Models.Embed;case g.KBARTICLE:return a.Squarespace.Models.KBArticle;case g.LINK:return a.Squarespace.Models.Link;case g.QUOTE:return a.Squarespace.Models.Quote;case g.STORE_ITEM:return a.Squarespace.Models.StoreItem;case g.TWEET:return a.Squarespace.Models.Tweet;default:return null}}},{ATTRS:{id:{value:null},collectionId:{value:null},parentId:{value:null},authorId:{valueFn:function(){var c=a.Object.getValue(Static,["SQUARESPACE_CONTEXT","authenticatedAccount"]);return c? c.id:null}},proxyForId:{value:null},recordType:{validator:a.Squarespace.AttrValidators.isValueIn(g),writeOnce:!0},childType:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},addedOn:{valueFn:function(){return(new Date).getTime()},validator:a.Squarespace.AttrValidators.isNumber,writeOnce:"initOnly"},updatedOn:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber,writeOnce:"initOnly"},publishOn:{valueFn:function(){return(new Date).getTime()},validator:a.Squarespace.AttrValidators.isNumber}, unsaved:{value:null,validator:a.Squarespace.AttrValidators.isNullOrBoolean},urlId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},title:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},body:{value:null,setter:function(c){return a.merge(this.get("body"),c)},validator:a.Squarespace.AttrValidators.isNullOrObject},excerpt:{value:{html:"",raw:!1},validator:a.Squarespace.AttrValidators.isNullOrObject},displayIndex:{value:0,validator:a.Squarespace.AttrValidators.isNumber}, starred:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},passthrough:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},tags:{value:[],validator:a.Squarespace.AttrValidators.isArray},categories:{value:[],validator:a.Squarespace.AttrValidators.isArray},workflowState:{value:e.DRAFT,validator:a.Squarespace.AttrValidators.isValueIn(e)},systemDataId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},systemDataVariants:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, systemDataOrigin:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},contentType:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},filename:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},dataSize:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},sourceUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},mediaProcessingState:{value:null,validator:a.Squarespace.AttrValidators.isNullOr(a.Squarespace.AttrValidators.isValueIn(l))}, mediaFocalPoint:{value:{x:0.5,y:0.5},setter:function(c){if(a.Lang.isString(c)){c=c.split(",");var d=parseFloat(c[0]);c=parseFloat(c[1]);return{x:!isNaN(d)&&1>=d?d:0.5,y:!isNaN(c)&&1>=c?c:0.5}}return c}},colorData:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},clickthroughUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},location:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},customContent:{value:null},likeCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber}, dislikeCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber},commentCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber},publicCommentCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber},commentState:{valueFn:function(){var a=r.getState().toJS(),c=a.commentsEnabled;return a.commentEnableByDefault&&c?n.ENABLED:n.DISABLED},validator:a.Squarespace.AttrValidators.isValueIn(n)},commentDisableOn:{valueFn:function(){var c=a.Object.getValue(Static,["SQUARESPACE_CONTEXT","websiteSettings", "commentDisableAfterDaysDefault"]);return c?a.Date.addDays(new Date,c).getTime():null},validator:a.Squarespace.AttrValidators.isNullOrNumber},pushedServices:{value:{},validator:a.Squarespace.AttrValidators.isObject},shareStates:{value:[]},structuredContent:{valueFn:function(){var c=this._getStructuredContentCtor();return a.Lang.isNull(c)?null:new c},setter:function(c){if(c instanceof a.Squarespace.Models.StructuredContent)return c;var d=this._getStructuredContentCtor();return a.Lang.isNull(d)?null: new d(c)}},items:{valueFn:function(){return new a.Squarespace.Models.ContentItemList({parent:this})},setter:function(c){var d=this.get("items");return a.Lang.isValue(d)?(d.reset(c),d):c instanceof a.Squarespace.Models.ContentItemList?c:new a.Squarespace.Models.ContentItemList({items:c,parent:this})}},childrenGroups:{value:{},validator:a.Squarespace.AttrValidators.isObject},author:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},fullUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, assetUrl:{value:null,getter:function(c){return a.Squarespace.UrlUtils.isSecure()?a.Squarespace.UrlUtils.securifyURL(c):c},validator:a.Squarespace.AttrValidators.isNulLOrString},resolved:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},postItemInjectCode:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},promotedBlock:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},promotedBlockType:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},nextDisplayIndex:{value:0, validator:a.Squarespace.AttrValidators.isNumber,readOnly:!0},mediaIsUploading:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},hasFileData:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},isGlobalFakeContentItem:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},licensedAssetPreview:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},licensedAssetId:{value:null,validator:a.Lang.isString},isPusher:{value:!0,readOnly:!0,validator:a.Squarespace.AttrValidators.isBoolean}, dirty:{getter:function(){return s.getItemDirtyState(this.get("id"))}}}})},"1.0",{requires:"base json model squarespace-attr-validators squarespace-model-sync-rest squarespace-models-audio squarespace-models-calendar-event squarespace-models-check-in squarespace-models-content-collection squarespace-models-content-item-list squarespace-models-embed squarespace-models-instagram squarespace-models-kb-article squarespace-models-link squarespace-models-quote squarespace-models-store-item squarespace-models-tweet squarespace-url-utils squarespace-util".split(" ")})}, 1138:function(p,c){YUI.add("squarespace-models-embed",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Embed=a.Base.create("Embed",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Embed",validator:function(a){return"Embed"===a},readOnly:!0},embed:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},oembed:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},overlay:{value:!0,validator:a.Squarespace.AttrValidators.isBoolean}}})},"1.0", {requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1139:function(p,c){YUI.add("squarespace-models-instagram",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Instagram=a.Base.create("Instagram",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Instagram",validator:function(a){return"Instagram"===a},readOnly:!0},instagramId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},timeZone:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, imageLowResolutionUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},imageThumbnailUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},imageStandardUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},width:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},height:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},filter:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},userProfilePictureUrl:{value:null, validator:a.Squarespace.AttrValidators.isNullOrString},userAccountName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},userDisplayName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1140:function(p,c){YUI.add("squarespace-models-kb-article",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.KBArticle=a.Base.create("KBArticle",a.Squarespace.Models.StructuredContent, [],{},{ATTRS:{_type:{value:"KBArticle",validator:function(a){return"KBArticle"===a},readOnly:!0},upVotes:{value:0,validator:a.Squarespace.AttrValidators.isNumber},downVotes:{value:0,validator:a.Squarespace.AttrValidators.isNumber}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1141:function(p,c){YUI.add("squarespace-models-link",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Link=a.Base.create("Link",a.Squarespace.Models.StructuredContent, [],{},{ATTRS:{_type:{value:"Link",validator:function(a){return"Link"===a},readOnly:!0},url:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1143:function(p,c){YUI.add("squarespace-models-quote",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Quote=a.Base.create("Quote",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Quote",validator:function(a){return"Quote"=== a},readOnly:!0},quote:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1144:function(p,c,a){var n=a(1),l=a(126);YUI.add("squarespace-models-store-item",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.StoreItem=a.Base.create("StoreItem",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"StoreItem",validator:function(a){return"StoreItem"===a},readOnly:!0}, productType:{value:l.PHYSICAL,validator:a.Squarespace.AttrValidators.isValueIn(l)},priceCents:{value:0,validator:a.Squarespace.AttrValidators.isNumber},salePriceCents:{value:0,validator:a.Squarespace.AttrValidators.isNumber},onSale:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},variants:{value:[],validator:a.Squarespace.AttrValidators.isArray},originalVariants:{value:[],validator:a.Squarespace.AttrValidators.isArray},variantOptionOrdering:{value:[],validator:a.Squarespace.AttrValidators.isArray}, additionalFieldsFormId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},customAddButtonText:{value:n("Add to Cart"),validator:a.Squarespace.AttrValidators.isString},useCustomAddButtonText:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},additionalFieldsForm:{value:null}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1145:function(p,c){YUI.add("squarespace-models-structured-content",function(a){a.namespace("Squarespace.Models"); a.Squarespace.Models.StructuredContent=a.Base.create("StructuredContent",a.Model,[],{},{ATTRS:{_type:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString,writeOnce:"initOnly"}}})},"1.0",{requires:["base","model","squarespace-attr-validators"]})},1146:function(p,c){YUI.add("squarespace-models-tweet",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Tweet=a.Base.create("Tweet",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Tweet",validator:function(a){return"Tweet"=== a},readOnly:!0},tweetId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},timeZone:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},accountId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},displayName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},accountName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},tweet:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},profileImageUrl:{value:null, validator:a.Squarespace.AttrValidators.isNullOrString},profileImageUrlHttps:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},userLocation:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},3399:function(p,c,a){var n=a(1);YUI.add("squarespace-simple-liking",function(a){var c=a.config.win.Static;a.Squarespace.SimpleLike={TEXT_LIKE_VERB_NONE:n("No Likes"),TEXT_LIKE_VERB_SINGULAR:"Like", TEXT_LIKE_VERB_PLURAL:"Likes",TEXT_LIKE_ACTIVATED:n("You like this"),TEXT_LIKE_SUGGEST:n("Click to like"),attached:!1,attach:function(){if(!this.attached){this.attached=!0;var e;try{localStorage&&((e=a.JSON.parse(localStorage.getItem("squarespace-likes")))||(e={}),localStorage.setItem("squarespace-likes",a.JSON.stringify(e)))}catch(m){e={}}this.eventHandlers=[];var d=a.delegate("click",function(c){c=c.currentTarget;var d=c.getAttribute("data-item-id");if(d){for(var g=0;5>g;++g)a.Squarespace.SimpleLike.burst(c); if(!c.hasClass("clicked")&&!c.hasClass("float")){g=parseInt(c.getAttribute("data-like-count"),10);c.setAttribute("data-like-count",g+1);a.Squarespace.SimpleLike.renderLikeCount(c);c.addClass("clicked");try{localStorage&&(e[d]=!0,localStorage.setItem("squarespace-likes",a.JSON.stringify(e)))}catch(m){console.warn("Unable to save like to local storage: ",m)}(new a.Squarespace.Models.ContentItem({id:d})).like(function(c,d){d.commited&&console.log("Like was counted!");a.Lang.isValue(c)&&c.crumbFail&& !a.Squarespace.Utils.areCookiesEnabled()&&alert(n("You need to enable cookies to be able to like something."))})}}},"body",".sqs-simple-like");this.eventHandlers.push(d);a.all(".sqs-simple-like").each(function(d){var m=d.getAttribute("data-item-id");m&&(c.SQUARESPACE_CONTEXT.websiteSettings.simpleLikingEnabled||d.remove(),e[m]&&d.addClass("clicked"),a.Squarespace.SimpleLike.renderLikeCount(d))})}},detach:function(){this.attached=!1;this.eventHandlers.forEach(function(a){a.detach()})},renderLikeCount:function(c){var g= c.getAttribute("data-item-id"),d=c.getAttribute("data-like-count");c=c.one(".like-count");g&&c&&(g="",g=0===d?a.Squarespace.SimpleLike.TEXT_LIKE_VERB_NONE:1==d?"1 "+a.Squarespace.SimpleLike.TEXT_LIKE_VERB_SINGULAR:d+" "+a.Squarespace.SimpleLike.TEXT_LIKE_VERB_PLURAL,c.setContent(g))},burst:function(c){var g=c.cloneNode(!0);g.one(".like-count")&&g.one(".like-count").remove();var d=c.one(".like-icon");if(!d||"none"===d.getStyle("display"))d=c;g.setStyles({position:"absolute",left:d.getX()+"px",top:d.getY()+ "px"});a.one(a.config.doc.body).append(g);c=new a.Anim({node:g,duration:2,easing:a.Easing.easeOut});c.set("to",{curve:a.Squarespace.SimpleLike.randomCurve(g)});c.on("end",function(){this.get("node").remove()});c.run();g.removeClass("clicked");g.addClass("float")},randomCurve:function(a){var c=[],d=Math.floor(2*Math.random())?1:-1,f=Math.floor(2*Math.random())?1:-1,g=a.getX();a=a.getY();for(var l=0;3>l;++l)g+=Math.floor(30*Math.random())*d,a+=Math.floor(30*Math.random())*f,c.push([g,a]);return c}}; a.config.win.Squarespace.onInitialize(a,function(){c.SQUARESPACE_CONTEXT.websiteSettings.simpleLikingEnabled&&a.Squarespace.SimpleLike.attach()});a.config.win.Squarespace.onDestroy(a,function(){!0===a.Squarespace.SimpleLike.attached&&a.Squarespace.SimpleLike.detach()})},"1.0",{requires:["anim","json","node","squarespace-models-content-item","squarespace-util"]})}});