initial
This commit is contained in:
commit
fd70f95224
710 changed files with 226395 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
dist
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.db
|
||||||
|
*.http
|
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM registry.altlinux.org/alt/node:p11 AS node
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json /app
|
||||||
|
COPY package-lock.json /app
|
||||||
|
COPY web /app/web
|
||||||
|
RUN npm i && npm run esbuild
|
||||||
|
|
||||||
|
FROM gitrepo.ru/base/go:1.23.0 AS go
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/track
|
||||||
|
|
||||||
|
FROM registry.altlinux.org/alt/alt:p11
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=go /app/track /app/track
|
||||||
|
COPY --from=node /app/web /app/web
|
||||||
|
|
||||||
|
CMD ["/app/track"]
|
28
go.mod
Normal file
28
go.mod
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
module gitrepo.ru/neonxp/track
|
||||||
|
|
||||||
|
go 1.22.5
|
||||||
|
|
||||||
|
require go.etcd.io/bbolt v1.3.10
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||||
|
github.com/labstack/gommon v0.4.2 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
|
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||||
|
github.com/valyala/fasttemplate v1.2.2 // indirect
|
||||||
|
go.neonxp.ru/objectid v0.0.2 // indirect
|
||||||
|
golang.org/x/crypto v0.22.0 // indirect
|
||||||
|
golang.org/x/net v0.24.0 // indirect
|
||||||
|
golang.org/x/text v0.14.0 // indirect
|
||||||
|
golang.org/x/time v0.5.0 // indirect
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/alexedwards/scs/boltstore v0.0.0-20240316134038-7e11d57e8885
|
||||||
|
github.com/alexedwards/scs/v2 v2.8.0
|
||||||
|
github.com/labstack/echo/v4 v4.12.0
|
||||||
|
github.com/spazzymoto/echo-scs-session v1.0.0
|
||||||
|
go.neonxp.ru/mux v0.0.0-20240729221623-376839b264c7
|
||||||
|
golang.org/x/sys v0.19.0 // indirect
|
||||||
|
)
|
84
go.sum
Normal file
84
go.sum
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
github.com/alexedwards/scs/boltstore v0.0.0-20240316134038-7e11d57e8885 h1:TYMHgBunP/91bUIkKN00NSC1XjQLuztqEEnjV1fcLL4=
|
||||||
|
github.com/alexedwards/scs/boltstore v0.0.0-20240316134038-7e11d57e8885/go.mod h1:nnGhSqQA6m7r6IH0hidEyb/aDFXQD/K+PwVShJWfKKc=
|
||||||
|
github.com/alexedwards/scs/v2 v2.4.0/go.mod h1:ToaROZxyKukJKT/xLcVQAChi5k6+Pn1Gvmdl7h3RRj8=
|
||||||
|
github.com/alexedwards/scs/v2 v2.8.0 h1:h31yUYoycPuL0zt14c0gd+oqxfRwIj6SOjHdKRZxhEw=
|
||||||
|
github.com/alexedwards/scs/v2 v2.8.0/go.mod h1:ToaROZxyKukJKT/xLcVQAChi5k6+Pn1Gvmdl7h3RRj8=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||||
|
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
|
||||||
|
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||||
|
github.com/labstack/echo/v4 v4.3.0/go.mod h1:PvmtTvhVqKDzDQy4d3bWzPjZLzom4iQbAZy2sgZ/qI8=
|
||||||
|
github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0=
|
||||||
|
github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM=
|
||||||
|
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||||
|
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
|
||||||
|
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
|
||||||
|
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||||
|
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
|
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
|
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
||||||
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/spazzymoto/echo-scs-session v1.0.0 h1:2m1AHXRCSY9j6fjz0MpuIE/3L9GiHk1kux5mhhQh3WI=
|
||||||
|
github.com/spazzymoto/echo-scs-session v1.0.0/go.mod h1:wd6nyO726b2b1+w+IBHYEG5vY+MqUYSnbBJFcTeWwOM=
|
||||||
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
|
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||||
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||||
|
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||||
|
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||||
|
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||||
|
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
|
||||||
|
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||||
|
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||||
|
go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0=
|
||||||
|
go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ=
|
||||||
|
go.neonxp.ru/mux v0.0.0-20240729221623-376839b264c7 h1:b/AgHRmzwI+FMNrf/HYEILmntTPSRDarOMTYEmL7AS8=
|
||||||
|
go.neonxp.ru/mux v0.0.0-20240729221623-376839b264c7/go.mod h1:5OlVmN/OgaWjghQMV8oOzUQC0lUqAoplpQsUiqL5Pgc=
|
||||||
|
go.neonxp.ru/objectid v0.0.2 h1:Z/G6zvBxmUq0NTq681oGH8pTbBWwi6VA22YOYludIPs=
|
||||||
|
go.neonxp.ru/objectid v0.0.2/go.mod h1:s0dRi//oe1liiKcor1KmWx09WzkD6Wtww8ZaIv+VLBs=
|
||||||
|
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||||
|
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||||
|
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
|
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
|
||||||
|
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
||||||
|
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
|
||||||
|
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||||
|
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||||
|
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||||
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
|
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||||
|
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
21
main.go
Normal file
21
main.go
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"log/slog"
|
||||||
|
"os"
|
||||||
|
"os/signal"
|
||||||
|
|
||||||
|
"gitrepo.ru/neonxp/track/pkg/app"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
if err := app.App(ctx); err != nil {
|
||||||
|
slog.ErrorContext(ctx, "error", slog.Any("error", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
node_modules/.bin/esbuild
generated
vendored
Symbolic link
1
node_modules/.bin/esbuild
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../esbuild/bin/esbuild
|
1
node_modules/.bin/loose-envify
generated
vendored
Symbolic link
1
node_modules/.bin/loose-envify
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../loose-envify/cli.js
|
134
node_modules/.package-lock.json
generated
vendored
Normal file
134
node_modules/.package-lock.json
generated
vendored
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
{
|
||||||
|
"name": "track",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"node_modules/@esbuild/linux-x64": {
|
||||||
|
"version": "0.23.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz",
|
||||||
|
"integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@phntms/use-local-state": {
|
||||||
|
"version": "0.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@phntms/use-local-state/-/use-local-state-0.1.4.tgz",
|
||||||
|
"integrity": "sha512-Ax34DhMDBwbPW+tUdTp03uuxRtW3hzG8e8TRJ8Zit5JRWHXyi4rWzsKKiH89riTCAoWEFAopxuXjeD0xGoGZ9w==",
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=16.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esbuild": {
|
||||||
|
"version": "0.23.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz",
|
||||||
|
"integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==",
|
||||||
|
"dev": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"bin": {
|
||||||
|
"esbuild": "bin/esbuild"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@esbuild/aix-ppc64": "0.23.1",
|
||||||
|
"@esbuild/android-arm": "0.23.1",
|
||||||
|
"@esbuild/android-arm64": "0.23.1",
|
||||||
|
"@esbuild/android-x64": "0.23.1",
|
||||||
|
"@esbuild/darwin-arm64": "0.23.1",
|
||||||
|
"@esbuild/darwin-x64": "0.23.1",
|
||||||
|
"@esbuild/freebsd-arm64": "0.23.1",
|
||||||
|
"@esbuild/freebsd-x64": "0.23.1",
|
||||||
|
"@esbuild/linux-arm": "0.23.1",
|
||||||
|
"@esbuild/linux-arm64": "0.23.1",
|
||||||
|
"@esbuild/linux-ia32": "0.23.1",
|
||||||
|
"@esbuild/linux-loong64": "0.23.1",
|
||||||
|
"@esbuild/linux-mips64el": "0.23.1",
|
||||||
|
"@esbuild/linux-ppc64": "0.23.1",
|
||||||
|
"@esbuild/linux-riscv64": "0.23.1",
|
||||||
|
"@esbuild/linux-s390x": "0.23.1",
|
||||||
|
"@esbuild/linux-x64": "0.23.1",
|
||||||
|
"@esbuild/netbsd-x64": "0.23.1",
|
||||||
|
"@esbuild/openbsd-arm64": "0.23.1",
|
||||||
|
"@esbuild/openbsd-x64": "0.23.1",
|
||||||
|
"@esbuild/sunos-x64": "0.23.1",
|
||||||
|
"@esbuild/win32-arm64": "0.23.1",
|
||||||
|
"@esbuild/win32-ia32": "0.23.1",
|
||||||
|
"@esbuild/win32-x64": "0.23.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/js-tokens": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||||
|
},
|
||||||
|
"node_modules/loose-envify": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"loose-envify": "cli.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/pigeon-maps": {
|
||||||
|
"version": "0.21.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/pigeon-maps/-/pigeon-maps-0.21.6.tgz",
|
||||||
|
"integrity": "sha512-6io58lhpbtVT/DUKDoOqsjeAFW46Nfe+gr4PX/kmD1dyJxfb8WaT4hcgwcmM8dJdkyfibgLHo59Uo2o2/xscaQ==",
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/react": {
|
||||||
|
"version": "18.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||||
|
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/react-dom": {
|
||||||
|
"version": "18.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
||||||
|
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"scheduler": "^0.23.2"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^18.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/scheduler": {
|
||||||
|
"version": "0.23.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
||||||
|
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
node_modules/@esbuild/linux-x64/README.md
generated
vendored
Normal file
3
node_modules/@esbuild/linux-x64/README.md
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# esbuild
|
||||||
|
|
||||||
|
This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
|
BIN
node_modules/@esbuild/linux-x64/bin/esbuild
generated
vendored
Executable file
BIN
node_modules/@esbuild/linux-x64/bin/esbuild
generated
vendored
Executable file
Binary file not shown.
20
node_modules/@esbuild/linux-x64/package.json
generated
vendored
Normal file
20
node_modules/@esbuild/linux-x64/package.json
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "@esbuild/linux-x64",
|
||||||
|
"version": "0.23.1",
|
||||||
|
"description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/evanw/esbuild.git"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"preferUnplugged": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
]
|
||||||
|
}
|
6
node_modules/@phntms/use-local-state/.babelrc
generated
vendored
Normal file
6
node_modules/@phntms/use-local-state/.babelrc
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"@babel/preset-env",
|
||||||
|
"@babel/preset-typescript"
|
||||||
|
]
|
||||||
|
}
|
57
node_modules/@phntms/use-local-state/.eslintrc
generated
vendored
Normal file
57
node_modules/@phntms/use-local-state/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"jest": true
|
||||||
|
},
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"jsx": true,
|
||||||
|
"useJSXTextNode": true
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"react": {
|
||||||
|
"version": "detect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugins": ["prettier", "eslint-plugin-import"],
|
||||||
|
"extends": [
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"plugin:react-hooks/recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"react-hooks/rules-of-hooks": "error",
|
||||||
|
"react-hooks/exhaustive-deps": "error",
|
||||||
|
"react/react-in-jsx-scope": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
"react/prop-types": "off",
|
||||||
|
"import/order": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"groups": ["builtin", "external", "internal"],
|
||||||
|
"pathGroups": [
|
||||||
|
{
|
||||||
|
"pattern": "react",
|
||||||
|
"group": "external",
|
||||||
|
"position": "before"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pathGroupsExcludedImportTypes": ["react"],
|
||||||
|
"newlines-between": "always",
|
||||||
|
"alphabetize": {
|
||||||
|
"order": "asc",
|
||||||
|
"caseInsensitive": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"prettier/prettier": "error"
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"React": "writable"
|
||||||
|
}
|
||||||
|
}
|
1
node_modules/@phntms/use-local-state/.github/CODEOWNERS
generated
vendored
Normal file
1
node_modules/@phntms/use-local-state/.github/CODEOWNERS
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* @digitaljohn @PauloMFJ
|
41
node_modules/@phntms/use-local-state/.github/ISSUE_TEMPLATE/REPORT_A_BUG.md
generated
vendored
Normal file
41
node_modules/@phntms/use-local-state/.github/ISSUE_TEMPLATE/REPORT_A_BUG.md
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
name: "\U0001F41B Report a bug"
|
||||||
|
about: "Is something not working as you expect?"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Please answer the following. Issues that do not will be closed. -->
|
||||||
|
|
||||||
|
> Clearly describe the bug
|
||||||
|
|
||||||
|
e.g. "Data does not persist upon refresh."
|
||||||
|
|
||||||
|
> Which version of use-local-state are you using?
|
||||||
|
|
||||||
|
e.g. `0.1.0`
|
||||||
|
|
||||||
|
> What version of React are you using use-local-state within?
|
||||||
|
|
||||||
|
e.g. `16.9.0`
|
||||||
|
|
||||||
|
> What build/platform are you using?
|
||||||
|
|
||||||
|
e.g. "Next.js 10"
|
||||||
|
|
||||||
|
> What did you expect to happen?
|
||||||
|
|
||||||
|
e.g. "Updated value to be persisted."
|
||||||
|
|
||||||
|
> What actually happened (e.g. what warnings or errors did you get)?
|
||||||
|
|
||||||
|
e.g. "Hook always returns default state."
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Before posting, please check that the bug hasn't already been discussed previously (https://github.com/phantomstudios/use-local-state/search)
|
||||||
|
|
||||||
|
You can help us fix the bug more quickly by:
|
||||||
|
1. Figuring out what needs to be done and proposing it
|
||||||
|
2. Submitting a PR with failing tests.
|
||||||
|
|
||||||
|
Once the bug has been confirmed, you can help out further by:
|
||||||
|
1. Writing the code and submitting a PR.
|
||||||
|
-->
|
14
node_modules/@phntms/use-local-state/.github/ISSUE_TEMPLATE/REPORT_A_DOCS_ISSUE.md
generated
vendored
Normal file
14
node_modules/@phntms/use-local-state/.github/ISSUE_TEMPLATE/REPORT_A_DOCS_ISSUE.md
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
name: "\U0001F4DD Report a docs issue"
|
||||||
|
about: "Is something wrong, confusing or missing in the docs?"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Please answer the following. Issues that do not will be closed. -->
|
||||||
|
|
||||||
|
> Clearly describe the documentation issue
|
||||||
|
|
||||||
|
e.g. "Documentation for setting updated state is required."
|
||||||
|
|
||||||
|
> What solution would you like to see?
|
||||||
|
|
||||||
|
e.g. "I suggest rewriting it so it covers the following topics in detail..."
|
24
node_modules/@phntms/use-local-state/.github/ISSUE_TEMPLATE/REQUEST_A_FEATURE.md
generated
vendored
Normal file
24
node_modules/@phntms/use-local-state/.github/ISSUE_TEMPLATE/REQUEST_A_FEATURE.md
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
name: "\U0001F680 Request a feature"
|
||||||
|
about: "Do you want to suggest a new feature?"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Please answer the following. Issues that do not will be closed. -->
|
||||||
|
|
||||||
|
> What is the problem you're trying to solve?
|
||||||
|
|
||||||
|
e.g. "We need the ability reset and or clear the state..."
|
||||||
|
|
||||||
|
> What solution would you like to see?
|
||||||
|
|
||||||
|
e.g. "Expose a new method that..."
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Before posting, please check that the feature hasn't already been discussed previously (https://github.com/phantomstudios/use-local-state/search)
|
||||||
|
|
||||||
|
You can help us add the feature more quickly by:
|
||||||
|
1. Providing as much detail as possible in this issue
|
||||||
|
|
||||||
|
Once the feature is approved, you can help out further by:
|
||||||
|
1. Writing the code and submitting a PR.
|
||||||
|
-->
|
12
node_modules/@phntms/use-local-state/.github/PULL_REQUEST_TEMPLATE.md
generated
vendored
Normal file
12
node_modules/@phntms/use-local-state/.github/PULL_REQUEST_TEMPLATE.md
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<!---
|
||||||
|
Please read the following. Pull requests that do not adhere to these guidelines will very likely be closed.
|
||||||
|
|
||||||
|
Each pull request should, with the exception of minor documentation fixes, be associated with an open issue. If there is an associated open issue, then please continue by answering these two questions: -->
|
||||||
|
|
||||||
|
> Which issue, if any, is this issue related to?
|
||||||
|
|
||||||
|
e.g. "Closes #000" or "None, as it's a documentation fix."
|
||||||
|
|
||||||
|
> Is there anything in the PR that needs further explanation?
|
||||||
|
|
||||||
|
e.g. "No, it's self explanatory."
|
30
node_modules/@phntms/use-local-state/.github/workflows/npmpublish.yml
generated
vendored
Normal file
30
node_modules/@phntms/use-local-state/.github/workflows/npmpublish.yml
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: Node.js Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm test
|
||||||
|
|
||||||
|
publish-npm:
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm publish --access=public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
28
node_modules/@phntms/use-local-state/.github/workflows/test.yml
generated
vendored
Normal file
28
node_modules/@phntms/use-local-state/.github/workflows/test.yml
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: test
|
||||||
|
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [12.x, 14.x, 16.x, 18.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: npm install, build, and test
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build --if-present
|
||||||
|
npm run lint
|
||||||
|
npm test
|
||||||
|
env:
|
||||||
|
CI: true
|
5
node_modules/@phntms/use-local-state/.prettierignore
generated
vendored
Normal file
5
node_modules/@phntms/use-local-state/.prettierignore
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
node_modules
|
||||||
|
coverage
|
||||||
|
dist
|
||||||
|
public
|
||||||
|
tmp
|
76
node_modules/@phntms/use-local-state/CODE_OF_CONDUCT.md
generated
vendored
Normal file
76
node_modules/@phntms/use-local-state/CODE_OF_CONDUCT.md
generated
vendored
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
- Using welcoming and inclusive language
|
||||||
|
- Being respectful of differing viewpoints and experiences
|
||||||
|
- Gracefully accepting constructive criticism
|
||||||
|
- Focusing on what is best for the community
|
||||||
|
- Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
- Public or private harassment
|
||||||
|
- Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
- Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at developers@phntms.com. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
48
node_modules/@phntms/use-local-state/CONTRIBUTING.md
generated
vendored
Normal file
48
node_modules/@phntms/use-local-state/CONTRIBUTING.md
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# How to contribute
|
||||||
|
|
||||||
|
I'm really happy that you're interested in helping out with this little project.
|
||||||
|
|
||||||
|
As this is very early days for the project there's not a lot in the way of
|
||||||
|
resources, but please check out the [documentation](./README.md), and also the
|
||||||
|
[list of issues](https://github.com/phantomstudios/use-local-state/issues).
|
||||||
|
|
||||||
|
Please submit an issue if you need help with anything.
|
||||||
|
|
||||||
|
We have a [code of conduct](./CODE_OF_CONDUCT.md) so please make sure you follow
|
||||||
|
it.
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
Testing is performed using `jest` and is tested on Windows, Linux and MacOS with
|
||||||
|
Node 10 and 12 runtimes. For a PR to be considered all these environments need to
|
||||||
|
pass. Testing is automated using GitHub Actions CI.
|
||||||
|
|
||||||
|
## Submitting changes
|
||||||
|
|
||||||
|
Please send a
|
||||||
|
[GitHub Pull Request to use-local-state](https://github.com/phantomstudios/use-local-state/pull/new/master)
|
||||||
|
with a clear list of what you've done (read more about
|
||||||
|
[pull requests](https://help.github.com/en/articles/about-pull-requests)). When you send a pull
|
||||||
|
request, please make sure you've covered off all the points in the template.
|
||||||
|
|
||||||
|
Make sure you've read about our workflow (below); in essence make sure each Pull
|
||||||
|
Request is atomic but don't worry too much about the commits themselves as we use
|
||||||
|
squash-and-merge.
|
||||||
|
|
||||||
|
## Our workflow
|
||||||
|
|
||||||
|
We use [GitHub flow](https://guides.github.com/introduction/flow/); it's a lot
|
||||||
|
like git-flow but simpler and more forgiving. We use the `squash and merge`
|
||||||
|
strategy to merge Pull Requests.
|
||||||
|
|
||||||
|
In effect this means:
|
||||||
|
|
||||||
|
- Don't worry about individual commits. They will be preserved, but not on the
|
||||||
|
main `master` branch history, so feel free to commit early and often, using
|
||||||
|
git as a save mechanism.
|
||||||
|
- Your Pull Request title and description become very important; they are the
|
||||||
|
history of the master branch and explain all the changes.
|
||||||
|
- You ought to be able to find any previous version easily using GitHub tabs, or
|
||||||
|
[Releases](https://github.com/phantomstudios/use-local-state/releases)
|
||||||
|
|
||||||
|
Thanks, John Chipps-Harding
|
21
node_modules/@phntms/use-local-state/LICENSE
generated
vendored
Executable file
21
node_modules/@phntms/use-local-state/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Phantom Studios Ltd
|
||||||
|
|
||||||
|
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.
|
103
node_modules/@phntms/use-local-state/README.md
generated
vendored
Executable file
103
node_modules/@phntms/use-local-state/README.md
generated
vendored
Executable file
|
@ -0,0 +1,103 @@
|
||||||
|
# use-local-state
|
||||||
|
|
||||||
|
[![NPM version][npm-image]][npm-url]
|
||||||
|
[![Actions Status][ci-image]][ci-url]
|
||||||
|
[![PR Welcome][npm-downloads-image]][npm-downloads-url]
|
||||||
|
|
||||||
|
A simple React hook that allows you to store data within `LocalStorage` with the same interface as the standard `React.useState` hook.
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Just swap out your `useState` calls with `useLocalState` to persist the data between refreshes. This hook is also SSR safe and does not break when used without `window` existing.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import useLocalState from "@phntms/use-local-state";
|
||||||
|
|
||||||
|
const [value, setValue, resetValue] = useLocalState("KEY", "");
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install this package with `npm`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm i @phntms/use-local-state
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Store a boolean to track if a user has accepted terms of use.
|
||||||
|
|
||||||
|
```JSX
|
||||||
|
import React from 'react';
|
||||||
|
import useLocalState from '@phntms/use-local-state';
|
||||||
|
|
||||||
|
const TermsExample = () = {
|
||||||
|
const [accepted, setAccepted] = useLocalState("TERMS_ACCEPTED", false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<h1>Welcome</h2>
|
||||||
|
{!accepted && <>
|
||||||
|
<p>Do you accept our terms?</p>
|
||||||
|
<button onClick={()=>setAccepted(true)}>Accept</button>
|
||||||
|
</>}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Store a list of bookmarks.
|
||||||
|
|
||||||
|
```JSX
|
||||||
|
import React from 'react';
|
||||||
|
import useLocalState from '@phntms/use-local-state';
|
||||||
|
|
||||||
|
interface Bookmark {
|
||||||
|
title: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const BookmarkExample = () = {
|
||||||
|
const [bookmarks, setBookmarks, clearBookmarks] = useLocalState<Bookmark[]>("BOOKMARKS", []);
|
||||||
|
|
||||||
|
const addBookmark = (bookmark: Bookmark) => setBookmarks([...bookmarks, bookmark]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<h1>Bookmarks</h2>
|
||||||
|
<NewBookmark add={addBookmark} />
|
||||||
|
<button onClick={clearBookmarks}>Clear Bookmarks</button>
|
||||||
|
<ul>
|
||||||
|
{bookmarks.map(((bookmark, i) => (
|
||||||
|
<li key={i}>
|
||||||
|
<a href={bookmark.url}>{bookmark.title}</a>
|
||||||
|
</li>
|
||||||
|
)))}
|
||||||
|
</ul>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
### Input
|
||||||
|
|
||||||
|
- `key` : Required - The key of type `string` to store within `LocalStorage`.
|
||||||
|
- `initialValue` : Required - The default/initial value of type `T` if the key is not found within the `LocalStorage` object.
|
||||||
|
|
||||||
|
### Output
|
||||||
|
|
||||||
|
An array containing the value, a function to set the value and another function to reset the value.
|
||||||
|
|
||||||
|
- `[0]` : The value of the data stored in LocalStorage or the defaultValue if not set.
|
||||||
|
- `[1]` : A function to set the value stored in LocalStorage. Signature is exactly like the standard [React.useState](https://reactjs.org/docs/hooks-state.html) hook.
|
||||||
|
- `[2]` : A function to reset the data stored in the LocalStorage.
|
||||||
|
|
||||||
|
[npm-image]: https://img.shields.io/npm/v/@phntms/use-local-state.svg?style=flat-square&logo=react
|
||||||
|
[npm-url]: https://npmjs.org/package/@phntms/use-local-state
|
||||||
|
[npm-downloads-image]: https://img.shields.io/npm/dm/@phntms/use-local-state.svg
|
||||||
|
[npm-downloads-url]: https://npmcharts.com/compare/@phntms/use-local-state?minimal=true
|
||||||
|
[ci-image]: https://github.com/phantomstudios/use-local-state/workflows/test/badge.svg
|
||||||
|
[ci-url]: https://github.com/phantomstudios/use-local-state/actions
|
4
node_modules/@phntms/use-local-state/SUPPORT.md
generated
vendored
Normal file
4
node_modules/@phntms/use-local-state/SUPPORT.md
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# use-local-state Support
|
||||||
|
|
||||||
|
For _questions_ on how to use `use-local-state` or what went wrong when you tried something, our primary resource is by opening a
|
||||||
|
[GitHub Issue](https://github.com/phantomstudios/use-local-state/issues), where you can get help from developers.
|
15
node_modules/@phntms/use-local-state/jest.config.js
generated
vendored
Normal file
15
node_modules/@phntms/use-local-state/jest.config.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/**
|
||||||
|
* @type {jest.ProjectConfig}
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
roots: ["<rootDir>/test"],
|
||||||
|
transform: {
|
||||||
|
"^.+\\.tsx?$": "ts-jest",
|
||||||
|
},
|
||||||
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
||||||
|
globals: {
|
||||||
|
"ts-jest": {
|
||||||
|
tsconfig: "tsconfig.test.json",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
5
node_modules/@phntms/use-local-state/lib/index.d.ts
generated
vendored
Normal file
5
node_modules/@phntms/use-local-state/lib/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
declare type Dispatch<A> = (value: A) => void;
|
||||||
|
declare type SetStateAction<S> = S | ((prevState: S) => S);
|
||||||
|
declare const useLocalState: <S>(key: string, defaultValue: S | (() => S)) => [S, Dispatch<SetStateAction<S>>, () => void];
|
||||||
|
export default useLocalState;
|
||||||
|
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/@phntms/use-local-state/lib/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@phntms/use-local-state/lib/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AACtC,aAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAEnD,QAAA,MAAM,aAAa,WACZ,MAAM,yEAE6B,IAAI,CAuC7C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
46
node_modules/@phntms/use-local-state/lib/index.js
generated
vendored
Normal file
46
node_modules/@phntms/use-local-state/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var react_1 = require("react");
|
||||||
|
var utils_1 = require("./utils");
|
||||||
|
var useLocalState = function (key, defaultValue) {
|
||||||
|
var _a = (0, react_1.useState)(function () {
|
||||||
|
var isCallable = function (value) {
|
||||||
|
return typeof value === "function";
|
||||||
|
};
|
||||||
|
var toStore = isCallable(defaultValue) ? defaultValue() : defaultValue;
|
||||||
|
if (!utils_1.SUPPORTED)
|
||||||
|
return toStore;
|
||||||
|
var item = window.localStorage.getItem(key);
|
||||||
|
try {
|
||||||
|
return item ? JSON.parse(item) : toStore;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
return toStore;
|
||||||
|
}
|
||||||
|
}), value = _a[0], setValue = _a[1];
|
||||||
|
var lastValue = (0, react_1.useRef)(value);
|
||||||
|
lastValue.current = value;
|
||||||
|
var setLocalStateValue = (0, react_1.useCallback)(function (newValue) {
|
||||||
|
var isCallable = function (value) {
|
||||||
|
return typeof value === "function";
|
||||||
|
};
|
||||||
|
var toStore = isCallable(newValue)
|
||||||
|
? newValue(lastValue.current)
|
||||||
|
: newValue;
|
||||||
|
if (utils_1.SUPPORTED)
|
||||||
|
window.localStorage.setItem(key, JSON.stringify(toStore));
|
||||||
|
setValue(toStore);
|
||||||
|
}, [key]);
|
||||||
|
var reset = (0, react_1.useCallback)(function () {
|
||||||
|
var isCallable = function (value) {
|
||||||
|
return typeof value === "function";
|
||||||
|
};
|
||||||
|
var toStore = isCallable(defaultValue) ? defaultValue() : defaultValue;
|
||||||
|
setValue(toStore);
|
||||||
|
if (utils_1.SUPPORTED)
|
||||||
|
window.localStorage.removeItem(key);
|
||||||
|
}, [defaultValue, key]);
|
||||||
|
return [value, setLocalStateValue, reset];
|
||||||
|
};
|
||||||
|
exports.default = useLocalState;
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/@phntms/use-local-state/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@phntms/use-local-state/lib/index.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,+BAAsD;AAEtD,iCAAoC;AAKpC,IAAM,aAAa,GAAG,UACpB,GAAW,EACX,YAA2B;IAErB,IAAA,KAAoB,IAAA,gBAAQ,EAAI;QACpC,IAAM,UAAU,GAAG,UAAC,KAAc;YAChC,OAAA,OAAO,KAAK,KAAK,UAAU;QAA3B,CAA2B,CAAC;QAC9B,IAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;QACzE,IAAI,CAAC,iBAAS;YAAE,OAAO,OAAO,CAAC;QAC/B,IAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI;YACF,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;SAC1C;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,OAAO,CAAC;SAChB;IACH,CAAC,CAAC,EAXK,KAAK,QAAA,EAAE,QAAQ,QAWpB,CAAC;IAEH,IAAM,SAAS,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IAChC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;IAE1B,IAAM,kBAAkB,GAAG,IAAA,mBAAW,EACpC,UAAC,QAA2B;QAC1B,IAAM,UAAU,GAAG,UAAC,KAAc;YAChC,OAAA,OAAO,KAAK,KAAK,UAAU;QAA3B,CAA2B,CAAC;QAC9B,IAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC;YAClC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC;YAC7B,CAAC,CAAC,QAAQ,CAAC;QACb,IAAI,iBAAS;YAAE,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACzE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC,EACD,CAAC,GAAG,CAAC,CACN,CAAC;IAEF,IAAM,KAAK,GAAG,IAAA,mBAAW,EAAC;QACxB,IAAM,UAAU,GAAG,UAAC,KAAc;YAChC,OAAA,OAAO,KAAK,KAAK,UAAU;QAA3B,CAA2B,CAAC;QAC9B,IAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;QACzE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClB,IAAI,iBAAS;YAAE,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACrD,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;IAExB,OAAO,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"}
|
3
node_modules/@phntms/use-local-state/lib/utils.d.ts
generated
vendored
Normal file
3
node_modules/@phntms/use-local-state/lib/utils.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export declare const IS_BROWSER: boolean;
|
||||||
|
export declare const SUPPORTED: false | Storage;
|
||||||
|
//# sourceMappingURL=utils.d.ts.map
|
1
node_modules/@phntms/use-local-state/lib/utils.d.ts.map
generated
vendored
Normal file
1
node_modules/@phntms/use-local-state/lib/utils.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,SAAgC,CAAC;AAExD,eAAO,MAAM,SAAS,iBAAoC,CAAC"}
|
6
node_modules/@phntms/use-local-state/lib/utils.js
generated
vendored
Normal file
6
node_modules/@phntms/use-local-state/lib/utils.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.SUPPORTED = exports.IS_BROWSER = void 0;
|
||||||
|
exports.IS_BROWSER = typeof window !== "undefined";
|
||||||
|
exports.SUPPORTED = exports.IS_BROWSER && window.localStorage;
|
||||||
|
//# sourceMappingURL=utils.js.map
|
1
node_modules/@phntms/use-local-state/lib/utils.js.map
generated
vendored
Normal file
1
node_modules/@phntms/use-local-state/lib/utils.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAE3C,QAAA,SAAS,GAAG,kBAAU,IAAI,MAAM,CAAC,YAAY,CAAC"}
|
73
node_modules/@phntms/use-local-state/package.json
generated
vendored
Executable file
73
node_modules/@phntms/use-local-state/package.json
generated
vendored
Executable file
|
@ -0,0 +1,73 @@
|
||||||
|
{
|
||||||
|
"name": "@phntms/use-local-state",
|
||||||
|
"description": "A simple React hook that allows you to store data within LocalStorage with the same interface as the standard React.useState hook.",
|
||||||
|
"version": "0.1.4",
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"types": "lib/index.d.ts",
|
||||||
|
"homepage": "https://github.com/phantomstudios/use-local-state#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phantomstudios/use-local-state.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/phantomstudios/use-local-state/issues"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"react",
|
||||||
|
"hooks",
|
||||||
|
"hook",
|
||||||
|
"react-hook",
|
||||||
|
"localstorage",
|
||||||
|
"state"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"build:types": "tsc --emitDeclarationOnly",
|
||||||
|
"prepublishOnly": "npm run build",
|
||||||
|
"test": "jest --verbose",
|
||||||
|
"test:watch": "jest --verbose --watch",
|
||||||
|
"coverage": "jest --coverage",
|
||||||
|
"lint": "NODE_ENV=test npm-run-all --parallel lint:*",
|
||||||
|
"lint:js": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||||
|
"lint:format": "prettier \"**/*.{md,html,yaml,yml}\" --check",
|
||||||
|
"lint:type-check": "tsc --noEmit",
|
||||||
|
"fix": "npm-run-all --sequential fix:*",
|
||||||
|
"fix:js": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
|
||||||
|
"fix:format": "prettier \"**/*.{md,html,yaml,yml}\" --write",
|
||||||
|
"depcheck": "npx npm-check --update"
|
||||||
|
},
|
||||||
|
"author": "John Chipps-Harding (john.chipps-harding@phntms.com)",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=16.8.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/preset-env": "^7.18.2",
|
||||||
|
"@babel/preset-typescript": "^7.17.12",
|
||||||
|
"@testing-library/react": "^13.3.0",
|
||||||
|
"@testing-library/react-hooks": "^8.0.1",
|
||||||
|
"@types/jest": "^28.1.3",
|
||||||
|
"@types/react": "^18.0.14",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||||
|
"@typescript-eslint/parser": "^5.29.0",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"babel-jest": "^28.1.1",
|
||||||
|
"browser-env": "^3.2.6",
|
||||||
|
"eslint": "^8.18.0",
|
||||||
|
"eslint-config-prettier": "^8.5.0",
|
||||||
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
|
"eslint-plugin-react": "^7.30.0",
|
||||||
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
|
"jest": "^28.1.1",
|
||||||
|
"jest-environment-jsdom": "^28.1.1",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
|
"prettier": "^2.7.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"react-test-renderer": "^18.2.0",
|
||||||
|
"ts-jest": "^28.0.5",
|
||||||
|
"typescript": "^4.7.4"
|
||||||
|
},
|
||||||
|
"dependencies": {}
|
||||||
|
}
|
52
node_modules/@phntms/use-local-state/src/index.ts
generated
vendored
Executable file
52
node_modules/@phntms/use-local-state/src/index.ts
generated
vendored
Executable file
|
@ -0,0 +1,52 @@
|
||||||
|
import { useState, useCallback, useRef } from "react";
|
||||||
|
|
||||||
|
import { SUPPORTED } from "./utils";
|
||||||
|
|
||||||
|
type Dispatch<A> = (value: A) => void;
|
||||||
|
type SetStateAction<S> = S | ((prevState: S) => S);
|
||||||
|
|
||||||
|
const useLocalState = <S>(
|
||||||
|
key: string,
|
||||||
|
defaultValue: S | (() => S)
|
||||||
|
): [S, Dispatch<SetStateAction<S>>, () => void] => {
|
||||||
|
const [value, setValue] = useState<S>(() => {
|
||||||
|
const isCallable = (value: unknown): value is () => S =>
|
||||||
|
typeof value === "function";
|
||||||
|
const toStore = isCallable(defaultValue) ? defaultValue() : defaultValue;
|
||||||
|
if (!SUPPORTED) return toStore;
|
||||||
|
const item = window.localStorage.getItem(key);
|
||||||
|
try {
|
||||||
|
return item ? JSON.parse(item) : toStore;
|
||||||
|
} catch (error) {
|
||||||
|
return toStore;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const lastValue = useRef(value);
|
||||||
|
lastValue.current = value;
|
||||||
|
|
||||||
|
const setLocalStateValue = useCallback(
|
||||||
|
(newValue: SetStateAction<S>) => {
|
||||||
|
const isCallable = (value: unknown): value is (prevState: S) => S =>
|
||||||
|
typeof value === "function";
|
||||||
|
const toStore = isCallable(newValue)
|
||||||
|
? newValue(lastValue.current)
|
||||||
|
: newValue;
|
||||||
|
if (SUPPORTED) window.localStorage.setItem(key, JSON.stringify(toStore));
|
||||||
|
setValue(toStore);
|
||||||
|
},
|
||||||
|
[key]
|
||||||
|
);
|
||||||
|
|
||||||
|
const reset = useCallback(() => {
|
||||||
|
const isCallable = (value: unknown): value is (prevState: S) => S =>
|
||||||
|
typeof value === "function";
|
||||||
|
const toStore = isCallable(defaultValue) ? defaultValue() : defaultValue;
|
||||||
|
setValue(toStore);
|
||||||
|
if (SUPPORTED) window.localStorage.removeItem(key);
|
||||||
|
}, [defaultValue, key]);
|
||||||
|
|
||||||
|
return [value, setLocalStateValue, reset];
|
||||||
|
};
|
||||||
|
|
||||||
|
export default useLocalState;
|
3
node_modules/@phntms/use-local-state/src/utils.ts
generated
vendored
Normal file
3
node_modules/@phntms/use-local-state/src/utils.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export const IS_BROWSER = typeof window !== "undefined";
|
||||||
|
|
||||||
|
export const SUPPORTED = IS_BROWSER && window.localStorage;
|
363
node_modules/@phntms/use-local-state/test/index.test.tsx
generated
vendored
Executable file
363
node_modules/@phntms/use-local-state/test/index.test.tsx
generated
vendored
Executable file
|
@ -0,0 +1,363 @@
|
||||||
|
/**
|
||||||
|
* @jest-environment jsdom
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { renderHook, act } from "@testing-library/react-hooks";
|
||||||
|
|
||||||
|
import useLocalState from "../src";
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
localStorage.clear();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("useLocalState()", () => {
|
||||||
|
it("stores initial value as string", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`initial value isn't stored into localStorage`, async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
expect(localStorage.getItem(key)).toEqual(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("stores initial value as boolean", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = false;
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("stores initial value as object", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = {
|
||||||
|
something: "else",
|
||||||
|
};
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("stores initial value as array", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const { result } = renderHook(() => useLocalState(key, values));
|
||||||
|
|
||||||
|
const [todos] = result.current;
|
||||||
|
expect(todos).toEqual(values);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("accepts callback as an initial value", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const callback = () => values;
|
||||||
|
const { result } = renderHook(() => useLocalState(key, callback));
|
||||||
|
|
||||||
|
const [todos] = result.current;
|
||||||
|
expect(todos).toEqual(values);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("accepts callback as a initial value and can be updated", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const callback = () => values;
|
||||||
|
const { result } = renderHook(() => useLocalState(key, callback));
|
||||||
|
|
||||||
|
const [initialValues] = result.current;
|
||||||
|
expect(initialValues).toEqual(values);
|
||||||
|
|
||||||
|
const newValue = ["third", "fourth"];
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [changedValues] = result.current;
|
||||||
|
expect(changedValues).toEqual(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can update value as string", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [initialValue] = result.current;
|
||||||
|
expect(initialValue).toEqual(value);
|
||||||
|
|
||||||
|
const newValue = "something else";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
|
||||||
|
setValue(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can update value as function", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [initialValue] = result.current;
|
||||||
|
expect(initialValue).toEqual(value);
|
||||||
|
|
||||||
|
const newValue = " else";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue((v) => v + newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual("something else");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can update value as function multiple times", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [initialValue] = result.current;
|
||||||
|
expect(initialValue).toEqual(value);
|
||||||
|
|
||||||
|
const newValue = " else";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue((v) => v + newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const newValue2 = " again";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue((v) => v + newValue2);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual("something else again");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can update value as object", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = { something: "something" };
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [initialValue] = result.current;
|
||||||
|
expect(initialValue).toEqual(value);
|
||||||
|
|
||||||
|
const newValue = { something: "else" };
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
|
||||||
|
setValue(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [values] = result.current;
|
||||||
|
expect(values).toEqual(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can update value as array", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const { result } = renderHook(() => useLocalState(key, values));
|
||||||
|
|
||||||
|
const newValues = ["third", "fourth"];
|
||||||
|
act(() => {
|
||||||
|
const setValues = result.current[1];
|
||||||
|
|
||||||
|
setValues(newValues);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [todos] = result.current;
|
||||||
|
expect(todos).toEqual(newValues);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("updates state with callback function", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const { result } = renderHook(() => useLocalState(key, values));
|
||||||
|
|
||||||
|
const newValues = ["first", "second"];
|
||||||
|
act(() => {
|
||||||
|
const setTodos = result.current[1];
|
||||||
|
|
||||||
|
setTodos((current) => [...current, ...newValues]);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [todos] = result.current;
|
||||||
|
expect(todos).toEqual([...values, ...newValues]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("does not fail even if invalid data is stored into localStorage", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const value = "something";
|
||||||
|
|
||||||
|
localStorage.setItem(key, value);
|
||||||
|
|
||||||
|
const newValues = ["first", "second"];
|
||||||
|
const { result } = renderHook(() => useLocalState(key, newValues));
|
||||||
|
|
||||||
|
const [todos] = result.current;
|
||||||
|
expect(todos).toEqual(newValues);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("gets initial value from localStorage if there is a value", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
|
||||||
|
localStorage.setItem(key, JSON.stringify(values));
|
||||||
|
|
||||||
|
const newValues = ["third", "fourth"];
|
||||||
|
const { result } = renderHook(() => useLocalState(key, newValues));
|
||||||
|
|
||||||
|
const [todos] = result.current;
|
||||||
|
expect(todos).toEqual(values);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("does not throw an error with two states with different keys", async () => {
|
||||||
|
const keyA = "todos";
|
||||||
|
const keyB = "todos";
|
||||||
|
const valuesA = ["first", "second"];
|
||||||
|
const valuesB = ["third", "fourth"];
|
||||||
|
|
||||||
|
expect(() => {
|
||||||
|
renderHook(() => {
|
||||||
|
useLocalState(keyA, valuesA);
|
||||||
|
useLocalState(keyB, valuesB);
|
||||||
|
});
|
||||||
|
}).not.toThrow();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can handle `undefined` values", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const { result } = renderHook(() =>
|
||||||
|
useLocalState<string[] | undefined>(key, values)
|
||||||
|
);
|
||||||
|
|
||||||
|
act(() => {
|
||||||
|
const [, setValues] = result.current;
|
||||||
|
setValues(undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [value] = result.current;
|
||||||
|
expect(value).toBe(undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can handle `null` values", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const { result } = renderHook(() =>
|
||||||
|
useLocalState<string[] | null>(key, values)
|
||||||
|
);
|
||||||
|
|
||||||
|
act(() => {
|
||||||
|
const [, setValues] = result.current;
|
||||||
|
setValues(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [value] = result.current;
|
||||||
|
expect(value).toBe(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can reset to default value", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const [initialValue] = result.current;
|
||||||
|
expect(initialValue).toEqual(value);
|
||||||
|
|
||||||
|
const newValue = "something else";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [changedValue] = result.current;
|
||||||
|
expect(changedValue).toEqual(newValue);
|
||||||
|
|
||||||
|
act(() => {
|
||||||
|
const resetValue = result.current[2];
|
||||||
|
resetValue();
|
||||||
|
});
|
||||||
|
|
||||||
|
const [resetValue] = result.current;
|
||||||
|
expect(resetValue).toEqual(value);
|
||||||
|
expect(localStorage.getItem(key)).toEqual(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can reset to default value as callback", async () => {
|
||||||
|
const key = "todos";
|
||||||
|
const values = ["first", "second"];
|
||||||
|
const callback = () => values;
|
||||||
|
const { result } = renderHook(() => useLocalState(key, callback));
|
||||||
|
|
||||||
|
const [initialValues] = result.current;
|
||||||
|
expect(initialValues).toEqual(values);
|
||||||
|
|
||||||
|
const newValues = ["third", "fourth"];
|
||||||
|
act(() => {
|
||||||
|
const setValues = result.current[1];
|
||||||
|
setValues(newValues);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [changedValues] = result.current;
|
||||||
|
expect(changedValues).toEqual(newValues);
|
||||||
|
|
||||||
|
act(() => {
|
||||||
|
const resetValues = result.current[2];
|
||||||
|
resetValues();
|
||||||
|
});
|
||||||
|
|
||||||
|
const [resetValues] = result.current;
|
||||||
|
expect(resetValues).toEqual(values);
|
||||||
|
expect(localStorage.getItem(key)).toEqual(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("does not change the setter when value is updated", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const setterOne = result.current[1];
|
||||||
|
|
||||||
|
const newValue = "something else";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue(newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const setterTwo = result.current[1];
|
||||||
|
|
||||||
|
expect(setterOne).toEqual(setterTwo);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("does not change the setter when value is updated via function", async () => {
|
||||||
|
const key = "key";
|
||||||
|
const value = "something";
|
||||||
|
const { result } = renderHook(() => useLocalState(key, value));
|
||||||
|
|
||||||
|
const setterOne = result.current[1];
|
||||||
|
|
||||||
|
const newValue = " else";
|
||||||
|
act(() => {
|
||||||
|
const setValue = result.current[1];
|
||||||
|
setValue((v) => v + newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
const setterTwo = result.current[1];
|
||||||
|
|
||||||
|
expect(setterOne).toEqual(setterTwo);
|
||||||
|
});
|
||||||
|
});
|
24
node_modules/@phntms/use-local-state/tsconfig.json
generated
vendored
Normal file
24
node_modules/@phntms/use-local-state/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "commonjs",
|
||||||
|
"lib": ["dom", "es2015"],
|
||||||
|
"jsx": "react",
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"outDir": "./lib",
|
||||||
|
"rootDir": "./src",
|
||||||
|
"strict": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"strictPropertyInitialization": true,
|
||||||
|
"noImplicitThis": true,
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.ts"],
|
||||||
|
"exclude": ["test/**/*"]
|
||||||
|
}
|
6
node_modules/@phntms/use-local-state/tsconfig.test.json
generated
vendored
Normal file
6
node_modules/@phntms/use-local-state/tsconfig.test.json
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es6"
|
||||||
|
}
|
||||||
|
}
|
21
node_modules/esbuild/LICENSE.md
generated
vendored
Normal file
21
node_modules/esbuild/LICENSE.md
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Evan Wallace
|
||||||
|
|
||||||
|
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.
|
3
node_modules/esbuild/README.md
generated
vendored
Normal file
3
node_modules/esbuild/README.md
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# esbuild
|
||||||
|
|
||||||
|
This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details.
|
BIN
node_modules/esbuild/bin/esbuild
generated
vendored
Executable file
BIN
node_modules/esbuild/bin/esbuild
generated
vendored
Executable file
Binary file not shown.
286
node_modules/esbuild/install.js
generated
vendored
Normal file
286
node_modules/esbuild/install.js
generated
vendored
Normal file
|
@ -0,0 +1,286 @@
|
||||||
|
"use strict";
|
||||||
|
var __create = Object.create;
|
||||||
|
var __defProp = Object.defineProperty;
|
||||||
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||||
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||||
|
var __getProtoOf = Object.getPrototypeOf;
|
||||||
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||||
|
var __copyProps = (to, from, except, desc) => {
|
||||||
|
if (from && typeof from === "object" || typeof from === "function") {
|
||||||
|
for (let key of __getOwnPropNames(from))
|
||||||
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||||
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||||
|
}
|
||||||
|
return to;
|
||||||
|
};
|
||||||
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||||
|
// If the importer is in node compatibility mode or this is not an ESM
|
||||||
|
// file that has been converted to a CommonJS file using a Babel-
|
||||||
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||||
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||||
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||||
|
mod
|
||||||
|
));
|
||||||
|
|
||||||
|
// lib/npm/node-platform.ts
|
||||||
|
var fs = require("fs");
|
||||||
|
var os = require("os");
|
||||||
|
var path = require("path");
|
||||||
|
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
|
||||||
|
var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
|
||||||
|
var knownWindowsPackages = {
|
||||||
|
"win32 arm64 LE": "@esbuild/win32-arm64",
|
||||||
|
"win32 ia32 LE": "@esbuild/win32-ia32",
|
||||||
|
"win32 x64 LE": "@esbuild/win32-x64"
|
||||||
|
};
|
||||||
|
var knownUnixlikePackages = {
|
||||||
|
"aix ppc64 BE": "@esbuild/aix-ppc64",
|
||||||
|
"android arm64 LE": "@esbuild/android-arm64",
|
||||||
|
"darwin arm64 LE": "@esbuild/darwin-arm64",
|
||||||
|
"darwin x64 LE": "@esbuild/darwin-x64",
|
||||||
|
"freebsd arm64 LE": "@esbuild/freebsd-arm64",
|
||||||
|
"freebsd x64 LE": "@esbuild/freebsd-x64",
|
||||||
|
"linux arm LE": "@esbuild/linux-arm",
|
||||||
|
"linux arm64 LE": "@esbuild/linux-arm64",
|
||||||
|
"linux ia32 LE": "@esbuild/linux-ia32",
|
||||||
|
"linux mips64el LE": "@esbuild/linux-mips64el",
|
||||||
|
"linux ppc64 LE": "@esbuild/linux-ppc64",
|
||||||
|
"linux riscv64 LE": "@esbuild/linux-riscv64",
|
||||||
|
"linux s390x BE": "@esbuild/linux-s390x",
|
||||||
|
"linux x64 LE": "@esbuild/linux-x64",
|
||||||
|
"linux loong64 LE": "@esbuild/linux-loong64",
|
||||||
|
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
||||||
|
"openbsd arm64 LE": "@esbuild/openbsd-arm64",
|
||||||
|
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
||||||
|
"sunos x64 LE": "@esbuild/sunos-x64"
|
||||||
|
};
|
||||||
|
var knownWebAssemblyFallbackPackages = {
|
||||||
|
"android arm LE": "@esbuild/android-arm",
|
||||||
|
"android x64 LE": "@esbuild/android-x64"
|
||||||
|
};
|
||||||
|
function pkgAndSubpathForCurrentPlatform() {
|
||||||
|
let pkg;
|
||||||
|
let subpath;
|
||||||
|
let isWASM = false;
|
||||||
|
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
|
||||||
|
if (platformKey in knownWindowsPackages) {
|
||||||
|
pkg = knownWindowsPackages[platformKey];
|
||||||
|
subpath = "esbuild.exe";
|
||||||
|
} else if (platformKey in knownUnixlikePackages) {
|
||||||
|
pkg = knownUnixlikePackages[platformKey];
|
||||||
|
subpath = "bin/esbuild";
|
||||||
|
} else if (platformKey in knownWebAssemblyFallbackPackages) {
|
||||||
|
pkg = knownWebAssemblyFallbackPackages[platformKey];
|
||||||
|
subpath = "bin/esbuild";
|
||||||
|
isWASM = true;
|
||||||
|
} else {
|
||||||
|
throw new Error(`Unsupported platform: ${platformKey}`);
|
||||||
|
}
|
||||||
|
return { pkg, subpath, isWASM };
|
||||||
|
}
|
||||||
|
function downloadedBinPath(pkg, subpath) {
|
||||||
|
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
|
||||||
|
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// lib/npm/node-install.ts
|
||||||
|
var fs2 = require("fs");
|
||||||
|
var os2 = require("os");
|
||||||
|
var path2 = require("path");
|
||||||
|
var zlib = require("zlib");
|
||||||
|
var https = require("https");
|
||||||
|
var child_process = require("child_process");
|
||||||
|
var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
|
||||||
|
var toPath = path2.join(__dirname, "bin", "esbuild");
|
||||||
|
var isToPathJS = true;
|
||||||
|
function validateBinaryVersion(...command) {
|
||||||
|
command.push("--version");
|
||||||
|
let stdout;
|
||||||
|
try {
|
||||||
|
stdout = child_process.execFileSync(command.shift(), command, {
|
||||||
|
// Without this, this install script strangely crashes with the error
|
||||||
|
// "EACCES: permission denied, write" but only on Ubuntu Linux when node is
|
||||||
|
// installed from the Snap Store. This is not a problem when you download
|
||||||
|
// the official version of node. The problem appears to be that stderr
|
||||||
|
// (i.e. file descriptor 2) isn't writable?
|
||||||
|
//
|
||||||
|
// More info:
|
||||||
|
// - https://snapcraft.io/ (what the Snap Store is)
|
||||||
|
// - https://nodejs.org/dist/ (download the official version of node)
|
||||||
|
// - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035
|
||||||
|
//
|
||||||
|
stdio: "pipe"
|
||||||
|
}).toString().trim();
|
||||||
|
} catch (err) {
|
||||||
|
if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) {
|
||||||
|
let os3 = "this version of macOS";
|
||||||
|
try {
|
||||||
|
os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim();
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated.
|
||||||
|
|
||||||
|
The Go compiler (which esbuild relies on) no longer supports ${os3},
|
||||||
|
which means the "esbuild" binary executable can't be run. You can either:
|
||||||
|
|
||||||
|
* Update your version of macOS to one that the Go compiler supports
|
||||||
|
* Use the "esbuild-wasm" package instead of the "esbuild" package
|
||||||
|
* Build esbuild yourself using an older version of the Go compiler
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
if (stdout !== versionFromPackageJSON) {
|
||||||
|
throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function isYarn() {
|
||||||
|
const { npm_config_user_agent } = process.env;
|
||||||
|
if (npm_config_user_agent) {
|
||||||
|
return /\byarn\//.test(npm_config_user_agent);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function fetch(url) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
https.get(url, (res) => {
|
||||||
|
if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location)
|
||||||
|
return fetch(res.headers.location).then(resolve, reject);
|
||||||
|
if (res.statusCode !== 200)
|
||||||
|
return reject(new Error(`Server responded with ${res.statusCode}`));
|
||||||
|
let chunks = [];
|
||||||
|
res.on("data", (chunk) => chunks.push(chunk));
|
||||||
|
res.on("end", () => resolve(Buffer.concat(chunks)));
|
||||||
|
}).on("error", reject);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function extractFileFromTarGzip(buffer, subpath) {
|
||||||
|
try {
|
||||||
|
buffer = zlib.unzipSync(buffer);
|
||||||
|
} catch (err) {
|
||||||
|
throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`);
|
||||||
|
}
|
||||||
|
let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, "");
|
||||||
|
let offset = 0;
|
||||||
|
subpath = `package/${subpath}`;
|
||||||
|
while (offset < buffer.length) {
|
||||||
|
let name = str(offset, 100);
|
||||||
|
let size = parseInt(str(offset + 124, 12), 8);
|
||||||
|
offset += 512;
|
||||||
|
if (!isNaN(size)) {
|
||||||
|
if (name === subpath) return buffer.subarray(offset, offset + size);
|
||||||
|
offset += size + 511 & ~511;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`);
|
||||||
|
}
|
||||||
|
function installUsingNPM(pkg, subpath, binPath) {
|
||||||
|
const env = { ...process.env, npm_config_global: void 0 };
|
||||||
|
const esbuildLibDir = path2.dirname(require.resolve("esbuild"));
|
||||||
|
const installDir = path2.join(esbuildLibDir, "npm-install");
|
||||||
|
fs2.mkdirSync(installDir);
|
||||||
|
try {
|
||||||
|
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
||||||
|
child_process.execSync(
|
||||||
|
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
|
||||||
|
{ cwd: installDir, stdio: "pipe", env }
|
||||||
|
);
|
||||||
|
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
||||||
|
fs2.renameSync(installedBinPath, binPath);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
removeRecursive(installDir);
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function removeRecursive(dir) {
|
||||||
|
for (const entry of fs2.readdirSync(dir)) {
|
||||||
|
const entryPath = path2.join(dir, entry);
|
||||||
|
let stats;
|
||||||
|
try {
|
||||||
|
stats = fs2.lstatSync(entryPath);
|
||||||
|
} catch {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (stats.isDirectory()) removeRecursive(entryPath);
|
||||||
|
else fs2.unlinkSync(entryPath);
|
||||||
|
}
|
||||||
|
fs2.rmdirSync(dir);
|
||||||
|
}
|
||||||
|
function applyManualBinaryPathOverride(overridePath) {
|
||||||
|
const pathString = JSON.stringify(overridePath);
|
||||||
|
fs2.writeFileSync(toPath, `#!/usr/bin/env node
|
||||||
|
require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' });
|
||||||
|
`);
|
||||||
|
const libMain = path2.join(__dirname, "lib", "main.js");
|
||||||
|
const code = fs2.readFileSync(libMain, "utf8");
|
||||||
|
fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString};
|
||||||
|
${code}`);
|
||||||
|
}
|
||||||
|
function maybeOptimizePackage(binPath) {
|
||||||
|
if (os2.platform() !== "win32" && !isYarn()) {
|
||||||
|
const tempPath = path2.join(__dirname, "bin-esbuild");
|
||||||
|
try {
|
||||||
|
fs2.linkSync(binPath, tempPath);
|
||||||
|
fs2.renameSync(tempPath, toPath);
|
||||||
|
isToPathJS = false;
|
||||||
|
fs2.unlinkSync(tempPath);
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
||||||
|
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
|
||||||
|
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
||||||
|
try {
|
||||||
|
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
||||||
|
fs2.chmodSync(binPath, 493);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function checkAndPreparePackage() {
|
||||||
|
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
|
||||||
|
if (!fs2.existsSync(ESBUILD_BINARY_PATH)) {
|
||||||
|
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
|
||||||
|
} else {
|
||||||
|
applyManualBinaryPathOverride(ESBUILD_BINARY_PATH);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
|
||||||
|
let binPath;
|
||||||
|
try {
|
||||||
|
binPath = require.resolve(`${pkg}/${subpath}`);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`[esbuild] Failed to find package "${pkg}" on the file system
|
||||||
|
|
||||||
|
This can happen if you use the "--no-optional" flag. The "optionalDependencies"
|
||||||
|
package.json feature is used by esbuild to install the correct binary executable
|
||||||
|
for your current platform. This install script will now attempt to work around
|
||||||
|
this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
|
||||||
|
`);
|
||||||
|
binPath = downloadedBinPath(pkg, subpath);
|
||||||
|
try {
|
||||||
|
console.error(`[esbuild] Trying to install package "${pkg}" using npm`);
|
||||||
|
installUsingNPM(pkg, subpath, binPath);
|
||||||
|
} catch (e2) {
|
||||||
|
console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`);
|
||||||
|
try {
|
||||||
|
await downloadDirectlyFromNPM(pkg, subpath, binPath);
|
||||||
|
} catch (e3) {
|
||||||
|
throw new Error(`Failed to install package "${pkg}"`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maybeOptimizePackage(binPath);
|
||||||
|
}
|
||||||
|
checkAndPreparePackage().then(() => {
|
||||||
|
if (isToPathJS) {
|
||||||
|
validateBinaryVersion(process.execPath, toPath);
|
||||||
|
} else {
|
||||||
|
validateBinaryVersion(toPath);
|
||||||
|
}
|
||||||
|
});
|
705
node_modules/esbuild/lib/main.d.ts
generated
vendored
Normal file
705
node_modules/esbuild/lib/main.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,705 @@
|
||||||
|
export type Platform = 'browser' | 'node' | 'neutral'
|
||||||
|
export type Format = 'iife' | 'cjs' | 'esm'
|
||||||
|
export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
|
||||||
|
export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'
|
||||||
|
export type Charset = 'ascii' | 'utf8'
|
||||||
|
export type Drop = 'console' | 'debugger'
|
||||||
|
|
||||||
|
interface CommonOptions {
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#sourcemap */
|
||||||
|
sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both'
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#legal-comments */
|
||||||
|
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external'
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#source-root */
|
||||||
|
sourceRoot?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#sources-content */
|
||||||
|
sourcesContent?: boolean
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#format */
|
||||||
|
format?: Format
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#global-name */
|
||||||
|
globalName?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#target */
|
||||||
|
target?: string | string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#supported */
|
||||||
|
supported?: Record<string, boolean>
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#platform */
|
||||||
|
platform?: Platform
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||||
|
mangleProps?: RegExp
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||||
|
reserveProps?: RegExp
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||||
|
mangleQuoted?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||||
|
mangleCache?: Record<string, string | false>
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#drop */
|
||||||
|
drop?: Drop[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#drop-labels */
|
||||||
|
dropLabels?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||||
|
minify?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||||
|
minifyWhitespace?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||||
|
minifyIdentifiers?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||||
|
minifySyntax?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#line-limit */
|
||||||
|
lineLimit?: number
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#charset */
|
||||||
|
charset?: Charset
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#tree-shaking */
|
||||||
|
treeShaking?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#ignore-annotations */
|
||||||
|
ignoreAnnotations?: boolean
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#jsx */
|
||||||
|
jsx?: 'transform' | 'preserve' | 'automatic'
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#jsx-factory */
|
||||||
|
jsxFactory?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#jsx-fragment */
|
||||||
|
jsxFragment?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#jsx-import-source */
|
||||||
|
jsxImportSource?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#jsx-development */
|
||||||
|
jsxDev?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
|
||||||
|
jsxSideEffects?: boolean
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#define */
|
||||||
|
define?: { [key: string]: string }
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#pure */
|
||||||
|
pure?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#keep-names */
|
||||||
|
keepNames?: boolean
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#color */
|
||||||
|
color?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#log-level */
|
||||||
|
logLevel?: LogLevel
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#log-limit */
|
||||||
|
logLimit?: number
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#log-override */
|
||||||
|
logOverride?: Record<string, LogLevel>
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
|
||||||
|
tsconfigRaw?: string | TsconfigRaw
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TsconfigRaw {
|
||||||
|
compilerOptions?: {
|
||||||
|
alwaysStrict?: boolean
|
||||||
|
baseUrl?: string
|
||||||
|
experimentalDecorators?: boolean
|
||||||
|
importsNotUsedAsValues?: 'remove' | 'preserve' | 'error'
|
||||||
|
jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev'
|
||||||
|
jsxFactory?: string
|
||||||
|
jsxFragmentFactory?: string
|
||||||
|
jsxImportSource?: string
|
||||||
|
paths?: Record<string, string[]>
|
||||||
|
preserveValueImports?: boolean
|
||||||
|
strict?: boolean
|
||||||
|
target?: string
|
||||||
|
useDefineForClassFields?: boolean
|
||||||
|
verbatimModuleSyntax?: boolean
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BuildOptions extends CommonOptions {
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#bundle */
|
||||||
|
bundle?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#splitting */
|
||||||
|
splitting?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
|
||||||
|
preserveSymlinks?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#outfile */
|
||||||
|
outfile?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#metafile */
|
||||||
|
metafile?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#outdir */
|
||||||
|
outdir?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#outbase */
|
||||||
|
outbase?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#external */
|
||||||
|
external?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#packages */
|
||||||
|
packages?: 'bundle' | 'external'
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#alias */
|
||||||
|
alias?: Record<string, string>
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#loader */
|
||||||
|
loader?: { [ext: string]: Loader }
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#resolve-extensions */
|
||||||
|
resolveExtensions?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#main-fields */
|
||||||
|
mainFields?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#conditions */
|
||||||
|
conditions?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#write */
|
||||||
|
write?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#allow-overwrite */
|
||||||
|
allowOverwrite?: boolean
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#tsconfig */
|
||||||
|
tsconfig?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#out-extension */
|
||||||
|
outExtension?: { [ext: string]: string }
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#public-path */
|
||||||
|
publicPath?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#entry-names */
|
||||||
|
entryNames?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#chunk-names */
|
||||||
|
chunkNames?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#asset-names */
|
||||||
|
assetNames?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#inject */
|
||||||
|
inject?: string[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#banner */
|
||||||
|
banner?: { [type: string]: string }
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#footer */
|
||||||
|
footer?: { [type: string]: string }
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#entry-points */
|
||||||
|
entryPoints?: string[] | Record<string, string> | { in: string, out: string }[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#stdin */
|
||||||
|
stdin?: StdinOptions
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/ */
|
||||||
|
plugins?: Plugin[]
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#working-directory */
|
||||||
|
absWorkingDir?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#node-paths */
|
||||||
|
nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StdinOptions {
|
||||||
|
contents: string | Uint8Array
|
||||||
|
resolveDir?: string
|
||||||
|
sourcefile?: string
|
||||||
|
loader?: Loader
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Message {
|
||||||
|
id: string
|
||||||
|
pluginName: string
|
||||||
|
text: string
|
||||||
|
location: Location | null
|
||||||
|
notes: Note[]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional user-specified data that is passed through unmodified. You can
|
||||||
|
* use this to stash the original error, for example.
|
||||||
|
*/
|
||||||
|
detail: any
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Note {
|
||||||
|
text: string
|
||||||
|
location: Location | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Location {
|
||||||
|
file: string
|
||||||
|
namespace: string
|
||||||
|
/** 1-based */
|
||||||
|
line: number
|
||||||
|
/** 0-based, in bytes */
|
||||||
|
column: number
|
||||||
|
/** in bytes */
|
||||||
|
length: number
|
||||||
|
lineText: string
|
||||||
|
suggestion: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OutputFile {
|
||||||
|
path: string
|
||||||
|
contents: Uint8Array
|
||||||
|
hash: string
|
||||||
|
/** "contents" as text (changes automatically with "contents") */
|
||||||
|
readonly text: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
|
||||||
|
errors: Message[]
|
||||||
|
warnings: Message[]
|
||||||
|
/** Only when "write: false" */
|
||||||
|
outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined)
|
||||||
|
/** Only when "metafile: true" */
|
||||||
|
metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined)
|
||||||
|
/** Only when "mangleCache" is present */
|
||||||
|
mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BuildFailure extends Error {
|
||||||
|
errors: Message[]
|
||||||
|
warnings: Message[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#serve-arguments */
|
||||||
|
export interface ServeOptions {
|
||||||
|
port?: number
|
||||||
|
host?: string
|
||||||
|
servedir?: string
|
||||||
|
keyfile?: string
|
||||||
|
certfile?: string
|
||||||
|
fallback?: string
|
||||||
|
onRequest?: (args: ServeOnRequestArgs) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ServeOnRequestArgs {
|
||||||
|
remoteAddress: string
|
||||||
|
method: string
|
||||||
|
path: string
|
||||||
|
status: number
|
||||||
|
/** The time to generate the response, not to send it */
|
||||||
|
timeInMS: number
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#serve-return-values */
|
||||||
|
export interface ServeResult {
|
||||||
|
port: number
|
||||||
|
host: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TransformOptions extends CommonOptions {
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#sourcefile */
|
||||||
|
sourcefile?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#loader */
|
||||||
|
loader?: Loader
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#banner */
|
||||||
|
banner?: string
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#footer */
|
||||||
|
footer?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
|
||||||
|
code: string
|
||||||
|
map: string
|
||||||
|
warnings: Message[]
|
||||||
|
/** Only when "mangleCache" is present */
|
||||||
|
mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
|
||||||
|
/** Only when "legalComments" is "external" */
|
||||||
|
legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TransformFailure extends Error {
|
||||||
|
errors: Message[]
|
||||||
|
warnings: Message[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Plugin {
|
||||||
|
name: string
|
||||||
|
setup: (build: PluginBuild) => (void | Promise<void>)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PluginBuild {
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#build-options */
|
||||||
|
initialOptions: BuildOptions
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#resolve */
|
||||||
|
resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-start */
|
||||||
|
onStart(callback: () =>
|
||||||
|
(OnStartResult | null | void | Promise<OnStartResult | null | void>)): void
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-end */
|
||||||
|
onEnd(callback: (result: BuildResult) =>
|
||||||
|
(OnEndResult | null | void | Promise<OnEndResult | null | void>)): void
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-resolve */
|
||||||
|
onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) =>
|
||||||
|
(OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-load */
|
||||||
|
onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) =>
|
||||||
|
(OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-dispose */
|
||||||
|
onDispose(callback: () => void): void
|
||||||
|
|
||||||
|
// This is a full copy of the esbuild library in case you need it
|
||||||
|
esbuild: {
|
||||||
|
context: typeof context,
|
||||||
|
build: typeof build,
|
||||||
|
buildSync: typeof buildSync,
|
||||||
|
transform: typeof transform,
|
||||||
|
transformSync: typeof transformSync,
|
||||||
|
formatMessages: typeof formatMessages,
|
||||||
|
formatMessagesSync: typeof formatMessagesSync,
|
||||||
|
analyzeMetafile: typeof analyzeMetafile,
|
||||||
|
analyzeMetafileSync: typeof analyzeMetafileSync,
|
||||||
|
initialize: typeof initialize,
|
||||||
|
version: typeof version,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#resolve-options */
|
||||||
|
export interface ResolveOptions {
|
||||||
|
pluginName?: string
|
||||||
|
importer?: string
|
||||||
|
namespace?: string
|
||||||
|
resolveDir?: string
|
||||||
|
kind?: ImportKind
|
||||||
|
pluginData?: any
|
||||||
|
with?: Record<string, string>
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#resolve-results */
|
||||||
|
export interface ResolveResult {
|
||||||
|
errors: Message[]
|
||||||
|
warnings: Message[]
|
||||||
|
|
||||||
|
path: string
|
||||||
|
external: boolean
|
||||||
|
sideEffects: boolean
|
||||||
|
namespace: string
|
||||||
|
suffix: string
|
||||||
|
pluginData: any
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OnStartResult {
|
||||||
|
errors?: PartialMessage[]
|
||||||
|
warnings?: PartialMessage[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OnEndResult {
|
||||||
|
errors?: PartialMessage[]
|
||||||
|
warnings?: PartialMessage[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */
|
||||||
|
export interface OnResolveOptions {
|
||||||
|
filter: RegExp
|
||||||
|
namespace?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */
|
||||||
|
export interface OnResolveArgs {
|
||||||
|
path: string
|
||||||
|
importer: string
|
||||||
|
namespace: string
|
||||||
|
resolveDir: string
|
||||||
|
kind: ImportKind
|
||||||
|
pluginData: any
|
||||||
|
with: Record<string, string>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ImportKind =
|
||||||
|
| 'entry-point'
|
||||||
|
|
||||||
|
// JS
|
||||||
|
| 'import-statement'
|
||||||
|
| 'require-call'
|
||||||
|
| 'dynamic-import'
|
||||||
|
| 'require-resolve'
|
||||||
|
|
||||||
|
// CSS
|
||||||
|
| 'import-rule'
|
||||||
|
| 'composes-from'
|
||||||
|
| 'url-token'
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
|
||||||
|
export interface OnResolveResult {
|
||||||
|
pluginName?: string
|
||||||
|
|
||||||
|
errors?: PartialMessage[]
|
||||||
|
warnings?: PartialMessage[]
|
||||||
|
|
||||||
|
path?: string
|
||||||
|
external?: boolean
|
||||||
|
sideEffects?: boolean
|
||||||
|
namespace?: string
|
||||||
|
suffix?: string
|
||||||
|
pluginData?: any
|
||||||
|
|
||||||
|
watchFiles?: string[]
|
||||||
|
watchDirs?: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-load-options */
|
||||||
|
export interface OnLoadOptions {
|
||||||
|
filter: RegExp
|
||||||
|
namespace?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */
|
||||||
|
export interface OnLoadArgs {
|
||||||
|
path: string
|
||||||
|
namespace: string
|
||||||
|
suffix: string
|
||||||
|
pluginData: any
|
||||||
|
with: Record<string, string>
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/plugins/#on-load-results */
|
||||||
|
export interface OnLoadResult {
|
||||||
|
pluginName?: string
|
||||||
|
|
||||||
|
errors?: PartialMessage[]
|
||||||
|
warnings?: PartialMessage[]
|
||||||
|
|
||||||
|
contents?: string | Uint8Array
|
||||||
|
resolveDir?: string
|
||||||
|
loader?: Loader
|
||||||
|
pluginData?: any
|
||||||
|
|
||||||
|
watchFiles?: string[]
|
||||||
|
watchDirs?: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PartialMessage {
|
||||||
|
id?: string
|
||||||
|
pluginName?: string
|
||||||
|
text?: string
|
||||||
|
location?: Partial<Location> | null
|
||||||
|
notes?: PartialNote[]
|
||||||
|
detail?: any
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PartialNote {
|
||||||
|
text?: string
|
||||||
|
location?: Partial<Location> | null
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#metafile */
|
||||||
|
export interface Metafile {
|
||||||
|
inputs: {
|
||||||
|
[path: string]: {
|
||||||
|
bytes: number
|
||||||
|
imports: {
|
||||||
|
path: string
|
||||||
|
kind: ImportKind
|
||||||
|
external?: boolean
|
||||||
|
original?: string
|
||||||
|
with?: Record<string, string>
|
||||||
|
}[]
|
||||||
|
format?: 'cjs' | 'esm'
|
||||||
|
with?: Record<string, string>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
outputs: {
|
||||||
|
[path: string]: {
|
||||||
|
bytes: number
|
||||||
|
inputs: {
|
||||||
|
[path: string]: {
|
||||||
|
bytesInOutput: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
imports: {
|
||||||
|
path: string
|
||||||
|
kind: ImportKind | 'file-loader'
|
||||||
|
external?: boolean
|
||||||
|
}[]
|
||||||
|
exports: string[]
|
||||||
|
entryPoint?: string
|
||||||
|
cssBundle?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FormatMessagesOptions {
|
||||||
|
kind: 'error' | 'warning'
|
||||||
|
color?: boolean
|
||||||
|
terminalWidth?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AnalyzeMetafileOptions {
|
||||||
|
color?: boolean
|
||||||
|
verbose?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface WatchOptions {
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#rebuild */
|
||||||
|
rebuild(): Promise<BuildResult<ProvidedOptions>>
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#watch */
|
||||||
|
watch(options?: WatchOptions): Promise<void>
|
||||||
|
|
||||||
|
/** Documentation: https://esbuild.github.io/api/#serve */
|
||||||
|
serve(options?: ServeOptions): Promise<ServeResult>
|
||||||
|
|
||||||
|
cancel(): Promise<void>
|
||||||
|
dispose(): Promise<void>
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is a TypeScript type-level function which replaces any keys in "In"
|
||||||
|
// that aren't in "Out" with "never". We use this to reject properties with
|
||||||
|
// typos in object literals. See: https://stackoverflow.com/questions/49580725
|
||||||
|
type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function invokes the "esbuild" command-line tool for you. It returns a
|
||||||
|
* promise that either resolves with a "BuildResult" object or rejects with a
|
||||||
|
* "BuildFailure" object.
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: yes
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#build
|
||||||
|
*/
|
||||||
|
export declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the advanced long-running form of "build" that supports additional
|
||||||
|
* features such as watch mode and a local development server.
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: no
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#build
|
||||||
|
*/
|
||||||
|
export declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function transforms a single JavaScript file. It can be used to minify
|
||||||
|
* JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
|
||||||
|
* to older JavaScript. It returns a promise that is either resolved with a
|
||||||
|
* "TransformResult" object or rejected with a "TransformFailure" object.
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: yes
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#transform
|
||||||
|
*/
|
||||||
|
export declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts log messages to formatted message strings suitable for printing in
|
||||||
|
* the terminal. This allows you to reuse the built-in behavior of esbuild's
|
||||||
|
* log message formatter. This is a batch-oriented API for efficiency.
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: yes
|
||||||
|
*/
|
||||||
|
export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pretty-prints an analysis of the metafile JSON to a string. This is just for
|
||||||
|
* convenience to be able to match esbuild's pretty-printing exactly. If you want
|
||||||
|
* to customize it, you can just inspect the data in the metafile yourself.
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: yes
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#analyze
|
||||||
|
*/
|
||||||
|
export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A synchronous version of "build".
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: no
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#build
|
||||||
|
*/
|
||||||
|
export declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A synchronous version of "transform".
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: no
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#transform
|
||||||
|
*/
|
||||||
|
export declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A synchronous version of "formatMessages".
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: no
|
||||||
|
*/
|
||||||
|
export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A synchronous version of "analyzeMetafile".
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: no
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#analyze
|
||||||
|
*/
|
||||||
|
export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This configures the browser-based version of esbuild. It is necessary to
|
||||||
|
* call this first and wait for the returned promise to be resolved before
|
||||||
|
* making other API calls when using esbuild in the browser.
|
||||||
|
*
|
||||||
|
* - Works in node: yes
|
||||||
|
* - Works in browser: yes ("options" is required)
|
||||||
|
*
|
||||||
|
* Documentation: https://esbuild.github.io/api/#browser
|
||||||
|
*/
|
||||||
|
export declare function initialize(options: InitializeOptions): Promise<void>
|
||||||
|
|
||||||
|
export interface InitializeOptions {
|
||||||
|
/**
|
||||||
|
* The URL of the "esbuild.wasm" file. This must be provided when running
|
||||||
|
* esbuild in the browser.
|
||||||
|
*/
|
||||||
|
wasmURL?: string | URL
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The result of calling "new WebAssembly.Module(buffer)" where "buffer"
|
||||||
|
* is a typed array or ArrayBuffer containing the binary code of the
|
||||||
|
* "esbuild.wasm" file.
|
||||||
|
*
|
||||||
|
* You can use this as an alternative to "wasmURL" for environments where it's
|
||||||
|
* not possible to download the WebAssembly module.
|
||||||
|
*/
|
||||||
|
wasmModule?: WebAssembly.Module
|
||||||
|
|
||||||
|
/**
|
||||||
|
* By default esbuild runs the WebAssembly-based browser API in a web worker
|
||||||
|
* to avoid blocking the UI thread. This can be disabled by setting "worker"
|
||||||
|
* to false.
|
||||||
|
*/
|
||||||
|
worker?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export let version: string
|
||||||
|
|
||||||
|
// Call this function to terminate esbuild's child process. The child process
|
||||||
|
// is not terminated and re-created after each API call because it's more
|
||||||
|
// efficient to keep it around when there are multiple API calls.
|
||||||
|
//
|
||||||
|
// In node this happens automatically before the parent node process exits. So
|
||||||
|
// you only need to call this if you know you will not make any more esbuild
|
||||||
|
// API calls and you want to clean up resources.
|
||||||
|
//
|
||||||
|
// Unlike node, Deno lacks the necessary APIs to clean up child processes
|
||||||
|
// automatically. You must manually call stop() in Deno when you're done
|
||||||
|
// using esbuild or Deno will continue running forever.
|
||||||
|
//
|
||||||
|
// Another reason you might want to call this is if you are using esbuild from
|
||||||
|
// within a Deno test. Deno fails tests that create a child process without
|
||||||
|
// killing it before the test ends, so you have to call this function (and
|
||||||
|
// await the returned promise) in every Deno test that uses esbuild.
|
||||||
|
export declare function stop(): Promise<void>
|
||||||
|
|
||||||
|
// Note: These declarations exist to avoid type errors when you omit "dom" from
|
||||||
|
// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
|
||||||
|
// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
|
||||||
|
// with the browser DOM and is present in many non-browser JavaScript runtimes
|
||||||
|
// (e.g. node and deno). Declaring it here allows esbuild's API to be used in
|
||||||
|
// these scenarios.
|
||||||
|
//
|
||||||
|
// There's an open issue about getting this problem corrected (although these
|
||||||
|
// declarations will need to remain even if this is fixed for backward
|
||||||
|
// compatibility with older TypeScript versions):
|
||||||
|
//
|
||||||
|
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
|
||||||
|
//
|
||||||
|
declare global {
|
||||||
|
namespace WebAssembly {
|
||||||
|
interface Module {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
interface URL {
|
||||||
|
}
|
||||||
|
}
|
2244
node_modules/esbuild/lib/main.js
generated
vendored
Normal file
2244
node_modules/esbuild/lib/main.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
47
node_modules/esbuild/package.json
generated
vendored
Normal file
47
node_modules/esbuild/package.json
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
"name": "esbuild",
|
||||||
|
"version": "0.23.1",
|
||||||
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/evanw/esbuild.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"postinstall": "node install.js"
|
||||||
|
},
|
||||||
|
"main": "lib/main.js",
|
||||||
|
"types": "lib/main.d.ts",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"esbuild": "bin/esbuild"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@esbuild/aix-ppc64": "0.23.1",
|
||||||
|
"@esbuild/android-arm": "0.23.1",
|
||||||
|
"@esbuild/android-arm64": "0.23.1",
|
||||||
|
"@esbuild/android-x64": "0.23.1",
|
||||||
|
"@esbuild/darwin-arm64": "0.23.1",
|
||||||
|
"@esbuild/darwin-x64": "0.23.1",
|
||||||
|
"@esbuild/freebsd-arm64": "0.23.1",
|
||||||
|
"@esbuild/freebsd-x64": "0.23.1",
|
||||||
|
"@esbuild/linux-arm": "0.23.1",
|
||||||
|
"@esbuild/linux-arm64": "0.23.1",
|
||||||
|
"@esbuild/linux-ia32": "0.23.1",
|
||||||
|
"@esbuild/linux-loong64": "0.23.1",
|
||||||
|
"@esbuild/linux-mips64el": "0.23.1",
|
||||||
|
"@esbuild/linux-ppc64": "0.23.1",
|
||||||
|
"@esbuild/linux-riscv64": "0.23.1",
|
||||||
|
"@esbuild/linux-s390x": "0.23.1",
|
||||||
|
"@esbuild/linux-x64": "0.23.1",
|
||||||
|
"@esbuild/netbsd-x64": "0.23.1",
|
||||||
|
"@esbuild/openbsd-arm64": "0.23.1",
|
||||||
|
"@esbuild/openbsd-x64": "0.23.1",
|
||||||
|
"@esbuild/sunos-x64": "0.23.1",
|
||||||
|
"@esbuild/win32-arm64": "0.23.1",
|
||||||
|
"@esbuild/win32-ia32": "0.23.1",
|
||||||
|
"@esbuild/win32-x64": "0.23.1"
|
||||||
|
},
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
151
node_modules/js-tokens/CHANGELOG.md
generated
vendored
Normal file
151
node_modules/js-tokens/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
### Version 4.0.0 (2018-01-28) ###
|
||||||
|
|
||||||
|
- Added: Support for ES2018. The only change needed was recognizing the `s`
|
||||||
|
regex flag.
|
||||||
|
- Changed: _All_ tokens returned by the `matchToToken` function now have a
|
||||||
|
`closed` property. It is set to `undefined` for the tokens where “closed”
|
||||||
|
doesn’t make sense. This means that all tokens objects have the same shape,
|
||||||
|
which might improve performance.
|
||||||
|
|
||||||
|
These are the breaking changes:
|
||||||
|
|
||||||
|
- `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but
|
||||||
|
`['/a/s']`. (There are of course other variations of this.)
|
||||||
|
- Code that rely on some token objects not having the `closed` property could
|
||||||
|
now behave differently.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 3.0.2 (2017-06-28) ###
|
||||||
|
|
||||||
|
- No code changes. Just updates to the readme.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 3.0.1 (2017-01-30) ###
|
||||||
|
|
||||||
|
- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 3.0.0 (2017-01-11) ###
|
||||||
|
|
||||||
|
This release contains one breaking change, that should [improve performance in
|
||||||
|
V8][v8-perf]:
|
||||||
|
|
||||||
|
> So how can you, as a JavaScript developer, ensure that your RegExps are fast?
|
||||||
|
> If you are not interested in hooking into RegExp internals, make sure that
|
||||||
|
> neither the RegExp instance, nor its prototype is modified in order to get the
|
||||||
|
> best performance:
|
||||||
|
>
|
||||||
|
> ```js
|
||||||
|
> var re = /./g;
|
||||||
|
> re.exec(''); // Fast path.
|
||||||
|
> re.new_property = 'slow';
|
||||||
|
> ```
|
||||||
|
|
||||||
|
This module used to export a single regex, with `.matchToToken` bolted
|
||||||
|
on, just like in the above example. This release changes the exports of
|
||||||
|
the module to avoid this issue.
|
||||||
|
|
||||||
|
Before:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import jsTokens from "js-tokens"
|
||||||
|
// or:
|
||||||
|
var jsTokens = require("js-tokens")
|
||||||
|
var matchToToken = jsTokens.matchToToken
|
||||||
|
```
|
||||||
|
|
||||||
|
After:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import jsTokens, {matchToToken} from "js-tokens"
|
||||||
|
// or:
|
||||||
|
var jsTokens = require("js-tokens").default
|
||||||
|
var matchToToken = require("js-tokens").matchToToken
|
||||||
|
```
|
||||||
|
|
||||||
|
[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html
|
||||||
|
|
||||||
|
|
||||||
|
### Version 2.0.0 (2016-06-19) ###
|
||||||
|
|
||||||
|
- Added: Support for ES2016. In other words, support for the `**` exponentiation
|
||||||
|
operator.
|
||||||
|
|
||||||
|
These are the breaking changes:
|
||||||
|
|
||||||
|
- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`.
|
||||||
|
- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 1.0.3 (2016-03-27) ###
|
||||||
|
|
||||||
|
- Improved: Made the regex ever so slightly smaller.
|
||||||
|
- Updated: The readme.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 1.0.2 (2015-10-18) ###
|
||||||
|
|
||||||
|
- Improved: Limited npm package contents for a smaller download. Thanks to
|
||||||
|
@zertosh!
|
||||||
|
|
||||||
|
|
||||||
|
### Version 1.0.1 (2015-06-20) ###
|
||||||
|
|
||||||
|
- Fixed: Declared an undeclared variable.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 1.0.0 (2015-02-26) ###
|
||||||
|
|
||||||
|
- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
|
||||||
|
type is now equivalent to the Punctuator token in the ECMAScript
|
||||||
|
specification. (Backwards-incompatible change.)
|
||||||
|
- Fixed: A `-` followed by a number is now correctly matched as a punctuator
|
||||||
|
followed by a number. It used to be matched as just a number, but there is no
|
||||||
|
such thing as negative number literals. (Possibly backwards-incompatible
|
||||||
|
change.)
|
||||||
|
|
||||||
|
|
||||||
|
### Version 0.4.1 (2015-02-21) ###
|
||||||
|
|
||||||
|
- Added: Support for the regex `u` flag.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 0.4.0 (2015-02-21) ###
|
||||||
|
|
||||||
|
- Improved: `jsTokens.matchToToken` performance.
|
||||||
|
- Added: Support for octal and binary number literals.
|
||||||
|
- Added: Support for template strings.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 0.3.1 (2015-01-06) ###
|
||||||
|
|
||||||
|
- Fixed: Support for unicode spaces. They used to be allowed in names (which is
|
||||||
|
very confusing), and some unicode newlines were wrongly allowed in strings and
|
||||||
|
regexes.
|
||||||
|
|
||||||
|
|
||||||
|
### Version 0.3.0 (2014-12-19) ###
|
||||||
|
|
||||||
|
- Changed: The `jsTokens.names` array has been replaced with the
|
||||||
|
`jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
|
||||||
|
longer part of the public API; instead use said function. See this [gist] for
|
||||||
|
an example. (Backwards-incompatible change.)
|
||||||
|
- Changed: The empty string is now considered an “invalid” token, instead an
|
||||||
|
“empty” token (its own group). (Backwards-incompatible change.)
|
||||||
|
- Removed: component support. (Backwards-incompatible change.)
|
||||||
|
|
||||||
|
[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
|
||||||
|
|
||||||
|
|
||||||
|
### Version 0.2.0 (2014-06-19) ###
|
||||||
|
|
||||||
|
- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
|
||||||
|
category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
|
||||||
|
- Added: ES6 splats (`...`) are now matched as an operator (instead of three
|
||||||
|
punctuations). (Backwards-incompatible change.)
|
||||||
|
|
||||||
|
|
||||||
|
### Version 0.1.0 (2014-03-08) ###
|
||||||
|
|
||||||
|
- Initial release.
|
21
node_modules/js-tokens/LICENSE
generated
vendored
Normal file
21
node_modules/js-tokens/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
||||||
|
|
||||||
|
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.
|
240
node_modules/js-tokens/README.md
generated
vendored
Normal file
240
node_modules/js-tokens/README.md
generated
vendored
Normal file
|
@ -0,0 +1,240 @@
|
||||||
|
Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.svg?branch=master)](https://travis-ci.org/lydell/js-tokens)
|
||||||
|
========
|
||||||
|
|
||||||
|
A regex that tokenizes JavaScript.
|
||||||
|
|
||||||
|
```js
|
||||||
|
var jsTokens = require("js-tokens").default
|
||||||
|
|
||||||
|
var jsString = "var foo=opts.foo;\n..."
|
||||||
|
|
||||||
|
jsString.match(jsTokens)
|
||||||
|
// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
`npm install js-tokens`
|
||||||
|
|
||||||
|
```js
|
||||||
|
import jsTokens from "js-tokens"
|
||||||
|
// or:
|
||||||
|
var jsTokens = require("js-tokens").default
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
### `jsTokens` ###
|
||||||
|
|
||||||
|
A regex with the `g` flag that matches JavaScript tokens.
|
||||||
|
|
||||||
|
The regex _always_ matches, even invalid JavaScript and the empty string.
|
||||||
|
|
||||||
|
The next match is always directly after the previous.
|
||||||
|
|
||||||
|
### `var token = matchToToken(match)` ###
|
||||||
|
|
||||||
|
```js
|
||||||
|
import {matchToToken} from "js-tokens"
|
||||||
|
// or:
|
||||||
|
var matchToToken = require("js-tokens").matchToToken
|
||||||
|
```
|
||||||
|
|
||||||
|
Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:
|
||||||
|
String, value: String}` object. The following types are available:
|
||||||
|
|
||||||
|
- string
|
||||||
|
- comment
|
||||||
|
- regex
|
||||||
|
- number
|
||||||
|
- name
|
||||||
|
- punctuator
|
||||||
|
- whitespace
|
||||||
|
- invalid
|
||||||
|
|
||||||
|
Multi-line comments and strings also have a `closed` property indicating if the
|
||||||
|
token was closed or not (see below).
|
||||||
|
|
||||||
|
Comments and strings both come in several flavors. To distinguish them, check if
|
||||||
|
the token starts with `//`, `/*`, `'`, `"` or `` ` ``.
|
||||||
|
|
||||||
|
Names are ECMAScript IdentifierNames, that is, including both identifiers and
|
||||||
|
keywords. You may use [is-keyword-js] to tell them apart.
|
||||||
|
|
||||||
|
Whitespace includes both line terminators and other whitespace.
|
||||||
|
|
||||||
|
[is-keyword-js]: https://github.com/crissdev/is-keyword-js
|
||||||
|
|
||||||
|
|
||||||
|
ECMAScript support
|
||||||
|
==================
|
||||||
|
|
||||||
|
The intention is to always support the latest ECMAScript version whose feature
|
||||||
|
set has been finalized.
|
||||||
|
|
||||||
|
If adding support for a newer version requires changes, a new version with a
|
||||||
|
major verion bump will be released.
|
||||||
|
|
||||||
|
Currently, ECMAScript 2018 is supported.
|
||||||
|
|
||||||
|
|
||||||
|
Invalid code handling
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Unterminated strings are still matched as strings. JavaScript strings cannot
|
||||||
|
contain (unescaped) newlines, so unterminated strings simply end at the end of
|
||||||
|
the line. Unterminated template strings can contain unescaped newlines, though,
|
||||||
|
so they go on to the end of input.
|
||||||
|
|
||||||
|
Unterminated multi-line comments are also still matched as comments. They
|
||||||
|
simply go on to the end of the input.
|
||||||
|
|
||||||
|
Unterminated regex literals are likely matched as division and whatever is
|
||||||
|
inside the regex.
|
||||||
|
|
||||||
|
Invalid ASCII characters have their own capturing group.
|
||||||
|
|
||||||
|
Invalid non-ASCII characters are treated as names, to simplify the matching of
|
||||||
|
names (except unicode spaces which are treated as whitespace). Note: See also
|
||||||
|
the [ES2018](#es2018) section.
|
||||||
|
|
||||||
|
Regex literals may contain invalid regex syntax. They are still matched as
|
||||||
|
regex literals. They may also contain repeated regex flags, to keep the regex
|
||||||
|
simple.
|
||||||
|
|
||||||
|
Strings may contain invalid escape sequences.
|
||||||
|
|
||||||
|
|
||||||
|
Limitations
|
||||||
|
===========
|
||||||
|
|
||||||
|
Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be
|
||||||
|
perfect. But that’s not the point either.
|
||||||
|
|
||||||
|
You may compare jsTokens with [esprima] by using `esprima-compare.js`.
|
||||||
|
See `npm run esprima-compare`!
|
||||||
|
|
||||||
|
[esprima]: http://esprima.org/
|
||||||
|
|
||||||
|
### Template string interpolation ###
|
||||||
|
|
||||||
|
Template strings are matched as single tokens, from the starting `` ` `` to the
|
||||||
|
ending `` ` ``, including interpolations (whose tokens are not matched
|
||||||
|
individually).
|
||||||
|
|
||||||
|
Matching template string interpolations requires recursive balancing of `{` and
|
||||||
|
`}`—something that JavaScript regexes cannot do. Only one level of nesting is
|
||||||
|
supported.
|
||||||
|
|
||||||
|
### Division and regex literals collision ###
|
||||||
|
|
||||||
|
Consider this example:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var g = 9.82
|
||||||
|
var number = bar / 2/g
|
||||||
|
|
||||||
|
var regex = / 2/g
|
||||||
|
```
|
||||||
|
|
||||||
|
A human can easily understand that in the `number` line we’re dealing with
|
||||||
|
division, and in the `regex` line we’re dealing with a regex literal. How come?
|
||||||
|
Because humans can look at the whole code to put the `/` characters in context.
|
||||||
|
A JavaScript regex cannot. It only sees forwards. (Well, ES2018 regexes can also
|
||||||
|
look backwards. See the [ES2018](#es2018) section).
|
||||||
|
|
||||||
|
When the `jsTokens` regex scans throught the above, it will see the following
|
||||||
|
at the end of both the `number` and `regex` rows:
|
||||||
|
|
||||||
|
```js
|
||||||
|
/ 2/g
|
||||||
|
```
|
||||||
|
|
||||||
|
It is then impossible to know if that is a regex literal, or part of an
|
||||||
|
expression dealing with division.
|
||||||
|
|
||||||
|
Here is a similar case:
|
||||||
|
|
||||||
|
```js
|
||||||
|
foo /= 2/g
|
||||||
|
foo(/= 2/g)
|
||||||
|
```
|
||||||
|
|
||||||
|
The first line divides the `foo` variable with `2/g`. The second line calls the
|
||||||
|
`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only
|
||||||
|
sees forwards, it cannot tell the two cases apart.
|
||||||
|
|
||||||
|
There are some cases where we _can_ tell division and regex literals apart,
|
||||||
|
though.
|
||||||
|
|
||||||
|
First off, we have the simple cases where there’s only one slash in the line:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var foo = 2/g
|
||||||
|
foo /= 2
|
||||||
|
```
|
||||||
|
|
||||||
|
Regex literals cannot contain newlines, so the above cases are correctly
|
||||||
|
identified as division. Things are only problematic when there are more than
|
||||||
|
one non-comment slash in a single line.
|
||||||
|
|
||||||
|
Secondly, not every character is a valid regex flag.
|
||||||
|
|
||||||
|
```js
|
||||||
|
var number = bar / 2/e
|
||||||
|
```
|
||||||
|
|
||||||
|
The above example is also correctly identified as division, because `e` is not a
|
||||||
|
valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
|
||||||
|
(any letter) as flags, but it is not worth it since it increases the amount of
|
||||||
|
ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
|
||||||
|
allowed. This means that the above example will be identified as division as
|
||||||
|
long as you don’t rename the `e` variable to some permutation of `gmiyus` 1 to 6
|
||||||
|
characters long.
|
||||||
|
|
||||||
|
Lastly, we can look _forward_ for information.
|
||||||
|
|
||||||
|
- If the token following what looks like a regex literal is not valid after a
|
||||||
|
regex literal, but is valid in a division expression, then the regex literal
|
||||||
|
is treated as division instead. For example, a flagless regex cannot be
|
||||||
|
followed by a string, number or name, but all of those three can be the
|
||||||
|
denominator of a division.
|
||||||
|
- Generally, if what looks like a regex literal is followed by an operator, the
|
||||||
|
regex literal is treated as division instead. This is because regexes are
|
||||||
|
seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division
|
||||||
|
could likely be part of such an expression.
|
||||||
|
|
||||||
|
Please consult the regex source and the test cases for precise information on
|
||||||
|
when regex or division is matched (should you need to know). In short, you
|
||||||
|
could sum it up as:
|
||||||
|
|
||||||
|
If the end of a statement looks like a regex literal (even if it isn’t), it
|
||||||
|
will be treated as one. Otherwise it should work as expected (if you write sane
|
||||||
|
code).
|
||||||
|
|
||||||
|
### ES2018 ###
|
||||||
|
|
||||||
|
ES2018 added some nice regex improvements to the language.
|
||||||
|
|
||||||
|
- [Unicode property escapes] should allow telling names and invalid non-ASCII
|
||||||
|
characters apart without blowing up the regex size.
|
||||||
|
- [Lookbehind assertions] should allow matching telling division and regex
|
||||||
|
literals apart in more cases.
|
||||||
|
- [Named capture groups] might simplify some things.
|
||||||
|
|
||||||
|
These things would be nice to do, but are not critical. They probably have to
|
||||||
|
wait until the oldest maintained Node.js LTS release supports those features.
|
||||||
|
|
||||||
|
[Unicode property escapes]: http://2ality.com/2017/07/regexp-unicode-property-escapes.html
|
||||||
|
[Lookbehind assertions]: http://2ality.com/2017/05/regexp-lookbehind-assertions.html
|
||||||
|
[Named capture groups]: http://2ality.com/2017/05/regexp-named-capture-groups.html
|
||||||
|
|
||||||
|
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
|
||||||
|
[MIT](LICENSE).
|
23
node_modules/js-tokens/index.js
generated
vendored
Normal file
23
node_modules/js-tokens/index.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
||||||
|
// License: MIT. (See LICENSE.)
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// This regex comes from regex.coffee, and is inserted here by generate-index.js
|
||||||
|
// (run `npm run build`).
|
||||||
|
exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
|
||||||
|
|
||||||
|
exports.matchToToken = function(match) {
|
||||||
|
var token = {type: "invalid", value: match[0], closed: undefined}
|
||||||
|
if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
|
||||||
|
else if (match[ 5]) token.type = "comment"
|
||||||
|
else if (match[ 6]) token.type = "comment", token.closed = !!match[7]
|
||||||
|
else if (match[ 8]) token.type = "regex"
|
||||||
|
else if (match[ 9]) token.type = "number"
|
||||||
|
else if (match[10]) token.type = "name"
|
||||||
|
else if (match[11]) token.type = "punctuator"
|
||||||
|
else if (match[12]) token.type = "whitespace"
|
||||||
|
return token
|
||||||
|
}
|
30
node_modules/js-tokens/package.json
generated
vendored
Normal file
30
node_modules/js-tokens/package.json
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"name": "js-tokens",
|
||||||
|
"version": "4.0.0",
|
||||||
|
"author": "Simon Lydell",
|
||||||
|
"license": "MIT",
|
||||||
|
"description": "A regex that tokenizes JavaScript.",
|
||||||
|
"keywords": [
|
||||||
|
"JavaScript",
|
||||||
|
"js",
|
||||||
|
"token",
|
||||||
|
"tokenize",
|
||||||
|
"regex"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"index.js"
|
||||||
|
],
|
||||||
|
"repository": "lydell/js-tokens",
|
||||||
|
"scripts": {
|
||||||
|
"test": "mocha --ui tdd",
|
||||||
|
"esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
|
||||||
|
"build": "node generate-index.js",
|
||||||
|
"dev": "npm run build && npm test"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"coffeescript": "2.1.1",
|
||||||
|
"esprima": "4.0.0",
|
||||||
|
"everything.js": "1.0.3",
|
||||||
|
"mocha": "5.0.0"
|
||||||
|
}
|
||||||
|
}
|
21
node_modules/loose-envify/LICENSE
generated
vendored
Normal file
21
node_modules/loose-envify/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Andres Suarez <zertosh@gmail.com>
|
||||||
|
|
||||||
|
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.
|
45
node_modules/loose-envify/README.md
generated
vendored
Normal file
45
node_modules/loose-envify/README.md
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# loose-envify
|
||||||
|
|
||||||
|
[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)
|
||||||
|
|
||||||
|
Fast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.
|
||||||
|
|
||||||
|
## Gotchas
|
||||||
|
|
||||||
|
* Doesn't handle broken syntax.
|
||||||
|
* Doesn't look inside embedded expressions in template strings.
|
||||||
|
- **this won't work:**
|
||||||
|
```js
|
||||||
|
console.log(`the current env is ${process.env.NODE_ENV}`);
|
||||||
|
```
|
||||||
|
* Doesn't replace oddly-spaced or oddly-commented expressions.
|
||||||
|
- **this won't work:**
|
||||||
|
```js
|
||||||
|
console.log(process./*won't*/env./*work*/NODE_ENV);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage/Options
|
||||||
|
|
||||||
|
loose-envify has the exact same interface as [envify](https://github.com/hughsk/envify), including the CLI.
|
||||||
|
|
||||||
|
## Benchmark
|
||||||
|
|
||||||
|
```
|
||||||
|
envify:
|
||||||
|
|
||||||
|
$ for i in {1..5}; do node bench/bench.js 'envify'; done
|
||||||
|
708ms
|
||||||
|
727ms
|
||||||
|
791ms
|
||||||
|
719ms
|
||||||
|
720ms
|
||||||
|
|
||||||
|
loose-envify:
|
||||||
|
|
||||||
|
$ for i in {1..5}; do node bench/bench.js '../'; done
|
||||||
|
51ms
|
||||||
|
52ms
|
||||||
|
52ms
|
||||||
|
52ms
|
||||||
|
52ms
|
||||||
|
```
|
16
node_modules/loose-envify/cli.js
generated
vendored
Executable file
16
node_modules/loose-envify/cli.js
generated
vendored
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var looseEnvify = require('./');
|
||||||
|
var fs = require('fs');
|
||||||
|
|
||||||
|
if (process.argv[2]) {
|
||||||
|
fs.createReadStream(process.argv[2], {encoding: 'utf8'})
|
||||||
|
.pipe(looseEnvify(process.argv[2]))
|
||||||
|
.pipe(process.stdout);
|
||||||
|
} else {
|
||||||
|
process.stdin.resume()
|
||||||
|
process.stdin
|
||||||
|
.pipe(looseEnvify(__filename))
|
||||||
|
.pipe(process.stdout);
|
||||||
|
}
|
4
node_modules/loose-envify/custom.js
generated
vendored
Normal file
4
node_modules/loose-envify/custom.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
// envify compatibility
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = require('./loose-envify');
|
3
node_modules/loose-envify/index.js
generated
vendored
Normal file
3
node_modules/loose-envify/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = require('./loose-envify')(process.env);
|
36
node_modules/loose-envify/loose-envify.js
generated
vendored
Normal file
36
node_modules/loose-envify/loose-envify.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var stream = require('stream');
|
||||||
|
var util = require('util');
|
||||||
|
var replace = require('./replace');
|
||||||
|
|
||||||
|
var jsonExtRe = /\.json$/;
|
||||||
|
|
||||||
|
module.exports = function(rootEnv) {
|
||||||
|
rootEnv = rootEnv || process.env;
|
||||||
|
return function (file, trOpts) {
|
||||||
|
if (jsonExtRe.test(file)) {
|
||||||
|
return stream.PassThrough();
|
||||||
|
}
|
||||||
|
var envs = trOpts ? [rootEnv, trOpts] : [rootEnv];
|
||||||
|
return new LooseEnvify(envs);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
function LooseEnvify(envs) {
|
||||||
|
stream.Transform.call(this);
|
||||||
|
this._data = '';
|
||||||
|
this._envs = envs;
|
||||||
|
}
|
||||||
|
util.inherits(LooseEnvify, stream.Transform);
|
||||||
|
|
||||||
|
LooseEnvify.prototype._transform = function(buf, enc, cb) {
|
||||||
|
this._data += buf;
|
||||||
|
cb();
|
||||||
|
};
|
||||||
|
|
||||||
|
LooseEnvify.prototype._flush = function(cb) {
|
||||||
|
var replaced = replace(this._data, this._envs);
|
||||||
|
this.push(replaced);
|
||||||
|
cb();
|
||||||
|
};
|
36
node_modules/loose-envify/package.json
generated
vendored
Normal file
36
node_modules/loose-envify/package.json
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"name": "loose-envify",
|
||||||
|
"version": "1.4.0",
|
||||||
|
"description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
|
||||||
|
"keywords": [
|
||||||
|
"environment",
|
||||||
|
"variables",
|
||||||
|
"browserify",
|
||||||
|
"browserify-transform",
|
||||||
|
"transform",
|
||||||
|
"source",
|
||||||
|
"configuration"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/zertosh/loose-envify",
|
||||||
|
"license": "MIT",
|
||||||
|
"author": "Andres Suarez <zertosh@gmail.com>",
|
||||||
|
"main": "index.js",
|
||||||
|
"bin": {
|
||||||
|
"loose-envify": "cli.js"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/zertosh/loose-envify.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "tap test/*.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"browserify": "^13.1.1",
|
||||||
|
"envify": "^3.4.0",
|
||||||
|
"tap": "^8.0.0"
|
||||||
|
}
|
||||||
|
}
|
65
node_modules/loose-envify/replace.js
generated
vendored
Normal file
65
node_modules/loose-envify/replace.js
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var jsTokens = require('js-tokens').default;
|
||||||
|
|
||||||
|
var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
|
||||||
|
var spaceOrCommentRe = /^(?:\s|\/[/*])/;
|
||||||
|
|
||||||
|
function replace(src, envs) {
|
||||||
|
if (!processEnvRe.test(src)) {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
|
||||||
|
var out = [];
|
||||||
|
var purge = envs.some(function(env) {
|
||||||
|
return env._ && env._.indexOf('purge') !== -1;
|
||||||
|
});
|
||||||
|
|
||||||
|
jsTokens.lastIndex = 0
|
||||||
|
var parts = src.match(jsTokens);
|
||||||
|
|
||||||
|
for (var i = 0; i < parts.length; i++) {
|
||||||
|
if (parts[i ] === 'process' &&
|
||||||
|
parts[i + 1] === '.' &&
|
||||||
|
parts[i + 2] === 'env' &&
|
||||||
|
parts[i + 3] === '.') {
|
||||||
|
var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
|
||||||
|
var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
|
||||||
|
var replacement = getReplacementString(envs, parts[i + 4], purge);
|
||||||
|
if (prevCodeToken !== '.' &&
|
||||||
|
nextCodeToken !== '.' &&
|
||||||
|
nextCodeToken !== '=' &&
|
||||||
|
typeof replacement === 'string') {
|
||||||
|
out.push(replacement);
|
||||||
|
i += 4;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.push(parts[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return out.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAdjacentCodeToken(dir, parts, i) {
|
||||||
|
while (true) {
|
||||||
|
var part = parts[i += dir];
|
||||||
|
if (!spaceOrCommentRe.test(part)) {
|
||||||
|
return part;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getReplacementString(envs, name, purge) {
|
||||||
|
for (var j = 0; j < envs.length; j++) {
|
||||||
|
var env = envs[j];
|
||||||
|
if (typeof env[name] !== 'undefined') {
|
||||||
|
return JSON.stringify(env[name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (purge) {
|
||||||
|
return 'undefined';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = replace;
|
996
node_modules/moment/CHANGELOG.md
generated
vendored
Normal file
996
node_modules/moment/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,996 @@
|
||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
### 2.30.1
|
||||||
|
* Release Dec 27, 2023
|
||||||
|
* Revert https://github.com/moment/moment/pull/5827, because it's breaking
|
||||||
|
a lot of TS code.
|
||||||
|
|
||||||
|
### 2.30.0 [Full changelog](https://gist.github.com/ichernev/e277bcd1f0eeabb834f60a777237925a)
|
||||||
|
* Release Dec 26, 2023
|
||||||
|
|
||||||
|
### 2.29.4
|
||||||
|
|
||||||
|
* Release Jul 6, 2022
|
||||||
|
* [#6015](https://github.com/moment/moment/pull/6015) [bugfix] Fix ReDoS in preprocessRFC2822 regex
|
||||||
|
|
||||||
|
### 2.29.3 [Full changelog](https://gist.github.com/ichernev/edebd440f49adcaec72e5e77b791d8be)
|
||||||
|
|
||||||
|
* Release Apr 17, 2022
|
||||||
|
* [#5995](https://github.com/moment/moment/pull/5995) [bugfix] Remove const usage
|
||||||
|
* [#5990](https://github.com/moment/moment/pull/5990) misc: fix advisory link
|
||||||
|
|
||||||
|
|
||||||
|
### 2.29.2 [See full changelog](https://gist.github.com/ichernev/1904b564f6679d9aac1ae08ce13bc45c)
|
||||||
|
|
||||||
|
* Release Apr 3 2022
|
||||||
|
|
||||||
|
Address https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
|
||||||
|
|
||||||
|
### 2.29.1 [See full changelog](https://gist.github.com/marwahaha/cc478ba01a1292ab4bd4e861d164d99b)
|
||||||
|
|
||||||
|
* Release Oct 6, 2020
|
||||||
|
|
||||||
|
Updated deprecation message, bugfix in hi locale
|
||||||
|
|
||||||
|
### 2.29.0 [See full changelog](https://gist.github.com/marwahaha/b0111718641a6461800066549957ec14)
|
||||||
|
|
||||||
|
* Release Sept 22, 2020
|
||||||
|
|
||||||
|
New locales (es-mx, bn-bd).
|
||||||
|
Minor bugfixes and locale improvements.
|
||||||
|
More tests.
|
||||||
|
Moment is in maintenance mode. Read more at this link:
|
||||||
|
https://momentjs.com/docs/#/-project-status/
|
||||||
|
|
||||||
|
### 2.28.0 [See full changelog](https://gist.github.com/marwahaha/028fd6c2b2470b2804857cfd63c0e94f)
|
||||||
|
|
||||||
|
* Release Sept 13, 2020
|
||||||
|
|
||||||
|
Fix bug where .format() modifies original instance, and locale updates
|
||||||
|
|
||||||
|
### 2.27.0 [See full changelog](https://gist.github.com/marwahaha/5100c9c2f42019067b1f6cefc333daa7)
|
||||||
|
|
||||||
|
* Release June 18, 2020
|
||||||
|
|
||||||
|
Added Turkmen locale, other locale improvements, slight TypeScript fixes
|
||||||
|
|
||||||
|
### 2.26.0 [See full changelog](https://gist.github.com/marwahaha/0725c40740560854a849b096ea7b7590)
|
||||||
|
|
||||||
|
* Release May 19, 2020
|
||||||
|
|
||||||
|
TypeScript fixes and many locale improvements
|
||||||
|
|
||||||
|
### 2.25.3
|
||||||
|
|
||||||
|
* Release May 4, 2020
|
||||||
|
|
||||||
|
Remove package.json module property. It looks like webpack behaves differently
|
||||||
|
for modules loaded via module vs jsnext:main.
|
||||||
|
|
||||||
|
### 2.25.2
|
||||||
|
|
||||||
|
* Release May 4, 2020
|
||||||
|
|
||||||
|
This release includes ES Module bundled moment, separate from it's source code
|
||||||
|
under dist/ folder. This might alleviate issues with finding the `./locale
|
||||||
|
subfolder for loading locales. This might also mean now webpack will bundle all
|
||||||
|
locales automatically, unless told otherwise.
|
||||||
|
|
||||||
|
### 2.25.1
|
||||||
|
|
||||||
|
* Release May 1, 2020
|
||||||
|
|
||||||
|
This is a quick patch release to address some of the issues raised after
|
||||||
|
releasing 2.25.0.
|
||||||
|
|
||||||
|
* [2e268635](https://github.com/moment/moment/commit/2e268635) [misc] Revert #5269 due to webpack warning
|
||||||
|
* [226799e1](https://github.com/moment/moment/commit/226799e1) [locale] fil: Fix metadata comment
|
||||||
|
* [a83a521](https://github.com/moment/moment/commit/a83a521) [bugfix] Fix typeoff usages
|
||||||
|
* [e324334](https://github.com/moment/moment/commit/e324334) [pkg] Add ts3.1-typings in npm package
|
||||||
|
* [28cc23e](https://github.com/moment/moment/commit/28cc23e) [misc] Remove deleted generated locale en-SG
|
||||||
|
|
||||||
|
### 2.25.0 [See full changelog](https://gist.github.com/ichernev/6148e64df2427e455b10ce6a18de1a65)
|
||||||
|
|
||||||
|
* Release May 1, 2020
|
||||||
|
|
||||||
|
* [#4611](https://github.com/moment/moment/issues/4611) [022dc038](https://github.com/moment/moment/commit/022dc038) [feature] Support for strict string parsing, fixes [#2469](https://github.com/moment/moment/issues/2469)
|
||||||
|
* [#4599](https://github.com/moment/moment/issues/4599) [4b615b9d](https://github.com/moment/moment/commit/4b615b9d) [feature] Add support for eras in en and jp
|
||||||
|
* [#4296](https://github.com/moment/moment/issues/4296) [757d4ff8](https://github.com/moment/moment/commit/757d4ff8) [feature] Accept custom relative thresholds in duration.humanize
|
||||||
|
|
||||||
|
* 18 bigfixes
|
||||||
|
* 36 locale fixes
|
||||||
|
* 5 new locales (oc-lnc, zh-mo, en-in, gom-deva, fil)
|
||||||
|
|
||||||
|
### 2.24.0 [See full changelog](https://gist.github.com/marwahaha/12366fe45bee328f33acf125d4cd540e)
|
||||||
|
|
||||||
|
* Release Jan 21, 2019
|
||||||
|
|
||||||
|
* [#4338](https://github.com/moment/moment/pull/4338) [bugfix] Fix startOf/endOf DST issues while boosting performance
|
||||||
|
* [#4553](https://github.com/moment/moment/pull/4553) [feature] Add localeSort param to Locale weekday methods
|
||||||
|
* [#4887](https://github.com/moment/moment/pull/4887) [bugfix] Make Duration#as work with quarters
|
||||||
|
* 3 new locales (it-ch, ga, en-SG)
|
||||||
|
* Lots of locale improvements
|
||||||
|
|
||||||
|
### 2.23.0 [See full changelog](https://gist.github.com/marwahaha/eadb7ac11b761290399a576f8b2419a5)
|
||||||
|
|
||||||
|
* Release Dec 12, 2018
|
||||||
|
|
||||||
|
* [#4863](https://github.com/moment/moment/pull/4863) [new locale] added Kurdish language (ku)
|
||||||
|
* [#4417](https://github.com/moment/moment/pull/4417) [bugfix] isBetween should return false for invalid dates
|
||||||
|
* [#4700](https://github.com/moment/moment/pull/4700) [bugfix] Fix [#4698](https://github.com/moment/moment/pull/4698): Use ISO WeekYear for HTML5_FMT.WEEK
|
||||||
|
* [#4563](https://github.com/moment/moment/pull/4563) [feature] Fix [#4518](https://github.com/moment/moment/pull/4518): Add support to add/subtract ISO weeks
|
||||||
|
* other locale changes, build process changes, typos
|
||||||
|
|
||||||
|
### 2.22.2 [See full changelog](https://gist.github.com/marwahaha/4d992c13c2dbc0f59d4d8acae1dc6d3a)
|
||||||
|
|
||||||
|
* Release May 31, 2018
|
||||||
|
|
||||||
|
* [#4564](https://github.com/moment/moment/pull/4564) [bugfix] Avoid using trim()
|
||||||
|
* [#4453](https://github.com/moment/moment/pull/4453) [bugfix] Treat periods as periods, not regex-anything period, for weekday parsing in strict mode.
|
||||||
|
* Minor locale improvements (pa-in, be, az)
|
||||||
|
|
||||||
|
### 2.22.1 [See full changelog](https://gist.github.com/marwahaha/ff2cd13d0eda08afb7a237b10aae558c)
|
||||||
|
|
||||||
|
* Release Apr 14, 2018
|
||||||
|
|
||||||
|
* [#4495](https://github.com/moment/moment/pull/4495) [bugfix] Added HTML5_FMT to moment.d.ts
|
||||||
|
* Minor locale improvements
|
||||||
|
* QUnit upgrade and coveralls reporting
|
||||||
|
|
||||||
|
### 2.22.0 [See full changelog](https://gist.github.com/marwahaha/ae895025dac3f0641fa9ec2e36d282bb)
|
||||||
|
|
||||||
|
* Release Mar 30, 2018
|
||||||
|
|
||||||
|
* [#4423](https://github.com/moment/moment/pull/4423) [new locale] Added Mongolian locale mn
|
||||||
|
* Various locale improvements
|
||||||
|
* Minor misc changes
|
||||||
|
|
||||||
|
### 2.21.0 [See full changelog](https://gist.github.com/marwahaha/80d19ef882b71df1948df7865efdd40e)
|
||||||
|
|
||||||
|
* Release Mar 2, 2018
|
||||||
|
|
||||||
|
* [#4391](https://github.com/moment/moment/pull/4391) [bugfix] Fix [#4390](https://github.com/moment/moment/pull/4390): use offset properly in toISOString
|
||||||
|
* [#4310](https://github.com/moment/moment/pull/4310) [bugfix] Fix [#3883](https://github.com/moment/moment/pull/3883) lazy load parentLocale in defineLocale, fallback to global if missing
|
||||||
|
* [#4085](https://github.com/moment/moment/pull/4085) [misc] Print console warning when setting non-existent locales
|
||||||
|
* [#4371](https://github.com/moment/moment/pull/4371) [misc] fix deprecated rollup options
|
||||||
|
* New locales: ug-cn, en-il, tg
|
||||||
|
* Various locale improvements
|
||||||
|
|
||||||
|
### 2.20.1 [See changelog](https://gist.github.com/marwahaha/d72c1cb22076373be889b16272cbd187)
|
||||||
|
|
||||||
|
* Release Dec 18, 2017
|
||||||
|
|
||||||
|
* [#4359](https://github.com/moment/moment/pull/4359) [locale] Fix Arabic locale for months (again)
|
||||||
|
* [#4357](https://github.com/moment/moment/pull/4357) [misc] Add optional parameter keepOffset to toISOString
|
||||||
|
|
||||||
|
### 2.20.0 [See full changelog](https://gist.github.com/marwahaha/e0d4135fbf8bb75fa85c4aa2bddc5031)
|
||||||
|
|
||||||
|
* Release Dec 16, 2017
|
||||||
|
|
||||||
|
* [#4312](https://github.com/moment/moment/pull/4312) [bugfix] Fix [#4251](https://github.com/moment/moment/pull/4251): Avoid RFC2822 in utc() test
|
||||||
|
* [#4240](https://github.com/moment/moment/pull/4240) [bugfix] Fix incorrect strict parsing with full-width parentheses
|
||||||
|
* [#4341](https://github.com/moment/moment/pull/4341) [feature] Prevent toISOString converting to UTC (issue [#1751](https://github.com/moment/moment/pull/1751))
|
||||||
|
* [#4154](https://github.com/moment/moment/pull/4154) [feature] add format constants to support output to HTML5 input type formats (see [#3928](https://github.com/moment/moment/pull/3928))
|
||||||
|
* [#4143](https://github.com/moment/moment/pull/4143) [new locale] mt: Maltese language
|
||||||
|
* [#4183](https://github.com/moment/moment/pull/4183) [locale] Relative seconds i18n
|
||||||
|
* Various other locale improvements
|
||||||
|
|
||||||
|
### 2.19.4 [See changelog](https://gist.github.com/marwahaha/d3b7b0ddf4bdae512244f16e8cc59efb)
|
||||||
|
|
||||||
|
* Release Dec 10, 2017
|
||||||
|
|
||||||
|
* [#4332](https://github.com/moment/moment/pull/4332) [bugfix] Fix weekday verification for UTC and offset days (fixes [#4227](https://github.com/moment/moment/pull/4227))
|
||||||
|
* [#4336](https://github.com/moment/moment/pull/4336) [bugfix] Fix [#4334](https://github.com/moment/moment/pull/4334): Remove unused function call argument
|
||||||
|
* [#4246](https://github.com/moment/moment/pull/4246) [misc] Add 'ss' relative time key to typescript definition
|
||||||
|
|
||||||
|
### 2.19.3 [See changelog](https://gist.github.com/marwahaha/3654006bc0c2e522451c08d12c0bfabf)
|
||||||
|
|
||||||
|
* Release Nov 29, 2017
|
||||||
|
|
||||||
|
* [#4326](https://github.com/moment/moment/pull/4326) [bugfix] Fix for ReDOS vulnerability (see [#4163](https://github.com/moment/moment/issues/4163))
|
||||||
|
* [#4289](https://github.com/moment/moment/pull/4289) [misc] Fix spelling and formatting for U.S. for es-us
|
||||||
|
|
||||||
|
### 2.19.2 [See changelog (it's the same >:D)](https://gist.github.com/ichernev/76b1a3f33d3a8ff9665ce434a45221d0)
|
||||||
|
|
||||||
|
* Release Nov 11, 2017
|
||||||
|
|
||||||
|
* [#4255](https://github.com/moment/moment/pull/4255) [bugfix] Fix year setter for random days in a leap year, fixes [#4238](https://github.com/moment/moment/issues/4238)
|
||||||
|
* [#4242](https://github.com/moment/moment/pull/4242) [bugfix] updateLocale now tries to load parent, fixes [#3626](https://github.com/moment/moment/issues/3626)
|
||||||
|
|
||||||
|
### 2.19.1
|
||||||
|
|
||||||
|
* Release Oct 11, 2017
|
||||||
|
|
||||||
|
Make react native and webpack both work
|
||||||
|
* #4225 #4226 #4232
|
||||||
|
|
||||||
|
### 2.19.0 [See full changelog](https://gist.github.com/ichernev/5f3f4eb02761b4f765a0cccf02cec603)
|
||||||
|
|
||||||
|
* Release Oct 10, 2017
|
||||||
|
|
||||||
|
## Fix React Native 0.49+ crash
|
||||||
|
* [#4213](https://github.com/moment/moment/pull/4213) [critical] Rename dynamic
|
||||||
|
require to avoid React Native crash
|
||||||
|
* [#4214](https://github.com/moment/moment/pull/4214) [fixup] Move require
|
||||||
|
rename inside try/catch, fixes
|
||||||
|
[#4213](https://github.com/moment/moment/issues/4213)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* [#3735](https://github.com/moment/moment/pull/3735) [feature] Ignore NaN values in setters
|
||||||
|
* [#4106](https://github.com/moment/moment/pull/4106) [fixup] Drop isNumeric utility fn, fixes [#3735](https://github.com/moment/moment/issues/3735)
|
||||||
|
* [#4080](https://github.com/moment/moment/pull/4080) [feature] Implement a clone method for durations, fixes [#4078](https://github.com/moment/moment/issues/4078)
|
||||||
|
* [#4215](https://github.com/moment/moment/pull/4215) [misc] TS: Add duration.clone(), for [#4080](https://github.com/moment/moment/issues/4080)
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
* [#4003](https://github.com/moment/moment/pull/4003) [pkg] bower: Remove tests from package
|
||||||
|
* [#3904](https://github.com/moment/moment/pull/3904) [pkg] jsnext:main -> module in package.json
|
||||||
|
* [#4060](https://github.com/moment/moment/pull/4060) [pkg] Account for new rollup interface
|
||||||
|
|
||||||
|
Bugfixes, new locales, locale fixes etc...
|
||||||
|
|
||||||
|
### 2.18.1
|
||||||
|
|
||||||
|
* Release Mar 22, 2017
|
||||||
|
|
||||||
|
* [#3853](https://github.com/moment/moment/pull/3853) [misc] Fix invalid whitespace character causing inability to parse
|
||||||
|
moment.js
|
||||||
|
|
||||||
|
### 2.18.0 [See full changelog](https://gist.github.com/ichernev/78920c5a1e419fb28c6e4546d1b7235c)
|
||||||
|
|
||||||
|
* Release Mar 18, 2017
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* [#3708](https://github.com/moment/moment/pull/3708) [feature] RFC2822 parsing
|
||||||
|
* [#3611](https://github.com/moment/moment/pull/3611) [feature] Durations gain validity
|
||||||
|
* [#3738](https://github.com/moment/moment/pull/3738) [feature] Enable relative time for multiple seconds, request [#2558](https://github.com/moment/moment/issues/2558)
|
||||||
|
* [#3766](https://github.com/moment/moment/pull/3766) [feature] Add support for k and kk format parsing
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
* [#3643](https://github.com/moment/moment/pull/3643) [bugfix] Fixes [#3520](https://github.com/moment/moment/issues/3520), parseZone incorrectly handled minutes under 16
|
||||||
|
* [#3710](https://github.com/moment/moment/pull/3710) [bugfix] Fixes [#3632](https://github.com/moment/moment/issues/3632), toISOString returns null for invalid date
|
||||||
|
* [#3787](https://github.com/moment/moment/pull/3787) [bugfix] Fixes [#3717](https://github.com/moment/moment/issues/3717), ensure day-of-year is non-zero
|
||||||
|
* [#3780](https://github.com/moment/moment/pull/3780) [bugfix] Fixes [#3765](https://github.com/moment/moment/issues/3765): Ensure year 0 is formatted with YYYY
|
||||||
|
* [#3806](https://github.com/moment/moment/pull/3806) [bugfix] Fixes [#3805](https://github.com/moment/moment/issues/3805), fix locale month getters for standalone/format cases
|
||||||
|
|
||||||
|
7 new locales, many locale improvements and some misc changes
|
||||||
|
|
||||||
|
### 2.17.1 [Also available here](https://gist.github.com/ichernev/f38280b2b29c4932914a6d3a4e50bfb2)
|
||||||
|
* Release Dec 03, 2016
|
||||||
|
|
||||||
|
* [#3638](https://github.com/moment/moment/pull/3638) [misc] TS: Make typescript definitions work with 1.x
|
||||||
|
* [#3628](https://github.com/moment/moment/pull/3628) [misc] Adds "sign CLA" link to `CONTRIBUTING.md`
|
||||||
|
* [#3640](https://github.com/moment/moment/pull/3640) [misc] Fix locale issues
|
||||||
|
|
||||||
|
### 2.17.0 [Also available here](https://gist.github.com/ichernev/ed58f76fb95205eeac653d719972b90c)
|
||||||
|
* Release Nov 22, 2016
|
||||||
|
|
||||||
|
* [#3435](https://github.com/moment/moment/pull/3435) [new locale] yo: Yoruba (Nigeria) locale
|
||||||
|
* [#3595](https://github.com/moment/moment/pull/3595) [bugfix] Fix accidental reference to global "value" variable
|
||||||
|
* [#3506](https://github.com/moment/moment/pull/3506) [bugfix] Fix invalid moments returning valid dates to method calls
|
||||||
|
* [#3563](https://github.com/moment/moment/pull/3563) [locale] ca: Change future relative time
|
||||||
|
* [#3504](https://github.com/moment/moment/pull/3504) [tests] Fixes [#3463](https://github.com/moment/moment/issues/3463), parseZone not handling Z correctly (tests only)
|
||||||
|
* [#3591](https://github.com/moment/moment/pull/3591) [misc] typescript: update typescript to 2.0.8, add strictNullChecks=true
|
||||||
|
* [#3597](https://github.com/moment/moment/pull/3597) [misc] Fixed capitalization in nuget spec
|
||||||
|
|
||||||
|
### 2.16.0 [See full changelog](https://gist.github.com/ichernev/17bffc1005a032cb1a8ac4c1558b4994)
|
||||||
|
* Release Nov 9, 2016
|
||||||
|
|
||||||
|
## Features
|
||||||
|
* [#3530](https://github.com/moment/moment/pull/3530) [feature] Check whether input is date before checking if format is array
|
||||||
|
* [#3515](https://github.com/moment/moment/pull/3515) [feature] Fix [#2300](https://github.com/moment/moment/issues/2300): Default to current week.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
* [#3546](https://github.com/moment/moment/pull/3546) [bugfix] Implement lazy-loading of child locales with missing prents
|
||||||
|
* [#3523](https://github.com/moment/moment/pull/3523) [bugfix] parseZone should handle UTC
|
||||||
|
* [#3502](https://github.com/moment/moment/pull/3502) [bugfix] Fix [#3500](https://github.com/moment/moment/issues/3500): ISO 8601 parsing should match the full string, not the beginning of the string.
|
||||||
|
* [#3581](https://github.com/moment/moment/pull/3581) [bugfix] Fix parseZone, redo [#3504](https://github.com/moment/moment/issues/3504), fix [#3463](https://github.com/moment/moment/issues/3463)
|
||||||
|
|
||||||
|
## New Locales
|
||||||
|
* [#3416](https://github.com/moment/moment/pull/3416) [new locale] nl-be: Dutch (Belgium) locale
|
||||||
|
* [#3393](https://github.com/moment/moment/pull/3393) [new locale] ar-dz: Arabic (Algeria) locale
|
||||||
|
* [#3342](https://github.com/moment/moment/pull/3342) [new locale] tet: Tetun Dili (East Timor) locale
|
||||||
|
|
||||||
|
And more locale, build and typescript improvements
|
||||||
|
|
||||||
|
### 2.15.2
|
||||||
|
* Release Oct 23, 2016
|
||||||
|
* [#3525](https://github.com/moment/moment/pull/3525) Speedup month standalone/format regexes **(IMPORTANT)**
|
||||||
|
* [#3466](https://github.com/moment/moment/pull/3466) Fix typo of Javanese
|
||||||
|
|
||||||
|
### 2.15.1
|
||||||
|
* Release Sept 20, 2016
|
||||||
|
* [#3438](https://github.com/moment/moment/pull/3438) Fix locale autoload, revert [#3344](https://github.com/moment/moment/pull/3344)
|
||||||
|
|
||||||
|
### 2.15.0 [See full changelog](https://gist.github.com/ichernev/10e1c5bf647545c72ca30e9628a09ed3)
|
||||||
|
- Release Sept 12, 2016
|
||||||
|
|
||||||
|
## New Locales
|
||||||
|
* [#3255](https://github.com/moment/moment/pull/3255) [new locale] mi: Maori language
|
||||||
|
* [#3267](https://github.com/moment/moment/pull/3267) [new locale] ar-ly: Arabic (Libya) locale
|
||||||
|
* [#3333](https://github.com/moment/moment/pull/3333) [new locale] zh-hk: Chinese (Hong Kong) locale
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
* [#3276](https://github.com/moment/moment/pull/3276) [bugfix] duration: parser: Support ms durations in .NET syntax
|
||||||
|
* [#3312](https://github.com/moment/moment/pull/3312) [bugfix] locales: Enable locale-data getters without moment (fixes [#3284](https://github.com/moment/moment/issues/3284))
|
||||||
|
* [#3381](https://github.com/moment/moment/pull/3381) [bugfix] parsing: Fix parseZone without timezone in string, fixes [#3083](https://github.com/moment/moment/issues/3083)
|
||||||
|
* [#3383](https://github.com/moment/moment/pull/3383) [bugfix] toJSON: Fix isValid so that toJSON works after a moment is frozen
|
||||||
|
* [#3427](https://github.com/moment/moment/pull/3427) [bugfix] ie8: Fix IE8 (regression in 2.14.x)
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
* [#3299](https://github.com/moment/moment/pull/3299) [pkg] npm: Do not include .npmignore in npm package
|
||||||
|
* [#3273](https://github.com/moment/moment/pull/3273) [pkg] jspm: Include moment.d.ts file in package
|
||||||
|
* [#3344](https://github.com/moment/moment/pull/3344) [pkg] exports: use module.require for nodejs
|
||||||
|
|
||||||
|
Also some locale and typescript improvements
|
||||||
|
|
||||||
|
### 2.14.1
|
||||||
|
- Release July 20, 2016
|
||||||
|
* [#3280](https://github.com/moment/moment/pull/3280) Fix typescript definitions
|
||||||
|
|
||||||
|
|
||||||
|
### 2.14.0 [See full changelog](https://gist.github.com/ichernev/812e79ac36a7829a22598fe964bfc18a)
|
||||||
|
|
||||||
|
- Release July 20, 2016
|
||||||
|
|
||||||
|
## New Features
|
||||||
|
* [#3233](https://github.com/moment/moment/pull/3233) Introduce month.isFormat for format/standalone discovery
|
||||||
|
* [#2848](https://github.com/moment/moment/pull/2848) Allow user to get/set the rounding method used when calculating relative time
|
||||||
|
* [#3112](https://github.com/moment/moment/pull/3112) optimize configFromStringAndFormat
|
||||||
|
* [#3147](https://github.com/moment/moment/pull/3147) Call calendar format function with moment context
|
||||||
|
* [#3160](https://github.com/moment/moment/pull/3160) deprecate isDSTShifted
|
||||||
|
* [#3175](https://github.com/moment/moment/pull/3175) make moment calendar extensible with ad-hoc options
|
||||||
|
* [#3191](https://github.com/moment/moment/pull/3191) toDate returns a copy of the internal date object
|
||||||
|
* [#3192](https://github.com/moment/moment/pull/3192) Adding support for rollup import.
|
||||||
|
* [#3238](https://github.com/moment/moment/pull/3238) Handle empty object and empty array for creation as now
|
||||||
|
* [#3082](https://github.com/moment/moment/pull/3082) Use relative AMD moment dependency
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
* [#3241](https://github.com/moment/moment/pull/3241) Escape all 24 mixed pieces, not only first 12 in computeMonthsParse
|
||||||
|
* [#3008](https://github.com/moment/moment/pull/3008) Object setter orders sets based on size of unit
|
||||||
|
* [#3177](https://github.com/moment/moment/pull/3177) Bug Fix [#2704](https://github.com/moment/moment/pull/2704) - isoWeekday(String) inconsistent with isoWeekday(Number)
|
||||||
|
* [#3230](https://github.com/moment/moment/pull/3230) fix passing date with format string to ignore format string
|
||||||
|
* [#3232](https://github.com/moment/moment/pull/3232) Fix negative 0 in certain diff cases
|
||||||
|
* [#3235](https://github.com/moment/moment/pull/3235) Use proper locale inheritance for the base locale, fixes [#3137](https://github.com/moment/moment/pull/3137)
|
||||||
|
|
||||||
|
Plus es-do locale and locale bugfixes
|
||||||
|
|
||||||
|
### 2.13.0 [See full changelog](https://gist.github.com/ichernev/0132fcf5b61f7fc140b0bb0090480d49)
|
||||||
|
- Release April 18, 2016
|
||||||
|
|
||||||
|
## Enhancements:
|
||||||
|
* [#2982](https://github.com/moment/moment/pull/2982) Add 'date' as alias to 'day' for startOf() and endOf().
|
||||||
|
* [#2955](https://github.com/moment/moment/pull/2955) Add parsing negative components in durations when ISO 8601
|
||||||
|
* [#2991](https://github.com/moment/moment/pull/2991) isBetween support for both open and closed intervals
|
||||||
|
* [#3105](https://github.com/moment/moment/pull/3105) Add localeSorted argument to weekday listers
|
||||||
|
* [#3102](https://github.com/moment/moment/pull/3102) Add k and kk formatting tokens
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
* [#3109](https://github.com/moment/moment/pull/3109) Fix [#1756](https://github.com/moment/moment/issues/1756) Resolved thread-safe issue on server side.
|
||||||
|
* [#3078](https://github.com/moment/moment/pull/3078) Fix parsing for months/weekdays with weird characters
|
||||||
|
* [#3098](https://github.com/moment/moment/pull/3098) Use Z suffix when in UTC mode ([#3020](https://github.com/moment/moment/issues/3020))
|
||||||
|
* [#2995](https://github.com/moment/moment/pull/2995) Fix floating point rounding errors in durations
|
||||||
|
* [#3059](https://github.com/moment/moment/pull/3059) fix bug where diff returns -0 in month-related diffs
|
||||||
|
* [#3045](https://github.com/moment/moment/pull/3045) Fix mistaking any input for 'a' token
|
||||||
|
* [#2877](https://github.com/moment/moment/pull/2877) Use explicit .valueOf() calls instead of coercion
|
||||||
|
* [#3036](https://github.com/moment/moment/pull/3036) Year setter should keep time when DST changes
|
||||||
|
|
||||||
|
Plus 3 new locales and locale fixes.
|
||||||
|
|
||||||
|
### 2.12.0 [See full changelog](https://gist.github.com/ichernev/6e5bfdf8d6522fc4ac73)
|
||||||
|
|
||||||
|
- Release March 7, 2016
|
||||||
|
|
||||||
|
## Enhancements:
|
||||||
|
* [#2932](https://github.com/moment/moment/pull/2932) List loaded locales
|
||||||
|
* [#2818](https://github.com/moment/moment/pull/2818) Parse ISO-8061 duration containing both day and week values
|
||||||
|
* [#2774](https://github.com/moment/moment/pull/2774) Implement locale inheritance and locale updating
|
||||||
|
|
||||||
|
## Bugfixes:
|
||||||
|
* [#2970](https://github.com/moment/moment/pull/2970) change add subtract to handle decimal values by rounding
|
||||||
|
* [#2887](https://github.com/moment/moment/pull/2887) Fix toJSON casting of invalid moment
|
||||||
|
* [#2897](https://github.com/moment/moment/pull/2897) parse string arguments for month() correctly, closes #2884
|
||||||
|
* [#2946](https://github.com/moment/moment/pull/2946) Fix usage suggestions for min and max
|
||||||
|
|
||||||
|
## New locales:
|
||||||
|
* [#2917](https://github.com/moment/moment/pull/2917) Locale Punjabi(Gurmukhi) India format conversion
|
||||||
|
|
||||||
|
And more
|
||||||
|
|
||||||
|
### 2.11.2 (Fix ReDoS attack vector)
|
||||||
|
|
||||||
|
- Release February 7, 2016
|
||||||
|
|
||||||
|
* [#2939](https://github.com/moment/moment/pull/2939) use full-string match to speed up aspnet regex match
|
||||||
|
|
||||||
|
### 2.11.1 [See full changelog](https://gist.github.com/ichernev/8ec3ee25b749b4cff3c2)
|
||||||
|
|
||||||
|
- Release January 9, 2016
|
||||||
|
|
||||||
|
## Bugfixes:
|
||||||
|
* [#2881](https://github.com/moment/moment/pull/2881) Revert "Merge pull request #2746 from mbad0la:develop" Sep->Sept
|
||||||
|
* [#2868](https://github.com/moment/moment/pull/2868) Add format and parse token Y, so it actually works
|
||||||
|
* [#2865](https://github.com/moment/moment/pull/2865) Use typeof checks for undefined for global variables
|
||||||
|
* [#2858](https://github.com/moment/moment/pull/2858) Fix Date mocking regression introduced in 2.11.0
|
||||||
|
* [#2864](https://github.com/moment/moment/pull/2864) Include changelog in npm release
|
||||||
|
* [#2830](https://github.com/moment/moment/pull/2830) dep: add grunt-cli
|
||||||
|
* [#2869](https://github.com/moment/moment/pull/2869) Fix months parsing for some locales
|
||||||
|
|
||||||
|
### 2.11.0 [See full changelog](https://gist.github.com/ichernev/6594bc29719dde6b2f66)
|
||||||
|
|
||||||
|
- Release January 4, 2016
|
||||||
|
|
||||||
|
* [#2624](https://github.com/moment/moment/pull/2624) Proper handling of invalid moments
|
||||||
|
* [#2634](https://github.com/moment/moment/pull/2634) Fix strict month parsing issue in cs,ru,sk
|
||||||
|
* [#2735](https://github.com/moment/moment/pull/2735) Reset the locale back to 'en' after defining all locales in min/locales.js
|
||||||
|
* [#2702](https://github.com/moment/moment/pull/2702) Week rework
|
||||||
|
* [#2746](https://github.com/moment/moment/pull/2746) Changed September Abbreviation to "Sept" in locale-specific english
|
||||||
|
files and default locale file
|
||||||
|
* [#2646](https://github.com/moment/moment/pull/2646) Fix [#2645](https://github.com/moment/moment/pull/2645) - invalid dates pre-1970
|
||||||
|
|
||||||
|
* [#2641](https://github.com/moment/moment/pull/2641) Implement basic format and comma as ms separator in ISO 8601
|
||||||
|
* [#2665](https://github.com/moment/moment/pull/2665) Implement stricter weekday parsing
|
||||||
|
* [#2700](https://github.com/moment/moment/pull/2700) Add [Hh]mm and [Hh]mmss formatting tokens, so you can parse 123 with
|
||||||
|
hmm for example
|
||||||
|
* [#2565](https://github.com/moment/moment/pull/2565) [#2835](https://github.com/moment/moment/pull/2835) Expose arguments used for moment creation with creationData
|
||||||
|
(fix [#2443](https://github.com/moment/moment/pull/2443))
|
||||||
|
* [#2648](https://github.com/moment/moment/pull/2648) fix issue [#2640](https://github.com/moment/moment/pull/2640): support instanceof operator
|
||||||
|
* [#2709](https://github.com/moment/moment/pull/2709) Add isSameOrAfter and isSameOrBefore comparison methods
|
||||||
|
* [#2721](https://github.com/moment/moment/pull/2721) Fix moment creation from object with strings values
|
||||||
|
* [#2740](https://github.com/moment/moment/pull/2740) Enable 'd hh:mm:ss.sss' format for durations
|
||||||
|
* [#2766](https://github.com/moment/moment/pull/2766) [#2833](https://github.com/moment/moment/pull/2833) Alternate Clock Source Support
|
||||||
|
|
||||||
|
### 2.10.6
|
||||||
|
|
||||||
|
- Release July 28, 2015
|
||||||
|
|
||||||
|
[#2515](https://github.com/moment/moment/pull/2515) Fix regression introduced
|
||||||
|
in `2.10.5` related to `moment.ISO_8601` parsing.
|
||||||
|
|
||||||
|
### 2.10.5 [See full changelog](https://gist.github.com/ichernev/6ec13ac7efc396da44b2)
|
||||||
|
|
||||||
|
- Release July 26, 2015
|
||||||
|
|
||||||
|
Important changes:
|
||||||
|
* [#2357](https://github.com/moment/moment/pull/2357) Improve unit bubbling for ISO dates
|
||||||
|
this fixes day to year conversions to work around end-of-year (~365 days). As
|
||||||
|
a side effect 365 days is 11 months and 30 days, and 366 days is one year.
|
||||||
|
* [#2438](https://github.com/moment/moment/pull/2438) Fix inconsistent moment.min and moment.max results
|
||||||
|
Return invalid result if any of the inputs is invalid
|
||||||
|
* [#2494](https://github.com/moment/moment/pull/2494) Fix two digit year parsing with YYYY format
|
||||||
|
This brings the benefits of YY to YYYY
|
||||||
|
* [#2368](https://github.com/moment/moment/pull/2368) perf: use faster form of copying dates, across the board improvement
|
||||||
|
|
||||||
|
|
||||||
|
### 2.10.3 [See full changelog](https://gist.github.com/ichernev/f264b9bed5b00f8b1b7f)
|
||||||
|
|
||||||
|
- Release May 13, 2015
|
||||||
|
|
||||||
|
* add `moment.fn.to` and `moment.fn.toNow` (similar to `from` and `fromNow`)
|
||||||
|
* new locales (Sinhalese (si), Montenegrin (me), Javanese (ja))
|
||||||
|
* performance improvements
|
||||||
|
|
||||||
|
### 2.10.2
|
||||||
|
|
||||||
|
- Release April 9, 2015
|
||||||
|
|
||||||
|
* fixed moment-with-locales in browser env caused by esperanto change
|
||||||
|
|
||||||
|
### 2.10.1
|
||||||
|
|
||||||
|
* regression: Add moment.duration.fn back
|
||||||
|
|
||||||
|
### 2.10.0
|
||||||
|
|
||||||
|
Ported code to es6 modules.
|
||||||
|
|
||||||
|
### 2.9.0 [See full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7)
|
||||||
|
|
||||||
|
- Release January 8, 2015
|
||||||
|
|
||||||
|
languages:
|
||||||
|
* [2104](https://github.com/moment/moment/issues/2104) Frisian (fy) language file with unit test
|
||||||
|
* [2097](https://github.com/moment/moment/issues/2097) add ar-tn locale
|
||||||
|
|
||||||
|
deprecations:
|
||||||
|
* [2074](https://github.com/moment/moment/issues/2074) Implement `moment.fn.utcOffset`, deprecate `moment.fn.zone`
|
||||||
|
|
||||||
|
features:
|
||||||
|
* [2088](https://github.com/moment/moment/issues/2088) add moment.fn.isBetween
|
||||||
|
* [2054](https://github.com/moment/moment/issues/2054) Call updateOffset when creating moment (needed for default timezone in
|
||||||
|
moment-timezone)
|
||||||
|
* [1893](https://github.com/moment/moment/issues/1893) Add moment.isDate method
|
||||||
|
* [1825](https://github.com/moment/moment/issues/1825) Implement toJSON function on Duration
|
||||||
|
* [1809](https://github.com/moment/moment/issues/1809) Allowing moment.set() to accept a hash of units
|
||||||
|
* [2128](https://github.com/moment/moment/issues/2128) Add firstDayOfWeek, firstDayOfYear locale getters
|
||||||
|
* [2131](https://github.com/moment/moment/issues/2131) Add quarter diff support
|
||||||
|
|
||||||
|
Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7)
|
||||||
|
|
||||||
|
### 2.8.4 [See full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996)
|
||||||
|
|
||||||
|
- Release November 19, 2014
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
* [#2000](https://github.com/moment/moment/issues/2000) Add LTS localised format that includes seconds
|
||||||
|
* [#1960](https://github.com/moment/moment/issues/1960) added formatToken 'x' for unix offset in milliseconds #1938
|
||||||
|
* [#1965](https://github.com/moment/moment/issues/1965) Support 24:00:00.000 to mean next day, at midnight.
|
||||||
|
* [#2002](https://github.com/moment/moment/issues/2002) Accept 'date' key when creating moment with object
|
||||||
|
* [#2009](https://github.com/moment/moment/issues/2009) Use native toISOString when we can
|
||||||
|
|
||||||
|
Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996)
|
||||||
|
|
||||||
|
### 2.8.3
|
||||||
|
|
||||||
|
- Release September 5, 2014
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
|
||||||
|
* [#1801](https://github.com/moment/moment/issues/1801) proper pluralization for Arabic
|
||||||
|
* [#1833](https://github.com/moment/moment/issues/1833) improve spm integration
|
||||||
|
* [#1871](https://github.com/moment/moment/issues/1871) fix zone bug caused by Firefox 24
|
||||||
|
* [#1882](https://github.com/moment/moment/issues/1882) Use hh:mm in Czech
|
||||||
|
* [#1883](https://github.com/moment/moment/issues/1883) Fix 2.8.0 regression in duration as conversions
|
||||||
|
* [#1890](https://github.com/moment/moment/issues/1890) Faster travis builds
|
||||||
|
* [#1892](https://github.com/moment/moment/issues/1892) Faster isBefore/After/Same
|
||||||
|
* [#1848](https://github.com/moment/moment/issues/1848) Fix flaky month diffs
|
||||||
|
* [#1895](https://github.com/moment/moment/issues/1895) Fix 2.8.0 regression in moment.utc with format array
|
||||||
|
* [#1896](https://github.com/moment/moment/issues/1896) Support setting invalid instance locale (noop)
|
||||||
|
* [#1897](https://github.com/moment/moment/issues/1897) Support moment([str]) in addition to moment([int])
|
||||||
|
|
||||||
|
### 2.8.2
|
||||||
|
|
||||||
|
- Release August 22, 2014
|
||||||
|
|
||||||
|
Minor bugfixes:
|
||||||
|
|
||||||
|
* [#1874](https://github.com/moment/moment/issues/1874) use `Object.prototype.hasOwnProperty`
|
||||||
|
instead of `obj.hasOwnProperty` (ie8 bug)
|
||||||
|
* [#1873](https://github.com/moment/moment/issues/1873) add `duration#toString()`
|
||||||
|
* [#1859](https://github.com/moment/moment/issues/1859) better month/weekday names in norwegian
|
||||||
|
* [#1812](https://github.com/moment/moment/issues/1812) meridiem parsing for greek
|
||||||
|
* [#1804](https://github.com/moment/moment/issues/1804) spanish del -> de
|
||||||
|
* [#1800](https://github.com/moment/moment/issues/1800) korean LT improvement
|
||||||
|
|
||||||
|
### 2.8.1
|
||||||
|
|
||||||
|
- Release August 1, 2014
|
||||||
|
|
||||||
|
* bugfix [#1813](https://github.com/moment/moment/issues/1813): fix moment().lang([key]) incompatibility
|
||||||
|
|
||||||
|
### 2.8.0 [See changelog](https://gist.github.com/ichernev/ac3899324a5fa6c8c9b4)
|
||||||
|
|
||||||
|
- Release July 31, 2014
|
||||||
|
|
||||||
|
* incompatible changes
|
||||||
|
* [#1761](https://github.com/moment/moment/issues/1761): moments created without a language are no longer following the global language, in case it changes. Only newly created moments take the global language by default. In case you're affected by this, wait, comment on [#1797](https://github.com/moment/moment/issues/1797) and wait for a proper reimplementation
|
||||||
|
* [#1642](https://github.com/moment/moment/issues/1642): 45 days is no longer "a month" according to humanize, cutoffs for month, and year have changed. Hopefully your code does not depend on a particular answer from humanize (which it shouldn't anyway)
|
||||||
|
* [#1784](https://github.com/moment/moment/issues/1784): if you use the human readable English datetime format in a weird way (like storing them in a database) that would break when the format changes you're at risk.
|
||||||
|
|
||||||
|
* deprecations (old behavior will be dropped in 3.0)
|
||||||
|
* [#1761](https://github.com/moment/moment/issues/1761) `lang` is renamed to `locale`, `langData` -> `localeData`. Also there is now `defineLocale` that should be used when creating new locales
|
||||||
|
* [#1763](https://github.com/moment/moment/issues/1763) `add(unit, value)` and `subtract(unit, value)` are now deprecated. Use `add(value, unit)` and `subtract(value, unit)` instead.
|
||||||
|
* [#1759](https://github.com/moment/moment/issues/1759) rename `duration.toIsoString` to `duration.toISOString`. The js standard library and moment's `toISOString` follow that convention.
|
||||||
|
|
||||||
|
* new locales
|
||||||
|
* [#1789](https://github.com/moment/moment/issues/1789) Tibetan (bo)
|
||||||
|
* [#1786](https://github.com/moment/moment/issues/1786) Africaans (af)
|
||||||
|
* [#1778](https://github.com/moment/moment/issues/1778) Burmese (my)
|
||||||
|
* [#1727](https://github.com/moment/moment/issues/1727) Belarusian (be)
|
||||||
|
|
||||||
|
* bugfixes, locale bugfixes, performance improvements, features
|
||||||
|
|
||||||
|
### 2.7.0 [See changelog](https://gist.github.com/ichernev/b0a3d456d5a84c9901d7)
|
||||||
|
|
||||||
|
- Release June 12, 2014
|
||||||
|
|
||||||
|
* new languages
|
||||||
|
|
||||||
|
* [#1678](https://github.com/moment/moment/issues/1678) Bengali (bn)
|
||||||
|
* [#1628](https://github.com/moment/moment/issues/1628) Azerbaijani (az)
|
||||||
|
* [#1633](https://github.com/moment/moment/issues/1633) Arabic, Saudi Arabia (ar-sa)
|
||||||
|
* [#1648](https://github.com/moment/moment/issues/1648) Austrian German (de-at)
|
||||||
|
|
||||||
|
* features
|
||||||
|
|
||||||
|
* [#1663](https://github.com/moment/moment/issues/1663) configurable relative time thresholds
|
||||||
|
* [#1554](https://github.com/moment/moment/issues/1554) support anchor time in moment.calendar
|
||||||
|
* [#1693](https://github.com/moment/moment/issues/1693) support moment.ISO_8601 as parsing format
|
||||||
|
* [#1637](https://github.com/moment/moment/issues/1637) add moment.min and moment.max and deprecate min/max instance methods
|
||||||
|
* [#1704](https://github.com/moment/moment/issues/1704) support string value in add/subtract
|
||||||
|
* [#1647](https://github.com/moment/moment/issues/1647) add spm support (package manager)
|
||||||
|
|
||||||
|
* bugfixes
|
||||||
|
|
||||||
|
### 2.6.0 [See changelog](https://gist.github.com/ichernev/10544682)
|
||||||
|
|
||||||
|
- Release April 12 , 2014
|
||||||
|
|
||||||
|
* languages
|
||||||
|
* [#1529](https://github.com/moment/moment/issues/1529) Serbian-Cyrillic (sr-cyr)
|
||||||
|
* [#1544](https://github.com/moment/moment/issues/1544), [#1546](https://github.com/moment/moment/issues/1546) Khmer Cambodia (km)
|
||||||
|
|
||||||
|
* features
|
||||||
|
* [#1419](https://github.com/moment/moment/issues/1419), [#1468](https://github.com/moment/moment/issues/1468), [#1467](https://github.com/moment/moment/issues/1467), [#1546](https://github.com/moment/moment/issues/1546) better handling of timezone-d moments around DST
|
||||||
|
* [#1462](https://github.com/moment/moment/issues/1462) add weeksInYear and isoWeeksInYear
|
||||||
|
* [#1475](https://github.com/moment/moment/issues/1475) support ordinal parsing
|
||||||
|
* [#1499](https://github.com/moment/moment/issues/1499) composer support
|
||||||
|
* [#1577](https://github.com/moment/moment/issues/1577), [#1604](https://github.com/moment/moment/issues/1604) put Date parsing in moment.createFromInputFallback so it can be properly deprecated and controlled in the future
|
||||||
|
* [#1545](https://github.com/moment/moment/issues/1545) extract two-digit year parsing in moment.parseTwoDigitYear, so it can be overwritten
|
||||||
|
* [#1590](https://github.com/moment/moment/issues/1590) (see [#1574](https://github.com/moment/moment/issues/1574)) set AMD global before module definition to better support non AMD module dependencies used in AMD environment
|
||||||
|
* [#1589](https://github.com/moment/moment/issues/1589) remove global in Node.JS environment (was not working before, nobody complained, was scheduled for removal anyway)
|
||||||
|
* [#1586](https://github.com/moment/moment/issues/1586) support quarter setting and parsing
|
||||||
|
|
||||||
|
* 18 bugs fixed
|
||||||
|
|
||||||
|
### 2.5.1
|
||||||
|
|
||||||
|
- Release January 22, 2014
|
||||||
|
|
||||||
|
* languages
|
||||||
|
* [#1392](https://github.com/moment/moment/issues/1392) Armenian (hy-am)
|
||||||
|
|
||||||
|
* bugfixes
|
||||||
|
* [#1429](https://github.com/moment/moment/issues/1429) fixes [#1423](https://github.com/moment/moment/issues/1423) weird chrome-32 bug with js object creation
|
||||||
|
* [#1421](https://github.com/moment/moment/issues/1421) remove html entities from Welsh
|
||||||
|
* [#1418](https://github.com/moment/moment/issues/1418) fixes [#1401](https://github.com/moment/moment/issues/1401) improved non-padded tokens in strict matching
|
||||||
|
* [#1417](https://github.com/moment/moment/issues/1417) fixes [#1404](https://github.com/moment/moment/issues/1404) handle buggy moment object created by property cloning
|
||||||
|
* [#1398](https://github.com/moment/moment/issues/1398) fixes [#1397](https://github.com/moment/moment/issues/1397) fix Arabic-like week number parsing
|
||||||
|
* [#1396](https://github.com/moment/moment/issues/1396) add leftZeroFill(4) to GGGG and gggg formats
|
||||||
|
* [#1373](https://github.com/moment/moment/issues/1373) use lowercase for months and days in Catalan
|
||||||
|
|
||||||
|
* testing
|
||||||
|
* [#1374](https://github.com/moment/moment/issues/1374) run tests on multiple browser/os combos via SauceLabs and Travis
|
||||||
|
|
||||||
|
### 2.5.0 [See changelog](https://gist.github.com/ichernev/8104451)
|
||||||
|
|
||||||
|
- Release Dec 24, 2013
|
||||||
|
|
||||||
|
* New languages
|
||||||
|
* Luxemburish (lb) [1247](https://github.com/moment/moment/issues/1247)
|
||||||
|
* Serbian (rs) [1319](https://github.com/moment/moment/issues/1319)
|
||||||
|
* Tamil (ta) [1324](https://github.com/moment/moment/issues/1324)
|
||||||
|
* Macedonian (mk) [1337](https://github.com/moment/moment/issues/1337)
|
||||||
|
|
||||||
|
* Features
|
||||||
|
* [1311](https://github.com/moment/moment/issues/1311) Add quarter getter and format token `Q`
|
||||||
|
* [1303](https://github.com/moment/moment/issues/1303) strict parsing now respects number of digits per token (fix [1196](https://github.com/moment/moment/issues/1196))
|
||||||
|
* 0d30bb7 add jspm support
|
||||||
|
* [1347](https://github.com/moment/moment/issues/1347) improve zone parsing
|
||||||
|
* [1362](https://github.com/moment/moment/issues/1362) support merideam parsing in Korean
|
||||||
|
|
||||||
|
* 22 bugfixes
|
||||||
|
|
||||||
|
### 2.4.0
|
||||||
|
|
||||||
|
- Release Oct 27, 2013
|
||||||
|
|
||||||
|
* **Deprecate** globally exported moment, will be removed in next major
|
||||||
|
* New languages
|
||||||
|
* Farose (fo) [#1206](https://github.com/moment/moment/issues/1206)
|
||||||
|
* Tagalog/Filipino (tl-ph) [#1197](https://github.com/moment/moment/issues/1197)
|
||||||
|
* Welsh (cy) [#1215](https://github.com/moment/moment/issues/1215)
|
||||||
|
* Bugfixes
|
||||||
|
* properly handle Z at the end of iso RegExp [#1187](https://github.com/moment/moment/issues/1187)
|
||||||
|
* chinese meridian time improvements [#1076](https://github.com/moment/moment/issues/1076)
|
||||||
|
* fix language tests [#1177](https://github.com/moment/moment/issues/1177)
|
||||||
|
* remove some failing tests (that should have never existed :))
|
||||||
|
[#1185](https://github.com/moment/moment/issues/1185)
|
||||||
|
[#1183](https://github.com/moment/moment/issues/1183)
|
||||||
|
* handle russian noun cases in weird cases [#1195](https://github.com/moment/moment/issues/1195)
|
||||||
|
|
||||||
|
### 2.3.1
|
||||||
|
|
||||||
|
- Release Oct 9, 2013
|
||||||
|
|
||||||
|
Removed a trailing comma [1169] and fixed a bug with `months`, `weekdays` getters [#1171](https://github.com/moment/moment/issues/1171).
|
||||||
|
|
||||||
|
### 2.3.0 [See changelog](https://gist.github.com/ichernev/6864354)
|
||||||
|
|
||||||
|
- Release Oct 7, 2013
|
||||||
|
|
||||||
|
Changed isValid, added strict parsing.
|
||||||
|
Week tokens parsing.
|
||||||
|
|
||||||
|
### 2.2.1
|
||||||
|
|
||||||
|
- Release Sep 12, 2013
|
||||||
|
|
||||||
|
Fixed bug in string prototype test.
|
||||||
|
Updated authors and contributors.
|
||||||
|
|
||||||
|
### 2.2.0 [See changelog](https://gist.github.com/ichernev/00f837a9baf46a3565e4)
|
||||||
|
|
||||||
|
- Release Sep 11, 2013
|
||||||
|
|
||||||
|
Added bower support.
|
||||||
|
|
||||||
|
Language files now use UMD.
|
||||||
|
|
||||||
|
Creating moment defaults to current date/month/year.
|
||||||
|
|
||||||
|
Added a bundle of moment and all language files.
|
||||||
|
|
||||||
|
### 2.1.0 [See changelog](https://gist.github.com/timrwood/b8c2d90d528eddb53ab5)
|
||||||
|
|
||||||
|
- Release Jul 8, 2013
|
||||||
|
|
||||||
|
Added better week support.
|
||||||
|
|
||||||
|
Added ability to set offset with `moment#zone`.
|
||||||
|
|
||||||
|
Added ability to set month or weekday from a string.
|
||||||
|
|
||||||
|
Added `moment#min` and `moment#max`
|
||||||
|
|
||||||
|
### 2.0.0 [See changelog](https://gist.github.com/timrwood/e72f2eef320ed9e37c51)
|
||||||
|
|
||||||
|
- Release Feb 9, 2013
|
||||||
|
|
||||||
|
Added short form localized tokens.
|
||||||
|
|
||||||
|
Added ability to define language a string should be parsed in.
|
||||||
|
|
||||||
|
Added support for reversed add/subtract arguments.
|
||||||
|
|
||||||
|
Added support for `endOf('week')` and `startOf('week')`.
|
||||||
|
|
||||||
|
Fixed the logic for `moment#diff(Moment, 'months')` and `moment#diff(Moment, 'years')`
|
||||||
|
|
||||||
|
`moment#diff` now floors instead of rounds.
|
||||||
|
|
||||||
|
Normalized `moment#toString`.
|
||||||
|
|
||||||
|
Added `isSame`, `isAfter`, and `isBefore` methods.
|
||||||
|
|
||||||
|
Added better week support.
|
||||||
|
|
||||||
|
Added `moment#toJSON`
|
||||||
|
|
||||||
|
Bugfix: Fixed parsing of first century dates
|
||||||
|
|
||||||
|
Bugfix: Parsing 10Sep2001 should work as expected
|
||||||
|
|
||||||
|
Bugfix: Fixed weirdness with `moment.utc()` parsing.
|
||||||
|
|
||||||
|
Changed language ordinal method to return the number + ordinal instead of just the ordinal.
|
||||||
|
|
||||||
|
Changed two digit year parsing cutoff to match strptime.
|
||||||
|
|
||||||
|
Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
|
||||||
|
|
||||||
|
Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
|
||||||
|
|
||||||
|
Removed the lang data objects from the top level namespace.
|
||||||
|
|
||||||
|
Duplicate `Date` passed to `moment()` instead of referencing it.
|
||||||
|
|
||||||
|
### 1.7.2 [See discussion](https://github.com/timrwood/moment/issues/456)
|
||||||
|
|
||||||
|
- Release Oct 2, 2012
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
|
||||||
|
### 1.7.1 [See discussion](https://github.com/timrwood/moment/issues/384)
|
||||||
|
|
||||||
|
- Release Oct 1, 2012
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
|
||||||
|
### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288)
|
||||||
|
|
||||||
|
- Release Jul 26, 2012
|
||||||
|
|
||||||
|
Added `moment.fn.endOf()` and `moment.fn.startOf()`.
|
||||||
|
|
||||||
|
Added validation via `moment.fn.isValid()`.
|
||||||
|
|
||||||
|
Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions
|
||||||
|
|
||||||
|
Add support for month/weekday callbacks in `moment.fn.format()`
|
||||||
|
|
||||||
|
Added instance specific languages.
|
||||||
|
|
||||||
|
Added two letter weekday abbreviations with the formatting token `dd`.
|
||||||
|
|
||||||
|
Various language updates.
|
||||||
|
|
||||||
|
Various bugfixes.
|
||||||
|
|
||||||
|
### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268)
|
||||||
|
|
||||||
|
- Release Apr 26, 2012
|
||||||
|
|
||||||
|
Added Durations.
|
||||||
|
|
||||||
|
Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).
|
||||||
|
|
||||||
|
Added support for millisecond parsing and formatting tokens (S SS SSS)
|
||||||
|
|
||||||
|
Added a getter for `moment.lang()`
|
||||||
|
|
||||||
|
Various bugfixes.
|
||||||
|
|
||||||
|
There are a few things deprecated in the 1.6.0 release.
|
||||||
|
|
||||||
|
1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background.
|
||||||
|
|
||||||
|
2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances.
|
||||||
|
|
||||||
|
3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222).
|
||||||
|
|
||||||
|
### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed)
|
||||||
|
|
||||||
|
- Release Mar 20, 2012
|
||||||
|
|
||||||
|
Added UTC mode.
|
||||||
|
|
||||||
|
Added automatic ISO8601 parsing.
|
||||||
|
|
||||||
|
Various bugfixes.
|
||||||
|
|
||||||
|
### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed)
|
||||||
|
|
||||||
|
- Release Feb 4, 2012
|
||||||
|
|
||||||
|
Added `moment.fn.toDate` as a replacement for `moment.fn.native`.
|
||||||
|
|
||||||
|
Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day.
|
||||||
|
|
||||||
|
Various bugfixes.
|
||||||
|
|
||||||
|
### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed)
|
||||||
|
|
||||||
|
- Release Jan 5, 2012
|
||||||
|
|
||||||
|
Added support for parsing month names in the current language.
|
||||||
|
|
||||||
|
Added escape blocks for parsing tokens.
|
||||||
|
|
||||||
|
Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'.
|
||||||
|
|
||||||
|
Added `moment.fn.day` as a setter.
|
||||||
|
|
||||||
|
Various bugfixes
|
||||||
|
|
||||||
|
### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed)
|
||||||
|
|
||||||
|
- Release Dec 7, 2011
|
||||||
|
|
||||||
|
Added timezones to parser and formatter.
|
||||||
|
|
||||||
|
Added `moment.fn.isDST`.
|
||||||
|
|
||||||
|
Added `moment.fn.zone` to get the timezone offset in minutes.
|
||||||
|
|
||||||
|
### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed)
|
||||||
|
|
||||||
|
- Release Nov 18, 2011
|
||||||
|
|
||||||
|
Various bugfixes
|
||||||
|
|
||||||
|
### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed)
|
||||||
|
|
||||||
|
- Release Nov 12, 2011
|
||||||
|
|
||||||
|
Added time specific diffs (months, days, hours, etc)
|
||||||
|
|
||||||
|
### 1.1.0
|
||||||
|
|
||||||
|
- Release Oct 28, 2011
|
||||||
|
|
||||||
|
Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29)
|
||||||
|
|
||||||
|
Fixed [issue 31](https://github.com/timrwood/moment/pull/31).
|
||||||
|
|
||||||
|
### 1.0.1
|
||||||
|
|
||||||
|
- Release Oct 18, 2011
|
||||||
|
|
||||||
|
Added `moment.version` to get the current version.
|
||||||
|
|
||||||
|
Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25)
|
||||||
|
|
||||||
|
### 1.0.0
|
||||||
|
|
||||||
|
- Release
|
||||||
|
|
||||||
|
Added convenience methods for getting and setting date parts.
|
||||||
|
|
||||||
|
Added better support for `moment.add()`.
|
||||||
|
|
||||||
|
Added better lang support in NodeJS.
|
||||||
|
|
||||||
|
Renamed library from underscore.date to Moment.js
|
||||||
|
|
||||||
|
### 0.6.1
|
||||||
|
|
||||||
|
- Release Oct 12, 2011
|
||||||
|
|
||||||
|
Added Portuguese, Italian, and French language support
|
||||||
|
|
||||||
|
### 0.6.0
|
||||||
|
|
||||||
|
- Release Sep 21, 2011
|
||||||
|
|
||||||
|
Added _date.lang() support.
|
||||||
|
Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]);
|
||||||
|
Made parse from string and single format 25% faster.
|
||||||
|
|
||||||
|
### 0.5.2
|
||||||
|
|
||||||
|
- Release Jul 11, 2011
|
||||||
|
|
||||||
|
Bugfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9).
|
||||||
|
|
||||||
|
### 0.5.1
|
||||||
|
|
||||||
|
- Release Jun 17, 2011
|
||||||
|
|
||||||
|
Bugfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5).
|
||||||
|
|
||||||
|
### 0.5.0
|
||||||
|
|
||||||
|
- Release Jun 13, 2011
|
||||||
|
|
||||||
|
Dropped the redundant `_date.date()` in favor of `_date()`.
|
||||||
|
Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters.
|
||||||
|
Removed `_date.isLeapYear(yearNumber)`. Use `_date([yearNumber]).isLeapYear()` instead.
|
||||||
|
Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function.
|
||||||
|
|
||||||
|
### 0.4.1
|
||||||
|
|
||||||
|
- Release May 9, 2011
|
||||||
|
|
||||||
|
Added date input formats for input strings.
|
||||||
|
|
||||||
|
### 0.4.0
|
||||||
|
|
||||||
|
- Release May 9, 2011
|
||||||
|
|
||||||
|
Added underscore.date to npm. Removed dependencies on underscore.
|
||||||
|
|
||||||
|
### 0.3.2
|
||||||
|
|
||||||
|
- Release Apr 9, 2011
|
||||||
|
|
||||||
|
Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes.
|
||||||
|
|
||||||
|
### 0.3.1
|
||||||
|
|
||||||
|
- Release Mar 25, 2011
|
||||||
|
|
||||||
|
Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object.
|
||||||
|
|
||||||
|
### 0.3.0
|
||||||
|
|
||||||
|
- Release Mar 25, 2011
|
||||||
|
|
||||||
|
Switched to the Underscore methodology of not mucking with the native objects' prototypes.
|
||||||
|
Made chaining possible.
|
||||||
|
|
||||||
|
### 0.2.1
|
||||||
|
|
||||||
|
- Release
|
||||||
|
|
||||||
|
Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'.
|
||||||
|
Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`.
|
||||||
|
|
||||||
|
### 0.2.0
|
||||||
|
|
||||||
|
- Release
|
||||||
|
|
||||||
|
Changed function names to be more concise.
|
||||||
|
Changed date format from php date format to custom format.
|
||||||
|
|
||||||
|
### 0.1.0
|
||||||
|
|
||||||
|
- Release
|
||||||
|
|
||||||
|
Initial release
|
||||||
|
|
22
node_modules/moment/LICENSE
generated
vendored
Normal file
22
node_modules/moment/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright (c) JS Foundation 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.
|
55
node_modules/moment/README.md
generated
vendored
Normal file
55
node_modules/moment/README.md
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# [Moment.js](http://momentjs.com/)
|
||||||
|
|
||||||
|
[![NPM version][npm-version-image]][npm-url]
|
||||||
|
[![NPM downloads][npm-downloads-image]][npm-downloads-url]
|
||||||
|
[![MIT License][license-image]][license-url]
|
||||||
|
[![Build Status][travis-image]][travis-url]
|
||||||
|
[![Coverage Status][coveralls-image]][coveralls-url]
|
||||||
|
[![FOSSA Status][fossa-badge-image]][fossa-badge-url]
|
||||||
|
[![SemVer compatibility][semver-image]][semver-url]
|
||||||
|
|
||||||
|
A JavaScript date library for parsing, validating, manipulating, and formatting dates.
|
||||||
|
|
||||||
|
## Project Status
|
||||||
|
|
||||||
|
Moment.js is a legacy project, now in maintenance mode. In most cases, you should choose a different library.
|
||||||
|
|
||||||
|
For more details and recommendations, please see [Project Status](https://momentjs.com/docs/#/-project-status/) in the docs.
|
||||||
|
|
||||||
|
*Thank you.*
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [Documentation](https://momentjs.com/docs/)
|
||||||
|
- [Changelog](CHANGELOG.md)
|
||||||
|
- [Stack Overflow](https://stackoverflow.com/questions/tagged/momentjs)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Moment.js is freely distributable under the terms of the [MIT license][license-url].
|
||||||
|
|
||||||
|
[![FOSSA Status][fossa-large-image]][fossa-large-url]
|
||||||
|
|
||||||
|
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
|
||||||
|
[license-url]: LICENSE
|
||||||
|
|
||||||
|
[npm-url]: https://npmjs.org/package/moment
|
||||||
|
[npm-version-image]: https://img.shields.io/npm/v/moment.svg?style=flat
|
||||||
|
|
||||||
|
[npm-downloads-image]: https://img.shields.io/npm/dm/moment.svg?style=flat
|
||||||
|
[npm-downloads-url]: https://npmcharts.com/compare/moment?minimal=true
|
||||||
|
|
||||||
|
[travis-url]: https://travis-ci.org/moment/moment
|
||||||
|
[travis-image]: https://img.shields.io/travis/moment/moment/develop.svg?style=flat
|
||||||
|
|
||||||
|
[coveralls-image]: https://coveralls.io/repos/moment/moment/badge.svg?branch=develop
|
||||||
|
[coveralls-url]: https://coveralls.io/r/moment/moment?branch=develop
|
||||||
|
|
||||||
|
[fossa-badge-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=shield
|
||||||
|
[fossa-badge-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_shield
|
||||||
|
|
||||||
|
[fossa-large-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=large
|
||||||
|
[fossa-large-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_large
|
||||||
|
|
||||||
|
[semver-image]: https://api.dependabot.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver
|
||||||
|
[semver-url]: https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver
|
71
node_modules/moment/dist/locale/af.js
generated
vendored
Normal file
71
node_modules/moment/dist/locale/af.js
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Afrikaans [af]
|
||||||
|
//! author : Werner Mollentze : https://github.com/wernerm
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('af', {
|
||||||
|
months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
|
||||||
|
weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
|
||||||
|
meridiemParse: /vm|nm/i,
|
||||||
|
isPM: function (input) {
|
||||||
|
return /^nm$/i.test(input);
|
||||||
|
},
|
||||||
|
meridiem: function (hours, minutes, isLower) {
|
||||||
|
if (hours < 12) {
|
||||||
|
return isLower ? 'vm' : 'VM';
|
||||||
|
} else {
|
||||||
|
return isLower ? 'nm' : 'NM';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Vandag om] LT',
|
||||||
|
nextDay: '[Môre om] LT',
|
||||||
|
nextWeek: 'dddd [om] LT',
|
||||||
|
lastDay: '[Gister om] LT',
|
||||||
|
lastWeek: '[Laas] dddd [om] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'oor %s',
|
||||||
|
past: '%s gelede',
|
||||||
|
s: "'n paar sekondes",
|
||||||
|
ss: '%d sekondes',
|
||||||
|
m: "'n minuut",
|
||||||
|
mm: '%d minute',
|
||||||
|
h: "'n uur",
|
||||||
|
hh: '%d ure',
|
||||||
|
d: "'n dag",
|
||||||
|
dd: '%d dae',
|
||||||
|
M: "'n maand",
|
||||||
|
MM: '%d maande',
|
||||||
|
y: "'n jaar",
|
||||||
|
yy: '%d jaar',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
return (
|
||||||
|
number +
|
||||||
|
(number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
|
||||||
|
); // Thanks to Joris Röling : https://github.com/jjupiter
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Maandag is die eerste dag van die week.
|
||||||
|
doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
|
||||||
|
},
|
||||||
|
});
|
156
node_modules/moment/dist/locale/ar-dz.js
generated
vendored
Normal file
156
node_modules/moment/dist/locale/ar-dz.js
generated
vendored
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Algeria) [ar-dz]
|
||||||
|
//! author : Amine Roukh: https://github.com/Amine27
|
||||||
|
//! author : Abdel Said: https://github.com/abdelsaid
|
||||||
|
//! author : Ahmed Elkhatib
|
||||||
|
//! author : forabi https://github.com/forabi
|
||||||
|
//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var pluralForm = function (n) {
|
||||||
|
return n === 0
|
||||||
|
? 0
|
||||||
|
: n === 1
|
||||||
|
? 1
|
||||||
|
: n === 2
|
||||||
|
? 2
|
||||||
|
: n % 100 >= 3 && n % 100 <= 10
|
||||||
|
? 3
|
||||||
|
: n % 100 >= 11
|
||||||
|
? 4
|
||||||
|
: 5;
|
||||||
|
},
|
||||||
|
plurals = {
|
||||||
|
s: [
|
||||||
|
'أقل من ثانية',
|
||||||
|
'ثانية واحدة',
|
||||||
|
['ثانيتان', 'ثانيتين'],
|
||||||
|
'%d ثوان',
|
||||||
|
'%d ثانية',
|
||||||
|
'%d ثانية',
|
||||||
|
],
|
||||||
|
m: [
|
||||||
|
'أقل من دقيقة',
|
||||||
|
'دقيقة واحدة',
|
||||||
|
['دقيقتان', 'دقيقتين'],
|
||||||
|
'%d دقائق',
|
||||||
|
'%d دقيقة',
|
||||||
|
'%d دقيقة',
|
||||||
|
],
|
||||||
|
h: [
|
||||||
|
'أقل من ساعة',
|
||||||
|
'ساعة واحدة',
|
||||||
|
['ساعتان', 'ساعتين'],
|
||||||
|
'%d ساعات',
|
||||||
|
'%d ساعة',
|
||||||
|
'%d ساعة',
|
||||||
|
],
|
||||||
|
d: [
|
||||||
|
'أقل من يوم',
|
||||||
|
'يوم واحد',
|
||||||
|
['يومان', 'يومين'],
|
||||||
|
'%d أيام',
|
||||||
|
'%d يومًا',
|
||||||
|
'%d يوم',
|
||||||
|
],
|
||||||
|
M: [
|
||||||
|
'أقل من شهر',
|
||||||
|
'شهر واحد',
|
||||||
|
['شهران', 'شهرين'],
|
||||||
|
'%d أشهر',
|
||||||
|
'%d شهرا',
|
||||||
|
'%d شهر',
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
'أقل من عام',
|
||||||
|
'عام واحد',
|
||||||
|
['عامان', 'عامين'],
|
||||||
|
'%d أعوام',
|
||||||
|
'%d عامًا',
|
||||||
|
'%d عام',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pluralize = function (u) {
|
||||||
|
return function (number, withoutSuffix, string, isFuture) {
|
||||||
|
var f = pluralForm(number),
|
||||||
|
str = plurals[u][pluralForm(number)];
|
||||||
|
if (f === 2) {
|
||||||
|
str = str[withoutSuffix ? 0 : 1];
|
||||||
|
}
|
||||||
|
return str.replace(/%d/i, number);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
months = [
|
||||||
|
'جانفي',
|
||||||
|
'فيفري',
|
||||||
|
'مارس',
|
||||||
|
'أفريل',
|
||||||
|
'ماي',
|
||||||
|
'جوان',
|
||||||
|
'جويلية',
|
||||||
|
'أوت',
|
||||||
|
'سبتمبر',
|
||||||
|
'أكتوبر',
|
||||||
|
'نوفمبر',
|
||||||
|
'ديسمبر',
|
||||||
|
];
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-dz', {
|
||||||
|
months: months,
|
||||||
|
monthsShort: months,
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'D/\u200FM/\u200FYYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
meridiemParse: /ص|م/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return 'م' === input;
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 12) {
|
||||||
|
return 'ص';
|
||||||
|
} else {
|
||||||
|
return 'م';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم عند الساعة] LT',
|
||||||
|
nextDay: '[غدًا عند الساعة] LT',
|
||||||
|
nextWeek: 'dddd [عند الساعة] LT',
|
||||||
|
lastDay: '[أمس عند الساعة] LT',
|
||||||
|
lastWeek: 'dddd [عند الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'بعد %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: pluralize('s'),
|
||||||
|
ss: pluralize('s'),
|
||||||
|
m: pluralize('m'),
|
||||||
|
mm: pluralize('m'),
|
||||||
|
h: pluralize('h'),
|
||||||
|
hh: pluralize('h'),
|
||||||
|
d: pluralize('d'),
|
||||||
|
dd: pluralize('d'),
|
||||||
|
M: pluralize('M'),
|
||||||
|
MM: pluralize('M'),
|
||||||
|
y: pluralize('y'),
|
||||||
|
yy: pluralize('y'),
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string.replace(/,/g, '،');
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
55
node_modules/moment/dist/locale/ar-kw.js
generated
vendored
Normal file
55
node_modules/moment/dist/locale/ar-kw.js
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Kuwait) [ar-kw]
|
||||||
|
//! author : Nusret Parlak: https://github.com/nusretparlak
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-kw', {
|
||||||
|
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم على الساعة] LT',
|
||||||
|
nextDay: '[غدا على الساعة] LT',
|
||||||
|
nextWeek: 'dddd [على الساعة] LT',
|
||||||
|
lastDay: '[أمس على الساعة] LT',
|
||||||
|
lastWeek: 'dddd [على الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'في %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: 'ثوان',
|
||||||
|
ss: '%d ثانية',
|
||||||
|
m: 'دقيقة',
|
||||||
|
mm: '%d دقائق',
|
||||||
|
h: 'ساعة',
|
||||||
|
hh: '%d ساعات',
|
||||||
|
d: 'يوم',
|
||||||
|
dd: '%d أيام',
|
||||||
|
M: 'شهر',
|
||||||
|
MM: '%d أشهر',
|
||||||
|
y: 'سنة',
|
||||||
|
yy: '%d سنوات',
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 12, // The week that contains Jan 12th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
171
node_modules/moment/dist/locale/ar-ly.js
generated
vendored
Normal file
171
node_modules/moment/dist/locale/ar-ly.js
generated
vendored
Normal file
|
@ -0,0 +1,171 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Libya) [ar-ly]
|
||||||
|
//! author : Ali Hmer: https://github.com/kikoanis
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '1',
|
||||||
|
2: '2',
|
||||||
|
3: '3',
|
||||||
|
4: '4',
|
||||||
|
5: '5',
|
||||||
|
6: '6',
|
||||||
|
7: '7',
|
||||||
|
8: '8',
|
||||||
|
9: '9',
|
||||||
|
0: '0',
|
||||||
|
},
|
||||||
|
pluralForm = function (n) {
|
||||||
|
return n === 0
|
||||||
|
? 0
|
||||||
|
: n === 1
|
||||||
|
? 1
|
||||||
|
: n === 2
|
||||||
|
? 2
|
||||||
|
: n % 100 >= 3 && n % 100 <= 10
|
||||||
|
? 3
|
||||||
|
: n % 100 >= 11
|
||||||
|
? 4
|
||||||
|
: 5;
|
||||||
|
},
|
||||||
|
plurals = {
|
||||||
|
s: [
|
||||||
|
'أقل من ثانية',
|
||||||
|
'ثانية واحدة',
|
||||||
|
['ثانيتان', 'ثانيتين'],
|
||||||
|
'%d ثوان',
|
||||||
|
'%d ثانية',
|
||||||
|
'%d ثانية',
|
||||||
|
],
|
||||||
|
m: [
|
||||||
|
'أقل من دقيقة',
|
||||||
|
'دقيقة واحدة',
|
||||||
|
['دقيقتان', 'دقيقتين'],
|
||||||
|
'%d دقائق',
|
||||||
|
'%d دقيقة',
|
||||||
|
'%d دقيقة',
|
||||||
|
],
|
||||||
|
h: [
|
||||||
|
'أقل من ساعة',
|
||||||
|
'ساعة واحدة',
|
||||||
|
['ساعتان', 'ساعتين'],
|
||||||
|
'%d ساعات',
|
||||||
|
'%d ساعة',
|
||||||
|
'%d ساعة',
|
||||||
|
],
|
||||||
|
d: [
|
||||||
|
'أقل من يوم',
|
||||||
|
'يوم واحد',
|
||||||
|
['يومان', 'يومين'],
|
||||||
|
'%d أيام',
|
||||||
|
'%d يومًا',
|
||||||
|
'%d يوم',
|
||||||
|
],
|
||||||
|
M: [
|
||||||
|
'أقل من شهر',
|
||||||
|
'شهر واحد',
|
||||||
|
['شهران', 'شهرين'],
|
||||||
|
'%d أشهر',
|
||||||
|
'%d شهرا',
|
||||||
|
'%d شهر',
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
'أقل من عام',
|
||||||
|
'عام واحد',
|
||||||
|
['عامان', 'عامين'],
|
||||||
|
'%d أعوام',
|
||||||
|
'%d عامًا',
|
||||||
|
'%d عام',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pluralize = function (u) {
|
||||||
|
return function (number, withoutSuffix, string, isFuture) {
|
||||||
|
var f = pluralForm(number),
|
||||||
|
str = plurals[u][pluralForm(number)];
|
||||||
|
if (f === 2) {
|
||||||
|
str = str[withoutSuffix ? 0 : 1];
|
||||||
|
}
|
||||||
|
return str.replace(/%d/i, number);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
months = [
|
||||||
|
'يناير',
|
||||||
|
'فبراير',
|
||||||
|
'مارس',
|
||||||
|
'أبريل',
|
||||||
|
'مايو',
|
||||||
|
'يونيو',
|
||||||
|
'يوليو',
|
||||||
|
'أغسطس',
|
||||||
|
'سبتمبر',
|
||||||
|
'أكتوبر',
|
||||||
|
'نوفمبر',
|
||||||
|
'ديسمبر',
|
||||||
|
];
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-ly', {
|
||||||
|
months: months,
|
||||||
|
monthsShort: months,
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'D/\u200FM/\u200FYYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
meridiemParse: /ص|م/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return 'م' === input;
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 12) {
|
||||||
|
return 'ص';
|
||||||
|
} else {
|
||||||
|
return 'م';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم عند الساعة] LT',
|
||||||
|
nextDay: '[غدًا عند الساعة] LT',
|
||||||
|
nextWeek: 'dddd [عند الساعة] LT',
|
||||||
|
lastDay: '[أمس عند الساعة] LT',
|
||||||
|
lastWeek: 'dddd [عند الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'بعد %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: pluralize('s'),
|
||||||
|
ss: pluralize('s'),
|
||||||
|
m: pluralize('m'),
|
||||||
|
mm: pluralize('m'),
|
||||||
|
h: pluralize('h'),
|
||||||
|
hh: pluralize('h'),
|
||||||
|
d: pluralize('d'),
|
||||||
|
dd: pluralize('d'),
|
||||||
|
M: pluralize('M'),
|
||||||
|
MM: pluralize('M'),
|
||||||
|
y: pluralize('y'),
|
||||||
|
yy: pluralize('y'),
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string.replace(/،/g, ',');
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
})
|
||||||
|
.replace(/,/g, '،');
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 6, // Saturday is the first day of the week.
|
||||||
|
doy: 12, // The week that contains Jan 12th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
56
node_modules/moment/dist/locale/ar-ma.js
generated
vendored
Normal file
56
node_modules/moment/dist/locale/ar-ma.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Morocco) [ar-ma]
|
||||||
|
//! author : ElFadili Yassine : https://github.com/ElFadiliY
|
||||||
|
//! author : Abdel Said : https://github.com/abdelsaid
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-ma', {
|
||||||
|
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم على الساعة] LT',
|
||||||
|
nextDay: '[غدا على الساعة] LT',
|
||||||
|
nextWeek: 'dddd [على الساعة] LT',
|
||||||
|
lastDay: '[أمس على الساعة] LT',
|
||||||
|
lastWeek: 'dddd [على الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'في %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: 'ثوان',
|
||||||
|
ss: '%d ثانية',
|
||||||
|
m: 'دقيقة',
|
||||||
|
mm: '%d دقائق',
|
||||||
|
h: 'ساعة',
|
||||||
|
hh: '%d ساعات',
|
||||||
|
d: 'يوم',
|
||||||
|
dd: '%d أيام',
|
||||||
|
M: 'شهر',
|
||||||
|
MM: '%d أشهر',
|
||||||
|
y: 'سنة',
|
||||||
|
yy: '%d سنوات',
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
112
node_modules/moment/dist/locale/ar-ps.js
generated
vendored
Normal file
112
node_modules/moment/dist/locale/ar-ps.js
generated
vendored
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Palestine) [ar-ps]
|
||||||
|
//! author : Majd Al-Shihabi : https://github.com/majdal
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '١',
|
||||||
|
2: '٢',
|
||||||
|
3: '٣',
|
||||||
|
4: '٤',
|
||||||
|
5: '٥',
|
||||||
|
6: '٦',
|
||||||
|
7: '٧',
|
||||||
|
8: '٨',
|
||||||
|
9: '٩',
|
||||||
|
0: '٠',
|
||||||
|
},
|
||||||
|
numberMap = {
|
||||||
|
'١': '1',
|
||||||
|
'٢': '2',
|
||||||
|
'٣': '3',
|
||||||
|
'٤': '4',
|
||||||
|
'٥': '5',
|
||||||
|
'٦': '6',
|
||||||
|
'٧': '7',
|
||||||
|
'٨': '8',
|
||||||
|
'٩': '9',
|
||||||
|
'٠': '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-ps', {
|
||||||
|
months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
meridiemParse: /ص|م/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return 'م' === input;
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 12) {
|
||||||
|
return 'ص';
|
||||||
|
} else {
|
||||||
|
return 'م';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم على الساعة] LT',
|
||||||
|
nextDay: '[غدا على الساعة] LT',
|
||||||
|
nextWeek: 'dddd [على الساعة] LT',
|
||||||
|
lastDay: '[أمس على الساعة] LT',
|
||||||
|
lastWeek: 'dddd [على الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'في %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: 'ثوان',
|
||||||
|
ss: '%d ثانية',
|
||||||
|
m: 'دقيقة',
|
||||||
|
mm: '%d دقائق',
|
||||||
|
h: 'ساعة',
|
||||||
|
hh: '%d ساعات',
|
||||||
|
d: 'يوم',
|
||||||
|
dd: '%d أيام',
|
||||||
|
M: 'شهر',
|
||||||
|
MM: '%d أشهر',
|
||||||
|
y: 'سنة',
|
||||||
|
yy: '%d سنوات',
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
})
|
||||||
|
.split('') // reversed since negative lookbehind not supported everywhere
|
||||||
|
.reverse()
|
||||||
|
.join('')
|
||||||
|
.replace(/[١٢](?![\u062a\u0643])/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
})
|
||||||
|
.split('')
|
||||||
|
.reverse()
|
||||||
|
.join('')
|
||||||
|
.replace(/،/g, ',');
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
})
|
||||||
|
.replace(/,/g, '،');
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
105
node_modules/moment/dist/locale/ar-sa.js
generated
vendored
Normal file
105
node_modules/moment/dist/locale/ar-sa.js
generated
vendored
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Saudi Arabia) [ar-sa]
|
||||||
|
//! author : Suhail Alkowaileet : https://github.com/xsoh
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '١',
|
||||||
|
2: '٢',
|
||||||
|
3: '٣',
|
||||||
|
4: '٤',
|
||||||
|
5: '٥',
|
||||||
|
6: '٦',
|
||||||
|
7: '٧',
|
||||||
|
8: '٨',
|
||||||
|
9: '٩',
|
||||||
|
0: '٠',
|
||||||
|
},
|
||||||
|
numberMap = {
|
||||||
|
'١': '1',
|
||||||
|
'٢': '2',
|
||||||
|
'٣': '3',
|
||||||
|
'٤': '4',
|
||||||
|
'٥': '5',
|
||||||
|
'٦': '6',
|
||||||
|
'٧': '7',
|
||||||
|
'٨': '8',
|
||||||
|
'٩': '9',
|
||||||
|
'٠': '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-sa', {
|
||||||
|
months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
meridiemParse: /ص|م/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return 'م' === input;
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 12) {
|
||||||
|
return 'ص';
|
||||||
|
} else {
|
||||||
|
return 'م';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم على الساعة] LT',
|
||||||
|
nextDay: '[غدا على الساعة] LT',
|
||||||
|
nextWeek: 'dddd [على الساعة] LT',
|
||||||
|
lastDay: '[أمس على الساعة] LT',
|
||||||
|
lastWeek: 'dddd [على الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'في %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: 'ثوان',
|
||||||
|
ss: '%d ثانية',
|
||||||
|
m: 'دقيقة',
|
||||||
|
mm: '%d دقائق',
|
||||||
|
h: 'ساعة',
|
||||||
|
hh: '%d ساعات',
|
||||||
|
d: 'يوم',
|
||||||
|
dd: '%d أيام',
|
||||||
|
M: 'شهر',
|
||||||
|
MM: '%d أشهر',
|
||||||
|
y: 'سنة',
|
||||||
|
yy: '%d سنوات',
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
})
|
||||||
|
.replace(/،/g, ',');
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
})
|
||||||
|
.replace(/,/g, '،');
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
55
node_modules/moment/dist/locale/ar-tn.js
generated
vendored
Normal file
55
node_modules/moment/dist/locale/ar-tn.js
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic (Tunisia) [ar-tn]
|
||||||
|
//! author : Nader Toukabri : https://github.com/naderio
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar-tn', {
|
||||||
|
months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم على الساعة] LT',
|
||||||
|
nextDay: '[غدا على الساعة] LT',
|
||||||
|
nextWeek: 'dddd [على الساعة] LT',
|
||||||
|
lastDay: '[أمس على الساعة] LT',
|
||||||
|
lastWeek: 'dddd [على الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'في %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: 'ثوان',
|
||||||
|
ss: '%d ثانية',
|
||||||
|
m: 'دقيقة',
|
||||||
|
mm: '%d دقائق',
|
||||||
|
h: 'ساعة',
|
||||||
|
hh: '%d ساعات',
|
||||||
|
d: 'يوم',
|
||||||
|
dd: '%d أيام',
|
||||||
|
M: 'شهر',
|
||||||
|
MM: '%d أشهر',
|
||||||
|
y: 'سنة',
|
||||||
|
yy: '%d سنوات',
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
189
node_modules/moment/dist/locale/ar.js
generated
vendored
Normal file
189
node_modules/moment/dist/locale/ar.js
generated
vendored
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Arabic [ar]
|
||||||
|
//! author : Abdel Said: https://github.com/abdelsaid
|
||||||
|
//! author : Ahmed Elkhatib
|
||||||
|
//! author : forabi https://github.com/forabi
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '١',
|
||||||
|
2: '٢',
|
||||||
|
3: '٣',
|
||||||
|
4: '٤',
|
||||||
|
5: '٥',
|
||||||
|
6: '٦',
|
||||||
|
7: '٧',
|
||||||
|
8: '٨',
|
||||||
|
9: '٩',
|
||||||
|
0: '٠',
|
||||||
|
},
|
||||||
|
numberMap = {
|
||||||
|
'١': '1',
|
||||||
|
'٢': '2',
|
||||||
|
'٣': '3',
|
||||||
|
'٤': '4',
|
||||||
|
'٥': '5',
|
||||||
|
'٦': '6',
|
||||||
|
'٧': '7',
|
||||||
|
'٨': '8',
|
||||||
|
'٩': '9',
|
||||||
|
'٠': '0',
|
||||||
|
},
|
||||||
|
pluralForm = function (n) {
|
||||||
|
return n === 0
|
||||||
|
? 0
|
||||||
|
: n === 1
|
||||||
|
? 1
|
||||||
|
: n === 2
|
||||||
|
? 2
|
||||||
|
: n % 100 >= 3 && n % 100 <= 10
|
||||||
|
? 3
|
||||||
|
: n % 100 >= 11
|
||||||
|
? 4
|
||||||
|
: 5;
|
||||||
|
},
|
||||||
|
plurals = {
|
||||||
|
s: [
|
||||||
|
'أقل من ثانية',
|
||||||
|
'ثانية واحدة',
|
||||||
|
['ثانيتان', 'ثانيتين'],
|
||||||
|
'%d ثوان',
|
||||||
|
'%d ثانية',
|
||||||
|
'%d ثانية',
|
||||||
|
],
|
||||||
|
m: [
|
||||||
|
'أقل من دقيقة',
|
||||||
|
'دقيقة واحدة',
|
||||||
|
['دقيقتان', 'دقيقتين'],
|
||||||
|
'%d دقائق',
|
||||||
|
'%d دقيقة',
|
||||||
|
'%d دقيقة',
|
||||||
|
],
|
||||||
|
h: [
|
||||||
|
'أقل من ساعة',
|
||||||
|
'ساعة واحدة',
|
||||||
|
['ساعتان', 'ساعتين'],
|
||||||
|
'%d ساعات',
|
||||||
|
'%d ساعة',
|
||||||
|
'%d ساعة',
|
||||||
|
],
|
||||||
|
d: [
|
||||||
|
'أقل من يوم',
|
||||||
|
'يوم واحد',
|
||||||
|
['يومان', 'يومين'],
|
||||||
|
'%d أيام',
|
||||||
|
'%d يومًا',
|
||||||
|
'%d يوم',
|
||||||
|
],
|
||||||
|
M: [
|
||||||
|
'أقل من شهر',
|
||||||
|
'شهر واحد',
|
||||||
|
['شهران', 'شهرين'],
|
||||||
|
'%d أشهر',
|
||||||
|
'%d شهرا',
|
||||||
|
'%d شهر',
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
'أقل من عام',
|
||||||
|
'عام واحد',
|
||||||
|
['عامان', 'عامين'],
|
||||||
|
'%d أعوام',
|
||||||
|
'%d عامًا',
|
||||||
|
'%d عام',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
pluralize = function (u) {
|
||||||
|
return function (number, withoutSuffix, string, isFuture) {
|
||||||
|
var f = pluralForm(number),
|
||||||
|
str = plurals[u][pluralForm(number)];
|
||||||
|
if (f === 2) {
|
||||||
|
str = str[withoutSuffix ? 0 : 1];
|
||||||
|
}
|
||||||
|
return str.replace(/%d/i, number);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
months = [
|
||||||
|
'يناير',
|
||||||
|
'فبراير',
|
||||||
|
'مارس',
|
||||||
|
'أبريل',
|
||||||
|
'مايو',
|
||||||
|
'يونيو',
|
||||||
|
'يوليو',
|
||||||
|
'أغسطس',
|
||||||
|
'سبتمبر',
|
||||||
|
'أكتوبر',
|
||||||
|
'نوفمبر',
|
||||||
|
'ديسمبر',
|
||||||
|
];
|
||||||
|
|
||||||
|
export default moment.defineLocale('ar', {
|
||||||
|
months: months,
|
||||||
|
monthsShort: months,
|
||||||
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||||||
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||||||
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'D/\u200FM/\u200FYYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
meridiemParse: /ص|م/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return 'م' === input;
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 12) {
|
||||||
|
return 'ص';
|
||||||
|
} else {
|
||||||
|
return 'م';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[اليوم عند الساعة] LT',
|
||||||
|
nextDay: '[غدًا عند الساعة] LT',
|
||||||
|
nextWeek: 'dddd [عند الساعة] LT',
|
||||||
|
lastDay: '[أمس عند الساعة] LT',
|
||||||
|
lastWeek: 'dddd [عند الساعة] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'بعد %s',
|
||||||
|
past: 'منذ %s',
|
||||||
|
s: pluralize('s'),
|
||||||
|
ss: pluralize('s'),
|
||||||
|
m: pluralize('m'),
|
||||||
|
mm: pluralize('m'),
|
||||||
|
h: pluralize('h'),
|
||||||
|
hh: pluralize('h'),
|
||||||
|
d: pluralize('d'),
|
||||||
|
dd: pluralize('d'),
|
||||||
|
M: pluralize('M'),
|
||||||
|
MM: pluralize('M'),
|
||||||
|
y: pluralize('y'),
|
||||||
|
yy: pluralize('y'),
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
})
|
||||||
|
.replace(/،/g, ',');
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string
|
||||||
|
.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
})
|
||||||
|
.replace(/,/g, '،');
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 6, // Saturday is the first day of the week.
|
||||||
|
doy: 12, // The week that contains Jan 12th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
102
node_modules/moment/dist/locale/az.js
generated
vendored
Normal file
102
node_modules/moment/dist/locale/az.js
generated
vendored
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Azerbaijani [az]
|
||||||
|
//! author : topchiyev : https://github.com/topchiyev
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var suffixes = {
|
||||||
|
1: '-inci',
|
||||||
|
5: '-inci',
|
||||||
|
8: '-inci',
|
||||||
|
70: '-inci',
|
||||||
|
80: '-inci',
|
||||||
|
2: '-nci',
|
||||||
|
7: '-nci',
|
||||||
|
20: '-nci',
|
||||||
|
50: '-nci',
|
||||||
|
3: '-üncü',
|
||||||
|
4: '-üncü',
|
||||||
|
100: '-üncü',
|
||||||
|
6: '-ncı',
|
||||||
|
9: '-uncu',
|
||||||
|
10: '-uncu',
|
||||||
|
30: '-uncu',
|
||||||
|
60: '-ıncı',
|
||||||
|
90: '-ıncı',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default moment.defineLocale('az', {
|
||||||
|
months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
|
||||||
|
weekdays:
|
||||||
|
'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
|
||||||
|
weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[bugün saat] LT',
|
||||||
|
nextDay: '[sabah saat] LT',
|
||||||
|
nextWeek: '[gələn həftə] dddd [saat] LT',
|
||||||
|
lastDay: '[dünən] LT',
|
||||||
|
lastWeek: '[keçən həftə] dddd [saat] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: '%s sonra',
|
||||||
|
past: '%s əvvəl',
|
||||||
|
s: 'bir neçə saniyə',
|
||||||
|
ss: '%d saniyə',
|
||||||
|
m: 'bir dəqiqə',
|
||||||
|
mm: '%d dəqiqə',
|
||||||
|
h: 'bir saat',
|
||||||
|
hh: '%d saat',
|
||||||
|
d: 'bir gün',
|
||||||
|
dd: '%d gün',
|
||||||
|
M: 'bir ay',
|
||||||
|
MM: '%d ay',
|
||||||
|
y: 'bir il',
|
||||||
|
yy: '%d il',
|
||||||
|
},
|
||||||
|
meridiemParse: /gecə|səhər|gündüz|axşam/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return /^(gündüz|axşam)$/.test(input);
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 4) {
|
||||||
|
return 'gecə';
|
||||||
|
} else if (hour < 12) {
|
||||||
|
return 'səhər';
|
||||||
|
} else if (hour < 17) {
|
||||||
|
return 'gündüz';
|
||||||
|
} else {
|
||||||
|
return 'axşam';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
if (number === 0) {
|
||||||
|
// special case for zero
|
||||||
|
return number + '-ıncı';
|
||||||
|
}
|
||||||
|
var a = number % 10,
|
||||||
|
b = (number % 100) - a,
|
||||||
|
c = number >= 100 ? 100 : null;
|
||||||
|
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
142
node_modules/moment/dist/locale/be.js
generated
vendored
Normal file
142
node_modules/moment/dist/locale/be.js
generated
vendored
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Belarusian [be]
|
||||||
|
//! author : Dmitry Demidov : https://github.com/demidov91
|
||||||
|
//! author: Praleska: http://praleska.pro/
|
||||||
|
//! Author : Menelion Elensúle : https://github.com/Oire
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function plural(word, num) {
|
||||||
|
var forms = word.split('_');
|
||||||
|
return num % 10 === 1 && num % 100 !== 11
|
||||||
|
? forms[0]
|
||||||
|
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
|
||||||
|
? forms[1]
|
||||||
|
: forms[2];
|
||||||
|
}
|
||||||
|
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
||||||
|
var format = {
|
||||||
|
ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
|
||||||
|
mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
|
||||||
|
hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
|
||||||
|
dd: 'дзень_дні_дзён',
|
||||||
|
MM: 'месяц_месяцы_месяцаў',
|
||||||
|
yy: 'год_гады_гадоў',
|
||||||
|
};
|
||||||
|
if (key === 'm') {
|
||||||
|
return withoutSuffix ? 'хвіліна' : 'хвіліну';
|
||||||
|
} else if (key === 'h') {
|
||||||
|
return withoutSuffix ? 'гадзіна' : 'гадзіну';
|
||||||
|
} else {
|
||||||
|
return number + ' ' + plural(format[key], +number);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('be', {
|
||||||
|
months: {
|
||||||
|
format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
standalone:
|
||||||
|
'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
},
|
||||||
|
monthsShort:
|
||||||
|
'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
|
||||||
|
weekdays: {
|
||||||
|
format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
standalone:
|
||||||
|
'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
|
||||||
|
},
|
||||||
|
weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
|
||||||
|
weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D MMMM YYYY г.',
|
||||||
|
LLL: 'D MMMM YYYY г., HH:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY г., HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Сёння ў] LT',
|
||||||
|
nextDay: '[Заўтра ў] LT',
|
||||||
|
lastDay: '[Учора ў] LT',
|
||||||
|
nextWeek: function () {
|
||||||
|
return '[У] dddd [ў] LT';
|
||||||
|
},
|
||||||
|
lastWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 0:
|
||||||
|
case 3:
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
return '[У мінулую] dddd [ў] LT';
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
return '[У мінулы] dddd [ў] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'праз %s',
|
||||||
|
past: '%s таму',
|
||||||
|
s: 'некалькі секунд',
|
||||||
|
m: relativeTimeWithPlural,
|
||||||
|
mm: relativeTimeWithPlural,
|
||||||
|
h: relativeTimeWithPlural,
|
||||||
|
hh: relativeTimeWithPlural,
|
||||||
|
d: 'дзень',
|
||||||
|
dd: relativeTimeWithPlural,
|
||||||
|
M: 'месяц',
|
||||||
|
MM: relativeTimeWithPlural,
|
||||||
|
y: 'год',
|
||||||
|
yy: relativeTimeWithPlural,
|
||||||
|
},
|
||||||
|
meridiemParse: /ночы|раніцы|дня|вечара/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return /^(дня|вечара)$/.test(input);
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 4) {
|
||||||
|
return 'ночы';
|
||||||
|
} else if (hour < 12) {
|
||||||
|
return 'раніцы';
|
||||||
|
} else if (hour < 17) {
|
||||||
|
return 'дня';
|
||||||
|
} else {
|
||||||
|
return 'вечара';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
|
||||||
|
ordinal: function (number, period) {
|
||||||
|
switch (period) {
|
||||||
|
case 'M':
|
||||||
|
case 'd':
|
||||||
|
case 'DDD':
|
||||||
|
case 'w':
|
||||||
|
case 'W':
|
||||||
|
return (number % 10 === 2 || number % 10 === 3) &&
|
||||||
|
number % 100 !== 12 &&
|
||||||
|
number % 100 !== 13
|
||||||
|
? number + '-і'
|
||||||
|
: number + '-ы';
|
||||||
|
case 'D':
|
||||||
|
return number + '-га';
|
||||||
|
default:
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
87
node_modules/moment/dist/locale/bg.js
generated
vendored
Normal file
87
node_modules/moment/dist/locale/bg.js
generated
vendored
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Bulgarian [bg]
|
||||||
|
//! author : Krasen Borisov : https://github.com/kraz
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('bg', {
|
||||||
|
months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
|
||||||
|
weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
|
||||||
|
weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'H:mm',
|
||||||
|
LTS: 'H:mm:ss',
|
||||||
|
L: 'D.MM.YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY H:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY H:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Днес в] LT',
|
||||||
|
nextDay: '[Утре в] LT',
|
||||||
|
nextWeek: 'dddd [в] LT',
|
||||||
|
lastDay: '[Вчера в] LT',
|
||||||
|
lastWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 0:
|
||||||
|
case 3:
|
||||||
|
case 6:
|
||||||
|
return '[Миналата] dddd [в] LT';
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
return '[Миналия] dddd [в] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'след %s',
|
||||||
|
past: 'преди %s',
|
||||||
|
s: 'няколко секунди',
|
||||||
|
ss: '%d секунди',
|
||||||
|
m: 'минута',
|
||||||
|
mm: '%d минути',
|
||||||
|
h: 'час',
|
||||||
|
hh: '%d часа',
|
||||||
|
d: 'ден',
|
||||||
|
dd: '%d дена',
|
||||||
|
w: 'седмица',
|
||||||
|
ww: '%d седмици',
|
||||||
|
M: 'месец',
|
||||||
|
MM: '%d месеца',
|
||||||
|
y: 'година',
|
||||||
|
yy: '%d години',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var lastDigit = number % 10,
|
||||||
|
last2Digits = number % 100;
|
||||||
|
if (number === 0) {
|
||||||
|
return number + '-ев';
|
||||||
|
} else if (last2Digits === 0) {
|
||||||
|
return number + '-ен';
|
||||||
|
} else if (last2Digits > 10 && last2Digits < 20) {
|
||||||
|
return number + '-ти';
|
||||||
|
} else if (lastDigit === 1) {
|
||||||
|
return number + '-ви';
|
||||||
|
} else if (lastDigit === 2) {
|
||||||
|
return number + '-ри';
|
||||||
|
} else if (lastDigit === 7 || lastDigit === 8) {
|
||||||
|
return number + '-ми';
|
||||||
|
} else {
|
||||||
|
return number + '-ти';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
52
node_modules/moment/dist/locale/bm.js
generated
vendored
Normal file
52
node_modules/moment/dist/locale/bm.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Bambara [bm]
|
||||||
|
//! author : Estelle Comment : https://github.com/estellecomment
|
||||||
|
// Language contact person : Abdoufata Kane : https://github.com/abdoufata
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('bm', {
|
||||||
|
months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
|
||||||
|
weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
|
||||||
|
weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
|
||||||
|
weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'MMMM [tile] D [san] YYYY',
|
||||||
|
LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
|
||||||
|
LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Bi lɛrɛ] LT',
|
||||||
|
nextDay: '[Sini lɛrɛ] LT',
|
||||||
|
nextWeek: 'dddd [don lɛrɛ] LT',
|
||||||
|
lastDay: '[Kunu lɛrɛ] LT',
|
||||||
|
lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: '%s kɔnɔ',
|
||||||
|
past: 'a bɛ %s bɔ',
|
||||||
|
s: 'sanga dama dama',
|
||||||
|
ss: 'sekondi %d',
|
||||||
|
m: 'miniti kelen',
|
||||||
|
mm: 'miniti %d',
|
||||||
|
h: 'lɛrɛ kelen',
|
||||||
|
hh: 'lɛrɛ %d',
|
||||||
|
d: 'tile kelen',
|
||||||
|
dd: 'tile %d',
|
||||||
|
M: 'kalo kelen',
|
||||||
|
MM: 'kalo %d',
|
||||||
|
y: 'san kelen',
|
||||||
|
yy: 'san %d',
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
129
node_modules/moment/dist/locale/bn-bd.js
generated
vendored
Normal file
129
node_modules/moment/dist/locale/bn-bd.js
generated
vendored
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Bengali (Bangladesh) [bn-bd]
|
||||||
|
//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '১',
|
||||||
|
2: '২',
|
||||||
|
3: '৩',
|
||||||
|
4: '৪',
|
||||||
|
5: '৫',
|
||||||
|
6: '৬',
|
||||||
|
7: '৭',
|
||||||
|
8: '৮',
|
||||||
|
9: '৯',
|
||||||
|
0: '০',
|
||||||
|
},
|
||||||
|
numberMap = {
|
||||||
|
'১': '1',
|
||||||
|
'২': '2',
|
||||||
|
'৩': '3',
|
||||||
|
'৪': '4',
|
||||||
|
'৫': '5',
|
||||||
|
'৬': '6',
|
||||||
|
'৭': '7',
|
||||||
|
'৮': '8',
|
||||||
|
'৯': '9',
|
||||||
|
'০': '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default moment.defineLocale('bn-bd', {
|
||||||
|
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
|
||||||
|
weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'A h:mm সময়',
|
||||||
|
LTS: 'A h:mm:ss সময়',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY, A h:mm সময়',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[আজ] LT',
|
||||||
|
nextDay: '[আগামীকাল] LT',
|
||||||
|
nextWeek: 'dddd, LT',
|
||||||
|
lastDay: '[গতকাল] LT',
|
||||||
|
lastWeek: '[গত] dddd, LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: '%s পরে',
|
||||||
|
past: '%s আগে',
|
||||||
|
s: 'কয়েক সেকেন্ড',
|
||||||
|
ss: '%d সেকেন্ড',
|
||||||
|
m: 'এক মিনিট',
|
||||||
|
mm: '%d মিনিট',
|
||||||
|
h: 'এক ঘন্টা',
|
||||||
|
hh: '%d ঘন্টা',
|
||||||
|
d: 'এক দিন',
|
||||||
|
dd: '%d দিন',
|
||||||
|
M: 'এক মাস',
|
||||||
|
MM: '%d মাস',
|
||||||
|
y: 'এক বছর',
|
||||||
|
yy: '%d বছর',
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
|
||||||
|
meridiemHour: function (hour, meridiem) {
|
||||||
|
if (hour === 12) {
|
||||||
|
hour = 0;
|
||||||
|
}
|
||||||
|
if (meridiem === 'রাত') {
|
||||||
|
return hour < 4 ? hour : hour + 12;
|
||||||
|
} else if (meridiem === 'ভোর') {
|
||||||
|
return hour;
|
||||||
|
} else if (meridiem === 'সকাল') {
|
||||||
|
return hour;
|
||||||
|
} else if (meridiem === 'দুপুর') {
|
||||||
|
return hour >= 3 ? hour : hour + 12;
|
||||||
|
} else if (meridiem === 'বিকাল') {
|
||||||
|
return hour + 12;
|
||||||
|
} else if (meridiem === 'সন্ধ্যা') {
|
||||||
|
return hour + 12;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 4) {
|
||||||
|
return 'রাত';
|
||||||
|
} else if (hour < 6) {
|
||||||
|
return 'ভোর';
|
||||||
|
} else if (hour < 12) {
|
||||||
|
return 'সকাল';
|
||||||
|
} else if (hour < 15) {
|
||||||
|
return 'দুপুর';
|
||||||
|
} else if (hour < 18) {
|
||||||
|
return 'বিকাল';
|
||||||
|
} else if (hour < 20) {
|
||||||
|
return 'সন্ধ্যা';
|
||||||
|
} else {
|
||||||
|
return 'রাত';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
119
node_modules/moment/dist/locale/bn.js
generated
vendored
Normal file
119
node_modules/moment/dist/locale/bn.js
generated
vendored
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Bengali [bn]
|
||||||
|
//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '১',
|
||||||
|
2: '২',
|
||||||
|
3: '৩',
|
||||||
|
4: '৪',
|
||||||
|
5: '৫',
|
||||||
|
6: '৬',
|
||||||
|
7: '৭',
|
||||||
|
8: '৮',
|
||||||
|
9: '৯',
|
||||||
|
0: '০',
|
||||||
|
},
|
||||||
|
numberMap = {
|
||||||
|
'১': '1',
|
||||||
|
'২': '2',
|
||||||
|
'৩': '3',
|
||||||
|
'৪': '4',
|
||||||
|
'৫': '5',
|
||||||
|
'৬': '6',
|
||||||
|
'৭': '7',
|
||||||
|
'৮': '8',
|
||||||
|
'৯': '9',
|
||||||
|
'০': '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default moment.defineLocale('bn', {
|
||||||
|
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
|
||||||
|
weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'A h:mm সময়',
|
||||||
|
LTS: 'A h:mm:ss সময়',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY, A h:mm সময়',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[আজ] LT',
|
||||||
|
nextDay: '[আগামীকাল] LT',
|
||||||
|
nextWeek: 'dddd, LT',
|
||||||
|
lastDay: '[গতকাল] LT',
|
||||||
|
lastWeek: '[গত] dddd, LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: '%s পরে',
|
||||||
|
past: '%s আগে',
|
||||||
|
s: 'কয়েক সেকেন্ড',
|
||||||
|
ss: '%d সেকেন্ড',
|
||||||
|
m: 'এক মিনিট',
|
||||||
|
mm: '%d মিনিট',
|
||||||
|
h: 'এক ঘন্টা',
|
||||||
|
hh: '%d ঘন্টা',
|
||||||
|
d: 'এক দিন',
|
||||||
|
dd: '%d দিন',
|
||||||
|
M: 'এক মাস',
|
||||||
|
MM: '%d মাস',
|
||||||
|
y: 'এক বছর',
|
||||||
|
yy: '%d বছর',
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
|
||||||
|
meridiemHour: function (hour, meridiem) {
|
||||||
|
if (hour === 12) {
|
||||||
|
hour = 0;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
(meridiem === 'রাত' && hour >= 4) ||
|
||||||
|
(meridiem === 'দুপুর' && hour < 5) ||
|
||||||
|
meridiem === 'বিকাল'
|
||||||
|
) {
|
||||||
|
return hour + 12;
|
||||||
|
} else {
|
||||||
|
return hour;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 4) {
|
||||||
|
return 'রাত';
|
||||||
|
} else if (hour < 10) {
|
||||||
|
return 'সকাল';
|
||||||
|
} else if (hour < 17) {
|
||||||
|
return 'দুপুর';
|
||||||
|
} else if (hour < 20) {
|
||||||
|
return 'বিকাল';
|
||||||
|
} else {
|
||||||
|
return 'রাত';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
124
node_modules/moment/dist/locale/bo.js
generated
vendored
Normal file
124
node_modules/moment/dist/locale/bo.js
generated
vendored
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Tibetan [bo]
|
||||||
|
//! author : Thupten N. Chakrishar : https://github.com/vajradog
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var symbolMap = {
|
||||||
|
1: '༡',
|
||||||
|
2: '༢',
|
||||||
|
3: '༣',
|
||||||
|
4: '༤',
|
||||||
|
5: '༥',
|
||||||
|
6: '༦',
|
||||||
|
7: '༧',
|
||||||
|
8: '༨',
|
||||||
|
9: '༩',
|
||||||
|
0: '༠',
|
||||||
|
},
|
||||||
|
numberMap = {
|
||||||
|
'༡': '1',
|
||||||
|
'༢': '2',
|
||||||
|
'༣': '3',
|
||||||
|
'༤': '4',
|
||||||
|
'༥': '5',
|
||||||
|
'༦': '6',
|
||||||
|
'༧': '7',
|
||||||
|
'༨': '8',
|
||||||
|
'༩': '9',
|
||||||
|
'༠': '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default moment.defineLocale('bo', {
|
||||||
|
months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShortRegex: /^(ཟླ་\d{1,2})/,
|
||||||
|
monthsParseExact: true,
|
||||||
|
weekdays:
|
||||||
|
'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'A h:mm',
|
||||||
|
LTS: 'A h:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY, A h:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY, A h:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[དི་རིང] LT',
|
||||||
|
nextDay: '[སང་ཉིན] LT',
|
||||||
|
nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
|
||||||
|
lastDay: '[ཁ་སང] LT',
|
||||||
|
lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: '%s ལ་',
|
||||||
|
past: '%s སྔན་ལ',
|
||||||
|
s: 'ལམ་སང',
|
||||||
|
ss: '%d སྐར་ཆ།',
|
||||||
|
m: 'སྐར་མ་གཅིག',
|
||||||
|
mm: '%d སྐར་མ',
|
||||||
|
h: 'ཆུ་ཚོད་གཅིག',
|
||||||
|
hh: '%d ཆུ་ཚོད',
|
||||||
|
d: 'ཉིན་གཅིག',
|
||||||
|
dd: '%d ཉིན་',
|
||||||
|
M: 'ཟླ་བ་གཅིག',
|
||||||
|
MM: '%d ཟླ་བ',
|
||||||
|
y: 'ལོ་གཅིག',
|
||||||
|
yy: '%d ལོ',
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
|
||||||
|
return numberMap[match];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string.replace(/\d/g, function (match) {
|
||||||
|
return symbolMap[match];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
|
||||||
|
meridiemHour: function (hour, meridiem) {
|
||||||
|
if (hour === 12) {
|
||||||
|
hour = 0;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
(meridiem === 'མཚན་མོ' && hour >= 4) ||
|
||||||
|
(meridiem === 'ཉིན་གུང' && hour < 5) ||
|
||||||
|
meridiem === 'དགོང་དག'
|
||||||
|
) {
|
||||||
|
return hour + 12;
|
||||||
|
} else {
|
||||||
|
return hour;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 4) {
|
||||||
|
return 'མཚན་མོ';
|
||||||
|
} else if (hour < 10) {
|
||||||
|
return 'ཞོགས་ཀས';
|
||||||
|
} else if (hour < 17) {
|
||||||
|
return 'ཉིན་གུང';
|
||||||
|
} else if (hour < 20) {
|
||||||
|
return 'དགོང་དག';
|
||||||
|
} else {
|
||||||
|
return 'མཚན་མོ';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
168
node_modules/moment/dist/locale/br.js
generated
vendored
Normal file
168
node_modules/moment/dist/locale/br.js
generated
vendored
Normal file
|
@ -0,0 +1,168 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Breton [br]
|
||||||
|
//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function relativeTimeWithMutation(number, withoutSuffix, key) {
|
||||||
|
var format = {
|
||||||
|
mm: 'munutenn',
|
||||||
|
MM: 'miz',
|
||||||
|
dd: 'devezh',
|
||||||
|
};
|
||||||
|
return number + ' ' + mutation(format[key], number);
|
||||||
|
}
|
||||||
|
function specialMutationForYears(number) {
|
||||||
|
switch (lastNumber(number)) {
|
||||||
|
case 1:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 9:
|
||||||
|
return number + ' bloaz';
|
||||||
|
default:
|
||||||
|
return number + ' vloaz';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function lastNumber(number) {
|
||||||
|
if (number > 9) {
|
||||||
|
return lastNumber(number % 10);
|
||||||
|
}
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
function mutation(text, number) {
|
||||||
|
if (number === 2) {
|
||||||
|
return softMutation(text);
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
function softMutation(text) {
|
||||||
|
var mutationTable = {
|
||||||
|
m: 'v',
|
||||||
|
b: 'v',
|
||||||
|
d: 'z',
|
||||||
|
};
|
||||||
|
if (mutationTable[text.charAt(0)] === undefined) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
return mutationTable[text.charAt(0)] + text.substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var monthsParse = [
|
||||||
|
/^gen/i,
|
||||||
|
/^c[ʼ\']hwe/i,
|
||||||
|
/^meu/i,
|
||||||
|
/^ebr/i,
|
||||||
|
/^mae/i,
|
||||||
|
/^(mez|eve)/i,
|
||||||
|
/^gou/i,
|
||||||
|
/^eos/i,
|
||||||
|
/^gwe/i,
|
||||||
|
/^her/i,
|
||||||
|
/^du/i,
|
||||||
|
/^ker/i,
|
||||||
|
],
|
||||||
|
monthsRegex =
|
||||||
|
/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
|
||||||
|
monthsStrictRegex =
|
||||||
|
/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
|
||||||
|
monthsShortStrictRegex =
|
||||||
|
/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
|
||||||
|
fullWeekdaysParse = [
|
||||||
|
/^sul/i,
|
||||||
|
/^lun/i,
|
||||||
|
/^meurzh/i,
|
||||||
|
/^merc[ʼ\']her/i,
|
||||||
|
/^yaou/i,
|
||||||
|
/^gwener/i,
|
||||||
|
/^sadorn/i,
|
||||||
|
],
|
||||||
|
shortWeekdaysParse = [
|
||||||
|
/^Sul/i,
|
||||||
|
/^Lun/i,
|
||||||
|
/^Meu/i,
|
||||||
|
/^Mer/i,
|
||||||
|
/^Yao/i,
|
||||||
|
/^Gwe/i,
|
||||||
|
/^Sad/i,
|
||||||
|
],
|
||||||
|
minWeekdaysParse = [
|
||||||
|
/^Su/i,
|
||||||
|
/^Lu/i,
|
||||||
|
/^Me([^r]|$)/i,
|
||||||
|
/^Mer/i,
|
||||||
|
/^Ya/i,
|
||||||
|
/^Gw/i,
|
||||||
|
/^Sa/i,
|
||||||
|
];
|
||||||
|
|
||||||
|
export default moment.defineLocale('br', {
|
||||||
|
months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
|
||||||
|
weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
|
||||||
|
weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
|
||||||
|
weekdaysParse: minWeekdaysParse,
|
||||||
|
fullWeekdaysParse: fullWeekdaysParse,
|
||||||
|
shortWeekdaysParse: shortWeekdaysParse,
|
||||||
|
minWeekdaysParse: minWeekdaysParse,
|
||||||
|
|
||||||
|
monthsRegex: monthsRegex,
|
||||||
|
monthsShortRegex: monthsRegex,
|
||||||
|
monthsStrictRegex: monthsStrictRegex,
|
||||||
|
monthsShortStrictRegex: monthsShortStrictRegex,
|
||||||
|
monthsParse: monthsParse,
|
||||||
|
longMonthsParse: monthsParse,
|
||||||
|
shortMonthsParse: monthsParse,
|
||||||
|
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D [a viz] MMMM YYYY',
|
||||||
|
LLL: 'D [a viz] MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Hiziv da] LT',
|
||||||
|
nextDay: '[Warcʼhoazh da] LT',
|
||||||
|
nextWeek: 'dddd [da] LT',
|
||||||
|
lastDay: '[Decʼh da] LT',
|
||||||
|
lastWeek: 'dddd [paset da] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'a-benn %s',
|
||||||
|
past: '%s ʼzo',
|
||||||
|
s: 'un nebeud segondennoù',
|
||||||
|
ss: '%d eilenn',
|
||||||
|
m: 'ur vunutenn',
|
||||||
|
mm: relativeTimeWithMutation,
|
||||||
|
h: 'un eur',
|
||||||
|
hh: '%d eur',
|
||||||
|
d: 'un devezh',
|
||||||
|
dd: relativeTimeWithMutation,
|
||||||
|
M: 'ur miz',
|
||||||
|
MM: relativeTimeWithMutation,
|
||||||
|
y: 'ur bloaz',
|
||||||
|
yy: specialMutationForYears,
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var output = number === 1 ? 'añ' : 'vet';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
|
||||||
|
isPM: function (token) {
|
||||||
|
return token === 'g.m.';
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
return hour < 12 ? 'a.m.' : 'g.m.';
|
||||||
|
},
|
||||||
|
});
|
160
node_modules/moment/dist/locale/bs.js
generated
vendored
Normal file
160
node_modules/moment/dist/locale/bs.js
generated
vendored
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Bosnian [bs]
|
||||||
|
//! author : Nedim Cholich : https://github.com/frontyard
|
||||||
|
//! author : Rasid Redzic : https://github.com/rasidre
|
||||||
|
//! based on (hr) translation by Bojan Marković
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
||||||
|
switch (key) {
|
||||||
|
case 'm':
|
||||||
|
return withoutSuffix
|
||||||
|
? 'jedna minuta'
|
||||||
|
: isFuture
|
||||||
|
? 'jednu minutu'
|
||||||
|
: 'jedne minute';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function translate(number, withoutSuffix, key) {
|
||||||
|
var result = number + ' ';
|
||||||
|
switch (key) {
|
||||||
|
case 'ss':
|
||||||
|
if (number === 1) {
|
||||||
|
result += 'sekunda';
|
||||||
|
} else if (number === 2 || number === 3 || number === 4) {
|
||||||
|
result += 'sekunde';
|
||||||
|
} else {
|
||||||
|
result += 'sekundi';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
case 'mm':
|
||||||
|
if (number === 1) {
|
||||||
|
result += 'minuta';
|
||||||
|
} else if (number === 2 || number === 3 || number === 4) {
|
||||||
|
result += 'minute';
|
||||||
|
} else {
|
||||||
|
result += 'minuta';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
case 'h':
|
||||||
|
return withoutSuffix ? 'jedan sat' : 'jedan sat';
|
||||||
|
case 'hh':
|
||||||
|
if (number === 1) {
|
||||||
|
result += 'sat';
|
||||||
|
} else if (number === 2 || number === 3 || number === 4) {
|
||||||
|
result += 'sata';
|
||||||
|
} else {
|
||||||
|
result += 'sati';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
case 'dd':
|
||||||
|
if (number === 1) {
|
||||||
|
result += 'dan';
|
||||||
|
} else {
|
||||||
|
result += 'dana';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
case 'MM':
|
||||||
|
if (number === 1) {
|
||||||
|
result += 'mjesec';
|
||||||
|
} else if (number === 2 || number === 3 || number === 4) {
|
||||||
|
result += 'mjeseca';
|
||||||
|
} else {
|
||||||
|
result += 'mjeseci';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
case 'yy':
|
||||||
|
if (number === 1) {
|
||||||
|
result += 'godina';
|
||||||
|
} else if (number === 2 || number === 3 || number === 4) {
|
||||||
|
result += 'godine';
|
||||||
|
} else {
|
||||||
|
result += 'godina';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('bs', {
|
||||||
|
months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsParseExact: true,
|
||||||
|
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
|
||||||
|
weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'H:mm',
|
||||||
|
LTS: 'H:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D. MMMM YYYY',
|
||||||
|
LLL: 'D. MMMM YYYY H:mm',
|
||||||
|
LLLL: 'dddd, D. MMMM YYYY H:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[danas u] LT',
|
||||||
|
nextDay: '[sutra u] LT',
|
||||||
|
nextWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 0:
|
||||||
|
return '[u] [nedjelju] [u] LT';
|
||||||
|
case 3:
|
||||||
|
return '[u] [srijedu] [u] LT';
|
||||||
|
case 6:
|
||||||
|
return '[u] [subotu] [u] LT';
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
return '[u] dddd [u] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lastDay: '[jučer u] LT',
|
||||||
|
lastWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 0:
|
||||||
|
case 3:
|
||||||
|
return '[prošlu] dddd [u] LT';
|
||||||
|
case 6:
|
||||||
|
return '[prošle] [subote] [u] LT';
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
return '[prošli] dddd [u] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'za %s',
|
||||||
|
past: 'prije %s',
|
||||||
|
s: 'par sekundi',
|
||||||
|
ss: translate,
|
||||||
|
m: processRelativeTime,
|
||||||
|
mm: translate,
|
||||||
|
h: translate,
|
||||||
|
hh: translate,
|
||||||
|
d: 'dan',
|
||||||
|
dd: translate,
|
||||||
|
M: 'mjesec',
|
||||||
|
MM: translate,
|
||||||
|
y: 'godinu',
|
||||||
|
yy: translate,
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
||||||
|
ordinal: '%d.',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
100
node_modules/moment/dist/locale/ca.js
generated
vendored
Normal file
100
node_modules/moment/dist/locale/ca.js
generated
vendored
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Catalan [ca]
|
||||||
|
//! author : Juan G. Hurtado : https://github.com/juanghurtado
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('ca', {
|
||||||
|
months: {
|
||||||
|
standalone:
|
||||||
|
'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
isFormat: /D[oD]?(\s)+MMMM/,
|
||||||
|
},
|
||||||
|
monthsShort:
|
||||||
|
'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsParseExact: true,
|
||||||
|
weekdays:
|
||||||
|
'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
|
||||||
|
weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'H:mm',
|
||||||
|
LTS: 'H:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM [de] YYYY',
|
||||||
|
ll: 'D MMM YYYY',
|
||||||
|
LLL: 'D MMMM [de] YYYY [a les] H:mm',
|
||||||
|
lll: 'D MMM YYYY, H:mm',
|
||||||
|
LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
|
||||||
|
llll: 'ddd D MMM YYYY, H:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: function () {
|
||||||
|
return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
||||||
|
},
|
||||||
|
nextDay: function () {
|
||||||
|
return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
||||||
|
},
|
||||||
|
nextWeek: function () {
|
||||||
|
return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
||||||
|
},
|
||||||
|
lastDay: function () {
|
||||||
|
return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
||||||
|
},
|
||||||
|
lastWeek: function () {
|
||||||
|
return (
|
||||||
|
'[el] dddd [passat a ' +
|
||||||
|
(this.hours() !== 1 ? 'les' : 'la') +
|
||||||
|
'] LT'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: "d'aquí %s",
|
||||||
|
past: 'fa %s',
|
||||||
|
s: 'uns segons',
|
||||||
|
ss: '%d segons',
|
||||||
|
m: 'un minut',
|
||||||
|
mm: '%d minuts',
|
||||||
|
h: 'una hora',
|
||||||
|
hh: '%d hores',
|
||||||
|
d: 'un dia',
|
||||||
|
dd: '%d dies',
|
||||||
|
M: 'un mes',
|
||||||
|
MM: '%d mesos',
|
||||||
|
y: 'un any',
|
||||||
|
yy: '%d anys',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
|
||||||
|
ordinal: function (number, period) {
|
||||||
|
var output =
|
||||||
|
number === 1
|
||||||
|
? 'r'
|
||||||
|
: number === 2
|
||||||
|
? 'n'
|
||||||
|
: number === 3
|
||||||
|
? 'r'
|
||||||
|
: number === 4
|
||||||
|
? 't'
|
||||||
|
: 'è';
|
||||||
|
if (period === 'w' || period === 'W') {
|
||||||
|
output = 'a';
|
||||||
|
}
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
181
node_modules/moment/dist/locale/cs.js
generated
vendored
Normal file
181
node_modules/moment/dist/locale/cs.js
generated
vendored
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Czech [cs]
|
||||||
|
//! author : petrbela : https://github.com/petrbela
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var months = {
|
||||||
|
standalone:
|
||||||
|
'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
isFormat: /DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/,
|
||||||
|
},
|
||||||
|
monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
|
||||||
|
monthsParse = [
|
||||||
|
/^led/i,
|
||||||
|
/^úno/i,
|
||||||
|
/^bře/i,
|
||||||
|
/^dub/i,
|
||||||
|
/^kvě/i,
|
||||||
|
/^(čvn|červen$|června)/i,
|
||||||
|
/^(čvc|červenec|července)/i,
|
||||||
|
/^srp/i,
|
||||||
|
/^zář/i,
|
||||||
|
/^říj/i,
|
||||||
|
/^lis/i,
|
||||||
|
/^pro/i,
|
||||||
|
],
|
||||||
|
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
|
||||||
|
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
|
||||||
|
monthsRegex =
|
||||||
|
/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
|
||||||
|
|
||||||
|
function plural(n) {
|
||||||
|
return n > 1 && n < 5 && ~~(n / 10) !== 1;
|
||||||
|
}
|
||||||
|
function translate(number, withoutSuffix, key, isFuture) {
|
||||||
|
var result = number + ' ';
|
||||||
|
switch (key) {
|
||||||
|
case 's': // a few seconds / in a few seconds / a few seconds ago
|
||||||
|
return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
|
||||||
|
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
|
||||||
|
if (withoutSuffix || isFuture) {
|
||||||
|
return result + (plural(number) ? 'sekundy' : 'sekund');
|
||||||
|
} else {
|
||||||
|
return result + 'sekundami';
|
||||||
|
}
|
||||||
|
case 'm': // a minute / in a minute / a minute ago
|
||||||
|
return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
|
||||||
|
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
|
||||||
|
if (withoutSuffix || isFuture) {
|
||||||
|
return result + (plural(number) ? 'minuty' : 'minut');
|
||||||
|
} else {
|
||||||
|
return result + 'minutami';
|
||||||
|
}
|
||||||
|
case 'h': // an hour / in an hour / an hour ago
|
||||||
|
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
|
||||||
|
case 'hh': // 9 hours / in 9 hours / 9 hours ago
|
||||||
|
if (withoutSuffix || isFuture) {
|
||||||
|
return result + (plural(number) ? 'hodiny' : 'hodin');
|
||||||
|
} else {
|
||||||
|
return result + 'hodinami';
|
||||||
|
}
|
||||||
|
case 'd': // a day / in a day / a day ago
|
||||||
|
return withoutSuffix || isFuture ? 'den' : 'dnem';
|
||||||
|
case 'dd': // 9 days / in 9 days / 9 days ago
|
||||||
|
if (withoutSuffix || isFuture) {
|
||||||
|
return result + (plural(number) ? 'dny' : 'dní');
|
||||||
|
} else {
|
||||||
|
return result + 'dny';
|
||||||
|
}
|
||||||
|
case 'M': // a month / in a month / a month ago
|
||||||
|
return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
|
||||||
|
case 'MM': // 9 months / in 9 months / 9 months ago
|
||||||
|
if (withoutSuffix || isFuture) {
|
||||||
|
return result + (plural(number) ? 'měsíce' : 'měsíců');
|
||||||
|
} else {
|
||||||
|
return result + 'měsíci';
|
||||||
|
}
|
||||||
|
case 'y': // a year / in a year / a year ago
|
||||||
|
return withoutSuffix || isFuture ? 'rok' : 'rokem';
|
||||||
|
case 'yy': // 9 years / in 9 years / 9 years ago
|
||||||
|
if (withoutSuffix || isFuture) {
|
||||||
|
return result + (plural(number) ? 'roky' : 'let');
|
||||||
|
} else {
|
||||||
|
return result + 'lety';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('cs', {
|
||||||
|
months: months,
|
||||||
|
monthsShort: monthsShort,
|
||||||
|
monthsRegex: monthsRegex,
|
||||||
|
monthsShortRegex: monthsRegex,
|
||||||
|
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
|
||||||
|
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
|
||||||
|
monthsStrictRegex:
|
||||||
|
/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
|
||||||
|
monthsShortStrictRegex:
|
||||||
|
/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
|
||||||
|
monthsParse: monthsParse,
|
||||||
|
longMonthsParse: monthsParse,
|
||||||
|
shortMonthsParse: monthsParse,
|
||||||
|
weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
|
||||||
|
weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
|
||||||
|
weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'H:mm',
|
||||||
|
LTS: 'H:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D. MMMM YYYY',
|
||||||
|
LLL: 'D. MMMM YYYY H:mm',
|
||||||
|
LLLL: 'dddd D. MMMM YYYY H:mm',
|
||||||
|
l: 'D. M. YYYY',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[dnes v] LT',
|
||||||
|
nextDay: '[zítra v] LT',
|
||||||
|
nextWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 0:
|
||||||
|
return '[v neděli v] LT';
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
return '[v] dddd [v] LT';
|
||||||
|
case 3:
|
||||||
|
return '[ve středu v] LT';
|
||||||
|
case 4:
|
||||||
|
return '[ve čtvrtek v] LT';
|
||||||
|
case 5:
|
||||||
|
return '[v pátek v] LT';
|
||||||
|
case 6:
|
||||||
|
return '[v sobotu v] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lastDay: '[včera v] LT',
|
||||||
|
lastWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 0:
|
||||||
|
return '[minulou neděli v] LT';
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
return '[minulé] dddd [v] LT';
|
||||||
|
case 3:
|
||||||
|
return '[minulou středu v] LT';
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
return '[minulý] dddd [v] LT';
|
||||||
|
case 6:
|
||||||
|
return '[minulou sobotu v] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'za %s',
|
||||||
|
past: 'před %s',
|
||||||
|
s: translate,
|
||||||
|
ss: translate,
|
||||||
|
m: translate,
|
||||||
|
mm: translate,
|
||||||
|
h: translate,
|
||||||
|
hh: translate,
|
||||||
|
d: translate,
|
||||||
|
dd: translate,
|
||||||
|
M: translate,
|
||||||
|
MM: translate,
|
||||||
|
y: translate,
|
||||||
|
yy: translate,
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
||||||
|
ordinal: '%d.',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
63
node_modules/moment/dist/locale/cv.js
generated
vendored
Normal file
63
node_modules/moment/dist/locale/cv.js
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Chuvash [cv]
|
||||||
|
//! author : Anatoly Mironov : https://github.com/mirontoli
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('cv', {
|
||||||
|
months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
|
||||||
|
weekdays:
|
||||||
|
'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
|
||||||
|
weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD-MM-YYYY',
|
||||||
|
LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
|
||||||
|
LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
|
||||||
|
LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Паян] LT [сехетре]',
|
||||||
|
nextDay: '[Ыран] LT [сехетре]',
|
||||||
|
lastDay: '[Ӗнер] LT [сехетре]',
|
||||||
|
nextWeek: '[Ҫитес] dddd LT [сехетре]',
|
||||||
|
lastWeek: '[Иртнӗ] dddd LT [сехетре]',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: function (output) {
|
||||||
|
var affix = /сехет$/i.exec(output)
|
||||||
|
? 'рен'
|
||||||
|
: /ҫул$/i.exec(output)
|
||||||
|
? 'тан'
|
||||||
|
: 'ран';
|
||||||
|
return output + affix;
|
||||||
|
},
|
||||||
|
past: '%s каялла',
|
||||||
|
s: 'пӗр-ик ҫеккунт',
|
||||||
|
ss: '%d ҫеккунт',
|
||||||
|
m: 'пӗр минут',
|
||||||
|
mm: '%d минут',
|
||||||
|
h: 'пӗр сехет',
|
||||||
|
hh: '%d сехет',
|
||||||
|
d: 'пӗр кун',
|
||||||
|
dd: '%d кун',
|
||||||
|
M: 'пӗр уйӑх',
|
||||||
|
MM: '%d уйӑх',
|
||||||
|
y: 'пӗр ҫул',
|
||||||
|
yy: '%d ҫул',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
|
||||||
|
ordinal: '%d-мӗш',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
98
node_modules/moment/dist/locale/cy.js
generated
vendored
Normal file
98
node_modules/moment/dist/locale/cy.js
generated
vendored
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Welsh [cy]
|
||||||
|
//! author : Robert Allen : https://github.com/robgallen
|
||||||
|
//! author : https://github.com/ryangreaves
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('cy', {
|
||||||
|
months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdays:
|
||||||
|
'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
// time formats are the same as en-gb
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Heddiw am] LT',
|
||||||
|
nextDay: '[Yfory am] LT',
|
||||||
|
nextWeek: 'dddd [am] LT',
|
||||||
|
lastDay: '[Ddoe am] LT',
|
||||||
|
lastWeek: 'dddd [diwethaf am] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'mewn %s',
|
||||||
|
past: '%s yn ôl',
|
||||||
|
s: 'ychydig eiliadau',
|
||||||
|
ss: '%d eiliad',
|
||||||
|
m: 'munud',
|
||||||
|
mm: '%d munud',
|
||||||
|
h: 'awr',
|
||||||
|
hh: '%d awr',
|
||||||
|
d: 'diwrnod',
|
||||||
|
dd: '%d diwrnod',
|
||||||
|
M: 'mis',
|
||||||
|
MM: '%d mis',
|
||||||
|
y: 'blwyddyn',
|
||||||
|
yy: '%d flynedd',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
|
||||||
|
// traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number,
|
||||||
|
output = '',
|
||||||
|
lookup = [
|
||||||
|
'',
|
||||||
|
'af',
|
||||||
|
'il',
|
||||||
|
'ydd',
|
||||||
|
'ydd',
|
||||||
|
'ed',
|
||||||
|
'ed',
|
||||||
|
'ed',
|
||||||
|
'fed',
|
||||||
|
'fed',
|
||||||
|
'fed', // 1af to 10fed
|
||||||
|
'eg',
|
||||||
|
'fed',
|
||||||
|
'eg',
|
||||||
|
'eg',
|
||||||
|
'fed',
|
||||||
|
'eg',
|
||||||
|
'eg',
|
||||||
|
'fed',
|
||||||
|
'eg',
|
||||||
|
'fed', // 11eg to 20fed
|
||||||
|
];
|
||||||
|
if (b > 20) {
|
||||||
|
if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
|
||||||
|
output = 'fed'; // not 30ain, 70ain or 90ain
|
||||||
|
} else {
|
||||||
|
output = 'ain';
|
||||||
|
}
|
||||||
|
} else if (b > 0) {
|
||||||
|
output = lookup[b];
|
||||||
|
}
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
53
node_modules/moment/dist/locale/da.js
generated
vendored
Normal file
53
node_modules/moment/dist/locale/da.js
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Danish [da]
|
||||||
|
//! author : Ulrik Nielsen : https://github.com/mrbase
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('da', {
|
||||||
|
months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
|
||||||
|
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
|
||||||
|
weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
|
||||||
|
weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D. MMMM YYYY',
|
||||||
|
LLL: 'D. MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[i dag kl.] LT',
|
||||||
|
nextDay: '[i morgen kl.] LT',
|
||||||
|
nextWeek: 'på dddd [kl.] LT',
|
||||||
|
lastDay: '[i går kl.] LT',
|
||||||
|
lastWeek: '[i] dddd[s kl.] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'om %s',
|
||||||
|
past: '%s siden',
|
||||||
|
s: 'få sekunder',
|
||||||
|
ss: '%d sekunder',
|
||||||
|
m: 'et minut',
|
||||||
|
mm: '%d minutter',
|
||||||
|
h: 'en time',
|
||||||
|
hh: '%d timer',
|
||||||
|
d: 'en dag',
|
||||||
|
dd: '%d dage',
|
||||||
|
M: 'en måned',
|
||||||
|
MM: '%d måneder',
|
||||||
|
y: 'et år',
|
||||||
|
yy: '%d år',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
||||||
|
ordinal: '%d.',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
79
node_modules/moment/dist/locale/de-at.js
generated
vendored
Normal file
79
node_modules/moment/dist/locale/de-at.js
generated
vendored
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : German (Austria) [de-at]
|
||||||
|
//! author : lluchs : https://github.com/lluchs
|
||||||
|
//! author: Menelion Elensúle: https://github.com/Oire
|
||||||
|
//! author : Martin Groller : https://github.com/MadMG
|
||||||
|
//! author : Mikolaj Dadela : https://github.com/mik01aj
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
||||||
|
var format = {
|
||||||
|
m: ['eine Minute', 'einer Minute'],
|
||||||
|
h: ['eine Stunde', 'einer Stunde'],
|
||||||
|
d: ['ein Tag', 'einem Tag'],
|
||||||
|
dd: [number + ' Tage', number + ' Tagen'],
|
||||||
|
w: ['eine Woche', 'einer Woche'],
|
||||||
|
M: ['ein Monat', 'einem Monat'],
|
||||||
|
MM: [number + ' Monate', number + ' Monaten'],
|
||||||
|
y: ['ein Jahr', 'einem Jahr'],
|
||||||
|
yy: [number + ' Jahre', number + ' Jahren'],
|
||||||
|
};
|
||||||
|
return withoutSuffix ? format[key][0] : format[key][1];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('de-at', {
|
||||||
|
months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
|
||||||
|
monthsParseExact: true,
|
||||||
|
weekdays:
|
||||||
|
'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
|
||||||
|
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D. MMMM YYYY',
|
||||||
|
LLL: 'D. MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D. MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[heute um] LT [Uhr]',
|
||||||
|
sameElse: 'L',
|
||||||
|
nextDay: '[morgen um] LT [Uhr]',
|
||||||
|
nextWeek: 'dddd [um] LT [Uhr]',
|
||||||
|
lastDay: '[gestern um] LT [Uhr]',
|
||||||
|
lastWeek: '[letzten] dddd [um] LT [Uhr]',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: 'vor %s',
|
||||||
|
s: 'ein paar Sekunden',
|
||||||
|
ss: '%d Sekunden',
|
||||||
|
m: processRelativeTime,
|
||||||
|
mm: '%d Minuten',
|
||||||
|
h: processRelativeTime,
|
||||||
|
hh: '%d Stunden',
|
||||||
|
d: processRelativeTime,
|
||||||
|
dd: processRelativeTime,
|
||||||
|
w: processRelativeTime,
|
||||||
|
ww: '%d Wochen',
|
||||||
|
M: processRelativeTime,
|
||||||
|
MM: processRelativeTime,
|
||||||
|
y: processRelativeTime,
|
||||||
|
yy: processRelativeTime,
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
||||||
|
ordinal: '%d.',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
78
node_modules/moment/dist/locale/de-ch.js
generated
vendored
Normal file
78
node_modules/moment/dist/locale/de-ch.js
generated
vendored
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : German (Switzerland) [de-ch]
|
||||||
|
//! author : sschueller : https://github.com/sschueller
|
||||||
|
|
||||||
|
// based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
||||||
|
var format = {
|
||||||
|
m: ['eine Minute', 'einer Minute'],
|
||||||
|
h: ['eine Stunde', 'einer Stunde'],
|
||||||
|
d: ['ein Tag', 'einem Tag'],
|
||||||
|
dd: [number + ' Tage', number + ' Tagen'],
|
||||||
|
w: ['eine Woche', 'einer Woche'],
|
||||||
|
M: ['ein Monat', 'einem Monat'],
|
||||||
|
MM: [number + ' Monate', number + ' Monaten'],
|
||||||
|
y: ['ein Jahr', 'einem Jahr'],
|
||||||
|
yy: [number + ' Jahre', number + ' Jahren'],
|
||||||
|
};
|
||||||
|
return withoutSuffix ? format[key][0] : format[key][1];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('de-ch', {
|
||||||
|
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
|
||||||
|
monthsParseExact: true,
|
||||||
|
weekdays:
|
||||||
|
'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
|
||||||
|
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D. MMMM YYYY',
|
||||||
|
LLL: 'D. MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D. MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[heute um] LT [Uhr]',
|
||||||
|
sameElse: 'L',
|
||||||
|
nextDay: '[morgen um] LT [Uhr]',
|
||||||
|
nextWeek: 'dddd [um] LT [Uhr]',
|
||||||
|
lastDay: '[gestern um] LT [Uhr]',
|
||||||
|
lastWeek: '[letzten] dddd [um] LT [Uhr]',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: 'vor %s',
|
||||||
|
s: 'ein paar Sekunden',
|
||||||
|
ss: '%d Sekunden',
|
||||||
|
m: processRelativeTime,
|
||||||
|
mm: '%d Minuten',
|
||||||
|
h: processRelativeTime,
|
||||||
|
hh: '%d Stunden',
|
||||||
|
d: processRelativeTime,
|
||||||
|
dd: processRelativeTime,
|
||||||
|
w: processRelativeTime,
|
||||||
|
ww: '%d Wochen',
|
||||||
|
M: processRelativeTime,
|
||||||
|
MM: processRelativeTime,
|
||||||
|
y: processRelativeTime,
|
||||||
|
yy: processRelativeTime,
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
||||||
|
ordinal: '%d.',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
78
node_modules/moment/dist/locale/de.js
generated
vendored
Normal file
78
node_modules/moment/dist/locale/de.js
generated
vendored
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : German [de]
|
||||||
|
//! author : lluchs : https://github.com/lluchs
|
||||||
|
//! author: Menelion Elensúle: https://github.com/Oire
|
||||||
|
//! author : Mikolaj Dadela : https://github.com/mik01aj
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
||||||
|
var format = {
|
||||||
|
m: ['eine Minute', 'einer Minute'],
|
||||||
|
h: ['eine Stunde', 'einer Stunde'],
|
||||||
|
d: ['ein Tag', 'einem Tag'],
|
||||||
|
dd: [number + ' Tage', number + ' Tagen'],
|
||||||
|
w: ['eine Woche', 'einer Woche'],
|
||||||
|
M: ['ein Monat', 'einem Monat'],
|
||||||
|
MM: [number + ' Monate', number + ' Monaten'],
|
||||||
|
y: ['ein Jahr', 'einem Jahr'],
|
||||||
|
yy: [number + ' Jahre', number + ' Jahren'],
|
||||||
|
};
|
||||||
|
return withoutSuffix ? format[key][0] : format[key][1];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('de', {
|
||||||
|
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort:
|
||||||
|
'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
|
||||||
|
monthsParseExact: true,
|
||||||
|
weekdays:
|
||||||
|
'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
|
||||||
|
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
|
||||||
|
weekdaysParseExact: true,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD.MM.YYYY',
|
||||||
|
LL: 'D. MMMM YYYY',
|
||||||
|
LLL: 'D. MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D. MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[heute um] LT [Uhr]',
|
||||||
|
sameElse: 'L',
|
||||||
|
nextDay: '[morgen um] LT [Uhr]',
|
||||||
|
nextWeek: 'dddd [um] LT [Uhr]',
|
||||||
|
lastDay: '[gestern um] LT [Uhr]',
|
||||||
|
lastWeek: '[letzten] dddd [um] LT [Uhr]',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: 'vor %s',
|
||||||
|
s: 'ein paar Sekunden',
|
||||||
|
ss: '%d Sekunden',
|
||||||
|
m: processRelativeTime,
|
||||||
|
mm: '%d Minuten',
|
||||||
|
h: processRelativeTime,
|
||||||
|
hh: '%d Stunden',
|
||||||
|
d: processRelativeTime,
|
||||||
|
dd: processRelativeTime,
|
||||||
|
w: processRelativeTime,
|
||||||
|
ww: '%d Wochen',
|
||||||
|
M: processRelativeTime,
|
||||||
|
MM: processRelativeTime,
|
||||||
|
y: processRelativeTime,
|
||||||
|
yy: processRelativeTime,
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
||||||
|
ordinal: '%d.',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
90
node_modules/moment/dist/locale/dv.js
generated
vendored
Normal file
90
node_modules/moment/dist/locale/dv.js
generated
vendored
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Maldivian [dv]
|
||||||
|
//! author : Jawish Hameed : https://github.com/jawish
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
var months = [
|
||||||
|
'ޖެނުއަރީ',
|
||||||
|
'ފެބްރުއަރީ',
|
||||||
|
'މާރިޗު',
|
||||||
|
'އޭޕްރީލު',
|
||||||
|
'މޭ',
|
||||||
|
'ޖޫން',
|
||||||
|
'ޖުލައި',
|
||||||
|
'އޯގަސްޓު',
|
||||||
|
'ސެޕްޓެމްބަރު',
|
||||||
|
'އޮކްޓޯބަރު',
|
||||||
|
'ނޮވެމްބަރު',
|
||||||
|
'ޑިސެމްބަރު',
|
||||||
|
],
|
||||||
|
weekdays = [
|
||||||
|
'އާދިއްތަ',
|
||||||
|
'ހޯމަ',
|
||||||
|
'އަންގާރަ',
|
||||||
|
'ބުދަ',
|
||||||
|
'ބުރާސްފަތި',
|
||||||
|
'ހުކުރު',
|
||||||
|
'ހޮނިހިރު',
|
||||||
|
];
|
||||||
|
|
||||||
|
export default moment.defineLocale('dv', {
|
||||||
|
months: months,
|
||||||
|
monthsShort: months,
|
||||||
|
weekdays: weekdays,
|
||||||
|
weekdaysShort: weekdays,
|
||||||
|
weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'D/M/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
meridiemParse: /މކ|މފ/,
|
||||||
|
isPM: function (input) {
|
||||||
|
return 'މފ' === input;
|
||||||
|
},
|
||||||
|
meridiem: function (hour, minute, isLower) {
|
||||||
|
if (hour < 12) {
|
||||||
|
return 'މކ';
|
||||||
|
} else {
|
||||||
|
return 'މފ';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[މިއަދު] LT',
|
||||||
|
nextDay: '[މާދަމާ] LT',
|
||||||
|
nextWeek: 'dddd LT',
|
||||||
|
lastDay: '[އިއްޔެ] LT',
|
||||||
|
lastWeek: '[ފާއިތުވި] dddd LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'ތެރޭގައި %s',
|
||||||
|
past: 'ކުރިން %s',
|
||||||
|
s: 'ސިކުންތުކޮޅެއް',
|
||||||
|
ss: 'd% ސިކުންތު',
|
||||||
|
m: 'މިނިޓެއް',
|
||||||
|
mm: 'މިނިޓު %d',
|
||||||
|
h: 'ގަޑިއިރެއް',
|
||||||
|
hh: 'ގަޑިއިރު %d',
|
||||||
|
d: 'ދުވަހެއް',
|
||||||
|
dd: 'ދުވަސް %d',
|
||||||
|
M: 'މަހެއް',
|
||||||
|
MM: 'މަސް %d',
|
||||||
|
y: 'އަހަރެއް',
|
||||||
|
yy: 'އަހަރު %d',
|
||||||
|
},
|
||||||
|
preparse: function (string) {
|
||||||
|
return string.replace(/،/g, ',');
|
||||||
|
},
|
||||||
|
postformat: function (string) {
|
||||||
|
return string.replace(/,/g, '،');
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 7, // Sunday is the first day of the week.
|
||||||
|
doy: 12, // The week that contains Jan 12th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
106
node_modules/moment/dist/locale/el.js
generated
vendored
Normal file
106
node_modules/moment/dist/locale/el.js
generated
vendored
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : Greek [el]
|
||||||
|
//! author : Aggelos Karalias : https://github.com/mehiel
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
function isFunction(input) {
|
||||||
|
return (
|
||||||
|
(typeof Function !== 'undefined' && input instanceof Function) ||
|
||||||
|
Object.prototype.toString.call(input) === '[object Function]'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default moment.defineLocale('el', {
|
||||||
|
monthsNominativeEl:
|
||||||
|
'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsGenitiveEl:
|
||||||
|
'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
months: function (momentToFormat, format) {
|
||||||
|
if (!momentToFormat) {
|
||||||
|
return this._monthsNominativeEl;
|
||||||
|
} else if (
|
||||||
|
typeof format === 'string' &&
|
||||||
|
/D/.test(format.substring(0, format.indexOf('MMMM')))
|
||||||
|
) {
|
||||||
|
// if there is a day number before 'MMMM'
|
||||||
|
return this._monthsGenitiveEl[momentToFormat.month()];
|
||||||
|
} else {
|
||||||
|
return this._monthsNominativeEl[momentToFormat.month()];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
|
||||||
|
weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
|
||||||
|
weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
|
||||||
|
meridiem: function (hours, minutes, isLower) {
|
||||||
|
if (hours > 11) {
|
||||||
|
return isLower ? 'μμ' : 'ΜΜ';
|
||||||
|
} else {
|
||||||
|
return isLower ? 'πμ' : 'ΠΜ';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isPM: function (input) {
|
||||||
|
return (input + '').toLowerCase()[0] === 'μ';
|
||||||
|
},
|
||||||
|
meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'h:mm A',
|
||||||
|
LTS: 'h:mm:ss A',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY h:mm A',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY h:mm A',
|
||||||
|
},
|
||||||
|
calendarEl: {
|
||||||
|
sameDay: '[Σήμερα {}] LT',
|
||||||
|
nextDay: '[Αύριο {}] LT',
|
||||||
|
nextWeek: 'dddd [{}] LT',
|
||||||
|
lastDay: '[Χθες {}] LT',
|
||||||
|
lastWeek: function () {
|
||||||
|
switch (this.day()) {
|
||||||
|
case 6:
|
||||||
|
return '[το προηγούμενο] dddd [{}] LT';
|
||||||
|
default:
|
||||||
|
return '[την προηγούμενη] dddd [{}] LT';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
calendar: function (key, mom) {
|
||||||
|
var output = this._calendarEl[key],
|
||||||
|
hours = mom && mom.hours();
|
||||||
|
if (isFunction(output)) {
|
||||||
|
output = output.apply(mom);
|
||||||
|
}
|
||||||
|
return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'σε %s',
|
||||||
|
past: '%s πριν',
|
||||||
|
s: 'λίγα δευτερόλεπτα',
|
||||||
|
ss: '%d δευτερόλεπτα',
|
||||||
|
m: 'ένα λεπτό',
|
||||||
|
mm: '%d λεπτά',
|
||||||
|
h: 'μία ώρα',
|
||||||
|
hh: '%d ώρες',
|
||||||
|
d: 'μία μέρα',
|
||||||
|
dd: '%d μέρες',
|
||||||
|
M: 'ένας μήνας',
|
||||||
|
MM: '%d μήνες',
|
||||||
|
y: 'ένας χρόνος',
|
||||||
|
yy: '%d χρόνια',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}η/,
|
||||||
|
ordinal: '%dη',
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4st is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
68
node_modules/moment/dist/locale/en-au.js
generated
vendored
Normal file
68
node_modules/moment/dist/locale/en-au.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (Australia) [en-au]
|
||||||
|
//! author : Jared Morse : https://github.com/jarcoal
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-au', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'h:mm A',
|
||||||
|
LTS: 'h:mm:ss A',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY h:mm A',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY h:mm A',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
64
node_modules/moment/dist/locale/en-ca.js
generated
vendored
Normal file
64
node_modules/moment/dist/locale/en-ca.js
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (Canada) [en-ca]
|
||||||
|
//! author : Jonathan Abourbih : https://github.com/jonbca
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-ca', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'h:mm A',
|
||||||
|
LTS: 'h:mm:ss A',
|
||||||
|
L: 'YYYY-MM-DD',
|
||||||
|
LL: 'MMMM D, YYYY',
|
||||||
|
LLL: 'MMMM D, YYYY h:mm A',
|
||||||
|
LLLL: 'dddd, MMMM D, YYYY h:mm A',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
});
|
68
node_modules/moment/dist/locale/en-gb.js
generated
vendored
Normal file
68
node_modules/moment/dist/locale/en-gb.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (United Kingdom) [en-gb]
|
||||||
|
//! author : Chris Gedrim : https://github.com/chrisgedrim
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-gb', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
68
node_modules/moment/dist/locale/en-ie.js
generated
vendored
Normal file
68
node_modules/moment/dist/locale/en-ie.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (Ireland) [en-ie]
|
||||||
|
//! author : Chris Cartlidge : https://github.com/chriscartlidge
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-ie', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
64
node_modules/moment/dist/locale/en-il.js
generated
vendored
Normal file
64
node_modules/moment/dist/locale/en-il.js
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (Israel) [en-il]
|
||||||
|
//! author : Chris Gedrim : https://github.com/chrisgedrim
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-il', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'HH:mm',
|
||||||
|
LTS: 'HH:mm:ss',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY HH:mm',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
});
|
68
node_modules/moment/dist/locale/en-in.js
generated
vendored
Normal file
68
node_modules/moment/dist/locale/en-in.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (India) [en-in]
|
||||||
|
//! author : Jatin Agrawal : https://github.com/jatinag22
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-in', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'h:mm A',
|
||||||
|
LTS: 'h:mm:ss A',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY h:mm A',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY h:mm A',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 0, // Sunday is the first day of the week.
|
||||||
|
doy: 6, // The week that contains Jan 1st is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
68
node_modules/moment/dist/locale/en-nz.js
generated
vendored
Normal file
68
node_modules/moment/dist/locale/en-nz.js
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
//! moment.js locale configuration
|
||||||
|
//! locale : English (New Zealand) [en-nz]
|
||||||
|
//! author : Luke McGregor : https://github.com/lukemcgregor
|
||||||
|
|
||||||
|
import moment from '../moment';
|
||||||
|
|
||||||
|
export default moment.defineLocale('en-nz', {
|
||||||
|
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
||||||
|
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
|
||||||
|
'_'
|
||||||
|
),
|
||||||
|
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
|
||||||
|
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
||||||
|
longDateFormat: {
|
||||||
|
LT: 'h:mm A',
|
||||||
|
LTS: 'h:mm:ss A',
|
||||||
|
L: 'DD/MM/YYYY',
|
||||||
|
LL: 'D MMMM YYYY',
|
||||||
|
LLL: 'D MMMM YYYY h:mm A',
|
||||||
|
LLLL: 'dddd, D MMMM YYYY h:mm A',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
sameDay: '[Today at] LT',
|
||||||
|
nextDay: '[Tomorrow at] LT',
|
||||||
|
nextWeek: 'dddd [at] LT',
|
||||||
|
lastDay: '[Yesterday at] LT',
|
||||||
|
lastWeek: '[Last] dddd [at] LT',
|
||||||
|
sameElse: 'L',
|
||||||
|
},
|
||||||
|
relativeTime: {
|
||||||
|
future: 'in %s',
|
||||||
|
past: '%s ago',
|
||||||
|
s: 'a few seconds',
|
||||||
|
ss: '%d seconds',
|
||||||
|
m: 'a minute',
|
||||||
|
mm: '%d minutes',
|
||||||
|
h: 'an hour',
|
||||||
|
hh: '%d hours',
|
||||||
|
d: 'a day',
|
||||||
|
dd: '%d days',
|
||||||
|
M: 'a month',
|
||||||
|
MM: '%d months',
|
||||||
|
y: 'a year',
|
||||||
|
yy: '%d years',
|
||||||
|
},
|
||||||
|
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
|
||||||
|
ordinal: function (number) {
|
||||||
|
var b = number % 10,
|
||||||
|
output =
|
||||||
|
~~((number % 100) / 10) === 1
|
||||||
|
? 'th'
|
||||||
|
: b === 1
|
||||||
|
? 'st'
|
||||||
|
: b === 2
|
||||||
|
? 'nd'
|
||||||
|
: b === 3
|
||||||
|
? 'rd'
|
||||||
|
: 'th';
|
||||||
|
return number + output;
|
||||||
|
},
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||||
|
},
|
||||||
|
});
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue