diff --git a/bin/dev b/bin/dev index 6f5c6f5..b58a33c 100755 --- a/bin/dev +++ b/bin/dev @@ -13,8 +13,7 @@ watch() { client() { cd client - # npx webpack -w --mode=development - npx webpack -w + npm run dev } # run tests once (so we don't forget!) diff --git a/bin/release b/bin/release index b4e593d..9368abc 100755 --- a/bin/release +++ b/bin/release @@ -9,7 +9,7 @@ cabal test # Compile the JS client cd client npm install -npx webpack --mode=production +npm run build cd .. diff --git a/client/dist/action.d.ts b/client/dist/action.d.ts deleted file mode 100644 index e6db324..0000000 --- a/client/dist/action.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Meta, ViewId, RequestId, EncodedAction, ViewState } from "./message"; -export type ActionMessage = { - viewId: ViewId; - action: EncodedAction; - requestId: RequestId; - state?: ViewState; - meta: Meta[]; - form: URLSearchParams | undefined; -}; -export declare function actionMessage(id: ViewId, action: EncodedAction, state: ViewState | undefined, reqId: RequestId, form?: FormData): ActionMessage; -export declare function toSearch(form?: FormData): URLSearchParams | undefined; -export declare function renderActionMessage(msg: ActionMessage): string; -export declare function renderForm(form: URLSearchParams | undefined): string; -export type Request = { - requestId: RequestId; - isCancelled: boolean; -}; -export declare function newRequest(): Request; -export declare function encodedParam(action: string, param: string): string; diff --git a/client/dist/browser.d.ts b/client/dist/browser.d.ts deleted file mode 100644 index 03d63d0..0000000 --- a/client/dist/browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function setQuery(query: string): void; diff --git a/client/dist/events.d.ts b/client/dist/events.d.ts deleted file mode 100644 index f9e6497..0000000 --- a/client/dist/events.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { HyperView } from './hyperview'; -export type UrlFragment = string; -export declare function listenKeydown(cb: (target: HyperView, action: string) => void): void; -export declare function listenKeyup(cb: (target: HyperView, action: string) => void): void; -export declare function listenKeyEvent(event: "keyup" | "keydown", cb: (target: HyperView, action: string) => void): void; -export declare function listenBubblingEvent(event: string, cb: (_target: HyperView, action: string) => void): void; -export declare function listenClick(cb: (target: HyperView, action: string) => void): void; -export declare function listenDblClick(cb: (target: HyperView, action: string) => void): void; -export declare function listenTopLevel(cb: (target: HyperView, action: string) => void): void; -export declare function listenLoad(node: HTMLElement): void; -export declare function listenMouseEnter(node: HTMLElement): void; -export declare function listenMouseLeave(node: HTMLElement): void; -export declare function listenChange(cb: (target: HyperView, action: string) => void): void; -export declare function listenInput(startedTyping: (target: HyperView) => void, cb: (target: HyperView, action: string) => void): void; -export declare function listenFormSubmit(cb: (target: HyperView, action: string, form: FormData) => void): void; diff --git a/client/dist/http.d.ts b/client/dist/http.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/client/dist/hyperbole.js b/client/dist/hyperbole.js index 42d3c4c..a999d4d 100644 --- a/client/dist/hyperbole.js +++ b/client/dist/hyperbole.js @@ -1,3 +1,21 @@ -/*! For license information please see hyperbole.js.LICENSE.txt */ -(()=>{var e={296:e=>{function t(e,t=100,n={}){if("function"!=typeof e)throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}="boolean"==typeof n?{immediate:n}:n;let r,i,a,s,c;function u(){const t=r,n=i;return r=void 0,i=void 0,c=e.apply(t,n),c}function l(){const e=Date.now()-s;e=0?a=setTimeout(l,t-e):(a=void 0,o||(c=u()))}const d=function(...e){if(r&&this!==r&&Object.getPrototypeOf(this)===Object.getPrototypeOf(r))throw new Error("Debounced method called with different contexts of the same prototype.");r=this,i=e,s=Date.now();const n=o&&!a;return a||(a=setTimeout(l,t)),n&&(c=u()),c};return Object.defineProperty(d,"isPending",{get:()=>void 0!==a}),d.clear=()=>{a&&(clearTimeout(a),a=void 0)},d.flush=()=>{a&&d.trigger()},d.trigger=()=>{c=u(),d.clear()},d}e.exports.debounce=t,e.exports=t},147:e=>{"use strict";e.exports=JSON.parse('{"name":"web-ui","version":"0.6.0","description":"Development -----------","main":"index.js","directories":{"client":"client"},"scripts":{"build":"npx webpack"},"author":"","license":"ISC","devDependencies":{"ts-loader":"^9.4.1","typescript":"^4.8.3","uglify":"^0.1.5","webpack":"^5.88.2","webpack-cli":"^4.10.0"},"dependencies":{"omdomdom":"^0.3.2","debounce":"^2.2.0"}}')}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";var e=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t=function(e,t){var n=e.length,o=-1;if(n)for(;++oe.length)&&(t=e.length);for(var n=0,o=new Array(t);n0)for(;d>0;)r.node.removeChild(r.node.childNodes[l-1]),l--,d--}}(r,i,n)}},y=function n(o){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"string"==typeof o&&(r=o.trim().replace(/\s+\s+/g,">"),o=(new DOMParser).parseFromString(r,"text/html").body);var a="BODY"===o.tagName,s=o.childNodes,c=s?s.length:0;if(a){if(c>1)throw new Error("[OmDomDom]: Your element should not have more than one root node.");if(0===c)throw new Error("[OmDomDom]: Your element should have at least one root node.");return n(s[0])}var l=3===o.nodeType?"text":8===o.nodeType?"comment":o.tagName.toLowerCase(),d=i||"svg"===l,f=1===o.nodeType?function(t){var n=function(t){return Array.prototype.reduce.call(t.attributes,(function(t,n){return e(u,n.name)||(t[n.name]=n.value),t}),{})}(t);return function(e,t){for(var n in u){var o=u[n].propName,r=e.getAttribute(n);n===u.style.attrName?t[n]=e.style[o]:"string"==typeof r&&(t[n]=r)}}(t,n),n}(o):{},v=c>0?null:o.textContent,p=Array(c);return t(s,(function(e,t){p[t]=n(e,d)})),{type:l,attributes:f,children:p,content:v,node:o,isSVGContext:d}};function g(e,t){var n=[];for(var o of t){let t=e(o);if(!t)break;n.push(t)}return n}function w(e){return{cookies:e.filter((e=>"Cookie"==e.key)).map((e=>e.value)),error:b("Error",e),query:b("Query",e),pageTitle:b("PageTitle",e),events:k("Event",e).map(q),actions:k("Trigger",e).map(T)}}function E(e){return w(g(C,e.trim().split("\n")))}function b(e,t){return t.find((t=>t.key==e))?.value}function k(e,t){return t.filter((t=>t.key==e)).map((e=>e.value))}function C(e){let t=e.match(/^(\w+)\: (.*)$/);if(t)return{key:t[1],value:t[2]}}function q(e){let[t,n]=I(e);return{name:t,detail:JSON.parse(n)}}function T(e){let[t,n]=I(e);return[t,n]}function I(e){let t=e.indexOf("|");if(-1===t){let t=new Error("Bad Encoding, Expected Segment");throw t.message=e,t}return[e.slice(0,t),e.slice(t+1)]}function L(e){if(!e)return;const t=new URLSearchParams;return e.forEach(((e,n)=>{t.append(n,e)})),t}let S=0;function M(e,t){return e+" "+function(e){return""==e?"|":e.replace(/_/g,"\\_").replace(/\s+/g,"_")}(t)}const A=`${"https:"===window.location.protocol?"wss:":"ws:"}//${window.location.host}${window.location.pathname}`;class x extends Error{constructor(e,t){super(e+"\n"+t),this.name="ProtocolError"}}var R=n(296);const D=e=>void 0!==e?.runAction;function O(e){let t=new Event("hyp-content",{bubbles:!0});e.dispatchEvent(t)}function N(e,t){e.querySelectorAll("[id]").forEach((n=>{n.runAction=function(e){return t(n,e)},n.concurrency=n.dataset.concurrency||"Drop",n.cancelActiveRequest=function(){n.activeRequest&&!n.activeRequest?.isCancelled&&(n.activeRequest.isCancelled=!0)},O(e)}))}function H(e,t){document.addEventListener(e,(function(n){if(!(n.target instanceof HTMLElement))return void console.warn("listenKeyEvent received event with non HTMLElment as EventTarget: %o",n);let o=n.target,r="on"+e+n.key,i=o.dataset[r];if(!i)return;n.preventDefault();const a=Q(o);a?t(a,i):console.error("Missing target: ",o)}))}function j(e,t){document.addEventListener(e,(function(n){if(!(n.target instanceof HTMLElement))return void console.warn("listenBubblingEvent received an event with non HTMLElment as EventTarget: %o",n);let o=n.target.closest("[data-on"+e+"]");if(!o)return;n.preventDefault();let r=Q(o);if(!r)return void console.error("Missing target: ",o);const i=o.dataset["on"+e];void 0!==i?t(r,i):console.error("Missing action: ",o,e)}))}function P(e){e.querySelectorAll("[data-onload]").forEach((e=>{let t=parseInt(e.dataset.delay||"")||0,n=e.dataset.onload;setTimeout((()=>{let t=Q(e);if(e.dataset.onload!=n)return;const o=new CustomEvent("hyp-load",{bubbles:!0,detail:{target:t,onLoad:n}});e.dispatchEvent(o)}),t)}))}function V(e){e.querySelectorAll("[data-onmouseenter]").forEach((e=>{let t=e.dataset.onmouseenter,n=W(e);e.onmouseenter=()=>{const o=new CustomEvent("hyp-mouseenter",{bubbles:!0,detail:{target:n,onMouseEnter:t}});e.dispatchEvent(o)}}))}function B(e){e.querySelectorAll("[data-onmouseleave]").forEach((e=>{let t=e.dataset.onmouseleave,n=W(e);e.onmouseleave=()=>{const o=new CustomEvent("hyp-mouseleave",{bubbles:!0,detail:{target:n,onMouseLeave:t}});e.dispatchEvent(o)}}))}function Q(e){const t=W(e);if(D(t))return t;console.error("Non HyperView target: ",t)}function W(e){let t=function(e){let t=e.closest("[data-target]");return t?.dataset.target||e.closest("[id]")?.id}(e),n=t&&document.getElementById(t);if(n)return n;console.error("Cannot find target: ",t,e)}let $,F=n(147);console.log("Hyperbole "+F.version+"b");let U=new Set;async function _(e,t,n){if(e.activeRequest&&!e.activeRequest?.isCancelled&&"Drop"==e.concurrency)return void console.warn("Drop action overlapping with active request ("+e.activeRequest+")",t);e._timeout=window.setTimeout((()=>{e.classList.add("hyp-loading")}),100);let o=e.dataset.state,r={requestId:++S,isCancelled:!1},i=function(e,t,n,o,r){return{viewId:e,action:t,state:n,requestId:o,meta:[{key:"Cookie",value:decodeURI(document.cookie)},{key:"Query",value:window.location.search}],form:L(r)}}(e.id,t,o,r.requestId,n);e.activeRequest=r,G.sendAction(i)}function J(e){let t=e.targetViewId||e.viewId,n=document.getElementById(t);if(!D(n))return void console.error("Missing Update HyperView Target: ",t,e);if(n.activeRequest?.requestId&&e.requestId{let t=e.getAttribute("value");null!==t&&(e.value=t)})),e.querySelectorAll("input[type=checkbox]").forEach((e=>{let t="True"==e.dataset.checked;e.checked=t}))}(c),N(c,_),n):(console.warn("Target Missing: ",n.id),n)}function K(e){e.forEach((e=>{console.log("SetCookie: ",e),document.cookie=e}))}function Y(e,t){null!=e.query&&function(e){if(e!=function(){const e=window.location.search;return e.startsWith("?")?e.substring(1):e}()){""!=e&&(e="?"+e);let t=location.pathname+e;window.history.replaceState({},"",t)}}(e.query),null!=e.pageTitle&&(document.title=e.pageTitle),e.events?.forEach((e=>{setTimeout((()=>{let n=new CustomEvent(e.name,{bubbles:!0,detail:e.detail});(t||document).dispatchEvent(n)}),10)})),e.actions?.forEach((([e,t])=>{setTimeout((()=>{let n=window.Hyperbole?.hyperView(e);n&&_(n,t)}),10)}))}document.addEventListener("DOMContentLoaded",(function(){Y(E(document.getElementById("hyp.metadata")?.innerText??""));const e=document.body.querySelector("style");var t;null!==e?$=e:(console.warn("rootStyles missing from page, creating..."),$=document.createElement("style"),$.type="text/css",document.body.appendChild($)),t=async function(e,t){_(e,t)},document.addEventListener("hyp-load",(function(e){let n=e.detail.onLoad,o=e.detail.target;t(o,n)})),document.addEventListener("hyp-mouseenter",(function(e){let n=e.detail.onMouseEnter,o=e.detail.target;t(o,n)})),document.addEventListener("hyp-mouseleave",(function(e){let n=e.detail.onMouseLeave,o=e.detail.target;t(o,n)})),P(document.body),V(document.body),B(document.body),N(document.body,_),j("click",(async function(e,t){_(e,t)})),j("dblclick",(async function(e,t){_(e,t)})),H("keydown",(async function(e,t){_(e,t)})),H("keyup",(async function(e,t){_(e,t)})),document.addEventListener("submit",(function(e){if(!(e.target instanceof HTMLFormElement))return void console.warn("listenFormSubmit received an event with non HTMLElment as EventTarget: %o",e);let t=e.target;if(!t.dataset.onsubmit)return void console.error("Missing onSubmit: ",t);e.preventDefault();let n=Q(t);const o=new FormData(t);n?async function(e,t,n){_(e,t,n)}(n,t.dataset.onsubmit,o):console.error("Missing target: ",t)})),document.addEventListener("change",(function(e){if(!(e.target instanceof HTMLElement))return void console.warn("listenChange received an event with non HTMLElment as EventTarget: %o",e);let t=e.target.closest("[data-onchange]");if(!t)return;if(e.preventDefault(),null===t.value)return void console.error("Missing input value:",t);let n=Q(t);n?t.dataset.onchange?async function(e,t){_(e,t)}(n,M(t.dataset.onchange,t.value)):console.error("Missing onchange: ",t):console.error("Missing target: listenChange")})),document.addEventListener("input",(function(e){if(!(e.target instanceof HTMLElement))return void console.warn("listenInput received an event with non HTMLElment as EventTarget: %o",e);const t=e.target.closest("[data-oninput]");if(!t)return;let n=parseInt(t.dataset.delay||"")||250;n<250&&console.warn("Input delay < 250 can result in poor performance."),e.preventDefault();const o=Q(t);o?(function(e){"Replace"==e.concurrency&&e.cancelActiveRequest()}(o),t.debouncedCallback||(t.debouncedCallback=R((()=>{if(!t.dataset.oninput)return void console.error("Missing onInput: ",t);const e=M(t.dataset.oninput,t.value);!async function(e,t){_(e,t)}(o,e)}),n)),t.debouncedCallback()):console.error("Missing target: ",t)}))}));const G=new class{constructor(e=A){this.hasEverConnected=!1,this.isConnected=!1,this.reconnectDelay=0,this.queue=[],this.events=new EventTarget;const t=new WebSocket(e);this.socket=t}connect(e=A,t=!1){const n=t?new WebSocket(e):this.socket;function o(e){console.error("Connect Error",e)}function r(e){console.error("Socket Error",e)}this.socket=n,n.addEventListener("error",o),n.addEventListener("open",(e=>{console.log("Websocket Connected"),this.hasEverConnected&&document.dispatchEvent(new Event("hyp-socket-reconnect")),this.isConnected=!0,this.hasEverConnected=!0,this.reconnectDelay=1e3,n.removeEventListener("error",o),n.addEventListener("error",r),document.dispatchEvent(new Event("hyp-socket-connect")),this.runQueue()})),n.addEventListener("close",(t=>{console.log("CLOSE SOCKET"),this.isConnected&&document.dispatchEvent(new Event("hyp-socket-disconnect")),this.isConnected=!1,n.removeEventListener("error",r),this.hasEverConnected&&(console.log("Reconnecting in "+this.reconnectDelay/1e3+"s"),setTimeout((()=>this.connect(e,!0)),this.reconnectDelay)),n.removeEventListener("error",r)})),n.addEventListener("message",(e=>this.onMessage(e)))}async sendAction(e){if(this.isConnected){let t=function(e){let t=["|ACTION|","ViewId: "+e.viewId,"Action: "+e.action];return e.state&&t.push("State: "+e.state),t.push("RequestId: "+e.requestId),[t.join("\n"),(o=e.meta,o.map((e=>e.key+": "+e.value)).join("\n"))].join("\n")+((n=e.form)?"\n\n"+n:"");var n,o}(e);this.socket.send(t)}else this.queue.push(e)}runQueue(){let e=this.queue.pop();e&&(console.log("runQueue: ",e),this.sendAction(e),this.runQueue())}onMessage(e){let{command:t,metas:n,rest:o}=function(e){let t=e.split("\n"),n=t[0],o=g(C,t.slice(1));return{command:n,metas:o,rest:function(e,t){let n=0;for(;n{J(e.detail)})),G.addEventListener("response",(e=>function(e){let t=J(e);t&&(delete t.activeRequest,clearTimeout(t._timeout),t.classList.remove("hyp-loading"))}(e.detail))),G.addEventListener("redirect",(e=>{return t=e.detail,console.log("REDIRECT",t),K(t.meta.cookies??[]),void(window.location.href=t.url);var t})),window.Hyperbole={runAction:_,parseMetadata:E,action:function(e,...t){return t.reduce(((e,t)=>e+" "+JSON.stringify(t)),e)},hyperView:function(e){let t=document.getElementById(e);if(D(t))return t;console.error("Element id="+e+" was not a HyperView")},socket:G}})()})(); -//# sourceMappingURL=hyperbole.js.map \ No newline at end of file +"use strict";(()=>{var we="data-key",x=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},Ee=function(e,n){return n?x(e,n)?(console.warn("[OmDomDom]: Children with duplicate keys detected. Children with duplicate keys will be skipped, resulting in dropped node references. Keys must be unique and non-indexed."),!1):!0:!1},v=function(e,n){var r=e.length,i=-1;if(r)for(;++i\s+/g,">"),r=new DOMParser,i=r.parseFromString(n,"text/html");return i.body};function Ie(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,d=[],a=!0,l=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(d.push(r.value),d.length!==e);a=!0);}catch(c){l=!0,i=c}finally{try{if(!a&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return d}}function W(t,e){return xe(t)||Ie(t,e)||Le(t,e)||Ae()}function xe(t){if(Array.isArray(t))return t}function Le(t,e){if(t){if(typeof t=="string")return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(t,e)}}function F(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"&&r.push(o)}for(var a in e.attributes){var l=n.attributes[a],c=e.attributes[a];l!==c&&typeof c<"u"&&(i[a]=c)}Re(n,r),Ve(n,i)},Pe="data-key";function Ue(t,e,n){var r=t.children.length,i=e.children.length;if(!(!r&&!i)){var o=be(e.children),s=Array(r);o!==void 0?v(t.children,function(l,c){var u=e.node.childNodes,p=l.attributes[Pe];if(Object.prototype.hasOwnProperty.call(o,p)){var y=o[p];Array.prototype.indexOf.call(u,y.node)!==c&&j(e,y,u[c]),s[c]=y,delete o[p],n(l,s[c])}else j(e,l,u[c]),s[c]=l}):v(t.children,function(l,c){var u=e.children[c];typeof u<"u"?(n(l,u),s[c]=u):(e.node.appendChild(l.node),s[c]=l)}),e.children=s;var d=e.node.childNodes.length,a=d-r;if(a>0)for(;a>0;)e.node.removeChild(e.node.childNodes[d-1]),d--,a--}}var G=function t(e,n,r){if(!(!e||!n)){r=r||n.node.parentNode;var i=e.content&&e.content!==n.content;if(e.type!==n.type||i)return r.replaceChild(e.node,n.node),Me(e,n);Oe(e,n),Ue(e,n,t)}};var H=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;typeof e=="string"&&(e=Te(e));var r=e.tagName==="BODY",i=e.childNodes,o=i?i.length:0;if(r){if(o>1)throw new Error("[OmDomDom]: Your element should not have more than one root node.");if(o===0)throw new Error("[OmDomDom]: Your element should have at least one root node.");return t(i[0])}var s=e.nodeType===3?"text":e.nodeType===8?"comment":e.tagName.toLowerCase(),d=n||s==="svg",a=e.nodeType===1?De(e):{},l=o>0?null:e.textContent,c=Array(o);return v(i,function(u,p){c[p]=t(u,d)}),{type:s,attributes:a,children:c,content:l,node:e,isSVGContext:d}};function k(t,e){var n=[];for(var r of e){let i=t(r);if(i)n.push(i);else break}return n}function Q(t,e){let n=0;for(;ne.key+": "+e.value).join(` +`)}function L(t){return{cookies:t.filter(e=>e.key=="Cookie").map(e=>e.value),error:h("Error",t),query:h("Query",t),pageTitle:h("PageTitle",t),events:$("Event",t).map(Be),actions:$("Trigger",t).map(Ke)}}function R(t){let e=k(J,t.trim().split(` +`));return L(e)}function h(t,e){return e.find(n=>n.key==t)?.value}function $(t,e){return e.filter(n=>n.key==t).map(n=>n.value)}function Y(t){let e=t.split(` +`),n=e[0],r=k(J,e.slice(1)),i=Q(o=>o=="",e.slice(r.length+1));return{command:n,metas:r,rest:i}}function J(t){let e=t.match(/^(\w+)\: (.*)$/);if(e)return{key:e[1],value:e[2]}}function Be(t){let[e,n]=z(t);return{name:e,detail:JSON.parse(n)}}function Ke(t){let[e,n]=z(t);return[e,n]}function z(t){let e=t.indexOf("|");if(e===-1){let n=new Error("Bad Encoding, Expected Segment");throw n.message=t,n}return[t.slice(0,e),t.slice(e+1)]}function Z(t,e,n,r,i){let o=[{key:"Cookie",value:decodeURI(document.cookie)},{key:"Query",value:window.location.search}];return{viewId:t,action:e,state:n,requestId:r,meta:o,form:je(i)}}function je(t){if(!t)return;let e=new URLSearchParams;return t.forEach((n,r)=>{e.append(r,n)}),e}function N(t){let e=["|ACTION|","ViewId: "+t.viewId,"Action: "+t.action];return t.state&&e.push("State: "+t.state),e.push("RequestId: "+t.requestId),[e.join(` +`),_(t.meta)].join(` +`)+Fe(t.form)}function Fe(t){return t?` + +`+t:""}var We=0;function ee(){return{requestId:++We,isCancelled:!1}}function V(t,e){return t+" "+Ge(e)}function Ge(t){return t==""?"|":t.replace(/_/g,"\\_").replace(/\s+/g,"_")}var Qe=window.location.protocol==="https:"?"wss:":"ws:",te=`${Qe}//${window.location.host}${window.location.pathname}`,A=class{constructor(e=te){this.hasEverConnected=!1;this.isConnected=!1;this.reconnectDelay=0;this.queue=[];this.events=new EventTarget;let n=new WebSocket(e);this.socket=n}connect(e=te,n=!1){let r=n?new WebSocket(e):this.socket;this.socket=r;function i(s){console.error("Connect Error",s)}function o(s){console.error("Socket Error",s)}r.addEventListener("error",i),r.addEventListener("open",s=>{console.log("Websocket Connected"),this.hasEverConnected&&document.dispatchEvent(new Event("hyp-socket-reconnect")),this.isConnected=!0,this.hasEverConnected=!0,this.reconnectDelay=1e3,r.removeEventListener("error",i),r.addEventListener("error",o),document.dispatchEvent(new Event("hyp-socket-connect")),this.runQueue()}),r.addEventListener("close",s=>{console.log("CLOSE SOCKET"),this.isConnected&&document.dispatchEvent(new Event("hyp-socket-disconnect")),this.isConnected=!1,r.removeEventListener("error",o),this.hasEverConnected&&(console.log("Reconnecting in "+this.reconnectDelay/1e3+"s"),setTimeout(()=>this.connect(e,!0),this.reconnectDelay)),r.removeEventListener("error",o)}),r.addEventListener("message",s=>this.onMessage(s))}async sendAction(e){if(this.isConnected){let n=N(e);this.socket.send(n)}else this.queue.push(e)}runQueue(){let e=this.queue.pop();e&&(console.log("runQueue: ",e),this.sendAction(e),this.runQueue())}onMessage(e){let{command:n,metas:r,rest:i}=Y(e.data),o=parseInt(s("RequestId"),0);function s(c){let u=h(c,r);if(!u)throw new S("Missing Required Metadata: "+c,e.data);return u}function d(c){let u=s("ViewId"),p=s("Action");return{requestId:o,targetViewId:void 0,viewId:u,action:p,meta:L(r),body:c.join(` +`)}}function a(c){let u=d(c);return u.targetViewId=h("TargetViewId",r),u}function l(c){let u=c[0];return{requestId:o,meta:L(r),url:u}}switch(n){case"|UPDATE|":return this.dispatchEvent(new CustomEvent("update",{detail:a(i)}));case"|RESPONSE|":return this.dispatchEvent(new CustomEvent("response",{detail:d(i)}));case"|REDIRECT|":return this.dispatchEvent(new CustomEvent("redirect",{detail:l(i)}))}}addEventListener(e,n){this.events.addEventListener(e,n)}dispatchEvent(e){this.events.dispatchEvent(e)}disconnect(){this.isConnected=!1,this.hasEverConnected=!1,this.socket.close()}},S=class extends Error{constructor(e,n){super(e+` +`+n),this.name="ProtocolError"}};function q(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");if(typeof n=="boolean")throw new TypeError("The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.");let{immediate:r}=n,i,o,s,d,a;function l(){let p=i,y=o;return i=void 0,o=void 0,a=t.apply(p,y),a}function c(){let p=Date.now()-d;p=0?s=setTimeout(c,e-p):(s=void 0,r||(a=l()))}let u=function(...p){if(i&&this!==i&&Object.getPrototypeOf(this)===Object.getPrototypeOf(i))throw new Error("Debounced method called with different contexts of the same prototype.");i=this,o=p,d=Date.now();let y=r&&!s;if(s||(s=setTimeout(c,e)),y)return a=l(),a};return Object.defineProperty(u,"isPending",{get(){return s!==void 0}}),u.clear=()=>{s&&(clearTimeout(s),s=void 0,i=void 0,o=void 0)},u.flush=()=>{s&&u.trigger()},u.trigger=()=>{a=l(),u.clear()},u}var M=t=>t?.runAction!==void 0;function D(t){let e=new Event("hyp-content",{bubbles:!0});t.dispatchEvent(e)}function O(t,e){t.querySelectorAll("[id]").forEach(n=>{n.runAction=function(r){return e(n,r)},n.concurrency=n.dataset.concurrency||"Drop",n.cancelActiveRequest=function(){n.activeRequest&&!n.activeRequest?.isCancelled&&(n.activeRequest.isCancelled=!0)},D(t)})}function ne(t){ie("keydown",t)}function re(t){ie("keyup",t)}function ie(t,e){document.addEventListener(t,function(n){if(!(n.target instanceof HTMLElement)){console.warn("listenKeyEvent received event with non HTMLElment as EventTarget: %o",n);return}let r=n.target,i="on"+t+n.key,o=r.dataset[i];if(!o)return;n.preventDefault();let s=w(r);if(!s){console.error("Missing target: ",r);return}e(s,o)})}function oe(t,e){document.addEventListener(t,function(n){if(!(n.target instanceof HTMLElement)){console.warn("listenBubblingEvent received an event with non HTMLElment as EventTarget: %o",n);return}let i=n.target.closest("[data-on"+t+"]");if(!i)return;n.preventDefault();let o=w(i);if(!o){console.error("Missing target: ",i);return}let s=i.dataset["on"+t];if(s===void 0){console.error("Missing action: ",i,t);return}e(o,s)})}function se(t){oe("click",t)}function ae(t){oe("dblclick",t)}function ce(t){document.addEventListener("hyp-load",function(e){let n=e.detail.onLoad,r=e.detail.target;t(r,n)}),document.addEventListener("hyp-mouseenter",function(e){let n=e.detail.onMouseEnter,r=e.detail.target;t(r,n)}),document.addEventListener("hyp-mouseleave",function(e){let n=e.detail.onMouseLeave,r=e.detail.target;t(r,n)})}function P(t){t.querySelectorAll("[data-onload]").forEach(e=>{let n=parseInt(e.dataset.delay||"")||0,r=e.dataset.onload;setTimeout(()=>{let i=w(e);if(e.dataset.onload!=r)return;let o=new CustomEvent("hyp-load",{bubbles:!0,detail:{target:i,onLoad:r}});e.dispatchEvent(o)},n)})}function U(t){t.querySelectorAll("[data-onmouseenter]").forEach(e=>{let n=e.dataset.onmouseenter,r=K(e);e.onmouseenter=()=>{let i=new CustomEvent("hyp-mouseenter",{bubbles:!0,detail:{target:r,onMouseEnter:n}});e.dispatchEvent(i)}})}function B(t){t.querySelectorAll("[data-onmouseleave]").forEach(e=>{let n=e.dataset.onmouseleave,r=K(e);e.onmouseleave=()=>{let i=new CustomEvent("hyp-mouseleave",{bubbles:!0,detail:{target:r,onMouseLeave:n}});e.dispatchEvent(i)}})}function ue(t){document.addEventListener("change",function(e){if(!(e.target instanceof HTMLElement)){console.warn("listenChange received an event with non HTMLElment as EventTarget: %o",e);return}let r=e.target.closest("[data-onchange]");if(!r)return;if(e.preventDefault(),r.value===null){console.error("Missing input value:",r);return}let i=w(r);if(!i){console.error("Missing target: listenChange");return}if(!r.dataset.onchange){console.error("Missing onchange: ",r);return}let o=V(r.dataset.onchange,r.value);t(i,o)})}function de(t,e){document.addEventListener("input",function(n){if(!(n.target instanceof HTMLElement)){console.warn("listenInput received an event with non HTMLElment as EventTarget: %o",n);return}let i=n.target.closest("[data-oninput]");if(!i)return;let o=parseInt(i.dataset.delay||"")||250;o<250&&console.warn("Input delay < 250 can result in poor performance."),n.preventDefault();let s=w(i);if(!s){console.error("Missing target: ",i);return}t(s),i.debouncedCallback||(i.debouncedCallback=q(()=>{if(!i.dataset.oninput){console.error("Missing onInput: ",i);return}let d=V(i.dataset.oninput,i.value);e(s,d)},o)),i.debouncedCallback()})}function le(t){document.addEventListener("submit",function(e){if(!(e.target instanceof HTMLFormElement)){console.warn("listenFormSubmit received an event with non HTMLElment as EventTarget: %o",e);return}let n=e.target;if(!n.dataset.onsubmit){console.error("Missing onSubmit: ",n);return}e.preventDefault();let r=w(n),i=new FormData(n);if(!r){console.error("Missing target: ",n);return}t(r,n.dataset.onsubmit,i)})}function $e(t){return t.closest("[data-target]")?.dataset.target||t.closest("[id]")?.id}function w(t){let e=K(t);if(!M(e)){console.error("Non HyperView target: ",e);return}return e}function K(t){let e=$e(t),n=e&&document.getElementById(e);if(!n){console.error("Cannot find target: ",e,t);return}return n}function pe(t){if(t!=_e()){t!=""&&(t="?"+t);let e=location.pathname+t;window.history.replaceState({},"",e)}}function _e(){let t=window.location.search;return t.startsWith("?")?t.substring(1):t}function fe(t){let n=new DOMParser().parseFromString(t,"text/html"),r=n.querySelector("style");return{content:n.querySelector("div"),css:r}}var ge={name:"web-ui",version:"0.6.0",description:"Development -----------",main:"index.js",directories:{client:"client"},scripts:{build:"esbuild src/index.ts --bundle --minify --sourcemap --outfile=dist/hyperbole.js",dev:"npm run build -- --watch",check:"tsc --noEmit"},author:"",license:"ISC",devDependencies:{esbuild:"^0.28.0",typescript:"^6.0.3"},dependencies:{omdomdom:"^0.3.2",debounce:"^3.0.0"}};console.log("Hyperbole "+ge.version+"b");var E,me=new Set;async function g(t,e,n){if(t.activeRequest&&!t.activeRequest?.isCancelled&&t.concurrency=="Drop"){console.warn("Drop action overlapping with active request ("+t.activeRequest+")",e);return}t._timeout=window.setTimeout(()=>{t.classList.add("hyp-loading")},100);let r=t.dataset.state,i=ee(),o=Z(t.id,e,r,i.requestId,n);t.activeRequest=i,b.sendAction(o)}function Je(t){console.log("REDIRECT",t),ye(t.meta.cookies??[]),window.location.href=t.url}function ze(t){let e=ve(t);e&&(delete e.activeRequest,clearTimeout(e._timeout),e.classList.remove("hyp-loading"))}function ve(t){let e=t.targetViewId||t.viewId,n=document.getElementById(e);if(!M(n)){console.error("Missing Update HyperView Target: ",e,t);return}if(n.activeRequest?.requestId&&t.requestId{console.log("SetCookie: ",e),document.cookie=e})}function he(t,e){t.query!=null&&pe(t.query),t.pageTitle!=null&&(document.title=t.pageTitle),t.events?.forEach(n=>{setTimeout(()=>{let r=new CustomEvent(n.name,{bubbles:!0,detail:n.detail});(e||document).dispatchEvent(r)},10)}),t.actions?.forEach(([n,r])=>{setTimeout(()=>{let i=window.Hyperbole?.hyperView(n);i&&g(i,r)},10)})}function Xe(t){let e=t.querySelector("[autofocus]");e?.focus&&e.focus(),t.querySelectorAll("input[value]").forEach(n=>{let r=n.getAttribute("value");r!==null&&(n.value=r)}),t.querySelectorAll("input[type=checkbox]").forEach(n=>{let r=n.dataset.checked=="True";n.checked=r})}function Ze(t){if(!t)return;let e=t.sheet?.cssRules;if(e)for(let n=0;n{ve(t.detail)});b.addEventListener("response",t=>ze(t.detail));b.addEventListener("redirect",t=>Je(t.detail));window.Hyperbole={runAction:g,parseMetadata:R,action:function(t,...e){return e.reduce((n,r)=>n+" "+JSON.stringify(r),t)},hyperView:function(t){let e=document.getElementById(t);if(!M(e)){console.error("Element id="+t+" was not a HyperView");return}return e},socket:b};})(); +/*! Bundled license information: + +omdomdom/lib/omdomdom.es.js: + (*! + * @license MIT (https://github.com/geotrev/omdomdom/blob/master/LICENSE) + * Omdomdom v0.3.2 (https://github.com/geotrev/omdomdom) + * Copyright 2023 George Treviranus + *) +*/ +//# sourceMappingURL=hyperbole.js.map diff --git a/client/dist/hyperbole.js.map b/client/dist/hyperbole.js.map index 4edc23d..d80429e 100644 --- a/client/dist/hyperbole.js.map +++ b/client/dist/hyperbole.js.map @@ -1 +1,7 @@ -{"version":3,"file":"hyperbole.js","mappings":";qBAAA,SAASA,EAASC,EAAWC,EAAO,IAAKC,EAAU,CAAC,GACnD,GAAyB,mBAAdF,EACV,MAAM,IAAIG,UAAU,+DAA+DH,QAGpF,GAAIC,EAAO,EACV,MAAM,IAAIG,WAAW,gCAItB,MAAM,UAACC,GAAgC,kBAAZH,EAAwB,CAACG,UAAWH,GAAWA,EAE1E,IAAII,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,IACR,MAAMC,EAAcN,EACdO,EAAgBN,EAItB,OAHAD,OAAgBQ,EAChBP,OAAkBO,EAClBJ,EAASV,EAAUe,MAAMH,EAAaC,GAC/BH,CACR,CAEA,SAASM,IACR,MAAMC,EAAOC,KAAKC,MAAQV,EAEtBQ,EAAOhB,GAAQgB,GAAQ,EAC1BT,EAAYY,WAAWJ,EAAOf,EAAOgB,IAErCT,OAAYM,EAEPT,IACJK,EAASC,KAGZ,CAEA,MAAMU,EAAY,YAAaC,GAC9B,GACChB,GACGiB,OAASjB,GACTkB,OAAOC,eAAeF,QAAUC,OAAOC,eAAenB,GAEzD,MAAM,IAAIoB,MAAM,0EAGjBpB,EAAgBiB,KAChBhB,EAAkBe,EAClBb,EAAYS,KAAKC,MAEjB,MAAMQ,EAAUtB,IAAcG,EAU9B,OARKA,IACJA,EAAYY,WAAWJ,EAAOf,IAG3B0B,IACHjB,EAASC,KAGHD,CACR,EA+BA,OA7BAc,OAAOI,eAAeP,EAAW,YAAa,CAC7CQ,IAAG,SACmBf,IAAdN,IAITa,EAAUS,MAAQ,KACZtB,IAILuB,aAAavB,GACbA,OAAYM,EAAS,EAGtBO,EAAUW,MAAQ,KACZxB,GAILa,EAAUY,SAAS,EAGpBZ,EAAUY,QAAU,KACnBvB,EAASC,IAETU,EAAUS,OAAO,EAGXT,CACR,CAGAa,EAAOC,QAAQpC,SAAW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BuD,CAqQkE,IAsD1FjK,OAAOiH,UACP,CACEvG,UAAWA,EACXpC,cAAeA,EACfa,OAAQ,SAASgL,KAAQ3K,GACvB,OAAOA,EAAO7C,QAAO,CAACyN,EAAKvK,IAAUuK,EAAM,IAAMpL,KAAKqL,UAAUxK,IAAQsK,EAC1E,EACAjD,UAAW,SAAShI,GAClB,IAAI1G,EAAUiJ,SAAS4B,eAAenE,GACtC,GAAKsB,EAAYhI,GAIjB,OAAOA,EAHLuC,QAAQ8C,MAAM,cAAgBqB,EAAS,uBAI3C,EACAkJ,OAAQ3D","sources":["webpack://web-ui/./node_modules/debounce/index.js","webpack://web-ui/webpack/bootstrap","webpack://web-ui/./node_modules/omdomdom/lib/omdomdom.es.js","webpack://web-ui/./src/lib.ts","webpack://web-ui/./src/message.ts","webpack://web-ui/./src/action.ts","webpack://web-ui/./src/sockets.ts","webpack://web-ui/./src/hyperview.ts","webpack://web-ui/./src/events.ts","webpack://web-ui/./src/index.ts","webpack://web-ui/./src/response.ts","webpack://web-ui/./src/browser.ts"],"sourcesContent":["function debounce(function_, wait = 100, options = {}) {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError(`Expected the first parameter to be a function, got \\`${typeof function_}\\`.`);\n\t}\n\n\tif (wait < 0) {\n\t\tthrow new RangeError('`wait` must not be negative.');\n\t}\n\n\t// TODO: Deprecate the boolean parameter at some point.\n\tconst {immediate} = typeof options === 'boolean' ? {immediate: options} : options;\n\n\tlet storedContext;\n\tlet storedArguments;\n\tlet timeoutId;\n\tlet timestamp;\n\tlet result;\n\n\tfunction run() {\n\t\tconst callContext = storedContext;\n\t\tconst callArguments = storedArguments;\n\t\tstoredContext = undefined;\n\t\tstoredArguments = undefined;\n\t\tresult = function_.apply(callContext, callArguments);\n\t\treturn result;\n\t}\n\n\tfunction later() {\n\t\tconst last = Date.now() - timestamp;\n\n\t\tif (last < wait && last >= 0) {\n\t\t\ttimeoutId = setTimeout(later, wait - last);\n\t\t} else {\n\t\t\ttimeoutId = undefined;\n\n\t\t\tif (!immediate) {\n\t\t\t\tresult = run();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst debounced = function (...arguments_) {\n\t\tif (\n\t\t\tstoredContext\n\t\t\t&& this !== storedContext\n\t\t\t&& Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext)\n\t\t) {\n\t\t\tthrow new Error('Debounced method called with different contexts of the same prototype.');\n\t\t}\n\n\t\tstoredContext = this; // eslint-disable-line unicorn/no-this-assignment\n\t\tstoredArguments = arguments_;\n\t\ttimestamp = Date.now();\n\n\t\tconst callNow = immediate && !timeoutId;\n\n\t\tif (!timeoutId) {\n\t\t\ttimeoutId = setTimeout(later, wait);\n\t\t}\n\n\t\tif (callNow) {\n\t\t\tresult = run();\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tObject.defineProperty(debounced, 'isPending', {\n\t\tget() {\n\t\t\treturn timeoutId !== undefined;\n\t\t},\n\t});\n\n\tdebounced.clear = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = undefined;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tdebounced.trigger();\n\t};\n\n\tdebounced.trigger = () => {\n\t\tresult = run();\n\n\t\tdebounced.clear();\n\t};\n\n\treturn debounced;\n}\n\n// Adds compatibility for ES modules\nmodule.exports.debounce = debounce;\n\nmodule.exports = debounce;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/*!\n * @license MIT (https://github.com/geotrev/omdomdom/blob/master/LICENSE)\n * Omdomdom v0.3.2 (https://github.com/geotrev/omdomdom)\n * Copyright 2023 George Treviranus \n */\nvar DATA_KEY_ATTRIBUTE$1 = \"data-key\";\nvar hasProperty = function hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n};\nvar keyIsValid = function keyIsValid(map, key) {\n if (!key) return false;\n if (hasProperty(map, key)) {\n console.warn(\"[OmDomDom]: Children with duplicate keys detected. Children with duplicate keys will be skipped, resulting in dropped node references. Keys must be unique and non-indexed.\");\n return false;\n }\n return true;\n};\nvar forEach = function forEach(items, fn) {\n var length = items.length;\n var idx = -1;\n if (!length) return;\n while (++idx < length) {\n if (fn(items[idx], idx) === false) break;\n }\n};\nvar createKeyMap = function createKeyMap(children) {\n var map = {};\n forEach(children, function (child) {\n var key = child.attributes[DATA_KEY_ATTRIBUTE$1];\n if (keyIsValid(map, key)) {\n map[key] = child;\n }\n });\n for (var _ in map) {\n return map;\n }\n};\nvar insertBefore = function insertBefore(parent, child, refNode) {\n return parent.node.insertBefore(child.node, refNode);\n};\nvar assignVNode = function assignVNode(template, vNode) {\n for (var property in template) {\n vNode[property] = template[property];\n }\n};\n\nvar toHTML = function toHTML(htmlString) {\n var processedDOMString = htmlString.trim().replace(/\\s+\\s+/g, \">\");\n var parser = new DOMParser();\n var context = parser.parseFromString(processedDOMString, \"text/html\");\n return context.body;\n};\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar Types = {\n STRING: \"string\",\n INT: \"number\",\n BOOL: \"boolean\"\n};\nvar DomProperties = {};\nvar createRecord = function createRecord(attrName, propName, type) {\n return {\n attrName: attrName,\n propName: propName,\n type: type\n };\n};\nvar stringProps = [[\"style\", \"cssText\"], [\"class\", \"className\"]];\nforEach(stringProps, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n attr = _ref2[0],\n property = _ref2[1];\n DomProperties[attr] = createRecord(attr, property || attr, Types.STRING);\n});\nvar booleanProps = [\"autofocus\", \"draggable\", \"hidden\", \"checked\", \"multiple\", \"muted\", \"selected\"];\nforEach(booleanProps, function (attr) {\n DomProperties[attr] = createRecord(attr, attr, Types.BOOL);\n});\nvar integerProps = [[\"tabindex\", \"tabIndex\"]];\nforEach(integerProps, function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n attr = _ref4[0],\n property = _ref4[1];\n DomProperties[attr] = createRecord(attr, property, Types.INT);\n});\nvar Namespace = {\n xlink: {\n prefix: \"xlink:\",\n resource: \"http://www.w3.org/1999/xlink\"\n },\n xml: {\n prefix: \"xml:\",\n resource: \"http://www.w3.org/XML/1998/namespace\"\n }\n};\n\nvar setProperty = function setProperty(element, type, prop, value) {\n switch (type) {\n case Types.STRING:\n {\n if (prop === DomProperties.style.propName) {\n if (value === null) {\n element.style[prop] = \"\";\n } else {\n element.style[prop] = value;\n }\n } else if (value === null) {\n element[prop] = \"\";\n } else {\n element[prop] = value;\n }\n break;\n }\n case Types.INT:\n {\n if (value === null) {\n var attr = prop.toLowerCase();\n element.removeAttribute(attr);\n } else if (value === \"0\") {\n element[prop] = 0;\n } else if (value === \"-1\") {\n element[prop] = -1;\n } else {\n var parsed = parseInt(value, 10);\n if (!isNaN(parsed)) {\n element[prop] = parsed;\n }\n }\n break;\n }\n case Types.BOOL:\n {\n if ([\"\", \"true\"].indexOf(value) < 0) {\n element[prop] = false;\n } else {\n element[prop] = true;\n }\n break;\n }\n }\n};\n\nvar removeAttributes = function removeAttributes(vNode, attributes) {\n forEach(attributes, function (attrName) {\n if (hasProperty(DomProperties, attrName)) {\n var propertyRecord = DomProperties[attrName];\n setProperty(vNode.node, propertyRecord.type, propertyRecord.propName, null);\n } else {\n if (attrName in vNode.node) {\n setProperty(vNode.node, Types.STRING, attrName, null);\n }\n vNode.node.removeAttribute(attrName);\n }\n delete vNode.attributes[attrName];\n });\n};\nvar setAttributes = function setAttributes(vNode, attributes) {\n for (var attrName in attributes) {\n var value = attributes[attrName];\n vNode.attributes[attrName] = value;\n if (hasProperty(DomProperties, attrName)) {\n var propertyRecord = DomProperties[attrName];\n setProperty(vNode.node, propertyRecord.type, propertyRecord.propName, value);\n continue;\n }\n if (attrName.startsWith(Namespace.xlink.prefix)) {\n vNode.node.setAttributeNS(Namespace.xlink.resource, attrName, value);\n continue;\n }\n if (attrName.startsWith(Namespace.xml.prefix)) {\n vNode.node.setAttributeNS(Namespace.xml.resource, attrName, value);\n continue;\n }\n if (attrName in vNode.node) {\n setProperty(vNode.node, Types.STRING, attrName, value);\n }\n vNode.node.setAttribute(attrName, value || \"\");\n }\n};\nvar getPropertyValues = function getPropertyValues(element, attributes) {\n for (var attrName in DomProperties) {\n var propertyRecord = DomProperties[attrName];\n var propName = propertyRecord.propName;\n var attrValue = element.getAttribute(attrName);\n if (attrName === DomProperties.style.attrName) {\n attributes[attrName] = element.style[propName];\n } else if (typeof attrValue === \"string\") {\n attributes[attrName] = attrValue;\n }\n }\n};\nvar getBaseAttributes = function getBaseAttributes(element) {\n return Array.prototype.reduce.call(element.attributes, function (attributes, attrName) {\n if (!hasProperty(DomProperties, attrName.name)) {\n attributes[attrName.name] = attrName.value;\n }\n return attributes;\n }, {});\n};\nvar getAttributes = function getAttributes(element) {\n var attributes = getBaseAttributes(element);\n getPropertyValues(element, attributes);\n return attributes;\n};\nvar updateAttributes = function updateAttributes(template, vNode) {\n var removedAttributes = [];\n var changedAttributes = {};\n for (var attrName in vNode.attributes) {\n var oldValue = vNode.attributes[attrName];\n var nextValue = template.attributes[attrName];\n if (oldValue === nextValue) continue;\n if (typeof nextValue === \"undefined\") {\n removedAttributes.push(attrName);\n }\n }\n for (var _attrName in template.attributes) {\n var _oldValue = vNode.attributes[_attrName];\n var _nextValue = template.attributes[_attrName];\n if (_oldValue === _nextValue) continue;\n if (typeof _nextValue !== \"undefined\") {\n changedAttributes[_attrName] = _nextValue;\n }\n }\n removeAttributes(vNode, removedAttributes);\n setAttributes(vNode, changedAttributes);\n};\n\nvar DATA_KEY_ATTRIBUTE = \"data-key\";\nfunction patchChildren(template, vNode, patch) {\n var templateChildrenLength = template.children.length;\n var vNodeChildrenLength = vNode.children.length;\n if (!templateChildrenLength && !vNodeChildrenLength) return;\n var vNodeKeyMap = createKeyMap(vNode.children);\n var nextChildren = Array(templateChildrenLength);\n if (vNodeKeyMap !== undefined) {\n forEach(template.children, function (templateChild, idx) {\n var childNodes = vNode.node.childNodes;\n var key = templateChild.attributes[DATA_KEY_ATTRIBUTE];\n if (Object.prototype.hasOwnProperty.call(vNodeKeyMap, key)) {\n var keyedChild = vNodeKeyMap[key];\n if (Array.prototype.indexOf.call(childNodes, keyedChild.node) !== idx) {\n insertBefore(vNode, keyedChild, childNodes[idx]);\n }\n nextChildren[idx] = keyedChild;\n delete vNodeKeyMap[key];\n patch(templateChild, nextChildren[idx]);\n } else {\n insertBefore(vNode, templateChild, childNodes[idx]);\n nextChildren[idx] = templateChild;\n }\n });\n } else {\n forEach(template.children, function (templateChild, idx) {\n var vNodeChild = vNode.children[idx];\n if (typeof vNodeChild !== \"undefined\") {\n patch(templateChild, vNodeChild);\n nextChildren[idx] = vNodeChild;\n } else {\n vNode.node.appendChild(templateChild.node);\n nextChildren[idx] = templateChild;\n }\n });\n }\n vNode.children = nextChildren;\n var childNodesLength = vNode.node.childNodes.length;\n var delta = childNodesLength - templateChildrenLength;\n if (delta > 0) {\n while (delta > 0) {\n vNode.node.removeChild(vNode.node.childNodes[childNodesLength - 1]);\n childNodesLength--;\n delta--;\n }\n }\n}\n\nvar patch = function patch(template, vNode, rootNode) {\n if (!template || !vNode) return;\n rootNode = rootNode || vNode.node.parentNode;\n var contentChanged = template.content && template.content !== vNode.content;\n if (template.type !== vNode.type || contentChanged) {\n rootNode.replaceChild(template.node, vNode.node);\n return assignVNode(template, vNode);\n }\n updateAttributes(template, vNode);\n patchChildren(template, vNode, patch);\n};\nvar render = function render(vNode, root) {\n root.appendChild(vNode.node);\n};\nvar create = function create(node) {\n var isSVGContext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (typeof node === \"string\") {\n node = toHTML(node);\n }\n var isRoot = node.tagName === \"BODY\";\n var childNodes = node.childNodes;\n var numChildNodes = childNodes ? childNodes.length : 0;\n if (isRoot) {\n if (numChildNodes > 1) {\n throw new Error(\"[OmDomDom]: Your element should not have more than one root node.\");\n } else if (numChildNodes === 0) {\n throw new Error(\"[OmDomDom]: Your element should have at least one root node.\");\n } else {\n return create(childNodes[0]);\n }\n }\n var type = node.nodeType === 3 ? \"text\" : node.nodeType === 8 ? \"comment\" : node.tagName.toLowerCase();\n var isSVG = isSVGContext || type === \"svg\";\n var attributes = node.nodeType === 1 ? getAttributes(node) : {};\n var content = numChildNodes > 0 ? null : node.textContent;\n var children = Array(numChildNodes);\n forEach(childNodes, function (child, idx) {\n children[idx] = create(child, isSVG);\n });\n return {\n type: type,\n attributes: attributes,\n children: children,\n content: content,\n node: node,\n isSVGContext: isSVG\n };\n};\n\nexport { create, patch, render };\n//# sourceMappingURL=omdomdom.es.js.map\n","\n\nexport function takeWhileMap(pred: (val: T) => A | undefined, lines: T[]): A[] {\n var output = []\n for (var line of lines) {\n let a = pred(line)\n if (a)\n output.push(a)\n else\n break;\n }\n\n return output\n}\n\nexport function dropWhile(pred: (val: T) => A | undefined, lines: T[]): T[] {\n let index = 0;\n while (index < lines.length && pred(lines[index])) {\n index++;\n }\n return lines.slice(index);\n}\n\n","\nimport { takeWhileMap, dropWhile } from \"./lib\"\n\n\n\nexport type Meta = { key: string, value: string }\nexport type ViewId = string\nexport type RequestId = number\nexport type EncodedAction = string\nexport type ViewState = string\n\ntype RemoteEvent = { name: string, detail: unknown }\n\n\nexport function renderMetas(meta: Meta[]): string {\n return meta.map(m => m.key + \": \" + m.value).join('\\n')\n}\n\nexport type Metadata = {\n cookies?: string[]\n // redirect?: string\n error?: string\n query?: string\n events?: RemoteEvent[]\n actions?: [ViewId, string][],\n pageTitle?: string\n}\n\n\nexport function toMetadata(meta: Meta[]): Metadata {\n\n return {\n cookies: meta.filter(m => m.key == \"Cookie\").map(m => m.value),\n // redirect: metaValue(\"Redirect\", meta),\n error: metaValue(\"Error\", meta),\n query: metaValue(\"Query\", meta),\n pageTitle: metaValue(\"PageTitle\", meta),\n events: metaValuesAll(\"Event\", meta).map(parseRemoteEvent),\n actions: metaValuesAll(\"Trigger\", meta).map(parseAction),\n }\n}\n\n// viewId: meta.find(m => m.key == \"VIEW-ID\")?.value,\n\nexport function parseMetadata(input: string): Metadata {\n let metas = takeWhileMap(parseMeta, input.trim().split(\"\\n\"))\n return toMetadata(metas)\n}\n\n\nexport function metaValue(key: string, metas: Meta[]): string | undefined {\n return metas.find(m => m.key == key)?.value\n}\n\nexport function metaValuesAll(key: string, metas: Meta[]): string[] {\n return metas.filter(m => m.key == key).map(m => m.value)\n}\n\nexport type SplitMessage = {\n command: string,\n metas: Meta[],\n rest: string[]\n}\n\n\nexport function splitMessage(message: string): SplitMessage {\n let lines = message.split(\"\\n\")\n let command: string = lines[0]\n let metas: Meta[] = takeWhileMap(parseMeta, lines.slice(1))\n // console.log(\"Split Metadata\", lines.length)\n // console.log(\" [0]\", lines[0])\n // console.log(\" [1]\", lines[1])\n let rest = dropWhile(l => l == \"\", lines.slice(metas.length + 1))\n\n return { command, metas, rest }\n}\n\nexport function parseMeta(line: string): Meta | undefined {\n let match = line.match(/^(\\w+)\\: (.*)$/)\n if (match) {\n return {\n key: match[1],\n value: match[2]\n }\n }\n}\n\n\nexport function parseRemoteEvent(input: string): RemoteEvent {\n let [name, data] = breakNextSegment(input)\n return {\n name,\n detail: JSON.parse(data)\n }\n}\n\nexport function parseAction(input: string): [ViewId, string] {\n let [viewId, action] = breakNextSegment(input)\n return [viewId, action]\n}\n\nfunction breakNextSegment(input: string): [string, string] {\n let ix = input.indexOf('|')\n if (ix === -1) {\n let err = new Error(\"Bad Encoding, Expected Segment\")\n err.message = input\n throw err\n }\n return [input.slice(0, ix), input.slice(ix + 1)]\n}\n\n","\nimport { takeWhileMap } from \"./lib\"\nimport { Meta, ViewId, RequestId, EncodedAction, ViewState } from \"./message\"\nimport * as message from \"./message\"\n\n\n\nexport type ActionMessage = {\n viewId: ViewId\n action: EncodedAction\n requestId: RequestId\n state?: ViewState\n meta: Meta[]\n form: URLSearchParams | undefined\n}\n\n\n\n\nexport function actionMessage(id: ViewId, action: EncodedAction, state: ViewState | undefined, reqId: RequestId, form?: FormData): ActionMessage {\n let meta: Meta[] = [\n { key: \"Cookie\", value: decodeURI(document.cookie) },\n { key: \"Query\", value: window.location.search }\n ]\n\n return { viewId: id, action, state, requestId: reqId, meta, form: toSearch(form) }\n}\n\nexport function toSearch(form?: FormData): URLSearchParams | undefined {\n if (!form) return undefined\n\n const params = new URLSearchParams()\n\n form.forEach((value, key) => {\n params.append(key, value as string)\n })\n\n return params\n}\n\nexport function renderActionMessage(msg: ActionMessage): string {\n let header = [\n \"|ACTION|\",\n \"ViewId: \" + msg.viewId,\n \"Action: \" + msg.action,\n ]\n\n\n if (msg.state) {\n header.push(\"State: \" + msg.state)\n }\n\n header.push(\"RequestId: \" + msg.requestId)\n\n return [\n header.join('\\n'),\n message.renderMetas(msg.meta),\n ].join('\\n') + renderForm(msg.form)\n}\n\n\nexport function renderForm(form: URLSearchParams | undefined): string {\n if (!form) return \"\"\n return \"\\n\\n\" + form\n}\n\nlet globalRequestId: RequestId = 0\n\nexport type Request = {\n requestId: RequestId\n isCancelled: boolean\n}\n\nexport function newRequest(): Request {\n let requestId = ++globalRequestId\n return { requestId, isCancelled: false }\n}\n\n\n\n// Sanitized Encoding ------------------------------------\n\nexport function encodedParam(action: string, param: string): string {\n return action + ' ' + sanitizeParam(param)\n}\n\nfunction sanitizeParam(param: string): string {\n if (param == \"\") {\n return \"|\"\n }\n\n return param.replace(/_/g, \"\\\\_\").replace(/\\s+/g, \"_\")\n}\n","import { ActionMessage, renderActionMessage } from './action'\nimport { ResponseBody } from \"./response\"\nimport * as message from \"./message\"\nimport { ViewId, RequestId, EncodedAction, metaValue, Metadata } from \"./message\"\n\nconst protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';\nconst defaultAddress = `${protocol}//${window.location.host}${window.location.pathname}`\n\ninterface SocketConnectionEventMap {\n \"update\": CustomEvent;\n \"response\": CustomEvent;\n \"redirect\": CustomEvent;\n}\n\nexport class SocketConnection {\n socket: WebSocket\n\n hasEverConnected: Boolean = false\n isConnected: Boolean = false\n reconnectDelay: number = 0\n queue: ActionMessage[] = []\n events: EventTarget\n\n constructor(addr = defaultAddress) {\n this.events = new EventTarget()\n const sock = new WebSocket(addr)\n this.socket = sock\n }\n\n connect(addr = defaultAddress, createSocket = false) {\n const sock = createSocket ? new WebSocket(addr) : this.socket\n this.socket = sock\n\n function onConnectError(ev: Event) {\n console.error(\"Connect Error\", ev)\n }\n\n function onSocketError(ev: Event) {\n console.error(\"Socket Error\", ev)\n }\n\n\n // initial connection errors\n sock.addEventListener('error', onConnectError)\n\n sock.addEventListener('open', (_event) => {\n console.log(\"Websocket Connected\")\n\n if (this.hasEverConnected) {\n document.dispatchEvent(new Event(\"hyp-socket-reconnect\"))\n }\n\n this.isConnected = true\n this.hasEverConnected = true\n this.reconnectDelay = 1000\n sock.removeEventListener('error', onConnectError)\n sock.addEventListener('error', onSocketError)\n\n document.dispatchEvent(new Event(\"hyp-socket-connect\"))\n\n this.runQueue()\n })\n\n sock.addEventListener('close', _ => {\n console.log(\"CLOSE SOCKET\")\n if (this.isConnected) {\n document.dispatchEvent(new Event(\"hyp-socket-disconnect\"))\n }\n\n this.isConnected = false\n sock.removeEventListener('error', onSocketError)\n\n // attempt to reconnect in 1s\n if (this.hasEverConnected) {\n console.log(\"Reconnecting in \" + (this.reconnectDelay / 1000) + \"s\")\n setTimeout(() => this.connect(addr, true), this.reconnectDelay)\n }\n\n sock.removeEventListener('error', onSocketError)\n })\n\n sock.addEventListener('message', ev => this.onMessage(ev))\n }\n\n async sendAction(action: ActionMessage) {\n if (this.isConnected) {\n let msg = renderActionMessage(action)\n this.socket.send(msg)\n }\n else {\n this.queue.push(action)\n }\n }\n\n private runQueue() {\n // send all messages queued while disconnected \n let next: ActionMessage | undefined = this.queue.pop()\n if (next) {\n console.log(\"runQueue: \", next)\n this.sendAction(next)\n this.runQueue()\n }\n }\n\n\n // full responses will never be sent over!\n private onMessage(event: MessageEvent) {\n let { command, metas, rest } = message.splitMessage(event.data)\n // console.log(\"MESSAGE\", command, metas, rest)\n\n let requestId = parseInt(requireMeta(\"RequestId\"), 0)\n\n function requireMeta(key: string): string {\n let val = metaValue(key, metas)\n if (!val) throw new ProtocolError(\"Missing Required Metadata: \" + key, event.data)\n return val\n }\n\n function parseResponse(rest: string[]): Update {\n let viewId = requireMeta(\"ViewId\")\n let action = requireMeta(\"Action\")\n return {\n requestId,\n targetViewId: undefined,\n viewId,\n action,\n meta: message.toMetadata(metas),\n body: rest.join(\"\\n\"),\n }\n }\n\n function parseUpdate(rest: string[]): Update {\n let up = parseResponse(rest)\n // add the TargetViewId\n up.targetViewId = metaValue(\"TargetViewId\", metas)\n return up\n }\n\n function parseRedirect(rest: string[]): Redirect {\n let url = rest[0]\n return {\n requestId,\n meta: message.toMetadata(metas),\n url\n }\n }\n\n switch (command) {\n\n case \"|UPDATE|\":\n return this.dispatchEvent(new CustomEvent(\"update\", { detail: parseUpdate(rest) }))\n\n case \"|RESPONSE|\":\n return this.dispatchEvent(new CustomEvent(\"response\", { detail: parseResponse(rest) }))\n\n case \"|REDIRECT|\":\n return this.dispatchEvent(new CustomEvent(\"redirect\", { detail: parseRedirect(rest) }))\n }\n }\n\n\n // so what if they send remote events in the page? trigger, redirect, page title, etc...\n // we aren't connected yet on a page thing\n\n // private async waitMessage(reqId: RequestId, id: ViewId): Promise {\n // return new Promise((resolve, reject) => {\n // const onMessage = (event: MessageEvent) => {\n // let data: string = event.data\n // let lines = data.split(\"\\n\").slice(1) // drop the command line\n //\n // let parsed = splitMetadata(lines)\n // let metadata: Metadata = parsed.metadata\n //\n // if (!metadata.requestId) {\n // console.error(\"Missing RequestId!\", metadata, event.data)\n // return\n // }\n //\n // if (metadata.requestId != reqId) {\n // // skip, it's not us!\n // return\n // }\n //\n //\n // // We have found our message. Remove the listener\n // this.socket.removeEventListener('message', onMessage)\n //\n // // set the cookies. These happen automatically in http\n // metadata.cookies.forEach((cookie: string) => {\n // document.cookie = cookie\n // })\n //\n // if (metadata.error) {\n // reject(new FetchError(id, metadata.error, parsed.rest.join('\\n')))\n // return\n // }\n //\n // resolve(parsed)\n // }\n //\n // this.socket.addEventListener('message', onMessage)\n // this.socket.addEventListener('error', reject)\n // })\n // }\n\n addEventListener(e: K, cb: (ev: SocketConnectionEventMap[K]) => void) {\n this.events.addEventListener(e,\n // @ts-ignore: HACK\n cb\n )\n }\n\n dispatchEvent(e: SocketConnectionEventMap[K]) {\n this.events.dispatchEvent(e)\n }\n\n disconnect() {\n this.isConnected = false\n this.hasEverConnected = false\n this.socket.close()\n }\n}\n\n\nexport type Update = {\n requestId: RequestId\n meta: Metadata\n viewId: ViewId\n targetViewId?: ViewId\n action: EncodedAction\n body: ResponseBody\n}\n\nexport type Redirect = {\n requestId: RequestId\n meta: Metadata\n url: string\n}\n\nexport type MessageType = string\n\n\n// PARSING MESSAGE ---------------------------------------\n\nexport class ProtocolError extends Error {\n constructor(description: string, body: string) {\n super(description + \"\\n\" + body)\n this.name = \"ProtocolError\"\n }\n}\n","import { type Request } from \"./action\";\n\nexport interface HyperView extends HTMLElement {\n runAction(action: string): Promise;\n activeRequest?: Request;\n cancelActiveRequest(): void;\n concurrency: ConcurrencyMode;\n _timeout?: number;\n}\n\nexport const isHyperView = (ele: any): ele is HyperView => {\n return ele?.runAction !== undefined;\n};\n\nexport type ConcurrencyMode = string;\n\nexport function dispatchContent(node: HTMLElement): void {\n let event = new Event(\"hyp-content\", { bubbles: true })\n node.dispatchEvent(event)\n}\n\nexport function enrichHyperViews(node: HTMLElement, runAction: (target: HyperView, action: string, form?: FormData) => Promise): void {\n // enrich all the hyperviews\n node.querySelectorAll(\"[id]\").forEach((element) => {\n element.runAction = function(action: string) {\n return runAction(element, action)\n }\n\n element.concurrency = element.dataset.concurrency || \"Drop\"\n\n element.cancelActiveRequest = function() {\n if (element.activeRequest && !element.activeRequest?.isCancelled) {\n element.activeRequest.isCancelled = true\n }\n }\n\n dispatchContent(node)\n })\n}\n","\nimport * as debounce from 'debounce'\nimport { encodedParam } from './action'\nimport { HyperView, isHyperView } from './hyperview'\n\nexport type UrlFragment = string\n\nexport function listenKeydown(cb: (target: HyperView, action: string) => void): void {\n listenKeyEvent(\"keydown\", cb)\n}\n\nexport function listenKeyup(cb: (target: HyperView, action: string) => void): void {\n listenKeyEvent(\"keyup\", cb)\n}\n\nexport function listenKeyEvent(event: \"keyup\" | \"keydown\", cb: (target: HyperView, action: string) => void): void {\n\n document.addEventListener(event, function(e: KeyboardEvent) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenKeyEvent received event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let source = e.target\n\n let datasetKey = \"on\" + event + e.key\n let action = source.dataset[datasetKey]\n if (!action) return\n\n e.preventDefault()\n const target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: \", source)\n return\n }\n cb(target, action)\n })\n}\n\nexport function listenBubblingEvent(event: string, cb: (_target: HyperView, action: string) => void): void {\n document.addEventListener(event, function(e) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenBubblingEvent received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let el = e.target\n\n // clicks can fire on internal elements. Find the parent with a click handler\n let source = el.closest(\"[data-on\" + event + \"]\")\n if (!source) return\n\n e.preventDefault()\n let target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: \", source)\n return\n }\n const action = source.dataset[\"on\" + event]\n if (action === undefined) {\n console.error(\"Missing action: \", source, event)\n return\n }\n cb(target, action)\n })\n}\n\nexport function listenClick(cb: (target: HyperView, action: string) => void): void {\n listenBubblingEvent(\"click\", cb)\n}\n\nexport function listenDblClick(cb: (target: HyperView, action: string) => void): void {\n listenBubblingEvent(\"dblclick\", cb)\n}\n\n\nexport function listenTopLevel(cb: (target: HyperView, action: string) => void): void {\n document.addEventListener(\"hyp-load\", function(e: CustomEvent) {\n let action = e.detail.onLoad\n let target = e.detail.target\n cb(target, action)\n })\n\n document.addEventListener(\"hyp-mouseenter\", function(e: CustomEvent) {\n let action = e.detail.onMouseEnter\n let target = e.detail.target\n cb(target, action)\n })\n\n document.addEventListener(\"hyp-mouseleave\", function(e: CustomEvent) {\n let action = e.detail.onMouseLeave\n let target = e.detail.target\n cb(target, action)\n })\n}\n\n\nexport function listenLoad(node: HTMLElement): void {\n\n // it doesn't really matter WHO runs this except that it should have target\n node.querySelectorAll(\"[data-onload]\").forEach((load) => {\n let delay = parseInt(load.dataset.delay || \"\") || 0\n let onLoad = load.dataset.onload\n // console.log(\"load start\", load.dataset.onLoad)\n\n // load no longer exists!\n // we should clear the timeout or back out if the dom is replaced in the interem\n setTimeout(() => {\n let target = nearestHyperViewTarget(load)\n // console.log(\"load go\", load.dataset.onLoad)\n\n if (load.dataset.onload != onLoad) {\n // the onLoad no longer exists\n return\n }\n\n const event = new CustomEvent(\"hyp-load\", { bubbles: true, detail: { target, onLoad } })\n load.dispatchEvent(event)\n }, delay)\n })\n}\n\nexport function listenMouseEnter(node: HTMLElement): void {\n node.querySelectorAll(\"[data-onmouseenter]\").forEach((node) => {\n let onMouseEnter = node.dataset.onmouseenter\n\n let target = nearestAnyTarget(node)\n\n node.onmouseenter = () => {\n const event = new CustomEvent(\"hyp-mouseenter\", { bubbles: true, detail: { target, onMouseEnter } })\n node.dispatchEvent(event)\n }\n })\n}\n\nexport function listenMouseLeave(node: HTMLElement): void {\n node.querySelectorAll(\"[data-onmouseleave]\").forEach((node) => {\n let onMouseLeave = node.dataset.onmouseleave\n\n let target = nearestAnyTarget(node)\n\n node.onmouseleave = () => {\n const event = new CustomEvent(\"hyp-mouseleave\", { bubbles: true, detail: { target, onMouseLeave } })\n node.dispatchEvent(event)\n }\n })\n}\n\n\nexport function listenChange(cb: (target: HyperView, action: string) => void): void {\n document.addEventListener(\"change\", function(e) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenChange received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let el = e.target\n\n let source = el.closest(\"[data-onchange]\")\n\n if (!source) return\n e.preventDefault()\n\n if (source.value === null) {\n console.error(\"Missing input value:\", source)\n return\n }\n\n let target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: listenChange\")\n return\n }\n if (!source.dataset.onchange) {\n console.error(\"Missing onchange: \", source)\n return\n }\n let action = encodedParam(source.dataset.onchange, source.value)\n cb(target, action)\n })\n}\n\ninterface LiveInputElement extends HTMLInputElement {\n debouncedCallback?: Function;\n}\n\nexport function listenInput(startedTyping: (target: HyperView) => void, cb: (target: HyperView, action: string) => void): void {\n document.addEventListener(\"input\", function(e) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenInput received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let el = e.target\n const source = el.closest(\"[data-oninput]\")\n\n if (!source) return\n\n let delay = parseInt(source.dataset.delay || \"\") || 250\n if (delay < 250) {\n console.warn(\"Input delay < 250 can result in poor performance.\")\n }\n\n e.preventDefault()\n\n const target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: \", source)\n return\n }\n\n // I want to CANCEL the active request as soon as we start typing\n startedTyping(target)\n\n if (!source.debouncedCallback) {\n source.debouncedCallback = debounce(() => {\n if (!source.dataset.oninput) {\n console.error(\"Missing onInput: \", source)\n return\n }\n const action = encodedParam(source.dataset.oninput, source.value)\n cb(target, action)\n }, delay)\n }\n\n source.debouncedCallback()\n })\n}\n\n\n\nexport function listenFormSubmit(cb: (target: HyperView, action: string, form: FormData) => void): void {\n document.addEventListener(\"submit\", function(e) {\n if (!(e.target instanceof HTMLFormElement)) {\n console.warn(\"listenFormSubmit received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let form = e.target\n\n\n if (!form.dataset.onsubmit) {\n console.error(\"Missing onSubmit: \", form)\n return\n }\n\n e.preventDefault()\n\n let target = nearestHyperViewTarget(form)\n const formData = new FormData(form)\n if (!target) {\n console.error(\"Missing target: \", form)\n return\n }\n cb(target, form.dataset.onsubmit, formData)\n })\n}\n\nfunction nearestTargetId(node: HTMLElement): string | undefined {\n let targetData = node.closest(\"[data-target]\")\n return targetData?.dataset.target || node.closest(\"[id]\")?.id\n}\n\nfunction nearestHyperViewTarget(node: HTMLElement): HyperView | undefined {\n const target = nearestAnyTarget(node)\n\n if (!isHyperView(target)) {\n console.error(\"Non HyperView target: \", target)\n return\n }\n\n return target\n}\n\nfunction nearestAnyTarget(node: HTMLElement): HTMLElement | undefined {\n let targetId = nearestTargetId(node)\n let target = targetId && document.getElementById(targetId)\n\n if (!target) {\n console.error(\"Cannot find target: \", targetId, node)\n return\n }\n\n return target\n}\n","import { patch, create } from \"omdomdom/lib/omdomdom.es.js\"\nimport { SocketConnection, Update, Redirect } from './sockets'\nimport { listenChange, listenClick, listenDblClick, listenFormSubmit, listenLoad, listenTopLevel, listenInput, listenKeydown, listenKeyup, listenMouseEnter, listenMouseLeave } from './events'\nimport { actionMessage, newRequest } from './action'\nimport { ViewId, Metadata, parseMetadata } from './message'\nimport { setQuery } from \"./browser\"\nimport { parseResponse, LiveUpdate } from './response'\nimport { dispatchContent, enrichHyperViews, HyperView, isHyperView } from \"./hyperview\"\n\nlet PACKAGE = require('../package.json');\n\n\n// console.log(\"VERSION 2\", INIT_PAGE, INIT_STATE)\nconsole.log(\"Hyperbole \" + PACKAGE.version + \"b\")\n\n\nlet rootStyles: HTMLStyleElement;\nlet addedRulesIndex = new Set();\n\n\n\n\n\n// Run an action in a given HyperView\nasync function runAction(target: HyperView, action: string, form?: FormData) {\n\n if (target.activeRequest && !target.activeRequest?.isCancelled) {\n // Active Request!\n if (target.concurrency == \"Drop\") {\n console.warn(\"Drop action overlapping with active request (\" + target.activeRequest + \")\", action)\n return\n }\n }\n\n target._timeout = window.setTimeout(() => {\n // add loading after 100ms, not right away\n // if it runs shorter than that we probably don't want to show the user any loading feedback\n target.classList.add(\"hyp-loading\")\n }, 100)\n\n let state = target.dataset.state\n\n let req = newRequest()\n let msg = actionMessage(target.id, action, state, req.requestId, form)\n\n // Set the requestId\n target.activeRequest = req\n\n sock.sendAction(msg)\n}\n\n\n// TODO: redirect concurrency\nfunction handleRedirect(red: Redirect) {\n console.log(\"REDIRECT\", red)\n\n // the other metdata doesn't apply, they are all specific to the page\n applyCookies(red.meta.cookies ?? [])\n\n window.location.href = red.url\n}\n\n// in-process update\nfunction handleResponse(res: Update) {\n // console.log(\"Handle Response\", res)\n let target = handleUpdate(res)\n if (!target) return\n\n // clean up the request\n delete target.activeRequest\n clearTimeout(target._timeout)\n target.classList.remove(\"hyp-loading\")\n}\n\nfunction handleUpdate(res: Update): HyperView | undefined {\n // console.log(\"|UPDATE|\", res)\n\n let targetViewId = res.targetViewId || res.viewId\n let target = document.getElementById(targetViewId)\n\n if (!isHyperView(target)) {\n console.error(\"Missing Update HyperView Target: \", targetViewId, res)\n return\n }\n\n if (target.activeRequest?.requestId && res.requestId < target.activeRequest.requestId) {\n // this should only happen on Replace, since other requests should be dropped\n // but it's safe to assume we never want to apply an old requestId\n console.warn(\"Ignore Stale Action (\" + res.requestId + \") vs (\" + target.activeRequest.requestId + \"): \" + res.action)\n return target\n }\n else if (target.activeRequest?.isCancelled) {\n console.warn(\"Cancelled request\", target.activeRequest?.requestId)\n delete target.activeRequest\n return target\n }\n\n let update: LiveUpdate = parseResponse(res.body)\n\n if (!update.content) {\n console.error(\"Empty Response!\", res.body)\n return target\n }\n\n // First, update the stylesheet\n addCSS(update.css)\n\n\n // Patch the node\n const old: VNode = create(target)\n let next: VNode = create(update.content)\n let atts = next.attributes\n\n if (!res.meta.error && atts[\"id\"] != target.id) {\n console.error(\"Mismatched ViewId in update - \", atts[\"id\"], \" target:\", target.id)\n return\n }\n\n let state = atts[\"data-state\"]\n next.attributes = old.attributes\n\n\n patch(next, old)\n\n\n // Emit relevant events\n let newTarget = document.getElementById(target.id)\n\n if (!newTarget) {\n console.warn(\"Target Missing: \", target.id)\n return target\n }\n\n dispatchContent(newTarget)\n\n // re-add state attribute \n if (state === undefined || state == \"()\")\n delete newTarget.dataset.state\n else\n newTarget.dataset.state = state\n\n // execute the metadata, anything that doesn't interrupt the dom update\n runMetadata(res.meta, newTarget)\n applyCookies(res.meta.cookies ?? [])\n\n // now way for these to bubble)\n listenLoad(newTarget)\n listenMouseEnter(newTarget)\n listenMouseLeave(newTarget)\n fixInputs(newTarget)\n enrichHyperViews(newTarget, runAction)\n\n return target\n}\n// catch (err) {\n// console.error(\"Caught Error in HyperView (\" + target.id + \"):\\n\", err)\n//\n// // Hyperbole catches handler errors, and the server controls what to display to the user on an error\n// // but if you manage to crash your parent server process somehow, the response may be empty\n// target.innerHTML = err.body || \"
Hyperbole Internal Error
\"\n// }\n\nfunction applyCookies(cookies: string[]) {\n cookies.forEach((cookie: string) => {\n console.log(\"SetCookie: \", cookie)\n document.cookie = cookie\n })\n}\n\nfunction runMetadata(meta: Metadata, target?: HTMLElement) {\n if (meta.query != null) {\n setQuery(meta.query)\n }\n\n if (meta.pageTitle != null) {\n document.title = meta.pageTitle\n }\n\n meta.events?.forEach((remoteEvent) => {\n setTimeout(() => {\n let event = new CustomEvent(remoteEvent.name, { bubbles: true, detail: remoteEvent.detail })\n let eventTarget = target || document\n eventTarget.dispatchEvent(event)\n }, 10)\n })\n\n meta.actions?.forEach(([viewId, action]) => {\n setTimeout(() => {\n let view = window.Hyperbole?.hyperView(viewId)\n if (view) {\n runAction(view, action)\n }\n }, 10)\n })\n}\n\n\nfunction fixInputs(target: HTMLElement) {\n let focused = target.querySelector(\"[autofocus]\")\n if (focused?.focus) {\n focused.focus()\n }\n\n target.querySelectorAll(\"input[value]\").forEach((input) => {\n let val = input.getAttribute(\"value\")\n if (val !== null) {\n input.value = val\n }\n })\n\n target.querySelectorAll(\"input[type=checkbox]\").forEach((checkbox) => {\n let checked = checkbox.dataset.checked == \"True\"\n checkbox.checked = checked\n })\n}\n\nfunction addCSS(src: HTMLStyleElement | null) {\n if (!src) return;\n const rules = src.sheet?.cssRules\n if (!rules) return;\n for (let i = 0; i < rules.length; i++) {\n const rule = rules.item(i)\n if (rule && addedRulesIndex.has(rule.cssText) == false && rootStyles.sheet) {\n rootStyles.sheet.insertRule(rule.cssText);\n addedRulesIndex.add(rule.cssText);\n }\n }\n}\n\n\n\n\nfunction init() {\n // metadata attached to initial page loads need to be executed\n let meta = parseMetadata(document.getElementById(\"hyp.metadata\")?.innerText ?? \"\")\n // runMetadataImmediate(meta)\n runMetadata(meta)\n\n const style = document.body.querySelector('style')\n\n if (style !== null) {\n rootStyles = style\n } else {\n console.warn(\"rootStyles missing from page, creating...\")\n rootStyles = document.createElement(\"style\")\n rootStyles.type = \"text/css\"\n document.body.appendChild(rootStyles)\n }\n\n listenTopLevel(async function(target: HyperView, action: string) {\n runAction(target, action)\n })\n\n listenLoad(document.body)\n listenMouseEnter(document.body)\n listenMouseLeave(document.body)\n enrichHyperViews(document.body, runAction)\n\n\n listenClick(async function(target: HyperView, action: string) {\n // console.log(\"CLICK\", target.id, action)\n runAction(target, action)\n })\n\n listenDblClick(async function(target: HyperView, action: string) {\n // console.log(\"DBLCLICK\", target.id, action)\n runAction(target, action)\n })\n\n listenKeydown(async function(target: HyperView, action: string) {\n // console.log(\"KEYDOWN\", target.id, action)\n runAction(target, action)\n })\n\n listenKeyup(async function(target: HyperView, action: string) {\n // console.log(\"KEYUP\", target.id, action)\n runAction(target, action)\n })\n\n listenFormSubmit(async function(target: HyperView, action: string, form: FormData) {\n // console.log(\"FORM\", target.id, action, form)\n runAction(target, action, form)\n })\n\n listenChange(async function(target: HyperView, action: string) {\n runAction(target, action)\n })\n\n function onStartedTyping(target: HyperView) {\n if (target.concurrency == \"Replace\") {\n target.cancelActiveRequest()\n }\n }\n\n listenInput(onStartedTyping, async function(target: HyperView, action: string) {\n runAction(target, action)\n })\n}\n\n\n\n\n\n\ndocument.addEventListener(\"DOMContentLoaded\", init)\n\n\n\n\nconst sock = new SocketConnection()\n// Should we connect to the socket or not?\nsock.connect()\nsock.addEventListener(\"update\", (ev: CustomEvent) => { handleUpdate(ev.detail) })\nsock.addEventListener(\"response\", (ev: CustomEvent) => handleResponse(ev.detail))\nsock.addEventListener(\"redirect\", (ev: CustomEvent) => handleRedirect(ev.detail))\n\n\n\n\n\ntype VNode = {\n // One of three value types are used:\n // - The tag name of the element\n // - \"text\" if text node\n // - \"comment\" if comment node\n type: string\n\n // An object whose key/value pairs are the attribute\n // name and value, respectively\n attributes: { [key: string]:string | undefined }\n\n // Is set to `true` if a node is an `svg`, which tells\n // Omdomdom to treat it, and its children, as such\n isSVGContext: Boolean\n\n // The content of a \"text\" or \"comment\" node\n content: string\n\n // An array of virtual node children\n children: Array\n\n // The real DOM node\n node: Node\n}\n\n\n\n\n\ndeclare global {\n interface Window {\n Hyperbole?: HyperboleAPI;\n }\n interface DocumentEventMap {\n \"hyp-load\": CustomEvent;\n \"hyp-mouseenter\": CustomEvent;\n \"hyp-mouseleave\": CustomEvent;\n }\n}\n\nexport interface HyperboleAPI {\n runAction(target: HTMLElement, action: string, form?: FormData): Promise\n action(con: string, ...params: any[]): string\n hyperView(viewId: ViewId): HyperView | undefined\n parseMetadata(input: string): Metadata\n socket: SocketConnection\n}\n\nwindow.Hyperbole =\n{\n runAction: runAction,\n parseMetadata: parseMetadata,\n action: function(con, ...params: any[]) {\n return params.reduce((str, param) => str + \" \" + JSON.stringify(param), con);\n },\n hyperView: function(viewId) {\n let element = document.getElementById(viewId)\n if (!isHyperView(element)) {\n console.error(\"Element id=\" + viewId + \" was not a HyperView\")\n return\n }\n return element\n },\n socket: sock\n}\n","\nimport { ViewId, Metadata } from './message'\n\n\n\nexport type Response = {\n meta: Metadata\n body: ResponseBody\n}\n\nexport type ResponseBody = string\n\nexport function parseResponse(res: ResponseBody): LiveUpdate {\n const parser = new DOMParser()\n const doc = parser.parseFromString(res, 'text/html')\n const css = doc.querySelector(\"style\")\n const content = doc.querySelector(\"div\")\n\n return {\n content: content,\n css: css\n }\n}\n\nexport type LiveUpdate = {\n content: HTMLElement | null\n css: HTMLStyleElement | null\n}\n\n\nexport class FetchError extends Error {\n viewId: ViewId\n body: string\n constructor(viewId: ViewId, msg: string, body: string) {\n super(msg)\n this.viewId = viewId\n this.name = \"Fetch Error\"\n this.body = body\n }\n}\n","\nexport function setQuery(query: string) {\n if (query != currentQuery()) {\n if (query != \"\") query = \"?\" + query\n let url = location.pathname + query\n // console.log(\"history.replaceState(\", url, \")\")\n window.history.replaceState({}, \"\", url)\n }\n}\n\nfunction currentQuery(): string {\n const query = window.location.search;\n return query.startsWith('?') ? query.substring(1) : query;\n}\n"],"names":["debounce","function_","wait","options","TypeError","RangeError","immediate","storedContext","storedArguments","timeoutId","timestamp","result","run","callContext","callArguments","undefined","apply","later","last","Date","now","setTimeout","debounced","arguments_","this","Object","getPrototypeOf","Error","callNow","defineProperty","get","clear","clearTimeout","flush","trigger","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","hasProperty","obj","prop","prototype","hasOwnProperty","call","forEach","items","fn","length","idx","insertBefore","parent","child","refNode","node","_slicedToArray","arr","i","Array","isArray","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","return","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","Types","DomProperties","createRecord","attrName","propName","type","_ref","_ref2","attr","property","_ref3","_ref4","Namespace","setProperty","element","style","toLowerCase","removeAttribute","parsed","parseInt","isNaN","indexOf","patch","template","vNode","rootNode","parentNode","contentChanged","content","replaceChild","assignVNode","removedAttributes","changedAttributes","attributes","oldValue","nextValue","_attrName","_oldValue","_nextValue","propertyRecord","removeAttributes","startsWith","setAttributeNS","setAttribute","setAttributes","updateAttributes","templateChildrenLength","children","vNodeChildrenLength","vNodeKeyMap","map","_","key","console","warn","keyIsValid","createKeyMap","nextChildren","templateChild","childNodes","keyedChild","vNodeChild","appendChild","childNodesLength","delta","removeChild","patchChildren","create","processedDOMString","isSVGContext","arguments","trim","replace","DOMParser","parseFromString","body","isRoot","tagName","numChildNodes","nodeType","isSVG","reduce","getBaseAttributes","attrValue","getAttribute","getPropertyValues","getAttributes","textContent","takeWhileMap","pred","lines","output","line","a","toMetadata","meta","cookies","filter","m","error","metaValue","query","pageTitle","events","metaValuesAll","parseRemoteEvent","actions","parseAction","parseMetadata","input","parseMeta","split","metas","find","match","data","breakNextSegment","detail","JSON","parse","viewId","action","ix","message","toSearch","form","params","URLSearchParams","append","globalRequestId","encodedParam","param","sanitizeParam","defaultAddress","window","location","protocol","host","pathname","ProtocolError","description","super","isHyperView","ele","runAction","dispatchContent","event","Event","bubbles","dispatchEvent","enrichHyperViews","querySelectorAll","concurrency","dataset","cancelActiveRequest","activeRequest","isCancelled","listenKeyEvent","cb","document","addEventListener","e","target","HTMLElement","source","datasetKey","preventDefault","nearestHyperViewTarget","listenBubblingEvent","closest","listenLoad","load","delay","onLoad","onload","CustomEvent","listenMouseEnter","onMouseEnter","onmouseenter","nearestAnyTarget","listenMouseLeave","onMouseLeave","onmouseleave","targetId","targetData","id","nearestTargetId","getElementById","rootStyles","PACKAGE","log","version","addedRulesIndex","Set","async","_timeout","classList","add","state","req","requestId","msg","reqId","decodeURI","cookie","search","actionMessage","sock","sendAction","handleUpdate","res","targetViewId","update","doc","css","querySelector","parseResponse","src","rules","sheet","cssRules","rule","item","has","cssText","insertRule","addCSS","old","atts","newTarget","runMetadata","applyCookies","focused","focus","val","checkbox","checked","fixInputs","substring","currentQuery","url","history","replaceState","setQuery","title","remoteEvent","view","Hyperbole","hyperView","innerText","createElement","HTMLFormElement","onsubmit","formData","FormData","onchange","startedTyping","debouncedCallback","oninput","addr","hasEverConnected","isConnected","reconnectDelay","queue","EventTarget","WebSocket","socket","connect","createSocket","onConnectError","ev","onSocketError","_event","removeEventListener","runQueue","onMessage","header","join","renderActionMessage","send","pop","command","rest","index","dropWhile","l","requireMeta","up","parseUpdate","parseRedirect","disconnect","close","remove","handleResponse","handleRedirect","red","href","con","str","stringify"],"sourceRoot":""} \ No newline at end of file +{ + "version": 3, + "sources": ["../node_modules/omdomdom/src/utilities/index.js", "../node_modules/omdomdom/src/parsers/index.js", "../node_modules/omdomdom/src/attributes/records.js", "../node_modules/omdomdom/src/attributes/set-property.js", "../node_modules/omdomdom/src/attributes/index.js", "../node_modules/omdomdom/src/children/index.js", "../node_modules/omdomdom/src/omdomdom.js", "../src/lib.ts", "../src/message.ts", "../src/action.ts", "../src/sockets.ts", "../node_modules/debounce/index.js", "../src/hyperview.ts", "../src/events.ts", "../src/browser.ts", "../src/response.ts", "../package.json", "../src/index.ts"], + "sourcesContent": ["const DATA_KEY_ATTRIBUTE = \"data-key\"\n\n/**\n * Checks if the object property exists.\n * @param {Object.} obj\n * @param {string} prop\n * @returns {boolean}\n */\nexport const hasProperty = (obj, prop) =>\n Object.prototype.hasOwnProperty.call(obj, prop)\n\n/**\n * Checks if a property in a keyMap is unique. if not, it's skipped.\n * @param {Object.} map\n * @param {string} key\n * @returns {boolean}\n */\nconst keyIsValid = (map, key) => {\n if (!key) return false\n\n if (hasProperty(map, key)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"[OmDomDom]: Children with duplicate keys detected. Children with duplicate keys will be skipped, resulting in dropped node references. Keys must be unique and non-indexed.\"\n )\n return false\n }\n\n return true\n}\n\n/**\n * lodash forEach, basically.\n * If `false` is explicitly returned, break the loop.\n * @param {[]} items\n * @param fn\n */\nexport const forEach = (items, fn) => {\n const length = items.length\n let idx = -1\n\n if (!length) return\n\n while (++idx < length) {\n if (fn(items[idx], idx) === false) break\n }\n}\n\n/**\n * Generates a map of a virtual node list.\n * @param {VirtualNode[]} children\n * @returns {Object.|undefined}\n */\nexport const createKeyMap = (children) => {\n const map = {}\n\n forEach(children, (child) => {\n const key = child.attributes[DATA_KEY_ATTRIBUTE]\n if (keyIsValid(map, key)) {\n map[key] = child\n }\n })\n\n // Cheap way to check if the map contains keys,\n // and if so, returns the map on the first iteration.\n for (const _ in map) {\n return map\n }\n}\n\nexport const insertBefore = (parent, child, refNode) => {\n return parent.node.insertBefore(child.node, refNode)\n}\n\n/**\n * Transfers properties from one virtual node to another.\n * @param {VirtualNode} template\n * @param {VirtualNode} vNode\n */\nexport const assignVNode = (template, vNode) => {\n for (let property in template) {\n vNode[property] = template[property]\n }\n}\n", "/**\n * Convert stringified HTML into valid HTML, stripping all extra spaces.\n * @param {string} htmlString\n */\nexport const toHTML = (htmlString) => {\n /**\n * Remove all extraneous whitespace:\n * - From the beginning + end of the document fragment\n * - If there's more than one space before a left tag bracket, replace them with one\n * - If there's more than one space before a right tag bracket, replace them with one\n */\n const processedDOMString = htmlString\n .trim()\n .replace(/\\s+\\s+/g, \">\")\n\n const parser = new DOMParser()\n const context = parser.parseFromString(processedDOMString, \"text/html\")\n\n return context.body\n}\n", "import { forEach } from \"../utilities\"\n\nconst Types = { STRING: \"string\", INT: \"number\", BOOL: \"boolean\" }\nconst DomProperties = {}\n\n/**\n * Creates a new record for DomProperties\n * @param {string} attrName\n * @param {string} propName\n * @param {string} type\n */\nconst createRecord = (attrName, propName, type) => ({\n attrName,\n propName,\n type,\n})\n\n// Set string records\nconst stringProps = [\n // Style is a special snowflake, and needs an extra property to set its text\n // value. This is less confusing and achieves the same result with one reflow,\n // compared to a new reflow for each Element.style[styleProperty] setter.\n [\"style\", \"cssText\"],\n [\"class\", \"className\"],\n]\nforEach(stringProps, ([attr, property]) => {\n DomProperties[attr] = createRecord(attr, property || attr, Types.STRING)\n})\n\n// Set boolean records\nconst booleanProps = [\n \"autofocus\",\n \"draggable\",\n \"hidden\",\n \"checked\",\n \"multiple\",\n \"muted\",\n \"selected\",\n]\nforEach(booleanProps, (attr) => {\n DomProperties[attr] = createRecord(attr, attr, Types.BOOL)\n})\n\n// Set Integer records\nconst integerProps = [[\"tabindex\", \"tabIndex\"]]\nforEach(integerProps, ([attr, property]) => {\n DomProperties[attr] = createRecord(attr, property, Types.INT)\n})\n\n/**\n * Attributes with these namespaces require `setAttributeNS`\n * @type {Object.}\n */\nconst Namespace = {\n xlink: {\n prefix: \"xlink:\",\n resource: \"http://www.w3.org/1999/xlink\",\n },\n xml: {\n prefix: \"xml:\",\n resource: \"http://www.w3.org/XML/1998/namespace\",\n },\n}\n\nexport { Types, Namespace, DomProperties }\n", "import { Types, DomProperties } from \"./records\"\n\n/**\n * Set a given attribute as a property, if it has a property equivalent\n * @param {HTMLElement} node\n * @param {string|number|boolean} type\n * @param {string} prop\n * @param {*} value\n */\nexport const setProperty = (element, type, prop, value) => {\n switch (type) {\n case Types.STRING: {\n if (prop === DomProperties.style.propName) {\n if (value === null) {\n element.style[prop] = \"\"\n } else {\n element.style[prop] = value\n }\n } else if (value === null) {\n element[prop] = \"\"\n } else {\n element[prop] = value\n }\n break\n }\n\n case Types.INT: {\n if (value === null) {\n const attr = prop.toLowerCase()\n // The attribute needs to be removed to reset the property,\n // otherwise the value coerced + reflected onto the attribute.\n element.removeAttribute(attr)\n } else if (value === \"0\") {\n element[prop] = 0\n } else if (value === \"-1\") {\n element[prop] = -1\n } else {\n const parsed = parseInt(value, 10)\n if (!isNaN(parsed)) {\n element[prop] = parsed\n }\n }\n break\n }\n\n case Types.BOOL: {\n if ([\"\", \"true\"].indexOf(value) < 0) {\n element[prop] = false\n } else {\n element[prop] = true\n }\n break\n }\n\n default:\n break\n }\n}\n", "import { hasProperty, forEach } from \"../utilities\"\nimport { Namespace, DomProperties, Types } from \"./records\"\nimport { setProperty } from \"./set-property\"\n\n/**\n * Removes stale attributes from the element.\n * @param {HTMLElement} vNode\n * @param {string[]} attributes\n */\nconst removeAttributes = (vNode, attributes) => {\n forEach(attributes, (attrName) => {\n if (hasProperty(DomProperties, attrName)) {\n const propertyRecord = DomProperties[attrName]\n setProperty(\n vNode.node,\n propertyRecord.type,\n propertyRecord.propName,\n null\n )\n } else {\n if (attrName in vNode.node) {\n setProperty(vNode.node, Types.STRING, attrName, null)\n }\n vNode.node.removeAttribute(attrName)\n }\n\n delete vNode.attributes[attrName]\n })\n}\n\n/**\n * Adds attributes to the element.\n * @param {VirtualNode} vNode\n * @param {Object.} attributes\n */\nconst setAttributes = (vNode, attributes) => {\n for (let attrName in attributes) {\n const value = attributes[attrName]\n vNode.attributes[attrName] = value\n\n if (hasProperty(DomProperties, attrName)) {\n const propertyRecord = DomProperties[attrName]\n setProperty(\n vNode.node,\n propertyRecord.type,\n propertyRecord.propName,\n value\n )\n continue\n }\n\n // Set namespaced properties using setAttributeNS\n if (attrName.startsWith(Namespace.xlink.prefix)) {\n vNode.node.setAttributeNS(Namespace.xlink.resource, attrName, value)\n continue\n }\n\n if (attrName.startsWith(Namespace.xml.prefix)) {\n vNode.node.setAttributeNS(Namespace.xml.resource, attrName, value)\n continue\n }\n\n if (attrName in vNode.node) {\n setProperty(vNode.node, Types.STRING, attrName, value)\n }\n vNode.node.setAttribute(attrName, value || \"\")\n }\n}\n\n/**\n * Checks property-based attributes. If the attribute exists,\n * then we should set its property value.\n * @param {HTMLElement} element\n * @param {Object.} attributes\n */\nconst getPropertyValues = (element, attributes) => {\n for (let attrName in DomProperties) {\n const propertyRecord = DomProperties[attrName]\n const propName = propertyRecord.propName\n const attrValue = element.getAttribute(attrName)\n\n if (attrName === DomProperties.style.attrName) {\n attributes[attrName] = element.style[propName]\n } else if (typeof attrValue === \"string\") {\n attributes[attrName] = attrValue\n }\n }\n}\n\n/**\n * Gets non-property attributes.\n * @param {HTMLElement} element\n * @returns {Object.}\n */\nconst getBaseAttributes = (element) => {\n return Array.prototype.reduce.call(\n element.attributes,\n (attributes, attrName) => {\n if (!hasProperty(DomProperties, attrName.name)) {\n attributes[attrName.name] = attrName.value\n }\n return attributes\n },\n {}\n )\n}\n\n/**\n * Gets all attributes.\n * @param {HTMLElement} element\n * @returns {Object.}\n */\nexport const getAttributes = (element) => {\n const attributes = getBaseAttributes(element)\n getPropertyValues(element, attributes)\n\n return attributes\n}\n\n/**\n * Reconcile attributes from vNode to template\n * @param {VirtualNode} template\n * @param {VirtualNode} vNode\n */\nexport const updateAttributes = (template, vNode) => {\n let removedAttributes = []\n let changedAttributes = {}\n\n // Get stale attributes\n for (let attrName in vNode.attributes) {\n const oldValue = vNode.attributes[attrName]\n const nextValue = template.attributes[attrName]\n if (oldValue === nextValue) continue\n\n if (typeof nextValue === \"undefined\") {\n removedAttributes.push(attrName)\n }\n }\n\n // Get changed or new attributes\n for (let attrName in template.attributes) {\n const oldValue = vNode.attributes[attrName]\n const nextValue = template.attributes[attrName]\n if (oldValue === nextValue) continue\n\n if (typeof nextValue !== \"undefined\") {\n changedAttributes[attrName] = nextValue\n }\n }\n\n // Add and remove attributes\n removeAttributes(vNode, removedAttributes)\n setAttributes(vNode, changedAttributes)\n}\n", "import { forEach, createKeyMap, insertBefore } from \"../utilities\"\n\nconst DATA_KEY_ATTRIBUTE = \"data-key\"\n\n/**\n * Both template and vNode have arrays of virtual nodes. Diff them.\n * @param {VirtualNode} template - new virtual node tree.\n * @param {VirtualNode} vNode - existing virtual node tree.\n */\nexport function patchChildren(template, vNode, patch) {\n const templateChildrenLength = template.children.length\n const vNodeChildrenLength = vNode.children.length\n\n if (!templateChildrenLength && !vNodeChildrenLength) return\n\n const vNodeKeyMap = createKeyMap(vNode.children)\n let nextChildren = Array(templateChildrenLength)\n\n if (vNodeKeyMap !== undefined) {\n forEach(template.children, (templateChild, idx) => {\n const childNodes = vNode.node.childNodes\n const key = templateChild.attributes[DATA_KEY_ATTRIBUTE]\n\n if (Object.prototype.hasOwnProperty.call(vNodeKeyMap, key)) {\n const keyedChild = vNodeKeyMap[key]\n\n if (Array.prototype.indexOf.call(childNodes, keyedChild.node) !== idx) {\n insertBefore(vNode, keyedChild, childNodes[idx])\n }\n\n nextChildren[idx] = keyedChild\n\n // Remove entry to prevent dupes\n delete vNodeKeyMap[key]\n patch(templateChild, nextChildren[idx])\n } else {\n insertBefore(vNode, templateChild, childNodes[idx])\n nextChildren[idx] = templateChild\n }\n })\n } else {\n forEach(template.children, (templateChild, idx) => {\n const vNodeChild = vNode.children[idx]\n\n if (typeof vNodeChild !== \"undefined\") {\n patch(templateChild, vNodeChild)\n nextChildren[idx] = vNodeChild\n } else {\n vNode.node.appendChild(templateChild.node)\n nextChildren[idx] = templateChild\n }\n })\n }\n\n vNode.children = nextChildren\n\n // Remove any real nodes that are left over from the diff\n let childNodesLength = vNode.node.childNodes.length\n let delta = childNodesLength - templateChildrenLength\n\n if (delta > 0) {\n while (delta > 0) {\n vNode.node.removeChild(vNode.node.childNodes[childNodesLength - 1])\n childNodesLength--\n delta--\n }\n }\n}\n", "import { forEach, assignVNode } from \"./utilities\"\nimport { toHTML } from \"./parsers\"\nimport { updateAttributes, getAttributes } from \"./attributes\"\nimport { patchChildren } from \"./children\"\n\n/**\n * Object representation of a DOM element.\n * @typedef VirtualNode\n * @type {Object}\n * @property {string} type - The type of node. E.g., tag name, \"comment\", or \"text\".\n * @property {Object.} attributes - List of attributes, if any.\n * @property {TextNode|CommentNode} content - Text or comment content, if any.\n * @property {VirtualNode[]} children - Child virtual nodes, if any.\n * @property {HTMLElement} node - The corresponding DOM element.\n * @property {boolean} isSVGContext\n */\n\n/**\n * Reconcile differences between two virtual DOM trees.\n * @param {VirtualNode} template - new virtual node tree.\n * @param {VirtualNode} vNode - existing virtual node tree.\n * @param {Node} rootNode - the HTML element containing the current node context\n */\nexport const patch = (template, vNode, rootNode) => {\n // This came happen if a null result is given for either\n // template or vNode. Impossible to compare - return.\n if (!template || !vNode) return\n\n rootNode = rootNode || vNode.node.parentNode\n const contentChanged = template.content && template.content !== vNode.content\n\n // If the type or content changed, replace the node completely\n if (template.type !== vNode.type || contentChanged) {\n rootNode.replaceChild(template.node, vNode.node)\n return assignVNode(template, vNode)\n }\n\n // Update attributes, if any\n updateAttributes(template, vNode)\n\n // Diff child nodes recursively\n patchChildren(template, vNode, patch)\n}\n\n/**\n * Renders a node into the given root context. This happens one time,\n * when a component is first rendered.\n * All subsequent renders are the result of reconciliation.\n * @param {VirtualNode} vDOM\n * @param {ShadowRoot|HTMLElement} root\n */\nexport const render = (vNode, root) => {\n root.appendChild(vNode.node)\n}\n\n/**\n * Creates a new virtual DOM from a root node.\n * @param {HTMLElement|ShadowRoot|HTMLBodyElement} node\n * @param {boolean} isSVGContext\n * @returns {VirtualNode}\n */\nexport const create = (node, isSVGContext = false) => {\n if (typeof node === \"string\") {\n node = toHTML(node)\n }\n\n const isRoot = node.tagName === \"BODY\"\n const childNodes = node.childNodes\n const numChildNodes = childNodes ? childNodes.length : 0\n\n // toHTML returns a `body` tag as its root node, but we want the first child only\n if (isRoot) {\n if (numChildNodes > 1) {\n throw new Error(\n \"[OmDomDom]: Your element should not have more than one root node.\"\n )\n } else if (numChildNodes === 0) {\n throw new Error(\n \"[OmDomDom]: Your element should have at least one root node.\"\n )\n } else {\n return create(childNodes[0])\n }\n }\n\n const type =\n node.nodeType === 3\n ? \"text\"\n : node.nodeType === 8\n ? \"comment\"\n : node.tagName.toLowerCase()\n const isSVG = isSVGContext || type === \"svg\"\n const attributes = node.nodeType === 1 ? getAttributes(node) : {}\n const content = numChildNodes > 0 ? null : node.textContent\n\n // Recursively build children\n const children = Array(numChildNodes)\n forEach(childNodes, (child, idx) => {\n children[idx] = create(child, isSVG)\n })\n\n return { type, attributes, children, content, node, isSVGContext: isSVG }\n}\n", "\n\nexport function takeWhileMap(pred: (val: T) => A | undefined, lines: T[]): A[] {\n var output = []\n for (var line of lines) {\n let a = pred(line)\n if (a)\n output.push(a)\n else\n break;\n }\n\n return output\n}\n\nexport function dropWhile(pred: (val: T) => A | undefined, lines: T[]): T[] {\n let index = 0;\n while (index < lines.length && pred(lines[index])) {\n index++;\n }\n return lines.slice(index);\n}\n\n", "\nimport { takeWhileMap, dropWhile } from \"./lib\"\n\n\n\nexport type Meta = { key: string, value: string }\nexport type ViewId = string\nexport type RequestId = number\nexport type EncodedAction = string\nexport type ViewState = string\n\ntype RemoteEvent = { name: string, detail: unknown }\n\n\nexport function renderMetas(meta: Meta[]): string {\n return meta.map(m => m.key + \": \" + m.value).join('\\n')\n}\n\nexport type Metadata = {\n cookies?: string[]\n // redirect?: string\n error?: string\n query?: string\n events?: RemoteEvent[]\n actions?: [ViewId, string][],\n pageTitle?: string\n}\n\n\nexport function toMetadata(meta: Meta[]): Metadata {\n\n return {\n cookies: meta.filter(m => m.key == \"Cookie\").map(m => m.value),\n // redirect: metaValue(\"Redirect\", meta),\n error: metaValue(\"Error\", meta),\n query: metaValue(\"Query\", meta),\n pageTitle: metaValue(\"PageTitle\", meta),\n events: metaValuesAll(\"Event\", meta).map(parseRemoteEvent),\n actions: metaValuesAll(\"Trigger\", meta).map(parseAction),\n }\n}\n\n// viewId: meta.find(m => m.key == \"VIEW-ID\")?.value,\n\nexport function parseMetadata(input: string): Metadata {\n let metas = takeWhileMap(parseMeta, input.trim().split(\"\\n\"))\n return toMetadata(metas)\n}\n\n\nexport function metaValue(key: string, metas: Meta[]): string | undefined {\n return metas.find(m => m.key == key)?.value\n}\n\nexport function metaValuesAll(key: string, metas: Meta[]): string[] {\n return metas.filter(m => m.key == key).map(m => m.value)\n}\n\nexport type SplitMessage = {\n command: string,\n metas: Meta[],\n rest: string[]\n}\n\n\nexport function splitMessage(message: string): SplitMessage {\n let lines = message.split(\"\\n\")\n let command: string = lines[0]\n let metas: Meta[] = takeWhileMap(parseMeta, lines.slice(1))\n // console.log(\"Split Metadata\", lines.length)\n // console.log(\" [0]\", lines[0])\n // console.log(\" [1]\", lines[1])\n let rest = dropWhile(l => l == \"\", lines.slice(metas.length + 1))\n\n return { command, metas, rest }\n}\n\nexport function parseMeta(line: string): Meta | undefined {\n let match = line.match(/^(\\w+)\\: (.*)$/)\n if (match) {\n return {\n key: match[1],\n value: match[2]\n }\n }\n}\n\n\nexport function parseRemoteEvent(input: string): RemoteEvent {\n let [name, data] = breakNextSegment(input)\n return {\n name,\n detail: JSON.parse(data)\n }\n}\n\nexport function parseAction(input: string): [ViewId, string] {\n let [viewId, action] = breakNextSegment(input)\n return [viewId, action]\n}\n\nfunction breakNextSegment(input: string): [string, string] {\n let ix = input.indexOf('|')\n if (ix === -1) {\n let err = new Error(\"Bad Encoding, Expected Segment\")\n err.message = input\n throw err\n }\n return [input.slice(0, ix), input.slice(ix + 1)]\n}\n\n", "\nimport { Meta, ViewId, RequestId, EncodedAction, ViewState } from \"./message\"\nimport * as message from \"./message\"\n\n\n\nexport type ActionMessage = {\n viewId: ViewId\n action: EncodedAction\n requestId: RequestId\n state?: ViewState\n meta: Meta[]\n form: URLSearchParams | undefined\n}\n\n\n\n\nexport function actionMessage(id: ViewId, action: EncodedAction, state: ViewState | undefined, reqId: RequestId, form?: FormData): ActionMessage {\n let meta: Meta[] = [\n { key: \"Cookie\", value: decodeURI(document.cookie) },\n { key: \"Query\", value: window.location.search }\n ]\n\n return { viewId: id, action, state, requestId: reqId, meta, form: toSearch(form) }\n}\n\nexport function toSearch(form?: FormData): URLSearchParams | undefined {\n if (!form) return undefined\n\n const params = new URLSearchParams()\n\n form.forEach((value, key) => {\n params.append(key, value as string)\n })\n\n return params\n}\n\nexport function renderActionMessage(msg: ActionMessage): string {\n let header = [\n \"|ACTION|\",\n \"ViewId: \" + msg.viewId,\n \"Action: \" + msg.action,\n ]\n\n\n if (msg.state) {\n header.push(\"State: \" + msg.state)\n }\n\n header.push(\"RequestId: \" + msg.requestId)\n\n return [\n header.join('\\n'),\n message.renderMetas(msg.meta),\n ].join('\\n') + renderForm(msg.form)\n}\n\n\nexport function renderForm(form: URLSearchParams | undefined): string {\n if (!form) return \"\"\n return \"\\n\\n\" + form\n}\n\nlet globalRequestId: RequestId = 0\n\nexport type Request = {\n requestId: RequestId\n isCancelled: boolean\n}\n\nexport function newRequest(): Request {\n let requestId = ++globalRequestId\n return { requestId, isCancelled: false }\n}\n\n\n\n// Sanitized Encoding ------------------------------------\n\nexport function encodedParam(action: string, param: string): string {\n return action + ' ' + sanitizeParam(param)\n}\n\nfunction sanitizeParam(param: string): string {\n if (param == \"\") {\n return \"|\"\n }\n\n return param.replace(/_/g, \"\\\\_\").replace(/\\s+/g, \"_\")\n}\n", "import { ActionMessage, renderActionMessage } from './action'\nimport { ResponseBody } from \"./response\"\nimport * as message from \"./message\"\nimport { ViewId, RequestId, EncodedAction, metaValue, Metadata } from \"./message\"\n\nconst protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';\nconst defaultAddress = `${protocol}//${window.location.host}${window.location.pathname}`\n\ninterface SocketConnectionEventMap {\n \"update\": CustomEvent;\n \"response\": CustomEvent;\n \"redirect\": CustomEvent;\n}\n\nexport class SocketConnection {\n socket: WebSocket\n\n hasEverConnected: boolean = false\n isConnected: boolean = false\n reconnectDelay: number = 0\n queue: ActionMessage[] = []\n events: EventTarget\n\n constructor(addr = defaultAddress) {\n this.events = new EventTarget()\n const sock = new WebSocket(addr)\n this.socket = sock\n }\n\n connect(addr = defaultAddress, createSocket = false) {\n const sock = createSocket ? new WebSocket(addr) : this.socket\n this.socket = sock\n\n function onConnectError(ev: Event) {\n console.error(\"Connect Error\", ev)\n }\n\n function onSocketError(ev: Event) {\n console.error(\"Socket Error\", ev)\n }\n\n\n // initial connection errors\n sock.addEventListener('error', onConnectError)\n\n sock.addEventListener('open', (_event) => {\n console.log(\"Websocket Connected\")\n\n if (this.hasEverConnected) {\n document.dispatchEvent(new Event(\"hyp-socket-reconnect\"))\n }\n\n this.isConnected = true\n this.hasEverConnected = true\n this.reconnectDelay = 1000\n sock.removeEventListener('error', onConnectError)\n sock.addEventListener('error', onSocketError)\n\n document.dispatchEvent(new Event(\"hyp-socket-connect\"))\n\n this.runQueue()\n })\n\n sock.addEventListener('close', _ => {\n console.log(\"CLOSE SOCKET\")\n if (this.isConnected) {\n document.dispatchEvent(new Event(\"hyp-socket-disconnect\"))\n }\n\n this.isConnected = false\n sock.removeEventListener('error', onSocketError)\n\n // attempt to reconnect in 1s\n if (this.hasEverConnected) {\n console.log(\"Reconnecting in \" + (this.reconnectDelay / 1000) + \"s\")\n setTimeout(() => this.connect(addr, true), this.reconnectDelay)\n }\n\n sock.removeEventListener('error', onSocketError)\n })\n\n sock.addEventListener('message', ev => this.onMessage(ev))\n }\n\n async sendAction(action: ActionMessage) {\n if (this.isConnected) {\n let msg = renderActionMessage(action)\n this.socket.send(msg)\n }\n else {\n this.queue.push(action)\n }\n }\n\n private runQueue() {\n // send all messages queued while disconnected \n let next: ActionMessage | undefined = this.queue.pop()\n if (next) {\n console.log(\"runQueue: \", next)\n this.sendAction(next)\n this.runQueue()\n }\n }\n\n\n // full responses will never be sent over!\n private onMessage(event: MessageEvent) {\n let { command, metas, rest } = message.splitMessage(event.data)\n // console.log(\"MESSAGE\", command, metas, rest)\n\n let requestId = parseInt(requireMeta(\"RequestId\"), 0)\n\n function requireMeta(key: string): string {\n let val = metaValue(key, metas)\n if (!val) throw new ProtocolError(\"Missing Required Metadata: \" + key, event.data)\n return val\n }\n\n function parseResponse(rest: string[]): Update {\n let viewId = requireMeta(\"ViewId\")\n let action = requireMeta(\"Action\")\n return {\n requestId,\n targetViewId: undefined,\n viewId,\n action,\n meta: message.toMetadata(metas),\n body: rest.join(\"\\n\"),\n }\n }\n\n function parseUpdate(rest: string[]): Update {\n let up = parseResponse(rest)\n // add the TargetViewId\n up.targetViewId = metaValue(\"TargetViewId\", metas)\n return up\n }\n\n function parseRedirect(rest: string[]): Redirect {\n let url = rest[0]\n return {\n requestId,\n meta: message.toMetadata(metas),\n url\n }\n }\n\n switch (command) {\n\n case \"|UPDATE|\":\n return this.dispatchEvent(new CustomEvent(\"update\", { detail: parseUpdate(rest) }))\n\n case \"|RESPONSE|\":\n return this.dispatchEvent(new CustomEvent(\"response\", { detail: parseResponse(rest) }))\n\n case \"|REDIRECT|\":\n return this.dispatchEvent(new CustomEvent(\"redirect\", { detail: parseRedirect(rest) }))\n }\n }\n\n\n // so what if they send remote events in the page? trigger, redirect, page title, etc...\n // we aren't connected yet on a page thing\n\n // private async waitMessage(reqId: RequestId, id: ViewId): Promise {\n // return new Promise((resolve, reject) => {\n // const onMessage = (event: MessageEvent) => {\n // let data: string = event.data\n // let lines = data.split(\"\\n\").slice(1) // drop the command line\n //\n // let parsed = splitMetadata(lines)\n // let metadata: Metadata = parsed.metadata\n //\n // if (!metadata.requestId) {\n // console.error(\"Missing RequestId!\", metadata, event.data)\n // return\n // }\n //\n // if (metadata.requestId != reqId) {\n // // skip, it's not us!\n // return\n // }\n //\n //\n // // We have found our message. Remove the listener\n // this.socket.removeEventListener('message', onMessage)\n //\n // // set the cookies. These happen automatically in http\n // metadata.cookies.forEach((cookie: string) => {\n // document.cookie = cookie\n // })\n //\n // if (metadata.error) {\n // reject(new FetchError(id, metadata.error, parsed.rest.join('\\n')))\n // return\n // }\n //\n // resolve(parsed)\n // }\n //\n // this.socket.addEventListener('message', onMessage)\n // this.socket.addEventListener('error', reject)\n // })\n // }\n\n addEventListener(e: K, cb: (ev: SocketConnectionEventMap[K]) => void) {\n this.events.addEventListener(e,\n // @ts-ignore: HACK\n cb\n )\n }\n\n dispatchEvent(e: SocketConnectionEventMap[K]) {\n this.events.dispatchEvent(e)\n }\n\n disconnect() {\n this.isConnected = false\n this.hasEverConnected = false\n this.socket.close()\n }\n}\n\n\nexport type Update = {\n requestId: RequestId\n meta: Metadata\n viewId: ViewId\n targetViewId?: ViewId\n action: EncodedAction\n body: ResponseBody\n}\n\nexport type Redirect = {\n requestId: RequestId\n meta: Metadata\n url: string\n}\n\nexport type MessageType = string\n\n\n// PARSING MESSAGE ---------------------------------------\n\nexport class ProtocolError extends Error {\n constructor(description: string, body: string) {\n super(description + \"\\n\" + body)\n this.name = \"ProtocolError\"\n }\n}\n", "export default function debounce(function_, wait = 100, options = {}) {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError(`Expected the first parameter to be a function, got \\`${typeof function_}\\`.`);\n\t}\n\n\tif (wait < 0) {\n\t\tthrow new RangeError('`wait` must not be negative.');\n\t}\n\n\tif (typeof options === 'boolean') {\n\t\tthrow new TypeError('The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.');\n\t}\n\n\tconst {immediate} = options;\n\n\tlet storedContext;\n\tlet storedArguments;\n\tlet timeoutId;\n\tlet timestamp;\n\tlet result;\n\n\tfunction run() {\n\t\tconst callContext = storedContext;\n\t\tconst callArguments = storedArguments;\n\t\tstoredContext = undefined;\n\t\tstoredArguments = undefined;\n\t\tresult = function_.apply(callContext, callArguments);\n\t\treturn result;\n\t}\n\n\tfunction later() {\n\t\tconst last = Date.now() - timestamp;\n\n\t\tif (last < wait && last >= 0) {\n\t\t\ttimeoutId = setTimeout(later, wait - last);\n\t\t} else {\n\t\t\ttimeoutId = undefined;\n\n\t\t\tif (!immediate) {\n\t\t\t\tresult = run();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst debounced = function (...arguments_) {\n\t\tif (\n\t\t\tstoredContext\n\t\t\t&& this !== storedContext\n\t\t\t&& Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext)\n\t\t) {\n\t\t\tthrow new Error('Debounced method called with different contexts of the same prototype.');\n\t\t}\n\n\t\tstoredContext = this; // eslint-disable-line unicorn/no-this-assignment\n\t\tstoredArguments = arguments_;\n\t\ttimestamp = Date.now();\n\n\t\tconst callNow = immediate && !timeoutId;\n\n\t\tif (!timeoutId) {\n\t\t\ttimeoutId = setTimeout(later, wait);\n\t\t}\n\n\t\tif (callNow) {\n\t\t\tresult = run();\n\t\t\treturn result;\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tObject.defineProperty(debounced, 'isPending', {\n\t\tget() {\n\t\t\treturn timeoutId !== undefined;\n\t\t},\n\t});\n\n\tdebounced.clear = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = undefined;\n\t\tstoredContext = undefined;\n\t\tstoredArguments = undefined;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tdebounced.trigger();\n\t};\n\n\tdebounced.trigger = () => {\n\t\tresult = run();\n\n\t\tdebounced.clear();\n\t};\n\n\treturn debounced;\n}\n", "import { type Request } from \"./action\";\n\nexport interface HyperView extends HTMLElement {\n runAction(action: string): Promise;\n activeRequest?: Request;\n cancelActiveRequest(): void;\n concurrency: ConcurrencyMode;\n _timeout?: number;\n}\n\nexport const isHyperView = (ele: any): ele is HyperView => {\n return ele?.runAction !== undefined;\n};\n\nexport type ConcurrencyMode = string;\n\nexport function dispatchContent(node: HTMLElement): void {\n let event = new Event(\"hyp-content\", { bubbles: true })\n node.dispatchEvent(event)\n}\n\nexport function enrichHyperViews(node: HTMLElement, runAction: (target: HyperView, action: string, form?: FormData) => Promise): void {\n // enrich all the hyperviews\n node.querySelectorAll(\"[id]\").forEach((element) => {\n element.runAction = function(action: string) {\n return runAction(element, action)\n }\n\n element.concurrency = element.dataset.concurrency || \"Drop\"\n\n element.cancelActiveRequest = function() {\n if (element.activeRequest && !element.activeRequest?.isCancelled) {\n element.activeRequest.isCancelled = true\n }\n }\n\n dispatchContent(node)\n })\n}\n", "\nimport debounce from 'debounce'\nimport { encodedParam } from './action'\nimport { HyperView, isHyperView } from './hyperview'\n\nexport type UrlFragment = string\n\nexport function listenKeydown(cb: (target: HyperView, action: string) => void): void {\n listenKeyEvent(\"keydown\", cb)\n}\n\nexport function listenKeyup(cb: (target: HyperView, action: string) => void): void {\n listenKeyEvent(\"keyup\", cb)\n}\n\nexport function listenKeyEvent(event: \"keyup\" | \"keydown\", cb: (target: HyperView, action: string) => void): void {\n\n document.addEventListener(event, function(e: KeyboardEvent) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenKeyEvent received event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let source = e.target\n\n let datasetKey = \"on\" + event + e.key\n let action = source.dataset[datasetKey]\n if (!action) return\n\n e.preventDefault()\n const target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: \", source)\n return\n }\n cb(target, action)\n })\n}\n\nexport function listenBubblingEvent(event: string, cb: (_target: HyperView, action: string) => void): void {\n document.addEventListener(event, function(e) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenBubblingEvent received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let el = e.target\n\n // clicks can fire on internal elements. Find the parent with a click handler\n let source = el.closest(\"[data-on\" + event + \"]\")\n if (!source) return\n\n e.preventDefault()\n let target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: \", source)\n return\n }\n const action = source.dataset[\"on\" + event]\n if (action === undefined) {\n console.error(\"Missing action: \", source, event)\n return\n }\n cb(target, action)\n })\n}\n\nexport function listenClick(cb: (target: HyperView, action: string) => void): void {\n listenBubblingEvent(\"click\", cb)\n}\n\nexport function listenDblClick(cb: (target: HyperView, action: string) => void): void {\n listenBubblingEvent(\"dblclick\", cb)\n}\n\n\nexport function listenTopLevel(cb: (target: HyperView, action: string) => void): void {\n document.addEventListener(\"hyp-load\", function(e: CustomEvent) {\n let action = e.detail.onLoad\n let target = e.detail.target\n cb(target, action)\n })\n\n document.addEventListener(\"hyp-mouseenter\", function(e: CustomEvent) {\n let action = e.detail.onMouseEnter\n let target = e.detail.target\n cb(target, action)\n })\n\n document.addEventListener(\"hyp-mouseleave\", function(e: CustomEvent) {\n let action = e.detail.onMouseLeave\n let target = e.detail.target\n cb(target, action)\n })\n}\n\n\nexport function listenLoad(node: HTMLElement): void {\n\n // it doesn't really matter WHO runs this except that it should have target\n node.querySelectorAll(\"[data-onload]\").forEach((load) => {\n let delay = parseInt(load.dataset.delay || \"\") || 0\n let onLoad = load.dataset.onload\n // console.log(\"load start\", load.dataset.onLoad)\n\n // load no longer exists!\n // we should clear the timeout or back out if the dom is replaced in the interem\n setTimeout(() => {\n let target = nearestHyperViewTarget(load)\n // console.log(\"load go\", load.dataset.onLoad)\n\n if (load.dataset.onload != onLoad) {\n // the onLoad no longer exists\n return\n }\n\n const event = new CustomEvent(\"hyp-load\", { bubbles: true, detail: { target, onLoad } })\n load.dispatchEvent(event)\n }, delay)\n })\n}\n\nexport function listenMouseEnter(node: HTMLElement): void {\n node.querySelectorAll(\"[data-onmouseenter]\").forEach((node) => {\n let onMouseEnter = node.dataset.onmouseenter\n\n let target = nearestAnyTarget(node)\n\n node.onmouseenter = () => {\n const event = new CustomEvent(\"hyp-mouseenter\", { bubbles: true, detail: { target, onMouseEnter } })\n node.dispatchEvent(event)\n }\n })\n}\n\nexport function listenMouseLeave(node: HTMLElement): void {\n node.querySelectorAll(\"[data-onmouseleave]\").forEach((node) => {\n let onMouseLeave = node.dataset.onmouseleave\n\n let target = nearestAnyTarget(node)\n\n node.onmouseleave = () => {\n const event = new CustomEvent(\"hyp-mouseleave\", { bubbles: true, detail: { target, onMouseLeave } })\n node.dispatchEvent(event)\n }\n })\n}\n\n\nexport function listenChange(cb: (target: HyperView, action: string) => void): void {\n document.addEventListener(\"change\", function(e) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenChange received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let el = e.target\n\n let source = el.closest(\"[data-onchange]\")\n\n if (!source) return\n e.preventDefault()\n\n if (source.value === null) {\n console.error(\"Missing input value:\", source)\n return\n }\n\n let target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: listenChange\")\n return\n }\n if (!source.dataset.onchange) {\n console.error(\"Missing onchange: \", source)\n return\n }\n let action = encodedParam(source.dataset.onchange, source.value)\n cb(target, action)\n })\n}\n\ninterface LiveInputElement extends HTMLInputElement {\n debouncedCallback?: Function;\n}\n\nexport function listenInput(startedTyping: (target: HyperView) => void, cb: (target: HyperView, action: string) => void): void {\n document.addEventListener(\"input\", function(e) {\n if (!(e.target instanceof HTMLElement)) {\n console.warn(\"listenInput received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let el = e.target\n const source = el.closest(\"[data-oninput]\")\n\n if (!source) return\n\n let delay = parseInt(source.dataset.delay || \"\") || 250\n if (delay < 250) {\n console.warn(\"Input delay < 250 can result in poor performance.\")\n }\n\n e.preventDefault()\n\n const target = nearestHyperViewTarget(source)\n if (!target) {\n console.error(\"Missing target: \", source)\n return\n }\n\n // I want to CANCEL the active request as soon as we start typing\n startedTyping(target)\n\n if (!source.debouncedCallback) {\n source.debouncedCallback = debounce(() => {\n if (!source.dataset.oninput) {\n console.error(\"Missing onInput: \", source)\n return\n }\n const action = encodedParam(source.dataset.oninput, source.value)\n cb(target, action)\n }, delay)\n }\n\n source.debouncedCallback()\n })\n}\n\n\n\nexport function listenFormSubmit(cb: (target: HyperView, action: string, form: FormData) => void): void {\n document.addEventListener(\"submit\", function(e) {\n if (!(e.target instanceof HTMLFormElement)) {\n console.warn(\"listenFormSubmit received an event with non HTMLElment as EventTarget: %o\", e)\n return\n }\n let form = e.target\n\n\n if (!form.dataset.onsubmit) {\n console.error(\"Missing onSubmit: \", form)\n return\n }\n\n e.preventDefault()\n\n let target = nearestHyperViewTarget(form)\n const formData = new FormData(form)\n if (!target) {\n console.error(\"Missing target: \", form)\n return\n }\n cb(target, form.dataset.onsubmit, formData)\n })\n}\n\nfunction nearestTargetId(node: HTMLElement): string | undefined {\n let targetData = node.closest(\"[data-target]\")\n return targetData?.dataset.target || node.closest(\"[id]\")?.id\n}\n\nfunction nearestHyperViewTarget(node: HTMLElement): HyperView | undefined {\n const target = nearestAnyTarget(node)\n\n if (!isHyperView(target)) {\n console.error(\"Non HyperView target: \", target)\n return\n }\n\n return target\n}\n\nfunction nearestAnyTarget(node: HTMLElement): HTMLElement | undefined {\n let targetId = nearestTargetId(node)\n let target = targetId && document.getElementById(targetId)\n\n if (!target) {\n console.error(\"Cannot find target: \", targetId, node)\n return\n }\n\n return target\n}\n", "\nexport function setQuery(query: string) {\n if (query != currentQuery()) {\n if (query != \"\") query = \"?\" + query\n let url = location.pathname + query\n // console.log(\"history.replaceState(\", url, \")\")\n window.history.replaceState({}, \"\", url)\n }\n}\n\nfunction currentQuery(): string {\n const query = window.location.search;\n return query.startsWith('?') ? query.substring(1) : query;\n}\n", "\nimport { ViewId, Metadata } from './message'\n\n\n\nexport type Response = {\n meta: Metadata\n body: ResponseBody\n}\n\nexport type ResponseBody = string\n\nexport function parseResponse(res: ResponseBody): LiveUpdate {\n const parser = new DOMParser()\n const doc = parser.parseFromString(res, 'text/html')\n const css = doc.querySelector(\"style\")\n const content = doc.querySelector(\"div\")\n\n return {\n content: content,\n css: css\n }\n}\n\nexport type LiveUpdate = {\n content: HTMLElement | null\n css: HTMLStyleElement | null\n}\n\n\nexport class FetchError extends Error {\n viewId: ViewId\n body: string\n constructor(viewId: ViewId, msg: string, body: string) {\n super(msg)\n this.viewId = viewId\n this.name = \"Fetch Error\"\n this.body = body\n }\n}\n", "{\n \"name\": \"web-ui\",\n \"version\": \"0.6.0\",\n \"description\": \"Development -----------\",\n \"main\": \"index.js\",\n \"directories\": {\n \"client\": \"client\"\n },\n \"scripts\": {\n \"build\": \"esbuild src/index.ts --bundle --minify --sourcemap --outfile=dist/hyperbole.js\",\n \"dev\": \"npm run build -- --watch\",\n \"check\": \"tsc --noEmit\"\n },\n \"author\": \"\",\n \"license\": \"ISC\",\n \"devDependencies\": {\n \"esbuild\": \"^0.28.0\",\n \"typescript\": \"^6.0.3\"\n },\n \"dependencies\": {\n \"omdomdom\": \"^0.3.2\",\n \"debounce\": \"^3.0.0\"\n }\n}\n", "import { patch, create } from \"omdomdom/lib/omdomdom.es.js\"\nimport { SocketConnection, Update, Redirect } from './sockets'\nimport { listenChange, listenClick, listenDblClick, listenFormSubmit, listenLoad, listenTopLevel, listenInput, listenKeydown, listenKeyup, listenMouseEnter, listenMouseLeave } from './events'\nimport { actionMessage, newRequest } from './action'\nimport { ViewId, Metadata, parseMetadata } from './message'\nimport { setQuery } from \"./browser\"\nimport { parseResponse, LiveUpdate } from './response'\nimport { dispatchContent, enrichHyperViews, HyperView, isHyperView } from \"./hyperview\"\n\nimport PACKAGE from '../package.json';\n\n\n// console.log(\"VERSION 2\", INIT_PAGE, INIT_STATE)\nconsole.log(\"Hyperbole \" + PACKAGE.version + \"b\")\n\n\nlet rootStyles: HTMLStyleElement;\nlet addedRulesIndex = new Set();\n\n\n\n\n\n// Run an action in a given HyperView\nasync function runAction(target: HyperView, action: string, form?: FormData) {\n\n if (target.activeRequest && !target.activeRequest?.isCancelled) {\n // Active Request!\n if (target.concurrency == \"Drop\") {\n console.warn(\"Drop action overlapping with active request (\" + target.activeRequest + \")\", action)\n return\n }\n }\n\n target._timeout = window.setTimeout(() => {\n // add loading after 100ms, not right away\n // if it runs shorter than that we probably don't want to show the user any loading feedback\n target.classList.add(\"hyp-loading\")\n }, 100)\n\n let state = target.dataset.state\n\n let req = newRequest()\n let msg = actionMessage(target.id, action, state, req.requestId, form)\n\n // Set the requestId\n target.activeRequest = req\n\n sock.sendAction(msg)\n}\n\n\n// TODO: redirect concurrency\nfunction handleRedirect(red: Redirect) {\n console.log(\"REDIRECT\", red)\n\n // the other metdata doesn't apply, they are all specific to the page\n applyCookies(red.meta.cookies ?? [])\n\n window.location.href = red.url\n}\n\n// in-process update\nfunction handleResponse(res: Update) {\n // console.log(\"Handle Response\", res)\n let target = handleUpdate(res)\n if (!target) return\n\n // clean up the request\n delete target.activeRequest\n clearTimeout(target._timeout)\n target.classList.remove(\"hyp-loading\")\n}\n\nfunction handleUpdate(res: Update): HyperView | undefined {\n // console.log(\"|UPDATE|\", res)\n\n let targetViewId = res.targetViewId || res.viewId\n let target = document.getElementById(targetViewId)\n\n if (!isHyperView(target)) {\n console.error(\"Missing Update HyperView Target: \", targetViewId, res)\n return\n }\n\n if (target.activeRequest?.requestId && res.requestId < target.activeRequest.requestId) {\n // this should only happen on Replace, since other requests should be dropped\n // but it's safe to assume we never want to apply an old requestId\n console.warn(\"Ignore Stale Action (\" + res.requestId + \") vs (\" + target.activeRequest.requestId + \"): \" + res.action)\n return target\n }\n else if (target.activeRequest?.isCancelled) {\n console.warn(\"Cancelled request\", target.activeRequest?.requestId)\n delete target.activeRequest\n return target\n }\n\n let update: LiveUpdate = parseResponse(res.body)\n\n if (!update.content) {\n console.error(\"Empty Response!\", res.body)\n return target\n }\n\n // First, update the stylesheet\n addCSS(update.css)\n\n\n // Patch the node\n const old: VNode = create(target)\n let next: VNode = create(update.content)\n let atts = next.attributes\n\n if (!res.meta.error && atts[\"id\"] != target.id) {\n console.error(\"Mismatched ViewId in update - \", atts[\"id\"], \" target:\", target.id)\n return\n }\n\n let state = atts[\"data-state\"]\n next.attributes = old.attributes\n\n\n patch(next, old)\n\n\n // Emit relevant events\n let newTarget = document.getElementById(target.id)\n\n if (!newTarget) {\n console.warn(\"Target Missing: \", target.id)\n return target\n }\n\n dispatchContent(newTarget)\n\n // re-add state attribute \n if (state === undefined || state == \"()\")\n delete newTarget.dataset.state\n else\n newTarget.dataset.state = state\n\n // execute the metadata, anything that doesn't interrupt the dom update\n runMetadata(res.meta, newTarget)\n applyCookies(res.meta.cookies ?? [])\n\n // now way for these to bubble)\n listenLoad(newTarget)\n listenMouseEnter(newTarget)\n listenMouseLeave(newTarget)\n fixInputs(newTarget)\n enrichHyperViews(newTarget, runAction)\n\n return target\n}\n// catch (err) {\n// console.error(\"Caught Error in HyperView (\" + target.id + \"):\\n\", err)\n//\n// // Hyperbole catches handler errors, and the server controls what to display to the user on an error\n// // but if you manage to crash your parent server process somehow, the response may be empty\n// target.innerHTML = err.body || \"
Hyperbole Internal Error
\"\n// }\n\nfunction applyCookies(cookies: string[]) {\n cookies.forEach((cookie: string) => {\n console.log(\"SetCookie: \", cookie)\n document.cookie = cookie\n })\n}\n\nfunction runMetadata(meta: Metadata, target?: HTMLElement) {\n if (meta.query != null) {\n setQuery(meta.query)\n }\n\n if (meta.pageTitle != null) {\n document.title = meta.pageTitle\n }\n\n meta.events?.forEach((remoteEvent) => {\n setTimeout(() => {\n let event = new CustomEvent(remoteEvent.name, { bubbles: true, detail: remoteEvent.detail })\n let eventTarget = target || document\n eventTarget.dispatchEvent(event)\n }, 10)\n })\n\n meta.actions?.forEach(([viewId, action]) => {\n setTimeout(() => {\n let view = window.Hyperbole?.hyperView(viewId)\n if (view) {\n runAction(view, action)\n }\n }, 10)\n })\n}\n\n\nfunction fixInputs(target: HTMLElement) {\n let focused = target.querySelector(\"[autofocus]\")\n if (focused?.focus) {\n focused.focus()\n }\n\n target.querySelectorAll(\"input[value]\").forEach((input) => {\n let val = input.getAttribute(\"value\")\n if (val !== null) {\n input.value = val\n }\n })\n\n target.querySelectorAll(\"input[type=checkbox]\").forEach((checkbox) => {\n let checked = checkbox.dataset.checked == \"True\"\n checkbox.checked = checked\n })\n}\n\nfunction addCSS(src: HTMLStyleElement | null) {\n if (!src) return;\n const rules = src.sheet?.cssRules\n if (!rules) return;\n for (let i = 0; i < rules.length; i++) {\n const rule = rules.item(i)\n if (rule && addedRulesIndex.has(rule.cssText) == false && rootStyles.sheet) {\n rootStyles.sheet.insertRule(rule.cssText);\n addedRulesIndex.add(rule.cssText);\n }\n }\n}\n\n\n\n\nfunction init() {\n // metadata attached to initial page loads need to be executed\n let meta = parseMetadata(document.getElementById(\"hyp.metadata\")?.innerText ?? \"\")\n // runMetadataImmediate(meta)\n runMetadata(meta)\n\n const style = document.body.querySelector('style')\n\n if (style !== null) {\n rootStyles = style\n } else {\n console.warn(\"rootStyles missing from page, creating...\")\n rootStyles = document.createElement(\"style\")\n rootStyles.type = \"text/css\"\n document.body.appendChild(rootStyles)\n }\n\n listenTopLevel(async function(target: HyperView, action: string) {\n runAction(target, action)\n })\n\n listenLoad(document.body)\n listenMouseEnter(document.body)\n listenMouseLeave(document.body)\n enrichHyperViews(document.body, runAction)\n\n\n listenClick(async function(target: HyperView, action: string) {\n // console.log(\"CLICK\", target.id, action)\n runAction(target, action)\n })\n\n listenDblClick(async function(target: HyperView, action: string) {\n // console.log(\"DBLCLICK\", target.id, action)\n runAction(target, action)\n })\n\n listenKeydown(async function(target: HyperView, action: string) {\n // console.log(\"KEYDOWN\", target.id, action)\n runAction(target, action)\n })\n\n listenKeyup(async function(target: HyperView, action: string) {\n // console.log(\"KEYUP\", target.id, action)\n runAction(target, action)\n })\n\n listenFormSubmit(async function(target: HyperView, action: string, form: FormData) {\n // console.log(\"FORM\", target.id, action, form)\n runAction(target, action, form)\n })\n\n listenChange(async function(target: HyperView, action: string) {\n runAction(target, action)\n })\n\n function onStartedTyping(target: HyperView) {\n if (target.concurrency == \"Replace\") {\n target.cancelActiveRequest()\n }\n }\n\n listenInput(onStartedTyping, async function(target: HyperView, action: string) {\n runAction(target, action)\n })\n}\n\n\n\n\n\n\ndocument.addEventListener(\"DOMContentLoaded\", init)\n\n\n\n\nconst sock = new SocketConnection()\n// Should we connect to the socket or not?\nsock.connect()\nsock.addEventListener(\"update\", (ev: CustomEvent) => { handleUpdate(ev.detail) })\nsock.addEventListener(\"response\", (ev: CustomEvent) => handleResponse(ev.detail))\nsock.addEventListener(\"redirect\", (ev: CustomEvent) => handleRedirect(ev.detail))\n\n\n\n\n\ntype VNode = {\n // One of three value types are used:\n // - The tag name of the element\n // - \"text\" if text node\n // - \"comment\" if comment node\n type: string\n\n // An object whose key/value pairs are the attribute\n // name and value, respectively\n attributes: { [key: string]:string | undefined }\n\n // Is set to `true` if a node is an `svg`, which tells\n // Omdomdom to treat it, and its children, as such\n isSVGContext: boolean\n\n // The content of a \"text\" or \"comment\" node\n content: string\n\n // An array of virtual node children\n children: Array\n\n // The real DOM node\n node: Node\n}\n\n\n\n\n\ndeclare global {\n interface Window {\n Hyperbole?: HyperboleAPI;\n }\n interface DocumentEventMap {\n \"hyp-load\": CustomEvent;\n \"hyp-mouseenter\": CustomEvent;\n \"hyp-mouseleave\": CustomEvent;\n }\n}\n\nexport interface HyperboleAPI {\n runAction(target: HTMLElement, action: string, form?: FormData): Promise\n action(con: string, ...params: any[]): string\n hyperView(viewId: ViewId): HyperView | undefined\n parseMetadata(input: string): Metadata\n socket: SocketConnection\n}\n\nwindow.Hyperbole =\n{\n runAction: runAction,\n parseMetadata: parseMetadata,\n action: function(con, ...params: any[]) {\n return params.reduce((str, param) => str + \" \" + JSON.stringify(param), con);\n },\n hyperView: function(viewId) {\n let element = document.getElementById(viewId)\n if (!isHyperView(element)) {\n console.error(\"Element id=\" + viewId + \" was not a HyperView\")\n return\n }\n return element\n },\n socket: sock\n}\n"], + "mappings": "mBAAA,IAAMA,GAAqB,WAQdC,EAAc,SAACC,EAAKC,EAAI,CAAA,OACnCC,OAAOC,UAAUC,eAAeC,KAAKL,EAAKC,CAAI,CAAC,EAQ3CK,GAAa,SAACC,EAAKC,EAAQ,CAC/B,OAAKA,EAEDT,EAAYQ,EAAKC,CAAG,GAEtBC,QAAQC,KACN,6KAA6K,EAExK,IAGF,GAVU,EAWnB,EAQaC,EAAU,SAACC,EAAOC,EAAO,CACpC,IAAMC,EAASF,EAAME,OACjBC,EAAM,GAEV,GAAKD,EAEL,KAAO,EAAEC,EAAMD,GACTD,EAAGD,EAAMG,CAAG,EAAGA,CAAG,IAAM,IAA5B,CAEJ,EAOaC,GAAe,SAACC,EAAa,CACxC,IAAMV,EAAM,CAAA,EAEZI,EAAQM,EAAU,SAACC,EAAU,CAC3B,IAAMV,EAAMU,EAAMC,WAAWrB,EAAkB,EAC3CQ,GAAWC,EAAKC,CAAG,IACrBD,EAAIC,CAAG,EAAIU,EAEf,CAAC,EAID,QAAWE,KAAKb,EACd,OAAOA,CAEX,EAEac,EAAe,SAACC,EAAQJ,EAAOK,EAAY,CACtD,OAAOD,EAAOE,KAAKH,aAAaH,EAAMM,KAAMD,CAAO,CACrD,EAOaE,GAAc,SAACC,EAAUC,EAAU,CAC9C,QAASC,KAAYF,EACnBC,EAAMC,CAAQ,EAAIF,EAASE,CAAQ,CAEvC,EC/EaC,GAAS,SAACC,EAAe,CAOpC,IAAMC,EAAqBD,EACxBE,KAAI,EACJC,QAAQ,QAAS,GAAG,EACpBA,QAAQ,QAAS,GAAG,EAEjBC,EAAS,IAAIC,UACbC,EAAUF,EAAOG,gBAAgBN,EAAoB,WAAW,EAEtE,OAAOK,EAAQE,IACjB;qFClBA,IAAMC,EAAQ,CAAEC,OA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,EACX,cAAeoD,EACf,OAAQ,SAASa,KAAQC,EAAe,CACtC,OAAOA,EAAO,OAAO,CAACC,EAAKC,IAAUD,EAAM,IAAM,KAAK,UAAUC,CAAK,EAAGH,CAAG,CAC7E,EACA,UAAW,SAASzB,EAAQ,CAC1B,IAAI6B,EAAU,SAAS,eAAe7B,CAAM,EAC5C,GAAI,CAACvB,EAAYoD,CAAO,EAAG,CACzB,QAAQ,MAAM,cAAgB7B,EAAS,sBAAsB,EAC7D,MACF,CACA,OAAO6B,CACT,EACA,OAAQ5D,CACV", + "names": ["DATA_KEY_ATTRIBUTE", "hasProperty", "obj", "prop", "Object", "prototype", "hasOwnProperty", "call", "keyIsValid", "map", "key", "console", "warn", "forEach", "items", "fn", "length", "idx", "createKeyMap", "children", "child", "attributes", "_", "insertBefore", "parent", "refNode", "node", "assignVNode", "template", "vNode", "property", "toHTML", "htmlString", "processedDOMString", "trim", "replace", "parser", "DOMParser", "context", "parseFromString", "body", "Types", "STRING", "INT", "BOOL", "DomProperties", "createRecord", "attrName", "propName", "type", "stringProps", "_ref", "_ref2", "_slicedToArray", "attr", "booleanProps", "integerProps", "_ref3", "_ref4", "Namespace", "xlink", "prefix", "resource", "xml", "setProperty", "element", "value", "style", "toLowerCase", "removeAttribute", "parsed", "parseInt", "isNaN", "indexOf", "removeAttributes", "propertyRecord", "setAttributes", "startsWith", "setAttributeNS", "setAttribute", "getPropertyValues", "attrValue", "getAttribute", "getBaseAttributes", "Array", "reduce", "name", "getAttributes", "updateAttributes", "removedAttributes", "changedAttributes", "oldValue", "nextValue", "push", "patchChildren", "patch", "templateChildrenLength", "vNodeChildrenLength", "vNodeKeyMap", "nextChildren", "undefined", "templateChild", "childNodes", "keyedChild", "vNodeChild", "appendChild", "childNodesLength", "delta", "removeChild", "rootNode", "parentNode", "contentChanged", "content", "replaceChild", "create", "node", "isSVGContext", "arguments", "length", "undefined", "toHTML", "isRoot", "tagName", "childNodes", "numChildNodes", "Error", "type", "nodeType", "toLowerCase", "isSVG", "attributes", "getAttributes", "content", "textContent", "children", "Array", "forEach", "child", "idx", "takeWhileMap", "pred", "lines", "output", "line", "a", "dropWhile", "index", "renderMetas", "meta", "m", "toMetadata", "metaValue", "metaValuesAll", "parseRemoteEvent", "parseAction", "parseMetadata", "input", "metas", "takeWhileMap", "parseMeta", "key", "splitMessage", "message", "lines", "command", "rest", "dropWhile", "l", "line", "match", "name", "data", "breakNextSegment", "viewId", "action", "ix", "err", "actionMessage", "id", "action", "state", "reqId", "form", "meta", "toSearch", "params", "value", "key", "renderActionMessage", "msg", "header", "renderMetas", "renderForm", "globalRequestId", "newRequest", "encodedParam", "param", "sanitizeParam", "protocol", "defaultAddress", "SocketConnection", "addr", "sock", "createSocket", "onConnectError", "ev", "onSocketError", "_event", "_", "action", "msg", "renderActionMessage", "next", "event", "command", "metas", "rest", "splitMessage", "requestId", "requireMeta", "key", "val", "metaValue", "ProtocolError", "parseResponse", "viewId", "toMetadata", "parseUpdate", "up", "parseRedirect", "url", "cb", "description", "body", "debounce", "function_", "wait", "options", "immediate", "storedContext", "storedArguments", "timeoutId", "timestamp", "result", "run", "callContext", "callArguments", "later", "last", "debounced", "arguments_", "callNow", "isHyperView", "ele", "dispatchContent", "node", "event", "enrichHyperViews", "runAction", "element", "action", "listenKeydown", "cb", "listenKeyEvent", "listenKeyup", "event", "e", "source", "datasetKey", "action", "target", "nearestHyperViewTarget", "listenBubblingEvent", "listenClick", "listenDblClick", "listenTopLevel", "listenLoad", "node", "load", "delay", "onLoad", "listenMouseEnter", "onMouseEnter", "nearestAnyTarget", "listenMouseLeave", "onMouseLeave", "listenChange", "encodedParam", "listenInput", "startedTyping", "debounce", "listenFormSubmit", "form", "formData", "nearestTargetId", "isHyperView", "targetId", "setQuery", "query", "currentQuery", "url", "parseResponse", "res", "doc", "css", "package_default", "package_default", "rootStyles", "addedRulesIndex", "runAction", "target", "action", "form", "state", "req", "newRequest", "msg", "actionMessage", "sock", "handleRedirect", "red", "applyCookies", "handleResponse", "res", "handleUpdate", "targetViewId", "isHyperView", "update", "parseResponse", "addCSS", "old", "create", "next", "atts", "patch", "newTarget", "dispatchContent", "runMetadata", "listenLoad", "listenMouseEnter", "listenMouseLeave", "fixInputs", "enrichHyperViews", "cookies", "cookie", "meta", "setQuery", "remoteEvent", "event", "viewId", "view", "focused", "input", "val", "checkbox", "checked", "src", "rules", "i", "rule", "init", "parseMetadata", "style", "listenTopLevel", "listenClick", "listenDblClick", "listenKeydown", "listenKeyup", "listenFormSubmit", "listenChange", "onStartedTyping", "listenInput", "SocketConnection", "ev", "con", "params", "str", "param", "element"] +} diff --git a/client/dist/hyperview.d.ts b/client/dist/hyperview.d.ts deleted file mode 100644 index 457b112..0000000 --- a/client/dist/hyperview.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type Request } from "./action"; -export interface HyperView extends HTMLElement { - runAction(action: string): Promise; - activeRequest?: Request; - cancelActiveRequest(): void; - concurrency: ConcurrencyMode; - _timeout?: number; -} -export declare const isHyperView: (ele: any) => ele is HyperView; -export type ConcurrencyMode = string; -export declare function dispatchContent(node: HTMLElement): void; -export declare function enrichHyperViews(node: HTMLElement, runAction: (target: HyperView, action: string, form?: FormData) => Promise): void; diff --git a/client/dist/index.d.ts b/client/dist/index.d.ts deleted file mode 100644 index 83d085c..0000000 --- a/client/dist/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { SocketConnection } from './sockets'; -import { ViewId, Metadata } from './message'; -import { HyperView } from "./hyperview"; -declare global { - interface Window { - Hyperbole?: HyperboleAPI; - } - interface DocumentEventMap { - "hyp-load": CustomEvent; - "hyp-mouseenter": CustomEvent; - "hyp-mouseleave": CustomEvent; - } -} -export interface HyperboleAPI { - runAction(target: HTMLElement, action: string, form?: FormData): Promise; - action(con: string, ...params: any[]): string; - hyperView(viewId: ViewId): HyperView | undefined; - parseMetadata(input: string): Metadata; - socket: SocketConnection; -} diff --git a/client/dist/lib.d.ts b/client/dist/lib.d.ts deleted file mode 100644 index c093ebd..0000000 --- a/client/dist/lib.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function takeWhileMap(pred: (val: T) => A | undefined, lines: T[]): A[]; -export declare function dropWhile(pred: (val: T) => A | undefined, lines: T[]): T[]; diff --git a/client/dist/message.d.ts b/client/dist/message.d.ts deleted file mode 100644 index 98492ea..0000000 --- a/client/dist/message.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export type Meta = { - key: string; - value: string; -}; -export type ViewId = string; -export type RequestId = number; -export type EncodedAction = string; -export type ViewState = string; -type RemoteEvent = { - name: string; - detail: unknown; -}; -export declare function renderMetas(meta: Meta[]): string; -export type Metadata = { - cookies?: string[]; - error?: string; - query?: string; - events?: RemoteEvent[]; - actions?: [ViewId, string][]; - pageTitle?: string; -}; -export declare function toMetadata(meta: Meta[]): Metadata; -export declare function parseMetadata(input: string): Metadata; -export declare function metaValue(key: string, metas: Meta[]): string | undefined; -export declare function metaValuesAll(key: string, metas: Meta[]): string[]; -export type SplitMessage = { - command: string; - metas: Meta[]; - rest: string[]; -}; -export declare function splitMessage(message: string): SplitMessage; -export declare function parseMeta(line: string): Meta | undefined; -export declare function parseRemoteEvent(input: string): RemoteEvent; -export declare function parseAction(input: string): [ViewId, string]; -export {}; diff --git a/client/dist/response.d.ts b/client/dist/response.d.ts deleted file mode 100644 index 0af50e4..0000000 --- a/client/dist/response.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ViewId, Metadata } from './message'; -export type Response = { - meta: Metadata; - body: ResponseBody; -}; -export type ResponseBody = string; -export declare function parseResponse(res: ResponseBody): LiveUpdate; -export type LiveUpdate = { - content: HTMLElement | null; - css: HTMLStyleElement | null; -}; -export declare class FetchError extends Error { - viewId: ViewId; - body: string; - constructor(viewId: ViewId, msg: string, body: string); -} diff --git a/client/dist/sockets.d.ts b/client/dist/sockets.d.ts deleted file mode 100644 index b9f727b..0000000 --- a/client/dist/sockets.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ActionMessage } from './action'; -import { ResponseBody } from "./response"; -import { ViewId, RequestId, EncodedAction, Metadata } from "./message"; -interface SocketConnectionEventMap { - "update": CustomEvent; - "response": CustomEvent; - "redirect": CustomEvent; -} -export declare class SocketConnection { - socket: WebSocket; - hasEverConnected: Boolean; - isConnected: Boolean; - reconnectDelay: number; - queue: ActionMessage[]; - events: EventTarget; - constructor(addr?: string); - connect(addr?: string, createSocket?: boolean): void; - sendAction(action: ActionMessage): Promise; - private runQueue; - private onMessage; - addEventListener(e: K, cb: (ev: SocketConnectionEventMap[K]) => void): void; - dispatchEvent(e: SocketConnectionEventMap[K]): void; - disconnect(): void; -} -export type Update = { - requestId: RequestId; - meta: Metadata; - viewId: ViewId; - targetViewId?: ViewId; - action: EncodedAction; - body: ResponseBody; -}; -export type Redirect = { - requestId: RequestId; - meta: Metadata; - url: string; -}; -export type MessageType = string; -export declare class ProtocolError extends Error { - constructor(description: string, body: string); -} -export {}; diff --git a/client/package-lock.json b/client/package-lock.json index 939d1db..cdf02d4 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,2289 +1,540 @@ { "name": "web-ui", - "version": "1.0.0", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "web-ui", - "version": "1.0.0", + "version": "0.6.0", "license": "ISC", "dependencies": { - "debounce": "^2.2.0", + "debounce": "^3.0.0", "omdomdom": "^0.3.2" }, "devDependencies": { - "ts-loader": "^9.4.1", - "typescript": "^4.8.3", - "uglify": "^0.1.5", - "webpack": "^5.88.2", - "webpack-cli": "^4.10.0" + "esbuild": "^0.28.0", + "typescript": "^6.0.3" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@types/eslint": { - "version": "8.44.6", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.6.tgz", - "integrity": "sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.6.tgz", - "integrity": "sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", - "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.8.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.8.tgz", - "integrity": "sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==", - "dev": true, - "dependencies": { - "undici-types": "~5.25.1" - } - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", - "integrity": "sha512-LjmC2dNpdn2L4UzyoaIr11ELYoLn37ZFy9zObrQFHsSuOepeUEMKnM8w5KL4Tnrp2gy88rRuQt6Ky8Bjml+Baw==", - "dev": true, - "dependencies": { - "underscore": "~1.7.0", - "underscore.string": "~2.4.0" - } - }, - "node_modules/argparse/node_modules/underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==", - "dev": true - }, - "node_modules/argparse/node_modules/underscore.string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", - "integrity": "sha512-yxkabuCaIBnzfIvX3kBxQqCs0ar/bfJwDnFEHJUm/ZrRVhT3IItdRF5cZjARLzEnyQYtIUhsZ2LG2j3HidFOFQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/async": { - "version": "0.1.22", - "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", - "integrity": "sha512-2tEzliJmf5fHNafNwQLJXUasGzQCVctvsNkXmnlELHwypU0p08/rHohYvkqKIjyXpx+0rkrYv6QbhJ+UF4QkBg==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001554", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001554.tgz", - "integrity": "sha512-A2E3U//MBwbJVzebddm1YfNp7Nud5Ip+IPn4BozBmn4KqVX7AvluoIDFWjsv5OkGnKUXQVmMSoMKLa3ScCblcQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clean-css": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-1.0.12.tgz", - "integrity": "sha512-4nn2xFYvzpc/IeL7KEttufRcLRA2TbHsCUzsUgX9uBT/C3D4QYvBX5QauQti5zJTKC3+B3Y2PmvvQiQkEilagA==", - "dev": true, - "dependencies": { - "commander": "1.3.x" - }, - "bin": { - "cleancss": "bin/cleancss" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/clean-css/node_modules/commander": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.3.2.tgz", - "integrity": "sha512-uoVVA5dchmxZeTMv2Qsd0vhn/RebJYsWo4all1qtrUL3BBhQFn4AQDF4PL+ZvOeK7gczXKEZaSCyMDMwFBlpBg==", - "dev": true, - "dependencies": { - "keypress": "0.1.x" - }, - "engines": { - "node": ">= 0.6.x" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/coffee-script": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", - "integrity": "sha512-QjQ1T4BqyHv19k6XSfdhy/QLlIOhywz0ekBUCa9h71zYMJlfDTGan/Z1JXzYkZ6v8R+GhvL/p4FZPbPW8WNXlg==", - "deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)", - "dev": true, - "bin": { - "cake": "bin/cake", - "coffee": "bin/coffee" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "dev": true, - "engines": { - "node": ">=16" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/dateformat": { - "version": "1.0.2-1.2.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", - "integrity": "sha512-AXvW8g7tO4ilk5HgOWeDmPi/ZPaCnMJ+9Cg1I3p19w6mcvAAXBuuGEXAxybC+Djj1PSZUiHUcyoYu7WneCX8gQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/debounce": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-2.2.0.tgz", - "integrity": "sha512-Xks6RUDLZFdz8LIdR6q0MTH44k7FikOmnh5xkSjMig6ch45afc8sjTjRQf3P6ax8dMgcQrYO/AR2RGWURrruqw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.566", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz", - "integrity": "sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg==", - "dev": true - }, - "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/envinfo": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", - "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha512-rp5dMKN8zEs9dfi9g0X1ClLmV//WRyk/R15mppFNICIFRG5P92VP7Z04p8pk++gABo9W2tY+kHyu6P1mEHgmTA==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/findup-sync": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", - "integrity": "sha512-yjftfYnF4ThYEvKEV/kEFR15dmtyXTAh3vQnzpJUoc7Naj5y1P0Ck7Zs1+Vroa00E3KT3IYsk756S+8WA5dNLw==", - "dev": true, - "dependencies": { - "glob": "~3.2.9", - "lodash": "~2.4.1" - }, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/findup-sync/node_modules/glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha512-hVb0zwEZwC1FXSKRPFTeOtN7AArJcJlI6ULGLtrstaswKNlrTJqAA+1lYlSUop4vjA423xlBzqfVS3iWGlqJ+g==", - "dev": true, - "dependencies": { - "inherits": "2", - "minimatch": "0.3" - }, - "engines": { - "node": "*" - } - }, - "node_modules/findup-sync/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/findup-sync/node_modules/lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw==", - "dev": true, - "engines": [ - "node", - "rhino" - ] - }, - "node_modules/findup-sync/node_modules/lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ==", - "dev": true - }, - "node_modules/findup-sync/node_modules/minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha512-WFX1jI1AaxNTZVOHLBVazwTWKaQjoykSzCBNXB72vDTCzopQGtyP91tKdFK5cv1+qMwPyiTu1HqUriqplI8pcA==", - "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", - "dev": true, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha512-hIGEBfnHcZpWkXPsAVeVmpYDvfy/matVl03yOY91FPmnpCC12Lm5izNxCjO3lHAeO6uaTwMxu7g450Siknlhig==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha512-ANhy2V2+tFpRajE3wN4DhkNQ08KDr0Ir1qL12/cUe5+a7STEK8jkW4onUYuY8/06qAFuT5je7mjAqzx0eKI2tQ==", - "dev": true, - "dependencies": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" - }, - "engines": { - "node": "*" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/glob/node_modules/graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha512-iiTUZ5vZ+2ZV+h71XAgwCSu6+NAizhFU3Yw8aC/hH5SQ3SnISqEqAek40imAFGtDcwJKNhXvSY+hzIolnLwcdQ==", - "deprecated": "please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/grunt": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", - "integrity": "sha512-1iq3ylLjzXqz/KSq1OAE2qhnpcbkF2WyhsQcavZt+YmgvHu0EbPMEhGhy2gr0FP67isHpRdfwjB5WVeXXcJemQ==", - "dev": true, - "dependencies": { - "async": "~0.1.22", - "coffee-script": "~1.3.3", - "colors": "~0.6.2", - "dateformat": "1.0.2-1.2.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.1", - "findup-sync": "~0.1.2", - "getobject": "~0.1.0", - "glob": "~3.1.21", - "grunt-legacy-log": "~0.1.0", - "grunt-legacy-util": "~0.2.0", - "hooker": "~0.2.3", - "iconv-lite": "~0.2.11", - "js-yaml": "~2.0.5", - "lodash": "~0.9.2", - "minimatch": "~0.2.12", - "nopt": "~1.0.10", - "rimraf": "~2.2.8", - "underscore.string": "~2.2.1", - "which": "~1.0.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/grunt-contrib-clean": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-0.5.0.tgz", - "integrity": "sha512-82I+O38BHP4rqxceareiDKnLnrSyGnyn6N9E6sUpBgCtxXgxMbJEBooSC7KtXhLO7im1QhoPp9FdSvTZ+k1bIw==", - "dev": true, - "dependencies": { - "rimraf": "~2.2.1" - }, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": "~0.4.0" - } - }, - "node_modules/grunt-contrib-concat": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.3.0.tgz", - "integrity": "sha512-w5N63mMgEYAEhd9PgY8uQ0pY02SucTSwq8XRTtHyEt7MSMQLlp7lF0g5oaXSav9xCWY9GPM0RqlJTT2gS+8n3Q==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": "~0.4.0" - } - }, - "node_modules/grunt-contrib-copy": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz", - "integrity": "sha512-qJkJqvttTuVV7hXaQ91ctB1Anha0z6pyZuBlz+Trw8O5tFJ5hpB5f3BNxMfSgO7ciSgw36FgAovLg992x3dqKw==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": "~0.4.0" - } - }, - "node_modules/grunt-contrib-cssmin": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-0.6.1.tgz", - "integrity": "sha512-1MUL+b7YO9liW1Up3V+Dxl2ZGFQbQ6kjIOkHC23ouADct/A/oxpaOHbo307ZheW6oUGs0JP33ibgMvc2bOFpOQ==", - "dev": true, - "dependencies": { - "clean-css": "~1.0.4", - "grunt-lib-contrib": "~0.6.0" - }, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": "~0.4.0" - } - }, - "node_modules/grunt-contrib-uglify": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.2.4.tgz", - "integrity": "sha512-Cm7G7Br45A7ejvZQ+KCpJyh3U1tNkFOTtNF1z/Wz7CY2fDG9Swxw/auMh8DD1h0lB00bzgFxd+qsh5J0yrek8g==", - "dev": true, - "dependencies": { - "grunt-lib-contrib": "~0.6.1", - "uglify-js": "~2.4.0" - }, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": "~0.4.0" - } - }, - "node_modules/grunt-css-url-replace": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/grunt-css-url-replace/-/grunt-css-url-replace-0.2.7.tgz", - "integrity": "sha512-aRoFGlyhEGgWJqjzSMRxQ0kO0vqIQhwMRl/ArK+6Tv9olZMAjViV7e26QfOyz3C68s2uARjWlMc+bNw7ywN8nQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": ">=0.4.0" - } - }, - "node_modules/grunt-legacy-log": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", - "integrity": "sha512-qYs/uM0ImdzwIXLhS4O5WLV5soAM+PEqqHI/hzSxlo450ERSccEhnXqoeDA9ZozOdaWuYnzTOTwRcVRogleMxg==", - "dev": true, - "dependencies": { - "colors": "~0.6.2", - "grunt-legacy-log-utils": "~0.1.1", - "hooker": "~0.2.3", - "lodash": "~2.4.1", - "underscore.string": "~2.3.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/grunt-legacy-log-utils": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", - "integrity": "sha512-D0vbUX00TFYCKNZtcZzemMpwT8TR/FdRs1pmfiBw6qnUw80PfsjV+lhIozY/3eJ3PSG2zj89wd2mH/7f4tNAlw==", - "dev": true, - "dependencies": { - "colors": "~0.6.2", - "lodash": "~2.4.1", - "underscore.string": "~2.3.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/grunt-legacy-log-utils/node_modules/lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw==", - "dev": true, - "engines": [ - "node", - "rhino" - ] - }, - "node_modules/grunt-legacy-log/node_modules/lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw==", - "dev": true, - "engines": [ - "node", - "rhino" - ] - }, - "node_modules/grunt-legacy-util": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", - "integrity": "sha512-cXPbfF8aM+pvveQeN1K872D5fRm30xfJWZiS63Y8W8oyIPLClCsmI8bW96Txqzac9cyL4lRqEBhbhJ3n5EzUUQ==", - "dev": true, - "dependencies": { - "async": "~0.1.22", - "exit": "~0.1.1", - "getobject": "~0.1.0", - "hooker": "~0.2.3", - "lodash": "~0.9.2", - "underscore.string": "~2.2.1", - "which": "~1.0.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/grunt-legacy-util/node_modules/underscore.string": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", - "integrity": "sha512-3FVmhXqelrj6gfgp3Bn6tOavJvW0dNH2T+heTD38JRxIrAbiuzbqjknszoOYj3DyFB1nWiLj208Qt2no/L4cIA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/grunt-lib-contrib": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/grunt-lib-contrib/-/grunt-lib-contrib-0.6.1.tgz", - "integrity": "sha512-HdCtJuMmmkSAVrAfsG7lZWE0YabrsPWwzcCCUgWQOAaQsQSUNhw/IwD2YjCSLh5y9NXSPzHTYFLL4ro7QbAJMA==", - "dev": true, - "dependencies": { - "zlib-browserify": "0.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/grunt/node_modules/underscore.string": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", - "integrity": "sha512-3FVmhXqelrj6gfgp3Bn6tOavJvW0dNH2T+heTD38JRxIrAbiuzbqjknszoOYj3DyFB1nWiLj208Qt2no/L4cIA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/iconv-lite": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", - "integrity": "sha512-KhmFWgaQZY83Cbhi+ADInoUQ8Etn6BG5fikM9syeOjQltvR45h7cRKJ/9uvQEuD61I3Uju77yYce0/LhKVClQw==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha512-Al67oatbRSo3RV5hRqIoln6Y5yMVbJSIn4jEJNL7VCImzq/kLr7vvb6sFRJXqr8rpHc/2kJOM+y0sPKN47VdzA==", - "dev": true - }, - "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-yaml": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", - "integrity": "sha512-VEKcIksckDBUhg2JS874xVouiPkywVUh4yyUmLCDe1Zg3bCd6M+F1eGPenPeHLc2XC8pp9G8bsuofK0NeEqRkA==", - "dev": true, - "dependencies": { - "argparse": "~ 0.1.11", - "esprima": "~ 1.0.2" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - }, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/keypress": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", - "integrity": "sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", - "integrity": "sha512-LVbt/rjK62gSbhehDVKL0vlaime4Y1IBixL+bKeNfoY4L2zab/jGrxU6Ka05tMA/zBxkTk5t3ivtphdyYupczw==", - "dev": true, - "engines": [ - "node", - "rhino" - ] - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha512-zZ+Jy8lVWlvqqeM8iZB7w7KmQkoJn8djM585z88rywrEbzoqawVa9FR5p2hwD+y74nfuKOjmNvi9gtWJNLqHvA==", - "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", - "dev": true, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimatch/node_modules/lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ==", - "dev": true - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, - "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/omdomdom": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/omdomdom/-/omdomdom-0.3.2.tgz", - "integrity": "sha512-DqfiB4LPhlkb1paMsH9nAYrCLipMEjW+2Ko8N7sPiGO58QFkoJcYUJGYFNgc6PgzjKmzhOlRObRexsWwmE4dcw==", - "engines": { - "node": ">=14.7.0", - "npm": ">=6.14.7" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", + "cpu": [ + "ppc64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=18" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/@esbuild/android-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "node_modules/@esbuild/android-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" + "node": ">=18" } }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "node_modules/@esbuild/android-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 0.10" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=18" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8" - } - }, - "node_modules/rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha512-R5KMKHnPAQaZMqLOsyuyUmcIjSeDm+73eoqQpaXA7AZ22BL+6C+1mcUscgOsNd8WVlJuvlgAPsegcx7pjlV0Dg==", - "dev": true, - "bin": { - "rimraf": "bin.js" + "node": ">=18" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "node": ">=18" } }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" + "node": ">=18" } }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "node_modules/@esbuild/linux-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", + "cpu": [ + "ia32" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", + "cpu": [ + "loong64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "node": ">=18" } }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", + "cpu": [ + "mips64el" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", + "cpu": [ + "ppc64" + ], "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", + "cpu": [ + "riscv64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=18" } }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", + "cpu": [ + "s390x" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/terser": { - "version": "5.22.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz", - "integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==", + "node_modules/@esbuild/linux-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" - }, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } + "node": ">=18" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=8.0" + "node": ">=18" } }, - "node_modules/ts-loader": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.0.tgz", - "integrity": "sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg==", + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4", - "source-map": "^0.7.4" - }, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" + "node": ">=18" } }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", + "cpu": [ + "x64" + ], "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uglify": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/uglify/-/uglify-0.1.5.tgz", - "integrity": "sha512-ysphC6ukZ7gvFuE+h0DAh5F48aVo41kQXTuArkFFln2aVQ+RoYYjm6FYONRR6FvCzo7DpiCwLWP+u9cTYJdlBg==", - "dev": true, - "dependencies": { - "commander": "*", - "grunt": "0.4.5", - "grunt-contrib-clean": "0.5.0", - "grunt-contrib-concat": "0.3.0", - "grunt-contrib-copy": "0.5.0", - "grunt-contrib-cssmin": "0.6.1", - "grunt-contrib-uglify": "0.2.4", - "grunt-css-url-replace": "*", - "underscore": "1.4.x", - "underscore.string": "2.3.3" - }, - "bin": { - "uglify": "bin/uglify" + "node": ">=18" } }, - "node_modules/uglify-js": { - "version": "2.4.24", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", - "integrity": "sha512-tktIjwackfZLd893KGJmXc1hrRHH1vH9Po3xFh1XBjjeGAnN02xJ3SuoA+n1L29/ZaCA18KzCFlckS+vfPugiA==", + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "async": "~0.2.6", - "source-map": "0.1.34", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.5.4" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], "engines": { - "node": ">=0.4.0" + "node": ">=18" } }, - "node_modules/uglify-js/node_modules/async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==", - "dev": true - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.1.34", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz", - "integrity": "sha512-yfCwDj0vR9RTwt3pEzglgb3ZgmcXHt6DjG3bjJvzPwTL+5zDQ2MhmSzAcTy0GTiQuCiriSWXvWM1/NhKdXuoQA==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">=0.8.0" + "node": ">=18" } }, - "node_modules/uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", - "dev": true - }, - "node_modules/underscore": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", - "integrity": "sha512-ZqGrAgaqqZM7LGRzNjLnw5elevWb5M8LEoDMadxIW3OWbcv72wMMgKdwOKpd5Fqxe8choLD8HN3iSj3TUh/giQ==", - "dev": true - }, - "node_modules/underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha512-hbD5MibthuDAu4yA5wxes5bzFgqd3PpBJuClbRxaNddxfdsz+qf+1kHwrGQFrmchmDHb9iNU+6EHDn8uj0xDJg==", + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "*" + "node": ">=18" } }, - "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", - "dev": true - }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", + "cpu": [ + "ia32" ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "dependencies": { - "punycode": "^2.1.0" + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" } }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "node_modules/@esbuild/win32-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=10.13.0" + "node": ">=18" } }, - "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, + "node_modules/debounce": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-3.0.0.tgz", + "integrity": "sha512-64byRbF0/AirwbuHqB3/ZpMG9/nckDa6ZA0yd6UnaQNwbbemCOwvz2sL5sjXLHhZHADyiwLm0M5qMhltUUx+TA==", + "license": "MIT", "engines": { - "node": ">=10.13.0" + "node": ">=20" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", + "node_modules/esbuild": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", "dev": true, + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, "bin": { - "webpack-cli": "bin/cli.js" + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" + "node": ">=18" }, - "engines": { - "node": ">=10.0.0" + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" } }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, + "node_modules/omdomdom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/omdomdom/-/omdomdom-0.3.2.tgz", + "integrity": "sha512-DqfiB4LPhlkb1paMsH9nAYrCLipMEjW+2Ko8N7sPiGO58QFkoJcYUJGYFNgc6PgzjKmzhOlRObRexsWwmE4dcw==", "engines": { - "node": ">=10.13.0" + "node": ">=14.7.0", + "npm": ">=6.14.7" } }, - "node_modules/which": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", - "integrity": "sha512-E87fdQ/eRJr9W1X4wTPejNy9zTW3FI2vpCZSJ/HAY+TkjKVC0TUm1jk6vn2Z7qay0DQy0+RBGdXxj+RmmiGZKQ==", + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, + "license": "Apache-2.0", "bin": { - "which": "bin/which" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, - "node_modules/window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", - "dev": true, + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yargs": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.5.4.tgz", - "integrity": "sha512-5j382E4xQSs71p/xZQsU1PtRA2HXPAjX0E0DkoGLxwNASMOKX6A9doV1NrZmj85u2Pjquz402qonBzz/yLPbPA==", - "dev": true, - "dependencies": { - "camelcase": "^1.0.2", - "decamelize": "^1.0.0", - "window-size": "0.1.0", - "wordwrap": "0.0.2" + "node": ">=14.17" } - }, - "node_modules/zlib-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz", - "integrity": "sha512-fheIDCKXU0YAGZMv4FFwVTBMQRSv2ZjNqRN1VkZjetZDK/BC/hViEhasTh0kTeogcsIAl5gYE04GN53trT+cFw==", - "dev": true } } } diff --git a/client/package.json b/client/package.json index 89f5240..8aee663 100644 --- a/client/package.json +++ b/client/package.json @@ -7,19 +7,18 @@ "client": "client" }, "scripts": { - "build": "npx webpack" + "build": "esbuild src/index.ts --bundle --minify --sourcemap --outfile=dist/hyperbole.js", + "dev": "esbuild src/index.ts --bundle --minify --sourcemap --watch --outfile=dist/hyperbole.js", + "check": "tsc --noEmit" }, "author": "", "license": "ISC", "devDependencies": { - "ts-loader": "^9.4.1", - "typescript": "^4.8.3", - "uglify": "^0.1.5", - "webpack": "^5.88.2", - "webpack-cli": "^4.10.0" + "esbuild": "^0.28.0", + "typescript": "^6.0.3" }, "dependencies": { "omdomdom": "^0.3.2", - "debounce": "^2.2.0" + "debounce": "^3.0.0" } } diff --git a/client/src/action.ts b/client/src/action.ts index 7a30954..41b577a 100644 --- a/client/src/action.ts +++ b/client/src/action.ts @@ -1,5 +1,4 @@ -import { takeWhileMap } from "./lib" import { Meta, ViewId, RequestId, EncodedAction, ViewState } from "./message" import * as message from "./message" diff --git a/client/src/events.ts b/client/src/events.ts index c1dfdb7..328dc71 100644 --- a/client/src/events.ts +++ b/client/src/events.ts @@ -1,5 +1,5 @@ -import * as debounce from 'debounce' +import debounce from 'debounce' import { encodedParam } from './action' import { HyperView, isHyperView } from './hyperview' diff --git a/client/src/index.ts b/client/src/index.ts index acaca5e..e7e8961 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -7,7 +7,7 @@ import { setQuery } from "./browser" import { parseResponse, LiveUpdate } from './response' import { dispatchContent, enrichHyperViews, HyperView, isHyperView } from "./hyperview" -let PACKAGE = require('../package.json'); +import PACKAGE from '../package.json'; // console.log("VERSION 2", INIT_PAGE, INIT_STATE) @@ -331,7 +331,7 @@ type VNode = { // Is set to `true` if a node is an `svg`, which tells // Omdomdom to treat it, and its children, as such - isSVGContext: Boolean + isSVGContext: boolean // The content of a "text" or "comment" node content: string diff --git a/client/src/sockets.ts b/client/src/sockets.ts index 1427527..cf0f296 100644 --- a/client/src/sockets.ts +++ b/client/src/sockets.ts @@ -15,8 +15,8 @@ interface SocketConnectionEventMap { export class SocketConnection { socket: WebSocket - hasEverConnected: Boolean = false - isConnected: Boolean = false + hasEverConnected: boolean = false + isConnected: boolean = false reconnectDelay: number = 0 queue: ActionMessage[] = [] events: EventTarget diff --git a/client/tsconfig.json b/client/tsconfig.json index 8ce28f4..4cb2a9d 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -7,8 +7,9 @@ "target": "ES2020", "lib": ["ES2020","DOM"], "allowJs": true, - "moduleResolution": "node", - "declaration": true, + "moduleResolution": "bundler", + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, "strict": true // "skipLibCheck": true /*"declarationMap": true*/ diff --git a/client/webpack.config.js b/client/webpack.config.js deleted file mode 100644 index 03e3b13..0000000 --- a/client/webpack.config.js +++ /dev/null @@ -1,36 +0,0 @@ -const path = require('path'); -// var PACKAGE = require('./package.json'); -// var version = PACKAGE.version; - -module.exports = { - entry: "./src/index.ts", - target: "web", - devtool: "source-map", - mode: "production", - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/, - }, - ], - }, - resolve: { - mainFields: ['browser', 'module', 'main'], - extensions: ['.tsx', '.ts', '.js'], - }, - - output: { - // filename: `hyperbole-${version}.js`, - filename: "hyperbole.js", - path: path.resolve(__dirname, 'dist'), - }, - - // devServer: { - // contentBase: path.join(__dirname, 'dist'), - // compress: true, - // port: 9000, - // }, -} - diff --git a/docs/dev.md b/docs/dev.md index d2a9a2f..9caaf0a 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -28,7 +28,14 @@ Build JavaScript client ``` cd client -npx webpack +npm run build +``` + +Watch for changes during development + +``` +cd client +npm run dev ``` Run examples diff --git a/flake.nix b/flake.nix index 2d3cf1a..b974c9a 100644 --- a/flake.nix +++ b/flake.nix @@ -138,8 +138,6 @@ shellCommon = version: { inherit (pre-commit) shellHook; buildInputs = with pkgs.haskell.packages."ghc${version}"; [ - pkgs.nodePackages_latest.webpack-cli - pkgs.nodePackages_latest.webpack pkgs.nodejs cabal-install haskell-language-server