manner.js 0.0.17 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +1 -0
- package/package.json +3 -5
- package/server.js +1 -0
- package/.nvmrc +0 -1
- package/babel.config.json +0 -26
- package/client/32.index.js +0 -1
- package/client/index.js +0 -2
- package/client/index.js.LICENSE.txt +0 -9
- package/dist/index.js +0 -13
- package/gulpfile.babel.js +0 -10
- package/scripts/index.js +0 -14
- package/server/class/CommonHttp.js +0 -70
- package/server/index.js +0 -12
- package/server/lib/cacheOutput.js +0 -41
- package/server/lib/compressOutput.js +0 -44
- package/server/lib/filterNamespace.js +0 -17
- package/server/lib/formateHttpDate.js +0 -11
- package/server/lib/formateHttpKey.js +0 -11
- package/server/lib/parseHttpDate.js +0 -9
- package/server/lib/parseOption.js +0 -70
- package/server/lib/readCookie.js +0 -27
package/client.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearCookie=clearCookie,exports.readCookie=readCookie,exports.setCookie=setCookie;function clearCookie(a){return Object.keys(a).forEach(b=>{void 0!==b.expires&&(Object.keys(b).forEach(a=>{"user"===b&&(document.cookie[b+"_"+a]=""),window.localStorage.removeItem(b+"_"+a)}),delete a[b])}),a}function readCookie(){const a={};document.cookie.split(";").forEach(b=>{const[c,d]=b.split("=");a[c.trim()]=d});const b={};Object.keys(a).forEach(c=>{const d=c.split("_");if(2===d.length){const[e,f]=d;b[e]===void 0&&(b[e]={}),b[e][f]=a[c]}});for(let a=0;a<window.localStorage.length;a+=1){const c=window.localStorage.key(a),d=c.split("_");if(2===d.length){const[a,e]=d;b[a]===void 0&&(b[a]={}),b[a][e]=window.localStorage.getItem(c)}}return clearCookie(b)}function setCookie(a){const b=a.headers.get("cookie");null!==b&&(""===b?document.cookie.split(";").forEach(a=>{const[b,c]=a.split("="),[d]=b.split("_");"user"===d&&(document.cookie=b+"="+c),window.localStorage.set(b,c)}):b.split(";").forEach(a=>{document.cookie=a}))}
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manner.js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "Frontend mode project.",
|
|
5
5
|
"repository": "git@github.com:leobrad/mode.git",
|
|
6
6
|
"author": "Leo Ely",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"workspaces": [
|
|
9
|
-
"packages/*"
|
|
10
|
-
],
|
|
11
8
|
"scripts": {
|
|
12
|
-
"build": "gulp build && node dist/index.js"
|
|
9
|
+
"build": "gulp build && node dist/scripts/index.js"
|
|
13
10
|
},
|
|
14
11
|
"devDependencies": {
|
|
15
12
|
"@babel/cli": "^7.20.7",
|
|
@@ -20,6 +17,7 @@
|
|
|
20
17
|
"autoprefixer": "^10.4.13",
|
|
21
18
|
"babel-loader": "^9.1.2",
|
|
22
19
|
"babel-plugin-root-import": "^6.6.0",
|
|
20
|
+
"babel-preset-minify": "^0.5.2",
|
|
23
21
|
"css-loader": "^6.7.3",
|
|
24
22
|
"file-loader": "^6.2.0",
|
|
25
23
|
"gulp-babel": "^8.0.0",
|
package/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommonHttp=void 0,exports.default=readCookie,exports.parseOption=parseOption;function isOption(a){let b=!0;if("string"==typeof a){let c=0;for(c=0;1>c&&!("-"===a.charAt(c));c+=1);0==c&&(b=!1)}else b=!1;return b}function transformOption(a){let b;const c=a.split("-");return b=1<=c.length?c.map((a,b)=>0===b?a:a.charAt(0).toUpperCase()+a.substring(1,a.length)):a,b.join("")}function parseOption(...a){const b={};for(let c=0;c<a.length;c+=1){const d=a[c];if("-"===d.charAt(0)){const e=/^\-([a-z])$/;if(e.test(d)){const[f,g]=d.match(e);isOption(a[c+1])?(b[g]=a[c+1],c+=1):b[g]=!0}if("-"===d.charAt(1)){const e=/^\-\-([a-z\-]+)$/;if(e.test(d)){const[f,g]=d.match(e);isOption(a[c+1])?(b[transformOption(g)]=a[c+1],c+=1):b[g]=!0}}}}return b}function readCookie(a){const b={};"string"==typeof a&&a.split(";").forEach(a=>{const[c,d]=a.split("=");b[c.trim()]=d});const c={};return Object.keys(b).forEach(a=>{const d=a.split("_");if(2===d.length){const[e,f]=d;void 0===c[e]&&(c[e]={}),c[e][f]=b[a]}}),c}function formateHttpKey(a){return a.split("-").map(a=>a.substring(0,1).toUpperCase()+a.substring(1,a.length)).join("-")}function getLists(a){return a.join("|")}class CommonHttp{constructor(a){this.time=new Date().getTime();const{fonts:b}=a;a.fonts===void 0&&(a.fonts=[]),this.options=a,this.regexp=new RegExp(`\.(${getLists(a.fonts.concat(["html, ico","js"]))})$`)}async process(a,b){try{const{url:c}=a;if("/update/time"===c){const{time:a}=this;b.end(a)}else if(this.regexp.test(c))cacheOutput(a,b,restPath,fs.readFileSync(path.resolve("static",restPath)),parseInt(fs.statSync(path.resolve("static",restPath)).mtimeMs));else if("/api"===c.substring(0,4)){const d=await new Promise(b=>{a.on("data",a=>{b(a.toString())})}),{location:e}=this.options;if(e!==void 0){const a=await fetch(e+c,{method:"POST",body:d});for(const c of a.headers.keys())b.setHeader(formateHttpKey(c),a.headers.get(c));const f=await a.text();b.end(JSON.stringify(f))}}}catch(a){const{develope:c}=this.options;if(!0===c)throw a;else b.writeHead(500),b.end()}}}exports.CommonHttp=CommonHttp;
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v21.6.2
|
package/babel.config.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
[
|
|
4
|
-
"@babel/preset-env",
|
|
5
|
-
{
|
|
6
|
-
"targets": {
|
|
7
|
-
"node": "current"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"@babel/preset-react"
|
|
11
|
-
],
|
|
12
|
-
],
|
|
13
|
-
"plugins": [
|
|
14
|
-
[
|
|
15
|
-
"babel-plugin-root-import",
|
|
16
|
-
{
|
|
17
|
-
"paths": [
|
|
18
|
-
{
|
|
19
|
-
"rootPathSuffix": "./src",
|
|
20
|
-
"rootPathPrefix": "~/"
|
|
21
|
-
},
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
],
|
|
26
|
-
}
|
package/client/32.index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmode_client=self.webpackChunkmode_client||[]).push([[32],{32:(e,s,t)=>{t.r(s),t.d(s,{default:()=>y});var i=t(784),r=t(62),a=t.n(r),h=t(36),u=t.n(h),n=t(793),c=t.n(n),l=t(892),o=t.n(l),m=t(173),d=t.n(m),p=t(464),k=t.n(p),L=t(738),f={};f.styleTagTransform=k(),f.setAttributes=o(),f.insert=c().bind(null,"head"),f.domAPI=u(),f.insertStyleElement=d(),a()(L.Z,f);const v=L.Z&&L.Z.locals?L.Z.locals:void 0;var b=t(942),x=t(308),R={};R.styleTagTransform=k(),R.setAttributes=o(),R.insert=c().bind(null,"head"),R.domAPI=u(),R.insertStyleElement=d(),a()(x.Z,R);const q=x.Z&&x.Z.locals?x.Z.locals:void 0;class g extends i.Component{render(){return i.createElement("div",{className:v.notfound},i.createElement("span",{className:v.earth}),i.createElement("span",{className:v.question},"?"),"Location",i.createElement("span",{className:v.location},function(e){const s=new b.v9;return s.addLexer(b.KU),s.parse(e).map((e=>function(e){const{type:s,elem:t}=e;switch(s){case"/":return i.createElement("span",{className:q.slash},"/");case"namespace":return i.createElement("span",{className:q.namespace},t)}}(e)))}(location.pathname)),"don't exist.")}}const y=g},308:(e,s,t)=>{t.d(s,{Z:()=>u});var i=t(601),r=t.n(i),a=t(609),h=t.n(a)()(r());h.push([e.id,"._N8HK48O4qTjMvpLSCt8 {\n color: rgb(90, 243, 90)\n}\n.efKSEM7Leg9oX2LwdZ8g {\n color: rgb(45, 45, 173)\n}\n",""]),h.locals={slash:"_N8HK48O4qTjMvpLSCt8",namespace:"efKSEM7Leg9oX2LwdZ8g"};const u=h},738:(e,s,t)=>{t.d(s,{Z:()=>u});var i=t(601),r=t.n(i),a=t(609),h=t.n(a)()(r());h.push([e.id,".dS9Go71wUZT91Vy2mrFl {\n font-size: 28px;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%\n}\n.JNXQJHh3oIT3kAs9R8yt {\n position: relative;\n top: -40px;\n left: -10px;\n font-size: 40px;\n font-weight: 500;\n display: flex;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n margin-left: -10px;\n color: rgb(255, 255, 255);\n background-color: rgb(243, 43, 43)\n}\n.Il5TfKo8Shrkc3LV4QLT:before {\n font-size: 75px;\n content: '\\f57d';\n background-color: rgba(0, 0, 0, 0)\n}\n.eZpPpiaXiBxiGhk7Lalb {\n margin: 0 8px 0 8px;\n background-color: rgb(245, 245, 245);\n padding: 0 6px 0 6px\n}\n",""]),h.locals={notfound:"dS9Go71wUZT91Vy2mrFl",question:"JNXQJHh3oIT3kAs9R8yt",earth:"Il5TfKo8Shrkc3LV4QLT",location:"eZpPpiaXiBxiGhk7Lalb"};const u=h},995:(e,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0,s.default=class{constructor(){this.lexers=[],this.use=0}addLexer(e){this.lexers.push(e)}garbageRecover(){this.use-=1;const{use:e}=this;if(e/this.ins.length<.8){const e=[];for(let s=0;s<this.ins.length;s+=1){const t=this.ins[s];void 0!==t&&(t.i=e.length,e.push(t))}this.ins=e}}parse(e){const{lexers:s}=this,t=[];this.ins=[],this.use+=0;const i=new Array(s.length).fill(0);for(let r=0;r<=e.length;r+=1){let a;if(a=r===e.length?"EOF":e.charAt(r),this.ins.forEach((e=>{void 0!==e&&!1===e.scan(a)&&(this.garbageRecover(),i[e.j]-=1)}))," "!==a&&"\n"!==a){for(let e=0;e<i.length;e+=1)if(i.every((e=>e<=0))){const r=new s[e](this,t,e);void 0===r.scan(a)&&(r.setIndex(this.ins.length),this.ins.push(r),this.use+=1,i[e]+=1)}}else t.push({type:a})}return t}}},937:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e),this.identifer=!1}checkLexerDuplicate(e){const{length:s}=this.ans;return this.ans[s-1].elem===e}readReserveLetter(e,s,t){if(e===s)this.elems.push(e),this.status=t;else{if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}}readReserveLetters(e,s){let t=!1;for(let i=0;i<s.length;i+=1){const[r,a]=s[i];if(e===r){this.elems.push(e),this.status=a,t=!0;break}}if(!1===t){if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}}getReserve(e,s,t){if(e===s)return this.elems.push(e),void this.ans.push(this.makeLexer(t,this.elems.join("")));this.identifer=!0,this.elems.push(e),this.status=1}scan(e){switch(this.status){case 0:{switch(e){case"/":return this.elems=[],this.elems.push(e),void(this.status=121);case"*":if(!this.checkLexerDuplicate("*"))return this.ans.push(this.makeLexer("symbol","*")),this.quit();break;case"<":if(!this.checkLexerDuplicate("<"))return this.ans.push(this.makeLexer("angleBrackets","<")),this.quit();break;case">":if(!this.checkLexerDuplicate(">"))return this.ans.push(this.makeLexer("angleBrackets",">")),this.quit();break;case".":if(!this.checkLexerDuplicate("."))return this.ans.push(this.makeLexer("call",".")),this.quit();break;case"+":if(!this.checkLexerDuplicate("+"))return this.ans.push(this.makeLexer("arithmetic","+")),this.quit();break;case"-":if(!this.checkLexerDuplicate("-"))return this.ans.push(this.makeLexer("arithmetic","-")),this.quit();break;case"^":if(!this.checkLexerDuplicate("^"))return this.ans.push(this.makeLexer("arithmetic","^")),this.quit();break;case"%":if(!this.checkLexerDuplicate("%"))return this.ans.push(this.makeLexer("arithmetic","%")),this.quit();break;case"|":if(!this.checkLexerDuplicate("|"))return this.ans.push(this.makeLexer("logic","|")),this.quit();case"&":if(!this.checkLexerDuplicate("&"))return this.ans.push(this.makeLexer("logic","&")),this.quit();break;case"!":if(!this.checkLexerDuplicate("!"))return this.ans.push(this.makeLexer("logic","!")),this.quit();break;case"~":if(!this.checkLexerDuplicate("~"))return this.ans.push(this.makeLexer("logic","~")),this.quit();break;case"?":if(!this.checkLexerDuplicate("?"))return this.ans.push(this.makeLexer("logic","?")),this.quit();break;case"=":if(!this.checkLexerDuplicate("="))return this.ans.push(this.makeLexer("arithmetic","=")),this.quit();break;case"(":if(!this.checkLexerDuplicate("("))return this.ans.push(this.makeLexer("parenthese","(")),this.quit();break;case")":if(!this.checkLexerDuplicate(")"))return this.ans.push(this.makeLexer("parenthese",")")),this.quit();break;case"{":if(!this.checkLexerDuplicate("{"))return this.ans.push(this.makeLexer("curlyParenthese","{")),this.quit();break;case"}":if(!this.checkLexerDuplicate("}"))return this.ans.push(this.makeLexer("curlyParenthese","}")),this.quit();break;case"[":if(!this.checkLexerDuplicate("["))return this.ans.push(this.makeLexer("squareParenthese","[")),this.quit();break;case"]":if(!this.checkLexerDuplicate("]"))return this.ans.push(this.makeLexer("squareParenthese","]")),this.quit();break;case";":if(!this.checkLexerDuplicate(";"))return this.ans.push(this.makeLexer("function",";")),this.quit();break;case":":if(!this.checkLexerDuplicate(":"))return this.ans.push(this.makeLexer("iteral",":")),this.quit();break;case",":if(!this.checkLexerDuplicate(","))return this.ans.push(this.makeLexer("iteral",",")),this.quit();break;case'"':this.checkLexerDuplicate('"')||(this.elems=[],this.ans.push(this.makeLexer("quotation",'"')),this.status=3);break;case"'":this.checkLexerDuplicate("'")||(this.elems=[],this.ans.push(this.makeLexer("quotation","'")),this.status=4);break;case"`":this.checkLexerDuplicate("`")||(this.elems=[],this.ans.push(this.makeLexer("quotation","`")),this.status=125)}if(!1===this.identifer)switch(e){case"a":return this.elems=[],this.elems.push(e),void(this.status=5);case"b":return this.elems=[],this.elems.push(e),void(this.status=9);case"c":return this.elems=[],this.elems.push(e),void(this.status=13);case"d":return this.elems=[],this.elems.push(e),void(this.status=28);case"e":return this.elems=[],this.elems.push(e),void(this.status=42);case"f":return this.elems=[],this.elems.push(e),void(this.status=53);case"i":return this.elems=[],this.elems.push(e),void(this.status=64);case"l":return this.elems=[],this.elems.push(e),void(this.status=77);case"n":return this.elems=[],this.elems.push(e),void(this.status=79);case"r":return this.elems=[],this.elems.push(e),void(this.status=83);case"s":return this.elems=[],this.elems.push(e),void(this.status=88);case"t":return this.elems=[],this.elems.push(e),void(this.status=100);case"v":case"y":return this.elems=[],this.elems.push(e),void(this.status=111);case"w":return this.elems=[],this.elems.push(e),void(this.status=115);case"z":return this.elems=[],this.elems.push(e),void(this.status=131);default:this.identifer=!0}if("0"===e)return this.elems=[],this.elems.push(e),void(this.status=127);if("o"===e||"O"===e)return this.elems=[],this.elems.push(e),void(this.status=129);const s=e.charCodeAt(0);if(s>=48&&s<=57)return this.elems=[],this.elems.push(e),void(this.status=130);if(s>=97&&s<=122||s>=65&&s<=90||95===s)return this.elems=[],this.elems.push(e),void(this.status=1);break}case 1:{if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();const s=e.charCodeAt(0);if(s>=97&&s<=122||s>=65&&s<=90||s>58&&s<=64||95===s)this.elems.push(e);else{if(!(s>=48&&s<=57))return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.status=2,this.elems.push(e)}break}case 2:{const s=e.charCodeAt(0);if(!(s>=48&&s<=57))return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.elems.push(e);break}case 3:if('"'===e)return this.ans.push(this.makeLexer("string",this.elems.join(""))),this.ans.push(this.makeLexer("quotation",'"')),this.quit();this.elems.push(e);break;case 4:if("'"===e)return this.ans.push(this.makeLexer("string",this.elems.join(""))),this.ans.push(this.makeLexer("quotation","'")),this.quit();this.elems.push(e);break;case 5:return this.readReserveLetter(e,"w",6);case 6:return this.readReserveLetter(e,"a",7);case 7:return this.readReserveLetter(e,"i",8);case 8:return this.getReserve(e,"t","async");case 9:return this.readReserveLetter(e,"r",10);case 10:return this.readReserveLetter(e,"e",11);case 11:return this.readReserveLetter(e,"a",12);case 12:return this.getReserve(e,"k","for");case 13:return this.readReserveLetters(e,[["a",14],["l",18],["o",21]]);case 14:return this.readReserveLetters(e,[["s",15],["t",16]]);case 15:return this.getReserve(e,"e","switch");case 16:return this.readReserveLetter(e,"c",17);case 17:return this.getReserve(e,"h","try");case 18:return this.readReserveLetter(e,"a",19);case 19:return this.readReserveLetter(e,"s",20);case 20:case 52:case 102:return this.getReserve(e,"s","class");case 21:return this.readReserveLetter(e,"n",22);case 22:return this.readReserveLetters(e,[["s",27],["t",23]]);case 23:return this.readReserveLetter(e,"i",24);case 24:return this.readReserveLetter(e,"n",25);case 25:return this.readReserveLetter(e,"u",26);case 26:return this.getReserve(e,"e","for");case 27:case 78:return this.getReserve(e,"t","declare");case 28:"e"===e?(this.elems.push(e),this.status=29):"o"===e?(this.elems.push(e),this.ans.push(this.makeLexer("while",this.elems.join(""))),this.quit()):"EOF"===e?(this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit()):(this.identifer=!0,this.elems.push(e),this.status=1);break;case 29:this.readReserveLetters(e,[["b",30],["f",35],["l",39]]);break;case 30:this.readReserveLetter(e,"u",31);break;case 31:this.readReserveLetter(e,"g",32);break;case 32:this.readReserveLetter(e,"g",33);break;case 33:this.readReserveLetter(e,"e",34);break;case 34:return this.getReserve(e,"r","debugger");case 35:this.readReserveLetter(e,"a",36);break;case 36:this.readReserveLetter(e,"u",37);break;case 37:this.readReserveLetter(e,"l",38);break;case 38:return this.getReserve(e,"t","switch");case 39:this.readReserveLetter(e,"e",40);break;case 40:this.readReserveLetter(e,"t",41);break;case 41:return this.getReserve(e,"e","delete");case 42:this.readReserveLetters(e,[["l",43],["x",45]]);break;case 43:this.readReserveLetter(e,"s",44);break;case 44:case 56:return this.getReserve(e,"e","if");case 45:this.readReserveLetters(e,[["p",46],["t",49]]);break;case 46:this.readReserveLetter(e,"o",47);break;case 47:this.readReserveLetter(e,"r",48);break;case 48:case 68:return this.getReserve(e,"t","module");case 49:this.readReserveLetter(e,"e",50);break;case 50:this.readReserveLetter(e,"n",51);break;case 51:this.readReserveLetter(e,"d",52);break;case 53:return this.readReserveLetters(e,[["a",54],["o",57],["u",58]]);case 54:this.readReserveLetter(e,"l",55);break;case 55:this.readReserveLetter(e,"s",56);break;case 57:return this.getReserve(e,"r","for");case 58:return this.readReserveLetter(e,"n",59);case 59:return this.readReserveLetter(e,"c",60);case 60:return this.readReserveLetter(e,"t",61);case 61:return this.readReserveLetter(e,"i",62);case 62:return this.readReserveLetter(e,"o",63);case 63:return this.getReserve(e,"n","declare");case 64:if("m"===e)this.elems.push(e),this.status=65;else if("n"===e)this.elems.push(e),this.status=69;else{if("f"===e)return this.elems.push(e),this.ans.push(this.makeLexer("if",this.elems.join(""))),this.quit();if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}break;case 65:this.readReserveLetter(e,"p",66);break;case 66:this.readReserveLetter(e,"o",67);break;case 67:this.readReserveLetter(e,"r",68);break;case 69:{const s=e.charCodeAt(0);if(!(s>=99&&s<=122))return this.ans.push(this.makeLexer("in","in")),this.quit();this.readReserveLetter(e,"s",70);break}case 70:this.readReserveLetter(e,"t",71);break;case 71:this.readReserveLetter(e,"a",72);break;case 72:this.readReserveLetter(e,"n",73);break;case 73:this.readReserveLetter(e,"c",74);break;case 74:this.readReserveLetter(e,"e",75);break;case 75:this.readReserveLetter(e,"o",76);break;case 76:return this.getReserve(e,"f","instanceof");case 77:this.readReserveLetter(e,"e",78);break;case 79:this.readReserveLetters(e,[["e",80],["u",81]]);break;case 80:return this.getReserve(e,"w","class");case 81:this.readReserveLetter(e,"l",82);break;case 82:return this.getReserve(e,"l","type");case 83:this.readReserveLetter(e,"e",84);break;case 84:this.readReserveLetter(e,"t",85);break;case 85:this.readReserveLetter(e,"u",86);break;case 86:this.readReserveLetter(e,"r",87);break;case 87:return this.getReserve(e,"n","function");case 88:this.readReserveLetters(e,[["u",89],["w",92],["t",96]]);break;case 89:this.readReserveLetter(e,"p",90);break;case 90:this.readReserveLetter(e,"e",91);break;case 91:return this.getReserve(e,"r","class");case 92:this.readReserveLetter(e,"i",93);break;case 93:this.readReserveLetter(e,"t",94);break;case 94:this.readReserveLetter(e,"c",95);break;case 95:return this.getReserve(e,"h","switch");case 96:this.readReserveLetter(e,"a",97);break;case 97:this.readReserveLetter(e,"t",98);break;case 98:this.readReserveLetter(e,"i",99);break;case 99:return this.getReserve(e,"c","class");case 100:this.readReserveLetters(e,[["h",101],["r",103],["y",107]]);break;case 101:this.readReserveLetters(e,[["i",102],["r",105]]);break;case 103:this.readReserveLetter(e,"o",104);break;case 104:return this.getReserve(e,"w","try");case 105:if("u"===e)this.elems.push(e),this.status=106;else{if("y"===e)return this.elems.push(e),this.ans.push(this.makeLexer("try",this.elems.join(""))),this.quit();if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}break;case 106:return this.getReserve(e,"e","bool");case 107:this.readReserveLetter(e,"p",108);break;case 108:this.readReserveLetter(e,"e",109);break;case 109:this.readReserveLetter(e,"o",110);break;case 110:return this.getReserve(e,"f","type");case 111:this.readReserveLetters(e,[["a",112],["o",113]]);break;case 112:return this.getReserve(e,"r","declare");case 113:this.readReserveLetter(e,"i",114);break;case 114:return this.getReserve(e,"d","function");case 115:this.readReserveLetters(e,[["h",116],["i",119]]);break;case 116:this.readReserveLetter(e,"i",117);break;case 117:this.readReserveLetter(e,"l",118);break;case 118:return this.getReserve(e,"e","while");case 119:this.readReserveLetter(e,"t",120);break;case 120:return this.getReserve(e,"h","function");case 121:if(this.elems.push(e),"/"===e)this.status=122;else{if("*"!==e)return this.ans.push(this.makeLexer("arithmetic","/")),this.quit();this.status=123}break;case 122:if(this.elems.push(e),"\n"===e)return this.ans.push(this.makeLexer("lineComment",this.elems.join(""))),this.quit();break;case 123:if(this.elems.push(e),"*"!==e)return this.quit();this.status=124;break;case 124:if("/"!==e)return this.quit();this.elems.push(e),this.ans.push(this.makeLexer("blockComment",this.elems.join("")));break;case 125:if("`"===e)return this.ans.push(this.makeLexer("string",this.elems.join(""))),this.ans.push(this.makeLexer("quotation","'")),this.quit();this.elems.push(e);break;case 126:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(!(s>=48&&s<=57||"_"===e||"."===e||"e"===e||"E"===e))return"n"===e?(this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit()):(this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit());this.elems.push(e);break}case 127:this.elems.push(e),this.status="x"===e||"X"===e?128:130;break;case 128:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(!(s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102||"_"===e||"."===e||"-"===e||"e"===e||"E"===e))return"n"===e?(this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit()):(this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit());this.elems.push(e);break}case 129:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(s>=48&&s<=55||"_"===e||"."===e||"e"===e||"E"===e)this.elems.push(e);else{if("n"===e)return this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();this.elems.push(e),this.status=1}break}case 130:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(!(s>=48&&s<=57||"_"===e||"."===e||"e"===e||"E"===e))return"n"===e?(this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit()):(this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit());this.elems.push(e);break}default:return this.quit()}}}s.default=a},287:(e,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0,s.default=class{constructor(e,s,t){this.highLight=e,this.ans=s,this.j=t,this.status=0}setIndex(e){this.i=e}makeLexer(e,s){let t;return t=void 0!==s?{type:e,elem:s}:{type:e},t}quit(){return void 0!==this.i&&(this.highLight.ins[this.i]=void 0),!1}}},458:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e)}scan(e){switch(this.status){case 0:{const s=e.charCodeAt(0);if(s>=48&&s<=57||s>=97&&s<=122||s>=65&&s<=90||s>=59&&s<=64||s>=33&&s<=44||s>=125&&s<=153)return this.elems=[],this.elems.push(e),void(this.status=2);switch(e){case"/":return this.ans.push(this.makeLexer("symbol","/")),this.quit();case":":return this.ans.push(this.makeLexer("symbol",":")),this.quit();case".":return this.ans.push(this.makeLexer("symbol",".")),this.quit();default:return this.quit()}break}case 2:{const s=e.charCodeAt(0);return 1===e.length&&(s>=48&&s<=57||s>=97&&s<=122||s>=65&&s<=90||s>=59&&s<=64||s>=33&&s<=44||s>=125&&s<=153)?(void 0===this.elems&&(this.elems=[]),void this.elems.push(e)):(this.ans.push(this.makeLexer("namespace",this.elems.join(""))),this.quit())}default:return this.quit()}}}s.default=a},358:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e)}scan(e){switch(this.status){case 0:switch(e){case"n":return this.elems=[],this.elems.push(e),void(this.status=1);case"c":return this.elems=[],this.elems.push(e),void(this.status=2);case"-":return this.ans.push(this.makeLexer("symbol","-")),this.quit();case"|":return void(this.status=4);case"#":return this.elems=[],this.elems.push(e),void(this.status=5);default:return this.quit()}break;case 1:switch(this.elems.length){case 1:if("o"!==e)return this.quit();this.elems.push(e);break;case 2:if("d"!==e)return this.quit();this.elems.push("d");break;case 3:return"e"===e?(this.elems.push(e),this.ans.push(this.makeLexer("command",this.elems.join(""))),this.quit()):this.quit();default:return this.quit()}break;case 2:switch(this.elems.length){case 1:if("u"!==e)return this.quit();this.elems.push(e);break;case 2:if("r"!==e)return this.quit();this.elems.push("r");break;case 3:return"l"===e?(this.elems.push(e),this.ans.push(this.makeLexer("command",this.elems.join(""))),this.quit()):this.quit();default:return this.quit()}break;case 4:return" "===e?(this.ans.push(this.makeLexer("symbol","|")),this.quit()):this.quit();case 5:if("!"!==e)return this.quit();this.elems.push(e),this.status=6;break;case 6:if("\n"===e||"EOF"===e)return this.ans.push(this.makeLexer("hashbangComment",this.elems.join(""))),this.quit();this.elems.push(e);break;default:return this.quit()}}}s.default=a},864:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e)}scan(e){switch(this.status){case 0:{switch(e){case".":return this.ans.push(this.makeLexer("symbol",".")),this.quit();case"v":return this.ans.push(this.makeLexer("symbol","v")),this.quit()}const s=e.charCodeAt(0);s>=48&&s<=57&&(this.elems=[],this.elems.push(e),this.status=1);break}case 1:{const s=e.charCodeAt(0);if(s>=48&&s<=57)this.elems.push(e);else if("."===e||"EOF"===e)return this.ans.push(this.makeLexer("version",this.elems.join(""))),this.quit()}}}}s.default=a},942:(e,s,t)=>{s.KU=s.v9=void 0,h(t(287));var i=h(t(995));s.v9=i,h(t(937));var r=h(t(458));s.KU=r,h(t(358));h(t(864));function a(e){if("function"!=typeof WeakMap)return null;var s=new WeakMap,t=new WeakMap;return(a=function(e){return e?t:s})(e)}function h(e,s){if(!s&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(s);if(t&&t.has(e))return t.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in e)if("default"!==h&&Object.prototype.hasOwnProperty.call(e,h)){var u=r?Object.getOwnPropertyDescriptor(e,h):null;u&&(u.get||u.set)?Object.defineProperty(i,h,u):i[h]=e[h]}return i.default=e,t&&t.set(e,i),i}}}]);
|
package/client/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e,t,r={851:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(601),o=r.n(n),a=r(609),i=r.n(a)()(o());i.push([e.id,".ov0HAlsHj07qbcJKZ72N {\n height: 100%\n}\n",""]),i.locals={page:"ov0HAlsHj07qbcJKZ72N"};const u=i},171:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(601),o=r.n(n),a=r(609),i=r.n(a)()(o());i.push([e.id,".wrl0ky_Ev8ozFKBHVfrV {\n position: absolute;\n width: 680px;\n top: calc(50% - 100px);\n left: calc(50% - 340px);\n padding: 15px 0px 10px 0px;\n z-index: 2\n}\n.qISbc1wzFKzJV17J8pKh {\n color: rgb(255, 255, 255);\n font-size: 17px;\n padding: 0 20px 30px 20px;\n border-bottom: 1px solid rgb(255, 255, 255)\n}\n.qISbc1wzFKzJV17J8pKh:before {\n font-size: 43px;\n content: '\\f56d';\n margin-right: 15px\n}\n.snwjZugfwhs6317dh8rA {\n display: flex;\n margin-top: 25px;\n justify-content: center\n}\n.CyXoNrY5R4ijjVeUJGE5 {\n color: rgb(0, 0, 0, 0.6);\n background-color: rgb(255, 255, 255);\n display: inline-flex;\n font-size: 16px;\n padding: 6.5px 10px 6.5px 10px;\n margin: 0 100px 0 100px;\n border: 0px;\n border-radius: 2.5px;\n align-items: center\n}\n.CyXoNrY5R4ijjVeUJGE5:before {\n border-right: 1px solid rgb(0, 0, 0, 0.6);\n margin-right: 8px;\n padding-right: 8px\n}\n.QzdrLkNxKCZhwdkv0XHh:before {\n font-size: 15px;\n content: '\\f252'\n}\n.XsweDQo3DMRAjPtlE0o3:before {\n font-size: 16px;\n content: '\\f5c8'\n}\n",""]),i.locals={confirm:"wrl0ky_Ev8ozFKBHVfrV",title:"qISbc1wzFKzJV17J8pKh",btngrp:"snwjZugfwhs6317dh8rA",btn:"CyXoNrY5R4ijjVeUJGE5",update:"QzdrLkNxKCZhwdkv0XHh",ignore:"XsweDQo3DMRAjPtlE0o3"};const u=i},609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var u=0;u<this.length;u++){var c=this[u][0];null!=c&&(i[c]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&i[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},601:e=>{e.exports=function(e){return e[1]}},426:(e,t)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator,y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,v={};function m(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||y}function b(){}function g(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||y}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=m.prototype;var x=g.prototype=new b;x.constructor=g,h(x,m.prototype),x.isPureReactComponent=!0;var w=Array.isArray,_=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var o,a={},i=null,u=null;if(null!=t)for(o in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(i=""+t.key),t)_.call(t,o)&&!k.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:r,type:e,key:i,ref:u,props:a,_owner:S.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var C=/\/+/g;function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,o,a,i){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var c=!1;if(null===e)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return i=i(c=e),e=""===a?"."+R(c,0):a,w(i)?(o="",null!=e&&(o=e.replace(C,"$&/")+"/"),A(i,t,o,"",(function(e){return e}))):null!=i&&(j(i)&&(i=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(C,"$&/")+"/")+e)),t.push(i)),1;if(c=0,a=""===a?".":a+":",w(e))for(var s=0;s<e.length;s++){var l=a+R(u=e[s],s);c+=A(u,t,o,l,i)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(u=e.next()).done;)c+=A(u=u.value,t,o,l=a+R(u,s++),i);else if("object"===u)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function T(e,t,r){if(null==e)return e;var n=[],o=0;return A(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function $(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},I={transition:null},O={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:I,ReactCurrentOwner:S};t.Children={map:T,forEach:function(e,t,r){T(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=o,t.Profiler=i,t.PureComponent=g,t.StrictMode=a,t.Suspense=l,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h({},e.props),a=e.key,i=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)_.call(t,s)&&!k.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:r,type:e.type,key:a,ref:i,props:o,_owner:u}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=j,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:$}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,r){return P.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,r){return P.current.useReducer(e,t,r)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return P.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return P.current.useTransition()},t.version="18.2.0"},784:(e,t,r)=>{e.exports=r(426)},62:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var a={},i=[],u=0;u<e.length;u++){var c=e[u],s=n.base?c[0]+n.base:c[0],l=a[s]||0,f="".concat(s," ").concat(l);a[s]=l+1;var p=r(f),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var y=o(d,n);n.byIndex=u,t.splice(u,0,{identifier:f,updater:y,references:1})}i.push(f)}return i}function o(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var a=n(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var u=r(a[i]);t[u].references--}for(var c=n(e,o),s=0;s<a.length;s++){var l=r(a[s]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=c}}},793:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},36:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={id:e,exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>e+".index.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="mode-client:",o.l=(r,n,a,i)=>{if(e[r])e[r].push(n);else{var u,c;if(void 0!==a)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+a){u=f;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+a),u.src=r),e[r]=[n];var p=(t,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(n))),t)return t(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=p.bind(null,u.onerror),u.onload=p.bind(null,u.onload),c&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={179:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=a);var i=o.p+o.u(t),u=new Error;o.l(i,(r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[i,u,c]=r,s=0;if(i.some((t=>0!==e[t]))){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);c&&c(o)}for(t&&t(r);s<i.length;s++)a=i[s],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunkmode_client=self.webpackChunkmode_client||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),o.nc=void 0,(()=>{var e=o(784),t=o(62),r=o.n(t),n=o(36),a=o.n(n),i=o(793),u=o.n(i),c=o(892),s=o.n(c),l=o(173),f=o.n(l),p=o(464),d=o.n(p),y=o(851),h={};h.styleTagTransform=d(),h.setAttributes=s(),h.insert=u().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=f(),r()(y.Z,h),y.Z&&y.Z.locals&&y.Z.locals,new class{constructor(){this.callbacks=[],this.to(location.pathname)}onChange(e){this.callbacks.push(e)}to(e){this.location=e,history.pushState({},"",e),this.callbacks.forEach((t=>t(e)))}},e.Component;var v=o(171),m={};m.styleTagTransform=d(),m.setAttributes=s(),m.insert=u().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=f(),r()(v.Z,m),v.Z&&v.Z.locals&&v.Z.locals,e.Component,new class{constructor(){this.callbacks={}}async send(e,t){const{callbacks:r}=this,n=r[e];if(Array.isArray(n))for(let e=0;e<n.length;e+=1)await n[e](t)}on(e,t){const{callbacks:r}=this;void 0===r[e]&&(r[e]=[]),r[e].push(t)}remove(e,t){const r=this.callbacks[e];if(Array.isArray(r))for(let e=0;e<r.length;e+=1)t===r[e]&&r.splice(e,1)}}})()})();
|
package/dist/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _path = _interopRequireDefault(require("path"));
|
|
4
|
-
var _fs = require("fs");
|
|
5
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
|
-
const packagePath = _path.default.resolve('.', 'packages');
|
|
7
|
-
const currentPath = _path.default.resolve('.');
|
|
8
|
-
(0, _fs.cpSync)(_path.default.join(packagePath, 'client', 'dist'), _path.default.join(currentPath, 'client'), {
|
|
9
|
-
recursive: true
|
|
10
|
-
});
|
|
11
|
-
(0, _fs.cpSync)(_path.default.join(packagePath, 'server', 'dist'), _path.default.join(currentPath, 'server'), {
|
|
12
|
-
recursive: true
|
|
13
|
-
});
|
package/gulpfile.babel.js
DELETED
package/scripts/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { cpSync, } from 'fs';
|
|
3
|
-
|
|
4
|
-
const packagePath = path.resolve('.', 'packages');
|
|
5
|
-
const currentPath = path.resolve('.');
|
|
6
|
-
|
|
7
|
-
cpSync(
|
|
8
|
-
path.join(packagePath, 'client', 'dist'), path.join(currentPath, 'client'),
|
|
9
|
-
{ recursive: true, },
|
|
10
|
-
);
|
|
11
|
-
cpSync(
|
|
12
|
-
path.join(packagePath, 'server', 'dist'), path.join(currentPath, 'server'),
|
|
13
|
-
{ recursive: true, }
|
|
14
|
-
);
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _cacheOutput = _interopRequireDefault(require("../lib/cacheOutput"));
|
|
8
|
-
var _formateHttpKey = _interopRequireDefault(require("../lib/formateHttpKey"));
|
|
9
|
-
var _filterNamespace = _interopRequireDefault(require("../lib/filterNamespace"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function getLists(list) {
|
|
12
|
-
return list.join('|');
|
|
13
|
-
}
|
|
14
|
-
class CommonHttp {
|
|
15
|
-
constructor(options) {
|
|
16
|
-
this.time = new Date().getTime();
|
|
17
|
-
const {
|
|
18
|
-
fonts
|
|
19
|
-
} = options;
|
|
20
|
-
if (options.fonts === undefined) {
|
|
21
|
-
options.fonts = [];
|
|
22
|
-
}
|
|
23
|
-
this.options = options;
|
|
24
|
-
this.regexp = new RegExp(`\.(${getLists(options.fonts.concat(['html, ico', 'js']))})$`);
|
|
25
|
-
}
|
|
26
|
-
async process(req, res) {
|
|
27
|
-
try {
|
|
28
|
-
const {
|
|
29
|
-
url
|
|
30
|
-
} = req;
|
|
31
|
-
if (url === '/update/time') {
|
|
32
|
-
const {
|
|
33
|
-
time
|
|
34
|
-
} = this;
|
|
35
|
-
res.end(time);
|
|
36
|
-
} else if (this.regexp.test(url)) {
|
|
37
|
-
(0, _cacheOutput.default)(req, res, restPath, fs.readFileSync(path.resolve('static', restPath)), parseInt(fs.statSync(path.resolve('static', restPath)).mtimeMs));
|
|
38
|
-
} else if (url.substring(0, 4) === '/api') {
|
|
39
|
-
const body = await new Promise((resolve, reject) => {
|
|
40
|
-
req.on('data', data => {
|
|
41
|
-
resolve(data.toString());
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
const {
|
|
45
|
-
location
|
|
46
|
-
} = this.options;
|
|
47
|
-
const response = await fetch(location + url, {
|
|
48
|
-
method: 'POST',
|
|
49
|
-
body
|
|
50
|
-
});
|
|
51
|
-
for (const k of response.headers.keys()) {
|
|
52
|
-
res.setHeader((0, _formateHttpKey.default)(k), response.headers.get(k));
|
|
53
|
-
}
|
|
54
|
-
const data = await response.text();
|
|
55
|
-
res.end(JSON.stringify(data));
|
|
56
|
-
}
|
|
57
|
-
} catch (e) {
|
|
58
|
-
const {
|
|
59
|
-
develope
|
|
60
|
-
} = this.options;
|
|
61
|
-
if (develope === true) {
|
|
62
|
-
throw e;
|
|
63
|
-
} else {
|
|
64
|
-
res.writeHead(500);
|
|
65
|
-
res.end();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
var _default = exports.default = CommonHttp;
|
package/server/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.parseOption = exports.CommonHttp = void 0;
|
|
7
|
-
var _CommonHttp = _interopRequireWildcard(require("./class/CommonHttp"));
|
|
8
|
-
exports.CommonHttp = _CommonHttp;
|
|
9
|
-
var _parseOption = _interopRequireWildcard(require("./lib/parseOption"));
|
|
10
|
-
exports.parseOption = _parseOption;
|
|
11
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = cacheOutput;
|
|
7
|
-
var _compressOutput = _interopRequireDefault(require("./compressOutput"));
|
|
8
|
-
var _formateHttpDate = _interopRequireDefault(require("./formateHttpDate"));
|
|
9
|
-
var _parseHttpDate = _interopRequireDefault(require("./parseHttpDate"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
const output = {
|
|
12
|
-
modify: {},
|
|
13
|
-
file: {}
|
|
14
|
-
};
|
|
15
|
-
function cacheOutput(req, res, path, file, ms) {
|
|
16
|
-
let ifModifiedSince = req.headers['If-Modified-Since'];
|
|
17
|
-
if (ifModifiedSince === undefined) {
|
|
18
|
-
if (output.modify[path] === undefined) {
|
|
19
|
-
output.modify[path] = new Date(ms).toString();
|
|
20
|
-
}
|
|
21
|
-
if (output.file[path] === undefined) {
|
|
22
|
-
output.file[path] = file;
|
|
23
|
-
}
|
|
24
|
-
res.setHeader('Last-Modified', (0, _formateHttpDate.default)(output.modify[path]));
|
|
25
|
-
(0, _compressOutput.default)(req, res, output.file[path], path);
|
|
26
|
-
} else {
|
|
27
|
-
if (output.modify[path] === undefined) {
|
|
28
|
-
output.modify[path] = new Date(ms).toString();
|
|
29
|
-
}
|
|
30
|
-
if (parseDateString(new Date().toString()) < parseDateString(output.modify[path])) {
|
|
31
|
-
if (output.file[path] === undefined) {
|
|
32
|
-
output.file[path] = file;
|
|
33
|
-
}
|
|
34
|
-
res.setHeader('Last-Modified', (0, _formateHttpDate.default)(output.modify[path]));
|
|
35
|
-
(0, _compressOutput.default)(req, res, output.file[path], path);
|
|
36
|
-
} else {
|
|
37
|
-
res.writeHead(304);
|
|
38
|
-
res.end();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = compressOutput;
|
|
7
|
-
var _zlib = _interopRequireDefault(require("zlib"));
|
|
8
|
-
var _stream = require("stream");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const output = {
|
|
11
|
-
compress: {},
|
|
12
|
-
raw: {}
|
|
13
|
-
};
|
|
14
|
-
function onError(err) {
|
|
15
|
-
if (err) {
|
|
16
|
-
console.error('An error occurred:', err);
|
|
17
|
-
process.exitCode = 1;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function dealCompress(data, path, res) {
|
|
21
|
-
if (cache.compress[path] === undefined) {
|
|
22
|
-
output.compress[path] = data;
|
|
23
|
-
}
|
|
24
|
-
res.end(output.compress[path]);
|
|
25
|
-
}
|
|
26
|
-
function directDeal(data, path, res) {
|
|
27
|
-
if (output.raw[path] === undefined) {
|
|
28
|
-
output.compress[path] = data;
|
|
29
|
-
}
|
|
30
|
-
res.end(output.raw[path]);
|
|
31
|
-
}
|
|
32
|
-
function compressOutput(req, res, buffer, path) {
|
|
33
|
-
res.setHeader('Vary', 'Accept-Encoding');
|
|
34
|
-
let acceptEncoding = req.headers['accept-encoding'];
|
|
35
|
-
if (/gzip/.test(acceptEncoding)) {
|
|
36
|
-
res.writeHead(200, {
|
|
37
|
-
'Content-Encoding': 'gzip'
|
|
38
|
-
});
|
|
39
|
-
dealCompress(_zlib.default.gzipSync(buffer), path, res);
|
|
40
|
-
} else {
|
|
41
|
-
res.writeHead(200, {});
|
|
42
|
-
dealDirect(buffer, path, res);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = filterNamespace;
|
|
7
|
-
function filterNamespace(namespace) {
|
|
8
|
-
const ans = {};
|
|
9
|
-
if (typeof namespace === 'object') {
|
|
10
|
-
Object.keys(namespace).forEach(k => {
|
|
11
|
-
if (k !== 'expires') {
|
|
12
|
-
ans[k] = namespace[k];
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return ans;
|
|
17
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = formateHttpDate;
|
|
7
|
-
function formateHttpDate(date) {
|
|
8
|
-
let [week, month, day, year, time, zone] = date.toString().split(' ');
|
|
9
|
-
zone = zone.split('+')[0];
|
|
10
|
-
return month + ', ' + day + ' ' + month + ' ' + year + ' ' + time + ' ' + zone;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = formateHttpKey;
|
|
7
|
-
function formateHttpKey(key) {
|
|
8
|
-
return key.split('-').map(v => {
|
|
9
|
-
return v.substring(0, 1).toUpperCase() + v.substring(1, v.length);
|
|
10
|
-
}).join('-');
|
|
11
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = parseOption;
|
|
7
|
-
function isOption(string) {
|
|
8
|
-
let ans = true;
|
|
9
|
-
if (typeof string === 'string') {
|
|
10
|
-
let i = 0;
|
|
11
|
-
for (i = 0; i < 1; i += 1) {
|
|
12
|
-
if (string.charAt(i) === '-') {
|
|
13
|
-
break;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
if (i === 0) {
|
|
17
|
-
ans = false;
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
ans = false;
|
|
21
|
-
}
|
|
22
|
-
return ans;
|
|
23
|
-
}
|
|
24
|
-
function transformOption(value) {
|
|
25
|
-
let ans;
|
|
26
|
-
const s = value.split('-');
|
|
27
|
-
if (s.length >= 1) {
|
|
28
|
-
ans = s.map((e, i) => {
|
|
29
|
-
if (i === 0) {
|
|
30
|
-
return e;
|
|
31
|
-
} else {
|
|
32
|
-
return e.charAt(0).toUpperCase() + e.substring(1, e.length);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
} else {
|
|
36
|
-
ans = value;
|
|
37
|
-
}
|
|
38
|
-
return ans.join('');
|
|
39
|
-
}
|
|
40
|
-
function parseOption(...params) {
|
|
41
|
-
const ans = {};
|
|
42
|
-
for (let i = 0; i < params.length; i += 1) {
|
|
43
|
-
const param = params[i];
|
|
44
|
-
if (param.charAt(0) === '-') {
|
|
45
|
-
const regexp = /^\-([a-z])$/;
|
|
46
|
-
if (regexp.test(param)) {
|
|
47
|
-
const [_, k] = param.match(regexp);
|
|
48
|
-
if (isOption(params[i + 1])) {
|
|
49
|
-
ans[k] = params[i + 1];
|
|
50
|
-
i += 1;
|
|
51
|
-
} else {
|
|
52
|
-
ans[k] = true;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (param.charAt(1) === '-') {
|
|
56
|
-
const regexp = /^\-\-([a-z\-]+)$/;
|
|
57
|
-
if (regexp.test(param)) {
|
|
58
|
-
const [_, k] = param.match(regexp);
|
|
59
|
-
if (isOption(params[i + 1])) {
|
|
60
|
-
ans[transformOption(k)] = params[i + 1];
|
|
61
|
-
i += 1;
|
|
62
|
-
} else {
|
|
63
|
-
ans[k] = true;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return ans;
|
|
70
|
-
}
|
package/server/lib/readCookie.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = readCookie;
|
|
7
|
-
function readCookie(cookie) {
|
|
8
|
-
const cookies = {};
|
|
9
|
-
if (typeof cookie === 'string') {
|
|
10
|
-
cookie.split(';').forEach(i => {
|
|
11
|
-
const [key, value] = i.split('=');
|
|
12
|
-
cookies[key.trim()] = value;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
const namespaces = {};
|
|
16
|
-
Object.keys(cookies).forEach(k => {
|
|
17
|
-
const result = k.split('_');
|
|
18
|
-
if (result.length === 2) {
|
|
19
|
-
const [namespace, key] = result;
|
|
20
|
-
if (namespaces[namespace] === undefined) {
|
|
21
|
-
namespaces[namespace] = {};
|
|
22
|
-
}
|
|
23
|
-
namespaces[namespace][key] = cookies[k];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return namespaces;
|
|
27
|
-
}
|