@pod-os/elements 0.26.1-rc.e49d800.0 → 0.27.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 (151) hide show
  1. package/dist/cjs/{BrokenFile-26f83028.js → BrokenFile-a5fc0832.js} +22 -6
  2. package/dist/cjs/BrokenFile-a5fc0832.js.map +1 -0
  3. package/dist/cjs/app-globals-97a7ec18.js +23 -0
  4. package/dist/cjs/app-globals-97a7ec18.js.map +1 -0
  5. package/dist/cjs/elements.cjs.js +2 -2
  6. package/dist/cjs/ion-badge_5.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-icon_32.cjs.entry.js +9150 -0
  8. package/dist/cjs/ion-icon_32.cjs.entry.js.map +1 -0
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  11. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  12. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  13. package/dist/cjs/pos-document.cjs.entry.js +1 -1
  14. package/dist/collection/apps/pos-app-browser/pos-app-browser.js +2 -1
  15. package/dist/collection/apps/pos-app-browser/pos-app-browser.js.map +1 -1
  16. package/dist/collection/apps/pos-app-dashboard/pos-app-dashboard.js +1 -1
  17. package/dist/collection/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.js +1 -1
  18. package/dist/collection/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.js +1 -1
  19. package/dist/collection/apps/pos-app-generic/pos-app-generic.js +1 -1
  20. package/dist/collection/apps/pos-app-ldp-container/pos-app-ldp-container.js +1 -1
  21. package/dist/collection/apps/pos-app-rdf-document/pos-app-rdf-document.js +1 -1
  22. package/dist/collection/apps/pos-app-settings/pos-app-settings.js +1 -1
  23. package/dist/collection/apps/pos-app-settings/pos-setting-offline-cache/pos-setting-offline-cache.js +1 -1
  24. package/dist/collection/collection-manifest.json +1 -0
  25. package/dist/collection/components/pos-add-new-thing/pos-add-new-thing.js +1 -1
  26. package/dist/collection/components/pos-app/pos-app.js +1 -1
  27. package/dist/collection/components/pos-dialog/pos-dialog.js +15 -5
  28. package/dist/collection/components/pos-dialog/pos-dialog.js.map +1 -1
  29. package/dist/collection/components/pos-error-toast/pos-error-toast.js +1 -1
  30. package/dist/collection/components/pos-literals/pos-literals.js +1 -1
  31. package/dist/collection/components/pos-login/pos-login.js +21 -2
  32. package/dist/collection/components/pos-login/pos-login.js.map +1 -1
  33. package/dist/collection/components/pos-login-form/pos-login-form.js +1 -1
  34. package/dist/collection/components/pos-make-findable/pos-make-findable.css +2 -55
  35. package/dist/collection/components/pos-make-findable/pos-make-findable.js +15 -26
  36. package/dist/collection/components/pos-make-findable/pos-make-findable.js.map +1 -1
  37. package/dist/collection/components/pos-make-findable/shoelace.js +4 -0
  38. package/dist/collection/components/pos-make-findable/shoelace.js.map +1 -0
  39. package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.js +1 -1
  40. package/dist/collection/components/pos-navigation/pos-navigation.js +1 -1
  41. package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
  42. package/dist/collection/components/pos-picture/pos-picture.js +1 -1
  43. package/dist/collection/components/pos-picture/pos-picture.js.map +1 -1
  44. package/dist/collection/components/pos-rich-link/pos-rich-link.js +2 -2
  45. package/dist/collection/components/pos-router/pos-router.js +1 -1
  46. package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
  47. package/dist/collection/components/pos-user-menu/pos-user-menu.css +23 -0
  48. package/dist/collection/components/pos-user-menu/pos-user-menu.js +102 -0
  49. package/dist/collection/components/pos-user-menu/pos-user-menu.js.map +1 -0
  50. package/dist/collection/components/pos-user-menu/shoelace.js +6 -0
  51. package/dist/collection/components/pos-user-menu/shoelace.js.map +1 -0
  52. package/dist/collection/global.js +6 -0
  53. package/dist/collection/global.js.map +1 -1
  54. package/dist/components/chunk.HVTXQL7M.js +4775 -0
  55. package/dist/components/chunk.HVTXQL7M.js.map +1 -0
  56. package/dist/components/index.js +7 -0
  57. package/dist/components/index.js.map +1 -1
  58. package/dist/components/index11.js +21 -5
  59. package/dist/components/index11.js.map +1 -1
  60. package/dist/components/pos-add-new-thing2.js +1 -1
  61. package/dist/components/pos-app-browser.js +68 -61
  62. package/dist/components/pos-app-browser.js.map +1 -1
  63. package/dist/components/pos-app-dashboard2.js +1 -1
  64. package/dist/components/pos-app-generic.js +1 -1
  65. package/dist/components/pos-app-ldp-container.js +1 -1
  66. package/dist/components/pos-app-rdf-document.js +1 -1
  67. package/dist/components/pos-app-settings2.js +1 -1
  68. package/dist/components/pos-app2.js +1 -1
  69. package/dist/components/pos-dialog2.js +3 -3
  70. package/dist/components/pos-dialog2.js.map +1 -1
  71. package/dist/components/pos-error-toast2.js +1 -1
  72. package/dist/components/pos-example-resources2.js +1 -1
  73. package/dist/components/pos-getting-started2.js +1 -1
  74. package/dist/components/pos-literals2.js +1 -1
  75. package/dist/components/pos-login-form2.js +1 -1
  76. package/dist/components/pos-login2.js +16 -3
  77. package/dist/components/pos-login2.js.map +1 -1
  78. package/dist/components/pos-make-findable2.js +16 -21
  79. package/dist/components/pos-make-findable2.js.map +1 -1
  80. package/dist/components/pos-navigation-bar2.js +1 -1
  81. package/dist/components/pos-navigation2.js +1 -1
  82. package/dist/components/pos-new-thing-form2.js +1 -1
  83. package/dist/components/pos-picture2.js +1 -1
  84. package/dist/components/pos-picture2.js.map +1 -1
  85. package/dist/components/pos-rich-link2.js +2 -2
  86. package/dist/components/pos-router2.js +1 -1
  87. package/dist/components/pos-select-term2.js +1 -1
  88. package/dist/components/pos-setting-offline-cache2.js +1 -1
  89. package/dist/components/pos-user-menu.d.ts +11 -0
  90. package/dist/components/pos-user-menu.js +8 -0
  91. package/dist/components/pos-user-menu.js.map +1 -0
  92. package/dist/components/pos-user-menu2.js +293 -0
  93. package/dist/components/pos-user-menu2.js.map +1 -0
  94. package/dist/elements/elements.css +8 -2
  95. package/dist/elements/elements.esm.js +1 -1
  96. package/dist/elements/elements.esm.js.map +1 -1
  97. package/dist/elements/{p-650db824.entry.js → p-38edfa6d.entry.js} +2 -2
  98. package/dist/elements/p-61cd1259.js +2 -0
  99. package/dist/elements/p-61cd1259.js.map +1 -0
  100. package/dist/elements/p-74bdf05f.entry.js +652 -0
  101. package/dist/elements/p-74bdf05f.entry.js.map +1 -0
  102. package/dist/elements/p-93f5c8ec.js +2 -0
  103. package/dist/elements/p-93f5c8ec.js.map +1 -0
  104. package/dist/elements/p-b1de75a4.entry.js +2 -0
  105. package/dist/elements/{p-178b3852.entry.js → p-c466d5bf.entry.js} +2 -2
  106. package/dist/elements/{p-2cda3231.entry.js → p-dbb94429.entry.js} +2 -2
  107. package/dist/elements/p-ff684bff.entry.js +2 -0
  108. package/dist/esm/{BrokenFile-0b9882ef.js → BrokenFile-a47d9850.js} +22 -6
  109. package/dist/esm/BrokenFile-a47d9850.js.map +1 -0
  110. package/dist/esm/app-globals-fd9221d0.js +21 -0
  111. package/dist/esm/app-globals-fd9221d0.js.map +1 -0
  112. package/dist/esm/elements.js +2 -2
  113. package/dist/esm/ion-badge_5.entry.js +1 -1
  114. package/dist/esm/ion-icon_32.entry.js +9115 -0
  115. package/dist/esm/ion-icon_32.entry.js.map +1 -0
  116. package/dist/esm/loader.js +2 -2
  117. package/dist/esm/pos-app-generic.entry.js +1 -1
  118. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  119. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  120. package/dist/esm/pos-document.entry.js +1 -1
  121. package/dist/types/components/pos-dialog/pos-dialog.d.ts +2 -2
  122. package/dist/types/components/pos-login/pos-login.d.ts +4 -0
  123. package/dist/types/components/pos-make-findable/pos-make-findable.d.ts +6 -3
  124. package/dist/types/components/pos-make-findable/shoelace.d.ts +3 -0
  125. package/dist/types/components/pos-user-menu/pos-user-menu.d.ts +13 -0
  126. package/dist/types/components/pos-user-menu/shoelace.d.ts +5 -0
  127. package/dist/types/components.d.ts +33 -0
  128. package/package.json +5 -4
  129. package/dist/cjs/BrokenFile-26f83028.js.map +0 -1
  130. package/dist/cjs/app-globals-1c06b5ae.js +0 -16
  131. package/dist/cjs/app-globals-1c06b5ae.js.map +0 -1
  132. package/dist/cjs/ion-icon_31.cjs.entry.js +0 -4144
  133. package/dist/cjs/ion-icon_31.cjs.entry.js.map +0 -1
  134. package/dist/elements/p-5e8a3893.js +0 -2
  135. package/dist/elements/p-5e8a3893.js.map +0 -1
  136. package/dist/elements/p-b80dbf24.entry.js +0 -20
  137. package/dist/elements/p-b80dbf24.entry.js.map +0 -1
  138. package/dist/elements/p-c27a94bc.entry.js +0 -2
  139. package/dist/elements/p-e1957ea1.entry.js +0 -2
  140. package/dist/elements/p-ec7a6c44.js +0 -2
  141. package/dist/elements/p-ec7a6c44.js.map +0 -1
  142. package/dist/esm/BrokenFile-0b9882ef.js.map +0 -1
  143. package/dist/esm/app-globals-31ecda4c.js +0 -14
  144. package/dist/esm/app-globals-31ecda4c.js.map +0 -1
  145. package/dist/esm/ion-icon_31.entry.js +0 -4110
  146. package/dist/esm/ion-icon_31.entry.js.map +0 -1
  147. /package/dist/elements/{p-650db824.entry.js.map → p-38edfa6d.entry.js.map} +0 -0
  148. /package/dist/elements/{p-e1957ea1.entry.js.map → p-b1de75a4.entry.js.map} +0 -0
  149. /package/dist/elements/{p-178b3852.entry.js.map → p-c466d5bf.entry.js.map} +0 -0
  150. /package/dist/elements/{p-2cda3231.entry.js.map → p-dbb94429.entry.js.map} +0 -0
  151. /package/dist/elements/{p-c27a94bc.entry.js.map → p-ff684bff.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{j as e,k as t,h as n}from"./p-97889672.js";const s=(e,t,n)=>{const s=e.get(t);if(!s){e.set(t,[n])}else if(!s.includes(n)){s.push(n)}};const o=(e,t)=>{let n;return(...s)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;e(...s)}),t)}};const r=e=>!("isConnected"in e)||e.isConnected;const c=o((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(r))}}),2e3);const i=()=>{if(typeof e!=="function"){return{}}const n=new Map;return{dispose:()=>n.clear(),get:t=>{const o=e();if(o){s(n,t,o)}},set:e=>{const s=n.get(e);if(s){n.set(e,s.filter(t))}c(n)},reset:()=>{n.forEach((e=>e.forEach(t)));c(n)}}};const u=e=>typeof e==="function"?e():e;const f=(e,t=((e,t)=>e!==t))=>{const n=u(e);let s=new Map(Object.entries(n??{}));const o={dispose:[],get:[],set:[],reset:[]};const r=()=>{s=new Map(Object.entries(u(e)??{}));o.reset.forEach((e=>e()))};const c=()=>{o.dispose.forEach((e=>e()));r()};const i=e=>{o.get.forEach((t=>t(e)));return s.get(e)};const f=(e,n)=>{const r=s.get(e);if(t(n,r,e)){s.set(e,n);o.set.forEach((t=>t(e,n,r)))}};const a=typeof Proxy==="undefined"?{}:new Proxy(n,{get(e,t){return i(t)},ownKeys(e){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return s.has(t)},set(e,t,n){f(t,n);return true}});const p=(e,t)=>{o[e].push(t);return()=>{l(o[e],t)}};const d=(t,n)=>{const s=p("set",((e,s)=>{if(e===t){n(s)}}));const o=p("reset",(()=>n(u(e)[t])));return()=>{s();o()}};const g=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(p("set",t.set))}if(t.get){e.push(p("get",t.get))}if(t.reset){e.push(p("reset",t.reset))}if(t.dispose){e.push(p("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const w=e=>{const t=s.get(e);o.set.forEach((n=>n(e,t,t)))};return{state:a,get:i,set:f,on:p,onChange:d,use:g,dispose:c,reset:r,forceUpdate:w}};const l=(e,t)=>{const n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};const a=(e,t)=>{const n=f(e,t);n.use(i());return n};const p=a({isLoggedIn:false,webId:"",profile:null});const d=({file:e})=>{const t=g(e.status);return n("div",null,n("a",{class:"error",href:e.url},n("div",null,n("ion-icon",{name:t})),n("div",{class:"code"},e.status.code),n("div",{class:"text"},e.status.text)))};function g(e){switch(e.code){case 401:case 403:return"lock-closed-outline";case 404:return"help-circle-outline";default:return"alert-circle-outline"}}export{d as B,a as c,p as s};
2
- //# sourceMappingURL=p-5e8a3893.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","store","isLoggedIn","webId","profile","BrokenFile","file","iconName","iconForStatus","status","h","class","href","url","name","code","text"],"sources":["../node_modules/@stencil/store/dist/index.js","src/store/session.ts","src/components/broken-file/BrokenFile.tsx"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { WebIdProfile } from '@pod-os/core';\nimport { createStore } from '@stencil/store';\n\nconst store = createStore({\n isLoggedIn: false,\n webId: '',\n profile: null as WebIdProfile\n});\n\nexport default store;\n","import { BrokenFile as BrokenFileData, HttpStatus } from '@pod-os/core';\nimport { h } from '@stencil/core';\n\ninterface Props {\n file: BrokenFileData;\n}\n\nexport const BrokenFile = ({ file }: Props) => {\n const iconName = iconForStatus(file.status);\n return (\n <div>\n <a class=\"error\" href={file.url}>\n <div>\n <ion-icon name={iconName}></ion-icon>\n </div>\n <div class=\"code\">{file.status.code}</div>\n <div class=\"text\">{file.status.text}</div>\n </a>\n </div>\n );\n};\n\nfunction iconForStatus(status: HttpStatus): string {\n switch (status.code) {\n case 401:\n case 403:\n return 'lock-closed-outline';\n case 404:\n return 'help-circle-outline';\n default:\n return 'alert-circle-outline';\n }\n}\n"],"mappings":"kDAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,GAC3B,MACS,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,EACnB,GAEA,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,EACzB,CACQA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,EAAK,GACZF,EAAG,CACT,EAYL,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,GACzC,IACG,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,EACf,CACI,MAAMC,EAAe,IAAIC,IACzB,MAAO,CACHC,QAAS,IAAMF,EAAaG,QAC5BtB,IAAMH,IACF,MAAM0B,EAAML,IACZ,GAAIK,EAAK,CACL5B,EAAYwB,EAActB,EAAU0B,EACpD,GAEQtB,IAAMJ,IACF,MAAM2B,EAAWL,EAAanB,IAAIH,GAClC,GAAI2B,EAAU,CACVL,EAAalB,IAAIJ,EAAU2B,EAASR,OAAOS,GAC3D,CACYZ,EAAgBM,EAAa,EAEjCO,MAAO,KACHP,EAAaQ,SAASC,GAASA,EAAKD,QAAQF,KAC5CZ,EAAgBM,EAAa,EAEpC,EAGL,MAAMU,EAAUC,UAAgBA,IAAQ,WAAaA,IAAQA,EAC7D,MAAMC,EAAsB,CAACC,EAAcC,EAAe,EAACC,EAAGC,IAAMD,IAAMC,MACtE,MAAMC,EAAiBP,EAAOG,GAC9B,IAAIK,EAAS,IAAIjB,IAAIkB,OAAOC,QAAQH,GAAkB,KACtD,MAAMI,EAAW,CACbnB,QAAS,GACTrB,IAAK,GACLC,IAAK,GACLyB,MAAO,IAEX,MAAMA,EAAQ,KAGVW,EAAS,IAAIjB,IAAIkB,OAAOC,QAAQV,EAAOG,IAAiB,KACxDQ,EAASd,MAAMC,SAASc,GAAOA,KAAK,EAExC,MAAMpB,EAAU,KAGZmB,EAASnB,QAAQM,SAASc,GAAOA,MACjCf,GAAO,EAEX,MAAM1B,EAAOH,IACT2C,EAASxC,IAAI2B,SAASc,GAAOA,EAAG5C,KAChC,OAAOwC,EAAOrC,IAAIH,EAAS,EAE/B,MAAMI,EAAM,CAACJ,EAAUC,KACnB,MAAM4C,EAAWL,EAAOrC,IAAIH,GAC5B,GAAIoC,EAAanC,EAAO4C,EAAU7C,GAAW,CACzCwC,EAAOpC,IAAIJ,EAAUC,GACrB0C,EAASvC,IAAI0B,SAASc,GAAOA,EAAG5C,EAAUC,EAAO4C,IAC7D,GAEI,MAAMC,SAAgBC,QAAU,YAC1B,GACA,IAAIA,MAAMR,EAAgB,CACxB,GAAApC,CAAI6C,EAAGhD,GACH,OAAOG,EAAIH,EAC3B,EACY,OAAAiD,CAAQD,GACJ,OAAOE,MAAMC,KAAKX,EAAOtB,OACzC,EACY,wBAAAkC,GACI,MAAO,CACHC,WAAY,KACZC,aAAc,KAElC,EACY,GAAAC,CAAIP,EAAGhD,GACH,OAAOwC,EAAOe,IAAIvD,EAClC,EACY,GAAAI,CAAI4C,EAAGhD,EAAUC,GACbG,EAAIJ,EAAUC,GACd,OAAO,IACvB,IAEI,MAAMuD,EAAK,CAACC,EAAWC,KACnBf,EAASc,GAAWnD,KAAKoD,GACzB,MAAO,KACHC,EAAgBhB,EAASc,GAAYC,EAAS,CACjD,EAEL,MAAME,EAAW,CAAC5D,EAAU4C,KACxB,MAAMiB,EAAQL,EAAG,OAAO,CAACvC,EAAK6C,KAC1B,GAAI7C,IAAQjB,EAAU,CAClB4C,EAAGkB,EACnB,KAIQ,MAAMC,EAAUP,EAAG,SAAS,IAAMZ,EAAGZ,EAAOG,GAAcnC,MAC1D,MAAO,KACH6D,IACAE,GAAS,CACZ,EAEL,MAAMC,EAAM,IAAIC,KACZ,MAAMC,EAASD,EAAcE,QAAO,CAACD,EAAQE,KACzC,GAAIA,EAAahE,IAAK,CAClB8D,EAAO5D,KAAKkD,EAAG,MAAOY,EAAahE,KACnD,CACY,GAAIgE,EAAajE,IAAK,CAClB+D,EAAO5D,KAAKkD,EAAG,MAAOY,EAAajE,KACnD,CACY,GAAIiE,EAAavC,MAAO,CACpBqC,EAAO5D,KAAKkD,EAAG,QAASY,EAAavC,OACrD,CACY,GAAIuC,EAAa5C,QAAS,CACtB0C,EAAO5D,KAAKkD,EAAG,UAAWY,EAAa5C,SACvD,CACY,OAAO0C,CAAM,GACd,IACH,MAAO,IAAMA,EAAOpC,SAASuC,GAAUA,KAAQ,EAEnD,MAAMzC,EAAeX,IACjB,MAAM4B,EAAWL,EAAOrC,IAAIc,GAC5B0B,EAASvC,IAAI0B,SAASc,GAAOA,EAAG3B,EAAK4B,EAAUA,IAAU,EAE7D,MAAO,CACHC,QACA3C,MACAC,MACAoD,KACAI,WACAI,MACAxC,UACAK,QACAD,cACH,EAEL,MAAM+B,EAAkB,CAACW,EAAOC,KAC5B,MAAMC,EAAQF,EAAMG,QAAQF,GAC5B,GAAIC,GAAS,EAAG,CACZF,EAAME,GAASF,EAAMA,EAAMI,OAAS,GACpCJ,EAAMI,QACd,GAGK,MAACC,EAAc,CAACxC,EAAcC,KAC/B,MAAMrC,EAAMmC,EAAoBC,EAAcC,GAC9CrC,EAAIiE,IAAI5C,KACR,OAAOrB,CAAG,E,MC1LR6E,EAAQD,EAAY,CACxBE,WAAY,MACZC,MAAO,GACPC,QAAS,O,MCCEC,EAAa,EAAGC,WAC3B,MAAMC,EAAWC,EAAcF,EAAKG,QACpC,OACEC,EAAA,WACEA,EAAA,KAAGC,MAAM,QAAQC,KAAMN,EAAKO,KAC1BH,EAAA,WACEA,EAAA,YAAUI,KAAMP,KAElBG,EAAA,OAAKC,MAAM,QAAQL,EAAKG,OAAOM,MAC/BL,EAAA,OAAKC,MAAM,QAAQL,EAAKG,OAAOO,OAE7B,EAIV,SAASR,EAAcC,GACrB,OAAQA,EAAOM,MACb,KAAK,IACL,KAAK,IACH,MAAO,sBACT,KAAK,IACH,MAAO,sBACT,QACE,MAAO,uBAEb,Q","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- import{d as t,r as e,h as n,H as o,e as r,f as i,w as s,i as a,j as c,k as l}from"./p-97889672.js";import{c as d,g as u,r as h}from"./p-3f316fc4.js";import{c as f,h as p,g as b}from"./p-669fab6c.js";import{c as g,g as m}from"./p-ebe1c8ca.js";import{E as v,s as y}from"./p-46b6ae86.js";import{c as w}from"./p-3a4d289f.js";import{p as k}from"./p-d6769f21.js";import{O as x,c as z,a as I,i as S,p as _,s as j,b as C,d as D,e as L,f as T,G as P,t as $}from"./p-01adc2b7.js";import{c as E}from"./p-b110cb49.js";import{w as M}from"./p-7efd6867.js";import{createGesture as O}from"./p-b943833e.js";import{c as X,s as B,B as A}from"./p-5e8a3893.js";import{P as R,N as U,L as W}from"./p-b5ef6f04.js";import{s as Y}from"./p-f6671856.js";import"./p-98c00bd2.js";import{s as N}from"./p-182f722d.js";import"./p-bde7428a.js";import"./p-30cd90ec.js";let F;const H=()=>{if(typeof window==="undefined"){return new Map}else{if(!F){const t=window;t.Ionicons=t.Ionicons||{};F=t.Ionicons.map=t.Ionicons.map||new Map}return F}};const G=t=>{let e=Z(t.src);if(e){return e}e=K(t.name,t.icon,t.mode,t.ios,t.md);if(e){return q(e,t)}if(t.icon){e=Z(t.icon);if(e){return e}e=Z(t.icon[t.mode]);if(e){return e}}return null};const q=(e,n)=>{const o=H().get(e);if(o){return o}try{return t(`svg/${e}.svg`)}catch(t){console.warn(`[Ionicons Warning]: Could not load icon with name "${e}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,n)}};const K=(t,e,n,o,r)=>{n=(n&&Q(n))==="ios"?"ios":"md";if(o&&n==="ios"){t=Q(o)}else if(r&&n==="md"){t=Q(r)}else{if(!t&&e&&!V(e)){t=e}if(J(t)){t=Q(t)}}if(!J(t)||t.trim()===""){return null}const i=t.replace(/[a-z]|-|\d/gi,"");if(i!==""){return null}return t};const Z=t=>{if(J(t)){t=t.trim();if(V(t)){return t}}return null};const V=t=>t.length>0&&/(\/|\.)/.test(t);const J=t=>typeof t==="string";const Q=t=>t.toLowerCase();const tt=(t,e=[])=>{const n={};e.forEach((e=>{if(t.hasAttribute(e)){const o=t.getAttribute(e);if(o!==null){n[e]=t.getAttribute(e)}t.removeAttribute(e)}}));return n};const et=t=>{if(t){if(t.dir!==""){return t.dir.toLowerCase()==="rtl"}}return(document===null||document===void 0?void 0:document.dir.toLowerCase())==="rtl"};const nt=t=>{const e=document.createElement("div");e.innerHTML=t;for(let t=e.childNodes.length-1;t>=0;t--){if(e.childNodes[t].nodeName.toLowerCase()!=="svg"){e.removeChild(e.childNodes[t])}}const n=e.firstElementChild;if(n&&n.nodeName.toLowerCase()==="svg"){const t=n.getAttribute("class")||"";n.setAttribute("class",(t+" s-ion-icon").trim());if(ot(n)){return e.innerHTML}}return""};const ot=t=>{if(t.nodeType===1){if(t.nodeName.toLowerCase()==="script"){return false}for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;if(J(n)&&n.toLowerCase().indexOf("on")===0){return false}}for(let e=0;e<t.childNodes.length;e++){if(!ot(t.childNodes[e])){return false}}}return true};const rt=t=>t.startsWith("data:image/svg+xml");const it=t=>t.indexOf(";utf8,")!==-1;const st=new Map;const at=new Map;let ct;const lt=(t,e)=>{let n=at.get(t);if(!n){if(typeof fetch!=="undefined"&&typeof document!=="undefined"){if(rt(t)&&it(t)){if(!ct){ct=new DOMParser}const e=ct.parseFromString(t,"text/html");const n=e.querySelector("svg");if(n){st.set(t,n.outerHTML)}return Promise.resolve()}else{n=fetch(t).then((n=>{if(n.ok){return n.text().then((n=>{if(n&&e!==false){n=nt(n)}st.set(t,n||"")}))}st.set(t,"")}));at.set(t,n)}}else{st.set(t,"");return Promise.resolve()}}return n};const dt=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:32px;stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";const ut=dt;const ht=class{constructor(t){e(this,t);this.iconName=null;this.inheritedAttributes={};this.didLoadIcon=false;this.svgContent=undefined;this.isVisible=false;this.mode=ft();this.color=undefined;this.ios=undefined;this.md=undefined;this.flipRtl=undefined;this.name=undefined;this.src=undefined;this.icon=undefined;this.size=undefined;this.lazy=false;this.sanitize=true}componentWillLoad(){this.inheritedAttributes=tt(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=true;this.loadIcon()}))}componentDidLoad(){if(!this.didLoadIcon){this.loadIcon()}}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}}waitUntilVisible(t,e,n){if(this.lazy&&typeof window!=="undefined"&&window.IntersectionObserver){const o=this.io=new window.IntersectionObserver((t=>{if(t[0].isIntersecting){o.disconnect();this.io=undefined;n()}}),{rootMargin:e});o.observe(t)}else{n()}}loadIcon(){if(this.isVisible){const t=G(this);if(t){if(st.has(t)){this.svgContent=st.get(t)}else{lt(t,this.sanitize).then((()=>this.svgContent=st.get(t)))}this.didLoadIcon=true}}this.iconName=K(this.name,this.icon,this.mode,this.ios,this.md)}render(){const{flipRtl:t,iconName:e,inheritedAttributes:r,el:i}=this;const s=this.mode||"md";const a=e?(e.includes("arrow")||e.includes("chevron"))&&t!==false:false;const c=t||a;return n(o,Object.assign({role:"img",class:Object.assign(Object.assign({[s]:true},pt(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":c,"icon-rtl":c&&et(i)})},r),this.svgContent?n("div",{class:"icon-inner",innerHTML:this.svgContent}):n("div",{class:"icon-inner"}))}static get assetsDirs(){return["svg"]}get el(){return r(this)}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}};const ft=()=>typeof document!=="undefined"&&document.documentElement.getAttribute("mode")||"md";const pt=t=>t?{"ion-color":true,[`ion-color-${t}`]:true}:null;ht.style=ut;const bt=":host{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.3);--progress-background:var(--ion-color-primary, #3880ff);--buffer-background:var(--background);display:block;position:relative;width:100%;contain:strict;direction:ltr;overflow:hidden}.progress,.progress-indeterminate,.indeterminate-bar-primary,.indeterminate-bar-secondary,.progress-buffer-bar{left:0;right:0;top:0;bottom:0;position:absolute;width:100%;height:100%}.buffer-circles-container,.buffer-circles{left:0;right:0;top:0;bottom:0;position:absolute}.buffer-circles{right:-10px;left:-10px;}.progress,.progress-buffer-bar,.buffer-circles-container{transform-origin:left top;transition:transform 150ms linear}.progress,.progress-indeterminate{background:var(--progress-background);z-index:2}.progress-buffer-bar{background:var(--buffer-background);z-index:1}.buffer-circles-container{overflow:hidden}.indeterminate-bar-primary{top:0;right:0;bottom:0;left:-145.166611%;animation:primary-indeterminate-translate 2s infinite linear}.indeterminate-bar-primary .progress-indeterminate{animation:primary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.indeterminate-bar-secondary{top:0;right:0;bottom:0;left:-54.888891%;animation:secondary-indeterminate-translate 2s infinite linear}.indeterminate-bar-secondary .progress-indeterminate{animation:secondary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.buffer-circles{background-image:radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%);background-repeat:repeat-x;background-position:5px center;background-size:10px 10px;z-index:0;animation:buffering 450ms infinite linear}:host(.progress-bar-reversed){transform:scaleX(-1)}:host(.progress-paused) .indeterminate-bar-secondary,:host(.progress-paused) .indeterminate-bar-primary,:host(.progress-paused) .buffer-circles{animation-play-state:paused}:host(.ion-color) .progress-buffer-bar{background:rgba(var(--ion-color-base-rgb), 0.3)}:host(.ion-color) .buffer-circles{background-image:radial-gradient(ellipse at center, rgba(var(--ion-color-base-rgb), 0.3) 0%, rgba(var(--ion-color-base-rgb), 0.3) 30%, transparent 30%)}:host(.ion-color) .progress,:host(.ion-color) .progress-indeterminate{background:var(--ion-color-base)}@keyframes primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{to{transform:translateX(-10px)}}:host{height:3px}";const gt=bt;const mt=":host{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.3);--progress-background:var(--ion-color-primary, #3880ff);--buffer-background:var(--background);display:block;position:relative;width:100%;contain:strict;direction:ltr;overflow:hidden}.progress,.progress-indeterminate,.indeterminate-bar-primary,.indeterminate-bar-secondary,.progress-buffer-bar{left:0;right:0;top:0;bottom:0;position:absolute;width:100%;height:100%}.buffer-circles-container,.buffer-circles{left:0;right:0;top:0;bottom:0;position:absolute}.buffer-circles{right:-10px;left:-10px;}.progress,.progress-buffer-bar,.buffer-circles-container{transform-origin:left top;transition:transform 150ms linear}.progress,.progress-indeterminate{background:var(--progress-background);z-index:2}.progress-buffer-bar{background:var(--buffer-background);z-index:1}.buffer-circles-container{overflow:hidden}.indeterminate-bar-primary{top:0;right:0;bottom:0;left:-145.166611%;animation:primary-indeterminate-translate 2s infinite linear}.indeterminate-bar-primary .progress-indeterminate{animation:primary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.indeterminate-bar-secondary{top:0;right:0;bottom:0;left:-54.888891%;animation:secondary-indeterminate-translate 2s infinite linear}.indeterminate-bar-secondary .progress-indeterminate{animation:secondary-indeterminate-scale 2s infinite linear;animation-play-state:inherit}.buffer-circles{background-image:radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%);background-repeat:repeat-x;background-position:5px center;background-size:10px 10px;z-index:0;animation:buffering 450ms infinite linear}:host(.progress-bar-reversed){transform:scaleX(-1)}:host(.progress-paused) .indeterminate-bar-secondary,:host(.progress-paused) .indeterminate-bar-primary,:host(.progress-paused) .buffer-circles{animation-play-state:paused}:host(.ion-color) .progress-buffer-bar{background:rgba(var(--ion-color-base-rgb), 0.3)}:host(.ion-color) .buffer-circles{background-image:radial-gradient(ellipse at center, rgba(var(--ion-color-base-rgb), 0.3) 0%, rgba(var(--ion-color-base-rgb), 0.3) 30%, transparent 30%)}:host(.ion-color) .progress,:host(.ion-color) .progress-indeterminate{background:var(--ion-color-base)}@keyframes primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{to{transform:translateX(-10px)}}:host{height:4px}";const vt=mt;const yt=class{constructor(t){e(this,t);this.type="determinate";this.reversed=false;this.value=0;this.buffer=1;this.color=undefined}render(){const{color:t,type:e,reversed:r,value:i,buffer:s}=this;const a=g.getBoolean("_testing");const c=m(this);return n(o,{key:"944b79ed6fce1b2c0ed48681cd8517a5abbddd80",role:"progressbar","aria-valuenow":e==="determinate"?i:null,"aria-valuemin":"0","aria-valuemax":"1",class:f(t,{[c]:true,[`progress-bar-${e}`]:true,"progress-paused":a,"progress-bar-reversed":document.dir==="rtl"?!r:r})},e==="indeterminate"?wt():kt(i,s))}};const wt=()=>n("div",{part:"track",class:"progress-buffer-bar"},n("div",{class:"indeterminate-bar-primary"},n("span",{part:"progress",class:"progress-indeterminate"})),n("div",{class:"indeterminate-bar-secondary"},n("span",{part:"progress",class:"progress-indeterminate"})));const kt=(t,e)=>{const o=d(0,t,1);const r=d(0,e,1);return[n("div",{part:"progress",class:"progress",style:{transform:`scaleX(${o})`}}),n("div",{class:{"buffer-circles-container":true,"ion-hide":r===1},style:{transform:`translateX(${r*100}%)`}},n("div",{class:"buffer-circles-container",style:{transform:`translateX(-${r*100}%)`}},n("div",{part:"stream",class:"buffer-circles"}))),n("div",{part:"track",class:"progress-buffer-bar",style:{transform:`scaleX(${r})`}})]};yt.style={ios:gt,md:vt};const xt=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{transform:translate(var(--translate-end)) scale(var(--final-scale, 1));animation:150ms fadeOutAnimation forwards}@keyframes rippleAnimation{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:scale(1)}to{transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes fadeInAnimation{from{animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeOutAnimation{from{animation-timing-function:linear;opacity:0.16}to{opacity:0}}";const zt=xt;const It=class{constructor(t){e(this,t);this.type="bounded"}async addRipple(t,e){return new Promise((n=>{i((()=>{const o=this.el.getBoundingClientRect();const r=o.width;const i=o.height;const a=Math.sqrt(r*r+i*i);const c=Math.max(i,r);const l=this.unbounded?c:a+_t;const d=Math.floor(c*jt);const u=l/d;let h=t-o.left;let f=e-o.top;if(this.unbounded){h=r*.5;f=i*.5}const p=h-d*.5;const b=f-d*.5;const g=r*.5-h;const m=i*.5-f;s((()=>{const t=document.createElement("div");t.classList.add("ripple-effect");const e=t.style;e.top=b+"px";e.left=p+"px";e.width=e.height=d+"px";e.setProperty("--final-scale",`${u}`);e.setProperty("--translate-end",`${g}px, ${m}px`);const o=this.el.shadowRoot||this.el;o.appendChild(t);setTimeout((()=>{n((()=>{St(t)}))}),225+100)}))}))}))}get unbounded(){return this.type==="unbounded"}render(){const t=m(this);return n(o,{key:"f1129019a6d556b008c754aeb79618c69baea9f8",role:"presentation",class:{[t]:true,unbounded:this.unbounded}})}get el(){return r(this)}};const St=t=>{t.classList.add("fade-out");setTimeout((()=>{t.remove()}),200)};const _t=10;const jt=.5;It.style=zt;const Ct=":host{--background:rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065);border-radius:var(--border-radius, inherit);display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:var(--background);line-height:10px;user-select:none;pointer-events:none}span{display:inline-block}:host(.in-media){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;height:100%}:host(.skeleton-text-animated){position:relative;background:linear-gradient(to right, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 8%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.135) 18%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 33%);background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear}@keyframes shimmer{0%{background-position:-400px 0}100%{background-position:400px 0}}";const Dt=Ct;const Lt=class{constructor(t){e(this,t);this.ionStyle=a(this,"ionStyle",7);this.animated=false}componentWillLoad(){this.emitStyle()}emitStyle(){const t={"skeleton-text":true};this.ionStyle.emit(t)}render(){const t=this.animated&&g.getBoolean("animated",true);const e=p("ion-avatar",this.el)||p("ion-thumbnail",this.el);const r=m(this);return n(o,{key:"4dab0fd2de666de12ad8f6dc6ed1e1de0be67ddd",class:{[r]:true,"skeleton-text-animated":t,"in-media":e}},n("span",{key:"f8f908ec24d65e63b14d9a54640a5f18f0fa8fa5"}," "))}get el(){return r(this)}};Lt.style=Dt;
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */function Tt(t,e,n,o){let r;if(n==="md"){r=t==="top"?8:-8}else{r=t==="top"?10:-10}if(e&&M){Pt(e,o);const n=e.getBoundingClientRect();if(t==="top"){r+=n.bottom}else if(t==="bottom"){r-=M.innerHeight-n.top}return{top:`${r}px`,bottom:`${r}px`}}else{return{top:`calc(${r}px + var(--ion-safe-area-top, 0px))`,bottom:`calc(${r}px - var(--ion-safe-area-bottom, 0px))`}}}function Pt(t,e){if(t.offsetParent===null){k("The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.",e)}}const $t=(t,e)=>Math.floor(t/2-e/2);
5
- /*!
6
- * (C) Ionic http://ionicframework.com - MIT License
7
- */const Et=(t,e)=>{const n=E();const o=E();const{position:r,top:i,bottom:s}=e;const a=u(t);const c=a.querySelector(".toast-wrapper");o.addElement(c);switch(r){case"top":o.fromTo("transform","translateY(-100%)",`translateY(${i})`);break;case"middle":const e=$t(t.clientHeight,c.clientHeight);c.style.top=`${e}px`;o.fromTo("opacity",.01,1);break;default:o.fromTo("transform","translateY(100%)",`translateY(${s})`);break}return n.easing("cubic-bezier(.155,1.105,.295,1.12)").duration(400).addAnimation(o)};
8
- /*!
9
- * (C) Ionic http://ionicframework.com - MIT License
10
- */const Mt=(t,e)=>{const n=E();const o=E();const{position:r,top:i,bottom:s}=e;const a=u(t);const c=a.querySelector(".toast-wrapper");o.addElement(c);switch(r){case"top":o.fromTo("transform",`translateY(${i})`,"translateY(-100%)");break;case"middle":o.fromTo("opacity",.99,0);break;default:o.fromTo("transform",`translateY(${s})`,"translateY(100%)");break}return n.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(o)};
11
- /*!
12
- * (C) Ionic http://ionicframework.com - MIT License
13
- */const Ot=(t,e)=>{const n=E();const o=E();const{position:r,top:i,bottom:s}=e;const a=u(t);const c=a.querySelector(".toast-wrapper");o.addElement(c);switch(r){case"top":c.style.setProperty("transform",`translateY(${i})`);o.fromTo("opacity",.01,1);break;case"middle":const e=$t(t.clientHeight,c.clientHeight);c.style.top=`${e}px`;o.fromTo("opacity",.01,1);break;default:c.style.setProperty("transform",`translateY(${s})`);o.fromTo("opacity",.01,1);break}return n.easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation(o)};
14
- /*!
15
- * (C) Ionic http://ionicframework.com - MIT License
16
- */const Xt=t=>{const e=E();const n=E();const o=u(t);const r=o.querySelector(".toast-wrapper");n.addElement(r).fromTo("opacity",.99,0);return e.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(n)};
17
- /*!
18
- * (C) Ionic http://ionicframework.com - MIT License
19
- */const Bt=(t,e,n)=>{const o=u(t).querySelector(".toast-wrapper");const r=t.clientHeight;const i=o.getBoundingClientRect();let s=0;const a=.5;const c=t.position==="middle"?.5:0;const l=t.position==="top"?-1:1;const d=$t(r,i.height);const h=[{offset:0,transform:`translateY(-${d+i.height}px)`},{offset:.5,transform:`translateY(0px)`},{offset:1,transform:`translateY(${d+i.height}px)`}];const f=E("toast-swipe-to-dismiss-animation").addElement(o).duration(100);switch(t.position){case"middle":s=r+i.height;f.keyframes(h);f.progressStart(true,.5);break;case"top":s=i.bottom;f.keyframes([{offset:0,transform:`translateY(${e.top})`},{offset:1,transform:"translateY(-100%)"}]);f.progressStart(true,0);break;case"bottom":default:s=r-i.top;f.keyframes([{offset:0,transform:`translateY(${e.bottom})`},{offset:1,transform:"translateY(100%)"}]);f.progressStart(true,0);break}const p=t=>t*l/s;const b=t=>{const e=c+p(t.deltaY);f.progressStep(e)};const g=e=>{const r=e.velocityY;const i=(e.deltaY+r*1e3)/s*l;m.enable(false);let c=true;let u=1;let b=0;let g=0;if(t.position==="middle"){c=i>=a/2||i<=-a/2;u=1;b=0;const t=o.getBoundingClientRect();const n=t.top-d;const r=`${n}px`;const s=e.deltaY<=0?-1:1;const l=(d+t.height)*s;const h=c?`${l}px`:"0px";const p=[{offset:0,transform:`translateY(${r})`},{offset:1,transform:`translateY(${h})`}];f.keyframes(p);g=l-n}else{c=i>=a;u=c?1:0;b=p(e.deltaY);const t=c?1-b:b;g=t*s}const v=Math.min(Math.abs(g)/Math.abs(r),200);f.onFinish((()=>{if(c){n();f.destroy()}else{if(t.position==="middle"){f.keyframes(h).progressStart(true,.5)}else{f.progressStart(true,0)}m.enable(true)}}),{oneTimeCallback:true}).progressEnd(u,b,v)};const m=O({el:o,gestureName:"toast-swipe-to-dismiss",gesturePriority:x,direction:"y",onMove:b,onEnd:g});return m};const At=":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-wrapper.toast-top{transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{flex-wrap:wrap}.toast-layout-baseline .toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-layout-stacked .toast-button-group{justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports (backdrop-filter: blur(0)){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-middle{opacity:0.01}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}";const Rt=At;const Ut=":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-wrapper.toast-top{transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{flex-wrap:wrap}.toast-layout-baseline .toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-layout-stacked .toast-button-group{justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, #333333);--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";const Wt=Ut;const Yt=class{constructor(t){e(this,t);this.didPresent=a(this,"ionToastDidPresent",7);this.willPresent=a(this,"ionToastWillPresent",7);this.willDismiss=a(this,"ionToastWillDismiss",7);this.didDismiss=a(this,"ionToastDidDismiss",7);this.didPresentShorthand=a(this,"didPresent",7);this.willPresentShorthand=a(this,"willPresent",7);this.willDismissShorthand=a(this,"willDismiss",7);this.didDismissShorthand=a(this,"didDismiss",7);this.delegateController=z(this);this.lockController=w();this.triggerController=I();this.customHTMLEnabled=g.get("innerHTMLTemplatesEnabled",v);this.presented=false;this.dispatchCancelHandler=t=>{const e=t.detail.role;if(S(e)){const t=this.getButtons().find((t=>t.role==="cancel"));this.callButtonHandler(t)}};this.createSwipeGesture=t=>{const e=this.gesture=Bt(this.el,t,(()=>{this.dismiss(undefined,P)}));e.enable(true)};this.destroySwipeGesture=()=>{const{gesture:t}=this;if(t===undefined){return}t.destroy();this.gesture=undefined};this.prefersSwipeGesture=()=>{const{swipeGesture:t}=this;return t==="vertical"};this.revealContentToScreenReader=false;this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.color=undefined;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.cssClass=undefined;this.duration=g.getNumber("toastDuration",0);this.header=undefined;this.layout="baseline";this.message=undefined;this.keyboardClose=false;this.position="bottom";this.positionAnchor=undefined;this.buttons=undefined;this.translucent=false;this.animated=true;this.icon=undefined;this.htmlAttributes=undefined;this.swipeGesture=undefined;this.isOpen=false;this.trigger=undefined}swipeGestureChanged(){this.destroySwipeGesture();if(this.presented&&this.prefersSwipeGesture()){this.createSwipeGesture(this.lastPresentedPosition)}}onIsOpenChange(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}}triggerChanged(){const{trigger:t,el:e,triggerController:n}=this;if(t){n.addClickListener(e,t)}}connectedCallback(){_(this.el);this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){j(this.el)}componentDidLoad(){if(this.isOpen===true){h((()=>this.present()))}this.triggerChanged()}async present(){const t=await this.lockController.lock();await this.delegateController.attachViewToDom();const{el:e,position:n}=this;const o=this.getAnchorElement();const r=Tt(n,o,m(this),e);this.lastPresentedPosition=r;await C(this,"toastEnter",Et,Ot,{position:n,top:r.top,bottom:r.bottom});this.revealContentToScreenReader=true;if(this.duration>0){this.durationTimeout=setTimeout((()=>this.dismiss(undefined,"timeout")),this.duration)}if(this.prefersSwipeGesture()){this.createSwipeGesture(r)}t()}async dismiss(t,e){var n,o;const r=await this.lockController.lock();const{durationTimeout:i,position:s,lastPresentedPosition:a}=this;if(i){clearTimeout(i)}const c=await D(this,t,e,"toastLeave",Mt,Xt,{position:s,top:(n=a===null||a===void 0?void 0:a.top)!==null&&n!==void 0?n:"",bottom:(o=a===null||a===void 0?void 0:a.bottom)!==null&&o!==void 0?o:""});if(c){this.delegateController.removeViewFromDom();this.revealContentToScreenReader=false}this.lastPresentedPosition=undefined;this.destroySwipeGesture();r();return c}onDidDismiss(){return L(this.el,"ionToastDidDismiss")}onWillDismiss(){return L(this.el,"ionToastWillDismiss")}getButtons(){const t=this.buttons?this.buttons.map((t=>typeof t==="string"?{text:t}:t)):[];return t}getAnchorElement(){const{position:t,positionAnchor:e,el:n}=this;if(e===undefined){return}if(t==="middle"&&e!==undefined){k('The positionAnchor property is ignored when using position="middle".',this.el);return undefined}if(typeof e==="string"){const t=document.getElementById(e);if(t===null){k(`An anchor element with an ID of "${e}" was not found in the DOM.`,n);return undefined}return t}if(e instanceof HTMLElement){return e}k("Invalid positionAnchor value:",e,n);return undefined}async buttonClick(t){const e=t.role;if(S(e)){return this.dismiss(undefined,e)}const n=await this.callButtonHandler(t);if(n){return this.dismiss(undefined,e)}return Promise.resolve()}async callButtonHandler(t){if(t===null||t===void 0?void 0:t.handler){try{const e=await T(t.handler);if(e===false){return false}}catch(t){console.error(t)}}return true}renderButtons(t,e){if(t.length===0){return}const o=m(this);const r={"toast-button-group":true,[`toast-button-group-${e}`]:true};return n("div",{class:r},t.map((t=>n("button",Object.assign({},t.htmlAttributes,{type:"button",class:Nt(t),tabIndex:0,onClick:()=>this.buttonClick(t),part:Ft(t)}),n("div",{class:"toast-button-inner"},t.icon&&n("ion-icon",{"aria-hidden":"true",icon:t.icon,slot:t.text===undefined?"icon-only":undefined,class:"toast-button-icon"}),t.text),o==="md"&&n("ion-ripple-effect",{type:t.icon!==undefined&&t.text===undefined?"unbounded":"bounded"})))))}renderToastMessage(t,e=null){const{customHTMLEnabled:o,message:r}=this;if(o){return n("div",{key:t,"aria-hidden":e,class:"toast-message",part:"message",innerHTML:y(r)})}return n("div",{key:t,"aria-hidden":e,class:"toast-message",part:"message"},r)}renderHeader(t,e=null){return n("div",{key:t,class:"toast-header","aria-hidden":e,part:"header"},this.header)}render(){const{layout:t,el:e,revealContentToScreenReader:r,header:i,message:s}=this;const a=this.getButtons();const c=a.filter((t=>t.side==="start"));const l=a.filter((t=>t.side!=="start"));const d=m(this);const u={"toast-wrapper":true,[`toast-${this.position}`]:true,[`toast-layout-${t}`]:true};if(t==="stacked"&&c.length>0&&l.length>0){k("This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.",e)}return n(o,Object.assign({key:"23803334fb668f6ce7044d3a321cb84bc753bd16",tabindex:"-1"},this.htmlAttributes,{style:{zIndex:`${6e4+this.overlayIndex}`},class:f(this.color,Object.assign(Object.assign({[d]:true},b(this.cssClass)),{"overlay-hidden":true,"toast-translucent":this.translucent})),onIonToastWillDismiss:this.dispatchCancelHandler}),n("div",{key:"7cd7138ba079fccf97f318b91e9986491ab4214d",class:u},n("div",{key:"93b78fa64e24435adeb77a04c1d1d53d2f093864",class:"toast-container",part:"container"},this.renderButtons(c,"start"),this.icon!==undefined&&n("ion-icon",{key:"9a3c71b164ebcfba2540acb7568beffa76b62f47",class:"toast-icon",part:"icon",icon:this.icon,lazy:false,"aria-hidden":"true"}),n("div",{key:"feb9268102d844f1314205f7440de7066cf0620e",class:"toast-content",role:"status","aria-atomic":"true","aria-live":"polite"},!r&&i!==undefined&&this.renderHeader("oldHeader","true"),!r&&s!==undefined&&this.renderToastMessage("oldMessage","true"),r&&i!==undefined&&this.renderHeader("header"),r&&s!==undefined&&this.renderToastMessage("header")),this.renderButtons(l,"end"))))}get el(){return r(this)}static get watchers(){return{swipeGesture:["swipeGestureChanged"],isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}};const Nt=t=>Object.assign({"toast-button":true,"toast-button-icon-only":t.icon!==undefined&&t.text===undefined,[`toast-button-${t.role}`]:t.role!==undefined,"ion-focusable":true,"ion-activatable":true},b(t.cssClass));const Ft=t=>S(t.role)?"button cancel":"button";Yt.style={ios:Rt,md:Wt};const Ht=":host{font-family:var(--font-sans);display:block}button#new{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;width:var(--size-10);height:var(--size-10);background-color:var(--pos-primary-color);color:var(--pos-primary-text-color);font-size:var(--scale-6);border-radius:var(--radius-xs)}button#new:hover,button#new:focus{outline:none;filter:brightness(110%);box-shadow:var(--shadow-sm)}pos-new-thing-form{margin:var(--scale-3)}";const Gt=Ht;const qt=class{constructor(t){e(this,t)}openDialog(){this.dialog.showModal()}render(){return n(o,{key:"5ed3ba3982467778ed2b9b02090c230acb6b1762"},n("button",{key:"96ff5dbd0ba4ca4d8c1d25045efa06fea062e9cf",id:"new",title:"Add a new thing",onClick:()=>this.openDialog()},n("ion-icon",{key:"201a19c8ecb39e0e913d3fb8cf1ebee06bc41df5",name:"add-circle-outline"})),n("pos-dialog",{key:"421da81e6faf52119fe600cc388663299eab67ec",ref:t=>this.dialog=t},n("span",{key:"454e6e05dc478e9c1b378cb3308f006fab4d8738",slot:"title"},"Add a new thing"),n("pos-new-thing-form",{key:"a469379848776a4c7e9f8e3f94da76ba048d7fab",slot:"content",referenceUri:this.referenceUri})))}};qt.style=Gt;const Kt=localStorage.getItem("settings");const Zt=Kt?JSON.parse(Kt):{offlineCache:false};const Vt=X(Zt);Jt();Qt();function Jt(){Vt.on("set",(()=>{const t=JSON.stringify(Vt.state);localStorage.setItem("settings",t)}))}function Qt(){window.addEventListener("storage",(t=>{if(t.key==="settings"&&t.newValue){const e=JSON.parse(t.newValue);Vt.state.offlineCache=e.offlineCache}}))}const te=(t,e)=>e.some((e=>t instanceof e));let ee;let ne;function oe(){return ee||(ee=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function re(){return ne||(ne=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ie=new WeakMap;const se=new WeakMap;const ae=new WeakMap;function ce(t){const e=new Promise(((e,n)=>{const o=()=>{t.removeEventListener("success",r);t.removeEventListener("error",i)};const r=()=>{e(pe(t.result));o()};const i=()=>{n(t.error);o()};t.addEventListener("success",r);t.addEventListener("error",i)}));ae.set(e,t);return e}function le(t){if(ie.has(t))return;const e=new Promise(((e,n)=>{const o=()=>{t.removeEventListener("complete",r);t.removeEventListener("error",i);t.removeEventListener("abort",i)};const r=()=>{e();o()};const i=()=>{n(t.error||new DOMException("AbortError","AbortError"));o()};t.addEventListener("complete",r);t.addEventListener("error",i);t.addEventListener("abort",i)}));ie.set(t,e)}let de={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return ie.get(t);if(e==="store"){return n.objectStoreNames[1]?undefined:n.objectStore(n.objectStoreNames[0])}}return pe(t[e])},set(t,e,n){t[e]=n;return true},has(t,e){if(t instanceof IDBTransaction&&(e==="done"||e==="store")){return true}return e in t}};function ue(t){de=t(de)}function he(t){if(re().includes(t)){return function(...e){t.apply(be(this),e);return pe(this.request)}}return function(...e){return pe(t.apply(be(this),e))}}function fe(t){if(typeof t==="function")return he(t);if(t instanceof IDBTransaction)le(t);if(te(t,oe()))return new Proxy(t,de);return t}function pe(t){if(t instanceof IDBRequest)return ce(t);if(se.has(t))return se.get(t);const e=fe(t);if(e!==t){se.set(t,e);ae.set(e,t)}return e}const be=t=>ae.get(t);function ge(t,e,{blocked:n,upgrade:o,blocking:r,terminated:i}={}){const s=indexedDB.open(t,e);const a=pe(s);if(o){s.addEventListener("upgradeneeded",(t=>{o(pe(s.result),t.oldVersion,t.newVersion,pe(s.transaction),t)}))}if(n){s.addEventListener("blocked",(t=>n(t.oldVersion,t.newVersion,t)))}a.then((t=>{if(i)t.addEventListener("close",(()=>i()));if(r){t.addEventListener("versionchange",(t=>r(t.oldVersion,t.newVersion,t)))}})).catch((()=>{}));return a}const me=["get","getKey","getAll","getAllKeys","count"];const ve=["put","add","delete","clear"];const ye=new Map;function we(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e==="string")){return}if(ye.get(e))return ye.get(e);const n=e.replace(/FromIndex$/,"");const o=e!==n;const r=ve.includes(n);if(!(n in(o?IDBIndex:IDBObjectStore).prototype)||!(r||me.includes(n))){return}const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let s=i.store;if(o)s=s.index(e.shift());return(await Promise.all([s[n](...e),r&&i.done]))[0]};ye.set(e,i);return i}ue((t=>({...t,get:(e,n,o)=>we(e,n)||t.get(e,n,o),has:(e,n)=>!!we(e,n)||t.has(e,n)})));const ke=["continue","continuePrimaryKey","advance"];const xe={};const ze=new WeakMap;const Ie=new WeakMap;const Se={get(t,e){if(!ke.includes(e))return t[e];let n=xe[e];if(!n){n=xe[e]=function(...t){ze.set(this,Ie.get(this)[e](...t))}}return n}};async function*_e(...t){let e=this;if(!(e instanceof IDBCursor)){e=await e.openCursor(...t)}if(!e)return;e=e;const n=new Proxy(e,Se);Ie.set(n,e);ae.set(n,be(e));while(e){yield n;e=await(ze.get(n)||e.continue());ze.delete(n)}}function je(t,e){return e===Symbol.asyncIterator&&te(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&te(t,[IDBIndex,IDBObjectStore])}ue((t=>({...t,get(e,n,o){if(je(e,n))return _e;return t.get(e,n,o)},has(e,n){return je(e,n)||t.has(e,n)}})));class Ce{constructor(){this.dbPromise=ge("OfflineCacheDB",1,{upgrade(t){if(!t.objectStoreNames.contains("documents")){const e=t.createObjectStore("documents",{keyPath:"url"});e.createIndex("url-revision",["url","revision"])}}})}async clear(){const t=await this.dbPromise;return t.clear("documents")}async get(t){const e=await this.dbPromise;return await e.get("documents",t)}async put(t){const e=await this.dbPromise;const n=await e.getFromIndex("documents","url-revision",[t.url,t.revision]);if(n){return}await e.put("documents",t)}}class De{isOnline(){return navigator.onLine}}const Le=t=>new R({offlineCache:t.offlineCache?new Ce:new U,onlineStatus:new De});function Te(t){return typeof t==="function"}function Pe(t){const e=t=>{Error.call(t);t.stack=(new Error).stack};const n=t(e);n.prototype=Object.create(Error.prototype);n.prototype.constructor=n;return n}const $e=Pe((t=>function e(n){t(this);this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map(((t,e)=>`${e+1}) ${t.toString()}`)).join("\n ")}`:"";this.name="UnsubscriptionError";this.errors=n}));function Ee(t,e){if(t){const n=t.indexOf(e);0<=n&&t.splice(n,1)}}class Me{constructor(t){this.initialTeardown=t;this.closed=false;this._parentage=null;this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=true;const{_parentage:e}=this;if(e){this._parentage=null;if(Array.isArray(e)){for(const t of e){t.remove(this)}}else{e.remove(this)}}const{initialTeardown:n}=this;if(Te(n)){try{n()}catch(e){t=e instanceof $e?e.errors:[e]}}const{_finalizers:o}=this;if(o){this._finalizers=null;for(const e of o){try{Be(e)}catch(e){t=t!==null&&t!==void 0?t:[];if(e instanceof $e){t=[...t,...e.errors]}else{t.push(e)}}}}if(t){throw new $e(t)}}}add(t){var e;if(t&&t!==this){if(this.closed){Be(t)}else{if(t instanceof Me){if(t.closed||t._hasParent(this)){return}t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;if(e===t){this._parentage=null}else if(Array.isArray(e)){Ee(e,t)}}remove(t){const{_finalizers:e}=this;e&&Ee(e,t);if(t instanceof Me){t._removeParent(this)}}}Me.EMPTY=(()=>{const t=new Me;t.closed=true;return t})();const Oe=Me.EMPTY;function Xe(t){return t instanceof Me||t&&"closed"in t&&Te(t.remove)&&Te(t.add)&&Te(t.unsubscribe)}function Be(t){if(Te(t)){t()}else{t.unsubscribe()}}const Ae={onUnhandledError:null,onStoppedNotification:null,Promise:undefined,useDeprecatedSynchronousErrorHandling:false,useDeprecatedNextContext:false};const Re={setTimeout(t,e,...n){const{delegate:o}=Re;if(o===null||o===void 0?void 0:o.setTimeout){return o.setTimeout(t,e,...n)}return setTimeout(t,e,...n)},clearTimeout(t){const{delegate:e}=Re;return((e===null||e===void 0?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:undefined};function Ue(t){Re.setTimeout((()=>{const{onUnhandledError:e}=Ae;if(e){e(t)}else{throw t}}))}function We(){}const Ye=(()=>He("C",undefined,undefined))();function Ne(t){return He("E",undefined,t)}function Fe(t){return He("N",t,undefined)}function He(t,e,n){return{kind:t,value:e,error:n}}let Ge=null;function qe(t){if(Ae.useDeprecatedSynchronousErrorHandling){const e=!Ge;if(e){Ge={errorThrown:false,error:null}}t();if(e){const{errorThrown:t,error:e}=Ge;Ge=null;if(t){throw e}}}else{t()}}class Ke extends Me{constructor(t){super();this.isStopped=false;if(t){this.destination=t;if(Xe(t)){t.add(this)}}else{this.destination=on}}static create(t,e,n){return new Qe(t,e,n)}next(t){if(this.isStopped){nn(Fe(t),this)}else{this._next(t)}}error(t){if(this.isStopped){nn(Ne(t),this)}else{this.isStopped=true;this._error(t)}}complete(){if(this.isStopped){nn(Ye,this)}else{this.isStopped=true;this._complete()}}unsubscribe(){if(!this.closed){this.isStopped=true;super.unsubscribe();this.destination=null}}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Ze=Function.prototype.bind;function Ve(t,e){return Ze.call(t,e)}class Je{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next){try{e.next(t)}catch(t){tn(t)}}}error(t){const{partialObserver:e}=this;if(e.error){try{e.error(t)}catch(t){tn(t)}}else{tn(t)}}complete(){const{partialObserver:t}=this;if(t.complete){try{t.complete()}catch(t){tn(t)}}}}class Qe extends Ke{constructor(t,e,n){super();let o;if(Te(t)||!t){o={next:t!==null&&t!==void 0?t:undefined,error:e!==null&&e!==void 0?e:undefined,complete:n!==null&&n!==void 0?n:undefined}}else{let e;if(this&&Ae.useDeprecatedNextContext){e=Object.create(t);e.unsubscribe=()=>this.unsubscribe();o={next:t.next&&Ve(t.next,e),error:t.error&&Ve(t.error,e),complete:t.complete&&Ve(t.complete,e)}}else{o=t}}this.destination=new Je(o)}}function tn(t){{Ue(t)}}function en(t){throw t}function nn(t,e){const{onStoppedNotification:n}=Ae;n&&Re.setTimeout((()=>n(t,e)))}const on={closed:true,next:We,error:en,complete:We};const rn=(()=>typeof Symbol==="function"&&Symbol.observable||"@@observable")();function sn(t){return t}function an(t){if(t.length===0){return sn}if(t.length===1){return t[0]}return function e(n){return t.reduce(((t,e)=>e(t)),n)}}class cn{constructor(t){if(t){this._subscribe=t}}lift(t){const e=new cn;e.source=this;e.operator=t;return e}subscribe(t,e,n){const o=un(t)?t:new Qe(t,e,n);qe((()=>{const{operator:t,source:e}=this;o.add(t?t.call(o,e):e?this._subscribe(o):this._trySubscribe(o))}));return o}_trySubscribe(t){try{return this._subscribe(t)}catch(e){t.error(e)}}forEach(t,e){e=ln(e);return new e(((e,n)=>{const o=new Qe({next:e=>{try{t(e)}catch(t){n(t);o.unsubscribe()}},error:n,complete:e});this.subscribe(o)}))}_subscribe(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)}[rn](){return this}pipe(...t){return an(t)(this)}toPromise(t){t=ln(t);return new t(((t,e)=>{let n;this.subscribe((t=>n=t),(t=>e(t)),(()=>t(n)))}))}}cn.create=t=>new cn(t);function ln(t){var e;return(e=t!==null&&t!==void 0?t:Ae.Promise)!==null&&e!==void 0?e:Promise}function dn(t){return t&&Te(t.next)&&Te(t.error)&&Te(t.complete)}function un(t){return t&&t instanceof Ke||dn(t)&&Xe(t)}function hn(t){return Te(t===null||t===void 0?void 0:t.lift)}function fn(t){return e=>{if(hn(e)){return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}))}throw new TypeError("Unable to lift unknown Observable type")}}function pn(t,e,n,o,r){return new bn(t,e,n,o,r)}class bn extends Ke{constructor(t,e,n,o,r,i){super(t);this.onFinalize=r;this.shouldUnsubscribe=i;this._next=e?function(n){try{e(n)}catch(e){t.error(e)}}:super._next;this._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:super._error;this._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:e}=this;super.unsubscribe();!e&&((t=this.onFinalize)===null||t===void 0?void 0:t.call(this))}}}const gn=Pe((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class mn extends cn{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new vn(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new gn}}next(t){qe((()=>{this._throwIfClosed();if(!this.isStopped){if(!this.currentObservers){this.currentObservers=Array.from(this.observers)}for(const e of this.currentObservers){e.next(t)}}}))}error(t){qe((()=>{this._throwIfClosed();if(!this.isStopped){this.hasError=this.isStopped=true;this.thrownError=t;const{observers:e}=this;while(e.length){e.shift().error(t)}}}))}complete(){qe((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:n,observers:o}=this;if(e||n){return Oe}this.currentObservers=null;o.push(t);return new Me((()=>{this.currentObservers=null;Ee(o,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:n,isStopped:o}=this;if(e){t.error(n)}else if(o){t.complete()}}asObservable(){const t=new cn;t.source=this;return t}}mn.create=(t,e)=>new vn(t,e);class vn extends mn{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0?void 0:n.call(e,t)}error(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0?void 0:n.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&n!==void 0?n:Oe}}const yn={now(){return(yn.delegate||Date).now()},delegate:undefined};class wn extends Me{constructor(t,e){super()}schedule(t,e=0){return this}}const kn={setInterval(t,e,...n){const{delegate:o}=kn;if(o===null||o===void 0?void 0:o.setInterval){return o.setInterval(t,e,...n)}return setInterval(t,e,...n)},clearInterval(t){const{delegate:e}=kn;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class xn extends wn{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var n;if(this.closed){return this}this.state=t;const o=this.id;const r=this.scheduler;if(o!=null){this.id=this.recycleAsyncId(r,o,e)}this.pending=true;this.delay=e;this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,n=0){return kn.setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(n!=null&&this.delay===n&&this.pending===false){return e}if(e!=null){kn.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const n=this._execute(t,e);if(n){return n}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let n=false;let o;try{this.work(t)}catch(t){n=true;o=t?t:new Error("Scheduled action threw falsy error")}if(n){this.unsubscribe();return o}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:n}=e;this.work=this.state=this.scheduler=null;this.pending=false;Ee(n,this);if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null;super.unsubscribe()}}}class zn{constructor(t,e=zn.now){this.schedulerActionCtor=t;this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}zn.now=yn.now;class In extends zn{constructor(t,e=zn.now){super(t,e);this.actions=[];this._active=false}flush(t){const{actions:e}=this;if(this._active){e.push(t);return}let n;this._active=true;do{if(n=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(n){while(t=e.shift()){t.unsubscribe()}throw n}}}const Sn=new In(xn);function _n(t,e,n,o){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o["throw"](t))}catch(t){i(t)}}function c(t){t.done?n(t.value):r(t.value).then(s,a)}c((o=o.apply(t,e||[])).next())}))}function jn(t){var e=typeof Symbol==="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&o>=t.length)t=void 0;return{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cn(t){return this instanceof Cn?(this.v=t,this):new Cn(t)}function Dn(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n.apply(t,e||[]),r,i=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(t){if(o[t])r[t]=function(e){return new Promise((function(n,o){i.push([t,e,n,o])>1||a(t,e)}))}}function a(t,e){try{c(o[t](e))}catch(t){u(i[0][3],t)}}function c(t){t.value instanceof Cn?Promise.resolve(t.value.v).then(l,d):u(i[0][2],t)}function l(t){a("next",t)}function d(t){a("throw",t)}function u(t,e){if(t(e),i.shift(),i.length)a(i[0][0],i[0][1])}}function Ln(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof jn==="function"?jn(t):t[Symbol.iterator](),n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n);function o(e){n[e]=t[e]&&function(n){return new Promise((function(o,i){n=t[e](n),r(o,i,n.done,n.value)}))}}function r(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}}typeof SuppressedError==="function"?SuppressedError:function(t,e,n){var o=new Error(n);return o.name="SuppressedError",o.error=t,o.suppressed=e,o};const Tn=t=>t&&typeof t.length==="number"&&typeof t!=="function";function Pn(t){return Te(t===null||t===void 0?void 0:t.then)}function $n(t){return Te(t[rn])}function En(t){return Symbol.asyncIterator&&Te(t===null||t===void 0?void 0:t[Symbol.asyncIterator])}function Mn(t){return new TypeError(`You provided ${t!==null&&typeof t==="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function On(){if(typeof Symbol!=="function"||!Symbol.iterator){return"@@iterator"}return Symbol.iterator}const Xn=On();function Bn(t){return Te(t===null||t===void 0?void 0:t[Xn])}function An(t){return Dn(this,arguments,(function*e(){const n=t.getReader();try{while(true){const{value:t,done:e}=yield Cn(n.read());if(e){return yield Cn(void 0)}yield yield Cn(t)}}finally{n.releaseLock()}}))}function Rn(t){return Te(t===null||t===void 0?void 0:t.getReader)}function Un(t){if(t instanceof cn){return t}if(t!=null){if($n(t)){return Wn(t)}if(Tn(t)){return Yn(t)}if(Pn(t)){return Nn(t)}if(En(t)){return Hn(t)}if(Bn(t)){return Fn(t)}if(Rn(t)){return Gn(t)}}throw Mn(t)}function Wn(t){return new cn((e=>{const n=t[rn]();if(Te(n.subscribe)){return n.subscribe(e)}throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function Yn(t){return new cn((e=>{for(let n=0;n<t.length&&!e.closed;n++){e.next(t[n])}e.complete()}))}function Nn(t){return new cn((e=>{t.then((t=>{if(!e.closed){e.next(t);e.complete()}}),(t=>e.error(t))).then(null,Ue)}))}function Fn(t){return new cn((e=>{for(const n of t){e.next(n);if(e.closed){return}}e.complete()}))}function Hn(t){return new cn((e=>{qn(t,e).catch((t=>e.error(t)))}))}function Gn(t){return Hn(An(t))}function qn(t,e){var n,o;var r,i;return _n(this,void 0,void 0,(function*(){try{for(n=Ln(t);o=yield n.next(),!o.done;){const t=o.value;e.next(t);if(e.closed){return}}}catch(t){r={error:t}}finally{try{if(o&&!o.done&&(i=n.return))yield i.call(n)}finally{if(r)throw r.error}}e.complete()}))}function Kn(t,e=Sn){return fn(((n,o)=>{let r=null;let i=null;let s=null;const a=()=>{if(r){r.unsubscribe();r=null;const t=i;i=null;o.next(t)}};function c(){const n=s+t;const i=e.now();if(i<n){r=this.schedule(undefined,n-i);o.add(r);return}a()}n.subscribe(pn(o,(n=>{i=n;s=e.now();if(!r){r=e.schedule(c,t);o.add(r)}}),(()=>{a();o.complete()}),undefined,(()=>{i=r=null})))}))}function Zn(t){return fn(((e,n)=>{Un(t).subscribe(pn(n,(()=>n.complete()),We));!n.closed&&e.subscribe(n)}))}const Vn=class{constructor(t){e(this,t);this.sessionRestoredEmitter=a(this,"pod-os:session-restored",7);this.restorePreviousSession=false;this.disconnected$=new mn}componentWillLoad(){this.unsubscribeSettings=Vt.on("set",(()=>{this.os=Le(Vt.state)}));this.os=Le(Vt.state);this.os.onSessionRestore((t=>{this.sessionRestoredEmitter.emit({url:t})}));this.os.handleIncomingRedirect(this.restorePreviousSession);this.os.observeSession().pipe(Zn(this.disconnected$)).subscribe((async t=>{B.state.webId=t.webId;if(t.isLoggedIn){const e=await this.os.fetchProfile(t.webId);B.state.profile=e}B.state.isLoggedIn=t.isLoggedIn}))}disconnectedCallback(){this.unsubscribeSettings();this.disconnected$.next();this.disconnected$.unsubscribe()}async initializeOs(t){t.stopPropagation();t.detail(this.os)}async loadModule(t){t.stopPropagation();if(t.detail.module==="contacts"){const e=await this.os.loadContactsModule();t.detail.receiver(e)}else{throw Error(`Unknown module "${t.detail.module}"`)}}render(){return n("slot",{key:"402887f3383b6053da157df211c28977720db8e2"})}};const Jn="pos-router {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\npos-navigation {\n max-width: var(--width-lg);\n margin: 0;\n min-width: var(--size-32);\n flex-shrink: 1; /* Ensure navigation can shrink */\n}\n\npos-add-new-thing,\npos-login {\n flex: 0 1 auto;\n flex-shrink: 0; /* Ensure those items don't shrink */\n}\n\nheader,\nfooter {\n display: flex;\n gap: var(--size-1);\n height: auto;\n justify-content: center;\n align-items: center;\n padding: var(--size-1);\n}\n\nfooter svg {\n width: var(--size-5);\n height: var(--size-5);\n}\n\nfooter {\n font-size: var(--scale-fluid-000);\n\n .settings {\n padding: 0 var(--size-1);\n text-decoration: none;\n background-color: var(--pos-background-color);\n border: 1px solid var(--pos-secondary-border-color);\n color: var(--pos-secondary-border-color);\n border-radius: var(--radius-xs);\n\n &:hover {\n background-color: var(--pos-secondary-border-color);\n color: var(--pos-background-color);\n }\n }\n}\n\nheader {\n flex-wrap: nowrap;\n padding: var(--size-1) var(--size-8);\n}\n\nmain {\n flex: 1;\n max-height: 100vh;\n overflow: auto;\n}\n\n@media (max-width: 640px) {\n header {\n padding: var(--size-1);\n justify-content: space-between;\n }\n}\n";const Qn=Jn;const to=class{constructor(t){e(this,t);this.restorePreviousSession=false;this.mode="standalone";this.uri=""}render(){return n(o,{key:"d2c863f8abf790352cdf9c830a1baa8d7aee95a8"},n("pos-app",{key:"163415bea00a0a18f5e97f5cb7f3e5b9f5910f61",restorePreviousSession:this.restorePreviousSession},n("pos-error-toast",{key:"799735b00aff86946259013132079814520ced7e"},n("pos-router",{key:"bdb89d03d93937399ec38b0b2c1d695feea248b9",mode:this.mode,"onPod-os:route-changed":t=>this.uri=t.detail},n("header",{key:"e828af57fa2d8842c058197a826ac488cbb2a968"},n("pos-add-new-thing",{key:"28eed0a89a4e554e88ea4fce13b2dd59c5ce0149",referenceUri:this.uri}),n("pos-navigation",{key:"16a06ae6aea6ac316cacc4ffa52442b3ada62d62",uri:this.uri==="pod-os:dashboard"?"":this.uri}),n("pos-login",{key:"9577c4aa8a18af341715b6e51946dbb4481ef963"})),n("main",{key:"73dc7ba162440c5198a31f5a4b060dc2c2d1c70a"},this.mainContent()),n("footer",{key:"cb18c8eb3abc1ee62426db39a61e650df2906241"},n(eo,{key:"e9205f06faa7153310a17470f55b97a423cf6691"}),n("span",{key:"7be0a255d0ca50d961f122fdfc9fd3bb3fdfd624"},"PodOS Browser"),n("span",{key:"3ed17bc88faffbcfa973278c76f63a2a199ec026"},"|"),n("a",{key:"ab88d3e93e59b918dd21b8cd42b70522dc532730",class:"settings",href:"?uri=pod-os%3Asettings"},"⚙ Settings"))))))}mainContent(){if(this.uri===""){return null}if(this.uri.startsWith("pod-os:")){return n("pos-internal-router",{uri:this.uri})}return n("pos-resource",{key:this.uri,uri:this.uri},n("pos-type-router",null))}};const eo=()=>n("svg",{viewBox:"0 0 400 400",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M50 350 L50 100 L200 50 L350 100 L350 350 Z",style:{fill:"#008BF8",stroke:"#008BF8","stroke-width":"70"},"stroke-linejoin":"round"}),n("path",{d:"M100 300 L100 150 L200 120 L300 150 L300 300 L130 300 L130 370 L100 370Z",style:{fill:"white",stroke:"white","stroke-width":"45"},"stroke-linejoin":"round"}),n("path",{d:"M150 250 L150 200 L200 180 L250 200 L250 250 Z",style:{fill:"#DC0073",stroke:"#DC0073","stroke-width":"20"},"stroke-linejoin":"round"}));to.style=Qn;const no=":host{display:grid;grid-template-columns:repeat(auto-fit, minmax(var(--size-12), var(--size-96)));gap:var(--size-4);padding:var(--size-2);justify-content:center;align-items:start;justify-items:stretch}";const oo=no;const ro=class{constructor(t){e(this,t)}render(){return n(o,{key:"c467fa44eac028bc1a1546423ac92a5e1e9a98d2"},n("pos-getting-started",{key:"f62088d7cc2c199617eecbfd771b2f22db1a7431"}),n("pos-example-resources",{key:"6285bd2160042582ee113f81e7e6e02139d67f45"}))}};ro.style=oo;const io=":host{display:grid;grid-template-columns:repeat(auto-fit, minmax(var(--size-12), var(--size-96)));gap:var(--size-4);padding:var(--size-2);justify-content:center;align-items:start;justify-items:stretch}";const so=io;const ao=class{constructor(t){e(this,t)}render(){return n("pos-setting-offline-cache",{key:"0da588136a4c7c4238e0387bfe0649464ccd1c7d"})}};ao.style=so;const co=class{constructor(t){e(this,t);this.subscribeResource=a(this,"pod-os:resource",7);this.receiveResource=t=>{this.resource=t}}componentWillLoad(){Y(this)}render(){return this.resource?this.resource.description():null}};const lo="dialog{background-color:var(--pos-background-color);color:var(--pos-normal-text-color);border:none;border-radius:var(--radius-md);box-shadow:var(--shadow-md);max-width:var(--width-xs);animation:slideIn 0.2s ease-out}dialog::backdrop{background:rgba(0, 0, 0, 0.5);backdrop-filter:var(--blur-sm);animation:fadeIn 0.2s ease-out}@media (prefers-color-scheme: dark){dialog::backdrop{background:rgb(100, 100, 100, 0.5)}}dialog header>:first-child{flex-grow:1;font-weight:var(--weight-light);font-size:var(--scale-2);font-family:var(--font-sans);margin:0}dialog header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:var(--scale-0);border-bottom-style:inset;padding:0 0 var(--scale-0) 0}dialog>:last-child{display:block;margin-top:var(--scale-3)}button#close{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;background:none;font-size:var(--scale-3);color:var(--color-grey-500)}button#close:hover{color:var(--pos-secondary-border-color)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideIn{from{opacity:0;transform:translateY(-20px) scale(0.95)}to{opacity:1;transform:translateY(0) scale(1)}}";const uo=lo;const ho=class{constructor(t){e(this,t)}showModal(){this.dialog.showModal()}close(){this.dialog.close()}render(){return n(o,{key:"52b46535cab915321a93f84fa8b2f662d2e8e4ea"},n("dialog",{key:"e6c57b54805f48084c0a0ef2fa32fda9938f4c17",ref:t=>this.dialog=t},n("header",{key:"aee8b90512a18b8e87084009433e963d1a9b3fd1"},n("slot",{key:"3aa5a212f5774316ffaf0b9a1a04607690a2bcac",name:"title"}),n("button",{key:"f3da0669f952023cfcc792b2b801670c94e49400",tabindex:-1,id:"close",title:"Close",onClick:()=>this.close()},n("ion-icon",{key:"90b5835a6f79c587c651d1d5e599fa9079a1d1e9",name:"close-outline"}))),n("slot",{key:"9fa7fa1e7f6077aca2a6eb40d806b1d7b9237eef",name:"content"})))}};ho.style=uo;const fo=class{constructor(t){e(this,t)}async unhandledRejection(t){t.stopPropagation();console.error("unhandled promise rejection",t);await this.showToast(t.reason.toString())}async catchError(t){t.stopPropagation();console.error(t.detail);await this.showToast(t.detail.message)}async showToast(t){const e=await $.create({message:t,duration:1e4,position:"top",color:"danger",buttons:[{text:"Dismiss",role:"cancel"}]});await e.present()}render(){return n(o,{key:"0dce513e04101d3b9011c635f5aab8897a246385"},n("ion-toast",{key:"956224c61589fca317f8143055344c857aa894cf",trigger:"never",message:"Workarround to preload ion-toast and ion-ripple-effect to be able to show errors while offline",duration:0},n("ion-ripple-effect",{key:"e96e65e2f06b61970e241639e7c429a90404517e"})),n("slot",{key:"8869125c64fb97f9736e30df0a748c9ce6aec1da"}))}};const po=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.links{display:flex;flex-direction:column;gap:var(--size-3);max-width:80vw}";const bo=po;const go=class{constructor(t){e(this,t)}render(){return n(o,{key:"b6a491caa9ea624cdba3cca92fcc9444a3c38290"},n("div",{key:"458ceb259d7070d38eb13aea9f3b303f174a5c56"},n("h2",{key:"1d571afb47c256f2ac873840c6fe8bc8408cc9a6"},"Try these... 💡"),n("p",{key:"7de1dac7a92becb01ec7aab4cf96c45fa95f7de6"},"No idea where to start? Try these example resources, and follow your nose 👃"),n("div",{key:"b94cc5571f5b7af0bcc660fc8812ca08ca2db482",class:"links"},n("pos-rich-link",{key:"e2c414d51b79e27667a42d04fa66e879a2ecf2a2",uri:"https://pod-os.solidcommunity.net/profile/card#me"}),n("pos-rich-link",{key:"e54479349363d67d027612bbcdb2167f9ab6ec03",uri:"https://angelo.veltens.org/profile/card#me"}),n("pos-rich-link",{key:"1c743eafd11d46f6bdd31face3bf1083abd1e045",uri:"https://angelo.veltens.org/public/bookmarks"}),n("pos-rich-link",{key:"3e47cd67a0ab44a1921ec4f0e5e9f24404826494",uri:"https://solidos.solidcommunity.net/profile/card#me"}))))}};go.style=bo;const mo=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.question{font-weight:var(--weight-semibold)}a{font-weight:var(--weight-bold);color:var(--pos-primary-color)}button.login{background:none;color:var(--pos-primary-color);display:inline;text-decoration:underline;border:none;padding:0;margin:0;cursor:pointer;font-size:unset}";const vo=mo;const yo=class{constructor(t){e(this,t);this.login=a(this,"pod-os:login",7)}render(){return n(o,{key:"963476081378811bc5623921ca7f4dc5ac18b9f7"},n("div",{key:"df6a7a5bab3c026d1960c03a4d008f8bff0b1c9d"},n("h2",{key:"9e7a1e2c081f87275641fe99afb72c1f8ef65115"},"Getting started 🚀"),n("p",{key:"dac8ca58a733d66ab80fa79ef59d62a254b3b83f"},"🔎 Enter a URL into the above navigation bar to browse through the web of data. "),n("p",{key:"c90fbc4f7c09893f6ded65befe4c77f673df6db2"},"🔐"," ",n("button",{key:"2688b10503c6d518a7a48601f35e1f20741d71c7",class:"login",onClick:()=>this.login.emit()},"Sign in")," ","to access private resources on your Solid Pod or those of your friends or coworkers.")),n("div",{key:"5990c65adc978df16ec7b73c3be2b6b4b3a48ce3"},n("p",{key:"8fd4cb0941da30c3b438338a557a6d4fb9d7ff33",class:"question"},"New to Solid?"),n("p",{key:"d6b06063acaac1d55dc0aea86c3d80f4e7c8ca6f"},n("a",{key:"b0a49b4e170c89f736cf9bd2dd567cfafbcec31c",href:"https://solidproject.org/for-developers#hosted-pod-services"},"Get a Pod →"))),n("div",{key:"7c88ea4bb3982346343cf10e6196d2d07057a24e"},n("p",{key:"22cfb601fada05ca7b5f274f0b6a81d360344764",class:"question"},"Want to dig deeper into PodOS?"),n("p",{key:"fb03d0f84714feb53b1b053390a5e7b9686e610e"},n("a",{key:"1681d6d1c860589ca1624abc3c05121ccde3f951",href:"http://pod-os.org"},"Learn more →"))))}};yo.style=vo;const wo=":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,ion-skeleton-text,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error ion-icon{color:#282828;--ionicon-stroke-width:calc(var(--width) / 5);font-size:calc(var(--width) / 2)}a.error{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}";const ko=wo;const xo=class{constructor(t){e(this,t);this.initializeOsEmitter=a(this,"pod-os:init",7);this.resourceLoadedEmitter=a(this,"pod-os:resource-loaded",7);this.blurredBackground=false;this.loading=true;this.setOs=async t=>{this.os=t}}componentWillLoad(){B.onChange("isLoggedIn",(()=>this.fetchBlob()));this.initializeOsEmitter.emit(this.setOs)}async fetchBlob(){try{this.loading=true;this.imageError=null;this.networkError=null;this.brokenFile=null;const t=await this.os.fetchFile(this.src);this.resourceLoadedEmitter.emit(this.src);if(t.blob()){this.dataUri=URL.createObjectURL(t.blob())}else{this.brokenFile=t}}catch(t){this.networkError=t}finally{this.loading=false}}onImageError(t){this.networkError=null;this.imageError=t}render(){if(this.loading){return n("ion-skeleton-text",{animated:true})}if(this.networkError){return n("img",{alt:this.alt,src:this.src,onError:t=>this.onImageError(t)})}if(this.brokenFile){return n(A,{file:this.brokenFile})}if(this.imageError){return n("div",{class:"error"},n("a",{href:this.src},this.src))}return n(o,{style:{backgroundImage:this.blurredBackground?`url('${this.dataUri}')`:null}},n("img",{src:this.dataUri,alt:this.alt}))}static get watchers(){return{os:["fetchBlob"],src:["fetchBlob"]}}};xo.style=ko;const zo=class{constructor(t){e(this,t);this.uri="pod-os:dashboard"}render(){return this.uri==="pod-os:settings"?n("pos-app-settings",null):n("pos-app-dashboard",null)}};const Io=class{constructor(t){e(this,t);this.subscribeResource=a(this,"pod-os:resource",7);this.receiveResource=t=>{this.resource=t}}componentWillLoad(){Y(this)}render(){return this.resource?this.resource.label():null}};const So=".container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}";const _o=So;const jo=class{constructor(t){e(this,t);this.initializeOsEmitter=a(this,"pod-os:init",7);this.setOs=async t=>{this.os=t}}componentWillLoad(){this.initializeOsEmitter.emit(this.setOs)}login(t){const e=t.detail;this.os.login(e)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return n(o,{key:"3a9b64d2fde82e4067095067d852f3a793c9c6a2"},n("div",{key:"36ce0bb0f9d85b90f5faf9dc47c64c8d0dcf88e9",class:"container"},B.state.isLoggedIn?n("pos-resource",{uri:B.state.webId},n("span",{class:"user-data"},n("pos-picture",null),n("pos-label",null))):"",!B.state.isLoggedIn&&n("button",{key:"228a4dd94d2497acc6f3ecd13f70e2ff40daf8dc",id:"login",onClick:()=>this.openDialog()},"Login"),B.state.isLoggedIn&&n("button",{key:"2212c8e0c939656179a66c2b3ff74227dab42476",id:"logout",onClick:()=>this.logout()},"Logout")),n("pos-dialog",{key:"2cd9a1060b1494606848d3dcaea21cad2ede8103",ref:t=>this.dialog=t},n("span",{key:"4852dc345b9271c6aca71d4615627d76985d548d",slot:"title"},"Sign in to your Pod"),n("pos-login-form",{key:"f6919d6a8863d3c8535ba786a5334741550bc8a5","onPod-os:idp-url-selected":t=>this.login(t),slot:"content"})))}};jo.style=_o;const Co=":host{display:block;margin:0}form{display:flex;flex-direction:column;gap:var(--size-4)}input{outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within{outline:var(--pos-input-focus-outline)}input#login{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#login:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#login:hover:not(:disabled),input#login:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";const Do=Co;const Lo=class{constructor(t){e(this,t);this.idpUrlSelected=a(this,"pod-os:idp-url-selected",7);this.idpUrl="";this.canSubmit=false}validate(){this.canSubmit=Boolean(this.idpUrl)}render(){return n("form",{key:"6c54aa03972bf5af3779c1e3f874b99574232821",method:"dialog",onSubmit:()=>this.handleSubmit()},n("label",{key:"a5def7569abeb0a2591886d48fa0deb2c7f6039c",htmlFor:"idpUrl"},"Please enter your Identity Provider"),n("input",{key:"1da8575dccea9a777f00cb8a7f96435654a582bc",id:"idpUrl",type:"url",value:this.idpUrl,required:true,onInput:t=>this.handleChange(t),list:"suggestedIssuers",placeholder:"Type to search..."}),n("datalist",{key:"1818988df2f8a825194eb3503979d6c6adac3619",id:"suggestedIssuers"},n("option",{key:"25e1b3fd84610e0664c25c3ca9cd535bf7558357",value:"https://solidcommunity.net"},"solidcommunity.net"),n("option",{key:"5635e434dc4bf406a3664cf5cb28489b5b9218fc",value:"https://solidweb.org"},"solidweb.org"),n("option",{key:"d4d301023b40f84b5f445d14290ef3bc589cff56",value:"https://solidweb.me"},"solidweb.me"),n("option",{key:"39f968af206347c83e4271724e9090543fcec43e",value:"https://inrupt.net"},"inrupt.net"),n("option",{key:"381767d06a60e16b9323cb15b4298db2eac71d82",value:"https://login.inrupt.com"},"Inrupt PodSpaces"),n("option",{key:"d4461d0bb2bfba0ec97f276951b6534dee1ffd51",value:"https://trinpod.us"},"trinpod.us"),n("option",{key:"80aa0ef7de3ec8dd53d06402c116a6c97747a24f",value:"https://use.id"},"use.id"),n("option",{key:"794bee3c5a2b29738f25bb67bfb918754fe016ef",value:"https://solid.redpencil.io"},"redpencil.io"),n("option",{key:"88e27225e7252c90bfb24f21a72bd70c9e3408f4",value:"https://datapod.grant.io"},"Data Pod (grant.io)"),n("option",{key:"033b75773e898b4fed2507c5064686fb0ad56e03",value:"https://teamid.live"},"teamid.live")),n("input",{key:"c8dc41c5d6a892e623d42f5b1839af2728929abd",id:"login",type:"submit",value:"Login",disabled:!this.canSubmit}))}handleChange(t){this.validate();this.idpUrl=t.target.value}async handleSubmit(){this.idpUrlSelected.emit(this.idpUrl)}static get delegatesFocus(){return true}static get watchers(){return{idpUrl:["validate"]}}};Lo.style=Do;const To="button.main {\n display: flex;\n transition:\n width 200ms,\n background-color 500ms,\n color 500ms,\n border-color 500ms;\n max-width: var(--size-40);\n flex-direction: row;\n overflow: hidden;\n height: var(--pos-navigation-bar-height);\n width: var(--pos-navigation-bar-height);\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-md);\n color: var(--pos-subtle-text-color);\n border: var(--size-px) dashed var(--pos-subtle-text-color);\n background-color: var(--pos-background-color);\n\n p {\n padding: 0;\n margin: 0;\n display: none;\n white-space: nowrap;\n }\n\n &.success {\n color: var(--color-green-700);\n border-color: var(--color-green-700);\n border-style: solid;\n background-color: var(--color-green-100);\n }\n\n &:active {\n transform: scale(0.99);\n filter: brightness(90%);\n }\n &:focus {\n outline: var(--pos-input-focus-outline);\n }\n}\n\n.options {\n position: absolute;\n animation: fadeIn 300ms;\n padding: 0;\n margin-top: var(--size-1);\n z-index: var(--layer-top);\n\n ol {\n display: flex;\n flex-direction: column;\n box-shadow: var(--shadow-md);\n backdrop-filter: var(--blur-md);\n border-radius: var(--radius-xs);\n overflow: hidden;\n color: var(--color-grey-900);\n background-color: var(--color-grey-200);\n padding: 0;\n margin: 0;\n list-style: none;\n label {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n transition: all 300ms var(--ease-in-out-sine);\n margin: 0;\n border: none;\n outline: none;\n padding: var(--size-2);\n width: var(--size-full);\n\n &:hover,\n &:focus {\n filter: brightness(80%);\n }\n\n &:active {\n filter: brightness(90%);\n }\n }\n }\n label:has(input:checked) {\n background-color: var(--color-green-100);\n }\n}\n\nsvg {\n display: inline-block;\n height: var(--size-6);\n flex-shrink: 0;\n flex-grow: 0;\n width: var(--size-6);\n}\n\nbutton.main:hover,\nbutton.open {\n &.success {\n background: var(--color-green-200);\n }\n width: var(--size-full);\n height: var(--pos-navigation-bar-height);\n background: var(--pos-background-color);\n color: var(--pos-normal-text-color);\n\n p {\n display: inline-block;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n";const Po=To;const $o=class{constructor(t){e(this,t);this.subscribePodOs=a(this,"pod-os:init",7);this.errorEmitter=a(this,"pod-os:error",7);this.indexUpdatedEmitter=a(this,"pod-os:search:index-updated",7);this.indexCreatedEmitter=a(this,"pod-os:search:index-created",7);this.indexes=[];this.showOptions=false;this.isIndexed=false;this.receivePodOs=async t=>{this.os=t;this.thing=this.os.store.get(this.uri);this.getLabelIndexes(B.state.profile);this.unsubscribeSessionChange=B.onChange("profile",(t=>{this.getLabelIndexes(t)}))}}componentWillLoad(){N(this)}disconnectedCallback(){this.unsubscribeSessionChange&&this.unsubscribeSessionChange()}hideOptions(t){if(!this.el.contains(t.target)){this.showOptions=false}}handleKeyDown(t){if(t.key==="Escape"){this.showOptions=false}}updateUri(t){this.thing=this.os.store.get(t);this.isIndexed=this.checkIfIndexed(t)}checkIfIndexed(t){return this.indexes.some((e=>e.contains(t)))}getLabelIndexes(t){if(t){this.indexes=t.getPrivateLabelIndexes().map((t=>this.os.store.get(t).assume(W)));this.isIndexed=this.checkIfIndexed(this.uri)}}async onClick(t){t.preventDefault();if(this.indexes.length===1){const t=this.indexes[0];await this.addToLabelIndex(t);this.indexUpdatedEmitter.emit(t)}else if(this.indexes.length>1){this.showOptions=!this.showOptions}else{const t=await this.createDefaultLabelIndex();await this.addToLabelIndex(t);this.indexCreatedEmitter.emit(t)}}async addToLabelIndex(t){try{await this.os.addToLabelIndex(this.thing,t);this.isIndexed=true}catch(t){this.errorEmitter.emit(t)}this.showOptions=false}async createDefaultLabelIndex(){try{return await this.os.createDefaultLabelIndex(B.state.profile)}catch(t){this.errorEmitter.emit(t)}}render(){if(!B.state.isLoggedIn||!this.uri){return null}const t="Make this findable";return n(o,null,n("button",{type:"button","aria-label":t,class:{main:true,open:this.showOptions,success:this.isIndexed},onClick:t=>this.onClick(t),title:""},this.isIndexed?n(Mo,null):n(Eo,null),n("p",null,t)),this.showOptions&&n("div",{class:"options"},n("ol",{role:"listbox"},this.indexes.map((t=>n("li",{role:"option"},n("label",null,n("input",{type:"checkbox",checked:t.contains(this.uri),onChange:e=>this.chooseOption(e,t)}),n("pos-resource",{uri:t.uri,lazy:true},n("pos-label",null)))))))))}async chooseOption(t,e){t.preventDefault();await this.addToLabelIndex(e);this.indexUpdatedEmitter.emit(e)}get el(){return r(this)}static get watchers(){return{uri:["updateUri"]}}};const Eo=()=>n("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"}));const Mo=()=>n("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}));$o.style=Po;const Oo=":host {\n --pos-navigation-bar-height: var(--size-10);\n}\n\nsearch {\n position: relative;\n}\n\n.suggestions ol {\n border: 1px solid var(--pos-border-color);\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.suggestions {\n width: 100%;\n overflow-y: auto;\n max-height: 90dvh;\n li {\n padding: 1rem;\n background-color: var(--pos-background-color);\n pos-rich-link {\n --background-color: inherit;\n }\n &[aria-selected='true'] {\n background-color: var(--pos-primary-color);\n &:hover {\n background-color: var(--pos-primary-color);\n }\n }\n &:hover {\n background-color: var(--pos-border-color);\n }\n }\n}\n\n.suggestions li.selected pos-rich-link {\n --label-color: white;\n --description-color: var(--pos-border-color);\n --uri-color: var(--pos-subtle-text-color);\n}\n\ndialog {\n position: absolute;\n margin-top: calc(-1 * var(--pos-navigation-bar-height));\n padding: 0;\n width: 100%;\n max-width: 100%;\n min-width: 100%;\n overflow: hidden;\n max-height: 100dvh;\n background-color: var(--pos-background-color);\n color: var(--pos-normal-text-color);\n border: var(--pos-border-color);\n border-radius: var(--radius-md);\n box-shadow: var(--shadow-md);\n form {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n align-items: center;\n input {\n display: flex;\n font-size: var(--scale-1);\n height: var(--pos-navigation-bar-height);\n border-top-left-radius: var(--radius-md);\n border-top-right-radius: var(--radius-md);\n padding-left: var(--size-2);\n width: 100%;\n border: none;\n outline: none;\n color: var(--pos-normal-text-color);\n background-color: var(--pos-input-background-color);\n box-sizing: border-box;\n }\n }\n}\n\ndialog[open] {\n display: flex;\n z-index: var(--layer-top);\n animation: slideIn 100ms ease-out;\n}\n\n@media (max-width: 640px) {\n search {\n position: unset;\n }\n dialog {\n margin-top: var(--size-1);\n top: 0;\n width: 95dvw;\n max-width: unset;\n min-width: unset;\n form {\n input {\n height: var(--size-12);\n font-size: var(--scale-fluid-3);\n }\n }\n }\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n";const Xo=Oo;const Bo=class{constructor(t){e(this,t);this.subscribePodOs=a(this,"pod-os:init",7);this.linkEmitter=a(this,"pod-os:link",7);this.uri="";this.inputValue=this.uri;this.searchIndex=undefined;this.suggestions=[];this.selectedIndex=-1;this.resource=null;this.changeEvents=new mn;this.debouncedSearch=null;this.receivePodOs=async t=>{this.os=t}}updateResource(){var t;try{this.resource=this.uri?(t=this.os)===null||t===void 0?void 0:t.store.get(this.uri):null}catch(t){this.resource=null}}componentWillLoad(){N(this);this.updateResource();B.onChange("isLoggedIn",(async t=>{if(t){await this.buildSearchIndex()}else{this.clearSearchIndex()}}));this.debouncedSearch=this.changeEvents.pipe(Kn(300)).subscribe((()=>this.search()))}disconnectedCallback(){var t;(t=this.debouncedSearch)===null||t===void 0?void 0:t.unsubscribe()}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex(B.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}openNavigationDialog(t){var e,n;this.resource=t.detail;if(t.detail){this.inputValue=t.detail.uri;this.search()}(e=this.inputRef)===null||e===void 0?void 0:e.select();(n=this.dialogRef)===null||n===void 0?void 0:n.show()}clearSearchIndex(){var t;(t=this.searchIndex)===null||t===void 0?void 0:t.clear()}onChange(t){this.inputValue=t.target.value;this.changeEvents.next()}closeDialog(){var t;(t=this.dialogRef)===null||t===void 0?void 0:t.close();this.selectedIndex=-1}clearSuggestions(){var t;this.suggestions=[];(t=this.dialogRef)===null||t===void 0?void 0:t.close();this.selectedIndex=-1}onClickSelf(t){t.stopPropagation()}handleKeyDown(t){if(t.key==="Escape"){this.closeDialog()}else if(t.key==="ArrowDown"){t.preventDefault();this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)}else if(t.key==="ArrowUp"){t.preventDefault();this.selectedIndex=Math.max(this.selectedIndex-1,0)}}search(){if(this.searchIndex){this.suggestions=this.inputValue?this.searchIndex.search(this.inputValue):[]}}onSubmit(){if(this.suggestions&&this.selectedIndex>-1){this.linkEmitter.emit(this.suggestions[this.selectedIndex].ref)}else{this.linkEmitter.emit(this.inputValue)}}render(){return n("nav",{key:"311e48ae67c07f4e04bbd0c78ae85103c937a2d6"},n("search",{key:"d39bad3a0e6fdd3eabb5fc019fbe9c311dc9adea"},n("pos-navigation-bar",{key:"032bf46e40d5f857c6ce597f6c43875f054c65e7",searchIndexReady:this.searchIndex!==undefined,current:this.resource}),n("dialog",{key:"5e54d2658efb7b494fc585456e3b7c72782c8938",ref:t=>this.dialogRef=t},n("form",{key:"59d12120091dc9f343d006d7e01fde90c1e2e3ea",method:"dialog",onSubmit:()=>this.onSubmit()},n("input",{key:"5d415b87143ab28c8db0a003e235db63305d3094",ref:t=>this.inputRef=t,enterkeyhint:"search","aria-label":"Search or enter URI",placeholder:"Search or enter URI",value:this.uri,onChange:t=>this.onChange(t),onInput:t=>this.onChange(t),role:"combobox","aria-autocomplete":"list","aria-expanded":this.suggestions.length>0,"aria-controls":"suggestions-list","aria-activedescendant":this.selectedIndex>=0?`option-${this.selectedIndex}`:null}),this.suggestions.length>0?n("div",{class:"suggestions"},n("ol",{id:"suggestions-list",role:"listbox","aria-label":"Search results"},this.suggestions.map(((t,e)=>n("li",{id:`option-${e}`,role:"option","aria-selected":e===this.selectedIndex?"true":"false"},n("pos-rich-link",{uri:t.ref})))))):null))))}static get watchers(){return{uri:["updateResource"],os:["updateResource"]}}};Bo.style=Xo;const Ao="section.current {\n display: flex;\n height: var(--pos-navigation-bar-height);\n flex-grow: 1;\n gap: 0;\n background-color: var(--pos-input-background-color);\n border-radius: var(--radius-md);\n width: 100%;\n &:focus-within {\n outline: var(--pos-input-focus-outline);\n }\n}\n\nsection.current button {\n cursor: pointer;\n font-size: var(--scale-1);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n background: none;\n color: var(--pos-normal-text-color);\n outline: none;\n border: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:focus {\n text-decoration: underline;\n }\n :first-child {\n flex-grow: 1;\n }\n svg {\n width: var(--size-6);\n color: var(--pos-subtle-text-color);\n }\n}\n";const Ro=Ao;const Uo=class{constructor(t){e(this,t);this.navigate=a(this,"pod-os:navigate",7)}onClick(){this.navigate.emit(this.current)}activate(t){if((t.ctrlKey||t.metaKey)&&t.key==="k"){t.preventDefault();this.navigate.emit(this.current)}}render(){const t=this.current?`${this.current.label()} (Click to search or enter URI)`:"Search or enter URI";return n("section",{key:"3bdf8dfb639a32796ffec2e5f8b65d553ea7bf60",class:"current"},this.current&&this.searchIndexReady&&n("pos-make-findable",{key:"4cb1e1c567be23d856564e3a7404b1be73cda8d7",uri:this.current.uri}),n("button",{key:"0b29bcc329bc9f5d053ff711109b1c06b368c33e","aria-label":t,onClick:()=>this.onClick()},n("div",{key:"48c7c2f062a87f8e5f7742f5839e351d56ff2c13"},this.current?this.current.label():"Search or enter URI"),this.icon()))}icon(){return n("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}};Uo.style=Ro;const Wo=":host{display:block}form{display:grid;grid-template-columns:var(--size-16) 1fr;grid-gap:var(--scale-0)}label{grid-column:1 / 2;display:flex;align-items:center;justify-content:flex-end}input,pos-select-term,button{grid-column:2 / 3}input,pos-select-term::part(input){outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within,pos-select-term::part(input):focus-within{outline:var(--pos-input-focus-outline)}#new-uri{grid-column:1/3;cursor:default;word-break:break-all;color:var(--pos-normal-text-color);font-weight:var(--weight-light);background:var(--pos-disabled-color);padding:var(--scale-000);border-radius:var(--radius-xs)}input#create{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#create:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#create:hover:not(:disabled),input#create:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";const Yo=Wo;const No=class{constructor(t){e(this,t);this.linkEmitter=a(this,"pod-os:link",7);this.errorEmitter=a(this,"pod-os:error",7);this.subscribePodOs=a(this,"pod-os:init",7);this.canSubmit=false;this.receivePodOs=async t=>{this.os=t}}validate(){this.canSubmit=Boolean(this.name&&this.selectedTypeUri)}componentWillLoad(){N(this)}render(){return n("form",{key:"1091c0db993d79f6d1f0c9ac9003c544b2894709",method:"dialog",onSubmit:t=>this.handleSubmit(t)},n("label",{key:"cce3f98c89a7e820556e18ea28553774324a01a1",htmlFor:"type"},"Type"),n("pos-select-term",{key:"72708f95553609006df33b02047421599d0167f0",id:"type",placeholder:"",value:this.selectedTypeUri,"onPod-os:term-selected":t=>this.onTermSelected(t)}),n("label",{key:"a1344f66396ec7b9a0a6a298694f832e62329ce3",htmlFor:"name"},"Name"),n("input",{key:"5f006bac7be0734dbd39edbad0f30d392bf09bad",id:"name",type:"text",value:this.name,onInput:t=>this.handleChange(t)}),this.newUri?n("div",{id:"new-uri",title:"This will be the URI of the new thing"},this.newUri):null,n("input",{key:"91c88406fd206ba0211e75d01cca16434fe7f74a",id:"create",type:"submit",value:"Create",disabled:!this.canSubmit}))}handleChange(t){this.name=t.target.value;this.newUri=this.os.proposeUriForNewThing(this.referenceUri,this.name)}onTermSelected(t){this.selectedTypeUri=t.detail.uri}async handleSubmit(t){try{await this.os.addNewThing(this.newUri,this.name,this.selectedTypeUri);this.linkEmitter.emit(this.newUri);this.reset()}catch(e){t.preventDefault();this.errorEmitter.emit(e)}}reset(){this.name="";this.newUri="";this.selectedTypeUri=""}static get delegatesFocus(){return true}static get watchers(){return{name:["validate"],selectedTypeUri:["validate"]}}};No.style=Yo;const Fo=":host{--width:300px;--height:300px;--border-radius:var(--border-radius, 0);--object-fit:var(--object-fit, cover)}";const Ho=Fo;const Go=class{constructor(t){e(this,t);this.subscribeResource=a(this,"pod-os:resource",7);this.blurredBackground=false;this.receiveResource=t=>{this.resource=t}}componentWillLoad(){Y(this)}render(){const t=this.resource?this.resource.picture():null;if(!t)return null;return n("pos-image",{blurredBackground:this.blurredBackground,src:t.url,alt:this.resource.label()})}};Go.style=Ho;const qo="details.error {\n margin: var(--size-2);\n background-color: var(--pos-error-background-color);\n border: var(--size-px) solid var(--pos-error-border-color);\n padding: var(--size-2);\n border-radius: var(--radius-md);\n\n a {\n color: var(--pos-normal-text-color);\n }\n}\n";const Ko=qo;const Zo=class{constructor(t){e(this,t);this.subscribePodOs=a(this,"pod-os:init",7);this.resourceLoadedEmitter=a(this,"pod-os:resource-loaded",7);this.consumers=[];this.lazy=false;this.loading=true;this.receivePodOs=async t=>{this.os=t}}componentWillLoad(){B.onChange("isLoggedIn",(()=>this.loadResource()));N(this)}async provideResource(t){t.stopPropagation();if(this.resource){t.detail(this.resource)}this.consumers.push(t)}async loadResource(){await this.getResource(!this.lazy)}async fetch(){await this.getResource(true)}async getResource(t=false){try{if(t){this.loading=true;await this.os.fetch(this.uri);this.resourceLoadedEmitter.emit(this.uri)}this.resource=this.os.store.get(this.uri);this.error=null;this.consumers.forEach((t=>{t.detail(this.resource)}))}catch(t){this.error=t}finally{this.loading=false}}render(){if(this.loading){return n("ion-progress-bar",{type:"indeterminate"})}if(this.error){return n("details",{class:"error"},n("summary",{title:"Click to expand"},"⚠ Sorry, something went wrong"),n("p",null,"Status:",this.error.status),n("p",null,this.error.message),n("p",null,"You can try to open the link outside PodOS: ",n("a",{href:this.uri},this.uri)))}return n("slot",null)}static get watchers(){return{os:["loadResource"],uri:["loadResource"]}}};Zo.style=Ko;const Vo=":host {\n --background-color: inherit;\n --label-color: var(--pos-normal-text-color);\n --description-color: var(--pos-normal-text-color);\n --uri-color: var(--pos-subtle-text-color);\n --font-family: var(--font-sans);\n}\n\np.content {\n background-color: var(--background-color);\n line-height: var(--line-xs);\n margin: 0;\n display: flex;\n flex-direction: column;\n align-items: baseline;\n gap: var(--size-1);\n\n .url {\n font-size: var(--scale-fluid-1);\n color: var(--pos-subtle-text-color);\n }\n}\n\na {\n color: var(--label-color);\n max-width: min(100%, var(--prose-lg));\n text-decoration: underline;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n text-decoration-thickness: var(--size-px);\n}\n\npos-label {\n color: var(--label-color);\n font-size: var(--scale-fluid-2);\n margin-bottom: var(--size-1);\n}\n\npos-description {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n font-weight: var(--weight-light);\n color: var(--description-color);\n font-size: var(--scale-fluid-2);\n}\n\n@media (min-width: 640px) {\n pos-label {\n font-size: var(--scale-fluid-0);\n }\n pos-description {\n font-size: var(--scale-fluid-1);\n }\n\n p.content {\n .url {\n font-size: var(--scale-fluid-000);\n }\n }\n}\n";const Jo=Vo;const Qo=class{constructor(t){e(this,t);this.linkEmitter=a(this,"pod-os:link",7)}render(){return n("pos-resource",{key:"95aa9fbc121e27b106845f4c6de96088f7538310",lazy:true,uri:this.uri},n("p",{key:"a277291f4c795c7c2e9c9e41ab899fe660ec67a9",class:"content"},n("a",{key:"b83e27d371214673bc8fe740573b4b65b2479af8",href:this.uri,onClick:t=>{t.preventDefault();this.linkEmitter.emit(this.uri)}},n("pos-label",{key:"5c4dacc2f5b0dc18664ef5e04bc024efb2547e34"})),n("span",{key:"35cb283d89ce6f631c5e3fde3035244a0374daa0",class:"url"},new URL(this.uri).host),n("pos-description",{key:"12d5833f05f5759c16d579d5a62742b871ff964f"})))}};Qo.style=Jo;const tr=(t,e,n)=>{const o=t.get(e);if(!o){t.set(e,[n])}else if(!o.includes(n)){o.push(n)}};const er=(t,e)=>{let n;return(...o)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;t(...o)}),e)}};const nr=t=>!("isConnected"in t)||t.isConnected;const or=er((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(nr))}}),2e3);const rr=()=>{if(typeof c!=="function"){return{}}const t=new Map;return{dispose:()=>t.clear(),get:e=>{const n=c();if(n){tr(t,e,n)}},set:e=>{const n=t.get(e);if(n){t.set(e,n.filter(l))}or(t)},reset:()=>{t.forEach((t=>t.forEach(l)));or(t)}}};const ir=(t,e=((t,e)=>t!==e))=>{let n=new Map(Object.entries(t!==null&&t!==void 0?t:{}));const o={dispose:[],get:[],set:[],reset:[]};const r=()=>{n=new Map(Object.entries(t!==null&&t!==void 0?t:{}));o.reset.forEach((t=>t()))};const i=()=>{o.dispose.forEach((t=>t()));r()};const s=t=>{o.get.forEach((e=>e(t)));return n.get(t)};const a=(t,r)=>{const i=n.get(t);if(e(r,i,t)){n.set(t,r);o.set.forEach((e=>e(t,r,i)))}};const c=typeof Proxy==="undefined"?{}:new Proxy(t,{get(t,e){return s(e)},ownKeys(t){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return n.has(e)},set(t,e,n){a(e,n);return true}});const l=(t,e)=>{o[t].push(e);return()=>{sr(o[t],e)}};const d=(e,n)=>{const o=l("set",((t,o)=>{if(t===e){n(o)}}));const r=l("reset",(()=>n(t[e])));return()=>{o();r()}};const u=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(l("set",e.set))}if(e.get){t.push(l("get",e.get))}if(e.reset){t.push(l("reset",e.reset))}if(e.dispose){t.push(l("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const h=t=>{const e=n.get(t);o.set.forEach((n=>n(t,e,e)))};return{state:c,get:s,set:a,on:l,onChange:d,use:u,dispose:i,reset:r,forceUpdate:h}};const sr=(t,e)=>{const n=t.indexOf(e);if(n>=0){t[n]=t[t.length-1];t.length--}};const ar=(t,e)=>{const n=ir(t,e);n.use(rr());return n};const cr=t=>{var e;const n=window;const o=new URL(n.location.href);const r=(e=t===null||t===void 0?void 0:t.parseURL)!==null&&e!==void 0?e:dr;const{state:i,onChange:s,dispose:a}=ar({url:o,activePath:r(o)},((t,e,n)=>{if(n==="url"){return t.href!==e.href}return t!==e}));const c=t=>{history.pushState(null,null,t);const e=new URL(t,document.baseURI);i.url=e;i.activePath=r(e)};const l=t=>{const{activePath:e}=i;for(let n of t){const o=lr(e,n.path);if(o){if(n.to!=null){const o=typeof n.to==="string"?n.to:n.to(e);c(o);return l(t)}else{return{params:o,route:n}}}}return undefined};const d=()=>{const t=new URL(n.location.href);i.url=t;i.activePath=r(t)};const u=(t,e)=>{const n=l(e);if(n){if(typeof n.route.jsx==="function"){return n.route.jsx(n.params)}else{return n.route.jsx}}};const h=()=>{n.removeEventListener("popstate",d);a()};const f={Switch:u,get url(){return i.url},get activePath(){return i.activePath},push:c,onChange:s,dispose:h};d();n.addEventListener("popstate",d);return f};const lr=(t,e)=>{if(typeof e==="string"){if(e===t){return{}}}else if(typeof e==="function"){const n=e(t);if(n){return n===true?{}:{...n}}}else{const n=e.exec(t);if(n){e.lastIndex=0;return{...n}}}return undefined};const dr=t=>t.pathname.toLowerCase();const ur=".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation{flex-grow:1}";const hr=ur;const fr=cr();const pr=class{constructor(t){e(this,t);this.routeChanged=a(this,"pod-os:route-changed",7);this.mode="standalone"}linkClicked(t){this.navigate(t.detail)}sessionRestored(t){fr.push(t.detail.url)}componentWillLoad(){this.updateUri();fr.onChange("url",(()=>{this.updateUri()}))}navigate(t){fr.push("?uri="+encodeURIComponent(t))}updateUri(){this.uri=new URLSearchParams(window.location.search).get("uri")||(this.mode==="standalone"?"pod-os:dashboard":window.location.href);this.routeChanged.emit(this.uri)}render(){return n("slot",{key:"2775fc2835158ccd8d540e4f27edfd497eafe7a9"})}};pr.style=hr;const br=":host{display:block}input{background-color:transparent;color:var(--pos-normal-text-color);border:none;padding-top:1rem;padding-bottom:1rem}input:focus{outline:none}";const gr=br;const mr=class{constructor(t){e(this,t);this.subscribePodOs=a(this,"pod-os:init",7);this.termSelected=a(this,"pod-os:term-selected",7);this.placeholder="Type to search...";this.value="";this.terms=[];this.receivePodOs=async t=>{this.os=t}}componentWillLoad(){N(this)}setTerms(){this.terms=this.os.listKnownTerms()}handleChange(t){this.termSelected.emit({uri:t.target.value})}render(){return n(o,{key:"87e4eddf409058ee5fc4c3da0d26f06b10814baa"},n("input",{key:"b7c3c9644cfd438806263a1f5cc721f8409cfe45",part:"input",list:"terms",placeholder:this.placeholder,value:this.value,onChange:t=>this.handleChange(t)}),n("datalist",{key:"834ad0a974db76a5295501ba7231bd190d57b98b",part:"terms",id:"terms"},this.terms.map((t=>n("option",{value:t.uri},t.shorthand)))))}static get delegatesFocus(){return true}static get watchers(){return{os:["setTerms"]}}};mr.style=gr;const vr=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}svg{width:var(--size-8)}h2{display:flex;align-items:center}p{padding:var(--size-2)}.info{color:var(--color-grey-900);background-color:var(--color-blue-200)}.warn{color:var(--color-grey-900);background-color:var(--color-yellow-200)}";const yr=vr;const wr=class{constructor(t){e(this,t)}render(){return n(o,{key:"b598a0dbe21fe9e7f1aa0f51f0b53c270feb8add"},n("div",{key:"5cec10cc63203c8421bbb627643f1365899cc850"},n("h2",{key:"094528da7d8567e8a2ba6e82fb1c05b2f4dc7b22"},n("svg",{key:"3d3e8b17420ba7352877eb1c6bca17d3791b1bd6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},n("path",{key:"065bc78382b03bd2bcc3c812a71e9f27c4e3251c","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})),"Cache Settings"),n("p",{key:"5e5d2ec497039791f82a857a709157e6b97efdfe",class:"info"},"ℹ Enable offline cache to be able to access previously loaded data while offline."),n("p",{key:"d4ff4a3a17df1e5ed7ce076abbf98def4ebdac7d",class:"warn"},"⚠ Private data may be stored on this device. Only enable it, if you trust this device."),n("label",{key:"1d1aa4f7b4b5fa53080cc5635a20ccee3faee29d"},n("input",{key:"4223888802ea51dec26a3d23abdd9c28098de5aa",type:"checkbox",checked:Vt.state.offlineCache,onChange:t=>Vt.state.offlineCache=t.target.checked}),"Enable offline cache")))}};wr.style=yr;var kr;(function(t){t["Generic"]="pos-app-generic";t["RdfDocument"]="pos-app-rdf-document";t["DocumentViewer"]="pos-app-document-viewer";t["ImageViewer"]="pos-app-image-viewer";t["LdpContainer"]="pos-app-ldp-container"})(kr||(kr={}));function xr(t,e){return t.some((t=>t.uri===e))}function zr(t){if(xr(t,"http://www.w3.org/ns/ldp#Container")){return kr.LdpContainer}else if(xr(t,"http://www.w3.org/2007/ont/link#RDFDocument")){return kr.RdfDocument}else if(xr(t,"http://www.w3.org/ns/iana/media-types/application/pdf#Resource")){return kr.DocumentViewer}else if(xr(t,"http://purl.org/dc/terms/Image")){return kr.ImageViewer}else if(xr(t,"http://www.w3.org/2007/ont/link#Document")){return kr.DocumentViewer}else{return kr.Generic}}const Ir=class{constructor(t){e(this,t);this.subscribeResource=a(this,"pod-os:resource",7);this.receiveResource=t=>{this.types=t.types()}}componentWillLoad(){Y(this)}render(){return this.types?this.renderApp():null}renderApp(){const t=zr(this.types);return n(t,null)}};export{ht as ion_icon,yt as ion_progress_bar,It as ion_ripple_effect,Lt as ion_skeleton_text,Yt as ion_toast,qt as pos_add_new_thing,Vn as pos_app,to as pos_app_browser,ro as pos_app_dashboard,ao as pos_app_settings,co as pos_description,ho as pos_dialog,fo as pos_error_toast,go as pos_example_resources,yo as pos_getting_started,xo as pos_image,zo as pos_internal_router,Io as pos_label,jo as pos_login,Lo as pos_login_form,$o as pos_make_findable,Bo as pos_navigation,Uo as pos_navigation_bar,No as pos_new_thing_form,Go as pos_picture,Zo as pos_resource,Qo as pos_rich_link,pr as pos_router,mr as pos_select_term,wr as pos_setting_offline_cache,Ir as pos_type_router};
20
- //# sourceMappingURL=p-b80dbf24.entry.js.map