initial commit
This commit is contained in:
commit
374620645c
2530 changed files with 351181 additions and 0 deletions
0
Icon
Normal file
0
Icon
Normal file
3
front/.env
Normal file
3
front/.env
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
VUE_APP_ZULIP_email=pub-bot@chat.hackersanddesigners.nl
|
||||
VUE_APP_ZULIP_key=qBue6PY3YaS6sk0q1rReNELMnFBEa1YE
|
||||
VUE_APP_ZULIP_site=https://chat.hackersanddesigners.nl
|
||||
23
front/.gitignore
vendored
Normal file
23
front/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
#/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
24
front/README.md
Normal file
24
front/README.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# front
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
5
front/babel.config.js
Normal file
5
front/babel.config.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
1
front/dist/css/app.df5afef5.css
vendored
Normal file
1
front/dist/css/app.df5afef5.css
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
header{box-sizing:border-box}header,nav{margin:1em}li,ul{padding:0}li{list-style:none}:root{--back:#fff}#app,body,html{padding:0;margin:0;background:var(--back)}#app,body,html{height:100%;width:100%}#app{display:flex;font-size:11pt}.side{flex-shrink:0}main{margin:1em}#home{box-sizing:border-box;position:relative;height:100%;width:100%}.semanticList{font-size:inherit}td{padding:1em;padding-bottom:0}th{text-align:left}
|
||||
BIN
front/dist/favicon.ico
vendored
Normal file
BIN
front/dist/favicon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
1
front/dist/index.html
vendored
Normal file
1
front/dist/index.html
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>front</title><link href="/css/app.df5afef5.css" rel="preload" as="style"><link href="/js/app.c19dbb12.js" rel="preload" as="script"><link href="/js/chunk-vendors.72421b42.js" rel="preload" as="script"><link href="/css/app.df5afef5.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.72421b42.js"></script><script src="/js/app.c19dbb12.js"></script></body></html>
|
||||
2
front/dist/js/app.c19dbb12.js
vendored
Normal file
2
front/dist/js/app.c19dbb12.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
front/dist/js/app.c19dbb12.js.map
vendored
Normal file
1
front/dist/js/app.c19dbb12.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
14
front/dist/js/chunk-vendors.72421b42.js
vendored
Normal file
14
front/dist/js/chunk-vendors.72421b42.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
front/dist/js/chunk-vendors.72421b42.js.map
vendored
Normal file
1
front/dist/js/chunk-vendors.72421b42.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
12456
front/package-lock.json
generated
Normal file
12456
front/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
49
front/package.json
Normal file
49
front/package.json
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"name": "front",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"core-js": "^3.6.5",
|
||||
"markdown-it": "^12.0.6",
|
||||
"moment": "^2.29.1",
|
||||
"vue": "^3.1.1",
|
||||
"vue-router": "^4.0.8",
|
||||
"vue3-markdown-it": "^1.0.9",
|
||||
"vuex": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"@vue/compiler-sfc": "^3.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^7.0.0",
|
||||
"zulip-js": "^2.0.9"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
BIN
front/public/favicon.ico
Normal file
BIN
front/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
17
front/public/index.html
Normal file
17
front/public/index.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
214
front/src/App.vue
Normal file
214
front/src/App.vue
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<div id="app" :class="{ mobile: isMobile }">
|
||||
<!-- <header>
|
||||
<code>Zulip URL: {{ api.zulip.config.realm }}</code>
|
||||
</header> -->
|
||||
<main>
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="component-fade" mode="out-in">
|
||||
<component :is="Component" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import api from './api'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
api: api,
|
||||
zulipClient: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'isMobile',
|
||||
'pubStr'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.$store.commit('setMobile', this.checkIfMobile())
|
||||
window.addEventListener('resize', () => {
|
||||
this.$store.commit('setMobile', this.checkIfMobile())
|
||||
})
|
||||
|
||||
this.getStreams()
|
||||
|
||||
this.$router.afterEach(to => {
|
||||
const stream = to.path.replace('/', '')
|
||||
if (stream != '') {
|
||||
this.setUpDoc(stream)
|
||||
} else {
|
||||
this.$store.commit('setContents', [])
|
||||
this.$store.commit('setRules', [])
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
|
||||
checkIfMobile: () => window.innerWidth < 700,
|
||||
|
||||
getStreams() {
|
||||
api.zulip
|
||||
.init()
|
||||
.then(client => {
|
||||
this.zulipClient = client
|
||||
api.zulip
|
||||
.getStreams(client)
|
||||
.then(result => {
|
||||
this.$store.commit( 'setStreams',
|
||||
result
|
||||
.streams
|
||||
.filter(
|
||||
s => s.name.startsWith(this.pubStr)
|
||||
)
|
||||
)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
setUpDoc(stream) {
|
||||
|
||||
api.zulip
|
||||
.getMsgs(this.zulipClient, stream, 'content')
|
||||
.then(result => {
|
||||
this.$store.commit('setContents',
|
||||
result
|
||||
.messages
|
||||
)
|
||||
})
|
||||
|
||||
api.zulip
|
||||
.getMsgs(this.zulipClient, stream, 'rules')
|
||||
.then(result => {
|
||||
this.$store.commit('setRules',
|
||||
result
|
||||
.messages
|
||||
.map(m =>
|
||||
this.toCSS(m)
|
||||
)
|
||||
)
|
||||
})
|
||||
|
||||
api.zulip.listen(this.zulipClient)
|
||||
|
||||
},
|
||||
|
||||
toCSS(poll) {
|
||||
let
|
||||
className = '',
|
||||
emoji_code = '',
|
||||
options = [],
|
||||
rules = [],
|
||||
subs = poll
|
||||
.submessages
|
||||
.map(s => JSON.parse(s.content))
|
||||
|
||||
subs
|
||||
.forEach(sub => {
|
||||
// console.log(sub)
|
||||
if (sub.widget_type && sub.widget_type == 'poll') {
|
||||
className = sub.extra_data.question
|
||||
emoji_code = this.toEmojiCode(className)
|
||||
console.log(emoji_code)
|
||||
options = sub.extra_data.options
|
||||
if (options) {
|
||||
options.forEach(option => {
|
||||
rules.push(this.constructRule(option, options, subs))
|
||||
})
|
||||
}
|
||||
} else if (sub.type && sub.type == 'new_option') {
|
||||
rules.push(this.constructRule(sub.option, options, subs))
|
||||
}
|
||||
})
|
||||
return { className, emoji_code, rules }
|
||||
},
|
||||
|
||||
constructRule(option, options, subs) {
|
||||
const
|
||||
text = option,
|
||||
votes = subs.filter(s => (
|
||||
s.type == 'vote' &&
|
||||
s.key.replace('canned,', '') == options.indexOf(option)
|
||||
)),
|
||||
weight = votes.length > 0 ? votes
|
||||
.map(s => s.vote)
|
||||
.reduce((a,b) => a + b) : 0
|
||||
return { text, weight }
|
||||
},
|
||||
|
||||
toEmojiCode: emoji => emoji.replace(
|
||||
/\p{Emoji}/ug,
|
||||
m => m.codePointAt(0).toString(16)
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
:root {
|
||||
--back: white;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
height: 100%; width: 100%;
|
||||
padding: 0; margin: 0;
|
||||
background: var(--back);
|
||||
}
|
||||
|
||||
#app {
|
||||
position: relative;
|
||||
height: 100%; width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 11pt;
|
||||
|
||||
/* flex-direction: column; */
|
||||
}
|
||||
|
||||
header {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
main {
|
||||
position: relative;
|
||||
height: 100%; width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
section {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
margin-left: 1em;
|
||||
min-width: 500px;
|
||||
max-width: 800px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
section .title {
|
||||
font-weight: bold;
|
||||
position: sticky;
|
||||
top: 1em;
|
||||
}
|
||||
</style>
|
||||
7
front/src/api/index.js
Normal file
7
front/src/api/index.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import resources from './resources'
|
||||
import zulip from './zulip'
|
||||
|
||||
export default {
|
||||
resources,
|
||||
zulip
|
||||
}
|
||||
43
front/src/api/resources/index.js
Normal file
43
front/src/api/resources/index.js
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import axios from 'axios'
|
||||
// import {
|
||||
// toObject,
|
||||
// sortAlphabetically,
|
||||
// sortByUpdate
|
||||
// } from '../utils'
|
||||
|
||||
const
|
||||
|
||||
URL = process.env.VUE_APP_API + '/',
|
||||
|
||||
getAll = () => {
|
||||
return new Promise ((resolve, reject) => axios
|
||||
.get(URL + 'resources')
|
||||
.then(response =>
|
||||
resolve(
|
||||
response
|
||||
)
|
||||
)
|
||||
.catch(error =>
|
||||
reject(
|
||||
error
|
||||
)
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
getTicker = () => {
|
||||
return new Promise ((resolve, reject) => axios
|
||||
.get(URL + 'ticker')
|
||||
.then(response => resolve(
|
||||
response.data
|
||||
))
|
||||
.catch(error => reject(
|
||||
error
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
getTicker,
|
||||
getAll
|
||||
}
|
||||
31
front/src/api/utils.js
Normal file
31
front/src/api/utils.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
const
|
||||
|
||||
toObject = (arr, key) => (
|
||||
arr.reduce((res, a) => {
|
||||
res[a[key]] = a
|
||||
return res
|
||||
}, {})
|
||||
),
|
||||
|
||||
sortAlphabetically = (arr, prop) => {
|
||||
arr = Array.isArray(arr) ? arr : Object.values(arr)
|
||||
return arr.sort((a, b) => {
|
||||
const
|
||||
aText = prop === 'Name'
|
||||
? a[prop].split(' ')[a[prop].split(' ').length - 1]
|
||||
: a[prop],
|
||||
bText = prop === 'Name'
|
||||
? b[prop].split(' ')[b[prop].split(' ').length - 1]
|
||||
: b[prop]
|
||||
return aText.localeCompare(bText)
|
||||
})
|
||||
},
|
||||
|
||||
sortByUpdate = (arr) => {
|
||||
arr = Array.isArray(arr) ? arr : Object.values(arr)
|
||||
return arr.sort((a, b) => (
|
||||
new Date(b.updated_at) - new Date(a.updated_at)
|
||||
))
|
||||
}
|
||||
|
||||
export { toObject, sortAlphabetically, sortByUpdate }
|
||||
91
front/src/api/zulip/index.js
Normal file
91
front/src/api/zulip/index.js
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
const
|
||||
|
||||
zulip = require("zulip-js"),
|
||||
config = {
|
||||
username: process.env.VUE_APP_ZULIP_email,
|
||||
apiKey: process.env.VUE_APP_ZULIP_key,
|
||||
realm: process.env.VUE_APP_ZULIP_site,
|
||||
},
|
||||
|
||||
init = () => ( new
|
||||
Promise((resolve, reject) => {
|
||||
zulip(config)
|
||||
.then(client => resolve(client))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
getStreams = (client) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.streams.retrieve()
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
getMsgs = (client, stream, topic, params) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.messages.retrieve(params || {
|
||||
anchor: "newest",
|
||||
num_before: 100,
|
||||
num_after: 0,
|
||||
// apply_markdown: false,
|
||||
narrow: [
|
||||
{ operator: "stream", operand: stream },
|
||||
{ operator: "topic", operand: topic },
|
||||
],
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
listen = client => {
|
||||
client.callOnEachEvent(
|
||||
event => console.log('Got Event:', event),
|
||||
[ 'message' ],
|
||||
[ { operator: "stream", operand: "chatty" } ]
|
||||
)
|
||||
},
|
||||
|
||||
getSubs = client => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.streams.subscriptions.retrieve()
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
addSub = (client, stream) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.users.me.subscriptions.add({
|
||||
subscriptions: JSON.stringify([{ name: stream }]),
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
sendMsg = (client, params) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.messages.send(params || {
|
||||
to: "chatty",
|
||||
type: "stream",
|
||||
topic: "content",
|
||||
content: "I come not, friends, to steal away your hearts.",
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
)
|
||||
|
||||
export default {
|
||||
init,
|
||||
config,
|
||||
getStreams,
|
||||
getMsgs,
|
||||
listen,
|
||||
sendMsg,
|
||||
getSubs,
|
||||
addSub,
|
||||
}
|
||||
4
front/src/api/zulip/zuliprc
Normal file
4
front/src/api/zulip/zuliprc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[api]
|
||||
email=pub-bot@chat.hackersanddesigners.nl
|
||||
key=qBue6PY3YaS6sk0q1rReNELMnFBEa1YE
|
||||
site=https://chat.hackersanddesigners.nl
|
||||
BIN
front/src/assets/logo.png
Normal file
BIN
front/src/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
68
front/src/components/Content/Message.vue
Normal file
68
front/src/components/Content/Message.vue
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<template>
|
||||
<span
|
||||
:class="classes"
|
||||
:style="styles"
|
||||
>
|
||||
<!-- {{ $md.renderInline(content) }} -->
|
||||
<vue3-markdown-it
|
||||
:source="content"
|
||||
v-bind="$mdOpts"
|
||||
></vue3-markdown-it>
|
||||
</span>
|
||||
<!-- <div v-html="content"/> -->
|
||||
<!-- {{ content }} -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Header',
|
||||
props: [
|
||||
'message'
|
||||
],
|
||||
computed: {
|
||||
rawJSON() {
|
||||
return '```json\n' + JSON.stringify(this.message, null, 2) + '\n```'
|
||||
},
|
||||
content() {
|
||||
return (
|
||||
this
|
||||
.message
|
||||
.content
|
||||
.replace('\n', '<br/>')
|
||||
)
|
||||
},
|
||||
classes() {
|
||||
return (
|
||||
this
|
||||
.message
|
||||
.reactions
|
||||
.map(r => 'u' + r.emoji_code)
|
||||
)
|
||||
},
|
||||
styles() {
|
||||
return (
|
||||
this
|
||||
.$store
|
||||
.state
|
||||
.rules
|
||||
.filter(r => this.classes.includes('u' + r.emoji_code))
|
||||
.map(r => r.rules)
|
||||
.flat()
|
||||
.map(s => s.text)
|
||||
)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
console.log(this.message.content)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
header {
|
||||
box-sizing: border-box;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
66
front/src/components/Content/index.vue
Normal file
66
front/src/components/Content/index.vue
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<section class="content">
|
||||
<p class="title">{{ $.type.name }}</p>
|
||||
<!-- <vue-html2pdf
|
||||
:show-layout="false"
|
||||
:float-layout="true"
|
||||
:enable-download="true"
|
||||
:preview-modal="true"
|
||||
:paginate-elements-by-height="1400"
|
||||
filename="hee hee"
|
||||
:pdf-quality="2"
|
||||
:manual-pagination="false"
|
||||
pdf-format="a5"
|
||||
pdf-orientation="portrait"
|
||||
pdf-content-width="800px"
|
||||
|
||||
@progress="onProgress($event)"
|
||||
@hasStartedGeneration="hasStartedGeneration()"
|
||||
@hasGenerated="hasGenerated($event)"
|
||||
ref="body"
|
||||
> -->
|
||||
<div class="body">
|
||||
<span
|
||||
v-for="message in contents"
|
||||
:key="message.id"
|
||||
>
|
||||
<Message
|
||||
:message="message"
|
||||
/>
|
||||
<span> </span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- </vue-html2pdf> -->
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
// import VueHtml2pdf from 'vue-html2pdf'
|
||||
import Message from './Message'
|
||||
|
||||
export default {
|
||||
name: 'Content',
|
||||
components: {
|
||||
Message,
|
||||
// VueHtml2psdf
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'contents',
|
||||
'rules'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
toPDF() {
|
||||
this.$refs.body.generatePdf()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
section {
|
||||
max-width: 700px;
|
||||
}
|
||||
</style>
|
||||
74
front/src/components/Nav.vue
Normal file
74
front/src/components/Nav.vue
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
.<template>
|
||||
<nav>
|
||||
|
||||
<ul class="collections">
|
||||
<li
|
||||
v-for="collection in collections"
|
||||
:key="collection.slug"
|
||||
>
|
||||
<router-link :to="collection.slug">
|
||||
{{ collection.name }}
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="singles">
|
||||
<li
|
||||
v-for="single in singles"
|
||||
:key="single.slug"
|
||||
>
|
||||
<router-link :to="single.slug">
|
||||
{{ single.name }}
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Nav',
|
||||
data() {
|
||||
return {
|
||||
collections: [
|
||||
{
|
||||
name: 'resources',
|
||||
slug: 'resources'
|
||||
},
|
||||
{
|
||||
name: 'artworks',
|
||||
slug: 'artworks'
|
||||
},
|
||||
],
|
||||
singles: [
|
||||
{
|
||||
name: 'about',
|
||||
slug: 'about'
|
||||
},
|
||||
{
|
||||
name: 'contact',
|
||||
slug: 'contact'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
nav {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
38
front/src/components/Rules/Rule.vue
Normal file
38
front/src/components/Rules/Rule.vue
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<!-- <span>
|
||||
<vue3-markdown-it
|
||||
:source="rawJSON"
|
||||
inline
|
||||
></vue3-markdown-it>
|
||||
</span> -->
|
||||
<code class="rule">
|
||||
<p>{{ rule.className }} {</p>
|
||||
<p
|
||||
v-for="dec in rule.rules"
|
||||
:key="dec.text"
|
||||
> {{ dec.text }}</p>
|
||||
<p>}</p>
|
||||
</code>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Rule',
|
||||
props: [
|
||||
'rule'
|
||||
],
|
||||
computed: {
|
||||
rawJSON() {
|
||||
return '```json\n' + JSON.stringify(this.rule, null, 2) + '\n```'
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.rule p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
30
front/src/components/Rules/index.vue
Normal file
30
front/src/components/Rules/index.vue
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<section class="rules">
|
||||
<p class="title">{{ $.type.name }}</p>
|
||||
<Rule
|
||||
v-for="rule in rules"
|
||||
:key="rule.id"
|
||||
:rule="rule"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import Rule from './Rule'
|
||||
|
||||
export default {
|
||||
name: 'Rules',
|
||||
components: {
|
||||
Rule
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'rules',
|
||||
])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
65
front/src/components/SemanticList.vue
Normal file
65
front/src/components/SemanticList.vue
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<template>
|
||||
<div class="semanticList body">
|
||||
<span :class="name + 's'">
|
||||
<!-- <span v-if="title"> {{ title }} </span> -->
|
||||
<span
|
||||
:class="name"
|
||||
v-for="item in list"
|
||||
:key="item.hash"
|
||||
>
|
||||
<a
|
||||
:href="`${$apiURL}/${item.url}`"
|
||||
target="_blank"
|
||||
class="name"
|
||||
>{{ item.name }}</a>
|
||||
<span v-if="title && isLast(item, list)">. </span>
|
||||
<span v-else-if="isBeforeLast(item, list)"> and </span>
|
||||
<span v-else-if="title">, </span>
|
||||
<span v-else-if="!title && isLast(item, list)"> </span>
|
||||
<span v-else >, </span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'SemanticList',
|
||||
props: [
|
||||
'list',
|
||||
'name',
|
||||
'collection'
|
||||
],
|
||||
computed: {
|
||||
title() {
|
||||
return (
|
||||
this.name
|
||||
)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
isLast: (item, array) => (
|
||||
array.indexOf(item) === array.length - 1
|
||||
),
|
||||
isBeforeLast: (item, array) => (
|
||||
array.indexOf(item) === array.length - 2
|
||||
),
|
||||
alphabetical: array => (
|
||||
array.sort((a, b) => a.Name.length - b.Name.length)
|
||||
),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.semanticList {
|
||||
font-size: inherit;
|
||||
}
|
||||
a,
|
||||
a:visited,
|
||||
a:active,
|
||||
a:hover {
|
||||
/* color: unset; */
|
||||
/* text-decoration: none; */
|
||||
}
|
||||
</style>
|
||||
29
front/src/components/Streams/Stream.vue
Normal file
29
front/src/components/Streams/Stream.vue
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- {{ $md.renderInline(rawJSON) }} -->
|
||||
<p class="name">
|
||||
<router-link :to="stream.name">
|
||||
{{ stream.name }}
|
||||
</router-link>
|
||||
</p>
|
||||
<!-- <p class="desc">{{ stream.description }}</p> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Stream',
|
||||
props: [
|
||||
'stream'
|
||||
],
|
||||
computed: {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
33
front/src/components/Streams/index.vue
Normal file
33
front/src/components/Streams/index.vue
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<template>
|
||||
<section class="streams">
|
||||
<p class="title">{{ $.type.name }}</p>
|
||||
<Stream
|
||||
v-for="stream in streams"
|
||||
:key="stream.id"
|
||||
:stream="stream"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import Stream from './Stream'
|
||||
|
||||
export default {
|
||||
name: 'Streams',
|
||||
components: {
|
||||
Stream
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'streams',
|
||||
])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
section {
|
||||
min-width: 6em;
|
||||
}
|
||||
</style>
|
||||
49
front/src/components/TagList.vue
Normal file
49
front/src/components/TagList.vue
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div class="taglist body">
|
||||
<span
|
||||
v-for="item in list"
|
||||
:key="item.slug"
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: collection,
|
||||
query: { tag: item.slug }
|
||||
}"
|
||||
>
|
||||
{{ item.Name }}
|
||||
</router-link>
|
||||
<span v-if="!isLast(item, list)">, </span>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'SemanticList',
|
||||
props: [
|
||||
'list',
|
||||
'name',
|
||||
'collection'
|
||||
],
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
isLast: (item, array) => (
|
||||
array.indexOf(item) === array.length - 1
|
||||
),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.semanticList {
|
||||
font-size: inherit;
|
||||
}
|
||||
a,
|
||||
a:visited,
|
||||
a:active,
|
||||
a:hover {
|
||||
/* color: unset; */
|
||||
/* text-decoration: none; */
|
||||
}
|
||||
</style>
|
||||
30
front/src/main.js
Normal file
30
front/src/main.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { createApp } from 'vue'
|
||||
import App from './App'
|
||||
import Axios from 'axios'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import VueMarkdownIt from 'vue3-markdown-it'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
|
||||
import 'highlight.js/styles/vs.css';
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
const mdOpts = {
|
||||
html: true,
|
||||
linkify: true,
|
||||
typographer: true
|
||||
}
|
||||
|
||||
app.config.globalProperties.$http = Axios
|
||||
app.config.globalProperties.$mdOpts = mdOpts
|
||||
app.config.globalProperties.$md = new MarkdownIt(mdOpts)
|
||||
|
||||
app
|
||||
.use(VueMarkdownIt)
|
||||
.use(router)
|
||||
.use(store)
|
||||
.mount('#app')
|
||||
|
||||
|
||||
|
||||
23
front/src/router/index.js
Normal file
23
front/src/router/index.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
import Home from '../views/Home'
|
||||
|
||||
const path = '/'
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHistory(path),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home,
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: 'Home',
|
||||
component: Home,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
36
front/src/store/index.js
Normal file
36
front/src/store/index.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { createStore } from 'vuex'
|
||||
|
||||
export default createStore({
|
||||
|
||||
strict: process.env.NODE_ENV !== 'production',
|
||||
|
||||
state: {
|
||||
isMobile : false,
|
||||
streams : [],
|
||||
contents : {},
|
||||
rules : [],
|
||||
pubStr: 'pub-',
|
||||
},
|
||||
|
||||
mutations: {
|
||||
setMobile : (state, mobile) => state.isMobile = mobile,
|
||||
setStreams : (state, streams) => state.streams = streams,
|
||||
setContents : (state, messages) => state.contents = messages,
|
||||
setRules : (state, messages) => state.rules = messages,
|
||||
selectTag : (state, tag) => state.selectedTag = tag,
|
||||
},
|
||||
|
||||
actions: {
|
||||
},
|
||||
|
||||
getters: {
|
||||
filteredResources: state => ( state
|
||||
.resources
|
||||
.filter(r => (
|
||||
r.tags.indexOf(state.selectedTag > -1)
|
||||
))
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
})
|
||||
35
front/src/views/Home.vue
Normal file
35
front/src/views/Home.vue
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div id="home">
|
||||
<Streams />
|
||||
<Content />
|
||||
<Rules />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Streams from '../components/Streams'
|
||||
import Content from '../components/Content'
|
||||
import Rules from '../components/Rules'
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
Streams,
|
||||
Content,
|
||||
Rules,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
#home {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
9
front/vue.config.js
Normal file
9
front/vue.config.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
configureWebpack: {
|
||||
resolve: {
|
||||
alias: {
|
||||
moment: 'moment/src/moment'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
101
index.js
Normal file
101
index.js
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
const
|
||||
zulip = require("zulip-js"),
|
||||
config = { zuliprc: "zuliprc" },
|
||||
|
||||
init = () => ( new
|
||||
Promise((resolve, reject) => {
|
||||
zulip(config)
|
||||
.then(client => resolve(client))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
sendMsg = (client, params) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.messages.send(params || {
|
||||
to: "chatty",
|
||||
type: "stream",
|
||||
topic: "content",
|
||||
content: "I come not, friends, to steal away your hearts.",
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
getMsgs = (client, params) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.messages.retrieve(params || {
|
||||
anchor: "newest",
|
||||
num_before: 100,
|
||||
num_after: 0,
|
||||
narrow: [
|
||||
// { operator: "sender", operand: "karl@hackersanddesigners.nl" },
|
||||
{ operator: "stream", operand: "chatty" },
|
||||
// { operator: "topic", operand: "rules" },
|
||||
],
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
regNotif = (client, params) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.queues.register(params || {
|
||||
event_types: ["message"],
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
),
|
||||
|
||||
getNotif = (client, params) => ( new
|
||||
Promise((resolve, reject) => {
|
||||
client.events.retrieve(params || {
|
||||
queue_id: '1624161658:64',
|
||||
last_event_id: -1,
|
||||
dont_block: true,
|
||||
})
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
})
|
||||
)
|
||||
|
||||
init().then(client => {
|
||||
// sendMsg(client).then(result => console.log(result))
|
||||
// getMsgs(client).then(result => {
|
||||
// console.log(result)
|
||||
// const messagesWithReactions = result
|
||||
// .messages
|
||||
// .filter(m => (
|
||||
// m.reactions.length > 0
|
||||
// ))
|
||||
// console.log(messagesWithReactions[0].reactions)
|
||||
// const messagesWithSubs = result
|
||||
// .messages
|
||||
// .filter(m => (
|
||||
// m.submessages.length > 0
|
||||
// ))
|
||||
// console.log(messagesWithSubs)
|
||||
// result.messages.forEach(m =>
|
||||
// console.log(m.submessages)
|
||||
// )
|
||||
// })
|
||||
// regNotif(client).then(result => {
|
||||
// console.log(result)
|
||||
// })
|
||||
getNotif(client).then(result => {
|
||||
console.log(result)
|
||||
})
|
||||
})
|
||||
|
||||
// (async () => {
|
||||
// const user_id = 9;
|
||||
// params = {
|
||||
// to: [user_id],
|
||||
// type: "private",
|
||||
// content: "With mirth and laughter let old wrinkles come.",
|
||||
// };
|
||||
// console.log(await client.messages.send(params));
|
||||
// })();
|
||||
1
node_modules/.bin/acorn
generated
vendored
Symbolic link
1
node_modules/.bin/acorn
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../acorn/bin/acorn
|
||||
1
node_modules/.bin/escodegen
generated
vendored
Symbolic link
1
node_modules/.bin/escodegen
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../escodegen/bin/escodegen.js
|
||||
1
node_modules/.bin/esgenerate
generated
vendored
Symbolic link
1
node_modules/.bin/esgenerate
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../escodegen/bin/esgenerate.js
|
||||
1
node_modules/.bin/esparse
generated
vendored
Symbolic link
1
node_modules/.bin/esparse
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../esprima/bin/esparse.js
|
||||
1
node_modules/.bin/esvalidate
generated
vendored
Symbolic link
1
node_modules/.bin/esvalidate
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../esprima/bin/esvalidate.js
|
||||
1
node_modules/.bin/sshpk-conv
generated
vendored
Symbolic link
1
node_modules/.bin/sshpk-conv
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../sshpk/bin/sshpk-conv
|
||||
1
node_modules/.bin/sshpk-sign
generated
vendored
Symbolic link
1
node_modules/.bin/sshpk-sign
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../sshpk/bin/sshpk-sign
|
||||
1
node_modules/.bin/sshpk-verify
generated
vendored
Symbolic link
1
node_modules/.bin/sshpk-verify
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../sshpk/bin/sshpk-verify
|
||||
1
node_modules/.bin/uuid
generated
vendored
Symbolic link
1
node_modules/.bin/uuid
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../uuid/bin/uuid
|
||||
22
node_modules/@babel/runtime/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/runtime/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
19
node_modules/@babel/runtime/README.md
generated
vendored
Normal file
19
node_modules/@babel/runtime/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# @babel/runtime
|
||||
|
||||
> babel's modular runtime helpers
|
||||
|
||||
See our website [@babel/runtime](https://babeljs.io/docs/en/babel-runtime) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/runtime
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/runtime
|
||||
```
|
||||
99
node_modules/@babel/runtime/helpers/AsyncGenerator.js
generated
vendored
Normal file
99
node_modules/@babel/runtime/helpers/AsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
var AwaitValue = require("./AwaitValue.js");
|
||||
|
||||
function AsyncGenerator(gen) {
|
||||
var front, back;
|
||||
|
||||
function send(key, arg) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var request = {
|
||||
key: key,
|
||||
arg: arg,
|
||||
resolve: resolve,
|
||||
reject: reject,
|
||||
next: null
|
||||
};
|
||||
|
||||
if (back) {
|
||||
back = back.next = request;
|
||||
} else {
|
||||
front = back = request;
|
||||
resume(key, arg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function resume(key, arg) {
|
||||
try {
|
||||
var result = gen[key](arg);
|
||||
var value = result.value;
|
||||
var wrappedAwait = value instanceof AwaitValue;
|
||||
Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
|
||||
if (wrappedAwait) {
|
||||
resume(key === "return" ? "return" : "next", arg);
|
||||
return;
|
||||
}
|
||||
|
||||
settle(result.done ? "return" : "normal", arg);
|
||||
}, function (err) {
|
||||
resume("throw", err);
|
||||
});
|
||||
} catch (err) {
|
||||
settle("throw", err);
|
||||
}
|
||||
}
|
||||
|
||||
function settle(type, value) {
|
||||
switch (type) {
|
||||
case "return":
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: true
|
||||
});
|
||||
break;
|
||||
|
||||
case "throw":
|
||||
front.reject(value);
|
||||
break;
|
||||
|
||||
default:
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: false
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
front = front.next;
|
||||
|
||||
if (front) {
|
||||
resume(front.key, front.arg);
|
||||
} else {
|
||||
back = null;
|
||||
}
|
||||
}
|
||||
|
||||
this._invoke = send;
|
||||
|
||||
if (typeof gen["return"] !== "function") {
|
||||
this["return"] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype.next = function (arg) {
|
||||
return this._invoke("next", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["throw"] = function (arg) {
|
||||
return this._invoke("throw", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["return"] = function (arg) {
|
||||
return this._invoke("return", arg);
|
||||
};
|
||||
|
||||
module.exports = AsyncGenerator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/AwaitValue.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/AwaitValue.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _AwaitValue(value) {
|
||||
this.wrapped = value;
|
||||
}
|
||||
|
||||
module.exports = _AwaitValue;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
31
node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js
generated
vendored
Normal file
31
node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function (key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
desc.enumerable = !!desc.enumerable;
|
||||
desc.configurable = !!desc.configurable;
|
||||
|
||||
if ('value' in desc || desc.initializer) {
|
||||
desc.writable = true;
|
||||
}
|
||||
|
||||
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
||||
return decorator(target, property, desc) || desc;
|
||||
}, desc);
|
||||
|
||||
if (context && desc.initializer !== void 0) {
|
||||
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
||||
desc.initializer = undefined;
|
||||
}
|
||||
|
||||
if (desc.initializer === void 0) {
|
||||
Object.defineProperty(target, property, desc);
|
||||
desc = null;
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
module.exports = _applyDecoratedDescriptor;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
12
node_modules/@babel/runtime/helpers/arrayLikeToArray.js
generated
vendored
Normal file
12
node_modules/@babel/runtime/helpers/arrayLikeToArray.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
|
||||
module.exports = _arrayLikeToArray;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/arrayWithHoles.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/arrayWithHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
module.exports = _arrayWithHoles;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var arrayLikeToArray = require("./arrayLikeToArray.js");
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
||||
}
|
||||
|
||||
module.exports = _arrayWithoutHoles;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/assertThisInitialized.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/assertThisInitialized.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
module.exports = _assertThisInitialized;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
57
node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
generated
vendored
Normal file
57
node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
function _asyncGeneratorDelegate(inner, awaitWrap) {
|
||||
var iter = {},
|
||||
waiting = false;
|
||||
|
||||
function pump(key, value) {
|
||||
waiting = true;
|
||||
value = new Promise(function (resolve) {
|
||||
resolve(inner[key](value));
|
||||
});
|
||||
return {
|
||||
done: false,
|
||||
value: awaitWrap(value)
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
iter.next = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("next", value);
|
||||
};
|
||||
|
||||
if (typeof inner["throw"] === "function") {
|
||||
iter["throw"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
throw value;
|
||||
}
|
||||
|
||||
return pump("throw", value);
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof inner["return"] === "function") {
|
||||
iter["return"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("return", value);
|
||||
};
|
||||
}
|
||||
|
||||
return iter;
|
||||
}
|
||||
|
||||
module.exports = _asyncGeneratorDelegate;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
16
node_modules/@babel/runtime/helpers/asyncIterator.js
generated
vendored
Normal file
16
node_modules/@babel/runtime/helpers/asyncIterator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function _asyncIterator(iterable) {
|
||||
var method;
|
||||
|
||||
if (typeof Symbol !== "undefined") {
|
||||
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
||||
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
||||
}
|
||||
|
||||
if (method == null) method = iterable["@@asyncIterator"];
|
||||
if (method == null) method = iterable["@@iterator"];
|
||||
if (method == null) throw new TypeError("Object is not async iterable");
|
||||
return method.call(iterable);
|
||||
}
|
||||
|
||||
module.exports = _asyncIterator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
38
node_modules/@babel/runtime/helpers/asyncToGenerator.js
generated
vendored
Normal file
38
node_modules/@babel/runtime/helpers/asyncToGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
function _asyncToGenerator(fn) {
|
||||
return function () {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
||||
}
|
||||
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
||||
}
|
||||
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _asyncToGenerator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var AwaitValue = require("./AwaitValue.js");
|
||||
|
||||
function _awaitAsyncGenerator(value) {
|
||||
return new AwaitValue(value);
|
||||
}
|
||||
|
||||
module.exports = _awaitAsyncGenerator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
23
node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js
generated
vendored
Normal file
23
node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
function _classApplyDescriptorDestructureSet(receiver, descriptor) {
|
||||
if (descriptor.set) {
|
||||
if (!("__destrObj" in descriptor)) {
|
||||
descriptor.__destrObj = {
|
||||
set value(v) {
|
||||
descriptor.set.call(receiver, v);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
return descriptor.__destrObj;
|
||||
} else {
|
||||
if (!descriptor.writable) {
|
||||
throw new TypeError("attempted to set read only private field");
|
||||
}
|
||||
|
||||
return descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classApplyDescriptorDestructureSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classApplyDescriptorGet(receiver, descriptor) {
|
||||
if (descriptor.get) {
|
||||
return descriptor.get.call(receiver);
|
||||
}
|
||||
|
||||
return descriptor.value;
|
||||
}
|
||||
|
||||
module.exports = _classApplyDescriptorGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
14
node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js
generated
vendored
Normal file
14
node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function _classApplyDescriptorSet(receiver, descriptor, value) {
|
||||
if (descriptor.set) {
|
||||
descriptor.set.call(receiver, value);
|
||||
} else {
|
||||
if (!descriptor.writable) {
|
||||
throw new TypeError("attempted to set read only private field");
|
||||
}
|
||||
|
||||
descriptor.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classApplyDescriptorSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classCallCheck.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classCallCheck.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCallCheck;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _classCheckPrivateStaticAccess(receiver, classConstructor) {
|
||||
if (receiver !== classConstructor) {
|
||||
throw new TypeError("Private static access of wrong provenance");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCheckPrivateStaticAccess;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
|
||||
if (descriptor === undefined) {
|
||||
throw new TypeError("attempted to " + action + " private static field before its declaration");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCheckPrivateStaticFieldDescriptor;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to " + action + " private field on non-instance");
|
||||
}
|
||||
|
||||
return privateMap.get(receiver);
|
||||
}
|
||||
|
||||
module.exports = _classExtractFieldDescriptor;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/classNameTDZError.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/classNameTDZError.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _classNameTDZError(name) {
|
||||
throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys.");
|
||||
}
|
||||
|
||||
module.exports = _classNameTDZError;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
11
node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js
generated
vendored
Normal file
11
node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
|
||||
|
||||
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
|
||||
|
||||
function _classPrivateFieldDestructureSet(receiver, privateMap) {
|
||||
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
|
||||
return classApplyDescriptorDestructureSet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldDestructureSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
11
node_modules/@babel/runtime/helpers/classPrivateFieldGet.js
generated
vendored
Normal file
11
node_modules/@babel/runtime/helpers/classPrivateFieldGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
|
||||
|
||||
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
|
||||
|
||||
function _classPrivateFieldGet(receiver, privateMap) {
|
||||
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
|
||||
return classApplyDescriptorGet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classPrivateFieldBase(receiver, privateKey) {
|
||||
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
|
||||
throw new TypeError("attempted to use private field on non-instance");
|
||||
}
|
||||
|
||||
return receiver;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldBase;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var id = 0;
|
||||
|
||||
function _classPrivateFieldKey(name) {
|
||||
return "__private_" + id++ + "_" + name;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldKey;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
12
node_modules/@babel/runtime/helpers/classPrivateFieldSet.js
generated
vendored
Normal file
12
node_modules/@babel/runtime/helpers/classPrivateFieldSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
|
||||
|
||||
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
|
||||
|
||||
function _classPrivateFieldSet(receiver, privateMap, value) {
|
||||
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
|
||||
classApplyDescriptorSet(receiver, descriptor, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classPrivateMethodGet.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classPrivateMethodGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classPrivateMethodGet(receiver, privateSet, fn) {
|
||||
if (!privateSet.has(receiver)) {
|
||||
throw new TypeError("attempted to get private field on non-instance");
|
||||
}
|
||||
|
||||
return fn;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateMethodGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/classPrivateMethodSet.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/classPrivateMethodSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _classPrivateMethodSet() {
|
||||
throw new TypeError("attempted to reassign private method");
|
||||
}
|
||||
|
||||
module.exports = _classPrivateMethodSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js
generated
vendored
Normal file
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
|
||||
|
||||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
|
||||
function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
|
||||
return classApplyDescriptorDestructureSet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateFieldDestructureSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js
generated
vendored
Normal file
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
|
||||
|
||||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
|
||||
function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
classCheckPrivateStaticFieldDescriptor(descriptor, "get");
|
||||
return classApplyDescriptorGet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateFieldSpecGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
15
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js
generated
vendored
Normal file
15
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
|
||||
|
||||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
|
||||
function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
|
||||
classApplyDescriptorSet(receiver, descriptor, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateFieldSpecSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
9
node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js
generated
vendored
Normal file
9
node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
return method;
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateMethodGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _classStaticPrivateMethodSet() {
|
||||
throw new TypeError("attempted to set read only static private field");
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateMethodSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
26
node_modules/@babel/runtime/helpers/construct.js
generated
vendored
Normal file
26
node_modules/@babel/runtime/helpers/construct.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
var setPrototypeOf = require("./setPrototypeOf.js");
|
||||
|
||||
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
|
||||
|
||||
function _construct(Parent, args, Class) {
|
||||
if (isNativeReflectConstruct()) {
|
||||
module.exports = _construct = Reflect.construct;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
} else {
|
||||
module.exports = _construct = function _construct(Parent, args, Class) {
|
||||
var a = [null];
|
||||
a.push.apply(a, args);
|
||||
var Constructor = Function.bind.apply(Parent, a);
|
||||
var instance = new Constructor();
|
||||
if (Class) setPrototypeOf(instance, Class.prototype);
|
||||
return instance;
|
||||
};
|
||||
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
}
|
||||
|
||||
return _construct.apply(null, arguments);
|
||||
}
|
||||
|
||||
module.exports = _construct;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
18
node_modules/@babel/runtime/helpers/createClass.js
generated
vendored
Normal file
18
node_modules/@babel/runtime/helpers/createClass.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
module.exports = _createClass;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
61
node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
generated
vendored
Normal file
61
node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
|
||||
|
||||
function _createForOfIteratorHelper(o, allowArrayLike) {
|
||||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||||
|
||||
if (!it) {
|
||||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||||
if (it) o = it;
|
||||
var i = 0;
|
||||
|
||||
var F = function F() {};
|
||||
|
||||
return {
|
||||
s: F,
|
||||
n: function n() {
|
||||
if (i >= o.length) return {
|
||||
done: true
|
||||
};
|
||||
return {
|
||||
done: false,
|
||||
value: o[i++]
|
||||
};
|
||||
},
|
||||
e: function e(_e) {
|
||||
throw _e;
|
||||
},
|
||||
f: F
|
||||
};
|
||||
}
|
||||
|
||||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
var normalCompletion = true,
|
||||
didErr = false,
|
||||
err;
|
||||
return {
|
||||
s: function s() {
|
||||
it = it.call(o);
|
||||
},
|
||||
n: function n() {
|
||||
var step = it.next();
|
||||
normalCompletion = step.done;
|
||||
return step;
|
||||
},
|
||||
e: function e(_e2) {
|
||||
didErr = true;
|
||||
err = _e2;
|
||||
},
|
||||
f: function f() {
|
||||
try {
|
||||
if (!normalCompletion && it["return"] != null) it["return"]();
|
||||
} finally {
|
||||
if (didErr) throw err;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _createForOfIteratorHelper;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
25
node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js
generated
vendored
Normal file
25
node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
|
||||
|
||||
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
||||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||||
if (it) return (it = it.call(o)).next.bind(it);
|
||||
|
||||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||||
if (it) o = it;
|
||||
var i = 0;
|
||||
return function () {
|
||||
if (i >= o.length) return {
|
||||
done: true
|
||||
};
|
||||
return {
|
||||
done: false,
|
||||
value: o[i++]
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
module.exports = _createForOfIteratorHelperLoose;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
25
node_modules/@babel/runtime/helpers/createSuper.js
generated
vendored
Normal file
25
node_modules/@babel/runtime/helpers/createSuper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
var getPrototypeOf = require("./getPrototypeOf.js");
|
||||
|
||||
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
|
||||
|
||||
var possibleConstructorReturn = require("./possibleConstructorReturn.js");
|
||||
|
||||
function _createSuper(Derived) {
|
||||
var hasNativeReflectConstruct = isNativeReflectConstruct();
|
||||
return function _createSuperInternal() {
|
||||
var Super = getPrototypeOf(Derived),
|
||||
result;
|
||||
|
||||
if (hasNativeReflectConstruct) {
|
||||
var NewTarget = getPrototypeOf(this).constructor;
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return possibleConstructorReturn(this, result);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _createSuper;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
401
node_modules/@babel/runtime/helpers/decorate.js
generated
vendored
Normal file
401
node_modules/@babel/runtime/helpers/decorate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,401 @@
|
|||
var toArray = require("./toArray.js");
|
||||
|
||||
var toPropertyKey = require("./toPropertyKey.js");
|
||||
|
||||
function _decorate(decorators, factory, superClass, mixins) {
|
||||
var api = _getDecoratorsApi();
|
||||
|
||||
if (mixins) {
|
||||
for (var i = 0; i < mixins.length; i++) {
|
||||
api = mixins[i](api);
|
||||
}
|
||||
}
|
||||
|
||||
var r = factory(function initialize(O) {
|
||||
api.initializeInstanceElements(O, decorated.elements);
|
||||
}, superClass);
|
||||
var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
|
||||
api.initializeClassElements(r.F, decorated.elements);
|
||||
return api.runClassFinishers(r.F, decorated.finishers);
|
||||
}
|
||||
|
||||
function _getDecoratorsApi() {
|
||||
_getDecoratorsApi = function _getDecoratorsApi() {
|
||||
return api;
|
||||
};
|
||||
|
||||
var api = {
|
||||
elementsDefinitionOrder: [["method"], ["field"]],
|
||||
initializeInstanceElements: function initializeInstanceElements(O, elements) {
|
||||
["method", "field"].forEach(function (kind) {
|
||||
elements.forEach(function (element) {
|
||||
if (element.kind === kind && element.placement === "own") {
|
||||
this.defineClassElement(O, element);
|
||||
}
|
||||
}, this);
|
||||
}, this);
|
||||
},
|
||||
initializeClassElements: function initializeClassElements(F, elements) {
|
||||
var proto = F.prototype;
|
||||
["method", "field"].forEach(function (kind) {
|
||||
elements.forEach(function (element) {
|
||||
var placement = element.placement;
|
||||
|
||||
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
|
||||
var receiver = placement === "static" ? F : proto;
|
||||
this.defineClassElement(receiver, element);
|
||||
}
|
||||
}, this);
|
||||
}, this);
|
||||
},
|
||||
defineClassElement: function defineClassElement(receiver, element) {
|
||||
var descriptor = element.descriptor;
|
||||
|
||||
if (element.kind === "field") {
|
||||
var initializer = element.initializer;
|
||||
descriptor = {
|
||||
enumerable: descriptor.enumerable,
|
||||
writable: descriptor.writable,
|
||||
configurable: descriptor.configurable,
|
||||
value: initializer === void 0 ? void 0 : initializer.call(receiver)
|
||||
};
|
||||
}
|
||||
|
||||
Object.defineProperty(receiver, element.key, descriptor);
|
||||
},
|
||||
decorateClass: function decorateClass(elements, decorators) {
|
||||
var newElements = [];
|
||||
var finishers = [];
|
||||
var placements = {
|
||||
"static": [],
|
||||
prototype: [],
|
||||
own: []
|
||||
};
|
||||
elements.forEach(function (element) {
|
||||
this.addElementPlacement(element, placements);
|
||||
}, this);
|
||||
elements.forEach(function (element) {
|
||||
if (!_hasDecorators(element)) return newElements.push(element);
|
||||
var elementFinishersExtras = this.decorateElement(element, placements);
|
||||
newElements.push(elementFinishersExtras.element);
|
||||
newElements.push.apply(newElements, elementFinishersExtras.extras);
|
||||
finishers.push.apply(finishers, elementFinishersExtras.finishers);
|
||||
}, this);
|
||||
|
||||
if (!decorators) {
|
||||
return {
|
||||
elements: newElements,
|
||||
finishers: finishers
|
||||
};
|
||||
}
|
||||
|
||||
var result = this.decorateConstructor(newElements, decorators);
|
||||
finishers.push.apply(finishers, result.finishers);
|
||||
result.finishers = finishers;
|
||||
return result;
|
||||
},
|
||||
addElementPlacement: function addElementPlacement(element, placements, silent) {
|
||||
var keys = placements[element.placement];
|
||||
|
||||
if (!silent && keys.indexOf(element.key) !== -1) {
|
||||
throw new TypeError("Duplicated element (" + element.key + ")");
|
||||
}
|
||||
|
||||
keys.push(element.key);
|
||||
},
|
||||
decorateElement: function decorateElement(element, placements) {
|
||||
var extras = [];
|
||||
var finishers = [];
|
||||
|
||||
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
|
||||
var keys = placements[element.placement];
|
||||
keys.splice(keys.indexOf(element.key), 1);
|
||||
var elementObject = this.fromElementDescriptor(element);
|
||||
var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
|
||||
element = elementFinisherExtras.element;
|
||||
this.addElementPlacement(element, placements);
|
||||
|
||||
if (elementFinisherExtras.finisher) {
|
||||
finishers.push(elementFinisherExtras.finisher);
|
||||
}
|
||||
|
||||
var newExtras = elementFinisherExtras.extras;
|
||||
|
||||
if (newExtras) {
|
||||
for (var j = 0; j < newExtras.length; j++) {
|
||||
this.addElementPlacement(newExtras[j], placements);
|
||||
}
|
||||
|
||||
extras.push.apply(extras, newExtras);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
element: element,
|
||||
finishers: finishers,
|
||||
extras: extras
|
||||
};
|
||||
},
|
||||
decorateConstructor: function decorateConstructor(elements, decorators) {
|
||||
var finishers = [];
|
||||
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var obj = this.fromClassDescriptor(elements);
|
||||
var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
|
||||
|
||||
if (elementsAndFinisher.finisher !== undefined) {
|
||||
finishers.push(elementsAndFinisher.finisher);
|
||||
}
|
||||
|
||||
if (elementsAndFinisher.elements !== undefined) {
|
||||
elements = elementsAndFinisher.elements;
|
||||
|
||||
for (var j = 0; j < elements.length - 1; j++) {
|
||||
for (var k = j + 1; k < elements.length; k++) {
|
||||
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
|
||||
throw new TypeError("Duplicated element (" + elements[j].key + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
elements: elements,
|
||||
finishers: finishers
|
||||
};
|
||||
},
|
||||
fromElementDescriptor: function fromElementDescriptor(element) {
|
||||
var obj = {
|
||||
kind: element.kind,
|
||||
key: element.key,
|
||||
placement: element.placement,
|
||||
descriptor: element.descriptor
|
||||
};
|
||||
var desc = {
|
||||
value: "Descriptor",
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
||||
if (element.kind === "field") obj.initializer = element.initializer;
|
||||
return obj;
|
||||
},
|
||||
toElementDescriptors: function toElementDescriptors(elementObjects) {
|
||||
if (elementObjects === undefined) return;
|
||||
return toArray(elementObjects).map(function (elementObject) {
|
||||
var element = this.toElementDescriptor(elementObject);
|
||||
this.disallowProperty(elementObject, "finisher", "An element descriptor");
|
||||
this.disallowProperty(elementObject, "extras", "An element descriptor");
|
||||
return element;
|
||||
}, this);
|
||||
},
|
||||
toElementDescriptor: function toElementDescriptor(elementObject) {
|
||||
var kind = String(elementObject.kind);
|
||||
|
||||
if (kind !== "method" && kind !== "field") {
|
||||
throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
|
||||
}
|
||||
|
||||
var key = toPropertyKey(elementObject.key);
|
||||
var placement = String(elementObject.placement);
|
||||
|
||||
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
|
||||
throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
|
||||
}
|
||||
|
||||
var descriptor = elementObject.descriptor;
|
||||
this.disallowProperty(elementObject, "elements", "An element descriptor");
|
||||
var element = {
|
||||
kind: kind,
|
||||
key: key,
|
||||
placement: placement,
|
||||
descriptor: Object.assign({}, descriptor)
|
||||
};
|
||||
|
||||
if (kind !== "field") {
|
||||
this.disallowProperty(elementObject, "initializer", "A method descriptor");
|
||||
} else {
|
||||
this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
|
||||
this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
|
||||
this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
|
||||
element.initializer = elementObject.initializer;
|
||||
}
|
||||
|
||||
return element;
|
||||
},
|
||||
toElementFinisherExtras: function toElementFinisherExtras(elementObject) {
|
||||
var element = this.toElementDescriptor(elementObject);
|
||||
|
||||
var finisher = _optionalCallableProperty(elementObject, "finisher");
|
||||
|
||||
var extras = this.toElementDescriptors(elementObject.extras);
|
||||
return {
|
||||
element: element,
|
||||
finisher: finisher,
|
||||
extras: extras
|
||||
};
|
||||
},
|
||||
fromClassDescriptor: function fromClassDescriptor(elements) {
|
||||
var obj = {
|
||||
kind: "class",
|
||||
elements: elements.map(this.fromElementDescriptor, this)
|
||||
};
|
||||
var desc = {
|
||||
value: "Descriptor",
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
||||
return obj;
|
||||
},
|
||||
toClassDescriptor: function toClassDescriptor(obj) {
|
||||
var kind = String(obj.kind);
|
||||
|
||||
if (kind !== "class") {
|
||||
throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
|
||||
}
|
||||
|
||||
this.disallowProperty(obj, "key", "A class descriptor");
|
||||
this.disallowProperty(obj, "placement", "A class descriptor");
|
||||
this.disallowProperty(obj, "descriptor", "A class descriptor");
|
||||
this.disallowProperty(obj, "initializer", "A class descriptor");
|
||||
this.disallowProperty(obj, "extras", "A class descriptor");
|
||||
|
||||
var finisher = _optionalCallableProperty(obj, "finisher");
|
||||
|
||||
var elements = this.toElementDescriptors(obj.elements);
|
||||
return {
|
||||
elements: elements,
|
||||
finisher: finisher
|
||||
};
|
||||
},
|
||||
runClassFinishers: function runClassFinishers(constructor, finishers) {
|
||||
for (var i = 0; i < finishers.length; i++) {
|
||||
var newConstructor = (0, finishers[i])(constructor);
|
||||
|
||||
if (newConstructor !== undefined) {
|
||||
if (typeof newConstructor !== "function") {
|
||||
throw new TypeError("Finishers must return a constructor.");
|
||||
}
|
||||
|
||||
constructor = newConstructor;
|
||||
}
|
||||
}
|
||||
|
||||
return constructor;
|
||||
},
|
||||
disallowProperty: function disallowProperty(obj, name, objectType) {
|
||||
if (obj[name] !== undefined) {
|
||||
throw new TypeError(objectType + " can't have a ." + name + " property.");
|
||||
}
|
||||
}
|
||||
};
|
||||
return api;
|
||||
}
|
||||
|
||||
function _createElementDescriptor(def) {
|
||||
var key = toPropertyKey(def.key);
|
||||
var descriptor;
|
||||
|
||||
if (def.kind === "method") {
|
||||
descriptor = {
|
||||
value: def.value,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
};
|
||||
} else if (def.kind === "get") {
|
||||
descriptor = {
|
||||
get: def.value,
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
};
|
||||
} else if (def.kind === "set") {
|
||||
descriptor = {
|
||||
set: def.value,
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
};
|
||||
} else if (def.kind === "field") {
|
||||
descriptor = {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
enumerable: true
|
||||
};
|
||||
}
|
||||
|
||||
var element = {
|
||||
kind: def.kind === "field" ? "field" : "method",
|
||||
key: key,
|
||||
placement: def["static"] ? "static" : def.kind === "field" ? "own" : "prototype",
|
||||
descriptor: descriptor
|
||||
};
|
||||
if (def.decorators) element.decorators = def.decorators;
|
||||
if (def.kind === "field") element.initializer = def.value;
|
||||
return element;
|
||||
}
|
||||
|
||||
function _coalesceGetterSetter(element, other) {
|
||||
if (element.descriptor.get !== undefined) {
|
||||
other.descriptor.get = element.descriptor.get;
|
||||
} else {
|
||||
other.descriptor.set = element.descriptor.set;
|
||||
}
|
||||
}
|
||||
|
||||
function _coalesceClassElements(elements) {
|
||||
var newElements = [];
|
||||
|
||||
var isSameElement = function isSameElement(other) {
|
||||
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
|
||||
};
|
||||
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
var element = elements[i];
|
||||
var other;
|
||||
|
||||
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
|
||||
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
|
||||
if (_hasDecorators(element) || _hasDecorators(other)) {
|
||||
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
|
||||
}
|
||||
|
||||
other.descriptor = element.descriptor;
|
||||
} else {
|
||||
if (_hasDecorators(element)) {
|
||||
if (_hasDecorators(other)) {
|
||||
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
|
||||
}
|
||||
|
||||
other.decorators = element.decorators;
|
||||
}
|
||||
|
||||
_coalesceGetterSetter(element, other);
|
||||
}
|
||||
} else {
|
||||
newElements.push(element);
|
||||
}
|
||||
}
|
||||
|
||||
return newElements;
|
||||
}
|
||||
|
||||
function _hasDecorators(element) {
|
||||
return element.decorators && element.decorators.length;
|
||||
}
|
||||
|
||||
function _isDataDescriptor(desc) {
|
||||
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
|
||||
}
|
||||
|
||||
function _optionalCallableProperty(obj, name) {
|
||||
var value = obj[name];
|
||||
|
||||
if (value !== undefined && typeof value !== "function") {
|
||||
throw new TypeError("Expected '" + name + "' to be a function");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
module.exports = _decorate;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
17
node_modules/@babel/runtime/helpers/defaults.js
generated
vendored
Normal file
17
node_modules/@babel/runtime/helpers/defaults.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function _defaults(obj, defaults) {
|
||||
var keys = Object.getOwnPropertyNames(defaults);
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
var value = Object.getOwnPropertyDescriptor(defaults, key);
|
||||
|
||||
if (value && value.configurable && obj[key] === undefined) {
|
||||
Object.defineProperty(obj, key, value);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defaults;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
25
node_modules/@babel/runtime/helpers/defineEnumerableProperties.js
generated
vendored
Normal file
25
node_modules/@babel/runtime/helpers/defineEnumerableProperties.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
function _defineEnumerableProperties(obj, descs) {
|
||||
for (var key in descs) {
|
||||
var desc = descs[key];
|
||||
desc.configurable = desc.enumerable = true;
|
||||
if ("value" in desc) desc.writable = true;
|
||||
Object.defineProperty(obj, key, desc);
|
||||
}
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var objectSymbols = Object.getOwnPropertySymbols(descs);
|
||||
|
||||
for (var i = 0; i < objectSymbols.length; i++) {
|
||||
var sym = objectSymbols[i];
|
||||
var desc = descs[sym];
|
||||
desc.configurable = desc.enumerable = true;
|
||||
if ("value" in desc) desc.writable = true;
|
||||
Object.defineProperty(obj, sym, desc);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defineEnumerableProperties;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
17
node_modules/@babel/runtime/helpers/defineProperty.js
generated
vendored
Normal file
17
node_modules/@babel/runtime/helpers/defineProperty.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defineProperty;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
95
node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js
generated
vendored
Normal file
95
node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import AwaitValue from "./AwaitValue.js";
|
||||
export default function AsyncGenerator(gen) {
|
||||
var front, back;
|
||||
|
||||
function send(key, arg) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var request = {
|
||||
key: key,
|
||||
arg: arg,
|
||||
resolve: resolve,
|
||||
reject: reject,
|
||||
next: null
|
||||
};
|
||||
|
||||
if (back) {
|
||||
back = back.next = request;
|
||||
} else {
|
||||
front = back = request;
|
||||
resume(key, arg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function resume(key, arg) {
|
||||
try {
|
||||
var result = gen[key](arg);
|
||||
var value = result.value;
|
||||
var wrappedAwait = value instanceof AwaitValue;
|
||||
Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
|
||||
if (wrappedAwait) {
|
||||
resume(key === "return" ? "return" : "next", arg);
|
||||
return;
|
||||
}
|
||||
|
||||
settle(result.done ? "return" : "normal", arg);
|
||||
}, function (err) {
|
||||
resume("throw", err);
|
||||
});
|
||||
} catch (err) {
|
||||
settle("throw", err);
|
||||
}
|
||||
}
|
||||
|
||||
function settle(type, value) {
|
||||
switch (type) {
|
||||
case "return":
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: true
|
||||
});
|
||||
break;
|
||||
|
||||
case "throw":
|
||||
front.reject(value);
|
||||
break;
|
||||
|
||||
default:
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: false
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
front = front.next;
|
||||
|
||||
if (front) {
|
||||
resume(front.key, front.arg);
|
||||
} else {
|
||||
back = null;
|
||||
}
|
||||
}
|
||||
|
||||
this._invoke = send;
|
||||
|
||||
if (typeof gen["return"] !== "function") {
|
||||
this["return"] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype.next = function (arg) {
|
||||
return this._invoke("next", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["throw"] = function (arg) {
|
||||
return this._invoke("throw", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["return"] = function (arg) {
|
||||
return this._invoke("return", arg);
|
||||
};
|
||||
3
node_modules/@babel/runtime/helpers/esm/AwaitValue.js
generated
vendored
Normal file
3
node_modules/@babel/runtime/helpers/esm/AwaitValue.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default function _AwaitValue(value) {
|
||||
this.wrapped = value;
|
||||
}
|
||||
28
node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
generated
vendored
Normal file
28
node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function (key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
desc.enumerable = !!desc.enumerable;
|
||||
desc.configurable = !!desc.configurable;
|
||||
|
||||
if ('value' in desc || desc.initializer) {
|
||||
desc.writable = true;
|
||||
}
|
||||
|
||||
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
||||
return decorator(target, property, desc) || desc;
|
||||
}, desc);
|
||||
|
||||
if (context && desc.initializer !== void 0) {
|
||||
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
||||
desc.initializer = undefined;
|
||||
}
|
||||
|
||||
if (desc.initializer === void 0) {
|
||||
Object.defineProperty(target, property, desc);
|
||||
desc = null;
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
9
node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
generated
vendored
Normal file
9
node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export default function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
3
node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
generated
vendored
Normal file
3
node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
4
node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
generated
vendored
Normal file
4
node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import arrayLikeToArray from "./arrayLikeToArray.js";
|
||||
export default function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
||||
}
|
||||
7
node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
generated
vendored
Normal file
7
node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export default function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
54
node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js
generated
vendored
Normal file
54
node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
export default function _asyncGeneratorDelegate(inner, awaitWrap) {
|
||||
var iter = {},
|
||||
waiting = false;
|
||||
|
||||
function pump(key, value) {
|
||||
waiting = true;
|
||||
value = new Promise(function (resolve) {
|
||||
resolve(inner[key](value));
|
||||
});
|
||||
return {
|
||||
done: false,
|
||||
value: awaitWrap(value)
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
iter.next = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("next", value);
|
||||
};
|
||||
|
||||
if (typeof inner["throw"] === "function") {
|
||||
iter["throw"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
throw value;
|
||||
}
|
||||
|
||||
return pump("throw", value);
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof inner["return"] === "function") {
|
||||
iter["return"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("return", value);
|
||||
};
|
||||
}
|
||||
|
||||
return iter;
|
||||
}
|
||||
13
node_modules/@babel/runtime/helpers/esm/asyncIterator.js
generated
vendored
Normal file
13
node_modules/@babel/runtime/helpers/esm/asyncIterator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export default function _asyncIterator(iterable) {
|
||||
var method;
|
||||
|
||||
if (typeof Symbol !== "undefined") {
|
||||
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
||||
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
||||
}
|
||||
|
||||
if (method == null) method = iterable["@@asyncIterator"];
|
||||
if (method == null) method = iterable["@@iterator"];
|
||||
if (method == null) throw new TypeError("Object is not async iterable");
|
||||
return method.call(iterable);
|
||||
}
|
||||
35
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
generated
vendored
Normal file
35
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
export default function _asyncToGenerator(fn) {
|
||||
return function () {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
||||
}
|
||||
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
||||
}
|
||||
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
4
node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js
generated
vendored
Normal file
4
node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import AwaitValue from "./AwaitValue.js";
|
||||
export default function _awaitAsyncGenerator(value) {
|
||||
return new AwaitValue(value);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue