diff --git a/README.md b/README.md index c8435da..000ddc4 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Older browsers or versions can be supported by Highway by combining it with **po ## Releases #### 2.2.x +- :lock: Update dependencies for security purposes - :tada: Add new websites in the *Hall of Fame* - :tada: Add [Polyfills](https://highway.js.org/examples/polyfills.html) example to documentation - :sparkles: Reduce bundle size significantly with [microbundle](https://github.com/developit/microbundle) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 879f67e..73f2d78 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -1,106 +1,19 @@ -!function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="{{ site.url }}/assets/js/",i(i.s=88)}([function(t,e,i){"use strict";(function(t,r){i.d(e,"e",function(){return n}),i.d(e,"g",function(){return o}),i.d(e,"f",function(){return s}),i.d(e,"c",function(){return l}),i.d(e,"a",function(){return h}),i.d(e,"b",function(){return u}),i.d(e,"d",function(){return c}); +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="{{ site.url }}/assets/js/",r(r.s=91)}([function(t,e){function r(){}r.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){var n=this;function i(){n.off(t,i),e.apply(r,arguments)}return i._=e,this.on(t,i,r)},emit:function(t){for(var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,i=r.length;n=200&&e.status<300)return e.text();window.location.href=t.location.href}))}catch(t){return Promise.reject(t)}},e.prototype.beforeFetch=function(){try{var t=this;function e(){t.afterFetch()}t.pushState(),t.running=!0,t.emit("NAVIGATE_OUT",{from:{page:t.From.properties.page,view:t.From.properties.view},trigger:t.trigger,location:t.location});var r={trigger:t.trigger,contextual:t.Contextual},n=t.cache.has(t.location.href)?Promise.resolve(t.From.hide(r)).then((function(){t.properties=t.cache.get(t.location.href)})):Promise.resolve(Promise.all([t.fetch(),t.From.hide(r)])).then((function(e){t.properties=t.Helpers.getProperties(e[0]),t.cache.set(t.location.href,t.properties)}));return Promise.resolve(n&&n.then?n.then(e):e())}catch(t){return Promise.reject(t)}},e.prototype.afterFetch=function(){try{var t=this;return Promise.resolve(t.properties.renderer).then((function(e){return t.To=new e(t.properties),t.To.add(),t.emit("NAVIGATE_IN",{to:{page:t.To.properties.page,view:t.To.wrap.lastElementChild},trigger:t.trigger,location:t.location}),Promise.resolve(t.To.show({trigger:t.trigger,contextual:t.Contextual})).then((function(){t.popping=!1,t.running=!1,t.detach(t.links),t.links=document.querySelectorAll("a:not([target]):not([data-router-disabled])"),t.attach(t.links),t.emit("NAVIGATE_END",{to:{page:t.To.properties.page,view:t.To.wrap.lastElementChild},from:{page:t.From.properties.page,view:t.From.properties.view},trigger:t.trigger,location:t.location}),t.From=t.To,t.trigger=null}))}))}catch(t){return Promise.reject(t)}},e}(n),u=function(t,e){this.wrap=t,this.name=e};u.prototype.show=function(t){var e=this,r=t.trigger,n=t.contextual,i=this.wrap.lastElementChild,o=this.wrap.firstElementChild;return new Promise((function(t){n?(i.setAttribute("data-transition-in",n.name),i.removeAttribute("data-transition-out",n.name),n.in&&n.in({to:i,from:o,trigger:r,done:t})):(i.setAttribute("data-transition-in",e.name),i.removeAttribute("data-transition-out",e.name),e.in&&e.in({to:i,from:o,trigger:r,done:t}))}))},u.prototype.hide=function(t){var e=this,r=t.trigger,n=t.contextual,i=this.wrap.firstElementChild;return new Promise((function(t){n?(i.setAttribute("data-transition-out",n.name),i.removeAttribute("data-transition-in",n.name),n.out&&n.out({from:i,trigger:r,done:t})):(i.setAttribute("data-transition-out",e.name),i.removeAttribute("data-transition-in",e.name),e.out&&e.out({from:i,trigger:r,done:t}))}))},console.log("Highway v2.2.0"),t.exports={Core:a,Helpers:s,Renderer:i,Transition:u}},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||Function("return this")()}).call(this,r(67))},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(1),i=r(36),o=r(2),s=r(37),a=r(41),u=r(58),c=i("wks"),f=n.Symbol,l=u?f:f&&f.withoutSetter||s;t.exports=function(t){return o(c,t)||(a&&o(f,t)?c[t]=f[t]:c[t]=l("Symbol."+t)),c[t]}},function(t,e,r){var n=r(4);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,r){var n=r(9),i=r(8),o=r(23);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(9),i=r(49),o=r(6),s=r(34),a=Object.defineProperty;e.f=n?a:function(t,e,r){if(o(t),e=s(e,!0),o(r),i)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(3);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){"use strict";var n=r(12),i=r(81),o=r(44),s=r(25),a=r(63),u=s.set,c=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,r){var n=r(1),i=r(32).f,o=r(7),s=r(22),a=r(35),u=r(53),c=r(72);t.exports=function(t,e){var r,f,l,h,p,d=t.target,y=t.global,m=t.stat;if(r=y?n:m?n[d]||a(d,{}):(n[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=i(r,f))&&p.value:r[f],!c(y?f:d+(m?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;u(h,l)}(t.sham||l&&l.sham)&&o(h,"sham",!0),s(r,f,h,t)}}},function(t,e,r){var n=r(48),i=r(24);t.exports=function(t){return n(i(t))}},function(t,e,r){"use strict";var n=r(11),i=r(1),o=r(29),s=r(27),a=r(9),u=r(41),c=r(58),f=r(3),l=r(2),h=r(59),p=r(4),d=r(6),y=r(30),m=r(12),g=r(34),_=r(23),v=r(31),b=r(60),w=r(38),x=r(77),T=r(57),O=r(32),S=r(8),P=r(47),A=r(7),E=r(22),j=r(36),k=r(26),C=r(28),R=r(37),M=r(5),D=r(61),F=r(62),L=r(42),B=r(25),I=r(78).forEach,z=k("hidden"),U=M("toPrimitive"),N=B.set,q=B.getterFor("Symbol"),V=Object.prototype,G=i.Symbol,Y=o("JSON","stringify"),H=O.f,X=S.f,W=x.f,Q=P.f,$=j("symbols"),K=j("op-symbols"),Z=j("string-to-symbol-registry"),J=j("symbol-to-string-registry"),tt=j("wks"),et=i.QObject,rt=!et||!et.prototype||!et.prototype.findChild,nt=a&&f((function(){return 7!=v(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=H(V,e);n&&delete V[e],X(t,e,r),n&&t!==V&&X(V,e,n)}:X,it=function(t,e){var r=$[t]=v(G.prototype);return N(r,{type:"Symbol",tag:t,description:e}),a||(r.description=e),r},ot=c?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof G},st=function(t,e,r){t===V&&st(K,e,r),d(t);var n=g(e,!0);return d(r),l($,n)?(r.enumerable?(l(t,z)&&t[z][n]&&(t[z][n]=!1),r=v(r,{enumerable:_(0,!1)})):(l(t,z)||X(t,z,_(1,{})),t[z][n]=!0),nt(t,n,r)):X(t,n,r)},at=function(t,e){d(t);var r=m(e),n=b(r).concat(lt(r));return I(n,(function(e){a&&!ut.call(r,e)||st(t,e,r[e])})),t},ut=function(t){var e=g(t,!0),r=Q.call(this,e);return!(this===V&&l($,e)&&!l(K,e))&&(!(r||!l(this,e)||!l($,e)||l(this,z)&&this[z][e])||r)},ct=function(t,e){var r=m(t),n=g(e,!0);if(r!==V||!l($,n)||l(K,n)){var i=H(r,n);return!i||!l($,n)||l(r,z)&&r[z][n]||(i.enumerable=!0),i}},ft=function(t){var e=W(m(t)),r=[];return I(e,(function(t){l($,t)||l(C,t)||r.push(t)})),r},lt=function(t){var e=t===V,r=W(e?K:m(t)),n=[];return I(r,(function(t){!l($,t)||e&&!l(V,t)||n.push($[t])})),n};(u||(E((G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=R(t),r=function(t){this===V&&r.call(K,t),l(this,z)&&l(this[z],e)&&(this[z][e]=!1),nt(this,e,_(1,t))};return a&&rt&&nt(V,e,{configurable:!0,set:r}),it(e,t)}).prototype,"toString",(function(){return q(this).tag})),E(G,"withoutSetter",(function(t){return it(R(t),t)})),P.f=ut,S.f=st,O.f=ct,w.f=x.f=ft,T.f=lt,D.f=function(t){return it(M(t),t)},a&&(X(G.prototype,"description",{configurable:!0,get:function(){return q(this).description}}),s||E(V,"propertyIsEnumerable",ut,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:G}),I(b(tt),(function(t){F(t)})),n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=String(t);if(l(Z,e))return Z[e];var r=G(e);return Z[e]=r,J[r]=e,r},keyFor:function(t){if(!ot(t))throw TypeError(t+" is not a symbol");if(l(J,t))return J[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!a},{create:function(t,e){return void 0===e?v(t):at(v(t),e)},defineProperty:st,defineProperties:at,getOwnPropertyDescriptor:ct}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ft,getOwnPropertySymbols:lt}),n({target:"Object",stat:!0,forced:f((function(){T.f(1)}))},{getOwnPropertySymbols:function(t){return T.f(y(t))}}),Y)&&n({target:"JSON",stat:!0,forced:!u||f((function(){var t=G();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,r){for(var n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=e,(p(e)||void 0!==t)&&!ot(t))return h(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!ot(e))return e}),i[1]=e,Y.apply(null,i)}});G.prototype[U]||A(G.prototype,U,G.prototype.valueOf),L(G,"Symbol"),C[z]=!0},function(t,e,r){"use strict";var n=r(11),i=r(9),o=r(1),s=r(2),a=r(4),u=r(8).f,c=r(53),f=o.Symbol;if(i&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new f(t):void 0===t?f():f(t);return""===t&&(l[e]=!0),e};c(h,f);var p=h.prototype=f.prototype;p.constructor=h;var d=p.toString,y="Symbol(test)"==String(f("test")),m=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=d.call(t);if(s(l,t))return"";var r=y?e.slice(7,-1):e.replace(m,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:h})}},function(t,e,r){r(62)("iterator")},function(t,e,r){var n=r(11),i=r(3),o=r(30),s=r(45),a=r(65);n({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},function(t,e,r){var n=r(46),i=r(22),o=r(85);n||i(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,r){var n=r(11),i=r(29),o=r(43),s=r(6),a=r(4),u=r(31),c=r(87),f=r(3),l=i("Reflect","construct"),h=f((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),p=!f((function(){l((function(){}))})),d=h||p;n({target:"Reflect",stat:!0,forced:d,sham:d},{construct:function(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(p&&!h)return l(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(c.apply(t,n))}var i=r.prototype,f=u(a(i)?i:Object.prototype),d=Function.apply.call(t,f,e);return a(d)?d:f}})},function(t,e,r){"use strict";var n=r(22),i=r(6),o=r(3),s=r(88),a=RegExp.prototype,u=a.toString,c=o((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),f="toString"!=u.name;(c||f)&&n(RegExp.prototype,"toString",(function(){var t=i(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in a)?s.call(t):r)}),{unsafe:!0})},function(t,e,r){"use strict";var n=r(89).charAt,i=r(25),o=r(63),s=i.set,a=i.getterFor("String Iterator");o(String,"String",(function(t){s(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=a(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=n(r,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){var n=r(1),i=r(90),o=r(10),s=r(7),a=r(5),u=a("iterator"),c=a("toStringTag"),f=o.values;for(var l in i){var h=n[l],p=h&&h.prototype;if(p){if(p[u]!==f)try{s(p,u,f)}catch(t){p[u]=f}if(p[c]||s(p,c,l),i[l])for(var d in o)if(p[d]!==o[d])try{s(p,d,o[d])}catch(t){p[d]=o[d]}}}},function(t,e,r){var n=r(1),i=r(7),o=r(2),s=r(35),a=r(51),u=r(25),c=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,r,a){var u=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet;"function"==typeof r&&("string"!=typeof e||o(r,"name")||i(r,"name",e),f(r).source=l.join("string"==typeof e?e:"")),t!==n?(u?!h&&t[e]&&(c=!0):delete t[e],c?t[e]=r:i(t,e,r)):c?t[e]=r:s(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||a(this)}))},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n,i,o,s=r(68),a=r(1),u=r(4),c=r(7),f=r(2),l=r(26),h=r(28),p=a.WeakMap;if(s){var d=new p,y=d.get,m=d.has,g=d.set;n=function(t,e){return g.call(d,t,e),e},i=function(t){return y.call(d,t)||{}},o=function(t){return m.call(d,t)}}else{var _=l("state");h[_]=!0,n=function(t,e){return c(t,_,e),e},i=function(t){return f(t,_)?t[_]:{}},o=function(t){return f(t,_)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(36),i=r(37),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e){t.exports=!1},function(t,e){t.exports={}},function(t,e,r){var n=r(54),i=r(1),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t])||o(i[t]):n[t]&&n[t][e]||i[t]&&i[t][e]}},function(t,e,r){var n=r(24);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n,i=r(6),o=r(75),s=r(40),a=r(28),u=r(76),c=r(50),f=r(26),l=f("IE_PROTO"),h=function(){},p=function(t){return"