@bridgeline-digital/hawksearch-handlebars-ui 5.2.2 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +6 -0
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={675:function(e){var t;t=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(2)),r=i(n(45)),s=n(46),o=n(51),l=i(n(52)),c=i(n(49)),u=i(n(44)),d=a.default.create;function h(){var e=d();return e.compile=function(t,n){return o.compile(t,n,e)},e.precompile=function(t,n){return o.precompile(t,n,e)},e.AST=r.default,e.Compiler=o.Compiler,e.JavaScriptCompiler=l.default,e.Parser=s.parser,e.parse=s.parse,e.parseWithoutProcessing=s.parseWithoutProcessing,e}var p=h();p.create=h,u.default(p),p.Visitor=c.default,p.default=p,t.default=p,e.exports=t.default},function(e,t){"use strict";t.default=function(e){return e&&e.__esModule?e:{default:e}},t.__esModule=!0},function(e,t,n){"use strict";var i=n(3).default,a=n(1).default;t.__esModule=!0;var r=i(n(4)),s=a(n(37)),o=a(n(6)),l=i(n(5)),c=i(n(38)),u=a(n(44));function d(){var e=new r.HandlebarsEnvironment;return l.extend(e,r),e.SafeString=s.default,e.Exception=o.default,e.Utils=l,e.escapeExpression=l.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var h=d();h.create=d,u.default(h),h.default=h,t.default=h,e.exports=t.default},function(e,t){"use strict";t.default=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},t.__esModule=!0},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.HandlebarsEnvironment=d;var a=n(5),r=i(n(6)),s=n(10),o=n(30),l=i(n(32)),c=n(33);t.VERSION="4.7.7",t.COMPILER_REVISION=8,t.LAST_COMPATIBLE_COMPILER_REVISION=7,t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};var u="[object Object]";function d(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}d.prototype={constructor:d,logger:l.default,log:l.default.log,registerHelper:function(e,t){if(a.toString.call(e)===u){if(t)throw new r.default("Arg not supported with multiple helpers");a.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(a.toString.call(e)===u)a.extend(this.partials,e);else{if(void 0===t)throw new r.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(a.toString.call(e)===u){if(t)throw new r.default("Arg not supported with multiple decorators");a.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var h=l.default.log;t.log=h,t.createFrame=a.createFrame,t.logger=l.default},function(e,t){"use strict";t.__esModule=!0,t.extend=s,t.indexOf=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}return a.test(e)?e.replace(i,r):e},t.isEmpty=function(e){return!e&&0!==e||!(!c(e)||0!==e.length)},t.createFrame=function(e){var t=s({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,a=/[&<>"'`=]/;function r(e){return n[e]}function s(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;t.toString=o;var l=function(e){return"function"==typeof e};l(/x/)&&(t.isFunction=l=function(e){return"function"==typeof e&&"[object Function]"===o.call(e)}),t.isFunction=l;var c=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===o.call(e)};t.isArray=c},function(e,t,n){"use strict";var i=n(7).default;t.__esModule=!0;var a=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(e,t){var n=t&&t.loc,s=void 0,o=void 0,l=void 0,c=void 0;n&&(s=n.start.line,o=n.end.line,l=n.start.column,c=n.end.column,e+=" - "+s+":"+l);for(var u=Error.prototype.constructor.call(this,e),d=0;d<a.length;d++)this[a[d]]=u[a[d]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{n&&(this.lineNumber=s,this.endLineNumber=o,i?(Object.defineProperty(this,"column",{value:l,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:c,enumerable:!0})):(this.column=l,this.endColumn=c))}catch(e){}}r.prototype=new Error,t.default=r,e.exports=t.default},function(e,t,n){e.exports={default:n(8),__esModule:!0}},function(e,t,n){var i=n(9);e.exports=function(e,t,n){return i.setDesc(e,t,n)}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.registerDefaultHelpers=function(e){a.default(e),r.default(e),s.default(e),o.default(e),l.default(e),c.default(e),u.default(e)},t.moveHelperToHooks=function(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])};var a=i(n(11)),r=i(n(12)),s=i(n(25)),o=i(n(26)),l=i(n(27)),c=i(n(28)),u=i(n(29))},function(e,t,n){"use strict";t.__esModule=!0;var i=n(5);t.default=function(e){e.registerHelper("blockHelperMissing",(function(t,n){var a=n.inverse,r=n.fn;if(!0===t)return r(this);if(!1===t||null==t)return a(this);if(i.isArray(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):a(this);if(n.data&&n.ids){var s=i.createFrame(n.data);s.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:s}}return r(t,n)}))},e.exports=t.default},function(e,t,n){(function(i){"use strict";var a=n(13).default,r=n(1).default;t.__esModule=!0;var s=n(5),o=r(n(6));t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new o.default("Must pass iterator to #each");var n,r=t.fn,l=t.inverse,c=0,u="",d=void 0,h=void 0;function p(t,n,i){d&&(d.key=t,d.index=n,d.first=0===n,d.last=!!i,h&&(d.contextPath=h+t)),u+=r(e[t],{data:d,blockParams:s.blockParams([e[t],t],[h+t,null])})}if(t.data&&t.ids&&(h=s.appendContextPath(t.data.contextPath,t.ids[0])+"."),s.isFunction(e)&&(e=e.call(this)),t.data&&(d=s.createFrame(t.data)),e&&"object"==typeof e)if(s.isArray(e))for(var v=e.length;c<v;c++)c in e&&p(c,c,c===e.length-1);else if(i.Symbol&&e[i.Symbol.iterator]){for(var f=[],g=e[i.Symbol.iterator](),m=g.next();!m.done;m=g.next())f.push(m.value);for(v=(e=f).length;c<v;c++)p(c,c,c===e.length-1)}else n=void 0,a(e).forEach((function(e){void 0!==n&&p(n,c-1),n=e,c++})),void 0!==n&&p(n,c-1,!0);return 0===c&&(u=l(this)),u}))},e.exports=t.default}).call(t,function(){return this}())},function(e,t,n){e.exports={default:n(14),__esModule:!0}},function(e,t,n){n(15),e.exports=n(21).Object.keys},function(e,t,n){var i=n(16);n(18)("keys",(function(e){return function(t){return e(i(t))}}))},function(e,t,n){var i=n(17);e.exports=function(e){return Object(i(e))}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(19),a=n(21),r=n(24);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],s={};s[e]=t(n),i(i.S+i.F*r((function(){n(1)})),"Object",s)}},function(e,t,n){var i=n(20),a=n(21),r=n(22),s="prototype",o=function(e,t,n){var l,c,u,d=e&o.F,h=e&o.G,p=e&o.S,v=e&o.P,f=e&o.B,g=e&o.W,m=h?a:a[t]||(a[t]={}),k=h?i:p?i[t]:(i[t]||{})[s];for(l in h&&(n=t),n)(c=!d&&k&&l in k)&&l in m||(u=c?k[l]:n[l],m[l]=h&&"function"!=typeof k[l]?n[l]:f&&c?r(u,i):g&&k[l]==u?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[s]=e[s],t}(u):v&&"function"==typeof u?r(Function.call,u):u,v&&((m[s]||(m[s]={}))[l]=u))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,e.exports=o},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var i=n(23);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,a){return e.call(t,n,i,a)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(6));t.default=function(e){e.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new a.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=n(5),r=i(n(6));t.default=function(e){e.registerHelper("if",(function(e,t){if(2!=arguments.length)throw new r.default("#if requires exactly one argument");return a.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||a.isEmpty(e)?t.inverse(this):t.fn(this)})),e.registerHelper("unless",(function(t,n){if(2!=arguments.length)throw new r.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}))},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",(function(){for(var t=[void 0],n=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)t.push(arguments[i]);var a=1;null!=n.hash.level?a=n.hash.level:n.data&&null!=n.data.level&&(a=n.data.level),t[0]=a,e.log.apply(e,t)}))},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",(function(e,t,n){return e?n.lookupProperty(e,t):e}))},e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=n(5),r=i(n(6));t.default=function(e){e.registerHelper("with",(function(e,t){if(2!=arguments.length)throw new r.default("#with requires exactly one argument");a.isFunction(e)&&(e=e.call(this));var n=t.fn;if(a.isEmpty(e))return t.inverse(this);var i=t.data;return t.data&&t.ids&&((i=a.createFrame(t.data)).contextPath=a.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:i,blockParams:a.blockParams([e],[i&&i.contextPath])})}))},e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.registerDefaultDecorators=function(e){a.default(e)};var a=i(n(31))},function(e,t,n){"use strict";t.__esModule=!0;var i=n(5);t.default=function(e){e.registerDecorator("inline",(function(e,t,n,a){var r=e;return t.partials||(t.partials={},r=function(a,r){var s=n.partials;n.partials=i.extend({},s,t.partials);var o=e(a,r);return n.partials=s,o}),t.partials[a.args[0]]=a.fn,r}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var i=n(5),a={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=i.indexOf(a.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=a.lookupLevel(e),"undefined"!=typeof console&&a.lookupLevel(a.level)<=e){var t=a.methodMap[e];console[t]||(t="log");for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];console[t].apply(console,i)}}};t.default=a,e.exports=t.default},function(e,t,n){"use strict";var i=n(34).default,a=n(13).default,r=n(3).default;t.__esModule=!0,t.createProtoAccessControl=function(e){var t=i(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=i(null);return n.__proto__=!1,{properties:{whitelist:s.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:s.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},t.resultIsAllowed=function(e,t,n){return function(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(function(e){!0!==l[e]&&(l[e]=!0,o.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(t),!1)}("function"==typeof e?t.methods:t.properties,n)},t.resetLoggedProperties=function(){a(l).forEach((function(e){delete l[e]}))};var s=n(36),o=r(n(32)),l=i(null)},function(e,t,n){e.exports={default:n(35),__esModule:!0}},function(e,t,n){var i=n(9);e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){"use strict";var i=n(34).default;t.__esModule=!0,t.createNewLookupObject=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.extend.apply(void 0,[i(null)].concat(t))};var a=n(5)},function(e,t){"use strict";function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(39).default,a=n(13).default,r=n(3).default,s=n(1).default;t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,n=c.COMPILER_REVISION;if(!(t>=c.LAST_COMPATIBLE_COMPILER_REVISION&&t<=c.COMPILER_REVISION)){if(t<c.LAST_COMPATIBLE_COMPILER_REVISION){var i=c.REVISION_CHANGES[n],a=c.REVISION_CHANGES[t];throw new l.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+a+").")}throw new l.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}},t.template=function(e,t){if(!t)throw new l.default("No environment passed to template");if(!e||!e.main)throw new l.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&7===e.compiler[0],r={strict:function(e,t,n){if(!e||!(t in e))throw new l.default('"'+t+'" not defined in '+e,{loc:n});return r.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];return null==n||Object.prototype.hasOwnProperty.call(e,t)||h.resultIsAllowed(n,r.protoAccessControl,t)?n:void 0},lookup:function(e,t){for(var n=e.length,i=0;i<n;i++)if(null!=(e[i]&&r.lookupProperty(e[i],t)))return e[i][t]},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:o.escapeExpression,invokePartial:function(n,i,a){a.hash&&(i=o.extend({},i,a.hash),a.ids&&(a.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,i,a);var r=o.extend({},a,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),s=t.VM.invokePartial.call(this,n,i,r);if(null==s&&t.compile&&(a.partials[a.name]=t.compile(n,e.compilerOptions,t),s=a.partials[a.name](i,r)),null!=s){if(a.indent){for(var c=s.split("\n"),u=0,d=c.length;u<d&&(c[u]||u+1!==d);u++)c[u]=a.indent+c[u];s=c.join("\n")}return s}throw new l.default("The partial "+a.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var n=e[t];return n.decorator=e[t+"_d"],n},programs:[],program:function(e,t,n,i,a){var r=this.programs[e],s=this.fn(e);return t||a||i||n?r=p(this,e,s,t,n,i,a):r||(r=this.programs[e]=p(this,e,s)),r},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=o.extend({},t,e)),n},nullContext:i({}),noop:t.VM.noop,compilerInfo:e.compiler};function s(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.data;s._setup(n),!n.partial&&e.useData&&(i=function(e,t){return t&&"root"in t||((t=t?c.createFrame(t):{}).root=e),t}(t,i));var a=void 0,o=e.useBlockParams?[]:void 0;function l(t){return""+e.main(r,t,r.helpers,r.partials,i,o,a)}return e.useDepths&&(a=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(l=f(e.main,l,r,n.depths||[],i,o))(t,n)}return s.isTop=!0,s._setup=function(i){if(i.partial)r.protoAccessControl=i.protoAccessControl,r.helpers=i.helpers,r.partials=i.partials,r.decorators=i.decorators,r.hooks=i.hooks;else{var s=o.extend({},t.helpers,i.helpers);!function(e,t){a(e).forEach((function(n){var i=e[n];e[n]=function(e,t){var n=t.lookupProperty;return d.wrapHelper(e,(function(e){return o.extend({lookupProperty:n},e)}))}(i,t)}))}(s,r),r.helpers=s,e.usePartial&&(r.partials=r.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(r.decorators=o.extend({},t.decorators,i.decorators)),r.hooks={},r.protoAccessControl=h.createProtoAccessControl(i);var l=i.allowCallsToHelperMissing||n;u.moveHelperToHooks(r,"helperMissing",l),u.moveHelperToHooks(r,"blockHelperMissing",l)}},s._child=function(t,n,i,a){if(e.useBlockParams&&!i)throw new l.default("must pass block params");if(e.useDepths&&!a)throw new l.default("must pass parent depths");return p(r,t,e[t],n,0,i,a)},s},t.wrapProgram=p,t.resolvePartial=function(e,t,n){return e?e.call||n.name||(n.name=e,e=n.partials[e]):e="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name],e},t.invokePartial=function(e,t,n){var i=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var a=void 0;if(n.fn&&n.fn!==v&&function(){n.data=c.createFrame(n.data);var e=n.fn;a=n.data["partial-block"]=function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=c.createFrame(n.data),n.data["partial-block"]=i,e(t,n)},e.partials&&(n.partials=o.extend({},n.partials,e.partials))}(),void 0===e&&a&&(e=a),void 0===e)throw new l.default("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)},t.noop=v;var o=r(n(5)),l=s(n(6)),c=n(4),u=n(10),d=n(43),h=n(33);function p(e,t,n,i,a,r,s){function o(t){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=s;return!s||t==s[0]||t===e.nullContext&&null===s[0]||(o=[t].concat(s)),n(e,t,e.helpers,e.partials,a.data||i,r&&[a.blockParams].concat(r),o)}return(o=f(n,o,e,s,i,r)).program=t,o.depth=s?s.length:0,o.blockParams=a||0,o}function v(){return""}function f(e,t,n,i,a,r){if(e.decorator){var s={};t=e.decorator(t,s,n,i&&i[0],a,r,i),o.extend(t,s)}return t}},function(e,t,n){e.exports={default:n(40),__esModule:!0}},function(e,t,n){n(41),e.exports=n(21).Object.seal},function(e,t,n){var i=n(42);n(18)("seal",(function(e){return function(t){return e&&i(t)?e(t):t}}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){"use strict";t.__esModule=!0,t.wrapHelper=function(e,t){return"function"!=typeof e?e:function(){return arguments[arguments.length-1]=t(arguments[arguments.length-1]),e.apply(this,arguments)}}},function(e,t){(function(n){"use strict";t.__esModule=!0,t.default=function(e){var t=void 0!==n?n:window,i=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=i),e}},e.exports=t.default}).call(t,function(){return this}())},function(e,t){"use strict";t.__esModule=!0;var n={helpers:{helperExpression:function(e){return"SubExpression"===e.type||("MustacheStatement"===e.type||"BlockStatement"===e.type)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return 1===e.parts.length&&!n.helpers.scopedId(e)&&!e.depth}}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default,a=n(3).default;t.__esModule=!0,t.parseWithoutProcessing=u,t.parse=function(e,t){var n=u(e,t);return new s.default(t).accept(n)};var r=i(n(47)),s=i(n(48)),o=a(n(50)),l=n(5);t.parser=r.default;var c={};function u(e,t){return"Program"===e.type?e:(r.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},r.default.parse(e))}l.extend(c,o)},function(e,t){"use strict";t.__esModule=!0;var n=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,n,i,a,r,s){var o=r.length-1;switch(a){case 1:return r[o-1];case 2:this.$=i.prepareProgram(r[o]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:case 40:case 41:this.$=r[o];break;case 9:this.$={type:"CommentStatement",value:i.stripComment(r[o]),strip:i.stripFlags(r[o],r[o]),loc:i.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:r[o],value:r[o],loc:i.locInfo(this._$)};break;case 11:this.$=i.prepareRawBlock(r[o-2],r[o-1],r[o],this._$);break;case 12:this.$={path:r[o-3],params:r[o-2],hash:r[o-1]};break;case 13:this.$=i.prepareBlock(r[o-3],r[o-2],r[o-1],r[o],!1,this._$);break;case 14:this.$=i.prepareBlock(r[o-3],r[o-2],r[o-1],r[o],!0,this._$);break;case 15:this.$={open:r[o-5],path:r[o-4],params:r[o-3],hash:r[o-2],blockParams:r[o-1],strip:i.stripFlags(r[o-5],r[o])};break;case 16:case 17:this.$={path:r[o-4],params:r[o-3],hash:r[o-2],blockParams:r[o-1],strip:i.stripFlags(r[o-5],r[o])};break;case 18:this.$={strip:i.stripFlags(r[o-1],r[o-1]),program:r[o]};break;case 19:var l=i.prepareBlock(r[o-2],r[o-1],r[o],r[o],!1,this._$),c=i.prepareProgram([l],r[o-1].loc);c.chained=!0,this.$={strip:r[o-2].strip,program:c,chain:!0};break;case 21:this.$={path:r[o-1],strip:i.stripFlags(r[o-2],r[o])};break;case 22:case 23:this.$=i.prepareMustache(r[o-3],r[o-2],r[o-1],r[o-4],i.stripFlags(r[o-4],r[o]),this._$);break;case 24:this.$={type:"PartialStatement",name:r[o-3],params:r[o-2],hash:r[o-1],indent:"",strip:i.stripFlags(r[o-4],r[o]),loc:i.locInfo(this._$)};break;case 25:this.$=i.preparePartialBlock(r[o-2],r[o-1],r[o],this._$);break;case 26:this.$={path:r[o-3],params:r[o-2],hash:r[o-1],strip:i.stripFlags(r[o-4],r[o])};break;case 29:this.$={type:"SubExpression",path:r[o-3],params:r[o-2],hash:r[o-1],loc:i.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:r[o],loc:i.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:i.id(r[o-2]),value:r[o],loc:i.locInfo(this._$)};break;case 32:this.$=i.id(r[o-1]);break;case 35:this.$={type:"StringLiteral",value:r[o],original:r[o],loc:i.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(r[o]),original:Number(r[o]),loc:i.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===r[o],original:"true"===r[o],loc:i.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:i.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:i.locInfo(this._$)};break;case 42:this.$=i.preparePath(!0,r[o],this._$);break;case 43:this.$=i.preparePath(!1,r[o],this._$);break;case 44:r[o-2].push({part:i.id(r[o]),original:r[o],separator:r[o-1]}),this.$=r[o-2];break;case 45:this.$=[{part:i.id(r[o]),original:r[o]}];break;case 46:case 48:case 50:case 58:case 64:case 70:case 78:case 82:case 86:case 90:case 94:this.$=[];break;case 47:case 49:case 51:case 59:case 65:case 71:case 79:case 83:case 87:case 91:case 95:case 99:case 101:r[o-1].push(r[o]);break;case 98:case 100:this.$=[r[o]]}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=[0],n=[null],i=[],a=this.table,r="",s=0,o=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;i.push(c);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,h,p,v,f,g,m,k,y,w,b={};;){if(p=t[t.length-1],this.defaultActions[p]?v=this.defaultActions[p]:(null==d&&(w=void 0,"number"!=typeof(w=this.lexer.lex()||1)&&(w=this.symbols_[w]||w),d=w),v=a[p]&&a[p][d]),void 0===v||!v.length||!v[0]){var _="";if(!l){for(g in y=[],a[p])this.terminals_[g]&&g>2&&y.push("'"+this.terminals_[g]+"'");_=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:c,expected:y})}}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+d);switch(v[0]){case 1:t.push(d),n.push(this.lexer.yytext),i.push(this.lexer.yylloc),t.push(v[1]),d=null,h?(d=h,h=null):(o=this.lexer.yyleng,r=this.lexer.yytext,s=this.lexer.yylineno,c=this.lexer.yylloc,l>0&&l--);break;case 2:if(m=this.productions_[v[1]][1],b.$=n[n.length-m],b._$={first_line:i[i.length-(m||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(m||1)].first_column,last_column:i[i.length-1].last_column},u&&(b._$.range=[i[i.length-(m||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.call(b,r,o,s,this.yy,v[1],n,i)))return f;m&&(t=t.slice(0,-1*m*2),n=n.slice(0,-1*m),i=i.slice(0,-1*m)),t.push(this.productions_[v[1]][0]),n.push(b.$),i.push(b._$),k=a[t[t.length-2]][t[t.length-1]],t.push(k);break;case 3:return!0}}return!0}},t={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,n,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length&&(!(n=this._input.match(this.rules[r[s]]))||t&&!(n[0].length>t[0].length)||(t=n,i=s,this.options.flex));s++);return t?((a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,i){function a(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if("\\\\"===t.yytext.slice(-2)?(a(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(a(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:case 5:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(a(5,9),"END_RAW_BLOCK");case 6:case 22:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:case 23:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 24:return 73;case 25:case 26:case 41:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=a(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=a(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};function n(){this.yy={}}return e.lexer=t,n.prototype=e,e.Parser=n,new n}();t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(49));function r(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=e}function s(e,t,n){void 0===t&&(t=e.length);var i=e[t-1],a=e[t-2];return i?"ContentStatement"===i.type?(a||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original):void 0:n}function o(e,t,n){void 0===t&&(t=-1);var i=e[t+1],a=e[t+2];return i?"ContentStatement"===i.type?(a||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original):void 0:n}function l(e,t,n){var i=e[null==t?0:t+1];if(i&&"ContentStatement"===i.type&&(n||!i.rightStripped)){var a=i.value;i.value=i.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==a}}function c(e,t,n){var i=e[null==t?e.length-1:t-1];if(i&&"ContentStatement"===i.type&&(n||!i.leftStripped)){var a=i.value;return i.value=i.value.replace(n?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==a,i.leftStripped}}r.prototype=new a.default,r.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var i=e.body,a=0,r=i.length;a<r;a++){var u=i[a],d=this.accept(u);if(d){var h=s(i,a,n),p=o(i,a,n),v=d.openStandalone&&h,f=d.closeStandalone&&p,g=d.inlineStandalone&&h&&p;d.close&&l(i,a,!0),d.open&&c(i,a,!0),t&&g&&(l(i,a),c(i,a)&&"PartialStatement"===u.type&&(u.indent=/([ \t]+$)/.exec(i[a-1].original)[1])),t&&v&&(l((u.program||u.inverse).body),c(i,a)),t&&f&&(l(i,a),c((u.inverse||u.program).body))}}return e},r.prototype.BlockStatement=r.prototype.DecoratorBlock=r.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,i=n,a=n;if(n&&n.chained)for(i=n.body[0].program;a.chained;)a=a.body[a.body.length-1].program;var r={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:s((i||t).body)};if(e.openStrip.close&&l(t.body,null,!0),n){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&l(i.body,null,!0),e.closeStrip.open&&c(a.body,null,!0),!this.options.ignoreStandalone&&s(t.body)&&o(i.body)&&(c(t.body),l(i.body))}else e.closeStrip.open&&c(t.body,null,!0);return r},r.prototype.Decorator=r.prototype.MustacheStatement=function(e){return e.strip},r.prototype.PartialStatement=r.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(6));function r(){this.parents=[]}function s(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function o(e){s.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function l(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}r.prototype={constructor:r,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!r.prototype[n.type])throw new a.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new a.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new a.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);return this.current=this.parents.shift(),!this.mutating||t?t:!1!==t?e:void 0}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:s,Decorator:s,BlockStatement:o,DecoratorBlock:o,PartialStatement:l,PartialBlockStatement:function(e){l.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:s,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.SourceLocation=function(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}},t.id=function(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e},t.stripFlags=function(e,t){return{open:"~"===e.charAt(2),close:"~"===t.charAt(t.length-3)}},t.stripComment=function(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},t.preparePath=function(e,t,n){n=this.locInfo(n);for(var i=e?"@":"",r=[],s=0,o=0,l=t.length;o<l;o++){var c=t[o].part,u=t[o].original!==c;if(i+=(t[o].separator||"")+c,u||".."!==c&&"."!==c&&"this"!==c)r.push(c);else{if(r.length>0)throw new a.default("Invalid path: "+i,{loc:n});".."===c&&s++}}return{type:"PathExpression",data:e,depth:s,parts:r,original:i,loc:n}},t.prepareMustache=function(e,t,n,i,a,r){var s=i.charAt(3)||i.charAt(2),o="{"!==s&&"&"!==s;return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:e,params:t,hash:n,escaped:o,strip:a,loc:this.locInfo(r)}},t.prepareRawBlock=function(e,t,n,i){r(e,n);var a={type:"Program",body:t,strip:{},loc:i=this.locInfo(i)};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}},t.prepareBlock=function(e,t,n,i,s,o){i&&i.path&&r(e,i);var l=/\*/.test(e.open);t.blockParams=e.blockParams;var c=void 0,u=void 0;if(n){if(l)throw new a.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=i.strip),u=n.strip,c=n.program}return s&&(s=c,c=t,t=s),{type:l?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:c,openStrip:e.strip,inverseStrip:u,closeStrip:i&&i.strip,loc:this.locInfo(o)}},t.prepareProgram=function(e,t){if(!t&&e.length){var n=e[0].loc,i=e[e.length-1].loc;n&&i&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:e,strip:{},loc:t}},t.preparePartialBlock=function(e,t,n,i){return r(e,n),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}};var a=i(n(6));function r(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var n={loc:e.path.loc};throw new a.default(e.path.original+" doesn't match "+t,n)}}},function(e,t,n){"use strict";var i=n(34).default,a=n(1).default;t.__esModule=!0,t.Compiler=c,t.precompile=function(e,t,n){if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);"data"in(t=t||{})||(t.data=!0),t.compat&&(t.useDepths=!0);var i=n.parse(e,t),a=(new n.Compiler).compile(i,t);return(new n.JavaScriptCompiler).compile(a,t)},t.compile=function(e,t,n){if(void 0===t&&(t={}),null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);"data"in(t=s.extend({},t))||(t.data=!0),t.compat&&(t.useDepths=!0);var i=void 0;function a(){var i=n.parse(e,t),a=(new n.Compiler).compile(i,t),r=(new n.JavaScriptCompiler).compile(a,t,void 0,!0);return n.template(r)}function o(e,t){return i||(i=a()),i.call(this,e,t)}return o._setup=function(e){return i||(i=a()),i._setup(e)},o._child=function(e,t,n,r){return i||(i=a()),i._child(e,t,n,r)},o};var r=a(n(6)),s=n(5),o=a(n(45)),l=[].slice;function c(){}function u(e,t){if(e===t)return!0;if(s.isArray(e)&&s.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1;return!0}}function d(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}c.prototype={compiler:c,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var i=this.opcodes[n],a=e.opcodes[n];if(i.opcode!==a.opcode||!u(i.args,a.args))return!1}for(t=this.children.length,n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=s.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(!this[e.type])throw new r.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,i=0;i<n;i++)this.accept(t[i]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){d(e);var t=e.program,n=e.inverse;t=t&&this.compileProgram(t),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);"helper"===i?this.helperSexpr(e,t,n):"simple"===i?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new r.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,a="SubExpression"===e.name.type;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",a,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){d(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var i=e.path,a=i.parts[0],r=null!=t||null!=n;this.opcode("getContext",i.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",a,r)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var i=this.setupFullMustacheParams(e,t,n),a=e.path,s=a.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new r.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",i.length,a.original,o.default.helpers.simpleId(a))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=o.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(t);i?this.opcode("lookupBlockParam",i,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,i=t.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(t[n].value);for(;n--;)this.opcode("assignToHash",t[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:l.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=o.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&o.default.helpers.helperExpression(e),a=!n&&(i||t);if(a&&!i){var r=e.path.parts[0],s=this.options;s.knownHelpers[r]?i=!0:s.knownHelpersOnly&&(a=!1)}return i?"helper":a?"ambiguous":"simple"},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=null!=e.value?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),"SubExpression"===e.type&&this.accept(e);else{if(this.trackIds){var n=void 0;if(!e.parts||o.default.helpers.scopedId(e)||e.depth||(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else(t=e.original||t).replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,i){var a=e.params;return this.pushParams(a),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),a},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var i=this.options.blockParams[t],a=i&&s.indexOf(i,e);if(i&&a>=0)return[t,a]}}}},function(e,t,n){"use strict";var i=n(13).default,a=n(1).default;t.__esModule=!0;var r=n(4),s=a(n(6)),o=n(5),l=a(n(53));function c(e){this.value=e}function u(){}u.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return o.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,i){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var a=e.opcodes,r=void 0,o=void 0,l=void 0,c=void 0;for(l=0,c=a.length;l<c;l++)r=a[l],this.source.currentLocation=r.loc,o=o||r.loc,this[r.opcode].apply(this,r.args);if(this.source.currentLocation=o,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new s.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(i);if(this.isChild)return u;var d={compiler:this.compilerInfo(),main:u};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var h=this.context,p=h.programs,v=h.decorators;for(l=0,c=p.length;l<c;l++)p[l]&&(d[l]=p[l],v[l]&&(d[l+"_d"]=v[l],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),i?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),t.srcName?(d=d.toStringWithSourceMap({file:t.destName})).map=d.map&&d.map.toString():d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new l.default(this.options.srcName),this.decorators=new l.default(this.options.srcName)},createFunctionContext:function(e){var t=this,n="",a=this.stackVars.concat(this.registers.list);a.length>0&&(n+=", "+a.join(", "));var r=0;i(this.aliases).forEach((function(e){var i=t.aliases[e];i.children&&i.referenceCount>1&&(n+=", alias"+ ++r+"="+e,i.children[0]="alias"+r)})),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var o=this.mergeSource(n);return e?(s.push(o),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n ",o,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,i=void 0,a=void 0,r=void 0,s=void 0;return this.source.each((function(e){e.appendToBuffer?(r?e.prepend(" + "):r=e,s=e):(r&&(a?r.prepend("buffer += "):i=!0,s.add(";"),r=s=void 0),a=!0,t||(n=!1))})),n?r?(r.prepend("return "),s.add(";")):a||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack((function(e){return[" != null ? ",e,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,i){var a=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[a++])),this.resolvePath("context",e,a,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,i,a){var r=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,n,i){var a=t.popStack(),r=0,s=n.length;for(e&&s--;r<s;r++)a=t.nameLookup(a,n[r],i);return e?[t.aliasable("container.strict"),"(",a,", ",t.quotedString(n[r]),", ",JSON.stringify(t.source.currentLocation)," )"]:a}(this.options.strict&&a,this,t,e));else for(var s=t.length;n<s;n++)this.replaceStack((function(a){var s=r.nameLookup(a,t[n],e);return i?[" && ",s]:[" != null ? ",s," : ",a]}))},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),"SubExpression"!==t&&("string"==typeof e?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){null!=e?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var n=this.nameLookup("decorators",t,"decorator"),i=this.setupHelperArgs(t,e);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,t,n){var i=this.popStack(),a=this.setupHelper(e,t),r=[];n&&r.push(a.name),r.push(i),this.options.strict||r.push(this.aliasable("container.hooks.helperMissing"));var s=["(",this.itemsSeparatedBy(r,"||"),")"],o=this.source.functionCall(s,"call",a.callParams);this.push(o)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(t,e[i]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,t),a=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",e,"helper")," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,t,n){var i=[],a=this.setupParams(t,1,i);e&&(t=this.popStack(),delete a.name),n&&(a.indent=JSON.stringify(n)),a.helpers="helpers",a.partials="partials",a.decorators="container.decorators",e?i.unshift(t):i.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(a.depths="depths"),a=this.objectLiteral(a),i.push(a),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var t=this.popStack(),n=void 0,i=void 0,a=void 0;this.trackIds&&(a=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var r=this.hash;n&&(r.contexts[e]=n),i&&(r.types[e]=i),a&&(r.ids[e]=a),r.values[e]=t},pushId:function(e,t,n){"BlockParam"===e?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===e?this.pushString(t):"SubExpression"===e?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:u,compileChildren:function(e,t){for(var n=e.children,i=void 0,a=void 0,r=0,s=n.length;r<s;r++){i=n[r],a=new this.compiler;var o=this.matchExistingProgram(i);if(null==o){this.context.programs.push("");var l=this.context.programs.length;i.index=l,i.name="program"+l,this.context.programs[l]=a.compile(i,t,this.context,!this.precompile),this.context.decorators[l]=a.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||a.useDepths,this.useBlockParams=this.useBlockParams||a.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=o.index,i.name="program"+o.index,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var i=this.context.environments[t];if(i&&i.equals(e))return i}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof c||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new c(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],n=void 0,i=void 0,a=void 0;if(!this.isInline())throw new s.default("replaceStack on non-inline");var r=this.popStack(!0);if(r instanceof c)t=["(",n=[r.value]],a=!0;else{i=!0;var o=this.incrStack();t=["((",this.push(o)," = ",r,")"],n=this.topStack()}var l=e.call(this,n);a||this.popStack(),i&&this.stackSlot--,this.push(t.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var i=e[t];if(i instanceof c)this.compileStack.push(i);else{var a=this.incrStack();this.pushSource([a," = ",i,";"]),this.compileStack.push(a)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof c)return n.value;if(!t){if(!this.stackSlot)throw new s.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof c?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):((t=this.aliases[e]=this.source.wrap(e)).aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var i=[];return{params:i,paramsInit:this.setupHelperArgs(t,e,i,n),name:this.nameLookup("helpers",t,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(i)}},setupParams:function(e,t,n){var i={},a=[],r=[],s=[],o=!n,l=void 0;o&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var c=this.popStack(),u=this.popStack();(u||c)&&(i.fn=u||"container.noop",i.inverse=c||"container.noop");for(var d=t;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(s[d]=this.popStack()),this.stringParams&&(r[d]=this.popStack(),a[d]=this.popStack());return o&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(s)),this.stringParams&&(i.types=this.source.generateArray(r),i.contexts=this.source.generateArray(a)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,t,n,i){var a=this.setupParams(e,t,n);return a.loc=JSON.stringify(this.source.currentLocation),a=this.objectLiteral(a),i?(this.useRegister("options"),n.push("options"),["options=",a]):n?(n.push(a),""):a}},function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=u.RESERVED_WORDS={},n=0,i=e.length;n<i;n++)t[e[n]]=!0}(),u.isValidJavaScriptVariableName=function(e){return!u.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)},t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(13).default;t.__esModule=!0;var a=n(5),r=void 0;function s(e,t,n){if(a.isArray(e)){for(var i=[],r=0,s=e.length;r<s;r++)i.push(t.wrap(e[r],n));return i}return"boolean"==typeof e||"number"==typeof e?e+"":e}function o(e){this.srcFile=e,this.source=[]}r||((r=function(e,t,n,i){this.src="",i&&this.add(i)}).prototype={add:function(e){a.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){a.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),o.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each((function(t){e.add([" ",t,"\n"])})),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=s(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?"."+t+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=this,n=[];i(e).forEach((function(i){var a=s(e[i],t);"undefined"!==a&&n.push([t.quotedString(i),":",a])}));var a=this.generateList(n);return a.prepend("{"),a.add("}"),a},generateList:function(e){for(var t=this.empty(),n=0,i=e.length;n<i;n++)n&&t.add(","),t.add(s(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}},t.default=o,e.exports=t.default}])},e.exports=t()}},t={};function n(i){var a=t[i];if(void 0!==a)return a.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var a=i.length-1;a>-1&&!e;)e=i[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";var e=n(675);const t=Array.isArray,i="object"==typeof global&&global&&global.Object===Object&&global;var a="object"==typeof self&&self&&self.Object===Object&&self;const r=i||a||Function("return this")(),s=r.Symbol;var o=Object.prototype,l=o.hasOwnProperty,c=o.toString,u=s?s.toStringTag:void 0;var d=Object.prototype.toString;var h=s?s.toStringTag:void 0;const p=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?function(e){var t=l.call(e,u),n=e[u];try{e[u]=void 0;var i=!0}catch(e){}var a=c.call(e);return i&&(t?e[u]=n:delete e[u]),a}(e):function(e){return d.call(e)}(e)},v=function(e){return null!=e&&"object"==typeof e},f=function(e){return"symbol"==typeof e||v(e)&&"[object Symbol]"==p(e)};var g=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m=/^\w*$/;const k=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},y=function(e){if(!k(e))return!1;var t=p(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},w=r["__core-js_shared__"];var b,_=(b=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"";var S=Function.prototype.toString;const E=function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var x=/^\[object .+?Constructor\]$/,P=Function.prototype,C=Object.prototype,H=P.toString,I=C.hasOwnProperty,M=RegExp("^"+H.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const q=function(e){return!(!k(e)||(t=e,_&&_ in t))&&(y(e)?M:x).test(E(e));var t},L=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return q(n)?n:void 0},R=L(Object,"create");var A=Object.prototype.hasOwnProperty;var D=Object.prototype.hasOwnProperty;function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}O.prototype.clear=function(){this.__data__=R?R(null):{},this.size=0},O.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},O.prototype.get=function(e){var t=this.__data__;if(R){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return A.call(t,e)?t[e]:void 0},O.prototype.has=function(e){var t=this.__data__;return R?void 0!==t[e]:D.call(t,e)},O.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=R&&void 0===t?"__lodash_hash_undefined__":t,this};const F=O,N=function(e,t){return e===t||e!=e&&t!=t},T=function(e,t){for(var n=e.length;n--;)if(N(e[n][0],t))return n;return-1};var j=Array.prototype.splice;function V(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}V.prototype.clear=function(){this.__data__=[],this.size=0},V.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0||(n==t.length-1?t.pop():j.call(t,n,1),--this.size,0))},V.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},V.prototype.has=function(e){return T(this.__data__,e)>-1},V.prototype.set=function(e,t){var n=this.__data__,i=T(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};const U=V,$=L(r,"Map"),B=function(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map};function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}z.prototype.clear=function(){this.size=0,this.__data__={hash:new F,map:new($||U),string:new F}},z.prototype.delete=function(e){var t=B(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return B(this,e).get(e)},z.prototype.has=function(e){return B(this,e).has(e)},z.prototype.set=function(e,t){var n=B(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};const W=z;function Q(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return n.cache=r.set(a,s)||r,s};return n.cache=new(Q.Cache||W),n}Q.Cache=W;var Z,K,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/\\(\\)?/g;const X=(Z=Q((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Y,(function(e,n,i,a){t.push(i?a.replace(G,"$1"):n||e)})),t}),(function(e){return 500===K.size&&K.clear(),e})),K=Z.cache,Z);var J=s?s.prototype:void 0,ee=J?J.toString:void 0;const te=function e(n){if("string"==typeof n)return n;if(t(n))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(n,e)+"";if(f(n))return ee?ee.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i},ne=function(e){return null==e?"":te(e)},ie=function(e,n){return t(e)?e:function(e,n){if(t(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!f(e))||m.test(e)||!g.test(e)||null!=n&&e in Object(n)}(e,n)?[e]:X(ne(e))},ae=function(e){if("string"==typeof e||f(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},re=function(e,t,n){var i=null==e?void 0:function(e,t){for(var n=0,i=(t=ie(t,e)).length;null!=e&&n<i;)e=e[ae(t[n++])];return n&&n==i?e:void 0}(e,t);return void 0===i?n:i},se=function(){try{var e=L(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),oe=function(e,t,n){"__proto__"==t&&se?se(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var le=Object.prototype.hasOwnProperty;const ce=function(e,t,n){var i=e[t];le.call(e,t)&&N(i,n)&&(void 0!==n||t in e)||oe(e,t,n)},ue=function(e,t,n,i){var a=!n;n||(n={});for(var r=-1,s=t.length;++r<s;){var o=t[r],l=i?i(n[o],e[o],o,n,e):void 0;void 0===l&&(l=e[o]),a?oe(n,o,l):ce(n,o,l)}return n},de=function(e){return e};var he=Math.max;var pe=se?function(e,t){return se(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:de;const ve=pe;var fe=Date.now;const ge=(me=ve,ke=0,ye=0,function(){var e=fe(),t=16-(e-ye);if(ye=e,t>0){if(++ke>=800)return arguments[0]}else ke=0;return me.apply(void 0,arguments)});var me,ke,ye;const we=function(e,t){return ge(function(e,t,n){return t=he(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,r=he(i.length-t,0),s=Array(r);++a<r;)s[a]=i[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=i[a];return o[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,o)}}(e,t,de),e+"")},be=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},_e=function(e){return null!=e&&be(e.length)&&!y(e)};var Se=/^(?:0|[1-9]\d*)$/;const Ee=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Se.test(e))&&e>-1&&e%1==0&&e<t};var xe=Object.prototype;const Pe=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)},Ce=function(e){return v(e)&&"[object Arguments]"==p(e)};var He=Object.prototype,Ie=He.hasOwnProperty,Me=He.propertyIsEnumerable;const qe=Ce(function(){return arguments}())?Ce:function(e){return v(e)&&Ie.call(e,"callee")&&!Me.call(e,"callee")};var Le="object"==typeof exports&&exports&&!exports.nodeType&&exports,Re=Le&&"object"==typeof module&&module&&!module.nodeType&&module,Ae=Re&&Re.exports===Le?r.Buffer:void 0;const De=(Ae?Ae.isBuffer:void 0)||function(){return!1};var Oe={};Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object Boolean]"]=Oe["[object DataView]"]=Oe["[object Date]"]=Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object WeakMap]"]=!1;const Fe=function(e){return function(t){return e(t)}};var Ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,Te=Ne&&"object"==typeof module&&module&&!module.nodeType&&module,je=Te&&Te.exports===Ne&&i.process;const Ve=function(){try{return Te&&Te.require&&Te.require("util").types||je&&je.binding&&je.binding("util")}catch(e){}}();var Ue=Ve&&Ve.isTypedArray;const $e=Ue?Fe(Ue):function(e){return v(e)&&be(e.length)&&!!Oe[p(e)]};var Be=Object.prototype.hasOwnProperty;const ze=function(e,n){var i=t(e),a=!i&&qe(e),r=!i&&!a&&De(e),s=!i&&!a&&!r&&$e(e),o=i||a||r||s,l=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],c=l.length;for(var u in e)!n&&!Be.call(e,u)||o&&("length"==u||r&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ee(u,c))||l.push(u);return l},We=function(e,t){return function(n){return e(t(n))}},Qe=We(Object.keys,Object);var Ze=Object.prototype.hasOwnProperty;const Ke=function(e){return _e(e)?ze(e):function(e){if(!Pe(e))return Qe(e);var t=[];for(var n in Object(e))Ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)};var Ye=Object.prototype.hasOwnProperty;const Ge=(Je=function(e,t){if(Pe(t)||_e(t))ue(t,Ke(t),e);else for(var n in t)Ye.call(t,n)&&ce(e,n,t[n])},we((function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,r=i>2?t[2]:void 0;for(a=Je.length>3&&"function"==typeof a?(i--,a):void 0,r&&function(e,t,n){if(!k(n))return!1;var i=typeof t;return!!("number"==i?_e(n)&&Ee(t,n.length):"string"==i&&t in n)&&N(n[t],e)}(t[0],t[1],r)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&Je(e,s,n,a)}return e}))),Xe=n.p+"styles.65c0ab8e75ac4bcab10e99f66a160664.css";var Je;class et extends HTMLElement{constructor(){super(...arguments),this.handlebars=HawkSearch.handlebars}get configuration(){var e,t;const n=null===(e=HawkSearch.config.components)||void 0===e?void 0:e[this.componentName],i=this.getAttribute("config");if(!i&&!this.configOverride)return n;let a;return i?a=null!==(t=re(window,i))&&void 0!==t?t:void 0:this.configOverride&&(a=this.configOverride),Ge({},null!=n?n:{},a)}get shadowDom(){var e,t;return void 0!==(null===(e=this.configuration)||void 0===e?void 0:e.shadowDom)?this.configuration.shadowDom:null===(t=HawkSearch.config.shadowDom)||void 0===t||t}get rootElement(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}get eventName(){if(!this.bindFromEvent)return;let e=`hawksearch:bind-${this.componentName}`;return this.eventFilter&&(e=`${e}:${this.eventFilter}`),e}connectedCallback(){this.shadowDom&&this.attachShadow({mode:"open"}),this.registerHelpers();const e=this.getCustomTemplateHtml(),t=/\[\[((?!\[).+?)\]\]/g;let n=null!=e?e:this.defaultHtml;for(;t.test(n);)n=n.replace(t,"{{$1}}");this.template=this.handlebars.compile(n),setTimeout((()=>{this.render()})),this.eventName&&(this.bindEventHandler=e=>{this.data=e.detail,this.render()},window.addEventListener(this.eventName,this.bindEventHandler))}disconnectedCallback(){this.eventName&&this.bindEventHandler&&window.removeEventListener(this.eventName,this.bindEventHandler)}registerHelpers(){}render(){var e,t;if(!this.template||!this.renderContent())return this.rootElement.replaceChildren(),void(this.style.display="none");const n=this.getContentModel(),i=new CustomEvent(`hawksearch:before-${this.componentName}-rendered`,{detail:{component:this,contentModel:n}});dispatchEvent(i);const a=[];let r=[];if(!1!==(null===(e=HawkSearch.config.css)||void 0===e?void 0:e.defaultStyles)&&r.push(Xe),null===(t=HawkSearch.config.css)||void 0===t?void 0:t.customStyles){const e="string"==typeof HawkSearch.config.css.customStyles?[HawkSearch.config.css.customStyles]:HawkSearch.config.css.customStyles;r=r.concat(e)}r.forEach(((e,t)=>{const n=`hawksearch-handlebars-ui-css-${t}`;if(!this.shadowDom&&document.head.querySelector(`[id="${n}"]`))return;let i;if(/^.*?.css$/.test(e)){const t=document.createElement("link");t.id=n,t.type="text/css",t.rel="stylesheet",t.href=e,i=t}else{const t=document.getElementById(e);if(t instanceof HTMLTemplateElement){const e=t.content.cloneNode(!0).querySelector("style");e&&(e.id=n,i=e)}else{const t=document.createElement("style");t.id=n,t.innerHTML=e,i=t}}i&&(this.shadowDom?a.push(i):document.head.append(i))}));const s=document.createElement("template"),o=this.template(n);s.innerHTML=o;const l=s.content.cloneNode(!0);a.push(l),this.rootElement.replaceChildren(...a),this.style.display=s.innerHTML?"":"none",this.contentModel=n,this.bindChildElements(),this.onRender();const c=new CustomEvent(`hawksearch:after-${this.componentName}-rendered`,{detail:{component:this,contentModel:n}});dispatchEvent(c)}renderContent(){return!0}bindChildElements(){}onRender(){}getCustomTemplateHtml(){var e;let t=null===(e=this.configuration)||void 0===e?void 0:e.template;if(t){const e=document.getElementById(t);(e instanceof HTMLTemplateElement||e instanceof HTMLScriptElement)&&(t=e.innerHTML);const n={"{{>":"{{>"};Object.entries(n).forEach((([e,n])=>{const i=new RegExp(e,"g");t=t.replace(i,n)}))}return t}interpolate(e,t){let n=e;return Object.entries(t).forEach((([e,t])=>{n=n.replace("${"+e+"}",t)})),n}}class tt extends et{constructor(){super(...arguments),this.bindFromEvent=!1}}const nt=n.p+"placeholder.c99b7374b9bf579d0fd0.png";function it(e){e=e.toLowerCase().replace(/[^a-z]/g,"");const t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle}const at=(rt={"&":"&","<":"<",">":">",""":'"',"'":"'"},function(e){return null==rt?void 0:rt[e]});var rt,st=/&(?:amp|lt|gt|quot|#39);/g,ot=RegExp(st.source);const lt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ct;const ut=new Uint8Array(16);function dt(){if(!ct&&(ct="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ct))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ct(ut)}const ht=[];for(let e=0;e<256;++e)ht.push((e+256).toString(16).slice(1));const pt=function(e,t,n){if(lt.randomUUID&&!t&&!e)return lt.randomUUID();const i=(e=e||{}).random||(e.rng||dt)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(ht[e[t+0]]+ht[e[t+1]]+ht[e[t+2]]+ht[e[t+3]]+"-"+ht[e[t+4]]+ht[e[t+5]]+"-"+ht[e[t+6]]+ht[e[t+7]]+"-"+ht[e[t+8]]+ht[e[t+9]]+"-"+ht[e[t+10]]+ht[e[t+11]]+ht[e[t+12]]+ht[e[t+13]]+ht[e[t+14]]+ht[e[t+15]]).toLowerCase()}(i)};class vt{get onSearchPage(){const e=/\/+$/;return window.location.pathname.replace(e,"")===this.searchUrl.replace(e,"")}constructor(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k,y,w,b,_,S,E,x,P,C,H,I,M,q,L,R,A,D,O,F,N,T,j,V,U,$,B,z,W,Q,Z,K,Y,G,X,J,ee,te,ne,ie,ae,re,se,oe;this.queryStringParams={disableSpellcheck:(null===(t=null===(e=HawkSearch.config.search)||void 0===e?void 0:e.queryStringMappings)||void 0===t?void 0:t.disableSpellcheck)||"disableSpellcheck",page:(null===(i=null===(n=HawkSearch.config.search)||void 0===n?void 0:n.queryStringMappings)||void 0===i?void 0:i.page)||"page",pageSize:(null===(r=null===(a=HawkSearch.config.search)||void 0===a?void 0:a.queryStringMappings)||void 0===r?void 0:r.pageSize)||"pageSize",query:(null===(o=null===(s=HawkSearch.config.search)||void 0===s?void 0:s.queryStringMappings)||void 0===o?void 0:o.query)||"query",searchWithin:(null===(c=null===(l=HawkSearch.config.search)||void 0===l?void 0:l.queryStringMappings)||void 0===c?void 0:c.searchWithin)||"searchWithin",sort:(null===(d=null===(u=HawkSearch.config.search)||void 0===u?void 0:u.queryStringMappings)||void 0===d?void 0:d.sort)||"sort"},this.searchUrl=null!==(p=null===(h=HawkSearch.config.search)||void 0===h?void 0:h.url)&&void 0!==p?p:"/search",this.fieldMappings={description:this.getFieldMappings(null===(v=HawkSearch.config.fieldMappings)||void 0===v?void 0:v.description,["description","longdescription"]),imageUrl:this.getFieldMappings(null===(f=HawkSearch.config.fieldMappings)||void 0===f?void 0:f.imageUrl,["imageurl","image"]),price:this.getFieldMappings(null===(g=HawkSearch.config.fieldMappings)||void 0===g?void 0:g.price,["price"]),rating:this.getFieldMappings(null===(m=HawkSearch.config.fieldMappings)||void 0===m?void 0:m.rating,["rating"]),salePrice:this.getFieldMappings(null===(k=HawkSearch.config.fieldMappings)||void 0===k?void 0:k.salePrice,["saleprice"]),sku:this.getFieldMappings(null===(y=HawkSearch.config.fieldMappings)||void 0===y?void 0:y.sku,["sku"]),title:this.getFieldMappings(null===(w=HawkSearch.config.fieldMappings)||void 0===w?void 0:w.title,["title","name","itemname"]),type:this.getFieldMappings(null===(b=HawkSearch.config.fieldMappings)||void 0===b?void 0:b.type,["type"]),url:this.getFieldMappings(null===(_=HawkSearch.config.fieldMappings)||void 0===_?void 0:_.url,["url"])},this.variantFieldMappings={color:{name:this.getFieldMappings(null===(x=null===(E=null===(S=HawkSearch.config.variants)||void 0===S?void 0:S.fieldMappings)||void 0===E?void 0:E.color)||void 0===x?void 0:x.name,["colorname","color"],null===(P=HawkSearch.config.variants)||void 0===P?void 0:P.fieldPrefix),hex:this.getFieldMappings(null===(I=null===(H=null===(C=HawkSearch.config.variants)||void 0===C?void 0:C.fieldMappings)||void 0===H?void 0:H.color)||void 0===I?void 0:I.hex,["colorhex","colorvalue"],null===(M=HawkSearch.config.variants)||void 0===M?void 0:M.fieldPrefix),imageUrl:this.getFieldMappings(null===(R=null===(L=null===(q=HawkSearch.config.variants)||void 0===q?void 0:q.fieldMappings)||void 0===L?void 0:L.color)||void 0===R?void 0:R.imageUrl,["colorimageurl","colorimage"],null===(A=HawkSearch.config.variants)||void 0===A?void 0:A.fieldPrefix)},id:this.getFieldMappings(null===(O=null===(D=HawkSearch.config.variants)||void 0===D?void 0:D.fieldMappings)||void 0===O?void 0:O.id,["id"],null===(F=HawkSearch.config.variants)||void 0===F?void 0:F.fieldPrefix),imageUrl:this.getFieldMappings(null===(T=null===(N=HawkSearch.config.variants)||void 0===N?void 0:N.fieldMappings)||void 0===T?void 0:T.imageUrl,["imageurl","image"],null===(j=HawkSearch.config.variants)||void 0===j?void 0:j.fieldPrefix),price:this.getFieldMappings(null===(U=null===(V=HawkSearch.config.variants)||void 0===V?void 0:V.fieldMappings)||void 0===U?void 0:U.price,["price"],null===($=HawkSearch.config.variants)||void 0===$?void 0:$.fieldPrefix),rating:this.getFieldMappings(null===(z=null===(B=HawkSearch.config.variants)||void 0===B?void 0:B.fieldMappings)||void 0===z?void 0:z.rating,["rating"],null===(W=HawkSearch.config.variants)||void 0===W?void 0:W.fieldPrefix),salePrice:this.getFieldMappings(null===(Z=null===(Q=HawkSearch.config.variants)||void 0===Q?void 0:Q.fieldMappings)||void 0===Z?void 0:Z.salePrice,["salePrice","saleprice"],null===(K=HawkSearch.config.variants)||void 0===K?void 0:K.fieldPrefix),sku:this.getFieldMappings(null===(G=null===(Y=HawkSearch.config.variants)||void 0===Y?void 0:Y.fieldMappings)||void 0===G?void 0:G.sku,["title","name","itemname"],null===(X=HawkSearch.config.variants)||void 0===X?void 0:X.fieldPrefix),title:this.getFieldMappings(null===(ee=null===(J=HawkSearch.config.variants)||void 0===J?void 0:J.fieldMappings)||void 0===ee?void 0:ee.title,["title","name","itemname"],null===(te=HawkSearch.config.variants)||void 0===te?void 0:te.fieldPrefix),description:this.getFieldMappings(null===(ie=null===(ne=HawkSearch.config.variants)||void 0===ne?void 0:ne.fieldMappings)||void 0===ie?void 0:ie.description,["description","longdescription"],null===(ae=HawkSearch.config.variants)||void 0===ae?void 0:ae.fieldPrefix),url:this.getFieldMappings(null===(se=null===(re=HawkSearch.config.variants)||void 0===re?void 0:re.fieldMappings)||void 0===se?void 0:se.url,["url"],null===(oe=HawkSearch.config.variants)||void 0===oe?void 0:oe.fieldPrefix)}}httpPost(e,t){return n=this,i=void 0,r=function*(){const n=this.baseUrl+e,i=this.getHeaders(),a=yield fetch(n,{method:"POST",headers:i,body:JSON.stringify(t)}),r=a.headers.get("content-type");return(null==r?void 0:r.startsWith("application/json"))?a.json():void 0},new((a=void 0)||(a=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function o(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(s,o)}l((r=r.apply(n,i||[])).next())}));var n,i,a,r}getHeaders(){const e=new Headers;return e.set("Content-Type","application/json"),e.set("X-Requested-With","XMLHttpRequest"),e}getFieldMappings(e,t,n){return"string"==typeof e&&(e=[e]),(null==e?void 0:e.length)||(e=t),n&&(e=e.map((e=>n+e))),e}getVisitorId(){const e="VisitorId";let t=localStorage.getItem(e);return t||(t=this.generateGuid(),localStorage.setItem(e,t)),t}getVisitId(){const e="VisitId";let t=sessionStorage.getItem(e);return t||(t=this.generateGuid(),sessionStorage.setItem(e,t)),t}generateGuid(){return pt()}stripHtml(e){let t=e.replace(/<[^>]+>/g,"");return t=(n=ne(n=t))&&ot.test(n)?n.replace(st,at):n,t=decodeURIComponent(t),t;var n}getValue(e,t){for(const n of t){let t=re(e,n);if(t){if("string"==typeof t&&(t=t.split("|^|")),0===t.length)continue;return t}}}getString(e,t,n){var i;const a=null===(i=this.getValue(e,t))||void 0===i?void 0:i[0];return null!=a?a:n}getNumber(e,t,n){var i;const a=null===(i=this.getValue(e,t))||void 0===i?void 0:i[0];let r=a?parseFloat(a):void 0;return void 0!==r&&isNaN(r)&&(r=void 0),null!=r?r:n}getUrl(e,t,n){var i;const a=null===(i=this.getValue(e,t))||void 0===i?void 0:i[0];return this.getFullUrl(a,n)}getFullUrl(e,t){if(e)return t&&!/^(?:https?:)?\/\//.test(e)?`${t}/${e.replace(/^\/+/,"")}`:e}getVariants(e){var t,n,i,a,r,s,o;if(!1===(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.enabled))return{items:void 0,selectedItem:void 0};const l=null===(n=HawkSearch.config.variants)||void 0===n?void 0:n.fieldPrefix,c=l?new RegExp("^"+l):void 0,u=e=>{const t=this.getString(e,this.variantFieldMappings.color.name),n=this.getString(e,this.variantFieldMappings.color.imageUrl);let i=this.getString(e,this.variantFieldMappings.color.hex);if(!i&&t&&(i=it(t)),i||n)return{name:t,hex:i,imageUrl:n}},d=null!==(s=null===(r=null===(a=null===(i=e.hawk_child_attributes_hits)||void 0===i?void 0:i[0])||void 0===a?void 0:a.Items)||void 0===r?void 0:r.reduce(((e,t)=>{const n=this.getString(t,this.variantFieldMappings.id);return n&&e.push(n),e}),[]))&&void 0!==s?s:[];let h,p=null===(o=e.hawk_child_attributes)||void 0===o?void 0:o.map(((e,t)=>{var n;const i=null!==(n=this.getString(e,this.variantFieldMappings.id))&&void 0!==n?n:"";return{attributes:Object.fromEntries(Object.entries(e).map((([e,t])=>(c&&(e=e.replace(c,"")),[e,t])))),color:u(e),description:this.getString(e,this.variantFieldMappings.description),id:i,imageUrl:this.getString(e,this.variantFieldMappings.imageUrl),price:this.getNumber(e,this.variantFieldMappings.price)||void 0,queryMatch:d.includes(i),rating:this.getNumber(e,this.variantFieldMappings.rating),salePrice:this.getNumber(e,this.variantFieldMappings.salePrice)||void 0,title:this.getString(e,this.variantFieldMappings.title),url:this.getString(e,this.variantFieldMappings.url)}})).filter((e=>!!e.id));(null==p?void 0:p.length)||(p=void 0);for(const e of d){const t=null==p?void 0:p.find((t=>t.id===e));if(t){h=t;break}}return h||(h=null==p?void 0:p[0]),{items:p,selectedItem:h}}triggerBindEvent(e,t,n){let i=`hawksearch:bind-${e}`;n&&(i=`${i}:${n}`),this.triggerEvent(i,t)}triggerEvent(e,t){const n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)}}function ft(e){let t=null;return t=decodeURIComponent(e),t!==e&&(t=ft(t)),t}var gt=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function o(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((i=i.apply(e,t||[])).next())}))};const mt=new class extends vt{constructor(){var e,t,n;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.autocomplete)||void 0===e?void 0:e.endpointUrl)||(null===(t=HawkSearch.config.search)||void 0===t?void 0:t.endpointUrl)||"https://searchapi-dev.hawksearch.net",this.decodeQuery=(null===(n=HawkSearch.config.autocomplete)||void 0===n?void 0:n.decodeQuery)||!1}query(e){return gt(this,void 0,void 0,(function*(){const t={query:e};return yield this.executeAutocomplete(t)}))}executeAutocomplete(e){return gt(this,void 0,void 0,(function*(){this.decodeQuery&&e.query&&(e.query=ft(e.query));const t={ClientGuid:HawkSearch.config.clientId,IndexName:HawkSearch.config.index,Keyword:e.query,DisplayFullResponse:!0};try{this.triggerEvent("hawksearch:before-autocomplete-executed",t);const n=yield this.httpPost("/api/v2/autocomplete",t);this.triggerEvent("hawksearch:after-autocomplete-executed",n);const i=this.convertResponse(e.query,n);return this.triggerEvent("hawksearch:autocomplete-completed",i),this.bindComponent(i),i}catch(e){throw new Error("Error retrieving autocomplete response")}}))}convertResponse(e,t){var n,i,a,r;const s=e=>{var t,n,i;const a=this.getVariants(e.Results.Document);return{attributes:Object.fromEntries(Object.entries(e.Results.Document).filter((([e,t])=>!["hawk_child_attributes","hawk_child_attributes_hits"].includes(e)))),description:this.getString(e.Results.Document,this.fieldMappings.description),id:e.Results.DocId,imageUrl:(null===(t=e.Thumb)||void 0===t?void 0:t.Url)||this.getUrl(e.Results.Document,this.fieldMappings.imageUrl,null===(n=HawkSearch.config.urlPrefixes)||void 0===n?void 0:n.content),pinned:e.Results.IsPin,price:this.getNumber(e.Results.Document,this.fieldMappings.price)||void 0,rating:this.getNumber(e.Results.Document,this.fieldMappings.rating),salePrice:this.getNumber(e.Results.Document,this.fieldMappings.salePrice)||void 0,score:e.Results.Score,selectedVariant:a.selectedItem,sku:e.Sku||this.getString(e.Results.Document,this.fieldMappings.sku),title:this.stripHtml(e.ProductName)||this.getString(e.Results.Document,this.fieldMappings.title),url:e.Url||this.getUrl(e.Results.Document,this.fieldMappings.url,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.content),variants:a.items}};return{query:e,categories:{title:t.CategoryHeading,results:t.Categories.map((e=>({title:this.stripHtml(e.Value),field:e.FieldQSName,value:e.FieldQSValue,url:`${this.searchUrl}?${e.FieldQSName}=${encodeURIComponent(e.FieldQSValue)}`})))},content:{title:t.ContentHeading,results:t.Content.map((e=>({id:e.Results.DocId,pinned:e.Results.IsPin,score:e.Results.Score,attributes:e.Results.Document,title:this.stripHtml(e.Value),url:e.Url}))),totalRecords:t.ContentCount},queries:{title:t.PopularHeading,results:t.Popular.map((e=>({query:this.stripHtml(e.RawValue),url:`${this.searchUrl}?${this.queryStringParams.query}=${encodeURIComponent(this.stripHtml(e.RawValue))}`})))},contentSuggestedQueries:{title:t.DYMContentHeading,results:null!==(i=null===(n=t.DymContentSearch)||void 0===n?void 0:n.map((e=>({query:this.stripHtml(e.RawValue),url:`${this.searchUrl}?${this.queryStringParams.query}=${encodeURIComponent(this.stripHtml(e.RawValue))}`}))))&&void 0!==i?i:[]},productSuggestedQueries:{title:t.DYMProductHeading,results:null!==(r=null===(a=t.DymProductsSearch)||void 0===a?void 0:a.map((e=>({query:this.stripHtml(e.RawValue),url:`${this.searchUrl}?${this.queryStringParams.query}=${encodeURIComponent(this.stripHtml(e.RawValue))}`}))))&&void 0!==r?r:[]},products:{title:t.ProductHeading,results:t.Products.map((e=>s(e))),totalRecords:t.ProductCount},totalRecords:t.Count,viewAllText:t.ViewAllButtonLabel}}bindComponent(e){this.triggerBindEvent("autocomplete",e)}};const kt=new class extends vt{constructor(){var e;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.recommendations)||void 0===e?void 0:e.endpointUrl)||"https://recs-dev.hawksearch.net"}getItems(e){return this.executeRecommendations(e)}executeRecommendations(e){var t,n,i,a,r;return n=this,i=void 0,r=function*(){const n={clientGuid:HawkSearch.config.clientId,indexName:HawkSearch.config.index,landingPageUrl:e.url,renderHTML:!1,visitId:this.getVisitId(),visitorId:this.getVisitorId(),widgetUids:[{widgetGuid:e.widgetId,uniqueid:e.itemId}]};try{this.triggerEvent("hawksearch:before-recommendations-executed",n);const i=yield this.httpPost("/api/recommendation/v2/getwidgetitems",n);this.triggerEvent("hawksearch:after-recommendations-executed",i);const a=this.convertResponse(i);this.triggerEvent("hawksearch:recommendations-completed",a);const r=e.itemId?`${e.widgetId}:${e.itemId}`:e.widgetId;return HawkSearch.recommendationsResponses=Object.assign(Object.assign({},null!==(t=HawkSearch.recommendationsResponses)&&void 0!==t?t:{}),{[r]:a}),this.bindComponents(a),a}catch(e){throw new Error("Error retrieving recommendations response")}},new((a=void 0)||(a=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function o(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(s,o)}l((r=r.apply(n,i||[])).next())}))}convertResponse(e){var t;const n=e=>{if(e)return"string"==typeof e?e.split("|^|"):e},i=e=>{var t,i;const a=this.getVariants(e.customDict);return{attributes:Object.fromEntries(Object.entries(e.customDict).filter((([e,t])=>!["hawk_child_attributes","hawk_child_attributes_hits"].includes(e))).map((([e,t])=>[e,n(t)]))),description:e.shortDescription||this.getString(e.customDict,this.fieldMappings.description),id:e.id,imageUrl:e.imageUrl||this.getUrl(e.customDict,this.fieldMappings.imageUrl,null===(t=HawkSearch.config.urlPrefixes)||void 0===t?void 0:t.content),price:parseFloat(e.price)||this.getNumber(e.customDict,this.fieldMappings.price)||void 0,rating:parseFloat(e.rating)||this.getNumber(e.customDict,this.fieldMappings.rating)||void 0,salePrice:parseFloat(e.salePrice)||this.getNumber(e.customDict,this.fieldMappings.salePrice)||void 0,selectedVariant:a.selectedItem,sku:e.Sku||this.getString(e.customDict,this.fieldMappings.sku),title:e.itemName||this.getString(e.customDict,this.fieldMappings.title),url:e.url||this.getUrl(e.customDict,this.fieldMappings.url,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.content),variants:a.items}};return{requestId:e.requestId,widgets:null===(t=null==e?void 0:e.widgetItems)||void 0===t?void 0:t.map((t=>{var n;return{id:t.widgetGuid,requestId:e.requestId,title:t.widgetName,carousel:t.isCarousel,items:null===(n=t.recommendationItems)||void 0===n?void 0:n.map((e=>i(e)))}}))}}bindComponents(e){var t;null===(t=e.widgets)||void 0===t||t.forEach((e=>{this.triggerBindEvent("recommendations",e,e.id)}))}};function yt(e){var t=this.__data__=new U(e);this.size=t.size}yt.prototype.clear=function(){this.__data__=new U,this.size=0},yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},yt.prototype.get=function(e){return this.__data__.get(e)},yt.prototype.has=function(e){return this.__data__.has(e)},yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof U){var i=n.__data__;if(!$||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(i)}return n.set(e,t),this.size=n.size,this};const wt=yt;var bt=Object.prototype.hasOwnProperty;const _t=function(e){if(!k(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Pe(e),n=[];for(var i in e)("constructor"!=i||!t&&bt.call(e,i))&&n.push(i);return n},St=function(e){return _e(e)?ze(e,!0):_t(e)};var Et="object"==typeof exports&&exports&&!exports.nodeType&&exports,xt=Et&&"object"==typeof module&&module&&!module.nodeType&&module,Pt=xt&&xt.exports===Et?r.Buffer:void 0,Ct=Pt?Pt.allocUnsafe:void 0;const Ht=function(){return[]};var It=Object.prototype.propertyIsEnumerable,Mt=Object.getOwnPropertySymbols;const qt=Mt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var s=e[n];t(s,n,e)&&(r[a++]=s)}return r}(Mt(e),(function(t){return It.call(e,t)})))}:Ht,Lt=function(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e},Rt=We(Object.getPrototypeOf,Object),At=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Lt(t,qt(e)),e=Rt(e);return t}:Ht,Dt=function(e,n,i){var a=n(e);return t(e)?a:Lt(a,i(e))},Ot=function(e){return Dt(e,Ke,qt)},Ft=function(e){return Dt(e,St,At)},Nt=L(r,"DataView"),Tt=L(r,"Promise"),jt=L(r,"Set"),Vt=L(r,"WeakMap");var Ut="[object Map]",$t="[object Promise]",Bt="[object Set]",zt="[object WeakMap]",Wt="[object DataView]",Qt=E(Nt),Zt=E($),Kt=E(Tt),Yt=E(jt),Gt=E(Vt),Xt=p;(Nt&&Xt(new Nt(new ArrayBuffer(1)))!=Wt||$&&Xt(new $)!=Ut||Tt&&Xt(Tt.resolve())!=$t||jt&&Xt(new jt)!=Bt||Vt&&Xt(new Vt)!=zt)&&(Xt=function(e){var t=p(e),n="[object Object]"==t?e.constructor:void 0,i=n?E(n):"";if(i)switch(i){case Qt:return Wt;case Zt:return Ut;case Kt:return $t;case Yt:return Bt;case Gt:return zt}return t});const Jt=Xt;var en=Object.prototype.hasOwnProperty;const tn=r.Uint8Array,nn=function(e){var t=new e.constructor(e.byteLength);return new tn(t).set(new tn(e)),t};var an=/\w*$/;var rn=s?s.prototype:void 0,sn=rn?rn.valueOf:void 0;const on=function(e,t,n){var i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return nn(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?nn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?nn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,an.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return i=e,sn?Object(sn.call(i)):{}}};var ln=Object.create;const cn=function(){function e(){}return function(t){if(!k(t))return{};if(ln)return ln(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var un=Ve&&Ve.isMap;const dn=un?Fe(un):function(e){return v(e)&&"[object Map]"==Jt(e)};var hn=Ve&&Ve.isSet;const pn=hn?Fe(hn):function(e){return v(e)&&"[object Set]"==Jt(e)};var vn="[object Arguments]",fn="[object Function]",gn="[object Object]",mn={};mn[vn]=mn["[object Array]"]=mn["[object ArrayBuffer]"]=mn["[object DataView]"]=mn["[object Boolean]"]=mn["[object Date]"]=mn["[object Float32Array]"]=mn["[object Float64Array]"]=mn["[object Int8Array]"]=mn["[object Int16Array]"]=mn["[object Int32Array]"]=mn["[object Map]"]=mn["[object Number]"]=mn[gn]=mn["[object RegExp]"]=mn["[object Set]"]=mn["[object String]"]=mn["[object Symbol]"]=mn["[object Uint8Array]"]=mn["[object Uint8ClampedArray]"]=mn["[object Uint16Array]"]=mn["[object Uint32Array]"]=!0,mn["[object Error]"]=mn[fn]=mn["[object WeakMap]"]=!1;const kn=function e(n,i,a,r,s,o){var l,c=1&i,u=2&i,d=4&i;if(a&&(l=s?a(n,r,s,o):a(n)),void 0!==l)return l;if(!k(n))return n;var h=t(n);if(h){if(l=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&en.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(n),!c)return function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}(n,l)}else{var p=Jt(n),v=p==fn||"[object GeneratorFunction]"==p;if(De(n))return function(e,t){if(t)return e.slice();var n=e.length,i=Ct?Ct(n):new e.constructor(n);return e.copy(i),i}(n,c);if(p==gn||p==vn||v&&!s){if(l=u||v?{}:function(e){return"function"!=typeof e.constructor||Pe(e)?{}:cn(Rt(e))}(n),!c)return u?function(e,t){return ue(e,At(e),t)}(n,function(e,t){return e&&ue(t,St(t),e)}(l,n)):function(e,t){return ue(e,qt(e),t)}(n,function(e,t){return e&&ue(t,Ke(t),e)}(l,n))}else{if(!mn[p])return s?n:{};l=on(n,p,c)}}o||(o=new wt);var f=o.get(n);if(f)return f;o.set(n,l),pn(n)?n.forEach((function(t){l.add(e(t,i,a,t,n,o))})):dn(n)&&n.forEach((function(t,r){l.set(r,e(t,i,a,r,n,o))}));var g=h?void 0:(d?u?Ft:Ot:u?St:Ke)(n);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(g||n,(function(t,r){g&&(t=n[r=t]),ce(l,r,e(t,i,a,r,n,o))})),l},yn=function(e){return kn(e,5)};var wn,bn,_n,Sn;!function(e){e[e.Search=1]="Search",e[e.Category=2]="Category",e[e.Product=3]="Product",e[e.Content=4]="Content"}(wn||(wn={})),function(e){e[e.PageLoad=1]="PageLoad",e[e.Search=2]="Search",e[e.Click=3]="Click",e[e.AddToCart=4]="AddToCart",e[e.Rate=5]="Rate",e[e.Sale=6]="Sale",e[e.BannerClick=7]="BannerClick",e[e.BannerImpression=8]="BannerImpression",e[e.RecommendationClick=10]="RecommendationClick",e[e.AutocompleteClick=11]="AutocompleteClick",e[e.AddToCartMultiple=14]="AddToCartMultiple"}(bn||(bn={})),function(e){e[e.Item=1]="Item",e[e.Landing=2]="Landing",e[e.Cart=3]="Cart",e[e.Order=4]="Order",e[e.Custom=5]="Custom"}(_n||(_n={})),function(e){e[e.Initial=1]="Initial",e[e.Refinement=2]="Refinement"}(Sn||(Sn={}));const En=new class extends vt{constructor(){var e;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.tracking)||void 0===e?void 0:e.endpointUrl)||"https://tracking-dev.hawksearch.net"}trackAddToCart(e,t,n,i){const a={UniqueId:e,Quantity:t,Price:n,Currency:i};return this.trackEvent(bn.AddToCart,a)}trackAddToCartMultiple(e){const t={ItemsList:e.map((e=>({UniqueId:e.productId,Quantity:e.quantity,Price:e.price,Currency:e.currencyIsoCode})))};return this.trackEvent(bn.AddToCartMultiple,t)}trackAutocompleteClick(e,t,n,i){const a={Keyword:e,Name:n,SuggestType:t,Url:i};return this.trackEvent(bn.AutocompleteClick,a)}trackBannerClick(e,t){var n;if(!(null===(n=HawkSearch.searchResponse)||void 0===n?void 0:n.trackingId))return Promise.resolve();const i={BannerId:e,CampaignId:t,TrackingId:HawkSearch.searchResponse.trackingId};return this.trackEvent(bn.BannerClick,i)}trackBannerImpression(e,t){var n;if(!(null===(n=HawkSearch.searchResponse)||void 0===n?void 0:n.trackingId)||!e||!t)return Promise.resolve();const i={BannerId:e,CampaignId:t,TrackingId:HawkSearch.searchResponse.trackingId};return this.trackEvent(bn.BannerImpression,i)}trackOrder(e,t,n,i,a,r){const s={OrderNo:e,ItemList:t.map((e=>({UniqueId:e.productId,Quantity:e.quantity,ItemPrice:e.price}))),SubTotal:n,Tax:i,Total:a,Currency:r};return this.trackEvent(bn.Sale,s)}trackPageLoad(e,t){if(e===_n.Item&&!t)throw new Error("productId is required for tracking product detail page requests");const n={PageTypeId:e,RequestPath:window.location.pathname,Qs:window.location.search,UniqueId:t,ViewportHeight:document.documentElement.clientHeight,ViewportWidth:document.documentElement.clientWidth};return this.trackEvent(bn.PageLoad,n)}trackRating(e,t){const n={UniqueId:e,Value:t};return this.trackEvent(bn.Rate,n)}trackRecommendationClick(e,t,n){const i={WidgetGuid:e,RequestId:t,UniqueId:n};return this.trackEvent(bn.RecommendationClick,i)}trackSearchResultClick(e,t,n){var i;if(!(null===(i=HawkSearch.searchResponse)||void 0===i?void 0:i.trackingId))return Promise.resolve();const a={UniqueId:e,Url:t,TrackingId:HawkSearch.searchResponse.trackingId,RequestPath:window.location.pathname,Qs:window.location.search,ScrollX:window.scrollX,ScrollY:window.scrollY,ViewportHeight:document.documentElement.clientHeight,ViewportWidth:document.documentElement.clientWidth,MouseX:null==n?void 0:n.pageX,MouseY:null==n?void 0:n.pageY};return this.trackEvent(bn.Click,a)}trackSearch(e,t){var n;if(!(null===(n=HawkSearch.searchResponse)||void 0===n?void 0:n.trackingId))return Promise.resolve();const i={QueryId:t?this.setNewQueryId():this.getQueryId(),TrackingId:HawkSearch.searchResponse.trackingId,TypeId:t?Sn.Initial:Sn.Refinement,ViewportHeight:document.documentElement.clientHeight,ViewportWidth:document.documentElement.clientWidth,keyword:e};return this.trackEvent(bn.Search,i)}trackEvent(e,t){var n,i,a,r,s;return i=this,a=void 0,s=function*(){if(!1===(null===(n=HawkSearch.config.tracking)||void 0===n?void 0:n.enabled))return;const i={ClientGuid:HawkSearch.config.clientId,EventType:e,EventData:btoa(JSON.stringify(t)),VisitorId:this.getVisitorId(),VisitId:this.getVisitId()};try{yield this.httpPost("/api/trackevent",i)}catch(e){throw new Error("Error recording search activity")}},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function o(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,o)}l((s=s.apply(i,a||[])).next())}))}getQueryId(){let e=localStorage.getItem("QueryId");return e||(e=this.setNewQueryId()),e}setNewQueryId(){const e=this.generateGuid();return localStorage.setItem("QueryId",e),e}};var xn=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function o(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((i=i.apply(e,t||[])).next())}))};const Pn=new class extends vt{constructor(){var e,t,n,i;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.search)||void 0===e?void 0:e.endpointUrl)||"https://searchapi-dev.hawksearch.net",this.facetExclusionPrefix=(null===(t=HawkSearch.config.search)||void 0===t?void 0:t.facetExclusionPrefix)||"-",this.decodeQuery=(null===(n=HawkSearch.config.search)||void 0===n?void 0:n.decodeQuery)||!1,this.decodeFacetValues=(null===(i=HawkSearch.config.search)||void 0===i?void 0:i.decodeFacetValues)||!1,this.shouldRenderUI=!0}search(e){return xn(this,void 0,void 0,(function*(){const t=yield this.executeSearch(e,!0,!1);return this.shouldRenderUI&&this.bindComponents(t),t}))}query(e,t=void 0,n=!1){return xn(this,void 0,void 0,(function*(){const i={disableSpellcheck:!!n||void 0,facets:t,newRequest:!0,query:e};if(!this.onSearchPage){const e=this.getSearchUrl(i);return window.location.assign(e),Promise.resolve()}if(e){const t=this.getRecentQueries(),n=5;t.includes(e)||(t.length>=n&&t.splice(n-1),t.unshift(e),this.saveRecentQueries(t))}const a=yield this.executeSearch(i,!0,!1);return this.shouldRenderUI&&this.bindComponents(a),a}))}addFacetValue(e,t){var n,i;return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const a=yn(HawkSearch.searchRequest);a.newRequest=!1,a.page=void 0,a.facets||(a.facets={}),this.clearExistingFacetValue(a,e,t),a.facets[e]=[...null!==(i=null===(n=a.facets[e])||void 0===n?void 0:n.filter((e=>e!==t)))&&void 0!==i?i:[],t];const r=yield this.executeSearch(a,!1);return this.bindFacetsListComponent(r),this.bindPaginationComponent(r),this.bindSelectedFacetsComponent(r),this.bindTabsComponent(r),this.bindZoneComponent(r),r}))}removeFacetValue(e,t){return xn(this,void 0,void 0,(function*(){if(this.ensureSearchRequest(),"searchWithin"===e)return yield this.searchWithin("");const n=yn(HawkSearch.searchRequest);n.newRequest=!1,n.page=void 0,this.clearExistingFacetValue(n,e,t);const i=yield this.executeSearch(n,!1);return this.bindFacetsListComponent(i),this.bindPaginationComponent(i),this.bindSelectedFacetsComponent(i),this.bindTabsComponent(i),this.bindZoneComponent(i),i}))}includeFacetValue(e,t){const n=`${this.facetExclusionPrefix}${t}`;return this.removeFacetValue(e,n)}excludeFacetValue(e,t){var n;return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const i=`${this.facetExclusionPrefix}${t}`,a=yn(HawkSearch.searchRequest);a.newRequest=!1,a.page=void 0,a.facets||(a.facets={}),this.clearExistingFacetValue(a,e,t),a.facets=Object.assign(Object.assign({},a.facets),{[e]:[...null!==(n=a.facets[e])&&void 0!==n?n:[],i]});const r=yield this.executeSearch(a,!1);return this.bindFacetsListComponent(r),this.bindPaginationComponent(r),this.bindSelectedFacetsComponent(r),this.bindTabsComponent(r),this.bindZoneComponent(r),r}))}clearExistingFacetValue(e,t,n){var i,a,r;n=n.replace(new RegExp("^"+this.facetExclusionPrefix),"");const s=`${this.facetExclusionPrefix}${n}`;e.facets||(e.facets={}),e.facets=Object.assign(Object.assign({},e.facets),{[t]:[...null!==(a=null===(i=e.facets[t])||void 0===i?void 0:i.filter((e=>e!==n&&e!==s)))&&void 0!==a?a:[]]}),(null===(r=e.facets[t])||void 0===r?void 0:r.length)||delete e.facets[t]}setFacetValue(e,t){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const n=yn(HawkSearch.searchRequest);n.newRequest=!1,n.page=void 0,n.facets||(n.facets={}),n.facets[e]=[t];const i=yield this.executeSearch(n,!1);return this.bindFacetsListComponent(i),this.bindPaginationComponent(i),this.bindSelectedFacetsComponent(i),this.bindTabsComponent(i),this.bindZoneComponent(i),i}))}searchWithin(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.page=void 0,t.searchWithin=e||void 0;const n=yield this.executeSearch(t,!1);return this.bindFacetsListComponent(n),this.bindPaginationComponent(n),this.bindSelectedFacetsComponent(n),this.bindTabsComponent(n),this.bindZoneComponent(n),n}))}selectTab(e){var t,n,i;return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const a=yn(HawkSearch.searchRequest);a.newRequest=!1,a.page=void 0,a.facets||(a.facets={});const r=null===(i=null===(n=null===(t=HawkSearch.searchResponse)||void 0===t?void 0:t.facets)||void 0===n?void 0:n.find((e=>"tabs"===e.type)))||void 0===i?void 0:i.field;r&&(e?a.facets[r]=[e]:delete a.facets[r]);const s=yield this.executeSearch(a,!1);return this.bindFacetsListComponent(s),this.bindPaginationComponent(s),this.bindSelectedFacetsComponent(s),this.bindTabsComponent(s),this.bindZoneComponent(s),s}))}paginate(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.page=e;const n=yield this.executeSearch(t,!1);return this.bindPaginationComponent(n),n}))}setPageSize(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.pageSize=e;const n=yield this.executeSearch(t,!1);return this.bindPageSizeComponent(n),this.bindPaginationComponent(n),n}))}sort(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.page=1,t.sort=e;const n=yield this.executeSearch(t,!1);return this.bindPaginationComponent(n),this.bindSortingComponent(n),n}))}executeSearch(e,t,n=!0){var i;return xn(this,void 0,void 0,(function*(){if(this.decodeQuery&&e.query&&(e.query=ft(e.query)),this.decodeFacetValues&&e.facets)for(let t in e.facets){let n=[],i=e.facets[t];for(let e in i)n.push(ft(i[parseInt(e)]));e.facets[t]=n}HawkSearch.searchRequest=e;const a={ClientData:{UserAgent:window.navigator.userAgent,VisitorId:this.getVisitorId(),VisitId:this.getVisitId()},ClientGuid:HawkSearch.config.clientId,CustomURL:e.url,IgnoreSpellcheck:e.disableSpellcheck,IndexName:HawkSearch.config.index,Keyword:e.query,FacetSelections:e.facets,MaxPerPage:e.pageSize,PageNo:e.page,SearchWithin:e.searchWithin,SortBy:e.sort,Variants:{CountFacetHitOnChild:null===(i=HawkSearch.config.variants)||void 0===i?void 0:i.baseFacetCountOnVariants}};try{this.triggerEvent("hawksearch:before-search-executed",a);const i=yield this.httpPost("/api/v2/search",a);this.triggerEvent("hawksearch:after-search-executed",i);const r=this.convertResponse(e,i);return HawkSearch.searchResponse=r,En.trackSearch(e.query,t),this.setQueryString(r),this.setSeoElements(r),t&&r.redirect&&r.redirect.url&&("_blank"!==r.redirect.target&&(this.shouldRenderUI=!1),"_blank"===r.redirect.target?window.open(r.redirect.url,"_blank"):"_parent"===r.redirect.target?window.open(r.redirect.url,"_parent"):"_top"===r.redirect.target?window.open(r.redirect.url,"_top"):window.open(r.redirect.url,"_self")),n&&this.shouldRenderUI&&(this.bindModifiedQueryComponent(r),this.bindQuerySuggestionsComponent(r),this.bindSearchFieldComponent(r),this.bindSearchResultsListComponent(r)),this.triggerEvent("hawksearch:search-completed",r),r}catch(e){throw new Error("Error retrieving search response")}}))}ensureSearchRequest(){if(!HawkSearch.searchRequest)throw new Error("You cannot refine search results until an initial search has been executed")}convertResponse(e,t){var n,i,a,r,s,o,l;const c=e=>{if("tab"===e.FieldType)return"tabs";switch(e.FacetType.toLowerCase()){case"checkbox":case"nestedcheckbox":return"checkbox";case"color":return"color";case"link":return"link";case"openrange":if("datetime"===e.DataType)return"date-range";if(e.IsCurrency||e.IsNumeric)return"numeric-range";case"recentsearches":return"recent-searches";case"related":return"related-searches";case"search":return"search";case"size":return"size";case"slider":return"range-slider";case"swatch":return"color";default:return"unsupported"}},u=e=>{if("scrolling"===e.DisplayType)return{height:e.ScrollHeight||void 0,threshold:e.ScrollThreshold||0}},d=["date-range","numeric-range","range-slider"],h=e=>{var t;const n=c(e);if(d.includes(n)&&(null===(t=e.Values)||void 0===t?void 0:t.length))return"datetime"===e.DataType?{type:"date",min:new Date(Date.parse(e.Values[0].RangeMin)),max:new Date(Date.parse(e.Values[0].RangeMax)),start:new Date(Date.parse(e.Values[0].RangeStart)),end:new Date(Date.parse(e.Values[0].RangeEnd))}:e.IsCurrency||e.IsNumeric?{type:"numeric",min:parseFloat(e.Values[0].RangeMin),max:parseFloat(e.Values[0].RangeMax),start:parseFloat(e.Values[0].RangeStart),end:parseFloat(e.Values[0].RangeEnd)}:void 0},p=(e,t)=>{var n,i;const a=null===(n=e.Ranges)||void 0===n?void 0:n.find((e=>e.Value.toLowerCase()===t.Value.toLowerCase()));if(null==a?void 0:a.AssetFullUrl)return this.getFullUrl(a.AssetFullUrl,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.assets)},v=(e,t)=>{var n,i,a;let r=null===(n=e.SwatchData)||void 0===n?void 0:n.find((e=>e.Value.toLowerCase()===t.Value.toLowerCase()));if(r||(r=null===(i=e.SwatchData)||void 0===i?void 0:i.find((e=>e.IsDefault))),r)return{name:t.Label,hex:r.Color||r.Value,imageUrl:this.getFullUrl(r.AssetUrl||r.AssetName,null===(a=HawkSearch.config.urlPrefixes)||void 0===a?void 0:a.assets)}},f=(e,t,n)=>"recent-searches"===c(e)?this.getRecentQueries().map((e=>({title:e}))):null==t?void 0:t.map((t=>{var i;return{title:t.Label,imageUrl:p(e,t),value:t.Value,color:v(e,t),count:t.Count,level:t.Level,selected:t.Selected,excluded:null===(i=null==n?void 0:n.Items)||void 0===i?void 0:i.some((e=>e.Value===`${this.facetExclusionPrefix}${t.Value}`)),children:f(e,t.Children,n)}})),g=e=>{var t;if("recent-searches"===c(e)){const t=f(e,void 0,void 0);return!!(null==t?void 0:t.length)}return null===(t=e.IsVisible)||void 0===t||t},m=e=>{if("truncating"===e.DisplayType)return{threshold:parseFloat(e.TruncateThreshold)||0}},k=e=>{var t,n,i,a;const r=this.getVariants(e.Document);return{attributes:Object.fromEntries(Object.entries(e.Document).filter((([e,t])=>!["hawk_child_attributes","hawk_child_attributes_hits"].includes(e)))),description:this.getString(e.Document,this.fieldMappings.description),id:e.DocId,imageUrl:this.getUrl(e.Document,this.fieldMappings.imageUrl,null===(t=HawkSearch.config.urlPrefixes)||void 0===t?void 0:t.content),pinned:null!==(n=e.IsPin)&&void 0!==n&&n,price:this.getNumber(e.Document,this.fieldMappings.price)||void 0,rating:this.getNumber(e.Document,this.fieldMappings.rating),salePrice:this.getNumber(e.Document,this.fieldMappings.salePrice)||void 0,score:e.Score,sku:this.getString(e.Document,this.fieldMappings.sku),selectedVariant:r.selectedItem,title:this.getString(e.Document,this.fieldMappings.title),type:((e,t)=>{var n,i,a,r,s,o;"string"==typeof t&&(t=[t]);const l=(null!==(a=null===(i=null===(n=HawkSearch.config.search)||void 0===n?void 0:n.itemTypes)||void 0===i?void 0:i.productValues)&&void 0!==a?a:["item","product"]).map((e=>e.toLowerCase()));for(const n of t){let t=re(e,n);if(t&&t instanceof Array&&(t=t[0]),t&&l.includes(t.toLowerCase()))return"product"}return null!==(o=null===(s=null===(r=HawkSearch.config.search)||void 0===r?void 0:r.itemTypes)||void 0===s?void 0:s.default)&&void 0!==o?o:"content"})(e.Document,this.fieldMappings.type),url:this.getUrl(e.Document,this.fieldMappings.url,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.content),variants:r.items,visible:null===(a=e.IsVisible)||void 0===a||a}},y=e=>{if(e.IsSearch)return{threshold:parseFloat(e.SearchThreshold)||0}},w=()=>{var n;const i="searchWithin",a=null===(n=t.Facets)||void 0===n?void 0:n.find((e=>e.Field===i));return e.searchWithin&&a?[{field:i,title:a.Name,currency:!1,values:[{title:e.searchWithin,value:e.searchWithin,excluded:!1}]}]:[]},b=(e,t,n)=>{var i,a,r,s;("Mobile"===t&&!e.IsMobile||"Tablet"===t&&!e.IsTablet)&&(t="");const o={campaignId:e.CampaignId,id:e.BannerId,title:e.Title,trackingEnabled:null===(i=e.IsTrackingEnabled)||void 0===i||i,type:e[t+"ContentType"],zone:null!=n?n:e.Zone};switch(o.type){case"custom":o.content=e[t+"Output"];break;case"featured":{const t=o;t.type="featured-items",t.items=[...(null!==(a=e.Items)&&void 0!==a?a:[]).map(k),...(null!==(r=e.FeaturedItems)&&void 0!==r?r:[]).map(k)];break}case"image":{const n=o;n.image={url:this.getFullUrl(e[t+"ImageUrl"],null===(s=HawkSearch.config.urlPrefixes)||void 0===s?void 0:s.assets),height:e[t+"Height"]||void 0,width:e[t+"Width"]||void 0,altText:e[t+"AltTag"],title:e[t+"AltTag"]},n.link=e[t+"ForwardUrl"]?{url:e[t+"ForwardUrl"],target:e[t+"Target"]||"_self"}:void 0;break}case"widget":switch(e[t+"WidgetType"]){case"PopularSearchesWidget":{const n=o;n.type="popular-queries";const i=Math.min(...e[t+"Output"].map((e=>e.count))),a=Math.max(...e[t+"Output"].map((e=>e.count)))-i,r=5,s=new Array(r).fill(0);s.forEach(((e,t)=>{s[t]=t===r-1?0:Math.floor(a/(t+1))+i})),n.items=e[t+"Output"]instanceof Array?e[t+"Output"].map((e=>({query:e.keyword,count:e.count,weight:r-s.findIndex((t=>e.count>=t))}))).sort(((e,t)=>e.query.localeCompare(t.query))):[];break}default:{const t=o;t.type="custom-widget",t.data=e.AltTag}}}return o},_={content:{breadcrumbs:t.Breadcrumb||void 0,customHtml:t.CustomHtml||void 0,heading:t.PageHeading||void 0},contentZones:(()=>{var e,n,i;const a={};return null===(e=t.FeaturedItems)||void 0===e||e.Items.forEach((e=>{var t,n;const i=null!==(t=a[e.Zone])&&void 0!==t?t:{name:e.Zone},r={mobile:b(e,""),tablet:b(e,""),desktop:b(e,"")};i.items=[...null!==(n=i.items)&&void 0!==n?n:[],r],a[e.Zone]=i})),null===(n=t.Merchandising)||void 0===n||n.Items.forEach((e=>{var t,n;const i=null!==(t=a[e.Zone])&&void 0!==t?t:{name:e.Zone},r={mobile:b(e,"Mobile"),tablet:b(e,"Tablet"),desktop:b(e,"")};i.items=[...null!==(n=i.items)&&void 0!==n?n:[],r],a[e.Zone]=i})),null===(i=t.PageContent)||void 0===i||i.forEach((e=>{var t;const n=null!==(t=a[e.ZoneName])&&void 0!==t?t:{name:e.ZoneName};e.Items.forEach((e=>{var t;const i={mobile:b(e,"Mobile",n.name),tablet:b(e,"Tablet",n.name),desktop:b(e,"",n.name)};n.items=[...null!==(t=n.items)&&void 0!==t?t:[],i]})),a[e.ZoneName]=n})),a})(),customLayout:t.PageLayoutHtml||void 0,facets:null===(n=t.Facets)||void 0===n?void 0:n.map((n=>{var i,a,r;return{id:n.FacetId,type:c(n),title:n.Name,field:n.ParamName||n.Field,collapsible:null!==(i=n.IsCollapsible)&&void 0!==i&&i,collapsed:n.IsCollapsedDefault,displayCount:n.ShowItemsCount,range:h(n),scrolling:u(n),search:y(n),searchWithin:e.searchWithin,tooltip:this.stripHtml(null!==(a=n.Tooltip)&&void 0!==a?a:"")||void 0,truncation:m(n),values:f(n,n.Values,null===(r=t.Selections)||void 0===r?void 0:r[n.ParamName||n.Field]),visible:g(n)}})).filter((e=>"unsupported"!==e.type&&!(d.includes(e.type)&&!e.range))),modifiedQuery:t.AdjustedKeyword,pagination:t.Pagination?{page:t.Pagination.CurrentPage,pageSize:t.Pagination.MaxPerPage,totalPages:t.Pagination.NofPages,totalResults:t.Pagination.NofResults,maxPageLinks:t.Pagination.NumberOfPageLinks>0?t.Pagination.NumberOfPageLinks:void 0,displayFirstLink:t.Pagination.IsShowFirstLink,displayLastLink:t.Pagination.IsShowLastLink,options:null!==(i=t.Pagination.Items.map((e=>({title:e.Label,pageSize:e.PageSize,selected:e.Selected,default:e.Default}))))&&void 0!==i?i:[]}:void 0,query:t.Keyword,querySuggestions:t.DidYouMean,redirect:t.Redirect?{url:t.Redirect.Location,target:t.Redirect.Target}:void 0,results:null===(a=t.Results)||void 0===a?void 0:a.map(k),selectedFacets:(()=>{var e;return[...Object.keys(null!==(e=t.Selections)&&void 0!==e?e:[]).map((e=>{var n,i;const a=t.Selections[e],r=null===(n=t.Facets)||void 0===n?void 0:n.find((t=>(t.ParamName||t.Field)===e)),s=new RegExp("^"+this.facetExclusionPrefix);return{field:e,currency:null!==(i=null==r?void 0:r.IsCurrency)&&void 0!==i&&i,title:a.Label,values:a.Items.map((e=>({title:e.Label.replace(s,""),value:e.Value,excluded:s.test(e.Value)})))}})),...w()]})(),seo:{canonicalUrl:t.RelCanonical,description:t.MetaDescription,keywords:t.MetaKeywords,robots:t.MetaRobots,title:t.HeaderTitle},success:t.Success,sorting:{value:null===(r=t.Sorting)||void 0===r?void 0:r.Value,options:null!==(o=null===(s=t.Sorting)||void 0===s?void 0:s.Items.map((e=>({title:e.Label,value:e.Value,selected:e.Selected,default:e.IsDefault}))))&&void 0!==o?o:[]},trackingId:t.TrackingId},S=new URL(this.getSearchUrl(e));return _.seo||(_.seo={}),_.seo.canonicalUrl=((null===(l=_.seo.canonicalUrl)||void 0===l?void 0:l.replace(/\?.*$/,""))||S.origin+S.pathname)+S.search,_}bindComponents(e){this.bindLandingPageComponent(e),this.bindSearchResultsComponent(e),setTimeout((()=>{this.bindFacetsListComponent(e),this.bindModifiedQueryComponent(e),this.bindPageSizeComponent(e),this.bindPaginationComponent(e),this.bindQuerySuggestionsComponent(e),this.bindSearchFieldComponent(e),this.bindSearchResultsListComponent(e),this.bindSelectedFacetsComponent(e),this.bindSortingComponent(e),this.bindTabsComponent(e),this.bindZoneComponent(e)}))}bindFacetsListComponent(e){this.triggerBindEvent("facets-list",null==e?void 0:e.facets)}bindLandingPageComponent(e){this.triggerBindEvent("landing-page",e)}bindModifiedQueryComponent(e){const t={display:!!(null==e?void 0:e.query)&&!!(null==e?void 0:e.modifiedQuery)&&HawkSearch.searchRequest.newRequest,query:null==e?void 0:e.query,modifiedQuery:null==e?void 0:e.modifiedQuery};this.triggerBindEvent("modified-query",t)}bindPageSizeComponent(e){var t;this.triggerBindEvent("page-size",null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.options)}bindPaginationComponent(e){this.triggerBindEvent("pagination",null==e?void 0:e.pagination)}bindSearchFieldComponent(e){this.triggerBindEvent("search-field",e)}bindSearchResultsComponent(e){this.triggerBindEvent("search-results",e)}bindSearchResultsListComponent(e){this.triggerBindEvent("search-results-list",null==e?void 0:e.results)}bindQuerySuggestionsComponent(e){var t;const n={display:!!(null===(t=null==e?void 0:e.querySuggestions)||void 0===t?void 0:t.length)&&HawkSearch.searchRequest.newRequest,querySuggestions:null==e?void 0:e.querySuggestions};this.triggerBindEvent("query-suggestions",n)}bindSortingComponent(e){this.triggerBindEvent("sorting",null==e?void 0:e.sorting)}bindSelectedFacetsComponent(e){this.triggerBindEvent("selected-facets",null==e?void 0:e.selectedFacets)}bindTabsComponent(e){var t;this.triggerBindEvent("tabs",null===(t=null==e?void 0:e.facets)||void 0===t?void 0:t.find((e=>"tabs"===e.type)))}bindZoneComponent(e){this.triggerBindEvent("content-zone",e)}getRequestFromUrl(){const e=new URL(window.location.href),t=Object.keys(this.queryStringParams),n={};for(const i of Array.from(e.searchParams.keys()).filter((e=>!t.includes(e))))n[i]=e.searchParams.getAll(i);return{disableSpellcheck:this.getBooleanParameter(e.searchParams.get(this.queryStringParams.disableSpellcheck)),facets:n,newRequest:!0,pageSize:this.getPositiveIntegerParameter(e.searchParams.get(this.queryStringParams.pageSize)),page:this.getPositiveIntegerParameter(e.searchParams.get(this.queryStringParams.page)),query:this.getStringParameter(e.searchParams.get(this.queryStringParams.query)),searchWithin:this.getStringParameter(e.searchParams.get(this.queryStringParams.searchWithin)),sort:this.getStringParameter(e.searchParams.get(this.queryStringParams.sort))}}setQueryString(e){if(!HawkSearch.searchRequest)return;const t=this.getSearchUrl(HawkSearch.searchRequest),n={searchRequest:HawkSearch.searchRequest,searchResponse:e};t.toString()===window.location.href?window.history.replaceState(n,""):window.history.pushState(n,"",t.toString())}getSearchUrl(e){const t=window.location.pathname===this.searchUrl||!!e.url,n=new URL(t?window.location.href:this.searchUrl,window.location.origin),i=Object.keys(this.queryStringParams);return n.searchParams.delete(this.queryStringParams.query),e.query&&n.searchParams.set(this.queryStringParams.query,e.query),Array.from(n.searchParams.keys()).filter((e=>!i.includes(e))).forEach((e=>n.searchParams.delete(e))),e.disableSpellcheck&&n.searchParams.set(this.queryStringParams.disableSpellcheck,e.disableSpellcheck.toString()),e.facets&&Object.keys(e.facets).sort(((e,t)=>e>t?1:-1)).forEach((t=>{const i=e.facets[t];null==i||i.forEach((e=>n.searchParams.append(t,e)))})),n.searchParams.delete(this.queryStringParams.searchWithin),e.searchWithin&&n.searchParams.set(this.queryStringParams.searchWithin,e.searchWithin),n.searchParams.delete(this.queryStringParams.sort),e.sort&&n.searchParams.set(this.queryStringParams.sort,e.sort),n.searchParams.delete(this.queryStringParams.pageSize),e.pageSize&&n.searchParams.set(this.queryStringParams.pageSize,e.pageSize.toString()),n.searchParams.delete(this.queryStringParams.page),e.page&&n.searchParams.set(this.queryStringParams.page,e.page.toString()),n.toString()}getBooleanParameter(e){if(null!==e)return"true"===e}getPositiveIntegerParameter(e){if(!e)return;const t=parseInt(e);return t>0?t:void 0}getStringParameter(e){if(e&&e.trim())return e.trim()}getRecentQueries(){const e=sessionStorage.getItem("recent-queries");return e?JSON.parse(e):[]}saveRecentQueries(e){const t=JSON.stringify(e);sessionStorage.setItem("recent-queries",t)}setSeoElements(e){var t,n,i,a;if(!(null==e?void 0:e.seo))return;let r=e.seo.title;r&&(null===(n=null===(t=HawkSearch.config.seo)||void 0===t?void 0:t.title)||void 0===n?void 0:n.prefix)&&(r=`${HawkSearch.config.seo.title.prefix}${r}`),r&&(null===(a=null===(i=HawkSearch.config.seo)||void 0===i?void 0:i.title)||void 0===a?void 0:a.suffix)&&(r=`${r}${HawkSearch.config.seo.title.suffix}`),this.setTitle(r),this.setLinkTag("canonical",e.seo.canonicalUrl),this.setMetaTag("description",e.seo.description),this.setMetaTag("keywords",e.seo.keywords),this.setMetaTag("robots",e.seo.robots)}removeElement(e){const t=document.head.querySelector(e);t&&t.remove()}setLinkTag(e,t){if(!t)return;this.removeElement(`link[rel="${e}"]`);const n=document.createElement("link");n.rel=e,n.href=t,document.head.append(n)}setMetaTag(e,t){if(!t)return;this.removeElement(`meta[name="${e}"]`);const n=document.createElement("meta");n.name=e,n.content=t,document.head.append(n)}setTitle(e){e&&(document.title=e)}},Cn=function(){return r.Date.now()};var Hn=/\s/;var In=/^\s+/;const Mn=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Hn.test(e.charAt(t)););return t}(e)+1).replace(In,""):e};var qn=/^[-+]0x[0-9a-f]+$/i,Ln=/^0b[01]+$/i,Rn=/^0o[0-7]+$/i,An=parseInt;const Dn=function(e){if("number"==typeof e)return e;if(f(e))return NaN;if(k(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=k(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Mn(e);var n=Ln.test(e);return n||Rn.test(e)?An(e.slice(2),n?2:8):qn.test(e)?NaN:+e};var On=Math.max,Fn=Math.min;const Nn=function(e,t,n){var i,a,r,s,o,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,r=a;return i=a=void 0,c=t,s=e.apply(r,n)}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=r}function f(){var e=Cn();if(v(e))return g(e);o=setTimeout(f,function(e){var n=t-(e-l);return d?Fn(n,r-(e-c)):n}(e))}function g(e){return o=void 0,h&&i?p(e):(i=a=void 0,s)}function m(){var e=Cn(),n=v(e);if(i=arguments,a=this,l=e,n){if(void 0===o)return function(e){return c=e,o=setTimeout(f,t),u?p(e):s}(l);if(d)return clearTimeout(o),o=setTimeout(f,t),p(l)}return void 0===o&&(o=setTimeout(f,t)),s}return t=Dn(t)||0,k(n)&&(u=!!n.leading,r=(d="maxWait"in n)?On(Dn(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,i=l=a=o=void 0},m.flush=function(){return void 0===o?s:g(Cn())},m};function Tn(e,t){return e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e.getTime()===t.getTime()}function jn(e){var t;const n=(null===(t=HawkSearch.config.formatting)||void 0===t?void 0:t.cultureIsoCode)||"en-US";return e.toLocaleDateString(n,{month:"long"})}function Vn(){var e;const t=(null===(e=HawkSearch.config.formatting)||void 0===e?void 0:e.cultureIsoCode)||"en-US",n=(new Date).getFullYear(),i=[];for(let e=0;e<12;e++){const a=new Date(n,e,1).toLocaleDateString(t,{month:"long"});i.push(a)}return i}function Un(e,t=2){var n,i,a;const r=(null===(n=HawkSearch.config.formatting)||void 0===n?void 0:n.cultureIsoCode)||"en-US",s=(null===(a=null===(i=HawkSearch.config.formatting)||void 0===i?void 0:i.currencyIsoCode)||void 0===a?void 0:a.toUpperCase())||"USD";return e.toLocaleString(r,{style:"currency",currency:s,minimumFractionDigits:t,maximumFractionDigits:t})}function $n(e){return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}function Bn(e){var t;const n=(null===(t=HawkSearch.config.formatting)||void 0===t?void 0:t.cultureIsoCode)||"en-US";return e.toLocaleString(n,{year:"numeric",month:"short",day:"2-digit"})}function zn(e,t=2){var n;const i=(null===(n=HawkSearch.config.formatting)||void 0===n?void 0:n.cultureIsoCode)||"en-US";return e.toLocaleString(i,{style:"decimal",minimumFractionDigits:t,maximumFractionDigits:t})}class Wn extends et{constructor(){super(...arguments),this.bindFromEvent=!1}onRender(){super.onRender(),this.rootElement.querySelectorAll("input[hawksearch-facet-value]").forEach((e=>{e.addEventListener("change",(e=>{e.stopPropagation();const t=e.currentTarget,n=this.data.field,i=t.value;t.checked?Pn.addFacetValue(n,i):Pn.removeFacetValue(n,i)}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value]:not(input)").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault(),e.stopPropagation();const n=e.currentTarget.getAttribute("hawksearch-facet-value"),i=null===(t=this.data.values)||void 0===t?void 0:t.find((e=>e.value===n));i&&(i.selected?Pn.removeFacetValue(this.data.field,n):Pn.addFacetValue(this.data.field,n))}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value-include]").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,i=this.data.field;let a=n.getAttribute("hawksearch-facet-value-include");a&&(a=`${(null===(t=HawkSearch.config.search)||void 0===t?void 0:t.facetExclusionPrefix)||"-"}${a}`,Pn.removeFacetValue(i,a))}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value-exclude]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.currentTarget,n=this.data.field,i=t.getAttribute("hawksearch-facet-value-exclude");i&&Pn.excludeFacetValue(n,i)}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value-toggle]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.currentTarget.getAttribute("hawksearch-facet-value-toggle");t&&(this.state.values[t].toggled=!this.state.values[t].toggled,this.render())}))})),this.rootElement.querySelectorAll("[hawksearch-facet-toggle]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),this.state.toggled=!this.state.toggled,this.render()}))}))}}var Qn=/[\\^$.*+?()[\]{}|]/g,Zn=RegExp(Qn.source);var Kn=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function o(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((i=i.apply(e,t||[])).next())}))};HawkSearch||(HawkSearch={}),HawkSearch.handlebars=e.noConflict(),HawkSearch.handlebars.registerHelper("add",(function(e,t){return e+t})),HawkSearch.handlebars.registerHelper("and",(function(...e){return e.slice(0,-1).every((e=>!!e))})),HawkSearch.handlebars.registerHelper("arrayFilterObjects",(function(e,t,n){if(e)return"object"==typeof n&&(n=void 0),e.filter((e=>{const i=re(e,t);return n?i==n:!!i}))})),HawkSearch.handlebars.registerHelper("arrayHasObjectsWithValue",(function(e,t,n){return!!e&&("object"==typeof n&&(n=void 0),e.some((e=>{const i=re(e,t);return n?i==n:!!i})))})),HawkSearch.handlebars.registerHelper("attribute",(function(e,t){return new HawkSearch.handlebars.SafeString(t?e:"")})),HawkSearch.handlebars.registerHelper("concat",(function(...e){return e.length<2?"":e.slice(0,-1).join("")})),HawkSearch.handlebars.registerHelper("currency",(function(e,t,n){var i;return"object"==typeof t&&(t=void 0),"object"==typeof n&&(n=void 0),e instanceof Array&&(e=e[0]),"string"==typeof e&&(e=parseFloat(e)),Un(null!==(i=null!=e?e:n)&&void 0!==i?i:0,t)})),HawkSearch.handlebars.registerHelper("decode",(function(e){return decodeURI(e)})),HawkSearch.handlebars.registerHelper("decodeNested",(function(e){return ft(e)})),HawkSearch.handlebars.registerHelper("eq",(function(e,t){return e===t})),HawkSearch.handlebars.registerHelper("exclude",(function(e){return e.fn()})),HawkSearch.handlebars.registerHelper("html",(function(e){return new HawkSearch.handlebars.SafeString(e)})),HawkSearch.handlebars.registerHelper("number",(function(e,t,n){var i;return"object"==typeof t&&(t=void 0),"object"==typeof n&&(n=void 0),e instanceof Array&&(e=e[0]),"string"==typeof e&&(e=parseFloat(e)),zn(null!==(i=null!=e?e:n)&&void 0!==i?i:0,t)})),HawkSearch.handlebars.registerHelper("if-else",(function(e,t,n){return e?t:n})),HawkSearch.handlebars.registerHelper("lt",(function(e,t){return e<t})),HawkSearch.handlebars.registerHelper("lte",(function(e,t){return e<=t})),HawkSearch.handlebars.registerHelper("gt",(function(e,t){return e>t})),HawkSearch.handlebars.registerHelper("gte",(function(e,t){return e>=t})),HawkSearch.handlebars.registerHelper("or",(function(...e){return e.slice(0,-1).some((e=>!!e))})),HawkSearch.handlebars.registerHelper("string",(function(e,t){return"object"==typeof t&&(t=void 0),e instanceof Array&&(e=e[0]),null!=e?e:t})),HawkSearch.handlebars.registerHelper("subtract",(function(e,t){return e-t})),HawkSearch.services={autocomplete:mt,recommendations:kt,search:Pn,tracking:En};const Yn={autocomplete:class extends et{constructor(){super(...arguments),this.bindFromEvent=!0,this.componentName="autocomplete",this.defaultHtml='<div class="autocomplete">\n <div class="row">\n {{#if products.results.length}}\n <div class="column column--12 column-md--8">\n <span class="autocomplete__title autocomplete__title--products">{{products.title}}</span>\n <div class="row autocomplete__products">\n {{#each products.results}}\n <div class="column column--12 column-sm--4">\n <div class="autocomplete__product">\n <a hawksearch-product="{{id}}" href="{{url}}" class="autocomplete__product__image">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <span class="autocomplete__product__title">\n <a hawksearch-product="{{id}}" href="{{url}}">{{html title}}</a>\n </span>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="autocomplete__product__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="autocomplete__product__price__original">{{currency price}}</span>\n <span class="autocomplete__product__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="autocomplete__product__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n </div>\n </div>\n {{/each}}\n </div>\n </div>\n {{/if}}\n {{#if (or categories.results.length content.results.length queries.results.length)}}\n <div class="column column--12 column-md--4">\n {{#if productSuggestedQueries.results.length}}\n <span class="autocomplete__title autocomplete__title--queries">{{productSuggestedQueries.title}}</span>\n <ul class="autocomplete__list">\n {{#each productSuggestedQueries.results}}\n <li>\n <a hawksearch-query="{{query}}" href="{{url}}">{{query}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if contentSuggestedQueries.results.length}}\n <span class="autocomplete__title autocomplete__title--queries">{{contentSuggestedQueries.title}}</span>\n <ul class="autocomplete__list">\n {{#each contentSuggestedQueries.results}}\n <li>\n <a hawksearch-query="{{query}}" href="{{url}}">{{query}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if categories.results.length}}\n <span class="autocomplete__title autocomplete__title--categories">{{categories.title}}</span>\n <ul class="autocomplete__list">\n {{#each categories.results}}\n <li>\n <a hawksearch-category-field="{{field}}" hawksearch-category-value="{{value}}" href="{{url}}">{{html title}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if content.results.length}}\n <span class="autocomplete__title autocomplete__title--content">{{content.title}}</span>\n <ul class="autocomplete__list">\n {{#each content.results}}\n <li>\n <a hawksearch-content="{{id}}" href="{{url}}">{{html title}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if queries.results.length}}\n <span class="autocomplete__title autocomplete__title--queries">{{queries.title}}</span>\n <ul class="autocomplete__list">\n {{#each queries.results}}\n <li>\n <a hawksearch-query="{{query}}" href="{{url}}">{{query}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n </div>\n {{/if}}\n </div>\n <div class="autocomplete__view-all">\n <a hawksearch-view-all>{{viewAllText}}</a>\n </div>\n</div>'}renderContent(){var e,t,n,i,a,r;return!(!this.data||!(null===(t=null===(e=this.data.categories)||void 0===e?void 0:e.results)||void 0===t?void 0:t.length)&&!(null===(i=null===(n=this.data.content)||void 0===n?void 0:n.results)||void 0===i?void 0:i.length)&&!(null===(r=null===(a=this.data.products)||void 0===a?void 0:a.results)||void 0===r?void 0:r.length))}getContentModel(){return Object.assign(Object.assign({},this.data),{products:Object.assign(Object.assign({},this.data.products),{results:this.data.products.results.map((e=>{var t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g;return Object.assign(Object.assign({},e),{description:null!==(n=null===(t=e.selectedVariant)||void 0===t?void 0:t.description)&&void 0!==n?n:e.description,imageUrl:null!==(a=null===(i=e.selectedVariant)||void 0===i?void 0:i.imageUrl)&&void 0!==a?a:e.imageUrl,price:null!==(s=null===(r=e.selectedVariant)||void 0===r?void 0:r.price)&&void 0!==s?s:e.price,rating:null!==(l=null===(o=e.selectedVariant)||void 0===o?void 0:o.rating)&&void 0!==l?l:e.rating,salePrice:null!==(u=null===(c=e.selectedVariant)||void 0===c?void 0:c.salePrice)&&void 0!==u?u:e.salePrice,sku:null!==(h=null===(d=e.selectedVariant)||void 0===d?void 0:d.sku)&&void 0!==h?h:e.sku,title:null!==(v=null===(p=e.selectedVariant)||void 0===p?void 0:p.title)&&void 0!==v?v:e.title,url:null!==(g=null===(f=e.selectedVariant)||void 0===f?void 0:f.url)&&void 0!==g?g:e.url})}))}),AutocompleteItemType:wn})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-category-field][hawksearch-category-value]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;e.preventDefault();const i=e.currentTarget,a=i.getAttribute("hawksearch-category-field"),r=i.getAttribute("hawksearch-category-value"),s=null===(n=null===(t=this.data.categories)||void 0===t?void 0:t.results)||void 0===n?void 0:n.find((e=>e.field===a&&e.value===r));if(!s)return;En.trackAutocompleteClick(this.data.query,wn.Category,s.title,s.url);const o={[s.field]:[s.value]};Pn.query(void 0,o),this.close()}))})),this.rootElement.querySelectorAll("[hawksearch-content]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;const i=e.currentTarget.getAttribute("hawksearch-content"),a=null===(n=null===(t=this.data.content)||void 0===t?void 0:t.results)||void 0===n?void 0:n.find((e=>e.id===i));a&&En.trackAutocompleteClick(this.data.query,wn.Content,a.title,a.url)}))})),this.rootElement.querySelectorAll("[hawksearch-product]").forEach((e=>{e.addEventListener("click",(e=>{var t,n,i,a,r,s,o,l;const c=e.currentTarget.getAttribute("hawksearch-product"),u=null===(n=null===(t=this.data.products)||void 0===t?void 0:t.results)||void 0===n?void 0:n.find((e=>e.id===c));if(!u)return;const d=null!==(r=(null===(i=HawkSearch.config.variants)||void 0===i?void 0:i.trackUsingVariant)?null===(a=u.selectedVariant)||void 0===a?void 0:a.title:void 0)&&void 0!==r?r:u.title,h=null!==(l=(null===(s=HawkSearch.config.variants)||void 0===s?void 0:s.trackUsingVariant)?null===(o=u.selectedVariant)||void 0===o?void 0:o.url:void 0)&&void 0!==l?l:u.url;En.trackAutocompleteClick(this.data.query,wn.Product,d,h)}))})),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault();const n=e.currentTarget.getAttribute("hawksearch-query");if(!n)return;const i=null===(t=this.data.queries)||void 0===t?void 0:t.results.find((e=>e.query===n));i&&En.trackAutocompleteClick(this.data.query,wn.Search,i.query,i.url),Pn.query(n)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach(((e,t)=>{var n,i,a;const r=null===(a=null===(i=null===(n=this.data)||void 0===n?void 0:n.products)||void 0===i?void 0:i.results)||void 0===a?void 0:a[t];(null==r?void 0:r.variants)&&(e.data={items:r.variants,selectedItem:r.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;r.selectedVariant=t,this.render()})))})),this.rootElement.querySelectorAll("[hawksearch-view-all]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),Pn.query(this.data.query)}))}))}close(){const e=new Event("hawksearch:close-autocomplete");this.dispatchEvent(e)}},"checkbox-list-facet":class extends Wn{constructor(){super(...arguments),this.componentName="checkbox-list-facet",this.defaultHtml='<div class="checkbox-list-facet" {{attribute (concat \'style="max-height: \' maxHeight \'px;"\') maxHeight}}>\n {{> facet-checkbox-list values}}\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle">{{strings.toggle}}</span>\n {{/if}}\n</div>'}registerHelpers(){super.registerHelpers(),this.handlebars.registerPartial("facet-checkbox-list",'{{#if length}}\n <ul class="checkbox-list-facet__list">\n {{#each this}}\n {{#if visible}}\n <li\n class="checkbox-list-facet__list__item{{attribute \' checkbox-list-facet__list__item--excluded\' excluded}}{{attribute\n \' checkbox-list-facet__list__item--collapsible\'\n hasChildren\n }}"\n >\n <div class="checkbox-list-facet__list__item__content">\n {{#if selected}}\n <input id="{{@root.id}}-{{value}}" type="checkbox" checked hawksearch-facet-value value="{{value}}" />\n {{else}}\n <input id="{{@root.id}}-{{value}}" type="checkbox" hawksearch-facet-value value="{{value}}" />\n {{/if}}\n <label for="{{@root.id}}-{{value}}" class="facet__value">\n <span class="facet__value__title checkbox-list-facet__list__item__title">{{title}}</span>\n {{#if @root.displayCount}}\n <span class="facet__value__count checkbox-list-facet__list__item__count">({{count}})</span>\n {{/if}}\n </label>\n {{#if toggled}}\n {{> facet-checkbox-list children}}\n {{/if}}\n </div>\n {{#if (or @root.excludeEnabled hasChildren)}}\n <div class="checkbox-list-facet__list__item__actions">\n {{#if @root.excludeEnabled}}\n {{#if excluded}}\n <span hawksearch-facet-value-include="{{value}}" class="checkbox-list-facet__list__item__actions__item" title="{{@root.strings.include}}">\n <hawksearch-icon name="plus" class="facet__heading__actions__item"></hawksearch-icon>\n </span>\n {{else}}\n <span hawksearch-facet-value-exclude="{{value}}" class="checkbox-list-facet__list__item__actions__item" title="{{@root.strings.exclude}}">\n <hawksearch-icon name="minus" class="facet__heading__actions__item"></hawksearch-icon>\n </span>\n {{/if}}\n {{/if}}\n {{#if hasChildren}}\n <span hawksearch-facet-value-toggle="{{value}}" class="checkbox-list-facet__list__item__actions__item" title="{{if-else toggled @root.strings.collapse @root.strings.expand}}">\n <hawksearch-icon name="{{if-else toggled \'chevron-down\' \'chevron-right\'}}" class="facet__heading__toggle"></hawksearch-icon>\n </span>\n {{/if}}\n </div>\n {{/if}}\n </li>\n {{/if}}\n {{/each}}\n </ul>\n{{/if}}')}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k,y,w,b,_,S,E,x;const P=this.state.filter?new RegExp((H=this.state.filter,(C=ne(C=H))&&Zn.test(C)?C.replace(Qn,"\\$&"):C),"i"):void 0;var C,H;const I=e=>!!P&&P.test(e.title),M=e=>{var t;return(null===(t=e.children)||void 0===t?void 0:t.some((e=>I(e))))||!1},q=(e,t)=>null==e?void 0:e.map(((e,n)=>{var i,a,r,s,o;const l=Object.assign(Object.assign({},e),{visible:!t&&!P&&(this.state.toggled||!this.data.truncation||n<this.data.truncation.threshold)||I(e)||M(e)||!P&&!!(null==t?void 0:t.toggled),hasChildren:!!(null===(i=e.children)||void 0===i?void 0:i.length),children:void 0,toggled:!(!e.value||!(null===(a=e.children)||void 0===a?void 0:a.length))&&null!==(o=null===(s=null===(r=this.state.values)||void 0===r?void 0:r[e.value])||void 0===s?void 0:s.toggled)&&void 0!==o&&o||M(e)});return l.children=q(e.children,l),l}));return{displayCount:null===(e=this.data.displayCount)||void 0===e||e,expanded:null!==(t=this.state.toggled)&&void 0!==t&&t,maxHeight:this.data.scrolling&&this.data.values.length>=this.data.scrolling.threshold?null!==(n=this.data.scrolling.height)&&void 0!==n?n:200:void 0,showToggle:!!this.data.truncation&&(null!==(a=null===(i=this.data.values)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>this.data.truncation.threshold&&!this.state.filter,values:null!==(r=q(this.data.values,void 0))&&void 0!==r?r:[],excludeEnabled:null!==(o=null===(s=this.configuration)||void 0===s?void 0:s.excludeEnabled)&&void 0!==o&&o,strings:{collapse:null!==(u=null===(c=null===(l=this.configuration)||void 0===l?void 0:l.strings)||void 0===c?void 0:c.collapse)&&void 0!==u?u:"Collapse",exclude:null!==(p=null===(h=null===(d=this.configuration)||void 0===d?void 0:d.strings)||void 0===h?void 0:h.exclude)&&void 0!==p?p:"Exclude",expand:null!==(g=null===(f=null===(v=this.configuration)||void 0===v?void 0:v.strings)||void 0===f?void 0:f.expand)&&void 0!==g?g:"Expand",include:null!==(y=null===(k=null===(m=this.configuration)||void 0===m?void 0:m.strings)||void 0===k?void 0:k.include)&&void 0!==y?y:"Include",toggle:this.state.toggled?null!==(_=null===(b=null===(w=this.configuration)||void 0===w?void 0:w.strings)||void 0===b?void 0:b.showFewer)&&void 0!==_?_:"Show fewer":null!==(x=null===(E=null===(S=this.configuration)||void 0===S?void 0:S.strings)||void 0===E?void 0:E.showMore)&&void 0!==x?x:"Show more"}}}},"color-facet":class extends Wn{constructor(){super(...arguments),this.componentName="color-facet",this.defaultHtml='<div class="color-facet">\n <div class="row row--tight color-facet__items">\n {{#each values}}\n {{#if visible}}\n <div hawksearch-facet-value="{{value}}" class="column column--2 color-facet__item{{attribute \' color-facet__item--selected\' selected}}">\n {{#if color.imageUrl}}\n <img src="{{color.imageUrl}}" class="color-facet__item__image" alt="{{color.name}}" title="{{color.name}}" />\n {{else}}\n <div class="color-facet__item__box" style="background: {{color.hex}};"></div>\n {{/if}}\n {{#if @root.excludeEnabled}}\n <span class="color-facet__item__actions">\n {{#if excluded}}\n <span hawksearch-facet-value-include="{{value}}" class="color-facet__item__actions__item" title="{{strings.include}}">\n <hawksearch-icon name="plus"></hawksearch-icon>\n </span>\n {{else}}\n <span hawksearch-facet-value-exclude="{{value}}" class="color-facet__item__actions__item" title="{{strings.exclude}}">\n <hawksearch-icon name="minus"></hawksearch-icon>\n </span>\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{/each}}\n </div>\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle">{{strings.toggle}}</span>\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;const y=this.state.filter?new RegExp(this.state.filter,"i"):void 0;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.filter((e=>e.color)).map(((e,t)=>{var n;return Object.assign(Object.assign({},e),{visible:!y&&(this.state.toggled||!this.data.truncation||t<this.data.truncation.threshold)||!!y&&y.test(null!==(n=e.title)&&void 0!==n?n:"")})})))&&void 0!==t?t:[],showToggle:!!this.data.truncation&&(null!==(i=null===(n=this.data.values)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>this.data.truncation.threshold&&!this.state.filter,expanded:null!==(a=this.state.toggled)&&void 0!==a&&a,excludeEnabled:null!==(s=null===(r=this.configuration)||void 0===r?void 0:r.excludeEnabled)&&void 0!==s&&s,strings:{exclude:null!==(c=null===(l=null===(o=this.configuration)||void 0===o?void 0:o.strings)||void 0===l?void 0:l.exclude)&&void 0!==c?c:"Exclude",include:null!==(h=null===(d=null===(u=this.configuration)||void 0===u?void 0:u.strings)||void 0===d?void 0:d.include)&&void 0!==h?h:"Include",toggle:this.state.toggled?null!==(f=null===(v=null===(p=this.configuration)||void 0===p?void 0:p.strings)||void 0===v?void 0:v.showFewer)&&void 0!==f?f:"Show fewer":null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.showMore)&&void 0!==k?k:"Show more"}}}},"content-zone":class extends et{constructor(){super(...arguments),this.componentName="content-zone",this.defaultHtml='<div class="content-zone">\n {{#each items}}\n {{#if (eq type "custom")}}\n <hawksearch-custom-content index="{{@index}}"></hawksearch-custom-content>\n {{/if}}\n {{#if (eq type "featured-items")}}\n <hawksearch-featured-items-content index="{{@index}}"></hawksearch-featured-items-content>\n {{/if}}\n {{#if (eq type "image")}}\n <hawksearch-image-content index="{{@index}}"></hawksearch-image-content>\n {{/if}}\n {{#if (eq type "popular-queries")}}\n <hawksearch-popular-queries-content index="{{@index}}"></hawksearch-popular-queries-content>\n {{/if}}\n {{/each}}\n</div>',this.bindFromEvent=!0}get name(){return this.getAttribute("name")||void 0}get zone(){var e,t;return this.name?null===(t=null===(e=this.data)||void 0===e?void 0:e.contentZones)||void 0===t?void 0:t[this.name]:void 0}get displayType(){var e,t,n,i;const a=window.innerWidth;return a>=(null!==(t=null===(e=HawkSearch.config.breakpoints)||void 0===e?void 0:e.desktop)&&void 0!==t?t:990)?"desktop":a>=(null!==(i=null===(n=HawkSearch.config.breakpoints)||void 0===n?void 0:n.tablet)&&void 0!==i?i:740)?"tablet":"mobile"}connectedCallback(){super.connectedCallback(),this.windowResizeEventHandler=Nn((e=>{this.displayType!==this.previousDisplayType&&this.render()}),100),window.addEventListener("resize",this.windowResizeEventHandler)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.windowResizeEventHandler)}renderContent(){var e,t;return!!(null===(t=null===(e=this.zone)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return this.previousDisplayType=this.displayType,Object.assign(Object.assign({},this.zone),{items:null!==(t=null===(e=this.zone)||void 0===e?void 0:e.items.map((e=>e[this.displayType])))&&void 0!==t?t:[]})}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("[index]").forEach((e=>{var t,n,i;const a=e,r=parseInt(a.getAttribute("index")||"-1");isNaN(r)||r<0||r>=((null===(t=this.zone)||void 0===t?void 0:t.items.length)||-1)||(a.data=null===(i=null===(n=this.zone)||void 0===n?void 0:n.items[r])||void 0===i?void 0:i[this.displayType])}))}},"custom-content":class extends tt{constructor(){super(...arguments),this.componentName="custom-content",this.defaultHtml='<div class="custom-content">\n {{html content}}\n</div>'}renderContent(){return!!this.data}getContentModel(){return Object.assign({},this.data)}},"date-picker":class extends et{constructor(){super(...arguments),this.componentName="date-picker",this.defaultHtml='<div class="date-picker">\n <input type="text" value="{{value}}" hawksearch-input readonly class="date-picker__input" aria-label="{{strings.label}}" />\n {{#if modalVisible}}\n <div hawksearch-modal class="date-picker__modal">\n {{#if monthSelectorVisible}}\n <div class="date-picker__modal__header">\n <span class="date-picker__modal__header__month">{{strings.selectMonth}}</span>\n </div>\n <div class="row">\n <div class="column column--12">\n <select hawksearch-month>\n {{#each months}}\n {{#if (eq this @root.currentMonth)}}\n <option value="{{@index}}" selected>{{this}}</option>\n {{else}}\n <option value="{{@index}}">{{this}}</option>\n {{/if}}\n {{/each}}\n </select>\n </div>\n <div class="column column--12">\n <select hawksearch-year>\n {{#each years}}\n {{#if (eq this @root.currentYear)}}\n <option value="{{this}}" selected>{{this}}</option>\n {{else}}\n <option value="{{this}}">{{this}}</option>\n {{/if}}\n {{/each}}\n </select>\n </div>\n <div class="column column--12">\n <button hawksearch-select-month class="button button--full-width">{{strings.viewCalendar}}</button>\n </div>\n </div>\n {{else}}\n <div class="date-picker__modal__header">\n <a hawksearch-previous class="date-picker__modal__header__previous" title="{{strings.previous}}">\n <hawksearch-icon name="chevron-left"></hawksearch-icon>\n </a>\n <a hawksearch-month-selector class="date-picker__modal__header__month">{{strings.heading}}</a>\n <a hawksearch-next class="date-picker__modal__header__next" title="{{strings.next}}">\n <hawksearch-icon name="chevron-right"></hawksearch-icon>\n </a>\n </div>\n <table class="date-picker__calendar" cellspacing="0" cellpadding="0">\n <thead>\n <tr>\n <th scope="col">{{dayAbbreviation 0}}</th>\n <th scope="col">{{dayAbbreviation 1}}</th>\n <th scope="col">{{dayAbbreviation 2}}</th>\n <th scope="col">{{dayAbbreviation 3}}</th>\n <th scope="col">{{dayAbbreviation 4}}</th>\n <th scope="col">{{dayAbbreviation 5}}</th>\n <th scope="col">{{dayAbbreviation 6}}</th>\n </tr>\n </thead>\n <tbody>\n {{#each weeks}}\n <tr>\n {{#each this}}\n <td\n hawksearch-date="{{value}}"\n class="date-picker__calendar__day\n {{attribute \' date-picker__calendar__day--alternate\' (eq currentMonth false)}}\n {{attribute \' date-picker__calendar__day--selected\' selected}}\n {{attribute \' date-picker__calendar__day--disabled\' (eq enabled false)}}"\n >\n <span>{{dayOfMonth date}}</span>\n </td>\n {{/each}}\n </tr>\n {{/each}}\n </tbody>\n </table>\n {{/if}}\n </div>\n {{/if}}\n</div>',this.bindFromEvent=!1,this.modalVisible=!1,this.modalDate=new Date,this.monthSelectorVisible=!1}static get observedAttributes(){return["label","max","min","value"]}connectedCallback(){super.connectedCallback(),this.documentClickEventHandler=e=>{this.modalVisible&&!e.composedPath().includes(this)&&(this.modalVisible=!1,setTimeout((()=>this.render())))},document.addEventListener("click",this.documentClickEventHandler),this.windowResizeEventHandler=Nn((e=>{this.positionModal()}),100),window.addEventListener("resize",this.windowResizeEventHandler)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.documentClickEventHandler),window.addEventListener("resize",this.windowResizeEventHandler)}attributeChangedCallback(e,t,n){if("label"===e)this.label=n||void 0;else{const t=n?new Date(n):void 0;switch(t&&t.setHours(0,0,0,0),e){case"max":this.maxDate=t;break;case"min":this.minDate=t;break;case"value":this.selectedDate=t}}this.render()}registerHelpers(){super.registerHelpers(),this.handlebars.registerHelper("dayAbbreviation",(e=>function(e){var t;const n=(null===(t=HawkSearch.config.formatting)||void 0===t?void 0:t.cultureIsoCode)||"en-US";return new Date(2023,0,e+1).toLocaleDateString(n,{weekday:"short"})}(e))),this.handlebars.registerHelper("dayOfMonth",(e=>e.getDate().toString().padStart(2,"0")))}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f;return{value:this.selectedDate?$n(this.selectedDate):"",modalVisible:this.modalVisible,monthSelectorVisible:this.monthSelectorVisible,years:this.getYears(),months:Vn(),weeks:this.getWeeks(this.modalDate),currentYear:this.modalDate.getFullYear(),currentMonth:jn(this.modalDate),strings:{heading:`${jn(this.modalDate)} ${this.modalDate.getFullYear()}`,label:null!==(i=null!==(e=this.label)&&void 0!==e?e:null===(n=null===(t=this.configuration)||void 0===t?void 0:t.strings)||void 0===n?void 0:n.defaultLabel)&&void 0!==i?i:"Selected Date",next:null!==(s=null===(r=null===(a=this.configuration)||void 0===a?void 0:a.strings)||void 0===r?void 0:r.next)&&void 0!==s?s:"Next",previous:null!==(c=null===(l=null===(o=this.configuration)||void 0===o?void 0:o.strings)||void 0===l?void 0:l.previous)&&void 0!==c?c:"Previous",selectMonth:null!==(h=null===(d=null===(u=this.configuration)||void 0===u?void 0:u.strings)||void 0===d?void 0:d.selectMonth)&&void 0!==h?h:"Select Month",viewCalendar:null!==(f=null===(v=null===(p=this.configuration)||void 0===p?void 0:p.strings)||void 0===v?void 0:v.viewCalendar)&&void 0!==f?f:"View Calendar"}}}onRender(){super.onRender(),this.positionModal(),this.rootElement.querySelectorAll("[hawksearch-input]").forEach((e=>{e.addEventListener("click",(e=>{this.modalVisible=!0,this.modalDate=this.selectedDate?new Date(this.selectedDate):new Date,this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-previous]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.modalDate.setDate(1),this.modalDate.setMonth(this.modalDate.getMonth()-1),this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-next]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.modalDate.setDate(1),this.modalDate.setMonth(this.modalDate.getMonth()+1),this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-month-selector]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.monthSelectorVisible=!0,this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-select-month]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;e.preventDefault();const i=null===(t=this.rootElement.querySelector("[hawksearch-month]"))||void 0===t?void 0:t.value,a=null===(n=this.rootElement.querySelector("[hawksearch-year]"))||void 0===n?void 0:n.value;if(void 0===i)throw new Error("Unable to get month value");if(void 0===a)throw new Error("Unable to get year value");this.modalDate=new Date(parseInt(a),parseInt(i),1),this.monthSelectorVisible=!1,this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-date]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const n=e.getAttribute("hawksearch-date")||void 0;if(!n)return;const i=new Date(n);if(this.minDate&&!(i>=this.minDate)||this.maxDate&&!(i<=this.maxDate))return;this.selectedDate=i,this.modalVisible=!1,this.render();const a=new CustomEvent("hawksearch:date-picker-changed",{detail:i});this.dispatchEvent(a)}))}))}positionModal(){const e=this.rootElement.querySelector("[hawksearch-modal]");if(!e||!e.offsetWidth||!this.modalVisible)return;e.style.left="",e.style.right="";const t=window.innerWidth,n=e.getBoundingClientRect();e.offsetWidth+n.x>=t&&t>=e.offsetWidth&&(e.style.right="0")}getYears(){const e=[],t=this.modalDate.getFullYear(),n=t<1900?t:1900,i=(t>(new Date).getFullYear()?t:(new Date).getFullYear())+10;for(let t=n;t<=i;t++)e.push(t);return e}getWeeks(e){let t=new Date(e.getFullYear(),e.getMonth(),1);t.setDate(t.getDate()-t.getDay());const n=[];do{const e=this.getWeek(t);n.push(e),t=new Date(n[n.length-1][6].date.getTime()),t.setDate(t.getDate()+1)}while(n.length<6);return n}getWeek(e){const t=[];(new Date).setHours(0,0,0,0);for(let n=0;n<7;n++){const i=new Date(e.getTime());i.setDate(i.getDate()+n),i.setHours(0,0,0,0);const a={date:i,value:i.toISOString(),currentMonth:i.getMonth()===this.modalDate.getMonth(),enabled:(!this.minDate||i>=this.minDate)&&(!this.maxDate||i<=this.maxDate),selected:!!this.selectedDate&&Tn(i,this.selectedDate)};t.push(a)}return t}},"date-range-facet":class extends Wn{constructor(){super(...arguments),this.componentName="date-range-facet",this.defaultHtml='<div class="date-range-facet">\n <div class="row">\n <div class="column column--6">\n <hawksearch-date-picker\n hawksearch-start\n value="{{startValue}}"\n min="{{minValue}}"\n max="{{endValue}}"\n label="{{strings.startDate}}"\n ></hawksearch-date-picker>\n </div>\n <div class="column column--6">\n <hawksearch-date-picker\n hawksearch-end\n value="{{endValue}}"\n min="{{startValue}}"\n max="{{maxValue}}"\n label="{{strings.endDate}}"\n ></hawksearch-date-picker>\n </div>\n </div>\n</div>'}get range(){var e,t;if("date"===(null===(t=null===(e=this.data)||void 0===e?void 0:e.range)||void 0===t?void 0:t.type))return this.data.range}renderContent(){return!!this.range}getContentModel(){var e,t,n,i,a,r;return{startValue:this.range.start.toISOString(),endValue:this.range.end.toISOString(),minValue:this.range.min.toISOString(),maxValue:this.range.max.toISOString(),strings:{startDate:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.startDate)&&void 0!==n?n:"Start Date",endDate:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.endDate)&&void 0!==r?r:"End Date"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-start]").forEach((e=>{e.addEventListener("hawksearch:date-picker-changed",(e=>{let t=e.detail;t||(t=this.range.min),this.setFacetValue(t,this.range.end)}))})),this.rootElement.querySelectorAll("[hawksearch-end]").forEach((e=>{e.addEventListener("hawksearch:date-picker-changed",(e=>{let t=e.detail;t||(t=this.range.max),this.setFacetValue(this.range.start,t)}))}))}updateInputElements(e,t){const n=this.rootElement.querySelector("[hawksearch-start]"),i=this.rootElement.querySelector("[hawksearch-end]");n&&(n.value=e?$n(e):""),i&&(i.value=t?$n(t):"")}setFacetValue(e,t){var n,i;if(e&&t&&e>t){const n=e;e=t,t=n}e||(e=this.range.start),t||(t=this.range.end),e.setHours(0,0,0,0),t.setHours(23,59,59,999),this.updateInputElements(e,t),Tn(e,this.range.start)&&Tn(t,this.range.end)||Pn.setFacetValue(this.data.field,`${null!==(n=null==e?void 0:e.toISOString())&&void 0!==n?n:""},${null!==(i=null==t?void 0:t.toISOString())&&void 0!==i?i:""}`)}},"facet-wrapper":class extends et{constructor(){super(...arguments),this.componentName="facet-wrapper",this.defaultHtml='<div class="facet">\n <div hawksearch-facet-heading class="facet__heading{{attribute \' facet__heading--collapsible\' collapsible}}">\n {{title}}\n {{#if tooltip}}\n <hawksearch-tooltip text="{{tooltip}}"></hawksearch-tooltip>\n {{/if}}\n {{#if collapsible}}\n <hawksearch-icon name="{{if-else collapsed \'chevron-right\' \'chevron-down\'}}" size="1.5em" class="facet__heading__toggle"></hawksearch-icon>\n {{/if}}\n </div>\n {{#unless collapsed}}\n <div class="facet__content">\n {{#if searchable}}\n <input type="text" placeholder="Quick Lookup" hawksearch-facet-search value="{{filter}}" class="facet__search" />\n {{/if}}\n {{#if (eq type "checkbox")}}\n <hawksearch-checkbox-list-facet hawksearch-facet></hawksearch-checkbox-list-facet>\n {{/if}}\n {{#if (eq type "color")}}\n <hawksearch-color-facet hawksearch-facet></hawksearch-color-facet>\n {{/if}}\n {{#if (eq type "date-range")}}\n <hawksearch-date-range-facet hawksearch-facet></hawksearch-date-range-facet>\n {{/if}}\n {{#if (eq type "link")}}\n <hawksearch-link-list-facet hawksearch-facet></hawksearch-link-list-facet>\n {{/if}}\n {{#if (eq type "numeric-range")}}\n <hawksearch-numeric-range-facet hawksearch-facet></hawksearch-numeric-range-facet>\n {{/if}}\n {{#if (eq type "range-slider")}}\n <hawksearch-range-slider-facet hawksearch-facet></hawksearch-range-slider-facet>\n {{/if}}\n {{#if (eq type "recent-searches")}}\n <hawksearch-recent-searches-facet hawksearch-facet></hawksearch-recent-searches-facet>\n {{/if}}\n {{#if (eq type "related-searches")}}\n <hawksearch-related-searches-facet hawksearch-facet></hawksearch-related-searches-facet>\n {{/if}}\n {{#if (eq type "search")}}\n <hawksearch-search-within-facet hawksearch-facet></hawksearch-search-within-facet>\n {{/if}}\n {{#if (eq type "size")}}\n <hawksearch-size-facet hawksearch-facet></hawksearch-size-facet>\n {{/if}}\n </div>\n {{/unless}}\n</div>',this.bindFromEvent=!1}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.visible)}getContentModel(){var e,t,n,i,a;return Object.assign(Object.assign({},this.data),{collapsed:null!==(t=null!==(e=this.state.collapsed)&&void 0!==e?e:this.data.collapsed)&&void 0!==t&&t,filter:null!==(n=this.state.filter)&&void 0!==n?n:"",searchable:!!this.data.search&&(null!==(a=null===(i=this.data.values)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>this.data.search.threshold})}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("[hawksearch-facet]").forEach((e=>{e.data=this.data,e.state=this.state}))}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-facet-heading]").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault(),(null===(t=this.data)||void 0===t?void 0:t.collapsible)&&(this.state.collapsed=!this.state.collapsed,this.render())}))})),this.rootElement.querySelectorAll("[hawksearch-facet-search]").forEach((e=>{e.addEventListener("keyup",(e=>{var t;const n=null===(t=e.currentTarget.value)||void 0===t?void 0:t.trim();this.state.filter=n||void 0,this.rebindChildElements()}))}))}rebindChildElements(){this.rootElement.querySelectorAll("[hawksearch-facet]").forEach((e=>{e.render()}))}},"facets-list":class extends et{constructor(){super(...arguments),this.componentName="facets-list",this.defaultHtml='<div class="facets{{attribute \' facets--expanded\' expanded}}">\n <div hawksearch-mobile-toggle class="facets__heading">\n {{strings.heading}}\n <hawksearch-icon name="{{if-else expanded \'chevron-down\' \'chevron-right\'}}" size="1.5rem" class="facets__heading__mobile-toggle"></hawksearch-icon>\n </div>\n <div class="facets__content">\n {{#each facets}}\n <hawksearch-facet-wrapper hawksearch-facet-id="{{id}}"></hawksearch-facet-wrapper>\n {{/each}}\n </div>\n</div>',this.bindFromEvent=!0,this.state={expanded:!1}}renderContent(){return!!this.data}getContentModel(){var e,t,n;const i=["checkbox","color","date-range","link","numeric-range","range-slider","recent-searches","related-searches","search","size"];return{facets:this.data.filter((e=>i.includes(e.type))),expanded:this.state.expanded,strings:{heading:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.heading)&&void 0!==n?n:"Narrow Results"}}}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-facet-wrapper[hawksearch-facet-id]").forEach((e=>{var t,n;const i=parseInt(null!==(t=e.getAttribute("hawksearch-facet-id"))&&void 0!==t?t:""),a=null===(n=this.data)||void 0===n?void 0:n.find((e=>e.id===i));let r;if(null==a?void 0:a.values){r=[];const e=t=>{null==t||t.forEach((t=>{t.value&&r.push(t.value),e(t.children)}))};e(a.values)}let s=this.state[i];s||(s={id:i,toggled:!1,collapsed:null==a?void 0:a.collapsed,values:{}},this.state[i]=s),null==r||r.forEach((e=>{s.values[e]||(s.values[e]={toggled:!1})})),e.data=a,e.state=s}))}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-mobile-toggle]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.state.expanded=!this.state.expanded,this.render()}))}))}},"featured-items-content":class extends tt{constructor(){super(...arguments),this.componentName="featured-items-content",this.defaultHtml='<div class="row featured-items-content">\n {{#each items}}\n {{#if (or (eq @root.zone "Top") (eq @root.zone "Top2") (eq @root.zone "Bottom") (eq @root.zone "Bottom2"))}}\n {{#if (eq type "content")}}\n <div class="column column--12">\n <hawksearch-featured-items-content-item></hawksearch-featured-items-content-item>\n </div>\n {{else}}\n <div class="column column--12 column-sm--6 column-lg--4">\n <hawksearch-featured-items-content-item></hawksearch-featured-items-content-item>\n </div>\n {{/if}}\n {{else}}\n <hawksearch-featured-items-content-item></hawksearch-featured-items-content-item>\n {{/if}}\n {{/each}}\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){return Object.assign({},this.data)}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-featured-items-content-item").forEach(((e,t)=>{var n;e.data=null===(n=this.data.items)||void 0===n?void 0:n[t],e.trackingEnabled=this.data.trackingEnabled}))}},"featured-items-content-item":class extends et{constructor(){super(...arguments),this.trackingEnabled=!0,this.componentName="featured-items-content-item",this.defaultHtml='<div class="featured-items-content__item featured-items-content__item--{{type}}">\n {{#if pinned}}\n <span class="featured-items-content__item__pin">\n <hawksearch-icon name="star"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if (eq type "product")}}\n {{#if (lt salePrice price)}}\n <span class="featured-items-content__item__sale-indicator">{{strings.sale}}</span>\n {{/if}}\n <a hawksearch-link href="{{url}}" class="featured-items-content__item__image" aria-label="{{title}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <div class="featured-items-content__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="featured-items-content__item__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="featured-items-content__item__price__original">{{currency price}}</span>\n <span class="featured-items-content__item__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="featured-items-content__item__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n {{else}}\n <div class="row">\n {{#if imageUrl}}\n <div class="column column--12 column-sm--4">\n <a hawksearch-link href="{{url}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n </div>\n {{/if}}\n <div class="column column--12 column-sm--8 flex-align-self-sm-center">\n <div class="featured-items-content__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if description}}\n <p>{{description}}</p>\n {{/if}}\n </div>\n </div>\n {{/if}}\n</div>',this.bindFromEvent=!1}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;return Object.assign(Object.assign({},this.data),{description:null!==(t=null===(e=this.data.selectedVariant)||void 0===e?void 0:e.description)&&void 0!==t?t:this.data.description,imageUrl:null!==(i=null===(n=this.data.selectedVariant)||void 0===n?void 0:n.imageUrl)&&void 0!==i?i:this.data.imageUrl,price:null!==(r=null===(a=this.data.selectedVariant)||void 0===a?void 0:a.price)&&void 0!==r?r:this.data.price,rating:null!==(o=null===(s=this.data.selectedVariant)||void 0===s?void 0:s.rating)&&void 0!==o?o:this.data.rating,salePrice:null!==(c=null===(l=this.data.selectedVariant)||void 0===l?void 0:l.salePrice)&&void 0!==c?c:this.data.salePrice,sku:null!==(d=null===(u=this.data.selectedVariant)||void 0===u?void 0:u.sku)&&void 0!==d?d:this.data.sku,title:null!==(p=null===(h=this.data.selectedVariant)||void 0===h?void 0:h.title)&&void 0!==p?p:this.data.title,url:null!==(f=null===(v=this.data.selectedVariant)||void 0===v?void 0:v.url)&&void 0!==f?f:this.data.url,strings:{sale:null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.sale)&&void 0!==k?k:"Sale"}})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;if(!this.data||!this.trackingEnabled)return;const i=(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.trackUsingVariant)?null===(n=this.data.selectedVariant)||void 0===n?void 0:n.id:void 0,a=null!=i?i:this.data.id;En.trackSearchResultClick(a,this.data.url,e)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach((e=>{var t;(null===(t=this.data)||void 0===t?void 0:t.variants)&&(e.data={items:this.data.variants,selectedItem:this.data.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;this.data.selectedVariant=t,this.render()})))}))}},icon:class extends et{constructor(){super(...arguments),this.componentName="icon",this.defaultHtml='{{html svg}}\n<svg height="{{height}}" width="{{width}}" focusable="false" aria-hidden="true" class="icon">\n <use href="{{url}}"></use>\n</svg>',this.bindFromEvent=!1}get name(){var e;return null!==(e=this.getAttribute("name"))&&void 0!==e?e:void 0}get size(){const e=this.getAttribute("size");return e?isNaN(Number(e))?e:`${e}px`:"1em"}renderContent(){return!!this.name}getContentModel(){return{svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="chevron-back" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.703 5.331a1 1 0 0 1 .014 1.414l-3.303 3.371 3.289 3.222a1 1 0 0 1-1.4 1.428L4.3 10.845a1 1 0 0 1-.014-1.414l4.003-4.085a1 1 0 0 1 1.414-.015Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M14.817 5.331a1 1 0 0 1 .015 1.414l-3.304 3.371 3.29 3.222a1 1 0 0 1-1.4 1.428l-4.004-3.921A1 1 0 0 1 9.4 9.43l4.003-4.085a1 1 0 0 1 1.414-.015Z"/></symbol><symbol id="chevron-down" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.838 10.111a1 1 0 0 1 1.415 0L12 14.858l4.747-4.747a1 1 0 1 1 1.415 1.414l-5.455 5.455a1 1 0 0 1-1.414 0l-5.455-5.455a1 1 0 0 1 0-1.414Z"/></symbol><symbol id="chevron-forward" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.46 14.766a1 1 0 0 1-.014-1.414l3.303-3.37L9.46 6.76a1 1 0 0 1 1.4-1.429l4.003 3.922a1 1 0 0 1 .014 1.414l-4.003 4.085a1 1 0 0 1-1.414.014Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.346 14.766a1 1 0 0 1-.015-1.414l3.304-3.37-3.29-3.222a1 1 0 1 1 1.4-1.429L9.75 9.253a1 1 0 0 1 .014 1.414L5.76 14.752a1 1 0 0 1-1.414.014Z"/></symbol><symbol id="chevron-left" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.69 18.224a1 1 0 0 1-1.414-.034l-5-5.25a1 1 0 0 1 0-1.38l5-5.25a1 1 0 1 1 1.448 1.38l-4.343 4.56 4.343 4.56a1 1 0 0 1-.034 1.414Z"/></symbol><symbol id="chevron-right" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.31 18.224a1 1 0 0 1-.034-1.414l4.343-4.56-4.343-4.56a1 1 0 0 1 1.448-1.38l5 5.25a1 1 0 0 1 0 1.38l-5 5.25a1 1 0 0 1-1.414.034Z"/></symbol><symbol id="chevron-up" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.156 16.531a1 1 0 0 1-1.414-.012L12 11.7l-4.742 4.82a1 1 0 1 1-1.425-1.402l5.454-5.546a1 1 0 0 1 1.426 0l5.455 5.546a1 1 0 0 1-.012 1.414Z"/></symbol><symbol id="cross" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="m17.29 3.922-1.178-1.178-6.077 6.078-6.078-6.078-1.179 1.178L8.856 10l-6.078 6.078 1.18 1.178 6.077-6.078 6.077 6.078 1.179-1.178L11.213 10l6.078-6.078Z"/></symbol><symbol id="help" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 18.333c-4.595 0-8.333-3.737-8.333-8.333 0-4.594 3.738-8.333 8.333-8.333 4.595 0 8.333 3.738 8.333 8.333 0 4.596-3.738 8.333-8.333 8.333Zm0-15A6.674 6.674 0 0 0 3.333 10 6.674 6.674 0 0 0 10 16.667 6.674 6.674 0 0 0 16.666 10 6.674 6.674 0 0 0 10 3.333Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.833 12.5H9.166V10H10a1.668 1.668 0 0 0 0-3.333c-.92 0-1.667.746-1.667 1.666H6.666A3.338 3.338 0 0 1 10 5a3.338 3.338 0 0 1 3.333 3.333 3.343 3.343 0 0 1-2.5 3.23v.937Zm-.097.93a1.042 1.042 0 1 1-1.473 1.473 1.042 1.042 0 0 1 1.473-1.473Z"/></symbol><symbol id="minus" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.833 10.833H4.167V9.167h11.666v1.666Z"/></symbol><symbol id="plus" viewBox="0 0 20 20"><g style="enable-background:new 0 0 20 20"><path d="M16 9h-5V4c0-.6-.4-1-1-1s-1 .4-1 1v5H4c-.6 0-1 .4-1 1s.4 1 1 1h5v5c0 .6.4 1 1 1s1-.4 1-1v-5h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></symbol><symbol id="star-empty" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="m18.333 7.7-5.991-.517L10 1.667 7.658 7.192 1.666 7.7l4.55 3.942L4.85 17.5 10 14.392l5.15 3.108-1.359-5.858L18.334 7.7ZM10 12.833l-3.133 1.892.833-3.567-2.767-2.4 3.65-.316L10 5.083l1.425 3.367 3.65.317-2.767 2.4.834 3.566-3.142-1.9Z"/></symbol><symbol id="star-half" viewBox="0 0 20 20"><g style="enable-background:new 0 0 20 20"><style>.st0{fill-rule:evenodd;clip-rule:evenodd}</style><path class="st0" d="m18.3 7.7-6-.5L10 1.7 7.7 7.2l-6 .5 4.5 3.9-1.4 5.9 5.1-3.1 5.1 3.1-1.4-5.9 4.7-3.9zM10 12.8l-3.1 1.9.8-3.6-2.8-2.3 3.7-.3L10 5.1l1.4 3.4 3.6.3-2.8 2.4.8 3.6-3-2z"/><path class="st0" d="M10 1.7 7.7 7.2l-6 .5 4.5 3.9-1.4 5.9 5.2-3.1z"/></g></symbol><symbol id="star" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="m10 14.392 5.15 3.108-1.367-5.858 4.55-3.942-5.991-.508L10 1.667 7.658 7.192 1.666 7.7l4.55 3.942L4.85 17.5 10 14.392Z"/></symbol></svg>'.replace('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">','<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display: none;">'),url:`#${this.name}`,height:this.size,width:this.size}}},"image-content":class extends tt{constructor(){super(...arguments),this.componentName="image-content",this.defaultHtml='<div class="image-content">\n {{#if link}}\n <a hawksearch-link href="{{link.url}}" target="{{link.target}}">\n <img\n src="{{image.url}}"\n class="image-content__image"\n height="{{image.height}}"\n width="{{image.width}}"\n alt="{{image.altText}}"\n title="{{image.title}}"\n />\n </a>\n {{else}}\n <img\n src="{{image.url}}"\n class="image-content__image"\n height="{{image.height}}"\n width="{{image.width}}"\n alt="{{image.altText}}"\n title="{{image.title}}"\n />\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){return Object.assign({},this.data)}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{En.trackBannerClick(this.data.id,this.data.campaignId)}))})),En.trackBannerImpression(this.data.id,this.data.campaignId)}},"landing-page":class extends et{get url(){var e;return null!==(e=this.getAttribute("url"))&&void 0!==e?e:window.location.pathname}constructor(){super(),this.componentName="landing-page",this.defaultHtml='{{#if customLayout}}\n {{html customLayout}}\n{{else}}\n <hawksearch-search-results mode="landing-page" url="{{url}}"></hawksearch-search-results>\n{{/if}}',this.bindFromEvent=!0,En.trackPageLoad(_n.Landing);const e=Pn.getRequestFromUrl();e.url=this.url,Pn.search(e)}renderContent(){return!!this.data}getContentModel(){return Object.assign(Object.assign({},this.data),{customLayout:this.processCustomLayout(this.data.customLayout),url:this.url})}processCustomLayout(e){var t,n,i,a,r,s,o;if(!e)return;let l=e;const c=Object.keys(null!==(t=this.data.contentZones)&&void 0!==t?t:{}),u=new RegExp(`{{(${c.join("|")})}}`,"g");return l=l.replace(u,'<hawksearch-content-zone name="$1"></hawksearch-content-zone>'),l=l.replace(/{{#breadcrumb#}}/g,null!==(i=null===(n=this.data.content)||void 0===n?void 0:n.breadcrumbs)&&void 0!==i?i:""),l=l.replace(/{{#pageheading#}}/g,null!==(r=null===(a=this.data.content)||void 0===a?void 0:a.heading)&&void 0!==r?r:""),l=l.replace(/{{#customhtml#}}/g,null!==(o=null===(s=this.data.content)||void 0===s?void 0:s.customHtml)&&void 0!==o?o:""),l}},"link-list-facet":class extends Wn{constructor(){super(...arguments),this.componentName="link-list-facet",this.defaultHtml='<div class="link-list-facet" {{attribute (concat \'style="max-height: \' maxHeight \'px;"\') maxHeight}}>\n <ul class="link-list-facet__list">\n {{#each values}}\n {{#if visible}}\n <li class="link-list-facet__list__item">\n <span hawksearch-facet-value="{{value}}" class="link facet__value" tabindex="-1">\n {{#if imageUrl}}\n <img src="{{imageUrl}}" alt="{{title}}" title="{{title}}" class="facet__value__image" />\n {{else}}\n <span class="facet__value__title">{{title}}</span>\n {{/if}}\n {{#if @root.displayCount}}\n <span class="facet__value__count">({{count}})</span>\n {{/if}}\n </span>\n </li>\n {{/if}}\n {{/each}}\n </ul>\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle" tabindex="-1">{{strings.toggle}}</span>\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p;const v=this.state.filter?new RegExp(null!==(e=this.state.filter)&&void 0!==e?e:"","i"):void 0;return{displayCount:null===(t=this.data.displayCount)||void 0===t||t,expanded:null!==(n=this.state.toggled)&&void 0!==n&&n,maxHeight:this.data.scrolling&&this.data.values.length>=this.data.scrolling.threshold?null!==(i=this.data.scrolling.height)&&void 0!==i?i:200:void 0,showToggle:!!this.data.truncation&&(null!==(r=null===(a=this.data.values)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>this.data.truncation.threshold&&!this.state.filter,values:null!==(o=null===(s=this.data.values)||void 0===s?void 0:s.map(((e,t)=>{var n;return Object.assign(Object.assign({},e),{visible:!v&&(this.state.toggled||!this.data.truncation||t<this.data.truncation.threshold)||!!v&&v.test(null!==(n=e.title)&&void 0!==n?n:"")})})))&&void 0!==o?o:[],strings:{toggle:this.state.toggled?null!==(u=null===(c=null===(l=this.configuration)||void 0===l?void 0:l.strings)||void 0===c?void 0:c.showFewer)&&void 0!==u?u:"Show fewer":null!==(p=null===(h=null===(d=this.configuration)||void 0===d?void 0:d.strings)||void 0===h?void 0:h.showMore)&&void 0!==p?p:"Show more"}}}},"modified-query":class extends et{constructor(){super(...arguments),this.componentName="modified-query",this.defaultHtml='<div class="modified-query">\n <p>\n {{strings.showingResultsFor}}\n <span class="modified-query__modified">{{modifiedQuery}}</span>.\n {{strings.searchInsteadFor}}\n <a class="modified-query__original" hawksearch-query="{{query}}">{{query}}</a>.\n </p>\n</div>',this.bindFromEvent=!0}renderContent(){var e,t,n;return!!(null===(e=this.data)||void 0===e?void 0:e.display)&&!!(null===(t=this.data)||void 0===t?void 0:t.query)&&!!(null===(n=this.data)||void 0===n?void 0:n.modifiedQuery)}getContentModel(){var e,t,n,i,a,r;return{query:this.data.query,modifiedQuery:this.data.modifiedQuery,strings:{showingResultsFor:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.showingResultsFor)&&void 0!==n?n:"Showing results for",searchInsteadFor:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.searchInsteadFor)&&void 0!==r?r:"Search instead for"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t,void 0,!0)}))}))}},"numeric-range-facet":class extends Wn{constructor(){super(...arguments),this.componentName="numeric-range-facet",this.defaultHtml='<div class="numeric-range-facet">\n <div class="row">\n <div class="column column--6">\n <input type="number" hawksearch-start value="{{start}}" min="{{min}}" max="{{end}}" aria-label="{{strings.minimum}}" />\n </div>\n <div class="column column--6">\n <input type="number" hawksearch-end value="{{end}}" min="{{start}}" max="{{max}}" aria-label="{{strings.maximum}}" />\n </div>\n </div>\n</div>'}get range(){var e,t;if("numeric"===(null===(t=null===(e=this.data)||void 0===e?void 0:e.range)||void 0===t?void 0:t.type))return this.data.range}renderContent(){return!!this.range}getContentModel(){var e,t,n,i,a,r;return{start:Math.floor(this.range.start),end:Math.ceil(this.range.end),min:Math.floor(this.range.min),max:Math.floor(this.range.max),strings:{minimum:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.minimum)&&void 0!==n?n:"Minimum",maximum:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.maximum)&&void 0!==r?r:"Maximum"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-start]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=Math.floor(this.range.min),t.value=n.toString()),this.setFacetValue(n,this.range.end)}))})),this.rootElement.querySelectorAll("[hawksearch-end]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=Math.ceil(this.range.max),t.value=n.toString()),this.setFacetValue(this.range.start,n)}))}))}setFacetValue(e,t){if(e>t){const n=e;e=t,t=n}e=Math.floor(e),t=Math.ceil(t),e===Math.floor(this.range.start)&&t===Math.ceil(this.range.end)||Pn.setFacetValue(this.data.field,`${e},${t}`)}},"page-size":class extends et{constructor(){super(...arguments),this.componentName="page-size",this.defaultHtml='<div class="page-size">\n <select hawksearch-page-size>\n {{#each options}}\n {{#if selected}}\n <option value="{{pageSize}}" selected>{{title}}</option>\n {{else}}\n <option value="{{pageSize}}">{{title}}</option>\n {{/if}}\n {{/each}}\n </select>\n</div>',this.bindFromEvent=!0}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.length)}getContentModel(){return{options:this.data}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-page-size]").forEach((e=>{e.addEventListener("change",(e=>{e.preventDefault();const t=e.currentTarget,n=parseInt(t.value);Pn.setPageSize(n)}))}))}},pagination:class extends et{constructor(){super(...arguments),this.componentName="pagination",this.defaultHtml='<div class="pagination">\n {{#if strings.summary}}\n <div class="pagination__summary">{{strings.summary}}</div>\n {{/if}}\n <div class="pagination__pages">\n {{#if displayFirstLink}}\n <span hawksearch-page="1" class="link pagination__page pagination__page--first" title="{{strings.first}}">\n <hawksearch-icon name="chevron-back" size="1.2em"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if displayPreviousLink}}\n <a\n hawksearch-page="{{subtract page 1}}"\n rel="prev"\n href="{{pageUrl (subtract page 1)}}"\n class="pagination__page pagination__page--previous"\n title="{{strings.previous}}"\n >\n <hawksearch-icon name="chevron-left" size="1.2em"></hawksearch-icon>\n </a>\n {{/if}}\n {{#each pages}}\n {{#if (eq this @root.page)}}\n <span class="pagination__page pagination__page--selected">{{this}}</span>\n {{else}}\n <a hawksearch-page="{{this}}" href="{{pageUrl this}}" class="pagination__page">{{this}}</a>\n {{/if}}\n {{/each}}\n {{#if displayNextLink}}\n <a\n hawksearch-page="{{add page 1}}"\n rel="next"\n href="{{pageUrl (add page 1)}}"\n class="pagination__page pagination__page--next"\n title="{{strings.next}}"\n >\n <hawksearch-icon name="chevron-right" size="1.2em"></hawksearch-icon>\n </a>\n {{/if}}\n {{#if displayLastLink}}\n <span hawksearch-page="{{totalPages}}" class="link pagination__page pagination__page--last" title="{{strings.last}}">\n <hawksearch-icon name="chevron-forward" size="1.2em"></hawksearch-icon>\n </span>\n {{/if}}\n </div>\n</div>',this.bindFromEvent=!0,this.defaultMaxPageLinks=9}registerHelpers(){super.registerHelpers(),this.handlebars.registerHelper("pageUrl",(e=>{const t=new URLSearchParams;return 1===e?t.delete(Pn.queryStringParams.page):t.set(Pn.queryStringParams.page,e.toString()),`?${t}`}))}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.totalResults)}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m;const k=(this.data.page-1)*this.data.pageSize+1;let y=k+this.data.pageSize-1;return y>this.data.totalResults&&(y=this.data.totalResults),{page:this.data.page,pages:this.getPages(),firstPage:1,lastPage:this.data.totalPages,firstRecord:k,lastRecord:y,totalRecords:null!==(e=this.data.totalResults)&&void 0!==e?e:0,totalPages:null!==(t=this.data.totalPages)&&void 0!==t?t:1,maxPageLinks:null!==(n=this.data.maxPageLinks)&&void 0!==n?n:this.defaultMaxPageLinks,displayFirstLink:this.data.displayFirstLink&&this.data.page>1,displayPreviousLink:this.data.page>1,displayNextLink:this.data.page<this.data.totalPages,displayLastLink:this.data.displayLastLink&&this.data.page<this.data.totalPages,strings:{first:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.first)&&void 0!==r?r:"First",last:null!==(l=null===(o=null===(s=this.configuration)||void 0===s?void 0:s.strings)||void 0===o?void 0:o.last)&&void 0!==l?l:"Last",next:null!==(d=null===(u=null===(c=this.configuration)||void 0===c?void 0:c.strings)||void 0===u?void 0:u.next)&&void 0!==d?d:"Next",previous:null!==(v=null===(p=null===(h=this.configuration)||void 0===h?void 0:h.strings)||void 0===p?void 0:p.previous)&&void 0!==v?v:"Previous",summary:this.interpolate(null!==(m=null===(g=null===(f=this.configuration)||void 0===f?void 0:f.strings)||void 0===g?void 0:g.summary)&&void 0!==m?m:"Showing ${first}-${last} of ${total}",{first:zn(k,0),last:zn(y,0),total:zn(this.data.totalResults,0)})}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-page]").forEach((e=>{const t=e.getAttribute("hawksearch-page");if(t){const n=parseInt(t);e.addEventListener("click",(e=>{e.preventDefault(),this.setPage(n)}))}}))}setPage(e){return t=this,n=void 0,a=function*(){yield Pn.paginate(e)},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{l(a.next(e))}catch(e){r(e)}}function o(e){try{l(a.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,o)}l((a=a.apply(t,n||[])).next())}));var t,n,i,a}getPages(){var e;const t=[];if(this.data&&this.data.totalPages>1){const n=null!==(e=this.data.maxPageLinks)&&void 0!==e?e:this.defaultMaxPageLinks;let i=this.data.page-Math.floor(n/2);i<1&&(i=1);let a=i+n-1;a>this.data.totalPages&&(a=this.data.totalPages);for(let e=i;e<=a;e++)t.push(e)}return t}},"popular-queries-content":class extends tt{constructor(){super(...arguments),this.componentName="popular-queries-content",this.defaultHtml='<div class="popular-queries-content">\n {{#each items}}\n <a hawksearch-query="{{query}}" class="popular-queries-content__item popular-queries-content__item--{{weight}}">{{query}}</a>\n {{/each}}\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){return Object.assign({},this.data)}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"query-suggestions":class extends et{constructor(){super(...arguments),this.componentName="query-suggestions",this.defaultHtml='<div class="query-suggestions">\n <p>{{query-suggestions querySuggestions}}</p>\n</div>',this.bindFromEvent=!0}registerHelpers(){var e,t,n,i,a,r;super.registerHelpers();const s=null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.orDelimeter)&&void 0!==n?n:"or",o=null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.prompt)&&void 0!==r?r:"Did you mean to search for ${suggestions}?";this.handlebars.registerHelper("query-suggestions",(function(e){function t(e){return`<a hawksearch-query="${encodeURIComponent(e)}" class="query-suggestions__link">${e}</a>`}const n=`, ${s} `;let i="";i=e.length<=2?e.map(t).join(` ${s} `):e.slice(0,e.length-1).map(t).join(", ")+n+t(e[e.length-1]);const a=o.replace("${suggestions}",i);return new HawkSearch.handlebars.SafeString(a)}))}renderContent(){var e;return!!this.data&&!!this.data.display&&!!(null===(e=this.data.querySuggestions)||void 0===e?void 0:e.length)}getContentModel(){var e;return{querySuggestions:null!==(e=this.data.querySuggestions)&&void 0!==e?e:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"range-slider":class extends et{constructor(){super(...arguments),this.componentName="range-slider",this.defaultHtml='<div class="range-slider">\n <div class="range-slider__container">\n <div class="range-slider__bar">\n <div class="range-slider__bar__active" hawksearch-bar style="left: {{start}}%; right: {{subtract 100 end}}%;"></div>\n </div>\n <span class="range-slider__handle range-slider__handle--start" title="{{strings.start}}" hawksearch-handle="start" style="left: {{start}}%;"></span>\n <span class="range-slider__handle range-slider__handle--end" title="{{strings.end}}" hawksearch-handle="end" style="left: {{end}}%;"></span>\n </div>\n</div>',this.bindFromEvent=!1,this.dragging=!1,this.start=0,this.end=100}static get observedAttributes(){return["end","start"]}connectedCallback(){super.connectedCallback(),this.mouseUpEventHandler=this.onMouseUp.bind(this),this.mouseMoveEventHandler=this.onMouseMove.bind(this),["mouseup","touchend"].forEach((e=>document.addEventListener(e,this.mouseUpEventHandler))),["mousemove","touchmove"].forEach((e=>document.addEventListener(e,this.mouseMoveEventHandler)),{passive:!0})}attributeChangedCallback(e,t,n){switch(e){case"end":this.setEnd(n);break;case"start":this.setStart(n)}this.render()}disconnectedCallback(){super.disconnectedCallback(),["mouseup","touchend"].forEach((e=>document.removeEventListener(e,this.mouseUpEventHandler))),["mousemove","touchmove"].forEach((e=>document.removeEventListener(e,this.mouseMoveEventHandler)))}setStart(e){let t=parseInt(null!=e?e:"");(isNaN(t)||t<0)&&(t=0),this.start=t}setEnd(e){let t=parseInt(null!=e?e:"");(isNaN(t)||t>100)&&(t=100),this.end=t}getContentModel(){var e,t,n,i,a,r;return{start:this.start,end:this.end,strings:{start:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.start)&&void 0!==n?n:"Start",end:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.end)&&void 0!==r?r:"End"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-handle]").forEach((e=>{["mousedown","touchstart"].forEach((t=>e.addEventListener(t,(t=>{var n;if(!e.getAttribute("hawksearch-handle"))return;const i=t.currentTarget;this.activeHandle=i,this.startOffsetPercentage=parseFloat(null!==(n=i.style.left)&&void 0!==n?n:0),this.startX=t instanceof MouseEvent?t.clientX:t.touches[0].clientX,this.dragging=!0,this.rootElement.querySelectorAll("[hawksearch-handle]").forEach((e=>e.style.zIndex="")),i.style.zIndex="1"}),{passive:!0})))}))}onMouseUp(e){if(!this.dragging)return;e.preventDefault(),this.dragging=!1;const t={start:this.start,end:this.end},n=new CustomEvent("hawksearch:range-slider-changed",{detail:t});this.dispatchEvent(n)}onMouseMove(e){var t,n;if(!this.dragging||!this.activeHandle||void 0===this.startX)return;const i=this.activeHandle.getAttribute("hawksearch-handle"),a=this.rootElement.querySelector('[hawksearch-handle="start"]'),r=this.rootElement.querySelector('[hawksearch-handle="end"]'),s=this.rootElement.querySelector("[hawksearch-bar]"),o=(e instanceof MouseEvent?e.clientX:e.touches[0].clientX)-this.startX,l=this.activeHandle.parentElement.offsetWidth;let c=Math.round(o/l*100)+this.startOffsetPercentage,u=0,d=100;"start"===i?d=parseFloat(null!==(t=r.style.left)&&void 0!==t?t:100):"end"===i&&(u=parseFloat(null!==(n=a.style.left)&&void 0!==n?n:0)),c<=u?c=u:c>=d&&(c=d),"start"===i?u=c:"end"===i&&(d=c),this.activeHandle.style.left=`${c}%`,s.style.left=`${u}%`,s.style.right=100-d+"%","start"===i?this.start=c:"end"===i&&(this.end=c);const h={start:this.start,end:this.end},p=new CustomEvent("hawksearch:range-slider-dragging",{detail:h});this.dispatchEvent(p)}},"range-slider-facet":class extends Wn{constructor(){super(...arguments),this.componentName="range-slider-facet",this.defaultHtml='<div class="range-slider-facet">\n <div class="row">\n <div class="column column--6">\n <input type="number" hawksearch-start value="{{start}}" min="{{min}}" max="{{end}}" aria-label="{{strings.minimum}}" />\n </div>\n <div class="column column--6">\n <input type="number" hawksearch-end value="{{end}}" min="{{start}}" max="{{max}}" aria-label="{{strings.maximum}}" />\n </div>\n </div>\n <hawksearch-range-slider start="{{sliderStart}}" end="{{sliderEnd}}"></hawksearch-range-slider>\n</div>'}get range(){var e,t;if("numeric"===(null===(t=null===(e=this.data)||void 0===e?void 0:e.range)||void 0===t?void 0:t.type))return this.data.range}renderContent(){return!!this.range}getContentModel(){var e,t,n,i,a,r;const s=Math.ceil(this.range.max)-Math.floor(this.range.min);return{start:Math.floor(this.range.start),end:Math.ceil(this.range.end),min:Math.floor(this.range.min),max:Math.ceil(this.range.max),sliderStart:Math.ceil((Math.floor(this.range.start)-Math.floor(this.range.min))/s*100),sliderEnd:Math.floor(Math.ceil(this.range.end)/s*100),strings:{minimum:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.minimum)&&void 0!==n?n:"Minimum",maximum:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.maximum)&&void 0!==r?r:"Maximum"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-start]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=0),this.setFacetValue(n,this.range.end)}))})),this.rootElement.querySelectorAll("[hawksearch-end]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=0),this.setFacetValue(this.range.start,n)}))})),this.rootElement.querySelectorAll("hawksearch-range-slider").forEach((e=>{e.addEventListener("hawksearch:range-slider-dragging",(e=>{const t=e.detail,n=this.getRange(t.start,t.end);this.updateInputElements(n.start,n.end)})),e.addEventListener("hawksearch:range-slider-changed",(e=>{const t=e.detail,n=this.getRange(t.start,t.end);this.setFacetValue(n.start,n.end)}))}))}getRange(e,t){var n,i;const a=Math.floor(null!==(n=this.range.min)&&void 0!==n?n:0),r=Math.ceil(null!==(i=this.range.max)&&void 0!==i?i:0),s=r-a;return{start:Math.floor(s*e/100+a),end:Math.ceil(r*t/100)}}updateInputElements(e,t){const n=this.rootElement.querySelector("[hawksearch-start]"),i=this.rootElement.querySelector("[hawksearch-end]");n&&(n.value=e.toString()),i&&(i.value=t.toString())}setFacetValue(e,t){this.updateInputElements(e,t),e===Math.floor(this.range.start)&&t===Math.ceil(this.range.end)||Pn.setFacetValue(this.data.field,`${e.toFixed(2)},${t.toFixed(2)}`)}},rating:class extends et{constructor(){super(...arguments),this.componentName="rating",this.defaultHtml='<div class="rating" title="{{rating}}">\n <hawksearch-icon name="{{ratingIcon rating 0}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 1}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 2}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 3}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 4}}" class="rating__icon"></hawksearch-icon>\n</div>',this.bindFromEvent=!1}registerHelpers(){super.registerHelpers(),this.handlebars.registerHelper("ratingIcon",((e,t)=>{const n=e-t;return n>=1?"star":n>=.5?"star-half":"star-empty"}))}get rating(){var e;return parseFloat(null!==(e=this.getAttribute("rating"))&&void 0!==e?e:"0")||void 0}renderContent(){return!!this.rating}getContentModel(){return{rating:this.rating}}onRender(){var e;super.onRender(),null===(e=this.rootElement.querySelector("[hawksearch-tooltip]"))||void 0===e||e.addEventListener("mouseover",(e=>{const t=e.currentTarget,n=this.rootElement.querySelector("[hawksearch-tooltip-content]");if(!n)return;n.style.removeProperty("top"),n.style.removeProperty("right");const i=window.innerWidth,a=t.getBoundingClientRect(),r=a.x+a.width;n.style.top=`${a.top}px`,i-r<370&&(n.style.right="20px")}))}},recommendations:class extends et{static get observedAttributes(){return["item-id","widget-id"]}get carousel(){var e,t,n,i,a,r;return!1!==(null===(t=null===(e=this.configuration)||void 0===e?void 0:e.carousel)||void 0===t?void 0:t.enabled)&&!!(null===(n=this.data)||void 0===n?void 0:n.carousel)&&(null!==(r=null===(a=null===(i=this.data)||void 0===i?void 0:i.items)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>this.itemsToDisplay}get carouselPosition(){return this.carousel?-1*this.selectedIndex*100/this.itemsToDisplay+"%":void 0}get displayType(){var e,t,n,i;const a=window.innerWidth;return a>=(null!==(t=null===(e=HawkSearch.config.breakpoints)||void 0===e?void 0:e.desktop)&&void 0!==t?t:990)?"desktop":a>=(null!==(i=null===(n=HawkSearch.config.breakpoints)||void 0===n?void 0:n.tablet)&&void 0!==i?i:740)?"tablet":"mobile"}get itemsToDisplay(){var e,t,n,i,a,r,s,o,l;switch(this.displayType){case"mobile":return null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.itemsToDisplay)||void 0===t?void 0:t.mobile)&&void 0!==n?n:1;case"tablet":return null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.itemsToDisplay)||void 0===a?void 0:a.tablet)&&void 0!==r?r:2;case"desktop":return null!==(l=null===(o=null===(s=this.configuration)||void 0===s?void 0:s.itemsToDisplay)||void 0===o?void 0:o.desktop)&&void 0!==l?l:3;default:return 1}}get itemWidth(){return 100/this.itemsToDisplay+"%"}constructor(){super(),this.componentName="recommendations",this.defaultHtml='<div class="recommendations">\n {{#if headingEnabled}}\n <h2 class="heading recommendations__heading">{{title}}</h2>\n {{/if}}\n <div class="recommendations__content">\n {{#if (and carousel buttonsEnabled)}}\n <a hawksearch-previous class="recommendations__button recommendations__button--previous" title="{{strings.previous}}">\n <hawksearch-icon name="chevron-left"></hawksearch-icon>\n </a>\n {{/if}}\n <div class="recommendations__carousel">\n <div hawksearch-carousel class="recommendations__list{{attribute \' recommendations__list--carousel\' carousel}}" style="left: {{carouselPosition}};">\n {{#each items}}\n <div class="recommendations__carousel__item" style="width: {{@root.itemWidth}};">\n <hawksearch-recommendations-item widget-id="{{@root.id}}" request-id="{{@root.requestId}}"></hawksearch-recommendations-item>\n </div>\n {{/each}}\n </div>\n {{#if (and carousel paginationEnabled)}}\n <div class="recommendations__pagination">\n {{#each paginationItems}}\n <span\n hawksearch-carousel-item="{{@index}}"\n class="recommendations__pagination__item{{attribute \' recommendations__pagination__item--selected\' selected}}"\n title="{{title}}"\n ></span>\n {{/each}}\n </div>\n {{/if}}\n </div>\n {{#if (and carousel buttonsEnabled)}}\n <a\n hawksearch-next\n class="recommendations__button recommendations__button--next{{attribute \' recommendations__button--disabled\' (eq nextEnabled false)}}"\n title="{{strings.next}}"\n >\n <hawksearch-icon name="chevron-right"></hawksearch-icon>\n </a>\n {{/if}}\n </div>\n</div>',this.bindFromEvent=!0,this.selectedIndex=0}connectedCallback(){super.connectedCallback(),this.touchMoveEventHandler=this.onTouchMove.bind(this),this.touchEndEventHandler=this.onTouchEnd.bind(this),this.windowResizeEventHandler=Nn((e=>this.onWindowResize(e)),100),document.addEventListener("touchmove",this.touchMoveEventHandler),document.addEventListener("touchend",this.touchEndEventHandler),window.addEventListener("resize",this.windowResizeEventHandler)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("touchmove",this.touchMoveEventHandler),document.removeEventListener("touchend",this.touchEndEventHandler),window.removeEventListener("resize",this.windowResizeEventHandler)}attributeChangedCallback(e,t,n){switch(clearTimeout(this.requestTimer),e){case"item-id":this.itemId=n||void 0;break;case"widget-id":{if(!n)return this.widgetId=void 0,void(this.eventFilter=void 0);const e=n.split(",").map((e=>e.trim()));this.widgetId=e[Math.floor(Math.random()*e.length)],this.eventFilter=this.widgetId;break}}this.requestTimer=setTimeout((()=>{if(!this.widgetId)return;const e={widgetId:this.widgetId,itemId:this.itemId};kt.getItems(e)}),50)}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p;return this.previousDisplayType=this.displayType,Object.assign(Object.assign({},this.data),{buttonsEnabled:null===(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.carousel)||void 0===t?void 0:t.buttonsEnabled)||void 0===n||n,carousel:this.carousel,carouselPosition:this.carouselPosition,headingEnabled:null===(a=null===(i=this.configuration)||void 0===i?void 0:i.headingEnabled)||void 0===a||a,itemWidth:this.itemWidth,paginationEnabled:null===(o=null===(s=null===(r=this.configuration)||void 0===r?void 0:r.carousel)||void 0===s?void 0:s.paginationEnabled)||void 0===o||o,paginationItems:this.data.items.map(((e,t)=>({selected:this.getSelected(t),title:e.title}))),strings:{next:null!==(u=null===(c=null===(l=this.configuration)||void 0===l?void 0:l.strings)||void 0===c?void 0:c.next)&&void 0!==u?u:"Next",previous:null!==(p=null===(h=null===(d=this.configuration)||void 0===d?void 0:d.strings)||void 0===h?void 0:h.previous)&&void 0!==p?p:"Previous"}})}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-recommendations-item").forEach(((e,t)=>{var n;e.data=null===(n=this.data.items)||void 0===n?void 0:n[t]}))}onRender(){super.onRender(),this.addEventListener("mouseover",(e=>{this.toggleAutorotation(!1)})),this.addEventListener("mouseleave",(e=>{this.toggleAutorotation(!0)})),this.rootElement.querySelectorAll("[hawksearch-previous]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.previous()}))})),this.rootElement.querySelectorAll("[hawksearch-next]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.next()}))})),this.rootElement.querySelectorAll("[hawksearch-carousel").forEach((e=>{e.addEventListener("touchstart",(e=>{this.dragElement=e.currentTarget,this.dragOffset=e.changedTouches[0].pageX,this.dragOrigin=this.dragElement.offsetLeft,this.dragElement.style.transition="none"}))})),this.rootElement.querySelectorAll("[hawksearch-carousel-item").forEach((e=>{e.addEventListener("click",(t=>{var n;t.preventDefault();const i=parseInt(null!==(n=e.getAttribute("hawksearch-carousel-item"))&&void 0!==n?n:"");isNaN(i)||this.displayItem(i)}))})),this.displayItem(this.selectedIndex),this.toggleAutorotation(!0)}toggleAutorotation(e){var t,n,i,a,r,s,o,l;this.autorotationTimer&&clearInterval(this.autorotationTimer),e&&(null===(t=this.contentModel)||void 0===t?void 0:t.carousel)&&!1!==(null===(a=null===(i=null===(n=this.configuration)||void 0===n?void 0:n.carousel)||void 0===i?void 0:i.autorotation)||void 0===a?void 0:a.enabled)&&(this.autorotationTimer=setInterval((()=>{this.next()}),null!==(l=null===(o=null===(s=null===(r=this.configuration)||void 0===r?void 0:r.carousel)||void 0===s?void 0:s.autorotation)||void 0===o?void 0:o.interval)&&void 0!==l?l:5e3))}previous(){const e=0===this.selectedIndex?this.data.items.length-this.itemsToDisplay:this.selectedIndex-this.itemsToDisplay;this.displayItem(e)}next(){const e=this.selectedIndex===this.data.items.length-this.itemsToDisplay?0:this.selectedIndex+this.itemsToDisplay;this.displayItem(e)}getSelected(e){return e>=this.selectedIndex&&e<this.selectedIndex+this.itemsToDisplay}displayItem(e){var t,n,i;const a=this.rootElement.querySelector("[hawksearch-carousel]");a&&(null===(n=null===(t=this.data)||void 0===t?void 0:t.items)||void 0===n?void 0:n.length)&&(e<0&&(e=0),e>=this.data.items.length-this.itemsToDisplay&&(e=this.data.items.length-this.itemsToDisplay),this.selectedIndex=e,a.style.left=null!==(i=this.carouselPosition)&&void 0!==i?i:"",this.rootElement.querySelectorAll("[hawksearch-carousel-item]").forEach(((e,t)=>{var n,i,a,r;const s=parseInt(null!==(n=e.getAttribute("hawksearch-carousel-item"))&&void 0!==n?n:""),o=!isNaN(s)&&this.getSelected(s),l=null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.carousel)||void 0===a?void 0:a.paginationSelectedCssClass)&&void 0!==r?r:"recommendations__pagination__item--selected";e.classList.toggle(l,o)})))}onWindowResize(e){this.displayType!==this.previousDisplayType&&this.render()}onTouchMove(e){var t,n;if(!this.dragElement||!this.carousel)return;const i=(null!==(t=this.dragOrigin)&&void 0!==t?t:0)+e.changedTouches[0].pageX-(null!==(n=this.dragOffset)&&void 0!==n?n:0);this.dragElement.style.left=`${i}px`}onTouchEnd(e){var t;if(!this.dragElement||!this.carousel)return;const n=this.dragElement.parentElement.offsetWidth/this.itemsToDisplay,i=this.dragElement.offsetLeft-(null!==(t=this.dragOrigin)&&void 0!==t?t:0),a=Math.round(i/n),r=this.selectedIndex-a;this.displayItem(r),this.dragElement.style.transition="",this.dragElement=void 0,this.dragOffset=void 0,this.dragOrigin=void 0}},"recommendations-item":class extends et{constructor(){super(...arguments),this.componentName="recommendations-item",this.defaultHtml='<div class="recommendations__item">\n {{#if pinned}}\n <span class="recommendations__item__pin">\n <hawksearch-icon name="star"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if (lt salePrice price)}}\n <span class="recommendations__item__sale-indicator">{{strings.sale}}</span>\n {{/if}}\n <a hawksearch-link href="{{url}}" class="recommendations__item__image" aria-label="{{title}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <div class="recommendations__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="recommendations__item__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="recommendations__item__price__original">{{currency price}}</span>\n <span class="recommendations__item__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="recommendations__item__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n</div>',this.bindFromEvent=!1}get widgetId(){return this.getAttribute("widget-id")||void 0}get requestId(){return this.getAttribute("request-id")||void 0}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;return Object.assign(Object.assign({},this.data),{description:null!==(t=null===(e=this.data.selectedVariant)||void 0===e?void 0:e.description)&&void 0!==t?t:this.data.description,imageUrl:null!==(i=null===(n=this.data.selectedVariant)||void 0===n?void 0:n.imageUrl)&&void 0!==i?i:this.data.imageUrl,price:null!==(r=null===(a=this.data.selectedVariant)||void 0===a?void 0:a.price)&&void 0!==r?r:this.data.price,rating:null!==(o=null===(s=this.data.selectedVariant)||void 0===s?void 0:s.rating)&&void 0!==o?o:this.data.rating,salePrice:null!==(c=null===(l=this.data.selectedVariant)||void 0===l?void 0:l.salePrice)&&void 0!==c?c:this.data.salePrice,sku:null!==(d=null===(u=this.data.selectedVariant)||void 0===u?void 0:u.sku)&&void 0!==d?d:this.data.sku,title:null!==(p=null===(h=this.data.selectedVariant)||void 0===h?void 0:h.title)&&void 0!==p?p:this.data.title,url:null!==(f=null===(v=this.data.selectedVariant)||void 0===v?void 0:v.url)&&void 0!==f?f:this.data.url,strings:{sale:null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.sale)&&void 0!==k?k:"Sale"}})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;if(!this.data||!this.widgetId||!this.requestId)return;const i=(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.trackUsingVariant)?null===(n=this.data.selectedVariant)||void 0===n?void 0:n.id:void 0,a=null!=i?i:this.data.id;En.trackRecommendationClick(this.widgetId,this.requestId,a)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach((e=>{var t;(null===(t=this.data)||void 0===t?void 0:t.variants)&&(e.data={items:this.data.variants,selectedItem:this.data.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;this.data.selectedVariant=t,this.render()})))}))}},"recent-searches-facet":class extends Wn{constructor(){super(...arguments),this.componentName="recent-searches-facet",this.defaultHtml='<div class="recent-searches-facet">\n <ul class="recent-searches-facet__list">\n {{#each values}}\n <li class="recent-searches-facet__list__item">\n <a hawksearch-query="{{this}}" class="facet__value">{{this}}</a>\n </li>\n {{/each}}\n </ul>\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.map((e=>e.title)))&&void 0!==t?t:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"related-searches-facet":class extends Wn{constructor(){super(...arguments),this.componentName="related-searches-facet",this.defaultHtml='<div class="related-searches-facet">\n <ul class="related-searches-facet__list">\n {{#each values}}\n <li class="related-searches-facet__list__item">\n <a hawksearch-query="{{this}}" class="facet__value">{{this}}</a>\n </li>\n {{/each}}\n </ul>\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.map((e=>e.title)))&&void 0!==t?t:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"search-field":class extends et{constructor(){super(...arguments),this.componentName="search-field",this.defaultHtml='<div class="search-field">\n <input type="text" hawksearch-input value="{{query}}" placeholder="{{strings.placeholder}}" />\n <hawksearch-autocomplete></hawksearch-autocomplete>\n</div>',this.bindFromEvent=!0,this.previousValue=""}get autocompleteMinCharacterCount(){var e,t;return null!==(t=null===(e=HawkSearch.config.autocomplete)||void 0===e?void 0:e.minCharacterCount)&&void 0!==t?t:1}get recommendationsEnabled(){var e,t;return null!==(t=null===(e=HawkSearch.config.autocomplete)||void 0===e?void 0:e.recommendationsEnabled)&&void 0!==t&&t}get disableAutofill(){var e,t,n;return null!==(n=null===(t=null===(e=HawkSearch.config.components)||void 0===e?void 0:e["search-field"])||void 0===t?void 0:t.disableAutofill)&&void 0!==n&&n}connectedCallback(){super.connectedCallback(),this.clickEventHandler=e=>{e.target.closest("hawksearch-search-field")||this.toggleAutocomplete(!1)},this.rootElement.ownerDocument.addEventListener("click",this.clickEventHandler)}disconnectedCallback(){super.disconnectedCallback(),this.rootElement.ownerDocument.removeEventListener("click",this.connectedCallback)}getContentModel(){var e,t,n,i;return{query:null===(e=this.data)||void 0===e?void 0:e.query,strings:{placeholder:null!==(i=null===(n=null===(t=this.configuration)||void 0===t?void 0:t.strings)||void 0===n?void 0:n.placeholder)&&void 0!==i?i:"Enter keywords"}}}onRender(){super.onRender();const e=["Enter","NumpadEnter"];this.rootElement.querySelectorAll("[hawksearch-input]").forEach((t=>{this.disableAutofill&&(t.value=""),t.addEventListener("focus",(e=>{const n=t.value.trim();n&&this.previousAutocompleteResponse?mt.bindComponent(this.previousAutocompleteResponse):n||this.displayDefaultAutocomplete()})),t.addEventListener("keyup",(t=>{if(!e.includes(t.code))return;const n=t.currentTarget.value.trim();this.toggleAutocomplete(!1),Pn.query(n)})),t.addEventListener("keyup",Nn((n=>Kn(this,void 0,void 0,(function*(){const i=t.value.trim();e.includes(n.code)||i===this.previousValue||(this.previousValue=i,this.toggleAutocomplete(!!i),i&&i.length>this.autocompleteMinCharacterCount?this.previousAutocompleteResponse=yield mt.query(i):this.displayDefaultAutocomplete())}))),250))})),this.rootElement.querySelectorAll("hawksearch-autocomplete").forEach((e=>{e.addEventListener("hawksearch:close-autocomplete",(e=>{this.toggleAutocomplete(!1)}))}))}toggleAutocomplete(e){this.rootElement.querySelectorAll("hawksearch-autocomplete").forEach((t=>{t.style.display=e?"block":"none"}))}displayDefaultAutocomplete(){return Kn(this,void 0,void 0,(function*(){if(this.recommendationsEnabled&&!1!==this.defaultAutocompleteResponse){if(void 0===this.defaultAutocompleteResponse){const e=yield mt.query();this.defaultAutocompleteResponse=e||!1}this.defaultAutocompleteResponse&&mt.bindComponent(this.defaultAutocompleteResponse)}}))}},"search-results":class extends et{get mode(){return"landing-page"===this.getAttribute("mode")?"landing-page":"search-results"}get url(){var e;return null!==(e=this.getAttribute("url"))&&void 0!==e?e:window.location.pathname}constructor(){if(super(),this.componentName="search-results",this.defaultHtml='<hawksearch-modified-query></hawksearch-modified-query>\n<hawksearch-query-suggestions></hawksearch-query-suggestions>\n<div class="row">\n <div class="column column--12 column-md--4">\n <hawksearch-content-zone name="LeftTop"></hawksearch-content-zone>\n <hawksearch-facets-list></hawksearch-facets-list>\n <hawksearch-content-zone name="LeftBottom"></hawksearch-content-zone>\n </div>\n <div class="column column--12 column-md--8">\n <hawksearch-content-zone name="Top"></hawksearch-content-zone>\n <hawksearch-content-zone name="Top2"></hawksearch-content-zone>\n <hawksearch-tabs></hawksearch-tabs>\n <hawksearch-selected-facets></hawksearch-selected-facets>\n <div class="row">\n <div class="column column--12 column-sm--6 flex-vertical-sm-center">\n <hawksearch-pagination></hawksearch-pagination>\n </div>\n <div class="column column--12 column-md--6">\n <div class="row row--tight">\n <div class="column column--12 column-sm--6 flex-vertical-sm-center">\n <hawksearch-page-size></hawksearch-page-size>\n </div>\n <div class="column column--12 column-sm--6 flex-vertical-sm-center">\n <hawksearch-sorting></hawksearch-sorting>\n </div>\n </div>\n </div>\n </div>\n <hawksearch-search-results-list></hawksearch-search-results-list>\n <hawksearch-content-zone name="Bottom"></hawksearch-content-zone>\n <hawksearch-content-zone name="Bottom2"></hawksearch-content-zone>\n </div>\n</div>',this.bindFromEvent=!0,"search-results"===this.mode){En.trackPageLoad(_n.Custom);const e=Pn.getRequestFromUrl();Pn.search(e)}}getContentModel(){return Object.assign({},this.data)}},"search-results-item":class extends et{constructor(){super(...arguments),this.componentName="search-results-item",this.defaultHtml='<div class="search-results-list__item search-results-list__item--{{type}}">\n {{#if pinned}}\n <span class="search-results-list__item__pin">\n <hawksearch-icon name="star"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if (eq type "product")}}\n {{#if (lt salePrice price)}}\n <span class="search-results-list__item__sale-indicator">{{strings.sale}}</span>\n {{/if}}\n <a hawksearch-link href="{{url}}" class="search-results-list__item__image" aria-label="{{title}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <div class="search-results-list__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="search-results-list__item__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="search-results-list__item__price__original">{{currency price}}</span>\n <span class="search-results-list__item__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="search-results-list__item__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n {{else}}\n <div class="row">\n {{#if imageUrl}}\n <div class="column column--12 column-sm--4">\n <a hawksearch-link href="{{url}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n </div>\n {{/if}}\n <div class="column column--12 column-sm--8 flex-align-self-sm-center">\n <div class="search-results-list__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if description}}\n <p>{{description}}</p>\n {{/if}}\n </div>\n </div>\n {{/if}}\n</div>',this.bindFromEvent=!1}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;return Object.assign(Object.assign({},this.data),{description:null!==(t=null===(e=this.data.selectedVariant)||void 0===e?void 0:e.description)&&void 0!==t?t:this.data.description,imageUrl:null!==(i=null===(n=this.data.selectedVariant)||void 0===n?void 0:n.imageUrl)&&void 0!==i?i:this.data.imageUrl,price:null!==(r=null===(a=this.data.selectedVariant)||void 0===a?void 0:a.price)&&void 0!==r?r:this.data.price,rating:null!==(o=null===(s=this.data.selectedVariant)||void 0===s?void 0:s.rating)&&void 0!==o?o:this.data.rating,salePrice:null!==(c=null===(l=this.data.selectedVariant)||void 0===l?void 0:l.salePrice)&&void 0!==c?c:this.data.salePrice,sku:null!==(d=null===(u=this.data.selectedVariant)||void 0===u?void 0:u.sku)&&void 0!==d?d:this.data.sku,title:null!==(p=null===(h=this.data.selectedVariant)||void 0===h?void 0:h.title)&&void 0!==p?p:this.data.title,url:null!==(f=null===(v=this.data.selectedVariant)||void 0===v?void 0:v.url)&&void 0!==f?f:this.data.url,strings:{sale:null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.sale)&&void 0!==k?k:"Sale"}})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;if(!this.data)return;const i=(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.trackUsingVariant)?null===(n=this.data.selectedVariant)||void 0===n?void 0:n.id:void 0,a=null!=i?i:this.data.id;En.trackSearchResultClick(a,this.data.url,e)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach((e=>{var t;(null===(t=this.data)||void 0===t?void 0:t.variants)&&(e.data={items:this.data.variants,selectedItem:this.data.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;this.data.selectedVariant=t,this.render()})))}))}},"search-results-list":class extends et{constructor(){super(...arguments),this.componentName="search-results-list",this.defaultHtml='<div class="row search-results-list">\n {{#each items}}\n {{#if (eq type "content")}}\n <div class="column column--12">\n <hawksearch-search-results-item></hawksearch-search-results-item>\n </div>\n {{else}}\n <div class="column column--12 column-sm--6 column-lg--4">\n <hawksearch-search-results-item></hawksearch-search-results-item>\n </div>\n {{/if}}\n {{/each}}\n</div>',this.bindFromEvent=!0}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.length)}getContentModel(){return{items:this.data}}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-search-results-item").forEach(((e,t)=>{var n;e.data=null===(n=this.data)||void 0===n?void 0:n[t]}))}},"search-within-facet":class extends Wn{constructor(){super(...arguments),this.componentName="search-within-facet",this.defaultHtml='<div class="search-within-facet">\n <input type="text" hawksearch-input value="{{value}}" class="search-within-facet__input" aria-label="{{strings.label}}" />\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i;return{value:null!==(e=this.data.searchWithin)&&void 0!==e?e:"",strings:{label:null!==(i=null===(n=null===(t=this.configuration)||void 0===t?void 0:t.strings)||void 0===n?void 0:n.label)&&void 0!==i?i:"Enter keywords"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-input]").forEach((e=>{e.addEventListener("change",(e=>{e.preventDefault();const t=e.currentTarget.value.trim();Pn.searchWithin(t)}))}))}},"selected-facets":class extends et{constructor(){super(...arguments),this.componentName="selected-facets",this.defaultHtml='<div class="flex-gap flex-gap--xs selected-facets">\n {{#each selections}}\n <span class="selected-facets__item">\n <span class="selected-facets__item__field">{{title}}</span>\n <span class="selected-facets__item__value{{attribute \' selected-facets__item__value--excluded\' excluded}}">{{selectionTitle}}</span>\n <a\n hawksearch-facet-field="{{field}}"\n hawksearch-facet-value="{{selectionValue}}"\n class="selected-facets__item__remove"\n title="{{@root.strings.remove}}"\n >\n <hawksearch-icon name="cross" size="0.9em"></hawksearch-icon>\n </a>\n </span>\n {{/each}}\n</div>',this.bindFromEvent=!0}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.length)}getContentModel(){var e,t,n;const i=[];return this.data.forEach((e=>{e.values.forEach((t=>{var n,a,r,s;let o=t.title;const l=/^(?<min>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)?,(?<max>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)?$/.exec(t.value),c=/^(?:(?<min>\d+(?:\.\d+)?))?,(?:(?<max>\d+(?:\.\d+)?))?$/.exec(t.value);if(l){const e=void 0!==(null===(n=l.groups)||void 0===n?void 0:n.min)?new Date(l.groups.min):void 0,t=void 0!==(null===(a=l.groups)||void 0===a?void 0:a.max)?new Date(l.groups.max):void 0;e&&t&&Tn(e,t)?o=Bn(e):e&&t?o=`${Bn(e)} - ${Bn(t)}`:e?o=`After ${Bn(e)}`:t&&(o=`Before ${Bn(t)}`)}if(c){const t=void 0!==(null===(r=c.groups)||void 0===r?void 0:r.min)?parseFloat(c.groups.min):void 0,n=void 0!==(null===(s=c.groups)||void 0===s?void 0:s.max)?parseFloat(c.groups.max):void 0,i=e.currency?Un:zn;void 0!==t&&void 0!==n?o=t===n?i(t,0):`${i(t,0)} - ${i(n,0)}`:void 0!==t?o=`${i(t,0)} and up`:void 0!==n&&(o=`${i(n,0)} and below`)}i.push({field:e.field,title:e.title,selectionTitle:o,selectionValue:t.value,excluded:t.excluded})}))})),i.sort(((e,t)=>e.field==t.field?e.selectionTitle.localeCompare(t.selectionTitle):e.title.localeCompare(t.title))),{selections:i,strings:{remove:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.remove)&&void 0!==n?n:"Remove"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-facet-field][hawksearch-facet-value]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget,n=t.getAttribute("hawksearch-facet-field"),i=t.getAttribute("hawksearch-facet-value");n&&i&&Pn.removeFacetValue(n,i)}))}))}},"size-facet":class extends Wn{constructor(){super(...arguments),this.componentName="size-facet",this.defaultHtml='<div class="size-facet">\n <div class="row row--tight size-facet__items">\n {{#each values}}\n {{#if visible}}\n <div class="column column--3 size-facet__item{{attribute \' size-facet__item--selected\' selected}}">\n <div hawksearch-facet-value="{{value}}" class="size-facet__item__outer">\n <div hawksearch-facet-value="{{value}}" class="size-facet__item__inner">\n {{title}}\n </div>\n </div>\n {{#if @root.excludeEnabled}}\n <span class="size-facet__item__actions">\n {{#if excluded}}\n <span hawksearch-facet-value-include="{{value}}" class="size-facet__item__actions__item" title="{{@root.strings.include}}">\n <hawksearch-icon name="plus"></hawksearch-icon>\n </span>\n {{else}}\n <span hawksearch-facet-value-exclude="{{value}}" class="size-facet__item__actions__item" title="{{@root.strings.exclude}}">\n <hawksearch-icon name="minus"></hawksearch-icon>\n </span>\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{/each}}\n </div>\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle">{{strings.toggle}}</span>\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;const y=this.state.filter?new RegExp(this.state.filter,"i"):void 0;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.map(((e,t)=>{var n;return Object.assign(Object.assign({},e),{visible:!y&&(this.state.toggled||!this.data.truncation||t<this.data.truncation.threshold)||!!y&&y.test(null!==(n=e.title)&&void 0!==n?n:"")})})))&&void 0!==t?t:[],showToggle:!!this.data.truncation&&(null!==(i=null===(n=this.data.values)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>this.data.truncation.threshold&&!this.state.filter,expanded:null!==(a=this.state.toggled)&&void 0!==a&&a,excludeEnabled:null!==(s=null===(r=this.configuration)||void 0===r?void 0:r.excludeEnabled)&&void 0!==s&&s,strings:{exclude:null!==(c=null===(l=null===(o=this.configuration)||void 0===o?void 0:o.strings)||void 0===l?void 0:l.exclude)&&void 0!==c?c:"Exclude",include:null!==(h=null===(d=null===(u=this.configuration)||void 0===u?void 0:u.strings)||void 0===d?void 0:d.include)&&void 0!==h?h:"Include",toggle:this.state.toggled?null!==(f=null===(v=null===(p=this.configuration)||void 0===p?void 0:p.strings)||void 0===v?void 0:v.showFewer)&&void 0!==f?f:"Show fewer":null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.showMore)&&void 0!==k?k:"Show more"}}}},sorting:class extends et{constructor(){super(...arguments),this.componentName="sorting",this.defaultHtml='<div class="sorting">\n <select hawksearch-sort>\n {{#each options}}\n {{#if selected}}\n <option value="{{value}}" selected>{{title}}</option>\n {{else}}\n <option value="{{value}}">{{title}}</option>\n {{/if}}\n {{/each}}\n </select>\n</div>',this.bindFromEvent=!0}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.options)||void 0===t?void 0:t.length)}getContentModel(){return{options:this.data.options}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-sort]").forEach((e=>{e.addEventListener("change",(e=>{e.preventDefault();const t=e.currentTarget.value;Pn.sort(t)}))}))}},tabs:class extends et{constructor(){super(...arguments),this.componentName="tabs",this.defaultHtml='<ul class="tabs{{attribute \' tabs--list\' (gt tabs.length 4)}}">\n {{#each tabs}}\n <li class="tabs__item{{attribute \' tabs__item--selected\' selected}}" hawksearch-tab-value="{{value}}">\n {{title}}\n {{#if @root.displayCount}}({{count}}){{/if}}\n </li>\n {{/each}}\n</ul>',this.bindFromEvent=!0}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return{displayCount:null===(e=this.data.displayCount)||void 0===e||e,tabs:null!==(t=this.data.values)&&void 0!==t?t:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-tab-value]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-tab-value");Pn.selectTab(null!=t?t:void 0)}))}))}},tooltip:class extends et{constructor(){super(...arguments),this.componentName="tooltip",this.defaultHtml='<span class="tooltip" hawksearch-tooltip>\n <span class="tooltip__icon">\n <hawksearch-icon name="help" class="facet__heading__tooltip"></hawksearch-icon>\n </span>\n <span class="tooltip__content" hawksearch-tooltip-content>{{text}}</span>\n</span>',this.bindFromEvent=!1}get text(){var e;return null!==(e=this.getAttribute("text"))&&void 0!==e?e:void 0}renderContent(){return!!this.text}getContentModel(){return{text:this.text}}onRender(){var e;super.onRender(),null===(e=this.rootElement.querySelector("[hawksearch-tooltip]"))||void 0===e||e.addEventListener("mouseover",(e=>{const t=e.currentTarget,n=this.rootElement.querySelector("[hawksearch-tooltip-content]");if(!n)return;n.style.removeProperty("top"),n.style.removeProperty("right");const i=window.innerWidth,a=t.getBoundingClientRect(),r=a.x+a.width;n.style.top=`${a.top}px`,i-r<370&&(n.style.right="20px")}))}},"variant-selector":class extends et{constructor(){super(...arguments),this.componentName="variant-selector",this.defaultHtml='{{#if (arrayHasObjectsWithValue items "color")}}\n <div class="variant-selector-list">\n {{#each (arrayFilterObjects items "color")}}\n <div\n hawksearch-variant="{{id}}"\n class="variant-selector-list__item{{attribute \' variant-selector-list__item--selected\' (eq id @root.selectedItem.id)}}"\n title="{{color.name}}"\n >\n {{#if color.imageUrl}}\n <img src="{{color.imageUrl}}" class="variant-selector-list__item__image" alt="{{color.name}}" title="{{color.name}}" />\n {{else}}\n <div class="variant-selector-list__item__box" style="background: {{color.hex}};"></div>\n {{/if}}\n </div>\n {{/each}}\n </div>\n{{/if}}',this.bindFromEvent=!1}renderContent(){return!!this.data&&this.data.items.length>1}getContentModel(){return Object.assign({},this.data)}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-variant]").forEach((e=>{e.addEventListener("click",(e=>{var t;if(!this.data)return;const n=null!==(t=e.currentTarget.getAttribute("hawksearch-variant"))&&void 0!==t?t:void 0;if(void 0===n)return;const i=this.data.items.find((e=>e.id===n));i&&this.dispatchEvent(new CustomEvent("hawksearch:variant-selected",{detail:i}))}))}))}}};Object.entries(Yn).forEach((([e,t])=>{customElements.define(`hawksearch-${e}`,t)})),window.addEventListener("popstate",(e=>{const t=e.state;HawkSearch.searchRequest=t.searchRequest,HawkSearch.searchResponse=t.searchResponse,Pn.bindComponents(t.searchResponse)})),window.dispatchEvent(new CustomEvent("hawksearch:initialized"))})()})();
|
|
2
|
+
(()=>{var e={675:function(e){var t;t=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(2)),r=i(n(45)),s=n(46),o=n(51),l=i(n(52)),c=i(n(49)),u=i(n(44)),d=a.default.create;function h(){var e=d();return e.compile=function(t,n){return o.compile(t,n,e)},e.precompile=function(t,n){return o.precompile(t,n,e)},e.AST=r.default,e.Compiler=o.Compiler,e.JavaScriptCompiler=l.default,e.Parser=s.parser,e.parse=s.parse,e.parseWithoutProcessing=s.parseWithoutProcessing,e}var p=h();p.create=h,u.default(p),p.Visitor=c.default,p.default=p,t.default=p,e.exports=t.default},function(e,t){"use strict";t.default=function(e){return e&&e.__esModule?e:{default:e}},t.__esModule=!0},function(e,t,n){"use strict";var i=n(3).default,a=n(1).default;t.__esModule=!0;var r=i(n(4)),s=a(n(37)),o=a(n(6)),l=i(n(5)),c=i(n(38)),u=a(n(44));function d(){var e=new r.HandlebarsEnvironment;return l.extend(e,r),e.SafeString=s.default,e.Exception=o.default,e.Utils=l,e.escapeExpression=l.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var h=d();h.create=d,u.default(h),h.default=h,t.default=h,e.exports=t.default},function(e,t){"use strict";t.default=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},t.__esModule=!0},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.HandlebarsEnvironment=d;var a=n(5),r=i(n(6)),s=n(10),o=n(30),l=i(n(32)),c=n(33);t.VERSION="4.7.7",t.COMPILER_REVISION=8,t.LAST_COMPATIBLE_COMPILER_REVISION=7,t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};var u="[object Object]";function d(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}d.prototype={constructor:d,logger:l.default,log:l.default.log,registerHelper:function(e,t){if(a.toString.call(e)===u){if(t)throw new r.default("Arg not supported with multiple helpers");a.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(a.toString.call(e)===u)a.extend(this.partials,e);else{if(void 0===t)throw new r.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(a.toString.call(e)===u){if(t)throw new r.default("Arg not supported with multiple decorators");a.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var h=l.default.log;t.log=h,t.createFrame=a.createFrame,t.logger=l.default},function(e,t){"use strict";t.__esModule=!0,t.extend=s,t.indexOf=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}return a.test(e)?e.replace(i,r):e},t.isEmpty=function(e){return!e&&0!==e||!(!c(e)||0!==e.length)},t.createFrame=function(e){var t=s({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,a=/[&<>"'`=]/;function r(e){return n[e]}function s(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;t.toString=o;var l=function(e){return"function"==typeof e};l(/x/)&&(t.isFunction=l=function(e){return"function"==typeof e&&"[object Function]"===o.call(e)}),t.isFunction=l;var c=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===o.call(e)};t.isArray=c},function(e,t,n){"use strict";var i=n(7).default;t.__esModule=!0;var a=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(e,t){var n=t&&t.loc,s=void 0,o=void 0,l=void 0,c=void 0;n&&(s=n.start.line,o=n.end.line,l=n.start.column,c=n.end.column,e+=" - "+s+":"+l);for(var u=Error.prototype.constructor.call(this,e),d=0;d<a.length;d++)this[a[d]]=u[a[d]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{n&&(this.lineNumber=s,this.endLineNumber=o,i?(Object.defineProperty(this,"column",{value:l,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:c,enumerable:!0})):(this.column=l,this.endColumn=c))}catch(e){}}r.prototype=new Error,t.default=r,e.exports=t.default},function(e,t,n){e.exports={default:n(8),__esModule:!0}},function(e,t,n){var i=n(9);e.exports=function(e,t,n){return i.setDesc(e,t,n)}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.registerDefaultHelpers=function(e){a.default(e),r.default(e),s.default(e),o.default(e),l.default(e),c.default(e),u.default(e)},t.moveHelperToHooks=function(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])};var a=i(n(11)),r=i(n(12)),s=i(n(25)),o=i(n(26)),l=i(n(27)),c=i(n(28)),u=i(n(29))},function(e,t,n){"use strict";t.__esModule=!0;var i=n(5);t.default=function(e){e.registerHelper("blockHelperMissing",(function(t,n){var a=n.inverse,r=n.fn;if(!0===t)return r(this);if(!1===t||null==t)return a(this);if(i.isArray(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):a(this);if(n.data&&n.ids){var s=i.createFrame(n.data);s.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:s}}return r(t,n)}))},e.exports=t.default},function(e,t,n){(function(i){"use strict";var a=n(13).default,r=n(1).default;t.__esModule=!0;var s=n(5),o=r(n(6));t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new o.default("Must pass iterator to #each");var n,r=t.fn,l=t.inverse,c=0,u="",d=void 0,h=void 0;function p(t,n,i){d&&(d.key=t,d.index=n,d.first=0===n,d.last=!!i,h&&(d.contextPath=h+t)),u+=r(e[t],{data:d,blockParams:s.blockParams([e[t],t],[h+t,null])})}if(t.data&&t.ids&&(h=s.appendContextPath(t.data.contextPath,t.ids[0])+"."),s.isFunction(e)&&(e=e.call(this)),t.data&&(d=s.createFrame(t.data)),e&&"object"==typeof e)if(s.isArray(e))for(var v=e.length;c<v;c++)c in e&&p(c,c,c===e.length-1);else if(i.Symbol&&e[i.Symbol.iterator]){for(var f=[],g=e[i.Symbol.iterator](),m=g.next();!m.done;m=g.next())f.push(m.value);for(v=(e=f).length;c<v;c++)p(c,c,c===e.length-1)}else n=void 0,a(e).forEach((function(e){void 0!==n&&p(n,c-1),n=e,c++})),void 0!==n&&p(n,c-1,!0);return 0===c&&(u=l(this)),u}))},e.exports=t.default}).call(t,function(){return this}())},function(e,t,n){e.exports={default:n(14),__esModule:!0}},function(e,t,n){n(15),e.exports=n(21).Object.keys},function(e,t,n){var i=n(16);n(18)("keys",(function(e){return function(t){return e(i(t))}}))},function(e,t,n){var i=n(17);e.exports=function(e){return Object(i(e))}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(19),a=n(21),r=n(24);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],s={};s[e]=t(n),i(i.S+i.F*r((function(){n(1)})),"Object",s)}},function(e,t,n){var i=n(20),a=n(21),r=n(22),s="prototype",o=function(e,t,n){var l,c,u,d=e&o.F,h=e&o.G,p=e&o.S,v=e&o.P,f=e&o.B,g=e&o.W,m=h?a:a[t]||(a[t]={}),k=h?i:p?i[t]:(i[t]||{})[s];for(l in h&&(n=t),n)(c=!d&&k&&l in k)&&l in m||(u=c?k[l]:n[l],m[l]=h&&"function"!=typeof k[l]?n[l]:f&&c?r(u,i):g&&k[l]==u?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[s]=e[s],t}(u):v&&"function"==typeof u?r(Function.call,u):u,v&&((m[s]||(m[s]={}))[l]=u))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,e.exports=o},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var i=n(23);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,a){return e.call(t,n,i,a)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(6));t.default=function(e){e.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new a.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=n(5),r=i(n(6));t.default=function(e){e.registerHelper("if",(function(e,t){if(2!=arguments.length)throw new r.default("#if requires exactly one argument");return a.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||a.isEmpty(e)?t.inverse(this):t.fn(this)})),e.registerHelper("unless",(function(t,n){if(2!=arguments.length)throw new r.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}))},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",(function(){for(var t=[void 0],n=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)t.push(arguments[i]);var a=1;null!=n.hash.level?a=n.hash.level:n.data&&null!=n.data.level&&(a=n.data.level),t[0]=a,e.log.apply(e,t)}))},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",(function(e,t,n){return e?n.lookupProperty(e,t):e}))},e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=n(5),r=i(n(6));t.default=function(e){e.registerHelper("with",(function(e,t){if(2!=arguments.length)throw new r.default("#with requires exactly one argument");a.isFunction(e)&&(e=e.call(this));var n=t.fn;if(a.isEmpty(e))return t.inverse(this);var i=t.data;return t.data&&t.ids&&((i=a.createFrame(t.data)).contextPath=a.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:i,blockParams:a.blockParams([e],[i&&i.contextPath])})}))},e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.registerDefaultDecorators=function(e){a.default(e)};var a=i(n(31))},function(e,t,n){"use strict";t.__esModule=!0;var i=n(5);t.default=function(e){e.registerDecorator("inline",(function(e,t,n,a){var r=e;return t.partials||(t.partials={},r=function(a,r){var s=n.partials;n.partials=i.extend({},s,t.partials);var o=e(a,r);return n.partials=s,o}),t.partials[a.args[0]]=a.fn,r}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var i=n(5),a={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=i.indexOf(a.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=a.lookupLevel(e),"undefined"!=typeof console&&a.lookupLevel(a.level)<=e){var t=a.methodMap[e];console[t]||(t="log");for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];console[t].apply(console,i)}}};t.default=a,e.exports=t.default},function(e,t,n){"use strict";var i=n(34).default,a=n(13).default,r=n(3).default;t.__esModule=!0,t.createProtoAccessControl=function(e){var t=i(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=i(null);return n.__proto__=!1,{properties:{whitelist:s.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:s.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},t.resultIsAllowed=function(e,t,n){return function(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(function(e){!0!==l[e]&&(l[e]=!0,o.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(t),!1)}("function"==typeof e?t.methods:t.properties,n)},t.resetLoggedProperties=function(){a(l).forEach((function(e){delete l[e]}))};var s=n(36),o=r(n(32)),l=i(null)},function(e,t,n){e.exports={default:n(35),__esModule:!0}},function(e,t,n){var i=n(9);e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){"use strict";var i=n(34).default;t.__esModule=!0,t.createNewLookupObject=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.extend.apply(void 0,[i(null)].concat(t))};var a=n(5)},function(e,t){"use strict";function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(39).default,a=n(13).default,r=n(3).default,s=n(1).default;t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,n=c.COMPILER_REVISION;if(!(t>=c.LAST_COMPATIBLE_COMPILER_REVISION&&t<=c.COMPILER_REVISION)){if(t<c.LAST_COMPATIBLE_COMPILER_REVISION){var i=c.REVISION_CHANGES[n],a=c.REVISION_CHANGES[t];throw new l.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+a+").")}throw new l.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}},t.template=function(e,t){if(!t)throw new l.default("No environment passed to template");if(!e||!e.main)throw new l.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&7===e.compiler[0],r={strict:function(e,t,n){if(!e||!(t in e))throw new l.default('"'+t+'" not defined in '+e,{loc:n});return r.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];return null==n||Object.prototype.hasOwnProperty.call(e,t)||h.resultIsAllowed(n,r.protoAccessControl,t)?n:void 0},lookup:function(e,t){for(var n=e.length,i=0;i<n;i++)if(null!=(e[i]&&r.lookupProperty(e[i],t)))return e[i][t]},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:o.escapeExpression,invokePartial:function(n,i,a){a.hash&&(i=o.extend({},i,a.hash),a.ids&&(a.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,i,a);var r=o.extend({},a,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),s=t.VM.invokePartial.call(this,n,i,r);if(null==s&&t.compile&&(a.partials[a.name]=t.compile(n,e.compilerOptions,t),s=a.partials[a.name](i,r)),null!=s){if(a.indent){for(var c=s.split("\n"),u=0,d=c.length;u<d&&(c[u]||u+1!==d);u++)c[u]=a.indent+c[u];s=c.join("\n")}return s}throw new l.default("The partial "+a.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var n=e[t];return n.decorator=e[t+"_d"],n},programs:[],program:function(e,t,n,i,a){var r=this.programs[e],s=this.fn(e);return t||a||i||n?r=p(this,e,s,t,n,i,a):r||(r=this.programs[e]=p(this,e,s)),r},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=o.extend({},t,e)),n},nullContext:i({}),noop:t.VM.noop,compilerInfo:e.compiler};function s(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.data;s._setup(n),!n.partial&&e.useData&&(i=function(e,t){return t&&"root"in t||((t=t?c.createFrame(t):{}).root=e),t}(t,i));var a=void 0,o=e.useBlockParams?[]:void 0;function l(t){return""+e.main(r,t,r.helpers,r.partials,i,o,a)}return e.useDepths&&(a=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(l=f(e.main,l,r,n.depths||[],i,o))(t,n)}return s.isTop=!0,s._setup=function(i){if(i.partial)r.protoAccessControl=i.protoAccessControl,r.helpers=i.helpers,r.partials=i.partials,r.decorators=i.decorators,r.hooks=i.hooks;else{var s=o.extend({},t.helpers,i.helpers);!function(e,t){a(e).forEach((function(n){var i=e[n];e[n]=function(e,t){var n=t.lookupProperty;return d.wrapHelper(e,(function(e){return o.extend({lookupProperty:n},e)}))}(i,t)}))}(s,r),r.helpers=s,e.usePartial&&(r.partials=r.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(r.decorators=o.extend({},t.decorators,i.decorators)),r.hooks={},r.protoAccessControl=h.createProtoAccessControl(i);var l=i.allowCallsToHelperMissing||n;u.moveHelperToHooks(r,"helperMissing",l),u.moveHelperToHooks(r,"blockHelperMissing",l)}},s._child=function(t,n,i,a){if(e.useBlockParams&&!i)throw new l.default("must pass block params");if(e.useDepths&&!a)throw new l.default("must pass parent depths");return p(r,t,e[t],n,0,i,a)},s},t.wrapProgram=p,t.resolvePartial=function(e,t,n){return e?e.call||n.name||(n.name=e,e=n.partials[e]):e="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name],e},t.invokePartial=function(e,t,n){var i=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var a=void 0;if(n.fn&&n.fn!==v&&function(){n.data=c.createFrame(n.data);var e=n.fn;a=n.data["partial-block"]=function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=c.createFrame(n.data),n.data["partial-block"]=i,e(t,n)},e.partials&&(n.partials=o.extend({},n.partials,e.partials))}(),void 0===e&&a&&(e=a),void 0===e)throw new l.default("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)},t.noop=v;var o=r(n(5)),l=s(n(6)),c=n(4),u=n(10),d=n(43),h=n(33);function p(e,t,n,i,a,r,s){function o(t){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=s;return!s||t==s[0]||t===e.nullContext&&null===s[0]||(o=[t].concat(s)),n(e,t,e.helpers,e.partials,a.data||i,r&&[a.blockParams].concat(r),o)}return(o=f(n,o,e,s,i,r)).program=t,o.depth=s?s.length:0,o.blockParams=a||0,o}function v(){return""}function f(e,t,n,i,a,r){if(e.decorator){var s={};t=e.decorator(t,s,n,i&&i[0],a,r,i),o.extend(t,s)}return t}},function(e,t,n){e.exports={default:n(40),__esModule:!0}},function(e,t,n){n(41),e.exports=n(21).Object.seal},function(e,t,n){var i=n(42);n(18)("seal",(function(e){return function(t){return e&&i(t)?e(t):t}}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){"use strict";t.__esModule=!0,t.wrapHelper=function(e,t){return"function"!=typeof e?e:function(){return arguments[arguments.length-1]=t(arguments[arguments.length-1]),e.apply(this,arguments)}}},function(e,t){(function(n){"use strict";t.__esModule=!0,t.default=function(e){var t=void 0!==n?n:window,i=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=i),e}},e.exports=t.default}).call(t,function(){return this}())},function(e,t){"use strict";t.__esModule=!0;var n={helpers:{helperExpression:function(e){return"SubExpression"===e.type||("MustacheStatement"===e.type||"BlockStatement"===e.type)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return 1===e.parts.length&&!n.helpers.scopedId(e)&&!e.depth}}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default,a=n(3).default;t.__esModule=!0,t.parseWithoutProcessing=u,t.parse=function(e,t){var n=u(e,t);return new s.default(t).accept(n)};var r=i(n(47)),s=i(n(48)),o=a(n(50)),l=n(5);t.parser=r.default;var c={};function u(e,t){return"Program"===e.type?e:(r.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},r.default.parse(e))}l.extend(c,o)},function(e,t){"use strict";t.__esModule=!0;var n=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,n,i,a,r,s){var o=r.length-1;switch(a){case 1:return r[o-1];case 2:this.$=i.prepareProgram(r[o]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:case 40:case 41:this.$=r[o];break;case 9:this.$={type:"CommentStatement",value:i.stripComment(r[o]),strip:i.stripFlags(r[o],r[o]),loc:i.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:r[o],value:r[o],loc:i.locInfo(this._$)};break;case 11:this.$=i.prepareRawBlock(r[o-2],r[o-1],r[o],this._$);break;case 12:this.$={path:r[o-3],params:r[o-2],hash:r[o-1]};break;case 13:this.$=i.prepareBlock(r[o-3],r[o-2],r[o-1],r[o],!1,this._$);break;case 14:this.$=i.prepareBlock(r[o-3],r[o-2],r[o-1],r[o],!0,this._$);break;case 15:this.$={open:r[o-5],path:r[o-4],params:r[o-3],hash:r[o-2],blockParams:r[o-1],strip:i.stripFlags(r[o-5],r[o])};break;case 16:case 17:this.$={path:r[o-4],params:r[o-3],hash:r[o-2],blockParams:r[o-1],strip:i.stripFlags(r[o-5],r[o])};break;case 18:this.$={strip:i.stripFlags(r[o-1],r[o-1]),program:r[o]};break;case 19:var l=i.prepareBlock(r[o-2],r[o-1],r[o],r[o],!1,this._$),c=i.prepareProgram([l],r[o-1].loc);c.chained=!0,this.$={strip:r[o-2].strip,program:c,chain:!0};break;case 21:this.$={path:r[o-1],strip:i.stripFlags(r[o-2],r[o])};break;case 22:case 23:this.$=i.prepareMustache(r[o-3],r[o-2],r[o-1],r[o-4],i.stripFlags(r[o-4],r[o]),this._$);break;case 24:this.$={type:"PartialStatement",name:r[o-3],params:r[o-2],hash:r[o-1],indent:"",strip:i.stripFlags(r[o-4],r[o]),loc:i.locInfo(this._$)};break;case 25:this.$=i.preparePartialBlock(r[o-2],r[o-1],r[o],this._$);break;case 26:this.$={path:r[o-3],params:r[o-2],hash:r[o-1],strip:i.stripFlags(r[o-4],r[o])};break;case 29:this.$={type:"SubExpression",path:r[o-3],params:r[o-2],hash:r[o-1],loc:i.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:r[o],loc:i.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:i.id(r[o-2]),value:r[o],loc:i.locInfo(this._$)};break;case 32:this.$=i.id(r[o-1]);break;case 35:this.$={type:"StringLiteral",value:r[o],original:r[o],loc:i.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(r[o]),original:Number(r[o]),loc:i.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===r[o],original:"true"===r[o],loc:i.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:i.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:i.locInfo(this._$)};break;case 42:this.$=i.preparePath(!0,r[o],this._$);break;case 43:this.$=i.preparePath(!1,r[o],this._$);break;case 44:r[o-2].push({part:i.id(r[o]),original:r[o],separator:r[o-1]}),this.$=r[o-2];break;case 45:this.$=[{part:i.id(r[o]),original:r[o]}];break;case 46:case 48:case 50:case 58:case 64:case 70:case 78:case 82:case 86:case 90:case 94:this.$=[];break;case 47:case 49:case 51:case 59:case 65:case 71:case 79:case 83:case 87:case 91:case 95:case 99:case 101:r[o-1].push(r[o]);break;case 98:case 100:this.$=[r[o]]}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=[0],n=[null],i=[],a=this.table,r="",s=0,o=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;i.push(c);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,h,p,v,f,g,m,k,y,w,b={};;){if(p=t[t.length-1],this.defaultActions[p]?v=this.defaultActions[p]:(null==d&&(w=void 0,"number"!=typeof(w=this.lexer.lex()||1)&&(w=this.symbols_[w]||w),d=w),v=a[p]&&a[p][d]),void 0===v||!v.length||!v[0]){var _="";if(!l){for(g in y=[],a[p])this.terminals_[g]&&g>2&&y.push("'"+this.terminals_[g]+"'");_=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:c,expected:y})}}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+d);switch(v[0]){case 1:t.push(d),n.push(this.lexer.yytext),i.push(this.lexer.yylloc),t.push(v[1]),d=null,h?(d=h,h=null):(o=this.lexer.yyleng,r=this.lexer.yytext,s=this.lexer.yylineno,c=this.lexer.yylloc,l>0&&l--);break;case 2:if(m=this.productions_[v[1]][1],b.$=n[n.length-m],b._$={first_line:i[i.length-(m||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(m||1)].first_column,last_column:i[i.length-1].last_column},u&&(b._$.range=[i[i.length-(m||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.call(b,r,o,s,this.yy,v[1],n,i)))return f;m&&(t=t.slice(0,-1*m*2),n=n.slice(0,-1*m),i=i.slice(0,-1*m)),t.push(this.productions_[v[1]][0]),n.push(b.$),i.push(b._$),k=a[t[t.length-2]][t[t.length-1]],t.push(k);break;case 3:return!0}}return!0}},t={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,n,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length&&(!(n=this._input.match(this.rules[r[s]]))||t&&!(n[0].length>t[0].length)||(t=n,i=s,this.options.flex));s++);return t?((a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,i){function a(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if("\\\\"===t.yytext.slice(-2)?(a(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(a(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:case 5:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(a(5,9),"END_RAW_BLOCK");case 6:case 22:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:case 23:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 24:return 73;case 25:case 26:case 41:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=a(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=a(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};function n(){this.yy={}}return e.lexer=t,n.prototype=e,e.Parser=n,new n}();t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(49));function r(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=e}function s(e,t,n){void 0===t&&(t=e.length);var i=e[t-1],a=e[t-2];return i?"ContentStatement"===i.type?(a||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original):void 0:n}function o(e,t,n){void 0===t&&(t=-1);var i=e[t+1],a=e[t+2];return i?"ContentStatement"===i.type?(a||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original):void 0:n}function l(e,t,n){var i=e[null==t?0:t+1];if(i&&"ContentStatement"===i.type&&(n||!i.rightStripped)){var a=i.value;i.value=i.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==a}}function c(e,t,n){var i=e[null==t?e.length-1:t-1];if(i&&"ContentStatement"===i.type&&(n||!i.leftStripped)){var a=i.value;return i.value=i.value.replace(n?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==a,i.leftStripped}}r.prototype=new a.default,r.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var i=e.body,a=0,r=i.length;a<r;a++){var u=i[a],d=this.accept(u);if(d){var h=s(i,a,n),p=o(i,a,n),v=d.openStandalone&&h,f=d.closeStandalone&&p,g=d.inlineStandalone&&h&&p;d.close&&l(i,a,!0),d.open&&c(i,a,!0),t&&g&&(l(i,a),c(i,a)&&"PartialStatement"===u.type&&(u.indent=/([ \t]+$)/.exec(i[a-1].original)[1])),t&&v&&(l((u.program||u.inverse).body),c(i,a)),t&&f&&(l(i,a),c((u.inverse||u.program).body))}}return e},r.prototype.BlockStatement=r.prototype.DecoratorBlock=r.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,i=n,a=n;if(n&&n.chained)for(i=n.body[0].program;a.chained;)a=a.body[a.body.length-1].program;var r={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:s((i||t).body)};if(e.openStrip.close&&l(t.body,null,!0),n){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&l(i.body,null,!0),e.closeStrip.open&&c(a.body,null,!0),!this.options.ignoreStandalone&&s(t.body)&&o(i.body)&&(c(t.body),l(i.body))}else e.closeStrip.open&&c(t.body,null,!0);return r},r.prototype.Decorator=r.prototype.MustacheStatement=function(e){return e.strip},r.prototype.PartialStatement=r.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0;var a=i(n(6));function r(){this.parents=[]}function s(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function o(e){s.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function l(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}r.prototype={constructor:r,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!r.prototype[n.type])throw new a.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new a.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new a.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);return this.current=this.parents.shift(),!this.mutating||t?t:!1!==t?e:void 0}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:s,Decorator:s,BlockStatement:o,DecoratorBlock:o,PartialStatement:l,PartialBlockStatement:function(e){l.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:s,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var i=n(1).default;t.__esModule=!0,t.SourceLocation=function(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}},t.id=function(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e},t.stripFlags=function(e,t){return{open:"~"===e.charAt(2),close:"~"===t.charAt(t.length-3)}},t.stripComment=function(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},t.preparePath=function(e,t,n){n=this.locInfo(n);for(var i=e?"@":"",r=[],s=0,o=0,l=t.length;o<l;o++){var c=t[o].part,u=t[o].original!==c;if(i+=(t[o].separator||"")+c,u||".."!==c&&"."!==c&&"this"!==c)r.push(c);else{if(r.length>0)throw new a.default("Invalid path: "+i,{loc:n});".."===c&&s++}}return{type:"PathExpression",data:e,depth:s,parts:r,original:i,loc:n}},t.prepareMustache=function(e,t,n,i,a,r){var s=i.charAt(3)||i.charAt(2),o="{"!==s&&"&"!==s;return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:e,params:t,hash:n,escaped:o,strip:a,loc:this.locInfo(r)}},t.prepareRawBlock=function(e,t,n,i){r(e,n);var a={type:"Program",body:t,strip:{},loc:i=this.locInfo(i)};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}},t.prepareBlock=function(e,t,n,i,s,o){i&&i.path&&r(e,i);var l=/\*/.test(e.open);t.blockParams=e.blockParams;var c=void 0,u=void 0;if(n){if(l)throw new a.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=i.strip),u=n.strip,c=n.program}return s&&(s=c,c=t,t=s),{type:l?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:c,openStrip:e.strip,inverseStrip:u,closeStrip:i&&i.strip,loc:this.locInfo(o)}},t.prepareProgram=function(e,t){if(!t&&e.length){var n=e[0].loc,i=e[e.length-1].loc;n&&i&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:e,strip:{},loc:t}},t.preparePartialBlock=function(e,t,n,i){return r(e,n),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}};var a=i(n(6));function r(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var n={loc:e.path.loc};throw new a.default(e.path.original+" doesn't match "+t,n)}}},function(e,t,n){"use strict";var i=n(34).default,a=n(1).default;t.__esModule=!0,t.Compiler=c,t.precompile=function(e,t,n){if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);"data"in(t=t||{})||(t.data=!0),t.compat&&(t.useDepths=!0);var i=n.parse(e,t),a=(new n.Compiler).compile(i,t);return(new n.JavaScriptCompiler).compile(a,t)},t.compile=function(e,t,n){if(void 0===t&&(t={}),null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);"data"in(t=s.extend({},t))||(t.data=!0),t.compat&&(t.useDepths=!0);var i=void 0;function a(){var i=n.parse(e,t),a=(new n.Compiler).compile(i,t),r=(new n.JavaScriptCompiler).compile(a,t,void 0,!0);return n.template(r)}function o(e,t){return i||(i=a()),i.call(this,e,t)}return o._setup=function(e){return i||(i=a()),i._setup(e)},o._child=function(e,t,n,r){return i||(i=a()),i._child(e,t,n,r)},o};var r=a(n(6)),s=n(5),o=a(n(45)),l=[].slice;function c(){}function u(e,t){if(e===t)return!0;if(s.isArray(e)&&s.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1;return!0}}function d(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}c.prototype={compiler:c,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var i=this.opcodes[n],a=e.opcodes[n];if(i.opcode!==a.opcode||!u(i.args,a.args))return!1}for(t=this.children.length,n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=s.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(!this[e.type])throw new r.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,i=0;i<n;i++)this.accept(t[i]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){d(e);var t=e.program,n=e.inverse;t=t&&this.compileProgram(t),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);"helper"===i?this.helperSexpr(e,t,n):"simple"===i?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new r.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,a="SubExpression"===e.name.type;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",a,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){d(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var i=e.path,a=i.parts[0],r=null!=t||null!=n;this.opcode("getContext",i.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",a,r)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var i=this.setupFullMustacheParams(e,t,n),a=e.path,s=a.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new r.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",i.length,a.original,o.default.helpers.simpleId(a))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=o.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(t);i?this.opcode("lookupBlockParam",i,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,i=t.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(t[n].value);for(;n--;)this.opcode("assignToHash",t[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:l.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=o.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&o.default.helpers.helperExpression(e),a=!n&&(i||t);if(a&&!i){var r=e.path.parts[0],s=this.options;s.knownHelpers[r]?i=!0:s.knownHelpersOnly&&(a=!1)}return i?"helper":a?"ambiguous":"simple"},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=null!=e.value?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),"SubExpression"===e.type&&this.accept(e);else{if(this.trackIds){var n=void 0;if(!e.parts||o.default.helpers.scopedId(e)||e.depth||(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else(t=e.original||t).replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,i){var a=e.params;return this.pushParams(a),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),a},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var i=this.options.blockParams[t],a=i&&s.indexOf(i,e);if(i&&a>=0)return[t,a]}}}},function(e,t,n){"use strict";var i=n(13).default,a=n(1).default;t.__esModule=!0;var r=n(4),s=a(n(6)),o=n(5),l=a(n(53));function c(e){this.value=e}function u(){}u.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return o.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,i){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var a=e.opcodes,r=void 0,o=void 0,l=void 0,c=void 0;for(l=0,c=a.length;l<c;l++)r=a[l],this.source.currentLocation=r.loc,o=o||r.loc,this[r.opcode].apply(this,r.args);if(this.source.currentLocation=o,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new s.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(i);if(this.isChild)return u;var d={compiler:this.compilerInfo(),main:u};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var h=this.context,p=h.programs,v=h.decorators;for(l=0,c=p.length;l<c;l++)p[l]&&(d[l]=p[l],v[l]&&(d[l+"_d"]=v[l],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),i?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),t.srcName?(d=d.toStringWithSourceMap({file:t.destName})).map=d.map&&d.map.toString():d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new l.default(this.options.srcName),this.decorators=new l.default(this.options.srcName)},createFunctionContext:function(e){var t=this,n="",a=this.stackVars.concat(this.registers.list);a.length>0&&(n+=", "+a.join(", "));var r=0;i(this.aliases).forEach((function(e){var i=t.aliases[e];i.children&&i.referenceCount>1&&(n+=", alias"+ ++r+"="+e,i.children[0]="alias"+r)})),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var o=this.mergeSource(n);return e?(s.push(o),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n ",o,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,i=void 0,a=void 0,r=void 0,s=void 0;return this.source.each((function(e){e.appendToBuffer?(r?e.prepend(" + "):r=e,s=e):(r&&(a?r.prepend("buffer += "):i=!0,s.add(";"),r=s=void 0),a=!0,t||(n=!1))})),n?r?(r.prepend("return "),s.add(";")):a||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack((function(e){return[" != null ? ",e,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,i){var a=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[a++])),this.resolvePath("context",e,a,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,i,a){var r=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,n,i){var a=t.popStack(),r=0,s=n.length;for(e&&s--;r<s;r++)a=t.nameLookup(a,n[r],i);return e?[t.aliasable("container.strict"),"(",a,", ",t.quotedString(n[r]),", ",JSON.stringify(t.source.currentLocation)," )"]:a}(this.options.strict&&a,this,t,e));else for(var s=t.length;n<s;n++)this.replaceStack((function(a){var s=r.nameLookup(a,t[n],e);return i?[" && ",s]:[" != null ? ",s," : ",a]}))},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),"SubExpression"!==t&&("string"==typeof e?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){null!=e?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var n=this.nameLookup("decorators",t,"decorator"),i=this.setupHelperArgs(t,e);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,t,n){var i=this.popStack(),a=this.setupHelper(e,t),r=[];n&&r.push(a.name),r.push(i),this.options.strict||r.push(this.aliasable("container.hooks.helperMissing"));var s=["(",this.itemsSeparatedBy(r,"||"),")"],o=this.source.functionCall(s,"call",a.callParams);this.push(o)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(t,e[i]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,t),a=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",e,"helper")," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,t,n){var i=[],a=this.setupParams(t,1,i);e&&(t=this.popStack(),delete a.name),n&&(a.indent=JSON.stringify(n)),a.helpers="helpers",a.partials="partials",a.decorators="container.decorators",e?i.unshift(t):i.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(a.depths="depths"),a=this.objectLiteral(a),i.push(a),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var t=this.popStack(),n=void 0,i=void 0,a=void 0;this.trackIds&&(a=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var r=this.hash;n&&(r.contexts[e]=n),i&&(r.types[e]=i),a&&(r.ids[e]=a),r.values[e]=t},pushId:function(e,t,n){"BlockParam"===e?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===e?this.pushString(t):"SubExpression"===e?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:u,compileChildren:function(e,t){for(var n=e.children,i=void 0,a=void 0,r=0,s=n.length;r<s;r++){i=n[r],a=new this.compiler;var o=this.matchExistingProgram(i);if(null==o){this.context.programs.push("");var l=this.context.programs.length;i.index=l,i.name="program"+l,this.context.programs[l]=a.compile(i,t,this.context,!this.precompile),this.context.decorators[l]=a.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||a.useDepths,this.useBlockParams=this.useBlockParams||a.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=o.index,i.name="program"+o.index,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var i=this.context.environments[t];if(i&&i.equals(e))return i}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof c||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new c(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],n=void 0,i=void 0,a=void 0;if(!this.isInline())throw new s.default("replaceStack on non-inline");var r=this.popStack(!0);if(r instanceof c)t=["(",n=[r.value]],a=!0;else{i=!0;var o=this.incrStack();t=["((",this.push(o)," = ",r,")"],n=this.topStack()}var l=e.call(this,n);a||this.popStack(),i&&this.stackSlot--,this.push(t.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var i=e[t];if(i instanceof c)this.compileStack.push(i);else{var a=this.incrStack();this.pushSource([a," = ",i,";"]),this.compileStack.push(a)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof c)return n.value;if(!t){if(!this.stackSlot)throw new s.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof c?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):((t=this.aliases[e]=this.source.wrap(e)).aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var i=[];return{params:i,paramsInit:this.setupHelperArgs(t,e,i,n),name:this.nameLookup("helpers",t,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(i)}},setupParams:function(e,t,n){var i={},a=[],r=[],s=[],o=!n,l=void 0;o&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var c=this.popStack(),u=this.popStack();(u||c)&&(i.fn=u||"container.noop",i.inverse=c||"container.noop");for(var d=t;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(s[d]=this.popStack()),this.stringParams&&(r[d]=this.popStack(),a[d]=this.popStack());return o&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(s)),this.stringParams&&(i.types=this.source.generateArray(r),i.contexts=this.source.generateArray(a)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,t,n,i){var a=this.setupParams(e,t,n);return a.loc=JSON.stringify(this.source.currentLocation),a=this.objectLiteral(a),i?(this.useRegister("options"),n.push("options"),["options=",a]):n?(n.push(a),""):a}},function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=u.RESERVED_WORDS={},n=0,i=e.length;n<i;n++)t[e[n]]=!0}(),u.isValidJavaScriptVariableName=function(e){return!u.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)},t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(13).default;t.__esModule=!0;var a=n(5),r=void 0;function s(e,t,n){if(a.isArray(e)){for(var i=[],r=0,s=e.length;r<s;r++)i.push(t.wrap(e[r],n));return i}return"boolean"==typeof e||"number"==typeof e?e+"":e}function o(e){this.srcFile=e,this.source=[]}r||((r=function(e,t,n,i){this.src="",i&&this.add(i)}).prototype={add:function(e){a.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){a.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),o.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each((function(t){e.add([" ",t,"\n"])})),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=s(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?"."+t+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=this,n=[];i(e).forEach((function(i){var a=s(e[i],t);"undefined"!==a&&n.push([t.quotedString(i),":",a])}));var a=this.generateList(n);return a.prepend("{"),a.add("}"),a},generateList:function(e){for(var t=this.empty(),n=0,i=e.length;n<i;n++)n&&t.add(","),t.add(s(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}},t.default=o,e.exports=t.default}])},e.exports=t()}},t={};function n(i){var a=t[i];if(void 0!==a)return a.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var a=i.length-1;a>-1&&!e;)e=i[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";var e=n(675);const t=Array.isArray,i="object"==typeof global&&global&&global.Object===Object&&global;var a="object"==typeof self&&self&&self.Object===Object&&self;const r=i||a||Function("return this")(),s=r.Symbol;var o=Object.prototype,l=o.hasOwnProperty,c=o.toString,u=s?s.toStringTag:void 0;var d=Object.prototype.toString;var h=s?s.toStringTag:void 0;const p=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?function(e){var t=l.call(e,u),n=e[u];try{e[u]=void 0;var i=!0}catch(e){}var a=c.call(e);return i&&(t?e[u]=n:delete e[u]),a}(e):function(e){return d.call(e)}(e)},v=function(e){return null!=e&&"object"==typeof e},f=function(e){return"symbol"==typeof e||v(e)&&"[object Symbol]"==p(e)};var g=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m=/^\w*$/;const k=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},y=function(e){if(!k(e))return!1;var t=p(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},w=r["__core-js_shared__"];var b,_=(b=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"";var S=Function.prototype.toString;const E=function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var x=/^\[object .+?Constructor\]$/,P=Function.prototype,C=Object.prototype,H=P.toString,I=C.hasOwnProperty,M=RegExp("^"+H.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const q=function(e){return!(!k(e)||(t=e,_&&_ in t))&&(y(e)?M:x).test(E(e));var t},L=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return q(n)?n:void 0},R=L(Object,"create");var A=Object.prototype.hasOwnProperty;var D=Object.prototype.hasOwnProperty;function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}O.prototype.clear=function(){this.__data__=R?R(null):{},this.size=0},O.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},O.prototype.get=function(e){var t=this.__data__;if(R){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return A.call(t,e)?t[e]:void 0},O.prototype.has=function(e){var t=this.__data__;return R?void 0!==t[e]:D.call(t,e)},O.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=R&&void 0===t?"__lodash_hash_undefined__":t,this};const F=O,N=function(e,t){return e===t||e!=e&&t!=t},T=function(e,t){for(var n=e.length;n--;)if(N(e[n][0],t))return n;return-1};var j=Array.prototype.splice;function V(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}V.prototype.clear=function(){this.__data__=[],this.size=0},V.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0||(n==t.length-1?t.pop():j.call(t,n,1),--this.size,0))},V.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},V.prototype.has=function(e){return T(this.__data__,e)>-1},V.prototype.set=function(e,t){var n=this.__data__,i=T(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};const U=V,$=L(r,"Map"),B=function(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map};function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}z.prototype.clear=function(){this.size=0,this.__data__={hash:new F,map:new($||U),string:new F}},z.prototype.delete=function(e){var t=B(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return B(this,e).get(e)},z.prototype.has=function(e){return B(this,e).has(e)},z.prototype.set=function(e,t){var n=B(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};const W=z;function Q(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return n.cache=r.set(a,s)||r,s};return n.cache=new(Q.Cache||W),n}Q.Cache=W;var Z,K,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/\\(\\)?/g;const X=(Z=Q((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Y,(function(e,n,i,a){t.push(i?a.replace(G,"$1"):n||e)})),t}),(function(e){return 500===K.size&&K.clear(),e})),K=Z.cache,Z);var J=s?s.prototype:void 0,ee=J?J.toString:void 0;const te=function e(n){if("string"==typeof n)return n;if(t(n))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(n,e)+"";if(f(n))return ee?ee.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i},ne=function(e){return null==e?"":te(e)},ie=function(e,n){return t(e)?e:function(e,n){if(t(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!f(e))||m.test(e)||!g.test(e)||null!=n&&e in Object(n)}(e,n)?[e]:X(ne(e))},ae=function(e){if("string"==typeof e||f(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},re=function(e,t,n){var i=null==e?void 0:function(e,t){for(var n=0,i=(t=ie(t,e)).length;null!=e&&n<i;)e=e[ae(t[n++])];return n&&n==i?e:void 0}(e,t);return void 0===i?n:i},se=function(){try{var e=L(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),oe=function(e,t,n){"__proto__"==t&&se?se(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var le=Object.prototype.hasOwnProperty;const ce=function(e,t,n){var i=e[t];le.call(e,t)&&N(i,n)&&(void 0!==n||t in e)||oe(e,t,n)},ue=function(e,t,n,i){var a=!n;n||(n={});for(var r=-1,s=t.length;++r<s;){var o=t[r],l=i?i(n[o],e[o],o,n,e):void 0;void 0===l&&(l=e[o]),a?oe(n,o,l):ce(n,o,l)}return n},de=function(e){return e};var he=Math.max;var pe=se?function(e,t){return se(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:de;const ve=pe;var fe=Date.now;const ge=(me=ve,ke=0,ye=0,function(){var e=fe(),t=16-(e-ye);if(ye=e,t>0){if(++ke>=800)return arguments[0]}else ke=0;return me.apply(void 0,arguments)});var me,ke,ye;const we=function(e,t){return ge(function(e,t,n){return t=he(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,r=he(i.length-t,0),s=Array(r);++a<r;)s[a]=i[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=i[a];return o[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,o)}}(e,t,de),e+"")},be=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},_e=function(e){return null!=e&&be(e.length)&&!y(e)};var Se=/^(?:0|[1-9]\d*)$/;const Ee=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Se.test(e))&&e>-1&&e%1==0&&e<t};var xe=Object.prototype;const Pe=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)},Ce=function(e){return v(e)&&"[object Arguments]"==p(e)};var He=Object.prototype,Ie=He.hasOwnProperty,Me=He.propertyIsEnumerable;const qe=Ce(function(){return arguments}())?Ce:function(e){return v(e)&&Ie.call(e,"callee")&&!Me.call(e,"callee")};var Le="object"==typeof exports&&exports&&!exports.nodeType&&exports,Re=Le&&"object"==typeof module&&module&&!module.nodeType&&module,Ae=Re&&Re.exports===Le?r.Buffer:void 0;const De=(Ae?Ae.isBuffer:void 0)||function(){return!1};var Oe={};Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object Boolean]"]=Oe["[object DataView]"]=Oe["[object Date]"]=Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object WeakMap]"]=!1;const Fe=function(e){return function(t){return e(t)}};var Ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,Te=Ne&&"object"==typeof module&&module&&!module.nodeType&&module,je=Te&&Te.exports===Ne&&i.process;const Ve=function(){try{return Te&&Te.require&&Te.require("util").types||je&&je.binding&&je.binding("util")}catch(e){}}();var Ue=Ve&&Ve.isTypedArray;const $e=Ue?Fe(Ue):function(e){return v(e)&&be(e.length)&&!!Oe[p(e)]};var Be=Object.prototype.hasOwnProperty;const ze=function(e,n){var i=t(e),a=!i&&qe(e),r=!i&&!a&&De(e),s=!i&&!a&&!r&&$e(e),o=i||a||r||s,l=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],c=l.length;for(var u in e)!n&&!Be.call(e,u)||o&&("length"==u||r&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ee(u,c))||l.push(u);return l},We=function(e,t){return function(n){return e(t(n))}},Qe=We(Object.keys,Object);var Ze=Object.prototype.hasOwnProperty;const Ke=function(e){return _e(e)?ze(e):function(e){if(!Pe(e))return Qe(e);var t=[];for(var n in Object(e))Ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)};var Ye=Object.prototype.hasOwnProperty;const Ge=(Je=function(e,t){if(Pe(t)||_e(t))ue(t,Ke(t),e);else for(var n in t)Ye.call(t,n)&&ce(e,n,t[n])},we((function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,r=i>2?t[2]:void 0;for(a=Je.length>3&&"function"==typeof a?(i--,a):void 0,r&&function(e,t,n){if(!k(n))return!1;var i=typeof t;return!!("number"==i?_e(n)&&Ee(t,n.length):"string"==i&&t in n)&&N(n[t],e)}(t[0],t[1],r)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&Je(e,s,n,a)}return e}))),Xe=n.p+"styles.65c0ab8e75ac4bcab10e99f66a160664.css";var Je;class et extends HTMLElement{constructor(){super(...arguments),this.handlebars=HawkSearch.handlebars}get configuration(){var e,t;const n=null===(e=HawkSearch.config.components)||void 0===e?void 0:e[this.componentName],i=this.getAttribute("config");if(!i&&!this.configOverride)return n;let a;return i?a=null!==(t=re(window,i))&&void 0!==t?t:void 0:this.configOverride&&(a=this.configOverride),Ge({},null!=n?n:{},a)}get shadowDom(){var e,t;return void 0!==(null===(e=this.configuration)||void 0===e?void 0:e.shadowDom)?this.configuration.shadowDom:null===(t=HawkSearch.config.shadowDom)||void 0===t||t}get rootElement(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}get eventName(){if(!this.bindFromEvent)return;let e=`hawksearch:bind-${this.componentName}`;return this.eventFilter&&(e=`${e}:${this.eventFilter}`),e}connectedCallback(){this.shadowDom&&this.attachShadow({mode:"open"}),this.registerHelpers();const e=this.getCustomTemplateHtml(),t=/\[\[((?!\[).+?)\]\]/g;let n=null!=e?e:this.defaultHtml;for(;t.test(n);)n=n.replace(t,"{{$1}}");this.template=this.handlebars.compile(n),setTimeout((()=>{this.render()})),this.eventName&&(this.bindEventHandler=e=>{this.data=e.detail,this.render()},window.addEventListener(this.eventName,this.bindEventHandler))}disconnectedCallback(){this.eventName&&this.bindEventHandler&&window.removeEventListener(this.eventName,this.bindEventHandler)}registerHelpers(){}render(){var e,t;if(!this.template||!this.renderContent())return this.rootElement.replaceChildren(),void(this.style.display="none");const n=this.getContentModel(),i=new CustomEvent(`hawksearch:before-${this.componentName}-rendered`,{detail:{component:this,contentModel:n}});dispatchEvent(i);const a=[];let r=[];if(!1!==(null===(e=HawkSearch.config.css)||void 0===e?void 0:e.defaultStyles)&&r.push(Xe),null===(t=HawkSearch.config.css)||void 0===t?void 0:t.customStyles){const e="string"==typeof HawkSearch.config.css.customStyles?[HawkSearch.config.css.customStyles]:HawkSearch.config.css.customStyles;r=r.concat(e)}r.forEach(((e,t)=>{const n=`hawksearch-handlebars-ui-css-${t}`;if(!this.shadowDom&&document.head.querySelector(`[id="${n}"]`))return;let i;if(/^.*?.css$/.test(e)){const t=document.createElement("link");t.id=n,t.type="text/css",t.rel="stylesheet",t.href=e,i=t}else{const t=document.getElementById(e);if(t instanceof HTMLTemplateElement){const e=t.content.cloneNode(!0).querySelector("style");e&&(e.id=n,i=e)}else{const t=document.createElement("style");t.id=n,t.innerHTML=e,i=t}}i&&(this.shadowDom?a.push(i):document.head.append(i))}));const s=document.createElement("template"),o=this.template(n);s.innerHTML=o;const l=s.content.cloneNode(!0);a.push(l),this.rootElement.replaceChildren(...a),this.style.display=s.innerHTML?"":"none",this.contentModel=n,this.bindChildElements(),this.onRender();const c=new CustomEvent(`hawksearch:after-${this.componentName}-rendered`,{detail:{component:this,contentModel:n}});dispatchEvent(c)}renderContent(){return!0}bindChildElements(){}onRender(){}getCustomTemplateHtml(){var e;let t=null===(e=this.configuration)||void 0===e?void 0:e.template;if(t){const e=document.getElementById(t);(e instanceof HTMLTemplateElement||e instanceof HTMLScriptElement)&&(t=e.innerHTML);const n={"{{>":"{{>"};Object.entries(n).forEach((([e,n])=>{const i=new RegExp(e,"g");t=t.replace(i,n)}))}return t}interpolate(e,t){let n=e;return Object.entries(t).forEach((([e,t])=>{n=n.replace("${"+e+"}",t)})),n}}class tt extends et{constructor(){super(...arguments),this.bindFromEvent=!1}}const nt=n.p+"placeholder.c99b7374b9bf579d0fd0.png";function it(e){e=e.toLowerCase().replace(/[^a-z]/g,"");const t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle}const at=(rt={"&":"&","<":"<",">":">",""":'"',"'":"'"},function(e){return null==rt?void 0:rt[e]});var rt,st=/&(?:amp|lt|gt|quot|#39);/g,ot=RegExp(st.source);const lt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ct;const ut=new Uint8Array(16);function dt(){if(!ct&&(ct="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ct))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ct(ut)}const ht=[];for(let e=0;e<256;++e)ht.push((e+256).toString(16).slice(1));const pt=function(e,t,n){if(lt.randomUUID&&!t&&!e)return lt.randomUUID();const i=(e=e||{}).random||(e.rng||dt)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(ht[e[t+0]]+ht[e[t+1]]+ht[e[t+2]]+ht[e[t+3]]+"-"+ht[e[t+4]]+ht[e[t+5]]+"-"+ht[e[t+6]]+ht[e[t+7]]+"-"+ht[e[t+8]]+ht[e[t+9]]+"-"+ht[e[t+10]]+ht[e[t+11]]+ht[e[t+12]]+ht[e[t+13]]+ht[e[t+14]]+ht[e[t+15]]).toLowerCase()}(i)};class vt{get onSearchPage(){const e=/\/+$/;return window.location.pathname.replace(e,"")===this.searchUrl.replace(e,"")}constructor(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k,y,w,b,_,S,E,x,P,C,H,I,M,q,L,R,A,D,O,F,N,T,j,V,U,$,B,z,W,Q,Z,K,Y,G,X,J,ee,te,ne,ie,ae,re,se,oe;this.queryStringParams={disableSpellcheck:(null===(t=null===(e=HawkSearch.config.search)||void 0===e?void 0:e.queryStringMappings)||void 0===t?void 0:t.disableSpellcheck)||"disableSpellcheck",page:(null===(i=null===(n=HawkSearch.config.search)||void 0===n?void 0:n.queryStringMappings)||void 0===i?void 0:i.page)||"page",pageSize:(null===(r=null===(a=HawkSearch.config.search)||void 0===a?void 0:a.queryStringMappings)||void 0===r?void 0:r.pageSize)||"pageSize",query:(null===(o=null===(s=HawkSearch.config.search)||void 0===s?void 0:s.queryStringMappings)||void 0===o?void 0:o.query)||"query",searchWithin:(null===(c=null===(l=HawkSearch.config.search)||void 0===l?void 0:l.queryStringMappings)||void 0===c?void 0:c.searchWithin)||"searchWithin",sort:(null===(d=null===(u=HawkSearch.config.search)||void 0===u?void 0:u.queryStringMappings)||void 0===d?void 0:d.sort)||"sort"},this.searchUrl=null!==(p=null===(h=HawkSearch.config.search)||void 0===h?void 0:h.url)&&void 0!==p?p:"/search",this.fieldMappings={description:this.getFieldMappings(null===(v=HawkSearch.config.fieldMappings)||void 0===v?void 0:v.description,["description","longdescription"]),imageUrl:this.getFieldMappings(null===(f=HawkSearch.config.fieldMappings)||void 0===f?void 0:f.imageUrl,["imageurl","image"]),price:this.getFieldMappings(null===(g=HawkSearch.config.fieldMappings)||void 0===g?void 0:g.price,["price"]),rating:this.getFieldMappings(null===(m=HawkSearch.config.fieldMappings)||void 0===m?void 0:m.rating,["rating"]),salePrice:this.getFieldMappings(null===(k=HawkSearch.config.fieldMappings)||void 0===k?void 0:k.salePrice,["saleprice"]),sku:this.getFieldMappings(null===(y=HawkSearch.config.fieldMappings)||void 0===y?void 0:y.sku,["sku"]),title:this.getFieldMappings(null===(w=HawkSearch.config.fieldMappings)||void 0===w?void 0:w.title,["title","name","itemname"]),type:this.getFieldMappings(null===(b=HawkSearch.config.fieldMappings)||void 0===b?void 0:b.type,["type"]),url:this.getFieldMappings(null===(_=HawkSearch.config.fieldMappings)||void 0===_?void 0:_.url,["url"])},this.variantFieldMappings={color:{name:this.getFieldMappings(null===(x=null===(E=null===(S=HawkSearch.config.variants)||void 0===S?void 0:S.fieldMappings)||void 0===E?void 0:E.color)||void 0===x?void 0:x.name,["colorname","color"],null===(P=HawkSearch.config.variants)||void 0===P?void 0:P.fieldPrefix),hex:this.getFieldMappings(null===(I=null===(H=null===(C=HawkSearch.config.variants)||void 0===C?void 0:C.fieldMappings)||void 0===H?void 0:H.color)||void 0===I?void 0:I.hex,["colorhex","colorvalue"],null===(M=HawkSearch.config.variants)||void 0===M?void 0:M.fieldPrefix),imageUrl:this.getFieldMappings(null===(R=null===(L=null===(q=HawkSearch.config.variants)||void 0===q?void 0:q.fieldMappings)||void 0===L?void 0:L.color)||void 0===R?void 0:R.imageUrl,["colorimageurl","colorimage"],null===(A=HawkSearch.config.variants)||void 0===A?void 0:A.fieldPrefix)},id:this.getFieldMappings(null===(O=null===(D=HawkSearch.config.variants)||void 0===D?void 0:D.fieldMappings)||void 0===O?void 0:O.id,["id"],null===(F=HawkSearch.config.variants)||void 0===F?void 0:F.fieldPrefix),imageUrl:this.getFieldMappings(null===(T=null===(N=HawkSearch.config.variants)||void 0===N?void 0:N.fieldMappings)||void 0===T?void 0:T.imageUrl,["imageurl","image"],null===(j=HawkSearch.config.variants)||void 0===j?void 0:j.fieldPrefix),price:this.getFieldMappings(null===(U=null===(V=HawkSearch.config.variants)||void 0===V?void 0:V.fieldMappings)||void 0===U?void 0:U.price,["price"],null===($=HawkSearch.config.variants)||void 0===$?void 0:$.fieldPrefix),rating:this.getFieldMappings(null===(z=null===(B=HawkSearch.config.variants)||void 0===B?void 0:B.fieldMappings)||void 0===z?void 0:z.rating,["rating"],null===(W=HawkSearch.config.variants)||void 0===W?void 0:W.fieldPrefix),salePrice:this.getFieldMappings(null===(Z=null===(Q=HawkSearch.config.variants)||void 0===Q?void 0:Q.fieldMappings)||void 0===Z?void 0:Z.salePrice,["salePrice","saleprice"],null===(K=HawkSearch.config.variants)||void 0===K?void 0:K.fieldPrefix),sku:this.getFieldMappings(null===(G=null===(Y=HawkSearch.config.variants)||void 0===Y?void 0:Y.fieldMappings)||void 0===G?void 0:G.sku,["title","name","itemname"],null===(X=HawkSearch.config.variants)||void 0===X?void 0:X.fieldPrefix),title:this.getFieldMappings(null===(ee=null===(J=HawkSearch.config.variants)||void 0===J?void 0:J.fieldMappings)||void 0===ee?void 0:ee.title,["title","name","itemname"],null===(te=HawkSearch.config.variants)||void 0===te?void 0:te.fieldPrefix),description:this.getFieldMappings(null===(ie=null===(ne=HawkSearch.config.variants)||void 0===ne?void 0:ne.fieldMappings)||void 0===ie?void 0:ie.description,["description","longdescription"],null===(ae=HawkSearch.config.variants)||void 0===ae?void 0:ae.fieldPrefix),url:this.getFieldMappings(null===(se=null===(re=HawkSearch.config.variants)||void 0===re?void 0:re.fieldMappings)||void 0===se?void 0:se.url,["url"],null===(oe=HawkSearch.config.variants)||void 0===oe?void 0:oe.fieldPrefix)}}httpPost(e,t){return n=this,i=void 0,r=function*(){const n=this.baseUrl+e,i=this.getHeaders(),a=yield fetch(n,{method:"POST",headers:i,body:JSON.stringify(t)}),r=a.headers.get("content-type");return(null==r?void 0:r.startsWith("application/json"))?a.json():void 0},new((a=void 0)||(a=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function o(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(s,o)}l((r=r.apply(n,i||[])).next())}));var n,i,a,r}getHeaders(){const e=new Headers;return e.set("Content-Type","application/json"),e.set("X-Requested-With","XMLHttpRequest"),e}getFieldMappings(e,t,n){return"string"==typeof e&&(e=[e]),(null==e?void 0:e.length)||(e=t),n&&(e=e.map((e=>n+e))),e}getVisitorId(){const e="VisitorId";let t=localStorage.getItem(e);return t||(t=this.generateGuid(),localStorage.setItem(e,t)),t}getVisitId(){const e="VisitId";let t=sessionStorage.getItem(e);return t||(t=this.generateGuid(),sessionStorage.setItem(e,t)),t}generateGuid(){return pt()}stripHtml(e){let t=e.replace(/<[^>]+>/g,"");return t=(n=ne(n=t))&&ot.test(n)?n.replace(st,at):n,t=decodeURIComponent(t),t;var n}getValue(e,t){for(const n of t){let t=re(e,n);if(t){if("string"==typeof t&&(t=t.split("|^|")),0===t.length)continue;return t}}}getString(e,t,n){var i;const a=null===(i=this.getValue(e,t))||void 0===i?void 0:i[0];return null!=a?a:n}getNumber(e,t,n){var i;const a=null===(i=this.getValue(e,t))||void 0===i?void 0:i[0];let r=a?parseFloat(a):void 0;return void 0!==r&&isNaN(r)&&(r=void 0),null!=r?r:n}getUrl(e,t,n){var i;const a=null===(i=this.getValue(e,t))||void 0===i?void 0:i[0];return this.getFullUrl(a,n)}getFullUrl(e,t){if(e)return t&&!/^(?:https?:)?\/\//.test(e)?`${t}/${e.replace(/^\/+/,"")}`:e}getVariants(e){var t,n,i,a,r,s,o;if(!1===(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.enabled))return{items:void 0,selectedItem:void 0};const l=null===(n=HawkSearch.config.variants)||void 0===n?void 0:n.fieldPrefix,c=l?new RegExp("^"+l):void 0,u=e=>{const t=this.getString(e,this.variantFieldMappings.color.name),n=this.getString(e,this.variantFieldMappings.color.imageUrl);let i=this.getString(e,this.variantFieldMappings.color.hex);if(!i&&t&&(i=it(t)),i||n)return{name:t,hex:i,imageUrl:n}},d=null!==(s=null===(r=null===(a=null===(i=e.hawk_child_attributes_hits)||void 0===i?void 0:i[0])||void 0===a?void 0:a.Items)||void 0===r?void 0:r.reduce(((e,t)=>{const n=this.getString(t,this.variantFieldMappings.id);return n&&e.push(n),e}),[]))&&void 0!==s?s:[];let h,p=null===(o=e.hawk_child_attributes)||void 0===o?void 0:o.map(((e,t)=>{var n;const i=null!==(n=this.getString(e,this.variantFieldMappings.id))&&void 0!==n?n:"";return{attributes:Object.fromEntries(Object.entries(e).map((([e,t])=>(c&&(e=e.replace(c,"")),[e,t])))),color:u(e),description:this.getString(e,this.variantFieldMappings.description),id:i,imageUrl:this.getString(e,this.variantFieldMappings.imageUrl),price:this.getNumber(e,this.variantFieldMappings.price)||void 0,queryMatch:d.includes(i),rating:this.getNumber(e,this.variantFieldMappings.rating),salePrice:this.getNumber(e,this.variantFieldMappings.salePrice)||void 0,title:this.getString(e,this.variantFieldMappings.title),url:this.getString(e,this.variantFieldMappings.url)}})).filter((e=>!!e.id));(null==p?void 0:p.length)||(p=void 0);for(const e of d){const t=null==p?void 0:p.find((t=>t.id===e));if(t){h=t;break}}return h||(h=null==p?void 0:p[0]),{items:p,selectedItem:h}}triggerBindEvent(e,t,n){let i=`hawksearch:bind-${e}`;n&&(i=`${i}:${n}`),this.triggerEvent(i,t)}triggerEvent(e,t){const n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)}}function ft(e){let t=null;return t=decodeURIComponent(e),t!==e&&(t=ft(t)),t}var gt=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function o(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((i=i.apply(e,t||[])).next())}))};const mt=new class extends vt{constructor(){var e,t,n;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.autocomplete)||void 0===e?void 0:e.endpointUrl)||(null===(t=HawkSearch.config.search)||void 0===t?void 0:t.endpointUrl)||"https://searchapi-dev.hawksearch.net",this.decodeQuery=(null===(n=HawkSearch.config.autocomplete)||void 0===n?void 0:n.decodeQuery)||!1}query(e){return gt(this,void 0,void 0,(function*(){const t={query:e};return yield this.executeAutocomplete(t)}))}executeAutocomplete(e){return gt(this,void 0,void 0,(function*(){this.decodeQuery&&e.query&&(e.query=ft(e.query));const t={ClientGuid:HawkSearch.config.clientId,IndexName:HawkSearch.config.index,Keyword:e.query,DisplayFullResponse:!0};try{this.triggerEvent("hawksearch:before-autocomplete-executed",t);const n=yield this.httpPost("/api/v2/autocomplete",t);this.triggerEvent("hawksearch:after-autocomplete-executed",n);const i=this.convertResponse(e.query,n);return this.triggerEvent("hawksearch:autocomplete-completed",i),this.bindComponent(i),i}catch(e){throw new Error("Error retrieving autocomplete response")}}))}convertResponse(e,t){var n,i,a,r;const s=e=>{var t,n,i;const a=this.getVariants(e.Results.Document);return{attributes:Object.fromEntries(Object.entries(e.Results.Document).filter((([e,t])=>!["hawk_child_attributes","hawk_child_attributes_hits"].includes(e)))),description:this.getString(e.Results.Document,this.fieldMappings.description),id:e.Results.DocId,imageUrl:(null===(t=e.Thumb)||void 0===t?void 0:t.Url)||this.getUrl(e.Results.Document,this.fieldMappings.imageUrl,null===(n=HawkSearch.config.urlPrefixes)||void 0===n?void 0:n.content),pinned:e.Results.IsPin,price:this.getNumber(e.Results.Document,this.fieldMappings.price)||void 0,rating:this.getNumber(e.Results.Document,this.fieldMappings.rating),salePrice:this.getNumber(e.Results.Document,this.fieldMappings.salePrice)||void 0,score:e.Results.Score,selectedVariant:a.selectedItem,sku:e.Sku||this.getString(e.Results.Document,this.fieldMappings.sku),title:this.stripHtml(e.ProductName)||this.getString(e.Results.Document,this.fieldMappings.title),url:e.Url||this.getUrl(e.Results.Document,this.fieldMappings.url,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.content),variants:a.items}};return{query:e,categories:{title:t.CategoryHeading,results:t.Categories.map((e=>({title:this.stripHtml(e.Value),field:e.FieldQSName,value:e.FieldQSValue,url:`${this.searchUrl}?${e.FieldQSName}=${encodeURIComponent(e.FieldQSValue)}`})))},content:{title:t.ContentHeading,results:t.Content.map((e=>({id:e.Results.DocId,pinned:e.Results.IsPin,score:e.Results.Score,attributes:e.Results.Document,title:this.stripHtml(e.Value),url:e.Url}))),totalRecords:t.ContentCount},queries:{title:t.PopularHeading,results:t.Popular.map((e=>({query:this.stripHtml(e.RawValue),url:`${this.searchUrl}?${this.queryStringParams.query}=${encodeURIComponent(this.stripHtml(e.RawValue))}`})))},contentSuggestedQueries:{title:t.DYMContentHeading,results:null!==(i=null===(n=t.DymContentSearch)||void 0===n?void 0:n.map((e=>({query:this.stripHtml(e.RawValue),url:`${this.searchUrl}?${this.queryStringParams.query}=${encodeURIComponent(this.stripHtml(e.RawValue))}`}))))&&void 0!==i?i:[]},productSuggestedQueries:{title:t.DYMProductHeading,results:null!==(r=null===(a=t.DymProductsSearch)||void 0===a?void 0:a.map((e=>({query:this.stripHtml(e.RawValue),url:`${this.searchUrl}?${this.queryStringParams.query}=${encodeURIComponent(this.stripHtml(e.RawValue))}`}))))&&void 0!==r?r:[]},products:{title:t.ProductHeading,results:t.Products.map((e=>s(e))),totalRecords:t.ProductCount},totalRecords:t.Count,viewAllText:t.ViewAllButtonLabel}}bindComponent(e){this.triggerBindEvent("autocomplete",e)}};const kt=new class extends vt{constructor(){var e;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.recommendations)||void 0===e?void 0:e.endpointUrl)||"https://recs-dev.hawksearch.net"}getItems(e){return this.executeRecommendations(e)}executeRecommendations(e){var t,n,i,a,r;return n=this,i=void 0,r=function*(){const n={clientGuid:HawkSearch.config.clientId,indexName:HawkSearch.config.index,landingPageUrl:e.url,renderHTML:!1,visitId:this.getVisitId(),visitorId:this.getVisitorId(),widgetUids:[{widgetGuid:e.widgetId,uniqueid:e.itemId}]};try{this.triggerEvent("hawksearch:before-recommendations-executed",n);const i=yield this.httpPost("/api/recommendation/v2/getwidgetitems",n);this.triggerEvent("hawksearch:after-recommendations-executed",i);const a=this.convertResponse(i);this.triggerEvent("hawksearch:recommendations-completed",a);const r=e.itemId?`${e.widgetId}:${e.itemId}`:e.widgetId;return HawkSearch.recommendationsResponses=Object.assign(Object.assign({},null!==(t=HawkSearch.recommendationsResponses)&&void 0!==t?t:{}),{[r]:a}),this.bindComponents(a),a}catch(e){throw new Error("Error retrieving recommendations response")}},new((a=void 0)||(a=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function o(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(s,o)}l((r=r.apply(n,i||[])).next())}))}convertResponse(e){var t;const n=e=>{if(e)return"string"==typeof e?e.split("|^|"):e},i=e=>{var t,i;const a=this.getVariants(e.customDict);return{attributes:Object.fromEntries(Object.entries(e.customDict).filter((([e,t])=>!["hawk_child_attributes","hawk_child_attributes_hits"].includes(e))).map((([e,t])=>[e,n(t)]))),description:e.shortDescription||this.getString(e.customDict,this.fieldMappings.description),id:e.id,imageUrl:e.imageUrl||this.getUrl(e.customDict,this.fieldMappings.imageUrl,null===(t=HawkSearch.config.urlPrefixes)||void 0===t?void 0:t.content),price:parseFloat(e.price)||this.getNumber(e.customDict,this.fieldMappings.price)||void 0,rating:parseFloat(e.rating)||this.getNumber(e.customDict,this.fieldMappings.rating)||void 0,salePrice:parseFloat(e.salePrice)||this.getNumber(e.customDict,this.fieldMappings.salePrice)||void 0,selectedVariant:a.selectedItem,sku:e.Sku||this.getString(e.customDict,this.fieldMappings.sku),title:e.itemName||this.getString(e.customDict,this.fieldMappings.title),url:e.url||this.getUrl(e.customDict,this.fieldMappings.url,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.content),variants:a.items}};return{requestId:e.requestId,widgets:null===(t=null==e?void 0:e.widgetItems)||void 0===t?void 0:t.map((t=>{var n;return{id:t.widgetGuid,requestId:e.requestId,title:t.widgetName,carousel:t.isCarousel,items:null===(n=t.recommendationItems)||void 0===n?void 0:n.map((e=>i(e)))}}))}}bindComponents(e){var t;null===(t=e.widgets)||void 0===t||t.forEach((e=>{this.triggerBindEvent("recommendations",e,e.id)}))}};function yt(e){var t=this.__data__=new U(e);this.size=t.size}yt.prototype.clear=function(){this.__data__=new U,this.size=0},yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},yt.prototype.get=function(e){return this.__data__.get(e)},yt.prototype.has=function(e){return this.__data__.has(e)},yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof U){var i=n.__data__;if(!$||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(i)}return n.set(e,t),this.size=n.size,this};const wt=yt;var bt=Object.prototype.hasOwnProperty;const _t=function(e){if(!k(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Pe(e),n=[];for(var i in e)("constructor"!=i||!t&&bt.call(e,i))&&n.push(i);return n},St=function(e){return _e(e)?ze(e,!0):_t(e)};var Et="object"==typeof exports&&exports&&!exports.nodeType&&exports,xt=Et&&"object"==typeof module&&module&&!module.nodeType&&module,Pt=xt&&xt.exports===Et?r.Buffer:void 0,Ct=Pt?Pt.allocUnsafe:void 0;const Ht=function(){return[]};var It=Object.prototype.propertyIsEnumerable,Mt=Object.getOwnPropertySymbols;const qt=Mt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var s=e[n];t(s,n,e)&&(r[a++]=s)}return r}(Mt(e),(function(t){return It.call(e,t)})))}:Ht,Lt=function(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e},Rt=We(Object.getPrototypeOf,Object),At=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Lt(t,qt(e)),e=Rt(e);return t}:Ht,Dt=function(e,n,i){var a=n(e);return t(e)?a:Lt(a,i(e))},Ot=function(e){return Dt(e,Ke,qt)},Ft=function(e){return Dt(e,St,At)},Nt=L(r,"DataView"),Tt=L(r,"Promise"),jt=L(r,"Set"),Vt=L(r,"WeakMap");var Ut="[object Map]",$t="[object Promise]",Bt="[object Set]",zt="[object WeakMap]",Wt="[object DataView]",Qt=E(Nt),Zt=E($),Kt=E(Tt),Yt=E(jt),Gt=E(Vt),Xt=p;(Nt&&Xt(new Nt(new ArrayBuffer(1)))!=Wt||$&&Xt(new $)!=Ut||Tt&&Xt(Tt.resolve())!=$t||jt&&Xt(new jt)!=Bt||Vt&&Xt(new Vt)!=zt)&&(Xt=function(e){var t=p(e),n="[object Object]"==t?e.constructor:void 0,i=n?E(n):"";if(i)switch(i){case Qt:return Wt;case Zt:return Ut;case Kt:return $t;case Yt:return Bt;case Gt:return zt}return t});const Jt=Xt;var en=Object.prototype.hasOwnProperty;const tn=r.Uint8Array,nn=function(e){var t=new e.constructor(e.byteLength);return new tn(t).set(new tn(e)),t};var an=/\w*$/;var rn=s?s.prototype:void 0,sn=rn?rn.valueOf:void 0;const on=function(e,t,n){var i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return nn(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?nn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?nn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,an.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return i=e,sn?Object(sn.call(i)):{}}};var ln=Object.create;const cn=function(){function e(){}return function(t){if(!k(t))return{};if(ln)return ln(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var un=Ve&&Ve.isMap;const dn=un?Fe(un):function(e){return v(e)&&"[object Map]"==Jt(e)};var hn=Ve&&Ve.isSet;const pn=hn?Fe(hn):function(e){return v(e)&&"[object Set]"==Jt(e)};var vn="[object Arguments]",fn="[object Function]",gn="[object Object]",mn={};mn[vn]=mn["[object Array]"]=mn["[object ArrayBuffer]"]=mn["[object DataView]"]=mn["[object Boolean]"]=mn["[object Date]"]=mn["[object Float32Array]"]=mn["[object Float64Array]"]=mn["[object Int8Array]"]=mn["[object Int16Array]"]=mn["[object Int32Array]"]=mn["[object Map]"]=mn["[object Number]"]=mn[gn]=mn["[object RegExp]"]=mn["[object Set]"]=mn["[object String]"]=mn["[object Symbol]"]=mn["[object Uint8Array]"]=mn["[object Uint8ClampedArray]"]=mn["[object Uint16Array]"]=mn["[object Uint32Array]"]=!0,mn["[object Error]"]=mn[fn]=mn["[object WeakMap]"]=!1;const kn=function e(n,i,a,r,s,o){var l,c=1&i,u=2&i,d=4&i;if(a&&(l=s?a(n,r,s,o):a(n)),void 0!==l)return l;if(!k(n))return n;var h=t(n);if(h){if(l=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&en.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(n),!c)return function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}(n,l)}else{var p=Jt(n),v=p==fn||"[object GeneratorFunction]"==p;if(De(n))return function(e,t){if(t)return e.slice();var n=e.length,i=Ct?Ct(n):new e.constructor(n);return e.copy(i),i}(n,c);if(p==gn||p==vn||v&&!s){if(l=u||v?{}:function(e){return"function"!=typeof e.constructor||Pe(e)?{}:cn(Rt(e))}(n),!c)return u?function(e,t){return ue(e,At(e),t)}(n,function(e,t){return e&&ue(t,St(t),e)}(l,n)):function(e,t){return ue(e,qt(e),t)}(n,function(e,t){return e&&ue(t,Ke(t),e)}(l,n))}else{if(!mn[p])return s?n:{};l=on(n,p,c)}}o||(o=new wt);var f=o.get(n);if(f)return f;o.set(n,l),pn(n)?n.forEach((function(t){l.add(e(t,i,a,t,n,o))})):dn(n)&&n.forEach((function(t,r){l.set(r,e(t,i,a,r,n,o))}));var g=h?void 0:(d?u?Ft:Ot:u?St:Ke)(n);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(g||n,(function(t,r){g&&(t=n[r=t]),ce(l,r,e(t,i,a,r,n,o))})),l},yn=function(e){return kn(e,5)};var wn,bn,_n,Sn;!function(e){e[e.Search=1]="Search",e[e.Category=2]="Category",e[e.Product=3]="Product",e[e.Content=4]="Content"}(wn||(wn={})),function(e){e[e.PageLoad=1]="PageLoad",e[e.Search=2]="Search",e[e.Click=3]="Click",e[e.AddToCart=4]="AddToCart",e[e.Rate=5]="Rate",e[e.Sale=6]="Sale",e[e.BannerClick=7]="BannerClick",e[e.BannerImpression=8]="BannerImpression",e[e.RecommendationClick=10]="RecommendationClick",e[e.AutocompleteClick=11]="AutocompleteClick",e[e.AddToCartMultiple=14]="AddToCartMultiple"}(bn||(bn={})),function(e){e[e.Item=1]="Item",e[e.Landing=2]="Landing",e[e.Cart=3]="Cart",e[e.Order=4]="Order",e[e.Custom=5]="Custom"}(_n||(_n={})),function(e){e[e.Initial=1]="Initial",e[e.Refinement=2]="Refinement"}(Sn||(Sn={}));const En=new class extends vt{constructor(){var e;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.tracking)||void 0===e?void 0:e.endpointUrl)||"https://tracking-dev.hawksearch.net"}trackAddToCart(e,t,n,i){const a={UniqueId:e,Quantity:t,Price:n,Currency:i};return this.trackEvent(bn.AddToCart,a)}trackAddToCartMultiple(e){const t={ItemsList:e.map((e=>({UniqueId:e.productId,Quantity:e.quantity,Price:e.price,Currency:e.currencyIsoCode})))};return this.trackEvent(bn.AddToCartMultiple,t)}trackAutocompleteClick(e,t,n,i){const a={Keyword:e,Name:n,SuggestType:t,Url:i};return this.trackEvent(bn.AutocompleteClick,a)}trackBannerClick(e,t){var n;if(!(null===(n=HawkSearch.searchResponse)||void 0===n?void 0:n.trackingId))return Promise.resolve();const i={BannerId:e,CampaignId:t,TrackingId:HawkSearch.searchResponse.trackingId};return this.trackEvent(bn.BannerClick,i)}trackBannerImpression(e,t){var n;if(!(null===(n=HawkSearch.searchResponse)||void 0===n?void 0:n.trackingId)||!e||!t)return Promise.resolve();const i={BannerId:e,CampaignId:t,TrackingId:HawkSearch.searchResponse.trackingId};return this.trackEvent(bn.BannerImpression,i)}trackOrder(e,t,n,i,a,r){const s={OrderNo:e,ItemList:t.map((e=>({UniqueId:e.productId,Quantity:e.quantity,ItemPrice:e.price}))),SubTotal:n,Tax:i,Total:a,Currency:r};return this.trackEvent(bn.Sale,s)}trackPageLoad(e,t){if(e===_n.Item&&!t)throw new Error("productId is required for tracking product detail page requests");const n={PageTypeId:e,RequestPath:window.location.pathname,Qs:window.location.search,UniqueId:t,ViewportHeight:document.documentElement.clientHeight,ViewportWidth:document.documentElement.clientWidth};return this.trackEvent(bn.PageLoad,n)}trackRating(e,t){const n={UniqueId:e,Value:t};return this.trackEvent(bn.Rate,n)}trackRecommendationClick(e,t,n){const i={WidgetGuid:e,RequestId:t,UniqueId:n};return this.trackEvent(bn.RecommendationClick,i)}trackSearchResultClick(e,t,n){var i;if(!(null===(i=HawkSearch.searchResponse)||void 0===i?void 0:i.trackingId))return Promise.resolve();const a={UniqueId:e,Url:t,TrackingId:HawkSearch.searchResponse.trackingId,RequestPath:window.location.pathname,Qs:window.location.search,ScrollX:window.scrollX,ScrollY:window.scrollY,ViewportHeight:document.documentElement.clientHeight,ViewportWidth:document.documentElement.clientWidth,MouseX:null==n?void 0:n.pageX,MouseY:null==n?void 0:n.pageY};return this.trackEvent(bn.Click,a)}trackSearch(e,t){var n;if(!(null===(n=HawkSearch.searchResponse)||void 0===n?void 0:n.trackingId))return Promise.resolve();const i={QueryId:t?this.setNewQueryId():this.getQueryId(),TrackingId:HawkSearch.searchResponse.trackingId,TypeId:t?Sn.Initial:Sn.Refinement,ViewportHeight:document.documentElement.clientHeight,ViewportWidth:document.documentElement.clientWidth,keyword:e};return this.trackEvent(bn.Search,i)}trackEvent(e,t){var n,i,a,r,s;return i=this,a=void 0,s=function*(){if(!1===(null===(n=HawkSearch.config.tracking)||void 0===n?void 0:n.enabled))return;const i={ClientGuid:HawkSearch.config.clientId,EventType:e,EventData:btoa(JSON.stringify(t)),VisitorId:this.getVisitorId(),VisitId:this.getVisitId()};try{yield this.httpPost("/api/trackevent",i)}catch(e){throw new Error("Error recording search activity")}},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function o(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,o)}l((s=s.apply(i,a||[])).next())}))}getQueryId(){let e=localStorage.getItem("QueryId");return e||(e=this.setNewQueryId()),e}setNewQueryId(){const e=this.generateGuid();return localStorage.setItem("QueryId",e),e}};var xn=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function o(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((i=i.apply(e,t||[])).next())}))};const Pn=new class extends vt{constructor(){var e,t,n,i;super(...arguments),this.baseUrl=(null===(e=HawkSearch.config.search)||void 0===e?void 0:e.endpointUrl)||"https://searchapi-dev.hawksearch.net",this.facetExclusionPrefix=(null===(t=HawkSearch.config.search)||void 0===t?void 0:t.facetExclusionPrefix)||"-",this.decodeQuery=(null===(n=HawkSearch.config.search)||void 0===n?void 0:n.decodeQuery)||!1,this.decodeFacetValues=(null===(i=HawkSearch.config.search)||void 0===i?void 0:i.decodeFacetValues)||!1,this.shouldRenderUI=!0}search(e){return xn(this,void 0,void 0,(function*(){const t=yield this.executeSearch(e,!0,!1);return this.shouldRenderUI&&this.bindComponents(t),t}))}query(e,t=void 0,n=!1){return xn(this,void 0,void 0,(function*(){const i={disableSpellcheck:!!n||void 0,facets:t,newRequest:!0,query:e};if(!this.onSearchPage){const e=this.getSearchUrl(i);return window.location.assign(e),Promise.resolve()}if(e){const t=this.getRecentQueries(),n=5;t.includes(e)||(t.length>=n&&t.splice(n-1),t.unshift(e),this.saveRecentQueries(t))}const a=yield this.executeSearch(i,!0,!1);return this.shouldRenderUI&&this.bindComponents(a),a}))}addFacetValue(e,t){var n,i;return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const a=yn(HawkSearch.searchRequest);a.newRequest=!1,a.page=void 0,a.facets||(a.facets={}),this.clearExistingFacetValue(a,e,t),a.facets[e]=[...null!==(i=null===(n=a.facets[e])||void 0===n?void 0:n.filter((e=>e!==t)))&&void 0!==i?i:[],t];const r=yield this.executeSearch(a,!1);return this.bindFacetsListComponent(r),this.bindPaginationComponent(r),this.bindSelectedFacetsComponent(r),this.bindTabsComponent(r),this.bindZoneComponent(r),r}))}removeFacetValue(e,t){return xn(this,void 0,void 0,(function*(){if(this.ensureSearchRequest(),"searchWithin"===e)return yield this.searchWithin("");const n=yn(HawkSearch.searchRequest);n.newRequest=!1,n.page=void 0,this.clearExistingFacetValue(n,e,t);const i=yield this.executeSearch(n,!1);return this.bindFacetsListComponent(i),this.bindPaginationComponent(i),this.bindSelectedFacetsComponent(i),this.bindTabsComponent(i),this.bindZoneComponent(i),i}))}includeFacetValue(e,t){const n=`${this.facetExclusionPrefix}${t}`;return this.removeFacetValue(e,n)}excludeFacetValue(e,t){var n;return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const i=`${this.facetExclusionPrefix}${t}`,a=yn(HawkSearch.searchRequest);a.newRequest=!1,a.page=void 0,a.facets||(a.facets={}),this.clearExistingFacetValue(a,e,t),a.facets=Object.assign(Object.assign({},a.facets),{[e]:[...null!==(n=a.facets[e])&&void 0!==n?n:[],i]});const r=yield this.executeSearch(a,!1);return this.bindFacetsListComponent(r),this.bindPaginationComponent(r),this.bindSelectedFacetsComponent(r),this.bindTabsComponent(r),this.bindZoneComponent(r),r}))}clearExistingFacetValue(e,t,n){var i,a,r;n=n.replace(new RegExp("^"+this.facetExclusionPrefix),"");const s=`${this.facetExclusionPrefix}${n}`;e.facets||(e.facets={}),e.facets=Object.assign(Object.assign({},e.facets),{[t]:[...null!==(a=null===(i=e.facets[t])||void 0===i?void 0:i.filter((e=>e!==n&&e!==s)))&&void 0!==a?a:[]]}),(null===(r=e.facets[t])||void 0===r?void 0:r.length)||delete e.facets[t]}setFacetValue(e,t){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const n=yn(HawkSearch.searchRequest);n.newRequest=!1,n.page=void 0,n.facets||(n.facets={}),n.facets[e]=[t];const i=yield this.executeSearch(n,!1);return this.bindFacetsListComponent(i),this.bindPaginationComponent(i),this.bindSelectedFacetsComponent(i),this.bindTabsComponent(i),this.bindZoneComponent(i),i}))}searchWithin(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.page=void 0,t.searchWithin=e||void 0;const n=yield this.executeSearch(t,!1);return this.bindFacetsListComponent(n),this.bindPaginationComponent(n),this.bindSelectedFacetsComponent(n),this.bindTabsComponent(n),this.bindZoneComponent(n),n}))}selectTab(e){var t,n,i;return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const a=yn(HawkSearch.searchRequest);a.newRequest=!1,a.page=void 0,a.facets||(a.facets={});const r=null===(i=null===(n=null===(t=HawkSearch.searchResponse)||void 0===t?void 0:t.facets)||void 0===n?void 0:n.find((e=>"tabs"===e.type)))||void 0===i?void 0:i.field;r&&(e?a.facets[r]=[e]:delete a.facets[r]);const s=yield this.executeSearch(a,!1);return this.bindFacetsListComponent(s),this.bindPaginationComponent(s),this.bindSelectedFacetsComponent(s),this.bindTabsComponent(s),this.bindZoneComponent(s),s}))}paginate(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.page=e;const n=yield this.executeSearch(t,!1);return this.bindPaginationComponent(n),n}))}setPageSize(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.pageSize=e;const n=yield this.executeSearch(t,!1);return this.bindPageSizeComponent(n),this.bindPaginationComponent(n),n}))}sort(e){return xn(this,void 0,void 0,(function*(){this.ensureSearchRequest();const t=yn(HawkSearch.searchRequest);t.newRequest=!1,t.page=1,t.sort=e;const n=yield this.executeSearch(t,!1);return this.bindPaginationComponent(n),this.bindSortingComponent(n),n}))}executeSearch(e,t,n=!0){var i;return xn(this,void 0,void 0,(function*(){if(this.decodeQuery&&e.query&&(e.query=ft(e.query)),this.decodeFacetValues&&e.facets)for(let t in e.facets){let n=[],i=e.facets[t];for(let e in i)n.push(ft(i[parseInt(e)]));e.facets[t]=n}HawkSearch.searchRequest=e;const a={ClientData:{UserAgent:window.navigator.userAgent,VisitorId:this.getVisitorId(),VisitId:this.getVisitId()},ClientGuid:HawkSearch.config.clientId,CustomURL:e.url,IgnoreSpellcheck:e.disableSpellcheck,IndexName:HawkSearch.config.index,Keyword:e.query,FacetSelections:e.facets,MaxPerPage:e.pageSize,PageNo:e.page,SearchWithin:e.searchWithin,SortBy:e.sort,Variants:{CountFacetHitOnChild:null===(i=HawkSearch.config.variants)||void 0===i?void 0:i.baseFacetCountOnVariants}};try{this.triggerEvent("hawksearch:before-search-executed",a);const i=yield this.httpPost("/api/v2/search",a);this.triggerEvent("hawksearch:after-search-executed",i);const r=this.convertResponse(e,i);return HawkSearch.searchResponse=r,En.trackSearch(e.query,t),this.setQueryString(r),this.setSeoElements(r),t&&r.redirect&&r.redirect.url&&("_blank"!==r.redirect.target&&(this.shouldRenderUI=!1),"_blank"===r.redirect.target?window.open(r.redirect.url,"_blank"):"_parent"===r.redirect.target?window.open(r.redirect.url,"_parent"):"_top"===r.redirect.target?window.open(r.redirect.url,"_top"):window.open(r.redirect.url,"_self")),n&&this.shouldRenderUI&&(this.bindModifiedQueryComponent(r),this.bindQuerySuggestionsComponent(r),this.bindSearchFieldComponent(r),this.bindSearchResultsListComponent(r)),this.triggerEvent("hawksearch:search-completed",r),r}catch(e){throw new Error("Error retrieving search response")}}))}ensureSearchRequest(){if(!HawkSearch.searchRequest)throw new Error("You cannot refine search results until an initial search has been executed")}convertResponse(e,t){var n,i,a,r,s,o,l;const c=e=>{if("tab"===e.FieldType)return"tabs";switch(e.FacetType.toLowerCase()){case"checkbox":case"nestedcheckbox":return"checkbox";case"color":return"color";case"link":return"link";case"openrange":if("datetime"===e.DataType)return"date-range";if(e.IsCurrency||e.IsNumeric)return"numeric-range";case"recentsearches":return"recent-searches";case"related":return"related-searches";case"search":return"search";case"size":return"size";case"slider":return"range-slider";case"swatch":return"color";default:return"unsupported"}},u=e=>{if("scrolling"===e.DisplayType)return{height:e.ScrollHeight||void 0,threshold:e.ScrollThreshold||0}},d=["date-range","numeric-range","range-slider"],h=e=>{var t;const n=c(e);if(d.includes(n)&&(null===(t=e.Values)||void 0===t?void 0:t.length))return"datetime"===e.DataType?{type:"date",min:new Date(Date.parse(e.Values[0].RangeMin)),max:new Date(Date.parse(e.Values[0].RangeMax)),start:new Date(Date.parse(e.Values[0].RangeStart)),end:new Date(Date.parse(e.Values[0].RangeEnd))}:{type:"numeric",min:parseFloat(e.Values[0].RangeMin),max:parseFloat(e.Values[0].RangeMax),start:parseFloat(e.Values[0].RangeStart),end:parseFloat(e.Values[0].RangeEnd)}},p=(e,t)=>{var n,i;const a=null===(n=e.Ranges)||void 0===n?void 0:n.find((e=>e.Value.toLowerCase()===t.Value.toLowerCase()));if(null==a?void 0:a.AssetFullUrl)return this.getFullUrl(a.AssetFullUrl,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.assets)},v=(e,t)=>{var n,i,a;let r=null===(n=e.SwatchData)||void 0===n?void 0:n.find((e=>e.Value.toLowerCase()===t.Value.toLowerCase()));if(r||(r=null===(i=e.SwatchData)||void 0===i?void 0:i.find((e=>e.IsDefault))),r)return{name:t.Label,hex:r.Color||r.Value,imageUrl:this.getFullUrl(r.AssetUrl||r.AssetName,null===(a=HawkSearch.config.urlPrefixes)||void 0===a?void 0:a.assets)}},f=(e,t,n)=>"recent-searches"===c(e)?this.getRecentQueries().map((e=>({title:e}))):null==t?void 0:t.map((t=>{var i;return{title:t.Label,imageUrl:p(e,t),value:t.Value,color:v(e,t),count:t.Count,level:t.Level,selected:t.Selected,excluded:null===(i=null==n?void 0:n.Items)||void 0===i?void 0:i.some((e=>e.Value===`${this.facetExclusionPrefix}${t.Value}`)),children:f(e,t.Children,n)}})),g=e=>{var t;if("recent-searches"===c(e)){const t=f(e,void 0,void 0);return!!(null==t?void 0:t.length)}return null===(t=e.IsVisible)||void 0===t||t},m=e=>{if("truncating"===e.DisplayType)return{threshold:parseFloat(e.TruncateThreshold)||0}},k=e=>{var t,n,i,a;const r=this.getVariants(e.Document);return{attributes:Object.fromEntries(Object.entries(e.Document).filter((([e,t])=>!["hawk_child_attributes","hawk_child_attributes_hits"].includes(e)))),description:this.getString(e.Document,this.fieldMappings.description),id:e.DocId,imageUrl:this.getUrl(e.Document,this.fieldMappings.imageUrl,null===(t=HawkSearch.config.urlPrefixes)||void 0===t?void 0:t.content),pinned:null!==(n=e.IsPin)&&void 0!==n&&n,price:this.getNumber(e.Document,this.fieldMappings.price)||void 0,rating:this.getNumber(e.Document,this.fieldMappings.rating),salePrice:this.getNumber(e.Document,this.fieldMappings.salePrice)||void 0,score:e.Score,sku:this.getString(e.Document,this.fieldMappings.sku),selectedVariant:r.selectedItem,title:this.getString(e.Document,this.fieldMappings.title),type:((e,t)=>{var n,i,a,r,s,o;"string"==typeof t&&(t=[t]);const l=(null!==(a=null===(i=null===(n=HawkSearch.config.search)||void 0===n?void 0:n.itemTypes)||void 0===i?void 0:i.productValues)&&void 0!==a?a:["item","product"]).map((e=>e.toLowerCase()));for(const n of t){let t=re(e,n);if(t&&t instanceof Array&&(t=t[0]),t&&l.includes(t.toLowerCase()))return"product"}return null!==(o=null===(s=null===(r=HawkSearch.config.search)||void 0===r?void 0:r.itemTypes)||void 0===s?void 0:s.default)&&void 0!==o?o:"content"})(e.Document,this.fieldMappings.type),url:this.getUrl(e.Document,this.fieldMappings.url,null===(i=HawkSearch.config.urlPrefixes)||void 0===i?void 0:i.content),variants:r.items,visible:null===(a=e.IsVisible)||void 0===a||a}},y=e=>{if(e.IsSearch)return{threshold:parseFloat(e.SearchThreshold)||0}},w=()=>{var n;const i="searchWithin",a=null===(n=t.Facets)||void 0===n?void 0:n.find((e=>e.Field===i));return e.searchWithin&&a?[{field:i,title:a.Name,currency:!1,values:[{title:e.searchWithin,value:e.searchWithin,excluded:!1}]}]:[]},b=(e,t,n)=>{var i,a,r,s;("Mobile"===t&&!e.IsMobile||"Tablet"===t&&!e.IsTablet)&&(t="");const o={campaignId:e.CampaignId,id:e.BannerId,title:e.Title,trackingEnabled:null===(i=e.IsTrackingEnabled)||void 0===i||i,type:e[t+"ContentType"],zone:null!=n?n:e.Zone};switch(o.type){case"custom":o.content=e[t+"Output"];break;case"featured":{const t=o;t.type="featured-items",t.items=[...(null!==(a=e.Items)&&void 0!==a?a:[]).map(k),...(null!==(r=e.FeaturedItems)&&void 0!==r?r:[]).map(k)];break}case"image":{const n=o;n.image={url:this.getFullUrl(e[t+"ImageUrl"],null===(s=HawkSearch.config.urlPrefixes)||void 0===s?void 0:s.assets),height:e[t+"Height"]||void 0,width:e[t+"Width"]||void 0,altText:e[t+"AltTag"],title:e[t+"AltTag"]},n.link=e[t+"ForwardUrl"]?{url:e[t+"ForwardUrl"],target:e[t+"Target"]||"_self"}:void 0;break}case"widget":switch(e[t+"WidgetType"]){case"PopularSearchesWidget":{const n=o;n.type="popular-queries";const i=Math.min(...e[t+"Output"].map((e=>e.count))),a=Math.max(...e[t+"Output"].map((e=>e.count)))-i,r=5,s=new Array(r).fill(0);s.forEach(((e,t)=>{s[t]=t===r-1?0:Math.floor(a/(t+1))+i})),n.items=e[t+"Output"]instanceof Array?e[t+"Output"].map((e=>({query:e.keyword,count:e.count,weight:r-s.findIndex((t=>e.count>=t))}))).sort(((e,t)=>e.query.localeCompare(t.query))):[];break}default:{const t=o;t.type="custom-widget",t.data=e.AltTag}}}return o},_={content:{breadcrumbs:t.Breadcrumb||void 0,customHtml:t.CustomHtml||void 0,heading:t.PageHeading||void 0},contentZones:(()=>{var e,n,i;const a={};return null===(e=t.FeaturedItems)||void 0===e||e.Items.forEach((e=>{var t,n;const i=null!==(t=a[e.Zone])&&void 0!==t?t:{name:e.Zone},r={mobile:b(e,""),tablet:b(e,""),desktop:b(e,"")};i.items=[...null!==(n=i.items)&&void 0!==n?n:[],r],a[e.Zone]=i})),null===(n=t.Merchandising)||void 0===n||n.Items.forEach((e=>{var t,n;const i=null!==(t=a[e.Zone])&&void 0!==t?t:{name:e.Zone},r={mobile:b(e,"Mobile"),tablet:b(e,"Tablet"),desktop:b(e,"")};i.items=[...null!==(n=i.items)&&void 0!==n?n:[],r],a[e.Zone]=i})),null===(i=t.PageContent)||void 0===i||i.forEach((e=>{var t;const n=null!==(t=a[e.ZoneName])&&void 0!==t?t:{name:e.ZoneName};e.Items.forEach((e=>{var t;const i={mobile:b(e,"Mobile",n.name),tablet:b(e,"Tablet",n.name),desktop:b(e,"",n.name)};n.items=[...null!==(t=n.items)&&void 0!==t?t:[],i]})),a[e.ZoneName]=n})),a})(),customLayout:t.PageLayoutHtml||void 0,facets:null===(n=t.Facets)||void 0===n?void 0:n.map((n=>{var i,a,r;return{id:n.FacetId,type:c(n),title:n.Name,field:n.ParamName||n.Field,collapsible:null!==(i=n.IsCollapsible)&&void 0!==i&&i,collapsed:n.IsCollapsedDefault,displayCount:n.ShowItemsCount,range:h(n),scrolling:u(n),search:y(n),searchWithin:e.searchWithin,tooltip:this.stripHtml(null!==(a=n.Tooltip)&&void 0!==a?a:"")||void 0,truncation:m(n),values:f(n,n.Values,null===(r=t.Selections)||void 0===r?void 0:r[n.ParamName||n.Field]),visible:g(n)}})).filter((e=>"unsupported"!==e.type&&!(d.includes(e.type)&&!e.range))),modifiedQuery:t.AdjustedKeyword,pagination:t.Pagination?{page:t.Pagination.CurrentPage,pageSize:t.Pagination.MaxPerPage,totalPages:t.Pagination.NofPages,totalResults:t.Pagination.NofResults,maxPageLinks:t.Pagination.NumberOfPageLinks>0?t.Pagination.NumberOfPageLinks:void 0,displayFirstLink:t.Pagination.IsShowFirstLink,displayLastLink:t.Pagination.IsShowLastLink,options:null!==(i=t.Pagination.Items.map((e=>({title:e.Label,pageSize:e.PageSize,selected:e.Selected,default:e.Default}))))&&void 0!==i?i:[]}:void 0,query:t.Keyword,querySuggestions:t.DidYouMean,redirect:t.Redirect?{url:t.Redirect.Location,target:t.Redirect.Target}:void 0,results:null===(a=t.Results)||void 0===a?void 0:a.map(k),selectedFacets:(()=>{var e;return[...Object.keys(null!==(e=t.Selections)&&void 0!==e?e:[]).map((e=>{var n,i;const a=t.Selections[e],r=null===(n=t.Facets)||void 0===n?void 0:n.find((t=>(t.ParamName||t.Field)===e)),s=new RegExp("^"+this.facetExclusionPrefix);return{field:e,currency:null!==(i=null==r?void 0:r.IsCurrency)&&void 0!==i&&i,title:a.Label,values:a.Items.map((e=>({title:e.Label.replace(s,""),value:e.Value,excluded:s.test(e.Value)})))}})),...w()]})(),seo:{canonicalUrl:t.RelCanonical,description:t.MetaDescription,keywords:t.MetaKeywords,robots:t.MetaRobots,title:t.HeaderTitle},success:t.Success,sorting:{value:null===(r=t.Sorting)||void 0===r?void 0:r.Value,options:null!==(o=null===(s=t.Sorting)||void 0===s?void 0:s.Items.map((e=>({title:e.Label,value:e.Value,selected:e.Selected,default:e.IsDefault}))))&&void 0!==o?o:[]},trackingId:t.TrackingId},S=new URL(this.getSearchUrl(e));return _.seo||(_.seo={}),_.seo.canonicalUrl=((null===(l=_.seo.canonicalUrl)||void 0===l?void 0:l.replace(/\?.*$/,""))||S.origin+S.pathname)+S.search,_}bindComponents(e){this.bindLandingPageComponent(e),this.bindSearchResultsComponent(e),setTimeout((()=>{this.bindFacetsListComponent(e),this.bindModifiedQueryComponent(e),this.bindPageSizeComponent(e),this.bindPaginationComponent(e),this.bindQuerySuggestionsComponent(e),this.bindSearchFieldComponent(e),this.bindSearchResultsListComponent(e),this.bindSelectedFacetsComponent(e),this.bindSortingComponent(e),this.bindTabsComponent(e),this.bindZoneComponent(e)}))}bindFacetsListComponent(e){this.triggerBindEvent("facets-list",null==e?void 0:e.facets)}bindLandingPageComponent(e){this.triggerBindEvent("landing-page",e)}bindModifiedQueryComponent(e){const t={display:!!(null==e?void 0:e.query)&&!!(null==e?void 0:e.modifiedQuery)&&HawkSearch.searchRequest.newRequest,query:null==e?void 0:e.query,modifiedQuery:null==e?void 0:e.modifiedQuery};this.triggerBindEvent("modified-query",t)}bindPageSizeComponent(e){var t;this.triggerBindEvent("page-size",null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.options)}bindPaginationComponent(e){this.triggerBindEvent("pagination",null==e?void 0:e.pagination)}bindSearchFieldComponent(e){this.triggerBindEvent("search-field",e)}bindSearchResultsComponent(e){this.triggerBindEvent("search-results",e)}bindSearchResultsListComponent(e){this.triggerBindEvent("search-results-list",null==e?void 0:e.results)}bindQuerySuggestionsComponent(e){var t;const n={display:!!(null===(t=null==e?void 0:e.querySuggestions)||void 0===t?void 0:t.length)&&HawkSearch.searchRequest.newRequest,querySuggestions:null==e?void 0:e.querySuggestions};this.triggerBindEvent("query-suggestions",n)}bindSortingComponent(e){this.triggerBindEvent("sorting",null==e?void 0:e.sorting)}bindSelectedFacetsComponent(e){this.triggerBindEvent("selected-facets",null==e?void 0:e.selectedFacets)}bindTabsComponent(e){var t;this.triggerBindEvent("tabs",null===(t=null==e?void 0:e.facets)||void 0===t?void 0:t.find((e=>"tabs"===e.type)))}bindZoneComponent(e){this.triggerBindEvent("content-zone",e)}getRequestFromUrl(){const e=new URL(window.location.href),t=Object.keys(this.queryStringParams),n={};for(const i of Array.from(e.searchParams.keys()).filter((e=>!t.includes(e))))n[i]=e.searchParams.getAll(i);return{disableSpellcheck:this.getBooleanParameter(e.searchParams.get(this.queryStringParams.disableSpellcheck)),facets:n,newRequest:!0,pageSize:this.getPositiveIntegerParameter(e.searchParams.get(this.queryStringParams.pageSize)),page:this.getPositiveIntegerParameter(e.searchParams.get(this.queryStringParams.page)),query:this.getStringParameter(e.searchParams.get(this.queryStringParams.query)),searchWithin:this.getStringParameter(e.searchParams.get(this.queryStringParams.searchWithin)),sort:this.getStringParameter(e.searchParams.get(this.queryStringParams.sort))}}setQueryString(e){if(!HawkSearch.searchRequest)return;const t=this.getSearchUrl(HawkSearch.searchRequest),n={searchRequest:HawkSearch.searchRequest,searchResponse:e};t.toString()===window.location.href?window.history.replaceState(n,""):window.history.pushState(n,"",t.toString())}getSearchUrl(e){const t=window.location.pathname===this.searchUrl||!!e.url,n=new URL(t?window.location.href:this.searchUrl,window.location.origin),i=Object.keys(this.queryStringParams);return n.searchParams.delete(this.queryStringParams.query),e.query&&n.searchParams.set(this.queryStringParams.query,e.query),Array.from(n.searchParams.keys()).filter((e=>!i.includes(e))).forEach((e=>n.searchParams.delete(e))),e.disableSpellcheck&&n.searchParams.set(this.queryStringParams.disableSpellcheck,e.disableSpellcheck.toString()),e.facets&&Object.keys(e.facets).sort(((e,t)=>e>t?1:-1)).forEach((t=>{const i=e.facets[t];null==i||i.forEach((e=>n.searchParams.append(t,e)))})),n.searchParams.delete(this.queryStringParams.searchWithin),e.searchWithin&&n.searchParams.set(this.queryStringParams.searchWithin,e.searchWithin),n.searchParams.delete(this.queryStringParams.sort),e.sort&&n.searchParams.set(this.queryStringParams.sort,e.sort),n.searchParams.delete(this.queryStringParams.pageSize),e.pageSize&&n.searchParams.set(this.queryStringParams.pageSize,e.pageSize.toString()),n.searchParams.delete(this.queryStringParams.page),e.page&&n.searchParams.set(this.queryStringParams.page,e.page.toString()),n.toString()}getBooleanParameter(e){if(null!==e)return"true"===e}getPositiveIntegerParameter(e){if(!e)return;const t=parseInt(e);return t>0?t:void 0}getStringParameter(e){if(e&&e.trim())return e.trim()}getRecentQueries(){const e=sessionStorage.getItem("recent-queries");return e?JSON.parse(e):[]}saveRecentQueries(e){const t=JSON.stringify(e);sessionStorage.setItem("recent-queries",t)}setSeoElements(e){var t,n,i,a;if(!(null==e?void 0:e.seo))return;let r=e.seo.title;r&&(null===(n=null===(t=HawkSearch.config.seo)||void 0===t?void 0:t.title)||void 0===n?void 0:n.prefix)&&(r=`${HawkSearch.config.seo.title.prefix}${r}`),r&&(null===(a=null===(i=HawkSearch.config.seo)||void 0===i?void 0:i.title)||void 0===a?void 0:a.suffix)&&(r=`${r}${HawkSearch.config.seo.title.suffix}`),this.setTitle(r),this.setLinkTag("canonical",e.seo.canonicalUrl),this.setMetaTag("description",e.seo.description),this.setMetaTag("keywords",e.seo.keywords),this.setMetaTag("robots",e.seo.robots)}removeElement(e){const t=document.head.querySelector(e);t&&t.remove()}setLinkTag(e,t){if(!t)return;this.removeElement(`link[rel="${e}"]`);const n=document.createElement("link");n.rel=e,n.href=t,document.head.append(n)}setMetaTag(e,t){if(!t)return;this.removeElement(`meta[name="${e}"]`);const n=document.createElement("meta");n.name=e,n.content=t,document.head.append(n)}setTitle(e){e&&(document.title=e)}},Cn=function(){return r.Date.now()};var Hn=/\s/;var In=/^\s+/;const Mn=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Hn.test(e.charAt(t)););return t}(e)+1).replace(In,""):e};var qn=/^[-+]0x[0-9a-f]+$/i,Ln=/^0b[01]+$/i,Rn=/^0o[0-7]+$/i,An=parseInt;const Dn=function(e){if("number"==typeof e)return e;if(f(e))return NaN;if(k(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=k(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Mn(e);var n=Ln.test(e);return n||Rn.test(e)?An(e.slice(2),n?2:8):qn.test(e)?NaN:+e};var On=Math.max,Fn=Math.min;const Nn=function(e,t,n){var i,a,r,s,o,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,r=a;return i=a=void 0,c=t,s=e.apply(r,n)}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=r}function f(){var e=Cn();if(v(e))return g(e);o=setTimeout(f,function(e){var n=t-(e-l);return d?Fn(n,r-(e-c)):n}(e))}function g(e){return o=void 0,h&&i?p(e):(i=a=void 0,s)}function m(){var e=Cn(),n=v(e);if(i=arguments,a=this,l=e,n){if(void 0===o)return function(e){return c=e,o=setTimeout(f,t),u?p(e):s}(l);if(d)return clearTimeout(o),o=setTimeout(f,t),p(l)}return void 0===o&&(o=setTimeout(f,t)),s}return t=Dn(t)||0,k(n)&&(u=!!n.leading,r=(d="maxWait"in n)?On(Dn(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,i=l=a=o=void 0},m.flush=function(){return void 0===o?s:g(Cn())},m};function Tn(e,t){return e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e.getTime()===t.getTime()}function jn(e){var t;const n=(null===(t=HawkSearch.config.formatting)||void 0===t?void 0:t.cultureIsoCode)||"en-US";return e.toLocaleDateString(n,{month:"long"})}function Vn(){var e;const t=(null===(e=HawkSearch.config.formatting)||void 0===e?void 0:e.cultureIsoCode)||"en-US",n=(new Date).getFullYear(),i=[];for(let e=0;e<12;e++){const a=new Date(n,e,1).toLocaleDateString(t,{month:"long"});i.push(a)}return i}function Un(e,t=2){var n,i,a;const r=(null===(n=HawkSearch.config.formatting)||void 0===n?void 0:n.cultureIsoCode)||"en-US",s=(null===(a=null===(i=HawkSearch.config.formatting)||void 0===i?void 0:i.currencyIsoCode)||void 0===a?void 0:a.toUpperCase())||"USD";return e.toLocaleString(r,{style:"currency",currency:s,minimumFractionDigits:t,maximumFractionDigits:t})}function $n(e){return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}function Bn(e){var t;const n=(null===(t=HawkSearch.config.formatting)||void 0===t?void 0:t.cultureIsoCode)||"en-US";return e.toLocaleString(n,{year:"numeric",month:"short",day:"2-digit"})}function zn(e,t=2){var n;const i=(null===(n=HawkSearch.config.formatting)||void 0===n?void 0:n.cultureIsoCode)||"en-US";return e.toLocaleString(i,{style:"decimal",minimumFractionDigits:t,maximumFractionDigits:t})}class Wn extends et{constructor(){super(...arguments),this.bindFromEvent=!1}onRender(){super.onRender(),this.rootElement.querySelectorAll("input[hawksearch-facet-value]").forEach((e=>{e.addEventListener("change",(e=>{e.stopPropagation();const t=e.currentTarget,n=this.data.field,i=t.value;t.checked?Pn.addFacetValue(n,i):Pn.removeFacetValue(n,i)}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value]:not(input)").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault(),e.stopPropagation();const n=e.currentTarget.getAttribute("hawksearch-facet-value"),i=null===(t=this.data.values)||void 0===t?void 0:t.find((e=>e.value===n));i&&(i.selected?Pn.removeFacetValue(this.data.field,n):Pn.addFacetValue(this.data.field,n))}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value-include]").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,i=this.data.field;let a=n.getAttribute("hawksearch-facet-value-include");a&&(a=`${(null===(t=HawkSearch.config.search)||void 0===t?void 0:t.facetExclusionPrefix)||"-"}${a}`,Pn.removeFacetValue(i,a))}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value-exclude]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.currentTarget,n=this.data.field,i=t.getAttribute("hawksearch-facet-value-exclude");i&&Pn.excludeFacetValue(n,i)}))})),this.rootElement.querySelectorAll("[hawksearch-facet-value-toggle]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=e.currentTarget.getAttribute("hawksearch-facet-value-toggle");t&&(this.state.values[t].toggled=!this.state.values[t].toggled,this.render())}))})),this.rootElement.querySelectorAll("[hawksearch-facet-toggle]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),this.state.toggled=!this.state.toggled,this.render()}))}))}}var Qn=/[\\^$.*+?()[\]{}|]/g,Zn=RegExp(Qn.source);var Kn=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function o(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((i=i.apply(e,t||[])).next())}))};HawkSearch||(HawkSearch={}),HawkSearch.handlebars=e.noConflict(),HawkSearch.handlebars.registerHelper("add",(function(e,t){return e+t})),HawkSearch.handlebars.registerHelper("and",(function(...e){return e.slice(0,-1).every((e=>!!e))})),HawkSearch.handlebars.registerHelper("arrayFilterObjects",(function(e,t,n){if(e)return"object"==typeof n&&(n=void 0),e.filter((e=>{const i=re(e,t);return n?i==n:!!i}))})),HawkSearch.handlebars.registerHelper("arrayHasObjectsWithValue",(function(e,t,n){return!!e&&("object"==typeof n&&(n=void 0),e.some((e=>{const i=re(e,t);return n?i==n:!!i})))})),HawkSearch.handlebars.registerHelper("attribute",(function(e,t){return new HawkSearch.handlebars.SafeString(t?e:"")})),HawkSearch.handlebars.registerHelper("concat",(function(...e){return e.length<2?"":e.slice(0,-1).join("")})),HawkSearch.handlebars.registerHelper("currency",(function(e,t,n){var i;return"object"==typeof t&&(t=void 0),"object"==typeof n&&(n=void 0),e instanceof Array&&(e=e[0]),"string"==typeof e&&(e=parseFloat(e)),Un(null!==(i=null!=e?e:n)&&void 0!==i?i:0,t)})),HawkSearch.handlebars.registerHelper("decode",(function(e){return decodeURI(e)})),HawkSearch.handlebars.registerHelper("decodeNested",(function(e){return ft(e)})),HawkSearch.handlebars.registerHelper("eq",(function(e,t){return e===t})),HawkSearch.handlebars.registerHelper("exclude",(function(e){return e.fn()})),HawkSearch.handlebars.registerHelper("html",(function(e){return new HawkSearch.handlebars.SafeString(e)})),HawkSearch.handlebars.registerHelper("number",(function(e,t,n){var i;return"object"==typeof t&&(t=void 0),"object"==typeof n&&(n=void 0),e instanceof Array&&(e=e[0]),"string"==typeof e&&(e=parseFloat(e)),zn(null!==(i=null!=e?e:n)&&void 0!==i?i:0,t)})),HawkSearch.handlebars.registerHelper("if-else",(function(e,t,n){return e?t:n})),HawkSearch.handlebars.registerHelper("lt",(function(e,t){return e<t})),HawkSearch.handlebars.registerHelper("lte",(function(e,t){return e<=t})),HawkSearch.handlebars.registerHelper("gt",(function(e,t){return e>t})),HawkSearch.handlebars.registerHelper("gte",(function(e,t){return e>=t})),HawkSearch.handlebars.registerHelper("or",(function(...e){return e.slice(0,-1).some((e=>!!e))})),HawkSearch.handlebars.registerHelper("string",(function(e,t){return"object"==typeof t&&(t=void 0),e instanceof Array&&(e=e[0]),null!=e?e:t})),HawkSearch.handlebars.registerHelper("subtract",(function(e,t){return e-t})),HawkSearch.services={autocomplete:mt,recommendations:kt,search:Pn,tracking:En};const Yn={autocomplete:class extends et{constructor(){super(...arguments),this.bindFromEvent=!0,this.componentName="autocomplete",this.defaultHtml='<div class="autocomplete">\n <div class="row">\n {{#if products.results.length}}\n <div class="column column--12 column-md--8">\n <span class="autocomplete__title autocomplete__title--products">{{products.title}}</span>\n <div class="row autocomplete__products">\n {{#each products.results}}\n <div class="column column--12 column-sm--4">\n <div class="autocomplete__product">\n <a hawksearch-product="{{id}}" href="{{url}}" class="autocomplete__product__image">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <span class="autocomplete__product__title">\n <a hawksearch-product="{{id}}" href="{{url}}">{{html title}}</a>\n </span>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="autocomplete__product__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="autocomplete__product__price__original">{{currency price}}</span>\n <span class="autocomplete__product__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="autocomplete__product__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n </div>\n </div>\n {{/each}}\n </div>\n </div>\n {{/if}}\n {{#if (or categories.results.length content.results.length queries.results.length)}}\n <div class="column column--12 column-md--4">\n {{#if productSuggestedQueries.results.length}}\n <span class="autocomplete__title autocomplete__title--queries">{{productSuggestedQueries.title}}</span>\n <ul class="autocomplete__list">\n {{#each productSuggestedQueries.results}}\n <li>\n <a hawksearch-query="{{query}}" href="{{url}}">{{query}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if contentSuggestedQueries.results.length}}\n <span class="autocomplete__title autocomplete__title--queries">{{contentSuggestedQueries.title}}</span>\n <ul class="autocomplete__list">\n {{#each contentSuggestedQueries.results}}\n <li>\n <a hawksearch-query="{{query}}" href="{{url}}">{{query}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if categories.results.length}}\n <span class="autocomplete__title autocomplete__title--categories">{{categories.title}}</span>\n <ul class="autocomplete__list">\n {{#each categories.results}}\n <li>\n <a hawksearch-category-field="{{field}}" hawksearch-category-value="{{value}}" href="{{url}}">{{html title}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if content.results.length}}\n <span class="autocomplete__title autocomplete__title--content">{{content.title}}</span>\n <ul class="autocomplete__list">\n {{#each content.results}}\n <li>\n <a hawksearch-content="{{id}}" href="{{url}}">{{html title}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n {{#if queries.results.length}}\n <span class="autocomplete__title autocomplete__title--queries">{{queries.title}}</span>\n <ul class="autocomplete__list">\n {{#each queries.results}}\n <li>\n <a hawksearch-query="{{query}}" href="{{url}}">{{query}}</a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n </div>\n {{/if}}\n </div>\n <div class="autocomplete__view-all">\n <a hawksearch-view-all>{{viewAllText}}</a>\n </div>\n</div>'}renderContent(){var e,t,n,i,a,r;return!(!this.data||!(null===(t=null===(e=this.data.categories)||void 0===e?void 0:e.results)||void 0===t?void 0:t.length)&&!(null===(i=null===(n=this.data.content)||void 0===n?void 0:n.results)||void 0===i?void 0:i.length)&&!(null===(r=null===(a=this.data.products)||void 0===a?void 0:a.results)||void 0===r?void 0:r.length))}getContentModel(){return Object.assign(Object.assign({},this.data),{products:Object.assign(Object.assign({},this.data.products),{results:this.data.products.results.map((e=>{var t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g;return Object.assign(Object.assign({},e),{description:null!==(n=null===(t=e.selectedVariant)||void 0===t?void 0:t.description)&&void 0!==n?n:e.description,imageUrl:null!==(a=null===(i=e.selectedVariant)||void 0===i?void 0:i.imageUrl)&&void 0!==a?a:e.imageUrl,price:null!==(s=null===(r=e.selectedVariant)||void 0===r?void 0:r.price)&&void 0!==s?s:e.price,rating:null!==(l=null===(o=e.selectedVariant)||void 0===o?void 0:o.rating)&&void 0!==l?l:e.rating,salePrice:null!==(u=null===(c=e.selectedVariant)||void 0===c?void 0:c.salePrice)&&void 0!==u?u:e.salePrice,sku:null!==(h=null===(d=e.selectedVariant)||void 0===d?void 0:d.sku)&&void 0!==h?h:e.sku,title:null!==(v=null===(p=e.selectedVariant)||void 0===p?void 0:p.title)&&void 0!==v?v:e.title,url:null!==(g=null===(f=e.selectedVariant)||void 0===f?void 0:f.url)&&void 0!==g?g:e.url})}))}),AutocompleteItemType:wn})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-category-field][hawksearch-category-value]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;e.preventDefault();const i=e.currentTarget,a=i.getAttribute("hawksearch-category-field"),r=i.getAttribute("hawksearch-category-value"),s=null===(n=null===(t=this.data.categories)||void 0===t?void 0:t.results)||void 0===n?void 0:n.find((e=>e.field===a&&e.value===r));if(!s)return;En.trackAutocompleteClick(this.data.query,wn.Category,s.title,s.url);const o={[s.field]:[s.value]};Pn.query(void 0,o),this.close()}))})),this.rootElement.querySelectorAll("[hawksearch-content]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;const i=e.currentTarget.getAttribute("hawksearch-content"),a=null===(n=null===(t=this.data.content)||void 0===t?void 0:t.results)||void 0===n?void 0:n.find((e=>e.id===i));a&&En.trackAutocompleteClick(this.data.query,wn.Content,a.title,a.url)}))})),this.rootElement.querySelectorAll("[hawksearch-product]").forEach((e=>{e.addEventListener("click",(e=>{var t,n,i,a,r,s,o,l;const c=e.currentTarget.getAttribute("hawksearch-product"),u=null===(n=null===(t=this.data.products)||void 0===t?void 0:t.results)||void 0===n?void 0:n.find((e=>e.id===c));if(!u)return;const d=null!==(r=(null===(i=HawkSearch.config.variants)||void 0===i?void 0:i.trackUsingVariant)?null===(a=u.selectedVariant)||void 0===a?void 0:a.title:void 0)&&void 0!==r?r:u.title,h=null!==(l=(null===(s=HawkSearch.config.variants)||void 0===s?void 0:s.trackUsingVariant)?null===(o=u.selectedVariant)||void 0===o?void 0:o.url:void 0)&&void 0!==l?l:u.url;En.trackAutocompleteClick(this.data.query,wn.Product,d,h)}))})),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault();const n=e.currentTarget.getAttribute("hawksearch-query");if(!n)return;const i=null===(t=this.data.queries)||void 0===t?void 0:t.results.find((e=>e.query===n));i&&En.trackAutocompleteClick(this.data.query,wn.Search,i.query,i.url),Pn.query(n)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach(((e,t)=>{var n,i,a;const r=null===(a=null===(i=null===(n=this.data)||void 0===n?void 0:n.products)||void 0===i?void 0:i.results)||void 0===a?void 0:a[t];(null==r?void 0:r.variants)&&(e.data={items:r.variants,selectedItem:r.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;r.selectedVariant=t,this.render()})))})),this.rootElement.querySelectorAll("[hawksearch-view-all]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),Pn.query(this.data.query)}))}))}close(){const e=new Event("hawksearch:close-autocomplete");this.dispatchEvent(e)}},"checkbox-list-facet":class extends Wn{constructor(){super(...arguments),this.componentName="checkbox-list-facet",this.defaultHtml='<div class="checkbox-list-facet" {{attribute (concat \'style="max-height: \' maxHeight \'px;"\') maxHeight}}>\n {{> facet-checkbox-list values}}\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle">{{strings.toggle}}</span>\n {{/if}}\n</div>'}registerHelpers(){super.registerHelpers(),this.handlebars.registerPartial("facet-checkbox-list",'{{#if length}}\n <ul class="checkbox-list-facet__list">\n {{#each this}}\n {{#if visible}}\n <li\n class="checkbox-list-facet__list__item{{attribute \' checkbox-list-facet__list__item--excluded\' excluded}}{{attribute\n \' checkbox-list-facet__list__item--collapsible\'\n hasChildren\n }}"\n >\n <div class="checkbox-list-facet__list__item__content">\n {{#if selected}}\n <input id="{{@root.id}}-{{value}}" type="checkbox" checked hawksearch-facet-value value="{{value}}" />\n {{else}}\n <input id="{{@root.id}}-{{value}}" type="checkbox" hawksearch-facet-value value="{{value}}" />\n {{/if}}\n <label for="{{@root.id}}-{{value}}" class="facet__value">\n <span class="facet__value__title checkbox-list-facet__list__item__title">{{title}}</span>\n {{#if @root.displayCount}}\n <span class="facet__value__count checkbox-list-facet__list__item__count">({{count}})</span>\n {{/if}}\n </label>\n {{#if toggled}}\n {{> facet-checkbox-list children}}\n {{/if}}\n </div>\n {{#if (or @root.excludeEnabled hasChildren)}}\n <div class="checkbox-list-facet__list__item__actions">\n {{#if @root.excludeEnabled}}\n {{#if excluded}}\n <span hawksearch-facet-value-include="{{value}}" class="checkbox-list-facet__list__item__actions__item" title="{{@root.strings.include}}">\n <hawksearch-icon name="plus" class="facet__heading__actions__item"></hawksearch-icon>\n </span>\n {{else}}\n <span hawksearch-facet-value-exclude="{{value}}" class="checkbox-list-facet__list__item__actions__item" title="{{@root.strings.exclude}}">\n <hawksearch-icon name="minus" class="facet__heading__actions__item"></hawksearch-icon>\n </span>\n {{/if}}\n {{/if}}\n {{#if hasChildren}}\n <span hawksearch-facet-value-toggle="{{value}}" class="checkbox-list-facet__list__item__actions__item" title="{{if-else toggled @root.strings.collapse @root.strings.expand}}">\n <hawksearch-icon name="{{if-else toggled \'chevron-down\' \'chevron-right\'}}" class="facet__heading__toggle"></hawksearch-icon>\n </span>\n {{/if}}\n </div>\n {{/if}}\n </li>\n {{/if}}\n {{/each}}\n </ul>\n{{/if}}')}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k,y,w,b,_,S,E,x;const P=this.state.filter?new RegExp((H=this.state.filter,(C=ne(C=H))&&Zn.test(C)?C.replace(Qn,"\\$&"):C),"i"):void 0;var C,H;const I=e=>!!P&&P.test(e.title),M=e=>{var t;return(null===(t=e.children)||void 0===t?void 0:t.some((e=>I(e))))||!1},q=(e,t)=>null==e?void 0:e.map(((e,n)=>{var i,a,r,s,o;const l=Object.assign(Object.assign({},e),{visible:!t&&!P&&(this.state.toggled||!this.data.truncation||n<this.data.truncation.threshold)||I(e)||M(e)||!P&&!!(null==t?void 0:t.toggled),hasChildren:!!(null===(i=e.children)||void 0===i?void 0:i.length),children:void 0,toggled:!(!e.value||!(null===(a=e.children)||void 0===a?void 0:a.length))&&null!==(o=null===(s=null===(r=this.state.values)||void 0===r?void 0:r[e.value])||void 0===s?void 0:s.toggled)&&void 0!==o&&o||M(e)});return l.children=q(e.children,l),l}));return{displayCount:null===(e=this.data.displayCount)||void 0===e||e,expanded:null!==(t=this.state.toggled)&&void 0!==t&&t,maxHeight:this.data.scrolling&&this.data.values.length>=this.data.scrolling.threshold?null!==(n=this.data.scrolling.height)&&void 0!==n?n:200:void 0,showToggle:!!this.data.truncation&&(null!==(a=null===(i=this.data.values)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>this.data.truncation.threshold&&!this.state.filter,values:null!==(r=q(this.data.values,void 0))&&void 0!==r?r:[],excludeEnabled:null!==(o=null===(s=this.configuration)||void 0===s?void 0:s.excludeEnabled)&&void 0!==o&&o,strings:{collapse:null!==(u=null===(c=null===(l=this.configuration)||void 0===l?void 0:l.strings)||void 0===c?void 0:c.collapse)&&void 0!==u?u:"Collapse",exclude:null!==(p=null===(h=null===(d=this.configuration)||void 0===d?void 0:d.strings)||void 0===h?void 0:h.exclude)&&void 0!==p?p:"Exclude",expand:null!==(g=null===(f=null===(v=this.configuration)||void 0===v?void 0:v.strings)||void 0===f?void 0:f.expand)&&void 0!==g?g:"Expand",include:null!==(y=null===(k=null===(m=this.configuration)||void 0===m?void 0:m.strings)||void 0===k?void 0:k.include)&&void 0!==y?y:"Include",toggle:this.state.toggled?null!==(_=null===(b=null===(w=this.configuration)||void 0===w?void 0:w.strings)||void 0===b?void 0:b.showFewer)&&void 0!==_?_:"Show fewer":null!==(x=null===(E=null===(S=this.configuration)||void 0===S?void 0:S.strings)||void 0===E?void 0:E.showMore)&&void 0!==x?x:"Show more"}}}},"color-facet":class extends Wn{constructor(){super(...arguments),this.componentName="color-facet",this.defaultHtml='<div class="color-facet">\n <div class="row row--tight color-facet__items">\n {{#each values}}\n {{#if visible}}\n <div hawksearch-facet-value="{{value}}" class="column column--2 color-facet__item{{attribute \' color-facet__item--selected\' selected}}">\n {{#if color.imageUrl}}\n <img src="{{color.imageUrl}}" class="color-facet__item__image" alt="{{color.name}}" title="{{color.name}}" />\n {{else}}\n <div class="color-facet__item__box" style="background: {{color.hex}};"></div>\n {{/if}}\n {{#if @root.excludeEnabled}}\n <span class="color-facet__item__actions">\n {{#if excluded}}\n <span hawksearch-facet-value-include="{{value}}" class="color-facet__item__actions__item" title="{{strings.include}}">\n <hawksearch-icon name="plus"></hawksearch-icon>\n </span>\n {{else}}\n <span hawksearch-facet-value-exclude="{{value}}" class="color-facet__item__actions__item" title="{{strings.exclude}}">\n <hawksearch-icon name="minus"></hawksearch-icon>\n </span>\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{/each}}\n </div>\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle">{{strings.toggle}}</span>\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;const y=this.state.filter?new RegExp(this.state.filter,"i"):void 0;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.filter((e=>e.color)).map(((e,t)=>{var n;return Object.assign(Object.assign({},e),{visible:!y&&(this.state.toggled||!this.data.truncation||t<this.data.truncation.threshold)||!!y&&y.test(null!==(n=e.title)&&void 0!==n?n:"")})})))&&void 0!==t?t:[],showToggle:!!this.data.truncation&&(null!==(i=null===(n=this.data.values)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>this.data.truncation.threshold&&!this.state.filter,expanded:null!==(a=this.state.toggled)&&void 0!==a&&a,excludeEnabled:null!==(s=null===(r=this.configuration)||void 0===r?void 0:r.excludeEnabled)&&void 0!==s&&s,strings:{exclude:null!==(c=null===(l=null===(o=this.configuration)||void 0===o?void 0:o.strings)||void 0===l?void 0:l.exclude)&&void 0!==c?c:"Exclude",include:null!==(h=null===(d=null===(u=this.configuration)||void 0===u?void 0:u.strings)||void 0===d?void 0:d.include)&&void 0!==h?h:"Include",toggle:this.state.toggled?null!==(f=null===(v=null===(p=this.configuration)||void 0===p?void 0:p.strings)||void 0===v?void 0:v.showFewer)&&void 0!==f?f:"Show fewer":null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.showMore)&&void 0!==k?k:"Show more"}}}},"content-zone":class extends et{constructor(){super(...arguments),this.componentName="content-zone",this.defaultHtml='<div class="content-zone">\n {{#each items}}\n {{#if (eq type "custom")}}\n <hawksearch-custom-content index="{{@index}}"></hawksearch-custom-content>\n {{/if}}\n {{#if (eq type "featured-items")}}\n <hawksearch-featured-items-content index="{{@index}}"></hawksearch-featured-items-content>\n {{/if}}\n {{#if (eq type "image")}}\n <hawksearch-image-content index="{{@index}}"></hawksearch-image-content>\n {{/if}}\n {{#if (eq type "popular-queries")}}\n <hawksearch-popular-queries-content index="{{@index}}"></hawksearch-popular-queries-content>\n {{/if}}\n {{/each}}\n</div>',this.bindFromEvent=!0}get name(){return this.getAttribute("name")||void 0}get zone(){var e,t;return this.name?null===(t=null===(e=this.data)||void 0===e?void 0:e.contentZones)||void 0===t?void 0:t[this.name]:void 0}get displayType(){var e,t,n,i;const a=window.innerWidth;return a>=(null!==(t=null===(e=HawkSearch.config.breakpoints)||void 0===e?void 0:e.desktop)&&void 0!==t?t:990)?"desktop":a>=(null!==(i=null===(n=HawkSearch.config.breakpoints)||void 0===n?void 0:n.tablet)&&void 0!==i?i:740)?"tablet":"mobile"}connectedCallback(){super.connectedCallback(),this.windowResizeEventHandler=Nn((e=>{this.displayType!==this.previousDisplayType&&this.render()}),100),window.addEventListener("resize",this.windowResizeEventHandler)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.windowResizeEventHandler)}renderContent(){var e,t;return!!(null===(t=null===(e=this.zone)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return this.previousDisplayType=this.displayType,Object.assign(Object.assign({},this.zone),{items:null!==(t=null===(e=this.zone)||void 0===e?void 0:e.items.map((e=>e[this.displayType])))&&void 0!==t?t:[]})}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("[index]").forEach((e=>{var t,n,i;const a=e,r=parseInt(a.getAttribute("index")||"-1");isNaN(r)||r<0||r>=((null===(t=this.zone)||void 0===t?void 0:t.items.length)||-1)||(a.data=null===(i=null===(n=this.zone)||void 0===n?void 0:n.items[r])||void 0===i?void 0:i[this.displayType])}))}},"custom-content":class extends tt{constructor(){super(...arguments),this.componentName="custom-content",this.defaultHtml='<div class="custom-content">\n {{html content}}\n</div>'}renderContent(){return!!this.data}getContentModel(){return Object.assign({},this.data)}},"date-picker":class extends et{constructor(){super(...arguments),this.componentName="date-picker",this.defaultHtml='<div class="date-picker">\n <input type="text" value="{{value}}" hawksearch-input readonly class="date-picker__input" aria-label="{{strings.label}}" />\n {{#if modalVisible}}\n <div hawksearch-modal class="date-picker__modal">\n {{#if monthSelectorVisible}}\n <div class="date-picker__modal__header">\n <span class="date-picker__modal__header__month">{{strings.selectMonth}}</span>\n </div>\n <div class="row">\n <div class="column column--12">\n <select hawksearch-month>\n {{#each months}}\n {{#if (eq this @root.currentMonth)}}\n <option value="{{@index}}" selected>{{this}}</option>\n {{else}}\n <option value="{{@index}}">{{this}}</option>\n {{/if}}\n {{/each}}\n </select>\n </div>\n <div class="column column--12">\n <select hawksearch-year>\n {{#each years}}\n {{#if (eq this @root.currentYear)}}\n <option value="{{this}}" selected>{{this}}</option>\n {{else}}\n <option value="{{this}}">{{this}}</option>\n {{/if}}\n {{/each}}\n </select>\n </div>\n <div class="column column--12">\n <button hawksearch-select-month class="button button--full-width">{{strings.viewCalendar}}</button>\n </div>\n </div>\n {{else}}\n <div class="date-picker__modal__header">\n <a hawksearch-previous class="date-picker__modal__header__previous" title="{{strings.previous}}">\n <hawksearch-icon name="chevron-left"></hawksearch-icon>\n </a>\n <a hawksearch-month-selector class="date-picker__modal__header__month">{{strings.heading}}</a>\n <a hawksearch-next class="date-picker__modal__header__next" title="{{strings.next}}">\n <hawksearch-icon name="chevron-right"></hawksearch-icon>\n </a>\n </div>\n <table class="date-picker__calendar" cellspacing="0" cellpadding="0">\n <thead>\n <tr>\n <th scope="col">{{dayAbbreviation 0}}</th>\n <th scope="col">{{dayAbbreviation 1}}</th>\n <th scope="col">{{dayAbbreviation 2}}</th>\n <th scope="col">{{dayAbbreviation 3}}</th>\n <th scope="col">{{dayAbbreviation 4}}</th>\n <th scope="col">{{dayAbbreviation 5}}</th>\n <th scope="col">{{dayAbbreviation 6}}</th>\n </tr>\n </thead>\n <tbody>\n {{#each weeks}}\n <tr>\n {{#each this}}\n <td\n hawksearch-date="{{value}}"\n class="date-picker__calendar__day\n {{attribute \' date-picker__calendar__day--alternate\' (eq currentMonth false)}}\n {{attribute \' date-picker__calendar__day--selected\' selected}}\n {{attribute \' date-picker__calendar__day--disabled\' (eq enabled false)}}"\n >\n <span>{{dayOfMonth date}}</span>\n </td>\n {{/each}}\n </tr>\n {{/each}}\n </tbody>\n </table>\n {{/if}}\n </div>\n {{/if}}\n</div>',this.bindFromEvent=!1,this.modalVisible=!1,this.modalDate=new Date,this.monthSelectorVisible=!1}static get observedAttributes(){return["label","max","min","value"]}connectedCallback(){super.connectedCallback(),this.documentClickEventHandler=e=>{this.modalVisible&&!e.composedPath().includes(this)&&(this.modalVisible=!1,setTimeout((()=>this.render())))},document.addEventListener("click",this.documentClickEventHandler),this.windowResizeEventHandler=Nn((e=>{this.positionModal()}),100),window.addEventListener("resize",this.windowResizeEventHandler)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.documentClickEventHandler),window.addEventListener("resize",this.windowResizeEventHandler)}attributeChangedCallback(e,t,n){if("label"===e)this.label=n||void 0;else{const t=n?new Date(n):void 0;switch(t&&t.setHours(0,0,0,0),e){case"max":this.maxDate=t;break;case"min":this.minDate=t;break;case"value":this.selectedDate=t}}this.render()}registerHelpers(){super.registerHelpers(),this.handlebars.registerHelper("dayAbbreviation",(e=>function(e){var t;const n=(null===(t=HawkSearch.config.formatting)||void 0===t?void 0:t.cultureIsoCode)||"en-US";return new Date(2023,0,e+1).toLocaleDateString(n,{weekday:"short"})}(e))),this.handlebars.registerHelper("dayOfMonth",(e=>e.getDate().toString().padStart(2,"0")))}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f;return{value:this.selectedDate?$n(this.selectedDate):"",modalVisible:this.modalVisible,monthSelectorVisible:this.monthSelectorVisible,years:this.getYears(),months:Vn(),weeks:this.getWeeks(this.modalDate),currentYear:this.modalDate.getFullYear(),currentMonth:jn(this.modalDate),strings:{heading:`${jn(this.modalDate)} ${this.modalDate.getFullYear()}`,label:null!==(i=null!==(e=this.label)&&void 0!==e?e:null===(n=null===(t=this.configuration)||void 0===t?void 0:t.strings)||void 0===n?void 0:n.defaultLabel)&&void 0!==i?i:"Selected Date",next:null!==(s=null===(r=null===(a=this.configuration)||void 0===a?void 0:a.strings)||void 0===r?void 0:r.next)&&void 0!==s?s:"Next",previous:null!==(c=null===(l=null===(o=this.configuration)||void 0===o?void 0:o.strings)||void 0===l?void 0:l.previous)&&void 0!==c?c:"Previous",selectMonth:null!==(h=null===(d=null===(u=this.configuration)||void 0===u?void 0:u.strings)||void 0===d?void 0:d.selectMonth)&&void 0!==h?h:"Select Month",viewCalendar:null!==(f=null===(v=null===(p=this.configuration)||void 0===p?void 0:p.strings)||void 0===v?void 0:v.viewCalendar)&&void 0!==f?f:"View Calendar"}}}onRender(){super.onRender(),this.positionModal(),this.rootElement.querySelectorAll("[hawksearch-input]").forEach((e=>{e.addEventListener("click",(e=>{this.modalVisible=!0,this.modalDate=this.selectedDate?new Date(this.selectedDate):new Date,this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-previous]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.modalDate.setDate(1),this.modalDate.setMonth(this.modalDate.getMonth()-1),this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-next]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.modalDate.setDate(1),this.modalDate.setMonth(this.modalDate.getMonth()+1),this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-month-selector]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.monthSelectorVisible=!0,this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-select-month]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;e.preventDefault();const i=null===(t=this.rootElement.querySelector("[hawksearch-month]"))||void 0===t?void 0:t.value,a=null===(n=this.rootElement.querySelector("[hawksearch-year]"))||void 0===n?void 0:n.value;if(void 0===i)throw new Error("Unable to get month value");if(void 0===a)throw new Error("Unable to get year value");this.modalDate=new Date(parseInt(a),parseInt(i),1),this.monthSelectorVisible=!1,this.render()}))})),this.rootElement.querySelectorAll("[hawksearch-date]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const n=e.getAttribute("hawksearch-date")||void 0;if(!n)return;const i=new Date(n);if(this.minDate&&!(i>=this.minDate)||this.maxDate&&!(i<=this.maxDate))return;this.selectedDate=i,this.modalVisible=!1,this.render();const a=new CustomEvent("hawksearch:date-picker-changed",{detail:i});this.dispatchEvent(a)}))}))}positionModal(){const e=this.rootElement.querySelector("[hawksearch-modal]");if(!e||!e.offsetWidth||!this.modalVisible)return;e.style.left="",e.style.right="";const t=window.innerWidth,n=e.getBoundingClientRect();e.offsetWidth+n.x>=t&&t>=e.offsetWidth&&(e.style.right="0")}getYears(){const e=[],t=this.modalDate.getFullYear(),n=t<1900?t:1900,i=(t>(new Date).getFullYear()?t:(new Date).getFullYear())+10;for(let t=n;t<=i;t++)e.push(t);return e}getWeeks(e){let t=new Date(e.getFullYear(),e.getMonth(),1);t.setDate(t.getDate()-t.getDay());const n=[];do{const e=this.getWeek(t);n.push(e),t=new Date(n[n.length-1][6].date.getTime()),t.setDate(t.getDate()+1)}while(n.length<6);return n}getWeek(e){const t=[];(new Date).setHours(0,0,0,0);for(let n=0;n<7;n++){const i=new Date(e.getTime());i.setDate(i.getDate()+n),i.setHours(0,0,0,0);const a={date:i,value:i.toISOString(),currentMonth:i.getMonth()===this.modalDate.getMonth(),enabled:(!this.minDate||i>=this.minDate)&&(!this.maxDate||i<=this.maxDate),selected:!!this.selectedDate&&Tn(i,this.selectedDate)};t.push(a)}return t}},"date-range-facet":class extends Wn{constructor(){super(...arguments),this.componentName="date-range-facet",this.defaultHtml='<div class="date-range-facet">\n <div class="row">\n <div class="column column--6">\n <hawksearch-date-picker\n hawksearch-start\n value="{{startValue}}"\n min="{{minValue}}"\n max="{{endValue}}"\n label="{{strings.startDate}}"\n ></hawksearch-date-picker>\n </div>\n <div class="column column--6">\n <hawksearch-date-picker\n hawksearch-end\n value="{{endValue}}"\n min="{{startValue}}"\n max="{{maxValue}}"\n label="{{strings.endDate}}"\n ></hawksearch-date-picker>\n </div>\n </div>\n</div>'}get range(){var e,t;if("date"===(null===(t=null===(e=this.data)||void 0===e?void 0:e.range)||void 0===t?void 0:t.type))return this.data.range}renderContent(){return!!this.range}getContentModel(){var e,t,n,i,a,r;return{startValue:this.range.start.toISOString(),endValue:this.range.end.toISOString(),minValue:this.range.min.toISOString(),maxValue:this.range.max.toISOString(),strings:{startDate:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.startDate)&&void 0!==n?n:"Start Date",endDate:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.endDate)&&void 0!==r?r:"End Date"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-start]").forEach((e=>{e.addEventListener("hawksearch:date-picker-changed",(e=>{let t=e.detail;t||(t=this.range.min),this.setFacetValue(t,this.range.end)}))})),this.rootElement.querySelectorAll("[hawksearch-end]").forEach((e=>{e.addEventListener("hawksearch:date-picker-changed",(e=>{let t=e.detail;t||(t=this.range.max),this.setFacetValue(this.range.start,t)}))}))}updateInputElements(e,t){const n=this.rootElement.querySelector("[hawksearch-start]"),i=this.rootElement.querySelector("[hawksearch-end]");n&&(n.value=e?$n(e):""),i&&(i.value=t?$n(t):"")}setFacetValue(e,t){var n,i;if(e&&t&&e>t){const n=e;e=t,t=n}e||(e=this.range.start),t||(t=this.range.end),e.setHours(0,0,0,0),t.setHours(23,59,59,999),this.updateInputElements(e,t),Tn(e,this.range.start)&&Tn(t,this.range.end)||Pn.setFacetValue(this.data.field,`${null!==(n=null==e?void 0:e.toISOString())&&void 0!==n?n:""},${null!==(i=null==t?void 0:t.toISOString())&&void 0!==i?i:""}`)}},"facet-wrapper":class extends et{constructor(){super(...arguments),this.componentName="facet-wrapper",this.defaultHtml='<div class="facet">\n <div hawksearch-facet-heading class="facet__heading{{attribute \' facet__heading--collapsible\' collapsible}}">\n {{title}}\n {{#if tooltip}}\n <hawksearch-tooltip text="{{tooltip}}"></hawksearch-tooltip>\n {{/if}}\n {{#if collapsible}}\n <hawksearch-icon name="{{if-else collapsed \'chevron-right\' \'chevron-down\'}}" size="1.5em" class="facet__heading__toggle"></hawksearch-icon>\n {{/if}}\n </div>\n {{#unless collapsed}}\n <div class="facet__content">\n {{#if searchable}}\n <input type="text" placeholder="Quick Lookup" hawksearch-facet-search value="{{filter}}" class="facet__search" />\n {{/if}}\n {{#if (eq type "checkbox")}}\n <hawksearch-checkbox-list-facet hawksearch-facet></hawksearch-checkbox-list-facet>\n {{/if}}\n {{#if (eq type "color")}}\n <hawksearch-color-facet hawksearch-facet></hawksearch-color-facet>\n {{/if}}\n {{#if (eq type "date-range")}}\n <hawksearch-date-range-facet hawksearch-facet></hawksearch-date-range-facet>\n {{/if}}\n {{#if (eq type "link")}}\n <hawksearch-link-list-facet hawksearch-facet></hawksearch-link-list-facet>\n {{/if}}\n {{#if (eq type "numeric-range")}}\n <hawksearch-numeric-range-facet hawksearch-facet></hawksearch-numeric-range-facet>\n {{/if}}\n {{#if (eq type "range-slider")}}\n <hawksearch-range-slider-facet hawksearch-facet></hawksearch-range-slider-facet>\n {{/if}}\n {{#if (eq type "recent-searches")}}\n <hawksearch-recent-searches-facet hawksearch-facet></hawksearch-recent-searches-facet>\n {{/if}}\n {{#if (eq type "related-searches")}}\n <hawksearch-related-searches-facet hawksearch-facet></hawksearch-related-searches-facet>\n {{/if}}\n {{#if (eq type "search")}}\n <hawksearch-search-within-facet hawksearch-facet></hawksearch-search-within-facet>\n {{/if}}\n {{#if (eq type "size")}}\n <hawksearch-size-facet hawksearch-facet></hawksearch-size-facet>\n {{/if}}\n </div>\n {{/unless}}\n</div>',this.bindFromEvent=!1}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.visible)}getContentModel(){var e,t,n,i,a;return Object.assign(Object.assign({},this.data),{collapsed:null!==(t=null!==(e=this.state.collapsed)&&void 0!==e?e:this.data.collapsed)&&void 0!==t&&t,filter:null!==(n=this.state.filter)&&void 0!==n?n:"",searchable:!!this.data.search&&(null!==(a=null===(i=this.data.values)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>this.data.search.threshold})}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("[hawksearch-facet]").forEach((e=>{e.data=this.data,e.state=this.state}))}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-facet-heading]").forEach((e=>{e.addEventListener("click",(e=>{var t;e.preventDefault(),(null===(t=this.data)||void 0===t?void 0:t.collapsible)&&(this.state.collapsed=!this.state.collapsed,this.render())}))})),this.rootElement.querySelectorAll("[hawksearch-facet-search]").forEach((e=>{e.addEventListener("keyup",(e=>{var t;const n=null===(t=e.currentTarget.value)||void 0===t?void 0:t.trim();this.state.filter=n||void 0,this.rebindChildElements()}))}))}rebindChildElements(){this.rootElement.querySelectorAll("[hawksearch-facet]").forEach((e=>{e.render()}))}},"facets-list":class extends et{constructor(){super(...arguments),this.componentName="facets-list",this.defaultHtml='<div class="facets{{attribute \' facets--expanded\' expanded}}">\n <div hawksearch-mobile-toggle class="facets__heading">\n {{strings.heading}}\n <hawksearch-icon name="{{if-else expanded \'chevron-down\' \'chevron-right\'}}" size="1.5rem" class="facets__heading__mobile-toggle"></hawksearch-icon>\n </div>\n <div class="facets__content">\n {{#each facets}}\n <hawksearch-facet-wrapper hawksearch-facet-id="{{id}}"></hawksearch-facet-wrapper>\n {{/each}}\n </div>\n</div>',this.bindFromEvent=!0,this.state={expanded:!1}}renderContent(){return!!this.data}getContentModel(){var e,t,n;const i=["checkbox","color","date-range","link","numeric-range","range-slider","recent-searches","related-searches","search","size"];return{facets:this.data.filter((e=>i.includes(e.type))),expanded:this.state.expanded,strings:{heading:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.heading)&&void 0!==n?n:"Narrow Results"}}}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-facet-wrapper[hawksearch-facet-id]").forEach((e=>{var t,n;const i=parseInt(null!==(t=e.getAttribute("hawksearch-facet-id"))&&void 0!==t?t:""),a=null===(n=this.data)||void 0===n?void 0:n.find((e=>e.id===i));let r;if(null==a?void 0:a.values){r=[];const e=t=>{null==t||t.forEach((t=>{t.value&&r.push(t.value),e(t.children)}))};e(a.values)}let s=this.state[i];s||(s={id:i,toggled:!1,collapsed:null==a?void 0:a.collapsed,values:{}},this.state[i]=s),null==r||r.forEach((e=>{s.values[e]||(s.values[e]={toggled:!1})})),e.data=a,e.state=s}))}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-mobile-toggle]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.state.expanded=!this.state.expanded,this.render()}))}))}},"featured-items-content":class extends tt{constructor(){super(...arguments),this.componentName="featured-items-content",this.defaultHtml='<div class="row featured-items-content">\n {{#each items}}\n {{#if (or (eq @root.zone "Top") (eq @root.zone "Top2") (eq @root.zone "Bottom") (eq @root.zone "Bottom2"))}}\n {{#if (eq type "content")}}\n <div class="column column--12">\n <hawksearch-featured-items-content-item></hawksearch-featured-items-content-item>\n </div>\n {{else}}\n <div class="column column--12 column-sm--6 column-lg--4">\n <hawksearch-featured-items-content-item></hawksearch-featured-items-content-item>\n </div>\n {{/if}}\n {{else}}\n <hawksearch-featured-items-content-item></hawksearch-featured-items-content-item>\n {{/if}}\n {{/each}}\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){return Object.assign({},this.data)}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-featured-items-content-item").forEach(((e,t)=>{var n;e.data=null===(n=this.data.items)||void 0===n?void 0:n[t],e.trackingEnabled=this.data.trackingEnabled}))}},"featured-items-content-item":class extends et{constructor(){super(...arguments),this.trackingEnabled=!0,this.componentName="featured-items-content-item",this.defaultHtml='<div class="featured-items-content__item featured-items-content__item--{{type}}">\n {{#if pinned}}\n <span class="featured-items-content__item__pin">\n <hawksearch-icon name="star"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if (eq type "product")}}\n {{#if (lt salePrice price)}}\n <span class="featured-items-content__item__sale-indicator">{{strings.sale}}</span>\n {{/if}}\n <a hawksearch-link href="{{url}}" class="featured-items-content__item__image" aria-label="{{title}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <div class="featured-items-content__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="featured-items-content__item__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="featured-items-content__item__price__original">{{currency price}}</span>\n <span class="featured-items-content__item__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="featured-items-content__item__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n {{else}}\n <div class="row">\n {{#if imageUrl}}\n <div class="column column--12 column-sm--4">\n <a hawksearch-link href="{{url}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n </div>\n {{/if}}\n <div class="column column--12 column-sm--8 flex-align-self-sm-center">\n <div class="featured-items-content__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if description}}\n <p>{{description}}</p>\n {{/if}}\n </div>\n </div>\n {{/if}}\n</div>',this.bindFromEvent=!1}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;return Object.assign(Object.assign({},this.data),{description:null!==(t=null===(e=this.data.selectedVariant)||void 0===e?void 0:e.description)&&void 0!==t?t:this.data.description,imageUrl:null!==(i=null===(n=this.data.selectedVariant)||void 0===n?void 0:n.imageUrl)&&void 0!==i?i:this.data.imageUrl,price:null!==(r=null===(a=this.data.selectedVariant)||void 0===a?void 0:a.price)&&void 0!==r?r:this.data.price,rating:null!==(o=null===(s=this.data.selectedVariant)||void 0===s?void 0:s.rating)&&void 0!==o?o:this.data.rating,salePrice:null!==(c=null===(l=this.data.selectedVariant)||void 0===l?void 0:l.salePrice)&&void 0!==c?c:this.data.salePrice,sku:null!==(d=null===(u=this.data.selectedVariant)||void 0===u?void 0:u.sku)&&void 0!==d?d:this.data.sku,title:null!==(p=null===(h=this.data.selectedVariant)||void 0===h?void 0:h.title)&&void 0!==p?p:this.data.title,url:null!==(f=null===(v=this.data.selectedVariant)||void 0===v?void 0:v.url)&&void 0!==f?f:this.data.url,strings:{sale:null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.sale)&&void 0!==k?k:"Sale"}})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;if(!this.data||!this.trackingEnabled)return;const i=(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.trackUsingVariant)?null===(n=this.data.selectedVariant)||void 0===n?void 0:n.id:void 0,a=null!=i?i:this.data.id;En.trackSearchResultClick(a,this.data.url,e)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach((e=>{var t;(null===(t=this.data)||void 0===t?void 0:t.variants)&&(e.data={items:this.data.variants,selectedItem:this.data.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;this.data.selectedVariant=t,this.render()})))}))}},icon:class extends et{constructor(){super(...arguments),this.componentName="icon",this.defaultHtml='{{html svg}}\n<svg height="{{height}}" width="{{width}}" focusable="false" aria-hidden="true" class="icon">\n <use href="{{url}}"></use>\n</svg>',this.bindFromEvent=!1}get name(){var e;return null!==(e=this.getAttribute("name"))&&void 0!==e?e:void 0}get size(){const e=this.getAttribute("size");return e?isNaN(Number(e))?e:`${e}px`:"1em"}renderContent(){return!!this.name}getContentModel(){return{svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="chevron-back" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.703 5.331a1 1 0 0 1 .014 1.414l-3.303 3.371 3.289 3.222a1 1 0 0 1-1.4 1.428L4.3 10.845a1 1 0 0 1-.014-1.414l4.003-4.085a1 1 0 0 1 1.414-.015Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M14.817 5.331a1 1 0 0 1 .015 1.414l-3.304 3.371 3.29 3.222a1 1 0 0 1-1.4 1.428l-4.004-3.921A1 1 0 0 1 9.4 9.43l4.003-4.085a1 1 0 0 1 1.414-.015Z"/></symbol><symbol id="chevron-down" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.838 10.111a1 1 0 0 1 1.415 0L12 14.858l4.747-4.747a1 1 0 1 1 1.415 1.414l-5.455 5.455a1 1 0 0 1-1.414 0l-5.455-5.455a1 1 0 0 1 0-1.414Z"/></symbol><symbol id="chevron-forward" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.46 14.766a1 1 0 0 1-.014-1.414l3.303-3.37L9.46 6.76a1 1 0 0 1 1.4-1.429l4.003 3.922a1 1 0 0 1 .014 1.414l-4.003 4.085a1 1 0 0 1-1.414.014Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.346 14.766a1 1 0 0 1-.015-1.414l3.304-3.37-3.29-3.222a1 1 0 1 1 1.4-1.429L9.75 9.253a1 1 0 0 1 .014 1.414L5.76 14.752a1 1 0 0 1-1.414.014Z"/></symbol><symbol id="chevron-left" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.69 18.224a1 1 0 0 1-1.414-.034l-5-5.25a1 1 0 0 1 0-1.38l5-5.25a1 1 0 1 1 1.448 1.38l-4.343 4.56 4.343 4.56a1 1 0 0 1-.034 1.414Z"/></symbol><symbol id="chevron-right" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.31 18.224a1 1 0 0 1-.034-1.414l4.343-4.56-4.343-4.56a1 1 0 0 1 1.448-1.38l5 5.25a1 1 0 0 1 0 1.38l-5 5.25a1 1 0 0 1-1.414.034Z"/></symbol><symbol id="chevron-up" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.156 16.531a1 1 0 0 1-1.414-.012L12 11.7l-4.742 4.82a1 1 0 1 1-1.425-1.402l5.454-5.546a1 1 0 0 1 1.426 0l5.455 5.546a1 1 0 0 1-.012 1.414Z"/></symbol><symbol id="cross" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="m17.29 3.922-1.178-1.178-6.077 6.078-6.078-6.078-1.179 1.178L8.856 10l-6.078 6.078 1.18 1.178 6.077-6.078 6.077 6.078 1.179-1.178L11.213 10l6.078-6.078Z"/></symbol><symbol id="help" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 18.333c-4.595 0-8.333-3.737-8.333-8.333 0-4.594 3.738-8.333 8.333-8.333 4.595 0 8.333 3.738 8.333 8.333 0 4.596-3.738 8.333-8.333 8.333Zm0-15A6.674 6.674 0 0 0 3.333 10 6.674 6.674 0 0 0 10 16.667 6.674 6.674 0 0 0 16.666 10 6.674 6.674 0 0 0 10 3.333Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.833 12.5H9.166V10H10a1.668 1.668 0 0 0 0-3.333c-.92 0-1.667.746-1.667 1.666H6.666A3.338 3.338 0 0 1 10 5a3.338 3.338 0 0 1 3.333 3.333 3.343 3.343 0 0 1-2.5 3.23v.937Zm-.097.93a1.042 1.042 0 1 1-1.473 1.473 1.042 1.042 0 0 1 1.473-1.473Z"/></symbol><symbol id="minus" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.833 10.833H4.167V9.167h11.666v1.666Z"/></symbol><symbol id="plus" viewBox="0 0 20 20"><g style="enable-background:new 0 0 20 20"><path d="M16 9h-5V4c0-.6-.4-1-1-1s-1 .4-1 1v5H4c-.6 0-1 .4-1 1s.4 1 1 1h5v5c0 .6.4 1 1 1s1-.4 1-1v-5h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></symbol><symbol id="star-empty" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="m18.333 7.7-5.991-.517L10 1.667 7.658 7.192 1.666 7.7l4.55 3.942L4.85 17.5 10 14.392l5.15 3.108-1.359-5.858L18.334 7.7ZM10 12.833l-3.133 1.892.833-3.567-2.767-2.4 3.65-.316L10 5.083l1.425 3.367 3.65.317-2.767 2.4.834 3.566-3.142-1.9Z"/></symbol><symbol id="star-half" viewBox="0 0 20 20"><g style="enable-background:new 0 0 20 20"><style>.st0{fill-rule:evenodd;clip-rule:evenodd}</style><path class="st0" d="m18.3 7.7-6-.5L10 1.7 7.7 7.2l-6 .5 4.5 3.9-1.4 5.9 5.1-3.1 5.1 3.1-1.4-5.9 4.7-3.9zM10 12.8l-3.1 1.9.8-3.6-2.8-2.3 3.7-.3L10 5.1l1.4 3.4 3.6.3-2.8 2.4.8 3.6-3-2z"/><path class="st0" d="M10 1.7 7.7 7.2l-6 .5 4.5 3.9-1.4 5.9 5.2-3.1z"/></g></symbol><symbol id="star" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="m10 14.392 5.15 3.108-1.367-5.858 4.55-3.942-5.991-.508L10 1.667 7.658 7.192 1.666 7.7l4.55 3.942L4.85 17.5 10 14.392Z"/></symbol></svg>'.replace('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">','<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display: none;">'),url:`#${this.name}`,height:this.size,width:this.size}}},"image-content":class extends tt{constructor(){super(...arguments),this.componentName="image-content",this.defaultHtml='<div class="image-content">\n {{#if link}}\n <a hawksearch-link href="{{link.url}}" target="{{link.target}}">\n <img\n src="{{image.url}}"\n class="image-content__image"\n height="{{image.height}}"\n width="{{image.width}}"\n alt="{{image.altText}}"\n title="{{image.title}}"\n />\n </a>\n {{else}}\n <img\n src="{{image.url}}"\n class="image-content__image"\n height="{{image.height}}"\n width="{{image.width}}"\n alt="{{image.altText}}"\n title="{{image.title}}"\n />\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){return Object.assign({},this.data)}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{En.trackBannerClick(this.data.id,this.data.campaignId)}))})),En.trackBannerImpression(this.data.id,this.data.campaignId)}},"landing-page":class extends et{get url(){var e;return null!==(e=this.getAttribute("url"))&&void 0!==e?e:window.location.pathname}constructor(){super(),this.componentName="landing-page",this.defaultHtml='{{#if customLayout}}\n {{html customLayout}}\n{{else}}\n <hawksearch-search-results mode="landing-page" url="{{url}}"></hawksearch-search-results>\n{{/if}}',this.bindFromEvent=!0,En.trackPageLoad(_n.Landing);const e=Pn.getRequestFromUrl();e.url=this.url,Pn.search(e)}renderContent(){return!!this.data}getContentModel(){return Object.assign(Object.assign({},this.data),{customLayout:this.processCustomLayout(this.data.customLayout),url:this.url})}processCustomLayout(e){var t,n,i,a,r,s,o;if(!e)return;let l=e;const c=Object.keys(null!==(t=this.data.contentZones)&&void 0!==t?t:{}),u=new RegExp(`{{(${c.join("|")})}}`,"g");return l=l.replace(u,'<hawksearch-content-zone name="$1"></hawksearch-content-zone>'),l=l.replace(/{{#breadcrumb#}}/g,null!==(i=null===(n=this.data.content)||void 0===n?void 0:n.breadcrumbs)&&void 0!==i?i:""),l=l.replace(/{{#pageheading#}}/g,null!==(r=null===(a=this.data.content)||void 0===a?void 0:a.heading)&&void 0!==r?r:""),l=l.replace(/{{#customhtml#}}/g,null!==(o=null===(s=this.data.content)||void 0===s?void 0:s.customHtml)&&void 0!==o?o:""),l}},"link-list-facet":class extends Wn{constructor(){super(...arguments),this.componentName="link-list-facet",this.defaultHtml='<div class="link-list-facet" {{attribute (concat \'style="max-height: \' maxHeight \'px;"\') maxHeight}}>\n <ul class="link-list-facet__list">\n {{#each values}}\n {{#if visible}}\n <li class="link-list-facet__list__item">\n <span hawksearch-facet-value="{{value}}" class="link facet__value" tabindex="-1">\n {{#if imageUrl}}\n <img src="{{imageUrl}}" alt="{{title}}" title="{{title}}" class="facet__value__image" />\n {{else}}\n <span class="facet__value__title">{{title}}</span>\n {{/if}}\n {{#if @root.displayCount}}\n <span class="facet__value__count">({{count}})</span>\n {{/if}}\n </span>\n </li>\n {{/if}}\n {{/each}}\n </ul>\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle" tabindex="-1">{{strings.toggle}}</span>\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p;const v=this.state.filter?new RegExp(null!==(e=this.state.filter)&&void 0!==e?e:"","i"):void 0;return{displayCount:null===(t=this.data.displayCount)||void 0===t||t,expanded:null!==(n=this.state.toggled)&&void 0!==n&&n,maxHeight:this.data.scrolling&&this.data.values.length>=this.data.scrolling.threshold?null!==(i=this.data.scrolling.height)&&void 0!==i?i:200:void 0,showToggle:!!this.data.truncation&&(null!==(r=null===(a=this.data.values)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>this.data.truncation.threshold&&!this.state.filter,values:null!==(o=null===(s=this.data.values)||void 0===s?void 0:s.map(((e,t)=>{var n;return Object.assign(Object.assign({},e),{visible:!v&&(this.state.toggled||!this.data.truncation||t<this.data.truncation.threshold)||!!v&&v.test(null!==(n=e.title)&&void 0!==n?n:"")})})))&&void 0!==o?o:[],strings:{toggle:this.state.toggled?null!==(u=null===(c=null===(l=this.configuration)||void 0===l?void 0:l.strings)||void 0===c?void 0:c.showFewer)&&void 0!==u?u:"Show fewer":null!==(p=null===(h=null===(d=this.configuration)||void 0===d?void 0:d.strings)||void 0===h?void 0:h.showMore)&&void 0!==p?p:"Show more"}}}},"modified-query":class extends et{constructor(){super(...arguments),this.componentName="modified-query",this.defaultHtml='<div class="modified-query">\n <p>\n {{strings.showingResultsFor}}\n <span class="modified-query__modified">{{modifiedQuery}}</span>.\n {{strings.searchInsteadFor}}\n <a class="modified-query__original" hawksearch-query="{{query}}">{{query}}</a>.\n </p>\n</div>',this.bindFromEvent=!0}renderContent(){var e,t,n;return!!(null===(e=this.data)||void 0===e?void 0:e.display)&&!!(null===(t=this.data)||void 0===t?void 0:t.query)&&!!(null===(n=this.data)||void 0===n?void 0:n.modifiedQuery)}getContentModel(){var e,t,n,i,a,r;return{query:this.data.query,modifiedQuery:this.data.modifiedQuery,strings:{showingResultsFor:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.showingResultsFor)&&void 0!==n?n:"Showing results for",searchInsteadFor:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.searchInsteadFor)&&void 0!==r?r:"Search instead for"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t,void 0,!0)}))}))}},"numeric-range-facet":class extends Wn{constructor(){super(...arguments),this.componentName="numeric-range-facet",this.defaultHtml='<div class="numeric-range-facet">\n <div class="row">\n <div class="column column--6">\n <input type="number" hawksearch-start value="{{start}}" min="{{min}}" max="{{end}}" aria-label="{{strings.minimum}}" />\n </div>\n <div class="column column--6">\n <input type="number" hawksearch-end value="{{end}}" min="{{start}}" max="{{max}}" aria-label="{{strings.maximum}}" />\n </div>\n </div>\n</div>'}get range(){var e,t;if("numeric"===(null===(t=null===(e=this.data)||void 0===e?void 0:e.range)||void 0===t?void 0:t.type))return this.data.range}renderContent(){return!!this.range}getContentModel(){var e,t,n,i,a,r;return{start:Math.floor(this.range.start),end:Math.ceil(this.range.end),min:Math.floor(this.range.min),max:Math.floor(this.range.max),strings:{minimum:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.minimum)&&void 0!==n?n:"Minimum",maximum:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.maximum)&&void 0!==r?r:"Maximum"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-start]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=Math.floor(this.range.min),t.value=n.toString()),this.setFacetValue(n,this.range.end)}))})),this.rootElement.querySelectorAll("[hawksearch-end]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=Math.ceil(this.range.max),t.value=n.toString()),this.setFacetValue(this.range.start,n)}))}))}setFacetValue(e,t){if(e>t){const n=e;e=t,t=n}e=Math.floor(e),t=Math.ceil(t),e===Math.floor(this.range.start)&&t===Math.ceil(this.range.end)||Pn.setFacetValue(this.data.field,`${e},${t}`)}},"page-size":class extends et{constructor(){super(...arguments),this.componentName="page-size",this.defaultHtml='<div class="page-size">\n <select hawksearch-page-size>\n {{#each options}}\n {{#if selected}}\n <option value="{{pageSize}}" selected>{{title}}</option>\n {{else}}\n <option value="{{pageSize}}">{{title}}</option>\n {{/if}}\n {{/each}}\n </select>\n</div>',this.bindFromEvent=!0}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.length)}getContentModel(){return{options:this.data}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-page-size]").forEach((e=>{e.addEventListener("change",(e=>{e.preventDefault();const t=e.currentTarget,n=parseInt(t.value);Pn.setPageSize(n)}))}))}},pagination:class extends et{constructor(){super(...arguments),this.componentName="pagination",this.defaultHtml='<div class="pagination">\n {{#if strings.summary}}\n <div class="pagination__summary">{{strings.summary}}</div>\n {{/if}}\n <div class="pagination__pages">\n {{#if displayFirstLink}}\n <span hawksearch-page="1" class="link pagination__page pagination__page--first" title="{{strings.first}}">\n <hawksearch-icon name="chevron-back" size="1.2em"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if displayPreviousLink}}\n <a\n hawksearch-page="{{subtract page 1}}"\n rel="prev"\n href="{{pageUrl (subtract page 1)}}"\n class="pagination__page pagination__page--previous"\n title="{{strings.previous}}"\n >\n <hawksearch-icon name="chevron-left" size="1.2em"></hawksearch-icon>\n </a>\n {{/if}}\n {{#each pages}}\n {{#if (eq this @root.page)}}\n <span class="pagination__page pagination__page--selected">{{this}}</span>\n {{else}}\n <a hawksearch-page="{{this}}" href="{{pageUrl this}}" class="pagination__page">{{this}}</a>\n {{/if}}\n {{/each}}\n {{#if displayNextLink}}\n <a\n hawksearch-page="{{add page 1}}"\n rel="next"\n href="{{pageUrl (add page 1)}}"\n class="pagination__page pagination__page--next"\n title="{{strings.next}}"\n >\n <hawksearch-icon name="chevron-right" size="1.2em"></hawksearch-icon>\n </a>\n {{/if}}\n {{#if displayLastLink}}\n <span hawksearch-page="{{totalPages}}" class="link pagination__page pagination__page--last" title="{{strings.last}}">\n <hawksearch-icon name="chevron-forward" size="1.2em"></hawksearch-icon>\n </span>\n {{/if}}\n </div>\n</div>',this.bindFromEvent=!0,this.defaultMaxPageLinks=9}registerHelpers(){super.registerHelpers(),this.handlebars.registerHelper("pageUrl",(e=>{const t=new URLSearchParams;return 1===e?t.delete(Pn.queryStringParams.page):t.set(Pn.queryStringParams.page,e.toString()),`?${t}`}))}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.totalResults)}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m;const k=(this.data.page-1)*this.data.pageSize+1;let y=k+this.data.pageSize-1;return y>this.data.totalResults&&(y=this.data.totalResults),{page:this.data.page,pages:this.getPages(),firstPage:1,lastPage:this.data.totalPages,firstRecord:k,lastRecord:y,totalRecords:null!==(e=this.data.totalResults)&&void 0!==e?e:0,totalPages:null!==(t=this.data.totalPages)&&void 0!==t?t:1,maxPageLinks:null!==(n=this.data.maxPageLinks)&&void 0!==n?n:this.defaultMaxPageLinks,displayFirstLink:this.data.displayFirstLink&&this.data.page>1,displayPreviousLink:this.data.page>1,displayNextLink:this.data.page<this.data.totalPages,displayLastLink:this.data.displayLastLink&&this.data.page<this.data.totalPages,strings:{first:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.first)&&void 0!==r?r:"First",last:null!==(l=null===(o=null===(s=this.configuration)||void 0===s?void 0:s.strings)||void 0===o?void 0:o.last)&&void 0!==l?l:"Last",next:null!==(d=null===(u=null===(c=this.configuration)||void 0===c?void 0:c.strings)||void 0===u?void 0:u.next)&&void 0!==d?d:"Next",previous:null!==(v=null===(p=null===(h=this.configuration)||void 0===h?void 0:h.strings)||void 0===p?void 0:p.previous)&&void 0!==v?v:"Previous",summary:this.interpolate(null!==(m=null===(g=null===(f=this.configuration)||void 0===f?void 0:f.strings)||void 0===g?void 0:g.summary)&&void 0!==m?m:"Showing ${first}-${last} of ${total}",{first:zn(k,0),last:zn(y,0),total:zn(this.data.totalResults,0)})}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-page]").forEach((e=>{const t=e.getAttribute("hawksearch-page");if(t){const n=parseInt(t);e.addEventListener("click",(e=>{e.preventDefault(),this.setPage(n)}))}}))}setPage(e){return t=this,n=void 0,a=function*(){yield Pn.paginate(e)},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{l(a.next(e))}catch(e){r(e)}}function o(e){try{l(a.throw(e))}catch(e){r(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,o)}l((a=a.apply(t,n||[])).next())}));var t,n,i,a}getPages(){var e;const t=[];if(this.data&&this.data.totalPages>1){const n=null!==(e=this.data.maxPageLinks)&&void 0!==e?e:this.defaultMaxPageLinks;let i=this.data.page-Math.floor(n/2);i<1&&(i=1);let a=i+n-1;a>this.data.totalPages&&(a=this.data.totalPages);for(let e=i;e<=a;e++)t.push(e)}return t}},"popular-queries-content":class extends tt{constructor(){super(...arguments),this.componentName="popular-queries-content",this.defaultHtml='<div class="popular-queries-content">\n {{#each items}}\n <a hawksearch-query="{{query}}" class="popular-queries-content__item popular-queries-content__item--{{weight}}">{{query}}</a>\n {{/each}}\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){return Object.assign({},this.data)}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"query-suggestions":class extends et{constructor(){super(...arguments),this.componentName="query-suggestions",this.defaultHtml='<div class="query-suggestions">\n <p>{{query-suggestions querySuggestions}}</p>\n</div>',this.bindFromEvent=!0}registerHelpers(){var e,t,n,i,a,r;super.registerHelpers();const s=null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.orDelimeter)&&void 0!==n?n:"or",o=null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.prompt)&&void 0!==r?r:"Did you mean to search for ${suggestions}?";this.handlebars.registerHelper("query-suggestions",(function(e){function t(e){return`<a hawksearch-query="${encodeURIComponent(e)}" class="query-suggestions__link">${e}</a>`}const n=`, ${s} `;let i="";i=e.length<=2?e.map(t).join(` ${s} `):e.slice(0,e.length-1).map(t).join(", ")+n+t(e[e.length-1]);const a=o.replace("${suggestions}",i);return new HawkSearch.handlebars.SafeString(a)}))}renderContent(){var e;return!!this.data&&!!this.data.display&&!!(null===(e=this.data.querySuggestions)||void 0===e?void 0:e.length)}getContentModel(){var e;return{querySuggestions:null!==(e=this.data.querySuggestions)&&void 0!==e?e:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"range-slider":class extends et{constructor(){super(...arguments),this.componentName="range-slider",this.defaultHtml='<div class="range-slider">\n <div class="range-slider__container">\n <div class="range-slider__bar">\n <div class="range-slider__bar__active" hawksearch-bar style="left: {{start}}%; right: {{subtract 100 end}}%;"></div>\n </div>\n <span class="range-slider__handle range-slider__handle--start" title="{{strings.start}}" hawksearch-handle="start" style="left: {{start}}%;"></span>\n <span class="range-slider__handle range-slider__handle--end" title="{{strings.end}}" hawksearch-handle="end" style="left: {{end}}%;"></span>\n </div>\n</div>',this.bindFromEvent=!1,this.dragging=!1,this.start=0,this.end=100}static get observedAttributes(){return["end","start"]}connectedCallback(){super.connectedCallback(),this.mouseUpEventHandler=this.onMouseUp.bind(this),this.mouseMoveEventHandler=this.onMouseMove.bind(this),["mouseup","touchend"].forEach((e=>document.addEventListener(e,this.mouseUpEventHandler))),["mousemove","touchmove"].forEach((e=>document.addEventListener(e,this.mouseMoveEventHandler)),{passive:!0})}attributeChangedCallback(e,t,n){switch(e){case"end":this.setEnd(n);break;case"start":this.setStart(n)}this.render()}disconnectedCallback(){super.disconnectedCallback(),["mouseup","touchend"].forEach((e=>document.removeEventListener(e,this.mouseUpEventHandler))),["mousemove","touchmove"].forEach((e=>document.removeEventListener(e,this.mouseMoveEventHandler)))}setStart(e){let t=parseInt(null!=e?e:"");(isNaN(t)||t<0)&&(t=0),this.start=t}setEnd(e){let t=parseInt(null!=e?e:"");(isNaN(t)||t>100)&&(t=100),this.end=t}getContentModel(){var e,t,n,i,a,r;return{start:this.start,end:this.end,strings:{start:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.start)&&void 0!==n?n:"Start",end:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.end)&&void 0!==r?r:"End"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-handle]").forEach((e=>{["mousedown","touchstart"].forEach((t=>e.addEventListener(t,(t=>{var n;if(!e.getAttribute("hawksearch-handle"))return;const i=t.currentTarget;this.activeHandle=i,this.startOffsetPercentage=parseFloat(null!==(n=i.style.left)&&void 0!==n?n:0),this.startX=t instanceof MouseEvent?t.clientX:t.touches[0].clientX,this.dragging=!0,this.rootElement.querySelectorAll("[hawksearch-handle]").forEach((e=>e.style.zIndex="")),i.style.zIndex="1"}),{passive:!0})))}))}onMouseUp(e){if(!this.dragging)return;e.preventDefault(),this.dragging=!1;const t={start:this.start,end:this.end},n=new CustomEvent("hawksearch:range-slider-changed",{detail:t});this.dispatchEvent(n)}onMouseMove(e){var t,n;if(!this.dragging||!this.activeHandle||void 0===this.startX)return;const i=this.activeHandle.getAttribute("hawksearch-handle"),a=this.rootElement.querySelector('[hawksearch-handle="start"]'),r=this.rootElement.querySelector('[hawksearch-handle="end"]'),s=this.rootElement.querySelector("[hawksearch-bar]"),o=(e instanceof MouseEvent?e.clientX:e.touches[0].clientX)-this.startX,l=this.activeHandle.parentElement.offsetWidth;let c=Math.round(o/l*100)+this.startOffsetPercentage,u=0,d=100;"start"===i?d=parseFloat(null!==(t=r.style.left)&&void 0!==t?t:100):"end"===i&&(u=parseFloat(null!==(n=a.style.left)&&void 0!==n?n:0)),c<=u?c=u:c>=d&&(c=d),"start"===i?u=c:"end"===i&&(d=c),this.activeHandle.style.left=`${c}%`,s.style.left=`${u}%`,s.style.right=100-d+"%","start"===i?this.start=c:"end"===i&&(this.end=c);const h={start:this.start,end:this.end},p=new CustomEvent("hawksearch:range-slider-dragging",{detail:h});this.dispatchEvent(p)}},"range-slider-facet":class extends Wn{constructor(){super(...arguments),this.componentName="range-slider-facet",this.defaultHtml='<div class="range-slider-facet">\n <div class="row">\n <div class="column column--6">\n <input type="number" hawksearch-start value="{{start}}" min="{{min}}" max="{{end}}" aria-label="{{strings.minimum}}" />\n </div>\n <div class="column column--6">\n <input type="number" hawksearch-end value="{{end}}" min="{{start}}" max="{{max}}" aria-label="{{strings.maximum}}" />\n </div>\n </div>\n <hawksearch-range-slider start="{{sliderStart}}" end="{{sliderEnd}}"></hawksearch-range-slider>\n</div>'}get range(){var e,t;if("numeric"===(null===(t=null===(e=this.data)||void 0===e?void 0:e.range)||void 0===t?void 0:t.type))return this.data.range}renderContent(){return!!this.range}getContentModel(){var e,t,n,i,a,r;const s=Math.ceil(this.range.max)-Math.floor(this.range.min);return{start:Math.floor(this.range.start),end:Math.ceil(this.range.end),min:Math.floor(this.range.min),max:Math.ceil(this.range.max),sliderStart:Math.ceil((Math.floor(this.range.start)-Math.floor(this.range.min))/s*100),sliderEnd:Math.floor(Math.ceil(this.range.end)/s*100),strings:{minimum:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.minimum)&&void 0!==n?n:"Minimum",maximum:null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.strings)||void 0===a?void 0:a.maximum)&&void 0!==r?r:"Maximum"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-start]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=0),this.setFacetValue(n,this.range.end)}))})),this.rootElement.querySelectorAll("[hawksearch-end]").forEach((e=>{e.addEventListener("blur",(e=>{const t=e.currentTarget;let n=parseFloat(t.value);isNaN(n)&&(n=0),this.setFacetValue(this.range.start,n)}))})),this.rootElement.querySelectorAll("hawksearch-range-slider").forEach((e=>{e.addEventListener("hawksearch:range-slider-dragging",(e=>{const t=e.detail,n=this.getRange(t.start,t.end);this.updateInputElements(n.start,n.end)})),e.addEventListener("hawksearch:range-slider-changed",(e=>{const t=e.detail,n=this.getRange(t.start,t.end);this.setFacetValue(n.start,n.end)}))}))}getRange(e,t){var n,i;const a=Math.floor(null!==(n=this.range.min)&&void 0!==n?n:0),r=Math.ceil(null!==(i=this.range.max)&&void 0!==i?i:0),s=r-a;return{start:Math.floor(s*e/100+a),end:Math.ceil(r*t/100)}}updateInputElements(e,t){const n=this.rootElement.querySelector("[hawksearch-start]"),i=this.rootElement.querySelector("[hawksearch-end]");n&&(n.value=e.toString()),i&&(i.value=t.toString())}setFacetValue(e,t){this.updateInputElements(e,t),e===Math.floor(this.range.start)&&t===Math.ceil(this.range.end)||Pn.setFacetValue(this.data.field,`${e.toFixed(2)},${t.toFixed(2)}`)}},rating:class extends et{constructor(){super(...arguments),this.componentName="rating",this.defaultHtml='<div class="rating" title="{{rating}}">\n <hawksearch-icon name="{{ratingIcon rating 0}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 1}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 2}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 3}}" class="rating__icon"></hawksearch-icon>\n <hawksearch-icon name="{{ratingIcon rating 4}}" class="rating__icon"></hawksearch-icon>\n</div>',this.bindFromEvent=!1}registerHelpers(){super.registerHelpers(),this.handlebars.registerHelper("ratingIcon",((e,t)=>{const n=e-t;return n>=1?"star":n>=.5?"star-half":"star-empty"}))}get rating(){var e;return parseFloat(null!==(e=this.getAttribute("rating"))&&void 0!==e?e:"0")||void 0}renderContent(){return!!this.rating}getContentModel(){return{rating:this.rating}}onRender(){var e;super.onRender(),null===(e=this.rootElement.querySelector("[hawksearch-tooltip]"))||void 0===e||e.addEventListener("mouseover",(e=>{const t=e.currentTarget,n=this.rootElement.querySelector("[hawksearch-tooltip-content]");if(!n)return;n.style.removeProperty("top"),n.style.removeProperty("right");const i=window.innerWidth,a=t.getBoundingClientRect(),r=a.x+a.width;n.style.top=`${a.top}px`,i-r<370&&(n.style.right="20px")}))}},recommendations:class extends et{static get observedAttributes(){return["item-id","widget-id"]}get carousel(){var e,t,n,i,a,r;return!1!==(null===(t=null===(e=this.configuration)||void 0===e?void 0:e.carousel)||void 0===t?void 0:t.enabled)&&!!(null===(n=this.data)||void 0===n?void 0:n.carousel)&&(null!==(r=null===(a=null===(i=this.data)||void 0===i?void 0:i.items)||void 0===a?void 0:a.length)&&void 0!==r?r:0)>this.itemsToDisplay}get carouselPosition(){return this.carousel?-1*this.selectedIndex*100/this.itemsToDisplay+"%":void 0}get displayType(){var e,t,n,i;const a=window.innerWidth;return a>=(null!==(t=null===(e=HawkSearch.config.breakpoints)||void 0===e?void 0:e.desktop)&&void 0!==t?t:990)?"desktop":a>=(null!==(i=null===(n=HawkSearch.config.breakpoints)||void 0===n?void 0:n.tablet)&&void 0!==i?i:740)?"tablet":"mobile"}get itemsToDisplay(){var e,t,n,i,a,r,s,o,l;switch(this.displayType){case"mobile":return null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.itemsToDisplay)||void 0===t?void 0:t.mobile)&&void 0!==n?n:1;case"tablet":return null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.itemsToDisplay)||void 0===a?void 0:a.tablet)&&void 0!==r?r:2;case"desktop":return null!==(l=null===(o=null===(s=this.configuration)||void 0===s?void 0:s.itemsToDisplay)||void 0===o?void 0:o.desktop)&&void 0!==l?l:3;default:return 1}}get itemWidth(){return 100/this.itemsToDisplay+"%"}constructor(){super(),this.componentName="recommendations",this.defaultHtml='<div class="recommendations">\n {{#if headingEnabled}}\n <h2 class="heading recommendations__heading">{{title}}</h2>\n {{/if}}\n <div class="recommendations__content">\n {{#if (and carousel buttonsEnabled)}}\n <a hawksearch-previous class="recommendations__button recommendations__button--previous" title="{{strings.previous}}">\n <hawksearch-icon name="chevron-left"></hawksearch-icon>\n </a>\n {{/if}}\n <div class="recommendations__carousel">\n <div hawksearch-carousel class="recommendations__list{{attribute \' recommendations__list--carousel\' carousel}}" style="left: {{carouselPosition}};">\n {{#each items}}\n <div class="recommendations__carousel__item" style="width: {{@root.itemWidth}};">\n <hawksearch-recommendations-item widget-id="{{@root.id}}" request-id="{{@root.requestId}}"></hawksearch-recommendations-item>\n </div>\n {{/each}}\n </div>\n {{#if (and carousel paginationEnabled)}}\n <div class="recommendations__pagination">\n {{#each paginationItems}}\n <span\n hawksearch-carousel-item="{{@index}}"\n class="recommendations__pagination__item{{attribute \' recommendations__pagination__item--selected\' selected}}"\n title="{{title}}"\n ></span>\n {{/each}}\n </div>\n {{/if}}\n </div>\n {{#if (and carousel buttonsEnabled)}}\n <a\n hawksearch-next\n class="recommendations__button recommendations__button--next{{attribute \' recommendations__button--disabled\' (eq nextEnabled false)}}"\n title="{{strings.next}}"\n >\n <hawksearch-icon name="chevron-right"></hawksearch-icon>\n </a>\n {{/if}}\n </div>\n</div>',this.bindFromEvent=!0,this.selectedIndex=0}connectedCallback(){super.connectedCallback(),this.touchMoveEventHandler=this.onTouchMove.bind(this),this.touchEndEventHandler=this.onTouchEnd.bind(this),this.windowResizeEventHandler=Nn((e=>this.onWindowResize(e)),100),document.addEventListener("touchmove",this.touchMoveEventHandler),document.addEventListener("touchend",this.touchEndEventHandler),window.addEventListener("resize",this.windowResizeEventHandler)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("touchmove",this.touchMoveEventHandler),document.removeEventListener("touchend",this.touchEndEventHandler),window.removeEventListener("resize",this.windowResizeEventHandler)}attributeChangedCallback(e,t,n){switch(clearTimeout(this.requestTimer),e){case"item-id":this.itemId=n||void 0;break;case"widget-id":{if(!n)return this.widgetId=void 0,void(this.eventFilter=void 0);const e=n.split(",").map((e=>e.trim()));this.widgetId=e[Math.floor(Math.random()*e.length)],this.eventFilter=this.widgetId;break}}this.requestTimer=setTimeout((()=>{if(!this.widgetId)return;const e={widgetId:this.widgetId,itemId:this.itemId};kt.getItems(e)}),50)}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.items)||void 0===t?void 0:t.length)}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p;return this.previousDisplayType=this.displayType,Object.assign(Object.assign({},this.data),{buttonsEnabled:null===(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.carousel)||void 0===t?void 0:t.buttonsEnabled)||void 0===n||n,carousel:this.carousel,carouselPosition:this.carouselPosition,headingEnabled:null===(a=null===(i=this.configuration)||void 0===i?void 0:i.headingEnabled)||void 0===a||a,itemWidth:this.itemWidth,paginationEnabled:null===(o=null===(s=null===(r=this.configuration)||void 0===r?void 0:r.carousel)||void 0===s?void 0:s.paginationEnabled)||void 0===o||o,paginationItems:this.data.items.map(((e,t)=>({selected:this.getSelected(t),title:e.title}))),strings:{next:null!==(u=null===(c=null===(l=this.configuration)||void 0===l?void 0:l.strings)||void 0===c?void 0:c.next)&&void 0!==u?u:"Next",previous:null!==(p=null===(h=null===(d=this.configuration)||void 0===d?void 0:d.strings)||void 0===h?void 0:h.previous)&&void 0!==p?p:"Previous"}})}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-recommendations-item").forEach(((e,t)=>{var n;e.data=null===(n=this.data.items)||void 0===n?void 0:n[t]}))}onRender(){super.onRender(),this.addEventListener("mouseover",(e=>{this.toggleAutorotation(!1)})),this.addEventListener("mouseleave",(e=>{this.toggleAutorotation(!0)})),this.rootElement.querySelectorAll("[hawksearch-previous]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.previous()}))})),this.rootElement.querySelectorAll("[hawksearch-next]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.next()}))})),this.rootElement.querySelectorAll("[hawksearch-carousel").forEach((e=>{e.addEventListener("touchstart",(e=>{this.dragElement=e.currentTarget,this.dragOffset=e.changedTouches[0].pageX,this.dragOrigin=this.dragElement.offsetLeft,this.dragElement.style.transition="none"}))})),this.rootElement.querySelectorAll("[hawksearch-carousel-item").forEach((e=>{e.addEventListener("click",(t=>{var n;t.preventDefault();const i=parseInt(null!==(n=e.getAttribute("hawksearch-carousel-item"))&&void 0!==n?n:"");isNaN(i)||this.displayItem(i)}))})),this.displayItem(this.selectedIndex),this.toggleAutorotation(!0)}toggleAutorotation(e){var t,n,i,a,r,s,o,l;this.autorotationTimer&&clearInterval(this.autorotationTimer),e&&(null===(t=this.contentModel)||void 0===t?void 0:t.carousel)&&!1!==(null===(a=null===(i=null===(n=this.configuration)||void 0===n?void 0:n.carousel)||void 0===i?void 0:i.autorotation)||void 0===a?void 0:a.enabled)&&(this.autorotationTimer=setInterval((()=>{this.next()}),null!==(l=null===(o=null===(s=null===(r=this.configuration)||void 0===r?void 0:r.carousel)||void 0===s?void 0:s.autorotation)||void 0===o?void 0:o.interval)&&void 0!==l?l:5e3))}previous(){const e=0===this.selectedIndex?this.data.items.length-this.itemsToDisplay:this.selectedIndex-this.itemsToDisplay;this.displayItem(e)}next(){const e=this.selectedIndex===this.data.items.length-this.itemsToDisplay?0:this.selectedIndex+this.itemsToDisplay;this.displayItem(e)}getSelected(e){return e>=this.selectedIndex&&e<this.selectedIndex+this.itemsToDisplay}displayItem(e){var t,n,i;const a=this.rootElement.querySelector("[hawksearch-carousel]");a&&(null===(n=null===(t=this.data)||void 0===t?void 0:t.items)||void 0===n?void 0:n.length)&&(e<0&&(e=0),e>=this.data.items.length-this.itemsToDisplay&&(e=this.data.items.length-this.itemsToDisplay),this.selectedIndex=e,a.style.left=null!==(i=this.carouselPosition)&&void 0!==i?i:"",this.rootElement.querySelectorAll("[hawksearch-carousel-item]").forEach(((e,t)=>{var n,i,a,r;const s=parseInt(null!==(n=e.getAttribute("hawksearch-carousel-item"))&&void 0!==n?n:""),o=!isNaN(s)&&this.getSelected(s),l=null!==(r=null===(a=null===(i=this.configuration)||void 0===i?void 0:i.carousel)||void 0===a?void 0:a.paginationSelectedCssClass)&&void 0!==r?r:"recommendations__pagination__item--selected";e.classList.toggle(l,o)})))}onWindowResize(e){this.displayType!==this.previousDisplayType&&this.render()}onTouchMove(e){var t,n;if(!this.dragElement||!this.carousel)return;const i=(null!==(t=this.dragOrigin)&&void 0!==t?t:0)+e.changedTouches[0].pageX-(null!==(n=this.dragOffset)&&void 0!==n?n:0);this.dragElement.style.left=`${i}px`}onTouchEnd(e){var t;if(!this.dragElement||!this.carousel)return;const n=this.dragElement.parentElement.offsetWidth/this.itemsToDisplay,i=this.dragElement.offsetLeft-(null!==(t=this.dragOrigin)&&void 0!==t?t:0),a=Math.round(i/n),r=this.selectedIndex-a;this.displayItem(r),this.dragElement.style.transition="",this.dragElement=void 0,this.dragOffset=void 0,this.dragOrigin=void 0}},"recommendations-item":class extends et{constructor(){super(...arguments),this.componentName="recommendations-item",this.defaultHtml='<div class="recommendations__item">\n {{#if pinned}}\n <span class="recommendations__item__pin">\n <hawksearch-icon name="star"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if (lt salePrice price)}}\n <span class="recommendations__item__sale-indicator">{{strings.sale}}</span>\n {{/if}}\n <a hawksearch-link href="{{url}}" class="recommendations__item__image" aria-label="{{title}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <div class="recommendations__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="recommendations__item__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="recommendations__item__price__original">{{currency price}}</span>\n <span class="recommendations__item__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="recommendations__item__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n</div>',this.bindFromEvent=!1}get widgetId(){return this.getAttribute("widget-id")||void 0}get requestId(){return this.getAttribute("request-id")||void 0}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;return Object.assign(Object.assign({},this.data),{description:null!==(t=null===(e=this.data.selectedVariant)||void 0===e?void 0:e.description)&&void 0!==t?t:this.data.description,imageUrl:null!==(i=null===(n=this.data.selectedVariant)||void 0===n?void 0:n.imageUrl)&&void 0!==i?i:this.data.imageUrl,price:null!==(r=null===(a=this.data.selectedVariant)||void 0===a?void 0:a.price)&&void 0!==r?r:this.data.price,rating:null!==(o=null===(s=this.data.selectedVariant)||void 0===s?void 0:s.rating)&&void 0!==o?o:this.data.rating,salePrice:null!==(c=null===(l=this.data.selectedVariant)||void 0===l?void 0:l.salePrice)&&void 0!==c?c:this.data.salePrice,sku:null!==(d=null===(u=this.data.selectedVariant)||void 0===u?void 0:u.sku)&&void 0!==d?d:this.data.sku,title:null!==(p=null===(h=this.data.selectedVariant)||void 0===h?void 0:h.title)&&void 0!==p?p:this.data.title,url:null!==(f=null===(v=this.data.selectedVariant)||void 0===v?void 0:v.url)&&void 0!==f?f:this.data.url,strings:{sale:null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.sale)&&void 0!==k?k:"Sale"}})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;if(!this.data||!this.widgetId||!this.requestId)return;const i=(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.trackUsingVariant)?null===(n=this.data.selectedVariant)||void 0===n?void 0:n.id:void 0,a=null!=i?i:this.data.id;En.trackRecommendationClick(this.widgetId,this.requestId,a)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach((e=>{var t;(null===(t=this.data)||void 0===t?void 0:t.variants)&&(e.data={items:this.data.variants,selectedItem:this.data.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;this.data.selectedVariant=t,this.render()})))}))}},"recent-searches-facet":class extends Wn{constructor(){super(...arguments),this.componentName="recent-searches-facet",this.defaultHtml='<div class="recent-searches-facet">\n <ul class="recent-searches-facet__list">\n {{#each values}}\n <li class="recent-searches-facet__list__item">\n <a hawksearch-query="{{this}}" class="facet__value">{{this}}</a>\n </li>\n {{/each}}\n </ul>\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.map((e=>e.title)))&&void 0!==t?t:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"related-searches-facet":class extends Wn{constructor(){super(...arguments),this.componentName="related-searches-facet",this.defaultHtml='<div class="related-searches-facet">\n <ul class="related-searches-facet__list">\n {{#each values}}\n <li class="related-searches-facet__list__item">\n <a hawksearch-query="{{this}}" class="facet__value">{{this}}</a>\n </li>\n {{/each}}\n </ul>\n</div>'}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.map((e=>e.title)))&&void 0!==t?t:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-query]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-query");t&&Pn.query(t)}))}))}},"search-field":class extends et{constructor(){super(...arguments),this.componentName="search-field",this.defaultHtml='<div class="search-field">\n <input type="text" hawksearch-input value="{{query}}" placeholder="{{strings.placeholder}}" />\n <hawksearch-autocomplete></hawksearch-autocomplete>\n</div>',this.bindFromEvent=!0,this.previousValue=""}get autocompleteMinCharacterCount(){var e,t;return null!==(t=null===(e=HawkSearch.config.autocomplete)||void 0===e?void 0:e.minCharacterCount)&&void 0!==t?t:1}get recommendationsEnabled(){var e,t;return null!==(t=null===(e=HawkSearch.config.autocomplete)||void 0===e?void 0:e.recommendationsEnabled)&&void 0!==t&&t}get disableAutofill(){var e,t,n;return null!==(n=null===(t=null===(e=HawkSearch.config.components)||void 0===e?void 0:e["search-field"])||void 0===t?void 0:t.disableAutofill)&&void 0!==n&&n}connectedCallback(){super.connectedCallback(),this.clickEventHandler=e=>{e.target.closest("hawksearch-search-field")||this.toggleAutocomplete(!1)},this.rootElement.ownerDocument.addEventListener("click",this.clickEventHandler)}disconnectedCallback(){super.disconnectedCallback(),this.rootElement.ownerDocument.removeEventListener("click",this.connectedCallback)}getContentModel(){var e,t,n,i;return{query:null===(e=this.data)||void 0===e?void 0:e.query,strings:{placeholder:null!==(i=null===(n=null===(t=this.configuration)||void 0===t?void 0:t.strings)||void 0===n?void 0:n.placeholder)&&void 0!==i?i:"Enter keywords"}}}onRender(){super.onRender();const e=["Enter","NumpadEnter"];this.rootElement.querySelectorAll("[hawksearch-input]").forEach((t=>{this.disableAutofill&&(t.value=""),t.addEventListener("focus",(e=>{const n=t.value.trim();n&&this.previousAutocompleteResponse?mt.bindComponent(this.previousAutocompleteResponse):n||this.displayDefaultAutocomplete()})),t.addEventListener("keyup",(t=>{if(!e.includes(t.code))return;const n=t.currentTarget.value.trim();this.toggleAutocomplete(!1),Pn.query(n)})),t.addEventListener("keyup",Nn((n=>Kn(this,void 0,void 0,(function*(){const i=t.value.trim();e.includes(n.code)||i===this.previousValue||(this.previousValue=i,this.toggleAutocomplete(!!i),i&&i.length>this.autocompleteMinCharacterCount?this.previousAutocompleteResponse=yield mt.query(i):this.displayDefaultAutocomplete())}))),250))})),this.rootElement.querySelectorAll("hawksearch-autocomplete").forEach((e=>{e.addEventListener("hawksearch:close-autocomplete",(e=>{this.toggleAutocomplete(!1)}))}))}toggleAutocomplete(e){this.rootElement.querySelectorAll("hawksearch-autocomplete").forEach((t=>{t.style.display=e?"block":"none"}))}displayDefaultAutocomplete(){return Kn(this,void 0,void 0,(function*(){if(this.recommendationsEnabled&&!1!==this.defaultAutocompleteResponse){if(void 0===this.defaultAutocompleteResponse){const e=yield mt.query();this.defaultAutocompleteResponse=e||!1}this.defaultAutocompleteResponse&&mt.bindComponent(this.defaultAutocompleteResponse)}}))}},"search-results":class extends et{get mode(){return"landing-page"===this.getAttribute("mode")?"landing-page":"search-results"}get url(){var e;return null!==(e=this.getAttribute("url"))&&void 0!==e?e:window.location.pathname}constructor(){if(super(),this.componentName="search-results",this.defaultHtml='<hawksearch-modified-query></hawksearch-modified-query>\n<hawksearch-query-suggestions></hawksearch-query-suggestions>\n<div class="row">\n <div class="column column--12 column-md--4">\n <hawksearch-content-zone name="LeftTop"></hawksearch-content-zone>\n <hawksearch-facets-list></hawksearch-facets-list>\n <hawksearch-content-zone name="LeftBottom"></hawksearch-content-zone>\n </div>\n <div class="column column--12 column-md--8">\n <hawksearch-content-zone name="Top"></hawksearch-content-zone>\n <hawksearch-content-zone name="Top2"></hawksearch-content-zone>\n <hawksearch-tabs></hawksearch-tabs>\n <hawksearch-selected-facets></hawksearch-selected-facets>\n <div class="row">\n <div class="column column--12 column-sm--6 flex-vertical-sm-center">\n <hawksearch-pagination></hawksearch-pagination>\n </div>\n <div class="column column--12 column-md--6">\n <div class="row row--tight">\n <div class="column column--12 column-sm--6 flex-vertical-sm-center">\n <hawksearch-page-size></hawksearch-page-size>\n </div>\n <div class="column column--12 column-sm--6 flex-vertical-sm-center">\n <hawksearch-sorting></hawksearch-sorting>\n </div>\n </div>\n </div>\n </div>\n <hawksearch-search-results-list></hawksearch-search-results-list>\n <hawksearch-content-zone name="Bottom"></hawksearch-content-zone>\n <hawksearch-content-zone name="Bottom2"></hawksearch-content-zone>\n </div>\n</div>',this.bindFromEvent=!0,"search-results"===this.mode){En.trackPageLoad(_n.Custom);const e=Pn.getRequestFromUrl();Pn.search(e)}}getContentModel(){return Object.assign({},this.data)}},"search-results-item":class extends et{constructor(){super(...arguments),this.componentName="search-results-item",this.defaultHtml='<div class="search-results-list__item search-results-list__item--{{type}}">\n {{#if pinned}}\n <span class="search-results-list__item__pin">\n <hawksearch-icon name="star"></hawksearch-icon>\n </span>\n {{/if}}\n {{#if (eq type "product")}}\n {{#if (lt salePrice price)}}\n <span class="search-results-list__item__sale-indicator">{{strings.sale}}</span>\n {{/if}}\n <a hawksearch-link href="{{url}}" class="search-results-list__item__image" aria-label="{{title}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n <div class="search-results-list__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if rating}}\n <hawksearch-rating rating="{{rating}}"></hawksearch-rating>\n {{/if}}\n {{#unless (eq price undefined)}}\n <div class="search-results-list__item__price" itemprop="offers" itemtype="http://schema.org/Offer" itemscope>\n {{#if (lt salePrice price)}}\n <span class="search-results-list__item__price__original">{{currency price}}</span>\n <span class="search-results-list__item__price__current" itemprop="price">{{currency salePrice}}</span>\n {{else}}\n <span class="search-results-list__item__price-__current" itemprop="price">{{currency price}}</span>\n {{/if}}\n </div>\n {{/unless}}\n <hawksearch-variant-selector></hawksearch-variant-selector>\n {{else}}\n <div class="row">\n {{#if imageUrl}}\n <div class="column column--12 column-sm--4">\n <a hawksearch-link href="{{url}}">\n <img hawksearch-image src="{{imageUrl}}" alt="" />\n </a>\n </div>\n {{/if}}\n <div class="column column--12 column-sm--8 flex-align-self-sm-center">\n <div class="search-results-list__item__title">\n <a hawksearch-link href="{{url}}">{{title}}</a>\n </div>\n {{#if description}}\n <p>{{description}}</p>\n {{/if}}\n </div>\n </div>\n {{/if}}\n</div>',this.bindFromEvent=!1}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;return Object.assign(Object.assign({},this.data),{description:null!==(t=null===(e=this.data.selectedVariant)||void 0===e?void 0:e.description)&&void 0!==t?t:this.data.description,imageUrl:null!==(i=null===(n=this.data.selectedVariant)||void 0===n?void 0:n.imageUrl)&&void 0!==i?i:this.data.imageUrl,price:null!==(r=null===(a=this.data.selectedVariant)||void 0===a?void 0:a.price)&&void 0!==r?r:this.data.price,rating:null!==(o=null===(s=this.data.selectedVariant)||void 0===s?void 0:s.rating)&&void 0!==o?o:this.data.rating,salePrice:null!==(c=null===(l=this.data.selectedVariant)||void 0===l?void 0:l.salePrice)&&void 0!==c?c:this.data.salePrice,sku:null!==(d=null===(u=this.data.selectedVariant)||void 0===u?void 0:u.sku)&&void 0!==d?d:this.data.sku,title:null!==(p=null===(h=this.data.selectedVariant)||void 0===h?void 0:h.title)&&void 0!==p?p:this.data.title,url:null!==(f=null===(v=this.data.selectedVariant)||void 0===v?void 0:v.url)&&void 0!==f?f:this.data.url,strings:{sale:null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.sale)&&void 0!==k?k:"Sale"}})}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-image]").forEach((e=>{e.addEventListener("error",(e=>{e.currentTarget.src=HawkSearch.config.placeholderImageUrl||nt}))})),this.rootElement.querySelectorAll("[hawksearch-link]").forEach((e=>{e.addEventListener("click",(e=>{var t,n;if(!this.data)return;const i=(null===(t=HawkSearch.config.variants)||void 0===t?void 0:t.trackUsingVariant)?null===(n=this.data.selectedVariant)||void 0===n?void 0:n.id:void 0,a=null!=i?i:this.data.id;En.trackSearchResultClick(a,this.data.url,e)}))})),this.rootElement.querySelectorAll("hawksearch-variant-selector").forEach((e=>{var t;(null===(t=this.data)||void 0===t?void 0:t.variants)&&(e.data={items:this.data.variants,selectedItem:this.data.selectedVariant},e.addEventListener("hawksearch:variant-selected",(e=>{const t=e.detail;this.data.selectedVariant=t,this.render()})))}))}},"search-results-list":class extends et{constructor(){super(...arguments),this.componentName="search-results-list",this.defaultHtml='<div class="row search-results-list">\n {{#each items}}\n {{#if (eq type "content")}}\n <div class="column column--12">\n <hawksearch-search-results-item></hawksearch-search-results-item>\n </div>\n {{else}}\n <div class="column column--12 column-sm--6 column-lg--4">\n <hawksearch-search-results-item></hawksearch-search-results-item>\n </div>\n {{/if}}\n {{/each}}\n</div>',this.bindFromEvent=!0}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.length)}getContentModel(){return{items:this.data}}bindChildElements(){super.bindChildElements(),this.rootElement.querySelectorAll("hawksearch-search-results-item").forEach(((e,t)=>{var n;e.data=null===(n=this.data)||void 0===n?void 0:n[t]}))}},"search-within-facet":class extends Wn{constructor(){super(...arguments),this.componentName="search-within-facet",this.defaultHtml='<div class="search-within-facet">\n <input type="text" hawksearch-input value="{{value}}" class="search-within-facet__input" aria-label="{{strings.label}}" />\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i;return{value:null!==(e=this.data.searchWithin)&&void 0!==e?e:"",strings:{label:null!==(i=null===(n=null===(t=this.configuration)||void 0===t?void 0:t.strings)||void 0===n?void 0:n.label)&&void 0!==i?i:"Enter keywords"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-input]").forEach((e=>{e.addEventListener("change",(e=>{e.preventDefault();const t=e.currentTarget.value.trim();Pn.searchWithin(t)}))}))}},"selected-facets":class extends et{constructor(){super(...arguments),this.componentName="selected-facets",this.defaultHtml='<div class="flex-gap flex-gap--xs selected-facets">\n {{#each selections}}\n <span class="selected-facets__item">\n <span class="selected-facets__item__field">{{title}}</span>\n <span class="selected-facets__item__value{{attribute \' selected-facets__item__value--excluded\' excluded}}">{{selectionTitle}}</span>\n <a\n hawksearch-facet-field="{{field}}"\n hawksearch-facet-value="{{selectionValue}}"\n class="selected-facets__item__remove"\n title="{{@root.strings.remove}}"\n >\n <hawksearch-icon name="cross" size="0.9em"></hawksearch-icon>\n </a>\n </span>\n {{/each}}\n</div>',this.bindFromEvent=!0}renderContent(){var e;return!!(null===(e=this.data)||void 0===e?void 0:e.length)}getContentModel(){var e,t,n;const i=[];return this.data.forEach((e=>{e.values.forEach((t=>{var n,a,r,s;let o=t.title;const l=/^(?<min>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)?,(?<max>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)?$/.exec(t.value),c=/^(?:(?<min>\d+(?:\.\d+)?))?,(?:(?<max>\d+(?:\.\d+)?))?$/.exec(t.value);if(l){const e=void 0!==(null===(n=l.groups)||void 0===n?void 0:n.min)?new Date(l.groups.min):void 0,t=void 0!==(null===(a=l.groups)||void 0===a?void 0:a.max)?new Date(l.groups.max):void 0;e&&t&&Tn(e,t)?o=Bn(e):e&&t?o=`${Bn(e)} - ${Bn(t)}`:e?o=`After ${Bn(e)}`:t&&(o=`Before ${Bn(t)}`)}if(c){const t=void 0!==(null===(r=c.groups)||void 0===r?void 0:r.min)?parseFloat(c.groups.min):void 0,n=void 0!==(null===(s=c.groups)||void 0===s?void 0:s.max)?parseFloat(c.groups.max):void 0,i=e.currency?Un:zn;void 0!==t&&void 0!==n?o=t===n?i(t,0):`${i(t,0)} - ${i(n,0)}`:void 0!==t?o=`${i(t,0)} and up`:void 0!==n&&(o=`${i(n,0)} and below`)}i.push({field:e.field,title:e.title,selectionTitle:o,selectionValue:t.value,excluded:t.excluded})}))})),i.sort(((e,t)=>e.field==t.field?e.selectionTitle.localeCompare(t.selectionTitle):e.title.localeCompare(t.title))),{selections:i,strings:{remove:null!==(n=null===(t=null===(e=this.configuration)||void 0===e?void 0:e.strings)||void 0===t?void 0:t.remove)&&void 0!==n?n:"Remove"}}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-facet-field][hawksearch-facet-value]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget,n=t.getAttribute("hawksearch-facet-field"),i=t.getAttribute("hawksearch-facet-value");n&&i&&Pn.removeFacetValue(n,i)}))}))}},"size-facet":class extends Wn{constructor(){super(...arguments),this.componentName="size-facet",this.defaultHtml='<div class="size-facet">\n <div class="row row--tight size-facet__items">\n {{#each values}}\n {{#if visible}}\n <div class="column column--3 size-facet__item{{attribute \' size-facet__item--selected\' selected}}">\n <div hawksearch-facet-value="{{value}}" class="size-facet__item__outer">\n <div hawksearch-facet-value="{{value}}" class="size-facet__item__inner">\n {{title}}\n </div>\n </div>\n {{#if @root.excludeEnabled}}\n <span class="size-facet__item__actions">\n {{#if excluded}}\n <span hawksearch-facet-value-include="{{value}}" class="size-facet__item__actions__item" title="{{@root.strings.include}}">\n <hawksearch-icon name="plus"></hawksearch-icon>\n </span>\n {{else}}\n <span hawksearch-facet-value-exclude="{{value}}" class="size-facet__item__actions__item" title="{{@root.strings.exclude}}">\n <hawksearch-icon name="minus"></hawksearch-icon>\n </span>\n {{/if}}\n </span>\n {{/if}}\n </div>\n {{/if}}\n {{/each}}\n </div>\n {{#if showToggle}}\n <span hawksearch-facet-toggle class="link facet__toggle">{{strings.toggle}}</span>\n {{/if}}\n</div>'}renderContent(){return!!this.data}getContentModel(){var e,t,n,i,a,r,s,o,l,c,u,d,h,p,v,f,g,m,k;const y=this.state.filter?new RegExp(this.state.filter,"i"):void 0;return{values:null!==(t=null===(e=this.data.values)||void 0===e?void 0:e.map(((e,t)=>{var n;return Object.assign(Object.assign({},e),{visible:!y&&(this.state.toggled||!this.data.truncation||t<this.data.truncation.threshold)||!!y&&y.test(null!==(n=e.title)&&void 0!==n?n:"")})})))&&void 0!==t?t:[],showToggle:!!this.data.truncation&&(null!==(i=null===(n=this.data.values)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>this.data.truncation.threshold&&!this.state.filter,expanded:null!==(a=this.state.toggled)&&void 0!==a&&a,excludeEnabled:null!==(s=null===(r=this.configuration)||void 0===r?void 0:r.excludeEnabled)&&void 0!==s&&s,strings:{exclude:null!==(c=null===(l=null===(o=this.configuration)||void 0===o?void 0:o.strings)||void 0===l?void 0:l.exclude)&&void 0!==c?c:"Exclude",include:null!==(h=null===(d=null===(u=this.configuration)||void 0===u?void 0:u.strings)||void 0===d?void 0:d.include)&&void 0!==h?h:"Include",toggle:this.state.toggled?null!==(f=null===(v=null===(p=this.configuration)||void 0===p?void 0:p.strings)||void 0===v?void 0:v.showFewer)&&void 0!==f?f:"Show fewer":null!==(k=null===(m=null===(g=this.configuration)||void 0===g?void 0:g.strings)||void 0===m?void 0:m.showMore)&&void 0!==k?k:"Show more"}}}},sorting:class extends et{constructor(){super(...arguments),this.componentName="sorting",this.defaultHtml='<div class="sorting">\n <select hawksearch-sort>\n {{#each options}}\n {{#if selected}}\n <option value="{{value}}" selected>{{title}}</option>\n {{else}}\n <option value="{{value}}">{{title}}</option>\n {{/if}}\n {{/each}}\n </select>\n</div>',this.bindFromEvent=!0}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.options)||void 0===t?void 0:t.length)}getContentModel(){return{options:this.data.options}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-sort]").forEach((e=>{e.addEventListener("change",(e=>{e.preventDefault();const t=e.currentTarget.value;Pn.sort(t)}))}))}},tabs:class extends et{constructor(){super(...arguments),this.componentName="tabs",this.defaultHtml='<ul class="tabs{{attribute \' tabs--list\' (gt tabs.length 4)}}">\n {{#each tabs}}\n <li class="tabs__item{{attribute \' tabs__item--selected\' selected}}" hawksearch-tab-value="{{value}}">\n {{title}}\n {{#if @root.displayCount}}({{count}}){{/if}}\n </li>\n {{/each}}\n</ul>',this.bindFromEvent=!0}renderContent(){var e,t;return!!(null===(t=null===(e=this.data)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)}getContentModel(){var e,t;return{displayCount:null===(e=this.data.displayCount)||void 0===e||e,tabs:null!==(t=this.data.values)&&void 0!==t?t:[]}}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-tab-value]").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget.getAttribute("hawksearch-tab-value");Pn.selectTab(null!=t?t:void 0)}))}))}},tooltip:class extends et{constructor(){super(...arguments),this.componentName="tooltip",this.defaultHtml='<span class="tooltip" hawksearch-tooltip>\n <span class="tooltip__icon">\n <hawksearch-icon name="help" class="facet__heading__tooltip"></hawksearch-icon>\n </span>\n <span class="tooltip__content" hawksearch-tooltip-content>{{text}}</span>\n</span>',this.bindFromEvent=!1}get text(){var e;return null!==(e=this.getAttribute("text"))&&void 0!==e?e:void 0}renderContent(){return!!this.text}getContentModel(){return{text:this.text}}onRender(){var e;super.onRender(),null===(e=this.rootElement.querySelector("[hawksearch-tooltip]"))||void 0===e||e.addEventListener("mouseover",(e=>{const t=e.currentTarget,n=this.rootElement.querySelector("[hawksearch-tooltip-content]");if(!n)return;n.style.removeProperty("top"),n.style.removeProperty("right");const i=window.innerWidth,a=t.getBoundingClientRect(),r=a.x+a.width;n.style.top=`${a.top}px`,i-r<370&&(n.style.right="20px")}))}},"variant-selector":class extends et{constructor(){super(...arguments),this.componentName="variant-selector",this.defaultHtml='{{#if (arrayHasObjectsWithValue items "color")}}\n <div class="variant-selector-list">\n {{#each (arrayFilterObjects items "color")}}\n <div\n hawksearch-variant="{{id}}"\n class="variant-selector-list__item{{attribute \' variant-selector-list__item--selected\' (eq id @root.selectedItem.id)}}"\n title="{{color.name}}"\n >\n {{#if color.imageUrl}}\n <img src="{{color.imageUrl}}" class="variant-selector-list__item__image" alt="{{color.name}}" title="{{color.name}}" />\n {{else}}\n <div class="variant-selector-list__item__box" style="background: {{color.hex}};"></div>\n {{/if}}\n </div>\n {{/each}}\n </div>\n{{/if}}',this.bindFromEvent=!1}renderContent(){return!!this.data&&this.data.items.length>1}getContentModel(){return Object.assign({},this.data)}onRender(){super.onRender(),this.rootElement.querySelectorAll("[hawksearch-variant]").forEach((e=>{e.addEventListener("click",(e=>{var t;if(!this.data)return;const n=null!==(t=e.currentTarget.getAttribute("hawksearch-variant"))&&void 0!==t?t:void 0;if(void 0===n)return;const i=this.data.items.find((e=>e.id===n));i&&this.dispatchEvent(new CustomEvent("hawksearch:variant-selected",{detail:i}))}))}))}}};Object.entries(Yn).forEach((([e,t])=>{customElements.define(`hawksearch-${e}`,t)})),window.addEventListener("popstate",(e=>{const t=e.state;HawkSearch.searchRequest=t.searchRequest,HawkSearch.searchResponse=t.searchResponse,Pn.bindComponents(t.searchResponse)})),window.dispatchEvent(new CustomEvent("hawksearch:initialized"))})()})();
|
|
3
3
|
//# sourceMappingURL=index.js.map
|