add magicbroad
This commit is contained in:
parent
402bc6dc41
commit
bcfc1ae704
47 changed files with 151 additions and 1 deletions
|
@ -32,7 +32,7 @@ archive_dir: archives
|
||||||
category_dir: categories
|
category_dir: categories
|
||||||
code_dir: downloads/code
|
code_dir: downloads/code
|
||||||
i18n_dir: :lang
|
i18n_dir: :lang
|
||||||
skip_render:
|
skip_render: files/**
|
||||||
|
|
||||||
# Writing
|
# Writing
|
||||||
new_post_name: :title.md # File name of new posts
|
new_post_name: :title.md # File name of new posts
|
||||||
|
|
2
source/files/magicbroad/assets/Button.f5ab4cd7.js
Normal file
2
source/files/magicbroad/assets/Button.f5ab4cd7.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/Button.f5ab4cd7.js.map
Normal file
1
source/files/magicbroad/assets/Button.f5ab4cd7.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/ButtonBase.9bf595f5.js
Normal file
2
source/files/magicbroad/assets/ButtonBase.9bf595f5.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/ListItemText.52d31dfa.js
Normal file
2
source/files/magicbroad/assets/ListItemText.52d31dfa.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
var M=Object.defineProperty;var g=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var T=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&T(e,r,t[r]);if(g)for(var r of g(t))N.call(t,r)&&T(e,r,t[r]);return e};import{c as v,m as o,a as h,b as f,d as y,e as x}from"./index.13b310ab.js";import{u as R,T as c}from"./SvgIcon.c425712b.js";import{g as U,a as $,s as k,c as B}from"./ButtonBase.9bf595f5.js";function D(e){return $("MuiListItemText",e)}const L=U("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),E=v()({name:"MuiListItemText",selfPropNames:["children","classes","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],propDefaults:({set:e})=>e({disableTypography:!1,inset:!1}),utilityClass:D,slotClasses:e=>({root:["root",e.inset&&"inset",e.dense&&"dense",!!e.primary&&!!e.secondary&&"multiline"],primary:["primary"],secondary:["secondary"]})}),F=k("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${L.primary}`]:t.primary},{[`& .${L.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>i(i({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6}),e.inset&&{paddingLeft:56})),z=E.component(function({allProps:t,classes:r,otherProps:m,props:s}){const d=R(),b=o(t,{get dense(){return d.dense}}),p=n=>n!=="undefined"&&n!==null,l=n=>n instanceof HTMLElement&&n.classList.contains(c.toString()),C=h(()=>{const n=f(()=>{var a;return(a=s.primary)!=null?a:s.children})();return p(n)&&!l(n)&&!s.disableTypography?y(c,o({get variant(){return d.dense?"body2":"body1"},get className(){return r.primary},component:"span",display:"block"},()=>s.primaryTypographyProps||{},{children:n})):n}),I=h(()=>{const n=f(()=>s.secondary)();return p(n)&&!l(n)&&!s.disableTypography?y(c,o({variant:"body2",get className(){return r.secondary},sx:{display:"block",color:"text.secondary"}},()=>s.secondaryTypographyProps||{},{get component(){var a,u;return(u=(a=s.secondaryTypographyProps)==null?void 0:a.component)!=null?u:"p"},children:n})):n});return y(F,o(m,{get className(){return B(r.root,m.className)},ownerState:b,get children(){return[x(()=>C()),x(()=>I())]}}))});export{z as L};
|
||||||
|
//# sourceMappingURL=ListItemText.52d31dfa.js.map
|
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/Popover.e8cf0efd.js
Normal file
2
source/files/magicbroad/assets/Popover.e8cf0efd.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/Popover.e8cf0efd.js.map
Normal file
1
source/files/magicbroad/assets/Popover.e8cf0efd.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/SvgIcon.c425712b.js
Normal file
2
source/files/magicbroad/assets/SvgIcon.c425712b.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/SvgIcon.c425712b.js.map
Normal file
1
source/files/magicbroad/assets/SvgIcon.c425712b.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/TextField.2ea54ac2.js
Normal file
2
source/files/magicbroad/assets/TextField.2ea54ac2.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/TextField.2ea54ac2.js.map
Normal file
1
source/files/magicbroad/assets/TextField.2ea54ac2.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/getDeviceId.e8f3946a.js
Normal file
2
source/files/magicbroad/assets/getDeviceId.e8f3946a.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
var y,M=new Uint8Array(16);function S(){if(!y&&(y=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!y))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y(M)}var T=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function D(f){return typeof f=="string"&&T.test(f)}var a=[];for(var A=0;A<256;++A)a.push((A+256).toString(16).substr(1));function E(f){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(a[f[e+0]]+a[f[e+1]]+a[f[e+2]]+a[f[e+3]]+"-"+a[f[e+4]]+a[f[e+5]]+"-"+a[f[e+6]]+a[f[e+7]]+"-"+a[f[e+8]]+a[f[e+9]]+"-"+a[f[e+10]]+a[f[e+11]]+a[f[e+12]]+a[f[e+13]]+a[f[e+14]]+a[f[e+15]]).toLowerCase();if(!D(r))throw TypeError("Stringified UUID is invalid");return r}function L(f){if(!D(f))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(f.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(f.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(f.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(f.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(f.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function N(f){f=unescape(encodeURIComponent(f));for(var e=[],r=0;r<f.length;++r)e.push(f.charCodeAt(r));return e}var B="6ba7b810-9dad-11d1-80b4-00c04fd430c8",G="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function O(f,e,r){function n(o,x,c,v){if(typeof o=="string"&&(o=N(o)),typeof x=="string"&&(x=L(x)),x.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var t=new Uint8Array(16+o.length);if(t.set(x),t.set(o,x.length),t=r(t),t[6]=t[6]&15|e,t[8]=t[8]&63|128,c){v=v||0;for(var s=0;s<16;++s)c[v+s]=t[s];return c}return E(t)}try{n.name=f}catch{}return n.DNS=B,n.URL=G,n}function b(f,e,r){f=f||{};var n=f.random||(f.rng||S)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return E(n)}function H(f,e,r,n){switch(f){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function R(f,e){return f<<e|f>>>32-e}function k(f){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof f=="string"){var n=unescape(encodeURIComponent(f));f=[];for(var o=0;o<n.length;++o)f.push(n.charCodeAt(o))}else Array.isArray(f)||(f=Array.prototype.slice.call(f));f.push(128);for(var x=f.length/4+2,c=Math.ceil(x/16),v=new Array(c),t=0;t<c;++t){for(var s=new Uint32Array(16),d=0;d<16;++d)s[d]=f[t*64+d*4]<<24|f[t*64+d*4+1]<<16|f[t*64+d*4+2]<<8|f[t*64+d*4+3];v[t]=s}v[c-1][14]=(f.length-1)*8/Math.pow(2,32),v[c-1][14]=Math.floor(v[c-1][14]),v[c-1][15]=(f.length-1)*8&4294967295;for(var m=0;m<c;++m){for(var u=new Uint32Array(80),g=0;g<16;++g)u[g]=v[m][g];for(var i=16;i<80;++i)u[i]=R(u[i-3]^u[i-8]^u[i-14]^u[i-16],1);for(var l=r[0],p=r[1],h=r[2],I=r[3],U=r[4],w=0;w<80;++w){var C=Math.floor(w/20),V=R(l,5)+H(C,p,h,I)+U+e[C]+u[w]>>>0;U=I,I=h,h=R(p,30)>>>0,p=l,l=V}r[0]=r[0]+l>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+I>>>0,r[4]=r[4]+U>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var K=O("v5",80,k),X=K;const $=()=>{const f=window.localStorage.getItem("MAGICBROAD_DEVICE_ID");if(f)return f;{const e=b();return window.localStorage.setItem("MAGICBROAD_DEVICE_ID",e),e}},q=f=>X($(),f),F="00000000-0000-0000-0000-000000000000";export{q as a,F as b,$ as g,D as v};
|
||||||
|
//# sourceMappingURL=getDeviceId.e8f3946a.js.map
|
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/index.016e8a17.js
Normal file
2
source/files/magicbroad/assets/index.016e8a17.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.016e8a17.js.map
Normal file
1
source/files/magicbroad/assets/index.016e8a17.js.map
Normal file
File diff suppressed because one or more lines are too long
25
source/files/magicbroad/assets/index.13b310ab.js
Normal file
25
source/files/magicbroad/assets/index.13b310ab.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.13b310ab.js.map
Normal file
1
source/files/magicbroad/assets/index.13b310ab.js.map
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.146cb09e.css
Normal file
1
source/files/magicbroad/assets/index.146cb09e.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#app{font-family:Roboto;width:100%;height:100%}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-cyrillic-ext-400-normal.b7ef2cd1.woff2) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-cyrillic-400-normal.495d38d4.woff2) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAAXMABIAAAAACeAAAAVwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANAhUCYM8EQwKg2iDSgsQABIUATYCJAMcBCAFgnQHIAyCSRt8CAieB2WbnmbLuYAwwpK8+iIe4P3r89wHDZaakNWCmB8R66SEWr+ILhpijnTqf6QAyyF8GVAOAPOWtmNg6llFXANTaQXCgXMubThOj6JRPCJsEWW3o1/4wX411uruvta/9FF8Zz50qenu3hVxmf4QIi1dRSzhkcR0SqA1QoiwzI2uAUbffgtBpA0YCssEQRChiaaAgMpAFvDsmKQshIEEer1l/u1J0Sbi8P6OJsQc3VHd6N0nlHe1MAhFbvPNcXJVWKNNekPqCYVx/lj8nqMi5BY4Pd6hectSY5E2Lll8SMf/HJXfEKEOfCtEMjEFBEHtpSkbjBK4aB1MIEjT/t9z/+W3j8FgVyeNWdDn7wh7b19l7pQoyFW8FXcx+P9D4NE2ErMMk4kskmVMCiwyG5ZhhyC7qZ19JoMatwj00/I0GG/uexT/v7K+Ysx9JXVwiRoC1yHR9VGAy9QQcXVQbqOGmOvEACWZm5EnyicLnfULjlggc0ldeRXQEqImnlS9kL8XAZndegKyuixM77OP24/Mzw9QQ7Kfha4v9OEOadjJ0qBYxN896pRbZI6ly/PS82Bs9iiYPpuaWJZEw83lXbg5G5JRslr2VFWPDtfbPBryeqZk5eKg/CqRD2Oz8tcvgJMiFi4RC6PWb9fnkzx74cWAeELYJFCSObI1tnxBfqwo2lPppazn26eGKDWU3KLMvOioppPNX6y4euc5FBq4y6Emd99OYa6zfpnpUhjE4Y/qoWtWQ4tIHr845ZA6bDc+AOSaR/sb6c9Otrh6uj3cUdDVKESNWgCK/GzxKQiLFKJeTz+QgzZKTIUcA2Nz9h2ppBhtbSQxfsjAtk4xoD1oes5gXYPe8UWmx+HjwQeNPfi2Wv/952vDpV/80Njw3WfWXv5IL3662ucz8dd9se78QkPd6ihDH61ZfS/s/KK0fjE+sgih+YDL5pz1vnH249tjfOAcLqZOTdvY/3jL1Hy3vqvcu358ODj2/etmVHfcdW+1t2X6R08H6p3BTzz87uDo6/H/vD/2scffaEf/ThphsXX6jLtDvp7cx6bvFUbnpWbFBWgOekJEip6LgFz63wtE+H/fXrpM++P7m8wAgZk/NJnacWXJLOW1rWO16C5ouY7SRE5T8x0iJ7MpntZyQJtPS2tuKXZpKqNf728OLK1FiJj72rq99z4Ho7G9hTQm0sqlhiEBKlWXfTDq1zbQcaP1HosN1zo/TqWGAGGywdQJhaSfHo9wDdfhs78cJKBZ5glRluQQEG030P7t9IdL+03+rRhRIHjxxwF7IsRHYeWXv0f991G5d9GJAKUIBPIT/jUpF/wa9f/Ccm9YiMnjjap8MPxDeomeuKM1ffn/fWHktrCSBT3iY20i0fZ0BBSOAgtJiYMAUDBoOigYaTtuMB4PJjiY2lFfMDPaqZe2rfYTKVcYVUK+QIPiwY175iFi5Yq4Em50vIyNq4cbYFLL2Fyqwbe4aq5Kx+XgZMhZco180ZCv3b5iqtyXD9VCUsquRpcNT74CH3LW95hzWKkvV3KxoHLNhF5fxylXMNkCLk6rio/XJGRzZWquGi/JysTM3sUM+4wfckMBveM4zKV1U1VT4QMTqQI/IFSPuDBgopvEnkF6u7kQ4gJdWIvWjkeivDg/OWNxRqSXxIolJclBKluW+uwutDVlWXtxjIc9y9fPPiBAxIqR2jR/O1ZmRftILVjVU5bo4zjbmDxi6XLWfHj/+sMns5ZFfyP9jLWD9pU5CFi/MC+Fo8Vo/+XhjzuFH9jQ3a32p2/nQ0fiTr60oFFwFV18KrXSKp2m/+AsuvlQKqXRIVOncITG9B6cRRdfSqt0RP8hVHTzrZOuHdwJDHdwJwA=) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-greek-400-normal.daf51ab5.woff2) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-vietnamese-400-normal.77b24796.woff2) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-latin-ext-400-normal.3c23eb02.woff2) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-latin-400-normal.f6734f81.woff2) format("woff2"),url(/assets/roboto-all-400-normal.e41533d5.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
1
source/files/magicbroad/assets/index.276fa080.css
Normal file
1
source/files/magicbroad/assets/index.276fa080.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.draw-broad-body{position:absolute;margin:0;left:0;top:0;width:100%;height:100%;font-family:sans-serif;font-size:13px;padding:1em;box-sizing:border-box;overflow:scroll}.draw-broad-canvas{position:absolute;width:100%;height:100%;left:0;top:0}.draw-broad-scrollbar{z-index:1}
|
2
source/files/magicbroad/assets/index.3e50c9ce.js
Normal file
2
source/files/magicbroad/assets/index.3e50c9ce.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.3e50c9ce.js.map
Normal file
1
source/files/magicbroad/assets/index.3e50c9ce.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/index.79b5287a.js
Normal file
2
source/files/magicbroad/assets/index.79b5287a.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.79b5287a.js.map
Normal file
1
source/files/magicbroad/assets/index.79b5287a.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/index.7d797b7f.js
Normal file
2
source/files/magicbroad/assets/index.7d797b7f.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.7d797b7f.js.map
Normal file
1
source/files/magicbroad/assets/index.7d797b7f.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/index.9a756780.js
Normal file
2
source/files/magicbroad/assets/index.9a756780.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import{g as c,u as d,i as r,d as o,N as p,S as m,t as n}from"./index.13b310ab.js";import{B as g}from"./Button.f5ab4cd7.js";import{g as f}from"./getDeviceId.e8f3946a.js";import{u as h}from"./solid.5ae8e60d.js";import"./ButtonBase.9bf595f5.js";const _=n("<h1>User Infomation</h1>"),C=n("<p>Deivce Id: </p>"),N=n("<p>Id: </p>"),$=n("<p>User-Device Id: </p>"),D=()=>{const s=c(),i=s.user(),l=d(),a=async()=>{await s.signOut(),l("/login")},u=h();return[_.cloneNode(!0),(()=>{const e=C.cloneNode(!0);return e.firstChild,r(e,f,null),e})(),o(m,{when:i,get fallback(){return o(p,{href:"/login"})},children:e=>[(()=>{const t=N.cloneNode(!0);return t.firstChild,r(t,()=>e.id,null),t})(),(()=>{const t=$.cloneNode(!0);return t.firstChild,r(t,()=>u.getUserDeviceId(),null),t})(),o(g,{onClick:a,children:"Sign out"})]})]};export{D as default};
|
||||||
|
//# sourceMappingURL=index.9a756780.js.map
|
1
source/files/magicbroad/assets/index.9a756780.js.map
Normal file
1
source/files/magicbroad/assets/index.9a756780.js.map
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.9a756780.js","sources":["../../src/pages/User/index.tsx"],"sourcesContent":["import { Component, Show } from \"solid-js\";\nimport { createSupabaseAuth } from \"solid-supabase\";\nimport { Navigate, useNavigate } from \"solid-app-router\";\nimport Button from \"@suid/material/Button\";\nimport getDeviceId from \"../../helpers/getDeviceId\";\nimport { useBroadClient } from \"../../helpers/BroadClient/solid\";\n\nconst User: Component = () => {\n const auth = createSupabaseAuth();\n const user_option = auth.user();\n const navigate = useNavigate();\n const signOut = async () => {\n await auth.signOut();\n navigate(\"/login\");\n };\n const broadClient = useBroadClient();\n return (<>\n <h1>User Infomation</h1>\n <p>Deivce Id: {getDeviceId()}</p>\n <Show when={user_option} fallback={<Navigate href=\"/login\" />}>\n {\n (user) => {\n return <>\n <p>Id: {user.id}</p>\n <p>User-Device Id: {broadClient.getUserDeviceId()}</p>\n <Button onClick={signOut}>Sign out</Button>\n </>;\n }\n }\n </Show>\n </>);\n};\n\nexport default User;\n"],"names":["User","auth","createSupabaseAuth","user_option","user","navigate","useNavigate","signOut","broadClient","useBroadClient","_$insert","getDeviceId","_$createComponent","id","getUserDeviceId"],"mappings":"oWAOMA,EAAkB,IAAM,CAC1B,KAAMC,GAAOC,IACPC,EAAcF,EAAKG,OACnBC,EAAWC,IACXC,EAAU,SAAY,CACxB,KAAMN,GAAKM,UACXF,EAAS,QAAD,GAENG,EAAcC,IACpB,MAAA,CAAA,EAAA,UAAA,EAAA,EAAA,KAAA,CAAA,KAAA,GAAA,EAAA,UAAA,EAAA,EAAA,SAAA,WAAAC,EAAA,EAEmBC,EAFnB,IAAA,EAAA,CAAA,GAAA,EAAAC,EAGK,EAHL,CAGU,KAAMT,EAHhB,GAG6B,WAH7B,CAAA,MAAAS,GAGwC,EAHxC,CAGiD,KAAK,QAHtD,CAAA,CAAA,EAAA,SAKaR,GACG,CAAA,KAAA,CAAA,KAAA,GAAA,EAAA,UAAA,EAAA,EAAA,SAAA,WAAAM,EACYN,EAAAA,IAAAA,EAAKS,GADjB,IAAA,EAAA,CAAA,GAAA,EAAA,KAAA,CAAA,KAAA,GAAA,EAAA,UAAA,EAAA,EAAA,SAAA,WAAAH,EAEwBF,EAAAA,IAAAA,EAAYM,gBAFpC,EAAA,IAAA,EAAA,CAAA,GAAA,EAAAF,EAGK,EAHL,CAGY,QAASL,EAHrB,SAAA,UAAA,CAAA,CAAA,CANhB,CAAA,CAAA,CATJ"}
|
2
source/files/magicbroad/assets/index.b2b53b3b.js
Normal file
2
source/files/magicbroad/assets/index.b2b53b3b.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import{q as d,g as F,H as G,v as B,i as t,d as l,S as J,I as y,t as S,r as M,z as T}from"./index.13b310ab.js";import{B as P}from"./Button.f5ab4cd7.js";import{T as D}from"./TextField.2ea54ac2.js";import{u as j}from"./solid.5ae8e60d.js";import{P as z,S as H,R as O}from"./index.79b5287a.js";import{v as V}from"./getDeviceId.e8f3946a.js";import"./ButtonBase.9bf595f5.js";import"./isHostComponent.9ebad583.js";const A=S('<p>Peer "<!>" [changed x<!>], clk <!>, connectionState <!>, singalingState </p>'),K=S("<p>Loading participants...</p>"),Q=S("<div><p>User: </p><br><br><p>User-Device Id: </p><div><p>Participants:</p><ul></ul></div><div><p>Peers:</p><ul></ul></div></div>"),W=S("<li>User Id: </li>"),X=S("<li>No peers.</li>"),Y=S("<li></li>"),Z=i=>{const[h,s]=d(z.unknown),[b,R]=d("stable"),[f,o]=d(0),C=n=>{s(n),o(g=>g+1)},u=()=>{R(i.peer.connection.signalingState),o(n=>n+1)};return M(()=>{s(i.peer.connectionState)}),T(()=>{i.peer.bus.on("connectionstatechange",C),i.peer.connection.addEventListener("signalingstatechange",u)}),B(()=>{i.peer.bus.detach("connectionstatechange",C),i.peer.connection.removeEventListener("signalingstatechange",u)}),(()=>{const n=A.cloneNode(!0),g=n.firstChild,_=g.nextSibling,$=_.nextSibling,v=$.nextSibling,w=v.nextSibling,x=w.nextSibling,e=x.nextSibling,c=e.nextSibling;return c.nextSibling,t(n,()=>i.peer.userDeviceId,_),t(n,f,v),t(n,()=>i.peer.clk.toString(),x),t(n,h,c),t(n,b,null),n})()},se=()=>{const[i,h]=d(""),[s,b]=d(""),[R,f]=d([],{equals:!1}),o=j(),C=F(),[u,n]=d(),[g,_]=G(()=>V(s())?o.getParticipants(s()):[]),$=async e=>{await o.isJoinedRoomById(e)||await o.joinRoomById(e),_.refetch();const c=H.ofRoom(o.supabase,e,o.getUserDeviceId()),r=new O(o.getUserDeviceId(),c,e);r.bus.on("addpeer",()=>{f(r.peers)}),r.bus.on("removepeer",m=>{m.disconnect(),f(r.peers)}),await r.broadcastPeerList(),n(r)},v=async()=>{const e=await o.createRoom(i());b(e.id),h(e.name),await $(e.id)},w=async()=>{const e=await o.findRoomById(s());e?(b(e.id),h(e.name),await $(e.id)):alert(`Could not found room ${s()}`)};B(async()=>{const e=u();e&&(await e.stop(),n())});const x=()=>{const e=u();if(e)return e.userDeviceId};return(()=>{const e=Q.cloneNode(!0),c=e.firstChild;c.firstChild;const r=c.nextSibling,m=r.nextSibling,N=m.nextSibling;N.firstChild;const I=N.nextSibling,k=I.firstChild,L=k.nextSibling,U=I.nextSibling,E=U.firstChild,q=E.nextSibling;return t(c,()=>JSON.stringify(C.user(),void 0,2),null),t(e,l(D,{variant:"standard",get value(){return i()},label:"Room Name",onChange:a=>h(a.target.value)}),r),t(e,l(P,{onClick:v,children:"Create New Room"}),r),t(e,l(D,{variant:"standard",get value(){return s()},label:"Room ID",onChange:a=>b(a.target.value)}),m),t(e,l(P,{onClick:w,children:"Enter Room"}),m),t(e,l(P,{onClick:()=>{const a=u();a&&a.broadcastPeerList()},children:"Sync Peer List"}),m),t(N,()=>x()||"unknown",null),t(I,l(J,{get when(){return g.loading},get children(){return K.cloneNode(!0)}}),k),t(L,l(y,{get each(){return g()},children:a=>(()=>{const p=W.cloneNode(!0);return p.firstChild,t(p,()=>a.user_id,null),p})()})),t(q,l(y,{get each(){return R()},get fallback(){return X.cloneNode(!0)},children:a=>(()=>{const p=Y.cloneNode(!0);return t(p,l(Z,{peer:a})),p})()})),e})()};export{se as default};
|
||||||
|
//# sourceMappingURL=index.b2b53b3b.js.map
|
1
source/files/magicbroad/assets/index.b2b53b3b.js.map
Normal file
1
source/files/magicbroad/assets/index.b2b53b3b.js.map
Normal file
File diff suppressed because one or more lines are too long
2
source/files/magicbroad/assets/index.b61bf03f.js
Normal file
2
source/files/magicbroad/assets/index.b61bf03f.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import{q as s,i as n,d as i,t as O}from"./index.13b310ab.js";import{B as c}from"./Button.f5ab4cd7.js";import{T as X}from"./TextField.2ea54ac2.js";import{a as Y,D as u,b as q}from"./index.c1adcc6d.js";import"./ButtonBase.9bf595f5.js";import"./isHostComponent.9ebad583.js";const j=O('<p style="position: absolute; z-index: 1;" class="noselect">Current Point: (x: <!>, y: <!>, lineWidth: <!>, color: <!>)<br>hasForce: <br>Pressure: <br>Touch Type: <br><br>Scroll Range X: <br>Scroll Range Y: <br>Current Tool: <br></p>'),Q=()=>{const[o,g]=s(),[F,b]=s(!1),[D,S]=s(0),[w,y]=s(),l=new Y("blue",20);return l.setOffscreenSize([3e3,3e3]),[(()=>{const e=j.cloneNode(!0),r=e.firstChild,x=r.nextSibling,P=x.nextSibling,d=P.nextSibling,v=d.nextSibling,_=v.nextSibling,B=_.nextSibling,$=B.nextSibling,R=$.nextSibling,W=R.nextSibling,k=W.nextSibling,h=k.nextSibling,z=h.nextSibling,p=z.nextSibling,E=p.nextSibling,C=E.nextSibling,m=C.nextSibling,H=m.nextSibling,T=H.nextSibling,L=T.nextSibling,f=L.nextSibling,N=f.nextSibling,a=N.nextSibling;return n(e,()=>{var t;return(t=o())==null?void 0:t.x},x),n(e,()=>{var t;return(t=o())==null?void 0:t.y},d),n(e,()=>{var t;return(t=o())==null?void 0:t.lineWidth},_),n(e,()=>{var t;return(t=o())==null?void 0:t.color.toString()},$),n(e,()=>String(F()),h),n(e,D,p),n(e,w,C),n(e,i(X,{variant:"standard",label:"Line Width Factor",onChange:t=>{t.preventDefault(),l.setLineWidthFactor(new Number(t.target.value).valueOf())},get value(){return l.lineWidthFactor().toString()}}),m),n(e,()=>l.scrollCtl.getRangeX().toString(),T),n(e,()=>l.scrollCtl.getRangeY().toString(),f),n(e,()=>l.tool(),a),n(e,i(c,{onClick:()=>l.setTool(u.hand),children:"Hand"}),a),n(e,i(c,{onClick:()=>l.setTool(u.pen),children:"Pen"}),a),n(e,i(c,{onClick:()=>l.setTool(u.erase),children:"Erase"}),a),n(e,i(c,{onClick:()=>l.resetCanvas(),children:"Reset Canvas"}),null),e})(),i(q,{onStart:(e,r)=>{g(e[e.length-1]),b(r.hasForce),S(r.pressure)},onDrawing:(e,r)=>{g(e[e.length-1]),b(r.hasForce),S(r.pressure)},onEnd:e=>{g(),b(e.hasForce),S(e.pressure)},onTouchTypeChanged:y,ctl:l})]};export{Q as default};
|
||||||
|
//# sourceMappingURL=index.b61bf03f.js.map
|
1
source/files/magicbroad/assets/index.b61bf03f.js.map
Normal file
1
source/files/magicbroad/assets/index.b61bf03f.js.map
Normal file
File diff suppressed because one or more lines are too long
57
source/files/magicbroad/assets/index.c1adcc6d.js
Normal file
57
source/files/magicbroad/assets/index.c1adcc6d.js
Normal file
File diff suppressed because one or more lines are too long
1
source/files/magicbroad/assets/index.c1adcc6d.js.map
Normal file
1
source/files/magicbroad/assets/index.c1adcc6d.js.map
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
||||||
|
function n(t){return typeof t=="string"}export{n as i};
|
||||||
|
//# sourceMappingURL=isHostComponent.9ebad583.js.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"isHostComponent.9ebad583.js","sources":["../../node_modules/@suid/base/utils/isHostComponent.js"],"sourcesContent":["/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === \"string\";\n}\nexport default isHostComponent;\n"],"names":[],"mappings":"AAGA,WAAyB,EAAS,CAC9B,MAAO,OAAO,IAAY,QAC9B"}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
source/files/magicbroad/assets/solid.5ae8e60d.js
Normal file
2
source/files/magicbroad/assets/solid.5ae8e60d.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
var d=Object.defineProperty,m=Object.defineProperties;var c=Object.getOwnPropertyDescriptors;var a=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var i=(s,e,r)=>e in s?d(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r,n=(s,e)=>{for(var r in e||(e={}))f.call(e,r)&&i(s,r,e[r]);if(a)for(var r of a(e))h.call(e,r)&&i(s,r,e[r]);return s},u=(s,e)=>m(s,c(e));import{a as l}from"./getDeviceId.e8f3946a.js";import{F as p}from"./index.13b310ab.js";class w{constructor(e){this.supabase=e}async getAllRooms(){const e=this.userOrError(),r=await this.supabase.from("rooms").select("id, owner, name, created_at").eq("owner",e.id);if(r.error)throw r.error;return r.data}async findRoomById(e){const r=await this.supabase.rpc("find_room_by_id",{target_id:e});if(r.error)throw r.error;return r.data&&r.data.id?r.data:null}userOrError(){const e=this.supabase.auth.user();if(e)return e;throw new Error("login required")}async joinRoomById(e){const r=await this.findRoomById(e);if(r){const o=this.userOrError(),t=await this.supabase.from("room_joint").insert({room_id:r.id,user_id:o.id});if(t.error){if(t.error.code==="23505")return r;throw t.error}return null}else return null}async isJoinedRoomById(e){const r=this.userOrError(),o=await this.supabase.from("room_joint").select("created_at").eq("room_id",e).eq("user_id",r.id);if(o.error)throw o.error;return o.data.length>0}async sendMessageTo(e,r){const o=await this.supabase.from("room_message_queue").insert({room:e,message:r});if(o.error)throw o.error}async openRoomMessageQueueChannel(e){const r=await this.findRoomById(e);if(!r)throw Error("Room not found");return this.supabase.channel(`realtime:public:room_message_queue:room=eq.${r.id}`,{selfBroadcast:!1})}async createRoom(e){const r=this.userOrError(),{data:o,error:t}=await this.supabase.from("rooms").insert({name:e,owner:r.id});if(t)throw t;return o[0]}getUserDeviceId(){return l(this.userOrError().id)}async getParticipants(e){const{data:r,error:o}=await this.supabase.from("room_joint").select("user_id").eq("room_id",e);if(o)throw o;return r}async getRoomOpts(e){const{data:r,error:o}=await this.supabase.from("room_opts").select("size_x, size_y").eq("room_id",e).limit(1);if(o)throw o;return typeof r[0]=="object"?r[0]:{}}async setRoomOpts(e,r){const{error:o}=await this.supabase.from("room_opts").upsert(u(n({},r),{room_id:e})).eq("room_id",e);if(o)throw o}}const q=()=>{const s=p();return new w(s)};export{q as u};
|
||||||
|
//# sourceMappingURL=solid.5ae8e60d.js.map
|
1
source/files/magicbroad/assets/solid.5ae8e60d.js.map
Normal file
1
source/files/magicbroad/assets/solid.5ae8e60d.js.map
Normal file
File diff suppressed because one or more lines are too long
16
source/files/magicbroad/index.html
Normal file
16
source/files/magicbroad/index.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
||||||
|
<title>Webpack App</title>
|
||||||
|
<script type="module" crossorigin src="/assets/index.13b310ab.js"></script>
|
||||||
|
<link rel="stylesheet" href="/assets/index.146cb09e.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>This app requires JavaScript to run. Please enable JavaScript for this site.</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in a new issue