diff --git a/dist/addsearch-search-ui.min.js b/dist/addsearch-search-ui.min.js index ba0ee7f..33d18de 100644 --- a/dist/addsearch-search-ui.min.js +++ b/dist/addsearch-search-ui.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AddSearchUI=e():t.AddSearchUI=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";var r=n(21),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function s(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function o(t,e,n){var i;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(o)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var c=t,u=e,l=[],h=l,p=!1;function f(){h===l&&(h=l.slice())}function d(){if(p)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function g(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(p)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return f(),h.push(t),function(){if(e){if(p)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,f();var n=h.indexOf(t);h.splice(n,1),l=null}}}function v(t){if(!s(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,u=c(u,t)}finally{p=!1}for(var e=l=h,n=0;n0&&void 0!==arguments[0]?arguments[0]:d,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case f.c:return Object.assign({},t,{pendingRequests:t.pendingRequests+1});case f.h:return Object.assign({},t,{suggestions:[],activeSuggestionIndex:null});case f.i:return Object.assign({},t,{pendingRequests:t.pendingRequests-1,suggestions:e.results.suggestions,activeSuggestionIndex:null,visible:!0});case f.e:return Object.assign({},t,{searchResults:{}});case f.f:var n=Object.assign({},t.searchResults);return n[e.jsonKey]=e.results.hits,Object.assign({},t,{pendingRequests:t.pendingRequests-1,searchResults:n,visible:!0});case f.d:return Object.assign({},t,{visible:!1,activeSuggestionIndex:null});case f.g:return Object.assign({},t,{visible:!0});case f.j:return Object.assign({},t,{hideAutomatically:e.hideAutomatically});case f.l:return Object.assign({},t,{activeSuggestionIndex:e.index,setSuggestionToSearchField:e.setSuggestionToSearchField});case f.k:var r=t.activeSuggestionIndex;return e.direction===f.a?null===r&&t.suggestions.length>0?r=0:r===t.suggestions.length-1?r=null:r+=1:e.direction===f.b&&(null===r&&t.suggestions.length>0?r=t.suggestions.length-1:0===r?r=null:r-=1),Object.assign({},t,{visible:!0,activeSuggestionIndex:r,setSuggestionToSearchField:!0});default:return t}},filters:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case g.b:var n=t.allAvailableFilters.slice(),r=Object.assign({},e.filterObj.options);return n.push(r),Object.assign({},t,{allAvailableFilters:n});case g.f:var i=Object.assign({},t.activeFilters);return i[e.filterName]?delete i[e.filterName]:i[e.filterName]=e.value,Object.assign({},t,{activeFilters:i,refreshSearch:!1!==e.refreshSearch});case g.a:return Object.assign({},t,{activeFacets:{},activeFilters:{},refreshSearch:!1!==e.refreshSearch});case g.d:return Object.assign({},t,{activeFilters:e.json||{},refreshSearch:!1});case g.c:return Object.assign({},t,{activeFacets:e.json||{},refreshSearch:!1});case g.e:var a=Object.assign({},t.activeFacets);return a[e.field]||(a[e.field]={}),a[e.field][e.value]?delete a[e.field][e.value]:a[e.field][e.value]="true",a.v=a.v?a.v+1:1,Object.assign({},t,{activeFacets:a,refreshSearch:!0});default:return t}},keyword:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case b.a:return Object.assign({},t,{value:e.value,skipAutocomplete:!0===e.skipAutocomplete,searchFieldContainerId:e.searchFieldContainerId});default:return t}},pagination:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case y.a:return Object.assign({},t,{page:e.page});default:return t}},search:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case O.e:return Object.assign({},t,{started:!0});case O.a:return Object.assign({},t,{keyword:null,results:{},loading:!1});case O.b:return Object.assign({},t,{loading:!0});case O.c:return t.started||console.log("WARNING: AddSearch UI not started with the start() function"),0===e.keyword.indexOf(k.WARMUP_QUERY_PREFIX)?Object.assign({},t,{loading:!1}):Object.assign({},t,{keyword:e.keyword,results:e.results,loading:!1});case O.d:return Object.assign({},t,{searchResultsPageUrl:e.url});default:return t}},segmentedsearch:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case E.a:if(0===e.keyword.indexOf(k.WARMUP_QUERY_PREFIX))return t;var n={};return n[e.jsonKey]=e.results,Object.assign({},t,n);default:return t}},sortby:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case w.b:return Object.assign({},t,{field:e.field,order:e.order});default:return t}}});function A(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var C=A();C.withExtraArgument=A;var I,R=C;function L(t){if(t.reduxStore)I=reduxStore;else{var e=p;t.debug&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&(e=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__),I=o(x,e(function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&(n[e[0]]=decodeURIComponent(e[1]))})),n}function f(t){try{return JSON.parse(t)}catch(t){}return null}function d(t){return Object.keys(t).length>0?JSON.stringify(t):null}function g(t,e){window.location.href=t+"?"+c.SEARCH+"="+encodeURIComponent(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var r=n(5),i="SET_PAGE";function a(t,e){Object(r.e)(r.a.PAGE,e+"");var n=t.getSettings().paging;return t.setPaging(e,n.pageSize,n.sortBy,n.sortOrder),{type:i,page:e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r="KEYWORD";function i(t,e,n){return{type:r,value:t,skipAutocomplete:e,searchFieldContainerId:n||null}}},function(t,e,n){"use strict";e.__esModule=!0,e.extend=o,e.indexOf=function(t,e){for(var n=0,r=t.length;n":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,a=/[&<>"'`=]/;function s(t){return r[t]}function o(t){for(var e=1;e \n {{#each active}}\n
{{label}}
\n {{/each}}\n {{#if clearAll}}\n {{#gt active.length 1}}\n
\n {{/gt}}\n {{/if}}\n \n',h),f=p.querySelectorAll("[data-type]"),d=0;d\n
    \n {{#each facets}}\n
  • \n \n
  • \n {{/each}}\n
\n \n',l).getElementsByTagName("input"),p=0;p0&&e.and.push(i)})),t.activeFacets){var i={or:[]};for(var a in t.activeFacets[r]){var s={};s[r]=encodeURIComponent(a),i.or.push(s)}i.or.length>0&&e.and.push(i)}return e.and.length>0?e:null}var k=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e,this.createFilterObjectFunction=n,this.onFilterChange=r,Object(o.c)(Object(o.a)(),"filters",(function(t){return i.onFilterStateChange(t)}))}var e,n,r;return e=t,(n=[{key:"onFilterStateChange",value:function(t){if(t.refreshSearch){Object(m.e)(m.a.FILTERS,Object(m.c)(t.activeFilters)),Object(m.e)(m.a.FACETS,Object(m.c)(t.activeFacets));var e=this.createFilterObjectFunction(t);this.client.setFilterObject(e);var n=Object(o.a)().getState().keyword.value;Object(o.a)().dispatch(Object(f.b)(this.client,1)),Object(o.a)().dispatch(Object(d.g)(this.client,n,null))}this.onFilterChange&&this.onFilterChange(t.activeFilters)}}])&&y(e.prototype,n),r&&y(e,r),t}();n(58);function O(t,e){for(var n=0;ne)return null;for(var n=[],r=0;r9&&t<7)return n.slice(0,9);if(e>9&&t>=e-3)return n.slice(e-9);var i=n.indexOf(t);return i-4>=0&&i+5<=n.length?n.slice(i-4,i+5):null}(n,Math.ceil(i/r)),c={currentPage:n,lastPage:a?a[a.length-1]:0,pages:a},u=Object(s.b)(this.conf.containerId,this.conf.template||'\n
\n {{#gt currentPage 1}}\n \n {{/gt}}\n {{#each pages}}\n \n {{/each}}\n {{#lt currentPage lastPage}}\n \n {{/lt}}\n
\n',c).getElementsByTagName("button"),l=0;l0&&t.setSuggestionToSearchField)if(null!==t.activeSuggestionIndex&&t.setSuggestionToSearchField){var e=t.suggestions[t.activeSuggestionIndex].value;this.render(e)}else null===t.activeSuggestionIndex&&this.render(Object(o.a)().getState().keyword.value)}},{key:"executeSearch",value:function(t,e){var n=e;""===n&&this.matchAllQuery&&(n=K);var r=Object(o.a)();0!==n.indexOf(V)&&r.dispatch(Object(f.b)(t,1)),this.onSearch(n)}},{key:"redirectOrSearch",value:function(t){var e=Object(o.a)().getState().search.searchResultsPageUrl;e&&!0!==this.conf.ignoreSearchResultsPageUrl&&t&&t.length>0?Object(m.d)(e,t):this.executeSearch(this.client,t)}},{key:"render",value:function(t){var e=this,n=document.getElementById(this.conf.containerId);n.querySelector("input")?null!==t&&t!==K&&n.querySelector("input").value!==t&&(n.querySelector("input").value=t):(n.innerHTML=P.a.compile(this.conf.template||'\n
\n \n
\n')(this.conf),this.field=n.querySelector("input"),t!==K&&(this.field.value=t),this.field.oninput=function(t){return e.oninput(t)},this.field.onkeypress=function(t){return e.onkeypress(t)},this.field.onkeyup=function(t){return e.onkeyup(t)},this.field.onfocus=function(t){return e.onfocus(t)},this.field.onblur=function(t){return setTimeout((function(){return e.onblur()}),200)},n.querySelector("button")&&(n.querySelector("button").onclick=function(t){var n=e.field.value;Object(o.a)().dispatch(Object(j.b)(n,!0)),Object(o.a)().dispatch(Object(w.m)()),e.redirectOrSearch(n)}),n.querySelector("form")&&(n.querySelector("form").onsubmit=function(t){return t.preventDefault()}),!1!==this.conf.autofocus&&!1===this.firstRenderDone&&(this.field.focus(),this.firstRenderDone=!0))}},{key:"oninput",value:function(t){var e=Object(o.a)(),n=t.target.value;""===n&&this.matchAllQuery&&(n=K),t.keyCode!==R&&t.keyCode!==L||e.dispatch(Object(w.r)(null,!1));var r=!0===this.conf.ignoreAutocomplete;e.dispatch(Object(j.b)(n,r,this.conf.containerId)),!0===this.conf.searchAsYouType&&this.executeSearch(this.client,n)}},{key:"onkeyup",value:function(t){var e=Object(o.a)();t.keyCode===A?e.dispatch(Object(w.q)(w.a)):t.keyCode===C&&e.dispatch(Object(w.q)(w.b))}},{key:"onkeypress",value:function(t){if(t.keyCode===I){var e=Object(o.a)(),n=t.target.value;e.dispatch(Object(j.b)(n,!0)),e.dispatch(Object(w.m)()),this.redirectOrSearch(n)}}},{key:"onfocus",value:function(t){""===t.target.value&&(this.executeSearch(this.client,V+Math.random()),Object(o.a)().dispatch(Object(w.o)()))}},{key:"onblur",value:function(){Object(o.a)().getState().autocomplete.hideAutomatically&&Object(o.a)().dispatch(Object(w.m)())}}])&&x(e.prototype,n),r&&x(e,r),t}(),N=(n(60),n(15)),F=n(13);function M(t,e){for(var n=0;n\n {{#gt page 1}}Page {{../page}} of {{/gt}}\n {{total_hits}} search results\n \n');var i=this.conf.categorySelectionFunction||F.a;P.a.registerHelper("selectCategory",(function(t){return i(t,r.conf.categoryAliases)})),Object(s.c)(n.containerId)&&Object(o.c)(Object(o.a)(),"search",(function(){return r.render()}))}var e,n,r;return e=t,(n=[{key:"render",value:function(){var t=Object(o.a)().getState().search,e=t.results||{};e.resultcount=e.hits&&!1!==this.conf.showNumberOfResults,e.keyword=t.keyword;var n=this.conf.template||'\n
\n {{#if resultcount}}\n {{> numberOfResultsTemplate }}\n {{/if}}\n \n {{#each hits}}\n
\n

\n {{title}}\n

\n
\n \n {{#if images.main}}{{title}}{{else}}{{/if}}\n \n {{{highlight}}}..\n
\n
\n {{selectCategory this}}\n
\n
\n {{/each}}\n
\n';e.hits&&0===e.hits.length&&(n=this.conf.template_noresults||'\n
\n

No search results with keyword {{keyword}}

\n
\n');var r=Object(s.b)(this.conf.containerId,n,e).querySelectorAll("[data-analytics-click]");Object(N.a)(this.client,r,e)}}])&&M(e.prototype,n),r&&M(e,r),t}();function H(t,e){for(var n=0;ni?n[i]:"").replace(/^[0-9]+[x]{1}/,""),i++}while(r.length<3&&n.length>i);return e&&e[r]?e[r]:r.replace(/[-_]+/g," ")}var s=null;function o(){var t=this;c("equals",(function(e,n,r){return e+""==n+""?r.fn(t):r.inverse(t)})),c("not",(function(e,n,r){return e+""!=n+""?r.fn(t):r.inverse(t)})),c("gt",(function(e,n,r){return e>n?r.fn(t):r.inverse(t)})),c("lt",(function(e,n,r){return e0)for(var r=0;r= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function l(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:c.default,log:c.default.log,registerHelper:function(t,e){if("[object Object]"===i.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple helpers");i.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===i.toString.call(t))i.extend(this.partials,t);else{if(void 0===e)throw new a.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===i.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple decorators");i.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){u.resetLoggedProperties()}};var h=c.default.log;e.log=h,e.createFrame=i.createFrame,e.logger=c.default},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);n(56);var r=n(10),i=n.n(r),a=n(1),s=n(4),o=n(7),c=n(0),u=n(2),l=n(15),h=n(5),p=n(13);function f(t,e){for(var n=0;n\n {{#gt suggestions.length 0}}\n
    \n {{#each ../suggestions}}\n
  • \n {{value}}\n
  • \n {{/each}}\n
\n {{/gt}}\n \n',i),s=a.querySelector(".suggestions")?a.querySelectorAll(".suggestions > li"):[],o=0;o\n
\n {{#each options}}\n \n {{/each}}\n
\n \n':this.conf.type===c.TAGS?u='\n
\n {{#each options}}\n \n {{/each}}\n
\n':this.conf.type===c.CHECKBOX_GROUP?u='\n
\n {{#each options}}\n \n {{/each}}\n
\n':this.conf.type===c.RADIO_GROUP?u='\n
\n {{#each options}}\n \n {{/each}}\n
\n':this.conf.type===c.SELECT_LIST&&(u='\n
\n \n
\n');var l=Object(a.b)(this.conf.containerId,this.conf.template||u,n);if(this.conf.type===c.SELECT_LIST)l.querySelector("select").addEventListener("change",(function(t){return e.singleActiveChangeEvent(t.target.value)}));else if(this.conf.type===c.TABS)for(var h=l.querySelectorAll("[data-filter]"),p=0;p\n {{#each options}}\n \n {{/each}}\n \n':'\n
\n \n
\n';var a=Object.assign({},this.conf);a.options.forEach((function(t){t.sortBy===n&&t.order===r?t.active=!0:t.active=!1}));var s=Object(o.b)(this.conf.containerId,i,a);if(this.conf.type===l.RADIO_GROUP)for(var c=s.querySelectorAll("input"),u=0;u=0?e:parseInt(t,10)}return t},log:function(t){if(t=i.lookupLevel(t),"undefined"!=typeof console&&i.lookupLevel(i.level)<=t){var e=i.methodMap[t];console[e]||(e="log");for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):i(this);if(n.data&&n.ids){var s=r.createFrame(n.data);s.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:s}}return a(e,n)}))},t.exports=e.default},function(t,e,n){"use strict";(function(r){e.__esModule=!0;var i,a=n(8),s=n(9),o=(i=s)&&i.__esModule?i:{default:i};e.default=function(t){t.registerHelper("each",(function(t,e){if(!e)throw new o.default("Must pass iterator to #each");var n,i=e.fn,s=e.inverse,c=0,u="",l=void 0,h=void 0;function p(e,n,r){l&&(l.key=e,l.index=n,l.first=0===n,l.last=!!r,h&&(l.contextPath=h+e)),u+=i(t[e],{data:l,blockParams:a.blockParams([t[e],e],[h+e,null])})}if(e.data&&e.ids&&(h=a.appendContextPath(e.data.contextPath,e.ids[0])+"."),a.isFunction(t)&&(t=t.call(this)),e.data&&(l=a.createFrame(e.data)),t&&"object"==typeof t)if(a.isArray(t))for(var f=t.length;c=o.LAST_COMPATIBLE_COMPILER_REVISION&&e<=o.COMPILER_REVISION)return;if(e2&&S.push("'"+this.terminals_[b]+"'");_=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:l,expected:S})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+p);switch(g[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),p=null,f?(p=f,f=null):(c=this.lexer.yyleng,s=this.lexer.yytext,o=this.lexer.yylineno,l=this.lexer.yylloc,u>0&&u--);break;case 2:if(m=this.productions_[g[1]][1],O.$=r[r.length-m],O._$={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},h&&(O._$.range=[i[i.length-(m||1)].range[0],i[i.length-1].range[1]]),void 0!==(v=this.performAction.call(O,s,c,o,this.yy,g[1],r,i)))return v;m&&(n=n.slice(0,-1*m*2),r=r.slice(0,-1*m),i=i.slice(0,-1*m)),n.push(this.productions_[g[1]][0]),r.push(O.$),i.push(O._$),y=a[n[n.length-2]][n[n.length-1]],n.push(y);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,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 t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,n,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),s=0;se[0].length)||(e=n,r=s,this.options.flex));s++);return e?((i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,a[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||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 t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},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(t){this.begin(t)},options:{},performAction:function(t,e,n,r){function i(t,n){return e.yytext=e.yytext.substring(t,e.yyleng-n+t)}switch(n){case 0:if("\\\\"===e.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1: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:(i(5,9),"END_RAW_BLOCK");case 5:return 15;case 6: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:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=i(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 41:return 72;case 42:return e.yytext=e.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}}};return t}();function n(){this.yy={}}return t.lexer=e,n.prototype=t,t.Parser=n,new n}();e.default=r,t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(27),a=(r=i)&&r.__esModule?r:{default:r};function s(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function o(t,e,n){void 0===e&&(e=t.length);var r=t[e-1],i=t[e-2];return r?"ContentStatement"===r.type?(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original):void 0:n}function c(t,e,n){void 0===e&&(e=-1);var r=t[e+1],i=t[e+2];return r?"ContentStatement"===r.type?(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original):void 0:n}function u(t,e,n){var r=t[null==e?0:e+1];if(r&&"ContentStatement"===r.type&&(n||!r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function l(t,e,n){var r=t[null==e?t.length-1:e-1];if(r&&"ContentStatement"===r.type&&(n||!r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}s.prototype=new a.default,s.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,a=r.length;i0)throw new a.default("Invalid path: "+r,{loc:n});".."===u&&s++}}return{type:"PathExpression",data:t,depth:s,parts:i,original:r,loc:n}},e.prepareMustache=function(t,e,n,r,i,a){var s=r.charAt(3)||r.charAt(2),o="{"!==s&&"&"!==s;return{type:/\*/.test(r)?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:o,strip:i,loc:this.locInfo(a)}},e.prepareRawBlock=function(t,e,n,r){s(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}},e.prepareBlock=function(t,e,n,r,i,o){r&&r.path&&s(t,r);var c=/\*/.test(t.open);e.blockParams=t.blockParams;var u=void 0,l=void 0;if(n){if(c)throw new a.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),l=n.strip,u=n.program}i&&(i=u,u=e,e=i);return{type:c?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:u,openStrip:t.strip,inverseStrip:l,closeStrip:r&&r.strip,loc:this.locInfo(o)}},e.prepareProgram=function(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,n,r){return s(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}};var r,i=n(9),a=(r=i)&&r.__esModule?r:{default:r};function s(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new a.default(t.path.original+" doesn't match "+e,n)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.Compiler=c,e.precompile=function(t,e,n){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new i.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var r=n.parse(t,e),a=(new n.Compiler).compile(r,e);return(new n.JavaScriptCompiler).compile(a,e)},e.compile=function(t,e,n){void 0===e&&(e={});if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new i.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=a.extend({},e))||(e.data=!0);e.compat&&(e.useDepths=!0);var r=void 0;function s(){var r=n.parse(t,e),i=(new n.Compiler).compile(r,e),a=(new n.JavaScriptCompiler).compile(i,e,void 0,!0);return n.template(a)}function o(t,e){return r||(r=s()),r.call(this,t,e)}return o._setup=function(t){return r||(r=s()),r._setup(t)},o._child=function(t,e,n,i){return r||(r=s()),r._child(t,e,n,i)},o};var i=r(n(9)),a=n(8),s=r(n(26)),o=[].slice;function c(){}function u(t,e){if(t===e)return!0;if(a.isArray(t)&&a.isArray(e)&&t.length===e.length){for(var n=0;n1)throw new i.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=t.name.original,a="SubExpression"===t.name.type;a&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",a,r,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){l(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,n){var r=t.path,i=r.parts[0],a=null!=e||null!=n;this.opcode("getContext",r.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",i,a)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,n){var r=this.setupFullMustacheParams(t,e,n),a=t.path,o=a.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",r.length,o);else{if(this.options.knownHelpersOnly)throw new i.default("You specified knownHelpersOnly, but used the unknown helper "+o,t);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",r.length,a.original,s.default.helpers.simpleId(a))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],n=s.default.helpers.scopedId(t),r=!t.depth&&!n&&this.blockParamIndex(e);r?this.opcode("lookupBlockParam",r,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,n=0,r=e.length;for(this.opcode("pushHash");n=0)return[e,i]}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(16),a=r(n(9)),s=n(8),o=r(n(54));function c(t){this.value=t}function u(){}u.prototype={nameLookup:function(t,e){return this.internalNameLookup(t,e)},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=i.COMPILER_REVISION;return[t,i.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,n){return s.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,e){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(e),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,e,n,r){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,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(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,s=void 0,o=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c0&&(n+=", "+r.join(", "));var i=0;Object.keys(this.aliases).forEach((function(t){var r=e.aliases[t];r.children&&r.referenceCount>1&&(n+=", alias"+ ++i+"="+t,r.children[0]="alias"+i)})),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var s=this.mergeSource(n);return t?(a.push(s),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",s,"}"])},mergeSource:function(t){var e=this.environment.isSimple,n=!this.forceBuffer,r=void 0,i=void 0,a=void 0,s=void 0;return this.source.each((function(t){t.appendToBuffer?(a?t.prepend(" + "):a=t,s=t):(a&&(i?a.prepend("buffer += "):r=!0,s.add(";"),a=s=void 0),i=!0,e||(n=!1))})),n?a?(a.prepend("return "),s.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(r?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(r?"":";\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(t){var e=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(e,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var n=this.topStack();e.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack((function(t){return[" != null ? ",t,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,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(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,n,r){var i=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[i++])),this.resolvePath("context",t,i,e,n)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,n)},resolvePath:function(t,e,n,r,i){var a=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,n,r){var i=e.popStack(),a=0,s=n.length;t&&s--;for(;athis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,n=t.length;e0&&void 0!==arguments[0]?arguments[0]:d,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case f.c:return Object.assign({},t,{pendingRequests:t.pendingRequests+1});case f.h:return Object.assign({},t,{suggestions:[],activeSuggestionIndex:null});case f.i:return Object.assign({},t,{pendingRequests:t.pendingRequests-1,suggestions:e.results.suggestions,activeSuggestionIndex:null,visible:!0});case f.e:return Object.assign({},t,{searchResults:{}});case f.f:var n=Object.assign({},t.searchResults);return n[e.jsonKey]=e.results.hits,Object.assign({},t,{pendingRequests:t.pendingRequests-1,searchResults:n,visible:!0});case f.d:return Object.assign({},t,{visible:!1,activeSuggestionIndex:null});case f.g:return Object.assign({},t,{visible:!0});case f.j:return Object.assign({},t,{hideAutomatically:e.hideAutomatically});case f.l:return Object.assign({},t,{activeSuggestionIndex:e.index,setSuggestionToSearchField:e.setSuggestionToSearchField});case f.k:var r=t.activeSuggestionIndex;return e.direction===f.a?null===r&&t.suggestions.length>0?r=0:r===t.suggestions.length-1?r=null:r+=1:e.direction===f.b&&(null===r&&t.suggestions.length>0?r=t.suggestions.length-1:0===r?r=null:r-=1),Object.assign({},t,{visible:!0,activeSuggestionIndex:r,setSuggestionToSearchField:!0});default:return t}},filters:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case g.b:var n=t.allAvailableFilters.slice(),r=Object.assign({},e.filterObj.options);return n.push(r),Object.assign({},t,{allAvailableFilters:n});case g.f:var i=Object.assign({},t.activeFilters);return i[e.filterName]?delete i[e.filterName]:i[e.filterName]=e.value,Object.assign({},t,{activeFilters:i,refreshSearch:!1!==e.refreshSearch});case g.a:return Object.assign({},t,{activeFacets:{},activeFilters:{},refreshSearch:!1!==e.refreshSearch});case g.d:return Object.assign({},t,{activeFilters:e.json||{},refreshSearch:!1});case g.c:return Object.assign({},t,{activeFacets:e.json||{},refreshSearch:!1});case g.e:var a=Object.assign({},t.activeFacets);return a[e.field]||(a[e.field]={}),a[e.field][e.value]?delete a[e.field][e.value]:a[e.field][e.value]="true",a.v=a.v?a.v+1:1,Object.assign({},t,{activeFacets:a,refreshSearch:!0});default:return t}},keyword:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case b.a:return Object.assign({},t,{value:e.value,skipAutocomplete:!0===e.skipAutocomplete,searchFieldContainerId:e.searchFieldContainerId});default:return t}},pagination:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case y.a:return Object.assign({},t,{page:e.page});default:return t}},search:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case O.e:return Object.assign({},t,{started:!0});case O.a:return Object.assign({},t,{keyword:null,results:{},loading:!1});case O.b:return Object.assign({},t,{loading:!0});case O.c:return t.started||console.log("WARNING: AddSearch UI not started with the start() function"),0===e.keyword.indexOf(k.WARMUP_QUERY_PREFIX)?Object.assign({},t,{loading:!1}):Object.assign({},t,{keyword:e.keyword,results:e.results,loading:!1});case O.d:return Object.assign({},t,{searchResultsPageUrl:e.url});default:return t}},segmentedsearch:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case E.a:if(0===e.keyword.indexOf(k.WARMUP_QUERY_PREFIX))return t;var n={};return n[e.jsonKey]=e.results,Object.assign({},t,n);default:return t}},sortby:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case w.b:return Object.assign({},t,{field:e.field,order:e.order});default:return t}}});function A(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var C=A();C.withExtraArgument=A;var I,R=C;function L(t){if(t.reduxStore)I=reduxStore;else{var e=p;t.debug&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&(e=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__),I=o(x,e(function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&(n[e[0]]=decodeURIComponent(e[1]))})),n}function f(t){try{return JSON.parse(t)}catch(t){}return null}function d(t){return Object.keys(t).length>0?JSON.stringify(t):null}function g(t,e){window.location.href=t+"?"+c.SEARCH+"="+encodeURIComponent(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var r=n(5),i="SET_PAGE";function a(t,e){Object(r.e)(r.a.PAGE,e+"");var n=t.getSettings().paging;return t.setPaging(e,n.pageSize,n.sortBy,n.sortOrder),{type:i,page:e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r="KEYWORD";function i(t,e,n){return{type:r,value:t,skipAutocomplete:e,searchFieldContainerId:n||null}}},function(t,e,n){"use strict";e.__esModule=!0,e.extend=o,e.indexOf=function(t,e){for(var n=0,r=t.length;n":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,a=/[&<>"'`=]/;function s(t){return r[t]}function o(t){for(var e=1;e \n {{#each active}}\n
{{label}}
\n {{/each}}\n {{#if clearAll}}\n {{#gt active.length 1}}\n
\n {{/gt}}\n {{/if}}\n \n',h),f=p.querySelectorAll("[data-type]"),d=0;d\n
    \n {{#each facets}}\n
  • \n \n
  • \n {{/each}}\n
\n \n',l).getElementsByTagName("input"),p=0;p0&&e.and.push(i)})),t.activeFacets){var i={or:[]};for(var a in t.activeFacets[r]){var s={};s[r]=encodeURIComponent(a),i.or.push(s)}i.or.length>0&&e.and.push(i)}return e.and.length>0?e:null}var k=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e,this.createFilterObjectFunction=n,this.onFilterChange=r,Object(o.c)(Object(o.a)(),"filters",(function(t){return i.onFilterStateChange(t)}))}var e,n,r;return e=t,(n=[{key:"onFilterStateChange",value:function(t){if(t.refreshSearch){Object(m.e)(m.a.FILTERS,Object(m.c)(t.activeFilters)),Object(m.e)(m.a.FACETS,Object(m.c)(t.activeFacets));var e=this.createFilterObjectFunction(t);this.client.setFilterObject(e);var n=Object(o.a)().getState().keyword.value;Object(o.a)().dispatch(Object(f.b)(this.client,1)),Object(o.a)().dispatch(Object(d.g)(this.client,n,null))}this.onFilterChange&&this.onFilterChange(t.activeFilters)}}])&&y(e.prototype,n),r&&y(e,r),t}();n(58);function O(t,e){for(var n=0;ne)return null;for(var n=[],r=0;r9&&t<7)return n.slice(0,9);if(e>9&&t>=e-3)return n.slice(e-9);var i=n.indexOf(t);return i-4>=0&&i+5<=n.length?n.slice(i-4,i+5):null}(n,Math.ceil(i/r)),c={currentPage:n,lastPage:a?a[a.length-1]:0,pages:a},u=Object(s.b)(this.conf.containerId,this.conf.template||'\n
\n {{#gt currentPage 1}}\n \n {{/gt}}\n {{#each pages}}\n \n {{/each}}\n {{#lt currentPage lastPage}}\n \n {{/lt}}\n
\n',c).getElementsByTagName("button"),l=0;l0&&t.setSuggestionToSearchField)if(null!==t.activeSuggestionIndex&&t.setSuggestionToSearchField){var e=t.suggestions[t.activeSuggestionIndex].value;this.render(e)}else null===t.activeSuggestionIndex&&this.render(Object(o.a)().getState().keyword.value)}},{key:"executeSearch",value:function(t,e){var n=e;""===n&&this.matchAllQuery&&(n=K);var r=Object(o.a)();0!==n.indexOf(V)&&r.dispatch(Object(f.b)(t,1)),this.onSearch(n)}},{key:"redirectOrSearch",value:function(t){var e=Object(o.a)().getState().search.searchResultsPageUrl;e&&!0!==this.conf.ignoreSearchResultsPageUrl&&t&&t.length>0?Object(m.d)(e,t):this.executeSearch(this.client,t)}},{key:"render",value:function(t){var e=this,n=document.getElementById(this.conf.containerId);n.querySelector("input")?null!==t&&t!==K&&n.querySelector("input").value!==t&&(n.querySelector("input").value=t):(n.innerHTML=P.a.compile(this.conf.template||'\n
\n \n
\n')(this.conf),this.field=n.querySelector("input"),t!==K&&(this.field.value=t),this.field.oninput=function(t){return e.oninput(t)},this.field.onkeypress=function(t){return e.onkeypress(t)},this.field.onkeyup=function(t){return e.onkeyup(t)},this.field.onfocus=function(t){return e.onfocus(t)},this.field.onblur=function(t){return setTimeout((function(){return e.onblur()}),200)},n.querySelector("button")&&(n.querySelector("button").onclick=function(t){var n=e.field.value;Object(o.a)().dispatch(Object(j.b)(n,!0)),Object(o.a)().dispatch(Object(w.m)()),e.redirectOrSearch(n)}),n.querySelector("form")&&(n.querySelector("form").onsubmit=function(t){return t.preventDefault()}),!1!==this.conf.autofocus&&!1===this.firstRenderDone&&(this.field.focus(),this.firstRenderDone=!0))}},{key:"oninput",value:function(t){var e=Object(o.a)(),n=t.target.value;""===n&&this.matchAllQuery&&(n=K),t.keyCode!==R&&t.keyCode!==L||e.dispatch(Object(w.r)(null,!1));var r=!0===this.conf.ignoreAutocomplete;e.dispatch(Object(j.b)(n,r,this.conf.containerId)),!0===this.conf.searchAsYouType&&this.executeSearch(this.client,n)}},{key:"onkeyup",value:function(t){var e=Object(o.a)();t.keyCode===A?e.dispatch(Object(w.q)(w.a)):t.keyCode===C&&e.dispatch(Object(w.q)(w.b))}},{key:"onkeypress",value:function(t){if(t.keyCode===I){var e=Object(o.a)(),n=t.target.value;e.dispatch(Object(j.b)(n,!0)),e.dispatch(Object(w.m)()),this.redirectOrSearch(n)}}},{key:"onfocus",value:function(t){""===t.target.value&&(this.executeSearch(this.client,V+Math.random()),Object(o.a)().dispatch(Object(w.o)()))}},{key:"onblur",value:function(){Object(o.a)().getState().autocomplete.hideAutomatically&&Object(o.a)().dispatch(Object(w.m)())}}])&&x(e.prototype,n),r&&x(e,r),t}(),N=(n(60),n(15)),F=n(13);function M(t,e){for(var n=0;n\n {{#gt page 1}}Page {{../page}} of {{/gt}}\n {{total_hits}} search results\n \n');var i=this.conf.categorySelectionFunction||F.a;P.a.registerHelper("selectCategory",(function(t){return i(t,r.conf.categoryAliases)})),Object(s.c)(n.containerId)&&Object(o.c)(Object(o.a)(),"search",(function(){return r.render()}))}var e,n,r;return e=t,(n=[{key:"render",value:function(){var t=Object(o.a)().getState().search,e=t.results||{};e.resultcount=e.hits&&!1!==this.conf.showNumberOfResults,e.keyword=t.keyword;var n=this.conf.template||'\n
\n {{#if resultcount}}\n {{> numberOfResultsTemplate }}\n {{/if}}\n \n {{#each hits}}\n
\n

\n {{title}}\n

\n
\n \n {{#if images.main}}{{title}}{{else}}{{/if}}\n \n {{{highlight}}}..\n
\n
\n {{selectCategory this}}\n
\n
\n {{/each}}\n
\n';e.hits&&0===e.hits.length&&(n=this.conf.template_noresults||'\n
\n

No search results with keyword {{keyword}}

\n
\n');var r=Object(s.b)(this.conf.containerId,n,e).querySelectorAll("[data-analytics-click]");Object(N.a)(this.client,r,e)}}])&&M(e.prototype,n),r&&M(e,r),t}();function H(t,e){for(var n=0;ni?n[i]:"").replace(/^[0-9]+[x]{1}/,""),i++}while(r.length<3&&n.length>i);return e&&e[r]?e[r]:r.replace(/[-_]+/g," ")}var s=null;function o(){var t=this;c("equals",(function(e,n,r){return e+""==n+""?r.fn(t):r.inverse(t)})),c("not",(function(e,n,r){return e+""!=n+""?r.fn(t):r.inverse(t)})),c("gt",(function(e,n,r){return e>n?r.fn(t):r.inverse(t)})),c("lt",(function(e,n,r){return e0)for(var r=0;r= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function l(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:c.default,log:c.default.log,registerHelper:function(t,e){if("[object Object]"===i.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple helpers");i.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===i.toString.call(t))i.extend(this.partials,t);else{if(void 0===e)throw new a.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===i.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple decorators");i.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){u.resetLoggedProperties()}};var h=c.default.log;e.log=h,e.createFrame=i.createFrame,e.logger=c.default},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);n(56);var r=n(10),i=n.n(r),a=n(1),s=n(4),o=n(7),c=n(0),u=n(2),l=n(15),h=n(5),p=n(13);function f(t,e){for(var n=0;n\n {{#gt suggestions.length 0}}\n
    \n {{#each ../suggestions}}\n
  • \n {{value}}\n
  • \n {{/each}}\n
\n {{/gt}}\n \n',i),s=a.querySelector(".suggestions")?a.querySelectorAll(".suggestions > li"):[],o=0;o\n
\n {{#each options}}\n \n {{/each}}\n
\n \n':this.conf.type===c.TAGS?u='\n
\n {{#each options}}\n \n {{/each}}\n
\n':this.conf.type===c.CHECKBOX_GROUP?u='\n
\n {{#each options}}\n \n {{/each}}\n
\n':this.conf.type===c.RADIO_GROUP?u='\n
\n {{#each options}}\n \n {{/each}}\n
\n':this.conf.type===c.SELECT_LIST&&(u='\n
\n \n
\n');var l=Object(a.b)(this.conf.containerId,this.conf.template||u,n);if(this.conf.type===c.SELECT_LIST)l.querySelector("select").addEventListener("change",(function(t){return e.singleActiveChangeEvent(t.target.value)}));else if(this.conf.type===c.TABS)for(var h=l.querySelectorAll("[data-filter]"),p=0;p\n {{#each options}}\n \n {{/each}}\n \n':'\n
\n \n
\n';var a=Object.assign({},this.conf);a.options.forEach((function(t){t.sortBy===n&&t.order===r?t.active=!0:t.active=!1}));var s=Object(o.b)(this.conf.containerId,i,a);if(this.conf.type===l.RADIO_GROUP)for(var c=s.querySelectorAll("input"),u=0;u=0?e:parseInt(t,10)}return t},log:function(t){if(t=i.lookupLevel(t),"undefined"!=typeof console&&i.lookupLevel(i.level)<=t){var e=i.methodMap[t];console[e]||(e="log");for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):i(this);if(n.data&&n.ids){var s=r.createFrame(n.data);s.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:s}}return a(e,n)}))},t.exports=e.default},function(t,e,n){"use strict";(function(r){e.__esModule=!0;var i,a=n(8),s=n(9),o=(i=s)&&i.__esModule?i:{default:i};e.default=function(t){t.registerHelper("each",(function(t,e){if(!e)throw new o.default("Must pass iterator to #each");var n,i=e.fn,s=e.inverse,c=0,u="",l=void 0,h=void 0;function p(e,n,r){l&&(l.key=e,l.index=n,l.first=0===n,l.last=!!r,h&&(l.contextPath=h+e)),u+=i(t[e],{data:l,blockParams:a.blockParams([t[e],e],[h+e,null])})}if(e.data&&e.ids&&(h=a.appendContextPath(e.data.contextPath,e.ids[0])+"."),a.isFunction(t)&&(t=t.call(this)),e.data&&(l=a.createFrame(e.data)),t&&"object"==typeof t)if(a.isArray(t))for(var f=t.length;c=o.LAST_COMPATIBLE_COMPILER_REVISION&&e<=o.COMPILER_REVISION)return;if(e2&&S.push("'"+this.terminals_[b]+"'");_=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:l,expected:S})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+p);switch(g[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),p=null,f?(p=f,f=null):(c=this.lexer.yyleng,s=this.lexer.yytext,o=this.lexer.yylineno,l=this.lexer.yylloc,u>0&&u--);break;case 2:if(m=this.productions_[g[1]][1],O.$=r[r.length-m],O._$={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},h&&(O._$.range=[i[i.length-(m||1)].range[0],i[i.length-1].range[1]]),void 0!==(v=this.performAction.call(O,s,c,o,this.yy,g[1],r,i)))return v;m&&(n=n.slice(0,-1*m*2),r=r.slice(0,-1*m),i=i.slice(0,-1*m)),n.push(this.productions_[g[1]][0]),r.push(O.$),i.push(O._$),y=a[n[n.length-2]][n[n.length-1]],n.push(y);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,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 t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,n,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),s=0;se[0].length)||(e=n,r=s,this.options.flex));s++);return e?((i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,a[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||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 t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},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(t){this.begin(t)},options:{},performAction:function(t,e,n,r){function i(t,n){return e.yytext=e.yytext.substring(t,e.yyleng-n+t)}switch(n){case 0:if("\\\\"===e.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1: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:(i(5,9),"END_RAW_BLOCK");case 5:return 15;case 6: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:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=i(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 41:return 72;case 42:return e.yytext=e.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}}};return t}();function n(){this.yy={}}return t.lexer=e,n.prototype=t,t.Parser=n,new n}();e.default=r,t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(27),a=(r=i)&&r.__esModule?r:{default:r};function s(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function o(t,e,n){void 0===e&&(e=t.length);var r=t[e-1],i=t[e-2];return r?"ContentStatement"===r.type?(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original):void 0:n}function c(t,e,n){void 0===e&&(e=-1);var r=t[e+1],i=t[e+2];return r?"ContentStatement"===r.type?(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original):void 0:n}function u(t,e,n){var r=t[null==e?0:e+1];if(r&&"ContentStatement"===r.type&&(n||!r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function l(t,e,n){var r=t[null==e?t.length-1:e-1];if(r&&"ContentStatement"===r.type&&(n||!r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}s.prototype=new a.default,s.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,a=r.length;i0)throw new a.default("Invalid path: "+r,{loc:n});".."===u&&s++}}return{type:"PathExpression",data:t,depth:s,parts:i,original:r,loc:n}},e.prepareMustache=function(t,e,n,r,i,a){var s=r.charAt(3)||r.charAt(2),o="{"!==s&&"&"!==s;return{type:/\*/.test(r)?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:o,strip:i,loc:this.locInfo(a)}},e.prepareRawBlock=function(t,e,n,r){s(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}},e.prepareBlock=function(t,e,n,r,i,o){r&&r.path&&s(t,r);var c=/\*/.test(t.open);e.blockParams=t.blockParams;var u=void 0,l=void 0;if(n){if(c)throw new a.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),l=n.strip,u=n.program}i&&(i=u,u=e,e=i);return{type:c?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:u,openStrip:t.strip,inverseStrip:l,closeStrip:r&&r.strip,loc:this.locInfo(o)}},e.prepareProgram=function(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,n,r){return s(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}};var r,i=n(9),a=(r=i)&&r.__esModule?r:{default:r};function s(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new a.default(t.path.original+" doesn't match "+e,n)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.Compiler=c,e.precompile=function(t,e,n){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new i.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var r=n.parse(t,e),a=(new n.Compiler).compile(r,e);return(new n.JavaScriptCompiler).compile(a,e)},e.compile=function(t,e,n){void 0===e&&(e={});if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new i.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=a.extend({},e))||(e.data=!0);e.compat&&(e.useDepths=!0);var r=void 0;function s(){var r=n.parse(t,e),i=(new n.Compiler).compile(r,e),a=(new n.JavaScriptCompiler).compile(i,e,void 0,!0);return n.template(a)}function o(t,e){return r||(r=s()),r.call(this,t,e)}return o._setup=function(t){return r||(r=s()),r._setup(t)},o._child=function(t,e,n,i){return r||(r=s()),r._child(t,e,n,i)},o};var i=r(n(9)),a=n(8),s=r(n(26)),o=[].slice;function c(){}function u(t,e){if(t===e)return!0;if(a.isArray(t)&&a.isArray(e)&&t.length===e.length){for(var n=0;n1)throw new i.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=t.name.original,a="SubExpression"===t.name.type;a&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",a,r,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){l(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,n){var r=t.path,i=r.parts[0],a=null!=e||null!=n;this.opcode("getContext",r.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",i,a)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,n){var r=this.setupFullMustacheParams(t,e,n),a=t.path,o=a.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",r.length,o);else{if(this.options.knownHelpersOnly)throw new i.default("You specified knownHelpersOnly, but used the unknown helper "+o,t);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",r.length,a.original,s.default.helpers.simpleId(a))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],n=s.default.helpers.scopedId(t),r=!t.depth&&!n&&this.blockParamIndex(e);r?this.opcode("lookupBlockParam",r,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,n=0,r=e.length;for(this.opcode("pushHash");n=0)return[e,i]}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(16),a=r(n(9)),s=n(8),o=r(n(54));function c(t){this.value=t}function u(){}u.prototype={nameLookup:function(t,e){return this.internalNameLookup(t,e)},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=i.COMPILER_REVISION;return[t,i.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,n){return s.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,e){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(e),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,e,n,r){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,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(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,s=void 0,o=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c0&&(n+=", "+r.join(", "));var i=0;Object.keys(this.aliases).forEach((function(t){var r=e.aliases[t];r.children&&r.referenceCount>1&&(n+=", alias"+ ++i+"="+t,r.children[0]="alias"+i)})),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var s=this.mergeSource(n);return t?(a.push(s),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",s,"}"])},mergeSource:function(t){var e=this.environment.isSimple,n=!this.forceBuffer,r=void 0,i=void 0,a=void 0,s=void 0;return this.source.each((function(t){t.appendToBuffer?(a?t.prepend(" + "):a=t,s=t):(a&&(i?a.prepend("buffer += "):r=!0,s.add(";"),a=s=void 0),i=!0,e||(n=!1))})),n?a?(a.prepend("return "),s.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(r?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(r?"":";\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(t){var e=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(e,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var n=this.topStack();e.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack((function(t){return[" != null ? ",t,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,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(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,n,r){var i=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[i++])),this.resolvePath("context",t,i,e,n)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,n)},resolvePath:function(t,e,n,r,i){var a=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,n,r){var i=e.popStack(),a=0,s=n.length;t&&s--;for(;athis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,n=t.length;e