!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).R={})}(this,(function(t){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return null!=t&&"object"===n(t)&&!0===t["@@functional/placeholder"]}function e(t){return function n(e){return 0===arguments.length||r(e)?n:t.apply(this,arguments)}}function u(t){return function n(u,i){switch(arguments.length){case 0:return n;case 1:return r(u)?n:e((function(n){return t(u,n)}));default:return r(u)&&r(i)?n:r(u)?e((function(n){return t(n,i)})):r(i)?e((function(n){return t(u,n)})):t(u,i)}}}var i=u((function(t,n){return+t+ +n}));function o(t,n){var r,e=(t=t||[]).length,u=(n=n||[]).length,i=[];for(r=0;r<e;)i[i.length]=t[r],r+=1;for(r=0;r<u;)i[i.length]=n[r],r+=1;return i}function c(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}}function a(t,n,e){return function(){for(var u=[],i=0,o=t,s=0;s<n.length||i<arguments.length;){var f;n.length<=s||r(n[s])&&i<arguments.length?(f=arguments[i],i+=1):f=n[s],r(u[s]=f)||(o-=1),s+=1}return 0<o?c(o,a(t,u,e)):e.apply(this,u)}}var s=u((function(t,n){return 1===t?e(n):c(t,a(t,[],n))})),f=e((function(t){return s(t.length,(function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)}))}));function l(t){return function n(i,o,c){switch(arguments.length){case 0:return n;case 1:return r(i)?n:u((function(n,r){return t(i,n,r)}));case 2:return r(i)&&r(o)?n:r(i)?u((function(n,r){return t(n,o,r)})):r(o)?u((function(n,r){return t(i,n,r)})):e((function(n){return t(i,o,n)}));default:return r(i)&&r(o)&&r(c)?n:r(i)&&r(o)?u((function(n,r){return t(n,r,c)})):r(i)&&r(c)?u((function(n,r){return t(n,o,r)})):r(o)&&r(c)?u((function(n,r){return t(i,n,r)})):r(i)?e((function(n){return t(n,o,c)})):r(o)?e((function(n){return t(i,n,c)})):r(c)?e((function(n){return t(i,o,n)})):t(i,o,c)}}}var p=l((function(t,n,r){var e=r.length;if(e<=t||t<-e)return r;var u=(e+t)%e,i=o(r);return i[u]=n(r[u]),i})),h=Array.isArray||function(t){return null!=t&&0<=t.length&&"[object Array]"===Object.prototype.toString.call(t)};function y(t){return null!=t&&"function"==typeof t["@@transducer/step"]}function d(t,n,r){return function(){if(0===arguments.length)return r();var e=arguments[arguments.length-1];if(!h(e)){for(var u=0;u<t.length;){if("function"==typeof e[t[u]])return e[t[u]].apply(e,Array.prototype.slice.call(arguments,0,-1));u+=1}if(y(e))return n.apply(null,Array.prototype.slice.call(arguments,0,-1))(e)}return r.apply(this,arguments)}}function g(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}var v={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}};function m(t,n){this.xf=n,this.f=t,this.all=!0}m.prototype["@@transducer/init"]=v.init,m.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},m.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=g(this.xf["@@transducer/step"](t,!1))),t};var b=u(d(["all"],u((function(t,n){return new m(t,n)})),(function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0}))),x=u((function(t,n){return t<n?n:t}));function w(t,n){for(var r=0,e=n.length,u=Array(e);r<e;)u[r]=t(n[r]),r+=1;return u}function j(t){return"[object String]"===Object.prototype.toString.call(t)}var A=e((function(t){return!!h(t)||!!t&&"object"===n(t)&&!j(t)&&(0===t.length||0<t.length&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))}));function O(t){this.f=t}function S(t){return new O(t)}O.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},O.prototype["@@transducer/result"]=function(t){return t},O.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)};var E=u((function(t,n){return c(t.length,(function(){return t.apply(n,arguments)}))}));function _(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function I(t,n,r,e){return t["@@transducer/result"](r[e](E(t["@@transducer/step"],t),n))}var k="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function W(t,n,r){if("function"==typeof t&&(t=S(t)),A(r))return function(t,n,r){for(var e=0,u=r.length;e<u;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}(t,n,r);if("function"==typeof r["fantasy-land/reduce"])return I(t,n,r,"fantasy-land/reduce");if(null!=r[k])return _(t,n,r[k]());if("function"==typeof r.next)return _(t,n,r);if("function"==typeof r.reduce)return I(t,n,r,"reduce");throw new TypeError("reduce: list must be array or iterable")}function q(t,n){this.xf=n,this.f=t}q.prototype["@@transducer/init"]=v.init,q.prototype["@@transducer/result"]=v.result,q.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))};var N=u((function(t,n){return new q(t,n)}));function U(t,n){return Object.prototype.hasOwnProperty.call(n,t)}function F(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1}var P=Object.prototype.toString,B=function(){return"[object Arguments]"===P.call(arguments)?function(t){return"[object Arguments]"===P.call(t)}:function(t){return U("callee",t)}}(),C=!{toString:null}.propertyIsEnumerable("toString"),T=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],R=function(){return arguments.propertyIsEnumerable("length")}(),D=e("function"!=typeof Object.keys||R?function(t){if(Object(t)!==t)return[];var n,r,e=[],u=R&&B(t);for(n in t)!U(n,t)||u&&"length"===n||(e[e.length]=n);if(C)for(r=T.length-1;0<=r;)U(n=T[r],t)&&!F(e,n)&&(e[e.length]=n),r-=1;return e}:function(t){return Object(t)!==t?[]:Object.keys(t)}),z=u(d(["fantasy-land/map","map"],N,(function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return s(n.length,(function(){return t.call(this,n.apply(this,arguments))}));case"[object Object]":return W((function(r,e){return r[e]=t(n[e]),r}),{},D(n));default:return w(t,n)}}))),M=Number.isInteger||function(t){return(t|0)===t},L=u((function(t,n){var r=t<0?n.length+t:t;return j(n)?n[0|r]:n[r]})),V=u((function(t,n){if(null!=n)return M(t)?L(t,n):n[t]})),G=u((function(t,n){return z(V(t),n)})),K=l(W),$=e((function(t){return s(K(x,0,G("length",t)),(function(){for(var n=0,r=t.length;n<r;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0}))})),H=e((function(t){return function(){return t}})),J=u((function(t,n){return t&&n}));function X(t,n){this.xf=n,this.f=t,this.any=!1}X.prototype["@@transducer/init"]=v.init,X.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},X.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=g(this.xf["@@transducer/step"](t,!0))),t};var Y=u(d(["any"],u((function(t,n){return new X(t,n)})),(function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1}))),Z=e((function(t){return s(K(x,0,G("length",t)),(function(){for(var n=0,r=t.length;n<r;){if(t[n].apply(this,arguments))return!0;n+=1}return!1}))})),Q=u((function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:W((function(t,r){return o(t,z(r,n))}),[],t)}));function tt(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=Array(t)}tt.prototype["@@transducer/init"]=v.init,tt.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},tt.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},tt.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},tt.prototype.getCopy=function(){return o(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))};var nt=u(d([],u((function(t,n){return new tt(t,n)})),(function(t,n){for(var r=0,e=n.length-(t-1),u=Array(e<0?0:e);r<e;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u}))),rt=u((function(t,n){return o(n,[t])})),et=u((function(t,n){return t.apply(this,n)})),ut=e((function(t){for(var n=D(t),r=n.length,e=[],u=0;u<r;)e[u]=t[n[u]],u+=1;return e}));function it(t,n){return h(n)?n.map(t):D(n).reduce((function(r,e){return r[e]=t(n[e]),r}),{})}var ot=e((function t(n){return n=it((function(n){return"function"==typeof n?n:t(n)}),n),s(K(x,0,G("length",ut(n))),(function(){var t=arguments;return it((function(n){return et(n,t)}),n)}))})),ct=u((function(t,n){return n(t)})),at=l((function(t,n,r){var e=t(n),u=t(r);return e<u?-1:u<e?1:0}));function st(t,n,r){if(M(t)&&h(r)){var e=[].concat(r);return e[t]=n,e}var u={};for(var i in r)u[i]=r[i];return u[t]=n,u}var ft=e((function(t){return null==t})),lt=l((function t(n,r,e){if(0===n.length)return r;var u=n[0];if(1<n.length){var i=!ft(e)&&U(u,e)?e[u]:M(n[1])?[]:{};r=t(Array.prototype.slice.call(n,1),r,i)}return st(u,r,e)})),pt=l((function(t,n,r){return lt([t],n,r)})),ht=u((function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.call(this,t,r,e,u,i,o,c,a,s)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.call(this,t,r,e,u,i,o,c,a,s,f)};default:throw Error("First argument to nAry must be a non-negative integer no greater than ten")}})),yt=e((function(t){return ht(2,t)}));function dt(t){var n=Object.prototype.toString.call(t);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n}var gt=u((function(t,n){var r=s(t,n);return s(t,(function(){return W(Q,z(r,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),vt=e((function(t){return gt(t.length,t)})),mt=u((function(t,n){return dt(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:vt(J)(t,n)})),bt=e((function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}));function xt(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;c<a;){if(A(r[c]))for(i=0,u=(e=t?n(r[c]):r[c]).length;i<u;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}}var wt=u(d(["fantasy-land/chain","chain"],u((function(t,n){return z(t,function(t){var n=function(t){return{"@@transducer/init":v.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}}(e):e}}}(t);return{"@@transducer/init":v.init,"@@transducer/result":function(t){return n["@@transducer/result"](t)},"@@transducer/step":function(t,r){return A(r)?W(n,t,r):W(n,t,[r])}}}(n))})),(function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:xt(!1)(z(t,n))}))),jt=l((function(t,n,r){if(n<t)throw Error("min must not be greater than max in clamp(min, max, value)");return r<t?t:n<r?n:r}));function At(t){return RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))}var Ot=e((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function St(t,n,r,e){function u(u){for(var i=n.length,o=0;o<i;){if(t===n[o])return r[o];o+=1}for(var c in n[o]=t,r[o]=u,t)t.hasOwnProperty(c)&&(u[c]=e?St(t[c],n,r,!0):t[c]);return u}switch(Ot(t)){case"Object":return u(Object.create(Object.getPrototypeOf(t)));case"Array":return u([]);case"Date":return new Date(t.valueOf());case"RegExp":return At(t);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}var Et=e((function(t){return null!=t&&"function"==typeof t.clone?t.clone():St(t,[],[],!0)})),_t=u((function(t,n){var r=W((function(n,r){var e=t(r);return void 0===n[e]&&(n[e]=[]),n[e].push(r),n}),{},n),e=[];for(var u in r)e.push(r[u]);return e})),It=e((function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}})),kt=e((function(t){return!t})),Wt=vt(kt);function qt(t,n){return function(){return n.call(this,t.apply(this,arguments))}}function Nt(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return h(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}}var Ut=l(Nt("slice",(function(t,n,r){return Array.prototype.slice.call(r,t,n)}))),Ft=e(Nt("tail",Ut(1,1/0)));function Pt(){if(0===arguments.length)throw Error("pipe requires at least one argument");return c(arguments[0].length,K(qt,arguments[0],Ft(arguments)))}var Bt=e((function(t){return j(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}));function Ct(){if(0===arguments.length)throw Error("compose requires at least one argument");return Pt.apply(this,Bt(arguments))}var Tt=L(0);function Rt(t){return t}var Dt=e(Rt),zt=u((function(t,n){if(n.length<=0)return Dt;var r=Tt(n),e=Ft(n);return c(r.length,(function(){return W((function(n,r){return t.call(this,r,n)}),r.apply(this,arguments),e)}))})),Mt=u((function(t,n){return zt.call(this,t,Bt(n))}));function Lt(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function Vt(t,n,r){for(var e=0,u=r.length;e<u;){if(t(n,r[e]))return!0;e+=1}return!1}var Gt="function"==typeof Object.is?Object.is:function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n};function Kt(t,n,r,e){var u=Lt(t);function i(t,n){return $t(t,n,r.slice(),e.slice())}return!Vt((function(t,n){return!Vt(i,n,t)}),Lt(n),u)}function $t(t,r,e,u){if(Gt(t,r))return!0;var i=Ot(t);if(i!==Ot(r))return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof r["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](r)&&"function"==typeof r["fantasy-land/equals"]&&r["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof r.equals)return"function"==typeof t.equals&&t.equals(r)&&"function"==typeof r.equals&&r.equals(t);switch(i){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===function(t){var n=(t+"").match(/^function (\w*)/);return null==n?"":n[1]}(t.constructor))return t===r;break;case"Boolean":case"Number":case"String":if(n(t)!==n(r)||!Gt(t.valueOf(),r.valueOf()))return!1;break;case"Date":if(!Gt(t.valueOf(),r.valueOf()))return!1;break;case"Error":return t.name===r.name&&t.message===r.message;case"RegExp":if(t.source!==r.source||t.global!==r.global||t.ignoreCase!==r.ignoreCase||t.multiline!==r.multiline||t.sticky!==r.sticky||t.unicode!==r.unicode)return!1}for(var o=e.length-1;0<=o;){if(e[o]===t)return u[o]===r;o-=1}switch(i){case"Map":return t.size===r.size&&Kt(t.entries(),r.entries(),e.concat([t]),u.concat([r]));case"Set":return t.size===r.size&&Kt(t.values(),r.values(),e.concat([t]),u.concat([r]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=D(t);if(c.length!==D(r).length)return!1;var a=e.concat([t]),s=u.concat([r]);for(o=c.length-1;0<=o;){var f=c[o];if(!U(f,r)||!$t(r[f],t[f],a,s))return!1;o-=1}return!0}var Ht=u((function(t,n){return $t(t,n,[],[])}));function Jt(t,r,e){var u,i;if("function"==typeof t.indexOf)switch(n(r)){case"number":if(0===r){for(u=1/r;e<t.length;){if(0===(i=t[e])&&1/i==u)return e;e+=1}return-1}if(r==r)return t.indexOf(r,e);for(;e<t.length;){if("number"==typeof(i=t[e])&&i!=i)return e;e+=1}return-1;case"string":case"boolean":case"function":case"undefined":return t.indexOf(r,e);case"object":if(null===r)return t.indexOf(r,e)}for(;e<t.length;){if(Ht(t[e],r))return e;e+=1}return-1}function Xt(t,n){return 0<=Jt(n,t,0)}function Yt(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}function Zt(t){return(t<10?"0":"")+t}var Qt="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Zt(1+t.getUTCMonth())+"-"+Zt(t.getUTCDate())+"T"+Zt(t.getUTCHours())+":"+Zt(t.getUTCMinutes())+":"+Zt(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function tn(t){return function(){return!t.apply(this,arguments)}}function nn(t,n){for(var r=0,e=n.length,u=[];r<e;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u}function rn(t){return"[object Object]"===Object.prototype.toString.call(t)}function en(t,n){this.xf=n,this.f=t}en.prototype["@@transducer/init"]=v.init,en.prototype["@@transducer/result"]=v.result,en.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t};var un=u(d(["fantasy-land/filter","filter"],u((function(t,n){return new en(t,n)})),(function(t,n){return rn(n)?W((function(r,e){return t(n[e])&&(r[e]=n[e]),r}),{},D(n)):nn(t,n)}))),on=u((function(t,n){return un(tn(t),n)}));function cn(t,r){function e(n){var e=r.concat([t]);return Xt(n,e)?"<Circular>":cn(n,e)}function u(t,n){return w((function(n){return Yt(n)+": "+e(t[n])}),n.slice().sort())}switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function(){ return arguments; }("+w(e,t).join(", ")+"))";case"[object Array]":return"["+w(e,t).concat(u(t,on((function(t){return/^\d+$/.test(t)}),D(t)))).join(", ")+"]";case"[object Boolean]":return"object"===n(t)?"new Boolean("+e(t.valueOf())+")":""+t;case"[object Date]":return"new Date("+(isNaN(t.valueOf())?e(NaN):Yt(Qt(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"===n(t)?"new Number("+e(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object String]":return"object"===n(t)?"new String("+e(t.valueOf())+")":Yt(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var i=""+t;if("[object Object]"!=i)return i}return"{"+u(t,D(t)).join(", ")+"}"}}var an=e((function(t){return cn(t,[])})),sn=u((function(t,n){if(h(t)){if(h(n))return t.concat(n);throw new TypeError(an(n)+" is not an array")}if(j(t)){if(j(n))return t+n;throw new TypeError(an(n)+" is not a string")}if(null!=t&&dt(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&dt(t.concat))return t.concat(n);throw new TypeError(an(t)+' does not have a method named "concat" or "fantasy-land/concat"')})),fn=e((function(t){return c(K(x,0,z((function(t){return t[0].length}),t)),(function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}}))})),ln=e((function(t){return s(t.length,t)})),pn=u((function(t,n){if(10<t)throw Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:ln(ht(t,(function(t,r,e,u,i,o,c,a,s,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,s);case 10:return new n(t,r,e,u,i,o,c,a,s,f)}})))})),hn=e((function(t){return pn(t.length,t)})),yn=u((function(t,n){return s(K(x,0,G("length",n)),(function(){var r=arguments,e=this;return t.apply(e,w((function(t){return t.apply(e,r)}),n))}))})),dn=ln((function(t,n){return W((function(n,r){return t(r)?n+1:n}),0,n)}));function gn(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}gn.prototype["@@transducer/init"]=v.init,gn.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(U(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},gn.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t};var vn=a(4,[],d([],a(4,[],(function(t,n,r,e){return new gn(t,n,r,e)})),(function(t,n,r,e){return W((function(e,u){var i=r(u),o=t(U(i,e)?e[i]:St(n,[],[],!1),u);return o&&o["@@transducer/reduced"]?g(e):(e[i]=o,e)}),{},e)}))),mn=vn((function(t,n){return t+1}),0),bn=i(-1),xn=u((function(t,n){return null==n||n!=n?t:n})),wn=l((function(t,n,r){var e=t(n),u=t(r);return u<e?-1:e<u?1:0}));function jn(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function An(t,r,e){var u,i=n(t);switch(i){case"string":case"number":return 0===t&&1/t==-1/0?!!e._items["-0"]||(r&&(e._items["-0"]=!0),!1):null!==e._nativeSet?r?(u=e._nativeSet.size,e._nativeSet.add(t),e._nativeSet.size===u):e._nativeSet.has(t):i in e._items?t in e._items[i]||(r&&(e._items[i][t]=!0),!1):(r&&(e._items[i]={},e._items[i][t]=!0),!1);case"boolean":if(i in e._items){var o=t?1:0;return!!e._items[i][o]||(r&&(e._items[i][o]=!0),!1)}return r&&(e._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==e._nativeSet?r?(u=e._nativeSet.size,e._nativeSet.add(t),e._nativeSet.size===u):e._nativeSet.has(t):i in e._items?!!Xt(t,e._items[i])||(r&&e._items[i].push(t),!1):(r&&(e._items[i]=[t]),!1);case"undefined":return!!e._items[i]||(r&&(e._items[i]=!0),!1);case"object":if(null===t)return!!e._items.null||(r&&(e._items.null=!0),!1);default:return(i=Object.prototype.toString.call(t))in e._items?!!Xt(t,e._items[i])||(r&&e._items[i].push(t),!1):(r&&(e._items[i]=[t]),!1)}}jn.prototype.add=function(t){return!An(t,!0,this)},jn.prototype.has=function(t){return An(t,!1,this)};var On=u((function(t,n){for(var r=[],e=0,u=t.length,i=n.length,o=new jn,c=0;c<i;c+=1)o.add(n[c]);for(;e<u;)o.add(t[e])&&(r[r.length]=t[e]),e+=1;return r})),Sn=l((function(t,n,r){for(var e=[],u=0,i=n.length;u<i;)Vt(t,n[u],r)||Vt(t,n[u],e)||e.push(n[u]),u+=1;return e})),En=l((function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e})),_n=u((function t(n,r){if(null==r)return r;switch(n.length){case 0:return r;case 1:return function(t,n){if(null==n)return n;if(M(t)&&h(n))return En(t,1,n);var r={};for(var e in n)r[e]=n[e];return delete r[t],r}(n[0],r);default:var e=n[0],u=Array.prototype.slice.call(n,1);return null==r[e]?function(t,n){if(M(t)&&h(n))return[].concat(n);var r={};for(var e in n)r[e]=n[e];return r}(e,r):pt(e,t(u,r[e]),r)}})),In=u((function(t,n){return _n([t],n)})),kn=u((function(t,n){return t/n}));function Wn(t,n){this.xf=n,this.n=t}Wn.prototype["@@transducer/init"]=v.init,Wn.prototype["@@transducer/result"]=v.result,Wn.prototype["@@transducer/step"]=function(t,n){return 0<this.n?(this.n-=1,t):this.xf["@@transducer/step"](t,n)};var qn=u(d(["drop"],u((function(t,n){return new Wn(t,n)})),(function(t,n){return Ut(Math.max(0,t),1/0,n)})));function Nn(t,n){this.xf=n,this.n=t,this.i=0}Nn.prototype["@@transducer/init"]=v.init,Nn.prototype["@@transducer/result"]=v.result,Nn.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.n<0||this.i<this.n?r:g(r)};var Un=u(d(["take"],u((function(t,n){return new Nn(t,n)})),(function(t,n){return Ut(0,t<0?1/0:t,n)})));function Fn(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=Array(t)}Fn.prototype["@@transducer/init"]=v.init,Fn.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},Fn.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},Fn.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)};var Pn=u(d([],u((function(t,n){return new Fn(t,n)})),(function(t,n){return Un(t<n.length?n.length-t:0,n)})));function Bn(t,n){this.f=t,this.retained=[],this.xf=n}Bn.prototype["@@transducer/init"]=v.init,Bn.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},Bn.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},Bn.prototype.flush=function(t,n){return t=W(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},Bn.prototype.retain=function(t,n){return this.retained.push(n),t};var Cn=u(d([],u((function(t,n){return new Bn(t,n)})),(function(t,n){for(var r=n.length-1;0<=r&&t(n[r]);)r-=1;return Ut(0,r+1,n)})));function Tn(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}Tn.prototype["@@transducer/init"]=v.init,Tn.prototype["@@transducer/result"]=v.result,Tn.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)};var Rn=u((function(t,n){return new Tn(t,n)})),Dn=L(-1),zn=u(d([],Rn,(function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];e<u;)t(Dn(r),n[e])||(r[r.length]=n[e]),e+=1;return r}))),Mn=e(d([],Rn(Ht),zn(Ht)));function Ln(t,n){this.xf=n,this.f=t}Ln.prototype["@@transducer/init"]=v.init,Ln.prototype["@@transducer/result"]=v.result,Ln.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)};var Vn=u(d(["dropWhile"],u((function(t,n){return new Ln(t,n)})),(function(t,n){for(var r=0,e=n.length;r<e&&t(n[r]);)r+=1;return Ut(r,1/0,n)}))),Gn=u((function(t,n){return t||n})),Kn=u((function(t,n){return dt(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:vt(Gn)(t,n)})),$n=e((function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():h(t)?[]:j(t)?"":rn(t)?{}:B(t)?function(){return arguments}():function(t){var n=Object.prototype.toString.call(t);return"[object Uint8ClampedArray]"===n||"[object Int8Array]"===n||"[object Uint8Array]"===n||"[object Int16Array]"===n||"[object Uint16Array]"===n||"[object Int32Array]"===n||"[object Uint32Array]"===n||"[object Float32Array]"===n||"[object Float64Array]"===n||"[object BigInt64Array]"===n||"[object BigUint64Array]"===n}(t)?t.constructor.from(""):void 0})),Hn=u((function(t,n){return qn(t<0?0:n.length-t,n)})),Jn=u((function(t,n){return Ht(Hn(t.length,n),t)})),Xn=l((function(t,n,r){return Ht(t(n),t(r))})),Yn=l((function(t,n,r){return Ht(n[t],r[t])})),Zn=u((function t(r,e){if(!rn(e)&&!h(e))return e;var u,i,o,c=e instanceof Array?[]:{};for(i in e)o=n(u=r[i]),c[i]="function"===o?u(e[i]):u&&"object"===o?t(u,e[i]):e[i];return c}));function Qn(t,n){this.xf=n,this.f=t,this.found=!1}Qn.prototype["@@transducer/init"]=v.init,Qn.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},Qn.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=g(this.xf["@@transducer/step"](t,n))),t};var tr=u(d(["find"],u((function(t,n){return new Qn(t,n)})),(function(t,n){for(var r=0,e=n.length;r<e;){if(t(n[r]))return n[r];r+=1}})));function nr(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}nr.prototype["@@transducer/init"]=v.init,nr.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},nr.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=g(this.xf["@@transducer/step"](t,this.idx))),t};var rr=u(d([],u((function(t,n){return new nr(t,n)})),(function(t,n){for(var r=0,e=n.length;r<e;){if(t(n[r]))return r;r+=1}return-1})));function er(t,n){this.xf=n,this.f=t}er.prototype["@@transducer/init"]=v.init,er.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},er.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t};var ur=u(d([],u((function(t,n){return new er(t,n)})),(function(t,n){for(var r=n.length-1;0<=r;){if(t(n[r]))return n[r];r-=1}})));function ir(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}ir.prototype["@@transducer/init"]=v.init,ir.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},ir.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t};var or=u(d([],u((function(t,n){return new ir(t,n)})),(function(t,n){for(var r=n.length-1;0<=r;){if(t(n[r]))return r;r-=1}return-1}))),cr=e(xt(!0)),ar=e((function(t){return s(t.length,(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)}))})),sr=u(Nt("forEach",(function(t,n){for(var r=n.length,e=0;e<r;)t(n[e]),e+=1;return n}))),fr=u((function(t,n){for(var r=D(n),e=0;e<r.length;){var u=r[e];t(n[u],u,n),e+=1}return n})),lr=e((function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n})),pr=u(Nt("groupBy",vn((function(t,n){return t.push(n),t}),[]))),hr=u((function(t,n){for(var r=[],e=0,u=n.length;e<u;){for(var i=e+1;i<u&&t(n[i-1],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r})),yr=u((function(t,n){return n<t})),dr=u((function(t,n){return n<=t})),gr=u((function(t,n){if(0===t.length||ft(n))return!1;for(var r=n,e=0;e<t.length;){if(ft(r)||!U(t[e],r))return!1;r=r[t[e]],e+=1}return!0})),vr=u((function(t,n){return gr([t],n)})),mr=u((function(t,n){return!ft(n)&&t in n})),br=u(Gt),xr=l((function(t,n,r){return s(Math.max(t.length,n.length,r.length),(function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)}))})),wr=i(1),jr=u(Xt),Ar=vn((function(t,n){return n}),null),Or=u((function(t,n){return"function"!=typeof n.indexOf||h(n)?Jt(n,t,0):n.indexOf(t)})),Sr=Ut(0,-1),Er=l((function(t,n,r){return nn((function(n){return Vt(t,n,r)}),n)})),_r=l((function(t,n,r){t=t<r.length&&0<=t?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e})),Ir=l((function(t,n,r){return[].concat(Array.prototype.slice.call(r,0,t=t<r.length&&0<=t?t:r.length),n,Array.prototype.slice.call(r,t))}));function kr(t,n){this.xf=n,this.f=t,this.set=new jn}kr.prototype["@@transducer/init"]=v.init,kr.prototype["@@transducer/result"]=v.result,kr.prototype["@@transducer/step"]=function(t,n){return this.set.add(this.f(n))?this.xf["@@transducer/step"](t,n):t};var Wr=u(d([],u((function(t,n){return new kr(t,n)})),(function(t,n){for(var r,e,u=new jn,i=[],o=0;o<n.length;)r=t(e=n[o]),u.add(r)&&i.push(e),o+=1;return i}))),qr=Wr(Dt),Nr=u((function(t,n){var r,e;return e=n.length<t.length?(r=t,n):(r=n,t),qr(nn(ar(Xt)(r),e))})),Ur=u(Nt("intersperse",(function(t,n){for(var r=[],e=0,u=n.length;e<u;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r}))),Fr="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;r<e;){var u=arguments[r];if(null!=u)for(var i in u)U(i,u)&&(n[i]=u[i]);r+=1}return n},Pr=u((function(t,n){var r={};return r[t]=n,r})),Br={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":Rt},Cr={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":Rt},Tr={"@@transducer/init":Object,"@@transducer/step":function(t,n){return Fr(t,A(n)?Pr(n[0],n[1]):n)},"@@transducer/result":Rt},Rr=l((function(t,r,e){return y(t)?W(r(t),t["@@transducer/init"](),e):W(r(function(t){if(y(t))return t;if(A(t))return Br;if("string"==typeof t)return Cr;if("object"===n(t))return Tr;throw Error("Cannot create transformer for "+t)}(t)),St(t,[],[],!1),e)})),Dr=e((function(t){for(var n=D(t),r=n.length,e=0,u={};e<r;){var i=n[e],o=t[i],c=U(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u})),zr=e((function(t){for(var n=D(t),r=n.length,e=0,u={};e<r;){var i=n[e];u[t[i]]=i,e+=1}return u})),Mr=u((function(t,n){return s(t+1,(function(){var r=arguments[t];if(null!=r&&dt(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(an(r)+' does not have a method named "'+n+'"')}))})),Lr=u((function(t,r){return r instanceof t||null!=r&&(r.constructor===t||"Object"===t.name&&"object"===n(r))})),Vr=e((function(t){return null!=t&&Ht(t,$n(t))})),Gr=Mr(1,"join"),Kr=e((function(t){return yn((function(){return Array.prototype.slice.call(arguments,0)}),t)})),$r=e((function(t){var n,r=[];for(n in t)r[r.length]=n;return r})),Hr=u((function(t,n){if("function"!=typeof n.lastIndexOf||h(n)){for(var r=n.length-1;0<=r;){if(Ht(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}));function Jr(t){return"[object Number]"===Object.prototype.toString.call(t)}var Xr=e((function(t){return null!=t&&Jr(t.length)?t.length:NaN})),Yr=u((function(t,n){return function(r){return function(e){return z((function(t){return n(t,e)}),r(t(e)))}}})),Zr=l((function(t,n,r){return p(t,H(n),r)})),Qr=e((function(t){return Yr(L(t),Zr(t))})),te=u((function(t,n){return t.map((function(t){for(var r,e=n,u=0;u<t.length;){if(null==e)return;e=M(r=t[u])?L(r,e):e[r],u+=1}return e}))})),ne=u((function(t,n){return te([t],n)[0]})),re=e((function(t){return Yr(ne(t),lt(t))})),ee=e((function(t){return Yr(V(t),pt(t))})),ue=u((function(t,n){return t<n})),ie=u((function(t,n){return t<=n})),oe=l((function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];e<u;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]})),ce=l((function(t,n,r){for(var e=r.length-1,u=[],i=[n];0<=e;)i=t(i[0],r[e]),u[e]=i[1],e-=1;return[i[0],u]})),ae=u((function(t,n){return W((function(r,e){return r[e]=t(n[e],e,n),r}),{},D(n))})),se=u((function(t,n){return n.match(t)||[]})),fe=u((function(t,n){return M(t)?!M(n)||n<1?NaN:(t%n+n)%n:NaN})),le=l((function(t,n,r){return t(r)>t(n)?r:n})),pe=K(i,0),he=e((function(t){return pe(t)/t.length})),ye=e((function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return he(Array.prototype.slice.call(t,0).sort((function(t,n){return t<n?-1:n<t?1:0})).slice(e,e+r))})),de=u((function(t,n){var r={};return c(n.length,(function(){var e=t.apply(this,arguments);return U(e,r)||(r[e]=n.apply(this,arguments)),r[e]}))})),ge=e((function(t){return Fr.apply(null,[{}].concat(t))})),ve=l((function(t,n,r){var e,u={};for(e in n)U(e,n)&&(u[e]=U(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)U(e,r)&&!U(e,u)&&(u[e]=r[e]);return u})),me=l((function t(n,r,e){return ve((function(r,e,u){return rn(e)&&rn(u)?t(n,e,u):n(r,e,u)}),r,e)})),be=u((function(t,n){return me((function(t,n,r){return n}),t,n)})),xe=u((function(t,n){return me((function(t,n,r){return r}),t,n)})),we=l((function(t,n,r){return me((function(n,r,e){return t(r,e)}),n,r)})),je=u((function(t,n){return Fr({},n,t)})),Ae=u((function(t,n){return Fr({},t,n)})),Oe=l((function(t,n,r){return ve((function(n,r,e){return t(r,e)}),n,r)})),Se=u((function(t,n){return n<t?n:t})),Ee=l((function(t,n,r){return t(r)<t(n)?r:n})),_e=l((function t(n,r,e){if(!rn(e)&&!h(e)||0===n.length)return e;var u=n[0];if(!U(u,e))return e;if(1===n.length)return function(t,n,r){if(M(t)&&h(r)){var e=[].concat(r);return e[t]=n(e[t]),e}var u={};for(var i in r)u[i]=r[i];return u[t]=n(u[t]),u}(u,r,e);var i=t(Array.prototype.slice.call(n,1),r,e[u]);return i===e[u]?e:st(u,i,e)})),Ie=l((function(t,n,r){return _e([t],n,r)})),ke=u((function(t,n){return t%n})),We=l((function(t,n,r){var e=r.length,u=r.slice(),i=t<0?e+t:t,o=n<0?e+n:n,c=u.splice(i,1);return i<0||r.length<=i||o<0||r.length<=o?r:[].concat(u.slice(0,o)).concat(c).concat(u.slice(o,r.length))})),qe=u((function(t,n){return t*n})),Ne=u((function(t,n){return function(r){return t.call(void 0,xe(n,r))}})),Ue=e((function(t){return-t})),Fe=u((function(t,n){return b(tn(t),n)})),Pe=e((function(t){return s(t<0?1:t+1,(function(){return L(t,arguments)}))})),Be=l((function(t,n,r){return t(n(r))})),Ce=e((function(t){return[t]})),Te=u((function(t,n){for(var r={},e={},u=0,i=t.length;u<i;)u+=e[t[u]]=1;for(var o in n)e.hasOwnProperty(o)||(r[o]=n[o]);return r})),Re=a(4,[],(function(t,n,r,e){return t(n(r),n(e))})),De=e((function(t){var n,r=!1;return c(t.length,(function(){return r?n:(r=!0,n=t.apply(this,arguments))}))}));function ze(t,n){if(null==n||!dt(n.then))throw new TypeError("`"+t+"` expected a Promise, received "+cn(n,[]))}var Me=u((function(t,n){return ze("otherwise",n),n.then(null,t)})),Le=l((function(t,n,r){return t((function(t){return function t(n){return{value:n,map:function(r){return t(r(n))}}}(n(t))}))(r).value})),Ve=u((function(t,n){return[t,n]}));function Ge(t){return u((function(n,r){return c(Math.max(0,n.length-r.length),(function(){return n.apply(this,t(r,arguments))}))}))}var Ke=Ge(o),$e=Ge(ar(o)),He=Kr([un,on]),Je=l((function(t,n,r){return Ht(ne(t,r),n)})),Xe=l((function(t,n,r){return xn(t,ne(n,r))})),Ye=l((function(t,n,r){return t(ne(n,r))})),Ze=u((function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r})),Qe=u((function(t,n){for(var r={},e=0,u=t.length;e<u;){var i=t[e];r[i]=n[i],e+=1}return r})),tu=u((function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r})),nu=u((function(t,n){return o([t],n)})),ru=K(qe,1),eu=u((function(t,n){return s(n.length,(function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))}))})),uu=eu(w,[Qe,Dt]);function iu(t,n,r){return function(e){return n(r(t(e)))}}function ou(t,n,r){this.xf=r,this.f=t,this.g=n}ou.prototype["@@transducer/init"]=v.init,ou.prototype["@@transducer/result"]=v.result,ou.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,iu(this.f,this.g,n))};var cu=l(d(["fantasy-land/promap","promap"],l((function(t,n,r){return new ou(t,n,r)})),iu)),au=l((function(t,n,r){return Ht(n,V(t,r))})),su=l((function(t,n,r){return Lr(t,V(n,r))})),fu=l((function(t,n,r){return xn(t,V(n,r))})),lu=l((function(t,n,r){return t(V(n,r))})),pu=u((function(t,n){return t.map((function(t){return ne([t],n)}))})),hu=u((function(t,n){if(!Jr(t)||!Jr(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;e<n;)r.push(e),e+=1;return r})),yu=l((function(t,n,r){for(var e=r.length-1;0<=e;){if((n=t(r[e],n))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e-=1}return n})),du=a(4,[],(function(t,n,r,e){return W((function(r,e){return t(r,e)?n(r,e):g(r)}),r,e)})),gu=e(g),vu=u((function(t,n){var r,e=+n,u=0;if(e<0||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=Array(e);u<e;)r[u]=t(u),u+=1;return r})),mu=u((function(t,n){return vu(H(t),n)})),bu=l((function(t,n,r){return r.replace(t,n)})),xu=l((function(t,n,r){for(var e=0,u=r.length,i=[n];e<u;)n=t(n,r[e]),i[e+1]=n,e+=1;return i})),wu=u((function(t,n){return"function"==typeof n.sequence?n.sequence(t):yu((function(t,n){return Q(z(nu,t),n)}),t([]),n)})),ju=l((function(t,n,r){return Le(t,H(n),r)})),Au=u((function(t,n){return Array.prototype.slice.call(n,0).sort(t)})),Ou=u((function(t,n){return Array.prototype.slice.call(n,0).sort((function(n,r){var e=t(n),u=t(r);return e<u?-1:u<e?1:0}))})),Su=u((function(t,n){return Array.prototype.slice.call(n,0).sort((function(n,r){for(var e=0,u=0;0===e&&u<t.length;)e=t[u](n,r),u+=1;return e}))})),Eu=Mr(1,"split"),_u=u((function(t,n){return[Ut(0,t,n),Ut(t,Xr(n),n)]})),Iu=u((function(t,n){if(t<=0)throw Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push(Ut(e,e+=t,n));return r})),ku=u((function(t,n){for(var r=0,e=n.length,u=[];r<e&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]})),Wu=a(2,[],(function(t,n){for(var r=[],e=[],u=0;u<n.length;u+=1)t(n[u])||e.push(n[u]),(u<n.length-1&&t(n[u+1])||u===n.length-1)&&0<e.length&&(r.push(e),e=[]);return r})),qu=u((function(t,n){return Ht(Un(t.length,n),t)})),Nu=u((function(t,n){return+t-+n})),Uu=u((function(t,n){return sn(On(t,n),On(n,t))})),Fu=l((function(t,n,r){return sn(Sn(t,n,r),Sn(t,r,n))})),Pu=u((function(t,n){for(var r=n.length-1;0<=r&&t(n[r]);)r-=1;return Ut(r+1,1/0,n)}));function Bu(t,n){this.xf=n,this.f=t}Bu.prototype["@@transducer/init"]=v.init,Bu.prototype["@@transducer/result"]=v.result,Bu.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):g(t)};var Cu=u(d(["takeWhile"],u((function(t,n){return new Bu(t,n)})),(function(t,n){for(var r=0,e=n.length;r<e&&t(n[r]);)r+=1;return Ut(0,r,n)})));function Tu(t,n){this.xf=n,this.f=t}Tu.prototype["@@transducer/init"]=v.init,Tu.prototype["@@transducer/result"]=v.result,Tu.prototype["@@transducer/step"]=function(t,n){return this.f(n),this.xf["@@transducer/step"](t,n)};var Ru=u(d([],u((function(t,n){return new Tu(t,n)})),(function(t,n){return t(n),n}))),Du=u((function(t,n){if(!function(t){return"[object RegExp]"===Object.prototype.toString.call(t)}(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+an(t));return At(t).test(n)})),zu=u((function(t,n){return ze("andThen",n),n.then(t)})),Mu=Mr(0,"toLowerCase"),Lu=e((function(t){var n=[];for(var r in t)U(r,t)&&(n[n.length]=[r,t[r]]);return n})),Vu=e((function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n})),Gu=Mr(0,"toUpperCase"),Ku=s(4,(function(t,n,r,e){return W(t("function"==typeof n?S(n):n),r,e)})),$u=e((function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)void 0===r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r})),Hu=l((function(t,n,r){return"function"==typeof r["fantasy-land/traverse"]?r["fantasy-land/traverse"](n,t):"function"==typeof r.traverse?r.traverse(n,t):wu(t,z(n,r))})),Ju="\t\n\v\f\r                　\u2028\u2029\ufeff",Xu="function"!=typeof String.prototype.trim||Ju.trim()?e((function(t){var n=RegExp("^["+Ju+"]["+Ju+"]*"),r=RegExp("["+Ju+"]["+Ju+"]*$");return t.replace(n,"").replace(r,"")})):e((function(t){return t.trim()})),Yu=u((function(t,n){return c(t.length,(function(){try{return t.apply(this,arguments)}catch(t){return n.apply(this,o([t],arguments))}}))})),Zu=e((function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}})),Qu=e((function(t){return ht(1,t)})),ti=u((function(t,n){return s(t,(function(){for(var r,e=1,u=n,i=0;e<=t&&"function"==typeof u;)u=u.apply(this,Array.prototype.slice.call(arguments,i,r=e===t?arguments.length:i+u.length)),e+=1,i=r;return u}))})),ni=u((function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e})),ri=u(Ct(qr,o));function ei(t,n){this.xf=n,this.pred=t,this.items=[]}function ui(t){return{value:t,"fantasy-land/map":function(){return this}}}ei.prototype["@@transducer/init"]=v.init,ei.prototype["@@transducer/result"]=v.result,ei.prototype["@@transducer/step"]=function(t,n){return Vt(this.pred,n,this.items)?t:(this.items.push(n),this.xf["@@transducer/step"](t,n))};var ii=u(d([],u((function(t,n){return new ei(t,n)})),(function(t,n){for(var r,e=0,u=n.length,i=[];e<u;)Vt(t,r=n[e],i)||(i[i.length]=r),e+=1;return i}))),oi=l((function(t,n,r){return ii(t,o(n,r))})),ci=l((function(t,n,r){return t(r)?r:n(r)})),ai=wt(Rt),si=l((function(t,n,r){for(var e=r;!t(e);)e=n(e);return e})),fi=u((function(t,n){return t in n&&h(n[t])?w((function(r){return st(t,r,n)}),n[t]):[n]})),li=e((function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r})),pi=u((function(t,n){return t(ui)(n).value})),hi=l((function(t,n,r){return t(r)?n(r):r})),yi=u((function(t,n){for(var r in t)if(U(r,t)&&!t[r](n[r]))return!1;return!0})),di=u((function(t,n){for(var r in t)if(U(r,t)&&t[r](n[r]))return!0;return!1})),gi=u((function(t,n){return yi(z(Ht,t),n)})),vi=u((function(t,n){return on(ar(Xt)(t),n)})),mi=u((function(t,n){return!!(!t^!n)})),bi=u((function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];e<u;){for(r=0;r<i;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o})),xi=u((function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);e<u;)r[e]=[t[e],n[e]],e+=1;return r})),wi=u((function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};r<e;)u[t[r]]=n[r],r+=1;return u})),ji=l((function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);u<i;)e[u]=t(n[u],r[u]),u+=1;return e})),Ai=e((function(t){return s(t.length,(function(){var n=arguments;return function(){return t.apply(this,n)}}))}));t.F=function(){return!1},t.T=function(){return!0},t.__={"@@functional/placeholder":!0},t.add=i,t.addIndex=f,t.adjust=p,t.all=b,t.allPass=$,t.always=H,t.and=J,t.andThen=zu,t.any=Y,t.anyPass=Z,t.ap=Q,t.aperture=nt,t.append=rt,t.apply=et,t.applySpec=ot,t.applyTo=ct,t.ascend=at,t.assoc=pt,t.assocPath=lt,t.binary=yt,t.bind=E,t.both=mt,t.call=bt,t.chain=wt,t.clamp=jt,t.clone=Et,t.collectBy=_t,t.comparator=It,t.complement=Wt,t.compose=Ct,t.composeWith=Mt,t.concat=sn,t.cond=fn,t.construct=hn,t.constructN=pn,t.converge=yn,t.count=dn,t.countBy=mn,t.curry=ln,t.curryN=s,t.dec=bn,t.defaultTo=xn,t.descend=wn,t.difference=On,t.differenceWith=Sn,t.dissoc=In,t.dissocPath=_n,t.divide=kn,t.drop=qn,t.dropLast=Pn,t.dropLastWhile=Cn,t.dropRepeats=Mn,t.dropRepeatsWith=zn,t.dropWhile=Vn,t.either=Kn,t.empty=$n,t.endsWith=Jn,t.eqBy=Xn,t.eqProps=Yn,t.equals=Ht,t.evolve=Zn,t.filter=un,t.find=tr,t.findIndex=rr,t.findLast=ur,t.findLastIndex=or,t.flatten=cr,t.flip=ar,t.forEach=sr,t.forEachObjIndexed=fr,t.fromPairs=lr,t.groupBy=pr,t.groupWith=hr,t.gt=yr,t.gte=dr,t.has=vr,t.hasIn=mr,t.hasPath=gr,t.head=Tt,t.identical=br,t.identity=Dt,t.ifElse=xr,t.inc=wr,t.includes=jr,t.indexBy=Ar,t.indexOf=Or,t.init=Sr,t.innerJoin=Er,t.insert=_r,t.insertAll=Ir,t.intersection=Nr,t.intersperse=Ur,t.into=Rr,t.invert=Dr,t.invertObj=zr,t.invoker=Mr,t.is=Lr,t.isEmpty=Vr,t.isNil=ft,t.join=Gr,t.juxt=Kr,t.keys=D,t.keysIn=$r,t.last=Dn,t.lastIndexOf=Hr,t.length=Xr,t.lens=Yr,t.lensIndex=Qr,t.lensPath=re,t.lensProp=ee,t.lift=vt,t.liftN=gt,t.lt=ue,t.lte=ie,t.map=z,t.mapAccum=oe,t.mapAccumRight=ce,t.mapObjIndexed=ae,t.match=se,t.mathMod=fe,t.max=x,t.maxBy=le,t.mean=he,t.median=ye,t.memoizeWith=de,t.mergeAll=ge,t.mergeDeepLeft=be,t.mergeDeepRight=xe,t.mergeDeepWith=we,t.mergeDeepWithKey=me,t.mergeLeft=je,t.mergeRight=Ae,t.mergeWith=Oe,t.mergeWithKey=ve,t.min=Se,t.minBy=Ee,t.modify=Ie,t.modifyPath=_e,t.modulo=ke,t.move=We,t.multiply=qe,t.nAry=ht,t.negate=Ue,t.none=Fe,t.not=kt,t.nth=L,t.nthArg=Pe,t.o=Be,t.objOf=Pr,t.of=Ce,t.omit=Te,t.on=Re,t.once=De,t.or=Gn,t.otherwise=Me,t.over=Le,t.pair=Ve,t.partial=Ke,t.partialObject=Ne,t.partialRight=$e,t.partition=He,t.path=ne,t.pathEq=Je,t.pathOr=Xe,t.pathSatisfies=Ye,t.paths=te,t.pick=Ze,t.pickAll=Qe,t.pickBy=tu,t.pipe=Pt,t.pipeWith=zt,t.pluck=G,t.prepend=nu,t.product=ru,t.project=uu,t.promap=cu,t.prop=V,t.propEq=au,t.propIs=su,t.propOr=fu,t.propSatisfies=lu,t.props=pu,t.range=hu,t.reduce=K,t.reduceBy=vn,t.reduceRight=yu,t.reduceWhile=du,t.reduced=gu,t.reject=on,t.remove=En,t.repeat=mu,t.replace=bu,t.reverse=Bt,t.scan=xu,t.sequence=wu,t.set=ju,t.slice=Ut,t.sort=Au,t.sortBy=Ou,t.sortWith=Su,t.split=Eu,t.splitAt=_u,t.splitEvery=Iu,t.splitWhen=ku,t.splitWhenever=Wu,t.startsWith=qu,t.subtract=Nu,t.sum=pe,t.symmetricDifference=Uu,t.symmetricDifferenceWith=Fu,t.tail=Ft,t.take=Un,t.takeLast=Hn,t.takeLastWhile=Pu,t.takeWhile=Cu,t.tap=Ru,t.test=Du,t.thunkify=Ai,t.times=vu,t.toLower=Mu,t.toPairs=Lu,t.toPairsIn=Vu,t.toString=an,t.toUpper=Gu,t.transduce=Ku,t.transpose=$u,t.traverse=Hu,t.trim=Xu,t.tryCatch=Yu,t.type=Ot,t.unapply=Zu,t.unary=Qu,t.uncurryN=ti,t.unfold=ni,t.union=ri,t.unionWith=oi,t.uniq=qr,t.uniqBy=Wr,t.uniqWith=ii,t.unless=ci,t.unnest=ai,t.until=si,t.unwind=fi,t.update=Zr,t.useWith=eu,t.values=ut,t.valuesIn=li,t.view=pi,t.when=hi,t.where=yi,t.whereAny=di,t.whereEq=gi,t.without=vi,t.xor=mi,t.xprod=bi,t.zip=xi,t.zipObj=wi,t.zipWith=ji,Object.defineProperty(t,"__esModule",{value:!0})}));
(()=>{"use strict";var e={669:e=>{e.exports=jQuery}},t={};function a(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,a),o.exports}(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var a=function(t,a){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,a||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===a?String:Number)(t)}(t,"string");return"symbol"==e(a)?a:a+""}function i(e,a,i){return(a=t(a))in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function o(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function l(e){return function t(a){return 0===arguments.length||r(a)?t:e.apply(this,arguments)}}function s(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var c=Object.prototype.toString;const d=function(){return"[object Arguments]"===c.call(arguments)?function(e){return"[object Arguments]"===c.call(e)}:function(e){return s("callee",e)}}(),u=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function p(e){return"[object String]"===Object.prototype.toString.call(e)}var f=l((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():u(e)?[]:p(e)?"":function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)?{}:d(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0}));const m=f;function g(e){return function t(a,i){switch(arguments.length){case 0:return t;case 1:return r(a)?t:l((function(t){return e(a,t)}));default:return r(a)&&r(i)?t:r(a)?l((function(t){return e(t,i)})):r(i)?l((function(t){return e(a,t)})):e(a,i)}}}function h(e){for(var t,a=[];!(t=e.next()).done;)a.push(t.value);return a}function v(e,t,a){for(var i=0,n=a.length;i<n;){if(e(t,a[i]))return!0;i+=1}return!1}const b="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var y=!{toString:null}.propertyIsEnumerable("toString"),w=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=function(){return arguments.propertyIsEnumerable("length")}(),C=function(e,t){for(var a=0;a<e.length;){if(e[a]===t)return!0;a+=1}return!1};const E="function"!=typeof Object.keys||x?l((function(e){if(Object(e)!==e)return[];var t,a,i=[],n=x&&d(e);for(t in e)!s(t,e)||n&&"length"===t||(i[i.length]=t);if(y)for(a=w.length-1;a>=0;)s(t=w[a],e)&&!C(i,t)&&(i[i.length]=t),a-=1;return i})):l((function(e){return Object(e)!==e?[]:Object.keys(e)}));const k=l((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function S(e,t,a,i){var n=h(e);function o(e,t){return j(e,t,a.slice(),i.slice())}return!v((function(e,t){return!v(o,t,e)}),h(t),n)}function j(e,t,a,i){if(b(e,t))return!0;var n=k(e);if(n!==k(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(n){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!b(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!b(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var o=a.length-1;o>=0;){if(a[o]===e)return i[o]===t;o-=1}switch(n){case"Map":return e.size===t.size&&S(e.entries(),t.entries(),a.concat([e]),i.concat([t]));case"Set":return e.size===t.size&&S(e.values(),t.values(),a.concat([e]),i.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var r=E(e);if(r.length!==E(t).length)return!1;var l=a.concat([e]),c=i.concat([t]);for(o=r.length-1;o>=0;){var d=r[o];if(!s(d,t)||!j(t[d],e[d],l,c))return!1;o-=1}return!0}const I=g((function(e,t){return j(e,t,[],[])}));const T=l((function(e){return null!=e&&I(e,m(e))}));const D=l((function(e){return null==e}));const P=g((function(e,t){var a=e<0?t.length+e:e;return p(t)?t.charAt(a):t[a]}));const M=P(0);const F=g((function(e,t){return t.match(e)||[]}));function U(e){return function t(a,i,n){switch(arguments.length){case 0:return t;case 1:return r(a)?t:g((function(t,i){return e(a,t,i)}));case 2:return r(a)&&r(i)?t:r(a)?g((function(t,a){return e(t,i,a)})):r(i)?g((function(t,i){return e(a,t,i)})):l((function(t){return e(a,i,t)}));default:return r(a)&&r(i)&&r(n)?t:r(a)&&r(i)?g((function(t,a){return e(t,a,n)})):r(a)&&r(n)?g((function(t,a){return e(t,i,a)})):r(i)&&r(n)?g((function(t,i){return e(a,t,i)})):r(a)?l((function(t){return e(t,i,n)})):r(i)?l((function(t){return e(a,t,n)})):r(n)?l((function(t){return e(a,i,t)})):e(a,i,n)}}}const O=g((function(e,t){return null==t||t!=t?e:t})),A=Number.isInteger||function(e){return(e|0)===e};const B=g((function(e,t){return e.map((function(e){for(var a,i=t,n=0;n<e.length;){if(null==i)return;a=e[n],i=A(a)?P(a,i):i[a],n+=1}return i}))}));const R=g((function(e,t){return B([e],t)[0]}));const L=U((function(e,t,a){return O(e,R(t,a))}));var q,z,N=a(669),Y=a(669);function H(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return W(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?W(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,l=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){l=!0,o=e},f:function(){try{r||null==a.return||a.return()}finally{if(l)throw o}}}}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=Array(t);a<t;a++)i[a]=e[a];return i}q={addToCartAjax:unicpo.ajax_add_to_cart,addToCartBtnEl:{},addToCartBtnSelector:".single_add_to_cart_button, button.product_type_simple",addedToCartMsg:N('<div class="woocommerce-message"><a href="'+wc_add_to_cart_params.cart_url+'" class="button wc-forward">'+wc_add_to_cart_params.i18n_view_cart+"</a> "+unicpo_i18n.added_to_cart+"</div>"),calc:unicpo.calc_on,calcBtn:unicpo.calc_btn_on,colorifyImagifyChangers:N(".uni-cpo-colorify-imagify-changer").get(),cpo:unicpo.cpo_on,isTaxable:unicpo.taxable,fileUploadEl:{},flatpickrCfg:{},geocoder:null,isFlexContainer:0<N(".flex-viewport").length,isLayeredOn:unicpo.layered_on,isImagify:unicpo.imagify_on,isSilentValidationOn:unicpo.silent_validation_on,layeredImg:null,mainImageChangers:N(".uni-cpo-image-changer").get().reverse(),mainImageDefData:{},mainImageEl:"",orderingDsblMsgEl:N(".js-uni-cpo-ordering-disabled-notice"),priceTagEl:{},priceStartingEl:N('<span class="js-cpo-price-starting"></span>'),priceCalculateEl:N('<span class="js-cpo-calculating"></span>'),productFormEl:{},progressEl:{},priceSuffix:unicpo.price_vars.price_suffix,priceTaxSuffixStarting:unicpo.price_vars.price_tax_suffix,pricePostfix:unicpo.price_vars.price_postfix,priceStarting:unicpo.price_vars.starting_price,resetBtn:unicpo.reset_form_btn_on,taxPriceSuffixElClass:".woocommerce-price-suffix",_pid:0,_ajax_sent:!1,_init:function(){try{if(this.cpo){if(this.addToCartBtnEl=N(this.addToCartBtnSelector),(!this.addToCartBtnEl.length||1<this.addToCartBtnEl.length)&&(this.addToCartBtnEl=N(".product.cpo-enabled-product .single_add_to_cart_button, .product.cpo-enabled-product button.product_type_simple")),this.addToCartBtnEl.length||console.info("Uni CPO @","Add to cart button is not found"),this.productFormEl=this.addToCartBtnEl.closest("form"),this.productFormEl.length?this.productFormEl.attr("data-parsley-focus","none"):console.info("Uni CPO @","Product form is not found"),0<N(".qty").length){var t=N(".qty")[0];(T(t.min)||D(t.min))&&N(".qty").removeAttr("min"),(T(t.max)||D(t.max))&&N(".qty").removeAttr("max"),N(".qty").attr("data-parsley-trigger","change focusout submit")}this.addToCartAjax&&0<this.addToCartBtnEl.length&&(this.addToCartBtnEl.attr("type","button"),this.addToCartBtnEl.addClass("uni_cpo_ajax_add_to_cart")),this.priceTagEl=N(unicpo.price_selector),this.priceTagEl.length||console.info("Uni CPO @","Price tag html element is not found"),this.priceTaxRevTagEl=N(unicpo.price_tax_rev_selector),this.priceStartingEl.html(this.getProperPrice()),this.priceCalculateEl.html(unicpo_i18n.calc_text),this.calc||this.setBtnState(!0),this.calc&&this.calcBtn&&(this.setBtnState(!0),this.setPriceTo({price:this.priceStartingEl}),this.bindOnCalcBtnClick()),this.bindOnAddToCartClick(),this.initTooltip(),"object"===("undefined"==typeof google?"undefined":e(google))&&"object"===e(google.maps)?(this.geocoder=new google.maps.Geocoder,this.initGoogleMap()):console.info("Uni CPO @","Google API key is missing or invalid"),this.initRangeSlider(),this.bindOnFileUploadClick(),this.bindOnMultiFileUploadClick(),this.bindOnMatrixCellClick();var a=this,i=setInterval((function(){"complete"===document.readyState&&(clearInterval(i),!a.calc||a.calc&&!a.calcBtn?a.processFormData():a.calc&&a.calcBtn&&a.collectData(!0),a.mainImageEl=a.getMainImageEl(),a.mainImageDefData=a.getMainImageDefData(),a.changeMainImage(),a.checkColorifyImagify(),N(document.body).trigger("uni_cpo_frontend_is_ready"))}),100),n=unicpo_i18n.flatpickr,o=n.weekdays,r=n.months,l=n.scrollTitle,s=n.toggleTitle;if(this.flatpickrCfg={locale:{weekdays:o,months:r,daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&21>t)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" - ",weekAbbreviation:"Wk",scrollTitle:l,toggleTitle:s,amPM:["AM","PM"]}},this.isLayeredOn)0<N(document.body).find(".uni_cpo_main_image_layered_image").length&&"undefined"==typeof flickty&&N(".uni-cpo-main-image-bg-colorpicker").wpColorPicker({color:"#ffffff",mode:"hsv",target:!1,palettes:!1,controls:"strip",width:200,change:function(e,t){N(".uni_cpo_main_image_layered_image").css("background-color",t.color.toString())}});this.bindOnResetRadioBtnClick(),this.resetBtn&&this.bindOnResetFormBtnClick(),this.bindOnRadioImageTap(),this.bindOnRadioColourClick(),this.bindOnRadioTextClick(),this.bindOnOptionSelected(),this.bindImageChangers(),this.fpdCompat()}}catch(t){console.error(t)}},addToCart:function(e){var t={action:"uni_cpo_add_to_cart",security:unicpo.security,data:e};this.ajaxCall(t)},ajaxCall:function(e){var t=this,a=t.productFormEl[0],i=N("div.woocommerce").not(".widget");N.ajax({url:unicpo.ajax_url,data:e,dataType:"json",method:"POST",beforeSend:function(){t._blockForm(a),t.calc&&(t.setPriceTo({price:t.priceCalculateEl,tax:"hide"}),t.setPriceTaxRevTo({price:t.priceCalculateEl})),t.addToCartAjax&&i.find(".woocommerce-message").slideToggle(500,(function(){N(this).remove()})),N(document.body).trigger("uni_cpo_options_data_ajax_before_send",[e.data])},error:function(){t._unblockForm(a,"error"),t.setPriceTo({price:t.priceStartingEl}),t.setPriceTaxRevTo({price:t.priceStartingEl})},success:function(n){if("uni_cpo_add_to_cart"===e.action){var o=Object.keys(t.fileUploadEl);o.length&&o.forEach((function(e){var a=N("#"+e).data("slug");t.fileUploadEl[e].splice(),N("#".concat(a,"-files-list")).empty(),N("#".concat(a,"-field")).val("").trigger("change")}))}if(n.success){if(t._unblockForm(a,"success"),void 0!==n.data.redirect)return void(window.location=n.data.redirect);if(D(n.data.all_options_data)||t.replaceLabelsWithDynamicData(n.data.all_options_data),unicpo.formatted_vars=Object.assign({},n.data.formatted_vars,n.data.nice_names_vars),N.extend(unicpo.price_vars,n.data.price_vars),N.extend(unicpo.extra_data,n.data.extra_data),unicpo.errors={},T(n.data.errors)||N.extend(unicpo.errors,n.data.errors),void 0!==n.data.extra_data&&void 0!==n.data.extra_data.order_product&&"disabled"===n.data.extra_data.order_product?(t.orderingDsblMsgEl.slideDown(300),t.setBtnState(!0)):(t.orderingDsblMsgEl.hide(),t.setBtnState(!1)),t.calc){var r=t.getProperPrice({price:unicpo.price_vars.price,doRemoveSuffix:!0});unicpo.price_vars.raw_price?(t.setPriceTo({price:r,tax:"show"}),t.setPriceTaxRevTo({price:unicpo.price_vars.price_tax_rev})):(t.setPriceTo({price:t.priceStartingEl}),t.setPriceTaxRevTo({price:t.priceStartingEl}),t.setBtnState(!0))}if(void 0!==n.data.fragments){if("yes"===wc_add_to_cart_params.cart_redirect_after_add)return void(window.location=wc_add_to_cart_params.cart_url);i.html(t.addedToCartMsg),N.each(n.data.fragments,(function(e,t){N(e).replaceWith(t)})),N(document.body).trigger("uni_cpo_added_to_cart",[n.data]),N(document.body).trigger("added_to_cart",[n.data.fragments])}else N(document.body).trigger("uni_cpo_options_data_ajax_success",[e.data,n.data])}else{if(t._unblockForm(a,"error"),t.calc&&(t.setPriceTo({price:t.priceStartingEl}),t.setPriceTaxRevTo({price:t.priceStartingEl})),n.data.product_url)return void(window.location=n.data.product_url);N(document.body).trigger("uni_cpo_options_data_ajax_fail",[e.data,n])}}})},bindImageChangers:function(){var e=this;N(document).on("change",e.mainImageChangers,(function(){e.changeMainImage()}))},bindOnAddToCartClick:function(){var e=this;N(document).on("click",".storefront-sticky-add-to-cart__content-button",(function(t){e.formSubmission(),t.preventDefault()})),this.addToCartAjax?N(document).on("click",".uni_cpo_ajax_add_to_cart",(function(t){t.preventDefault(),e.formSubmission()})):N(document).on("click",this.addToCartBtnSelector,(function(t){t.preventDefault(),e.formSubmission()}))},bindOnCalcBtnClick:function(){var e=this;N(document).on("click",".js-uni-cpo-calculate-btn",(function(){return!e._ajax_sent&&void e.processFormData()}))},bindOnResetFormBtnClick:function(){var e=this;N(document).on("click",".js-uni-cpo-reset-form-btn",(function(){N(unicpo.options_selector).each((function(){if(this.name){var t=this,a=N(t),i=a.closest(".uni-module"),n=t.type||t.tagName.toLowerCase();if("checkbox"===n||"radio"===n)a.attr("checked",!1),e.layeredImg="";else if("select-one"===n||"textarea"===n)a.val("");else if("number"===n||"text"===n){if(a.hasClass("js-uni-cpo-field-range_slider")){var o=a.data("ionRangeSlider"),r=a.attr("data-min"),l=a.attr("data-max"),s=a.siblings(N(".js-uni-cpo-field-range_slider-additional-field"));return o.update({from:r,to:l}),void s.val(r)}if(a.hasClass("flatpickr-input"))t._flatpickr.clear();a.val("")}else if("hidden"===n){if(i.hasClass("uni-module-matrix")&&i.find(".uni-clicked").removeClass("uni-clicked"),i.hasClass("uni-module-file_upload"))i.find(".uni-cpo-file-upload-files-item-remove").each((function(){N(this).trigger("click")}));a.val("")}else a.val("")}})),e.processFormData()}))},bindOnFileUploadClick:function(){var e=this,t=N(".js-uni-cpo-field-file_upload-el");t.length&&t.each((function(){var t=N(this),a=t.attr("id"),i=t.parent(".dndWrapper").siblings(".js-uni-cpo-file-upload-files").attr("id"),n=t.data(),o=n.postId,r=n.slug,l=n.maxFilesize,s=n.mimeTypes;e.fileUploadEl[a]=new plupload.Uploader({max_files:1,multi_selection:!1,runtimes:"html5",url:unicpo.ajax_url,browse_button:a,drop_element:a,chunk_size:"1mb",filters:{max_file_size:l?l+"mb":unicpo.max_file_size+"mb",mime_types:[{title:"Allowed formats",extensions:s||unicpo.mime_types}]},listId:i,uploadMode:"single",multipart_params:{action:"uni_cpo_upload_file",postId:o,slug:r,productId:unicpo.pid,security:unicpo.security}}),e.fileUploadEl[a].bind("PostInit",e.handlePluploadInit),e.fileUploadEl[a].bind("Error",e.handlePluploadError),e.fileUploadEl[a].bind("FileFiltered",e.handlePluploadFileFiltered),e.fileUploadEl[a].bind("FilesAdded",e.handlePluploadFilesAdded),e.fileUploadEl[a].bind("BeforeUpload",e.handlePluploadBeforeUpload),e.fileUploadEl[a].bind("UploadProgress",e.handlePluploadUploadProgress),e.fileUploadEl[a].bind("ChunkUploaded",e.handlePluploadChunkUploaded),e.fileUploadEl[a].bind("FileUploaded",e.handlePluploadFileUploaded),e.fileUploadEl[a].init(),t.on("dragenter",(function(){t.addClass("dragStarted")})),t.on("dragleave",(function(){t.removeClass("dragStarted")})),t.on("drop",(function(){t.removeClass("dragStarted")}))}))},bindOnMultiFileUploadClick:function(){var e=this,t=N(".js-uni-cpo-field-multi_file_upload-el");t.length&&t.each((function(){var t=N(this),a=t.attr("id"),i=t.parent(".dndWrapper").siblings(".js-uni-cpo-multi-file-upload-files").attr("id"),n=t.data(),o=n.postId,r=n.slug,l=n.maxFiles,s=n.maxFilesize,c=n.mimeTypes;e.fileUploadEl[a]=new plupload.Uploader({max_files:l||5,multi_selection:!0,runtimes:"html5",url:unicpo.ajax_url,browse_button:a,drop_element:a,chunk_size:"1mb",filters:{max_file_size:s?s+"mb":unicpo.max_file_size+"mb",mime_types:[{title:"Allowed formats",extensions:c||unicpo.mime_types}]},listId:i,uploadMode:"multi",maxFiles:l,multipart_params:{action:"uni_cpo_upload_file",postId:o,slug:r,productId:unicpo.pid,security:unicpo.security}}),e.fileUploadEl[a].bind("PostInit",e.handleMultiPluploadInit),e.fileUploadEl[a].bind("Error",e.handleMultiPluploadError),e.fileUploadEl[a].bind("FilesAdded",e.handleMultiPluploadFilesAdded),e.fileUploadEl[a].bind("BeforeUpload",e.handleMultiPluploadBeforeUpload),e.fileUploadEl[a].bind("UploadProgress",e.handleMultiPluploadUploadProgress),e.fileUploadEl[a].bind("ChunkUploaded",e.handlePluploadChunkUploaded),e.fileUploadEl[a].bind("FileUploaded",e.handleMultiPluploadFileUploaded),e.fileUploadEl[a].bind("UploadComplete",e.handleMultiPluploadUploadComplete),e.fileUploadEl[a].init(),t.on("dragenter",(function(){t.addClass("dragStarted")})),t.on("dragleave",(function(){t.removeClass("dragStarted")})),t.on("drop",(function(){t.removeClass("dragStarted")}))}))},bindOnOptionSelected:function(){var e=this;N(document).on("change",unicpo.options_selector_change,(function(){if(e._ajax_sent)return!1;var t=N(this).val();if(N(this).hasClass("js-uni-cpo-field-select")&&N(this).attr("data-value",t),N(this).hasClass("js-uni-cpo-field-radio")&&N(this).closest(".uni-module-radio").attr("data-value",t),!e.calc||e.calc&&!e.calcBtn?e.processFormData():e.calc&&e.calcBtn&&(e.setBtnState(!0),e.collectData(!0)),N(this).is("select")){var a=N(this).find(":selected").data("redirect-uri");void 0!==a&&!1!==a&&(window.location.href=a)}else{var i=N(this).attr("data-redirect-uri");void 0!==i&&!1!==i&&(window.location.href=i)}}))},bindOnResetRadioBtnClick:function(){var e=this;N(".uni-module-radio .js-uni-cpo-field-radio-reset-button").on("click",(function(t){t.preventDefault(),o(N(this).closest(".uni-module-radio").find("input[type='radio']")).forEach((function(e){e.checked=!1,e.setAttribute("checked",!1)})),e.processFormData()}))},bindOnRadioColourClick:function(){var e=this;N(".uni-module-radio .uni-cpo-option-label__colour-wrap").on("click",(function(){var t=N(this),a=t.data(),i=t.closest(".uni-module-radio"),n=i.attr("id"),o=i.data("layered"),r=i.data("imagify");void 0!==o&&e.isLayeredOn?(e.showLastThumb(),e.colorify(n,a.hex)):void 0!==r&&e.isImagify&&(e.showLastThumb(),e.imagify(n,a.image))}))},bindOnRadioTextClick:function(){var e=this;N(".uni-module-radio .uni-cpo-option-label__text, .uni-module-radio .uni-cpo-option-label__radio, .uni-module-radio .uni-cpo-option-label__text-content").on("click",(function(){var t=N(this),a=t.data(),i=t.closest(".uni-module-radio"),n=i.attr("id");void 0!==i.data("imagify")&&e.isImagify&&(e.showLastThumb(),e.imagify(n,a.image))}))},bindOnRadioImageTap:function(){var e=this;N(".uni-cpo-option-label__image-wrap").on("click",(function(){var t=N(this),a=t.data(),i=t.closest(".uni-module-radio"),n=i.attr("id");void 0!==i.data("imagify")&&e.isImagify&&(e.showLastThumb(),e.imagify(n,a.image))}))},bindOnMatrixCellClick:function(){var e=this,t=N(".uni-module-matrix");N(".uni-module-matrix table td span").on("click",(function(){var t=N(this),a=parseFloat(t.text().replace(/,/,"")),i=t.closest(".uni-module-matrix"),n=i.attr("id");if(t.hasClass("uni-clicked"))t.removeClass("uni-clicked"),i.find('[name="'+n+'_col"]').val(""),i.find('[name="'+n+'_row"]').val(""),i.find('[name="'+n+'"]').val("").trigger("change");else{var o=t.data("col"),r=t.data("row");i.find("td span.uni-clicked").removeClass("uni-clicked"),t.addClass("uni-clicked"),i.find('[name="'+n+'_col"]').val(o),i.find('[name="'+n+'_row"]').val(r),i.find('[name="'+n+'"]').val(a).trigger("change")}return!e._ajax_sent&&void(!e.calc||e.calc&&!e.calcBtn?e.processFormData():e.calc&&e.calcBtn&&(e.setBtnState(!0),e.collectData(!0)))})),t.each((function(){var e=N(this),t=e.attr("id"),a=e.find('[name="'+t+'_col"]').val(),i=e.find('[name="'+t+'_row"]').val();e.find('span[data-col="'+a+'"][data-row="'+i+'"]').addClass("uni-clicked")}))},calculate:function(e){var t={action:"uni_cpo_price_calc",security:unicpo.security,data:e};this.ajaxCall(t)},changeMainImage:function(){if(this.mainImageChangers.length&&this.mainImageEl){var e;this.mainImageChangers.forEach((function(t){if(void 0===e){var a=N(t),i=a.attr("type");a.hasClass("uni-cpo-excluded-field")||("radio"===i||"checkbox"===i?!0===a.prop("checked")&&(e=a):e=a)}}));var t=void 0===e?this.mainImageDefData:e.data();this.replaceMainImageData(t)}},checkColorifyImagify:function(){var e=this;(e.isLayeredOn||e.isImagify||e.colorifyImagifyChangers.length)&&e.colorifyImagifyChangers.forEach((function(t){if(!t.classList.contains("uni-cpo-excluded-field")&&"radio"===t.type&&t.checked){var a=t.nextElementSibling.children[0],i=a.getAttribute("data-hex"),n=a.getAttribute("data-image"),o=t.parentElement,r=o.getAttribute("id"),l=o.getAttribute("data-layered");void 0!==o.getAttribute("data-imagify")&&e.isLayeredOn?e.colorify(r,i):void 0!==l&&e.isImagify&&e.imagify(r,n)}}))},collectData:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=this,i={};N(unicpo.options_selector).not(".uni-cpo-excluded-field").each((function(){if(this.name){var t=this,n=N(t),o=t.type||t.tagName.toLowerCase();if("checkbox"===o){var r=t.name.replace("[]","");if(void 0!==i[r])return;i[r]=N.makeArray(i[r]),N('input[name="'+t.name+'"]:checked').each((function(){i[r].push(this.value)})),i[r+"_count"]=i[r].length}else if("radio"===o)N('input[name="'+t.name+'"]:checked').length?!0===n.prop("checked")&&(i[t.name]=n.val()):i[t.name]="";else if("select-one"===o)i[t.name]=n.val();else if("number"===o||"text"===o)if(n.hasClass("js-uni-cpo-field-datepicker")){var l=document.getElementById(t.name+"-field")._flatpickr,s=l.config.mode,c=l.config.noCalendar,d=l.config.enableTime,u=l.config.time_24hr;if(c&&d){var p=moment(l.selectedDates[0]);u?(i[t.name]=p.format("H:mm"),i[t.name+"_start"]=p.format("H:mm")):(i[t.name]=p.format("h:mm a"),i[t.name+"_start"]=p.format("h:mm a"))}else{var f=moment(l.selectedDates[0]);if("single"===s)d?u?(i[t.name]=f.format("Y-MM-DD H:mm"),i[t.name+"_start"]=f.format("Y-MM-DD H:mm")):(i[t.name]=f.format("Y-MM-DD h:mm a"),i[t.name+"_start"]=f.format("Y-MM-DD h:mm a")):(i[t.name]=f.format("Y-MM-DD"),i[t.name+"_start"]=f.format("Y-MM-DD")),i[t.name+"_duration"]=1;else if("range"===s){var m=moment(l.selectedDates[1]);l.selectedDates.length&&(d?u?(i[t.name]=f.format("Y-MM-DD H:mm")+" - "+m.format("Y-MM-DD H:mm"),i[t.name+"_start"]=f.format("Y-MM-DD H:mm"),i[t.name+"_end"]=m.format("Y-MM-DD H:mm")):(i[t.name]=f.format("Y-MM-DD h:mm a")+" - "+m.format("Y-MM-DD h:mm a"),i[t.name+"_start"]=f.format("Y-MM-DD h:mm a"),i[t.name+"_end"]=m.format("Y-MM-DD h:mm a")):(i[t.name]=f.format("Y-MM-DD")+" - "+m.format("Y-MM-DD"),i[t.name+"_start"]=f.format("Y-MM-DD"),i[t.name+"_end"]=m.format("Y-MM-DD")),i[t.name+"_duration"]=m.diff(f,"days"),n.hasClass("js-datepicker-day-night-mode-days")&&(i[t.name+"_duration"]=i[t.name+"_duration"]+1))}else"multiple"===s&&l.selectedDates.length&&(i[t.name]=n.val(),i[t.name+"_duration"]=l.selectedDates.length,i[t.name+"_days"]=[],l.selectedDates.forEach((function(e){var a;a=d?u?moment(e).format("Y-MM-DD H:mm"):moment(e).format("Y-MM-DD h:mm a"):moment(e).format("Y-MM-DD"),i[t.name+"_days"].push(a)})))}}else if(n.hasClass("js-uni-cpo-field-range_slider")){if("double"===n.data("ionRangeSlider").options.type){var g=n.val().split("-");i[t.name]=n.val(),i[t.name+"_from"]=g[0],i[t.name+"_to"]=g[1]}else i[t.name]=n.val(),i[t.name+"_from"]=n.val(),i[t.name+"_to"]=n.val()}else if(n.hasClass("js-uni-cpo-field-distance_by_postcode")){var h=t.parentElement.querySelector("[name=".concat(t.name,"_origin]"));h&&(i[t.name+"_origin"]=N(h).val()),i[t.name]=n.val()}else if(n.hasClass("js-uni-cpo-field-google_map")){var v=n.prev();i[t.name]=n.val(),i[t.name+"_latlng"]=v.val()}else{if(a.isNumber(n.val())){var _=n.val().replace(/,/,".");n.val(_),i[t.name]=n.val()}else i[t.name]=n.val();i[t.name+"_count_spaces"]=i[t.name].length;var b=n.val().replace(/ /g,"");i[t.name+"_count"]=b.length}else if("textarea"===o){i[t.name]=n.val(),i[t.name+"_count_spaces"]=i[t.name].length;var y=n.val().replace(/ /g,"");i[t.name+"_count"]=y.length}else if("hidden"!==o)i[t.name]=n.val();else if(n.hasClass("js-uni-cpo-field-file_upload")){var w=n.data();i[t.name]=n.val(),void 0!==w.imageWidth&&(i[t.name+"_width"]=parseInt(w.imageWidth)),void 0!==w.imageHeight&&(i[t.name+"_height"]=parseInt(w.imageHeight))}else if(n.hasClass("js-uni-cpo-field-multi_file_upload")){i[t.name]=n.val();try{var x=JSON.parse(n.val()||"[]");i[t.name+"_count"]=Array.isArray(x)?x.length:0}catch(n){i[t.name+"_count"]=0}}else i[t.name]=n.val();e?N(document.body).trigger("uni_cpo_option_data_for_conditional",[i,n]):N(document.body).trigger("uni_cpo_option_data_before_validate",[i,n])}}));var n=N("[ng-bind-html='final_price | to_trusted']");if(n.length&&(i.nbdFinalPrice=parseFloat(n.text().replace(/[^0-9\.]+/g,""))),e){var o=N(document.body).triggerHandler("uni_cpo_options_data_for_conditional",[i]);if(void 0!==o&&(i=o),!_.isEqual(t,i))return a.collectData(!0,i)}else{var r=N(document.body).triggerHandler("uni_cpo_options_data_before_validate",[i]);void 0!==r&&(i=r)}return i},colorify:function(e,t){var a=N("#palette-layer-"+e);if(0<a.length){var i=this.hexToRgb(t),n=a.width(),o=a.height();this.loadImage(a[0].src).then((function(e){var t=e.width,r=e.height;e.remove();var l=document.createElement("canvas"),s=l.getContext("2d");l.width=t,l.height=r,s.drawImage(a.get(0),0,0);for(var c=s.getImageData(0,0,t,r),d=c.data,u=[i.r,i.g,i.b],p=0,f=d.length;p<f;p+=4)d[p]=u[0],d[p+1]=u[1],d[p+2]=u[2];s.putImageData(c,0,0),a.attr("src",l.toDataURL("image/png")),a.attr("width",n),a.attr("height",o),q.combineImg()})).catch((function(){}))}},combineImg:function(){var e=this,t=document.getElementById("uni_cpo_layered_image"),a=o(t.children).filter((function(e){return!e.classList.contains("uni-cpo-excluded-img")})),i=document.getElementById("uni_canvas"),n=i.getContext("2d");n.clearRect(0,0,i.width,i.height),a.length&&(i.width=t.clientWidth,i.height=t.clientHeight,Promise.all(a.filter((function(e){return"IMG"===e.tagName})).map((function(t){return e.loadImage(t.src)}))).then((function(e){e.forEach((function(e){n.drawImage(e,0,0,i.width,i.height)})),q.layeredImg=i.toDataURL()})).catch((function(){})))},loadImage:function(e){return new Promise((function(t,a){var i=new Image;i.addEventListener("load",(function(){t(i)})),i.addEventListener("error",(function(e){a(e)})),i.src=e}))},imagify:function(e,t){var a=N("#imagify-layer-"+e);0<a.length&&a.attr("src",t),q.combineImg()},formSubmission:function(){var e=this;if(e.productFormEl.parsley({excluded:"[disabled], .uni-cpo-excluded-field"}).validate(),e.productFormEl.parsley().isValid()){var t=N(".uni-cpo-excluded-field");t.each((function(){N(this).prop("disabled",!0)}));var a=!0;if(Y("#uni_cpo_layered_image > img").each((function(){Y(this).hasClass("uni-cpo-excluded-img")||(a=!1)})),N('input[name="cpo_product_layered_image"]').val(a?"":e.layeredImg),e.addToCartAjax){var n={};N.each(e.productFormEl.serializeArray(),(function(e,t){if(-1!==t.name.indexOf("nbd-field")){var a=M(F(/\[(.*?)\]/g,t.name));D(a)||(a=a.replace("[","").replace("]",""),D(n["nbd-field"])&&(n["nbd-field"]={}),n["nbd-field"]=Object.assign({},n["nbd-field"],i({},a,t.value)))}else-1===t.name.indexOf("[]")?n[t.name]=t.value:(t.name=t.name.replace("[]",""),n[t.name]=N.makeArray(n[t.name]),n[t.name].push(t.value))}));var o=N("[ng-bind-html='final_price | to_trusted']");o.length&&(n.nbdFinalPrice=parseFloat(o.text().replace(/[^0-9\.]+/g,""))),e.addToCart(n)}else e.productFormEl.submit();t.each((function(){N(this).prop("disabled",!1)}))}},getMainImageDefData:function(){if(this.mainImageEl){var e=this.mainImageEl.find("a"),t=e.find("img");return{imgId:unicpo.product_image_id,imgFullUri:e.attr("href"),imgTitle:t.attr("title"),imgAlt:t.attr("alt"),imgUri:t.attr("src"),imgSrcset:t.attr("srcset"),imgSrc:t.attr("data-src"),imgLarge_image:t.attr("data-large_image"),imgLarge_image_width:t.attr("data-large_image_width"),imgLarge_image_height:t.attr("data-large_image_height"),imgThumbUri:t.closest("[data-thumb]").attr("data-thumb"),imgWidth:t.attr("width"),imgHeight:t.attr("height")}}console.info("Uni CPO @","No main image found.")},getMainImageEl:function(){var e=N(unicpo.image_selector).find(".woocommerce-product-gallery__image");return 0<e.length?e.not(".clone").first():""},getFormattedFormData:function(){var e=N(".js-cpo-pid").val(),t=this.productFormEl.find(".input-text.qty"),a=t.val()?t.val():1,i={};return i.product_id=e,i.quantity=parseFloat(a),i=N.extend(i,this.collectData(!1))},handlePluploadInit:function(e){var t=window.UniCpo,a=e.settings.listId,i=N("#"+e.settings.multipart_params.slug+"-field");if(""!==i.val()){var n='<li class="uni-cpo-file-upload-files-item"><i class="uni-cpo-file-upload-files-item-icon"></i><span class="uni-cpo-file-upload-files-item-title">'+i.data("filename")+'</span><span class="uni-cpo-file-upload-files-item-uploaded" style="display: inline;"></span><button type="button" data-attach_id="'+i.val()+'" class="uni-cpo-file-upload-files-item-remove"></button></li>';N("#"+a).append(n)}N(document).on("click","#"+a+" .uni-cpo-file-upload-files-item-upload",(function(t){t.preventDefault(),e.start()})),N(document).on("click","#"+a+" .uni-cpo-file-upload-files-item-remove",(function(a){a.preventDefault();var i=N(a.target),n=i.data("file-id"),o=i.data("attach_id"),r=i.data("dropboxPath"),l=i.closest("li"),s=i.closest(".js-uni-cpo-file-upload-files"),c=N("#"+e.settings.multipart_params.slug+"-field");if(window.UniCpo.parsleyRemoveError(c),void 0!==o){var d={action:"uni_cpo_remove_file",security:unicpo.security,attach_id:o,dropboxPath:r};N.ajax({url:unicpo.ajax_url,data:d,dataType:"json",method:"POST",beforeSend:function(){t._blockForm(s)},error:function(){t._unblockForm(s,"error")},success:function(a){a.success?(t._unblockForm(s,"success"),void 0!==n&&e.removeFile(n),l.remove(),c.val("").trigger("change")):t._unblockForm(s,"error")}})}else{var u=e.files.filter((function(e){if(void 0!==n)return e.id===n}));u.length&&e.removeFile(u[0]),l.remove(),c.trigger("change")}}))},handlePluploadError:function(e,t){var a=N("#"+e.settings.multipart_params.slug+"-field"),i=e.settings.listId;window.UniCpo.parsleyRemoveError(a),-601===t.code?a.parsley().addError("file-type",{message:"This type of files cannot be uploaded."}):-600===t.code?a.parsley().addError("file-size",{message:"The file is too big"}):a.parsley().addError("file-custom",{message:t.message}),window.UniCpo.position(a,0),N("#"+i+" .uni-cpo-file-upload-files-item-upload").attr("disabled",!1),window.UniCpo.setBtnState(!1)},handlePluploadFileFiltered:function(){},handlePluploadFilesAdded:function(e,t){var a=N("#"+e.settings.multipart_params.slug+"-field");if(window.UniCpo.parsleyRemoveError(a),"single"===e.settings.uploadMode&&(1<e.files.length||""!==a.val()))return a.parsley().addError("file-limit",{message:"Cannot send more than 1 file."}),window.UniCpo.position(a,0),e.removeFile(t[0]),!1;for(var i,n=0;n<t.length;n++)i='<li class="uni-cpo-file-upload-files-item"><i class="uni-cpo-file-upload-files-item-icon"></i><span class="uni-cpo-file-upload-files-item-title">'+t[n].name+'</span><span class="uni-cpo-file-upload-files-item-uploaded"></span><button class="uni-cpo-file-upload-files-item-upload"></button><button type="button" data-file-id="'+t[n].id+'" class="uni-cpo-file-upload-files-item-remove"></button><span class="uni-cpo-file-upload-files-item-progress"><span></span></span></li>',N("#"+e.settings.listId).append(i);window.UniCpo.setBtnState(!0),e.start()},handlePluploadBeforeUpload:function(e,t){var a=e.settings.listId;e.settings.multipart_params.file_name=t.name,N("#"+a+" .uni-cpo-file-upload-files-item-upload").attr("disabled",!0),N("#"+a+" .uni-cpo-file-upload-files-item-remove").attr("disabled",!0)},handlePluploadUploadProgress:function(e,t){var a=e.settings.listId;N("#"+a+" .uni-cpo-file-upload-files-item-progress span").css({width:t.percent+"%"})},handlePluploadChunkUploaded:function(e,t,a){var i=JSON.parse(a.response);if(!i.success){var n=e.settings.multipart_params.slug,o=N("#"+n+"-field");e.stop(),o.parsley().addError("file-upload",{message:i.data.error}),window.UniCpo.position(o,0)}},handlePluploadFileUploaded:function(e,t,a){var i=e.settings.listId,n=e.settings.multipart_params.slug,o=N("#"+n+"-field"),r=JSON.parse(a.response.replace(/\\/g,""));if(window.UniCpo.parsleyRemoveError(o),r.success&&r.data){var l=void 0===r.data.file?"":r.data.file.id,s=void 0===r.data.path_lower?"":r.data.path_lower,c=l||"Dropbox: ".concat(s),d="",u="";l&&(d=r.data.file.width,u=r.data.file.height),N("#"+i+" .uni-cpo-file-upload-files-item-progress").remove(),N("#"+i+" .uni-cpo-file-upload-files-item-upload").remove(),N("#"+i+" .uni-cpo-file-upload-files-item-uploaded").show(),N("#"+i+" .uni-cpo-file-upload-files-item-remove").attr("disabled",!1),N('[data-file-id="'+t.id+'"]').data({attach_id:l,dropboxPath:s}),o.val(c),o.data({width:d,height:u}),N(document.body).trigger("uni_cpo_file_uploaded",[n,r.data.file]),o.trigger("change")}else o.parsley().addError("file-upload",{message:r.data.error}),window.UniCpo.position(o,0);window.UniCpo.setBtnState(!1)},handleMultiPluploadInit:function(e){var t=window.UniCpo,a=e.settings.listId,i=N("#"+e.settings.multipart_params.slug+"-field");if(""!==i.val())try{var n=JSON.parse(i.val()),o=i.data("filenames")||[];Array.isArray(n)&&n.forEach((function(e,t){var i=o[t]||"File "+(t+1);N("#"+a).append('<li class="uni-cpo-file-upload-files-item"><i class="uni-cpo-file-upload-files-item-icon"></i><span class="uni-cpo-file-upload-files-item-title">'+i+'</span><span class="uni-cpo-file-upload-files-item-uploaded" style="display: inline;"></span><button type="button" data-attach_id="'+e+'" class="uni-cpo-multi-file-upload-files-item-remove"></button></li>')}))}catch(e){console.error("Error parsing multi-file upload value:",e)}N(document).on("click","#"+a+" .uni-cpo-multi-file-upload-files-item-remove",(function(a){a.preventDefault();var i=N(a.target),n=i.data("file-id"),o=i.data("attach_id"),r=i.data("dropboxPath"),l=i.closest("li"),s=i.closest(".js-uni-cpo-multi-file-upload-files"),c=N("#"+e.settings.multipart_params.slug+"-field");if(window.UniCpo.parsleyRemoveError(c),void 0!==o){var d={action:"uni_cpo_remove_file",security:unicpo.security,attach_id:o,dropboxPath:r};N.ajax({url:unicpo.ajax_url,data:d,dataType:"json",method:"POST",beforeSend:function(){t._blockForm(s)},error:function(){t._unblockForm(s,"error")},success:function(a){if(a.success){t._unblockForm(s,"success"),void 0!==n&&e.removeFile(n),l.remove();try{var i=JSON.parse(c.val()||"[]");i=i.filter((function(e){return e!=o})),c.val(JSON.stringify(i)).trigger("change")}catch(e){c.val("[]").trigger("change")}}else t._unblockForm(s,"error")}})}else{var u=e.files.filter((function(e){if(void 0!==n)return e.id===n}));u.length&&e.removeFile(u[0]),l.remove(),c.trigger("change")}}))},handleMultiPluploadError:function(e,t){var a=N("#"+e.settings.multipart_params.slug+"-field"),i=e.settings.listId;window.UniCpo.parsleyRemoveError(a),-601===t.code?a.parsley().addError("file-type",{message:"This type of files cannot be uploaded."}):-600===t.code?a.parsley().addError("file-size",{message:"The file is too big"}):a.parsley().addError("file-custom",{message:t.message}),window.UniCpo.position(a,0),N("#"+i+" .uni-cpo-file-upload-files-item-upload").attr("disabled",!1),window.UniCpo.setBtnState(!1)},handleMultiPluploadFilesAdded:function(e,t){var a=N("#"+e.settings.multipart_params.slug+"-field"),i=e.settings.maxFiles||5;window.UniCpo.parsleyRemoveError(a);var n=N("#"+e.settings.listId+" .uni-cpo-file-upload-files-item").length+t.length;if("multi"===e.settings.uploadMode&&n>i)return a.parsley().addError("file-limit",{message:"Cannot send more than "+i+" files."}),window.UniCpo.position(a,0),t.forEach((function(t){return e.removeFile(t)})),!1;for(var o,r=0;r<t.length;r++)o='<li class="uni-cpo-file-upload-files-item" data-file-id="'+t[r].id+'"><i class="uni-cpo-file-upload-files-item-icon"></i><span class="uni-cpo-file-upload-files-item-title">'+t[r].name+'</span><span class="uni-cpo-file-upload-files-item-uploaded"></span><button class="uni-cpo-file-upload-files-item-upload"></button><button type="button" data-file-id="'+t[r].id+'" class="uni-cpo-multi-file-upload-files-item-remove"></button><span class="uni-cpo-file-upload-files-item-progress"><span></span></span></li>',N("#"+e.settings.listId).append(o);window.UniCpo.setBtnState(!0),e.start()},handleMultiPluploadBeforeUpload:function(e,t){var a=e.settings.listId;e.settings.multipart_params.file_name=t.name,N("#"+a+" .uni-cpo-file-upload-files-item-upload").attr("disabled",!0),N("#"+a+" .uni-cpo-multi-file-upload-files-item-remove").attr("disabled",!0)},handleMultiPluploadUploadProgress:function(e,t){var a=e.settings.listId;N("#"+a+' [data-file-id="'+t.id+'"] .uni-cpo-file-upload-files-item-progress span').css({width:t.percent+"%"})},handleMultiPluploadFileUploaded:function(e,t,a){var i=e.settings.listId,n=e.settings.multipart_params.slug,o=N("#"+n+"-field"),r=JSON.parse(a.response.replace(/\\/g,""));if(window.UniCpo.parsleyRemoveError(o),r.success&&r.data){var l=void 0===r.data.file?"":r.data.file.id;l&&(r.data.file.width,r.data.file.height);var s=N("#"+i+' [data-file-id="'+t.id+'"]');s.find(".uni-cpo-file-upload-files-item-progress").remove(),s.find(".uni-cpo-file-upload-files-item-upload").remove(),s.find(".uni-cpo-file-upload-files-item-uploaded").show(),s.find(".uni-cpo-multi-file-upload-files-item-remove").attr("disabled",!1),s.find(".uni-cpo-multi-file-upload-files-item-remove").data({attach_id:l});try{var c=JSON.parse(o.val()||"[]");Array.isArray(c)||(c=[]),c.push(l),o.val(JSON.stringify(c))}catch(e){o.val(JSON.stringify([l]))}N(document.body).trigger("uni_cpo_multi_file_uploaded",[n,r.data.file])}else o.parsley().addError("file-upload",{message:r.data.error}),window.UniCpo.position(o,0)},handleMultiPluploadUploadComplete:function(e){var t=e.settings.multipart_params.slug;N("#"+t+"-field").trigger("change"),window.UniCpo.setBtnState(!1)},hexToRgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,a,i){return t+t+a+a+i+i}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},gMapMarkers:{},addGoogleMarker:function(e,t,a){var i=window.UniCpo,n=new google.maps.Marker({position:e,map:t});if(i.gMapMarkers.hasOwnProperty(a)||(i.gMapMarkers[a]=[]),i.gMapMarkers[a].length){for(var o in i.gMapMarkers[a])i.gMapMarkers[a][o].setMap(null);i.gMapMarkers[a]=[]}i.gMapMarkers[a].push(n)},initGoogleMap:function(){try{var e=window.UniCpo,t=document.getElementsByClassName("js-uni-gmap-container");if(!t.length)return;var a,i=H(t);try{var n=function(){var t=a.value,i=(t.getAttribute("data-map"),t.getAttribute("data-slug")),n=t.getAttribute("data-coords").split(","),o=parseFloat(n[0]),r=parseFloat(n[1]),l=new google.maps.Map(t,{center:{lat:o,lng:r},zoom:parseInt(t.getAttribute("data-zoom"))});t.setAttribute("data-map",l),l.addListener("click",(function(t){e.addGoogleMarker(t.latLng,l,i),e.geocoder.geocode({latLng:t.latLng},(function(e,a){if(a==google.maps.GeocoderStatus.OK&&e[0]){var n=document.getElementById("js-uni-cpo-field-".concat(i)),o=document.getElementById("js-uni-cpo-field-".concat(i,"-latlng"));null!=n&&(n.value=e[0].formatted_address),null!=o&&(o.value=t.latLng)}}))}))};for(i.s();!(a=i.n()).done;)n()}catch(e){i.e(e)}finally{i.f()}}catch(i){console.error(i)}},initRangeSlider:function(){var e=this;N(".js-uni-cpo-field-range_slider").each((function(){var t=N(this),a=t.siblings(N(".js-uni-cpo-field-range_slider-additional-field")),i={force_edges:!0,input_values_separator:"-",onFinish:function(t){return a.length&&(t.from_value?a.val(t.from_value):a.val(t.from)),!e._ajax_sent&&void(!e.calc||e.calc&&!e.calcBtn?e.processFormData():e.calc&&e.calcBtn&&(e.setBtnState(!0),e.collectData(!0)))},onUpdate:function(){return!e._ajax_sent&&void(!e.calc||e.calc&&!e.calcBtn?e.processFormData():e.calc&&e.calcBtn&&(e.setBtnState(!0),e.collectData(!0)))}};t.ionRangeSlider(i),a.length&&a.on("change",(function(){var e,a=t.data("ionRangeSlider"),i=t.attr("data-values"),n=+t.attr("data-step"),o=+t.attr("data-min"),r=+t.attr("data-max"),l=N(this).val();e=i.length?i.split(",").map((function(e){return e.toLowerCase()})).indexOf(l.toLowerCase()):n?l<o?o:l>r?r:Math.floor(+l/n)*n+(+l%n>=n/2?n:0):l<o?o:l>r?r:l,a.update({from:e}),N(this).val(e)}))}))},isMobile:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},initTooltip:function(){N(".uni-builderius-container").tooltip({items:"[data-tip]",show:{effect:"show",duration:0},hide:{effect:"fad",duration:0},close:function(){N(".ui-helper-hidden-accessible").remove()},position:{my:"center bottom",at:"center top-10",collision:"none",using:function(e,t){N(this).css(e),N(this).addClass("vertical-bottom horizontal-center")}},content:function(){return N(this).attr("data-tip")}})},isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},position:function(e,t){var a,i,n=e;a=void 0===t?300:t,e.hasClass("uni-module")?i=e.find(".parsley-errors-list"):(i=N("#parsley-id-"+n.data("parsley-id")),"hidden"===n.attr("type")&&(n=N(""+e.data("parsley-class-handler")))),e.hasClass("parsley-error")||void 0===e.data("parsley-errors-container")||void 0===e.data("parsley-class-handler")||"hidden"===e.attr("type")||(n=N(""+e.data("parsley-class-handler")),i=N('[id="parsley-id-multiple-'+n.attr("id")+'"]'));var o=n.outerWidth();setTimeout((function(){i.position({of:n,my:"left top",at:"left bottom",collision:"none"}),i.css({"max-width":o,opacity:1})}),a)},processFormData:function(){if(!this.addToCartBtnEl.length)return!1;var e=this,t=!1;e.collectData(!0),this.calc&&(e.setPriceTo({price:e.priceStartingEl}),e.setPriceTaxRevTo({price:e.priceStartingEl})),N(document.body).trigger("uni_cpo_form_data_process_start",[e]),e.productFormEl.parsley({excluded:"[disabled], .qty, .uni-cpo-excluded-field"}).validate(),e.productFormEl.parsley().isValid()&&(t=!0);var a=e.getFormattedFormData(!1);e.productFormEl.parsley({excluded:"[disabled], .qty, .uni-cpo-excluded-field"}).validate(),e.productFormEl.parsley().isValid()&&(t=!0),t&&a.product_id?(N(document.body).trigger("uni_cpo_options_data_after_validate_event",[a]),!e.calc&&e.setBtnState(!1),e.calc&&!e.calcBtn&&e.setBtnState(!0),e.calc&&e.calculate(a)):(e.setBtnState(!0),N(document.body).trigger("uni_cpo_options_data_not_valid_event",[a]))},replaceMainImageData:function(e){var t=this;if(this.mainImageEl){var a=this.mainImageEl.find("a"),i=a.find("img"),n=0<a.next("img.zoomImg").length?a.next("img.zoomImg"):"",o=N(unicpo.thumbs_selector).children().first().find("img"),r=this.mainImageEl.closest('div[class*="viewport"]'),l=e.imgId,s=e.imgFullUri,c=e.imgTitle,d=e.imgAlt,u=e.imgUri,p=e.imgSrcset,f=e.imgSizes,m=e.imgSrc,g=e.imgLarge_image,h=e.imgLarge_image_width,v=e.imgLarge_image_height,_=e.imgThumbUri,b=e.imgWidth,y=e.imgHeight;i.closest("div").attr("data-thumb",_),i.parent().attr("href",s),i.parent().attr("title",c),i.attr("title",c),i.attr("alt",d),i.attr("src",u),i.attr("data-src",m),i.attr("data-large_image",g),i.attr("data-large_image_width",h),i.attr("data-large_image_height",v),i.attr("sizes",f),p||(p=""),i.attr("srcset",p),i.attr("width",b),i.attr("height",y),n&&n.attr("src",s),o.attr("src",_);var w=setInterval((function(){var e=i.height();r.css("height",e),t.showFirstThumbOnImageChange(),clearInterval(w)}),100);l&&this.productFormEl.find(".js-cpo-product-image").val(l),N(document.body).trigger("uni_cpo_options_product_image_replaced_event",[e,i])}else console.info("Uni CPO @","No main image found.")},parsleyRemoveError:function(e){e.parsley().removeError("file-limit"),e.parsley().removeError("file-type"),e.parsley().removeError("file-size"),e.parsley().removeError("file-custom"),e.parsley().removeError("file-upload")},replaceLabelsWithDynamicData:function(e){try{var t=/({#)|(#})/g;Object.keys(e).filter((function(t){return!D(e[t].is_dynamic_label)&&e[t].is_dynamic_label})).map((function(a){var n={},r=N("#".concat(a,":not(.uni-module-radio):not(.uni-module-checkbox) > label")),l=r.find(".uni-cpo-tooltip");if(l.length&&(n=l[0]),r.text(e[a].label),r.text(e[a].label.replace(t,"")),T(n)||r.append(n),!T(e[a].suboptions))if("radio"===e[a].type){var s=i({},a,{}),c={};Object.keys(e[a].suboptions).map((function(e){var t=N("[for=".concat(a,"-field-").concat(e,"] span.uni-cpo-option-label__text > span.uni-cpo-option-label__description"));t.length&&(s[a][e]=t)}));var d=N("#".concat(a," > label.uni-cpo-module-radio-label")),u=d.find(".uni-cpo-tooltip");u.length&&(c=u[0]),d.text(e[a].label.replace(t,"")),T(c)||d.append(c),Object.keys(e[a].suboptions).map((function(i){var n=N("[for=".concat(a,"-field-").concat(i,"] span.uni-cpo-option-label__text"));n.length&&(n.text(e[a].suboptions[i].label.replace(t,"")),!D(s[a])&&!D(s[a][i])&&n.append(s[a][i]))}))}else if("select"===e[a].type){var p=document.getElementById("".concat(a,"-field"));D(p)||D(p.options)||o(p.options).map((function(i){T(i.value)||(i.innerHTML=e[a].suboptions[i.value].label.replace(t,""))}))}else if("checkbox"===e[a].type){var f=i({},a,{}),m={};Object.keys(e[a].suboptions).map((function(e){var t=N("[for=".concat(a,"-field-").concat(e,"] span.uni-cpo-option-label__text")).find("span.uni-cpo-option-label__description");t.length&&(f[a][e]=t)}));var g=N("#".concat(a," > label.uni-cpo-module-checkbox-label")),h=g.find(".uni-cpo-tooltip");h.length&&(m=h[0]),g.text(e[a].label.replace(t,"")),T(m)||g.append(m),Object.keys(e[a].suboptions).map((function(i){var n=N("[for=".concat(a,"-field-").concat(i,"] span.uni-cpo-option-label__text"));n.length&&(n.text(e[a].suboptions[i].label.replace(t,"")),!D(f[a])&&!D(f[a][i])&&n.append(f[a][i]))}))}}))}catch(e){console.error(e)}},setBtnState:function(e){this.addToCartBtnEl.prop("disabled",e),N(document.body).trigger("uni_cpo_set_btn_state_event",[e])},setPriceTo:function(t){var a=t.price,i=t.tax,n=void 0===i?"starting":i,o=this;o.priceTagEl.each((function(t,i){N(i).parent().each((function(t,r){if("DEL"===N(r)[0].tagName)N(r).find(i).show();else if(N(r).find(i).each((function(){var t=a;"object"===e(a)&&(t=a.clone()),N(this).html(t).show(),N(document.body).trigger("uni_cpo_set_price_event",[t])})),o.isTaxable&&"hide"!==n){var l=N(r).find(o.taxPriceSuffixElClass),s=N(o.getProperTaxSuffix(n));l.replaceWith(s),s.show(),s.find("span").show()}else N(r).find(o.taxPriceSuffixElClass).hide()}))}))},setPriceTaxRevTo:function(t){var a=t.price;this.priceTaxRevTagEl.each((function(t,i){N(i).parent().each((function(t,n){"DEL"===N(n)[0].tagName?N(n).find(i).show():N(n).find(i).each((function(){var t=a;"object"===e(a)&&(t=a.clone()),N(this).html(t).show(),N(document.body).trigger("uni_cpo_set_price_tax_rev_event",[t])}))}))}))},showFirstThumbOnImageChange:function(){var e=N(".woocommerce-product-gallery").data("flexslider");void 0!==e&&e.flexslider(0)},showLastThumb:function(){var e=N(".flex-control-thumbs li").index(N(".flex-control-thumbs li:last"));N.flexslider&&N(".woocommerce-product-gallery").flexslider(e);var t=N(".woocommerce-product-gallery__wrapper").data("flickity");void 0!==t&&1<t.slides.length&&t.select(t.slides.length-1)},getProperPrice:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.price,a=void 0===t?"":t,i=e.doRemoveSuffix,n=void 0!==i&&i,o=this.priceStarting&&!a?this.priceStarting:a||unicpo.price_vars.price;return n||(o=this.priceSuffix?"".concat(this.priceSuffix," ").concat(o):o),o=this.pricePostfix?"".concat(o," ").concat(this.pricePostfix):o},getProperTaxSuffix:function(e){return"starting"===e?this.priceTaxSuffixStarting:"show"===e?unicpo.price_vars.price_tax_suffix:void 0},template:_.memoize((function(e){var t,a={evaluate:/\{#([\s\S]+?)#\}/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(i){return(t=t||_.template(N("#cpo-tmpl-"+e).html(),a))(i)}})),_blockForm:function(e){this._ajax_sent=!0,N(e).block({message:'<div data-loader="circle"></div>',css:{width:"auto",border:"0px"},overlayCSS:{background:"#fff",opacity:.6}})},_unblockForm:function(e,t){this._ajax_sent=!1,N(e).unblock()},isProp:function(e,t){return null!=e[t]&&void 0!==e[t]},isDateBetween:function(e,t,a){var i=Date.parse(e),n=Date.parse(t),o=Date.parse(a);return o>=i&&o<=n},fpdCompat:function(){var e=this,t=document.querySelectorAll(".fpdEnabled"),a={name:"",value:""};o(t).forEach((function(t){var i=t.querySelectorAll("input, select");o(i).forEach((function(t){return t.addEventListener("change",(function(t){var a=t.target,i=a.name,n=a.value;e.updateFpd(i,n)}))})),o(i).forEach((function(e){var t=e.name,i=e.value;i&&(a.name=t,a.value=i)}))})),setTimeout((function(){e.updateFpd.apply(e,o(Object.values(a)))}),1200)},updateFpd:function(t,a){if(!D(window.fpdProductCreated)){var i=window.fpdProductCreated,n=L(null,[t,"suboptions",a,"rate"],window.unicpoAllOptions);if(!D(n)&&i){fancyProductDesigner.toggleSpinner(!0,"loading product");var o={action:"fpd_load_product",product_id:n};N.post(unicpo.ajax_url,o,(function(t){if("object"===e(t)){if(0==t.length)return alert("The product does not exists or has no views!"),void fancyProductDesigner.toggleSpinner(!1);fancyProductDesigner.loadProduct(t,!0,!0)}else FPDUtil.showMessage("product loading failed")}),"json")}}}},z=function(){return Object.create(q)},window.UniCpo=z(),window.UniCpo._init(),window.Parsley.addValidator("maxFileSize",{validateString:function(e,t,a){if(!window.FormData)return console.log("The browser does not support this feature"),!0;0===t&&(t=unicpo.max_file_size);var i=a.$element[0].files;return 1!==i.length||i[0].size<=1024*t},requirementType:"integer",messages:{en:unicpo_i18n.max_file_size}}),window.Parsley.addValidator("mimeType",{validateString:function(e,t,a){var i=a.$element[0].files;return 0===i.length||(""===t&&(t=unicpo.mime_type),-1!==t.replace(/\s/g,"").split(",").indexOf(i[0].type))},requirementType:"string",messages:{en:unicpo_i18n.mime_type}}),window.Parsley.addValidator("greaterorequalthan",{requirementType:"string",validateNumber:function(e,t){return e>=N(t).val()},messages:{en:"This value should be greater or equal than %s"}}),window.Parsley.addValidator("greaterthan",{requirementType:"string",validateNumber:function(e,t){return e>N(t).val()},messages:{en:"This value should be greater than %s"}}),window.Parsley.addValidator("lessorequalthan",{requirementType:"string",validateNumber:function(e,t){return e<=N(t).val()},messages:{en:"This value should be less or equal than %s"}}),window.Parsley.addValidator("lessthan",{requirementType:"string",validateNumber:function(e,t){return e<N(t).val()},messages:{en:"This value should be less than %s"}}),window.Parsley.on("field:error",(function(){window.UniCpo.isSilentValidationOn&&this.removeError("required"),window.UniCpo.position(this.$element)})),window.uniData=function(e){return{data:e,init:function(){void 0!==e&&Object.assign(this,e)},checkExistance:function(e){return void 0!==this[e]},getLabel:function(e){return void 0!==unicpoAllOptions[e]&&void 0!==unicpoAllOptions[e].label?unicpoAllOptions[e].label:""},getCartLabel:function(e){return void 0!==unicpoAllOptions[e]&&void 0!==unicpoAllOptions[e].cartLabel?unicpoAllOptions[e].cartLabel:""},getSuboptionLabel:function(e){if(void 0!==unicpoAllOptions[e]&&void 0!==unicpoAllOptions[e].suboptions[this[e]])return unicpoAllOptions[e].suboptions[this[e]].label;if(void 0!==unicpoAllOptions[e]&&Array.isArray(this[e])){var t="";return this[e].forEach((function(a){t+=", ".concat(unicpoAllOptions[e].suboptions[a].label)})),t.substr(2)}return""},asPrice:function(e){return this.checkExistance(e)&&void 0!==this[e]?parseFloat(this[e]).toFixed(2):parseFloat(0).toFixed(2)},asNumber:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:2;return this.checkExistance(e)&&void 0!==this[e]?parseFloat(this[e]).toFixed(t):parseFloat(0).toFixed(t)}}}})()})();
(function ($){
if(awdr_params.refresh_order_review=='1'){
$(document).on('change', 'input[name="payment_method"],input[name="billing_city"],input[name="billing_postcode"]', function (){
refreshCart();
});
$(document).on('blur', 'input[name="billing_email"], select#billing_state', function (){
refreshCart();
});
}
function refreshCart(){
$('body').trigger('update_checkout');
}
$(document).ready(function ($){
function init_events(){
if(awdr_params.enable_update_price_with_qty=='show_dynamically'){
function getWDRDPTarget(form, target, is_variable){
let $price_place='';
if(form.find(target).length){
$price_place=form.find(target).first();
if(is_variable===true){
if(!form.find(target+' .price').length){
$price_place.html("<div class='price'></div>");
}
$price_place=form.find(target+' .price').first();
}}else{
$price_place=$(target).first();
if(is_variable===true){
if(!$(target+' .price').length){
$price_place.html("<div class='price'></div>");
}
$price_place=$(target+' .price').first();
}}
return $price_place;
}
$(document).on('change', '[name="quantity"]', function (){
var awdr_qty_object=$(this);
setTimeout(function(){
var $qty=awdr_qty_object.val();
var $product_id=0;
var $price_place="";
var form=awdr_qty_object.closest("form");
if(form.find('button[name="add-to-cart"]').length){
$product_id=form.find('button[name="add-to-cart"]').first().val();
var target='div.product p.price';
if(awdr_params.custom_target_simple_product!=undefined){
if(awdr_params.custom_target_simple_product!=""){
target=awdr_params.custom_target_simple_product;
}}
$price_place=getWDRDPTarget(form, target, false);
}else if(form.find('input[name="variation_id"]').length){
$product_id=form.find('input[name="variation_id"]').val();
var target='div.product .woocommerce-variation-price';
if(awdr_params.custom_target_variable_product!=undefined){
if(awdr_params.custom_target_variable_product!=""){
target=awdr_params.custom_target_variable_product;
}}
$price_place=getWDRDPTarget(form, target, true);
}else if(form.find('input[name="add-to-cart"]').length){
$product_id=form.find('input[name="add-to-cart"]').first().val();
var target='div.product p.price';
if(awdr_params.custom_target_simple_product!=undefined){
if(awdr_params.custom_target_simple_product!=""){
target=awdr_params.custom_target_simple_product;
}}
$price_place=getWDRDPTarget(form, target, false);
}
if(!$product_id||$product_id==0){
if(awdr_params.custom_simple_product_id_selector!=undefined){
if(awdr_params.custom_simple_product_id_selector!=""){
let simple_product_id_selector=awdr_params.custom_simple_product_id_selector;
$product_id=$(simple_product_id_selector).val();
let target='div.product p.price';
if(awdr_params.custom_target_simple_product!=undefined){
if(awdr_params.custom_target_simple_product!=""){
target=awdr_params.custom_target_simple_product;
}}
$price_place=getWDRDPTarget(form, target, false);
}}
if(awdr_params.custom_variable_product_id_selector!=undefined){
if(awdr_params.custom_variable_product_id_selector!=""){
let variable_product_id_selector=awdr_params.custom_variable_product_id_selector;
$product_id=$(variable_product_id_selector).val();
let target='div.product .woocommerce-variation-price';
if(awdr_params.custom_target_variable_product!=undefined){
if(awdr_params.custom_target_variable_product!=""){
target=awdr_params.custom_target_variable_product;
}}
$price_place=getWDRDPTarget(form, target, true);
}}
}
if(!$product_id||!$price_place||$product_id==0){
return;
}
var data={
action: 'wdr_ajax',
method: 'get_price_html',
product_id: $product_id,
qty: $qty,
awdr_nonce: awdr_params.nonce,
};
$.ajax({
url: awdr_params.ajaxurl,
data: data,
type: 'POST',
success: function (response){
if(response.price_html){
$price_place.html(response.price_html)
}else{
if(response.original_price_html!=undefined){
$price_place.html(response.original_price_html)
}}
$(document).trigger('wdr_dynamic_price_update', [response]);
},
error: function (response){
$price_place.html("")
}});
}, 0);
});
}}
if(awdr_params.js_init_trigger){
$(document).on(awdr_params.js_init_trigger, function (){
init_events();
});
}
init_events();
if(awdr_params.awdr_dynamic_bulk_table_status=="1"){
if(awdr_params.awdr_dynamic_bulk_table_off=="on"){
function awdr_load_variation_table(variation_id){
setTimeout(function(){
if(variation_id!=''&&variation_id!='0'){
var data={
action: 'wdr_ajax',
method: 'get_variable_product_bulk_table',
product_id: variation_id,
awdr_nonce: awdr_params.nonce,
};
let awdr_opacity='div.awdr-bulk-customizable-table';
if(awdr_params.awdr_opacity_to_bulk_table!=undefined){
if(awdr_params.awdr_opacity_to_bulk_table!=""){
awdr_opacity=awdr_params.awdr_opacity_to_bulk_table;
}}
$.ajax({
url: awdr_params.ajaxurl,
data: data,
type: 'POST',
beforeSend: function (){
$(awdr_opacity).css('opacity','0.5');
},
complete: function (){
$(awdr_opacity).css('opacity','1');
},
success: function (response){
if(response.bulk_table){
$('.awdr-bulk-customizable-table').html(response.bulk_table);
}},
error: function (response){
$('.awdr-bulk-customizable-table').html("")
}});
}}, 100);
}
$(".single_variation_wrap").on("hide_variation", function(event){
let variation_id=$(this).closest('form').find('input[name="product_id"]').val();
awdr_load_variation_table(variation_id);
});
$(".single_variation_wrap").on("show_variation", function(event, variation, purchasable){
let variation_id=variation.variation_id;
if(variation.is_bundled!=undefined){
if(variation.is_bundled==true){
return;
}}
awdr_load_variation_table(variation_id);
});
}}
});
})(jQuery);
(function ($){
$.extend({
AdvanceWooDiscountRules: {
form: null,
product_id: null,
quantity: 0,
options: [],
target: null,
getDynamicDiscountPriceFromCartForm: function($form, $target, $options){
if(typeof $options!=='undefined'){
this.options=$options;
}
if(typeof $target!=='undefined'){
this.target=$target;
}
if(typeof $form!=='undefined'&&$form.is('form')){
this.form=$form;
}else{
this.logError("Incorrect form provided");
}
this.product_id=this.getProductIdFromForm();
this.quantity=this.getProductQuantityFromForm();
this.getDiscountPriceForProduct();
},
getDiscountPriceForProduct: function (){
if(this.product_id===null||this.product_id==0){
this.logError("Invalid product");
return [];
}
var data={
action: 'awdr_get_product_discount',
product_id: this.product_id,
qty: this.quantity,
awdr_nonce: awdr_params.nonce,
};
if(typeof this.options.custom_price!=='undefined'){
data.custom_price=this.options.custom_price;
}
var $target=this.target;
var $options=this.options;
$.ajax({
url: awdr_params.ajaxurl,
data: data,
type: 'POST',
success: function (response){
$(document.body).trigger("advanced_woo_discount_rules_on_get_response_for_dynamic_discount", [ response, $target, $options ]);
},
error: function (response){
}});
},
getProductIdFromForm: function (){
var variationIdEl=this.form.find('[name="variation_id"]');
var productIdEl=this.form.find('[name="add-to-cart"]');
if(variationIdEl.length){
return parseInt(variationIdEl.val());
}else if(productIdEl.length){
return parseInt(productIdEl.val());
}
return false;
},
getProductQuantityFromForm: function (){
var $input=this.form.find('input[name="quantity"]');
if($input.length===0){
return 0;
}
return $input.val();
},
logError: function($text){
console.error("Advance discount rule error: %s", $text);
}}
});
})(jQuery);