Compare commits
154 Commits
bac487e447
...
master
Author | SHA1 | Date | |
---|---|---|---|
ac751f5f28
|
|||
a1aecdf3e2
|
|||
a747ef0129
|
|||
80aa487e7e
|
|||
5048abc3e6
|
|||
afd34e9b4e
|
|||
a81ce8a922
|
|||
9d25befeba
|
|||
5d9f7e3997
|
|||
ecfae3e01a
|
|||
9e6c93ba95
|
|||
231dd959af
|
|||
5607425bde
|
|||
ac99d29109
|
|||
d4f0044656
|
|||
9d455bdcf7
|
|||
3b39ae0470
|
|||
9551f661c1
|
|||
c02b40071f
|
|||
a0dc0e01f3
|
|||
8876f07ac6
|
|||
2ac78ef539
|
|||
56cef79880
|
|||
aa5753cc82
|
|||
4dcb6b6ebe
|
|||
22946bc031
|
|||
e2ce420764
|
|||
7583883d64
|
|||
fb5bde70ef
|
|||
5e2a386b15
|
|||
75d052af88
|
|||
87cd634613
|
|||
48a34d5acf
|
|||
05ca3574b0
|
|||
739c2b79e9
|
|||
6e7ded098b
|
|||
64d4d326b7
|
|||
fdba9f1ae7
|
|||
27032f433a
|
|||
0c8a6c410d
|
|||
3f340d57fc
|
|||
995cc32578
|
|||
5f5b443df7
|
|||
e5366171fd
|
|||
1c650fbb64
|
|||
a784d44d16
|
|||
e27aa8969f
|
|||
433ad39a08
|
|||
e78324e92a
|
|||
5ceb315b6c
|
|||
58a4701ba3
|
|||
a1f677ff9b
|
|||
ebb6a4721a
|
|||
625dfeb79f
|
|||
427d4e2500
|
|||
bdf5121d71
|
|||
16e07e0a53
|
|||
d43dbe7c1c
|
|||
0e3aaafc2f
|
|||
0ed9aef8d0
|
|||
b7ac751b10
|
|||
400edc9b38
|
|||
a2a747c489
|
|||
5f87596b2f
|
|||
606899494c
|
|||
08761f991b
|
|||
275b2f83b7
|
|||
5c46e01a7f
|
|||
8312c5e54e
|
|||
bcf14cc604
|
|||
b8df8a8d4d
|
|||
e7bbacd59e
|
|||
a1c307df64
|
|||
54eab9cd4a
|
|||
51d047be86
|
|||
9fab41ae2a
|
|||
1c85d0b3cd
|
|||
e39547e77e
|
|||
10aae0a9f2
|
|||
e5c0eae622
|
|||
2120fc8c4d
|
|||
c5612ba108
|
|||
90e5ddee96
|
|||
7fa9bbca77
|
|||
0e325bfbca
|
|||
252fab0084
|
|||
b11660329b
|
|||
0ff04a5ecd
|
|||
a7df7a64f0
|
|||
90f3709f4b
|
|||
842e1994bd
|
|||
2a8eb7013d
|
|||
2c254b1a3e
|
|||
74215ba317
|
|||
f9b31ef296
|
|||
f50d0203e5
|
|||
7359f4c00d
|
|||
a83b61c264
|
|||
a6849c201a
|
|||
6fa1c5ca95
|
|||
2c44584c81
|
|||
374ea35e42
|
|||
2b13367970
|
|||
64454ddee7
|
|||
78d6383b15
|
|||
a29f28c11d
|
|||
b8e8f212d6
|
|||
b56dd305c1
|
|||
cf828164c3
|
|||
75d5f8c6c3
|
|||
3e42869bbb
|
|||
46b6cb678e
|
|||
58c5c57cc3
|
|||
f2ebea7de3
|
|||
0e88b9b198
|
|||
dabcb49292
|
|||
9577395516
|
|||
aff524675c
|
|||
39ee8f5a92
|
|||
ebe298f843
|
|||
eeee4a4c86
|
|||
ab5367f0b8
|
|||
0ba9dca86e
|
|||
01fd582880
|
|||
bb24f5bdbb
|
|||
73012a0ff9
|
|||
b1628ce7eb
|
|||
a059f3f13b
|
|||
6cf7a5e3d1
|
|||
938e1f8c96
|
|||
0908b601ce
|
|||
92541aee3a
|
|||
2d9eb8640b
|
|||
78bb0f72d5
|
|||
a14e1b20c0
|
|||
6241539cb3
|
|||
b87104c22d
|
|||
5b8a3b3714
|
|||
5f9d23e24a
|
|||
962f8eb6ad
|
|||
28a7b3a387
|
|||
5dbfc74c3b
|
|||
7f1dbd0f14
|
|||
76790b4ebf
|
|||
33d9e5ec06
|
|||
072d6a7e73
|
|||
4a414acf32
|
|||
027ab3ef0e
|
|||
3ff3ccb40e
|
|||
38f62e7df6
|
|||
425136323b
|
|||
513cc247cd
|
|||
bafa9dba26
|
|||
de53c3c882
|
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
### Project Specific
|
||||
# Files
|
||||
.env
|
||||
*.old
|
||||
|
||||
# Directories
|
||||
/node_modules
|
||||
/vendor
|
||||
|
||||
### Editor Specific
|
||||
# Files
|
||||
laravel-stubs.sublime-project
|
||||
laravel-stubs.sublime-workspace
|
||||
|
||||
# Directories
|
||||
/.idea
|
||||
/.vscode
|
||||
|
||||
### System Specific
|
||||
# Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Directories
|
||||
__MACOSX
|
60
colors.md
Normal file
60
colors.md
Normal file
@ -0,0 +1,60 @@
|
||||
Colors
|
||||
|
||||
### Sunbaked Mint
|
||||
HEX: #80e8d4
|
||||
RGB: 128, 232, 212
|
||||
CMYK: 43, 0, 25, 0
|
||||
|
||||
|
||||
### Honey Dijon
|
||||
HEX: #e2ae61
|
||||
RGB: 226, 174, 97
|
||||
CMYK: 1, 32, 72, 0
|
||||
|
||||
|
||||
### Ultimate Gray
|
||||
HEX: #97999b
|
||||
RGB: 151, 153, 155
|
||||
CMYK (approximation): 44, 35, 34, 1
|
||||
|
||||
|
||||
### Frosty Blue
|
||||
HEX: #bcddfc
|
||||
RGB: 188, 221, 252
|
||||
CMYK: 23, 5, 0, 0
|
||||
|
||||
|
||||
### Electric Tangerine
|
||||
HEX: #ff825c
|
||||
RGB: 255, 130, 92
|
||||
CMYK: 0, 61, 64, 0
|
||||
|
||||
|
||||
### Holo Lilac
|
||||
HEX: #c5d2fe
|
||||
RGB: 197, 210, 254
|
||||
CMYK: 22, 17, 0, 0
|
||||
|
||||
|
||||
### Poppy Sunset
|
||||
HEX: #ee645b
|
||||
RGB: 238, 100, 91
|
||||
CMYK: 2, 76, 62, 0
|
||||
|
||||
|
||||
### Lime Nouveau
|
||||
HEX: #cddf8b
|
||||
RGB: 205, 223, 139
|
||||
CMYK: 22, 1, 58, 5
|
||||
|
||||
|
||||
### Very Peri
|
||||
HEX: #6667ab
|
||||
RGB: 102, 103, 171
|
||||
CMYK (approximation): 40, 40, 0, 33
|
||||
|
||||
|
||||
### Classic Blue
|
||||
HEX: #0f4c81
|
||||
RGB: 15, 76, 129
|
||||
CMYK (approximation): 99, 76, 24, 8
|
@ -1,5 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
SHORT_HASH=$(git rev-parse --short HEAD)
|
||||
sed -i "/^GIT_HASH=\".*\"/ s//GIT_HASH=\"${SHORT_HASH}\"/" .env
|
||||
|
||||
DIRTY_STATE=$(git diff --stat)
|
||||
if [ -n "$DIRTY_STATE" ]; then
|
||||
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_DIRTY_STATE=true/" .env
|
||||
else
|
||||
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_DIRTY_STATE=false/" .env
|
||||
fi
|
||||
|
||||
GIT_TAG=$(git tag --points-at HEAD)
|
||||
if [ -n "$GIT_TAG" ]; then
|
||||
sed -i "/^GIT_TAG=\".*\"/ s//GIT_TAG=\"${GIT_TAG}\"/" .env
|
||||
|
@ -1,11 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
SHORT_HASH=$(git rev-parse --short HEAD)
|
||||
sed -i "/^GIT_HASH=\".*\"/ s//GIT_HASH=\"${SHORT_HASH}\"/" .env
|
||||
|
||||
DIRTY_STATE=$(git diff --stat)
|
||||
if [ -n "$DIRTY_STATE" ]; then
|
||||
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_DIRTY_STATE=true/" .env
|
||||
else
|
||||
sed -i "/^GIT_DIRTY_STATE=.*/ s//GIT_DIRTY_STATE=false/" .env
|
||||
fi
|
||||
|
||||
GIT_TAG=$(git tag --points-at HEAD)
|
||||
if [ -n "$GIT_TAG" ]; then
|
||||
sed -i "/^GIT_TAG=\".*\"/ s//GIT_TAG=\"${GIT_TAG}\"/" .env
|
||||
else
|
||||
sed -i "/^GIT_TAG=\".*\"/ s//GIT_TAG=\"\"/" .env
|
||||
fi
|
||||
|
||||
GIT_BRANCH=$(git branch --show-current)
|
||||
if [ -n "$GIT_BRANCH" ]; then
|
||||
sed -i "/^GIT_BRANCH=\".*\"/ s//GIT_BRANCH=\"${GIT_BRANCH}\"/" .env
|
||||
else
|
||||
sed -i "/^GIT_BRANCH=\".*\"/ s//GIT_BRANCH=\"\"/" .env
|
||||
fi
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
GIT_TAG=$(git tag --points-at HEAD)
|
||||
if [ -n "$GIT_TAG" ]; then
|
||||
sed -i "/^GIT_TAG=\".*\"/ s//GIT_TAG=\"${GIT_TAG}\"/" .env
|
||||
else
|
||||
sed -i "/^GIT_TAG=\".*\"/ s//GIT_TAG=\"\"/" .env
|
||||
fi
|
||||
|
||||
GIT_BRANCH=$(git branch --show-current)
|
||||
if [ -n "$GIT_BRANCH" ]; then
|
||||
sed -i "/^GIT_BRANCH=\".*\"/ s//GIT_BRANCH=\"${GIT_BRANCH}\"/" .env
|
||||
else
|
||||
sed -i "/^GIT_BRANCH=\".*\"/ s//GIT_BRANCH=\"\"/" .env
|
||||
fi
|
32
git-hooks/pre-commit
Normal file
32
git-hooks/pre-commit
Normal file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# get bash colors and styles here:
|
||||
# http://misc.flogisoft.com/bash/tip_colors_and_formatting
|
||||
C_RESET='\e[0m'
|
||||
C_RED='\e[31m'
|
||||
C_GREEN='\e[32m'
|
||||
C_YELLOW='\e[33m'
|
||||
|
||||
function __run() #(step, name, cmd)
|
||||
{
|
||||
local color output exitcode
|
||||
|
||||
printf "${C_YELLOW}[%s]${C_RESET} %-20s" "$1" "$2"
|
||||
output=$(eval "$3" 2>&1)
|
||||
exitcode=$?
|
||||
|
||||
if [[ 0 == $exitcode || 130 == $exitcode ]]; then
|
||||
echo -e "${C_GREEN}OK!${C_RESET}"
|
||||
else
|
||||
echo -e "${C_RED}NOK!${C_RESET}\n\n$output"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
modified="git diff --diff-filter=M --name-only --cached | grep \".php$\""
|
||||
ignore="resources/lang,resources/views,bootstrap/helpers,database/migrations,bin"
|
||||
phpcs="vendor/bin/phpcs --report=code --colors --report-width=80 --ignore=${ignore}"
|
||||
|
||||
__run "1/2" "php lint" "${modified} | xargs -r php -l"
|
||||
__run "2/2" "code sniffer" "${modified} | xargs -r ${phpcs}"
|
||||
# __run "3/3" "phpstan" "${modified} | xargs -r vendor/bin/phpstan analyse"
|
@ -4,12 +4,12 @@ APP_KEY=base64:hSCTwZ507IdKQ5QJHJ+mQw0DSMgDdAspasjwHCdiB8Y=
|
||||
APP_DEBUG=true
|
||||
APP_DOMAIN=localhost
|
||||
APP_URL="https://${APP_DOMAIN}"
|
||||
APP_UID_BYTES=8
|
||||
ADMIN_EMAIL=""
|
||||
|
||||
APP_JS_INTEGRITY_HASH=""
|
||||
GIT_HASH="00000000"
|
||||
GIT_TAG="x.x.x"
|
||||
GIT_BRANCH="master"
|
||||
GIT_DIRTY_STATE=false
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
@ -28,22 +28,43 @@ FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
#SESSION_STORE=redis
|
||||
#SESSION_DOMAIN="${APP_DOMAIN}"
|
||||
#SESSION_SECURE_COOKIE=true
|
||||
|
||||
MEMCACHED_HOST=memcached
|
||||
MEMCACHED_HOST=memcache
|
||||
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1125
|
||||
MAIL_HOST=mailpit
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="no-reply@${APP_DOMAIN}"
|
||||
MAIL_FROM_ADDRESS="hello@${APP_DOMAIN}"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
SCOUT_DRIVER=meilisearch
|
||||
SCOUT_PREFIX=
|
||||
SCOUT_QUEUE=false
|
||||
MEILISEARCH_HOST=http://localhost:7700
|
||||
MEILISEARCH_KEY=
|
||||
MEILISEARCH_PRIVATE_KEY=
|
||||
MEILISEARCH_PUBLIC_KEY=
|
||||
|
||||
GOOGLE_GEOCODE_API_KEY=
|
||||
|
||||
MINIO_USERNAME=
|
||||
MINIO_PASSWORD=
|
||||
MINIO_DEFAULT_REGION=us-west-1
|
||||
MINIO_BUCKET=
|
||||
MINIO_URL=
|
||||
MINIO_ENDPOINT=
|
||||
MINIO_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
@ -53,7 +74,42 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_HOST=
|
||||
PUSHER_PORT=443
|
||||
PUSHER_SCHEME=https
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
VITE_SSL_KEY_FILE_PATH="/code/docker/configs/nginx/ssls/${APP_DOMAIN}/${APP_DOMAIN}.key"
|
||||
VITE_SSL_CERT_FILE_PATH="/code/docker/configs/nginx/ssls/${APP_DOMAIN}/${APP_DOMAIN}.crt"
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
MIX_PUSHER_HOST="${PUSHER_HOST}"
|
||||
MIX_PUSHER_PORT="${PUSHER_PORT}"
|
||||
MIX_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||
|
||||
INTEGRITY_HASH_HUMANS_TXT=""
|
||||
INTEGRITY_HASH_ROBOTS_TXT=""
|
||||
INTEGRITY_HASH_COPYRIGHT_HTML=""
|
||||
INTEGRITY_HASH_COPYRIGHT_MD=""
|
||||
INTEGRITY_HASH_RSS_FEED=""
|
||||
INTEGRITY_HASH_ATOM_FEED=""
|
||||
INTEGRITY_HASH_FAVICON_ICO=""
|
||||
INTEGRITY_HASH_FAVICON_PNG=""
|
||||
INTEGRITY_HASH_FAVICON_SVG=""
|
||||
INTEGRITY_HASH_NUNITO_REGULAR_WOFF2_FONT=""
|
||||
INTEGRITY_HASH_POIRETONE_REGULAR_WOFF2_FONT=""
|
||||
INTEGRITY_HASH_WEBMANIFEST_JSON=""
|
||||
INTEGRITY_HASH_MIX_MANIFEST_JSON=""
|
||||
INTEGRITY_HASH_APP_CSS=""
|
||||
INTEGRITY_HASH_APP_JS=""
|
||||
|
||||
## Clockwork debug helpers
|
||||
## default values are set, except for the main enable switch
|
||||
CLOCKWORK_ENABLE=true
|
||||
CLOCKWORK_WEB=true
|
||||
CLOCKWORK_AUTHENTICATION=false
|
||||
#CLOCKWORK_AUTHENTICATION_PASSWORD=VerySecretPassword
|
||||
CLOCKWORK_CACHE_COLLECT_VALUES=true
|
||||
#CLOCKWORK_DATABASE_SLOW_THRESHOLD= # time in miliseconds
|
||||
#CLOCKWORK_REQUESTS_SLOW_THRESHOLD= # time in miliseconds
|
||||
|
36
src/.phpcs.xml
Normal file
36
src/.phpcs.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PSR2" xsi:noNamespaceSchemaLocation="vendor/slevomat/coding-standard">
|
||||
<description>PHP Codesniffer ruleset for this project</description>
|
||||
|
||||
<arg name="basepath" value="."/>
|
||||
<arg name="parallel" value="4"/>
|
||||
<arg name="report" value="full"/>
|
||||
<arg name="extensions" value="php"/>
|
||||
<arg name="colors"/>
|
||||
<arg name="no-cache"/>
|
||||
<arg value="nps"/>
|
||||
|
||||
<ini name="memory_limit" value="64M"/>
|
||||
|
||||
<autoload>./vendor/autoload.php</autoload>
|
||||
|
||||
<file>./app/Models</file>
|
||||
<file>./config</file>
|
||||
<file>./database</file>
|
||||
<file>./helpers</file>
|
||||
<file>./lang</file>
|
||||
<file>./resources/views</file>
|
||||
<file>./routes</file>
|
||||
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
|
||||
<!-- Don't hide tokenizer exceptions -->
|
||||
<rule ref="Internal.Tokenizer.Exception">
|
||||
<type>error</type>
|
||||
</rule>
|
||||
|
||||
<!-- Include all sniffs in the PSR-2 standard -->
|
||||
<rule ref="PSR2">
|
||||
<exclude name="Generic.Files.LineLength.TooLong"/>
|
||||
</rule>
|
||||
</ruleset>
|
6
src/.well-known/security.txt
Normal file
6
src/.well-known/security.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Contact: mailto:person@domain.com
|
||||
Contact: https://twitter.com/person
|
||||
Expires: 2024-09-14T14:00:00.000Z
|
||||
Encryption: https://keybase.io/person
|
||||
Encryption: https://domain.com/pgp-key.txt
|
||||
Preferred-Languages: en
|
26
src/CHANGELOG.md
Normal file
26
src/CHANGELOG.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
-
|
||||
|
||||
### Changed
|
||||
-
|
||||
|
||||
### Removed
|
||||
-
|
||||
|
||||
|
||||
## [1.0.0] - 20XX-01-01
|
||||
### Added
|
||||
-
|
||||
|
||||
### Changed
|
||||
-
|
||||
|
||||
### Removed
|
||||
-
|
30
src/SECURITY.md
Normal file
30
src/SECURITY.md
Normal file
@ -0,0 +1,30 @@
|
||||
<!-- AUTO-GENERATED, DO NOT EDIT! -->
|
||||
<!-- Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/SECURITY.md -->
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Security Policy](#security-policy)
|
||||
- [Supported Versions](#supported-versions)
|
||||
- [Reporting a Vulnerability](#reporting-a-vulnerability)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
We release patches for security vulnerabilities. Which versions are eligible for
|
||||
receiving such patches depends on the CVSS v3.0 Rating:
|
||||
|
||||
| CVSS v3.0 | Supported Versions |
|
||||
| --------- | ----------------------------------------- |
|
||||
| 9.0-10.0 | Releases within the previous three months |
|
||||
| 4.0-8.9 | Most recent release |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report (suspected) security vulnerabilities to
|
||||
**[security@ory.sh](mailto:security@ory.sh)**. You will receive a response from
|
||||
us within 48 hours. If the issue is confirmed, we will release a patch as soon
|
||||
as possible depending on complexity but historically within a few days.
|
28
src/app/Actions/Chained/GenerateProfilePhoto.php
Normal file
28
src/app/Actions/Chained/GenerateProfilePhoto.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Chained;
|
||||
|
||||
use App\Models\User;
|
||||
use Closure;
|
||||
|
||||
class GenerateProfilePhoto
|
||||
{
|
||||
/**
|
||||
* Generates a profile photo for a user and saves it
|
||||
* to disk.
|
||||
*
|
||||
* @package App\Actions\Chained\GenerateProfilePhoto
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
public function __invoke(User $user, Closure $next): User
|
||||
{
|
||||
//
|
||||
|
||||
return $next($user);
|
||||
}
|
||||
}
|
62
src/app/Console/Commands/CreateUser.php
Normal file
62
src/app/Console/Commands/CreateUser.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class CreateUser extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'user:create {--e|email= : The email address of the user}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Create a new user';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$email = trim($this->option('email'));
|
||||
|
||||
$name = $this->ask("Please provide a name");
|
||||
$surname = $this->ask("Please provide a surname");
|
||||
|
||||
if (empty($email)) {
|
||||
$email = $this->ask("Please provide an email address");
|
||||
}
|
||||
|
||||
if (empty($password)) {
|
||||
// TODO: have a way to hide the input and do a confirm password input
|
||||
$password = $this->secret("Please provide a password");
|
||||
}
|
||||
|
||||
try {
|
||||
User::create([
|
||||
'name' => trim($name),
|
||||
'surname' => trim($surname),
|
||||
'email' => trim($email),
|
||||
'password' => Hash::make(trim($password)),
|
||||
]);
|
||||
|
||||
$this->info("$email created successfully.");
|
||||
return Command::SUCCESS;
|
||||
} catch (\Exception $e) {
|
||||
$this->error('Unable to create your user.');
|
||||
$this->line($e->getMessage());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -37,7 +37,7 @@ class ResetPassword extends Command
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): int
|
||||
{
|
||||
$id = $this->option('id');
|
||||
$email = $this->option('email');
|
||||
@ -52,7 +52,7 @@ class ResetPassword extends Command
|
||||
$column = 'email';
|
||||
$value = $email;
|
||||
} else {
|
||||
$column = strtolower($this->choice('What column would you like to search by?', ['ID', 'Email']));
|
||||
$column = strtolower($this->choice('What database column would you like to search by?', ['ID', 'Email']));
|
||||
$value = $this->ask("Please provide an $column to search for");
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ class ResetPassword extends Command
|
||||
try {
|
||||
$user->update(['password' => Hash::make($password)]);
|
||||
$this->info("User {$user->id} ({$user->email}) password update successful!");
|
||||
return 0;
|
||||
return Command::SUCCESS;
|
||||
} catch (\Exception $e) {
|
||||
$this->error('Unable to set the password!');
|
||||
$this->line($e->getMessage());
|
||||
|
83
src/app/Console/Commands/TranslationCheckerCommand.php
Normal file
83
src/app/Console/Commands/TranslationCheckerCommand.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class TranslationCheckerCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'i18n:check-json {--l|locale= : The source of truth locale}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Uses one JSON file as the source of truth to check other lang files against.';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$masterLocale = 'en';
|
||||
if (!empty($this->option('locale'))) {
|
||||
$masterLocale = trim($this->option('locale'));
|
||||
}
|
||||
|
||||
$langDir = base_path('lang');
|
||||
$langFiles = scandir($langDir);
|
||||
$bigCount = count($langFiles);
|
||||
for ($i = 0; $i < $bigCount; $i++) {
|
||||
if (! preg_match('/.*\.json$/', $langFiles[$i]) || "{$masterLocale}.json" === $langFiles[$i]) {
|
||||
unset($langFiles[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
$langFilesCount = count($langFiles);
|
||||
$this->info("Checking {$langFilesCount} file(s) against {$masterLocale}...");
|
||||
|
||||
$masterLocaleTranslations = translations(base_path("lang/{$masterLocale}.json"));
|
||||
|
||||
foreach ($langFiles as $localeFile) {
|
||||
$otherLocaleTranslations = translations(base_path("lang/{$localeFile}"));
|
||||
$counts = 0;
|
||||
$mergedTranslations = $this->recursiveMergeArray($masterLocaleTranslations, $otherLocaleTranslations, $counts);
|
||||
file_put_contents(base_path("lang/{$localeFile}"), json_encode($mergedTranslations, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT));
|
||||
$this->info("{$localeFile} had {$counts} missing translations.");
|
||||
}
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
public function recursiveMergeArray(array $firstArray, array $secondArray, int &$counts)
|
||||
{
|
||||
$mergedArray = $secondArray;
|
||||
foreach ($firstArray as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
if (!array_key_exists($key, $secondArray)) {
|
||||
$mergedArray[$key] = $value;
|
||||
} else {
|
||||
$subDiff = $this->recursiveMergeArray($value, $secondArray[$key], $counts);
|
||||
if (!empty($subDiff)) {
|
||||
$mergedArray[$key] = $subDiff;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!array_key_exists($key, $secondArray)) {
|
||||
$counts++;
|
||||
$mergedArray[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $mergedArray;
|
||||
}
|
||||
}
|
32
src/app/Http/Controllers/Dashboard/UserProfileController.php
Normal file
32
src/app/Http/Controllers/Dashboard/UserProfileController.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Response;
|
||||
use Laravel\Fortify\Features;
|
||||
use Laravel\Jetstream\Http\Controllers\Inertia\UserProfileController as JetstreamUserProfileController;
|
||||
use Laravel\Jetstream\Jetstream;
|
||||
|
||||
class UserProfileController extends JetstreamUserProfileController
|
||||
{
|
||||
/**
|
||||
* Show the general profile settings screen.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return \Inertia\Response
|
||||
*/
|
||||
public function show(Request $request): Response
|
||||
{
|
||||
$this->validateTwoFactorAuthenticationState($request);
|
||||
|
||||
return Jetstream::inertia()->render($request, 'Profile/Show', [
|
||||
'confirmsTwoFactorAuthentication' => Features::optionEnabled(Features::twoFactorAuthentication(), 'confirm'),
|
||||
'sessions' => $this->sessions($request)->all(),
|
||||
'timezones' => timezone_identifiers_list(),
|
||||
]);
|
||||
}
|
||||
}
|
33
src/app/Http/Kernel.php
Normal file
33
src/app/Http/Kernel.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
//...
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array<string, array<int, class-string|string>>
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
//...
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\App\Http\Middleware\SetLocale::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
//...
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
//...
|
||||
\Laravel\Jetstream\Http\Middleware\ShareInertiaData::class,
|
||||
\App\Http\Middleware\SetLocale::class,
|
||||
\App\Http\Middleware\AuthorizeAdmin::class,
|
||||
//...
|
||||
],
|
||||
];
|
||||
}
|
@ -5,22 +5,20 @@ namespace App\Http\Middleware;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CheckCustomSessionData
|
||||
class AuthorizeAdmin
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
*
|
||||
* @return mixed
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if ((! session()->has('timezone_name') || empty(session('timezone_name'))) && $request->user()) {
|
||||
session()->put('timezone_name', $request->user()->timezone_name);
|
||||
if ($request->user()->email !== env('ADMIN_EMAIL')) {
|
||||
abort(HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
return $next($request);
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Models\Language;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Middleware;
|
||||
|
||||
@ -41,19 +42,58 @@ class HandleInertiaRequests extends Middleware
|
||||
*/
|
||||
public function share(Request $request): array
|
||||
{
|
||||
$localeFields = ['locale_name', 'iso_code', 'name', 'localized_name'];
|
||||
$currentLocale = $request->session()->get('locale', null);
|
||||
if (is_null($currentLocale)) {
|
||||
$currentLocale = Language::where(['locale_name' => 'en', 'iso_code' => 'en_US'])->get($localeFields)[0]->toArray();
|
||||
$request->session()->put('locale', [
|
||||
'locale_name' => $currentLocale['locale_name'],
|
||||
'iso_code' => $currentLocale['iso_code'],
|
||||
'name' => $currentLocale['name'],
|
||||
'localized_name' => $currentLocale['localized_name'],
|
||||
]);
|
||||
}
|
||||
$localeFilePath = base_path("lang/{$currentLocale['locale_name']}.json");
|
||||
|
||||
$notifications = [];
|
||||
$notificationsCount = count($notifications);
|
||||
$unreadNotifications = false;
|
||||
if (! is_null($request->user())) {
|
||||
$notifications = $request->user()->notifications;
|
||||
$notificationsCount = count($notifications);
|
||||
for ($i = 0; $i < $notificationsCount; $i++) {
|
||||
$newData = $notifications[$i]->data;
|
||||
$createdAt = carbon($notifications[$i]->created_at);
|
||||
$dateFormat = 'F j';
|
||||
if (!$createdAt->is(gmdate('Y'))) {
|
||||
$dateFormat = 'F j, Y';
|
||||
}
|
||||
$newData['created_at_date'] = $createdAt->copy()->format($dateFormat);
|
||||
$newData['created_at_time'] = $createdAt->copy()->format('H:i');
|
||||
$notifications[$i]->data = $newData;
|
||||
}
|
||||
if (count($request->user()->unreadNotifications) > 0) {
|
||||
$unreadNotifications = true;
|
||||
}
|
||||
}
|
||||
|
||||
return array_merge(parent::share($request), [
|
||||
'app_name' => config('app.name'),
|
||||
$additionalData = [
|
||||
'appName' => config('app.name'),
|
||||
|
||||
'availableLocales' => Language::get($localeFields),
|
||||
'currentLocale' => $currentLocale,
|
||||
'language' => translations($localeFilePath),
|
||||
|
||||
'notifications' => $notifications,
|
||||
'unreadNotifications' => $unreadNotifications,
|
||||
]);
|
||||
];
|
||||
|
||||
if (! is_null($request->user())) {
|
||||
if ($request->user()->email === env('ADMIN_EMAIL')) {
|
||||
$additionalData['is_admin_user'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
return array_merge(parent::share($request), $additionalData);
|
||||
}
|
||||
}
|
||||
|
29
src/app/Http/Middleware/SetLocale.php
Normal file
29
src/app/Http/Middleware/SetLocale.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SetLocale
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @package App\Http\Middleware\SetLocale
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
*
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (session()->has('locale')) {
|
||||
app()->setLocale(session('locale')['locale']);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
49
src/app/Listeners/SuccessfulLogin.php
Normal file
49
src/app/Listeners/SuccessfulLogin.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use Illuminate\Auth\Events\Login;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
class SuccessfulLogin
|
||||
{
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \Illuminate\Auth\Events\Login $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Login $event): void
|
||||
{
|
||||
Session::put('timezone_name', $event->user->timezone_name);
|
||||
|
||||
// TODO: this may need to be reworked so that the language is stored
|
||||
// in a cookie and attempted to be retrieved from there
|
||||
// first before pulling from the database.
|
||||
Session::put('language', $event->user->language->locale);
|
||||
|
||||
// Optionally log the info
|
||||
/*
|
||||
$loginPayload = [
|
||||
'ip_address' => request()->ip(),
|
||||
'email' => request()->input('email'),
|
||||
'happened_at' => gmdate('Y-m-d H:i:s P'),
|
||||
];
|
||||
|
||||
// ...store that payload somewhere.
|
||||
*/
|
||||
}
|
||||
}
|
32
src/app/Listeners/SuccessfulLogout.php
Normal file
32
src/app/Listeners/SuccessfulLogout.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use Illuminate\Auth\Events\Logout;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
class SuccessfulLogout
|
||||
{
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \Illuminate\Auth\Events\Logout $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Logout $event)
|
||||
{
|
||||
Session::forget('timezone_name');
|
||||
}
|
||||
}
|
@ -3,7 +3,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Traits\FormattedAddressTrait;
|
||||
use App\Models\Traits\HasUidTrait;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@ -14,18 +13,11 @@ class Address extends Model
|
||||
{
|
||||
use FormattedAddressTrait;
|
||||
use HasFactory;
|
||||
use HasUidTrait;
|
||||
use Prunable;
|
||||
|
||||
/** @var string */
|
||||
protected $table = 'addresses';
|
||||
|
||||
/** @var string */
|
||||
protected $keyType = 'string';
|
||||
|
||||
/** @var bool */
|
||||
public $incrementing = false;
|
||||
|
||||
/** @var array */
|
||||
protected $fillable = [
|
||||
'addressable_type',
|
||||
|
51
src/app/Models/Casts/MoneyCastable.php
Normal file
51
src/app/Models/Casts/MoneyCastable.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Casts;
|
||||
|
||||
use Brick\Money\Money;
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MoneyCastable implements CastsAttributes
|
||||
{
|
||||
/**
|
||||
* Get the value from the database and modify it to casted type
|
||||
* before returning.
|
||||
*
|
||||
* @package App\Models\Casts\MoneyCastable
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model The Model that is being used
|
||||
* @param string $key The attribute key
|
||||
* @param mixed $value The value stored in the database
|
||||
* @param array $attributes The array of model attributes
|
||||
*
|
||||
* @return \Brick\Money\Money
|
||||
*/
|
||||
public function get(Model $model, string $key, $value, array $attributes): Money
|
||||
{
|
||||
return Money::ofMinor($attributes['amount'], $attributes['currency']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the data .
|
||||
*
|
||||
* @package App\Models\Casts\MoneyCastable
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model The Model that is being used
|
||||
* @param string $key The attribute key
|
||||
* @param mixed $value The value stored in the database
|
||||
* @param array $attributes The array of model attributes
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function set(Model $model, string $key, $value, array $attributes)
|
||||
{
|
||||
if (! $value instanceof Money) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
return $value->getMinorAmount()->toInt();
|
||||
}
|
||||
}
|
117
src/app/Models/Language.php
Normal file
117
src/app/Models/Language.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Prunable;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Language extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Prunable;
|
||||
use SoftDeletes;
|
||||
|
||||
/** @var string */
|
||||
protected $table = 'languages';
|
||||
|
||||
/** @var array<int,string> */
|
||||
protected $fillable = [
|
||||
'locale_name',
|
||||
'iso_code',
|
||||
'name',
|
||||
'localized_name',
|
||||
];
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Constants
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom/Private Methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the prunable model query.
|
||||
*
|
||||
* @package App\Models\Language
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function prunable(): Builder
|
||||
{
|
||||
//return static::where('deleted_at', '<=', now()->subMonth());
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the model for pruning.
|
||||
*
|
||||
* @package App\Models\Language
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function pruning(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Accessors
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Mutators
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Scopes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Relationships
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
* User relationship.
|
||||
*
|
||||
* @package App\Models\Language
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function users(): HasMany
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
}
|
23
src/app/Models/Scopes/OnTeamScope.php
Normal file
23
src/app/Models/Scopes/OnTeamScope.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Scopes;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Scope;
|
||||
|
||||
class OnTeamScope implements Scope
|
||||
{
|
||||
/**
|
||||
* Apply the scope to a given Eloquent query builder.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function apply(Builder $builder, Model $model): void
|
||||
{
|
||||
$builder->where('current_team_id', );
|
||||
}
|
||||
}
|
@ -2,54 +2,50 @@
|
||||
|
||||
namespace App\Models\Traits;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
|
||||
trait FormattedPhoneTrait
|
||||
{
|
||||
/**
|
||||
* Format a phone number to be human readable.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPhoneNumberAttribute(): string
|
||||
{
|
||||
$phoneLength = strlen($this->phone);
|
||||
$phoneNumber = preg_replace('//', '', $this->phone);
|
||||
|
||||
if ($phoneLength > 10) {
|
||||
$countryCode = substr($phoneNumber, 0, $phoneLength - 10);
|
||||
$areaCode = substr($phoneNumber, -10, 3);
|
||||
$nextThree = substr($phoneNumber, -7, 3);
|
||||
$lastFour = substr($phoneNumber, -4, 4);
|
||||
|
||||
$phoneNumber = "({$areaCode}) {$nextThree}-{$lastFour}";
|
||||
} elseif ($phoneLength == 10) {
|
||||
$areaCode = substr($phoneNumber, 0, 3);
|
||||
$nextThree = substr($phoneNumber, 3, 3);
|
||||
$lastFour = substr($phoneNumber, 6, 4);
|
||||
|
||||
$phoneNumber = "({$areaCode}) {$nextThree}-{$lastFour}";
|
||||
} elseif ($phoneLength == 7) {
|
||||
$nextThree = substr($phoneNumber, 0, 3);
|
||||
$lastFour = substr($phoneNumber, 3, 4);
|
||||
|
||||
$phoneNumber = "{$nextThree}-{$lastFour}";
|
||||
}
|
||||
|
||||
return $phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all non-numeric characters from the phone number.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param string $value
|
||||
* @package Namespace\App\Contact
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPhoneNumberAttribute($value): void
|
||||
protected function phoneNumber(): Attribute
|
||||
{
|
||||
$this->attributes['phone'] = preg_replace('/[^0-9]/', '', $value);
|
||||
return Attribute::make(
|
||||
get: function (mixed $value, array $attributes) {
|
||||
$phoneLength = strlen($attributes['phone_number']);
|
||||
$phoneNumber = preg_replace('/[^0-9]/', '', $attributes['phone_number']);
|
||||
|
||||
if ($phoneLength > 10) {
|
||||
$countryCode = substr($phoneNumber, 0, $phoneLength - 10);
|
||||
$areaCode = substr($phoneNumber, -10, 3);
|
||||
$nextThree = substr($phoneNumber, -7, 3);
|
||||
$lastFour = substr($phoneNumber, -4, 4);
|
||||
|
||||
$phoneNumber = "({$areaCode}) {$nextThree}-{$lastFour}";
|
||||
} elseif ($phoneLength == 10) {
|
||||
$areaCode = substr($phoneNumber, 0, 3);
|
||||
$nextThree = substr($phoneNumber, 3, 3);
|
||||
$lastFour = substr($phoneNumber, 6, 4);
|
||||
|
||||
$phoneNumber = "({$areaCode}) {$nextThree}-{$lastFour}";
|
||||
} elseif ($phoneLength == 7) {
|
||||
$nextThree = substr($phoneNumber, 0, 3);
|
||||
$lastFour = substr($phoneNumber, 3, 4);
|
||||
|
||||
$phoneNumber = "{$nextThree}-{$lastFour}";
|
||||
}
|
||||
|
||||
return $phoneNumber;
|
||||
},
|
||||
set: function (mixed $value) {
|
||||
return preg_replace('/[^0-9]/', '', $value);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
88
src/app/Models/Traits/HasProfilePhoto.php
Normal file
88
src/app/Models/Traits/HasProfilePhoto.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace Laravel\Jetstream;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
trait HasProfilePhoto
|
||||
{
|
||||
/**
|
||||
* Update the user's profile photo.
|
||||
*
|
||||
* @param \Illuminate\Http\UploadedFile $photo
|
||||
* @param string $storagePath
|
||||
* @return void
|
||||
*/
|
||||
public function updateProfilePhoto(UploadedFile $photo, $storagePath = 'profile-photos')
|
||||
{
|
||||
tap($this->profile_photo_path, function ($previous) use ($photo, $storagePath) {
|
||||
$this->forceFill([
|
||||
'profile_photo_path' => $photo->storePublicly(
|
||||
$storagePath, ['disk' => $this->profilePhotoDisk()]
|
||||
),
|
||||
])->save();
|
||||
|
||||
if ($previous) {
|
||||
Storage::disk($this->profilePhotoDisk())->delete($previous);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the user's profile photo.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function deleteProfilePhoto()
|
||||
{
|
||||
if (! Features::managesProfilePhotos()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_null($this->profile_photo_path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Storage::disk($this->profilePhotoDisk())->delete($this->profile_photo_path);
|
||||
|
||||
$this->forceFill([
|
||||
'profile_photo_path' => null,
|
||||
])->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the URL to the user's profile photo.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Casts\Attribute
|
||||
*/
|
||||
public function profilePhotoUrl(): Attribute
|
||||
{
|
||||
return Attribute::get(function () {
|
||||
return $this->profile_photo_path
|
||||
? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)
|
||||
: $this->defaultProfilePhotoUrl();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default profile photo URL if no profile photo has been uploaded.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function defaultProfilePhotoUrl()
|
||||
{
|
||||
return 'https://avatars.test/avatar?size=256';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the disk that profile photos should be stored on.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function profilePhotoDisk()
|
||||
{
|
||||
return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : config('jetstream.profile_photo_disk', 'public');
|
||||
}
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Traits\HasUidTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Prunable;
|
||||
@ -20,7 +19,6 @@ class User extends Authenticatable
|
||||
use HasFactory;
|
||||
use HasProfilePhoto;
|
||||
use HasTeams;
|
||||
use HasUidTrait;
|
||||
use Notifiable;
|
||||
use Prunable;
|
||||
use TwoFactorAuthenticatable;
|
||||
@ -39,6 +37,7 @@ class User extends Authenticatable
|
||||
'name',
|
||||
'surname',
|
||||
'timezone_name',
|
||||
'language_id',
|
||||
'current_team_id',
|
||||
'profile_photo_path',
|
||||
'email',
|
||||
@ -64,7 +63,7 @@ class User extends Authenticatable
|
||||
/** @var array */
|
||||
protected $appends = [
|
||||
'full_name',
|
||||
'name_full',
|
||||
'surname_full',
|
||||
'profile_photo_url',
|
||||
];
|
||||
|
||||
@ -142,7 +141,7 @@ class User extends Authenticatable
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Casts\Attribute
|
||||
*/
|
||||
public function fullNameReversed(): Attribute
|
||||
public function surnameFull(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn ($value, $attributes) => "{$attributes['surname']}, {$attributes['name']}",
|
||||
@ -185,4 +184,17 @@ class User extends Authenticatable
|
||||
{
|
||||
return $this->morphOne(Address::class, 'addressable');
|
||||
}
|
||||
|
||||
/**
|
||||
* Language relationship.
|
||||
*
|
||||
* @package App\Models\User
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function language(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Language::class);
|
||||
}
|
||||
}
|
||||
|
125
src/app/Observers/UserObserver.php
Normal file
125
src/app/Observers/UserObserver.php
Normal file
@ -0,0 +1,125 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class UserObserver
|
||||
{
|
||||
/**
|
||||
* Handle events after all transactions are committed.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $afterCommit = true;
|
||||
|
||||
/**
|
||||
* Handle the User "retrieve" event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function retrieved(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "saving" event.
|
||||
* This may apply as either a create
|
||||
* or an update event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function saving(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "created" event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function created(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "updated" event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function updated(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "deleted" event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function deleted(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "restored" event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function restored(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "forceDeleted" event.
|
||||
*
|
||||
* @package App\Observers\UserObserver
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function forceDeleted(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
Model::preventSilentlyDiscardingAttributes($this->app->isLocal());
|
||||
}
|
||||
|
||||
/**
|
||||
|
31
src/app/Providers/AuthServiceProvider.php
Normal file
31
src/app/Providers/AuthServiceProvider.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\PersonalAccessToken;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
//...
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
Sanctum::usePersonalAccessTokenModel(PersonalAccessToken::class);
|
||||
}
|
||||
}
|
76
src/app/Providers/CarbonServiceProvider.php
Normal file
76
src/app/Providers/CarbonServiceProvider.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class CarbonServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Carbon::macro('getHumanInterval', function ($other) {
|
||||
$isNow = $other === null;
|
||||
|
||||
if ($isNow) {
|
||||
$other = static::now($this->tz);
|
||||
}
|
||||
|
||||
$diffInMinutes = $this->diffInMinutes($other);
|
||||
|
||||
$minutes = $diffInMinutes % 60;
|
||||
|
||||
$diffInHours = $diffInMinutes / 60;
|
||||
$hours = $diffInHours % 60;
|
||||
|
||||
$diffInDays = $diffInHours / 24;
|
||||
$days = $diffInDays % 24;
|
||||
|
||||
$diffInWeeks = $diffInDays / 24;
|
||||
$weeks = $diffInWeeks % 24;
|
||||
|
||||
$diffInMonths = $diffInWeeks / 7;
|
||||
$months = $diffInMonths % 7;
|
||||
|
||||
$diffInYears = $diffInMonths / 12;
|
||||
$years = $diffInYears % 12;
|
||||
|
||||
$outputArray = [];
|
||||
if ($years > 0) {
|
||||
$outputArray['years'] = "$years years";
|
||||
}
|
||||
if ($months > 0) {
|
||||
$outputArray['months'] = "$months months";
|
||||
}
|
||||
if ($weeks > 0 && $days === 0) {
|
||||
$outputArray['weeks'] = "$weeks weeks";
|
||||
}
|
||||
if ($days > 0) {
|
||||
$outputArray['days'] = "$days days";
|
||||
}
|
||||
if ($hours > 0) {
|
||||
$outputArray['hours'] = "$hours hours";
|
||||
}
|
||||
if ($minutes > 0) {
|
||||
$outputArray['minutes'] = "$minutes minutes";
|
||||
}
|
||||
|
||||
return implode(', ', $outputArray);
|
||||
});
|
||||
}
|
||||
}
|
52
src/app/Providers/EventServiceProvider.php
Normal file
52
src/app/Providers/EventServiceProvider.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Listeners\SuccessfulLogin;
|
||||
//use App\Listeners\SuccessfulLogout;
|
||||
use Illuminate\Auth\Events\Login;
|
||||
//use Illuminate\Auth\Events\Logout;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event to listener mappings for the application.
|
||||
*
|
||||
* @var array<class-string, array<int, class-string>>
|
||||
*/
|
||||
protected $listen = [
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
Login::class => [
|
||||
SuccessfulLogin::class,
|
||||
],
|
||||
/*Logout::class => [
|
||||
SuccessfulLogout::class,
|
||||
],*/
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if events and listeners should be automatically discovered.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function shouldDiscoverEvents()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,4 +1,94 @@
|
||||
{
|
||||
//...
|
||||
"require": {
|
||||
//..
|
||||
|
||||
// Laravel provided stuff
|
||||
"laravel/cashier": "", // fluent interface to Stripe
|
||||
"laravel/horizon": "", // dashboard and configuration for Laravel queues
|
||||
"laravel/telescope": "", // debugging tool from Laravel for Laravel
|
||||
|
||||
"laravel/scout": "", // full-text search to Eloquent models
|
||||
"meilisearch/meilisearch-php": "", // use Meilisearch for Scout funtionality
|
||||
"http-interop/http-factory-guzzle": "", // use Meilisearch for Scout funtionality
|
||||
"dwarfdk/laravel-meilitools": "", // additional tools for Meilisearch (https://github.com/dwarfhq/laravel-meilitools)
|
||||
|
||||
// Roles / Permissions
|
||||
"spatie/laravel-permission": "",
|
||||
"zizaco/entrust": "",
|
||||
|
||||
// Security stuff
|
||||
"abuseipdb/laravel": "", // API to check an IP for abusive behavior with option to report IP for abusive behavior
|
||||
|
||||
// Options/Flags
|
||||
"spatie/laravel-model-flags": "", // add a simple true/false flag to any model
|
||||
|
||||
// SDKs
|
||||
"aws/aws-sdk-php-laravel": "", // interact with S3 or S3-compatible storage
|
||||
"propaganistas/laravel-phone": "", // uses Google's libphonenumber API to (try to) sanely handle phone numbers
|
||||
"vladimir-yuldashev/laravel-queue-rabbitmq": "", // Interface with RabbitMQ servers
|
||||
"grimzy/laravel-mysql-spatial": "", // Adds Geo-spatial column support for MySQL (WARNING: only works with Laravel v8 or lower)
|
||||
"matanyadaev/laravel-eloquent-spatial": "", // Adds Geo-spatial column support for MySQL
|
||||
"irazasyed/telegram-bot-sdk": "", // unofficial Telegram Bot API/SDK
|
||||
"torann/geoip": "", // support for multiple GeoIP services
|
||||
"coderjerk/nasa-php": "", // NASA API integrations
|
||||
|
||||
// File management
|
||||
"czim/laravel-paperclip": "", // attach files to an Eloquent model
|
||||
|
||||
// Media (image/video/audio) Management
|
||||
"intervention/image": "", // image manipulation
|
||||
"intervention/imagecache": "", // caching for intervention/image
|
||||
"spatie/laravel-medialibrary": "", // manage a small or large amount of media smartly
|
||||
"spatie/laravel-image-optimizer": "", // optimize png, jpg, svg, and gif
|
||||
"unisharp/laravel-filemanager": "", // File manager (including uploads)
|
||||
"pbmedia/laravel-ffmpeg": "", // Integration with FFMpeg
|
||||
"maestroerror/php-heic-to-jpg": "", // Use Go(?) to convert HEIC/HEIF to JPEG
|
||||
|
||||
// Localization
|
||||
"mcamara/laravel-localization": "", // localization that also handles route translations
|
||||
"barryvdh/laravel-translation-manager": "", // self-evident
|
||||
|
||||
// PDF stuff
|
||||
"creagia/laravel-sign-pad": "", // allows signatures on documents
|
||||
|
||||
// Geo-spatial
|
||||
"brick/geo": "", // GIS geometry library
|
||||
"stevebauman/location": "", // retrieve a user's location by their IP address
|
||||
|
||||
// Websockets
|
||||
"beyondcode/laravel-websockets": "", // use websockets in the same laravel application
|
||||
|
||||
// Helpers/Generators
|
||||
"infyomlabs/laravel-calendar-events": "", // help with handling future dates without having to store records in the database
|
||||
"lab404/laravel-impersonate": "", // Impersonate other users in your application
|
||||
"kitloong/laravel-migrations-generator": "", // create migrations based on your existing database
|
||||
"spatie/laravel-sitemap": "", // generate site maps
|
||||
"artesaos/seotools": "", // automatic SEO tools
|
||||
"eumanito/php-capitalize-names": "", // Capitalize names with funky rules
|
||||
"robinvdvleuten/ulid": "", // Universally Unique Lexicographically Sortable Identifier (ULID)
|
||||
|
||||
// Others/uncategorized
|
||||
"appstract/laravel-opcache": "", // provides artisan commands to interact with opcache (not sure if site-specific)
|
||||
"brick/math": "", // arbitrary-precision arithmetic library
|
||||
"brick/money": "", // money and currency library
|
||||
|
||||
"protonemedia/laravel-verify-new-email": "", // must verify new email address before email update will be completed
|
||||
"protonemedia/inertiajs-tables-laravel-query-builder": "", // datatables for InertiaJS/Vue and Laravel
|
||||
|
||||
"ikechukwukalu/requirepin": "", // use password/pin protection for routes
|
||||
|
||||
"doctrine/dbal": "", // useful for artisan db:show
|
||||
},
|
||||
"require-dev": {
|
||||
//..
|
||||
"itsgoingd/clockwork": "",
|
||||
"phpstan/phpstan": "",
|
||||
"psalm/plugin-laravel": "",
|
||||
"vimeo/psalm": "",
|
||||
"slevomat/coding-standard": "^8.5", // additional coding standards to match Laravel
|
||||
"squizlabs/php_codesniffer": "^3.7"
|
||||
},
|
||||
//...
|
||||
"autoload": {
|
||||
//...,
|
||||
|
22
src/config/app.php
Normal file
22
src/config/app.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
...
|
||||
|
||||
return [
|
||||
|
||||
...
|
||||
|
||||
'providers' => [
|
||||
|
||||
...
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
...
|
||||
App\Providers\CarbonServiceProvider::class,
|
||||
],
|
||||
|
||||
...
|
||||
|
||||
];
|
@ -2,9 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Language;
|
||||
use App\Models\Team;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Jetstream\Features;
|
||||
|
||||
@ -31,6 +33,7 @@ class UserFactory extends Factory
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'timezone_name' => $this->faker->timezone(),
|
||||
'language_id' => Language::all()->random()->id,
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
@ -69,4 +72,25 @@ class UserFactory extends Factory
|
||||
'ownedTeams'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the user should have an avatar image.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function withAvatar()
|
||||
{
|
||||
if (! Features::enabled(Features::profilePhotos())) {
|
||||
return $this->state([]);
|
||||
}
|
||||
|
||||
$imageUrl = 'https://avatars.test/';
|
||||
$imageContents = file_get_contents($imageUrl);
|
||||
$imageName = md5($imageContents) . '.jpg';
|
||||
Storage::put("public/avatars/{$imageName}", $imageContents);
|
||||
|
||||
return $this->state([
|
||||
'profile_photo_path' => "avatars/{$imageName}"
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('languages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('locale_name')->index();
|
||||
$table->string('iso_code')->unique();
|
||||
$table->string('name');
|
||||
$table->string('localized_name');
|
||||
$table->timestamp('created_at')->useCurrent();
|
||||
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('languages');
|
||||
}
|
||||
};
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@ -14,13 +14,14 @@ class CreateUsersTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->string('id', 64)->primary();
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('surname');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('timezone_name')->default('UTC');
|
||||
$table->string('current_team_id', 64)->nullable();
|
||||
$table->foreignId('language_id');
|
||||
$table->foreignId('current_team_id')->nullable();
|
||||
$table->string('profile_photo_path', 2048)->nullable();
|
||||
$table->string('password');
|
||||
$table->text('two_factor_secret')->nullable();
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable()->index();
|
||||
$table->text('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
$table->timestamp('vrt_last_activity_at')->virtualAs('FROM_UNIXTIME(last_activity)');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAddressesTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@ -14,8 +14,8 @@ class CreateAddressesTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::create('addresses', function (Blueprint $table) {
|
||||
$table->string('id', 64)->primary();
|
||||
$table->uuidMorphs('addressable');
|
||||
$table->id();
|
||||
$table->morphs('addressable');
|
||||
$table->string('street');
|
||||
$table->string('unit')->nullable();
|
||||
$table->string('city');
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('address_user', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('address_id')->constrained()->cascadeOnUpdate()->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnUpdate()->cascadeOnDelete();
|
||||
$table->timestamp('created_at')->useCurrent();
|
||||
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('address_user');
|
||||
}
|
||||
}
|
21
src/database/seeders/DatabaseSeeder.php
Normal file
21
src/database/seeders/DatabaseSeeder.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call([
|
||||
LanguageSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
38
src/database/seeders/LanguageSeeder.php
Normal file
38
src/database/seeders/LanguageSeeder.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Language;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LanguageSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$languagesData = [
|
||||
['locale' => 'en', 'iso_code' => 'en_US', 'name' => 'English', 'localized_name' => 'English (US)'],
|
||||
['locale' => 'de', 'iso_code' => 'de_DE', 'name' => 'German', 'localized_name' => 'Deutsch'],
|
||||
['locale' => 'fr', 'iso_code' => 'fr_FR', 'name' => 'French', 'localized_name' => 'Français'],
|
||||
['locale' => 'jp', 'iso_code' => 'jp_JP', 'name' => 'Japanese', 'localized_name' => '日本'],
|
||||
['locale' => 'mx', 'iso_code' => 'es_MX', 'name' => 'Spanish', 'localized_name' => 'Español'],
|
||||
];
|
||||
|
||||
$startTime = Carbon::now();
|
||||
$offset = 0;
|
||||
|
||||
foreach ($languagesData as $language) {
|
||||
$datetime = $startTime->copy()->addMinute($offset)->toDateTimeString();
|
||||
$offset++;
|
||||
$language['created_at'] = $datetime;
|
||||
$language['updated_at'] = $datetime;
|
||||
Language::create($language);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,15 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache TTL (Time-To-Live)
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is a collection of intervals in seconds that are commong to use
|
||||
| when caching, but written as a more human-friendly phrase.
|
||||
|
|
||||
*/
|
||||
|
||||
define('CACHE_TTL_FIVE_MINUTES', 300);
|
||||
define('CACHE_TTL_FIFTEEN_MINUTES', 900);
|
||||
|
||||
|
@ -1,23 +1,41 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Status Codes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is a collection of HTTP status codes and a corresponding string
|
||||
| that is human-friendly and easy to remember.
|
||||
|
|
||||
*/
|
||||
|
||||
$httpCodes = [
|
||||
// 200's (successful)
|
||||
// 100's (informational / "hold on")
|
||||
100 => 'HTTP_CONTINUE',
|
||||
101 => 'HTTP_SWITCHING_PROTOCOLS',
|
||||
102 => 'HTTP_PROCESSING',
|
||||
103 => 'HTTP_EARLY_HINTS',
|
||||
|
||||
// 200's (successful / "here you go")
|
||||
200 => 'HTTP_SUCCESS',
|
||||
201 => 'HTTP_CREATED',
|
||||
202 => 'HTTP_ACCEPTED',
|
||||
204 => 'HTTP_NO_CONTENT',
|
||||
205 => 'HTTP_RESET_CONTENT',
|
||||
206 => 'HTTP_PARTIAL_CONTENT',
|
||||
208 => 'HTTP_ALREADY_REPORTED',
|
||||
218 => 'HTTP_THIS_IS_FINE', // Apache specific
|
||||
|
||||
// 300's (redirections)
|
||||
// 300's (redirections / "go away")
|
||||
300 => 'HTTP_MULTIPLE_CHOICE',
|
||||
301 => 'HTTP_MOVED_PERMANENTLY',
|
||||
302 => 'HTTP_REDIRECT_FOUND',
|
||||
303 => 'HTTP_SEE_OTHER',
|
||||
304 => 'HTTP_NOT_MODIFIED',
|
||||
307 => 'HTTP_TEMP_REDIRECT',
|
||||
307 => 'HTTP_TEMPORARY_REDIRECT',
|
||||
308 => 'HTTP_PERMANENT_REDIRECT',
|
||||
|
||||
// 400's (app got the request but couldn't process it successfully, coding error)
|
||||
// 400's (app got the request but couldn't process it successfully, coding error / "user screwed up")
|
||||
400 => 'HTTP_BAD_REQUEST',
|
||||
401 => 'HTTP_UNAUTHORIZED',
|
||||
402 => 'HTTP_PAYMENT_REQUIRED',
|
||||
@ -40,12 +58,14 @@ $httpCodes = [
|
||||
236 => 'HTTP_UPGRADE_REQUIRED',
|
||||
428 => 'HTTP_PRECONDITION_REQUIRED',
|
||||
429 => 'HTTP_TOO_MANY_REQUESTS',
|
||||
444 => 'HTTP_NO_RESPONSE', // Nginx specific, used internally to return no info and close connection immediately
|
||||
451 => 'HTTP_GAG_ORDER',
|
||||
|
||||
// 500's (server-level problem, process died or configuration is incorrect)
|
||||
// 500's (server-level problem, process died or configuration is incorrect / "server screwed up")
|
||||
500 => 'HTTP_SERVER_ERROR',
|
||||
501 => 'HTTP_NOT_IMPLEMENTED',
|
||||
503 => 'HTTP_UNAVAILABLE',
|
||||
529 => 'HTTP_SITE_OVERLOADED', // Qualys specific, API response to indicate server resources are over capacity
|
||||
530 => 'HTTP_SUSPENDED',
|
||||
];
|
||||
|
||||
|
76
src/helpers/functions/date_and_time.php
Normal file
76
src/helpers/functions/date_and_time.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Date/Time Functions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is a home for functions that don't belong to any one class and
|
||||
| that should be available anywhere in the application.
|
||||
|
|
||||
*/
|
||||
|
||||
if (! function_exists('secondsToTime')) {
|
||||
/**
|
||||
* Convert seconds to hour:minute:second with hour being omitted
|
||||
* if the amount of seconds is less than an hour.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param datatype $seconds
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function secondsToTime($seconds): string
|
||||
{
|
||||
$seconds = intval($seconds);
|
||||
if ($seconds >= 3600) {
|
||||
return sprintf('%02d:%02d:%02d', ($seconds / 3600), (($seconds / 60) % 60), ($seconds % 60));
|
||||
}
|
||||
|
||||
return sprintf('%02d:%02d', (($seconds / 60) % 60), ($seconds % 60));
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('minutesToTime')) {
|
||||
/**
|
||||
* Convert minutes to HH:MM
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param datatype $minutes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function minutesToTime($minutes): string
|
||||
{
|
||||
$minutes = intval($minutes);
|
||||
|
||||
return sprintf('%d:%02d', floor($minutes / 60), ($minutes % 60));
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('jddayofweek')) {
|
||||
/**
|
||||
* Returns the day of the week. Can return a string or an integer depending on the mode.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param int|null $intDay
|
||||
* @param int $mode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function jddayofweek(?int $intDay = null, int $mode = 0): string
|
||||
{
|
||||
if (is_null($intDay)) {
|
||||
$intDay = date('l');
|
||||
}
|
||||
|
||||
if ($mode === 0) {
|
||||
return $intDay;
|
||||
}
|
||||
|
||||
return ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][$intDay];
|
||||
}
|
||||
}
|
233
src/helpers/functions/distances.php
Normal file
233
src/helpers/functions/distances.php
Normal file
@ -0,0 +1,233 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Distance Functions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is a home for functions that don't belong to any one class and
|
||||
| that should be available anywhere in the application.
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Metric functions
|
||||
|--------------------------------------------------------------------------
|
||||
| Functions that convert from metric to imperial or from a smaller
|
||||
| metric unit to a larger one.
|
||||
|
|
||||
*/
|
||||
|
||||
if (! function_exists('centimeters2Inches')) {
|
||||
/**
|
||||
* Convert from centimeters to inches.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $centimeters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function centimeters2Inches($centimeters, int $preceision = 1): float
|
||||
{
|
||||
return round(($centimeters / 2.54), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('centimeters2Feet')) {
|
||||
/**
|
||||
* Convert from centimeters to inches.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $centimeters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function centimeters2Feet($centimeters, int $preceision = 1): float
|
||||
{
|
||||
return round((($centimeters / 2.54) * 12), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('centimeters2Meters')) {
|
||||
/**
|
||||
* Convert from centimeters to meters.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $centimeters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function centimeters2Meters($centimeters, int $preceision = 1): float
|
||||
{
|
||||
return round(($centimeters / 100), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('centimeters2Yards')) {
|
||||
/**
|
||||
* Convert from centimeters to yards.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $centimeters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function centimeters2Yards($centimeters, int $preceision = 1): float
|
||||
{
|
||||
return round(($centimeters / 91.44), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('meters2Miles')) {
|
||||
/**
|
||||
* Convert from meters to miles.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $meters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function meters2Miles($meters, int $preceision = 1): float
|
||||
{
|
||||
return round(($meters * 0.00062137), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('kilometers2Miles')) {
|
||||
/**
|
||||
* Convert from kilometers to meters.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $kilometers
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function kilometers2Miles($kilometers, int $preceision = 1): float
|
||||
{
|
||||
return round(($kilometers * 1.609), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('meters2Kilometers')) {
|
||||
/**
|
||||
* Convert from meters to kilometers.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $meters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function meters2Kilometers($meters, int $preceision = 1): float
|
||||
{
|
||||
return round(($meters / 1000), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('millimeters2Inches')) {
|
||||
/**
|
||||
* Convert from millimeters to inches.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $millimeters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function millimeters2Inches($millimeters, int $preceision = 1): float
|
||||
{
|
||||
return round(($millimeters / 25.4), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Imperial functions
|
||||
|--------------------------------------------------------------------------
|
||||
| Functions that convert from imperial to metric or from a smaller
|
||||
| imperial unit to a larger one.
|
||||
|
|
||||
*/
|
||||
|
||||
if (! function_exists('inches2Millimeters')) {
|
||||
/**
|
||||
* Convert from inches to millimeters.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $inches
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function inches2Millimeters($inches, int $preceision = 1): float
|
||||
{
|
||||
return round(($inches * 2.54), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('inches2Meters')) {
|
||||
/**
|
||||
* Convert from inches to meters.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $inches
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function inches2Meters($inches, int $preceision = 1): float
|
||||
{
|
||||
return round(($inches / 39.37), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('inches2Yards')) {
|
||||
/**
|
||||
* Convert from inches to yards.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $inches
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function inches2Yards($inches, int $preceision = 1): float
|
||||
{
|
||||
return round(($inches / 36), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('inches2Feet')) {
|
||||
/**
|
||||
* Convert from inches to feet.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $inches
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function inches2Feet($inches, int $preceision = 1): float
|
||||
{
|
||||
return round(($inches * 12), $preceision);
|
||||
}
|
||||
}
|
29
src/helpers/functions/strings.php
Normal file
29
src/helpers/functions/strings.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
// phpcs:ignore
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Global String Functions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is a home for functions that don't belong to any one class and
|
||||
| that should be available anywhere in the application.
|
||||
|
|
||||
*/
|
||||
|
||||
if (! function_exists('snake2Title')) {
|
||||
/**
|
||||
* Convert a snake case string to a title with spaces
|
||||
* and every word capitalized.
|
||||
*
|
||||
* @param string $snakeSlug A snake case string, commonly a slug
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function snake2Title(string $snakeSlug): string
|
||||
{
|
||||
$output = preg_replace('/\_/', ' ', $snakeSlug);
|
||||
return ucwords($output);
|
||||
}
|
||||
}
|
45
src/helpers/functions/temperatures.php
Normal file
45
src/helpers/functions/temperatures.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Temperature Functions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is a home for functions that don't belong to any one class and
|
||||
| that should be available anywhere in the application.
|
||||
|
|
||||
*/
|
||||
|
||||
if (! function_exists('celsius2Fahrenheit')) {
|
||||
/**
|
||||
* Convert from celsius to fahrenheit.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $celsius
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function celsius2Fahrenheit($celsius, int $preceision = 0): float
|
||||
{
|
||||
return round((($celsius * (9/5)) + 32), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('fahrenheit2Celsius')) {
|
||||
/**
|
||||
* Convert from fahrenheit to celsius.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param float|int|string $fahrenheit
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function fahrenheit2Celsius($fahrenheit, int $preceision = 1): float
|
||||
{
|
||||
return round(($fahrenheit - 32 * (5/9)), $preceision);
|
||||
}
|
||||
}
|
@ -1,18 +1,86 @@
|
||||
<?php
|
||||
|
||||
if (! function_exists('snake2Title')) {
|
||||
require_once "functions/strings.php";
|
||||
require_once "functions/date_and_time.php";
|
||||
require_once "functions/distances.php";
|
||||
require_once "functions/temperatures.php";
|
||||
|
||||
/**
|
||||
|--------------------------------------------------------------------------
|
||||
| Global Functions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is a home for functions that don't belong to any one class and
|
||||
| that should be available anywhere in the application.
|
||||
|
|
||||
*/
|
||||
|
||||
if (! function_exists('clamp')) {
|
||||
/**
|
||||
* Convert a snake case string to a title with spaces
|
||||
* and every word capitalized.
|
||||
* Ensure a numerical value is between two bounds.
|
||||
*
|
||||
* @param string $stakeSlug A snake case string, commonly a slug
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param int|float|string $number The value to be clamped between two other values.
|
||||
* @param int|float|string $minNumber The miminum value for clamping bounds.
|
||||
* @param int|float|string $maxNumber The maximum value for clamping bounds.
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @return int|float
|
||||
*/
|
||||
function clamp($number, $minNumber, $maxNumber)
|
||||
{
|
||||
if (! is_numeric($number)) {
|
||||
throw new Exception('Clamp number must be numeric in value.');
|
||||
}
|
||||
|
||||
if (! is_numeric($minNumber)) {
|
||||
throw new Exception('Clamped minimum number must be numeric in value.');
|
||||
}
|
||||
|
||||
if (! is_numeric($maxNumber)) {
|
||||
throw new Exception('Clamped maximum number must be numeric in value.');
|
||||
}
|
||||
|
||||
$returnValue = $number;
|
||||
if ($minNumber >= $number) {
|
||||
$returnValue = $minNumber;
|
||||
}
|
||||
|
||||
if ($maxNumber <= $number) {
|
||||
$returnValue = $maxNumber;
|
||||
}
|
||||
|
||||
return $returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('humanBytes')) {
|
||||
/**
|
||||
* Convert bytes to a human-friendly format.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param int|string $number
|
||||
* @param int|string|null $precision Decimal places to show (optional)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function snake2Title(string $snakeSlug): string
|
||||
function humanBytes($number, $precision = null): string
|
||||
{
|
||||
$output = preg_replace('/\_/', ' ', $snakeSlug);
|
||||
return ucwords($output);
|
||||
if (empty($number)) {
|
||||
return '0 B';
|
||||
}
|
||||
|
||||
static $units = ['B', 'KB', 'MB', 'GB'];
|
||||
static $bytePreceision = [0, 0, 1, 2];
|
||||
$divisor = 1024;
|
||||
|
||||
for ($i = 0; $number / $divisor >= 0.9 && $i < 4; $i++) {
|
||||
$number /= $divisor;
|
||||
}
|
||||
return round($number, is_null($precision) ? $bytePreceision[$i] : $precision) . $units[$i];
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +90,8 @@ if (! function_exists('carbon')) {
|
||||
* It will attempt to find a timezone in the current
|
||||
* session but default to UTC.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param string|null $timestring
|
||||
*
|
||||
* @return \Carbon\Carbon
|
||||
@ -36,130 +106,149 @@ if (! function_exists('carbon')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('jddayofweek')) {
|
||||
if (! function_exists('translations')) {
|
||||
/**
|
||||
* Returns the day of the week. Can return a string or an integer depending on the mode.
|
||||
* Loads translations from a JSON file.
|
||||
*
|
||||
* @param int|null $intDay
|
||||
* @param int $mode
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return string
|
||||
* @param string $jsonFilePath
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function jddayofweek(?int $intDay = null, int $mode = 0): string
|
||||
function translations(string $jsonFilePath): array
|
||||
{
|
||||
if (is_null($intDay)) {
|
||||
$intDay = date('l');
|
||||
if (! file_exists($jsonFilePath)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($mode === 0) {
|
||||
return $intDay;
|
||||
$payload = [];
|
||||
$jsonData = json_decode(file_get_contents($jsonFilePath), true);
|
||||
|
||||
switch (json_last_error()) {
|
||||
case JSON_ERROR_NONE:
|
||||
$payload = $jsonData;
|
||||
break;
|
||||
case JSON_ERROR_DEPTH:
|
||||
throw new \Exception('Maximum stack depth exceeded');
|
||||
break;
|
||||
case JSON_ERROR_STATE_MISMATCH:
|
||||
throw new \Exception('Underflow or the modes mismatch');
|
||||
break;
|
||||
case JSON_ERROR_CTRL_CHAR:
|
||||
throw new \Exception('Unexpected control character found');
|
||||
break;
|
||||
case JSON_ERROR_SYNTAX:
|
||||
throw new \Exception('Syntax error, malformed JSON');
|
||||
break;
|
||||
case JSON_ERROR_UTF8:
|
||||
throw new \Exception('Malformed UTF-8 characters, possibly incorrectly encoded');
|
||||
break;
|
||||
default:
|
||||
throw new \Exception('Generic or unknown JSON error while decoding');
|
||||
break;
|
||||
}
|
||||
|
||||
return ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][$intDay];
|
||||
return $payload;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('cel2Fah')) {
|
||||
if (! function_exists('is_serialized')) {
|
||||
/**
|
||||
* Convert from celsius to fahrenheit.
|
||||
* Check a value to find if it was serialized.
|
||||
*
|
||||
* @param float|int|string $celsius
|
||||
* @param int $precision
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return float
|
||||
* @param mixed $data
|
||||
* @param bool $strict
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function cel2Fah($celsius, int $preceision = 0): float
|
||||
function is_serialized($data, bool $strict = true): bool
|
||||
{
|
||||
return round((($celsius * (9/5)) + 32), $preceision);
|
||||
// If it isn't a string, it isn't serialized.
|
||||
if (! is_string($data)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$data = trim($data);
|
||||
if ($data === 'N;') {
|
||||
return true;
|
||||
}
|
||||
if (strlen($data) < 4) {
|
||||
return false;
|
||||
}
|
||||
if ($data[1] !== ':') {
|
||||
return false;
|
||||
}
|
||||
if ($strict) {
|
||||
$lastc = substr($data, -1);
|
||||
if ($lastc !== ';' && $lastc !== '}') {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$semicolon = strpos($data, ';');
|
||||
$brace = strpos($data, '}');
|
||||
// Either ; or } must exist.
|
||||
if (! $semicolon && ! $brace) {
|
||||
return false;
|
||||
}
|
||||
// But neither must be in the first X characters.
|
||||
if ($semicolon && $semicolon < 3) {
|
||||
return false;
|
||||
}
|
||||
if ($brace && $brace < 4) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$token = $data[0];
|
||||
switch ($token) {
|
||||
case 's':
|
||||
if ($strict) {
|
||||
if (substr($data, -2, 1) !== '"') {
|
||||
return false;
|
||||
}
|
||||
} elseif (! strpos($data, '"')) {
|
||||
return false;
|
||||
}
|
||||
// Or else fall through.
|
||||
case 'a':
|
||||
case 'O':
|
||||
return (bool) preg_match("/^{$token}:[0-9]+:/s", $data);
|
||||
case 'b':
|
||||
case 'i':
|
||||
case 'd':
|
||||
$end = $strict ? '$' : '';
|
||||
return (bool) preg_match("/^{$token}:[0-9.E+-]+;$end/", $data);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('fah2Cel')) {
|
||||
if (! function_exists('maybe_unserialize')) {
|
||||
/**
|
||||
* Convert from fahrenheit to celsius.
|
||||
* Unserialize data only if it was serialized. Will return
|
||||
* an array if it was a serialized string, otherwise it
|
||||
* will return whatever was passed into the function
|
||||
* leaving it untouched.
|
||||
*
|
||||
* @param float|int|string $fahrenheit
|
||||
* @param int $precision
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @return float
|
||||
* @param mixed $data
|
||||
*
|
||||
* @return array|string|bool
|
||||
*/
|
||||
function fah2Cel($fahrenheit, int $preceision = 1): float
|
||||
function maybe_unserialize($data)
|
||||
{
|
||||
return round(($fahrenheit - 32 * (5/9)), $preceision);
|
||||
}
|
||||
}
|
||||
if (! is_string($data)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! function_exists('meters2Miles')) {
|
||||
/**
|
||||
* Convert from meters to miles.
|
||||
*
|
||||
* @param float|int|string $meters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function meters2Miles($meters, int $preceision = 1): float
|
||||
{
|
||||
return round(($meters * 0.00062137), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('kilometers2Miles')) {
|
||||
/**
|
||||
* Convert from kilometers to meters.
|
||||
*
|
||||
* @param float|int|string $kilometers
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function kilometers2Miles($kilometers, int $preceision = 1): float
|
||||
{
|
||||
return round(($kilometers * 1.609), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('m2Km')) {
|
||||
/**
|
||||
* Convert from meters to kilometers.
|
||||
*
|
||||
* @param float|int|string $meters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function m2Km($meters, int $preceision = 1): float
|
||||
{
|
||||
return round(($meters / 1000), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('mm2Inches')) {
|
||||
/**
|
||||
* Convert from milimeters to inches.
|
||||
*
|
||||
* @param float|int|string $milimeters
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function mm2Inches($milimeters, int $preceision = 1): float
|
||||
{
|
||||
return round(($milimeters / 25.4), $preceision);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('pa2Mbar')) {
|
||||
/**
|
||||
* Convert from pascals to milibars.
|
||||
*
|
||||
* @param float|int|string $pascals
|
||||
* @param int $precision
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
function pa2Mbar($pascals, int $preceision = 1): float
|
||||
{
|
||||
return round(($pascals / 100), $preceision);
|
||||
$data = trim($data);
|
||||
// Don't attempt to unserialize data that wasn't serialized going in.
|
||||
if (is_serialized($data)) {
|
||||
return unserialize(trim($data));
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,88 @@
|
||||
{
|
||||
"key": "translation that has :attribute in the string."
|
||||
"titles": {
|
||||
"welcome": "Welcome",
|
||||
"dashboard": "Dashboard",
|
||||
"secure_area": "Secure Area",
|
||||
"forgot_password": "Forgot Password",
|
||||
"my_profile": "My Profile",
|
||||
"edit_profile": "Edit Profile",
|
||||
"log_in": "Log In To Your Account",
|
||||
"register": "Register A New Account",
|
||||
"reset_password": "Reset Password",
|
||||
"two_factor_confirmation": "Two-factor Confirmation",
|
||||
"verify_email": "Email Verification"
|
||||
},
|
||||
"labels": {
|
||||
"type": "Type",
|
||||
"none": "None",
|
||||
"title": "Title",
|
||||
"name": "Name",
|
||||
"created_at": "Created At",
|
||||
"updated_at": "Updated At",
|
||||
"actions": "Actions",
|
||||
"email": "Email",
|
||||
"timezone_name": "Timezone",
|
||||
"language": "Language",
|
||||
"password": "Password",
|
||||
"confirm_password": "Confirm Password",
|
||||
"current_password": "Current Password",
|
||||
"remember_me": "Remember me",
|
||||
"first_name": "First Name",
|
||||
"last_name": "Surname",
|
||||
"forgot_password": "Forgot your password?",
|
||||
"already_registered": "Already registered?",
|
||||
"code": "Code",
|
||||
"recovery_code": "Recovery Code",
|
||||
"use_recovery_code": "Use a recovery code",
|
||||
"use_authentication_code": "Use an authentication code",
|
||||
"email_verification": "Email Verification",
|
||||
"user": "User",
|
||||
"optional": "optional"
|
||||
},
|
||||
"actions": {
|
||||
"save": "Save",
|
||||
"update": "Update",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"confirm": "Confirm",
|
||||
"log_in": "Log in",
|
||||
"log_out": "Log Out",
|
||||
"register": "Register",
|
||||
"edit_profile": "Edit Profile",
|
||||
"confirm_password": "Confirm Password",
|
||||
"reset_password": "Reset Password",
|
||||
"email_password_reset_link": "Email Password Reset Link",
|
||||
"resend_verification_email": "Resend Verification Email"
|
||||
},
|
||||
"nav": {
|
||||
"manage_team": "Manage Team",
|
||||
"team_settings": "Team Settings",
|
||||
"create_new_team": "Create New Team",
|
||||
"switch_teams": "Switch Teams",
|
||||
"manage_account": "Manage Account",
|
||||
"profile": "My Profile",
|
||||
"admin_settings": "Admin Settings",
|
||||
"api_tokens": "API Tokens"
|
||||
},
|
||||
"pagination": {
|
||||
"show_from_to_count": "Showing :from to :to of :count results"
|
||||
},
|
||||
"notifications": {
|
||||
"saved": "Saved.",
|
||||
"verified": "Verified!",
|
||||
"unverified": "Unverified.",
|
||||
"new_email_verification_sent": "A new verification link has been sent to the email address you provided in your profile settings."
|
||||
},
|
||||
"pages": {
|
||||
"profile": {
|
||||
"titles": {
|
||||
"update_password": "Update Your Password"
|
||||
},
|
||||
"text_blocks": {
|
||||
"unverified_message": "Please verify your account.",
|
||||
"verified_message": "Thanks for being amazing.",
|
||||
"secure_password": "Ensure your account is using a long, random password to stay secure."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
32
src/package.json
Normal file
32
src/package.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.0.0",
|
||||
"laravel-vite-plugin": "^0.6.0",
|
||||
"postcss": "^8.4.14",
|
||||
"vite": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@inertiajs/inertia": "^0.11.0",
|
||||
"@inertiajs/inertia-vue3": "^0.6.0",
|
||||
"@inertiajs/progress": "^0.2.7",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||
"@tailwindcss/line-clamp": "^0.4.2",
|
||||
"@tailwindcss/typography": "^0.5.2",
|
||||
"@vueuse/core": "^8.7.5",
|
||||
"apexcharts": "^3.35.5",
|
||||
"axios": "^0.27.2",
|
||||
"daisyui": "^2.29.0",
|
||||
"dayjs": "^1.11.3",
|
||||
"laravel-vue-i18n": "^1.4.3",
|
||||
"lodash": "^4.17.21",
|
||||
"notiwind": "^1.2.5",
|
||||
"tailwindcss": "^3.1.0",
|
||||
"tailwindcss-neu": "^0.2.1",
|
||||
"vue": "^3.2.37"
|
||||
}
|
||||
}
|
218
src/phpcs.xml
Normal file
218
src/phpcs.xml
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="Laravel Standards" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
|
||||
<description>PHP Codesniffer ruleset to follow Laravel's coding style</description>
|
||||
<rule ref="Generic.Classes.DuplicateClassName">
|
||||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
|
||||
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
|
||||
<exclude-pattern>/app/Http/Resources/*\.php</exclude-pattern>
|
||||
<exclude-pattern>/routes/*\.php</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
||||
<rule ref="Generic.Commenting.DocComment">
|
||||
<exclude name="Generic.Commenting.DocComment.ContentAfterOpen"/>
|
||||
<exclude name="Generic.Commenting.DocComment.ContentBeforeClose"/>
|
||||
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
|
||||
<exclude name="Generic.Commenting.DocComment.NonParamGroup"/>
|
||||
<exclude name="Generic.Commenting.DocComment.ParamNotFirst"/>
|
||||
<exclude name="Generic.Commenting.DocComment.TagValueIndent"/>
|
||||
</rule>
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
||||
<rule ref="Generic.Files.ByteOrderMark"/>
|
||||
<rule ref="Generic.Files.LineEndings">
|
||||
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
|
||||
</rule>
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
||||
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
||||
<rule ref="Generic.Formatting.SpaceAfterNot"/>
|
||||
<rule ref="Generic.Functions.CallTimePassByReference"/>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
|
||||
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="complexity" value="20"/>
|
||||
<property name="absoluteComplexity" value="25"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.NestingLevel">
|
||||
<properties>
|
||||
<property name="nestingLevel" value="5"/>
|
||||
<property name="absoluteNestingLevel" value="15"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||
<rule ref="Generic.NamingConventions.CamelCapsFunctionName">
|
||||
<exclude-pattern>/helpers/global_functions\.php</exclude-pattern>
|
||||
<exclude-pattern>/tests/*</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="Generic.PHP.LowerCaseConstant"/>
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions"/>
|
||||
<rule ref="Generic.PHP.NoSilencedErrors"/>
|
||||
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||
<properties>
|
||||
<property name="indent" value="4"/>
|
||||
<property name="tabIndent" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="MySource.PHP.EvalObjectFactory"/>
|
||||
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR1.Files.SideEffects">
|
||||
<exclude-pattern>*/artisan</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PSR1.Files.SideEffects"/>
|
||||
<rule ref="PSR2.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
|
||||
<rule ref="PSR2.Files.EndFileNewline"/>
|
||||
<rule ref="PSR2.Methods.MethodDeclaration"/>
|
||||
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
|
||||
<rule ref="PSR2.Namespaces.UseDeclaration"/>
|
||||
<rule ref="PSR1">
|
||||
<exclude-pattern>*\.php</exclude-pattern>
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
|
||||
|
||||
<exclude-pattern>database/*</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PSR2">
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE" />
|
||||
<properties>
|
||||
<property name="lineLimit" value="130"/>
|
||||
<property name="absoluteLineLimit" value="135"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.Arrays.ArrayDeclaration">
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.KeyNotAligned" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNoNewline" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.IndexNoNewline" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine" />
|
||||
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.NoKeySpecified" />
|
||||
<exclude name="Squiz.Arrays.ArrayDeclaration.KeySpecified" />
|
||||
</rule>
|
||||
<rule ref="Squiz.PHP.CommentedOutCode"/>
|
||||
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
|
||||
<rule ref="Squiz.PHP.DiscouragedFunctions">
|
||||
<properties>
|
||||
<property name="error" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.PHP.Eval"/>
|
||||
<rule ref="Squiz.PHP.GlobalKeyword"/>
|
||||
<rule ref="Squiz.PHP.Heredoc"/>
|
||||
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
|
||||
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
||||
<rule ref="Squiz.Scope.MemberVarScope"/>
|
||||
<rule ref="Squiz.Scope.MethodScope"/>
|
||||
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
||||
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
|
||||
<properties>
|
||||
<property name="ignoreNewlines" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
|
||||
<properties>
|
||||
<property name="ignoreNewlines" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
||||
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
|
||||
<rule ref="Zend.Files.ClosingTag"/>
|
||||
|
||||
<!-- Custom Sniffs -->
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
|
||||
<properties>
|
||||
<property name="searchAnnotations" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
|
||||
<properties>
|
||||
<property name="caseSensitive" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
|
||||
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
|
||||
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing">
|
||||
<properties>
|
||||
<property name="minLinesCount" value="1"/>
|
||||
<property name="maxLinesCount" value="1"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration">
|
||||
<properties>
|
||||
<property name="spacesCountAfterKeyword" value="1"/>
|
||||
<property name="spacesCountBeforeArrow" value="1"/>
|
||||
<property name="spacesCountAfterArrow" value="1"/>
|
||||
<property name="allowMultiLine" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
|
||||
<properties>
|
||||
<property name="rootNamespaces" type="array">
|
||||
<element key="app" value="App"/>
|
||||
<element key="database/factories" value="Database\Factories"/>
|
||||
<element key="database/seeders" value="Database\Seeders"/>
|
||||
<element key="tests" value="Tests"/>
|
||||
</property>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
|
||||
<exclude-pattern>/database/schema/*</exclude-pattern>
|
||||
<exclude-pattern>/database/migrations/*</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<file>./app</file>
|
||||
<file>./config</file>
|
||||
<file>./resources</file>
|
||||
<file>./routes</file>
|
||||
<file>./tests</file>
|
||||
|
||||
<exclude-pattern>*/.phpstorm.meta.php</exclude-pattern>
|
||||
<exclude-pattern>*/_ide_helper.php</exclude-pattern>
|
||||
<exclude-pattern>*/cache/*</exclude-pattern>
|
||||
<exclude-pattern>*/config/*</exclude-pattern>
|
||||
<exclude-pattern>*/database/*</exclude-pattern>
|
||||
<exclude-pattern>*/docs/*</exclude-pattern>
|
||||
<exclude-pattern>*/migrations/*</exclude-pattern>
|
||||
<exclude-pattern>*/storage/*</exclude-pattern>
|
||||
<exclude-pattern>*/public/index.php</exclude-pattern>
|
||||
<exclude-pattern>*/resources/lang/*</exclude-pattern>
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
<exclude-pattern>*/*.js</exclude-pattern>
|
||||
<exclude-pattern>*/*.css</exclude-pattern>
|
||||
<exclude-pattern>*/*.xml</exclude-pattern>
|
||||
<exclude-pattern>*/*.blade.php</exclude-pattern>
|
||||
<exclude-pattern>*/autoload.php</exclude-pattern>
|
||||
<exclude-pattern>*/Console/Kernel.php</exclude-pattern>
|
||||
<exclude-pattern>*/Exceptions/Handler.php</exclude-pattern>
|
||||
<exclude-pattern>*/Http/Kernel.php</exclude-pattern>
|
||||
|
||||
<arg name="basepath" value="."/>
|
||||
<arg name="colors"/>
|
||||
<arg value="nspv"/>
|
||||
<ini name="memory_limit" value="128M"/>
|
||||
</ruleset>
|
6
src/postcss.config.js
Normal file
6
src/postcss.config.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
@ -0,0 +1,696 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)</title>
|
||||
<link rel="alternate" type="application/rdf+xml"
|
||||
href="http://www.gnu.org/licenses/gpl-3.0.rdf" />
|
||||
</head>
|
||||
<body>
|
||||
<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
|
||||
<p style="text-align: center;">Version 3, 29 June 2007</p>
|
||||
|
||||
<p>Copyright © 2007 Free Software Foundation, Inc.
|
||||
<<a href="https://fsf.org/">https://fsf.org/</a>></p><p>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.</p>
|
||||
|
||||
<h4 id="preamble">Preamble</h4>
|
||||
|
||||
<p>The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.</p>
|
||||
|
||||
<p>The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.</p>
|
||||
|
||||
<p>When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.</p>
|
||||
|
||||
<p>To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.</p>
|
||||
|
||||
<p>For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.</p>
|
||||
|
||||
<p>Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.</p>
|
||||
|
||||
<p>For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.</p>
|
||||
|
||||
<p>Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.</p>
|
||||
|
||||
<p>Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.</p>
|
||||
|
||||
<p>The precise terms and conditions for copying, distribution and
|
||||
modification follow.</p>
|
||||
|
||||
<h4 id="terms">TERMS AND CONDITIONS</h4>
|
||||
|
||||
<h5 id="section0">0. Definitions.</h5>
|
||||
|
||||
<p>“This License” refers to version 3 of the GNU General Public License.</p>
|
||||
|
||||
<p>“Copyright” also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.</p>
|
||||
|
||||
<p>“The Program” refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as “you”. “Licensees” and
|
||||
“recipients” may be individuals or organizations.</p>
|
||||
|
||||
<p>To “modify” a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a “modified version” of the
|
||||
earlier work or a work “based on” the earlier work.</p>
|
||||
|
||||
<p>A “covered work” means either the unmodified Program or a work based
|
||||
on the Program.</p>
|
||||
|
||||
<p>To “propagate” a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.</p>
|
||||
|
||||
<p>To “convey” a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.</p>
|
||||
|
||||
<p>An interactive user interface displays “Appropriate Legal Notices”
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.</p>
|
||||
|
||||
<h5 id="section1">1. Source Code.</h5>
|
||||
|
||||
<p>The “source code” for a work means the preferred form of the work
|
||||
for making modifications to it. “Object code” means any non-source
|
||||
form of a work.</p>
|
||||
|
||||
<p>A “Standard Interface” means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.</p>
|
||||
|
||||
<p>The “System Libraries” of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
“Major Component”, in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.</p>
|
||||
|
||||
<p>The “Corresponding Source” for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.</p>
|
||||
|
||||
<p>The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.</p>
|
||||
|
||||
<p>The Corresponding Source for a work in source code form is that
|
||||
same work.</p>
|
||||
|
||||
<h5 id="section2">2. Basic Permissions.</h5>
|
||||
|
||||
<p>All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.</p>
|
||||
|
||||
<p>You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.</p>
|
||||
|
||||
<p>Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.</p>
|
||||
|
||||
<h5 id="section3">3. Protecting Users' Legal Rights From Anti-Circumvention Law.</h5>
|
||||
|
||||
<p>No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.</p>
|
||||
|
||||
<p>When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.</p>
|
||||
|
||||
<h5 id="section4">4. Conveying Verbatim Copies.</h5>
|
||||
|
||||
<p>You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.</p>
|
||||
|
||||
<p>You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.</p>
|
||||
|
||||
<h5 id="section5">5. Conveying Modified Source Versions.</h5>
|
||||
|
||||
<p>You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:</p>
|
||||
|
||||
<ul>
|
||||
<li>a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.</li>
|
||||
|
||||
<li>b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
“keep intact all notices”.</li>
|
||||
|
||||
<li>c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.</li>
|
||||
|
||||
<li>d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.</li>
|
||||
</ul>
|
||||
|
||||
<p>A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
“aggregate” if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.</p>
|
||||
|
||||
<h5 id="section6">6. Conveying Non-Source Forms.</h5>
|
||||
|
||||
<p>You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:</p>
|
||||
|
||||
<ul>
|
||||
<li>a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.</li>
|
||||
|
||||
<li>b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.</li>
|
||||
|
||||
<li>c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.</li>
|
||||
|
||||
<li>d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.</li>
|
||||
|
||||
<li>e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.</li>
|
||||
</ul>
|
||||
|
||||
<p>A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.</p>
|
||||
|
||||
<p>A “User Product” is either (1) a “consumer product”, which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, “normally used” refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.</p>
|
||||
|
||||
<p>“Installation Information” for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.</p>
|
||||
|
||||
<p>If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).</p>
|
||||
|
||||
<p>The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.</p>
|
||||
|
||||
<p>Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.</p>
|
||||
|
||||
<h5 id="section7">7. Additional Terms.</h5>
|
||||
|
||||
<p>“Additional permissions” are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.</p>
|
||||
|
||||
<p>When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.</p>
|
||||
|
||||
<p>Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:</p>
|
||||
|
||||
<ul>
|
||||
<li>a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or</li>
|
||||
|
||||
<li>b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or</li>
|
||||
|
||||
<li>c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or</li>
|
||||
|
||||
<li>d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or</li>
|
||||
|
||||
<li>e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or</li>
|
||||
|
||||
<li>f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.</li>
|
||||
</ul>
|
||||
|
||||
<p>All other non-permissive additional terms are considered “further
|
||||
restrictions” within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.</p>
|
||||
|
||||
<p>If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.</p>
|
||||
|
||||
<p>Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.</p>
|
||||
|
||||
<h5 id="section8">8. Termination.</h5>
|
||||
|
||||
<p>You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).</p>
|
||||
|
||||
<p>However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.</p>
|
||||
|
||||
<p>Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.</p>
|
||||
|
||||
<p>Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.</p>
|
||||
|
||||
<h5 id="section9">9. Acceptance Not Required for Having Copies.</h5>
|
||||
|
||||
<p>You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.</p>
|
||||
|
||||
<h5 id="section10">10. Automatic Licensing of Downstream Recipients.</h5>
|
||||
|
||||
<p>Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.</p>
|
||||
|
||||
<p>An “entity transaction” is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.</p>
|
||||
|
||||
<p>You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.</p>
|
||||
|
||||
<h5 id="section11">11. Patents.</h5>
|
||||
|
||||
<p>A “contributor” is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's “contributor version”.</p>
|
||||
|
||||
<p>A contributor's “essential patent claims” are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, “control” includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.</p>
|
||||
|
||||
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.</p>
|
||||
|
||||
<p>In the following three paragraphs, a “patent license” is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To “grant” such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.</p>
|
||||
|
||||
<p>If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. “Knowingly relying” means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.</p>
|
||||
|
||||
<p>If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.</p>
|
||||
|
||||
<p>A patent license is “discriminatory” if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.</p>
|
||||
|
||||
<p>Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.</p>
|
||||
|
||||
<h5 id="section12">12. No Surrender of Others' Freedom.</h5>
|
||||
|
||||
<p>If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.</p>
|
||||
|
||||
<h5 id="section13">13. Use with the GNU Affero General Public License.</h5>
|
||||
|
||||
<p>Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.</p>
|
||||
|
||||
<h5 id="section14">14. Revised Versions of this License.</h5>
|
||||
|
||||
<p>The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.</p>
|
||||
|
||||
<p>Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License “or any later version” applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.</p>
|
||||
|
||||
<p>If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.</p>
|
||||
|
||||
<p>Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.</p>
|
||||
|
||||
<h5 id="section15">15. Disclaimer of Warranty.</h5>
|
||||
|
||||
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
|
||||
|
||||
<h5 id="section16">16. Limitation of Liability.</h5>
|
||||
|
||||
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.</p>
|
||||
|
||||
<h5 id="section17">17. Interpretation of Sections 15 and 16.</h5>
|
||||
|
||||
<p>If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.</p>
|
||||
|
||||
<p>END OF TERMS AND CONDITIONS</p>
|
||||
|
||||
<h4 id="howto">How to Apply These Terms to Your New Programs</h4>
|
||||
|
||||
<p>If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.</p>
|
||||
|
||||
<p>To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the “copyright” line and a pointer to where the full notice is found.</p>
|
||||
|
||||
<pre> <one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
</pre>
|
||||
|
||||
<p>Also add information on how to contact you by electronic and paper mail.</p>
|
||||
|
||||
<p>If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:</p>
|
||||
|
||||
<pre> <program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
</pre>
|
||||
|
||||
<p>The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an “about box”.</p>
|
||||
|
||||
<p>You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a “copyright disclaimer” for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<<a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>>.</p>
|
||||
|
||||
<p>The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<<a href="https://www.gnu.org/licenses/why-not-lgpl.html">https://www.gnu.org/licenses/why-not-lgpl.html</a>>.</p>
|
||||
|
||||
</body></html>
|
||||
|
675
src/public/copyright.md
Normal file
675
src/public/copyright.md
Normal file
@ -0,0 +1,675 @@
|
||||
### GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
### Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program--to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation, use
|
||||
the GNU General Public License for most of our software; it applies
|
||||
also to any other work released this way by its authors. You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
### TERMS AND CONDITIONS
|
||||
|
||||
#### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
#### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
#### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
#### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
#### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
#### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
#### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
#### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
#### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
#### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
#### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
#### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
#### 13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
#### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in
|
||||
detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of the GNU General Public
|
||||
License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
#### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
#### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
#### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands \`show w' and \`show c' should show the
|
||||
appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use the
|
||||
GNU Lesser General Public License instead of this License. But first,
|
||||
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
|
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Bold.woff2
Normal file
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Bold.woff2
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Italic.woff2
Normal file
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Italic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Medium.woff2
Normal file
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Medium.woff2
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Regular.woff2
Normal file
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-Regular.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-SemiBold.woff2
Normal file
BIN
src/public/fonts/BarlowCondensed/BarlowCondensed-SemiBold.woff2
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/public/fonts/Lato/Lato-Bold.woff2
Normal file
BIN
src/public/fonts/Lato/Lato-Bold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Lato/Lato-BoldItalic.woff2
Normal file
BIN
src/public/fonts/Lato/Lato-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Lato/Lato-Italic.woff2
Normal file
BIN
src/public/fonts/Lato/Lato-Italic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Lato/Lato-Regular.woff2
Normal file
BIN
src/public/fonts/Lato/Lato-Regular.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Lato/Lato-Semibold.woff2
Normal file
BIN
src/public/fonts/Lato/Lato-Semibold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Lato/Lato-SemiboldItalic.woff2
Normal file
BIN
src/public/fonts/Lato/Lato-SemiboldItalic.woff2
Normal file
Binary file not shown.
94
src/public/fonts/Lato/OFL.txt
Normal file
94
src/public/fonts/Lato/OFL.txt
Normal file
@ -0,0 +1,94 @@
|
||||
Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com),
|
||||
with Reserved Font Name Lato.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
src/public/fonts/Montserrat/Montserrat-Bold.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-Bold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-BoldItalic.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-Italic.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-Italic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-Medium.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-Medium.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-MediumItalic.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-MediumItalic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-Regular.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-Regular.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-SemiBold.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-SemiBold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Montserrat/Montserrat-SemiBoldItalic.woff2
Normal file
BIN
src/public/fonts/Montserrat/Montserrat-SemiBoldItalic.woff2
Normal file
Binary file not shown.
93
src/public/fonts/Nunito/OFL.txt
Normal file
93
src/public/fonts/Nunito/OFL.txt
Normal file
@ -0,0 +1,93 @@
|
||||
Copyright 2014 The Nunito Project Authors (https://github.com/googlefonts/nunito)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
93
src/public/fonts/PoiretOne/OFL.txt
Normal file
93
src/public/fonts/PoiretOne/OFL.txt
Normal file
@ -0,0 +1,93 @@
|
||||
Copyright (c) 2011, Denis Masharov (denis.masharov@gmail.com)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
95
src/public/fonts/Raleway/OFL.txt
Normal file
95
src/public/fonts/Raleway/OFL.txt
Normal file
@ -0,0 +1,95 @@
|
||||
Copyright (c) 2010, Matt McInerney (matt@pixelspread.com),
|
||||
Copyright (c) 2011, Pablo Impallari (www.impallari.com|impallari@gmail.com),
|
||||
Copyright (c) 2011, Rodrigo Fuenzalida (www.rfuenzalida.com|hello@rfuenzalida.com), with Reserved Font Name Raleway
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
src/public/fonts/Raleway/Raleway-Bold.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-Bold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-BoldItalic.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-Italic-VariableFont_wght.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-Italic-VariableFont_wght.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-Italic.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-Italic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-Regular.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-Regular.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-SemiBold.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-SemiBold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-SemiBoldItalic.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-SemiBoldItalic.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/Raleway/Raleway-VariableFont_wght.woff2
Normal file
BIN
src/public/fonts/Raleway/Raleway-VariableFont_wght.woff2
Normal file
Binary file not shown.
202
src/public/fonts/RobotoMono/LICENSE.txt
Normal file
202
src/public/fonts/RobotoMono/LICENSE.txt
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
BIN
src/public/fonts/RobotoMono/RobotoMono-Bold.woff2
Normal file
BIN
src/public/fonts/RobotoMono/RobotoMono-Bold.woff2
Normal file
Binary file not shown.
BIN
src/public/fonts/RobotoMono/RobotoMono-BoldItalic.woff2
Normal file
BIN
src/public/fonts/RobotoMono/RobotoMono-BoldItalic.woff2
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user