@qratilabs/qrati-connect 2.28.1 → 2.29.1

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 (81) hide show
  1. package/element/-yT__8Qm.js +1 -0
  2. package/element/2UMuxiHx.js +2 -0
  3. package/element/4cGOeNKJ.js +7 -0
  4. package/element/4oHgfxjP.js +8 -0
  5. package/element/{CxJgMv2R.js → 5bOrOtEp.js} +1 -1
  6. package/element/{CKwlnGWW2.js → 7IEzYICH2.js} +1 -1
  7. package/element/{B01ceTPt.js → BJc3_IFY.js} +1 -1
  8. package/element/{5z04gCoQ2.js → BK-Qpeej2.js} +2 -2
  9. package/element/{BB90a5r62.js → BLIWjoo02.js} +4 -4
  10. package/element/BMqLaOlf.js +1 -0
  11. package/element/{C6et9sp52.js → BOx0cQps2.js} +1 -1
  12. package/element/BXMw4kNf.js +1 -0
  13. package/element/Bb9ydqSB.js +1 -0
  14. package/element/{Bgw9OUdR.js → Bm8666WE.js} +1 -1
  15. package/element/Bo2w_JaR.js +1 -0
  16. package/element/BrPNl7T5.js +7 -0
  17. package/element/{CZK4LCzr2.js → BxAzHKo-2.js} +2 -2
  18. package/element/{D35mTuTT.js → BxZobjC-.js} +1 -1
  19. package/element/{CAETItHr.js → C0eP2utz.js} +1 -1
  20. package/element/{CBLQRRGX2.js → C2WFktw12.js} +1 -1
  21. package/element/{CfTxXwtG2.js → C2ksbxMB2.js} +10 -10
  22. package/element/CC-zPRPh.js +17 -0
  23. package/element/{CFnGGYmq.js → CDSgxlAB.js} +1 -1
  24. package/element/{Da7cHmvl.js → CHZkFcYR.js} +3 -3
  25. package/element/{D34k0bDj2.js → CIcQE2CN2.js} +1 -1
  26. package/element/{Rcen6i0h.js → CTikdrXC.js} +1 -1
  27. package/element/CUXN8AXD2.js +2 -0
  28. package/element/CX_8g_6z.js +85 -0
  29. package/element/C_Ur_JpP.js +5 -0
  30. package/element/CeXZmrQu.js +4 -0
  31. package/element/{DBlhTxUx2.js → CgDpKQkL2.js} +4 -4
  32. package/element/{DtqQWU6q2.js → CirXBSjF2.js} +15 -15
  33. package/element/{77CTD63x.js → CrmNzHcR.js} +1 -1
  34. package/element/{DtcmI8yd2.js → CsXYImrD2.js} +1 -1
  35. package/element/{1UqTmSK2.js → D1FCdk40.js} +1 -1
  36. package/element/{DlRUi0u42.js → D2-DJv4T2.js} +1 -1
  37. package/element/D29TjIxe2.js +9 -0
  38. package/element/{BMibcq6T.js → DDcMOfts.js} +1 -1
  39. package/element/{JFF45CMp.js → DFN3BTNf.js} +1 -1
  40. package/element/{KdgQ7jUn.js → DKNkaohw.js} +1 -1
  41. package/element/{N4HKgEC52.js → DMnbtDXS2.js} +1 -1
  42. package/element/{BsYbcfkG.js → DXjc6xIy.js} +1 -1
  43. package/element/{BdQrGBTf.js → DYkEsdph.js} +1 -1
  44. package/element/{CLV9vt29.js → DaRDxhWU.js} +1 -1
  45. package/element/{BHmNrbtm2.js → DeK1vU3V2.js} +1 -1
  46. package/element/{CtApMHPf.js → DkC6kDkj.js} +1 -1
  47. package/element/{DPg_DKOi.js → Dl6jcv9I.js} +1 -1
  48. package/element/DsU4DxSM.js +3 -0
  49. package/element/Dstt_bTH.js +2 -0
  50. package/element/{CrF08YS6.js → DtE36mUY.js} +1 -1
  51. package/element/{BhOaopIk2.js → DuD5AV1D2.js} +3 -3
  52. package/element/{C8ixb9k4.js → HZ-pN9la.js} +1 -1
  53. package/element/{DGGc10Cy.js → JY9kGm742.js} +1 -1
  54. package/element/{BMcQNiLL.js → R0EfjB8a.js} +4 -4
  55. package/element/V_AyEifr2.js +5 -0
  56. package/element/{CZ9iaxjO2.js → fQmLbYcp2.js} +1 -1
  57. package/element/ob_CTelx.js +1 -0
  58. package/element/sqfBNWKt.js +1 -0
  59. package/element/web.es.js +41 -40
  60. package/element/xvMv72y9.js +41 -0
  61. package/package.json +1 -1
  62. package/element/2PuRbItp.js +0 -8
  63. package/element/3uWxzKri.js +0 -87
  64. package/element/7zeKIiiL.js +0 -1
  65. package/element/B7YFs6p5.js +0 -1
  66. package/element/BcAwTWQC.js +0 -5
  67. package/element/C6ph3KPL.js +0 -5
  68. package/element/CL_evx_l.js +0 -1
  69. package/element/CpYO5bBq.js +0 -3
  70. package/element/Cr4OmKxk2.js +0 -2
  71. package/element/DUEaNsCB.js +0 -1
  72. package/element/DUWOb-5c.js +0 -1
  73. package/element/DZwpw1jG.js +0 -1
  74. package/element/DlNQukHq.js +0 -3
  75. package/element/DmVgPRH5.js +0 -14
  76. package/element/DrrpB4Om.js +0 -1
  77. package/element/X0P7ujR0.js +0 -4
  78. package/element/cePYhOkN2.js +0 -5
  79. package/element/hiapcVVA2.js +0 -5
  80. package/element/tJ2MS5HS.js +0 -41
  81. package/element/vA5CQmOb2.js +0 -9
@@ -0,0 +1,5 @@
1
+ import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as c,y as l}from"./BXMw4kNf.js";import{i as u}from"./xvMv72y9.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}canGoBack(){return this.index>0}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;appPushCount=0;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.appPushCount+=1,this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){this.appPushCount=Math.max(0,this.appPushCount+t),window.history.go(t)}canGoBack(){return this.appPushCount>0}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=l(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=l(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=l(h);if(!t)throw new Error("useCanGoBack must be used inside a Router");return t.canGoBack}function v(){const t=l(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function g(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function k(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function C(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:k(n,s.path);if(s.children&&s.children.length>0){const n=g(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=C(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=g(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function x({mode:t,initialPath:e,children:c}){const l=s("memory"===t?new d(e):new f),[u,p]=r(l.current.location),[m,w]=r(l.current.state),[y,v]=r(l.current.canGoBack());n(()=>(p(l.current.location),w(l.current.state),v(l.current.canGoBack()),l.current.listen(t=>{p(t),w(l.current.state),v(l.current.canGoBack())})),[]);const g=o((t,e)=>{const n=l.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),k=o(t=>{l.current.go(t)},[]),C=i(()=>({location:u,state:m,navigate:g,go:k,canGoBack:y,mode:t}),[u,m,g,k,y,t]);/* @__PURE__ */
2
+ return a(h.Provider,{value:C,children:c})}function E(t){return null}function B(t){return e(t).filter(t=>t?.type===E).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?B(t.props.children):void 0}))}function _({children:t}){const{location:n}=l(h),r=s([]),o=e(t).filter(t=>t?.type===E).map(t=>t.props.path).join("\0"),u=s("");o!==u.current&&(u.current=o,r.current=B(t));const d=r.current,f=i(()=>C(n,d),[n,d]),m=i(()=>(f??[]).reduce((t,e)=>({...t,...e.params}),{}),[f]),w=i(()=>{if(!f)return null;let t=null;for(let e=f.length-1;e>=0;e--){const n=f[e].route.element;t=/* @__PURE__ */a(p.Provider,{value:{params:m,outlet:t},children:/* @__PURE__ */a(n,{})})}return t},[f,m]);return f?/* @__PURE__ */a(c,{children:w}):null}function P(){/* @__PURE__ */
3
+ return a(c,{children:l(p)?.outlet})}function G({to:t,state:e,replace:n,children:s,className:r,onClick:i,...c}){const u=l(h);/* @__PURE__ */
4
+ return a("a",{href:t,onClick:o(s=>{s.preventDefault(),i?.(s),u?.navigate(t,{state:e,replace:n})},[u,t,e,n,i]),className:r,...c,children:s})}function b({to:t,state:e,replace:n,children:s,className:r,activeClassName:c,onClick:p,...d}){const f=l(h),m=i(()=>{if(!f)return!1;const e=f.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[f?.location,t]);/* @__PURE__ */
5
+ return a("a",{href:t,onClick:o(s=>{s.preventDefault(),p?.(s),f?.navigate(t,{state:e,replace:n})},[f,t,e,n,p]),className:"function"==typeof r?r({isActive:m}):u(r,m&&c),...d,children:s})}function N({to:t,state:e,replace:s}){const r=w();return n(()=>{queueMicrotask(()=>{r(t,{state:e,replace:s})})},[r,t,e,s]),null}export{E as a,y as c,m as d,P as i,v as l,b as n,x as o,N as r,_ as s,G as t,w as u};