diff --git a/.gitignore b/.gitignore index 8b13789..254b1b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +.idea + +node_modules \ No newline at end of file diff --git a/dist/es-searchui-wc.js b/dist/es-searchui-wc.js index 3083f16..980f6e8 100644 --- a/dist/es-searchui-wc.js +++ b/dist/es-searchui-wc.js @@ -1,8 +1,8 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t,n){"use strict";var r=n(5),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),l=function(e,t,n,r){var i;(!(t in e)||"function"==typeof(i=r)&&"[object Function]"===o.call(i)&&r())&&(c?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?i+=r.charAt(a):s<128?i+=o[s]:s<2048?i+=o[192|s>>6]+o[128|63&s]:s<55296||s>=57344?i+=o[224|s>>12]+o[128|s>>6&63]+o[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(a)),i+=o[240|s>>18]+o[128|s>>12&63]+o[128|s>>6&63]+o[128|63&s])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(1),i=n(25)("%Function%"),o=i.apply,a=i.call;e.exports=function(){return r.apply(a,arguments)},e.exports.apply=function(){return r.apply(o,arguments)}},function(e,t,n){"use strict";var r=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!r(e)||!r(t))}},function(e,t,n){"use strict";var r=n(8);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(e,t,n){"use strict";var r=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(10),i=n(0).supportsDescriptors,o=Object.getOwnPropertyDescriptor,a=TypeError;e.exports=function(){if(!i)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=o(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return r}},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o=n(2),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=o.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}}},a)},function(e,t,n){!function(e){"use strict";var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=function(e){return Array.isArray(e)?e:Array.from(e)},c=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&(n=i({},n,{_group:n._group.map((function(t){return new e(t)}))})),this.data=n}return n(e,[{key:"getRaw",value:function(e){return(this.data[e]||{}).raw}},{key:"getSnippet",value:function(e){return(this.data[e]||{}).snippet}}]),e}(),u=function e(n,r){t(this,e),this.rawResults=n,this.rawInfo=r;var i=new Array;n.forEach((function(e){i.push(new l(e))})),this.results=i,this.info=r},p=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.filtersJSON=n}return n(e,[{key:"removeFilter",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.filtersJSON;function o(e,t){var n=Object.entries(t).reduce((function(t,n){var s=a(n,2),c=s[0],l=s[1];return c===e?t:(["all","any","none"].includes(c)&&(l=l.reduce((function(t,n){var r=o(e,n);return r?t.concat(r):t}),[])),i({},t,r({},c,l)))}),{});if(0!==Object.keys(n).length)return n}var s=o(t,n);return new e(s)}},{key:"getListOfAppliedFilters",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.filtersJSON,n=Object.entries(t).reduce((function(t,n){var r=a(n,2),i=r[0],o=r[1];return["all","any","none"].includes(i)?o.forEach((function(n){Object.keys(n).forEach((function(r){["all","any","none"].includes(r)?t=new Set([].concat(c(t),c(e.getListOfAppliedFilters(n)))):t.add(r)}))})):t.add(i),t}),new Set);return Array.from(n.values())}}]),e}(),h="swiftype-app-search-javascript",f=new(function(){function e(){t(this,e),this.cache={}}return n(e,[{key:"getKey",value:function(e,t,n){return e+t+JSON.stringify(n)}},{key:"store",value:function(e,t){this.cache[e]=t}},{key:"retrieve",value:function(e){return this.cache[e]}}]),e}());function d(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=o.additionalHeaders,s="POST",c=f.getKey(s,t+n,r);if(i){var l=f.retrieve(c);if(l)return Promise.resolve(l)}return y(s,e,t,n,r,{additionalHeaders:a}).then((function(e){return e.json().then((function(t){var n={response:e,json:t};return i&&f.store(c,n),n})).catch((function(){return{response:e,json:{}}}))}))}function y(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=a.additionalHeaders,c=new Headers(i({Authorization:"Bearer "+t,"Content-Type":"application/json","X-Swiftype-Client":h,"X-Swiftype-Client-Version":"2.4.0"},s));return fetch(""+n+r,{method:e,headers:c,body:JSON.stringify(o),credentials:"include"})}var g="SEARCH",v="MULTI_SEARCH";function m(e){return new u(e.results,function(e,t){if(e)return e[t],o(e,[t])}(e,"results"))}function b(e){var t,n=e.response,r=e.json;if(!n.ok){var i=Array.isArray(r)?" "+(t=r.map((function(e){return e.errors})),[].concat.apply([],t)).join(", "):r.errors?" "+r.errors:"";throw new Error("["+n.status+"]"+i)}return r}var w=function(){function e(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=o.endpointBase,s=void 0===a?"":a,c=o.cacheResponses,l=void 0===c||c,u=o.additionalHeaders;t(this,e),this.additionalHeaders=u,this.searchKey=r,this.cacheResponses=l,this.engineName=i,this.apiEndpoint=s?s+"/api/as/v1/":"https://"+n+".api.swiftype.com/api/as/v1/",this.searchPath="engines/"+this.engineName+"/search",this.multiSearchPath="engines/"+this.engineName+"/multi_search",this.querySuggestionPath="engines/"+this.engineName+"/query_suggestion",this.clickPath="engines/"+this.engineName+"/click"}return n(e,[{key:"querySuggestion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({query:e},t);return d(this.searchKey,this.apiEndpoint,this.querySuggestionPath,n,this.cacheResponses,{additionalHeaders:this.additionalHeaders}).then(b)}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.disjunctiveFacets,r=t.disjunctiveFacetsAnalyticsTags,i=o(t,["disjunctiveFacets","disjunctiveFacetsAnalyticsTags"]),a=Object.assign({query:e},i);return n&&n.length>0?this._performDisjunctiveSearch(a,n,r).then(m):this._performSearch(a).then(m)}},{key:"multiSearch",value:function(e){var t=e.map((function(e){return i({query:e.query},e.options||{})}));return this._performSearch({queries:t},v).then((function(e){return e.map(m)}))}},{key:"_performDisjunctiveSearch",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["Facet-Only"],l=this._performSearch(e),u=new p(e.filters),h=u.getListOfAppliedFilters(),f=h.filter((function(e){return t.includes(e)}));if(!f.length)return l;var d=e.page||{},y=e.analytics||{};y.tags=o;var g=f.map((function(t){return n._performSearch(i({},e,{filters:u.removeFilter(t).filtersJSON,page:i({},d,{size:0}),analytics:y,facets:r({},t,e.facets[t])}))}));return Promise.all([l].concat(c(g))).then((function(e){var t=s(e),n=t[0];return t.slice(1).forEach((function(e){var t=a(Object.entries(e.facets)[0],2),r=t[0],i=t[1];n.facets[r]=i})),n}))}},{key:"_performSearch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=t===v?this.multiSearchPath:this.searchPath;return d(this.searchKey,this.apiEndpoint,n+".json",e,this.cacheResponses,{additionalHeaders:this.additionalHeaders}).then(b)}},{key:"click",value:function(e){var t=e.query,n=e.documentId,r=e.requestId,i=e.tags,o={query:t,document_id:n,request_id:r,tags:void 0===i?[]:i};return d(this.searchKey,this.apiEndpoint,this.clickPath+".json",o,this.cacheResponses,{additionalHeaders:this.additionalHeaders}).then(b)}}]),e}();e.createClient=function(e){var t=e.hostIdentifier,n=e.accountHostKey,r=e.apiKey,i=e.searchKey,o=e.engineName,a=e.endpointBase,s=e.cacheResponses,c=e.additionalHeaders;return new w(t=t||n,i=i||r,o,{endpointBase:a,cacheResponses:s,additionalHeaders:c})},Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e){e.exports=JSON.parse('{"a":"0.10.0"}')},function(e,t,n){var r=n(5),i=n(22),o=n(23),a=n(30),s=n(32),c=n(34),l=Date.prototype.getTime;function u(e,t,n){var f=n||{};return!!(f.strict?o(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?f.strict?o(e,t):e==t:function(e,t,n){var o,f;if(typeof e!=typeof t)return!1;if(p(e)||p(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var d=a(e),y=a(t);if(d!==y)return!1;if(d||y)return e.source===t.source&&s(e)===s(t);if(c(e)&&c(t))return l.call(e)===l.call(t);var g=h(e),v=h(t);if(g!==v)return!1;if(g||v){if(e.length!==t.length)return!1;for(o=0;o=0;o--)if(m[o]!=b[o])return!1;for(o=m.length-1;o>=0;o--)if(f=m[o],!u(e[f],t[f],n))return!1;return!0}(e,t,f))}function p(e){return null==e}function h(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=u},function(e,t,n){"use strict";const r=n(35);e.exports=(e,t)=>{if("function"!=typeof e)throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let n,i;t=t||{};const o=function(){const r=this,o=arguments,a=()=>{n=null,t.immediate||(i=e.apply(r,o))},s=t.immediate&&!n;return clearTimeout(n),n=setTimeout(a,t.wait||0),s&&(i=e.apply(r,o)),i};return r(o,e),o.cancel=()=>{n&&(clearTimeout(n),n=null)},o}},function(e,t,n){e.exports=function(){"use strict"; +!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}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=48)}([function(t,e,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var c=function(){throw new o},l=a?function(){try{return c}catch(t){try{return a(arguments,"callee").get}catch(t){return c}}}():c,u=n(29)(),p=n(30)(),h=Object.getPrototypeOf||(p?function(t){return t.__proto__}:null),f={},d="undefined"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":u&&h?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&h?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u&&h?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u&&h?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&h?h(""[Symbol.iterator]()):void 0,"%Symbol%":u?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var g=h(h(t));y["%Error.prototype%"]=g}var m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(5),b=n(32),w=v.call(Function.call,Array.prototype.concat),S=v.call(Function.apply,Array.prototype.splice),x=v.call(Function.call,String.prototype.replace),k=v.call(Function.call,String.prototype.slice),O=v.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,_=function(t){var e=k(t,0,1),n=k(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return x(t,j,(function(t,e,n,r){i[i.length]=n?x(r,P,"$1"):e||t})),i},A=function(t,e){var n,i=t;if(b(m,i)&&(i="%"+(n=m[i])[0]+"%"),b(y,i)){var a=y[i];if(a===f&&(a=function t(e){var n;if("%AsyncFunction%"===e)n=s("async function () {}");else if("%GeneratorFunction%"===e)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=s("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&h&&(n=h(i.prototype))}return y[e]=n,n}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,t))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_(t),i=n.length>0?n[0]:"",s=A("%"+i+"%",e),c=s.name,l=s.value,u=!1,p=s.alias;p&&(i=p[0],S(n,w([0,1],p)));for(var h=1,f=!0;h=n.length){var v=a(l,d);l=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[d]}else f=b(l,d),l=l[d];f&&!u&&(y[c]=l)}}return l}},function(t,e,n){"use strict";var r=n(10),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(7),c=n(2)(),l=function(t,e,n,r){if(e in t)if(!0===r){if(t[e]===n)return}else if("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())return;var i;c?a(t,e,n,!0):a(t,e,n)},u=function(t,e){var n=arguments.length>2?arguments[2]:{},o=r(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a-1?i(n):n}},function(t,e,n){"use strict";var r=n(31);t.exports=Function.prototype.bind||r},function(t,e,n){"use strict";var r=n(5),i=n(0),o=n(33),s=i("%TypeError%"),a=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),l=i("%Reflect.apply%",!0)||r.call(c,a),u=i("%Object.defineProperty%",!0),p=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){if("function"!=typeof t)throw new s("a function is required");var e=l(r,c,arguments);return o(e,1+p(0,t.length-(arguments.length-1)),!0)};var h=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){"use strict";var r=n(2)(),i=n(0),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(t){o=!1}var s=i("%SyntaxError%"),a=i("%TypeError%"),c=n(13);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!c&&c(t,e);if(o)o(t,e,{configurable:null===l&&p?p.configurable:!l,enumerable:null===r&&p?p.enumerable:!r,value:n,writable:null===i&&p?p.writable:!i});else{if(!u&&(r||i||l))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},function(t,e,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";t.exports={default:s,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},function(t,e,n){"use strict";var r=n(42),i=n(47),o=n(8);t.exports={formats:o,parse:i,stringify:r}},function(t,e,n){"use strict";var r=Array.prototype.slice,i=n(11),o=Object.keys,s=o?function(t){return o(t)}:n(27),a=Object.keys;s.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?a(r.call(t)):a(t)}):Object.keys=s;return Object.keys||s},t.exports=s},function(t,e,n){"use strict";var r=Object.prototype.toString;t.exports=function(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},function(t,e,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){"use strict";var r=n(0)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},function(t,e,n){"use strict";var r=function(t){return t!=t};t.exports=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!r(t)||!r(e))}},function(t,e,n){"use strict";var r=n(14);t.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(t,e,n){"use strict";var r=n(38),i=Object,o=TypeError;t.exports=r((function(){if(null!=this&&this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},function(t,e,n){"use strict";var r=n(16),i=n(1).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(i&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return r}},function(t,e,n){"use strict";var r=n(8),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?c+=a.charAt(l):u<128?c+=s[u]:u<2048?c+=s[192|u>>6]+s[128|63&u]:u<55296||u>=57344?c+=s[224|u>>12]+s[128|u>>6&63]+s[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&a.charCodeAt(l)),c+=s[240|u>>18]+s[128|u>>12&63]+s[128|u>>6&63]+s[128|63&u])}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],r=0;r=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=function(t){return Array.isArray(t)?t:Array.from(t)},l=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&(e=o({},e,{_group:e._group.map((function(e){return new t(e)}))})),this.data=e}return r(t,[{key:"getRaw",value:function(t){return(this.data[t]||{}).raw}},{key:"getSnippet",value:function(t){return(this.data[t]||{}).snippet}}]),t}(),p=function t(e,r){n(this,t),this.rawResults=e,this.rawInfo=r;var i=new Array;e.forEach((function(t){i.push(new u(t))})),this.results=i,this.info=r},h=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.filtersJSON=e}return r(t,[{key:"removeFilter",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.filtersJSON;function r(t,e){var n=Object.entries(e).reduce((function(e,n){var s=a(n,2),c=s[0],l=s[1];return c===t?e:(["all","any","none"].includes(c)&&(l=l.reduce((function(e,n){var i=r(t,n);return i?e.concat(i):e}),[])),o({},e,i({},c,l)))}),{});if(0!==Object.keys(n).length)return n}var s=r(e,n);return new t(s)}},{key:"getListOfAppliedFilters",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.filtersJSON,n=Object.entries(e).reduce((function(e,n){var r=a(n,2),i=r[0],o=r[1];return["all","any","none"].includes(i)?o.forEach((function(n){Object.keys(n).forEach((function(r){["all","any","none"].includes(r)?e=new Set([].concat(l(e),l(t.getListOfAppliedFilters(n)))):e.add(r)}))})):e.add(i),e}),new Set);return Array.from(n.values())}}]),t}(),f=new(function(){function t(){n(this,t),this.cache={}}return r(t,[{key:"getKey",value:function(t,e,n){return t+e+JSON.stringify(n)}},{key:"store",value:function(t,e){this.cache[t]=e}},{key:"retrieve",value:function(t){return this.cache[t]}}]),t}());function d(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=o.additionalHeaders,a="POST",c=f.getKey(a,e+n,r);if(i){var l=f.retrieve(c);if(l)return Promise.resolve(l)}return y(a,t,e,n,r,{additionalHeaders:s}).then((function(t){return t.json().then((function(e){var n={response:t,json:e};return i&&f.store(c,n),n})).catch((function(){return{response:t,json:{}}}))}))}function y(e,n,r,i,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c=a.additionalHeaders,l="undefined"!=typeof window?"browser":t.version,u="ent=8.9.0-legacy,js="+l+",t=8.9.0-legacy,ft=universal",p=new Headers(o({},n&&{Authorization:"Bearer "+n},{"Content-Type":"application/json","X-Swiftype-Client":"elastic-app-search-javascript","X-Swiftype-Client-Version":"8.9.0","x-elastic-client-meta":u},c));return fetch(""+r+i,{method:e,headers:p,body:JSON.stringify(s),credentials:"include"})}var g="SEARCH",m="MULTI_SEARCH";function v(t){return new p(t.results,function(t,e){if(t)return t[e],s(t,[e])}(t,"results"))}function b(t){var e,n=t.response,r=t.json;if(!n.ok){var i=Array.isArray(r)?" "+(e=r.map((function(t){return t.errors})),[].concat.apply([],e)).join(", "):r.errors?" "+r.errors:"";throw new Error("["+n.status+"]"+i)}return r}var w=function(){function t(e,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=o.endpointBase,a=void 0===s?"":s,c=o.cacheResponses,l=void 0===c||c,u=o.additionalHeaders;n(this,t),this.additionalHeaders=u,this.searchKey=r,this.cacheResponses=l,this.engineName=i,this.apiEndpoint=a?a+"/api/as/v1/":"https://"+e+".api.swiftype.com/api/as/v1/",this.searchPath="engines/"+this.engineName+"/search",this.multiSearchPath="engines/"+this.engineName+"/multi_search",this.querySuggestionPath="engines/"+this.engineName+"/query_suggestion",this.clickPath="engines/"+this.engineName+"/click"}return r(t,[{key:"querySuggestion",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({query:t},e);return d(this.searchKey,this.apiEndpoint,this.querySuggestionPath,n,this.cacheResponses,{additionalHeaders:this.additionalHeaders}).then(b)}},{key:"search",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.disjunctiveFacets,r=e.disjunctiveFacetsAnalyticsTags,i=s(e,["disjunctiveFacets","disjunctiveFacetsAnalyticsTags"]),o=Object.assign({query:t},i);return n&&n.length>0?this._performDisjunctiveSearch(o,n,r).then(v):this._performSearch(o).then(v)}},{key:"multiSearch",value:function(t){var e=t.map((function(t){return o({query:t.query},t.options||{})}));return this._performSearch({queries:e},m).then((function(t){return t.map(v)}))}},{key:"_performDisjunctiveSearch",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["Facet-Only"],s=this._performSearch(t),u=new h(t.filters),p=u.getListOfAppliedFilters(),f=p.filter((function(t){return e.includes(t)}));if(!f.length)return s;var d=t.page||{},y=t.analytics||{};y.tags=r;var g=f.map((function(e){return n._performSearch(o({},t,{filters:u.removeFilter(e).filtersJSON,record_analytics:!1,page:o({},d,{size:0}),analytics:y,facets:i({},e,t.facets[e])}))}));return Promise.all([s].concat(l(g))).then((function(t){var e=c(t),n=e[0];return e.slice(1).forEach((function(t){var e=a(Object.entries(t.facets)[0],2),r=e[0],i=e[1];n.facets[r]=i})),n}))}},{key:"_performSearch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=e===m?this.multiSearchPath:this.searchPath;return d(this.searchKey,this.apiEndpoint,n+".json",t,this.cacheResponses,{additionalHeaders:this.additionalHeaders}).then(b)}},{key:"click",value:function(t){var e=t.query,n=t.documentId,r=t.requestId,i=t.tags,o={query:e,document_id:n,request_id:r,tags:void 0===i?[]:i};return d(this.searchKey,this.apiEndpoint,this.clickPath+".json",o,this.cacheResponses,{additionalHeaders:this.additionalHeaders}).then(b)}}]),t}();e.createClient=function(t){var e=t.hostIdentifier,n=t.accountHostKey,r=t.apiKey,i=t.searchKey,o=t.engineName,s=t.endpointBase,a=t.cacheResponses,c=t.additionalHeaders;return new w(e=e||n,i=i||r,o,{endpointBase:s,cacheResponses:a,additionalHeaders:c})},Object.defineProperty(e,"__esModule",{value:!0})}(e)}).call(this,n(26))},function(t,e,n){var r=n(10),i=n(28),o=n(34),s=n(36),a=n(37),c=n(41),l=Date.prototype.getTime;function u(t,e,n){var f=n||{};return!!(f.strict?o(t,e):t===e)||(!t||!e||"object"!=typeof t&&"object"!=typeof e?f.strict?o(t,e):t==e:function(t,e,n){var o,f;if(typeof t!=typeof e)return!1;if(p(t)||p(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t)!==i(e))return!1;var d=s(t),y=s(e);if(d!==y)return!1;if(d||y)return t.source===e.source&&a(t)===a(e);if(c(t)&&c(e))return l.call(t)===l.call(e);var g=h(t),m=h(e);if(g!==m)return!1;if(g||m){if(t.length!==e.length)return!1;for(o=0;o=0;o--)if(v[o]!=b[o])return!1;for(o=v.length-1;o>=0;o--)if(f=v[o],!u(t[f],e[f],n))return!1;return!0}(t,e,f))}function p(t){return null==t}function h(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}t.exports=u},function(t,e,n){t.exports=function(){"use strict"; /*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js - */var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function n(e){return"function"==typeof e}function r(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(e,t){return null!=e&&"object"==typeof e&&t in e}var o=RegExp.prototype.test,a=/\S/;function s(e){return!function(e,t){return o.call(e,t)}(a,e)}var c={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},l=/\s*/,u=/\s+/,p=/\s*=/,h=/\s*\}/,f=/#|\^|\/|>|\{|&|=|!/;function d(e){this.string=e,this.tail=e,this.pos=0}function y(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function g(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}d.prototype.eos=function(){return""===this.tail},d.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},d.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},y.prototype.push=function(e){return new y(e,this)},y.prototype.lookup=function(e){var t,r,o,a=this.cache;if(a.hasOwnProperty(e))t=a[e];else{for(var s,c,l,u=this,p=!1;u;){if(e.indexOf(".")>0)for(s=u.view,c=e.split("."),l=0;null!=s&&l0?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,o=e.length;i"===a?s=this.renderPartial(o,t,n,i):"&"===a?s=this.unescapedValue(o,t):"name"===a?s=this.escapedValue(o,t):"text"===a&&(s=this.rawValue(o)),void 0!==s&&(c+=s);return c},g.prototype.renderSection=function(e,r,i,o){var a=this,s="",c=r.lookup(e[1]);if(c){if(t(c))for(var l=0,u=c.length;l0||!n)&&(i[o]=r+i[o]);return i.join("\n")},g.prototype.renderPartial=function(e,t,r,i){if(r){var o=n(r)?r(e[1]):r[e[1]];if(null!=o){var a=e[6],s=e[5],c=e[4],l=o;return 0==s&&c&&(l=this.indentPartial(o,c,a)),this.renderTokens(this.parse(l,i),t,r,l,i)}}},g.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},g.prototype.escapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return v.escape(n)},g.prototype.rawValue=function(e){return e[1]};var v={name:"mustache.js",version:"4.0.1",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){m.templateCache=e},get templateCache(){return m.templateCache}},m=new g;return v.clearCache=function(){return m.clearCache()},v.parse=function(e,t){return m.parse(e,t)},v.render=function(e,n,r,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(t(o=e)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)');var o;return m.render(e,n,r,i)},v.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return c[e]}))},v.Scanner=d,v.Context=y,v.Writer=g,v}()},function(e,t){function n(e,t,n){var r,i,o,a,s;function c(){var l=Date.now()-a;l=0?r=setTimeout(c,t-l):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var l=function(){o=this,i=arguments,a=Date.now();var l=n&&!r;return r||(r=setTimeout(c,t)),l&&(s=e.apply(o,i),o=i=null),s};return l.clear=function(){r&&(clearTimeout(r),r=null)},l.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},l}n.debounce=n,e.exports=n},,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var i=t&&t.prototype instanceof u?t:u,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function u(){}function p(){}function h(){}var f={};f[i]=function(){return this};var d=Object.getPrototypeOf,y=d&&d(d(k([])));y&&y!==t&&n.call(y,i)&&(f=y);var g=h.prototype=u.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(p).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=n(6),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),l=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===o.call(e),r=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=l&&n;if(s&&e.length>0&&!i.call(e,0))for(var y=0;y0)for(var g=0;g=0&&"[object Array]"!==i.call(e)&&"[object Function]"===i.call(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(8),a=n(9),s=n(29),c=i(a(),Object);r(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError(r+t);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(i.call(arguments)))},c=Math.max(0,t.length-a.length),l=[],u=0;u1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=y(e),o=g("%"+(n.length>0?n[0]:"")+"%",t),a=1;a=n.length){var s=i(o,n[a]);if(!t&&!(n[a]in o))throw new r("base intrinsic for "+e+" exists, but the property is not available.");o=s?s.get||s.value:o[n[a]]}else o=o[n[a]];return o}},function(e,t,n){"use strict";(function(t){var r=t.Symbol,i=n(28);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}}).call(this,n(27))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r=n(9),i=n(0);e.exports=function(){var e=r();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},function(e,t,n){"use strict";var r=n(31),i=RegExp.prototype.exec,o=Object.getOwnPropertyDescriptor,a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!s)return"[object RegExp]"===a.call(e);var t=o(e,"lastIndex");return!(!t||!r(t,"value"))&&function(e){try{var t=e.lastIndex;return e.lastIndex=0,i.call(e),!0}catch(e){return!1}finally{e.lastIndex=t}}(e)}},function(e,t,n){"use strict";var r=n(1);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(10),a=n(11),s=n(33),c=i(o);r(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},function(e,t,n){"use strict";var r=n(0).supportsDescriptors,i=n(11),o=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,l=/a/;e.exports=function(){if(!r||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=c(l),n=o(t,"flags");return n&&n.get===e||a(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},function(e,t,n){"use strict";var r=Date.prototype.getDay,i=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(o?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===i.call(e))}},function(e,t,n){"use strict";e.exports=(e,t)=>{for(const n of Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e}},function(e,t,n){"use strict";var r=n(2),i=n(12),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,p=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,n,i,o,a,c,u,p,f,d,y,g,v){var m,b=t;if("function"==typeof u?b=u(n,b):b instanceof Date?b=d(b):"comma"===i&&s(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?d(e):e})).join(",")),null===b){if(o)return c&&!g?c(n,h.encoder,v,"key"):n;b=""}if("string"==typeof(m=b)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||r.isBuffer(b))return c?[y(g?n:c(n,h.encoder,v,"key"))+"="+y(c(b,h.encoder,v,"value"))]:[y(n)+"="+y(String(b))];var w,S=[];if(void 0===b)return S;if(s(u))w=u;else{var x=Object.keys(b);w=p?x.sort(p):x}for(var k=0;k0?m+v:""}},function(e,t,n){"use strict";var r=n(2),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),l=s?o.slice(0,s.index):o,u=[];if(l){if(!n.plainObjects&&i.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var p=0;n.depth>0&&null!==(s=a.exec(o))&&p=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=i:a[l]=i:a={0:i}}i=a}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,h=u.split(t.delimiter,p),f=-1,d=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(g=o(g)?[g]:g),i.call(l,y)?l[y]=r.combine(l[y],g):l[y]=g}return l}(e,n):e,p=n.plainObjects?Object.create(null):{},h=Object.keys(u),f=0;f":">",'"':""","'":"'","/":"/","`":"`","=":"="},l=/\s*/,u=/\s+/,p=/\s*=/,h=/\s*\}/,f=/#|\^|\/|>|\{|&|=|!/;function d(t){this.string=t,this.tail=t,this.pos=0}function y(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function g(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}d.prototype.eos=function(){return""===this.tail},d.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},d.prototype.scanUntil=function(t){var e,n=this.tail.search(t);switch(n){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=e.length,e},y.prototype.push=function(t){return new y(t,this)},y.prototype.lookup=function(t){var e,r,o,s=this.cache;if(s.hasOwnProperty(t))e=s[t];else{for(var a,c,l,u=this,p=!1;u;){if(t.indexOf(".")>0)for(a=u.view,c=t.split("."),l=0;null!=a&&l0?i[i.length-1][4]:n;break;default:r.push(e)}return n}(function(t){for(var e,n,r=[],i=0,o=t.length;i"===s?a=this.renderPartial(o,e,n,i):"&"===s?a=this.unescapedValue(o,e):"name"===s?a=this.escapedValue(o,e,i):"text"===s&&(a=this.rawValue(o)),void 0!==a&&(c+=a);return c},g.prototype.renderSection=function(t,r,i,o,s){var a=this,c="",l=r.lookup(t[1]);if(l){if(e(l))for(var u=0,p=l.length;u0||!n)&&(i[o]=r+i[o]);return i.join("\n")},g.prototype.renderPartial=function(t,e,r,i){if(r){var o=this.getConfigTags(i),s=n(r)?r(t[1]):r[t[1]];if(null!=s){var a=t[6],c=t[5],l=t[4],u=s;0==c&&l&&(u=this.indentPartial(s,l,a));var p=this.parse(u,o);return this.renderTokens(p,e,r,u,i)}}},g.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(null!=n)return n},g.prototype.escapedValue=function(t,e,n){var r=this.getConfigEscape(n)||m.escape,i=e.lookup(t[1]);if(null!=i)return"number"==typeof i&&r===m.escape?String(i):r(i)},g.prototype.rawValue=function(t){return t[1]},g.prototype.getConfigTags=function(t){return e(t)?t:t&&"object"==typeof t?t.tags:void 0},g.prototype.getConfigEscape=function(t){return t&&"object"==typeof t&&!e(t)?t.escape:void 0};var m={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){v.templateCache=t},get templateCache(){return v.templateCache}},v=new g;return m.clearCache=function(){return v.clearCache()},m.parse=function(t,e){return v.parse(t,e)},m.render=function(t,n,r,i){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+(e(o=t)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)');var o;return v.render(t,n,r,i)},m.escape=function(t){return String(t).replace(/[&<>"'`=\/]/g,(function(t){return c[t]}))},m.Scanner=d,m.Context=y,m.Writer=g,m}()},function(t,e){function n(t,e,n){var r,i,o,s,a;function c(){var l=Date.now()-s;l=0?r=setTimeout(c,e-l):(r=null,n||(a=t.apply(o,i),o=i=null))}null==e&&(e=100);var l=function(){o=this,i=arguments,s=Date.now();var l=n&&!r;return r||(r=setTimeout(c,e)),l&&(a=t.apply(o,i),o=i=null),a};return l.clear=function(){r&&(clearTimeout(r),r=null)},l.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},l}n.debounce=n,t.exports=n},,,function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,s=Object.create(o.prototype),a=new j(i||[]);return r(s,"_invoke",{value:S(t,n,a)}),s}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var p={};function h(){}function f(){}function d(){}var y={};c(y,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(P([])));m&&m!==e&&n.call(m,o)&&(y=m);var v=d.prototype=h.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var i;r(this,"_invoke",{value:function(r,o){function s(){return new e((function(i,s){!function r(i,o,s,a){var c=u(t[i],t,o);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==typeof p&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}(r,o,i,s)}))}return i=i?i.then(s,s):s()}})}function S(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=u(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function P(t){if(t||""===t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,l=[],u=!1,p=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):p=-1,l.length&&f())}function f(){if(!u){var t=a(h);u=!0;for(var e=l.length;e;){for(c=l,l=[];++p1)for(var n=1;n0&&!i.call(t,0))for(var y=0;y0)for(var g=0;g=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},function(t,e,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(12);t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(t,e,n){"use strict";var r={foo:{}},i=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof i)}},function(t,e,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,o=Math.max,s=function(t,e){for(var n=[],r=0;r4294967295||c(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,l=!0;if("length"in t&&s){var u=s(t,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(l=!1)}return(r||l||!n)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},function(t,e,n){"use strict";var r=n(1),i=n(6),o=n(14),s=n(15),a=n(35),c=i(s(),Object);r(c,{getPolyfill:s,implementation:o,shim:a}),t.exports=c},function(t,e,n){"use strict";var r=n(15),i=n(1);t.exports=function(){var t=r();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},function(t,e,n){"use strict";var r,i,o,s,a=n(4),c=n(3)();if(c){r=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var l=function(){throw o};s={toString:l,valueOf:l},"symbol"==typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=l)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=p(t,"lastIndex");if(!(e&&r(e,"value")))return!1;try{i(t,s)}catch(t){return t===o}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===u(t)}},function(t,e,n){"use strict";var r=n(1),i=n(6),o=n(16),s=n(17),a=n(40),c=i(s());r(c,{getPolyfill:s,implementation:o,shim:a}),t.exports=c},function(t,e,n){"use strict";var r=n(7),i=n(2)(),o=n(39).functionsHaveConfigurableNames(),s=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return n&&!o||(i?r(t,"name",e,!0,!0):r(t,"name",e)),t}},function(t,e,n){"use strict";var r=function(){return"string"==typeof function(){}.name},i=Object.getOwnPropertyDescriptor;if(i)try{i([],"length")}catch(t){i=null}r.functionsHaveConfigurableNames=function(){if(!r()||!i)return!1;var t=i((function(){}),"name");return!!t&&!!t.configurable};var o=Function.prototype.bind;r.boundFunctionsHaveNames=function(){return r()&&"function"==typeof o&&""!==function(){}.bind().name},t.exports=r},function(t,e,n){"use strict";var r=n(1).supportsDescriptors,i=n(17),o=Object.getOwnPropertyDescriptor,s=Object.defineProperty,a=TypeError,c=Object.getPrototypeOf,l=/a/;t.exports=function(){if(!r||!c)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=i(),e=c(l),n=o(e,"flags");return n&&n.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},function(t,e,n){"use strict";var r=Date.prototype.getDay,i=Object.prototype.toString,o=n(3)();t.exports=function(t){return"object"==typeof t&&null!==t&&(o?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object Date]"===i.call(t))}},function(t,e,n){"use strict";var r=n(43),i=n(18),o=n(8),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,l=Array.prototype.push,u=function(t,e){l.apply(t,c(e)?e:[e])},p=Date.prototype.toISOString,h=o.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},d={},y=function t(e,n,o,s,a,l,p,h,y,g,m,v,b,w,S,x){for(var k,O=e,j=x,P=0,_=!1;void 0!==(j=j.get(d))&&!_;){var A=j.get(e);if(P+=1,void 0!==A){if(A===P)throw new RangeError("Cyclic object value");_=!0}void 0===j.get(d)&&(P=0)}if("function"==typeof h?O=h(n,O):O instanceof Date?O=m(O):"comma"===o&&c(O)&&(O=i.maybeMap(O,(function(t){return t instanceof Date?m(t):t}))),null===O){if(a)return p&&!w?p(n,f.encoder,S,"key",v):n;O=""}if("string"==typeof(k=O)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||i.isBuffer(O))return p?[b(w?n:p(n,f.encoder,S,"key",v))+"="+b(p(O,f.encoder,S,"value",v))]:[b(n)+"="+b(String(O))];var E,C=[];if(void 0===O)return C;if("comma"===o&&c(O))w&&p&&(O=i.maybeMap(O,p)),E=[{value:O.length>0?O.join(",")||null:void 0}];else if(c(h))E=h;else{var T=Object.keys(O);E=y?T.sort(y):T}for(var R=s&&c(O)&&1===O.length?n+"[]":n,N=0;N0?S+w:""}},function(t,e,n){"use strict";var r=n(0),i=n(4),o=n(44),s=r("%TypeError%"),a=r("%WeakMap%",!0),c=r("%Map%",!0),l=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),p=i("WeakMap.prototype.has",!0),h=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),d=i("Map.prototype.has",!0),y=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new s("Side channel does not contain "+o(t))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(t)return l(t,r)}else if(c){if(e)return h(e,r)}else if(n)return function(t,e){var n=y(t,e);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(t)return p(t,r)}else if(c){if(e)return d(e,r)}else if(n)return function(t,e){return!!y(t,e)}(n,r);return!1},set:function(r,i){a&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new a),u(t,r,i)):c?(e||(e=new c),f(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=y(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},function(t,e,n){(function(e){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,j=Array.prototype.slice,P=Math.floor,_="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===C||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function F(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-P(-t):P(t);if(r!==t){var i=String(r),o=v.call(e,i.length+1);return b.call(i,n,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,n,"$&_")}var I=n(46),U=I.custom,L=V(U)?U:null;function q(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function M(t){return b.call(String(t),/"/g,""")}function $(t){return!("[object Array]"!==W(t)||T&&"object"==typeof t&&T in t)}function D(t){return!("[object RegExp]"!==W(t)||T&&"object"==typeof t&&T in t)}function V(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}t.exports=function t(n,r,i,a){var c=r||{};if(B(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!B(c,"customInspect")||c.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===n)return"undefined";if(null===n)return"null";if("boolean"==typeof n)return n?"true":"false";if("string"==typeof n)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(v.call(e,0,n.maxStringLength),n)+i}return q(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,G),"single",n)}(n,c);if("number"==typeof n){if(0===n)return 1/0/n>0?"0":"-0";var x=String(n);return w?F(n,x):x}if("bigint"==typeof n){var P=String(n)+"n";return w?F(n,P):P}var A=void 0===c.depth?5:c.depth;if(void 0===i&&(i=0),i>=A&&A>0&&"object"==typeof n)return $(n)?"[Array]":"[Object]";var U=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=O.call(Array(t.indent+1)," ")}return{base:n,prev:O.call(Array(e+1),n)}}(c,i);if(void 0===a)a=[];else if(z(a,n)>=0)return"[Circular]";function H(e,n,r){if(n&&(a=j.call(a)).push(n),r){var o={depth:c.depth};return B(c,"quoteStyle")&&(o.quoteStyle=c.quoteStyle),t(e,o,i+1,a)}return t(e,c,i+1,a)}if("function"==typeof n&&!D(n)){var Z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(n),tt=K(n,H);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(tt.length>0?" { "+O.call(tt,", ")+" }":"")}if(V(n)){var et=C?b.call(String(n),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(n);return"object"!=typeof n||C?et:Q(et)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(n)){for(var nt="<"+S.call(String(n.nodeName)),rt=n.attributes||[],it=0;it"}if($(n)){if(0===n.length)return"[]";var ot=K(n,H);return U&&!function(t){for(var e=0;e=0)return!1;return!0}(ot)?"["+X(ot,U)+"]":"[ "+O.call(ot,", ")+" ]"}if(function(t){return!("[object Error]"!==W(t)||T&&"object"==typeof t&&T in t)}(n)){var st=K(n,H);return"cause"in Error.prototype||!("cause"in n)||R.call(n,"cause")?0===st.length?"["+String(n)+"]":"{ ["+String(n)+"] "+O.call(st,", ")+" }":"{ ["+String(n)+"] "+O.call(k.call("[cause]: "+H(n.cause),st),", ")+" }"}if("object"==typeof n&&y){if(L&&"function"==typeof n[L]&&I)return I(n,{depth:A-i});if("symbol"!==y&&"function"==typeof n.inspect)return n.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{l.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(n)){var at=[];return s&&s.call(n,(function(t,e){at.push(H(e,n,!0)+" => "+H(t,n))})),Y("Map",o.call(n),at,U)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(n)){var ct=[];return u&&u.call(n,(function(t){ct.push(H(t,n))})),Y("Set",l.call(n),ct,U)}if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(n))return J("WeakMap");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(n))return J("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(n))return J("WeakRef");if(function(t){return!("[object Number]"!==W(t)||T&&"object"==typeof t&&T in t)}(n))return Q(H(Number(n)));if(function(t){if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(t){}return!1}(n))return Q(H(_.call(n)));if(function(t){return!("[object Boolean]"!==W(t)||T&&"object"==typeof t&&T in t)}(n))return Q(d.call(n));if(function(t){return!("[object String]"!==W(t)||T&&"object"==typeof t&&T in t)}(n))return Q(H(String(n)));if("undefined"!=typeof window&&n===window)return"{ [object Window] }";if(n===e)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==W(t)||T&&"object"==typeof t&&T in t)}(n)&&!D(n)){var lt=K(n,H),ut=N?N(n)===Object.prototype:n instanceof Object||n.constructor===Object,pt=n instanceof Object?"":"null prototype",ht=!ut&&T&&Object(n)===n&&T in n?v.call(W(n),8,-1):pt?"Object":"",ft=(ut||"function"!=typeof n.constructor?"":n.constructor.name?n.constructor.name+" ":"")+(ht||pt?"["+O.call(k.call([],ht||[],pt||[]),": ")+"] ":"");return 0===lt.length?ft+"{}":U?ft+"{"+X(lt,U)+"}":ft+"{ "+O.call(lt,", ")+" }"}return String(n)};var H=Object.prototype.hasOwnProperty||function(t){return t in this};function B(t,e){return H.call(t,e)}function W(t){return y.call(t)}function z(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n-1?t.split(","):t},l=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),l=a?o.slice(0,a.index):o,u=[];if(l){if(!n.plainObjects&&i.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var p=0;n.depth>0&&null!==(a=s.exec(o))&&p=0;--o){var s,a=t[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[])[u]=i:"__proto__"!==l&&(s[l]=i):s={0:i}}i=s}return i}(u,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?s.charset:t.charset;return{allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof t?function(t,e){var n,l={__proto__:null},u=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,p=e.parameterLimit===1/0?void 0:e.parameterLimit,h=u.split(e.delimiter,p),f=-1,d=e.charset;if(e.charsetSentinel)for(n=0;n-1&&(g=o(g)?[g]:g),i.call(l,y)?l[y]=r.combine(l[y],g):l[y]=g}return l}(t,n):t,p=n.plainObjects?Object.create(null):{},h=Object.keys(u),f=0;f{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},a=`{{lit-${String(Math.random()).slice(2)}}}`,s=`\x3c!--${a}--\x3e`,c=new RegExp(`${a}|${s}`);class l{constructor(e,t){this.parts=[],this.element=t;const n=[],r=[],i=document.createTreeWalker(t.content,133,null,!1);let o=0,s=-1,l=0;const{strings:p,values:{length:d}}=e;for(;l0;){const t=p[l],n=f.exec(t)[2],r=n.toLowerCase()+"$lit$",i=e.getAttribute(r);e.removeAttribute(r);const o=i.split(c);this.parts.push({type:"attribute",index:s,name:n,strings:o}),l+=o.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),i.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(a)>=0){const r=e.parentNode,i=t.split(c),o=i.length-1;for(let t=0;t{const n=e.length-t.length;return n>=0&&e.slice(n)===t},p=e=>-1!==e.index,h=()=>document.createComment(""),f=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function d(e,t){const{element:{content:n},parts:r}=e,i=document.createTreeWalker(n,133,null,!1);let o=g(r),a=r[o],s=-1,c=0;const l=[];let u=null;for(;i.nextNode();){s++;const e=i.currentNode;for(e.previousSibling===u&&(u=null),t.has(e)&&(l.push(e),null===u&&(u=e)),null!==u&&c++;void 0!==a&&a.index===s;)a.index=null!==u?-1:a.index-c,o=g(r,o),a=r[o]}l.forEach(e=>e.parentNode.removeChild(e))}const y=e=>{let t=11===e.nodeType?0:1;const n=document.createTreeWalker(e,133,null,!1);for(;n.nextNode();)t++;return t},g=(e,t=-1)=>{for(let n=t+1;n{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},a=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${a}--\x3e`,l=new RegExp(`${a}|${c}`);class u{constructor(t,e){this.parts=[],this.element=e;const n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1);let o=0,s=-1,c=0;const{strings:u,values:{length:h}}=t;for(;c0;){const e=u[c],n=d.exec(e)[2],r=n.toLowerCase()+"$lit$",i=t.getAttribute(r);t.removeAttribute(r);const o=i.split(l);this.parts.push({type:"attribute",index:s,name:n,strings:o}),c+=o.length-1}}"TEMPLATE"===t.tagName&&(r.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(a)>=0){const r=t.parentNode,i=e.split(l),o=i.length-1;for(let e=0;e{const n=t.length-e.length;return n>=0&&t.slice(n)===e},h=t=>-1!==t.index,f=()=>document.createComment(""),d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function y(t,e){const{element:{content:n},parts:r}=t,i=document.createTreeWalker(n,133,null,!1);let o=m(r),s=r[o],a=-1,c=0;const l=[];let u=null;for(;i.nextNode();){a++;const t=i.currentNode;for(t.previousSibling===u&&(u=null),e.has(t)&&(l.push(t),null===u&&(u=t)),null!==u&&c++;void 0!==s&&s.index===a;)s.index=null!==u?-1:s.index-c,o=m(r,o),s=r[o]}l.forEach(t=>t.parentNode.removeChild(t))}const g=t=>{let e=11===t.nodeType?0:1;const n=document.createTreeWalker(t,133,null,!1);for(;n.nextNode();)e++;return e},m=(t,e=-1)=>{for(let n=e+1;n"function"==typeof e&&v.has(e),b={},w={}; +const v=new WeakMap,b=t=>"function"==typeof t&&v.has(t),w={},S={}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -44,7 +44,7 @@ const v=new WeakMap,m=e=>"function"==typeof e&&v.has(e),b={},w={}; * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -class S{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=i?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let o,a=0,s=0,c=r.nextNode();for(;a-1||n)&&-1===e.indexOf("--\x3e",i+1);const o=f.exec(e);t+=null===o?e+(n?x:s):e.substr(0,o.index)+o[1]+o[2]+"$lit$"+o[3]+a}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}} + */const k=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),O=` ${a} `;class j{constructor(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let r=0;r-1||n)&&-1===t.indexOf("--\x3e",i+1);const o=d.exec(t);e+=null===o?t+(n?O:c):t.substr(0,o.index)+o[1]+o[2]+"$lit$"+o[3]+a}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==k&&(e=k.createHTML(e)),t.innerHTML=e,t}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -71,7 +71,7 @@ class S{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const O=e=>null===e||!("object"==typeof e||"function"==typeof e),P=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class _{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e{try{const e={get capture(){return R=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class N{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=b,e(this)}if(this.__pendingValue===b)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=I(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=b}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const I=e=>e&&(R?{capture:e.capture,passive:e.passive,once:e.once}:e.capture) +const P=t=>null===t||!("object"==typeof t||"function"==typeof t),_=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class A{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;t{try{const t={get capture(){return F=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class I{constructor(t,e,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;b(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=w,t(this)}if(this.__pendingValue===w)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),r=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=U(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=w}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const U=t=>t&&(F?{capture:t.capture,passive:t.passive,once:t.once}:t.capture) /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -84,7 +84,7 @@ const O=e=>null===e||!("object"==typeof e||"function"==typeof e),P=e=>Array.isAr * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt - */;function F(e){let t=U.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},U.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const r=e.strings.join(a);return n=t.keyString.get(r),void 0===n&&(n=new l(e,e.getTemplateElement()),t.keyString.set(r,n)),t.stringsArray.set(e.strings,n),n}const U=new Map,L=new WeakMap; + */;function L(t){let e=q.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},q.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const r=t.strings.join(a);return n=e.keyString.get(r),void 0===n&&(n=new u(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}const q=new Map,M=new WeakMap; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -97,7 +97,7 @@ const O=e=>null===e||!("object"==typeof e||"function"==typeof e),P=e=>Array.isAr * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt - */const D=new + */const $=new /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -111,7 +111,7 @@ const O=e=>null===e||!("object"==typeof e||"function"==typeof e),P=e=>Array.isAr * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -class{handleAttributeExpressions(e,t,n,r){const i=t[0];if("."===i){return new C(e,t.slice(1),n).parts}if("@"===i)return[new N(e,t.slice(1),r.eventContext)];if("?"===i)return[new E(e,t.slice(1),n)];return new _(e,t,n).parts}handleTextExpression(e){return new j(e)}}; +class{handleAttributeExpressions(t,e,n,r){const i=e[0];if("."===i){return new R(t,e.slice(1),n).parts}if("@"===i)return[new I(t,e.slice(1),r.eventContext)];if("?"===i)return[new T(t,e.slice(1),n)];return new A(t,e,n).parts}handleTextExpression(t){return new C(t)}}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -124,7 +124,7 @@ class{handleAttributeExpressions(e,t,n,r){const i=t[0];if("."===i){return new C( * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt - */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const q=(e,...t)=>new k(e,t,"html",D),$=(e,t)=>`${e}--${t}`;let M=!0;void 0===window.ShadyCSS?M=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),M=!1);const V=e=>t=>{const n=$(t.type,e);let r=U.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},U.set(n,r));let i=r.stringsArray.get(t.strings);if(void 0!==i)return i;const o=t.strings.join(a);if(i=r.keyString.get(o),void 0===i){const n=t.getTemplateElement();M&&window.ShadyCSS.prepareTemplateDom(n,e),i=new l(t,n),r.keyString.set(o,i)}return r.stringsArray.set(t.strings,i),i},H=["html","svg"],z=new Set,B=(e,t,n)=>{z.add(e);const r=n?n.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:o}=i;if(0===o)return void window.ShadyCSS.prepareTemplateStyles(r,e);const a=document.createElement("style");for(let e=0;e{H.forEach(t=>{const n=U.get($(t,e));void 0!==n&&n.keyString.forEach(e=>{const{element:{content:t}}=e,n=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{n.add(e)}),d(e,n)})})})(e);const s=r.content;n?function(e,t,n=null){const{element:{content:r},parts:i}=e;if(null==n)return void r.appendChild(t);const o=document.createTreeWalker(r,133,null,!1);let a=g(i),s=0,c=-1;for(;o.nextNode();){c++;for(o.currentNode===n&&(s=y(t),n.parentNode.insertBefore(t,n));-1!==a&&i[a].index===c;){if(s>0){for(;-1!==a;)i[a].index+=s,a=g(i,a);return}a=g(i,a)}}}(n,a,s.firstChild):s.insertBefore(a,s.firstChild),window.ShadyCSS.prepareTemplateStyles(r,e);const c=s.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==c)t.insertBefore(c.cloneNode(!0),t.firstChild);else if(n){s.insertBefore(a,s.firstChild);const e=new Set;e.add(a),d(n,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const W={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},Q=(e,t)=>t!==e&&(t==t||e==e),G={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:Q};class J extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e,t=G){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const n="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(n){const r=this[e];this[t]=n,this._requestUpdate(e,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||G}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const n of t)this.createProperty(n,e[n])}}static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,n=Q){return n(e,t)}static _propertyValueFromAttribute(e,t){const n=t.type,r=t.converter||W,i="function"==typeof r?r:r.fromAttribute;return i?i(e,n):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const n=t.type,r=t.converter;return(r&&r.toAttribute||W.toAttribute)(e,n)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t,n=G){const r=this.constructor,i=r._attributeNameForProperty(e,n);if(void 0!==i){const e=r._propertyValueToAttribute(t,n);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(i):this.setAttribute(i,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const n=this.constructor,r=n._attributeToPropertyMap.get(e);if(void 0!==r){const e=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}_requestUpdate(e,t){let n=!0;if(void 0!==e){const r=this.constructor,i=r.getPropertyOptions(e);r._valueHasChanged(this[e],t,i.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,i))):n=!1}!this._hasRequestedUpdate&&n&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this._requestUpdate(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}J.finalized=!0; + */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const D=(t,...e)=>new j(t,e,"html",$),V=(t,e)=>`${t}--${e}`;let H=!0;void 0===window.ShadyCSS?H=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),H=!1);const B=t=>e=>{const n=V(e.type,t);let r=q.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},q.set(n,r));let i=r.stringsArray.get(e.strings);if(void 0!==i)return i;const o=e.strings.join(a);if(i=r.keyString.get(o),void 0===i){const n=e.getTemplateElement();H&&window.ShadyCSS.prepareTemplateDom(n,t),i=new u(e,n),r.keyString.set(o,i)}return r.stringsArray.set(e.strings,i),i},W=["html","svg"],z=new Set,G=(t,e,n)=>{z.add(t);const r=n?n.element:document.createElement("template"),i=e.querySelectorAll("style"),{length:o}=i;if(0===o)return void window.ShadyCSS.prepareTemplateStyles(r,t);const s=document.createElement("style");for(let t=0;t{W.forEach(e=>{const n=q.get(V(e,t));void 0!==n&&n.keyString.forEach(t=>{const{element:{content:e}}=t,n=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{n.add(t)}),y(t,n)})})})(t);const a=r.content;n?function(t,e,n=null){const{element:{content:r},parts:i}=t;if(null==n)return void r.appendChild(e);const o=document.createTreeWalker(r,133,null,!1);let s=m(i),a=0,c=-1;for(;o.nextNode();){c++;for(o.currentNode===n&&(a=g(e),n.parentNode.insertBefore(e,n));-1!==s&&i[s].index===c;){if(a>0){for(;-1!==s;)i[s].index+=a,s=m(i,s);return}s=m(i,s)}}}(n,s,a.firstChild):a.insertBefore(s,a.firstChild),window.ShadyCSS.prepareTemplateStyles(r,t);const c=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==c)e.insertBefore(c.cloneNode(!0),e.firstChild);else if(n){a.insertBefore(s,a.firstChild);const t=new Set;t.add(s),y(n,t)}};window.JSCompiler_renameProperty=(t,e)=>t;const Q={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},J=(t,e)=>e!==t&&(e==e||t==t),Y={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:J};class X extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,n)=>{const r=this._attributeNameForProperty(n,e);void 0!==r&&(this._attributeToPropertyMap.set(r,n),t.push(r))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=Y){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdateInternal(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||Y}static finalize(){const t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const n of e)this.createProperty(n,t[n])}}static _attributeNameForProperty(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,n=J){return n(t,e)}static _propertyValueFromAttribute(t,e){const n=e.type,r=e.converter||Q,i="function"==typeof r?r:r.fromAttribute;return i?i(t,n):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const n=e.type,r=e.converter;return(r&&r.toAttribute||Q.toAttribute)(t,n)}initialize(){this._updateState=0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,n){e!==n&&this._attributeToProperty(t,n)}_propertyToAttribute(t,e,n=Y){const r=this.constructor,i=r._attributeNameForProperty(t,n);if(void 0!==i){const t=r._propertyValueToAttribute(e,n);if(void 0===t)return;this._updateState=8|this._updateState,null==t?this.removeAttribute(i):this.setAttribute(i,t),this._updateState=-9&this._updateState}}_attributeToProperty(t,e){if(8&this._updateState)return;const n=this.constructor,r=n._attributeToPropertyMap.get(t);if(void 0!==r){const t=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(e,t),this._updateState=-17&this._updateState}}requestUpdateInternal(t,e,n){let r=!0;if(void 0!==t){const i=this.constructor;n=n||i.getPropertyOptions(t),i._valueHasChanged(this[t],e,n.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==n.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,n))):r=!1}!this._hasRequestedUpdate&&r&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,e){return this.requestUpdateInternal(t,e),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(t){}const t=this.performUpdate();return null!=t&&await t,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}}X.finalized=!0;const K=Element.prototype;K.msMatchesSelector||K.webkitMatchesSelector; /** @license Copyright (c) 2019 The Polymer Project Authors. All rights reserved. @@ -135,7 +135,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -const Y="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;Symbol(); +const Z=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol();class et{constructor(t,e){if(e!==tt)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(Z?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -149,11 +149,11 @@ const Y="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.pro * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const X={};class K extends J{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(void 0===e)this._styles=[];else if(Array.isArray(e)){const t=(e,n)=>e.reduceRight((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e),n),n=t(e,new Set),r=[];n.forEach(e=>r.unshift(e)),this._styles=r}else this._styles=[e]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Y?this.renderRoot.adoptedStyleSheets=e.map(e=>e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==X&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return X}}function Z(){return(Z=Object.assign||function(e){for(var t=1;t{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");const r=n.scopeName,i=L.has(t),a=M&&11===t.nodeType&&!!t.host,s=a&&!z.has(r),c=s?document.createDocumentFragment():t;if(((e,t,n)=>{let r=L.get(t);void 0===r&&(o(t,t.firstChild),L.set(t,r=new j(Object.assign({templateFactory:F},n))),r.appendInto(t)),r.setValue(e),r.commit()})(e,c,Object.assign({templateFactory:V(r)},n)),s){const e=L.get(c);L.delete(c);const n=e.value instanceof S?e.value.template:void 0;B(r,c,n),o(t,t.firstChild),t.appendChild(c),L.set(t,e)}!i&&a&&window.ShadyCSS.styleElement(t.host)};var ne=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],o=e&&ee(e),a=t&&ee(t),s=o||a;if(e&&ee(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var c=i[i.length-1];n="."===c||".."===c||""===c}else n=!1;for(var l=0,u=i.length;u>=0;u--){var p=i[u];"."===p?te(i,u):".."===p?(te(i,u),l++):l&&(te(i,u),l--)}if(!s)for(;l--;l)i.unshift("..");!s||""===i[0]||i[0]&&ee(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var re=function(e,t){if(!e)throw new Error("Invariant failed")};function ie(e){return"/"===e.charAt(0)?e:"/"+e}function oe(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function ae(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function se(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function ce(e,t,n,r){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Z({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=ne(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function le(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&(c.current=r),n&&(c.q=n),o&&(c.size=o),i&&i.length>0&&(c.filters=i),s&&(c["sort-field"]=s,c["sort-direction"]=a),c));var t,n,r,i,o,a,s,c}(e);this.lastPushSearchString=t,this.history.push({search:"?".concat(t)})}},{key:"onURLStateChange",value:function(e){var t=this;this.unlisten=this.history.listen((function(n){"?".concat(t.lastPushSearchString)!==n.search&&(t.lastPushSearchString="",e(Ae(ve(n.search))))}))}},{key:"tearDown",value:function(){this.unlisten()}}])&&be(t.prototype,n),r&&be(t,r),e}();function Ee(e,t){for(var n=0;n2?n-2:0),i=2;i=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $e(e,t,n,r){return e.reduce((function(e,i){var o=i.field,a=i.values,s=i.type,c=qe(i,["field","values","type"]);if(o===t&&(!r||s===r)){var l=a.filter((function(e){return!Me(e,n)}));return l.length>0?e.concat(function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"all";this.debug&&(n=console).log.apply(n,["Action","addFilter"].concat(Array.prototype.slice.call(arguments)));var i=this.state.filters,o=i.find((function(t){return t.field===e&&t.type===r}))||{},a=i.filter((function(t){return t.field!==e||t.type!==r}))||[],s=o.values||[],c=s.find((function(e){return Me(e,t)}))?s:s.concat(t);this._updateSearchResults({current:1,filters:[].concat(Ve(a),[{field:e,values:c,type:r}])})}function ze(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.debug&&(t=console).log.apply(t,["Action","trackAutocompleteClickThrough"].concat(Array.prototype.slice.call(arguments)));var r=this.state,i=r.autocompletedResultsRequestId,o=r.searchTerm;this.events.autocompleteResultClick({query:o,documentId:e,requestId:i,tags:n})}function Be(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.debug&&(e=console).log.apply(e,["Action","clearFilters"].concat(Array.prototype.slice.call(arguments)));var n=this.state.filters,r=n.filter((function(e){var n=e.field;return t.includes(n)}));this._updateSearchResults({current:1,filters:r})}function We(e,t,n){var r;this.debug&&(r=console).log.apply(r,["Action","removeFilter"].concat(Array.prototype.slice.call(arguments)));var i=this.state.filters,o=i;o=!t&&n?i.filter((function(t){return!(t.field===e&&t.type===n)})):t?$e(i,e,t,n):i.filter((function(t){return t.field!==e})),this._updateSearchResults({current:1,filters:o})}function Qe(){var e;this.debug&&(e=console).log.apply(e,["Action","reset"].concat(Array.prototype.slice.call(arguments))),this._setState(this.startingState),this.trackUrlState&&this.URLManager.pushStateToURL(this.state)}function Ge(e){var t;this.debug&&(t=console).log.apply(t,["Action","setCurrent"].concat(Array.prototype.slice.call(arguments))),this._updateSearchResults({current:e})}function Je(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:"all";this.debug&&(n=console).log.apply(n,["Action","setFilter"].concat(Array.prototype.slice.call(arguments)));var i=this.state.filters;i=i.filter((function(t){return t.field!==e||t.type!==r})),this._updateSearchResults({current:1,filters:[].concat(Je(i),[{field:e,values:[t],type:r}])})}function Xe(e){var t;this.debug&&(t=console).log.apply(t,["Action","setResultsPerPage"].concat(Array.prototype.slice.call(arguments))),this._updateSearchResults({current:1,resultsPerPage:e})}function Ke(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.autocompleteMinimumCharacters,i=void 0===r?0:r,o=n.autocompleteResults,a=void 0!==o&&o,s=n.autocompleteSuggestions,c=void 0!==s&&s,l=n.refresh,u=void 0===l||l,p=n.debounce,h=void 0===p?0:p;this.debug&&(t=console).log.apply(t,["Action","setSearchTerm"].concat(Array.prototype.slice.call(arguments))),this._setState({searchTerm:e}),u&&this.debounceManager.runWithDebounce(h,this._updateSearchResults,{current:1,filters:[]},{ignoreIsLoadingCheck:!0}),(a||c)&&e.length>=i&&this.debounceManager.runWithDebounce(h,this._updateAutocomplete,e,{autocompleteResults:a,autocompleteSuggestions:c})}function Ze(e,t){var n;this.debug&&(n=console).log.apply(n,["Action","setSort"].concat(Array.prototype.slice.call(arguments))),this._updateSearchResults({current:1,sortDirection:t,sortField:e})}function et(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.debug&&(t=console).log.apply(t,["Action","trackClickThrough"].concat(Array.prototype.slice.call(arguments)));var r=this.state,i=r.requestId,o=r.searchTerm;this.events.resultClick({query:o,documentId:e,requestId:i,tags:n})}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t,n){if(n){if(t){var r=t[e].bind(t);return function(){for(var e=arguments.length,t=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=t.apiConnector,r=t.onSearch,i=t.onAutocomplete,o=t.onResultClick,a=t.onAutocompleteResultClick;tt(this,e),this.search=nt("onSearch",n,r),this.autocomplete=nt("onAutocomplete",n,i),this.resultClick=nt("onResultClick",n,o),this.autocompleteResultClick=nt("onAutocompleteResultClick",n,a)};function it(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object.entries(e).reduce((function(e,r){var i=st(r,2),o=i[0],a=i[1];return t[o]&&"function"==typeof t[o]&&!t[o]({filters:n})||(e[o]=a),e}),{})}var pt=function(){function e(t){var n,i=this,o=t.apiConnector,a=t.autocompleteQuery,s=void 0===a?{}:a,c=t.debug,l=t.initialState,u=t.onSearch,p=t.onAutocomplete,h=t.onResultClick,f=t.onAutocompleteResultClick,d=t.searchQuery,y=void 0===d?{}:d,g=t.trackUrlState,v=void 0===g||g,m=t.urlPushDebounceLength,b=void 0===m?500:m;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),at(this,"state",lt),at(this,"_updateAutocomplete",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.autocompleteResults,r=t.autocompleteSuggestions,o=i.requestSequencer.next(),a=it({},n&&{results:i.autocompleteQuery.results||{}},r&&{suggestions:i.autocompleteQuery.suggestions||{}});return i.events.autocomplete({searchTerm:e},a).then((function(e){i.requestSequencer.isOldRequest(o)||(i.requestSequencer.completed(o),i._setState(e))}))})),at(this,"_updateSearchResults",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.skipPushToUrl,r=void 0!==n&&n,o=t.ignoreIsLoadingCheck,a=void 0!==o&&o,s=it({},i.state,e),c=s.current,l=s.filters,u=s.isLoading,p=s.resultsPerPage,h=s.searchTerm,f=s.sortDirection,d=s.sortField;if(!u||a){i._setState({current:c,error:"",filters:l,isLoading:!0,resultsPerPage:p,searchTerm:h,sortDirection:f,sortField:d});var y=i.requestSequencer.next(),g=it({},i.searchQuery,{facets:ut(i.searchQuery.facets,i.searchQuery.conditionalFacets,l)}),v=ct(i.state);return i.events.search(v,g).then((function(e){i.requestSequencer.isOldRequest(y)||(i.requestSequencer.completed(y),i._setState(it({isLoading:!1,resultSearchTerm:h},e,{wasSearched:!0})),!r&&i.trackUrlState&&i.debounceManager.runWithDebounce(i.urlPushDebounceLength,i.URLManager.pushStateToURL.bind(i.URLManager),{current:c,filters:l,resultsPerPage:p,searchTerm:h,sortDirection:f,sortField:d}))}),(function(e){i._setState({error:"An unexpected error occurred: ".concat(e.message)})}))}})),this.actions=Object.entries(r).reduce((function(e,t){var n=st(t,2);return it({},e,at({},n[0],n[1].bind(i)))}),{}),Object.assign(this,this.actions),this.events=new rt({apiConnector:o,onSearch:u,onAutocomplete:p,onResultClick:h,onAutocompleteResultClick:f}),this.debug=c,this.requestSequencer=new Te,this.debounceManager=new Fe,this.autocompleteQuery=s,this.searchQuery=y,this.subscriptions=[],this.trackUrlState=v,this.urlPushDebounceLength=b,v?(this.URLManager=new je,n=this.URLManager.getStateFromURL(),this.URLManager.onURLStateChange((function(e){i._updateSearchResults(it({},lt,e),{skipPushToUrl:!0})}))):n={},this.startingState=it({},this.state,l);var w=ct(it({},this.startingState,n));this.state=it({},this.state,w),(w.searchTerm||w.filters.length>0)&&this._updateSearchResults(w)}var t,n,i;return t=e,(n=[{key:"_setState",value:function(e){var t=it({},this.state,e);this.debug&&console.log("State Update",e,t),this.subscriptions.forEach((function(e){return e(t)})),this.state=t}},{key:"subscribeToStateChanges",value:function(e){this.subscriptions.push(e)}},{key:"unsubscribeToStateChanges",value:function(e){this.subscriptions=this.subscriptions.filter((function(t){return t!==e}))}},{key:"tearDown",value:function(){this.subscriptions=[],this.URLManager&&this.URLManager.tearDown()}},{key:"getActions",value:function(){return this.actions}},{key:"getState",value:function(){return it({},this.state)}}])&&ot(t.prototype,n),i&&ot(t,i),e}(),ht=(n(20),n(13)),ft=n(14);function dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function yt(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mt(e,t){var n=t.additionalFacetValueFields,r=void 0===n?{}:n;return e&&0!==Object.keys(e).length?Object.entries(e).reduce((function(e,t){var n=dt(t,2),i=n[0],o=n[1].map((function(e){var t=e.type,n=e.data,o=vt(e,["type","data"]);return function(e,t){return yt({field:e},t)}(i,yt({type:t,data:n.map((function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.count,r=e.value,i=vt(e,["count","value"]);return{count:n,value:r||yt({},i,t)}}(e,r[i])}))},o))}));return yt({},e,gt({},i,o))}),{}):e}function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.info.facets,r=e.info.meta.request_id,i=e.info.meta.page?e.info.meta.page.total_pages:void 0,o=e.info.meta.page?e.info.meta.page.total_results:void 0;return yt({},n&&{facets:mt(n,t)},{requestId:r,results:e.rawResults.map((function(e){e._meta;return yt({},vt(e,["_meta"]))}))},void 0!==i&&{totalPages:i},void 0!==o&&{totalResults:o})}function wt(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kt(e){if(e&&e.name){e.name;return wt({},xt(e,["name"]))}return e}function Ot(e){var t=e.values.map(kt).map((function(t){return St({},e.field,t)}));return St({},e.type||"any",t)}function Pt(e){var t,n=e.current,r=e.resultsPerPage,i=e.searchTerm,o=e.sortDirection,a=e.sortField,s=a&&o?St({},a,o):void 0;return wt({query:i},void 0!==s&&{sort:s},{page:wt({},void 0!==r&&{size:r},void 0!==n&&{current:n}),filters:(t=e.filters,t&&0!==t.length?{all:t.map(Ot)}:{})})}function _t(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=Object.entries(e.facets||{}).reduce((function(e,t){var n=jt(t,2),r=n[0],i=n[1];return i.unit&&i.center?_t({},e||{},At({},r,_t({},i.unit&&{unit:i.unit},i.center&&{center:i.center}))):e}),null);return _t({},t&&{additionalFacetValueFields:t})}function Ct(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Tt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ct(o,r,i,a,s,"next",e)}function s(e){Ct(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Rt(e,t){for(var n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ut(e){var t=e.facets,n=e.filters,r=Ft(e,["facets","filters"]);return Nt({},t&&Object.entries(t).length>0&&{facets:t},n&&Object.entries(n).length>0&&{filters:n},r)}var Lt=function(){function e(t){var n=t.searchKey,r=t.engineName,i=t.hostIdentifier,o=t.additionalOptions,a=void 0===o?function(){return{}}:o,s=t.endpointBase,c=void 0===s?"":s;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r||!i||!n)throw Error("engineName, hostIdentifier, and searchKey are required");this.client=ht.createClient({endpointBase:c,hostIdentifier:i,apiKey:n,engineName:r,additionalHeaders:{"x-swiftype-integration":"search-ui","x-swiftype-integration-version":ft.a}}),this.additionalOptions=a}var t,n,r,i,o;return t=e,(n=[{key:"onResultClick",value:function(e){var t=e.query,n=e.documentId,r=e.requestId,i=e.tags,o=void 0===i?[]:i;return o=o.concat("results"),this.client.click({query:t,documentId:n,requestId:r,tags:o})}},{key:"onAutocompleteResultClick",value:function(e){var t=e.query,n=e.documentId,r=e.requestId,i=e.tags,o=void 0===i?[]:i;return o=o.concat("autocomplete"),this.client.click({query:t,documentId:n,requestId:r,tags:o})}},{key:"onSearch",value:(o=Tt(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,l,u,p,h,f,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.current,i=n.filters,o=n.resultsPerPage,a=n.sortDirection,s=n.sortField,c=Ft(n,["current","filters","resultsPerPage","sortDirection","sortField"]),l=Pt(Nt({},t,void 0!==r&&{current:r},void 0!==i&&{filters:i},void 0!==o&&{resultsPerPage:o},void 0!==a&&{sortDirection:a},void 0!==s&&{sortField:s})),u=l.query,p=Ft(l,["query"]),h=Nt({},c,p),f=Nt({},Ut(h),this.additionalOptions(h)),e.next=6,this.client.search(u,f);case 6:return d=e.sent,e.abrupt("return",bt(d,Et(n)));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"onAutocomplete",value:(i=Tt(regeneratorRuntime.mark((function e(t,n){var r,i,o,a,s,c,l,u,p,h,f,d,y,g,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.searchTerm,i={},o=[],n.results&&(a=n.results,s=a.current,c=a.filters,l=a.resultsPerPage,u=a.sortDirection,p=a.sortField,h=Ft(a,["current","filters","resultsPerPage","sortDirection","sortField"]),f=Pt({current:s,searchTerm:r,filters:c,resultsPerPage:l,sortDirection:u,sortField:p}),d=f.query,y=Ft(f,["query"]),g=Nt({},h,y),v=Nt({},Ut(g),this.additionalOptions(g)),o.push(this.client.search(d,v).then((function(e){i.autocompletedResults=bt(e).results,i.autocompletedResultsRequestId=e.info.meta.request_id})))),n.suggestions&&o.push(this.client.querySuggestion(r,n.suggestions).then((function(e){i.autocompletedSuggestions=e.results,i.autocompletedSuggestionsRequestId=e.meta.request_id}))),e.next=7,Promise.all(o);case 7:return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})}])&&Rt(t.prototype,n),r&&Rt(t,r),e}();var Dt={debug:!0,apiConnector:new Lt({searchKey:"search-3493gera4z2iiew7gywtmfwy",engineName:"huducu",hostIdentifier:"host-x9sasu"}),searchQuery:{disjunctiveFacets:["actors","genre","director","year","imdbrating","country"],facets:{imdbrating:{type:"range",ranges:[{from:0,to:2,name:"0-2"},{from:2,to:4,name:"2-4"},{from:4,to:6,name:"4-6"},{from:6,to:8,name:"6-8"},{from:8,to:10,name:"8-10"}]},actors:{type:"value"},genre:{type:"value"},director:{type:"value"},year:{type:"value"}}}};customElements.define("search-provider",class extends K{constructor(){super(),this.ready=!1}fireOnDriverReady(){if(this.ready)return;let e=new CustomEvent("driver-ready",{detail:{},bubbles:!0,composed:!0});this.dispatchEvent(e),this.ready=!0}static get properties(){return{config:{type:Object,required:!0},template:{type:String}}}render(){return q` +(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const nt={};class rt extends X{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(Array.isArray(t)){const e=(t,n)=>t.reduceRight((t,n)=>Array.isArray(n)?e(n,t):(t.add(n),t),n),n=e(t,new Set),r=[];n.forEach(t=>r.unshift(t)),this._styles=r}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map(t=>{if(t instanceof CSSStyleSheet&&!Z){const e=Array.prototype.slice.call(t.cssRules).reduce((t,e)=>t+e.cssText,"");return new et(String(e),tt)}return t})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Z?this.renderRoot.adoptedStyleSheets=t.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==nt&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return nt}}function it(){return(it=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");const r=n.scopeName,i=M.has(e),o=H&&11===e.nodeType&&!!e.host,a=o&&!z.has(r),c=a?document.createDocumentFragment():e;if(((t,e,n)=>{let r=M.get(e);void 0===r&&(s(e,e.firstChild),M.set(e,r=new C(Object.assign({templateFactory:L},n))),r.appendInto(e)),r.setValue(t),r.commit()})(t,c,Object.assign({templateFactory:B(r)},n)),a){const t=M.get(c);M.delete(c);const n=t.value instanceof x?t.value.template:void 0;G(r,c,n),s(e,e.firstChild),e.appendChild(c),M.set(e,t)}!i&&o&&window.ShadyCSS.styleElement(e.host)},rt.shadowRootOptions={mode:"open"};var at=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],i=e&&e.split("/")||[],o=t&&ot(t),s=e&&ot(e),a=o||s;if(t&&ot(t)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var c=i[i.length-1];n="."===c||".."===c||""===c}else n=!1;for(var l=0,u=i.length;u>=0;u--){var p=i[u];"."===p?st(i,u):".."===p?(st(i,u),l++):l&&(st(i,u),l--)}if(!a)for(;l--;l)i.unshift("..");!a||""===i[0]||i[0]&&ot(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function ct(t,e){if(!t)throw new Error("Invariant failed")}function lt(t){return"/"===t.charAt(0)?t:"/"+t}function ut(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function pt(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function ht(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function ft(t,e,n,r){var i;"string"==typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=it({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=at(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function dt(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;rfunction(t){return null!=t&&"number"==typeof t}(t)?`n_${t}_n`:function(t){return t&&"boolean"==typeof t}(t)?`b_${t}_b`:e(t),decode(t,e){if(/n_-?[\d\.]*_n/.test(t)){const e=t.substring(2,t.length-2);return Number(e)}if(/^b_(true|false)*_b$/.test(t)){return function(t){if("true"===t)return!0;if("false"===t)return!1;throw"Invalid type parsed as Boolean value"}(t.substring(2,t.length-2))}return e(t)}},kt={parse:t=>St.a.parse(t,{ignoreQueryPrefix:!0,decoder:xt.decode,arrayLimit:1e3}),stringify:t=>St.a.stringify(t,{encoder:xt.encode})};function Ot(t){return Array.isArray(t)?t[t.length-1]:t}function jt(t){return function(t){if(!function(t){return!isNaN(t)}(t))return;return parseInt(t,10)}(Ot(t))}function Pt(t){return t.filters}function _t(t){return jt(t.current)}function At(t){return Ot(t.q)}function Et(t){const e=Ot(t["sort-field"]),n=Ot(t["sort-direction"]);return e?[e,n]:[]}function Ct(t){return jt(t.size)}function Tt(t){return t.sort}class Rt{constructor(t={}){this.routingOptions={readUrl:t.readUrl||this.readUrl.bind(this),writeUrl:t.writeUrl||this.writeUrl.bind(this),urlToState:t.urlToState||this.urlToState.bind(this),stateToUrl:t.stateToUrl||this.stateToUrl.bind(this),routeChangeHandler:t.routeChangeHandler||this.routeChangeHandler.bind(this)},this.history="undefined"!=typeof window?vt():function(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,r=e.initialEntries,i=void 0===r?["/"]:r,o=e.initialIndex,s=void 0===o?0:o,a=e.keyLength,c=void 0===a?6:a,l=dt();function u(t){it(g,t),g.length=g.entries.length,l.notifyListeners(g.location,g.action)}function p(){return Math.random().toString(36).substr(2,c)}var h=bt(s,0,i.length-1),f=i.map((function(t){return ft(t,void 0,"string"==typeof t?p():t.key||p())})),d=ht;function y(t){var e=bt(g.index+t,0,g.entries.length-1),r=g.entries[e];l.confirmTransitionTo(r,"POP",n,(function(t){t?u({action:"POP",location:r,index:e}):u()}))}var g={length:f.length,action:"POP",location:f[h],index:h,entries:f,createHref:d,push:function(t,e){var r=ft(t,e,p(),g.location);l.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=g.index+1,n=g.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),u({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=ft(t,e,p(),g.location);l.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(g.entries[g.index]=r,u({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(t){var e=g.index+t;return e>=0&&e{const r=e[n];return r&&(t[n]=r),t},{})}(kt.parse(t))}stateToUrl(t){return""+function(t){return kt.stringify(function({searchTerm:t,current:e,filters:n,resultsPerPage:r,sortDirection:i,sortField:o,sortList:s}){const a={};return e>1&&(a.current=e),t&&(a.q=t),r&&(a.size=r),n&&n.length>0&&(a.filters=n),s&&s.length>0?a.sort=s:o&&(a["sort-field"]=o,a["sort-direction"]=i),a}(t))}(t)}getStateFromURL(){return this.routingOptions.urlToState(this.routingOptions.readUrl())}pushStateToURL(t,{replaceUrl:e=!1}={}){const n=this.routingOptions.stateToUrl(t);this.lastPushSearchString=n,this.routingOptions.writeUrl(n,{replaceUrl:e})}onURLStateChange(t){this.unlisten=this.routingOptions.routeChangeHandler((e=>{"?"+this.lastPushSearchString!==e&&(this.lastPushSearchString="",t(this.routingOptions.urlToState(e)))}).bind(this))}routeChangeHandler(t){return this.history.listen(e=>{t(e.search)})}tearDown(){this.unlisten()}}class Nt{constructor(){this.requestSequence=0,this.lastCompleted=0}next(){return++this.requestSequence}isOldRequest(t){return t{t.apply(null,r)};clearTimeout(n),n=setTimeout(i,e)};return r.cancel=()=>{n&&(clearTimeout(n),n=null)},r}class It{constructor(){this.debounceCache={}}runWithDebounce(t,e,n,...r){if(!t)return n(...r);const i=`${e}|${t.toString()}`;let o=this.debounceCache[i];o||(this.debounceCache[i]=Ft(n,t),o=this.debounceCache[i]),o(...r)}cancelByName(t){Object.entries(this.debounceCache).filter(([e])=>e.startsWith(t+"|")).forEach(([t,e])=>e.cancel())}}It.debounce=(t,e)=>Ft(e,t);var Ut=It,Lt=n(20),qt=n.n(Lt),Mt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);it.field===e&&t.type===n);return r?r.values:[]}function Dt(t,e,n,r){return t.reduce((t,i)=>{const{field:o,values:s,type:a}=i,c=Mt(i,["field","values","type"]);if(o===e&&(!r||a===r)){const e=s.filter(t=>!Ht(t,n));return e.length>0?t.concat(Object.assign({field:o,values:e,type:a},c)):t}return t.concat(i)},[])}function Vt(t,e,n,r){const i=t.data,o=$t(e,n,r)||[];return Object.assign(Object.assign({},t),{data:i.map(t=>Object.assign(Object.assign({},t),{selected:o.some(e=>Ht(e,t.value))}))})}function Ht(t,e){return!!(t&&t.name&&e&&e.name&&t.name===e.name)||qt()(t,e,{strict:!0})}function Bt(t,e){return e?e.reduce((t,e)=>t.find(t=>t.type===e.type&&t.field===e.field)?t:[...t,e],t):t}function Wt(t){return"object"==typeof t&&void 0!==t.name}const zt=t=>t.reduce((t,e)=>(Wt(e)?t.push(e.name):t.push(e.toString()),t),[]).join(",");function Gt(t,e,n="all"){this.debug&&console.log("Search UI: Action","addFilter",...arguments);const{filters:r}=this.state,i=r.find(e=>e.field===t&&e.type===n)||null,o=r.filter(e=>e.field!==t||e.type!==n)||[],s=(null==i?void 0:i.values)||[],a=s.find(t=>Ht(t,e))?s:s.concat(e);this._updateSearchResults({current:1,filters:[...o,{field:t,values:a,type:n}]});const c=this.events;c.emit({type:"FacetFilterSelected",field:t,value:zt(a),query:this.state.searchTerm})}function Qt(t,e=[]){this.debug&&console.log("Search UI: Action","trackAutocompleteClickThrough",...arguments);const{autocompletedResultsRequestId:n,searchTerm:r,autocompletedResults:i,current:o,resultsPerPage:s,totalResults:a,filters:c}=this.state,l=i.findIndex(e=>e._meta.id===t),u=i[l],p=this.events;p.autocompleteResultClick({query:r,documentId:t,requestId:n,tags:e,result:u,resultIndex:l}),p.emit({type:"ResultSelected",documentId:t,query:r,position:l,origin:"autocomplete",tags:e,totalResults:a,filters:c,currentPage:o,resultsPerPage:s})}function Jt(t=[]){this.debug&&console.log("Search UI: Action","clearFilters",...arguments);const{filters:e}=this.state,n=e.filter(e=>{const n=e.field;return t.includes(n)});this._updateSearchResults({current:1,filters:n})}function Yt(t,e,n){this.debug&&console.log("Search UI: Action","removeFilter",...arguments);const{filters:r}=this.state;let i=r;i=!e&&n?r.filter(e=>!(e.field===t&&e.type===n)):e?Dt(r,t,e,n):r.filter(e=>e.field!==t),this._updateSearchResults({current:1,filters:i});const o=this.events;o.emit({type:"FacetFilterRemoved",field:t,value:e&&zt([e]),query:this.state.searchTerm})}function Xt(){this.debug&&console.log("Search UI: Action","reset",...arguments),this._setState(this.startingState),this.trackUrlState&&this.URLManager.pushStateToURL(this.state)}function Kt(t){this.debug&&console.log("Search UI: Action","setCurrent",...arguments),this._updateSearchResults({current:t})}function Zt(t,e,n="all"){this.debug&&console.log("Search UI: Action","setFilter",...arguments);let{filters:r}=this.state;r=r.filter(e=>e.field!==t||e.type!==n),this._updateSearchResults({current:1,filters:[...r,{field:t,values:[e],type:n}]});const i=this.events;i.emit({type:"FacetFilterSelected",field:t,value:e&&zt([e]),query:this.state.searchTerm})}function te(t){this.debug&&console.log("Search UI: Action","setResultsPerPage",...arguments),this._updateSearchResults({current:1,resultsPerPage:t})}function ee(t,{autocompleteMinimumCharacters:e=0,autocompleteResults:n=!1,autocompleteSuggestions:r=!1,shouldClearFilters:i=!0,refresh:o=!0,debounce:s=0}={}){this.debug&&console.log("Search UI: Action","setSearchTerm",...arguments),this._setState({searchTerm:t}),o&&this.debounceManager.runWithDebounce(s,"_updateSearchResults",this._updateSearchResults,Object.assign({current:1},i&&{filters:[]})),(n||r)&&t.length>=e&&this.debounceManager.runWithDebounce(s,"_updateAutocomplete",this._updateAutocomplete,t,{autocompleteResults:n,autocompleteSuggestions:r})}function ne(t,e){this.debug&&console.log("Search UI: Action","setSort",...arguments);const n={current:1,sortList:null,sortField:null,sortDirection:null};Array.isArray(t)?n.sortList=t:(n.sortField=t,n.sortDirection=e),this._updateSearchResults(n)}function re(t,e=[]){this.debug&&console.log("Search UI: Action","trackClickThrough",...arguments);const{requestId:n,searchTerm:r,results:i,current:o,resultsPerPage:s,totalResults:a,filters:c}=this.state,l=i.findIndex(e=>e._meta.id===t),u=i[l],p=this.events;this.events.resultClick({query:r,documentId:t,requestId:n,tags:e,result:u,page:o,resultsPerPage:s,resultIndexOnPage:l}),p.emit({type:"ResultSelected",documentId:t,query:r,origin:"results",position:l,tags:e,totalResults:a,filters:c,currentPage:o,resultsPerPage:s})}const ie="search-ui-screen-reader-notifications",oe="undefined"!=typeof document,se=()=>{if(!oe)return null;let t=document.getElementById(ie);return t||(t=document.createElement("div"),t.id=ie,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.style.position="absolute",t.style.width="1px",t.style.height="1px",t.style.margin="-1px",t.style.padding="0",t.style.border="0",t.style.overflow="hidden",t.style.clip="rect(0 0 0 0)",document.body.appendChild(t),t)},ae={searchResults:({start:t,end:e,totalResults:n,searchTerm:r})=>{let i=`Showing ${t} to ${e} results out of ${n}`;return r&&(i+=`, searching for "${r}".`),i}};function ce(t,e){if(!this.hasA11yNotifications)return;const n=this.a11yNotificationMessages[t];if(!n){const e=`Could not find corresponding message function in a11yNotificationMessages: "${t}"`;return void console.warn("Action","a11yNotify",e)}const r=n(e);(t=>{const e=se();e&&(e.textContent=t)})(r),this.debug&&console.log("Search UI: Action","a11yNotify",{messageFunc:t,messageArgs:e,message:r})}function le(t,e,n=[]){this.debug&&console.log("Search UI: Action","trackAutocompleteSuggestionClickThrough",...arguments);const{searchTerm:r}=this.state,i=this.events;i.emit({type:"AutocompleteSuggestionSelected",position:e,query:r,tags:n,suggestion:t})}function ue(t,e,n){if(n){if(e){const r=e[t].bind(e);return(...t)=>n(...t,r)}return n}return e&&e[t]?e[t].bind(e):()=>{throw`No ${t} handler provided and no Connector provided. You must configure one or the other.`}}var pe=class{constructor({apiConnector:t,onSearch:e,onAutocomplete:n,onResultClick:r,onAutocompleteResultClick:i,plugins:o=[]}={}){this.search=ue("onSearch",t,e),this.autocomplete=ue("onAutocomplete",t,n),this.resultClick=ue("onResultClick",t,r),this.autocompleteResultClick=ue("onAutocompleteResultClick",t,i),this.plugins=o}emit(t){this.plugins.forEach(e=>{e.subscribe(t)})}};var he=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i(e[r]&&"function"==typeof e[r]&&!e[r]({filters:n})||(t[r]=i),t),{})}var ge=class{constructor({apiConnector:t,autocompleteQuery:e={},plugins:n=[],debug:r,initialState:o,onSearch:s,onAutocomplete:a,onResultClick:c,onAutocompleteResultClick:l,searchQuery:u={},trackUrlState:p=!0,routingOptions:h={},urlPushDebounceLength:f=500,hasA11yNotifications:d=!1,a11yNotificationMessages:y={},alwaysSearchOnInitialLoad:g=!1}){let m;this.state=de,this._updateAutocomplete=(t,{autocompleteResults:e,autocompleteSuggestions:n}={})=>{const r=this.autocompleteRequestSequencer.next(),i=Object.assign(Object.assign({},e&&{results:this.autocompleteQuery.results||{}}),n&&{suggestions:this.autocompleteQuery.suggestions||{}});return this.events.autocomplete({searchTerm:t},i).then(t=>{this.autocompleteRequestSequencer.isOldRequest(r)||(this.autocompleteRequestSequencer.completed(r),this._setState(t))})},this._updateSearchResults=(t,{skipPushToUrl:e=!1,replaceUrl:n=!1}={})=>{const{current:r,filters:i,resultsPerPage:o,searchTerm:s,sortDirection:a,sortField:c,sortList:l}=Object.assign(Object.assign({},this.state),t);this.debounceManager.cancelByName("_updateSearchResults"),this._setState({current:r,error:"",filters:i,resultsPerPage:o,searchTerm:s,sortDirection:a,sortField:c,sortList:l}),this._makeSearchRequest({skipPushToUrl:e,replaceUrl:n})},this._makeSearchRequest=Ut.debounce(0,({skipPushToUrl:t,replaceUrl:e})=>{const{current:n,filters:r,resultsPerPage:i,searchTerm:o,sortDirection:s,sortField:a,sortList:c}=this.state;this._setState({isLoading:!0});const l=this.searchRequestSequencer.next(),u=this.searchQuery,{conditionalFacets:p}=u,h=he(u,["conditionalFacets"]),f=Object.assign(Object.assign({},h),{facets:ye(this.searchQuery.facets,p,r)}),d=Object.assign(Object.assign({},fe(this.state)),{filters:Bt(r,this.searchQuery.filters)});return this.events.search(d,f).then(u=>{if(this.searchRequestSequencer.isOldRequest(l))return;this.searchRequestSequencer.completed(l);const{totalResults:p}=u;this.events.emit({type:"SearchQuery",filters:this.state.filters,query:this.state.searchTerm,currentPage:d.current,resultsPerPage:d.resultsPerPage,totalResults:p});const h=0===p?0:(n-1)*i+1,f=p{var e;"Invalid credentials"!==t.message?this._setState({error:"An unexpected error occurred: "+t.message}):this._setState(Object.assign({},(null===(e=this.apiConnector)||void 0===e?void 0:e.state)&&Object.assign({},this.apiConnector.state)))})}),this.actions=Object.entries(i).reduce((t,[e,n])=>Object.assign(Object.assign({},t),{[e]:n.bind(this)}),{}),this.actions=Object.assign(Object.assign({},this.actions),(null==t?void 0:t.actions)&&Object.assign({},t.actions)),Object.assign(this,this.actions),this.events=new pe({apiConnector:t,onSearch:s,onAutocomplete:a,onResultClick:c,onAutocompleteResultClick:l,plugins:n}),this.debug=r,this.debug&&(console.warn("Search UI Debugging is enabled. This should be turned off in production deployments."),"undefined"!=typeof window&&(window.searchUI=this)),this.autocompleteRequestSequencer=new Nt,this.searchRequestSequencer=new Nt,this.debounceManager=new Ut,this.autocompleteQuery=e,this.searchQuery=u,this.subscriptions=[],this.trackUrlState=p,this.urlPushDebounceLength=f,this.alwaysSearchOnInitialLoad=g,this.apiConnector=t,p?(this.URLManager=new Rt(h),m=this.URLManager.getStateFromURL(),this.URLManager.onURLStateChange(t=>{this._updateSearchResults(Object.assign(Object.assign({},de),t),{skipPushToUrl:!0})})):m={},this.hasA11yNotifications=d,this.hasA11yNotifications&&se(),this.a11yNotificationMessages=Object.assign(Object.assign({},ae),y),this.startingState=Object.assign(Object.assign({},this.state),o);const v=fe(Object.assign(Object.assign({},this.startingState),m));this.state=Object.assign(Object.assign(Object.assign({},this.state),(null==t?void 0:t.state)&&Object.assign({},t.state)),v),(v.searchTerm||v.filters.length>0||this.alwaysSearchOnInitialLoad)&&this._updateSearchResults(v,{replaceUrl:!0})}_setState(t){const e=Object.assign(Object.assign({},this.state),t);this.debug&&console.log("Search UI: State Update",t,e),this.state=e,this.subscriptions.forEach(t=>t(e))}setSearchQuery(t){this.searchQuery=t,this._updateSearchResults({})}setAutocompleteQuery(t){this.autocompleteQuery=t}subscribeToStateChanges(t){this.subscriptions.push(t)}unsubscribeToStateChanges(t){this.subscriptions=this.subscriptions.filter(e=>e!==t)}tearDown(){this.subscriptions=[],this.URLManager&&this.URLManager.tearDown(),this.debounceManager.cancelByName("pushStateToURL")}getActions(){return this.actions}getState(){return Object.assign({},this.state)}},me=(n(25),n(19)),ve=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i{const i=r.map(t=>{const{type:r,data:i}=t,o=ve(t,["type","data"]);return function(t,e){return Object.assign({field:t},e)}(n,Object.assign({type:r,data:i.map(t=>function(t,e={}){const n=Object.prototype.hasOwnProperty.call(t,"value"),{count:r,value:i}=t,o=ve(t,["count","value"]);return{count:r,value:n?i:Object.assign(Object.assign({},o),e)}}(t,e[n]))},o))});return Object.assign(Object.assign({},t),{[n]:i})},{}):t}function we(t,e={}){const n=t.info.facets,r=t.info.meta.request_id,i=t.info.meta.page&&void 0!==t.info.meta.page.total_pages?function(t){return Math.min(t,100)}(t.info.meta.page.total_pages):void 0,o=t.info.meta.page?t.info.meta.page.total_results:void 0;return Object.assign(Object.assign(Object.assign(Object.assign({},n&&{facets:be(n,e)}),{rawResponse:t,requestId:r,results:t.rawResults}),void 0!==i&&{totalPages:i}),void 0!==o&&{totalResults:o})}const Se=Object.assign({},r);var xe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i({[t.field]:e})):[{[t.field]:t.values.map(ke).map(t=>t)}],{[t.type||"any"]:n}}function je(t){if(!t||0===t.length)return{};return{all:t.map(Oe)}}function Pe(t){const{current:e,resultsPerPage:n,searchTerm:r,sortDirection:i,sortField:o,sortList:s}=t,a=function(t,e,n){return n&&n.length?n.map(t=>({[t.field]:t.direction})):e&&t?{[e]:t}:void 0}(i,o,s);return Object.assign(Object.assign({query:r},void 0!==a&&{sort:a}),{page:Object.assign(Object.assign({},void 0!==n&&{size:n}),void 0!==e&&{current:e}),filters:je(t.filters)})}var _e=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Ae=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i0&&{facets:e}),n&&Object.entries(n).length>0&&{filters:n}),r)}var Ce=class{constructor(t){var{searchKey:e,engineName:n,beforeSearchCall:r=((t,e)=>e(t)),beforeAutocompleteResultsCall:i=((t,e)=>e(t)),beforeAutocompleteSuggestionsCall:o=((t,e)=>e(t)),cacheResponses:s=!0}=t,a=Ae(t,["searchKey","engineName","beforeSearchCall","beforeAutocompleteResultsCall","beforeAutocompleteSuggestionsCall","cacheResponses"]);if(!n||!("hostIdentifier"in a)&&!("endpointBase"in a))throw Error("hostIdentifier or endpointBase, and engineName are required");this.client=me.createClient(Object.assign(Object.assign(Object.assign(Object.assign({},"endpointBase"in a&&{endpointBase:a.endpointBase}),"hostIdentifier"in a&&{hostIdentifier:a.hostIdentifier}),{apiKey:e,engineName:n,cacheResponses:s}),a)),this.beforeSearchCall=r,this.beforeAutocompleteResultsCall=i,this.beforeAutocompleteSuggestionsCall=o}onResultClick({query:t,documentId:e,requestId:n,tags:r=[]}){return r=r.concat("results"),this.client.click({query:t,documentId:e,requestId:n,tags:r})}onAutocompleteResultClick({query:t,documentId:e,requestId:n,tags:r=[]}){return r=r.concat("autocomplete"),this.client.click({query:t,documentId:e,requestId:n,tags:r})}onSearch(t,e){return _e(this,void 0,void 0,(function*(){const{current:n,resultsPerPage:r,sortDirection:i,sortField:o,sortList:s}=e,a=Ae(e,["current","resultsPerPage","sortDirection","sortField","sortList"]),c=Pe(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),void 0!==n&&{current:n}),void 0!==r&&{resultsPerPage:r}),void 0!==i&&{sortDirection:i}),void 0!==o&&{sortField:o}),void 0!==s&&{sortList:s})),{query:l}=c,u=Ae(c,["query"]),p=Object.assign(Object.assign({},a),u),h=Object.assign({},Ee(p));return this.beforeSearchCall(h,t=>_e(this,void 0,void 0,(function*(){return we(yield this.client.search(l,t),function(t={}){const e=Object.entries(t.facets||{}).reduce((t,[e,n])=>n.unit&&n.center?Object.assign(Object.assign({},t||{}),{[e]:Object.assign(Object.assign({},n.unit&&{unit:n.unit}),n.center&&{center:n.center})}):t,null);return Object.assign({},e&&{additionalFacetValueFields:e})}(e))})))}))}onAutocomplete({searchTerm:t},e){return _e(this,void 0,void 0,(function*(){const n={},r=[];if(e.results){const i=e.results,{current:o,filters:s,resultsPerPage:a,sortDirection:c,sortField:l,sortList:u}=i,p=Ae(i,["current","filters","resultsPerPage","sortDirection","sortField","sortList"]),h=Pe({current:o,searchTerm:t,filters:s,resultsPerPage:a,sortDirection:c,sortField:l,sortList:u}),{query:f}=h,d=Ae(h,["query"]),y=Ee(Object.assign(Object.assign({},p),d));r.push(this.beforeAutocompleteResultsCall(y,t=>this.client.search(f,Object.assign(Object.assign({},t),{record_analytics:!1})).then(t=>{n.autocompletedResults=we(t).results,n.autocompletedResultsRequestId=t.info.meta.request_id})))}if(e.suggestions){const i=e.suggestions;r.push(this.beforeAutocompleteSuggestionsCall(i,e=>this.client.querySuggestion(t,e).then(t=>{n.autocompletedSuggestions=t.results,n.autocompletedSuggestionsRequestId=t.meta.request_id})))}return yield Promise.all(r),n}))}};var Te={debug:!0,apiConnector:new Ce({searchKey:"search-3493gera4z2iiew7gywtmfwy",engineName:"huducu",hostIdentifier:"host-x9sasu"}),searchQuery:{disjunctiveFacets:["actors","genre","director","year","imdbrating","country"],facets:{imdbrating:{type:"range",ranges:[{from:0,to:2,name:"0-2"},{from:2,to:4,name:"2-4"},{from:4,to:6,name:"4-6"},{from:6,to:8,name:"6-8"},{from:8,to:10,name:"8-10"}]},actors:{type:"value"},genre:{type:"value"},director:{type:"value"},year:{type:"value"}}}};customElements.define("search-provider",class extends rt{constructor(){super(),this.ready=!1}fireOnDriverReady(){if(this.ready)return;let t=new CustomEvent("driver-ready",{detail:{},bubbles:!0,composed:!0});this.dispatchEvent(t),this.ready=!0}static get properties(){return{config:{type:Object,required:!0},template:{type:String}}}render(){return D`
- `}connectedCallback(){super.connectedCallback();let e=this,t=Dt;if(this.getAttribute("config"))try{t=JSON.parse(this.getAttribute("config")),t.apiConnector=new Lt(t.apiConnector)}catch(e){alert("Bad Config Passed. Using default.")}this.driver=new pt(t),this.driver.subscribeToStateChanges(e=>{this.fireOnDriverReady()}),setTimeout((function(){e.driver.getState().wasSearched||e.driver.getActions().setSearchTerm("")}),750)}});var qt=class{static getSearchController(e=this){return function e(t){if(!t||t===document||t===window)return null;let n=t.closest("search-provider");return n||e(t.getRootNode().host)}(e)}static getDriver(e){var t=this.getSearchController(e);return new Promise((e,n)=>{t?t.ready?e(t.driver):t.addEventListener("driver-ready",t=>{e(t.target.driver)}):(alert("Missing Search Provider"),n("Missing Search Provider!"))})}static changeFacet(e,t,n,r){const i=e.getState().facets[t][0],o="range"===i.type?i.data.find(e=>e.value.name===n).value:n;r?e.addFilter(t,o,"any"):e.removeFilter(t,o,"any")}};customElements.define("search-facet",class extends K{constructor(){super(),this.facets={},this.checked=[]}static get properties(){return{facet:{type:String,reflect:!0,attribute:!0},title:{type:String,reflect:!0,attribute:!0},facets:{type:Object},checked:{type:Array}}}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n)}isChecked(e){return this.checked&&this.checked.includes(e)}getValue(e,t){return"range"===t?e.value.name:e.value}changeHandler(e){let t=new CustomEvent("facet-changed",{detail:{facet:this.facets.field,value:e.target.value,checked:e.target.checked},bubbles:!0,composed:!0});this.dispatchEvent(t);const n=this.driver.getState().facets[this.facet][0],r="range"===n.type?n.data.find(t=>t.value.name===e.target.value).value:e.target.value;e.target.checked?this.driver.addFilter(this.facet,r,"any"):this.driver.removeFilter(this.facet,r,"any")}render(){if(!this.facets.data)return q``;const e=[];for(const n of this.facets.data){var t=q``;t=this.isChecked(this.getValue(n,this.facets.type))?q` + `}connectedCallback(){super.connectedCallback();let t=this,e=Te;if(this.getAttribute("config"))try{e=JSON.parse(this.getAttribute("config")),e.apiConnector=new Ce(e.apiConnector)}catch(t){alert("Bad Config Passed. Using default.")}this.driver=new ge(e),this.driver.subscribeToStateChanges(t=>{this.fireOnDriverReady()}),setTimeout((function(){t.driver.getState().wasSearched||t.driver.getActions().setSearchTerm("")}),750)}});var Re=class{static getSearchController(t=this){return function t(e){if(!e||e===document||e===window)return null;let n=e.closest("search-provider");return n||t(e.getRootNode().host)}(t)}static getDriver(t){var e=this.getSearchController(t);return new Promise((t,n)=>{e?e.ready?t(e.driver):e.addEventListener("driver-ready",e=>{t(e.target.driver)}):(alert("Missing Search Provider"),n("Missing Search Provider!"))})}static changeFacet(t,e,n,r){const i=t.getState().facets[e][0],o="range"===i.type?i.data.find(t=>t.value.name===n).value:n;r?t.addFilter(e,o,"any"):t.removeFilter(e,o,"any")}};customElements.define("search-facet",class extends rt{constructor(){super(),this.facets={},this.checked=[]}static get properties(){return{facet:{type:String,reflect:!0,attribute:!0},title:{type:String,reflect:!0,attribute:!0},facets:{type:Object},checked:{type:Array}}}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n)}isChecked(t){return this.checked&&this.checked.includes(t)}getValue(t,e){return"range"===e?t.value.name:t.value}changeHandler(t){let e=new CustomEvent("facet-changed",{detail:{facet:this.facets.field,value:t.target.value,checked:t.target.checked},bubbles:!0,composed:!0});this.dispatchEvent(e);const n=this.driver.getState().facets[this.facet][0],r="range"===n.type?n.data.find(e=>e.value.name===t.target.value).value:t.target.value;t.target.checked?this.driver.addFilter(this.facet,r,"any"):this.driver.removeFilter(this.facet,r,"any")}render(){if(!this.facets.data)return D``;const t=[];for(const n of this.facets.data){var e=D``;e=this.isChecked(this.getValue(n,this.facets.type))?D` - `:q` + `:D` - `,e.push(q` + `,t.push(D`
- `)}const n=q` + `)}const n=D` @@ -186,23 +186,23 @@ const Y="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.pro
- ${e} + ${t}
- `;return 0==this.facets.data.length?q``:n}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(this.driver.getState())}).catch(e=>{alert(e)})}handleState(e){this.facets={},this.checked=[];let t=e.facets;e.filters.forEach(e=>{e.field===this.facet&&(t[e.field]&&t[e.field].length>0&&"range"===t[e.field][0].type?this.checked=e.values.map(e=>e.name):this.checked=e.values)}),e.facets[this.facet]&&(this.facets=e.facets[this.facet][0]),this.requestUpdate()}});var $t='/**\n*** SIMPLE GRID\n*** (C) ZACH COLE 2016\n**/\n\n@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic);\n\n/* UNIVERSAL */\n\nhtml,\nbody {\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n left: 0;\n top: 0;\n font-size: 100%;\n}\n\n/* ROOT FONT STYLES */\n\n* {\n font-family: \'Lato\', Helvetica, sans-serif;\n color: #333447;\n line-height: 1.5;\n}\n\n/* TYPOGRAPHY */\n\nh1 {\n font-size: 2.5rem;\n}\n\nh2 {\n font-size: 2rem;\n}\n\nh3 {\n font-size: 1.375rem;\n}\n\nh4 {\n font-size: 1.125rem;\n}\n\nh5 {\n font-size: 1rem;\n}\n\nh6 {\n font-size: 0.875rem;\n}\n\np {\n font-size: 1.125rem;\n font-weight: 200;\n line-height: 1.8;\n}\n\n.font-light {\n font-weight: 300;\n}\n\n.font-regular {\n font-weight: 400;\n}\n\n.font-heavy {\n font-weight: 700;\n}\n\n/* POSITIONING */\n\n.left {\n text-align: left;\n}\n\n.right {\n text-align: right;\n}\n\n.center {\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n}\n\n.justify {\n text-align: justify;\n}\n\n/* ==== GRID SYSTEM ==== */\n\n.container {\n width: 90%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.row {\n position: relative;\n width: 100%;\n}\n\n.row [class^="col"] {\n float: left;\n margin: 0.5rem 2%;\n min-height: 0.125rem;\n}\n\n.col-1,\n.col-2,\n.col-3,\n.col-4,\n.col-5,\n.col-6,\n.col-7,\n.col-8,\n.col-9,\n.col-10,\n.col-11,\n.col-12 {\n width: 96%;\n}\n\n.col-1-sm {\n width: 4.33%;\n}\n\n.col-2-sm {\n width: 12.66%;\n}\n\n.col-3-sm {\n width: 21%;\n}\n\n.col-4-sm {\n width: 29.33%;\n}\n\n.col-5-sm {\n width: 37.66%;\n}\n\n.col-6-sm {\n width: 46%;\n}\n\n.col-7-sm {\n width: 54.33%;\n}\n\n.col-8-sm {\n width: 62.66%;\n}\n\n.col-9-sm {\n width: 71%;\n}\n\n.col-10-sm {\n width: 79.33%;\n}\n\n.col-11-sm {\n width: 87.66%;\n}\n\n.col-12-sm {\n width: 96%;\n}\n\n.row::after {\n\tcontent: "";\n\tdisplay: table;\n\tclear: both;\n}\n\n.hidden-sm {\n display: none;\n}\n\n@media only screen and (min-width: 33.75em) { /* 540px */\n .container {\n width: 80%;\n }\n}\n\n@media only screen and (min-width: 45em) { /* 720px */\n .col-1 {\n width: 4.33%;\n }\n\n .col-2 {\n width: 12.66%;\n }\n\n .col-3 {\n width: 21%;\n }\n\n .col-4 {\n width: 29.33%;\n }\n\n .col-5 {\n width: 37.66%;\n }\n\n .col-6 {\n width: 46%;\n }\n\n .col-7 {\n width: 54.33%;\n }\n\n .col-8 {\n width: 62.66%;\n }\n\n .col-9 {\n width: 71%;\n }\n\n .col-10 {\n width: 79.33%;\n }\n\n .col-11 {\n width: 87.66%;\n }\n\n .col-12 {\n width: 96%;\n }\n\n .hidden-sm {\n display: block;\n }\n}\n\n@media only screen and (min-width: 60em) { /* 960px */\n .container {\n width: 75%;\n max-width: 60rem;\n }\n}\n';customElements.define("search-facets",class extends K{constructor(){super(),this.facets=[]}static get properties(){return{}}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(e.getState())}).catch(e=>{alert(e)})}handleState(e){this.facets=Object.keys(e.facets),this.requestUpdate()}render(){var e=[];for(let t in this.facets)e.push(q` + `;return 0==this.facets.data.length?D``:n}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(this.driver.getState())}).catch(t=>{alert(t)})}handleState(t){this.facets={},this.checked=[];let e=t.facets;t.filters.forEach(t=>{t.field===this.facet&&(e[t.field]&&e[t.field].length>0&&"range"===e[t.field][0].type?this.checked=t.values.map(t=>t.name):this.checked=t.values)}),t.facets[this.facet]&&(this.facets=t.facets[this.facet][0]),this.requestUpdate()}});var Ne='/**\n*** SIMPLE GRID\n*** (C) ZACH COLE 2016\n**/\n\n@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic);\n\n/* UNIVERSAL */\n\nhtml,\nbody {\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n left: 0;\n top: 0;\n font-size: 100%;\n}\n\n/* ROOT FONT STYLES */\n\n* {\n font-family: \'Lato\', Helvetica, sans-serif;\n color: #333447;\n line-height: 1.5;\n}\n\n/* TYPOGRAPHY */\n\nh1 {\n font-size: 2.5rem;\n}\n\nh2 {\n font-size: 2rem;\n}\n\nh3 {\n font-size: 1.375rem;\n}\n\nh4 {\n font-size: 1.125rem;\n}\n\nh5 {\n font-size: 1rem;\n}\n\nh6 {\n font-size: 0.875rem;\n}\n\np {\n font-size: 1.125rem;\n font-weight: 200;\n line-height: 1.8;\n}\n\n.font-light {\n font-weight: 300;\n}\n\n.font-regular {\n font-weight: 400;\n}\n\n.font-heavy {\n font-weight: 700;\n}\n\n/* POSITIONING */\n\n.left {\n text-align: left;\n}\n\n.right {\n text-align: right;\n}\n\n.center {\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n}\n\n.justify {\n text-align: justify;\n}\n\n/* ==== GRID SYSTEM ==== */\n\n.container {\n width: 90%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.row {\n position: relative;\n width: 100%;\n}\n\n.row [class^="col"] {\n float: left;\n margin: 0.5rem 2%;\n min-height: 0.125rem;\n}\n\n.col-1,\n.col-2,\n.col-3,\n.col-4,\n.col-5,\n.col-6,\n.col-7,\n.col-8,\n.col-9,\n.col-10,\n.col-11,\n.col-12 {\n width: 96%;\n}\n\n.col-1-sm {\n width: 4.33%;\n}\n\n.col-2-sm {\n width: 12.66%;\n}\n\n.col-3-sm {\n width: 21%;\n}\n\n.col-4-sm {\n width: 29.33%;\n}\n\n.col-5-sm {\n width: 37.66%;\n}\n\n.col-6-sm {\n width: 46%;\n}\n\n.col-7-sm {\n width: 54.33%;\n}\n\n.col-8-sm {\n width: 62.66%;\n}\n\n.col-9-sm {\n width: 71%;\n}\n\n.col-10-sm {\n width: 79.33%;\n}\n\n.col-11-sm {\n width: 87.66%;\n}\n\n.col-12-sm {\n width: 96%;\n}\n\n.row::after {\n\tcontent: "";\n\tdisplay: table;\n\tclear: both;\n}\n\n.hidden-sm {\n display: none;\n}\n\n@media only screen and (min-width: 33.75em) { /* 540px */\n .container {\n width: 80%;\n }\n}\n\n@media only screen and (min-width: 45em) { /* 720px */\n .col-1 {\n width: 4.33%;\n }\n\n .col-2 {\n width: 12.66%;\n }\n\n .col-3 {\n width: 21%;\n }\n\n .col-4 {\n width: 29.33%;\n }\n\n .col-5 {\n width: 37.66%;\n }\n\n .col-6 {\n width: 46%;\n }\n\n .col-7 {\n width: 54.33%;\n }\n\n .col-8 {\n width: 62.66%;\n }\n\n .col-9 {\n width: 71%;\n }\n\n .col-10 {\n width: 79.33%;\n }\n\n .col-11 {\n width: 87.66%;\n }\n\n .col-12 {\n width: 96%;\n }\n\n .hidden-sm {\n display: block;\n }\n}\n\n@media only screen and (min-width: 60em) { /* 960px */\n .container {\n width: 75%;\n max-width: 60rem;\n }\n}\n';customElements.define("search-facets",class extends rt{constructor(){super(),this.facets=[]}static get properties(){return{}}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(t.getState())}).catch(t=>{alert(t)})}handleState(t){this.facets=Object.keys(t.facets),this.requestUpdate()}render(){var t=[];for(let e in this.facets)t.push(D`
- +

- `);return q` + `);return D` - ${e} - `}});var Mt=n(17),Vt=n.n(Mt); + ${t} + `}});var Fe=n(21),Ie=n.n(Fe); /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -216,38 +216,38 @@ const Y="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.pro * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const Ht=new WeakMap,zt=(Bt=e=>t=>{if(!(t instanceof j))throw new Error("unsafeHTML can only be used in text bindings");const n=Ht.get(t);if(void 0!==n&&O(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),Ht.set(t,{value:e,fragment:i})},(...e)=>{const t=Bt(...e);return v.set(t,!0),t});var Bt;customElements.define("search-results",class extends K{constructor(){super(),this.results=[]}static get properties(){return{results:{type:Array,required:!0},template_engine:{type:String}}}firstUpdated(e){this.cardtemplate||(this.cardtemplate=this.querySelector("template").innerHTML,this.updateTemplate())}updateTemplate(){if(this.cardtemplate){this.resultTemplates=[];for(const t of this.results){var e=Vt.a.render(this.cardtemplate,t);this.resultTemplates.push(q`${zt(e)}`)}this.requestUpdate()}}render(){return this.updateTemplate(),q` +const Ue=new WeakMap,Le=(qe=t=>e=>{if(!(e instanceof C))throw new Error("unsafeHTML can only be used in text bindings");const n=Ue.get(e);if(void 0!==n&&P(t)&&t===n.value&&e.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=t;const i=document.importNode(r.content,!0);e.setValue(i),Ue.set(e,{value:t,fragment:i})},(...t)=>{const e=qe(...t);return v.set(e,!0),e});var qe;customElements.define("search-results",class extends rt{constructor(){super(),this.results=[]}static get properties(){return{results:{type:Array,required:!0},template_engine:{type:String}}}firstUpdated(t){this.cardtemplate||(this.cardtemplate=this.querySelector("template").innerHTML,this.updateTemplate())}updateTemplate(){if(this.cardtemplate){this.resultTemplates=[];for(const e of this.results){var t=Ie.a.render(this.cardtemplate,e);this.resultTemplates.push(D`${Le(t)}`)}this.requestUpdate()}}render(){return this.updateTemplate(),D`
${this.resultTemplates}
- `}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(this.driver.getState())}).catch(e=>{alert(e)})}handleState(e){this.results=e.results,this.requestUpdate()}});customElements.define("search-pagination",class extends K{constructor(){super()}static get properties(){return{current:{type:Number,required:!0},total:{type:Number,required:!0},pagecount:{type:Number,required:!0}}}render(){var e=[];this.current=parseInt(this.current),this.current-3>1&&e.push(this.getPageLink(1)),this.current-3>2&&e.push(q`
  • ...
  • `);for(var t=this.current-3;t0&&t<=this.pagecount&&e.push(this.getPageLink(t));return this.current+3...`),this.current+3<=this.pagecount&&e.push(this.getPageLink(this.pagecount)),q` + `}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(this.driver.getState())}).catch(t=>{alert(t)})}handleState(t){this.results=t.results,this.requestUpdate()}});customElements.define("search-pagination",class extends rt{constructor(){super()}static get properties(){return{current:{type:Number,required:!0},total:{type:Number,required:!0},pagecount:{type:Number,required:!0}}}render(){var t=[];this.current=parseInt(this.current),this.current-3>1&&t.push(this.getPageLink(1)),this.current-3>2&&t.push(D`
  • ...
  • `);for(var e=this.current-3;e0&&e<=this.pagecount&&t.push(this.getPageLink(e));return this.current+3...`),this.current+3<=this.pagecount&&t.push(this.getPageLink(this.pagecount)),D`
    • - ${e} + ${t}
    - `}getPageLink(e){return e==this.current?q`
  • ${e}
  • `:q`
  • ${e}
  • `}changePage(e){let t=new CustomEvent("page-changed",{detail:{pagenum:parseInt(e.target.getAttribute("page-num"))},bubbles:!0,composed:!0});this.dispatchEvent(t),this.driver.setCurrent(parseInt(e.target.getAttribute("page-num")))}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(e.getState())}).catch(e=>{alert(e)})}handleState(e){this.current=e.current,this.total=e.totalResults,this.pagecount=e.totalPages,this.requestUpdate()}});var Wt=n(18);customElements.define("search-bar",class extends K{constructor(){super(),this.searchterm=""}static get properties(){return{searchterm:{type:String}}}search(e){let t=new CustomEvent("search-term",{detail:{value:this.shadowRoot.getElementById("search-bar").value},bubbles:!0,composed:!0});this.dispatchEvent(t),this.driver.getActions().setSearchTerm(this.shadowRoot.getElementById("search-bar").value)}render(){return q` + `}getPageLink(t){return t==this.current?D`
  • ${t}
  • `:D`
  • ${t}
  • `}changePage(t){let e=new CustomEvent("page-changed",{detail:{pagenum:parseInt(t.target.getAttribute("page-num"))},bubbles:!0,composed:!0});this.dispatchEvent(e),this.driver.setCurrent(parseInt(t.target.getAttribute("page-num")))}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(t.getState())}).catch(t=>{alert(t)})}handleState(t){this.current=t.current,this.total=t.totalResults,this.pagecount=t.totalPages,this.requestUpdate()}});var Me=n(22);customElements.define("search-bar",class extends rt{constructor(){super(),this.searchterm=""}static get properties(){return{searchterm:{type:String}}}search(t){let e=new CustomEvent("search-term",{detail:{value:this.shadowRoot.getElementById("search-bar").value},bubbles:!0,composed:!0});this.dispatchEvent(e),this.driver.getActions().setSearchTerm(this.shadowRoot.getElementById("search-bar").value)}render(){return D` - `}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(e.getState())}).catch(e=>{alert(e)})}handleState(e){this.searchterm=e.searchTerm,this.requestUpdate()}});customElements.define("search-clear-facets",class extends K{constructor(){super()}static get properties(){return{filters:{type:Object,required:!0}}}render(){var e=[];for(var t in this.filters){var n=this.filters[t];for(var r in n.length>0&&(e.push(q`
     
    `),e.push(q`
    ${t} :
    `)),n)e.push(q` - + `}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(t.getState())}).catch(t=>{alert(t)})}handleState(t){this.searchterm=t.searchTerm,this.requestUpdate()}});customElements.define("search-clear-facets",class extends rt{constructor(){super()}static get properties(){return{filters:{type:Object,required:!0}}}render(){var t=[];for(var e in this.filters){var n=this.filters[e];for(var r in n.length>0&&(t.push(D`
     
    `),t.push(D`
    ${e} :
    `)),n)t.push(D` +
    ${n[r]} @@ -258,7 +258,7 @@ const Ht=new WeakMap,zt=(Bt=e=>t=>{if(!(t instanceof j))throw new Error("unsafeH
    -
    `)}var i=[];return this.hasFacetFilter()&&i.push(q` + `)}var i=[];return this.hasFacetFilter()&&i.push(D`
    Clear All @@ -271,29 +271,29 @@ const Ht=new WeakMap,zt=(Bt=e=>t=>{if(!(t instanceof j))throw new Error("unsafeH
    - `),q` + `),D` ${i} - ${e} - `}removeFacet(e){e=e.target.closest("a");let t=new CustomEvent("facet-removed",{detail:{facet:e.getAttribute("suiwc-facet"),value:e.getAttribute("suiwc-facet-value")},bubbles:!0,composed:!0});this.dispatchEvent(t),qt.changeFacet(this.driver,e.getAttribute("suiwc-facet"),e.getAttribute("suiwc-facet-value"))}clearAll(e){e=e.target.closest("a");let t=new CustomEvent("clear-all",{detail:{},bubbles:!0,composed:!0});this.dispatchEvent(t),this.driver.clearFilters()}hasFacetFilter(){for(var e in this.filters)if(this.filters.hasOwnProperty(e)&&this.filters[e].length>0)return!0;return!1}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(e.getState())}).catch(e=>{alert(e)})}handleState(e){this.filters={},e.filters.forEach(t=>{e.facets[t.field]&&e.facets[t.field].length>0&&"range"===e.facets[t.field][0].type?this.filters[t.field]=t.values.map(e=>e.name):this.filters[t.field]=t.values}),this.requestUpdate()}});customElements.define("search-layout",class extends K{constructor(){super(),this.showFacetFilter=!1,this.facets=[]}static get properties(){return{}}connectedCallback(){super.connectedCallback(),qt.getDriver(this).then(e=>{this.driver=e,this.driver.subscribeToStateChanges(e=>{this.handleState(e)}),this.handleState(e.getState())}).catch(e=>{alert(e)})}handleState(e){this.showFacetFilter=this.hasFacetFilter(e),this.facets=Object.keys(e.facets),this.requestUpdate()}hasFacetFilter(e){return e.filters.length>0}render(){var e=[];for(let t in this.facets)e.push(q` + ${t} + `}removeFacet(t){t=t.target.closest("a");let e=new CustomEvent("facet-removed",{detail:{facet:t.getAttribute("suiwc-facet"),value:t.getAttribute("suiwc-facet-value")},bubbles:!0,composed:!0});this.dispatchEvent(e),Re.changeFacet(this.driver,t.getAttribute("suiwc-facet"),t.getAttribute("suiwc-facet-value"))}clearAll(t){t=t.target.closest("a");let e=new CustomEvent("clear-all",{detail:{},bubbles:!0,composed:!0});this.dispatchEvent(e),this.driver.clearFilters()}hasFacetFilter(){for(var t in this.filters)if(this.filters.hasOwnProperty(t)&&this.filters[t].length>0)return!0;return!1}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(t.getState())}).catch(t=>{alert(t)})}handleState(t){this.filters={},t.filters.forEach(e=>{t.facets[e.field]&&t.facets[e.field].length>0&&"range"===t.facets[e.field][0].type?this.filters[e.field]=e.values.map(t=>t.name):this.filters[e.field]=e.values}),this.requestUpdate()}});customElements.define("search-layout",class extends rt{constructor(){super(),this.showFacetFilter=!1,this.facets=[]}static get properties(){return{}}connectedCallback(){super.connectedCallback(),Re.getDriver(this).then(t=>{this.driver=t,this.driver.subscribeToStateChanges(t=>{this.handleState(t)}),this.handleState(t.getState())}).catch(t=>{alert(t)})}handleState(t){this.showFacetFilter=this.hasFacetFilter(t),this.facets=Object.keys(t.facets),this.requestUpdate()}hasFacetFilter(t){return t.filters.length>0}render(){var t=[];for(let e in this.facets)t.push(D`
    - +

    - `);return q` + `);return D`
    - ${e} + ${t}
    @@ -305,15 +305,15 @@ const Ht=new WeakMap,zt=(Bt=e=>t=>{if(!(t instanceof j))throw new Error("unsafeH

    -
    +
    -
    +
    diff --git a/dist/webcomponents/bundles/webcomponents-ce.js b/dist/webcomponents/bundles/webcomponents-ce.js index 08c8481..ec21b01 100644 --- a/dist/webcomponents/bundles/webcomponents-ce.js +++ b/dist/webcomponents/bundles/webcomponents-ce.js @@ -9,16 +9,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN */ (function(){/* - Copyright (c) 2020 The Polymer Project Authors. All rights reserved. - This code may only be used under the BSD style license found at - http://polymer.github.io/LICENSE.txt The complete set of authors may be found - at http://polymer.github.io/AUTHORS.txt The complete set of contributors may - be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by - Google as part of the polymer project is also subject to an additional IP - rights grant found at http://polymer.github.io/PATENTS.txt -*/ -'use strict';/* - Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found @@ -27,39 +17,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -var n=window.Document.prototype.createElement,p=window.Document.prototype.createElementNS,aa=window.Document.prototype.importNode,ba=window.Document.prototype.prepend,ca=window.Document.prototype.append,da=window.DocumentFragment.prototype.prepend,ea=window.DocumentFragment.prototype.append,q=window.Node.prototype.cloneNode,r=window.Node.prototype.appendChild,t=window.Node.prototype.insertBefore,u=window.Node.prototype.removeChild,v=window.Node.prototype.replaceChild,w=Object.getOwnPropertyDescriptor(window.Node.prototype, -"textContent"),y=window.Element.prototype.attachShadow,z=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),A=window.Element.prototype.getAttribute,B=window.Element.prototype.setAttribute,C=window.Element.prototype.removeAttribute,D=window.Element.prototype.getAttributeNS,E=window.Element.prototype.setAttributeNS,F=window.Element.prototype.removeAttributeNS,G=window.Element.prototype.insertAdjacentElement,H=window.Element.prototype.insertAdjacentHTML,fa=window.Element.prototype.prepend, -ha=window.Element.prototype.append,ia=window.Element.prototype.before,ja=window.Element.prototype.after,ka=window.Element.prototype.replaceWith,la=window.Element.prototype.remove,ma=window.HTMLElement,I=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),na=window.HTMLElement.prototype.insertAdjacentElement,oa=window.HTMLElement.prototype.insertAdjacentHTML;var pa=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(a){return pa.add(a)});function qa(a){var b=pa.has(a);a=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(a);return!b&&a}var ra=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement); -function J(a){var b=a.isConnected;if(void 0!==b)return b;if(ra(a))return!0;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function K(a){var b=a.children;if(b)return Array.prototype.slice.call(b);b=[];for(a=a.firstChild;a;a=a.nextSibling)a.nodeType===Node.ELEMENT_NODE&&b.push(a);return b} +'use strict';var n=window.Document.prototype.createElement,p=window.Document.prototype.createElementNS,aa=window.Document.prototype.importNode,ba=window.Document.prototype.prepend,ca=window.Document.prototype.append,da=window.DocumentFragment.prototype.prepend,ea=window.DocumentFragment.prototype.append,q=window.Node.prototype.cloneNode,r=window.Node.prototype.appendChild,t=window.Node.prototype.insertBefore,u=window.Node.prototype.removeChild,v=window.Node.prototype.replaceChild,w=Object.getOwnPropertyDescriptor(window.Node.prototype, +"textContent"),y=window.Element.prototype.attachShadow,z=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),A=window.Element.prototype.getAttribute,B=window.Element.prototype.setAttribute,C=window.Element.prototype.removeAttribute,D=window.Element.prototype.toggleAttribute,E=window.Element.prototype.getAttributeNS,F=window.Element.prototype.setAttributeNS,G=window.Element.prototype.removeAttributeNS,H=window.Element.prototype.insertAdjacentElement,fa=window.Element.prototype.insertAdjacentHTML, +ha=window.Element.prototype.prepend,ia=window.Element.prototype.append,ja=window.Element.prototype.before,ka=window.Element.prototype.after,la=window.Element.prototype.replaceWith,ma=window.Element.prototype.remove,na=window.HTMLElement,I=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),oa=window.HTMLElement.prototype.insertAdjacentElement,pa=window.HTMLElement.prototype.insertAdjacentHTML;var qa=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(a){return qa.add(a)});function ra(a){var b=qa.has(a);a=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(a);return!b&&a}var sa=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement); +function J(a){var b=a.isConnected;if(void 0!==b)return b;if(sa(a))return!0;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function K(a){var b=a.children;if(b)return Array.prototype.slice.call(b);b=[];for(a=a.firstChild;a;a=a.nextSibling)a.nodeType===Node.ELEMENT_NODE&&b.push(a);return b} function L(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null} -function M(a,b,c){for(var f=a;f;){if(f.nodeType===Node.ELEMENT_NODE){var d=f;b(d);var e=d.localName;if("link"===e&&"import"===d.getAttribute("rel")){f=d.import;void 0===c&&(c=new Set);if(f instanceof Node&&!c.has(f))for(c.add(f),f=f.firstChild;f;f=f.nextSibling)M(f,b,c);f=L(a,d);continue}else if("template"===e){f=L(a,d);continue}if(d=d.__CE_shadowRoot)for(d=d.firstChild;d;d=d.nextSibling)M(d,b,c)}f=f.firstChild?f.firstChild:L(a,f)}};function N(){var a=!(null===O||void 0===O||!O.noDocumentConstructionObserver),b=!(null===O||void 0===O||!O.shadyDomFastWalk);this.h=[];this.a=[];this.f=!1;this.shadyDomFastWalk=b;this.C=!a}function P(a,b,c,f){var d=window.ShadyDom;if(a.shadyDomFastWalk&&d&&d.inUse){if(b.nodeType===Node.ELEMENT_NODE&&c(b),b.querySelectorAll)for(a=d.nativeMethods.querySelectorAll.call(b,"*"),b=0;b\x20\t\r\n\f]+)/i.exec(t)|| -["",""])[1].toLowerCase()];if(D)for(var K=0;K"+t+"";y.body.innerHTML=t;for(a.a(y);this.content.firstChild;)k.call(this.content,this.content.firstChild);t=y.body;if(D)for(K=0;K"+this.innerHTML+""},set:function(t){if(this.parentNode){y.body.innerHTML=t;for(t=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(t, -y.body.firstChild);m.call(this.parentNode,t,this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};n(a.prototype);I(a.prototype);a.a=function(p){p=b(p,"template");for(var t=0,D=p.length,K;t]/g,cb=function(p){switch(p){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}};v=function(p){for(var t={},D=0;D";break a;case Node.TEXT_NODE:z=z.data;z=R&&db[R.localName]? -z:z.replace(Wb,cb);break a;case Node.COMMENT_NODE:z="\x3c!--"+z.data+"--\x3e";break a;default:throw window.console.error(z),Error("not implemented");}}D+=z}return D}}if(c||M){a.b=function(p,t){var D=f.call(p,!1);this.U&&this.U(D);t&&(l.call(D.content,f.call(p.content,!0)),u(D.content,p.content));return D};var u=function(p,t){if(t.querySelectorAll&&(t=b(t,"template"),0!==t.length)){p=b(p,"template");for(var D=0,K=p.length,aa,ja;D\x20\t\r\n\f]+)/i.exec(r)||["",""])[1].toLowerCase()];if(B)for(var K=0;K"+r+"";y.body.innerHTML=r;for(a.bootstrap(y);this.content.firstChild;)k.call(this.content,this.content.firstChild);r=y.body;if(B)for(K=0;K"+this.innerHTML+""},set:function(r){if(this.parentNode){y.body.innerHTML= +r;for(r=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(r,y.body.firstChild);m.call(this.parentNode,r,this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};n(a.prototype);J(a.prototype);a.bootstrap=function(p){p=b(p,"template");for(var r=0,B=p.length,K;r]/g,ib=function(p){switch(p){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}; +x=function(p){for(var r={},B=0;B";break a;case Node.TEXT_NODE:z=z.data;z=R&&jb[R.localName]?z:z.replace(jc,ib);break a;case Node.COMMENT_NODE:z="\x3c!--"+z.data+"--\x3e";break a;default:throw window.console.error(z),Error("not implemented");}}B+=z}return B}}if(c||N){a.va=function(p,r){var B=f.call(p,!1);this.Z&&this.Z(B);r&&(l.call(B.content,f.call(p.content,!0)),I(B.content,p.content));return B};var I=function(p,r){if(r.querySelectorAll&& +(r=b(r,"template"),0!==r.length)){p=b(p,"template");for(var B=0,K=p.length,aa,ma;B]/g;function Tb(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Ub(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&Yb[k.localName]?h:h.replace(Sb,Tb);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), -Error("not implemented");}}c+=h}return c};var $b=N.B,ac={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},bc={};function cc(a){bc[a]=function(b){return b["__shady_native_"+a]}}function dc(a,b){P(a,b,"__shady_native_");for(var c in b)cc(c)}function S(a,b){b=void 0===b?[]:b;for(var c=0;ce.assignedNodes.length&&(e.ra=!0)}e.ra&&(e.ra=!1,me(this,c))}c=this.a;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c]/g;function qd(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function rd(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&td[k.localName]?h:h.replace(pd,qd);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), +Error("not implemented");}}c+=h}return c};var vd=M.D,wd={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},xd={};function yd(a){xd[a]=function(b){return b["__shady_native_"+a]}}function zd(a,b){P(a,b,"__shady_native_");for(var c in b)yd(c)}function S(a,b){b=void 0===b?[]:b;for(var c=0;c","+","~"]),h=g===e?a[e]:a.substring(e,g);if(","===h)b();else if(-1===[void 0," ",">","+","~"].indexOf(f)||" "!==h)" "===f&&-1!==[">","+","~"].indexOf(h)?d[d.length-1]=h:d.push(h);e=g+(g===e?1:0)}b();return c};function Ze(a,b,c){var d=[];$e(a,b,c,d);return d}function $e(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:($e(e,f,g,h),e=void 0)}if(e)break}} +var af={get firstElementChild(){var a=L(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=L(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return Lc(this)?Wc(Array.prototype.filter.call(Yc(this), +function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},bf=Q((af.append=function(a){for(var b=[],c=0;cd.length)return[];for(b=dd(Ze(a,function(){return!0}).map(function(e){return dd(d.map(function(f){var g=f.La,h=g.length-1;return c(e,g[h])?{target:e,da:f,fa:e,index:h}:[]}))}));b.some(function(e){return 0=e.index)return e;var f=e.target,g=e.fa,h=e.da;e=e.index-1;var k=h.Za[e],l=h.La[e];if(" "===k){k=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g, +l)&&k.push({target:f,da:h,fa:g,index:e});return k}if(">"===k)return g=g.__shady_parentElement,c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("+"===k)return(g=g.__shady_previousElementSibling)&&c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("~"===k){k=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,l)&&k.push({target:f,da:h,fa:g,index:e});return k}throw Error("Unrecognized combinator: '"+k+"'.");}));return ed(b.map(function(e){return e.target}))} +var df=M.querySelectorImplementation,ef=Q({querySelector:function(a){if("native"===df){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=ka(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.__shady_getRootNode()==c)return d;return null}if("selectorEngine"===df)return cf(this,a)[0]||null;if(void 0===df)return Ze(this,function(e){return Pc.call(e,a)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+ +(df+"'"));},querySelectorAll:function(a,b){if(b||"native"===df){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return Wc(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===df)return Wc(cf(this,a));if(void 0===df)return Wc(Ze(this,function(d){return Pc.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(df+"'"));}}),ff=M.ha&&!M.J?ad({},bf): +bf;ad(bf,ef);var gf=Q({after:function(a){for(var b=[],c=0;ce.assignedNodes.length&&(e.Aa=!0)}e.Aa&&(e.Aa=!1,Wf(this,c))}c=this.g;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c "+h}))}return{value:a,Qa:b,stop:f}}function Yg(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,ah=/[[.:#*]/,Tg=/^(::slotted)/,$g=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Zg=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Wg=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Rg=/:(?:matches|any|-(?:webkit|moz)-any)/,Gg=new Dg;function ch(a,b,c,d,e){this.H=a||null;this.b=b||null;this.ta=c||[];this.F=null;this.cssBuild=e||"";this.ba=d||"";this.a=this.G=this.L=null}function dh(a){return a?a.__styleInfo:null}function eh(a,b){return a.__styleInfo=b}ch.prototype.c=function(){return this.H};ch.prototype._getStyleRules=ch.prototype.c;function fh(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var gh=/:host\s*>\s*/,hh=navigator.userAgent.match("Trident");function ih(){}function jh(a){var b={},c=[],d=0;og(a,function(f){kh(f);f.index=d++;f=f.v.cssText;for(var g;g=ig.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.b=c;a=[];for(var e in b)a.push(e);return a} -function kh(a){if(!a.v){var b={},c={};lh(a,c)&&(b.K=c,a.rules=null);b.cssText=a.parsedCssText.replace(lg,"").replace(gg,"");a.v=b}}function lh(a,b){var c=a.v;if(c){if(c.K)return Object.assign(b,c.K),!0}else{c=a.parsedCssText;for(var d;a=gg.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} -function mh(a,b,c){b&&(b=0<=b.indexOf(";")?nh(a,b,c):wg(b,function(d,e,f,g){if(!e)return d+g;(e=mh(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=mh(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} -function nh(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.w||(b.w=Ng(Gg,b,Gg.b,a?"."+a:"",e)),c=b.w||e),g&&"html"===e&&(c=b.w||b.J),d({wa:c,Xa:h,mb:g})}} -function qh(a,b,c){var d={},e={};og(b,function(f){ph(a,f,c,function(g){fh.call(a._element||a,g.wa)&&(g.Xa?lh(f,d):lh(f,e))})},null,!0);return{cb:e,Va:d}} -function rh(a,b,c,d){var e=zg(b),f=Mg(e.is,e.ba),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=dh(b);e=h.H;h=h.cssBuild;var k=sh(e,d);return Kg(b,e,function(l){var m="";l.v||kh(l);l.v.cssText&&(m=nh(a,l.v.cssText,c));l.cssText=m;if(!V&&!qg(l)&&l.cssText){var q=m=l.cssText;null==l.Da&&(l.Da=jg.test(m));if(l.Da)if(null==l.ja){l.ja=[];for(var H in k)q=k[H],q=q(m),m!==q&&(m=q,l.ja.push(H))}else{for(H=0;H=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));V?k.a?(k.a.textContent=h,g=k.a):h&&(g=rg(h,f,a.shadowRoot,k.b)):g?g.parentNode||(hh&&-1 "+h}))}return{value:a,Ya:b,stop:f}}function Hi(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ki=/[[.:#*]/,Ci=/^(::slotted)/,Ji=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ii=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Fi=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Ai=/:(?:matches|any|-(?:webkit|moz)-any)/,pi=new mi;function Mi(a,b,c,d,e){this.M=a||null;this.h=b||null;this.Ca=c||[];this.K=null;this.cssBuild=e||"";this.ja=d||"";this.g=this.L=this.R=null}function Ni(a){return a?a.__styleInfo:null}function Oi(a,b){return a.__styleInfo=b}Mi.prototype.i=function(){return this.M};Mi.prototype._getStyleRules=Mi.prototype.i;function Pi(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Qi=/:host\s*>\s*/,Ri=navigator.userAgent.match("Trident");function Si(){}function Ti(a){var b={},c=[],d=0;Yh(a,function(f){Ui(f);f.index=d++;f=f.F.cssText;for(var g;g=Rh.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.h=c;a=[];for(var e in b)a.push(e);return a} +function Ui(a){if(!a.F){var b={},c={};Vi(a,c)&&(b.P=c,a.rules=null);b.cssText=a.parsedCssText.replace(Uh,"").replace(Ph,"");a.F=b}}function Vi(a,b){var c=a.F;if(c){if(c.P)return Object.assign(b,c.P),!0}else{c=a.parsedCssText;for(var d;a=Ph.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} +function Wi(a,b,c){b&&(b=0<=b.indexOf(";")?Xi(a,b,c):fi(b,function(d,e,f,g){if(!e)return d+g;(e=Wi(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Wi(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} +function Xi(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.G||(b.G=wi(pi,b,pi.h,a?"."+a:"",e)),c=b.G||e),g&&"html"===e&&(c=b.G||b.O),d({Ea:c,gb:h,vb:g})}} +function $i(a,b,c){var d={},e={};Yh(b,function(f){Zi(a,f,c,function(g){Pi.call(a._element||a,g.Ea)&&(g.gb?Vi(f,d):Vi(f,e))})},null,!0);return{mb:e,eb:d}} +function aj(a,b,c,d){var e=ii(b),f=vi(e.is,e.ja),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=Ni(b);e=h.M;h=h.cssBuild;var k=bj(e,d);return ti(b,e,function(l){var m="";l.F||Ui(l);l.F.cssText&&(m=Xi(a,l.F.cssText,c));l.cssText=m;if(!V&&!$h(l)&&l.cssText){var q=m=l.cssText;null==l.Ma&&(l.Ma=Sh.test(m));if(l.Ma)if(null==l.ra){l.ra=[];for(var H in k)q=k[H],q=q(m),m!==q&&(m=q,l.ra.push(H))}else{for(H=0;H=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));V?k.g?(k.g.textContent=h,g=k.g):h&&(g=ai(h,f,a.shadowRoot,k.h)):g?g.parentNode||(Ri&&-1F&&-1==[34,35,60,62,63,96].indexOf(F)?r:encodeURIComponent(r)}function d(r){var F=r.charCodeAt(0);return 32F&&-1==[34,35,60,62,96].indexOf(F)?r:encodeURIComponent(r)}function e(r,F,C){function M(ka){ta.push(ka)}var y=F||"scheme start",W=0,v="",sa=!1,ea=!1,ta=[];a:for(;(void 0!=r[W-1]||0==W)&&!this.h;){var n=r[W];switch(y){case "scheme start":if(n&&q.test(n))v+= -n.toLowerCase(),y="scheme";else if(F){M("Invalid scheme.");break a}else{v="";y="no scheme";continue}break;case "scheme":if(n&&H.test(n))v+=n.toLowerCase();else if(":"==n){this.g=v;v="";if(F)break a;void 0!==l[this.g]&&(this.A=!0);y="file"==this.g?"relative":this.A&&C&&C.g==this.g?"relative or authority":this.A?"authority first slash":"scheme data"}else if(F){void 0!=n&&M("Code point not allowed in scheme: "+n);break a}else{v="";W=0;y="no scheme";continue}break;case "scheme data":"?"==n?(this.o="?", -y="query"):"#"==n?(this.u="#",y="fragment"):void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.pa+=c(n));break;case "no scheme":if(C&&void 0!==l[C.g]){y="relative";continue}else M("Missing scheme."),f.call(this),this.h=!0;break;case "relative or authority":if("/"==n&&"/"==r[W+1])y="authority ignore slashes";else{M("Expected /, got: "+n);y="relative";continue}break;case "relative":this.A=!0;"file"!=this.g&&(this.g=C.g);if(void 0==n){this.i=C.i;this.m=C.m;this.j=C.j.slice();this.o=C.o;this.s=C.s;this.f=C.f; -break a}else if("/"==n||"\\"==n)"\\"==n&&M("\\ is an invalid code point."),y="relative slash";else if("?"==n)this.i=C.i,this.m=C.m,this.j=C.j.slice(),this.o="?",this.s=C.s,this.f=C.f,y="query";else if("#"==n)this.i=C.i,this.m=C.m,this.j=C.j.slice(),this.o=C.o,this.u="#",this.s=C.s,this.f=C.f,y="fragment";else{y=r[W+1];var I=r[W+2];if("file"!=this.g||!q.test(n)||":"!=y&&"|"!=y||void 0!=I&&"/"!=I&&"\\"!=I&&"?"!=I&&"#"!=I)this.i=C.i,this.m=C.m,this.s=C.s,this.f=C.f,this.j=C.j.slice(),this.j.pop();y= -"relative path";continue}break;case "relative slash":if("/"==n||"\\"==n)"\\"==n&&M("\\ is an invalid code point."),y="file"==this.g?"file host":"authority ignore slashes";else{"file"!=this.g&&(this.i=C.i,this.m=C.m,this.s=C.s,this.f=C.f);y="relative path";continue}break;case "authority first slash":if("/"==n)y="authority second slash";else{M("Expected '/', got: "+n);y="authority ignore slashes";continue}break;case "authority second slash":y="authority ignore slashes";if("/"!=n){M("Expected '/', got: "+ -n);continue}break;case "authority ignore slashes":if("/"!=n&&"\\"!=n){y="authority";continue}else M("Expected authority, got: "+n);break;case "authority":if("@"==n){sa&&(M("@ already seen."),v+="%40");sa=!0;for(n=0;nF&&-1==[34,35,60,62,63,96].indexOf(F)?t:encodeURIComponent(t)}function d(t){var F=t.charCodeAt(0);return 32F&&-1==[34,35,60,62,96].indexOf(F)?t:encodeURIComponent(t)}function e(t,F,E){function N(ha){sa.push(ha)}var y=F||"scheme start",X=0,x="",ta=!1,ia=!1,sa=[];a:for(;(void 0!=t[X-1]||0==X)&&!this.m;){var n=t[X];switch(y){case "scheme start":if(n&&q.test(n))x+= +n.toLowerCase(),y="scheme";else if(F){N("Invalid scheme.");break a}else{x="";y="no scheme";continue}break;case "scheme":if(n&&H.test(n))x+=n.toLowerCase();else if(":"==n){this.l=x;x="";if(F)break a;void 0!==l[this.l]&&(this.H=!0);y="file"==this.l?"relative":this.H&&E&&E.l==this.l?"relative or authority":this.H?"authority first slash":"scheme data"}else if(F){void 0!=n&&N("Code point not allowed in scheme: "+n);break a}else{x="";X=0;y="no scheme";continue}break;case "scheme data":"?"==n?(this.A="?", +y="query"):"#"==n?(this.C="#",y="fragment"):void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.ya+=c(n));break;case "no scheme":if(E&&void 0!==l[E.l]){y="relative";continue}else N("Missing scheme."),f.call(this),this.m=!0;break;case "relative or authority":if("/"==n&&"/"==t[X+1])y="authority ignore slashes";else{N("Expected /, got: "+n);y="relative";continue}break;case "relative":this.H=!0;"file"!=this.l&&(this.l=E.l);if(void 0==n){this.o=E.o;this.v=E.v;this.s=E.s.slice();this.A=E.A;this.B=E.B;this.j=E.j; +break a}else if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="relative slash";else if("?"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A="?",this.B=E.B,this.j=E.j,y="query";else if("#"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A=E.A,this.C="#",this.B=E.B,this.j=E.j,y="fragment";else{y=t[X+1];var J=t[X+2];if("file"!=this.l||!q.test(n)||":"!=y&&"|"!=y||void 0!=J&&"/"!=J&&"\\"!=J&&"?"!=J&&"#"!=J)this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j,this.s=E.s.slice(),this.s.pop();y= +"relative path";continue}break;case "relative slash":if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="file"==this.l?"file host":"authority ignore slashes";else{"file"!=this.l&&(this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j);y="relative path";continue}break;case "authority first slash":if("/"==n)y="authority second slash";else{N("Expected '/', got: "+n);y="authority ignore slashes";continue}break;case "authority second slash":y="authority ignore slashes";if("/"!=n){N("Expected '/', got: "+ +n);continue}break;case "authority ignore slashes":if("/"!=n&&"\\"!=n){y="authority";continue}else N("Expected authority, got: "+n);break;case "authority":if("@"==n){ta&&(N("@ already seen."),x+="%40");ta=!0;for(n=0;n]/g;function Ia(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Ja(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&La[k.localName]?h:h.replace(Ha,Ia);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), -Error("not implemented");}}c+=h}return c};var Na=t.h,Oa={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Pa={};function Qa(a){Pa[a]=function(b){return b["__shady_native_"+a]}}function Ra(a,b){y(a,b,"__shady_native_");for(var c in b)Qa(c)}function A(a,b){b=void 0===b?[]:b;for(var c=0;ce.assignedNodes.length&&(e.ba=!0)}e.ba&&(e.ba=!1,Qc(this,c))}c=this.a;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c]/g;function Oa(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Pa(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&Ra[k.localName]?h:h.replace(Na,Oa);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), +Error("not implemented");}}c+=h}return c};var Ta=w.j,Ua={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Va={};function Wa(a){Va[a]=function(b){return b["__shady_native_"+a]}}function Xa(a,b){z(a,b,"__shady_native_");for(var c in b)Wa(c)}function B(a,b){b=void 0===b?[]:b;for(var c=0;c","+","~"]),h=g===e?a[e]:a.substring(e,g);if(","===h)b();else if(-1===[void 0," ",">","+","~"].indexOf(f)||" "!==h)" "===f&&-1!==[">","+","~"].indexOf(h)?d[d.length-1]=h:d.push(h);e=g+(g===e?1:0)}b();return c};function sc(a,b,c){var d=[];tc(a,b,c,d);return d}function tc(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:(tc(e,f,g,h),e=void 0)}if(e)break}} +var uc={get firstElementChild(){var a=u(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=u(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return x(this)?ta(Array.prototype.filter.call(va(this),function(a){return a.nodeType=== +Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},vc=A((uc.append=function(a){for(var b=[],c=0;cd.length)return[];for(b=Ba(sc(a,function(){return!0}).map(function(e){return Ba(d.map(function(f){var g=f.ta,h=g.length-1;return c(e,g[h])?{target:e,N:f,O:e,index:h}:[]}))}));b.some(function(e){return 0=e.index)return e;var f=e.target,g=e.O,h=e.N;e=e.index-1;var k=h.Ha[e],l=h.ta[e];if(" "===k){k=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g, +l)&&k.push({target:f,N:h,O:g,index:e});return k}if(">"===k)return g=g.__shady_parentElement,c(g,l)?{target:f,N:h,O:g,index:e}:[];if("+"===k)return(g=g.__shady_previousElementSibling)&&c(g,l)?{target:f,N:h,O:g,index:e}:[];if("~"===k){k=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,l)&&k.push({target:f,N:h,O:g,index:e});return k}throw Error("Unrecognized combinator: '"+k+"'.");}));return Ca(b.map(function(e){return e.target}))} +var G=w.querySelectorImplementation,xc=A({querySelector:function(a){if("native"===G){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=p(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.__shady_getRootNode()==c)return d;return null}if("selectorEngine"===G)return wc(this,a)[0]||null;if(void 0===G)return sc(this,function(e){return ma.call(e,a)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+ +(G+"'"));},querySelectorAll:function(a,b){if(b||"native"===G){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return ta(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===G)return ta(wc(this,a));if(void 0===G)return ta(sc(this,function(d){return ma.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(G+"'"));}}),yc=w.R&&!w.s?ya({},vc):vc; +ya(vc,xc);/* + +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var zc=A({after:function(a){for(var b=[],c=0;ce.assignedNodes.length&&(e.ja=!0)}e.ja&&(e.ja=!1,kd(this,c))}c=this.g;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c "+h}))}return{value:a,xa:b,stop:f}}function sf(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,vf=/[[.:#*]/,nf=/^(::slotted)/,uf=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,tf=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,qf=/(.*):dir\((?:(ltr|rtl))\)(.*)/,lf=/:(?:matches|any|-(?:webkit|moz)-any)/,V=new Ze;function xf(a,b,c,d,e){this.o=a||null;this.b=b||null;this.da=c||[];this.l=null;this.cssBuild=e||"";this.K=d||"";this.a=this.m=this.u=null}function X(a){return a?a.__styleInfo:null}function yf(a,b){return a.__styleInfo=b}xf.prototype.c=function(){return this.o};xf.prototype._getStyleRules=xf.prototype.c;function zf(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Af=/:host\s*>\s*/,Bf=navigator.userAgent.match("Trident");function Cf(){}function Df(a){var b={},c=[],d=0;Me(a,function(f){Ef(f);f.index=d++;f=f.f.cssText;for(var g;g=Ge.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.b=c;a=[];for(var e in b)a.push(e);return a} -function Ef(a){if(!a.f){var b={},c={};Ff(a,c)&&(b.s=c,a.rules=null);b.cssText=a.parsedCssText.replace(Je,"").replace(Ee,"");a.f=b}}function Ff(a,b){var c=a.f;if(c){if(c.s)return Object.assign(b,c.s),!0}else{c=a.parsedCssText;for(var d;a=Ee.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} -function Gf(a,b,c){b&&(b=0<=b.indexOf(";")?Hf(a,b,c):Te(b,function(d,e,f,g){if(!e)return d+g;(e=Gf(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Gf(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} -function Hf(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.g||(b.g=gf(V,b,V.b,a?"."+a:"",e)),c=b.g||e),g&&"html"===e&&(c=b.g||b.T),d({fa:c,Ca:h,Pa:g})}} -function Kf(a,b,c){var d={},e={};Me(b,function(f){Jf(a,f,c,function(g){zf.call(a._element||a,g.fa)&&(g.Ca?Ff(f,d):Ff(f,e))})},null,!0);return{Ga:e,Ba:d}} -function Lf(a,b,c,d){var e=U(b),f=ff(e.is,e.K),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=X(b);e=h.o;h=h.cssBuild;var k=Mf(e,d);return df(b,e,function(l){var m="";l.f||Ef(l);l.f.cssText&&(m=Hf(a,l.f.cssText,c));l.cssText=m;if(!R&&!Oe(l)&&l.cssText){var q=m=l.cssText;null==l.ma&&(l.ma=He.test(m));if(l.ma)if(null==l.U){l.U=[];for(var x in k)q=k[x],q=q(m),m!==q&&(m=q,l.U.push(x))}else{for(x=0;x=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));R?k.a?(k.a.textContent=h,g=k.a):h&&(g=Pe(h,f,a.shadowRoot,k.b)):g?g.parentNode||(Bf&&-1 "+h}))}return{value:a,Ga:b,stop:f}}function Of(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Rf=/[[.:#*]/,Jf=/^(::slotted)/,Qf=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Pf=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Mf=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Hf=/:(?:matches|any|-(?:webkit|moz)-any)/,V=new vf;function Tf(a,b,c,d,e){this.A=a||null;this.h=b||null;this.la=c||[];this.u=null;this.cssBuild=e||"";this.T=d||"";this.g=this.v=this.C=null}function X(a){return a?a.__styleInfo:null}function Uf(a,b){return a.__styleInfo=b}Tf.prototype.i=function(){return this.A};Tf.prototype._getStyleRules=Tf.prototype.i;function Vf(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Wf=/:host\s*>\s*/,Xf=navigator.userAgent.match("Trident");function Yf(){}function Zf(a){var b={},c=[],d=0;hf(a,function(f){$f(f);f.index=d++;f=f.l.cssText;for(var g;g=bf.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.h=c;a=[];for(var e in b)a.push(e);return a} +function $f(a){if(!a.l){var b={},c={};ag(a,c)&&(b.B=c,a.rules=null);b.cssText=a.parsedCssText.replace(ef,"").replace($e,"");a.l=b}}function ag(a,b){var c=a.l;if(c){if(c.B)return Object.assign(b,c.B),!0}else{c=a.parsedCssText;for(var d;a=$e.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} +function bg(a,b,c){b&&(b=0<=b.indexOf(";")?cg(a,b,c):pf(b,function(d,e,f,g){if(!e)return d+g;(e=bg(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=bg(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} +function cg(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.m||(b.m=Df(V,b,V.h,a?"."+a:"",e)),c=b.m||e),g&&"html"===e&&(c=b.m||b.ca),d({na:c,Ma:h,Za:g})}} +function fg(a,b,c){var d={},e={};hf(b,function(f){eg(a,f,c,function(g){Vf.call(a._element||a,g.na)&&(g.Ma?ag(f,d):ag(f,e))})},null,!0);return{Qa:e,La:d}} +function gg(a,b,c,d){var e=U(b),f=Cf(e.is,e.T),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=X(b);e=h.A;h=h.cssBuild;var k=hg(e,d);return Af(b,e,function(l){var m="";l.l||$f(l);l.l.cssText&&(m=cg(a,l.l.cssText,c));l.cssText=m;if(!Q&&!kf(l)&&l.cssText){var q=m=l.cssText;null==l.ua&&(l.ua=cf.test(m));if(l.ua)if(null==l.ba){l.ba=[];for(var v in k)q=k[v],q=q(m),m!==q&&(m=q,l.ba.push(v))}else{for(v=0;v=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));Q?k.g?(k.g.textContent=h,g=k.g):h&&(g=lf(h,f,a.shadowRoot,k.h)):g?g.parentNode||(Xf&&-1]/g;function Ia(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Ka(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=l&&Ma[l.localName]?h:h.replace(Ha,Ia);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), -Error("not implemented");}}c+=h}return c};var Oa=t.h,Pa={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Qa={};function Ra(a){Qa[a]=function(b){return b["__shady_native_"+a]}}function Sa(a,b){y(a,b,"__shady_native_");for(var c in b)Ra(c)}function A(a,b){b=void 0===b?[]:b;for(var c=0;ce.assignedNodes.length&&(e.P=!0)}e.P&&(e.P=!1,Qc(this,c))}c=this.a;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c]/g;function Ma(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Na(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=l&&Qa[l.localName]?h:h.replace(La,Ma);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), +Error("not implemented");}}c+=h}return c};var Sa=w.j,Ta={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Ua={};function Va(a){Ua[a]=function(b){return b["__shady_native_"+a]}}function Wa(a,b){A(a,b,"__shady_native_");for(var c in b)Va(c)}function D(a,b){b=void 0===b?[]:b;for(var c=0;c","+","~"]),h=g===e?a[e]:a.substring(e,g);if(","===h)b();else if(-1===[void 0," ",">","+","~"].indexOf(f)||" "!==h)" "===f&&-1!==[">","+","~"].indexOf(h)?d[d.length-1]=h:d.push(h);e=g+(g===e?1:0)}b();return c};function pc(a,b,c){var d=[];qc(a,b,c,d);return d}function qc(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,l=f(e);l&&h.push(e);g&&g(l)?e=l:(qc(e,f,g,h),e=void 0)}if(e)break}} +var rc={get firstElementChild(){var a=v(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=v(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return x(this)?sa(Array.prototype.filter.call(ua(this),function(a){return a.nodeType=== +Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},J=B((rc.append=function(a){for(var b=[],c=0;cd.length)return[];for(b=za(pc(a,function(){return!0}).map(function(e){return za(d.map(function(f){var g=f.fa,h=g.length-1;return c(e,g[h])?{target:e,I:f,J:e,index:h}:[]}))}));b.some(function(e){return 0=e.index)return e;var f=e.target,g=e.J,h=e.I;e=e.index-1;var l=h.ua[e],k=h.fa[e];if(" "===l){l=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g, +k)&&l.push({target:f,I:h,J:g,index:e});return l}if(">"===l)return g=g.__shady_parentElement,c(g,k)?{target:f,I:h,J:g,index:e}:[];if("+"===l)return(g=g.__shady_previousElementSibling)&&c(g,k)?{target:f,I:h,J:g,index:e}:[];if("~"===l){l=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,k)&&l.push({target:f,I:h,J:g,index:e});return l}throw Error("Unrecognized combinator: '"+l+"'.");}));return Aa(b.map(function(e){return e.target}))} +var K=w.querySelectorImplementation,tc=B({querySelector:function(a){if("native"===K){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=p(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.__shady_getRootNode()==c)return d;return null}if("selectorEngine"===K)return sc(this,a)[0]||null;if(void 0===K)return pc(this,function(e){return la.call(e,a)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+ +(K+"'"));},querySelectorAll:function(a,b){if(b||"native"===K){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return sa(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===K)return sa(sc(this,a));if(void 0===K)return sa(pc(this,function(d){return la.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(K+"'"));}}),uc=w.L&&!w.s?xa({},J):J; +xa(J,tc);/* + +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var vc=B({after:function(a){for(var b=[],c=0;ce.assignedNodes.length&&(e.Y=!0)}e.Y&&(e.Y=!1,fd(this,c))}c=this.g;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c "+h}))}return{value:a,ka:b,stop:f}}function ce(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,fe=/[[.:#*]/,Yd=/^(::slotted)/,ee=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,de=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ae=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Wd=/:(?:matches|any|-(?:webkit|moz)-any)/,U=new Kd;function W(a,b,c,d,e){this.o=a||null;this.b=b||null;this.S=c||[];this.l=null;this.cssBuild=e||"";this.F=d||"";this.a=this.m=this.u=null}function X(a){return a?a.__styleInfo:null}function he(a,b){return a.__styleInfo=b}W.prototype.c=function(){return this.o};W.prototype._getStyleRules=W.prototype.c;function ie(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var je=/:host\s*>\s*/,ke=navigator.userAgent.match("Trident");function le(){}function me(a){var b={},c=[],d=0;Q(a,function(f){ne(f);f.index=d++;f=f.f.cssText;for(var g;g=ud.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.b=c;a=[];for(var e in b)a.push(e);return a} -function ne(a){if(!a.f){var b={},c={};oe(a,c)&&(b.s=c,a.rules=null);b.cssText=a.parsedCssText.replace(xd,"").replace(sd,"");a.f=b}}function oe(a,b){var c=a.f;if(c){if(c.s)return Object.assign(b,c.s),!0}else{c=a.parsedCssText;for(var d;a=sd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} -function pe(a,b,c){b&&(b=0<=b.indexOf(";")?qe(a,b,c):Fd(b,function(d,e,f,g){if(!e)return d+g;(e=pe(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=pe(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} -function qe(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.g||(b.g=Sd(U,b,U.b,a?"."+a:"",e)),c=b.g||e),g&&"html"===e&&(c=b.g||b.J),d({U:c,pa:h,za:g})}} -function te(a,b,c){var d={},e={};Q(b,function(f){se(a,f,c,function(g){ie.call(a._element||a,g.U)&&(g.pa?oe(f,d):oe(f,e))})},null,!0);return{sa:e,oa:d}} -function ue(a,b,c,d){var e=S(b),f=Rd(e.is,e.F),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=X(b);e=h.o;h=h.cssBuild;var l=ve(e,d);return Pd(b,e,function(k){var m="";k.f||ne(k);k.f.cssText&&(m=qe(a,k.f.cssText,c));k.cssText=m;if(!M&&!Ad(k)&&k.cssText){var r=m=k.cssText;null==k.Y&&(k.Y=vd.test(m));if(k.Y)if(null==k.K){k.K=[];for(var w in l)r=l[w],r=r(m),m!==r&&(m=r,k.K.push(w))}else{for(w=0;w=k._useCount&&k.parentNode&&k.parentNode.removeChild(k));M?l.a?(l.a.textContent=h,g=l.a):h&&(g=Bd(h,f,a.shadowRoot,l.b)):g?g.parentNode||(ke&&-1 "+h}))}return{value:a,ta:b,stop:f}}function we(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,ze=/[[.:#*]/,re=/^(::slotted)/,ye=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,xe=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ue=/(.*):dir\((?:(ltr|rtl))\)(.*)/,pe=/:(?:matches|any|-(?:webkit|moz)-any)/,V=new de;function Be(a,b,c,d,e){this.A=a||null;this.h=b||null;this.aa=c||[];this.u=null;this.cssBuild=e||"";this.N=d||"";this.g=this.v=this.C=null}function X(a){return a?a.__styleInfo:null}function Ce(a,b){return a.__styleInfo=b}Be.prototype.i=function(){return this.A};Be.prototype._getStyleRules=Be.prototype.i;function De(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Ee=/:host\s*>\s*/,Fe=navigator.userAgent.match("Trident");function Ge(){}function He(a){var b={},c=[],d=0;Rd(a,function(f){Ie(f);f.index=d++;f=f.l.cssText;for(var g;g=Ld.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.h=c;a=[];for(var e in b)a.push(e);return a} +function Ie(a){if(!a.l){var b={},c={};Je(a,c)&&(b.B=c,a.rules=null);b.cssText=a.parsedCssText.replace(Od,"").replace(Jd,"");a.l=b}}function Je(a,b){var c=a.l;if(c){if(c.B)return Object.assign(b,c.B),!0}else{c=a.parsedCssText;for(var d;a=Jd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} +function Ke(a,b,c){b&&(b=0<=b.indexOf(";")?Le(a,b,c):Yd(b,function(d,e,f,g){if(!e)return d+g;(e=Ke(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Ke(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} +function Le(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.m||(b.m=le(V,b,V.h,a?"."+a:"",e)),c=b.m||e),g&&"html"===e&&(c=b.m||b.T),d({ca:c,za:h,Ja:g})}} +function Oe(a,b,c){var d={},e={};Rd(b,function(f){Ne(a,f,c,function(g){De.call(a._element||a,g.ca)&&(g.za?Je(f,d):Je(f,e))})},null,!0);return{Ca:e,ya:d}} +function Pe(a,b,c,d){var e=U(b),f=ke(e.is,e.N),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=X(b);e=h.A;h=h.cssBuild;var l=Qe(e,d);return ie(b,e,function(k){var m="";k.l||Ie(k);k.l.cssText&&(m=Le(a,k.l.cssText,c));k.cssText=m;if(!R&&!Td(k)&&k.cssText){var r=m=k.cssText;null==k.ga&&(k.ga=Md.test(m));if(k.ga)if(null==k.S){k.S=[];for(var u in l)r=l[u],r=r(m),m!==r&&(m=r,k.S.push(u))}else{for(u=0;u=k._useCount&&k.parentNode&&k.parentNode.removeChild(k));R?l.g?(l.g.textContent=h,g=l.g):h&&(g=Ud(h,f,a.shadowRoot,l.h)):g?g.parentNode||(Fe&&-1 { window.removeEventListener('load', flushAndFire); flushAndFire(); }); } else { flushAndFire(); -} \ No newline at end of file +} diff --git a/dist/webcomponents/src/entrypoints/webcomponents-ce-index.js b/dist/webcomponents/src/entrypoints/webcomponents-ce-index.js index 5d6b2be..fc88b9b 100644 --- a/dist/webcomponents/src/entrypoints/webcomponents-ce-index.js +++ b/dist/webcomponents/src/entrypoints/webcomponents-ce-index.js @@ -14,4 +14,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * Used in: Safari 10 */ -import '../../node_modules/@webcomponents/custom-elements/src/custom-elements.js'; \ No newline at end of file +import '../../node_modules/@webcomponents/custom-elements/src/custom-elements.js'; diff --git a/dist/webcomponents/src/entrypoints/webcomponents-pf_dom-index.js b/dist/webcomponents/src/entrypoints/webcomponents-pf_dom-index.js new file mode 100644 index 0000000..e82cdaa --- /dev/null +++ b/dist/webcomponents/src/entrypoints/webcomponents-pf_dom-index.js @@ -0,0 +1,19 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +import '../platform/custom-event.js'; +import '../platform/event-listener-options.js'; +import '../platform/baseuri.js'; +import '../platform/get-attribute-names.js'; +import '../platform/matches.js'; +import '../platform/parent-node/index.js'; +import '../platform/child-node/index.js'; +import '../platform/svg-element-class-list.js'; +import '../platform/toggle-attribute.js'; diff --git a/dist/webcomponents/src/entrypoints/webcomponents-pf_js-index.js b/dist/webcomponents/src/entrypoints/webcomponents-pf_js-index.js new file mode 100644 index 0000000..e1545ae --- /dev/null +++ b/dist/webcomponents/src/entrypoints/webcomponents-pf_js-index.js @@ -0,0 +1,13 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +import '../platform/es6-misc.js'; +import '../platform/promise.js'; +import '../platform/symbol.js'; diff --git a/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-index.js b/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-index.js index 1726aeb..c9daba5 100644 --- a/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-index.js +++ b/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-index.js @@ -16,4 +16,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN import '../../node_modules/@webcomponents/shadydom/src/shadydom.js'; import '../../node_modules/@webcomponents/custom-elements/src/custom-elements.js'; -import '../../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js'; \ No newline at end of file +import '../../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js'; diff --git a/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-pf-index.js b/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-pf-index.js index bd21195..795fddb 100644 --- a/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-pf-index.js +++ b/dist/webcomponents/src/entrypoints/webcomponents-sd-ce-pf-index.js @@ -14,15 +14,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * Used in: IE 11 */ -import '../platform/es6-misc.js'; -import '../platform/custom-event.js'; +import './webcomponents-pf_js-index.js'; +import './webcomponents-pf_dom-index.js'; +import '../unresolved.js'; +import '../flag-parser.js'; import '../../node_modules/@webcomponents/template/template.js'; -import '../platform/promise.js'; -import '../platform/symbol.js'; -import '../platform/flag-parser.js'; import '../../node_modules/@webcomponents/shadydom/src/shadydom.js'; import '../../node_modules/@webcomponents/custom-elements/src/custom-elements.js'; import '../../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js'; import '../../node_modules/@webcomponents/url/url.js'; -import '../platform/baseuri.js'; -import '../platform/unresolved.js'; \ No newline at end of file diff --git a/dist/webcomponents/src/entrypoints/webcomponents-sd-index.js b/dist/webcomponents/src/entrypoints/webcomponents-sd-index.js index 501cb4d..d27dc96 100644 --- a/dist/webcomponents/src/entrypoints/webcomponents-sd-index.js +++ b/dist/webcomponents/src/entrypoints/webcomponents-sd-index.js @@ -15,4 +15,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN */ import '../../node_modules/@webcomponents/shadydom/src/shadydom.js'; -import '../../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js'; \ No newline at end of file +import '../../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js'; diff --git a/dist/webcomponents/src/flag-parser.js b/dist/webcomponents/src/flag-parser.js new file mode 100644 index 0000000..846ee94 --- /dev/null +++ b/dist/webcomponents/src/flag-parser.js @@ -0,0 +1,69 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */ +// Establish scope. +const extendedWindow = window; +extendedWindow['WebComponents'] = extendedWindow['WebComponents'] || { + 'flags': {}, +}; +// loading script +const file = 'webcomponents-bundle'; +const script = document.querySelector('script[src*="' + file + '"]'); +const flagMatcher = /wc-(.+)/; +// Note(rictic): a lot of this code looks wrong. Should we be pulling +// the flags local variable off of window.WebComponents.flags? If not +// then why check for noOpts, which can't possibly have been set? +// Flags. Convert url arguments to flags +const flags = {}; +if (!flags['noOpts']) { + // from url + location.search + .slice(1) + .split('&') + .forEach(function (option) { + const parts = option.split('='); + let match; + if (parts[0] && (match = parts[0].match(flagMatcher))) { + flags[match[1]] = parts[1] || true; + } + }); + // from script + if (script) { + for (let i = 0, a; (a = script.attributes[i]); i++) { + if (a.name !== 'src') { + flags[a.name] = a.value || true; + } + } + } + // log flags + const log = {}; + if (flags['log'] && flags['log']['split']) { + const parts = flags['log'].split(','); + parts.forEach(function (f) { + log[f] = true; + }); + } + flags['log'] = log; +} +// exports +extendedWindow['WebComponents']['flags'] = flags; +const forceShady = flags['shadydom']; +if (forceShady) { + extendedWindow['ShadyDOM'] = extendedWindow['ShadyDOM'] || {}; + extendedWindow['ShadyDOM']['force'] = forceShady; + const noPatch = flags['noPatch']; + extendedWindow['ShadyDOM']['noPatch'] = noPatch === 'true' ? true : noPatch; +} +const forceCE = (flags['register'] || flags['ce']); +if (forceCE && window['customElements']) { + extendedWindow['customElements']['forcePolyfill'] = forceCE; +} +export {}; +//# sourceMappingURL=flag-parser.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/baseuri.js b/dist/webcomponents/src/platform/baseuri.js new file mode 100644 index 0000000..b073555 --- /dev/null +++ b/dist/webcomponents/src/platform/baseuri.js @@ -0,0 +1,28 @@ +/** +@license +Copyright (c) 2018 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +// Implement Node.baseURI for IE 11 +// adapted from +// https://github.com/webcomponents/html-imports/blob/v1.2.0/src/html-imports.js +const native_baseURI = Object.getOwnPropertyDescriptor(Node.prototype, 'baseURI'); +if (!native_baseURI) { + Object.defineProperty(Node.prototype, 'baseURI', { + get() { + // this.ownerDocument is `null` for documents + const doc = this.ownerDocument || this; + const base = doc.querySelector('base[href]'); + return (base && base.href) || window.location.href; + }, + configurable: true, + enumerable: true, + }); +} +export {}; +//# sourceMappingURL=baseuri.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/child-node/after.js b/dist/webcomponents/src/platform/child-node/after.js new file mode 100644 index 0000000..e3e55d1 --- /dev/null +++ b/dist/webcomponents/src/platform/child-node/after.js @@ -0,0 +1,47 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b, _c, _d; +const nativeInsertBefore = Node.prototype.insertBefore; +const nativeGetParentNode = (_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : +// In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined. +function () { + return this.parentNode; +}; +const nativeGetNextSibling = (_d = (_c = Object.getOwnPropertyDescriptor(Node.prototype, 'nextSibling')) === null || _c === void 0 ? void 0 : _c.get) !== null && _d !== void 0 ? _d : +// In Safari 9, the `nextSibling` descriptor's `get` and `set` are +// undefined. +function () { + return this.nextSibling; +}; +const installAfter = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('after')) { + return; + } + Object.defineProperty(prototype, 'after', { + configurable: true, + enumerable: true, + writable: true, + value: function after(...args) { + const parentNode = nativeGetParentNode.call(this); + if (parentNode === null) { + return; + } + const nextSibling = nativeGetNextSibling.call(this); + for (const arg of args) { + nativeInsertBefore.call(parentNode, typeof arg === 'string' ? document.createTextNode(arg) : arg, nextSibling); + } + }, + }); +}; +installAfter(CharacterData); +installAfter(Element); +export {}; +//# sourceMappingURL=after.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/child-node/before.js b/dist/webcomponents/src/platform/child-node/before.js new file mode 100644 index 0000000..ba8f03c --- /dev/null +++ b/dist/webcomponents/src/platform/child-node/before.js @@ -0,0 +1,40 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b; +const nativeInsertBefore = Node.prototype.insertBefore; +const nativeGetParentNode = (_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : +// In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined. +function () { + return this.parentNode; +}; +const installBefore = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('before')) { + return; + } + Object.defineProperty(prototype, 'before', { + configurable: true, + enumerable: true, + writable: true, + value: function before(...args) { + const parentNode = nativeGetParentNode.call(this); + if (parentNode === null) { + return; + } + for (const arg of args) { + nativeInsertBefore.call(parentNode, typeof arg === 'string' ? document.createTextNode(arg) : arg, this); + } + }, + }); +}; +installBefore(CharacterData); +installBefore(Element); +export {}; +//# sourceMappingURL=before.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/child-node/index.js b/dist/webcomponents/src/platform/child-node/index.js new file mode 100644 index 0000000..9f54c55 --- /dev/null +++ b/dist/webcomponents/src/platform/child-node/index.js @@ -0,0 +1,14 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +import './after.js'; +import './before.js'; +import './remove.js'; +import './replace-with.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/child-node/remove.js b/dist/webcomponents/src/platform/child-node/remove.js new file mode 100644 index 0000000..2f81dd7 --- /dev/null +++ b/dist/webcomponents/src/platform/child-node/remove.js @@ -0,0 +1,37 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b; +const nativeRemoveChild = Node.prototype.removeChild; +const nativeGetParentNode = (_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : +// In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined. +function () { + return this.parentNode; +}; +const installRemove = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('remove')) { + return; + } + Object.defineProperty(prototype, 'remove', { + configurable: true, + enumerable: true, + writable: true, + value: function remove() { + const parentNode = nativeGetParentNode.call(this); + if (parentNode) { + nativeRemoveChild.call(parentNode, this); + } + }, + }); +}; +installRemove(CharacterData); +installRemove(Element); +export {}; +//# sourceMappingURL=remove.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/child-node/replace-with.js b/dist/webcomponents/src/platform/child-node/replace-with.js new file mode 100644 index 0000000..74d06e9 --- /dev/null +++ b/dist/webcomponents/src/platform/child-node/replace-with.js @@ -0,0 +1,42 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b; +const nativeInsertBefore = Node.prototype.insertBefore; +const nativeRemoveChild = Node.prototype.removeChild; +const nativeGetParentNode = (_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : +// In Safari 9, the `parentNode` descriptor's `get` and `set` are undefined. +function () { + return this.parentNode; +}; +const installReplaceWith = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('replaceWith')) { + return; + } + Object.defineProperty(prototype, 'replaceWith', { + configurable: true, + enumerable: true, + writable: true, + value: function replaceWith(...args) { + const parentNode = nativeGetParentNode.call(this); + if (parentNode === null) { + return; + } + for (const arg of args) { + nativeInsertBefore.call(parentNode, typeof arg === 'string' ? document.createTextNode(arg) : arg, this); + } + nativeRemoveChild.call(parentNode, this); + }, + }); +}; +installReplaceWith(CharacterData); +installReplaceWith(Element); +export {}; +//# sourceMappingURL=replace-with.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/custom-event.js b/dist/webcomponents/src/platform/custom-event.js new file mode 100644 index 0000000..f5ebaba --- /dev/null +++ b/dist/webcomponents/src/platform/custom-event.js @@ -0,0 +1,79 @@ +/** + * @license + * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */ +// defaultPrevented is broken in IE. +// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called +const workingDefaultPrevented = (() => { + const e = document.createEvent('Event'); + e.initEvent('foo', true, true); + e.preventDefault(); + return e.defaultPrevented; +})(); +if (!workingDefaultPrevented) { + const origPreventDefault = Event.prototype.preventDefault; + Event.prototype.preventDefault = function () { + if (!this.cancelable) { + return; + } + origPreventDefault.call(this); + Object.defineProperty(this, 'defaultPrevented', { + get() { + return true; + }, + configurable: true, + }); + }; +} +const isIE = /Trident/.test(navigator.userAgent); +// Event constructor shim +if (!window.Event || (isIE && typeof window.Event !== 'function')) { + const origEvent = window.Event; + window['Event'] = ((inType, params) => { + params = params || {}; + const e = document.createEvent('Event'); + e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable)); + return e; + }); + if (origEvent) { + for (const i in origEvent) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + window['Event'][i] = origEvent[i]; + } + window['Event'].prototype = origEvent.prototype; + } +} +// CustomEvent constructor shim +if (!window.CustomEvent || (isIE && typeof window.CustomEvent !== 'function')) { + window['CustomEvent'] = ((inType, params) => { + params = params || {}; + const e = document.createEvent('CustomEvent'); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + return e; + }); + window['CustomEvent'].prototype = window.Event.prototype; +} +if (!window.MouseEvent || (isIE && typeof window.MouseEvent !== 'function')) { + const origMouseEvent = window.MouseEvent; + window['MouseEvent'] = ((inType, params) => { + params = params || {}; + const e = document.createEvent('MouseEvent'); + e.initMouseEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.view || window, params.detail, params.screenX, params.screenY, params.clientX, params.clientY, params.ctrlKey, params.altKey, params.shiftKey, params.metaKey, params.button, params.relatedTarget); + return e; + }); + if (origMouseEvent) { + for (const j in origMouseEvent) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + window.MouseEvent[j] = origMouseEvent[j]; + } + } + window['MouseEvent'].prototype = origMouseEvent.prototype; +} +export {}; +//# sourceMappingURL=custom-event.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/es6-misc.js b/dist/webcomponents/src/platform/es6-misc.js new file mode 100644 index 0000000..8185751 --- /dev/null +++ b/dist/webcomponents/src/platform/es6-misc.js @@ -0,0 +1,38 @@ +/** + * @license + * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */ +if (!Array.from) { + Array.from = (object) => { + return [].slice.call(object); + }; +} +if (!Object.assign) { + const assign = (target, source) => { + const n$ = Object.keys(source); + for (let i = 0; i < n$.length; i++) { + const p = n$[i]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + target[p] = source[p]; + } + }; + Object.assign = function (target) { + // eslint-disable-next-line prefer-rest-params + const args = [].slice.call(arguments, 1); + for (let i = 0, s; i < args.length; i++) { + s = args[i]; + if (s) { + assign(target, s); + } + } + return target; + }; +} +export {}; +//# sourceMappingURL=es6-misc.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/event-listener-options.js b/dist/webcomponents/src/platform/event-listener-options.js new file mode 100644 index 0000000..37d338b --- /dev/null +++ b/dist/webcomponents/src/platform/event-listener-options.js @@ -0,0 +1,122 @@ +/** + * @license + * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */ +var _a; +// Older browsers like IE do not support an object as the options parameter +// to add/removeEventListener. +// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called +const supportsEventOptions = (() => { + let supported = false; + let onceSupported = false; + const eventOptions = { + get capture() { + supported = true; + return true; + }, + get once() { + onceSupported = true; + return true; + }, + }; + let callCount = 0; + const listener = () => { + callCount++; + }; + const d = document.createElement('div'); + // NOTE: These will be unpatched at this point. + d.addEventListener('click', listener, eventOptions); + let fullySupported = supported && onceSupported; + // Once + capture broken on Edge >= 17 < 79. + if (fullySupported) { + d.dispatchEvent(new Event('click')); + d.dispatchEvent(new Event('click')); + fullySupported = callCount == 1; + } + d.removeEventListener('click', listener, eventOptions); + return fullySupported; +})(); +const nativeEventTarget = (_a = window.EventTarget) !== null && _a !== void 0 ? _a : window.Node; +if (!supportsEventOptions && + 'addEventListener' in nativeEventTarget.prototype) { + const parseEventOptions = (optionsOrCapture) => { + let capture, once; + if (optionsOrCapture && + (typeof optionsOrCapture === 'object' || + typeof optionsOrCapture === 'function')) { + capture = Boolean(optionsOrCapture.capture); + once = Boolean(optionsOrCapture.once); + } + else { + capture = Boolean(optionsOrCapture); + once = false; + } + return { + capture, + once, + }; + }; + const origAddEventListener = nativeEventTarget.prototype.addEventListener; + const origRemoveEventListener = nativeEventTarget.prototype.removeEventListener; + const captureListenerMap = new WeakMap(); + const listenerMap = new WeakMap(); + const getListenerMap = (target, type, capture) => { + const elMap = capture ? captureListenerMap : listenerMap; + let typeMap = elMap.get(target); + if (typeMap === undefined) { + elMap.set(target, (typeMap = new Map())); + } + let listeners = typeMap.get(type); + if (listeners === undefined) { + typeMap.set(type, (listeners = new WeakMap())); + } + return listeners; + }; + nativeEventTarget.prototype.addEventListener = function (type, listener, options) { + if (listener == null) { + return; + } + const { capture, once } = parseEventOptions(options); + const map = getListenerMap(this, type, capture); + if (!map.has(listener)) { + const cachedListener = once + ? (e) => { + map.delete(listener); + origRemoveEventListener.call(this, type, cachedListener, capture); + if (typeof listener === 'function') { + return listener.call(this, e); + } + if (typeof (listener === null || listener === void 0 ? void 0 : listener.handleEvent) === 'function') { + return listener.handleEvent(e); + } + } + : null; + map.set(listener, cachedListener); + // Note, the cached listener is null if no wrapper is used to avoid + // a strong ref to it; + origAddEventListener.call(this, type, cachedListener !== null && cachedListener !== void 0 ? cachedListener : listener, capture); + } + }; + nativeEventTarget.prototype.removeEventListener = function (type, listener, options) { + if (listener == null) { + return; + } + const { capture } = parseEventOptions(options); + const map = getListenerMap(this, type, capture); + const cachedListener = map.get(listener); + if (cachedListener !== undefined) { + map.delete(listener); + // Note, the cached listener is null if no wrapper was used so that a + // strong ref to it is not kept. + origRemoveEventListener.call(this, type, cachedListener !== null && cachedListener !== void 0 ? cachedListener : listener, capture); + } + }; +} +export {}; +//# sourceMappingURL=event-listener-options.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/get-attribute-names.js b/dist/webcomponents/src/platform/get-attribute-names.js new file mode 100644 index 0000000..78f2e51 --- /dev/null +++ b/dist/webcomponents/src/platform/get-attribute-names.js @@ -0,0 +1,27 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b; +const Element_prototype = Element.prototype; +// In IE11, the `attributes` descriptor is on `Node.prototype`. +const attributesDescriptor = (_a = Object.getOwnPropertyDescriptor(Element_prototype, 'attributes')) !== null && _a !== void 0 ? _a : Object.getOwnPropertyDescriptor(Node.prototype, 'attributes'); +// In Safari 9, the `attributes` descriptor's getter is undefined. In Chrome 41, +// the `attributes` descriptor is a data descriptor on each Element instance. +const getAttributes = (_b = attributesDescriptor === null || attributesDescriptor === void 0 ? void 0 : attributesDescriptor.get) !== null && _b !== void 0 ? _b : function () { + return this.attributes; +}; +const map = Array.prototype.map; +if (!Element_prototype.hasOwnProperty('getAttributeNames')) { + Element_prototype.getAttributeNames = function getAttributeNames() { + return map.call(getAttributes.call(this), (attr) => attr.name); + }; +} +export {}; +//# sourceMappingURL=get-attribute-names.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/matches.js b/dist/webcomponents/src/platform/matches.js new file mode 100644 index 0000000..ebf6550 --- /dev/null +++ b/dist/webcomponents/src/platform/matches.js @@ -0,0 +1,21 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +var _a; +const Element_prototype = Element.prototype; +if (!Element_prototype.hasOwnProperty('matches')) { + Element_prototype.matches = + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (_a = Element_prototype.webkitMatchesSelector) !== null && _a !== void 0 ? _a : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Element_prototype.msMatchesSelector; +} +export {}; +//# sourceMappingURL=matches.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/parent-node/append.js b/dist/webcomponents/src/platform/parent-node/append.js new file mode 100644 index 0000000..2c19170 --- /dev/null +++ b/dist/webcomponents/src/platform/parent-node/append.js @@ -0,0 +1,31 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +const nativeAppendChild = Node.prototype.appendChild; +const installAppend = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('append')) { + return; + } + Object.defineProperty(prototype, 'append', { + configurable: true, + enumerable: true, + writable: true, + value: function append(...args) { + for (const arg of args) { + nativeAppendChild.call(this, typeof arg === 'string' ? document.createTextNode(arg) : arg); + } + }, + }); +}; +installAppend(Document); +installAppend(DocumentFragment); +installAppend(Element); +export {}; +//# sourceMappingURL=append.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/parent-node/index.js b/dist/webcomponents/src/platform/parent-node/index.js new file mode 100644 index 0000000..b6207df --- /dev/null +++ b/dist/webcomponents/src/platform/parent-node/index.js @@ -0,0 +1,13 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +import './append.js'; +import './prepend.js'; +import './replace-children.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/parent-node/prepend.js b/dist/webcomponents/src/platform/parent-node/prepend.js new file mode 100644 index 0000000..5b5612c --- /dev/null +++ b/dist/webcomponents/src/platform/parent-node/prepend.js @@ -0,0 +1,42 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b; +const nativeInsertBefore = Node.prototype.insertBefore; +const nativeGetFirstChild = +// In Chrome 41, `firstChild` is a data descriptor on every instance, not a +// accessor descriptor on `Node.prototype`. +(_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : +// In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined. +function () { + return this.firstChild; +}; +const installPrepend = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('prepend')) { + return; + } + Object.defineProperty(prototype, 'prepend', { + configurable: true, + enumerable: true, + writable: true, + value: function prepend(...args) { + const firstChild = nativeGetFirstChild.call(this); + for (const arg of args) { + const newNode = typeof arg === 'string' ? document.createTextNode(arg) : arg; + nativeInsertBefore.call(this, newNode, firstChild); + } + }, + }); +}; +installPrepend(Document); +installPrepend(DocumentFragment); +installPrepend(Element); +export {}; +//# sourceMappingURL=prepend.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/parent-node/replace-children.js b/dist/webcomponents/src/platform/parent-node/replace-children.js new file mode 100644 index 0000000..e07818a --- /dev/null +++ b/dist/webcomponents/src/platform/parent-node/replace-children.js @@ -0,0 +1,45 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +var _a, _b; +const nativeAppendChild = Node.prototype.appendChild; +const nativeRemoveChild = Node.prototype.removeChild; +const nativeGetFirstChild = +// In Chrome 41, `firstChild` is a data descriptor on every instance, not a +// accessor descriptor on `Node.prototype`. +(_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : +// In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined. +function () { + return this.firstChild; +}; +const installReplaceChildren = (constructor) => { + const prototype = constructor.prototype; + if (prototype.hasOwnProperty('replaceChildren')) { + return; + } + Object.defineProperty(prototype, 'replaceChildren', { + configurable: true, + enumerable: true, + writable: true, + value: function replaceChildren(...args) { + let child; + while ((child = nativeGetFirstChild.call(this)) !== null) { + nativeRemoveChild.call(this, child); + } + for (const arg of args) { + nativeAppendChild.call(this, typeof arg === 'string' ? document.createTextNode(arg) : arg); + } + }, + }); +}; +installReplaceChildren(Document); +installReplaceChildren(DocumentFragment); +installReplaceChildren(Element); +export {}; +//# sourceMappingURL=replace-children.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/promise.js b/dist/webcomponents/src/platform/promise.js new file mode 100644 index 0000000..5efefbe --- /dev/null +++ b/dist/webcomponents/src/platform/promise.js @@ -0,0 +1,50 @@ +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +import PromisePolyfill from 'promise-polyfill/src/index.js'; +/* +Assign the ES6 promise polyfill to window ourselves instead of using the "auto" +polyfill to work around +https://github.com/webcomponents/webcomponentsjs/issues/837 +*/ +if (!window.Promise) { + window.Promise = PromisePolyfill; + // save Promise API + /* eslint-disable no-self-assign */ + // PromisePolyfill.prototype['catch'] = PromisePolyfill.prototype.catch; + PromisePolyfill.prototype['then'] = PromisePolyfill.prototype.then; + // PromisePolyfill.prototype['finally'] = PromisePolyfill.prototype.finally; + PromisePolyfill['all'] = PromisePolyfill.all; + PromisePolyfill['race'] = PromisePolyfill.race; + PromisePolyfill['resolve'] = PromisePolyfill.resolve; + PromisePolyfill['reject'] = PromisePolyfill.reject; + /* eslint-enable */ + // approach copied from + // https://github.com/Polymer/polymer/blob/v3.0.2/lib/utils/async.js + const node = document.createTextNode(''); + const twiddleNode = function twiddleNode() { + node.textContent = node.textContent.length > 0 ? '' : 'a'; + }; + /** @type {!Array} */ + const callbacks = []; + new MutationObserver(() => { + const len = callbacks.length; + for (let i = 0; i < len; i++) { + callbacks[i](); + } + callbacks.splice(0, len); + }).observe(node, { characterData: true }); + // set _immediateFn to a MutationObserver for close-to-native timing + PromisePolyfill._immediateFn = (fn) => { + callbacks.push(fn); + twiddleNode(); + }; +} +//# sourceMappingURL=promise.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/svg-element-class-list.js b/dist/webcomponents/src/platform/svg-element-class-list.js new file mode 100644 index 0000000..c033f5f --- /dev/null +++ b/dist/webcomponents/src/platform/svg-element-class-list.js @@ -0,0 +1,28 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +const Element_prototype = window.Element.prototype; +const HTMLElement_prototype = window.HTMLElement.prototype; +const SVGElement_prototype = window['SVGElement'].prototype; +// Thanks to @justinfagnani for finding this: +// +// In IE11, `classList` is only supported on `HTMLElement` instances: the +// descriptor is an own property of `HTMLElement.prototype` and is an accessor +// descriptor with `set` as `undefined` and no `get`. However, it seems to be +// implemented generically enough such that copying it to something in the +// prototype chain of `SVGElement` correctly adds support for `classList` (as +// far as `DOMTokenList` implemented in IE11). +if (HTMLElement_prototype.hasOwnProperty('classList') && + !Element_prototype.hasOwnProperty('classList') && + !SVGElement_prototype.hasOwnProperty('classList')) { + Object.defineProperty(Element_prototype, 'classList', Object.getOwnPropertyDescriptor(HTMLElement_prototype, 'classList')); +} +export {}; +//# sourceMappingURL=svg-element-class-list.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/symbol.js b/dist/webcomponents/src/platform/symbol.js new file mode 100644 index 0000000..c891fd8 --- /dev/null +++ b/dist/webcomponents/src/platform/symbol.js @@ -0,0 +1,64 @@ +/** +@license +Copyright (c) 2018 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +// import polyfill for Symbol and Object.getOwnPropertySymbols +import 'get-own-property-symbols/build/get-own-property-symbols.max'; +// Fix issue in toString patch when compiled into strict mode via closure +// https://github.com/es-shims/get-own-property-symbols/issues/16 +const toString = Object.prototype.toString; +Object.prototype.toString = function () { + if (this === undefined) { + return '[object Undefined]'; + } + else if (this === null) { + return '[object Null]'; + } + else { + return toString.call(this); + } +}; +// overwrite Object.keys to filter out symbols +Object.keys = function (obj) { + return Object.getOwnPropertyNames(obj).filter((name) => { + const prop = Object.getOwnPropertyDescriptor(obj, name); + return prop && prop.enumerable; + }); +}; +// implement iterators for IE 11 +if (!String.prototype[Symbol.iterator] || !String.prototype.codePointAt) { + String.prototype[Symbol.iterator] = function* () { + for (let i = 0; i < this.length; i++) { + yield this[i]; + } + }; +} +if (!Set.prototype[Symbol.iterator]) { + Set.prototype[Symbol.iterator] = function* () { + const temp = []; + this.forEach((value) => { + temp.push(value); + }); + for (let i = 0; i < temp.length; i++) { + yield temp[i]; + } + }; +} +if (!Map.prototype[Symbol.iterator]) { + Map.prototype[Symbol.iterator] = function* () { + const entries = []; + this.forEach((value, key) => { + entries.push([key, value]); + }); + for (let i = 0; i < entries.length; i++) { + yield entries[i]; + } + }; +} +//# sourceMappingURL=symbol.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/platform/toggle-attribute.js b/dist/webcomponents/src/platform/toggle-attribute.js new file mode 100644 index 0000000..840e016 --- /dev/null +++ b/dist/webcomponents/src/platform/toggle-attribute.js @@ -0,0 +1,39 @@ +/** +@license +Copyright (c) 2020 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as +part of the polymer project is also subject to an additional IP rights grant +found at http://polymer.github.io/PATENTS.txt +*/ +const Element_prototype = Element.prototype; +const nativeHasAttribute = Element.prototype.hasAttribute; +const nativeSetAttribute = Element.prototype.setAttribute; +const nativeRemoveAttribute = Element.prototype.removeAttribute; +if (!Element_prototype.hasOwnProperty('toggleAttribute')) { + Element_prototype.toggleAttribute = function toggleAttribute(name, force) { + if (force === undefined) { + if (nativeHasAttribute.call(this, name)) { + nativeRemoveAttribute.call(this, name); + return false; + } + else { + nativeSetAttribute.call(this, name, ''); + return true; + } + } + if (force) { + if (!nativeHasAttribute.call(this, name)) { + nativeSetAttribute.call(this, name, ''); + } + return true; + } + // force is falsey + nativeRemoveAttribute.call(this, name); + return false; + }; +} +export {}; +//# sourceMappingURL=toggle-attribute.js.map \ No newline at end of file diff --git a/dist/webcomponents/src/unresolved.js b/dist/webcomponents/src/unresolved.js new file mode 100644 index 0000000..7fd9c9f --- /dev/null +++ b/dist/webcomponents/src/unresolved.js @@ -0,0 +1,32 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */ +// It's desireable to provide a default stylesheet +// that's convenient for styling unresolved elements, but +// it's cumbersome to have to include this manually in every page. +// It would make sense to put inside some HTMLImport but +// the HTMLImports polyfill does not allow loading of stylesheets +// that block rendering. Therefore this injection is tolerated here. +// +// NOTE: position: relative fixes IE's failure to inherit opacity +// when a child is not statically positioned. +const style = document.createElement('style'); +style.textContent = + '' + + 'body {' + + 'transition: opacity ease-in 0.2s;' + + ' } \n' + + 'body[unresolved] {' + + 'opacity: 0; display: block; overflow: hidden; position: relative;' + + ' } \n'; +const head = document.querySelector('head'); +head.insertBefore(style, head.firstChild); +export {}; +//# sourceMappingURL=unresolved.js.map \ No newline at end of file diff --git a/dist/webcomponents/webcomponents-bundle.js b/dist/webcomponents/webcomponents-bundle.js index a5c5dc6..c285271 100644 --- a/dist/webcomponents/webcomponents-bundle.js +++ b/dist/webcomponents/webcomponents-bundle.js @@ -10,49 +10,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN (function(){/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. - This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - Code distributed by Google as part of the polymer project is also - subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + This code may only be used under the BSD style license found at + http://polymer.github.io/LICENSE.txt The complete set of authors may be found + at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + Google as part of the polymer project is also subject to an additional IP + rights grant found at http://polymer.github.io/PATENTS.txt */ -'use strict';var w;function ba(a){var b=0;return function(){return b\x20\t\r\n\f]+)/i.exec(t)|| -["",""])[1].toLowerCase()];if(D)for(var K=0;K"+t+"";y.body.innerHTML=t;for(a.a(y);this.content.firstChild;)k.call(this.content,this.content.firstChild);t=y.body;if(D)for(K=0;K"+this.innerHTML+""},set:function(t){if(this.parentNode){y.body.innerHTML=t;for(t=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(t, -y.body.firstChild);m.call(this.parentNode,t,this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};n(a.prototype);I(a.prototype);a.a=function(p){p=b(p,"template");for(var t=0,D=p.length,K;t]/g,cb=function(p){switch(p){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}};v=function(p){for(var t={},D=0;D";break a;case Node.TEXT_NODE:z=z.data;z=R&&db[R.localName]? -z:z.replace(Xb,cb);break a;case Node.COMMENT_NODE:z="\x3c!--"+z.data+"--\x3e";break a;default:throw window.console.error(z),Error("not implemented");}}D+=z}return D}}if(c||M){a.b=function(p,t){var D=f.call(p,!1);this.U&&this.U(D);t&&(l.call(D.content,f.call(p.content,!0)),u(D.content,p.content));return D};var u=function(p,t){if(t.querySelectorAll&&(t=b(t,"template"),0!==t.length)){p=b(p,"template");for(var D=0,K=p.length,aa,ja;D\x20\t\r\n\f]+)/i.exec(r)||["",""])[1].toLowerCase()];if(B)for(var K=0;K"+r+"";y.body.innerHTML=r;for(a.bootstrap(y);this.content.firstChild;)k.call(this.content,this.content.firstChild);r=y.body;if(B)for(K=0;K"+this.innerHTML+""},set:function(r){if(this.parentNode){y.body.innerHTML= +r;for(r=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(r,y.body.firstChild);m.call(this.parentNode,r,this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};n(a.prototype);J(a.prototype);a.bootstrap=function(p){p=b(p,"template");for(var r=0,B=p.length,K;r]/g,ib=function(p){switch(p){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}; +x=function(p){for(var r={},B=0;B";break a;case Node.TEXT_NODE:z=z.data;z=R&&jb[R.localName]?z:z.replace(kc,ib);break a;case Node.COMMENT_NODE:z="\x3c!--"+z.data+"--\x3e";break a;default:throw window.console.error(z),Error("not implemented");}}B+=z}return B}}if(c||N){a.va=function(p,r){var B=f.call(p,!1);this.Z&&this.Z(B);r&&(l.call(B.content,f.call(p.content,!0)),I(B.content,p.content));return B};var I=function(p,r){if(r.querySelectorAll&& +(r=b(r,"template"),0!==r.length)){p=b(p,"template");for(var B=0,K=p.length,aa,ma;B]/g;function Tb(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Ub(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&Wb[k.localName]?h:h.replace(Sb,Tb);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), -Error("not implemented");}}c+=h}return c};var $b=N.B,ac={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},bc={};function cc(a){bc[a]=function(b){return b["__shady_native_"+a]}}function dc(a,b){P(a,b,"__shady_native_");for(var c in b)cc(c)}function S(a,b){b=void 0===b?[]:b;for(var c=0;ce.assignedNodes.length&&(e.ra=!0)}e.ra&&(e.ra=!1,me(this,c))}c=this.a;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c]/g;function qd(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function rd(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&td[k.localName]?h:h.replace(pd,qd);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), +Error("not implemented");}}c+=h}return c};var vd=M.D,wd={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},xd={};function yd(a){xd[a]=function(b){return b["__shady_native_"+a]}}function zd(a,b){P(a,b,"__shady_native_");for(var c in b)yd(c)}function S(a,b){b=void 0===b?[]:b;for(var c=0;c","+","~"]),h=g===e?a[e]:a.substring(e,g);if(","===h)b();else if(-1===[void 0," ",">","+","~"].indexOf(f)||" "!==h)" "===f&&-1!==[">","+","~"].indexOf(h)?d[d.length-1]=h:d.push(h);e=g+(g===e?1:0)}b();return c};function Ze(a,b,c){var d=[];$e(a,b,c,d);return d}function $e(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:($e(e,f,g,h),e=void 0)}if(e)break}} +var af={get firstElementChild(){var a=L(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=L(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return Lc(this)?Wc(Array.prototype.filter.call(Yc(this), +function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},bf=Q((af.append=function(a){for(var b=[],c=0;cd.length)return[];for(b=dd(Ze(a,function(){return!0}).map(function(e){return dd(d.map(function(f){var g=f.La,h=g.length-1;return c(e,g[h])?{target:e,da:f,fa:e,index:h}:[]}))}));b.some(function(e){return 0=e.index)return e;var f=e.target,g=e.fa,h=e.da;e=e.index-1;var k=h.Za[e],l=h.La[e];if(" "===k){k=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g, +l)&&k.push({target:f,da:h,fa:g,index:e});return k}if(">"===k)return g=g.__shady_parentElement,c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("+"===k)return(g=g.__shady_previousElementSibling)&&c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("~"===k){k=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,l)&&k.push({target:f,da:h,fa:g,index:e});return k}throw Error("Unrecognized combinator: '"+k+"'.");}));return ed(b.map(function(e){return e.target}))} +var df=M.querySelectorImplementation,ef=Q({querySelector:function(a){if("native"===df){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=ka(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.__shady_getRootNode()==c)return d;return null}if("selectorEngine"===df)return cf(this,a)[0]||null;if(void 0===df)return Ze(this,function(e){return Pc.call(e,a)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+ +(df+"'"));},querySelectorAll:function(a,b){if(b||"native"===df){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return Wc(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===df)return Wc(cf(this,a));if(void 0===df)return Wc(Ze(this,function(d){return Pc.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(df+"'"));}}),ff=M.ha&&!M.J?ad({},bf): +bf;ad(bf,ef);var gf=Q({after:function(a){for(var b=[],c=0;ce.assignedNodes.length&&(e.Aa=!0)}e.Aa&&(e.Aa=!1,Wf(this,c))}c=this.g;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c "+h}))}return{value:a,Ya:b,stop:f}}function Hi(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ki=/[[.:#*]/,Ci=/^(::slotted)/,Ji=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ii=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Fi=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Ai=/:(?:matches|any|-(?:webkit|moz)-any)/,pi=new mi;function Mi(a,b,c,d,e){this.M=a||null;this.h=b||null;this.Ca=c||[];this.K=null;this.cssBuild=e||"";this.ja=d||"";this.g=this.L=this.R=null}function Ni(a){return a?a.__styleInfo:null}function Oi(a,b){return a.__styleInfo=b}Mi.prototype.i=function(){return this.M};Mi.prototype._getStyleRules=Mi.prototype.i;function Pi(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Qi=/:host\s*>\s*/,Ri=navigator.userAgent.match("Trident");function Si(){}function Ti(a){var b={},c=[],d=0;Xh(a,function(f){Ui(f);f.index=d++;f=f.F.cssText;for(var g;g=Rh.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.h=c;a=[];for(var e in b)a.push(e);return a} +function Ui(a){if(!a.F){var b={},c={};Vi(a,c)&&(b.P=c,a.rules=null);b.cssText=a.parsedCssText.replace(Uh,"").replace(Ph,"");a.F=b}}function Vi(a,b){var c=a.F;if(c){if(c.P)return Object.assign(b,c.P),!0}else{c=a.parsedCssText;for(var d;a=Ph.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} +function Wi(a,b,c){b&&(b=0<=b.indexOf(";")?Xi(a,b,c):fi(b,function(d,e,f,g){if(!e)return d+g;(e=Wi(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Wi(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} +function Xi(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.G||(b.G=wi(pi,b,pi.h,a?"."+a:"",e)),c=b.G||e),g&&"html"===e&&(c=b.G||b.O),d({Ea:c,gb:h,vb:g})}} +function $i(a,b,c){var d={},e={};Xh(b,function(f){Zi(a,f,c,function(g){Pi.call(a._element||a,g.Ea)&&(g.gb?Vi(f,d):Vi(f,e))})},null,!0);return{mb:e,eb:d}} +function aj(a,b,c,d){var e=ii(b),f=vi(e.is,e.ja),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=Ni(b);e=h.M;h=h.cssBuild;var k=bj(e,d);return ti(b,e,function(l){var m="";l.F||Ui(l);l.F.cssText&&(m=Xi(a,l.F.cssText,c));l.cssText=m;if(!V&&!$h(l)&&l.cssText){var q=m=l.cssText;null==l.Ma&&(l.Ma=Sh.test(m));if(l.Ma)if(null==l.ra){l.ra=[];for(var H in k)q=k[H],q=q(m),m!==q&&(m=q,l.ra.push(H))}else{for(H=0;H=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));V?k.g?(k.g.textContent=h,g=k.g):h&&(g=ai(h,f,a.shadowRoot,k.h)):g?g.parentNode||(Ri&&-1F&&-1==[34,35,60,62,63,96].indexOf(F)?t:encodeURIComponent(t)}function d(t){var F=t.charCodeAt(0);return 32F&&-1==[34,35,60,62,96].indexOf(F)?t:encodeURIComponent(t)}function e(t,F,E){function N(ha){sa.push(ha)}var y=F||"scheme start",X=0,x="",ta=!1,ia=!1,sa=[];a:for(;(void 0!=t[X-1]||0==X)&&!this.m;){var n=t[X];switch(y){case "scheme start":if(n&&q.test(n))x+= +n.toLowerCase(),y="scheme";else if(F){N("Invalid scheme.");break a}else{x="";y="no scheme";continue}break;case "scheme":if(n&&H.test(n))x+=n.toLowerCase();else if(":"==n){this.l=x;x="";if(F)break a;void 0!==l[this.l]&&(this.H=!0);y="file"==this.l?"relative":this.H&&E&&E.l==this.l?"relative or authority":this.H?"authority first slash":"scheme data"}else if(F){void 0!=n&&N("Code point not allowed in scheme: "+n);break a}else{x="";X=0;y="no scheme";continue}break;case "scheme data":"?"==n?(this.A="?", +y="query"):"#"==n?(this.C="#",y="fragment"):void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.ya+=c(n));break;case "no scheme":if(E&&void 0!==l[E.l]){y="relative";continue}else N("Missing scheme."),f.call(this),this.m=!0;break;case "relative or authority":if("/"==n&&"/"==t[X+1])y="authority ignore slashes";else{N("Expected /, got: "+n);y="relative";continue}break;case "relative":this.H=!0;"file"!=this.l&&(this.l=E.l);if(void 0==n){this.o=E.o;this.v=E.v;this.s=E.s.slice();this.A=E.A;this.B=E.B;this.j=E.j; +break a}else if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="relative slash";else if("?"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A="?",this.B=E.B,this.j=E.j,y="query";else if("#"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A=E.A,this.C="#",this.B=E.B,this.j=E.j,y="fragment";else{y=t[X+1];var J=t[X+2];if("file"!=this.l||!q.test(n)||":"!=y&&"|"!=y||void 0!=J&&"/"!=J&&"\\"!=J&&"?"!=J&&"#"!=J)this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j,this.s=E.s.slice(),this.s.pop();y= +"relative path";continue}break;case "relative slash":if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="file"==this.l?"file host":"authority ignore slashes";else{"file"!=this.l&&(this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j);y="relative path";continue}break;case "authority first slash":if("/"==n)y="authority second slash";else{N("Expected '/', got: "+n);y="authority ignore slashes";continue}break;case "authority second slash":y="authority ignore slashes";if("/"!=n){N("Expected '/', got: "+ +n);continue}break;case "authority ignore slashes":if("/"!=n&&"\\"!=n){y="authority";continue}else N("Expected authority, got: "+n);break;case "authority":if("@"==n){ta&&(N("@ already seen."),x+="%40");ta=!0;for(n=0;n "+h}))}return{value:a,Qa:b,stop:f}}function Yg(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,ah=/[[.:#*]/,Tg=/^(::slotted)/,$g=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Zg=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Wg=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Rg=/:(?:matches|any|-(?:webkit|moz)-any)/,Gg=new Dg;function ch(a,b,c,d,e){this.H=a||null;this.b=b||null;this.ta=c||[];this.F=null;this.cssBuild=e||"";this.ba=d||"";this.a=this.G=this.L=null}function dh(a){return a?a.__styleInfo:null}function eh(a,b){return a.__styleInfo=b}ch.prototype.c=function(){return this.H};ch.prototype._getStyleRules=ch.prototype.c;function fh(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var gh=/:host\s*>\s*/,hh=navigator.userAgent.match("Trident");function ih(){}function jh(a){var b={},c=[],d=0;og(a,function(f){kh(f);f.index=d++;f=f.v.cssText;for(var g;g=ig.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.b=c;a=[];for(var e in b)a.push(e);return a} -function kh(a){if(!a.v){var b={},c={};lh(a,c)&&(b.K=c,a.rules=null);b.cssText=a.parsedCssText.replace(lg,"").replace(fg,"");a.v=b}}function lh(a,b){var c=a.v;if(c){if(c.K)return Object.assign(b,c.K),!0}else{c=a.parsedCssText;for(var d;a=fg.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} -function mh(a,b,c){b&&(b=0<=b.indexOf(";")?nh(a,b,c):wg(b,function(d,e,f,g){if(!e)return d+g;(e=mh(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=mh(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} -function nh(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.w||(b.w=Ng(Gg,b,Gg.b,a?"."+a:"",e)),c=b.w||e),g&&"html"===e&&(c=b.w||b.J),d({wa:c,Xa:h,mb:g})}} -function qh(a,b,c){var d={},e={};og(b,function(f){ph(a,f,c,function(g){fh.call(a._element||a,g.wa)&&(g.Xa?lh(f,d):lh(f,e))})},null,!0);return{cb:e,Va:d}} -function rh(a,b,c,d){var e=zg(b),f=Mg(e.is,e.ba),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=dh(b);e=h.H;h=h.cssBuild;var k=sh(e,d);return Kg(b,e,function(l){var m="";l.v||kh(l);l.v.cssText&&(m=nh(a,l.v.cssText,c));l.cssText=m;if(!V&&!qg(l)&&l.cssText){var q=m=l.cssText;null==l.Da&&(l.Da=jg.test(m));if(l.Da)if(null==l.ja){l.ja=[];for(var H in k)q=k[H],q=q(m),m!==q&&(m=q,l.ja.push(H))}else{for(H=0;H=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));V?k.a?(k.a.textContent=h,g=k.a):h&&(g=rg(h,f,a.shadowRoot,k.b)):g?g.parentNode||(hh&&-1F&&-1==[34,35,60,62,63,96].indexOf(F)?r:encodeURIComponent(r)}function d(r){var F=r.charCodeAt(0);return 32F&&-1==[34,35,60,62,96].indexOf(F)?r:encodeURIComponent(r)}function e(r,F,C){function M(ka){ta.push(ka)}var y=F||"scheme start",W=0,v="",sa=!1,ea=!1,ta=[];a:for(;(void 0!=r[W-1]||0==W)&&!this.h;){var n=r[W];switch(y){case "scheme start":if(n&&q.test(n))v+= -n.toLowerCase(),y="scheme";else if(F){M("Invalid scheme.");break a}else{v="";y="no scheme";continue}break;case "scheme":if(n&&H.test(n))v+=n.toLowerCase();else if(":"==n){this.g=v;v="";if(F)break a;void 0!==l[this.g]&&(this.A=!0);y="file"==this.g?"relative":this.A&&C&&C.g==this.g?"relative or authority":this.A?"authority first slash":"scheme data"}else if(F){void 0!=n&&M("Code point not allowed in scheme: "+n);break a}else{v="";W=0;y="no scheme";continue}break;case "scheme data":"?"==n?(this.o="?", -y="query"):"#"==n?(this.u="#",y="fragment"):void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.pa+=c(n));break;case "no scheme":if(C&&void 0!==l[C.g]){y="relative";continue}else M("Missing scheme."),f.call(this),this.h=!0;break;case "relative or authority":if("/"==n&&"/"==r[W+1])y="authority ignore slashes";else{M("Expected /, got: "+n);y="relative";continue}break;case "relative":this.A=!0;"file"!=this.g&&(this.g=C.g);if(void 0==n){this.i=C.i;this.m=C.m;this.j=C.j.slice();this.o=C.o;this.s=C.s;this.f=C.f; -break a}else if("/"==n||"\\"==n)"\\"==n&&M("\\ is an invalid code point."),y="relative slash";else if("?"==n)this.i=C.i,this.m=C.m,this.j=C.j.slice(),this.o="?",this.s=C.s,this.f=C.f,y="query";else if("#"==n)this.i=C.i,this.m=C.m,this.j=C.j.slice(),this.o=C.o,this.u="#",this.s=C.s,this.f=C.f,y="fragment";else{y=r[W+1];var I=r[W+2];if("file"!=this.g||!q.test(n)||":"!=y&&"|"!=y||void 0!=I&&"/"!=I&&"\\"!=I&&"?"!=I&&"#"!=I)this.i=C.i,this.m=C.m,this.s=C.s,this.f=C.f,this.j=C.j.slice(),this.j.pop();y= -"relative path";continue}break;case "relative slash":if("/"==n||"\\"==n)"\\"==n&&M("\\ is an invalid code point."),y="file"==this.g?"file host":"authority ignore slashes";else{"file"!=this.g&&(this.i=C.i,this.m=C.m,this.s=C.s,this.f=C.f);y="relative path";continue}break;case "authority first slash":if("/"==n)y="authority second slash";else{M("Expected '/', got: "+n);y="authority ignore slashes";continue}break;case "authority second slash":y="authority ignore slashes";if("/"!=n){M("Expected '/', got: "+ -n);continue}break;case "authority ignore slashes":if("/"!=n&&"\\"!=n){y="authority";continue}else M("Expected authority, got: "+n);break;case "authority":if("@"==n){sa&&(M("@ already seen."),v+="%40");sa=!0;for(n=0;n because no `content` property (IE and older browsers) var t = document.createElement('template'); if (!('content' in t)) { @@ -128,27 +138,67 @@ t2.content.appendChild(document.createElement('div')); t.content.appendChild(t2); var clone = t.cloneNode(true); - return (clone.content.childNodes.length === 0 || - clone.content.firstChild.content.childNodes.length === 0); + return ( + clone.content.childNodes.length === 0 || + clone.content.firstChild.content.childNodes.length === 0 + ); })(); // NOTE: any browser that does not have template or ES6 features // must load the full suite of polyfills. - if (!window.Promise || !Array.from || !window.URL || !window.Symbol || needsTemplate) { + if ( + !window.Promise || + !Array.from || + !window.URL || + !window.Symbol || + needsTemplate + ) { polyfills = ['sd-ce-pf']; } if (polyfills.length) { + // When the Trusted Types API is available, `policy` is a + // `TrustedTypePolicy` with functions for creating trusted HTML, scripts, + // and script URLs. This policy is used below to (a) approve the bundle URL + // string created by the loader that is assigned to a `