aptechka 0.81.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/lib/{Animation-C4tLEBGM.js → Animation-DxtCzFP3.js} +2 -2
  2. package/lib/{Composed-BB1MtFiT.js → Composed-DtS09lSU.js} +2 -2
  3. package/lib/{Damped-DVG5nrYV.js → Damped-DMnIOXpC.js} +2 -2
  4. package/lib/{DerivedArray-D3scYQdp.js → DerivedArray-DG9iR0mf.js} +1 -1
  5. package/lib/{DragControls-Cm_88cLt.js → DragControls-DCC8iEOR.js} +4 -4
  6. package/lib/LocalLinks-Bua7BGRF.cjs +1 -0
  7. package/lib/LocalLinks-TQkTpAMx.js +62 -0
  8. package/lib/PageAnnouncerElement-C4k2kDJ5.cjs +1 -0
  9. package/lib/PageAnnouncerElement-sfh0_4vl.js +24 -0
  10. package/lib/PageScroll-C7QBpx0G.cjs +1 -0
  11. package/lib/PageScroll-cQ3B5-6N.js +62 -0
  12. package/lib/SourceElement-BQ7g2KWK.js +260 -0
  13. package/lib/SourceElement-TzgPNQOd.cjs +5 -0
  14. package/lib/{Store-BtVtCGLk.js → Store-CgQ3ReoB.js} +1 -1
  15. package/lib/{Tweened-C1lnK6n9.js → Tweened-lT68VACv.js} +2 -2
  16. package/lib/{Viewport-DbN_JWBM.js → Viewport-DGnJ31b4.js} +2 -2
  17. package/lib/accordion/index.js +1 -1
  18. package/lib/animation/index.js +3 -3
  19. package/lib/attribute/index.js +3 -3
  20. package/lib/billboard/index.js +2 -2
  21. package/lib/cache/Cache.d.ts +8 -0
  22. package/lib/cache/index.cjs +1 -0
  23. package/lib/cache/index.d.ts +1 -0
  24. package/lib/cache/index.js +37 -0
  25. package/lib/canvas/index.js +2 -2
  26. package/lib/controls/index.js +1 -1
  27. package/lib/css-property/index.js +3 -3
  28. package/lib/css-value-parser/index.js +1 -1
  29. package/lib/dev/index.js +2 -2
  30. package/lib/device/index.js +1 -1
  31. package/lib/{dom-fgxIeFxm.js → dom-BIeVMHfK.js} +2 -2
  32. package/lib/element-linked-store/index.js +2 -2
  33. package/lib/element-resizer/index.js +2 -2
  34. package/lib/en3/index.js +2 -2
  35. package/lib/history/History.d.ts +10 -0
  36. package/lib/history/index.cjs +1 -0
  37. package/lib/history/index.d.ts +1 -0
  38. package/lib/history/index.js +34 -0
  39. package/lib/iframe/index.cjs +1 -1
  40. package/lib/iframe/index.js +3 -3
  41. package/lib/image/index.cjs +1 -1
  42. package/lib/image/index.js +4 -4
  43. package/lib/{index-JqYHGoo6.js → index-LReFyN6i.js} +1 -1
  44. package/lib/intersector/index.js +2 -2
  45. package/lib/jsx/index.js +6 -6
  46. package/lib/ladder/index.js +2 -2
  47. package/lib/layout-box/index.js +2 -2
  48. package/lib/loading/index.js +1 -1
  49. package/lib/local-links/LocalLinks.d.ts +17 -0
  50. package/lib/local-links/index.cjs +1 -0
  51. package/lib/local-links/index.d.ts +1 -0
  52. package/lib/local-links/index.js +4 -0
  53. package/lib/masonry-layout/index.js +2 -2
  54. package/lib/media/index.js +2 -2
  55. package/lib/metadata-BcYZ5w3T.cjs +1 -0
  56. package/lib/metadata-jfowcCyz.js +12 -0
  57. package/lib/morph/index.cjs +1 -1
  58. package/lib/morph/index.js +141 -140
  59. package/lib/morph-B6sGhLCi.cjs +1 -0
  60. package/lib/morph-BQErz7qP.js +242 -0
  61. package/lib/need_redo_tweaker/index.cjs +1 -1
  62. package/lib/need_redo_tweaker/index.js +4 -4
  63. package/lib/{object-D6MVWB4l.js → object-CcMK4y_r.js} +12 -10
  64. package/lib/object-baN9pgbU.cjs +1 -0
  65. package/lib/page-announcer/PageAnnouncerElement.d.ts +10 -0
  66. package/lib/page-announcer/index.cjs +1 -0
  67. package/lib/page-announcer/index.d.ts +1 -0
  68. package/lib/page-announcer/index.js +4 -0
  69. package/lib/page-scroll/PageScroll.d.ts +23 -0
  70. package/lib/page-scroll/index.cjs +1 -0
  71. package/lib/page-scroll/index.d.ts +1 -0
  72. package/lib/page-scroll/index.js +4 -0
  73. package/lib/pixel-perfect/index.js +3 -3
  74. package/lib/pointer/index.js +4 -4
  75. package/lib/popover/index.cjs +1 -1
  76. package/lib/popover/index.js +3 -3
  77. package/lib/radio/index.js +1 -1
  78. package/lib/{render-CMQbWthg.js → render-CiA0mn5V.js} +3 -3
  79. package/lib/router/Route.d.ts +1 -2
  80. package/lib/router/Router.d.ts +18 -23
  81. package/lib/router/index.cjs +1 -1
  82. package/lib/router/index.d.ts +1 -1
  83. package/lib/router/index.js +183 -249
  84. package/lib/scroll/index.js +8 -8
  85. package/lib/scroll-entries/index.js +1 -1
  86. package/lib/{scroll-7JSxRKFK.js → scroll-jcbHDexr.js} +2 -2
  87. package/lib/scroll-kit/index.js +4 -4
  88. package/lib/sequence/index.cjs +1 -1
  89. package/lib/sequence/index.js +3 -3
  90. package/lib/size-element/index.js +1 -1
  91. package/lib/slicer/index.js +1 -1
  92. package/lib/source/SourceElement.d.ts +1 -1
  93. package/lib/source/index.cjs +1 -1
  94. package/lib/source/index.js +1 -1
  95. package/lib/spa/SPA.d.ts +29 -0
  96. package/lib/spa/index.cjs +1 -0
  97. package/lib/spa/index.d.ts +1 -0
  98. package/lib/spa/index.js +130 -0
  99. package/lib/store/index.js +3 -3
  100. package/lib/{stylesheet-JlRFfJIc.js → stylesheet-DbHOxtjw.js} +1 -1
  101. package/lib/ticker/index.js +2 -2
  102. package/lib/url-CPgw9bd5.cjs +1 -0
  103. package/lib/url-DAl-mgbC.js +97 -0
  104. package/lib/utils/index.cjs +1 -1
  105. package/lib/utils/index.d.ts +2 -0
  106. package/lib/utils/index.js +141 -120
  107. package/lib/utils/morph.d.ts +49 -0
  108. package/lib/utils/object.d.ts +1 -1
  109. package/lib/utils/url.d.ts +6 -0
  110. package/lib/video/index.cjs +1 -1
  111. package/lib/video/index.js +3 -3
  112. package/lib/window-resizer/index.js +1 -1
  113. package/lib/youtube/index.cjs +1 -1
  114. package/lib/youtube/index.js +3 -3
  115. package/package.json +49 -1
  116. package/lib/SourceElement-BBfaAgwe.cjs +0 -5
  117. package/lib/SourceElement-BiNNtaz9.js +0 -265
  118. package/lib/object-CCiXnER2.cjs +0 -1
  119. package/lib/router/Link.d.ts +0 -8
  120. package/lib/url-CoUSEREU.cjs +0 -1
  121. package/lib/url-IGj2LgDW.js +0 -66
@@ -30,8 +30,8 @@ var zs = (d, n, e) => new Promise((s, h) => {
30
30
  }, v = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(u, g);
31
31
  v((e = e.apply(d, n)).next());
32
32
  });
33
- import { S as ae } from "../Store-BtVtCGLk.js";
34
- import { i as q } from "../index-JqYHGoo6.js";
33
+ import { S as ae } from "../Store-CgQ3ReoB.js";
34
+ import { i as q } from "../index-LReFyN6i.js";
35
35
  import { q as fi } from "../easings-BEmRlrDd.js";
36
36
  import { i as pi } from "../element-CGVl1jA-.js";
37
37
  import { d as st } from "../events-CsVF98U6.js";
@@ -39,21 +39,21 @@ import { d as xs } from "../function-C10DGppn.js";
39
39
  import { a as ls, g as cs, b as bi } from "../layout-BSMtwCga.js";
40
40
  import { c as js, s as mi } from "../math-BOBiC4TN.js";
41
41
  import { p as Si, l as gi } from "../number-CumqY64S.js";
42
- import { c as Js } from "../stylesheet-JlRFfJIc.js";
42
+ import { c as Js } from "../stylesheet-DbHOxtjw.js";
43
43
  import "../ticker/index.js";
44
44
  import { TICK_ORDER as Qs, RESIZE_ORDER as Ls } from "../order/index.js";
45
- import { D as Xs } from "../Damped-DVG5nrYV.js";
46
- import { T as vi } from "../Tweened-C1lnK6n9.js";
47
- import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-Cm_88cLt.js";
45
+ import { D as Xs } from "../Damped-DMnIOXpC.js";
46
+ import { T as vi } from "../Tweened-lT68VACv.js";
47
+ import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-DCC8iEOR.js";
48
48
  import { windowResizer as pt } from "../window-resizer/index.js";
49
49
  import { scrollEntries as ce } from "../scroll-entries/index.js";
50
50
  import { cssUnitParser as Zs } from "../css-unit-parser/index.js";
51
51
  import { CSSProperty as l } from "../css-property/index.js";
52
- import { d as wi } from "../Viewport-DbN_JWBM.js";
52
+ import { d as wi } from "../Viewport-DGnJ31b4.js";
53
53
  import "construct-style-sheets-polyfill";
54
54
  import { elementResizer as os } from "../element-resizer/index.js";
55
55
  import { s as xi } from "../gestures-CcXV6fCp.js";
56
- import { b as Li } from "../dom-fgxIeFxm.js";
56
+ import { b as Li } from "../dom-BIeVMHfK.js";
57
57
  var p, Re, E, us, as, pe, bt, $t, be, Bt, Fe;
58
58
  class ki {
59
59
  constructor(n, e, s) {
@@ -4,7 +4,7 @@ var l = (i) => {
4
4
  var u = (i, t, e) => t.has(i) || l("Cannot " + e);
5
5
  var s = (i, t, e) => (u(i, t, "read from private field"), e ? e.call(i) : t.get(i)), f = (i, t, e) => t.has(i) ? l("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e);
6
6
  import { Notifier as g } from "../notifier/index.js";
7
- import { a as c } from "../dom-fgxIeFxm.js";
7
+ import { a as c } from "../dom-BIeVMHfK.js";
8
8
  var n, r, a;
9
9
  class p {
10
10
  constructor() {
@@ -1,7 +1,7 @@
1
- import { g as l, f as u } from "./dom-fgxIeFxm.js";
1
+ import { g as l, f as u } from "./dom-BIeVMHfK.js";
2
2
  import { a as g } from "./layout-BSMtwCga.js";
3
3
  import "construct-style-sheets-polyfill";
4
- import "./index-JqYHGoo6.js";
4
+ import "./index-LReFyN6i.js";
5
5
  function w(e) {
6
6
  return new Promise((o) => {
7
7
  setTimeout(() => {
@@ -3,14 +3,14 @@ var bt = (o) => {
3
3
  };
4
4
  var lt = (o, c, e) => c.has(o) || bt("Cannot " + e);
5
5
  var t = (o, c, e) => (lt(o, c, "read from private field"), e ? e.call(o) : c.get(o)), s = (o, c, e) => c.has(o) ? bt("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(o) : c.set(o, e), r = (o, c, e, i) => (lt(o, c, "write to private field"), i ? i.call(o, e) : c.set(o, e), e), d = (o, c, e) => (lt(o, c, "access private method"), e);
6
- import { i as Pt, a as pt } from "../index-JqYHGoo6.js";
6
+ import { i as Pt, a as pt } from "../index-LReFyN6i.js";
7
7
  import { ticker as J } from "../ticker/index.js";
8
- import { f as Ht } from "../dom-fgxIeFxm.js";
8
+ import { f as Ht } from "../dom-BIeVMHfK.js";
9
9
  import { s as xt } from "../gestures-CcXV6fCp.js";
10
10
  import "construct-style-sheets-polyfill";
11
11
  import { scrollEntries as ct } from "../scroll-entries/index.js";
12
- import "../Store-BtVtCGLk.js";
13
- import { D as kt } from "../Damped-DVG5nrYV.js";
12
+ import "../Store-CgQ3ReoB.js";
13
+ import { D as kt } from "../Damped-DMnIOXpC.js";
14
14
  import { CSSProperty as f } from "../css-property/index.js";
15
15
  import { ElementLinkedStore as zt } from "../element-linked-store/index.js";
16
16
  import { elementResizer as gt } from "../element-resizer/index.js";
@@ -1 +1 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-CKTweR3M.cjs"),z=require("../canvas-CU5Xjahf.cjs");require("construct-style-sheets-polyfill");const H=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,E,S,m,d,b,g,p,a,v;class B extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,E,new q.CSSProperty(this,"--fit","contain"));c(this,S,new q.CSSProperty(this,"--autoplay",!1));c(this,m,new q.CSSProperty(this,"--offset-x",.5));c(this,d,new q.CSSProperty(this,"--offset-y",.5));c(this,b,null);c(this,g,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,E).current==="cover"?l(this,b,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,b,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,b))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,g)];i&&e.detail.context.drawImage(i,...t(this,b)),t(this,S).current&&l(this,g,(t(this,g)+1)%t(this,h).length)});k.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,E).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,g,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,E).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,E).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const P=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=P,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,P)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,E=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;k.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",B);exports.SequenceElement=B;
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-CKTweR3M.cjs"),z=require("../canvas-CU5Xjahf.cjs");require("construct-style-sheets-polyfill");const H=require("../SourceElement-TzgPNQOd.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,E,S,m,d,b,g,p,a,v;class B extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,E,new q.CSSProperty(this,"--fit","contain"));c(this,S,new q.CSSProperty(this,"--autoplay",!1));c(this,m,new q.CSSProperty(this,"--offset-x",.5));c(this,d,new q.CSSProperty(this,"--offset-y",.5));c(this,b,null);c(this,g,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,E).current==="cover"?l(this,b,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,b,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,b))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,g)];i&&e.detail.context.drawImage(i,...t(this,b)),t(this,S).current&&l(this,g,(t(this,g)+1)%t(this,h).length)});k.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,E).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,g,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,E).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,E).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const P=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=P,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,P)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,E=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;k.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",B);exports.SequenceElement=B;
@@ -21,12 +21,12 @@ var R = (s, n, e) => new Promise((i, p) => {
21
21
  });
22
22
  import { CSSProperty as I } from "../css-property/index.js";
23
23
  import { elementResizer as k } from "../element-resizer/index.js";
24
- import { i as q } from "../index-JqYHGoo6.js";
24
+ import { i as q } from "../index-LReFyN6i.js";
25
25
  import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
26
26
  import "construct-style-sheets-polyfill";
27
- import { a as W } from "../SourceElement-BiNNtaz9.js";
27
+ import { a as W } from "../SourceElement-BQ7g2KWK.js";
28
28
  import "../window-resizer/index.js";
29
- import "../Store-BtVtCGLk.js";
29
+ import "../Store-CgQ3ReoB.js";
30
30
  import { CanvasElement as A } from "../canvas/index.js";
31
31
  function D(s) {
32
32
  const n = s.match(/\{([\d-]+)\}/);
@@ -4,7 +4,7 @@ var d = (t) => {
4
4
  var p = (t, s, e) => s.has(t) || d("Cannot " + e);
5
5
  var r = (t, s, e) => (p(t, s, "read from private field"), e ? e.call(t) : s.get(t)), c = (t, s, e) => s.has(t) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), f = (t, s, e, i) => (p(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e), n = (t, s, e) => (p(t, s, "access private method"), e);
6
6
  import { elementResizer as g } from "../element-resizer/index.js";
7
- import { i as y } from "../index-JqYHGoo6.js";
7
+ import { i as y } from "../index-LReFyN6i.js";
8
8
  import "construct-style-sheets-polyfill";
9
9
  var h, o, m, l;
10
10
  class u extends HTMLElement {
@@ -4,7 +4,7 @@ var O = (n) => {
4
4
  var F = (n, e, s) => e.has(n) || O("Cannot " + s);
5
5
  var t = (n, e, s) => (F(n, e, "read from private field"), s ? s.call(n) : e.get(n)), r = (n, e, s) => e.has(n) ? O("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, s), o = (n, e, s, p) => (F(n, e, "write to private field"), p ? p.call(n, s) : e.set(n, s), s), T = (n, e, s) => (F(n, e, "access private method"), s);
6
6
  import { Media as $ } from "../media/index.js";
7
- import { i as S } from "../index-JqYHGoo6.js";
7
+ import { i as S } from "../index-LReFyN6i.js";
8
8
  import "construct-style-sheets-polyfill";
9
9
  var y, d;
10
10
  class _ {
@@ -1,6 +1,6 @@
1
1
  import { ElementLinkedStore } from '../element-linked-store';
2
- import { SourceSetOptions } from './SourceSet';
3
2
  import { SourceManager } from './SourceManager';
3
+ import { SourceSetOptions } from './SourceSet';
4
4
  export interface SourceEvents {
5
5
  sourceCapture: CustomEvent;
6
6
  sourceRelease: CustomEvent;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SourceElement-BBfaAgwe.cjs");exports.Source=e.Source;exports.SourceElement=e.SourceElement;exports.SourceManager=e.SourceManager;exports.SourceSet=e.SourceSet;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SourceElement-TzgPNQOd.cjs");exports.Source=e.Source;exports.SourceElement=e.SourceElement;exports.SourceManager=e.SourceManager;exports.SourceSet=e.SourceSet;
@@ -1,4 +1,4 @@
1
- import { S as r, a as o, c as S, b as c } from "../SourceElement-BiNNtaz9.js";
1
+ import { S as r, a as o, c as S, b as c } from "../SourceElement-BQ7g2KWK.js";
2
2
  export {
3
3
  r as Source,
4
4
  o as SourceElement,
@@ -0,0 +1,29 @@
1
+ import { History } from '../history';
2
+ import { LocalLinksLinkOptions, LocalLinksOptions } from '../local-links';
3
+ import { PageScroll } from '../page-scroll';
4
+ export type SPAURLModifier = (url: URL) => URL;
5
+ export interface SPAOptions extends Pick<LocalLinksOptions, 'base' | 'trailingSlash' | 'includeAnchor'> {
6
+ scrollSelector?: string;
7
+ beforeDiff?: (newDocument: Document) => void | Promise<void>;
8
+ afterDiff?: () => void | Promise<void>;
9
+ viewTransition?: boolean;
10
+ urlModifier?: SPAURLModifier;
11
+ }
12
+ export interface SPANavigateOptions extends LocalLinksLinkOptions {
13
+ }
14
+ export interface SPAEvents {
15
+ spaBeforeUpdate: CustomEvent;
16
+ spaAfterUpdate: CustomEvent;
17
+ }
18
+ export declare class SPA {
19
+ #private;
20
+ static instance: SPA;
21
+ constructor(options?: SPAOptions);
22
+ history(): History;
23
+ get scroll(): PageScroll;
24
+ navigate(url: URL | string, options?: SPANavigateOptions): Promise<void>;
25
+ }
26
+ declare global {
27
+ interface DocumentEventMap extends SPAEvents {
28
+ }
29
+ }
@@ -0,0 +1 @@
1
+ "use strict";var X=Object.defineProperty,$=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var D=i=>{throw TypeError(i)};var z=(i,t,e)=>t in i?X(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,R=(i,t)=>{for(var e in t||(t={}))J.call(t,e)&&z(i,e,t[e]);if(M)for(var e of M(t))K.call(t,e)&&z(i,e,t[e]);return i},I=(i,t)=>$(i,G(t));var O=(i,t,e)=>t.has(i)||D("Cannot "+e);var r=(i,t,e)=>(O(i,t,"read from private field"),e?e.call(i):t.get(i)),u=(i,t,e)=>t.has(i)?D("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),f=(i,t,e,c)=>(O(i,t,"write to private field"),c?c.call(i,e):t.set(i,e),e);var V=(i,t,e,c)=>({set _(o){f(i,t,o,e)},get _(){return r(i,t,c)}});var j=(i,t,e)=>new Promise((c,o)=>{var s=a=>{try{l(e.next(a))}catch(w){o(w)}},m=a=>{try{l(e.throw(a))}catch(w){o(w)}},l=a=>a.done?c(a.value):Promise.resolve(a.value).then(s,m);l((e=e.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../cache/index.cjs"),Q=require("../history/index.cjs"),W=require("../LocalLinks-Bua7BGRF.cjs"),Y=require("../PageAnnouncerElement-C4k2kDJ5.cjs"),Z=require("../PageScroll-C7QBpx0G.cjs"),F=require("../events-KVanG9sR.cjs"),H=require("../morph-B6sGhLCi.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const k=require("../url-CPgw9bd5.cjs");var y,P,n,d,S,g,v,q;const b=class b{constructor(t){u(this,y,new N.Cache);u(this,P,new DOMParser);u(this,n,null);u(this,d,null);u(this,S,null);u(this,g,null);u(this,v,null);u(this,q,0);b.instance||(b.instance=this,f(this,n,I(R({},t),{base:k.normalizeBase(t==null?void 0:t.base)})),f(this,v,new Y.PageAnnouncerElement),f(this,d,new Z.PageScroll(r(this,n).scrollSelector)),r(this,d).update(),f(this,S,new W.LocalLinks({base:r(this,n).base,trailingSlash:r(this,n).trailingSlash,includeAnchor:t==null?void 0:t.includeAnchor,onClick:(e,c)=>{try{this.navigate(e,c)}catch(o){window.location.assign(e)}}})),r(this,S).update(),f(this,g,new Q.History({onPop:e=>{this.navigate(e)}})))}history(){return r(this,g)}get scroll(){return r(this,d)}navigate(t,e){return j(this,null,function*(){var w,L,T,A,E,U,B,C;const c=r(this,g).isBack,o=++V(this,q)._;let s=k.normalizeURL(t,{base:r(this,n).base,trailingSlash:r(this,n).trailingSlash});r(this,n).urlModifier&&(s=r(this,n).urlModifier(s));let m=r(this,y).get(s.toString());if((!m||e!=null&&e.revalidate)&&(m=yield fetch(`${s}`,{headers:{"X-SPA":"true"}}).then(h=>h.text()).catch(()=>{window.location.assign(s)})),!m||(e!=null&&e.cache&&r(this,y).set(s.toString(),m),r(this,q)!==o))return;c||(r(this,g).push(s),((w=e==null?void 0:e.keepScrollPosition)==null||w)&&r(this,d).element.scrollTo({top:0,behavior:"instant"}));const l=r(this,P).parseFromString(m,"text/html");if(k.normalizeRelativeURLs(l,s),yield(T=(L=r(this,n)).beforeDiff)==null?void 0:T.call(L,l),r(this,q)!==o)return;F.dispatchEvent(document,"spaBeforeUpdate",{custom:!0});let a=(A=l.querySelector("title"))==null?void 0:A.textContent;if(a)document.title=a;else{const h=document.querySelector("h1");a=(U=(E=h==null?void 0:h.innerText)!=null?E:h==null?void 0:h.textContent)!=null?U:s.pathname}r(this,v).create(l,a),r(this,n).viewTransition&&document.startViewTransition?yield document.startViewTransition(()=>H.morph(document,l)).finished:yield H.morph(document,l),r(this,d).update(),r(this,S).update(),r(this,v).done(),yield(C=(B=r(this,n)).afterDiff)==null?void 0:C.call(B),F.dispatchEvent(document,"spaAfterUpdate",{custom:!0})})}};y=new WeakMap,P=new WeakMap,n=new WeakMap,d=new WeakMap,S=new WeakMap,g=new WeakMap,v=new WeakMap,q=new WeakMap,b.instance=null;let x=b;exports.SPA=x;
@@ -0,0 +1 @@
1
+ export { SPA, type SPAEvents, type SPANavigateOptions, type SPAOptions, type SPAURLModifier, } from './SPA';
@@ -0,0 +1,130 @@
1
+ var O = Object.defineProperty, X = Object.defineProperties;
2
+ var $ = Object.getOwnPropertyDescriptors;
3
+ var z = Object.getOwnPropertySymbols;
4
+ var j = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
5
+ var D = (i) => {
6
+ throw TypeError(i);
7
+ };
8
+ var A = (i, e, t) => e in i ? O(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, E = (i, e) => {
9
+ for (var t in e || (e = {}))
10
+ j.call(e, t) && A(i, t, e[t]);
11
+ if (z)
12
+ for (var t of z(e))
13
+ G.call(e, t) && A(i, t, e[t]);
14
+ return i;
15
+ }, M = (i, e) => X(i, $(e));
16
+ var R = (i, e, t) => e.has(i) || D("Cannot " + t);
17
+ var a = (i, e, t) => (R(i, e, "read from private field"), t ? t.call(i) : e.get(i)), u = (i, e, t) => e.has(i) ? D("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), d = (i, e, t, l) => (R(i, e, "write to private field"), l ? l.call(i, t) : e.set(i, t), t);
18
+ var q = (i, e, t, l) => ({
19
+ set _(m) {
20
+ d(i, e, m, t);
21
+ },
22
+ get _() {
23
+ return a(i, e, l);
24
+ }
25
+ });
26
+ var I = (i, e, t) => new Promise((l, m) => {
27
+ var n = (s) => {
28
+ try {
29
+ h(t.next(s));
30
+ } catch (g) {
31
+ m(g);
32
+ }
33
+ }, f = (s) => {
34
+ try {
35
+ h(t.throw(s));
36
+ } catch (g) {
37
+ m(g);
38
+ }
39
+ }, h = (s) => s.done ? l(s.value) : Promise.resolve(s.value).then(n, f);
40
+ h((t = t.apply(i, e)).next());
41
+ });
42
+ import { Cache as J } from "../cache/index.js";
43
+ import { History as K } from "../history/index.js";
44
+ import { L as N } from "../LocalLinks-TQkTpAMx.js";
45
+ import { P as Q } from "../PageAnnouncerElement-sfh0_4vl.js";
46
+ import { P as W } from "../PageScroll-cQ3B5-6N.js";
47
+ import { d as V } from "../events-CsVF98U6.js";
48
+ import { m as F } from "../morph-BQErz7qP.js";
49
+ import "construct-style-sheets-polyfill";
50
+ import "../index-LReFyN6i.js";
51
+ import { a as Y, n as Z, b as _ } from "../url-DAl-mgbC.js";
52
+ var P, k, r, o, S, w, v, b;
53
+ const y = class y {
54
+ constructor(e) {
55
+ u(this, P, new J());
56
+ u(this, k, new DOMParser());
57
+ u(this, r, null);
58
+ u(this, o, null);
59
+ u(this, S, null);
60
+ u(this, w, null);
61
+ u(this, v, null);
62
+ u(this, b, 0);
63
+ y.instance || (y.instance = this, d(this, r, M(E({}, e), {
64
+ base: Y(e == null ? void 0 : e.base)
65
+ })), d(this, v, new Q()), d(this, o, new W(a(this, r).scrollSelector)), a(this, o).update(), d(this, S, new N({
66
+ base: a(this, r).base,
67
+ trailingSlash: a(this, r).trailingSlash,
68
+ includeAnchor: e == null ? void 0 : e.includeAnchor,
69
+ onClick: (t, l) => {
70
+ try {
71
+ this.navigate(t, l);
72
+ } catch (m) {
73
+ window.location.assign(t);
74
+ }
75
+ }
76
+ })), a(this, S).update(), d(this, w, new K({
77
+ onPop: (t) => {
78
+ this.navigate(t);
79
+ }
80
+ })));
81
+ }
82
+ history() {
83
+ return a(this, w);
84
+ }
85
+ get scroll() {
86
+ return a(this, o);
87
+ }
88
+ navigate(e, t) {
89
+ return I(this, null, function* () {
90
+ var g, p, x, L, T, U, B, C;
91
+ const l = a(this, w).isBack, m = ++q(this, b)._;
92
+ let n = Z(e, {
93
+ base: a(this, r).base,
94
+ trailingSlash: a(this, r).trailingSlash
95
+ });
96
+ a(this, r).urlModifier && (n = a(this, r).urlModifier(n));
97
+ let f = a(this, P).get(n.toString());
98
+ if ((!f || t != null && t.revalidate) && (f = yield fetch(`${n}`, {
99
+ headers: {
100
+ "X-SPA": "true"
101
+ }
102
+ }).then((c) => c.text()).catch(() => {
103
+ window.location.assign(n);
104
+ })), !f || (t != null && t.cache && a(this, P).set(n.toString(), f), a(this, b) !== m))
105
+ return;
106
+ l || (a(this, w).push(n), ((g = t == null ? void 0 : t.keepScrollPosition) == null || g) && a(this, o).element.scrollTo({ top: 0, behavior: "instant" }));
107
+ const h = a(this, k).parseFromString(f, "text/html");
108
+ if (_(h, n), yield (x = (p = a(this, r)).beforeDiff) == null ? void 0 : x.call(p, h), a(this, b) !== m)
109
+ return;
110
+ V(document, "spaBeforeUpdate", {
111
+ custom: !0
112
+ });
113
+ let s = (L = h.querySelector("title")) == null ? void 0 : L.textContent;
114
+ if (s)
115
+ document.title = s;
116
+ else {
117
+ const c = document.querySelector("h1");
118
+ s = (U = (T = c == null ? void 0 : c.innerText) != null ? T : c == null ? void 0 : c.textContent) != null ? U : n.pathname;
119
+ }
120
+ a(this, v).create(h, s), a(this, r).viewTransition && document.startViewTransition ? yield document.startViewTransition(() => F(document, h)).finished : yield F(document, h), a(this, o).update(), a(this, S).update(), a(this, v).done(), yield (C = (B = a(this, r)).afterDiff) == null ? void 0 : C.call(B), V(document, "spaAfterUpdate", {
121
+ custom: !0
122
+ });
123
+ });
124
+ }
125
+ };
126
+ P = new WeakMap(), k = new WeakMap(), r = new WeakMap(), o = new WeakMap(), S = new WeakMap(), w = new WeakMap(), v = new WeakMap(), b = new WeakMap(), y.instance = null;
127
+ let H = y;
128
+ export {
129
+ H as SPA
130
+ };
@@ -1,6 +1,6 @@
1
- import { S as s, a as o, s as a } from "../Store-BtVtCGLk.js";
2
- import { C as i, D as m, R as p } from "../Composed-BB1MtFiT.js";
3
- import { D as d } from "../DerivedArray-D3scYQdp.js";
1
+ import { S as s, a as o, s as a } from "../Store-CgQ3ReoB.js";
2
+ import { C as i, D as m, R as p } from "../Composed-DtS09lSU.js";
3
+ import { D as d } from "../DerivedArray-DG9iR0mf.js";
4
4
  export {
5
5
  i as Composed,
6
6
  m as Derived,
@@ -1,5 +1,5 @@
1
1
  import "construct-style-sheets-polyfill";
2
- import { i as s } from "./index-JqYHGoo6.js";
2
+ import { i as s } from "./index-LReFyN6i.js";
3
3
  import { c as i } from "./string-BlMQbe8b.js";
4
4
  function n(t) {
5
5
  let e = "";
@@ -3,8 +3,8 @@ var B = (h) => {
3
3
  };
4
4
  var x = (h, s, e) => s.has(h) || B("Cannot " + e);
5
5
  var i = (h, s, e) => (x(h, s, "read from private field"), e ? e.call(h) : s.get(h)), r = (h, s, e) => s.has(h) ? B("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(h) : s.set(h, e), t = (h, s, e, n) => (x(h, s, "write to private field"), n ? n.call(h, e) : s.set(h, e), e), A = (h, s, e) => (x(h, s, "access private method"), e);
6
- import { i as I } from "../index-JqYHGoo6.js";
7
- import { g as C } from "../dom-fgxIeFxm.js";
6
+ import { i as I } from "../index-LReFyN6i.js";
7
+ import { g as C } from "../dom-BIeVMHfK.js";
8
8
  import "construct-style-sheets-polyfill";
9
9
  var g, m, v, k, u, b, w, l, f, F, L;
10
10
  class D {
@@ -0,0 +1 @@
1
+ "use strict";var y=Object.defineProperty,$=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var m=(t,e,r)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&m(t,r,e[r]);if(p)for(var r of p(e))W.call(e,r)&&m(t,r,e[r]);return t},g=(t,e)=>$(t,w(e));function z(t,{base:e="",trailingSlash:r=!1,mergeParams:s,removeParams:n}={}){e=e.endsWith("/")?e.slice(0,-1):e,t=t.replace(e,""),t.startsWith("/")&&(t=t.slice(1));const i=t.split("#"),l=i[0].split("?");let a=l[0].startsWith("/")?l[0]:"/"+l[0];r?a=!a.endsWith("/")&&a!=="/"?a+"/":a:a=a.endsWith("/")&&a!=="/"?a.slice(0,-1):a;let c=l[1]||"";if(s){const o=new URLSearchParams(c),U=new URLSearchParams(s);for(const[h,d]of U)o.has(h)||o.set(h,d);n==null||n.split(",").forEach(h=>{o.has(h)&&o.delete(h)}),c=o.toString()}const u=e+a,f=i[1],R=`${u}${c?"?"+c:""}${f?"#"+f:""}`;return{leaf:a,pathname:u,parameters:c,hash:f,path:R}}function A(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function E(t){if(t.action==="none")return;const e=t==null?void 0:t.searchParameters,r=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",s=e?e.startsWith("?")?e:"?"+e:"",n=`${t.pathname}${s}${r}`,i=g(S({},t.state),{path:n});t.action==="push"?history.pushState(i,"",n):t.action==="replace"&&history.replaceState(i,"",n)}function k(t){const e=new URLSearchParams(t),r={};for(const[s,n]of e)r[s]=n;return r}function q(t,e){const r=new URL(location.href),s=(e==null?void 0:e.toString())||"";r.searchParams.set(t,s),history.replaceState(history.state,"",r.href)}function L(t,e,r){t.setAttribute(e,new URL(t.getAttribute(e),r).pathname)}function B(t,e){t.querySelectorAll('[href^="./"], [href^="../"]').forEach(r=>L(r,"href",e)),t.querySelectorAll('[src^="./"], [src^="../"]').forEach(r=>L(r,"src",e))}function H(t,{base:e="",trailingSlash:r=!1}={}){e=e.replace(/^\/|\/$/g,"");const s=typeof t=="string"?t.replace(/^\/|\/$/g,""):t.pathname.replace(/^\/|\/$/g,"");let n="";return s.includes(e)?n=`/${s}`:n=`${e}/${s}`,r&&!n.endsWith("/")&&(n+="/"),new URL(n,location.origin)}function j(t){try{const e=new URL(t);if(window.location.origin===e.origin)return e.pathname===window.location.pathname?!e.hash:!0}catch(e){}return!1}exports.changeHistory=E;exports.isLocalUrl=j;exports.normalizeBase=A;exports.normalizeRelativeURLs=B;exports.normalizeURL=H;exports.parseSearchParameters=k;exports.splitPath=z;exports.updateSearchParameter=q;
@@ -0,0 +1,97 @@
1
+ var L = Object.defineProperty, R = Object.defineProperties;
2
+ var U = Object.getOwnPropertyDescriptors;
3
+ var p = Object.getOwnPropertySymbols;
4
+ var W = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
5
+ var g = (t, e, s) => e in t ? L(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, S = (t, e) => {
6
+ for (var s in e || (e = {}))
7
+ W.call(e, s) && g(t, s, e[s]);
8
+ if (p)
9
+ for (var s of p(e))
10
+ P.call(e, s) && g(t, s, e[s]);
11
+ return t;
12
+ }, $ = (t, e) => R(t, U(e));
13
+ function E(t, {
14
+ base: e = "",
15
+ trailingSlash: s = !1,
16
+ mergeParams: r,
17
+ removeParams: n
18
+ } = {}) {
19
+ e = e.endsWith("/") ? e.slice(0, -1) : e, t = t.replace(e, ""), t.startsWith("/") && (t = t.slice(1));
20
+ const i = t.split("#"), f = i[0].split("?");
21
+ let a = f[0].startsWith("/") ? f[0] : "/" + f[0];
22
+ s ? a = !a.endsWith("/") && a !== "/" ? a + "/" : a : a = a.endsWith("/") && a !== "/" ? a.slice(0, -1) : a;
23
+ let c = f[1] || "";
24
+ if (r) {
25
+ const o = new URLSearchParams(c), w = new URLSearchParams(r);
26
+ for (const [h, y] of w)
27
+ o.has(h) || o.set(h, y);
28
+ n == null || n.split(",").forEach((h) => {
29
+ o.has(h) && o.delete(h);
30
+ }), c = o.toString();
31
+ }
32
+ const u = e + a, l = i[1], m = `${u}${c ? "?" + c : ""}${l ? "#" + l : ""}`;
33
+ return {
34
+ leaf: a,
35
+ pathname: u,
36
+ parameters: c,
37
+ hash: l,
38
+ path: m
39
+ };
40
+ }
41
+ function k(t = "/") {
42
+ return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
43
+ }
44
+ function q(t) {
45
+ if (t.action === "none")
46
+ return;
47
+ const e = t == null ? void 0 : t.searchParameters, s = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", r = e ? e.startsWith("?") ? e : "?" + e : "", n = `${t.pathname}${r}${s}`, i = $(S({}, t.state), { path: n });
48
+ t.action === "push" ? history.pushState(i, "", n) : t.action === "replace" && history.replaceState(i, "", n);
49
+ }
50
+ function x(t) {
51
+ const e = new URLSearchParams(t), s = {};
52
+ for (const [r, n] of e)
53
+ s[r] = n;
54
+ return s;
55
+ }
56
+ function j(t, e) {
57
+ const s = new URL(location.href), r = (e == null ? void 0 : e.toString()) || "";
58
+ s.searchParams.set(t, r), history.replaceState(history.state, "", s.href);
59
+ }
60
+ function d(t, e, s) {
61
+ t.setAttribute(e, new URL(t.getAttribute(e), s).pathname);
62
+ }
63
+ function B(t, e) {
64
+ t.querySelectorAll('[href^="./"], [href^="../"]').forEach(
65
+ (s) => d(s, "href", e)
66
+ ), t.querySelectorAll('[src^="./"], [src^="../"]').forEach(
67
+ (s) => d(s, "src", e)
68
+ );
69
+ }
70
+ function H(t, {
71
+ base: e = "",
72
+ trailingSlash: s = !1
73
+ } = {}) {
74
+ e = e.replace(/^\/|\/$/g, "");
75
+ const r = typeof t == "string" ? t.replace(/^\/|\/$/g, "") : t.pathname.replace(/^\/|\/$/g, "");
76
+ let n = "";
77
+ return r.includes(e) ? n = `/${r}` : n = `${e}/${r}`, s && !n.endsWith("/") && (n += "/"), new URL(n, location.origin);
78
+ }
79
+ function O(t) {
80
+ try {
81
+ const e = new URL(t);
82
+ if (window.location.origin === e.origin)
83
+ return e.pathname === window.location.pathname ? !e.hash : !0;
84
+ } catch (e) {
85
+ }
86
+ return !1;
87
+ }
88
+ export {
89
+ k as a,
90
+ B as b,
91
+ q as c,
92
+ O as i,
93
+ H as n,
94
+ x as p,
95
+ E as s,
96
+ j as u
97
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),E=require("../index-CKTweR3M.cjs"),h=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../custom-elements-Dh4TWRDJ.cjs"),d=require("../dom-hTEdqeoj.cjs"),s=require("../easings-GegIwET5.cjs"),Q=require("../element-yhcBhsho.cjs"),R=require("../events-KVanG9sR.cjs"),O=require("../file-DSpfWdd9.cjs"),S=require("../function-MthRj-GJ.cjs"),A=require("../gestures-C7gbKx11.cjs"),v=require("../stylesheet-BcwbfhBp.cjs"),g=require("../layout-Ctc2p3uz.cjs"),a=require("../math-GDWEqu7y.cjs"),f=require("../number-ChAm68cm.cjs"),c=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),P=require("../scroll-DxcPU0vk.cjs"),l=require("../string-DUXXtU8v.cjs"),q=require("../style-At6aDoqG.cjs"),p=require("../url-CoUSEREU.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function N(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const i=(r+e)%n;o[i]=t[r]}return o}function z(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,i)).toFixed(o))} ${r[i]}`}function j(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function M(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function V(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function k(t,e){let n=!1;const{x:o,y:r}=t;for(let i=0,u=e.length-1;i<e.length;u=i++){const b=e[i].x,m=e[i].y,y=e[u].x,I=e[u].y;m>r!=I>r&&o<(y-b)*(r-m)/(I-m)+b&&(n=!n)}return n}function w(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?w(t,o.slice(4,-1)):o}}function F(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const i=w(o,r);i&&(e[r]=i)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function $(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function H(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}const U=/^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/,K=/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;function W(t){let e,n;return K.test(t)?(e=`mailto:${t.trim()}`,n="email"):U.test(t)&&(e=`tel:${t.replace(/[^0-9\\.\\+]+/g,"")}`,n="phone"),{href:e,type:n,contact:t}}function Z(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function J(t,e,n,o){let r,i=!1,u=0;const b=()=>{clearInterval(r),o!=null&&o.restartCounter&&(u=0),i&&(r=setInterval(()=>{n(u++)},e))},m=E.intersector.subscribe(t,y=>{i=y.isIntersecting,b()});return()=>{m(),clearInterval(r)}}exports.parseAttribute=x.parseAttribute;exports.parseAttributeValue=x.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=h.contain;exports.cover=h.cover;exports.fixPosition=h.fixPosition;exports.measureText=h.measureText;exports.getPointerPosition=C.getPointerPosition;exports.normalize=C.normalize;exports.screenToCartesian=C.screenToCartesian;exports.whenDefined=D.whenDefined;exports.findParentElement=d.findParentElement;exports.findScrollParentElement=d.findScrollParentElement;exports.getAllParentElements=d.getAllParentElements;exports.getElement=d.getElement;exports.traverseNodes=d.traverseNodes;exports.traverseShadowRoots=d.traverseShadowRoots;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.isElementVisible=Q.isElementVisible;exports.dispatchEvent=R.dispatchEvent;exports.createJSONAndSave=O.createJSONAndSave;exports.downloadURI=O.downloadURI;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=A.setupDrag;exports.createStylesheet=v.createStylesheet;exports.styleToString=v.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.getStickyOffset=g.getStickyOffset;exports.calculateDistance=a.calculateDistance;exports.calculateDistanceWithRadius=a.calculateDistanceWithRadius;exports.clamp=a.clamp;exports.damp=a.damp;exports.lerp=a.lerp;exports.mapRange=a.mapRange;exports.round=a.round;exports.smootherstep=a.smootherstep;exports.smoothstep=a.smoothstep;exports.step=a.step;exports.beautifyNumber=f.beautifyNumber;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=P.scrollToElement;exports.wait=P.wait;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.declension=l.declension;exports.decodeHtmlEntities=l.decodeHtmlEntities;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=q.getElementTransitionDurationMS;exports.getElementTransitionDurationS=q.getElementTransitionDurationS;exports.changeHistory=p.changeHistory;exports.normalizeBase=p.normalizeBase;exports.parseSearchParameters=p.parseSearchParameters;exports.splitPath=p.splitPath;exports.updateSearchParameter=p.updateSearchParameter;exports.cloneTemplateContent=Z;exports.copyTextToClipboard=j;exports.decode=H;exports.dotCircleCollision=V;exports.dotPolygonCollision=k;exports.dotRectCollision=M;exports.encode=$;exports.formatBytes=z;exports.getRootVariables=F;exports.insert=B;exports.setIntervalOnIntersection=J;exports.shiftArray=N;exports.tryCreateHrefFromContact=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../attributes-Bf2svn4j.cjs"),y=require("../index-CKTweR3M.cjs"),C=require("../canvas-CU5Xjahf.cjs"),b=require("../coordinates-D8Np3cPD.cjs"),v=require("../custom-elements-Dh4TWRDJ.cjs"),f=require("../dom-hTEdqeoj.cjs"),s=require("../easings-GegIwET5.cjs"),D=require("../element-yhcBhsho.cjs"),q=require("../events-KVanG9sR.cjs"),N=require("../file-DSpfWdd9.cjs"),P=require("../function-MthRj-GJ.cjs"),w=require("../gestures-C7gbKx11.cjs"),A=require("../stylesheet-BcwbfhBp.cjs"),O=require("../layout-Ctc2p3uz.cjs"),l=require("../math-GDWEqu7y.cjs"),M=require("../metadata-BcYZ5w3T.cjs"),a=require("../morph-B6sGhLCi.cjs"),p=require("../number-ChAm68cm.cjs"),u=require("../object-baN9pgbU.cjs"),S=require("../polyfills-Df4r-ETT.cjs"),R=require("../scroll-DxcPU0vk.cjs"),c=require("../string-DUXXtU8v.cjs"),x=require("../style-At6aDoqG.cjs"),d=require("../url-CPgw9bd5.cjs");function Q(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function B(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const i=(r+e)%n;o[i]=t[r]}return o}function U(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,i)).toFixed(o))} ${r[i]}`}function z(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function V(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function L(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function j(t,e){let n=!1;const{x:o,y:r}=t;for(let i=0,m=e.length-1;i<e.length;m=i++){const T=e[i].x,E=e[i].y,h=e[m].x,g=e[m].y;E>r!=g>r&&o<(h-T)*(r-E)/(g-E)+T&&(n=!n)}return n}function _(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?_(t,o.slice(4,-1)):o}}function Y(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const i=_(o,r);i&&(e[r]=i)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function k(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function F(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}const $=/^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/,H=/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;function K(t){let e,n;return H.test(t)?(e=`mailto:${t.trim()}`,n="email"):$.test(t)&&(e=`tel:${t.replace(/[^0-9\\.\\+]+/g,"")}`,n="phone"),{href:e,type:n,contact:t}}function W(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function Z(t,e,n,o){let r,i=!1,m=0;const T=()=>{clearInterval(r),o!=null&&o.restartCounter&&(m=0),i&&(r=setInterval(()=>{n(m++)},e))},E=y.intersector.subscribe(t,h=>{i=h.isIntersecting,T()});return()=>{E(),clearInterval(r)}}exports.parseAttribute=I.parseAttribute;exports.parseAttributeValue=I.parseAttributeValue;exports.isBrowser=y.isBrowser;exports.contain=C.contain;exports.cover=C.cover;exports.fixPosition=C.fixPosition;exports.measureText=C.measureText;exports.getPointerPosition=b.getPointerPosition;exports.normalize=b.normalize;exports.screenToCartesian=b.screenToCartesian;exports.whenDefined=v.whenDefined;exports.findParentElement=f.findParentElement;exports.findScrollParentElement=f.findScrollParentElement;exports.getAllParentElements=f.getAllParentElements;exports.getElement=f.getElement;exports.traverseNodes=f.traverseNodes;exports.traverseShadowRoots=f.traverseShadowRoots;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.isElementVisible=D.isElementVisible;exports.dispatchEvent=q.dispatchEvent;exports.createJSONAndSave=N.createJSONAndSave;exports.downloadURI=N.downloadURI;exports.debounce=P.debounce;exports.throttle=P.throttle;exports.setupDrag=w.setupDrag;exports.createStylesheet=A.createStylesheet;exports.styleToString=A.styleToString;exports.getCumulativeOffsetLeft=O.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=O.getCumulativeOffsetTop;exports.getCumulativePosition=O.getCumulativePosition;exports.getStickyOffset=O.getStickyOffset;exports.calculateDistance=l.calculateDistance;exports.calculateDistanceWithRadius=l.calculateDistanceWithRadius;exports.clamp=l.clamp;exports.damp=l.damp;exports.lerp=l.lerp;exports.mapRange=l.mapRange;exports.round=l.round;exports.smootherstep=l.smootherstep;exports.smoothstep=l.smoothstep;exports.step=l.step;exports.formatMediaDuration=M.formatMediaDuration;exports.ACTION_CREATE=a.ACTION_CREATE;exports.ACTION_PRESERVE=a.ACTION_PRESERVE;exports.ACTION_REMOVE=a.ACTION_REMOVE;exports.ACTION_REMOVE_ATTR=a.ACTION_REMOVE_ATTR;exports.ACTION_REPLACE=a.ACTION_REPLACE;exports.ACTION_SET_ATTR=a.ACTION_SET_ATTR;exports.ACTION_SKIP=a.ACTION_SKIP;exports.ACTION_UPDATE=a.ACTION_UPDATE;exports.NODE_TYPE_COMMENT=a.NODE_TYPE_COMMENT;exports.NODE_TYPE_DOCUMENT=a.NODE_TYPE_DOCUMENT;exports.NODE_TYPE_ELEMENT=a.NODE_TYPE_ELEMENT;exports.NODE_TYPE_TEXT=a.NODE_TYPE_TEXT;exports.diff=a.diff;exports.morph=a.morph;exports.patch=a.patch;exports.beautifyNumber=p.beautifyNumber;exports.loopNumber=p.loopNumber;exports.preciseNumber=p.preciseNumber;exports.roundNumberTo=p.roundNumberTo;exports.toStep=p.toStep;exports.cloneDeep=u.cloneDeep;exports.compareObjects=u.compareObjects;exports.isESClass=u.isESClass;exports.isNullish=u.isNullish;exports.isObject=u.isObject;exports.mergeDeep=u.mergeDeep;exports.mixin=u.mixin;exports.omit=u.omit;exports.pick=u.pick;exports.nullishCoalescing=S.nullishCoalescing;exports.requestIdleCallback=S.requestIdleCallback;exports.scrollToElement=R.scrollToElement;exports.wait=R.wait;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.declension=c.declension;exports.decodeHtmlEntities=c.decodeHtmlEntities;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=x.getElementTransitionDurationMS;exports.getElementTransitionDurationS=x.getElementTransitionDurationS;exports.changeHistory=d.changeHistory;exports.isLocalUrl=d.isLocalUrl;exports.normalizeBase=d.normalizeBase;exports.normalizeRelativeURLs=d.normalizeRelativeURLs;exports.normalizeURL=d.normalizeURL;exports.parseSearchParameters=d.parseSearchParameters;exports.splitPath=d.splitPath;exports.updateSearchParameter=d.updateSearchParameter;exports.cloneTemplateContent=W;exports.copyTextToClipboard=z;exports.decode=F;exports.dotCircleCollision=L;exports.dotPolygonCollision=j;exports.dotRectCollision=V;exports.encode=k;exports.formatBytes=U;exports.getRootVariables=Y;exports.insert=Q;exports.setIntervalOnIntersection=Z;exports.shiftArray=B;exports.tryCreateHrefFromContact=K;
@@ -20,6 +20,8 @@ export * from './href';
20
20
  export * from './jss';
21
21
  export * from './layout';
22
22
  export * from './math';
23
+ export * from './metadata';
24
+ export * from './morph';
23
25
  export * from './number';
24
26
  export * from './object';
25
27
  export * from './polyfills';