├── .gitignore ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── LICENSE ├── LICENSE.txt ├── README.md ├── docs ├── assets │ ├── icons │ │ ├── 192x192.png │ │ ├── 24x24.png │ │ ├── 48x48.png │ │ ├── 512x512.png │ │ ├── icon_192.png │ │ ├── icon_24.png │ │ ├── icon_48.png │ │ └── icon_512.png │ ├── readme │ │ ├── build-output.png │ │ ├── codespace-button.png │ │ ├── copy-starter.png │ │ ├── git-clone.png │ │ ├── intro.png │ │ ├── local-button.png │ │ ├── new-repo-from-starter.png │ │ ├── pwa-running.png │ │ ├── pwa-starter-overview.png │ │ ├── static-web-app-slash.png │ │ ├── use-this-template.png │ │ └── vscode-in-browser.png │ └── screenshots │ │ ├── screen.png │ │ └── widget-screen.png ├── code │ ├── app-about-1651504e.js │ ├── app-about-1651504e.js.map │ ├── index-b6000672.js │ ├── index-b6000672.js.map │ ├── index-befe9693.css │ ├── index-d961e0b8.js │ ├── index-d961e0b8.js.map │ ├── nordhealth-mono-561592b9.woff │ └── nordhealth-sans-5156501c.woff2 ├── index.html ├── manifest.json ├── staticwebapp.config.json ├── sw.js ├── sw.js.map └── widget │ ├── ac.json │ └── data.json ├── index.html ├── package-lock.json ├── package.json ├── public ├── assets │ ├── icons │ │ ├── 192x192.png │ │ ├── 24x24.png │ │ ├── 48x48.png │ │ ├── 512x512.png │ │ ├── icon_192.png │ │ ├── icon_24.png │ │ ├── icon_48.png │ │ └── icon_512.png │ ├── readme │ │ ├── build-output.png │ │ ├── codespace-button.png │ │ ├── copy-starter.png │ │ ├── git-clone.png │ │ ├── intro.png │ │ ├── local-button.png │ │ ├── new-repo-from-starter.png │ │ ├── pwa-running.png │ │ ├── pwa-starter-overview.png │ │ ├── static-web-app-slash.png │ │ ├── use-this-template.png │ │ └── vscode-in-browser.png │ └── screenshots │ │ ├── screen.png │ │ └── widget-screen.png ├── manifest.json ├── staticwebapp.config.json ├── sw.js └── widget │ ├── ac.json │ └── data.json ├── src ├── app-index.ts ├── components │ ├── header.ts │ ├── health-kit.ts │ ├── in-app-purchase.ts │ └── push.ts ├── pages │ ├── app-about │ │ ├── about-styles.ts │ │ └── app-about.ts │ └── app-home.ts ├── router.ts └── styles │ ├── global.css │ └── shared-styles.ts ├── swa-cli.config.json ├── tsconfig.json └── vite.config.ts /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | dist 4 | dev-dist 5 | build 6 | types 7 | .idea 8 | .github 9 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "eg2.vscode-npm-script", 4 | "christian-kohler.npm-intellisense", 5 | "ms-edgedevtools.vscode-edge-devtools", 6 | "PWABuilder.pwa-studio" 7 | ] 8 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "pwa-msedge", 9 | "request": "launch", 10 | "name": "Run PWA", 11 | "webRoot": "${workspaceFolder}/", 12 | "runtimeArgs": [ 13 | "--app=http://localhost:5173" 14 | ], 15 | "sourceMapPathOverrides": { 16 | "../../src": "${workspaceFolder}/src", 17 | "../../src/*": "${workspaceFolder}/src/*" 18 | }, 19 | "preLaunchTask": "npm run dev-task", 20 | "postDebugTask": "postdebugKill" 21 | }, 22 | { 23 | "name": "Launch Microsoft Edge and open the Edge DevTools", 24 | "request": "launch", 25 | "type": "vscode-edge-devtools.debug", 26 | "url": "" // Provide your project's url to finish configuring 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.trimTrailingWhitespace": true, 3 | "markdownlint.config": { 4 | "MD028": false, 5 | "MD025": { 6 | "front_matter_title": "" 7 | } 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "npm run dev-task", 6 | "type": "npm", 7 | "script": "dev-task", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "owner": "custom", 11 | "pattern": { 12 | "regexp": "^$" 13 | }, 14 | "background": { 15 | "activeOnStart": true, 16 | "beginsPattern": ".*", 17 | "endsPattern": "ready in .+" 18 | } 19 | }, 20 | }, 21 | { 22 | "label": "postdebugKill", 23 | "command": "echo ${input:terminate}", 24 | "type": "shell", 25 | "problemMatcher": [] 26 | }, 27 | ], 28 | "inputs": [ 29 | { 30 | "id": "terminate", 31 | "type": "command", 32 | "command": "workbench.action.tasks.terminate", 33 | "args": "npm run dev-task" 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Gleb Khmyznikov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | ManifoldJS 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | All rights reserved. 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## iOS PWA Shell (iPadOS/MacOS) 2 | 3 | [**Heavilly based on PWA Starter**](https://docs.pwabuilder.com/#/starter/quick-start) 4 | 5 | This Demo PWA project is a child project of [ios-pwa-wrap](https://github.com/khmyznikov/ios-pwa-wrap) 6 | 7 | Most of the Demos works only under WKWebView of the related xcode project. 8 | 9 | ![home screen](https://github.com/khmyznikov/ios-pwa-shell/assets/6115884/0f63859d-1ad2-4459-b6b6-18f6ac249e65) 10 | 11 | _WIP, not a final code_ 12 | -------------------------------------------------------------------------------- /docs/assets/icons/192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/192x192.png -------------------------------------------------------------------------------- /docs/assets/icons/24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/24x24.png -------------------------------------------------------------------------------- /docs/assets/icons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/48x48.png -------------------------------------------------------------------------------- /docs/assets/icons/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/512x512.png -------------------------------------------------------------------------------- /docs/assets/icons/icon_192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/icon_192.png -------------------------------------------------------------------------------- /docs/assets/icons/icon_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/icon_24.png -------------------------------------------------------------------------------- /docs/assets/icons/icon_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/icon_48.png -------------------------------------------------------------------------------- /docs/assets/icons/icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/icons/icon_512.png -------------------------------------------------------------------------------- /docs/assets/readme/build-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/build-output.png -------------------------------------------------------------------------------- /docs/assets/readme/codespace-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/codespace-button.png -------------------------------------------------------------------------------- /docs/assets/readme/copy-starter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/copy-starter.png -------------------------------------------------------------------------------- /docs/assets/readme/git-clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/git-clone.png -------------------------------------------------------------------------------- /docs/assets/readme/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/intro.png -------------------------------------------------------------------------------- /docs/assets/readme/local-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/local-button.png -------------------------------------------------------------------------------- /docs/assets/readme/new-repo-from-starter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/new-repo-from-starter.png -------------------------------------------------------------------------------- /docs/assets/readme/pwa-running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/pwa-running.png -------------------------------------------------------------------------------- /docs/assets/readme/pwa-starter-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/pwa-starter-overview.png -------------------------------------------------------------------------------- /docs/assets/readme/static-web-app-slash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/static-web-app-slash.png -------------------------------------------------------------------------------- /docs/assets/readme/use-this-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/use-this-template.png -------------------------------------------------------------------------------- /docs/assets/readme/vscode-in-browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/readme/vscode-in-browser.png -------------------------------------------------------------------------------- /docs/assets/screenshots/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/screenshots/screen.png -------------------------------------------------------------------------------- /docs/assets/screenshots/widget-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/assets/screenshots/widget-screen.png -------------------------------------------------------------------------------- /docs/code/app-about-1651504e.js: -------------------------------------------------------------------------------- 1 | import{i as at,s as $t,x as mt,e as gt}from"./index-b6000672.js";const yt=at` 2 | @media(min-width: 1000px) { 3 | sl-card { 4 | max-width: 70vw; 5 | } 6 | } 7 | 8 | main { 9 | margin-left: 25px; 10 | } 11 | `,At=at` 12 | @media(min-width: 1000px) { 13 | sl-card { 14 | max-width: 70vw; 15 | } 16 | } 17 | 18 | main { 19 | margin-top: 80px; 20 | } 21 | `;var x=window,V=x.ShadowRoot&&(x.ShadyCSS===void 0||x.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),Z=new WeakMap,lt=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(V&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=Z.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Z.set(s,e))}return e}toString(){return this.cssText}},bt=t=>new lt(typeof t=="string"?t:t+"",void 0,W),ht=(t,...e)=>{const s=t.length===1?t[0]:e.reduce((r,i,o)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1],t[0]);return new lt(s,t,W)},Et=(t,e)=>{V?t.adoptedStyleSheets=e.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet):e.forEach(s=>{const r=document.createElement("style"),i=x.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)})},J=V?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return bt(s)})(t):t,R,O=window,X=O.trustedTypes,St=X?X.emptyScript:"",Y=O.reactiveElementPolyfillSupport,I={toAttribute(t,e){switch(e){case Boolean:t=t?St:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},dt=(t,e)=>e!==t&&(e==e||t==t),M={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:dt},m=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const r=this._$Ep(s,e);r!==void 0&&(this._$Ev.set(r,s),t.push(r))}),t}static createProperty(t,e=M){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||M}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of s)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const r of s)e.unshift(J(r))}else t!==void 0&&e.push(J(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Et(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=M){var r;const i=this.constructor._$Ep(t,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?s.converter:I).toAttribute(e,s.type);this._$El=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(t,e){var s;const r=this.constructor,i=r._$Ev.get(t);if(i!==void 0&&this._$El!==i){const o=r.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:I;this._$El=i,this[i]=n.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,s){let r=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||dt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,i)=>this[i]=r),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostUpdate)===null||i===void 0?void 0:i.call(r)}),this.update(s)):this._$Ek()}catch(r){throw e=!1,this._$Ek(),r}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var r;return(r=s.hostUpdated)===null||r===void 0?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};m.finalized=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},Y?.({ReactiveElement:m}),((R=O.reactiveElementVersions)!==null&&R!==void 0?R:O.reactiveElementVersions=[]).push("1.6.1");var k,T=window,y=T.trustedTypes,F=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,ct="?"+v,wt=`<${ct}>`,A=document,C=(t="")=>A.createComment(t),P=t=>t===null||typeof t!="object"&&typeof t!="function",ut=Array.isArray,Ct=t=>ut(t)||typeof t?.[Symbol.iterator]=="function",S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,Q=/>/g,f=RegExp(`>|[ 22 | \f\r](?:([^\\s"'>=/]+)([ 23 | \f\r]*=[ 24 | \f\r]*(?:[^ 25 | \f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,et=/"/g,pt=/^(?:script|style|textarea|title)$/i,Pt=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),xt=Pt(1),$=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),st=new WeakMap,g=A.createTreeWalker(A,129,null,!1),Ot=(t,e)=>{const s=t.length-1,r=[];let i,o=e===2?"":"",n=S;for(let a=0;a"?(n=i??S,p=-1):h[1]===void 0?p=-2:(p=n.lastIndex-h[2].length,u=h[1],n=h[3]===void 0?f:h[3]==='"'?et:tt):n===et||n===tt?n=f:n===G||n===Q?n=S:(n=f,i=void 0);const _=n===f&&t[a+1].startsWith("/>")?" ":"";o+=n===S?c+wt:p>=0?(r.push(u),c.slice(0,p)+"$lit$"+c.slice(p)+v+_):c+v+(p===-2?(r.push(void 0),a):_)}const l=o+(t[s]||"")+(e===2?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[F!==void 0?F.createHTML(l):l,r]},N=class{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0;const n=t.length-1,l=this.parts,[a,c]=Ot(t,e);if(this.el=N.createElement(a,s),g.currentNode=this.el.content,e===2){const u=this.el.content,h=u.firstChild;h.remove(),u.append(...h.childNodes)}for(;(r=g.nextNode())!==null&&l.length0){r.textContent=y?y.emptyScript:"";for(let p=0;p2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,r){const i=this.strings;let o=!1;if(i===void 0)t=b(this,t,e,0),o=!P(t)||t!==this._$AH&&t!==$,o&&(this._$AH=t);else{const n=t;let l,a;for(t=i[0],l=0;l{var r,i;const o=(r=s?.renderBefore)!==null&&r!==void 0?r:e;let n=o._$litPart$;if(n===void 0){const l=(i=s?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=n=new U(e.insertBefore(C(),l),l,void 0,s??{})}return n._$AI(t),n},D,L,w=class extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=kt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return $}};w.finalized=!0,w._$litElement$=!0,(D=globalThis.litElementHydrateSupport)===null||D===void 0||D.call(globalThis,{LitElement:w});var it=globalThis.litElementPolyfillSupport;it?.({LitElement:w});((L=globalThis.litElementVersions)!==null&&L!==void 0?L:globalThis.litElementVersions=[]).push("3.2.0");/*! Bundled license information: 26 | 27 | @lit/reactive-element/css-tag.js: 28 | (** 29 | * @license 30 | * Copyright 2019 Google LLC 31 | * SPDX-License-Identifier: BSD-3-Clause 32 | *) 33 | 34 | @lit/reactive-element/reactive-element.js: 35 | (** 36 | * @license 37 | * Copyright 2017 Google LLC 38 | * SPDX-License-Identifier: BSD-3-Clause 39 | *) 40 | 41 | lit-html/lit-html.js: 42 | (** 43 | * @license 44 | * Copyright 2017 Google LLC 45 | * SPDX-License-Identifier: BSD-3-Clause 46 | *) 47 | 48 | lit-element/lit-element.js: 49 | (** 50 | * @license 51 | * Copyright 2017 Google LLC 52 | * SPDX-License-Identifier: BSD-3-Clause 53 | *) 54 | 55 | lit-html/is-server.js: 56 | (** 57 | * @license 58 | * Copyright 2022 Google LLC 59 | * SPDX-License-Identifier: BSD-3-Clause 60 | *) 61 | */var Dt=ht` 62 | :host { 63 | box-sizing: border-box; 64 | } 65 | 66 | :host *, 67 | :host *::before, 68 | :host *::after { 69 | box-sizing: inherit; 70 | } 71 | 72 | [hidden] { 73 | display: none !important; 74 | } 75 | `,Lt=ht` 76 | ${Dt} 77 | 78 | :host { 79 | --border-color: var(--sl-color-neutral-200); 80 | --border-radius: var(--sl-border-radius-medium); 81 | --border-width: 1px; 82 | --padding: var(--sl-spacing-large); 83 | 84 | display: inline-block; 85 | } 86 | 87 | .card { 88 | display: flex; 89 | flex-direction: column; 90 | background-color: var(--sl-panel-background-color); 91 | box-shadow: var(--sl-shadow-x-small); 92 | border: solid var(--border-width) var(--border-color); 93 | border-radius: var(--border-radius); 94 | } 95 | 96 | .card__image { 97 | display: flex; 98 | border-top-left-radius: var(--border-radius); 99 | border-top-right-radius: var(--border-radius); 100 | margin: calc(-1 * var(--border-width)); 101 | overflow: hidden; 102 | } 103 | 104 | .card__image::slotted(img) { 105 | display: block; 106 | width: 100%; 107 | } 108 | 109 | .card:not(.card--has-image) .card__image { 110 | display: none; 111 | } 112 | 113 | .card__header { 114 | display: block; 115 | border-bottom: solid var(--border-width) var(--border-color); 116 | padding: calc(var(--padding) / 2) var(--padding); 117 | } 118 | 119 | .card:not(.card--has-header) .card__header { 120 | display: none; 121 | } 122 | 123 | .card:not(.card--has-image) .card__header { 124 | border-top-left-radius: var(--border-radius); 125 | border-top-right-radius: var(--border-radius); 126 | } 127 | 128 | .card__body { 129 | display: block; 130 | padding: var(--padding); 131 | } 132 | 133 | .card--has-footer .card__footer { 134 | display: block; 135 | border-top: solid var(--border-width) var(--border-color); 136 | padding: var(--padding); 137 | } 138 | 139 | .card:not(.card--has-footer) .card__footer { 140 | display: none; 141 | } 142 | `,jt=class{constructor(t,...e){this.slotNames=[],(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if(e.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}},It={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},zt=t=>(...e)=>({_$litDirective$:t,values:e}),Bt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/*! Bundled license information: 143 | 144 | lit-html/directive.js: 145 | (** 146 | * @license 147 | * Copyright 2017 Google LLC 148 | * SPDX-License-Identifier: BSD-3-Clause 149 | *) 150 | */var Vt=zt(class extends Bt{constructor(t){var e;if(super(t),t.type!==It.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var s,r;if(this.nt===void 0){this.nt=new Set,t.strings!==void 0&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!(!((s=this.st)===null||s===void 0)&&s.has(o))&&this.nt.add(o);return this.render(e)}const i=t.element.classList;this.nt.forEach(o=>{o in e||(i.remove(o),this.nt.delete(o))});for(const o in e){const n=!!e[o];n===this.nt.has(o)||!((r=this.st)===null||r===void 0)&&r.has(o)||(n?(i.add(o),this.nt.add(o)):(i.remove(o),this.nt.delete(o)))}return $}});/*! Bundled license information: 151 | 152 | lit-html/directives/class-map.js: 153 | (** 154 | * @license 155 | * Copyright 2018 Google LLC 156 | * SPDX-License-Identifier: BSD-3-Clause 157 | *) 158 | */var vt=Object.defineProperty,Wt=Object.defineProperties,qt=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Zt=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,nt=(t,e,s)=>e in t?vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,_t=(t,e)=>{for(var s in e||(e={}))Zt.call(e,s)&&nt(t,s,e[s]);if(ot)for(var s of ot(e))Jt.call(e,s)&&nt(t,s,e[s]);return t},Xt=(t,e)=>Wt(t,Kt(e)),q=(t,e,s,r)=>{for(var i=r>1?void 0:r?qt(e,s):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(i=(r?n(e,s,i):n(i))||i);return r&&i&&vt(e,s,i),i},Yt=t=>e=>typeof e=="function"?((s,r)=>(customElements.define(s,r),r))(t,e):((s,r)=>{const{kind:i,elements:o}=r;return{kind:i,elements:o,finisher(n){customElements.define(s,n)}}})(t,e),Ft=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?Xt(_t({},e),{finisher(s){s.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function ft(t){return(e,s)=>s!==void 0?((r,i,o)=>{i.constructor.createProperty(o,r)})(t,e,s):Ft(t,e)}var j;((j=window.HTMLSlotElement)===null||j===void 0?void 0:j.prototype.assignedElements)!=null;var K=class extends w{emit(t,e){const s=new CustomEvent(t,_t({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(s),s}};q([ft()],K.prototype,"dir",2);q([ft()],K.prototype,"lang",2);/*! Bundled license information: 159 | 160 | @lit/reactive-element/decorators/custom-element.js: 161 | (** 162 | * @license 163 | * Copyright 2017 Google LLC 164 | * SPDX-License-Identifier: BSD-3-Clause 165 | *) 166 | 167 | @lit/reactive-element/decorators/property.js: 168 | (** 169 | * @license 170 | * Copyright 2017 Google LLC 171 | * SPDX-License-Identifier: BSD-3-Clause 172 | *) 173 | 174 | @lit/reactive-element/decorators/state.js: 175 | (** 176 | * @license 177 | * Copyright 2017 Google LLC 178 | * SPDX-License-Identifier: BSD-3-Clause 179 | *) 180 | 181 | @lit/reactive-element/decorators/base.js: 182 | (** 183 | * @license 184 | * Copyright 2017 Google LLC 185 | * SPDX-License-Identifier: BSD-3-Clause 186 | *) 187 | 188 | @lit/reactive-element/decorators/event-options.js: 189 | (** 190 | * @license 191 | * Copyright 2017 Google LLC 192 | * SPDX-License-Identifier: BSD-3-Clause 193 | *) 194 | 195 | @lit/reactive-element/decorators/query.js: 196 | (** 197 | * @license 198 | * Copyright 2017 Google LLC 199 | * SPDX-License-Identifier: BSD-3-Clause 200 | *) 201 | 202 | @lit/reactive-element/decorators/query-async.js: 203 | (** 204 | * @license 205 | * Copyright 2017 Google LLC 206 | * SPDX-License-Identifier: BSD-3-Clause 207 | *) 208 | 209 | @lit/reactive-element/decorators/query-all.js: 210 | (** 211 | * @license 212 | * Copyright 2017 Google LLC 213 | * SPDX-License-Identifier: BSD-3-Clause 214 | *) 215 | 216 | @lit/reactive-element/decorators/query-assigned-elements.js: 217 | (** 218 | * @license 219 | * Copyright 2021 Google LLC 220 | * SPDX-License-Identifier: BSD-3-Clause 221 | *) 222 | 223 | @lit/reactive-element/decorators/query-assigned-nodes.js: 224 | (** 225 | * @license 226 | * Copyright 2017 Google LLC 227 | * SPDX-License-Identifier: BSD-3-Clause 228 | *) 229 | */var z=class extends K{constructor(){super(...arguments),this.hasSlotController=new jt(this,"footer","header","image")}render(){return xt` 230 |
234 | 235 | 236 | 237 | 238 |
239 | `}};z.styles=Lt;z=q([Yt("sl-card")],z);var Gt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,te=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qt(e,s):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(i=(r?n(e,s,i):n(i))||i);return r&&i&&Gt(e,s,i),i};let B=class extends $t{render(){return mt` 240 | 241 | 242 |
243 |

About Page

244 | 245 | 246 |

Did you know?

247 | 248 |

PWAs have access to many useful APIs in modern browsers! These 249 | APIs have enabled many new types of apps that can be built as PWAs, such as advanced graphics editing apps, games, 250 | apps that use machine learning and more! 251 |

252 | 253 |

Check out these 255 | docs to learn more about the advanced features that you can use in your PWA

256 |
257 |
258 | `}};B.styles=[At,yt];B=te([gt("app-about")],B);export{B as AppAbout}; 259 | //# sourceMappingURL=app-about-1651504e.js.map 260 | -------------------------------------------------------------------------------- /docs/code/index-befe9693.css: -------------------------------------------------------------------------------- 1 | :root{--n-color-accent:rgb(53, 89, 199);--n-color-text:rgb(12, 26, 61);--n-color-text-link:rgb(53, 89, 199);--n-color-text-weak:rgb(54, 67, 74);--n-color-text-weaker:rgb(102, 118, 128);--n-color-text-weakest:rgb(178, 186, 191);--n-color-text-on-accent:rgb(255, 255, 255);--n-color-text-error:rgb(210, 64, 35);--n-color-text-danger:rgb(178, 48, 21);--n-color-text-success:rgb(17, 118, 39);--n-color-text-neutral:rgb(85, 89, 93);--n-color-text-neutral-strong:rgb(17, 24, 28);--n-color-text-warning:rgb(148, 105, 0);--n-color-text-warning-strong:rgb(51, 40, 16);--n-color-text-highlight:rgb(121, 58, 175);--n-color-text-info:rgb(52, 81, 178);--n-color-text-progress:rgb(1, 109, 131);--n-color-nav-surface:rgb(255, 255, 255);--n-color-nav-heading:rgb(143, 161, 170);--n-color-nav-hover:rgb(246, 248, 248);--n-color-border:rgb(216, 222, 228);--n-color-border-strong:rgb(188, 197, 204);--n-color-border-neutral:rgb(215, 220, 224);--n-color-border-warning:rgb(248, 216, 124);--n-color-border-highlight:rgb(227, 204, 244);--n-color-border-danger:rgb(250, 199, 190);--n-color-border-success:rgb(183, 223, 186);--n-color-border-info:rgb(198, 212, 249);--n-color-border-progress:rgb(176, 229, 238);--n-color-surface:rgb(255, 255, 255);--n-color-background:rgb(250, 251, 251);--n-color-surface-raised:rgb(250, 251, 251);--n-color-surface-lowered:rgb(230, 232, 235);--n-color-overlay:rgba(144, 152, 152, .4);--n-color-status-neutral:rgb(255, 255, 255);--n-color-status-warning:rgb(246, 205, 90);--n-color-status-highlight:rgb(142, 78, 198);--n-color-status-danger:rgb(210, 64, 35);--n-color-status-success:rgb(29, 134, 51);--n-color-status-info:rgb(62, 99, 221);--n-color-status-progress:rgb(0, 127, 153);--n-color-status-notification:rgb(231, 84, 54);--n-color-status-neutral-weak:rgb(241, 243, 245);--n-color-status-warning-weak:rgb(255, 250, 225);--n-color-status-highlight-weak:rgb(249, 241, 254);--n-color-status-danger-weak:rgb(255, 240, 238);--n-color-status-success-weak:rgb(235, 249, 235);--n-color-status-info-weak:rgb(240, 244, 255);--n-color-status-progress-weak:rgb(231, 249, 251);--n-color-button:rgb(255, 255, 255);--n-color-button-hover:rgb(246, 248, 248);--n-color-border-hover:rgb(102, 118, 128);--n-color-icon:rgb(102, 118, 128);--n-color-icon-hover:rgb(12, 26, 61);--n-color-active:rgb(246, 248, 248);--n-color-header:rgb(246, 248, 248);--n-color-accent-secondary:rgb(53, 89, 199);--n-box-shadow:0 1px 3px rgba(12, 12, 12, .09);--n-box-shadow-header:0 1px 5px rgba(12, 12, 12, .05);--n-box-shadow-card:0 0 0 1px var(--n-color-border),0 1px 5px rgba(12, 12, 12, .05),0 0 40px rgba(12, 12, 12, .015);--n-box-shadow-nav:0 0 0 1px var(--n-color-border),0 5px 17px rgba(12, 12, 12, .14);--n-box-shadow-popout:0 4px 12px rgba(12, 12, 12, .15),0 0 0 1px rgba(0, 0, 0, .05);--n-box-shadow-modal:0 24px 38px 3px rgba(12, 12, 12, .16),0 9px 86px 8px rgba(12, 12, 12, .1),0 11px 15px -7px rgba(12, 12, 12, .1),0 0 0 1px rgba(0, 0, 0, .05);--n-box-shadow-dark:0 1px 3px rgba(0, 0, 0, .2);--n-box-shadow-header-dark:0 1px 5px rgba(0, 0, 0, .15);--n-box-shadow-card-dark:0 0 0 1px var(--n-color-border),0 1px 5px rgba(0, 0, 0, .15);--n-box-shadow-nav-dark:0 0 0 1px var(--n-color-border),0 5px 17px rgba(0, 0, 0, .24);--n-box-shadow-popout-dark:0 4px 12px rgba(0, 0, 0, .25),0 0 0 1px var(--n-color-border);--n-box-shadow-modal-dark:0 0 0 1px var(--n-color-border),0 24px 38px 3px rgba(0, 0, 0, .34),0px 9px 86px 8px rgba(0, 0, 0, .28),0px 11px 15px -7px rgba(0, 0, 0, .28);--n-font-size-xxxl:2.25rem;--n-font-size-xxl:1.5rem;--n-font-size-xl:1.25rem;--n-font-size-l:1rem;--n-font-size-m:.875rem;--n-font-size-s:.75rem;--n-font-size-xs:.6875rem;--n-font-family:"Nordhealth Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";--n-font-family-code:"Nordhealth Mono",monospace,monospace;--n-font-features:"kern" 1,"tnum" 1,"calt" 1,"case" 1,"cv05" 1,"zero" 1,"cv08" 0,"ss03" 1;--n-font-features-reduced:"kern" 1,"tnum" 0,"calt" 1,"case" 1,"cv05" 1,"zero" 0,"cv08" 0,"ss03" 1;--n-font-weight:400;--n-font-weight-active:500;--n-font-weight-heading:600;--n-font-weight-strong:670;--n-size-icon-xxs:8px;--n-size-icon-xs:10px;--n-size-icon-s:12px;--n-size-icon-m:16px;--n-size-icon-l:24px;--n-size-icon-xl:36px;--n-size-icon-xxl:72px;--n-space-xxl:72px;--n-space-xl:36px;--n-space-l:24px;--n-space-m:16px;--n-space-s:8px;--n-space-xs:4px;--n-border-radius-sharp:.02em;--n-border-radius-s:3px;--n-border-radius:5px;--n-border-radius-pill:999px;--n-border-radius-circle:50%;--n-transition-quickly:.05s ease;--n-transition-slowly:.2s ease;--n-transition-mobile:.4s ease;--n-line-height-tight:1.15;--n-line-height-heading:1.2;--n-line-height-caption:1.3;--n-line-height:1.5;--n-line-height-form:20px;--n-index-deep:-999999;--n-index-default:1;--n-index-masked:100;--n-index-mask:200;--n-index-sticky:300;--n-index-nav:400;--n-index-top-bar:500;--n-index-overlay:600;--n-index-spinner:700;--n-index-popout:800;--n-index-toast:900;--n-index-modal:1000}@font-face{font-family:Nordhealth Sans;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ios-pwa-shell/code/nordhealth-sans-5156501c.woff2) format("woff2");unicode-range:U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF;font-named-instance:"Regular"}@font-face{font-family:Nordhealth Mono;font-style:normal;font-weight:400;font-display:swap;src:url(/ios-pwa-shell/code/nordhealth-mono-561592b9.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:not(:defined){visibility:hidden}*{-webkit-tap-highlight-color:transparent}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}:where(.n-reset) :where(*,::before,::after){box-sizing:border-box}:where(.n-reset){font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);font-weight:var(--n-font-weight);line-height:var(--n-line-height);color:var(--n-color-text);accent-color:var(--n-color-accent)}:where(.n-reset a){color:var(--n-color-text-link);text-decoration:underline}:where(.n-reset),:where(.n-reset) :where(body,div,span,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,code,img,svg,small,strike,strong,sub,sup,b,u,i,ol,ul,li,form,label,table,caption,tbody,tfoot,thead,tr,th,td,main,article,aside,canvas,footer,header,nav,section,time,button,video,textarea,input){-webkit-appearance:none;appearance:none;box-sizing:border-box;border:0;margin:0;padding:0}:where(.n-reset) :where(ul[role=list],ol[role=list]){list-style:none}:where(.n-reset) :where(img,picture){max-inline-size:100%;display:block}:where(.n-reset) :where(input,button,textarea,select){font-family:inherit;font-feature-settings:inherit;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){:where(.n-reset) :where(*,::before,::after){animation-duration:0s!important;animation-iteration-count:1!important;transition-duration:0s!important;scroll-behavior:auto!important}}.n-border-is{border-inline-start:1px solid var(--n-color-border)}.n-border-ie{border-inline-end:1px solid var(--n-color-border)}.n-border-bs{border-block-start:1px solid var(--n-color-border)}.n-border-be{border-block-end:1px solid var(--n-color-border)}.n-border-b{border-block-start:1px solid var(--n-color-border);border-block-end:1px solid var(--n-color-border)}.n-border-i{border-inline-start:1px solid var(--n-color-border);border-inline-end:1px solid var(--n-color-border)}.n-border{border:1px solid var(--n-color-border)}.n-border-strong-is{border-inline-start:1px solid var(--n-color-border-strong)}.n-border-strong-ie{border-inline-end:1px solid var(--n-color-border-strong)}.n-border-strong-bs{border-block-start:1px solid var(--n-color-border-strong)}.n-border-strong-be{border-block-end:1px solid var(--n-color-border-strong)}.n-border-strong-b{border-block-start:1px solid var(--n-color-border-strong);border-block-end:1px solid var(--n-color-border-strong)}.n-border-strong-i{border-inline-start:1px solid var(--n-color-border-strong);border-inline-end:1px solid var(--n-color-border-strong)}.n-border-strong{border:1px solid var(--n-color-border-strong)}.n-border-neutral-is{border-inline-start:1px solid var(--n-color-border-neutral)}.n-border-neutral-ie{border-inline-end:1px solid var(--n-color-border-neutral)}.n-border-neutral-bs{border-block-start:1px solid var(--n-color-border-neutral)}.n-border-neutral-be{border-block-end:1px solid var(--n-color-border-neutral)}.n-border-neutral-b{border-block-start:1px solid var(--n-color-border-neutral);border-block-end:1px solid var(--n-color-border-neutral)}.n-border-neutral-i{border-inline-start:1px solid var(--n-color-border-neutral);border-inline-end:1px solid var(--n-color-border-neutral)}.n-border-neutral{border:1px solid var(--n-color-border-neutral)}.n-border-warning-is{border-inline-start:1px solid var(--n-color-border-warning)}.n-border-warning-ie{border-inline-end:1px solid var(--n-color-border-warning)}.n-border-warning-bs{border-block-start:1px solid var(--n-color-border-warning)}.n-border-warning-be{border-block-end:1px solid var(--n-color-border-warning)}.n-border-warning-b{border-block-start:1px solid var(--n-color-border-warning);border-block-end:1px solid var(--n-color-border-warning)}.n-border-warning-i{border-inline-start:1px solid var(--n-color-border-warning);border-inline-end:1px solid var(--n-color-border-warning)}.n-border-warning{border:1px solid var(--n-color-border-warning)}.n-border-highlight-is{border-inline-start:1px solid var(--n-color-border-highlight)}.n-border-highlight-ie{border-inline-end:1px solid var(--n-color-border-highlight)}.n-border-highlight-bs{border-block-start:1px solid var(--n-color-border-highlight)}.n-border-highlight-be{border-block-end:1px solid var(--n-color-border-highlight)}.n-border-highlight-b{border-block-start:1px solid var(--n-color-border-highlight);border-block-end:1px solid var(--n-color-border-highlight)}.n-border-highlight-i{border-inline-start:1px solid var(--n-color-border-highlight);border-inline-end:1px solid var(--n-color-border-highlight)}.n-border-highlight{border:1px solid var(--n-color-border-highlight)}.n-border-danger-is{border-inline-start:1px solid var(--n-color-border-danger)}.n-border-danger-ie{border-inline-end:1px solid var(--n-color-border-danger)}.n-border-danger-bs{border-block-start:1px solid var(--n-color-border-danger)}.n-border-danger-be{border-block-end:1px solid var(--n-color-border-danger)}.n-border-danger-b{border-block-start:1px solid var(--n-color-border-danger);border-block-end:1px solid var(--n-color-border-danger)}.n-border-danger-i{border-inline-start:1px solid var(--n-color-border-danger);border-inline-end:1px solid var(--n-color-border-danger)}.n-border-danger{border:1px solid var(--n-color-border-danger)}.n-border-success-is{border-inline-start:1px solid var(--n-color-border-success)}.n-border-success-ie{border-inline-end:1px solid var(--n-color-border-success)}.n-border-success-bs{border-block-start:1px solid var(--n-color-border-success)}.n-border-success-be{border-block-end:1px solid var(--n-color-border-success)}.n-border-success-b{border-block-start:1px solid var(--n-color-border-success);border-block-end:1px solid var(--n-color-border-success)}.n-border-success-i{border-inline-start:1px solid var(--n-color-border-success);border-inline-end:1px solid var(--n-color-border-success)}.n-border-success{border:1px solid var(--n-color-border-success)}.n-border-info-is{border-inline-start:1px solid var(--n-color-border-info)}.n-border-info-ie{border-inline-end:1px solid var(--n-color-border-info)}.n-border-info-bs{border-block-start:1px solid var(--n-color-border-info)}.n-border-info-be{border-block-end:1px solid var(--n-color-border-info)}.n-border-info-b{border-block-start:1px solid var(--n-color-border-info);border-block-end:1px solid var(--n-color-border-info)}.n-border-info-i{border-inline-start:1px solid var(--n-color-border-info);border-inline-end:1px solid var(--n-color-border-info)}.n-border-info{border:1px solid var(--n-color-border-info)}.n-border-progress-is{border-inline-start:1px solid var(--n-color-border-progress)}.n-border-progress-ie{border-inline-end:1px solid var(--n-color-border-progress)}.n-border-progress-bs{border-block-start:1px solid var(--n-color-border-progress)}.n-border-progress-be{border-block-end:1px solid var(--n-color-border-progress)}.n-border-progress-b{border-block-start:1px solid var(--n-color-border-progress);border-block-end:1px solid var(--n-color-border-progress)}.n-border-progress-i{border-inline-start:1px solid var(--n-color-border-progress);border-inline-end:1px solid var(--n-color-border-progress)}.n-border-progress{border:1px solid var(--n-color-border-progress)}.n-border-hover-is:hover{border-inline-start:1px solid var(--n-color-border-hover)}.n-border-hover-ie:hover{border-inline-end:1px solid var(--n-color-border-hover)}.n-border-hover-bs:hover{border-block-start:1px solid var(--n-color-border-hover)}.n-border-hover-be:hover{border-block-end:1px solid var(--n-color-border-hover)}.n-border-hover-b:hover{border-block-start:1px solid var(--n-color-border-hover);border-block-end:1px solid var(--n-color-border-hover)}.n-border-hover-i:hover{border-inline-start:1px solid var(--n-color-border-hover);border-inline-end:1px solid var(--n-color-border-hover)}.n-border-hover:hover{border:1px solid var(--n-color-border-hover)}.n-border-d-is{border-inline-start:1px dashed var(--n-color-border)}.n-border-d-ie{border-inline-end:1px dashed var(--n-color-border)}.n-border-d-bs{border-block-start:1px dashed var(--n-color-border)}.n-border-d-be{border-block-end:1px dashed var(--n-color-border)}.n-border-d-b{border-block-start:1px dashed var(--n-color-border);border-block-end:1px dashed var(--n-color-border)}.n-border-d-i{border-inline-start:1px dashed var(--n-color-border);border-inline-end:1px dashed var(--n-color-border)}.n-border-d{border:1px dashed var(--n-color-border)}.n-border-strong-d-is{border-inline-start:1px dashed var(--n-color-border-strong)}.n-border-strong-d-ie{border-inline-end:1px dashed var(--n-color-border-strong)}.n-border-strong-d-bs{border-block-start:1px dashed var(--n-color-border-strong)}.n-border-strong-d-be{border-block-end:1px dashed var(--n-color-border-strong)}.n-border-strong-d-b{border-block-start:1px dashed var(--n-color-border-strong);border-block-end:1px dashed var(--n-color-border-strong)}.n-border-strong-d-i{border-inline-start:1px dashed var(--n-color-border-strong);border-inline-end:1px dashed var(--n-color-border-strong)}.n-border-strong-d{border:1px dashed var(--n-color-border-strong)}.n-border-neutral-d-is{border-inline-start:1px dashed var(--n-color-border-neutral)}.n-border-neutral-d-ie{border-inline-end:1px dashed var(--n-color-border-neutral)}.n-border-neutral-d-bs{border-block-start:1px dashed var(--n-color-border-neutral)}.n-border-neutral-d-be{border-block-end:1px dashed var(--n-color-border-neutral)}.n-border-neutral-d-b{border-block-start:1px dashed var(--n-color-border-neutral);border-block-end:1px dashed var(--n-color-border-neutral)}.n-border-neutral-d-i{border-inline-start:1px dashed var(--n-color-border-neutral);border-inline-end:1px dashed var(--n-color-border-neutral)}.n-border-neutral-d{border:1px dashed var(--n-color-border-neutral)}.n-border-warning-d-is{border-inline-start:1px dashed var(--n-color-border-warning)}.n-border-warning-d-ie{border-inline-end:1px dashed var(--n-color-border-warning)}.n-border-warning-d-bs{border-block-start:1px dashed var(--n-color-border-warning)}.n-border-warning-d-be{border-block-end:1px dashed var(--n-color-border-warning)}.n-border-warning-d-b{border-block-start:1px dashed var(--n-color-border-warning);border-block-end:1px dashed var(--n-color-border-warning)}.n-border-warning-d-i{border-inline-start:1px dashed var(--n-color-border-warning);border-inline-end:1px dashed var(--n-color-border-warning)}.n-border-warning-d{border:1px dashed var(--n-color-border-warning)}.n-border-highlight-d-is{border-inline-start:1px dashed var(--n-color-border-highlight)}.n-border-highlight-d-ie{border-inline-end:1px dashed var(--n-color-border-highlight)}.n-border-highlight-d-bs{border-block-start:1px dashed var(--n-color-border-highlight)}.n-border-highlight-d-be{border-block-end:1px dashed var(--n-color-border-highlight)}.n-border-highlight-d-b{border-block-start:1px dashed var(--n-color-border-highlight);border-block-end:1px dashed var(--n-color-border-highlight)}.n-border-highlight-d-i{border-inline-start:1px dashed var(--n-color-border-highlight);border-inline-end:1px dashed var(--n-color-border-highlight)}.n-border-highlight-d{border:1px dashed var(--n-color-border-highlight)}.n-border-danger-d-is{border-inline-start:1px dashed var(--n-color-border-danger)}.n-border-danger-d-ie{border-inline-end:1px dashed var(--n-color-border-danger)}.n-border-danger-d-bs{border-block-start:1px dashed var(--n-color-border-danger)}.n-border-danger-d-be{border-block-end:1px dashed var(--n-color-border-danger)}.n-border-danger-d-b{border-block-start:1px dashed var(--n-color-border-danger);border-block-end:1px dashed var(--n-color-border-danger)}.n-border-danger-d-i{border-inline-start:1px dashed var(--n-color-border-danger);border-inline-end:1px dashed var(--n-color-border-danger)}.n-border-danger-d{border:1px dashed var(--n-color-border-danger)}.n-border-success-d-is{border-inline-start:1px dashed var(--n-color-border-success)}.n-border-success-d-ie{border-inline-end:1px dashed var(--n-color-border-success)}.n-border-success-d-bs{border-block-start:1px dashed var(--n-color-border-success)}.n-border-success-d-be{border-block-end:1px dashed var(--n-color-border-success)}.n-border-success-d-b{border-block-start:1px dashed var(--n-color-border-success);border-block-end:1px dashed var(--n-color-border-success)}.n-border-success-d-i{border-inline-start:1px dashed var(--n-color-border-success);border-inline-end:1px dashed var(--n-color-border-success)}.n-border-success-d{border:1px dashed var(--n-color-border-success)}.n-border-info-d-is{border-inline-start:1px dashed var(--n-color-border-info)}.n-border-info-d-ie{border-inline-end:1px dashed var(--n-color-border-info)}.n-border-info-d-bs{border-block-start:1px dashed var(--n-color-border-info)}.n-border-info-d-be{border-block-end:1px dashed var(--n-color-border-info)}.n-border-info-d-b{border-block-start:1px dashed var(--n-color-border-info);border-block-end:1px dashed var(--n-color-border-info)}.n-border-info-d-i{border-inline-start:1px dashed var(--n-color-border-info);border-inline-end:1px dashed var(--n-color-border-info)}.n-border-info-d{border:1px dashed var(--n-color-border-info)}.n-border-progress-d-is{border-inline-start:1px dashed var(--n-color-border-progress)}.n-border-progress-d-ie{border-inline-end:1px dashed var(--n-color-border-progress)}.n-border-progress-d-bs{border-block-start:1px dashed var(--n-color-border-progress)}.n-border-progress-d-be{border-block-end:1px dashed var(--n-color-border-progress)}.n-border-progress-d-b{border-block-start:1px dashed var(--n-color-border-progress);border-block-end:1px dashed var(--n-color-border-progress)}.n-border-progress-d-i{border-inline-start:1px dashed var(--n-color-border-progress);border-inline-end:1px dashed var(--n-color-border-progress)}.n-border-progress-d{border:1px dashed var(--n-color-border-progress)}.n-border-hover-d-is:hover{border-inline-start:1px dashed var(--n-color-border-hover)}.n-border-hover-d-ie:hover{border-inline-end:1px dashed var(--n-color-border-hover)}.n-border-hover-d-bs:hover{border-block-start:1px dashed var(--n-color-border-hover)}.n-border-hover-d-be:hover{border-block-end:1px dashed var(--n-color-border-hover)}.n-border-hover-d-b:hover{border-block-start:1px dashed var(--n-color-border-hover);border-block-end:1px dashed var(--n-color-border-hover)}.n-border-hover-d-i:hover{border-inline-start:1px dashed var(--n-color-border-hover);border-inline-end:1px dashed var(--n-color-border-hover)}.n-border-hover-d:hover{border:1px dashed var(--n-color-border-hover)}.n-border-radius-sharp{border-radius:var(--n-border-radius-sharp)}.n-border-radius-s{border-radius:var(--n-border-radius-s)}.n-border-radius{border-radius:var(--n-border-radius)}.n-border-radius-pill{border-radius:var(--n-border-radius-pill)}.n-border-radius-circle{border-radius:var(--n-border-radius-circle)}.n-box-shadow{box-shadow:var(--n-box-shadow)}.n-box-shadow-header{box-shadow:var(--n-box-shadow-header)}.n-box-shadow-card{box-shadow:var(--n-box-shadow-card)}.n-box-shadow-nav{box-shadow:var(--n-box-shadow-nav)}.n-box-shadow-popout{box-shadow:var(--n-box-shadow-popout)}.n-box-shadow-modal{box-shadow:var(--n-box-shadow-modal)}.n-margin-is-xxl{margin-inline-start:var(--n-space-xxl)}.n-margin-ie-xxl{margin-inline-end:var(--n-space-xxl)}.n-margin-bs-xxl{margin-block-start:var(--n-space-xxl)}.n-margin-be-xxl{margin-block-end:var(--n-space-xxl)}.n-margin-b-xxl{margin-block-start:var(--n-space-xxl);margin-block-end:var(--n-space-xxl)}.n-margin-i-xxl{margin-inline-start:var(--n-space-xxl);margin-inline-end:var(--n-space-xxl)}.n-margin-xxl{margin:var(--n-space-xxl)}.n-margin-is-xl{margin-inline-start:var(--n-space-xl)}.n-margin-ie-xl{margin-inline-end:var(--n-space-xl)}.n-margin-bs-xl{margin-block-start:var(--n-space-xl)}.n-margin-be-xl{margin-block-end:var(--n-space-xl)}.n-margin-b-xl{margin-block-start:var(--n-space-xl);margin-block-end:var(--n-space-xl)}.n-margin-i-xl{margin-inline-start:var(--n-space-xl);margin-inline-end:var(--n-space-xl)}.n-margin-xl{margin:var(--n-space-xl)}.n-margin-is-l{margin-inline-start:var(--n-space-l)}.n-margin-ie-l{margin-inline-end:var(--n-space-l)}.n-margin-bs-l{margin-block-start:var(--n-space-l)}.n-margin-be-l{margin-block-end:var(--n-space-l)}.n-margin-b-l{margin-block-start:var(--n-space-l);margin-block-end:var(--n-space-l)}.n-margin-i-l{margin-inline-start:var(--n-space-l);margin-inline-end:var(--n-space-l)}.n-margin-l{margin:var(--n-space-l)}.n-margin-is-m{margin-inline-start:var(--n-space-m)}.n-margin-ie-m{margin-inline-end:var(--n-space-m)}.n-margin-bs-m{margin-block-start:var(--n-space-m)}.n-margin-be-m{margin-block-end:var(--n-space-m)}.n-margin-b-m{margin-block-start:var(--n-space-m);margin-block-end:var(--n-space-m)}.n-margin-i-m{margin-inline-start:var(--n-space-m);margin-inline-end:var(--n-space-m)}.n-margin-m{margin:var(--n-space-m)}.n-margin-is-s{margin-inline-start:var(--n-space-s)}.n-margin-ie-s{margin-inline-end:var(--n-space-s)}.n-margin-bs-s{margin-block-start:var(--n-space-s)}.n-margin-be-s{margin-block-end:var(--n-space-s)}.n-margin-b-s{margin-block-start:var(--n-space-s);margin-block-end:var(--n-space-s)}.n-margin-i-s{margin-inline-start:var(--n-space-s);margin-inline-end:var(--n-space-s)}.n-margin-s{margin:var(--n-space-s)}.n-margin-is-xs{margin-inline-start:var(--n-space-xs)}.n-margin-ie-xs{margin-inline-end:var(--n-space-xs)}.n-margin-bs-xs{margin-block-start:var(--n-space-xs)}.n-margin-be-xs{margin-block-end:var(--n-space-xs)}.n-margin-b-xs{margin-block-start:var(--n-space-xs);margin-block-end:var(--n-space-xs)}.n-margin-i-xs{margin-inline-start:var(--n-space-xs);margin-inline-end:var(--n-space-xs)}.n-margin-xs{margin:var(--n-space-xs)}.n-margin-is-auto{margin-inline-start:auto}.n-margin-ie-auto{margin-inline-end:auto}.n-margin-bs-auto{margin-block-start:auto}.n-margin-be-auto{margin-block-end:auto}.n-margin-b-auto{margin-block-start:auto;margin-block-end:auto}.n-margin-i-auto{margin-inline-start:auto;margin-inline-end:auto}.n-margin-auto{margin:auto}.n-padding-is-xxl{padding-inline-start:var(--n-space-xxl)}.n-padding-ie-xxl{padding-inline-end:var(--n-space-xxl)}.n-padding-bs-xxl{padding-block-start:var(--n-space-xxl)}.n-padding-be-xxl{padding-block-end:var(--n-space-xxl)}.n-padding-b-xxl{padding-block-start:var(--n-space-xxl);padding-block-end:var(--n-space-xxl)}.n-padding-i-xxl{padding-inline-start:var(--n-space-xxl);padding-inline-end:var(--n-space-xxl)}.n-padding-xxl{padding:var(--n-space-xxl)}.n-padding-is-xl{padding-inline-start:var(--n-space-xl)}.n-padding-ie-xl{padding-inline-end:var(--n-space-xl)}.n-padding-bs-xl{padding-block-start:var(--n-space-xl)}.n-padding-be-xl{padding-block-end:var(--n-space-xl)}.n-padding-b-xl{padding-block-start:var(--n-space-xl);padding-block-end:var(--n-space-xl)}.n-padding-i-xl{padding-inline-start:var(--n-space-xl);padding-inline-end:var(--n-space-xl)}.n-padding-xl{padding:var(--n-space-xl)}.n-padding-is-l{padding-inline-start:var(--n-space-l)}.n-padding-ie-l{padding-inline-end:var(--n-space-l)}.n-padding-bs-l{padding-block-start:var(--n-space-l)}.n-padding-be-l{padding-block-end:var(--n-space-l)}.n-padding-b-l{padding-block-start:var(--n-space-l);padding-block-end:var(--n-space-l)}.n-padding-i-l{padding-inline-start:var(--n-space-l);padding-inline-end:var(--n-space-l)}.n-padding-l{padding:var(--n-space-l)}.n-padding-is-m{padding-inline-start:var(--n-space-m)}.n-padding-ie-m{padding-inline-end:var(--n-space-m)}.n-padding-bs-m{padding-block-start:var(--n-space-m)}.n-padding-be-m{padding-block-end:var(--n-space-m)}.n-padding-b-m{padding-block-start:var(--n-space-m);padding-block-end:var(--n-space-m)}.n-padding-i-m{padding-inline-start:var(--n-space-m);padding-inline-end:var(--n-space-m)}.n-padding-m{padding:var(--n-space-m)}.n-padding-is-s{padding-inline-start:var(--n-space-s)}.n-padding-ie-s{padding-inline-end:var(--n-space-s)}.n-padding-bs-s{padding-block-start:var(--n-space-s)}.n-padding-be-s{padding-block-end:var(--n-space-s)}.n-padding-b-s{padding-block-start:var(--n-space-s);padding-block-end:var(--n-space-s)}.n-padding-i-s{padding-inline-start:var(--n-space-s);padding-inline-end:var(--n-space-s)}.n-padding-s{padding:var(--n-space-s)}.n-padding-is-xs{padding-inline-start:var(--n-space-xs)}.n-padding-ie-xs{padding-inline-end:var(--n-space-xs)}.n-padding-bs-xs{padding-block-start:var(--n-space-xs)}.n-padding-be-xs{padding-block-end:var(--n-space-xs)}.n-padding-b-xs{padding-block-start:var(--n-space-xs);padding-block-end:var(--n-space-xs)}.n-padding-i-xs{padding-inline-start:var(--n-space-xs);padding-inline-end:var(--n-space-xs)}.n-padding-xs{padding:var(--n-space-xs)}.n-font-size-xxxl{font-size:var(--n-font-size-xxxl)}.n-font-size-xxl{font-size:var(--n-font-size-xxl)}.n-font-size-xl{font-size:var(--n-font-size-xl)}.n-font-size-l{font-size:var(--n-font-size-l)}.n-font-size-m{font-size:var(--n-font-size-m)}.n-font-size-s{font-size:var(--n-font-size-s)}.n-font-size-xs{font-size:var(--n-font-size-xs)}.n-font-weight{font-weight:var(--n-font-weight)}.n-font-weight-active{font-weight:var(--n-font-weight-active)}.n-font-weight-heading{font-weight:var(--n-font-weight-heading)}.n-font-weight-strong{font-weight:var(--n-font-weight-strong)}.n-color-text{color:var(--n-color-text)}.n-color-text-link{color:var(--n-color-text-link)}.n-color-text-weak{color:var(--n-color-text-weak)}.n-color-text-weaker{color:var(--n-color-text-weaker)}.n-color-text-weakest{color:var(--n-color-text-weakest)}.n-color-text-on-accent{color:var(--n-color-text-on-accent)}.n-color-text-error{color:var(--n-color-text-error)}.n-color-text-danger{color:var(--n-color-text-danger)}.n-color-text-success{color:var(--n-color-text-success)}.n-color-text-neutral{color:var(--n-color-text-neutral)}.n-color-text-neutral-strong{color:var(--n-color-text-neutral-strong)}.n-color-text-warning{color:var(--n-color-text-warning)}.n-color-text-warning-strong{color:var(--n-color-text-warning-strong)}.n-color-text-highlight{color:var(--n-color-text-highlight)}.n-color-text-info{color:var(--n-color-text-info)}.n-color-text-progress{color:var(--n-color-text-progress)}.n-color-nav-heading{color:var(--n-color-nav-heading)}.n-color-nav-surface{background-color:var(--n-color-nav-surface)}.n-color-surface{background-color:var(--n-color-surface)}.n-color-background{background-color:var(--n-color-background)}.n-color-surface-raised{background-color:var(--n-color-surface-raised)}.n-color-surface-lowered{background-color:var(--n-color-surface-lowered)}.n-color-status-neutral{background-color:var(--n-color-status-neutral)}.n-color-status-warning{background-color:var(--n-color-status-warning)}.n-color-status-highlight{background-color:var(--n-color-status-highlight)}.n-color-status-danger{background-color:var(--n-color-status-danger)}.n-color-status-success{background-color:var(--n-color-status-success)}.n-color-status-info{background-color:var(--n-color-status-info)}.n-color-status-progress{background-color:var(--n-color-status-progress)}.n-color-status-notification{background-color:var(--n-color-status-notification)}.n-color-status-neutral-weak{background-color:var(--n-color-status-neutral-weak)}.n-color-status-warning-weak{background-color:var(--n-color-status-warning-weak)}.n-color-status-highlight-weak{background-color:var(--n-color-status-highlight-weak)}.n-color-status-danger-weak{background-color:var(--n-color-status-danger-weak)}.n-color-status-success-weak{background-color:var(--n-color-status-success-weak)}.n-color-status-info-weak{background-color:var(--n-color-status-info-weak)}.n-color-status-progress-weak{background-color:var(--n-color-status-progress-weak)}.n-color-button{background-color:var(--n-color-button)}.n-color-button-hover:hover{background-color:var(--n-color-button-hover)}.n-color-active{background-color:var(--n-color-active)}.n-color-icon{color:var(--n-color-icon)}.n-color-icon-hover:hover{color:var(--n-color-icon-hover)}.n-size-icon-xxs{inline-size:var(--n-size-icon-xxs);block-size:var(--n-size-icon-xxs)}.n-size-icon-xs{inline-size:var(--n-size-icon-xs);block-size:var(--n-size-icon-xs)}.n-size-icon-s{inline-size:var(--n-size-icon-s);block-size:var(--n-size-icon-s)}.n-size-icon-m{inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m)}.n-size-icon-l{inline-size:var(--n-size-icon-l);block-size:var(--n-size-icon-l)}.n-size-icon-xl{inline-size:var(--n-size-icon-xl);block-size:var(--n-size-icon-xl)}.n-size-icon-xxl{inline-size:var(--n-size-icon-xxl);block-size:var(--n-size-icon-xxl)}.n-gap-xxl{gap:var(--n-space-xxl)}.n-gap-xl{gap:var(--n-space-xl)}.n-gap-l{gap:var(--n-space-l)}.n-gap-m{gap:var(--n-space-m)}.n-gap-s{gap:var(--n-space-s)}.n-gap-xs{gap:var(--n-space-xs)}.n-gap-none{gap:0}:where(.n-typescale-xxxl,.n-typescale-xxl,.n-typescale-xl,.n-typescale-l,.n-typescale-m,.n-typescale-s,.n-typescale-xs,.n-typeset){font-family:var(--n-font-family);margin:0}.n-typeset :where(pre,code){font-family:var(--n-font-family-code)}.n-typescale-l,.n-typescale-xl,.n-typescale-xxl,.n-typescale-xxxl,:where(.n-typeset) :where(h1,h2,h3,h4,h5,h6){font-feature-settings:var(--n-font-features-reduced);font-weight:var(--n-font-weight-heading);line-height:var(--n-line-height-heading);color:var(--n-color-text)}:where(.n-typeset) .n-typescale-l,:where(.n-typeset) .n-typescale-xl,:where(.n-typeset) .n-typescale-xxl,:where(.n-typeset) .n-typescale-xxxl,:where(.n-typeset) :where(h2,h3,h4,h5,h6){margin:.5em 0}:where(.n-typeset) *+.n-typescale-l,:where(.n-typeset) *+.n-typescale-xl,:where(.n-typeset) *+.n-typescale-xxl,:where(.n-typeset) *+.n-typescale-xxxl,:where(.n-typeset) *+:where(h2,h3,h4,h5,h6){margin-block-start:1.5rem}:where(.n-typeset) :where(p,li,dt,dd,blockquote,figcaption,small,pre,code,cite,small){font-size:var(--n-font-size-m);font-feature-settings:var(--n-font-features);font-weight:var(--n-font-weight);line-height:var(--n-line-height);color:var(--n-color-text)}:where(.n-typeset) .n-typescale-m,:where(.n-typeset) .n-typescale-s,:where(.n-typeset) .n-typescale-xs,:where(.n-typeset) :where(p,li,dt,dd,blockquote,figcaption,small,pre,code,cite,small){margin:.85em 0}:where(.n-typeset) :where(dd){margin-inline-start:.85em}.n-typescale-xxxl,:where(.n-typeset h1){font-size:var(--n-font-size-xxxl)}.n-typescale-xxl,:where(.n-typeset h2){font-size:var(--n-font-size-xxl)}.n-typescale-xl,:where(.n-typeset h3){font-size:var(--n-font-size-xl)}.n-typescale-l,:where(.n-typeset) :where(h4,blockquote){font-size:var(--n-font-size-l)}.n-typescale-m,:where(.n-typeset) :where(p,h5){font-size:var(--n-font-size-m)}:where(.n-typeset h5){font-weight:var(--n-font-weight-heading)}.n-typescale-s,:where(.n-typeset) :where(h6,figcaption){font-size:var(--n-font-size-s);line-height:var(--n-line-height)}.n-typescale-xs,:where(.n-typeset small){font-size:var(--n-font-size-xs)}:where(.n-typeset)>:first-child{margin-block-start:0}:where(.n-typeset)>:last-child{margin-block-end:0}:where(.n-typeset) :where(ul,ol,dl,blockquote){margin:.5em 0;padding:0 0 0 1.5em}:where(.n-typeset a){color:var(--n-color-text-link);text-decoration:underline}:where(.n-typeset a:hover){text-decoration:none}:where(.n-typeset code){overflow-wrap:break-word}:where(.n-typeset pre code){white-space:pre-wrap;word-break:break-all}:where(.n-typeset) :where(strong,b){font-weight:var(--n-font-weight-strong)}:where(.n-typeset mark){background:var(--n-color-status-warning-weak)}.n-caption{color:var(--n-color-text-weaker);font-weight:var(--n-font-weight)}.n-dl{margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(9ch,max-content));column-gap:var(--n-space-m)}.n-dl dt{color:var(--n-color-text-weaker);font-weight:var(--n-font-weight-active);font-size:var(--n-font-size-s);padding-block-start:calc(var(--n-font-size-m) - var(--n-font-size-s));grid-column-start:1}.n-dl :where(dt,dd){margin:0}.n-dl dd{color:var(--n-color-text);font-weight:var(--n-font-weight);font-size:var(--n-font-size-m);margin-block-end:var(--n-space-m)}.n-dl dd:last-of-type{margin-block-end:0}.n-color-accent,.n-color-accent-bg{background-color:var(--n-color-accent)}.n-color-accent-text{color:var(--n-color-accent)}.n-color-accent-fill{fill:var(--n-color-accent)}.n-color-accent-stroke{stroke:var(--n-color-accent)}.n-stack,.n-stack-horizontal,.n-stack-horizontal-e,.n-stack-horizontal-s{display:flex;justify-content:flex-start;flex-flow:column wrap}:where(.n-stack,.n-stack-horizontal,.n-stack-horizontal-e,.n-stack-horizontal-s){gap:var(--n-space-m)}.n-stack-horizontal,.n-stack-horizontal-e,.n-stack-horizontal-s{align-items:center;flex-direction:row}.n-stack-horizontal-s{align-items:start}.n-stack-horizontal-e{align-items:end}.n-grid,.n-grid-12,.n-grid-2,.n-grid-3,.n-grid-4,.n-grid-6,.n-grid-8{display:grid;align-items:start;grid-template-columns:repeat(var(--n-grid-columns,12),1fr)}:where(.n-grid,.n-grid-12,.n-grid-2,.n-grid-3,.n-grid-4,.n-grid-6,.n-grid-8){gap:var(--n-space-m)}.n-grid-8{--n-grid-columns:8}.n-grid-6{--n-grid-columns:6}.n-grid-4{--n-grid-columns:4}.n-grid-3{--n-grid-columns:3}.n-grid-2{--n-grid-columns:2}.n-grid-center-i{justify-self:center}.n-grid-center-b{align-self:center}.n-grid-center{place-self:center}.n-container,.n-container-l{max-inline-size:1200px}.n-container-xl{max-inline-size:2400px}.n-container-m{max-inline-size:1000px}.n-container-s{max-inline-size:800px}.n-container-xs{max-inline-size:600px}.n-container-xxs{max-inline-size:400px}.n-truncate{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-truncate-2{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;box-orient:vertical;overflow:hidden}.n-truncate-3{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;box-orient:vertical;overflow:hidden}.n-align-start{text-align:start}.n-align-center{text-align:center}.n-align-end{text-align:end}.n-divider,.n-hr{background:var(--n-color-border);display:block;margin:0;border:0;block-size:1px;inline-size:100%}.n-hint,.n-label{display:flex;color:var(--n-color-text);font-family:var(--n-font-family);font-size:var(--n-font-size-m);font-weight:var(--n-font-weight-heading);line-height:var(--n-line-height-heading);margin:0}.n-hint{color:var(--n-color-text-weaker);font-weight:var(--n-font-weight);font-size:var(--n-font-size-s);line-height:var(--n-line-height-caption)}.n-error{color:var(--n-color-text-error);font-weight:var(--n-font-weight);font-size:var(--n-font-size-s);line-height:var(--n-line-height-caption)}.n-input{display:block;background:var(--n-color-active);color:var(--n-color-text);padding-block-start:calc(var(--n-space-s) - 1px);padding-block-end:calc(var(--n-space-s) - 1px);padding-inline-start:calc(var(--n-space-s) * 1.6);padding-inline-end:calc(var(--n-space-s) * 1.6);border-radius:var(--n-border-radius-s);border:1px solid var(--n-color-border-strong);font-family:var(--n-font-family);font-weight:var(--n-font-weight);font-size:var(--n-font-size-m);line-height:var(--n-line-height-form);transition:border var(--n-transition-slowly),box-shadow var(--n-transition-slowly),background var(--n-transition-slowly)}.n-input:hover{border-color:var(--n-color-border-hover)}.n-input:focus-within{border-color:var(--n-color-accent);background:var(--n-color-surface);outline:0;box-shadow:0 0 0 1px var(--n-color-accent)}.n-input::placeholder{color:var(--n-color-text-weakest)}.n-input:disabled{border-color:var(--n-color-active);color:var(--n-color-text-weakest)}.n-input-invalid,.n-input[aria-invalid=true]{border-color:var(--n-color-status-danger)}.n-input-invalid:focus-within,.n-input[aria-invalid=true]:focus{border-color:var(--n-color-status-danger);box-shadow:0 0 0 1px var(--n-color-status-danger)}.n-clinic-icon,.n-clinic-icon-s{color:var(--n-color-text-on-accent);background:var(--n-clinic-icon-color,var(--n-color-accent));border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow);inline-size:var(--n-clinic-icon-size,var(--n-size-icon-l));block-size:var(--n-clinic-icon-size,var(--n-size-icon-l));min-inline-size:var(--n-clinic-icon-size,var(--n-size-icon-l));min-block-size:var(--n-clinic-icon-size,var(--n-size-icon-l));line-height:var(--n-clinic-icon-size, var(--n-size-icon-l));font-size:var(--n-clinic-icon-font-size, var(--n-font-size-s));font-weight:var(--n-font-weight-active);display:inline-block;text-align:center}.n-clinic-icon-s{--n-clinic-icon-size:calc(var(--n-size-icon-l) / 1.2)}.n-counter{display:block;inset-block-start:calc(var(--n-space-s) * -1);inset-inline-end:calc(calc(var(--n-space-s) + var(--n-space-xs)) * -1);pointer-events:none;min-inline-size:17px;line-height:var(--n-line-height-tight);border-radius:var(--n-border-radius-pill);color:#fff;text-align:center;font-size:10px;padding:calc(var(--n-space-xs) - 1.5px) var(--n-space-xs);z-index:var(--n-index-mask);font-feature-settings:var(--n-font-features-reduced);font-weight:var(--n-font-weight-heading);box-shadow:0 0 0 1px var(--n-color-accent-secondary),0 1px 5px #0006,inset 0 0 5px #fff3;background:var(--n-color-status-notification)}:root{--n-color-accent: #FF2F92;--n-color-accent-secondary: #FF2F92;--n-tab-color: #d12a7b;--n-color-text-link: #d12a7b}html,body{font-family:var(--n-font-family);padding:0;margin:0;background-color:#f1f1f1} 2 | -------------------------------------------------------------------------------- /docs/code/index-d961e0b8.js: -------------------------------------------------------------------------------- 1 | var V=/[$_\p{ID_Start}]/u,Z=/[$_\u200C\u200D\p{ID_Continue}]/u;function q(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}function L(e,t=!1){const n=[];let r=0;for(;r{if(s{const l=a("MODIFIER");return l||a("ASTERISK")},u=l=>{const m=a(l);if(m!==void 0)return m;const{type:b,index:E}=n[s];throw new TypeError(`Unexpected ${b} at ${E}, expected ${l}`)},x=()=>{let l="",m;for(;m=a("CHAR")||a("ESCAPED_CHAR");)l+=m;return l},G=l=>l,P=t.encodePart||G;for(;s)?(?!\?)/g;let r=0,o=n.exec(e.source);for(;o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}function Q(e,t,n){const r=e.map(o=>D(o,t,n).source);return new RegExp(`(?:${r.join("|")})`,U(n))}function X(e,t,n){return O(N(e,n),t,n)}function O(e,t,n={}){const{strict:r=!1,start:o=!0,end:c=!0,encode:h=a=>a}=n,s=`[${R(n.endsWith===void 0?"":n.endsWith)}]|$`,i=`[${R(n.delimiter===void 0?"/#?":n.delimiter)}]`;let f=o?"^":"";for(const a of e)if(typeof a=="string")f+=R(h(a));else{const p=R(h(a.prefix)),u=R(h(a.suffix));if(a.pattern)if(t&&t.push(a),p||u)if(a.modifier==="+"||a.modifier==="*"){const x=a.modifier==="*"?"?":"";f+=`(?:${p}((?:${a.pattern})(?:${u}${p}(?:${a.pattern}))*)${u})${x}`}else f+=`(?:${p}(${a.pattern})${u})${a.modifier}`;else a.modifier==="+"||a.modifier==="*"?f+=`((?:${a.pattern})${a.modifier})`:f+=`(${a.pattern})${a.modifier}`;else f+=`(?:${p}${u})${a.modifier}`}if(c)r||(f+=`${i}?`),f+=n.endsWith?`(?=${s})`:"$";else{const a=e[e.length-1],p=typeof a=="string"?i.indexOf(a[a.length-1])>-1:a===void 0;r||(f+=`(?:${i}(?=${s}))?`),p||(f+=`(?=${i}|${s})`)}return new RegExp(f,U(n))}function D(e,t,n){return e instanceof RegExp?J(e,t):Array.isArray(e)?Q(e,t,n):X(e,t,n)}var w={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Y={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ee={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function te(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}function _(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}function ne(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}function H(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}var j=["ftp","file","http","https","ws","wss"];function M(e){if(!e)return!0;for(const t of j)if(e.test(t))return!0;return!1}function re(e,t){if(e=_(e,"#"),t||e==="")return e;const n=new URL("https://example.com");return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):""}function se(e,t){if(e=_(e,"?"),t||e==="")return e;const n=new URL("https://example.com");return n.search=e,n.search?n.search.substring(1,n.search.length):""}function ie(e,t){return t||e===""?e:H(e)?W(e):z(e)}function ae(e,t){if(t||e==="")return e;const n=new URL("https://example.com");return n.password=e,n.password}function oe(e,t){if(t||e==="")return e;const n=new URL("https://example.com");return n.username=e,n.username}function he(e,t,n){if(n||e==="")return e;if(t&&!j.includes(t))return new URL(`${t}:${e}`).pathname;const r=e[0]=="/";return e=new URL(r?e:"/-"+e,"https://example.com").pathname,r||(e=e.substring(2,e.length)),e}function ce(e,t,n){return F(t)===e&&(e=""),n||e===""?e:B(e)}function fe(e,t){return e=ne(e,":"),t||e===""?e:T(e)}function F(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function T(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}function ue(e){if(e==="")return e;const t=new URL("https://example.com");return t.username=e,t.username}function le(e){if(e==="")return e;const t=new URL("https://example.com");return t.password=e,t.password}function z(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);const t=new URL("https://example.com");return t.hostname=e,t.hostname}function W(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}function B(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}function pe(e){if(e==="")return e;const t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}function de(e){return e===""?e:new URL(`data:${e}`).pathname}function me(e){if(e==="")return e;const t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}function ge(e){if(e==="")return e;const t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}var xe=class{constructor(e){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=e}get result(){return this.internalResult}parse(){for(this.tokenList=L(this.input,!0);this.tokenIndex0)if(this.isGroupClose())this.groupDepth-=1;else continue;if(this.isGroupOpen()){this.groupDepth+=1;continue}switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let e=7,t=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(e=2,t=3):this.shouldTreatAsStandardURL&&(e=2),this.changeState(e,t)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1);break}}}changeState(e,t){switch(this.state){case 0:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 2:break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString();break}this.changeStateWithoutSettingComponent(e,t)}changeStateWithoutSettingComponent(e,t){this.state=e,this.componentStart=this.tokenIndex+t,this.tokenIndex+=t,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(e){this.rewind(),this.state=e}safeToken(e){return e<0&&(e=this.tokenList.length-e),e=0&&(e.pathname=g(r.pathname.substring(0,o+1),n)+e.pathname)}e.pathname=he(e.pathname,e.protocol,n)}return typeof t.search=="string"&&(e.search=se(t.search,n)),typeof t.hash=="string"&&(e.hash=re(t.hash,n)),e}function I(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}function Se(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function ke(e,t){const n=".*",r=`[^${Se(t.delimiter===void 0?"/#?":t.delimiter)}]+?`,o=/[$_\u200C\u200D\p{ID_Continue}]/u;let c="";for(let h=0;h0?e[h-1]:null,f=h0?f[0]:"";u=o.test(x)}else u=typeof f.name=="number";if(!u&&s.prefix===""&&i&&typeof i=="string"&&i.length>0){const x=i[i.length-1];u=p.includes(x)}u&&(c+="{"),c+=I(s.prefix),a&&(c+=`:${s.name}`),s.pattern===n?!a&&(!i||typeof i=="string"||i.modifier||u||s.prefix!=="")?c+="*":c+=`(${n})`:s.pattern===r?a||(c+=`(${r})`):c+=`(${s.pattern})`,s.pattern===r&&a&&s.suffix!==""&&o.test(s.suffix[0])&&(c+="\\"),c+=I(s.suffix),u&&(c+="}"),c+=s.modifier}return c}var we=class{constructor(e={},t,n){this.regexp={},this.keys={},this.component_pattern={};try{let r;if(typeof t=="string"?r=t:n=t,typeof e=="string"){const s=new xe(e);if(s.parse(),e=s.result,r===void 0&&typeof e.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=r}else{if(!e||typeof e!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(r)throw new TypeError("parameter 1 is not of type 'string'.")}typeof n>"u"&&(n={ignoreCase:!1});const o={ignoreCase:n.ignoreCase===!0},c={pathname:k,protocol:k,username:k,password:k,hostname:k,port:k,search:k,hash:k};this.pattern=C(c,e,!0),F(this.pattern.protocol)===this.pattern.port&&(this.pattern.port="");let h;for(h of $){if(!(h in this.pattern))continue;const s={},i=this.pattern[h];switch(this.keys[h]=[],h){case"protocol":Object.assign(s,w),s.encodePart=T;break;case"username":Object.assign(s,w),s.encodePart=ue;break;case"password":Object.assign(s,w),s.encodePart=le;break;case"hostname":Object.assign(s,Y),H(i)?s.encodePart=W:s.encodePart=z;break;case"port":Object.assign(s,w),s.encodePart=B;break;case"pathname":M(this.regexp.protocol)?(Object.assign(s,ee,o),s.encodePart=pe):(Object.assign(s,w,o),s.encodePart=de);break;case"search":Object.assign(s,w,o),s.encodePart=me;break;case"hash":Object.assign(s,w,o),s.encodePart=ge;break}try{const f=N(i,s);this.regexp[h]=O(f,this.keys[h],s),this.component_pattern[h]=ke(f,s)}catch{throw new TypeError(`invalid ${h} pattern '${this.pattern[h]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.message}`)}}test(e={},t){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{typeof e=="object"?n=C(n,e,!1):n=C(n,v(e,t),!1)}catch{return!1}let r;for(r of $)if(!this.regexp[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{typeof e=="object"?n=C(n,e,!1):n=C(n,v(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let o;for(o of $){let c=this.regexp[o].exec(n[o]);if(!c)return null;let h={};for(let[s,i]of this.keys[o].entries())if(typeof i.name=="string"||typeof i.name=="number"){let f=c[s+1];h[i.name]=f}r[o]={input:n[o]||"",groups:h}}return r}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=we);export{we as URLPattern}; 2 | //# sourceMappingURL=index-d961e0b8.js.map 3 | -------------------------------------------------------------------------------- /docs/code/index-d961e0b8.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index-d961e0b8.js","sources":["../../node_modules/urlpattern-polyfill/dist/urlpattern.js","../../node_modules/urlpattern-polyfill/index.js"],"sourcesContent":["// src/path-to-regex-modified.ts\nvar regexIdentifierStart = /[$_\\p{ID_Start}]/u;\nvar regexIdentifierPart = /[$_\\u200C\\u200D\\p{ID_Continue}]/u;\nfunction isASCII(str, extended) {\n return (extended ? /^[\\x00-\\xFF]*$/ : /^[\\x00-\\x7F]*$/).test(str);\n}\nfunction lexer(str, lenient = false) {\n const tokens = [];\n let i = 0;\n while (i < str.length) {\n const char = str[i];\n const ErrorOrInvalid = function(msg) {\n if (!lenient)\n throw new TypeError(msg);\n tokens.push({ type: \"INVALID_CHAR\", index: i, value: str[i++] });\n };\n if (char === \"*\") {\n tokens.push({ type: \"ASTERISK\", index: i, value: str[i++] });\n continue;\n }\n if (char === \"+\" || char === \"?\") {\n tokens.push({ type: \"MODIFIER\", index: i, value: str[i++] });\n continue;\n }\n if (char === \"\\\\\") {\n tokens.push({ type: \"ESCAPED_CHAR\", index: i++, value: str[i++] });\n continue;\n }\n if (char === \"{\") {\n tokens.push({ type: \"OPEN\", index: i, value: str[i++] });\n continue;\n }\n if (char === \"}\") {\n tokens.push({ type: \"CLOSE\", index: i, value: str[i++] });\n continue;\n }\n if (char === \":\") {\n let name = \"\";\n let j = i + 1;\n while (j < str.length) {\n const code = str.substr(j, 1);\n if (j === i + 1 && regexIdentifierStart.test(code) || j !== i + 1 && regexIdentifierPart.test(code)) {\n name += str[j++];\n continue;\n }\n break;\n }\n if (!name) {\n ErrorOrInvalid(`Missing parameter name at ${i}`);\n continue;\n }\n tokens.push({ type: \"NAME\", index: i, value: name });\n i = j;\n continue;\n }\n if (char === \"(\") {\n let count = 1;\n let pattern = \"\";\n let j = i + 1;\n let error = false;\n if (str[j] === \"?\") {\n ErrorOrInvalid(`Pattern cannot start with \"?\" at ${j}`);\n continue;\n }\n while (j < str.length) {\n if (!isASCII(str[j], false)) {\n ErrorOrInvalid(`Invalid character '${str[j]}' at ${j}.`);\n error = true;\n break;\n }\n if (str[j] === \"\\\\\") {\n pattern += str[j++] + str[j++];\n continue;\n }\n if (str[j] === \")\") {\n count--;\n if (count === 0) {\n j++;\n break;\n }\n } else if (str[j] === \"(\") {\n count++;\n if (str[j + 1] !== \"?\") {\n ErrorOrInvalid(`Capturing groups are not allowed at ${j}`);\n error = true;\n break;\n }\n }\n pattern += str[j++];\n }\n if (error) {\n continue;\n }\n if (count) {\n ErrorOrInvalid(`Unbalanced pattern at ${i}`);\n continue;\n }\n if (!pattern) {\n ErrorOrInvalid(`Missing pattern at ${i}`);\n continue;\n }\n tokens.push({ type: \"PATTERN\", index: i, value: pattern });\n i = j;\n continue;\n }\n tokens.push({ type: \"CHAR\", index: i, value: str[i++] });\n }\n tokens.push({ type: \"END\", index: i, value: \"\" });\n return tokens;\n}\nfunction parse(str, options = {}) {\n const tokens = lexer(str);\n const { prefixes = \"./\" } = options;\n const defaultPattern = `[^${escapeString(options.delimiter === void 0 ? \"/#?\" : options.delimiter)}]+?`;\n const result = [];\n let key = 0;\n let i = 0;\n let path = \"\";\n let nameSet = /* @__PURE__ */ new Set();\n const tryConsume = (type) => {\n if (i < tokens.length && tokens[i].type === type)\n return tokens[i++].value;\n };\n const tryConsumeModifier = () => {\n const r = tryConsume(\"MODIFIER\");\n if (r) {\n return r;\n }\n return tryConsume(\"ASTERISK\");\n };\n const mustConsume = (type) => {\n const value = tryConsume(type);\n if (value !== void 0)\n return value;\n const { type: nextType, index } = tokens[i];\n throw new TypeError(`Unexpected ${nextType} at ${index}, expected ${type}`);\n };\n const consumeText = () => {\n let result2 = \"\";\n let value;\n while (value = tryConsume(\"CHAR\") || tryConsume(\"ESCAPED_CHAR\")) {\n result2 += value;\n }\n return result2;\n };\n const DefaultEncodePart = (value) => {\n return value;\n };\n const encodePart = options.encodePart || DefaultEncodePart;\n while (i < tokens.length) {\n const char = tryConsume(\"CHAR\");\n const name = tryConsume(\"NAME\");\n let pattern = tryConsume(\"PATTERN\");\n if (!name && !pattern && tryConsume(\"ASTERISK\")) {\n pattern = \".*\";\n }\n if (name || pattern) {\n let prefix = char || \"\";\n if (prefixes.indexOf(prefix) === -1) {\n path += prefix;\n prefix = \"\";\n }\n if (path) {\n result.push(encodePart(path));\n path = \"\";\n }\n const finalName = name || key++;\n if (nameSet.has(finalName)) {\n throw new TypeError(`Duplicate name '${finalName}'.`);\n }\n nameSet.add(finalName);\n result.push({\n name: finalName,\n prefix: encodePart(prefix),\n suffix: \"\",\n pattern: pattern || defaultPattern,\n modifier: tryConsumeModifier() || \"\"\n });\n continue;\n }\n const value = char || tryConsume(\"ESCAPED_CHAR\");\n if (value) {\n path += value;\n continue;\n }\n const open = tryConsume(\"OPEN\");\n if (open) {\n const prefix = consumeText();\n const name2 = tryConsume(\"NAME\") || \"\";\n let pattern2 = tryConsume(\"PATTERN\") || \"\";\n if (!name2 && !pattern2 && tryConsume(\"ASTERISK\")) {\n pattern2 = \".*\";\n }\n const suffix = consumeText();\n mustConsume(\"CLOSE\");\n const modifier = tryConsumeModifier() || \"\";\n if (!name2 && !pattern2 && !modifier) {\n path += prefix;\n continue;\n }\n if (!name2 && !pattern2 && !prefix) {\n continue;\n }\n if (path) {\n result.push(encodePart(path));\n path = \"\";\n }\n result.push({\n name: name2 || (pattern2 ? key++ : \"\"),\n pattern: name2 && !pattern2 ? defaultPattern : pattern2,\n prefix: encodePart(prefix),\n suffix: encodePart(suffix),\n modifier\n });\n continue;\n }\n if (path) {\n result.push(encodePart(path));\n path = \"\";\n }\n mustConsume(\"END\");\n }\n return result;\n}\nfunction escapeString(str) {\n return str.replace(/([.+*?^${}()[\\]|/\\\\])/g, \"\\\\$1\");\n}\nfunction flags(options) {\n return options && options.ignoreCase ? \"ui\" : \"u\";\n}\nfunction regexpToRegexp(path, keys) {\n if (!keys)\n return path;\n const groupsRegex = /\\((?:\\?<(.*?)>)?(?!\\?)/g;\n let index = 0;\n let execResult = groupsRegex.exec(path.source);\n while (execResult) {\n keys.push({\n name: execResult[1] || index++,\n prefix: \"\",\n suffix: \"\",\n modifier: \"\",\n pattern: \"\"\n });\n execResult = groupsRegex.exec(path.source);\n }\n return path;\n}\nfunction arrayToRegexp(paths, keys, options) {\n const parts = paths.map((path) => pathToRegexp(path, keys, options).source);\n return new RegExp(`(?:${parts.join(\"|\")})`, flags(options));\n}\nfunction stringToRegexp(path, keys, options) {\n return tokensToRegexp(parse(path, options), keys, options);\n}\nfunction tokensToRegexp(tokens, keys, options = {}) {\n const {\n strict = false,\n start = true,\n end = true,\n encode = (x) => x\n } = options;\n const endsWith = `[${escapeString(options.endsWith === void 0 ? \"\" : options.endsWith)}]|$`;\n const delimiter = `[${escapeString(options.delimiter === void 0 ? \"/#?\" : options.delimiter)}]`;\n let route = start ? \"^\" : \"\";\n for (const token of tokens) {\n if (typeof token === \"string\") {\n route += escapeString(encode(token));\n } else {\n const prefix = escapeString(encode(token.prefix));\n const suffix = escapeString(encode(token.suffix));\n if (token.pattern) {\n if (keys)\n keys.push(token);\n if (prefix || suffix) {\n if (token.modifier === \"+\" || token.modifier === \"*\") {\n const mod = token.modifier === \"*\" ? \"?\" : \"\";\n route += `(?:${prefix}((?:${token.pattern})(?:${suffix}${prefix}(?:${token.pattern}))*)${suffix})${mod}`;\n } else {\n route += `(?:${prefix}(${token.pattern})${suffix})${token.modifier}`;\n }\n } else {\n if (token.modifier === \"+\" || token.modifier === \"*\") {\n route += `((?:${token.pattern})${token.modifier})`;\n } else {\n route += `(${token.pattern})${token.modifier}`;\n }\n }\n } else {\n route += `(?:${prefix}${suffix})${token.modifier}`;\n }\n }\n }\n if (end) {\n if (!strict)\n route += `${delimiter}?`;\n route += !options.endsWith ? \"$\" : `(?=${endsWith})`;\n } else {\n const endToken = tokens[tokens.length - 1];\n const isEndDelimited = typeof endToken === \"string\" ? delimiter.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;\n if (!strict) {\n route += `(?:${delimiter}(?=${endsWith}))?`;\n }\n if (!isEndDelimited) {\n route += `(?=${delimiter}|${endsWith})`;\n }\n }\n return new RegExp(route, flags(options));\n}\nfunction pathToRegexp(path, keys, options) {\n if (path instanceof RegExp)\n return regexpToRegexp(path, keys);\n if (Array.isArray(path))\n return arrayToRegexp(path, keys, options);\n return stringToRegexp(path, keys, options);\n}\n\n// src/url-utils.ts\nvar DEFAULT_OPTIONS = {\n delimiter: \"\",\n prefixes: \"\",\n sensitive: true,\n strict: true\n};\nvar HOSTNAME_OPTIONS = {\n delimiter: \".\",\n prefixes: \"\",\n sensitive: true,\n strict: true\n};\nvar PATHNAME_OPTIONS = {\n delimiter: \"/\",\n prefixes: \"/\",\n sensitive: true,\n strict: true\n};\nfunction isAbsolutePathname(pathname, isPattern) {\n if (!pathname.length) {\n return false;\n }\n if (pathname[0] === \"/\") {\n return true;\n }\n if (!isPattern) {\n return false;\n }\n if (pathname.length < 2) {\n return false;\n }\n if ((pathname[0] == \"\\\\\" || pathname[0] == \"{\") && pathname[1] == \"/\") {\n return true;\n }\n return false;\n}\nfunction maybeStripPrefix(value, prefix) {\n if (value.startsWith(prefix)) {\n return value.substring(prefix.length, value.length);\n }\n return value;\n}\nfunction maybeStripSuffix(value, suffix) {\n if (value.endsWith(suffix)) {\n return value.substr(0, value.length - suffix.length);\n }\n return value;\n}\nfunction treatAsIPv6Hostname(value) {\n if (!value || value.length < 2) {\n return false;\n }\n if (value[0] === \"[\") {\n return true;\n }\n if ((value[0] === \"\\\\\" || value[0] === \"{\") && value[1] === \"[\") {\n return true;\n }\n return false;\n}\nvar SPECIAL_SCHEMES = [\n \"ftp\",\n \"file\",\n \"http\",\n \"https\",\n \"ws\",\n \"wss\"\n];\nfunction isSpecialScheme(protocol_regexp) {\n if (!protocol_regexp) {\n return true;\n }\n for (const scheme of SPECIAL_SCHEMES) {\n if (protocol_regexp.test(scheme)) {\n return true;\n }\n }\n return false;\n}\nfunction canonicalizeHash(hash, isPattern) {\n hash = maybeStripPrefix(hash, \"#\");\n if (isPattern || hash === \"\") {\n return hash;\n }\n const url = new URL(\"https://example.com\");\n url.hash = hash;\n return url.hash ? url.hash.substring(1, url.hash.length) : \"\";\n}\nfunction canonicalizeSearch(search, isPattern) {\n search = maybeStripPrefix(search, \"?\");\n if (isPattern || search === \"\") {\n return search;\n }\n const url = new URL(\"https://example.com\");\n url.search = search;\n return url.search ? url.search.substring(1, url.search.length) : \"\";\n}\nfunction canonicalizeHostname(hostname, isPattern) {\n if (isPattern || hostname === \"\") {\n return hostname;\n }\n if (treatAsIPv6Hostname(hostname)) {\n return ipv6HostnameEncodeCallback(hostname);\n } else {\n return hostnameEncodeCallback(hostname);\n }\n}\nfunction canonicalizePassword(password, isPattern) {\n if (isPattern || password === \"\") {\n return password;\n }\n const url = new URL(\"https://example.com\");\n url.password = password;\n return url.password;\n}\nfunction canonicalizeUsername(username, isPattern) {\n if (isPattern || username === \"\") {\n return username;\n }\n const url = new URL(\"https://example.com\");\n url.username = username;\n return url.username;\n}\nfunction canonicalizePathname(pathname, protocol, isPattern) {\n if (isPattern || pathname === \"\") {\n return pathname;\n }\n if (protocol && !SPECIAL_SCHEMES.includes(protocol)) {\n const url = new URL(`${protocol}:${pathname}`);\n return url.pathname;\n }\n const leadingSlash = pathname[0] == \"/\";\n pathname = new URL(\n !leadingSlash ? \"/-\" + pathname : pathname,\n \"https://example.com\"\n ).pathname;\n if (!leadingSlash) {\n pathname = pathname.substring(2, pathname.length);\n }\n return pathname;\n}\nfunction canonicalizePort(port, protocol, isPattern) {\n if (defaultPortForProtocol(protocol) === port) {\n port = \"\";\n }\n if (isPattern || port === \"\") {\n return port;\n }\n return portEncodeCallback(port);\n}\nfunction canonicalizeProtocol(protocol, isPattern) {\n protocol = maybeStripSuffix(protocol, \":\");\n if (isPattern || protocol === \"\") {\n return protocol;\n }\n return protocolEncodeCallback(protocol);\n}\nfunction defaultPortForProtocol(protocol) {\n switch (protocol) {\n case \"ws\":\n case \"http\":\n return \"80\";\n case \"wws\":\n case \"https\":\n return \"443\";\n case \"ftp\":\n return \"21\";\n default:\n return \"\";\n }\n}\nfunction protocolEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n if (/^[-+.A-Za-z0-9]*$/.test(input))\n return input.toLowerCase();\n throw new TypeError(`Invalid protocol '${input}'.`);\n}\nfunction usernameEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n const url = new URL(\"https://example.com\");\n url.username = input;\n return url.username;\n}\nfunction passwordEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n const url = new URL(\"https://example.com\");\n url.password = input;\n return url.password;\n}\nfunction hostnameEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n if (/[\\t\\n\\r #%/:<>?@[\\]^\\\\|]/g.test(input)) {\n throw new TypeError(`Invalid hostname '${input}'`);\n }\n const url = new URL(\"https://example.com\");\n url.hostname = input;\n return url.hostname;\n}\nfunction ipv6HostnameEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n if (/[^0-9a-fA-F[\\]:]/g.test(input)) {\n throw new TypeError(`Invalid IPv6 hostname '${input}'`);\n }\n return input.toLowerCase();\n}\nfunction portEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n if (/^[0-9]*$/.test(input) && parseInt(input) <= 65535) {\n return input;\n }\n throw new TypeError(`Invalid port '${input}'.`);\n}\nfunction standardURLPathnameEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n const url = new URL(\"https://example.com\");\n url.pathname = input[0] !== \"/\" ? \"/-\" + input : input;\n if (input[0] !== \"/\") {\n return url.pathname.substring(2, url.pathname.length);\n }\n return url.pathname;\n}\nfunction pathURLPathnameEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n const url = new URL(`data:${input}`);\n return url.pathname;\n}\nfunction searchEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n const url = new URL(\"https://example.com\");\n url.search = input;\n return url.search.substring(1, url.search.length);\n}\nfunction hashEncodeCallback(input) {\n if (input === \"\") {\n return input;\n }\n const url = new URL(\"https://example.com\");\n url.hash = input;\n return url.hash.substring(1, url.hash.length);\n}\n\n// src/url-pattern-parser.ts\nvar Parser = class {\n constructor(input) {\n this.tokenList = [];\n this.internalResult = {};\n this.tokenIndex = 0;\n this.tokenIncrement = 1;\n this.componentStart = 0;\n this.state = 0 /* INIT */;\n this.groupDepth = 0;\n this.hostnameIPv6BracketDepth = 0;\n this.shouldTreatAsStandardURL = false;\n this.input = input;\n }\n get result() {\n return this.internalResult;\n }\n parse() {\n this.tokenList = lexer(this.input, true);\n for (; this.tokenIndex < this.tokenList.length; this.tokenIndex += this.tokenIncrement) {\n this.tokenIncrement = 1;\n if (this.tokenList[this.tokenIndex].type === \"END\") {\n if (this.state === 0 /* INIT */) {\n this.rewind();\n if (this.isHashPrefix()) {\n this.changeState(9 /* HASH */, 1);\n } else if (this.isSearchPrefix()) {\n this.changeState(8 /* SEARCH */, 1);\n this.internalResult.hash = \"\";\n } else {\n this.changeState(7 /* PATHNAME */, 0);\n this.internalResult.search = \"\";\n this.internalResult.hash = \"\";\n }\n continue;\n } else if (this.state === 2 /* AUTHORITY */) {\n this.rewindAndSetState(5 /* HOSTNAME */);\n continue;\n }\n this.changeState(10 /* DONE */, 0);\n break;\n }\n if (this.groupDepth > 0) {\n if (this.isGroupClose()) {\n this.groupDepth -= 1;\n } else {\n continue;\n }\n }\n if (this.isGroupOpen()) {\n this.groupDepth += 1;\n continue;\n }\n switch (this.state) {\n case 0 /* INIT */:\n if (this.isProtocolSuffix()) {\n this.internalResult.username = \"\";\n this.internalResult.password = \"\";\n this.internalResult.hostname = \"\";\n this.internalResult.port = \"\";\n this.internalResult.pathname = \"\";\n this.internalResult.search = \"\";\n this.internalResult.hash = \"\";\n this.rewindAndSetState(1 /* PROTOCOL */);\n }\n break;\n case 1 /* PROTOCOL */:\n if (this.isProtocolSuffix()) {\n this.computeShouldTreatAsStandardURL();\n let nextState = 7 /* PATHNAME */;\n let skip = 1;\n if (this.shouldTreatAsStandardURL) {\n this.internalResult.pathname = \"/\";\n }\n if (this.nextIsAuthoritySlashes()) {\n nextState = 2 /* AUTHORITY */;\n skip = 3;\n } else if (this.shouldTreatAsStandardURL) {\n nextState = 2 /* AUTHORITY */;\n }\n this.changeState(nextState, skip);\n }\n break;\n case 2 /* AUTHORITY */:\n if (this.isIdentityTerminator()) {\n this.rewindAndSetState(3 /* USERNAME */);\n } else if (this.isPathnameStart() || this.isSearchPrefix() || this.isHashPrefix()) {\n this.rewindAndSetState(5 /* HOSTNAME */);\n }\n break;\n case 3 /* USERNAME */:\n if (this.isPasswordPrefix()) {\n this.changeState(4 /* PASSWORD */, 1);\n } else if (this.isIdentityTerminator()) {\n this.changeState(5 /* HOSTNAME */, 1);\n }\n break;\n case 4 /* PASSWORD */:\n if (this.isIdentityTerminator()) {\n this.changeState(5 /* HOSTNAME */, 1);\n }\n break;\n case 5 /* HOSTNAME */:\n if (this.isIPv6Open()) {\n this.hostnameIPv6BracketDepth += 1;\n } else if (this.isIPv6Close()) {\n this.hostnameIPv6BracketDepth -= 1;\n }\n if (this.isPortPrefix() && !this.hostnameIPv6BracketDepth) {\n this.changeState(6 /* PORT */, 1);\n } else if (this.isPathnameStart()) {\n this.changeState(7 /* PATHNAME */, 0);\n } else if (this.isSearchPrefix()) {\n this.changeState(8 /* SEARCH */, 1);\n } else if (this.isHashPrefix()) {\n this.changeState(9 /* HASH */, 1);\n }\n break;\n case 6 /* PORT */:\n if (this.isPathnameStart()) {\n this.changeState(7 /* PATHNAME */, 0);\n } else if (this.isSearchPrefix()) {\n this.changeState(8 /* SEARCH */, 1);\n } else if (this.isHashPrefix()) {\n this.changeState(9 /* HASH */, 1);\n }\n break;\n case 7 /* PATHNAME */:\n if (this.isSearchPrefix()) {\n this.changeState(8 /* SEARCH */, 1);\n } else if (this.isHashPrefix()) {\n this.changeState(9 /* HASH */, 1);\n }\n break;\n case 8 /* SEARCH */:\n if (this.isHashPrefix()) {\n this.changeState(9 /* HASH */, 1);\n }\n break;\n case 9 /* HASH */:\n break;\n case 10 /* DONE */:\n break;\n }\n }\n }\n changeState(newState, skip) {\n switch (this.state) {\n case 0 /* INIT */:\n break;\n case 1 /* PROTOCOL */:\n this.internalResult.protocol = this.makeComponentString();\n break;\n case 2 /* AUTHORITY */:\n break;\n case 3 /* USERNAME */:\n this.internalResult.username = this.makeComponentString();\n break;\n case 4 /* PASSWORD */:\n this.internalResult.password = this.makeComponentString();\n break;\n case 5 /* HOSTNAME */:\n this.internalResult.hostname = this.makeComponentString();\n break;\n case 6 /* PORT */:\n this.internalResult.port = this.makeComponentString();\n break;\n case 7 /* PATHNAME */:\n this.internalResult.pathname = this.makeComponentString();\n break;\n case 8 /* SEARCH */:\n this.internalResult.search = this.makeComponentString();\n break;\n case 9 /* HASH */:\n this.internalResult.hash = this.makeComponentString();\n break;\n case 10 /* DONE */:\n break;\n }\n this.changeStateWithoutSettingComponent(newState, skip);\n }\n changeStateWithoutSettingComponent(newState, skip) {\n this.state = newState;\n this.componentStart = this.tokenIndex + skip;\n this.tokenIndex += skip;\n this.tokenIncrement = 0;\n }\n rewind() {\n this.tokenIndex = this.componentStart;\n this.tokenIncrement = 0;\n }\n rewindAndSetState(newState) {\n this.rewind();\n this.state = newState;\n }\n safeToken(index) {\n if (index < 0) {\n index = this.tokenList.length - index;\n }\n if (index < this.tokenList.length) {\n return this.tokenList[index];\n }\n return this.tokenList[this.tokenList.length - 1];\n }\n isNonSpecialPatternChar(index, value) {\n const token = this.safeToken(index);\n return token.value === value && (token.type === \"CHAR\" || token.type === \"ESCAPED_CHAR\" || token.type === \"INVALID_CHAR\");\n }\n isProtocolSuffix() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \":\");\n }\n nextIsAuthoritySlashes() {\n return this.isNonSpecialPatternChar(this.tokenIndex + 1, \"/\") && this.isNonSpecialPatternChar(this.tokenIndex + 2, \"/\");\n }\n isIdentityTerminator() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \"@\");\n }\n isPasswordPrefix() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \":\");\n }\n isPortPrefix() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \":\");\n }\n isPathnameStart() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \"/\");\n }\n isSearchPrefix() {\n if (this.isNonSpecialPatternChar(this.tokenIndex, \"?\")) {\n return true;\n }\n if (this.tokenList[this.tokenIndex].value !== \"?\") {\n return false;\n }\n const previousToken = this.safeToken(this.tokenIndex - 1);\n return previousToken.type !== \"NAME\" && previousToken.type !== \"PATTERN\" && previousToken.type !== \"CLOSE\" && previousToken.type !== \"ASTERISK\";\n }\n isHashPrefix() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \"#\");\n }\n isGroupOpen() {\n return this.tokenList[this.tokenIndex].type == \"OPEN\";\n }\n isGroupClose() {\n return this.tokenList[this.tokenIndex].type == \"CLOSE\";\n }\n isIPv6Open() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \"[\");\n }\n isIPv6Close() {\n return this.isNonSpecialPatternChar(this.tokenIndex, \"]\");\n }\n makeComponentString() {\n const token = this.tokenList[this.tokenIndex];\n const componentCharStart = this.safeToken(this.componentStart).index;\n return this.input.substring(componentCharStart, token.index);\n }\n computeShouldTreatAsStandardURL() {\n const options = {};\n Object.assign(options, DEFAULT_OPTIONS);\n options.encodePart = protocolEncodeCallback;\n const regexp = pathToRegexp(this.makeComponentString(), void 0, options);\n this.shouldTreatAsStandardURL = isSpecialScheme(regexp);\n }\n};\n\n// src/url-pattern.ts\nvar COMPONENTS = [\n \"protocol\",\n \"username\",\n \"password\",\n \"hostname\",\n \"port\",\n \"pathname\",\n \"search\",\n \"hash\"\n];\nvar DEFAULT_PATTERN = \"*\";\nfunction extractValues(url, baseURL) {\n if (typeof url !== \"string\") {\n throw new TypeError(`parameter 1 is not of type 'string'.`);\n }\n const o = new URL(url, baseURL);\n return {\n protocol: o.protocol.substring(0, o.protocol.length - 1),\n username: o.username,\n password: o.password,\n hostname: o.hostname,\n port: o.port,\n pathname: o.pathname,\n search: o.search != \"\" ? o.search.substring(1, o.search.length) : void 0,\n hash: o.hash != \"\" ? o.hash.substring(1, o.hash.length) : void 0\n };\n}\nfunction processBaseURLString(input, isPattern) {\n if (!isPattern) {\n return input;\n }\n return escapePatternString(input);\n}\nfunction applyInit(o, init, isPattern) {\n let baseURL;\n if (typeof init.baseURL === \"string\") {\n try {\n baseURL = new URL(init.baseURL);\n o.protocol = processBaseURLString(baseURL.protocol.substring(0, baseURL.protocol.length - 1), isPattern);\n o.username = processBaseURLString(baseURL.username, isPattern);\n o.password = processBaseURLString(baseURL.password, isPattern);\n o.hostname = processBaseURLString(baseURL.hostname, isPattern);\n o.port = processBaseURLString(baseURL.port, isPattern);\n o.pathname = processBaseURLString(baseURL.pathname, isPattern);\n o.search = processBaseURLString(baseURL.search.substring(1, baseURL.search.length), isPattern);\n o.hash = processBaseURLString(baseURL.hash.substring(1, baseURL.hash.length), isPattern);\n } catch {\n throw new TypeError(`invalid baseURL '${init.baseURL}'.`);\n }\n }\n if (typeof init.protocol === \"string\") {\n o.protocol = canonicalizeProtocol(init.protocol, isPattern);\n }\n if (typeof init.username === \"string\") {\n o.username = canonicalizeUsername(init.username, isPattern);\n }\n if (typeof init.password === \"string\") {\n o.password = canonicalizePassword(init.password, isPattern);\n }\n if (typeof init.hostname === \"string\") {\n o.hostname = canonicalizeHostname(init.hostname, isPattern);\n }\n if (typeof init.port === \"string\") {\n o.port = canonicalizePort(init.port, o.protocol, isPattern);\n }\n if (typeof init.pathname === \"string\") {\n o.pathname = init.pathname;\n if (baseURL && !isAbsolutePathname(o.pathname, isPattern)) {\n const slashIndex = baseURL.pathname.lastIndexOf(\"/\");\n if (slashIndex >= 0) {\n o.pathname = processBaseURLString(baseURL.pathname.substring(0, slashIndex + 1), isPattern) + o.pathname;\n }\n }\n o.pathname = canonicalizePathname(o.pathname, o.protocol, isPattern);\n }\n if (typeof init.search === \"string\") {\n o.search = canonicalizeSearch(init.search, isPattern);\n }\n if (typeof init.hash === \"string\") {\n o.hash = canonicalizeHash(init.hash, isPattern);\n }\n return o;\n}\nfunction escapePatternString(value) {\n return value.replace(/([+*?:{}()\\\\])/g, \"\\\\$1\");\n}\nfunction escapeRegexpString(value) {\n return value.replace(/([.+*?^${}()[\\]|/\\\\])/g, \"\\\\$1\");\n}\nfunction tokensToPattern(tokens, options) {\n const wildcardPattern = \".*\";\n const segmentWildcardPattern = `[^${escapeRegexpString(options.delimiter === void 0 ? \"/#?\" : options.delimiter)}]+?`;\n const regexIdentifierPart2 = /[$_\\u200C\\u200D\\p{ID_Continue}]/u;\n let result = \"\";\n for (let i = 0; i < tokens.length; ++i) {\n const token = tokens[i];\n const lastToken = i > 0 ? tokens[i - 1] : null;\n const nextToken = i < tokens.length - 1 ? tokens[i + 1] : null;\n if (typeof token === \"string\") {\n result += escapePatternString(token);\n continue;\n }\n if (token.pattern === \"\") {\n if (token.modifier === \"\") {\n result += escapePatternString(token.prefix);\n continue;\n }\n result += `{${escapePatternString(token.prefix)}}${token.modifier}`;\n continue;\n }\n const customName = typeof token.name !== \"number\";\n const optionsPrefixes = options.prefixes !== void 0 ? options.prefixes : \"./\";\n let needsGrouping = token.suffix !== \"\" || token.prefix !== \"\" && (token.prefix.length !== 1 || !optionsPrefixes.includes(token.prefix));\n if (!needsGrouping && customName && token.pattern === segmentWildcardPattern && token.modifier === \"\" && nextToken && !nextToken.prefix && !nextToken.suffix) {\n if (typeof nextToken === \"string\") {\n const code = nextToken.length > 0 ? nextToken[0] : \"\";\n needsGrouping = regexIdentifierPart2.test(code);\n } else {\n needsGrouping = typeof nextToken.name === \"number\";\n }\n }\n if (!needsGrouping && token.prefix === \"\" && lastToken && typeof lastToken === \"string\" && lastToken.length > 0) {\n const code = lastToken[lastToken.length - 1];\n needsGrouping = optionsPrefixes.includes(code);\n }\n if (needsGrouping) {\n result += \"{\";\n }\n result += escapePatternString(token.prefix);\n if (customName) {\n result += `:${token.name}`;\n }\n if (token.pattern === wildcardPattern) {\n if (!customName && (!lastToken || typeof lastToken === \"string\" || lastToken.modifier || needsGrouping || token.prefix !== \"\")) {\n result += \"*\";\n } else {\n result += `(${wildcardPattern})`;\n }\n } else if (token.pattern === segmentWildcardPattern) {\n if (!customName) {\n result += `(${segmentWildcardPattern})`;\n }\n } else {\n result += `(${token.pattern})`;\n }\n if (token.pattern === segmentWildcardPattern && customName && token.suffix !== \"\") {\n if (regexIdentifierPart2.test(token.suffix[0])) {\n result += \"\\\\\";\n }\n }\n result += escapePatternString(token.suffix);\n if (needsGrouping) {\n result += \"}\";\n }\n result += token.modifier;\n }\n return result;\n}\nvar URLPattern = class {\n constructor(init = {}, baseURLOrOptions, options) {\n this.regexp = {};\n this.keys = {};\n this.component_pattern = {};\n try {\n let baseURL = void 0;\n if (typeof baseURLOrOptions === \"string\") {\n baseURL = baseURLOrOptions;\n } else {\n options = baseURLOrOptions;\n }\n if (typeof init === \"string\") {\n const parser = new Parser(init);\n parser.parse();\n init = parser.result;\n if (baseURL === void 0 && typeof init.protocol !== \"string\") {\n throw new TypeError(`A base URL must be provided for a relative constructor string.`);\n }\n init.baseURL = baseURL;\n } else {\n if (!init || typeof init !== \"object\") {\n throw new TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);\n }\n if (baseURL) {\n throw new TypeError(`parameter 1 is not of type 'string'.`);\n }\n }\n if (typeof options === \"undefined\") {\n options = { ignoreCase: false };\n }\n const ignoreCaseOptions = { ignoreCase: options.ignoreCase === true };\n const defaults = {\n pathname: DEFAULT_PATTERN,\n protocol: DEFAULT_PATTERN,\n username: DEFAULT_PATTERN,\n password: DEFAULT_PATTERN,\n hostname: DEFAULT_PATTERN,\n port: DEFAULT_PATTERN,\n search: DEFAULT_PATTERN,\n hash: DEFAULT_PATTERN\n };\n this.pattern = applyInit(defaults, init, true);\n if (defaultPortForProtocol(this.pattern.protocol) === this.pattern.port) {\n this.pattern.port = \"\";\n }\n let component;\n for (component of COMPONENTS) {\n if (!(component in this.pattern))\n continue;\n const options2 = {};\n const pattern = this.pattern[component];\n this.keys[component] = [];\n switch (component) {\n case \"protocol\":\n Object.assign(options2, DEFAULT_OPTIONS);\n options2.encodePart = protocolEncodeCallback;\n break;\n case \"username\":\n Object.assign(options2, DEFAULT_OPTIONS);\n options2.encodePart = usernameEncodeCallback;\n break;\n case \"password\":\n Object.assign(options2, DEFAULT_OPTIONS);\n options2.encodePart = passwordEncodeCallback;\n break;\n case \"hostname\":\n Object.assign(options2, HOSTNAME_OPTIONS);\n if (treatAsIPv6Hostname(pattern)) {\n options2.encodePart = ipv6HostnameEncodeCallback;\n } else {\n options2.encodePart = hostnameEncodeCallback;\n }\n break;\n case \"port\":\n Object.assign(options2, DEFAULT_OPTIONS);\n options2.encodePart = portEncodeCallback;\n break;\n case \"pathname\":\n if (isSpecialScheme(this.regexp.protocol)) {\n Object.assign(options2, PATHNAME_OPTIONS, ignoreCaseOptions);\n options2.encodePart = standardURLPathnameEncodeCallback;\n } else {\n Object.assign(options2, DEFAULT_OPTIONS, ignoreCaseOptions);\n options2.encodePart = pathURLPathnameEncodeCallback;\n }\n break;\n case \"search\":\n Object.assign(options2, DEFAULT_OPTIONS, ignoreCaseOptions);\n options2.encodePart = searchEncodeCallback;\n break;\n case \"hash\":\n Object.assign(options2, DEFAULT_OPTIONS, ignoreCaseOptions);\n options2.encodePart = hashEncodeCallback;\n break;\n }\n try {\n const tokens = parse(pattern, options2);\n this.regexp[component] = tokensToRegexp(tokens, this.keys[component], options2);\n this.component_pattern[component] = tokensToPattern(tokens, options2);\n } catch {\n throw new TypeError(`invalid ${component} pattern '${this.pattern[component]}'.`);\n }\n }\n } catch (err) {\n throw new TypeError(`Failed to construct 'URLPattern': ${err.message}`);\n }\n }\n test(input = {}, baseURL) {\n let values = {\n pathname: \"\",\n protocol: \"\",\n username: \"\",\n password: \"\",\n hostname: \"\",\n port: \"\",\n search: \"\",\n hash: \"\"\n };\n if (typeof input !== \"string\" && baseURL) {\n throw new TypeError(`parameter 1 is not of type 'string'.`);\n }\n if (typeof input === \"undefined\") {\n return false;\n }\n try {\n if (typeof input === \"object\") {\n values = applyInit(values, input, false);\n } else {\n values = applyInit(values, extractValues(input, baseURL), false);\n }\n } catch (err) {\n return false;\n }\n let component;\n for (component of COMPONENTS) {\n if (!this.regexp[component].exec(values[component])) {\n return false;\n }\n }\n return true;\n }\n exec(input = {}, baseURL) {\n let values = {\n pathname: \"\",\n protocol: \"\",\n username: \"\",\n password: \"\",\n hostname: \"\",\n port: \"\",\n search: \"\",\n hash: \"\"\n };\n if (typeof input !== \"string\" && baseURL) {\n throw new TypeError(`parameter 1 is not of type 'string'.`);\n }\n if (typeof input === \"undefined\") {\n return;\n }\n try {\n if (typeof input === \"object\") {\n values = applyInit(values, input, false);\n } else {\n values = applyInit(values, extractValues(input, baseURL), false);\n }\n } catch (err) {\n return null;\n }\n let result = {};\n if (baseURL) {\n result.inputs = [input, baseURL];\n } else {\n result.inputs = [input];\n }\n let component;\n for (component of COMPONENTS) {\n let match = this.regexp[component].exec(values[component]);\n if (!match) {\n return null;\n }\n let groups = {};\n for (let [i, key] of this.keys[component].entries()) {\n if (typeof key.name === \"string\" || typeof key.name === \"number\") {\n let value = match[i + 1];\n groups[key.name] = value;\n }\n }\n result[component] = {\n input: values[component] || \"\",\n groups\n };\n }\n return result;\n }\n get protocol() {\n return this.component_pattern.protocol;\n }\n get username() {\n return this.component_pattern.username;\n }\n get password() {\n return this.component_pattern.password;\n }\n get hostname() {\n return this.component_pattern.hostname;\n }\n get port() {\n return this.component_pattern.port;\n }\n get pathname() {\n return this.component_pattern.pathname;\n }\n get search() {\n return this.component_pattern.search;\n }\n get hash() {\n return this.component_pattern.hash;\n }\n};\nexport {\n URLPattern\n};\n","import { URLPattern } from \"./dist/urlpattern.js\";\n\nexport { URLPattern };\n\nif (!globalThis.URLPattern) {\n globalThis.URLPattern = URLPattern;\n}\n"],"names":["regexIdentifierStart","regexIdentifierPart","isASCII","str","extended","lexer","lenient","tokens","i","char","ErrorOrInvalid","msg","name","j","code","count","pattern","error","parse","options","prefixes","defaultPattern","escapeString","result","key","path","nameSet","tryConsume","type","tryConsumeModifier","r","mustConsume","value","nextType","index","consumeText","result2","DefaultEncodePart","encodePart","prefix","finalName","name2","pattern2","suffix","modifier","flags","regexpToRegexp","keys","groupsRegex","execResult","arrayToRegexp","paths","parts","pathToRegexp","stringToRegexp","tokensToRegexp","strict","start","end","encode","x","endsWith","delimiter","route","token","mod","endToken","isEndDelimited","DEFAULT_OPTIONS","HOSTNAME_OPTIONS","PATHNAME_OPTIONS","isAbsolutePathname","pathname","isPattern","maybeStripPrefix","maybeStripSuffix","treatAsIPv6Hostname","SPECIAL_SCHEMES","isSpecialScheme","protocol_regexp","scheme","canonicalizeHash","hash","url","canonicalizeSearch","search","canonicalizeHostname","hostname","ipv6HostnameEncodeCallback","hostnameEncodeCallback","canonicalizePassword","password","canonicalizeUsername","username","canonicalizePathname","protocol","leadingSlash","canonicalizePort","port","defaultPortForProtocol","portEncodeCallback","canonicalizeProtocol","protocolEncodeCallback","input","usernameEncodeCallback","passwordEncodeCallback","standardURLPathnameEncodeCallback","pathURLPathnameEncodeCallback","searchEncodeCallback","hashEncodeCallback","Parser","nextState","skip","newState","previousToken","componentCharStart","regexp","COMPONENTS","DEFAULT_PATTERN","extractValues","baseURL","o","processBaseURLString","escapePatternString","applyInit","init","slashIndex","escapeRegexpString","tokensToPattern","wildcardPattern","segmentWildcardPattern","regexIdentifierPart2","lastToken","nextToken","customName","optionsPrefixes","needsGrouping","URLPattern","baseURLOrOptions","parser","ignoreCaseOptions","defaults","component","options2","err","values","match","groups"],"mappings":"AACA,IAAIA,EAAuB,oBACvBC,EAAsB,mCAC1B,SAASC,EAAQC,EAAKC,EAAU,CAC9B,OAAQA,EAAW,iBAAmB,kBAAkB,KAAKD,CAAG,CAClE,CACA,SAASE,EAAMF,EAAKG,EAAU,GAAO,CACnC,MAAMC,EAAS,CAAA,EACf,IAAIC,EAAI,EACR,KAAOA,EAAIL,EAAI,QAAQ,CACrB,MAAMM,EAAON,EAAIK,CAAC,EACZE,EAAiB,SAASC,EAAK,CACnC,GAAI,CAACL,EACH,MAAM,IAAI,UAAUK,CAAG,EACzBJ,EAAO,KAAK,CAAE,KAAM,eAAgB,MAAOC,EAAG,MAAOL,EAAIK,GAAG,CAAG,CAAA,CACrE,EACI,GAAIC,IAAS,IAAK,CAChBF,EAAO,KAAK,CAAE,KAAM,WAAY,MAAOC,EAAG,MAAOL,EAAIK,GAAG,CAAG,CAAA,EAC3D,SAEF,GAAIC,IAAS,KAAOA,IAAS,IAAK,CAChCF,EAAO,KAAK,CAAE,KAAM,WAAY,MAAOC,EAAG,MAAOL,EAAIK,GAAG,CAAG,CAAA,EAC3D,SAEF,GAAIC,IAAS,KAAM,CACjBF,EAAO,KAAK,CAAE,KAAM,eAAgB,MAAOC,IAAK,MAAOL,EAAIK,GAAG,CAAG,CAAA,EACjE,SAEF,GAAIC,IAAS,IAAK,CAChBF,EAAO,KAAK,CAAE,KAAM,OAAQ,MAAOC,EAA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,EAAS,CAAA,EACb,OAAS,CAAC3I,EAAGgB,CAAG,IAAK,KAAK,KAAKsH,CAAS,EAAE,UACxC,GAAI,OAAOtH,EAAI,MAAS,UAAY,OAAOA,EAAI,MAAS,SAAU,CAChE,IAAIQ,EAAQkH,EAAM1I,EAAI,CAAC,EACvB2I,EAAO3H,EAAI,IAAI,EAAIQ,EAGvBT,EAAOuH,CAAS,EAAI,CAClB,MAAOG,EAAOH,CAAS,GAAK,GAC5B,OAAAK,CACR,EAEI,OAAO5H,CACR,CACD,IAAI,UAAW,CACb,OAAO,KAAK,kBAAkB,QAC/B,CACD,IAAI,UAAW,CACb,OAAO,KAAK,kBAAkB,QAC/B,CACD,IAAI,UAAW,CACb,OAAO,KAAK,kBAAkB,QAC/B,CACD,IAAI,UAAW,CACb,OAAO,KAAK,kBAAkB,QAC/B,CACD,IAAI,MAAO,CACT,OAAO,KAAK,kBAAkB,IAC/B,CACD,IAAI,UAAW,CACb,OAAO,KAAK,kBAAkB,QAC/B,CACD,IAAI,QAAS,CACX,OAAO,KAAK,kBAAkB,MAC/B,CACD,IAAI,MAAO,CACT,OAAO,KAAK,kBAAkB,IAC/B,CACH,EC/rCK,WAAW,aACd,WAAW,WAAakH","x_google_ignoreList":[0,1]} -------------------------------------------------------------------------------- /docs/code/nordhealth-mono-561592b9.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/code/nordhealth-mono-561592b9.woff -------------------------------------------------------------------------------- /docs/code/nordhealth-sans-5156501c.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/docs/code/nordhealth-sans-5156501c.woff2 -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ms-auth-test 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/ios-pwa-shell/", 3 | "scope": "/ios-pwa-shell/", 4 | "name": "ms-auth-test", 5 | "display": "standalone", 6 | "start_url": "/ios-pwa-shell/", 7 | "short_name": "starter", 8 | "theme_color": "#E1477E", 9 | "description": "This is a ms-auth-test app", 10 | "orientation": "any", 11 | "background_color": "#E1477E", 12 | "related_applications": [], 13 | "prefer_related_applications": false, 14 | "display_override": ["window-controls-overlay"], 15 | "launch_handler": { 16 | "client_mode": "focus-existing" 17 | }, 18 | "icons": [ 19 | { 20 | "src": "assets/icons/512x512.png", 21 | "sizes": "512x512", 22 | "type": "image/png" 23 | }, 24 | { 25 | "src": "assets/icons/192x192.png", 26 | "sizes": "192x192", 27 | "type": "image/png" 28 | }, 29 | { 30 | "src": "assets/icons/48x48.png", 31 | "sizes": "48x48", 32 | "type": "image/png" 33 | }, 34 | { 35 | "src": "assets/icons/24x24.png", 36 | "sizes": "24x24", 37 | "type": "image/png" 38 | } 39 | ], 40 | "screenshots": [ 41 | { 42 | "src": "assets/screenshots/screen.png", 43 | "sizes": "1617x1012", 44 | "type": "image/png" 45 | } 46 | ], 47 | "features": [ 48 | "Cross Platform", 49 | "fast", 50 | "simple" 51 | ], 52 | "categories": [ 53 | "social" 54 | ], 55 | "shortcuts": [ 56 | { 57 | "name": "Open About", 58 | "short_name": "About", 59 | "description": "Open the about page", 60 | "url": "/about", 61 | "icons": [{ "src": "assets/icons/192x192.png", "sizes": "192x192" }] 62 | } 63 | ], 64 | "widgets": [ 65 | { 66 | "name": "Starter Widget", 67 | "tag": "starterWidget", 68 | "ms_ac_template": "widget/ac.json", 69 | "data": "widget/data.json", 70 | "description": "A simple widget example from pwa-starter.", 71 | "screenshots": [ 72 | { 73 | "src": "assets/screenshots/widget-screen.png", 74 | "sizes": "500x500", 75 | "label": "Widget screenshot" 76 | } 77 | ], 78 | "icons": [ 79 | { 80 | "src": "assets/icons/48x48.png", 81 | "sizes": "48x48" 82 | } 83 | ] 84 | } 85 | ] 86 | } 87 | -------------------------------------------------------------------------------- /docs/staticwebapp.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationFallback": { 3 | "rewrite": "index.html", 4 | "exclude": ["*.{css,js,mjs,ts,png,gif,ico,jpg,svg,json,woff2,ttf}"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /docs/sw.js: -------------------------------------------------------------------------------- 1 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/6.5.4/workbox-sw.js");self.addEventListener("widgetinstall",t=>{t.waitUntil(e(t))});self.addEventListener("widgetresume",t=>{t.waitUntil(e(t))});self.addEventListener("widgetclick",t=>{t.action=="updateName"&&t.waitUntil(s(t))});self.addEventListener("widgetuninstall",t=>{});const e=async t=>{const a=t.widget.definition,i={template:JSON.stringify(await(await fetch(a.msAcTemplate)).json()),data:JSON.stringify(await(await fetch(a.data)).json())};await self.widgets.updateByInstanceId(t.instanceId,i)},s=async t=>{const a=t.data.json().name,i=t.widget.definition,n={template:JSON.stringify(await(await fetch(i.msAcTemplate)).json()),data:JSON.stringify({name:a})};await self.widgets.updateByInstanceId(t.instanceId,n)};workbox.precaching.precacheAndRoute([{"revision":null,"url":"code/app-about-1651504e.js"},{"revision":null,"url":"code/index-b6000672.js"},{"revision":null,"url":"code/index-befe9693.css"},{"revision":null,"url":"code/index-d961e0b8.js"},{"revision":"fca9d507983449a71b686296ab74662b","url":"index.html"},{"revision":"fb13156d1e16a7094f92f5a4583a104e","url":"manifest.json"},{"revision":"b1a4910d7cbaa47fcc8f72ecb2028ff1","url":"staticwebapp.config.json"},{"revision":"a7591c595c4a231a1f67943e58f3d6eb","url":"widget/ac.json"},{"revision":"a70ebb50d5f5ab6a37f24795e292547d","url":"widget/data.json"}]||[]); 2 | //# sourceMappingURL=sw.js.map 3 | -------------------------------------------------------------------------------- /docs/sw.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../public/sw.js"],"names":["event","updateWidget","updateName","widgetDefinition","payload","name"],"mappings":"AAAA,cACI,yEACJ,EAMA,KAAK,iBAAiB,gBAAkB,GAAU,CAC9C,EAAM,UAAU,EAAa,CAAK,CAAC,CACvC,CAAC,EAGD,KAAK,iBAAiB,eAAiB,GAAU,CAC7C,EAAM,UAAU,EAAa,CAAK,CAAC,CACvC,CAAC,EAID,KAAK,iBAAiB,cAAgB,GAAU,CAC5C,EAAM,QAAU,cAChB,EAAM,UAAU,EAAW,CAAK,CAAC,CAErC,CAAC,EAID,KAAK,iBAAiB,kBAAoB,GAAU,CAAE,CAAA,EAEtD,MAAM,EAAe,MAAO,GAAU,CAElC,MAAM,EAAmB,EAAM,OAAO,WAGhC,EAAU,CACZ,SAAU,KAAK,UAAU,MAAO,MAAM,MAAM,EAAiB,YAAY,GAAG,MAAM,EAClF,KAAM,KAAK,UAAU,MAAO,MAAM,MAAM,EAAiB,IAAI,GAAG,MAAM,CAC9E,EAGI,MAAM,KAAK,QAAQ,mBAAmB,EAAM,WAAY,CAAO,CACnE,EAEM,EAAa,MAAO,GAAU,CAChC,MAAM,EAAO,EAAM,KAAK,KAAI,EAAG,KAGzB,EAAmB,EAAM,OAAO,WAGhC,EAAU,CACZ,SAAU,KAAK,UAAU,MAAO,MAAM,MAAM,EAAiB,YAAY,GAAG,MAAM,EAClF,KAAM,KAAK,UAAU,CAAC,KAAA,CAAI,CAAC,CACnC,EAGI,MAAM,KAAK,QAAQ,mBAAmB,EAAM,WAAY,CAAO,CACnE,EAEA,QAAQ,WAAW,iBAAiB,uiBAAK,eAAiB,CAAA,CAAE","file":"sw.js","sourcesContent":["importScripts(\n 'https://storage.googleapis.com/workbox-cdn/releases/6.5.4/workbox-sw.js'\n);\n\n// This is your Service Worker, you can put any of your custom Service Worker\n// code in this file, above the `precacheAndRoute` line.\n\n// When widget is installed/pinned, push initial state.\nself.addEventListener('widgetinstall', (event) => {\n event.waitUntil(updateWidget(event));\n});\n\n// When widget is shown, update content to ensure it is up-to-date.\nself.addEventListener('widgetresume', (event) => {\n event.waitUntil(updateWidget(event));\n});\n\n// When the user clicks an element with an associated Action.Execute,\n// handle according to the 'verb' in event.action.\nself.addEventListener('widgetclick', (event) => {\nif (event.action == \"updateName\") {\n event.waitUntil(updateName(event));\n}\n});\n\n// When the widget is uninstalled/unpinned, clean up any unnecessary\n// periodic sync or widget-related state.\nself.addEventListener('widgetuninstall', (event) => {});\n\nconst updateWidget = async (event) => {\n// The widget definition represents the fields specified in the manifest.\n const widgetDefinition = event.widget.definition;\n\n // Fetch the template and data defined in the manifest to generate the payload.\n const payload = {\n template: JSON.stringify(await (await fetch(widgetDefinition.msAcTemplate)).json()),\n data: JSON.stringify(await (await fetch(widgetDefinition.data)).json()),\n };\n\n // Push payload to widget.\n await self.widgets.updateByInstanceId(event.instanceId, payload);\n}\n\nconst updateName = async (event) => {\n const name = event.data.json().name;\n\n // The widget definition represents the fields specified in the manifest.\n const widgetDefinition = event.widget.definition;\n\n // Fetch the template and data defined in the manifest to generate the payload.\n const payload = {\n template: JSON.stringify(await (await fetch(widgetDefinition.msAcTemplate)).json()),\n data: JSON.stringify({name}),\n };\n\n // Push payload to widget.\n await self.widgets.updateByInstanceId(event.instanceId, payload);\n}\n\nworkbox.precaching.precacheAndRoute(self.__WB_MANIFEST || []);"]} -------------------------------------------------------------------------------- /docs/widget/ac.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "AdaptiveCard", 3 | "body": [ 4 | { 5 | "type": "TextBlock", 6 | "text": "Hello ${$root.name}!", 7 | "wrap": true, 8 | "horizontalAlignment": "Center", 9 | "size": "ExtraLarge" 10 | }, 11 | { 12 | "type": "Input.Text", 13 | "placeholder": "Name", 14 | "id": "name", 15 | "inlineAction": { 16 | "type": "Action.Execute", 17 | "verb": "updateName", 18 | "title": "Submit" 19 | } 20 | } 21 | ], 22 | "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", 23 | "version": "1.6" 24 | } -------------------------------------------------------------------------------- /docs/widget/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Widget" 3 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ms-auth-test 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms-auth-test", 3 | "version": "0.0.1", 4 | "description": "A starter kit for building PWAs!", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev-server": "vite --open", 8 | "dev": "npm run dev-server", 9 | "dev-task": "vite", 10 | "deploy": "npx @azure/static-web-apps-cli login --no-use-keychain && npx @azure/static-web-apps-cli deploy", 11 | "build": "tsc && vite build", 12 | "start": "npm run dev", 13 | "start-remote": "vite --host" 14 | }, 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "@nordhealth/components": "^3.6.0", 19 | "@nordhealth/css": "^3.1.1", 20 | "@shoelace-style/shoelace": "^2.4.0", 21 | "@thepassle/app-tools": "^0.9.9", 22 | "bootstrap": "^5.3.2", 23 | "lit": "^2.7.2", 24 | "urlpattern-polyfill": "^7.0.0", 25 | "workbox-build": "^6.5.2", 26 | "workbox-core": "^6.5.2", 27 | "workbox-precaching": "^6.5.2" 28 | }, 29 | "devDependencies": { 30 | "typescript": "^5.0.4", 31 | "vite": "^4.2.1", 32 | "vite-plugin-pwa": "^0.14.7" 33 | }, 34 | "prettier": { 35 | "tabWidth": 2, 36 | "useTabs": false, 37 | "semi": true, 38 | "singleQuote": true, 39 | "quoteProps": "consistent", 40 | "trailingComma": "es5", 41 | "endOfLine": "crlf", 42 | "bracketSpacing": true 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/assets/icons/192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/192x192.png -------------------------------------------------------------------------------- /public/assets/icons/24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/24x24.png -------------------------------------------------------------------------------- /public/assets/icons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/48x48.png -------------------------------------------------------------------------------- /public/assets/icons/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/512x512.png -------------------------------------------------------------------------------- /public/assets/icons/icon_192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/icon_192.png -------------------------------------------------------------------------------- /public/assets/icons/icon_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/icon_24.png -------------------------------------------------------------------------------- /public/assets/icons/icon_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/icon_48.png -------------------------------------------------------------------------------- /public/assets/icons/icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/icons/icon_512.png -------------------------------------------------------------------------------- /public/assets/readme/build-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/build-output.png -------------------------------------------------------------------------------- /public/assets/readme/codespace-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/codespace-button.png -------------------------------------------------------------------------------- /public/assets/readme/copy-starter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/copy-starter.png -------------------------------------------------------------------------------- /public/assets/readme/git-clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/git-clone.png -------------------------------------------------------------------------------- /public/assets/readme/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/intro.png -------------------------------------------------------------------------------- /public/assets/readme/local-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/local-button.png -------------------------------------------------------------------------------- /public/assets/readme/new-repo-from-starter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/new-repo-from-starter.png -------------------------------------------------------------------------------- /public/assets/readme/pwa-running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/pwa-running.png -------------------------------------------------------------------------------- /public/assets/readme/pwa-starter-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/pwa-starter-overview.png -------------------------------------------------------------------------------- /public/assets/readme/static-web-app-slash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/static-web-app-slash.png -------------------------------------------------------------------------------- /public/assets/readme/use-this-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/use-this-template.png -------------------------------------------------------------------------------- /public/assets/readme/vscode-in-browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/readme/vscode-in-browser.png -------------------------------------------------------------------------------- /public/assets/screenshots/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/screenshots/screen.png -------------------------------------------------------------------------------- /public/assets/screenshots/widget-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khmyznikov/ios-pwa-shell/36fae4c468986774ebb454fd95bfd0306b458922/public/assets/screenshots/widget-screen.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/ios-pwa-shell/", 3 | "scope": "/ios-pwa-shell/", 4 | "name": "ms-auth-test", 5 | "display": "standalone", 6 | "start_url": "/ios-pwa-shell/", 7 | "short_name": "starter", 8 | "theme_color": "#E1477E", 9 | "description": "This is a ms-auth-test app", 10 | "orientation": "any", 11 | "background_color": "#E1477E", 12 | "related_applications": [], 13 | "prefer_related_applications": false, 14 | "display_override": ["window-controls-overlay"], 15 | "launch_handler": { 16 | "client_mode": "focus-existing" 17 | }, 18 | "icons": [ 19 | { 20 | "src": "assets/icons/512x512.png", 21 | "sizes": "512x512", 22 | "type": "image/png" 23 | }, 24 | { 25 | "src": "assets/icons/192x192.png", 26 | "sizes": "192x192", 27 | "type": "image/png" 28 | }, 29 | { 30 | "src": "assets/icons/48x48.png", 31 | "sizes": "48x48", 32 | "type": "image/png" 33 | }, 34 | { 35 | "src": "assets/icons/24x24.png", 36 | "sizes": "24x24", 37 | "type": "image/png" 38 | } 39 | ], 40 | "screenshots": [ 41 | { 42 | "src": "assets/screenshots/screen.png", 43 | "sizes": "1617x1012", 44 | "type": "image/png" 45 | } 46 | ], 47 | "features": [ 48 | "Cross Platform", 49 | "fast", 50 | "simple" 51 | ], 52 | "categories": [ 53 | "social" 54 | ], 55 | "shortcuts": [ 56 | { 57 | "name": "Open About", 58 | "short_name": "About", 59 | "description": "Open the about page", 60 | "url": "/about", 61 | "icons": [{ "src": "assets/icons/192x192.png", "sizes": "192x192" }] 62 | } 63 | ], 64 | "widgets": [ 65 | { 66 | "name": "Starter Widget", 67 | "tag": "starterWidget", 68 | "ms_ac_template": "widget/ac.json", 69 | "data": "widget/data.json", 70 | "description": "A simple widget example from pwa-starter.", 71 | "screenshots": [ 72 | { 73 | "src": "assets/screenshots/widget-screen.png", 74 | "sizes": "500x500", 75 | "label": "Widget screenshot" 76 | } 77 | ], 78 | "icons": [ 79 | { 80 | "src": "assets/icons/48x48.png", 81 | "sizes": "48x48" 82 | } 83 | ] 84 | } 85 | ] 86 | } 87 | -------------------------------------------------------------------------------- /public/staticwebapp.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationFallback": { 3 | "rewrite": "index.html", 4 | "exclude": ["*.{css,js,mjs,ts,png,gif,ico,jpg,svg,json,woff2,ttf}"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /public/sw.js: -------------------------------------------------------------------------------- 1 | importScripts( 2 | 'https://storage.googleapis.com/workbox-cdn/releases/6.5.4/workbox-sw.js' 3 | ); 4 | 5 | // This is your Service Worker, you can put any of your custom Service Worker 6 | // code in this file, above the `precacheAndRoute` line. 7 | 8 | // When widget is installed/pinned, push initial state. 9 | self.addEventListener('widgetinstall', (event) => { 10 | event.waitUntil(updateWidget(event)); 11 | }); 12 | 13 | // When widget is shown, update content to ensure it is up-to-date. 14 | self.addEventListener('widgetresume', (event) => { 15 | event.waitUntil(updateWidget(event)); 16 | }); 17 | 18 | // When the user clicks an element with an associated Action.Execute, 19 | // handle according to the 'verb' in event.action. 20 | self.addEventListener('widgetclick', (event) => { 21 | if (event.action == "updateName") { 22 | event.waitUntil(updateName(event)); 23 | } 24 | }); 25 | 26 | // When the widget is uninstalled/unpinned, clean up any unnecessary 27 | // periodic sync or widget-related state. 28 | self.addEventListener('widgetuninstall', (event) => {}); 29 | 30 | const updateWidget = async (event) => { 31 | // The widget definition represents the fields specified in the manifest. 32 | const widgetDefinition = event.widget.definition; 33 | 34 | // Fetch the template and data defined in the manifest to generate the payload. 35 | const payload = { 36 | template: JSON.stringify(await (await fetch(widgetDefinition.msAcTemplate)).json()), 37 | data: JSON.stringify(await (await fetch(widgetDefinition.data)).json()), 38 | }; 39 | 40 | // Push payload to widget. 41 | await self.widgets.updateByInstanceId(event.instanceId, payload); 42 | } 43 | 44 | const updateName = async (event) => { 45 | const name = event.data.json().name; 46 | 47 | // The widget definition represents the fields specified in the manifest. 48 | const widgetDefinition = event.widget.definition; 49 | 50 | // Fetch the template and data defined in the manifest to generate the payload. 51 | const payload = { 52 | template: JSON.stringify(await (await fetch(widgetDefinition.msAcTemplate)).json()), 53 | data: JSON.stringify({name}), 54 | }; 55 | 56 | // Push payload to widget. 57 | await self.widgets.updateByInstanceId(event.instanceId, payload); 58 | } 59 | 60 | workbox.precaching.precacheAndRoute(self.__WB_MANIFEST || []); -------------------------------------------------------------------------------- /public/widget/ac.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "AdaptiveCard", 3 | "body": [ 4 | { 5 | "type": "TextBlock", 6 | "text": "Hello ${$root.name}!", 7 | "wrap": true, 8 | "horizontalAlignment": "Center", 9 | "size": "ExtraLarge" 10 | }, 11 | { 12 | "type": "Input.Text", 13 | "placeholder": "Name", 14 | "id": "name", 15 | "inlineAction": { 16 | "type": "Action.Execute", 17 | "verb": "updateName", 18 | "title": "Submit" 19 | } 20 | } 21 | ], 22 | "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", 23 | "version": "1.6" 24 | } -------------------------------------------------------------------------------- /public/widget/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Widget" 3 | } -------------------------------------------------------------------------------- /src/app-index.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, css } from 'lit'; 2 | import { customElement } from 'lit/decorators.js'; 3 | 4 | import './pages/app-home'; 5 | import './components/header'; 6 | import './styles/global.css'; 7 | import { router } from './router'; 8 | 9 | @customElement('app-index') 10 | export class AppIndex extends LitElement { 11 | static styles = css` 12 | main { 13 | padding-left: 16px; 14 | padding-right: 16px; 15 | padding-bottom: 16px; 16 | } 17 | `; 18 | 19 | firstUpdated() { 20 | router.addEventListener('route-changed', () => { 21 | if ("startViewTransition" in document) { 22 | (document as any).startViewTransition(() => this.requestUpdate()); 23 | } 24 | else { 25 | this.requestUpdate(); 26 | } 27 | }); 28 | } 29 | 30 | render() { 31 | // router config can be round in src/router.ts 32 | return router.render(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/components/header.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, css, html } from 'lit'; 2 | import { property, customElement } from 'lit/decorators.js'; 3 | 4 | import '@nordhealth/components/lib/TopBar.js'; 5 | 6 | import { resolveRouterPath } from '../router'; 7 | 8 | declare const AppleID: any; 9 | 10 | @customElement('app-header') 11 | export class AppHeader extends LitElement { 12 | @property({ type: String }) title = 'ms-auth-test'; 13 | 14 | @property({ type: Boolean}) enableBack: boolean = false; 15 | 16 | // @ts-ignore 17 | static styles =[ css` 18 | nord-top-bar{ 19 | padding: 10px; 20 | padding-top: max(calc(env(safe-area-inset-top) + 5px), 10px); 21 | padding-left: max(env(safe-area-inset-left), 10px); 22 | padding-right: max(env(safe-area-inset-right), 10px); 23 | block-size: auto; 24 | } 25 | `]; 26 | 27 | async firstUpdated() { 28 | 29 | 30 | 31 | AppleID.auth.init({ 32 | clientId : '[CLIENT_ID]', 33 | scope : '[SCOPES]', 34 | redirectURI : location.href, 35 | state : '[STATE]', 36 | nonce : '[NONCE]', 37 | usePopup : false 38 | }); 39 | // try { 40 | // const data = await AppleID.auth.signIn() 41 | // // Handle successful response. 42 | // } catch ( error ) { 43 | // // Handle error. 44 | // } 45 | } 46 | 47 | render() { 48 | return html` 49 | 50 |

Apple PWA Shell

51 | 55 | 56 |
57 | 65 | 66 | 83 | `; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/components/health-kit.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, html } from 'lit'; 2 | import { customElement } from 'lit/decorators/custom-element.js'; 3 | import { state } from 'lit/decorators/state.js'; 4 | 5 | declare const window: Window & { 6 | webkit?: any; 7 | }; 8 | 9 | @customElement('health-kit-control') 10 | export class HealthKitControl extends LitElement { 11 | 12 | @state() healthKitLog = ''; 13 | @state() iOSHealthKitCapability = false; 14 | @state() healthKitPermission = ''; 15 | @state() healthKitData: any = null; 16 | 17 | logMessage(message: string) { 18 | console.log(message); 19 | this.healthKitLog += `>: ${message}\r\n`; 20 | } 21 | 22 | async firstUpdated() { 23 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers['healthkit-permission-request'] && window.webkit.messageHandlers['healthkit-data-request']) { 24 | this.iOSHealthKitCapability = true; 25 | } 26 | 27 | window.addEventListener('healthkit-permission-request', (event: any) => { 28 | if (event && event.detail) { 29 | this.healthKitPermission = event.detail; 30 | this.logMessage(`HealthKit Permission: ${event.detail}`); 31 | } 32 | }); 33 | 34 | window.addEventListener('healthkit-data', (event: any) => { 35 | if (event && event.detail) { 36 | this.healthKitData = event.detail; 37 | this.logMessage(`HealthKit Data: ${JSON.stringify(event.detail)}`); 38 | } 39 | }); 40 | } 41 | 42 | healthKitPermissionRequest() { 43 | if (this.iOSHealthKitCapability) 44 | window.webkit.messageHandlers['healthkit-permission-request'].postMessage('healthkit-permission-request'); 45 | else 46 | this.logMessage('HealthKit capability not available'); 47 | } 48 | 49 | healthKitDataRequest() { 50 | if (this.iOSHealthKitCapability) 51 | window.webkit.messageHandlers['healthkit-data-request'].postMessage('healthkit-data-request'); 52 | else 53 | this.logMessage('HealthKit capability not available'); 54 | } 55 | 56 | render() { 57 | return html` 58 | 59 |

HealthKit Integration

60 |

iOS HealthKit Capability: ${this.iOSHealthKitCapability ? 'Available' : 'Not Available'}

61 | 62 | Request HealthKit Permission 63 | Request HealthKit Data 64 | 65 |

HealthKit Permission: ${this.healthKitPermission}

66 |

HealthKit Data: ${JSON.stringify(this.healthKitData)}

67 | 68 |
69 | `; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/components/in-app-purchase.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, html } from 'lit'; 2 | import { customElement } from 'lit/decorators/custom-element.js'; 3 | import { state } from 'lit/decorators/state.js'; 4 | 5 | import '@nordhealth/components/lib/Table.js'; 6 | import '@nordhealth/components/lib/Tab.js'; 7 | import '@nordhealth/components/lib/TabPanel.js'; 8 | import '@nordhealth/components/lib/TabGroup.js'; 9 | 10 | declare const window: Window & { 11 | webkit?: any; 12 | }; 13 | 14 | type Product = { 15 | attributes: { 16 | description: { 17 | standard: string; 18 | }; 19 | icuLocale: string; 20 | isFamilyShareable: number; 21 | kind: string; 22 | name: string; 23 | offerName: string; 24 | offers: { 25 | currencyCode: string; 26 | price: string; 27 | priceFormatted: string; 28 | }[]; 29 | }; 30 | href: string; 31 | id: string; 32 | type: string; 33 | }; 34 | type Transaction = { 35 | originalPurchaseDate: number; 36 | deviceVerificationNonce: string; 37 | subscriptionGroupIdentifier: string; 38 | environment: string; 39 | inAppOwnershipType: string; 40 | originalTransactionId: string; 41 | transactionReason: string; 42 | storefront: string; 43 | signedDate: number; 44 | bundleId: string; 45 | storefrontId: string; 46 | transactionId: string; 47 | type: string; 48 | webOrderLineItemId: string; 49 | isUpgraded: boolean; 50 | productId: string; 51 | deviceVerification: string; 52 | purchaseDate: number; 53 | expiresDate: number; 54 | quantity: number; 55 | }; 56 | 57 | @customElement('iap-card') 58 | export class IAPCard extends LitElement { 59 | 60 | @state() iapLog = ''; 61 | @state() iOSIAPCapability = false; 62 | @state() products = []; 63 | @state() transactions = []; 64 | 65 | logMessage(message: string, consoleOnly = false) { 66 | if (consoleOnly) 67 | console.log(JSON.parse(message)); 68 | else this.iapLog += `>: ${message}\r\n` 69 | } 70 | 71 | purchaseRequest(offerName: string) { 72 | if (this.iOSIAPCapability) 73 | window.webkit.messageHandlers['iap-purchase-request'].postMessage(JSON.stringify({productID:offerName, quantity: 1})); //window.products[1].attributes.offerName 74 | } 75 | transactionsRequest() { 76 | if (this.iOSIAPCapability) 77 | window.webkit.messageHandlers['iap-transactions-request'].postMessage('request'); 78 | } 79 | productsRequest() { 80 | if (this.iOSIAPCapability) 81 | window.webkit.messageHandlers['iap-products-request'].postMessage(['demo_product_id', 'demo_product2_id', 'demo_subscription', 'demo_subscription_auto']); 82 | } 83 | 84 | async firstUpdated() { 85 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers['iap-purchase-request'] && window.webkit.messageHandlers['iap-transactions-request'] && window.webkit.messageHandlers['iap-products-request']) { 86 | this.iOSIAPCapability = true; 87 | } 88 | // @ts-ignore 89 | window.addEventListener('iap-transactions-result', (event: CustomEvent) => { 90 | if (event && event.detail) { 91 | this.logMessage(event.detail, true); 92 | this.transactions = JSON.parse(event.detail); 93 | } 94 | }); 95 | // @ts-ignore 96 | window.addEventListener('iap-purchase-result', (event: CustomEvent) => { 97 | if (event && event.detail) { 98 | this.logMessage(event.detail); 99 | } 100 | }); 101 | // @ts-ignore 102 | window.addEventListener('iap-purchase-transaction', (event: CustomEvent) => { 103 | if (event && event.detail) { 104 | this.logMessage(event.detail); 105 | } 106 | }); 107 | // @ts-ignore 108 | window.addEventListener('iap-products-result', (event: CustomEvent) => { 109 | if (event && event.detail) { 110 | this.logMessage(event.detail, true); 111 | this.products = JSON.parse(event.detail); 112 | } 113 | }); 114 | } 115 | 116 | render() { 117 | return html` 118 | 119 |

In-App Purchase

120 |

Store Kit 2

121 | 122 | Products 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | ${this.products.map((product: Product) => 137 | html` 138 | 139 | 140 | 143 | 144 | 145 | 148 | 149 | ` 150 | )} 151 | 152 |
OfferNameKindPriceAction
${product.attributes.offerName} 141 | ${product.attributes.name} 142 | ${product.attributes.kind}${product.attributes.offers[0].priceFormatted} 146 | Buy 147 |
153 |
154 |
155 | Transactions 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | ${this.transactions.map((transaction: Transaction) => 169 | html` 170 | 171 | 172 | 173 | 174 | 175 | 176 | ` 177 | )} 178 | 179 |
idproductstatetype
${transaction.originalTransactionId}${transaction.productId}${transaction.inAppOwnershipType}${transaction.type}
180 |
181 |
182 |
183 | 184 | 185 | Request Data 186 | 187 | 188 |
189 | `} 190 | } 191 | 192 | /* 193 | [ 194 | { 195 | "attributes":{ 196 | "description":{ 197 | "standard":"Consumable" 198 | }, 199 | "icuLocale":"en_US@currency=USD", 200 | "isFamilyShareable":0, 201 | "kind":"Consumable", 202 | "name":"Demo Product", 203 | "offerName":"demo_product_id", 204 | "offers":[ 205 | { 206 | "currencyCode":"USD", 207 | "price":"0.99", 208 | "priceFormatted":"$0.99" 209 | } 210 | ] 211 | }, 212 | "href":"/v1/catalog/usa/in-apps/1B7B8E9C", 213 | "id":"1B7B8E9C", 214 | "type":"in-apps" 215 | }, 216 | { 217 | "attributes":{ 218 | "description":{ 219 | "standard":"Non-Consumable" 220 | }, 221 | "icuLocale":"en_US@currency=USD", 222 | "isFamilyShareable":0, 223 | "kind":"Non-Consumable", 224 | "name":"Demo Product 2", 225 | "offerName":"demo_product2_id", 226 | "offers":[ 227 | { 228 | "currencyCode":"USD", 229 | "price":"0.99", 230 | "priceFormatted":"$0.99" 231 | } 232 | ] 233 | }, 234 | "href":"/v1/catalog/usa/in-apps/1D266AB2", 235 | "id":"1D266AB2", 236 | "type":"in-apps" 237 | }, 238 | { 239 | "attributes":{ 240 | "description":{ 241 | "standard":"Non Renewable" 242 | }, 243 | "icuLocale":"en_US@currency=USD", 244 | "isFamilyShareable":0, 245 | "kind":"Non-Renewing Subscription", 246 | "name":"Demo Subscription", 247 | "offerName":"demo_subscription", 248 | "offers":[ 249 | { 250 | "currencyCode":"USD", 251 | "price":"1.99", 252 | "priceFormatted":"$1.99" 253 | } 254 | ] 255 | }, 256 | "href":"/v1/catalog/usa/in-apps/54B0F6BC", 257 | "id":"54B0F6BC", 258 | "type":"in-apps" 259 | }, 260 | { 261 | "attributes":{ 262 | "description":{ 263 | "standard":"Renewable" 264 | }, 265 | "icuLocale":"en_US@currency=USD", 266 | "isFamilyShareable":0, 267 | "kind":"Auto-Renewable Subscription", 268 | "name":"Demo Subscription Auto", 269 | "offerName":"demo_subscription_auto", 270 | "offers":[ 271 | { 272 | "currencyCode":"USD", 273 | "discounts":[ 274 | 275 | ], 276 | "price":"0.99", 277 | "priceFormatted":"$0.99", 278 | "recurringSubscriptionPeriod":"P1M" 279 | } 280 | ], 281 | "subscriptionFamilyId":"2B48871D", 282 | "subscriptionFamilyName":"Default Group", 283 | "subscriptionFamilyRank":1 284 | }, 285 | "href":"/v1/catalog/usa/in-apps/65694AC5", 286 | "id":"65694AC5", 287 | "type":"in-apps" 288 | } 289 | ] 290 | [ 291 | { 292 | "originalPurchaseDate":1696696487758.982, 293 | "deviceVerificationNonce":"9ed189fc-2736-4eaf-b071-e3f15a9094d0", 294 | "subscriptionGroupIdentifier":"2B48871D", 295 | "environment":"Xcode", 296 | "inAppOwnershipType":"PURCHASED", 297 | "originalTransactionId":"10", 298 | "transactionReason":"PURCHASE", 299 | "storefront":"USA", 300 | "signedDate":1698327661420.776, 301 | "bundleId":"com.pwa.shell", 302 | "storefrontId":"143441", 303 | "transactionId":"10", 304 | "type":"Auto-Renewable Subscription", 305 | "webOrderLineItemId":"0", 306 | "isUpgraded":false, 307 | "productId":"demo_subscription_auto", 308 | "deviceVerification":"QMSc6L6Up5lb6oABQhq6SMOGRPqwhaUGQvu93Zrz0FEKdxEv1oUXjU6tJM4Mb5li", 309 | "purchaseDate":1696696487758.982, 310 | "expiresDate":1699374887758.982, 311 | "quantity":1 312 | }, 313 | { 314 | "originalTransactionId":"8", 315 | "storefrontId":"143441", 316 | "transactionId":"8", 317 | "type":"Non-Consumable", 318 | "signedDate":1696696081317.827, 319 | "quantity":1, 320 | "deviceVerificationNonce":"165dea42-9149-4797-84a7-85804bb258e3", 321 | "environment":"Xcode", 322 | "inAppOwnershipType":"PURCHASED", 323 | "transactionReason":"PURCHASE", 324 | "storefront":"USA", 325 | "originalPurchaseDate":1696696080013.142, 326 | "deviceVerification":"lavzPlq17MStmNAH1t6yfBk62B+lXf7JoODkrnmxG7SIueBNFTg/bYc6/3MIJ/d9", 327 | "productId":"demo_product2_id", 328 | "purchaseDate":1696696080013.142, 329 | "bundleId":"com.pwa.shell" 330 | }, 331 | { 332 | "storefrontId":"143441", 333 | "signedDate":1696695320707.543, 334 | "environment":"Xcode", 335 | "deviceVerificationNonce":"1a51f3e4-52c7-4f77-ab0d-148efa40ca44", 336 | "inAppOwnershipType":"PURCHASED", 337 | "transactionId":"7", 338 | "originalTransactionId":"7", 339 | "transactionReason":"PURCHASE", 340 | "deviceVerification":"umPlQeuF3sXnWsZOGoOIk/am4A0aYKK7ps+KoqGXeGoZnPKR+nzpVwIsoQTtqnq5", 341 | "purchaseDate":1696695318874.834, 342 | "productId":"demo_subscription", 343 | "bundleId":"com.pwa.shell", 344 | "quantity":1, 345 | "originalPurchaseDate":1696695318874.834, 346 | "type":"Non-Renewing Subscription", 347 | "storefront":"USA" 348 | } 349 | ] 350 | */ -------------------------------------------------------------------------------- /src/components/push.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, html } from 'lit'; 2 | import { customElement } from 'lit/decorators/custom-element.js'; 3 | import { state } from 'lit/decorators/state.js'; 4 | 5 | declare const window: Window & { 6 | webkit?: any; 7 | }; 8 | 9 | @customElement('push-control') 10 | export class PushControl extends LitElement { 11 | 12 | @state() pushLog = ''; 13 | @state() iOSPushCapability = false; 14 | 15 | logMessage(message: string) { 16 | let _toConsole = message; 17 | try{ 18 | _toConsole = JSON.parse(message); 19 | } catch(e) { } 20 | console.log(_toConsole); 21 | this.pushLog += `>: ${message}\r\n` 22 | } 23 | 24 | async firstUpdated() { 25 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers['push-permission-request'] && window.webkit.messageHandlers['push-permission-state']) { 26 | this.iOSPushCapability = true; 27 | } 28 | 29 | // @ts-ignore 30 | window.addEventListener('push-permission-request', (event: CustomEvent) => { 31 | if (event && event.detail){ 32 | this.logMessage(event.detail); 33 | 34 | switch (event.detail) { 35 | case 'granted': 36 | // permission granted 37 | break; 38 | default: 39 | // permission denied 40 | break; 41 | } 42 | } 43 | }); 44 | 45 | // @ts-ignore 46 | window.addEventListener('push-permission-state', (event: CustomEvent) => { 47 | if (event && event.detail){ 48 | this.logMessage(event.detail); 49 | 50 | switch (event.detail) { 51 | case 'notDetermined': 52 | // permission not asked 53 | break; 54 | case 'denied': 55 | // permission denied 56 | break; 57 | case 'authorized': 58 | case 'ephemeral': 59 | case 'provisional': 60 | // permission granted 61 | break; 62 | case 'unknown': 63 | default: 64 | // something wrong 65 | break; 66 | } 67 | } 68 | }); 69 | 70 | // @ts-ignore 71 | window.addEventListener('push-notification', (event: CustomEvent) => { 72 | if (event && event.detail){ 73 | this.logMessage(JSON.stringify(event.detail)); 74 | } 75 | }); 76 | 77 | // @ts-ignore 78 | window.addEventListener('push-notification-click', (event: CustomEvent) => { 79 | if (event && event.detail){ 80 | this.logMessage(JSON.stringify(event.detail)); 81 | } 82 | }); 83 | 84 | // @ts-ignore 85 | window.addEventListener('push-token', (event: CustomEvent) => { 86 | if (event && event.detail){ 87 | this.logMessage(JSON.stringify(event.detail)); 88 | } 89 | }); 90 | } 91 | 92 | pushPermissionRequest(){ 93 | if (this.iOSPushCapability) 94 | window.webkit.messageHandlers['push-permission-request'].postMessage('push-permission-request'); 95 | } 96 | 97 | pushPermissionState(){ 98 | if (this.iOSPushCapability) 99 | window.webkit.messageHandlers['push-permission-state'].postMessage('push-permission-state'); 100 | } 101 | 102 | pushSubscribeTopic(topic: string, eventValue: unknown, unsubscribe?: boolean) { 103 | if (this.iOSPushCapability) { 104 | window.webkit.messageHandlers['push-subscribe'].postMessage(JSON.stringify({ 105 | topic, // topic name to subscribe/unsubscribe 106 | eventValue, // user object: name, email, id, etc. 107 | unsubscribe // true/false 108 | })); 109 | } 110 | } 111 | 112 | pushTokenRequest(){ 113 | if (this.iOSPushCapability) 114 | window.webkit.messageHandlers['push-token'].postMessage('push-token'); 115 | } 116 | 117 | render() { 118 | return html` 119 | 120 |

Push Notifications

121 |

Firebase FCM

122 | 123 | Push Permission 124 | Push State 125 | 126 |
127 | 128 | Topic Subscribe 129 | Token 130 | 131 | 132 |
133 | ` 134 | } 135 | } -------------------------------------------------------------------------------- /src/pages/app-about/about-styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from 'lit'; 2 | 3 | // these styles can be imported from any component 4 | // for an example of how to use this, check /pages/about-about.ts 5 | export const styles = css` 6 | @media(min-width: 1000px) { 7 | sl-card { 8 | max-width: 70vw; 9 | } 10 | } 11 | 12 | main { 13 | margin-left: 25px; 14 | } 15 | `; -------------------------------------------------------------------------------- /src/pages/app-about/app-about.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, html } from 'lit'; 2 | import { customElement } from 'lit/decorators.js'; 3 | 4 | // You can also import styles from another file 5 | // if you prefer to keep your CSS seperate from your component 6 | import { styles } from './about-styles'; 7 | 8 | import { styles as sharedStyles } from '../../styles/shared-styles' 9 | 10 | import '@shoelace-style/shoelace/dist/components/card/card.js'; 11 | 12 | @customElement('app-about') 13 | export class AppAbout extends LitElement { 14 | static styles = [ 15 | sharedStyles, 16 | styles 17 | ] 18 | 19 | render() { 20 | return html` 21 | 22 | 23 |
24 |

About Page

25 | 26 | 27 |

Did you know?

28 | 29 |

PWAs have access to many useful APIs in modern browsers! These 30 | APIs have enabled many new types of apps that can be built as PWAs, such as advanced graphics editing apps, games, 31 | apps that use machine learning and more! 32 |

33 | 34 |

Check out these 36 | docs to learn more about the advanced features that you can use in your PWA

37 |
38 |
39 | `; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/pages/app-home.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, css, html } from 'lit'; 2 | import { property, customElement, state } from 'lit/decorators.js'; 3 | 4 | import "../components/in-app-purchase"; 5 | import "../components/push"; 6 | import "../components/health-kit"; 7 | // import { resolveRouterPath } from '../router'; 8 | 9 | import '@nordhealth/components/lib/Button.js'; 10 | import '@nordhealth/components/lib/Fieldset.js'; 11 | import '@nordhealth/components/lib/Textarea.js'; 12 | import '@nordhealth/components/lib/Card.js'; 13 | import '@nordhealth/components/lib/NavGroup.js'; 14 | import '@nordhealth/components/lib/NavItem.js'; 15 | import '@nordhealth/components/lib/DropdownItem.js'; 16 | import '@nordhealth/components/lib/DropdownGroup.js'; 17 | import '@nordhealth/components/lib/Divider.js'; 18 | import '@nordhealth/components/lib/Stack.js'; 19 | import '@nordhealth/components/lib/Icon.js'; 20 | 21 | import '@nordhealth/css/lib/nord.min.css'; 22 | 23 | // import { styles } from '../styles/shared-styles'; 24 | 25 | declare const window: Window & { 26 | webkit?: any; 27 | }; 28 | 29 | @customElement('app-home') 30 | export class AppHome extends LitElement { 31 | 32 | // For more information on using properties and state in lit 33 | // check out this link https://lit.dev/docs/components/properties/ 34 | @property() message = 'Welcome!'; 35 | 36 | @state() iOSPrintCapability = false; 37 | 38 | static styles = [ 39 | // styles, 40 | css` 41 | nord-card{ 42 | max-width: 400px; 43 | } 44 | iap-card{ 45 | max-width: 800px; 46 | } 47 | .stack{ 48 | padding: 15px; 49 | } 50 | .download-stack a{ 51 | display: inline-flex; 52 | align-items: center; 53 | gap: 5px; 54 | } 55 | `]; 56 | 57 | async firstUpdated() { 58 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.print) { 59 | this.iOSPrintCapability = true; 60 | } 61 | } 62 | 63 | alertMessage() { 64 | alert("Alert Box"); 65 | } 66 | confirmMessage() { 67 | if(confirm("Confirm?")) 68 | alert("Confirmed"); 69 | else 70 | alert("Rejected"); 71 | } 72 | promptMessage() { 73 | alert(prompt("Question", "Answer")); 74 | } 75 | 76 | blobDownload(event: Event) { 77 | const link = event.target as HTMLLinkElement; 78 | const blob = new Blob([JSON.stringify({ x: 42, s: "hello, world", d: new Date() })], {type: "octet/stream"}); 79 | const url = URL.createObjectURL(blob); 80 | 81 | link.href = url; 82 | // @ts-ignore 83 | link.download = 'data_example_blob.json'; 84 | } 85 | 86 | printRequest(){ 87 | if (this.iOSPrintCapability) 88 | window.webkit.messageHandlers.print.postMessage('print'); 89 | else 90 | window.print(); 91 | } 92 | 93 | render() { 94 | return html` 95 | 96 |
97 | 98 | 99 | 100 |

Swift custom APIs

101 | 102 | 103 | 104 | Print 105 | Alert 106 | Confirm 107 | Prompt 108 | 109 | 110 | 111 | 112 | 113 | Download link 114 | Download base64 115 | Download Blob 116 | 117 | 118 | 119 |

Call native APIs from WebView

120 |
121 | 122 | 123 | 124 | 125 |

Web APIs demos

126 | 127 | Check available Web APIs 128 | Web Features Showcase 129 | Check and try, another example 130 | 131 |

Proceed to external resources. Try them all

132 |
133 | 134 | 135 |

Test navigation transition

136 | 137 | External link 138 | External link blank 139 | External link window.open 140 | Scheme link 141 | 142 | 143 | Email link 144 | Tel link 145 | SMS link 146 | 147 | 148 |

Group of different type navigation links

149 |
150 | 151 | 152 |

iFrame content

153 | 154 |
155 | 156 | 157 |
158 |
159 | `; 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /src/router.ts: -------------------------------------------------------------------------------- 1 | // docs for router https://github.com/thepassle/app-tools/blob/master/router/README.md 2 | 3 | import { html } from 'lit'; 4 | 5 | if (!(globalThis as any).URLPattern) { 6 | await import("urlpattern-polyfill"); 7 | } 8 | 9 | import { Router } from '@thepassle/app-tools/router.js'; 10 | import { lazy } from '@thepassle/app-tools/router/plugins/lazy.js'; 11 | 12 | // @ts-ignore 13 | import { title } from '@thepassle/app-tools/router/plugins/title.js'; 14 | 15 | import './pages/app-home.js'; 16 | 17 | const baseURL: string = (import.meta as any).env.BASE_URL; 18 | 19 | export const router = new Router({ 20 | routes: [ 21 | { 22 | path: "/",//resolveRouterPath(), 23 | title: 'Home', 24 | render: () => html`` 25 | }, 26 | { 27 | path: "/about",// resolveRouterPath('/about'), 28 | title: 'About', 29 | plugins: [ 30 | lazy(() => import('./pages/app-about/app-about.js')), 31 | ], 32 | render: () => html`` 33 | } 34 | ] 35 | }); 36 | 37 | // This function will resolve a path with whatever Base URL was passed to the vite build process. 38 | // Use of this function throughout the starter is not required, but highly recommended, especially if you plan to use GitHub Pages to deploy. 39 | // If no arg is passed to this function, it will return the base URL. 40 | 41 | export function resolveRouterPath(unresolvedPath?: string) { 42 | var resolvedPath = baseURL; 43 | if(unresolvedPath) { 44 | resolvedPath = resolvedPath + unresolvedPath; 45 | } 46 | 47 | return resolvedPath; 48 | } 49 | -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | This file is used for all of your global styles and CSS variables. 4 | Check here https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties for more info on using CSS variables. 5 | */ 6 | :root { 7 | --n-color-accent: #FF2F92; 8 | --n-color-accent-secondary: #FF2F92; 9 | --n-tab-color: #d12a7b; 10 | --n-color-text-link: #d12a7b; 11 | } 12 | 13 | html, body { 14 | font-family: var(--n-font-family); 15 | padding: 0; 16 | margin: 0; 17 | background-color: #f1f1f1; 18 | } 19 | 20 | /* @media (prefers-color-scheme: dark) { 21 | 22 | html, 23 | body { 24 | background-color: #181818; 25 | color: white; 26 | } 27 | } 28 | 29 | @media (prefers-color-scheme: light) { 30 | 31 | html, 32 | body { 33 | background-color: #f5f5f5; 34 | color: black; 35 | } 36 | } */ -------------------------------------------------------------------------------- /src/styles/shared-styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from 'lit'; 2 | 3 | // these styles can be imported from any component 4 | // for an example of how to use this, check /pages/about-about.ts 5 | export const styles = css` 6 | @media(min-width: 1000px) { 7 | sl-card { 8 | max-width: 70vw; 9 | } 10 | } 11 | 12 | main { 13 | margin-top: 80px; 14 | } 15 | `; -------------------------------------------------------------------------------- /swa-cli.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://aka.ms/azure/static-web-apps-cli/schema", 3 | "configurations": { 4 | "ms-auth-test": { 5 | "appLocation": ".", 6 | "outputLocation": "dist", 7 | "appBuildCommand": "npm run build --if-present", 8 | "run": "npm start", 9 | "appDevserverUrl": "http://localhost:3000" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "esnext", 4 | "target": "esnext", 5 | "lib": ["es2017", "esnext", "dom", "dom.iterable"], 6 | "declaration": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "./types", 9 | "strict": true, 10 | "noUnusedLocals": true, 11 | "noUnusedParameters": true, 12 | "noImplicitReturns": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "moduleResolution": "bundler", 15 | "allowSyntheticDefaultImports": true, 16 | "experimentalDecorators": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "useDefineForClassFields": false, 19 | "isolatedModules": true, 20 | "types": [ 21 | "vite-plugin-pwa/client", 22 | "vite/client" 23 | ] 24 | }, 25 | "include": ["src/**/*.ts", "router.d.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import { VitePWA } from 'vite-plugin-pwa'; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | base: "/ios-pwa-shell", 7 | build: { 8 | sourcemap: true, 9 | assetsDir: "code", 10 | target: ["esnext", "edge100", "firefox100", "chrome100", "safari18"], 11 | outDir: "docs", 12 | }, 13 | // publicDir: "node_modules/@esri/calcite-components/dist/calcite", 14 | plugins: [ 15 | VitePWA({ 16 | strategies: "injectManifest", 17 | injectManifest: { 18 | swSrc: 'public/sw.js', 19 | swDest: 'docs/sw.js', 20 | globDirectory: 'docs', 21 | globPatterns: [ 22 | '**/*.{html,js,css,json, png}', 23 | ], 24 | }, 25 | injectRegister: false, 26 | manifest: false, 27 | devOptions: { 28 | enabled: true 29 | } 30 | }) 31 | ] 32 | }) 33 | --------------------------------------------------------------------------------