Upgrade to 3.3.6
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "getkirby/cms",
|
||||
"description": "The Kirby 3 core",
|
||||
"version": "3.3.5",
|
||||
"version": "3.3.6",
|
||||
"license": "proprietary",
|
||||
"keywords": ["kirby", "cms", "core"],
|
||||
"homepage": "https://getkirby.com",
|
||||
|
34
kirby/composer.lock
generated
34
kirby/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "75d7a57ba26b69913bbde61153e82d78",
|
||||
"content-hash": "957cce44d582e1e5af20616ff45b9c12",
|
||||
"packages": [
|
||||
{
|
||||
"name": "claviska/simpleimage",
|
||||
@@ -195,16 +195,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laminas/laminas-zendframework-bridge",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
|
||||
"reference": "0fb9675b84a1666ab45182b6c5b29956921e818d"
|
||||
"reference": "bfbbdb6c998d50dbf69d2187cb78a5f1fa36e1e9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d",
|
||||
"reference": "0fb9675b84a1666ab45182b6c5b29956921e818d",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bfbbdb6c998d50dbf69d2187cb78a5f1fa36e1e9",
|
||||
"reference": "bfbbdb6c998d50dbf69d2187cb78a5f1fa36e1e9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -243,7 +243,7 @@
|
||||
"laminas",
|
||||
"zf"
|
||||
],
|
||||
"time": "2020-01-07T22:58:31+00:00"
|
||||
"time": "2020-04-03T16:01:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/color-extractor",
|
||||
@@ -467,16 +467,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -510,20 +510,20 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2019-11-01T11:05:21+00:00"
|
||||
"time": "2020-03-23T09:12:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.14.0",
|
||||
"version": "v1.15.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "34094cfa9abe1f0f14f48f490772db7a775559f2"
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2",
|
||||
"reference": "34094cfa9abe1f0f14f48f490772db7a775559f2",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -535,7 +535,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.14-dev"
|
||||
"dev-master": "1.15-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -569,7 +569,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-01-13T11:15:53+00:00"
|
||||
"time": "2020-03-09T19:04:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "true/punycode",
|
||||
|
@@ -367,9 +367,9 @@
|
||||
"page.status.draft": "Utkast",
|
||||
"page.status.draft.description":
|
||||
"Sidan är ett utkast och endast synlig för inloggade redaktörer",
|
||||
"page.status.listed": "Publika",
|
||||
"page.status.listed": "Publik",
|
||||
"page.status.listed.description": "Sidan är publik för vem som helst",
|
||||
"page.status.unlisted": "Olistade",
|
||||
"page.status.unlisted": "Olistad",
|
||||
"page.status.unlisted.description": "Sidan är endast åtkomlig via URL",
|
||||
|
||||
"pages": "Sidor",
|
||||
|
@@ -189,21 +189,14 @@ class System
|
||||
*/
|
||||
public function isLocal(): bool
|
||||
{
|
||||
$server = $this->app->server();
|
||||
$host = $server->host();
|
||||
$server = $this->app->server();
|
||||
$visitor = $this->app->visitor();
|
||||
$host = $server->host();
|
||||
|
||||
if ($host === 'localhost') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (in_array($server->address(), ['::1', '127.0.0.1', '0.0.0.0']) === true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Str::endsWith($host, '.dev') === true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Str::endsWith($host, '.local') === true) {
|
||||
return true;
|
||||
}
|
||||
@@ -212,6 +205,27 @@ class System
|
||||
return true;
|
||||
}
|
||||
|
||||
if (in_array($visitor->ip(), ['::1', '127.0.0.1']) === true) {
|
||||
// ensure that there is no reverse proxy in between
|
||||
|
||||
if (
|
||||
isset($_SERVER['HTTP_X_FORWARDED_FOR']) === true &&
|
||||
in_array($_SERVER['HTTP_X_FORWARDED_FOR'], ['::1', '127.0.0.1']) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
isset($_SERVER['HTTP_CLIENT_IP']) === true &&
|
||||
in_array($_SERVER['HTTP_CLIENT_IP'], ['::1', '127.0.0.1']) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// no reverse proxy or the real client also comes from localhost
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -55,7 +55,7 @@ class Visitor
|
||||
*/
|
||||
public function __construct(array $arguments = [])
|
||||
{
|
||||
$this->ip($arguments['ip'] ?? getenv('REMOTE_ADDR'));
|
||||
$this->ip($arguments['ip'] ?? $_SERVER['REMOTE_ADDR'] ?? '');
|
||||
$this->userAgent($arguments['userAgent'] ?? $_SERVER['HTTP_USER_AGENT'] ?? '');
|
||||
$this->acceptedLanguage($arguments['acceptedLanguage'] ?? $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '');
|
||||
$this->acceptedMimeType($arguments['acceptedMimeType'] ?? $_SERVER['HTTP_ACCEPT'] ?? '');
|
||||
|
2
kirby/vendor/composer/autoload_classmap.php
vendored
2
kirby/vendor/composer/autoload_classmap.php
vendored
@@ -237,7 +237,7 @@ return array(
|
||||
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
|
||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
|
2
kirby/vendor/composer/autoload_static.php
vendored
2
kirby/vendor/composer/autoload_static.php
vendored
@@ -331,7 +331,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
|
||||
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
|
||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
|
@@ -2,23 +2,23 @@ body {
|
||||
font: 12px "Helvetica Neue", helvetica, arial, sans-serif;
|
||||
color: #131313;
|
||||
background: #eeeeee;
|
||||
padding: 0;
|
||||
padding:0;
|
||||
margin: 0;
|
||||
max-height: 100%;
|
||||
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.panel {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.branding {
|
||||
@@ -27,11 +27,11 @@ a {
|
||||
right: 20px;
|
||||
color: #777777;
|
||||
font-size: 10px;
|
||||
z-index: 100;
|
||||
}
|
||||
.branding a {
|
||||
color: #e95353;
|
||||
z-index: 100;
|
||||
}
|
||||
.branding a {
|
||||
color: #e95353;
|
||||
}
|
||||
|
||||
header {
|
||||
color: white;
|
||||
@@ -43,33 +43,32 @@ header {
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
header.header-expand {
|
||||
max-height: 1000px;
|
||||
}
|
||||
header.header-expand {
|
||||
max-height: 1000px;
|
||||
}
|
||||
|
||||
.exc-title {
|
||||
margin: 0;
|
||||
color: #bebebe;
|
||||
font-size: 14px;
|
||||
}
|
||||
.exc-title-primary,
|
||||
.exc-title-secondary {
|
||||
color: #e95353;
|
||||
}
|
||||
.exc-title {
|
||||
margin: 0;
|
||||
color: #bebebe;
|
||||
font-size: 14px;
|
||||
}
|
||||
.exc-title-primary, .exc-title-secondary {
|
||||
color: #e95353;
|
||||
}
|
||||
|
||||
.exc-message {
|
||||
font-size: 20px;
|
||||
word-wrap: break-word;
|
||||
margin: 4px 0 0 0;
|
||||
color: white;
|
||||
}
|
||||
.exc-message span {
|
||||
display: block;
|
||||
}
|
||||
.exc-message-empty-notice {
|
||||
color: #a29d9d;
|
||||
font-weight: 300;
|
||||
}
|
||||
.exc-message {
|
||||
font-size: 20px;
|
||||
word-wrap: break-word;
|
||||
margin: 4px 0 0 0;
|
||||
color: white;
|
||||
}
|
||||
.exc-message span {
|
||||
display: block;
|
||||
}
|
||||
.exc-message-empty-notice {
|
||||
color: #a29d9d;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.prev-exc-title {
|
||||
margin: 10px 0;
|
||||
@@ -95,215 +94,213 @@ header.header-expand {
|
||||
width: 70%;
|
||||
background: #fafafa;
|
||||
}
|
||||
.details {
|
||||
padding: 5px;
|
||||
}
|
||||
.details {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.details-heading {
|
||||
color: #4288ce;
|
||||
font-weight: 300;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.details-heading {
|
||||
color: #4288CE;
|
||||
font-weight: 300;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.details pre.sf-dump {
|
||||
white-space: pre;
|
||||
word-wrap: inherit;
|
||||
}
|
||||
.details pre.sf-dump {
|
||||
white-space: pre;
|
||||
word-wrap: inherit;
|
||||
}
|
||||
|
||||
.details pre.sf-dump,
|
||||
.details pre.sf-dump .sf-dump-num,
|
||||
.details pre.sf-dump .sf-dump-const,
|
||||
.details pre.sf-dump .sf-dump-str,
|
||||
.details pre.sf-dump .sf-dump-note,
|
||||
.details pre.sf-dump .sf-dump-ref,
|
||||
.details pre.sf-dump .sf-dump-public,
|
||||
.details pre.sf-dump .sf-dump-protected,
|
||||
.details pre.sf-dump .sf-dump-private,
|
||||
.details pre.sf-dump .sf-dump-meta,
|
||||
.details pre.sf-dump .sf-dump-key,
|
||||
.details pre.sf-dump .sf-dump-index {
|
||||
color: #463c54;
|
||||
}
|
||||
.details pre.sf-dump,
|
||||
.details pre.sf-dump .sf-dump-num,
|
||||
.details pre.sf-dump .sf-dump-const,
|
||||
.details pre.sf-dump .sf-dump-str,
|
||||
.details pre.sf-dump .sf-dump-note,
|
||||
.details pre.sf-dump .sf-dump-ref,
|
||||
.details pre.sf-dump .sf-dump-public,
|
||||
.details pre.sf-dump .sf-dump-protected,
|
||||
.details pre.sf-dump .sf-dump-private,
|
||||
.details pre.sf-dump .sf-dump-meta,
|
||||
.details pre.sf-dump .sf-dump-key,
|
||||
.details pre.sf-dump .sf-dump-index {
|
||||
color: #463C54;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 30%;
|
||||
background: #ded8d8;
|
||||
}
|
||||
|
||||
.frames-description {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
padding: 8px 15px;
|
||||
color: #a29d9d;
|
||||
font-size: 11px;
|
||||
}
|
||||
.frames-description {
|
||||
background: rgba(0, 0, 0, .05);
|
||||
padding: 8px 15px;
|
||||
color: #a29d9d;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.frames-description.frames-description-application {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
.frames-container.frames-container-application .frame:not(.frame-application) {
|
||||
display: none;
|
||||
}
|
||||
.frames-description.frames-description-application {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
.frames-container.frames-container-application .frame:not(.frame-application) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.frames-tab {
|
||||
color: #a29d9d;
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
margin: 0 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.frames-tab {
|
||||
color: #a29d9d;
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
margin: 0 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.frames-tab.frames-tab-active {
|
||||
background-color: #2a2a2a;
|
||||
color: #bebebe;
|
||||
}
|
||||
.frames-tab.frames-tab-active {
|
||||
background-color: #2a2a2a;
|
||||
color: #bebebe;
|
||||
}
|
||||
|
||||
.frame {
|
||||
padding: 14px;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.frame:not(:last-child) {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.frame {
|
||||
padding: 14px;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.frame:not(:last-child) {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
.frame.active {
|
||||
box-shadow: inset -5px 0 0 0 #4288ce;
|
||||
color: #4288ce;
|
||||
}
|
||||
.frame.active {
|
||||
box-shadow: inset -5px 0 0 0 #4288CE;
|
||||
color: #4288CE;
|
||||
}
|
||||
|
||||
.frame:not(.active):hover {
|
||||
background: #bee9ea;
|
||||
}
|
||||
.frame:not(.active):hover {
|
||||
background: #BEE9EA;
|
||||
}
|
||||
|
||||
.frame-method-info {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.frame-method-info {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.frame-class,
|
||||
.frame-function,
|
||||
.frame-index {
|
||||
font-size: 14px;
|
||||
}
|
||||
.frame-class, .frame-function, .frame-index {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.frame-index {
|
||||
float: left;
|
||||
}
|
||||
.frame-index {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.frame-method-info {
|
||||
margin-left: 24px;
|
||||
}
|
||||
.frame-method-info {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.frame-index {
|
||||
font-size: 11px;
|
||||
color: #a29d9d;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
line-height: 18px;
|
||||
border-radius: 5px;
|
||||
padding: 0 1px 0 1px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
.frame-index {
|
||||
font-size: 11px;
|
||||
color: #a29d9d;
|
||||
background-color: rgba(0, 0, 0, .05);
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
line-height: 18px;
|
||||
border-radius: 5px;
|
||||
padding: 0 1px 0 1px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.frame-application .frame-index {
|
||||
background-color: #2a2a2a;
|
||||
color: #bebebe;
|
||||
}
|
||||
.frame-application .frame-index {
|
||||
background-color: #2a2a2a;
|
||||
color: #bebebe;
|
||||
}
|
||||
|
||||
.frame-file {
|
||||
font-family: "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas,
|
||||
"Lucida Console", monospace;
|
||||
color: #a29d9d;
|
||||
}
|
||||
.frame-file {
|
||||
font-family: "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas, "Lucida Console", monospace;
|
||||
color: #a29d9d;
|
||||
}
|
||||
|
||||
.frame-file .editor-link {
|
||||
color: #a29d9d;
|
||||
}
|
||||
.frame-file .editor-link {
|
||||
color: #a29d9d;
|
||||
}
|
||||
|
||||
.frame-line {
|
||||
font-weight: bold;
|
||||
}
|
||||
.frame-line {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.frame-line:before {
|
||||
content: ":";
|
||||
}
|
||||
.frame-line:before {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
.frame-code {
|
||||
padding: 5px;
|
||||
background: #303030;
|
||||
display: none;
|
||||
}
|
||||
.frame-code {
|
||||
padding: 5px;
|
||||
background: #303030;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.frame-code.active {
|
||||
display: block;
|
||||
}
|
||||
.frame-code.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.frame-code .frame-file {
|
||||
color: #a29d9d;
|
||||
padding: 12px 6px;
|
||||
.frame-code .frame-file {
|
||||
color: #a29d9d;
|
||||
padding: 12px 6px;
|
||||
|
||||
border-bottom: none;
|
||||
}
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.code-block {
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 3px 0 rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.05),
|
||||
inset 0 0 1px 0 rgba(255, 255, 255, 0.07);
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
.code-block {
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 3px 0 rgba(0, 0, 0, .05),
|
||||
0 10px 30px rgba(0, 0, 0, .05),
|
||||
inset 0 0 1px 0 rgba(255, 255, 255, .07);
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
.linenums {
|
||||
margin: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.linenums {
|
||||
margin: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.frame-comments {
|
||||
border-top: none;
|
||||
margin-top: 15px;
|
||||
.frame-comments {
|
||||
border-top: none;
|
||||
margin-top: 15px;
|
||||
|
||||
font-size: 12px;
|
||||
}
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.frame-comments.empty {
|
||||
}
|
||||
.frame-comments.empty {
|
||||
}
|
||||
|
||||
.frame-comments.empty:before {
|
||||
content: "No comments for this stack frame.";
|
||||
font-weight: 300;
|
||||
color: #a29d9d;
|
||||
}
|
||||
.frame-comments.empty:before {
|
||||
content: "No comments for this stack frame.";
|
||||
font-weight: 300;
|
||||
color: #a29d9d;
|
||||
}
|
||||
|
||||
.frame-comment {
|
||||
padding: 10px;
|
||||
color: #e3e3e3;
|
||||
border-radius: 6px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.frame-comment a {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
.frame-comment a:hover {
|
||||
color: #4bb1b1;
|
||||
}
|
||||
.frame-comment {
|
||||
padding: 10px;
|
||||
color: #e3e3e3;
|
||||
border-radius: 6px;
|
||||
background-color: rgba(255, 255, 255, .05);
|
||||
}
|
||||
.frame-comment a {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
.frame-comment a:hover {
|
||||
color: #4bb1b1;
|
||||
}
|
||||
|
||||
.frame-comment:not(:last-child) {
|
||||
border-bottom: 1px dotted rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.frame-comment:not(:last-child) {
|
||||
border-bottom: 1px dotted rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
.frame-comment-context {
|
||||
font-size: 10px;
|
||||
color: white;
|
||||
}
|
||||
.frame-comment-context {
|
||||
font-size: 10px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.delimiter {
|
||||
display: inline-block;
|
||||
@@ -320,143 +317,94 @@ header.header-expand {
|
||||
margin-bottom: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.data-table {
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.data-table {
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.data-table tbody {
|
||||
font: 13px "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas,
|
||||
"Lucida Console", monospace;
|
||||
}
|
||||
.data-table tbody {
|
||||
font: 13px "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas, "Lucida Console", monospace;
|
||||
}
|
||||
|
||||
.data-table thead {
|
||||
display: none;
|
||||
}
|
||||
.data-table thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.data-table tr {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.data-table tr {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.data-table td:first-child {
|
||||
width: 20%;
|
||||
min-width: 130px;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
color: #463c54;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.data-table td:first-child {
|
||||
width: 20%;
|
||||
min-width: 130px;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
color: #463C54;
|
||||
padding-right: 5px;
|
||||
|
||||
.data-table td:last-child {
|
||||
width: 80%;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.data-table span.empty {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
font-weight: 300;
|
||||
}
|
||||
.data-table label.empty {
|
||||
display: inline;
|
||||
}
|
||||
.data-table td:last-child {
|
||||
width: 80%;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
.data-table span.empty {
|
||||
color: rgba(0, 0, 0, .3);
|
||||
font-weight: 300;
|
||||
}
|
||||
.data-table label.empty {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.handler {
|
||||
padding: 4px 0;
|
||||
font: 14px "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas,
|
||||
"Lucida Console", monospace;
|
||||
font: 14px "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas, "Lucida Console", monospace;
|
||||
}
|
||||
|
||||
/* prettify code style
|
||||
Uses the Doxy theme as a base */
|
||||
pre .str,
|
||||
code .str {
|
||||
color: #bcd42a;
|
||||
} /* string */
|
||||
pre .kwd,
|
||||
code .kwd {
|
||||
color: #4bb1b1;
|
||||
font-weight: bold;
|
||||
} /* keyword*/
|
||||
pre .com,
|
||||
code .com {
|
||||
color: #888;
|
||||
font-weight: bold;
|
||||
} /* comment */
|
||||
pre .typ,
|
||||
code .typ {
|
||||
color: #ef7c61;
|
||||
} /* type */
|
||||
pre .lit,
|
||||
code .lit {
|
||||
color: #bcd42a;
|
||||
} /* literal */
|
||||
pre .pun,
|
||||
code .pun {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
} /* punctuation */
|
||||
pre .pln,
|
||||
code .pln {
|
||||
color: #e9e4e5;
|
||||
} /* plaintext */
|
||||
pre .tag,
|
||||
code .tag {
|
||||
color: #4bb1b1;
|
||||
} /* html/xml tag */
|
||||
pre .htm,
|
||||
code .htm {
|
||||
color: #dda0dd;
|
||||
} /* html tag */
|
||||
pre .xsl,
|
||||
code .xsl {
|
||||
color: #d0a0d0;
|
||||
} /* xslt tag */
|
||||
pre .atn,
|
||||
code .atn {
|
||||
color: #ef7c61;
|
||||
font-weight: normal;
|
||||
} /* html/xml attribute name */
|
||||
pre .atv,
|
||||
code .atv {
|
||||
color: #bcd42a;
|
||||
} /* html/xml attribute value */
|
||||
pre .dec,
|
||||
code .dec {
|
||||
color: #606;
|
||||
} /* decimal */
|
||||
pre.code-block,
|
||||
code.code-block,
|
||||
.frame-args.code-block,
|
||||
.frame-args.code-block samp {
|
||||
font-family: "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas,
|
||||
"Lucida Console", monospace;
|
||||
pre .str, code .str { color: #BCD42A; } /* string */
|
||||
pre .kwd, code .kwd { color: #4bb1b1; font-weight: bold; } /* keyword*/
|
||||
pre .com, code .com { color: #888; font-weight: bold; } /* comment */
|
||||
pre .typ, code .typ { color: #ef7c61; } /* type */
|
||||
pre .lit, code .lit { color: #BCD42A; } /* literal */
|
||||
pre .pun, code .pun { color: #fff; font-weight: bold; } /* punctuation */
|
||||
pre .pln, code .pln { color: #e9e4e5; } /* plaintext */
|
||||
pre .tag, code .tag { color: #4bb1b1; } /* html/xml tag */
|
||||
pre .htm, code .htm { color: #dda0dd; } /* html tag */
|
||||
pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */
|
||||
pre .atn, code .atn { color: #ef7c61; font-weight: normal;} /* html/xml attribute name */
|
||||
pre .atv, code .atv { color: #bcd42a; } /* html/xml attribute value */
|
||||
pre .dec, code .dec { color: #606; } /* decimal */
|
||||
pre.code-block, code.code-block, .frame-args.code-block, .frame-args.code-block samp {
|
||||
font-family: "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas, "Lucida Console", monospace;
|
||||
background: #333;
|
||||
color: #e9e4e5;
|
||||
}
|
||||
pre.code-block {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
pre.code-block {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
pre.code-block a,
|
||||
code.code-block a {
|
||||
text-decoration: none;
|
||||
}
|
||||
pre.code-block a, code.code-block a {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.linenums li {
|
||||
color: #a5a5a5;
|
||||
}
|
||||
.linenums li {
|
||||
color: #A5A5A5;
|
||||
}
|
||||
|
||||
.linenums li.current {
|
||||
background: rgba(255, 100, 100, 0.07);
|
||||
}
|
||||
.linenums li.current.active {
|
||||
background: rgba(255, 100, 100, 0.17);
|
||||
}
|
||||
.linenums li.current{
|
||||
background: rgba(255, 100, 100, .07);
|
||||
}
|
||||
.linenums li.current.active {
|
||||
background: rgba(255, 100, 100, .17);
|
||||
}
|
||||
|
||||
pre:not(.prettyprinted) {
|
||||
padding-left: 60px;
|
||||
@@ -472,7 +420,7 @@ pre:not(.prettyprinted) {
|
||||
}
|
||||
|
||||
.clipboard {
|
||||
opacity: 0.8;
|
||||
opacity: .8;
|
||||
background: none;
|
||||
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
@@ -483,10 +431,10 @@ pre:not(.prettyprinted) {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.clipboard:hover {
|
||||
box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
.clipboard:hover {
|
||||
box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* inspired by githubs kbd styles */
|
||||
kbd {
|
||||
@@ -507,12 +455,12 @@ kbd {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
/* == Media queries */
|
||||
|
||||
/* Expand the spacing in the details section */
|
||||
@media (min-width: 1000px) {
|
||||
.details,
|
||||
.frame-code {
|
||||
.details, .frame-code {
|
||||
padding: 20px 40px;
|
||||
}
|
||||
|
||||
@@ -548,23 +496,23 @@ kbd {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.data-table tbody tr:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
.data-table tbody tr:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.data-table tbody td:first-child,
|
||||
.data-table tbody td:last-child {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.data-table tbody td:first-child,
|
||||
.data-table tbody td:last-child {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.data-table tbody td:last-child {
|
||||
padding-top: 3px;
|
||||
}
|
||||
.data-table tbody td:last-child {
|
||||
padding-top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltipped {
|
||||
position: relative;
|
||||
position: relative
|
||||
}
|
||||
.tooltipped:after {
|
||||
position: absolute;
|
||||
@@ -583,7 +531,7 @@ kbd {
|
||||
content: attr(aria-label);
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border-radius: 3px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-webkit-font-smoothing: subpixel-antialiased
|
||||
}
|
||||
.tooltipped:before {
|
||||
position: absolute;
|
||||
@@ -594,7 +542,7 @@ kbd {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
pointer-events: none;
|
||||
content: "";
|
||||
border: 5px solid transparent;
|
||||
border: 5px solid transparent
|
||||
}
|
||||
.tooltipped:hover:before,
|
||||
.tooltipped:hover:after,
|
||||
@@ -603,19 +551,19 @@ kbd {
|
||||
.tooltipped:focus:before,
|
||||
.tooltipped:focus:after {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
text-decoration: none
|
||||
}
|
||||
.tooltipped-s:after {
|
||||
top: 100%;
|
||||
right: 50%;
|
||||
margin-top: 5px;
|
||||
margin-top: 5px
|
||||
}
|
||||
.tooltipped-s:before {
|
||||
top: auto;
|
||||
right: 50%;
|
||||
bottom: -5px;
|
||||
margin-right: -5px;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.8);
|
||||
border-bottom-color: rgba(0, 0, 0, 0.8)
|
||||
}
|
||||
|
||||
pre.sf-dump {
|
||||
@@ -630,24 +578,25 @@ pre.sf-dump {
|
||||
list-style-type: none;
|
||||
display: inline-block;
|
||||
}
|
||||
.search-for-help li {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.search-for-help li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.search-for-help li a {
|
||||
}
|
||||
.search-for-help li a i {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
.search-for-help li a svg {
|
||||
fill: #fff;
|
||||
}
|
||||
.search-for-help li a svg path {
|
||||
background-size: contain;
|
||||
}
|
||||
.search-for-help li {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.search-for-help li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.search-for-help li a {
|
||||
|
||||
}
|
||||
.search-for-help li a i {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
.search-for-help li a svg {
|
||||
fill: #fff;
|
||||
}
|
||||
.search-for-help li a svg path {
|
||||
background-size: contain;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,753 +1,28 @@
|
||||
var r = null;
|
||||
window.PR_SHOULD_USE_CONTINUATION = !0;
|
||||
(function() {
|
||||
function O(a) {
|
||||
function i(d) {
|
||||
var a = d.charCodeAt(0);
|
||||
if (a !== 92) return a;
|
||||
var f = d.charAt(1);
|
||||
return (a = s[f])
|
||||
? a
|
||||
: "0" <= f && f <= "7"
|
||||
? parseInt(d.substring(1), 8)
|
||||
: f === "u" || f === "x"
|
||||
? parseInt(d.substring(2), 16)
|
||||
: d.charCodeAt(1);
|
||||
}
|
||||
function g(d) {
|
||||
if (d < 32) return (d < 16 ? "\\x0" : "\\x") + d.toString(16);
|
||||
d = String.fromCharCode(d);
|
||||
return d === "\\" || d === "-" || d === "]" || d === "^" ? "\\" + d : d;
|
||||
}
|
||||
function j(d) {
|
||||
var a = d
|
||||
.substring(1, d.length - 1)
|
||||
.match(
|
||||
/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g
|
||||
),
|
||||
d = [],
|
||||
f = a[0] === "^",
|
||||
b = ["["];
|
||||
f && b.push("^");
|
||||
for (var f = f ? 1 : 0, c = a.length; f < c; ++f) {
|
||||
var h = a[f];
|
||||
if (/\\[bdsw]/i.test(h)) b.push(h);
|
||||
else {
|
||||
var h = i(h),
|
||||
e;
|
||||
f + 2 < c && "-" === a[f + 1]
|
||||
? ((e = i(a[f + 2])), (f += 2))
|
||||
: (e = h);
|
||||
d.push([h, e]);
|
||||
e < 65 ||
|
||||
h > 122 ||
|
||||
(e < 65 ||
|
||||
h > 90 ||
|
||||
d.push([Math.max(65, h) | 32, Math.min(e, 90) | 32]),
|
||||
e < 97 ||
|
||||
h > 122 ||
|
||||
d.push([Math.max(97, h) & -33, Math.min(e, 122) & -33]));
|
||||
}
|
||||
}
|
||||
d.sort(function(d, a) {
|
||||
return d[0] - a[0] || a[1] - d[1];
|
||||
});
|
||||
a = [];
|
||||
c = [];
|
||||
for (f = 0; f < d.length; ++f)
|
||||
(h = d[f]),
|
||||
h[0] <= c[1] + 1 ? (c[1] = Math.max(c[1], h[1])) : a.push((c = h));
|
||||
for (f = 0; f < a.length; ++f)
|
||||
(h = a[f]),
|
||||
b.push(g(h[0])),
|
||||
h[1] > h[0] && (h[1] + 1 > h[0] && b.push("-"), b.push(g(h[1])));
|
||||
b.push("]");
|
||||
return b.join("");
|
||||
}
|
||||
function t(d) {
|
||||
for (
|
||||
var a = d.source.match(
|
||||
/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g
|
||||
),
|
||||
b = a.length,
|
||||
i = [],
|
||||
c = 0,
|
||||
h = 0;
|
||||
c < b;
|
||||
++c
|
||||
) {
|
||||
var e = a[c];
|
||||
e === "("
|
||||
? ++h
|
||||
: "\\" === e.charAt(0) &&
|
||||
(e = +e.substring(1)) &&
|
||||
(e <= h ? (i[e] = -1) : (a[c] = g(e)));
|
||||
}
|
||||
for (c = 1; c < i.length; ++c) -1 === i[c] && (i[c] = ++z);
|
||||
for (h = c = 0; c < b; ++c)
|
||||
(e = a[c]),
|
||||
e === "("
|
||||
? (++h, i[h] || (a[c] = "(?:"))
|
||||
: "\\" === e.charAt(0) &&
|
||||
(e = +e.substring(1)) &&
|
||||
e <= h &&
|
||||
(a[c] = "\\" + i[e]);
|
||||
for (c = 0; c < b; ++c) "^" === a[c] && "^" !== a[c + 1] && (a[c] = "");
|
||||
if (d.ignoreCase && w)
|
||||
for (c = 0; c < b; ++c)
|
||||
(e = a[c]),
|
||||
(d = e.charAt(0)),
|
||||
e.length >= 2 && d === "["
|
||||
? (a[c] = j(e))
|
||||
: d !== "\\" &&
|
||||
(a[c] = e.replace(/[A-Za-z]/g, function(d) {
|
||||
d = d.charCodeAt(0);
|
||||
return "[" + String.fromCharCode(d & -33, d | 32) + "]";
|
||||
}));
|
||||
return a.join("");
|
||||
}
|
||||
for (var z = 0, w = !1, k = !1, m = 0, b = a.length; m < b; ++m) {
|
||||
var o = a[m];
|
||||
if (o.ignoreCase) k = !0;
|
||||
else if (
|
||||
/[a-z]/i.test(
|
||||
o.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi, "")
|
||||
)
|
||||
) {
|
||||
w = !0;
|
||||
k = !1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (
|
||||
var s = {
|
||||
b: 8,
|
||||
t: 9,
|
||||
n: 10,
|
||||
v: 11,
|
||||
f: 12,
|
||||
r: 13
|
||||
},
|
||||
q = [],
|
||||
m = 0,
|
||||
b = a.length;
|
||||
m < b;
|
||||
++m
|
||||
) {
|
||||
o = a[m];
|
||||
if (o.global || o.multiline) throw Error("" + o);
|
||||
q.push("(?:" + t(o) + ")");
|
||||
}
|
||||
return RegExp(q.join("|"), k ? "gi" : "g");
|
||||
}
|
||||
function P(a, i) {
|
||||
function g(a) {
|
||||
switch (a.nodeType) {
|
||||
case 1:
|
||||
if (j.test(a.className)) break;
|
||||
for (var b = a.firstChild; b; b = b.nextSibling) g(b);
|
||||
b = a.nodeName.toLowerCase();
|
||||
if ("br" === b || "li" === b)
|
||||
(t[k] = "\n"), (w[k << 1] = z++), (w[(k++ << 1) | 1] = a);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
(b = a.nodeValue),
|
||||
b.length &&
|
||||
((b = i
|
||||
? b.replace(/\r\n?/g, "\n")
|
||||
: b.replace(/[\t\n\r ]+/g, " ")),
|
||||
(t[k] = b),
|
||||
(w[k << 1] = z),
|
||||
(z += b.length),
|
||||
(w[(k++ << 1) | 1] = a));
|
||||
}
|
||||
}
|
||||
var j = /(?:^|\s)nocode(?:\s|$)/,
|
||||
t = [],
|
||||
z = 0,
|
||||
w = [],
|
||||
k = 0;
|
||||
g(a);
|
||||
return { a: t.join("").replace(/\n$/, ""), d: w };
|
||||
}
|
||||
function E(a, i, g, j) {
|
||||
i && ((a = { a: i, e: a }), g(a), j.push.apply(j, a.g));
|
||||
}
|
||||
function x(a, i) {
|
||||
function g(a) {
|
||||
for (
|
||||
var k = a.e,
|
||||
m = [k, "pln"],
|
||||
b = 0,
|
||||
o = a.a.match(t) || [],
|
||||
s = {},
|
||||
q = 0,
|
||||
d = o.length;
|
||||
q < d;
|
||||
++q
|
||||
) {
|
||||
var v = o[q],
|
||||
f = s[v],
|
||||
u = void 0,
|
||||
c;
|
||||
if (typeof f === "string") c = !1;
|
||||
else {
|
||||
var h = j[v.charAt(0)];
|
||||
if (h) (u = v.match(h[1])), (f = h[0]);
|
||||
else {
|
||||
for (c = 0; c < z; ++c)
|
||||
if (((h = i[c]), (u = v.match(h[1])))) {
|
||||
f = h[0];
|
||||
break;
|
||||
}
|
||||
u || (f = "pln");
|
||||
}
|
||||
if (
|
||||
(c = f.length >= 5 && "lang-" === f.substring(0, 5)) &&
|
||||
!(u && typeof u[1] === "string")
|
||||
)
|
||||
(c = !1), (f = "src");
|
||||
c || (s[v] = f);
|
||||
}
|
||||
h = b;
|
||||
b += v.length;
|
||||
if (c) {
|
||||
c = u[1];
|
||||
var e = v.indexOf(c),
|
||||
p = e + c.length;
|
||||
u[2] && ((p = v.length - u[2].length), (e = p - c.length));
|
||||
f = f.substring(5);
|
||||
E(k + h, v.substring(0, e), g, m);
|
||||
E(k + h + e, c, F(f, c), m);
|
||||
E(k + h + p, v.substring(p), g, m);
|
||||
} else m.push(k + h, f);
|
||||
}
|
||||
a.g = m;
|
||||
}
|
||||
var j = {},
|
||||
t;
|
||||
(function() {
|
||||
for (
|
||||
var g = a.concat(i), k = [], m = {}, b = 0, o = g.length;
|
||||
b < o;
|
||||
++b
|
||||
) {
|
||||
var s = g[b],
|
||||
q = s[3];
|
||||
if (q) for (var d = q.length; --d >= 0; ) j[q.charAt(d)] = s;
|
||||
s = s[1];
|
||||
q = "" + s;
|
||||
m.hasOwnProperty(q) || (k.push(s), (m[q] = r));
|
||||
}
|
||||
k.push(/[\S\s]/);
|
||||
t = O(k);
|
||||
})();
|
||||
var z = i.length;
|
||||
return g;
|
||||
}
|
||||
function l(a) {
|
||||
var i = [],
|
||||
g = [];
|
||||
a.tripleQuotedStrings
|
||||
? i.push([
|
||||
"str",
|
||||
/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,
|
||||
r,
|
||||
"'\""
|
||||
])
|
||||
: a.multiLineStrings
|
||||
? i.push([
|
||||
"str",
|
||||
/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
r,
|
||||
"'\"`"
|
||||
])
|
||||
: i.push([
|
||||
"str",
|
||||
/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,
|
||||
r,
|
||||
"\"'"
|
||||
]);
|
||||
a.verbatimStrings && g.push(["str", /^@"(?:[^"]|"")*(?:"|$)/, r]);
|
||||
var j = a.hashComments;
|
||||
j &&
|
||||
(a.cStyleComments
|
||||
? (j > 1
|
||||
? i.push(["com", /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, r, "#"])
|
||||
: i.push([
|
||||
"com",
|
||||
/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,
|
||||
r,
|
||||
"#"
|
||||
]),
|
||||
g.push([
|
||||
"str",
|
||||
/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
|
||||
r
|
||||
]))
|
||||
: i.push(["com", /^#[^\n\r]*/, r, "#"]));
|
||||
a.cStyleComments &&
|
||||
(g.push(["com", /^\/\/[^\n\r]*/, r]),
|
||||
g.push(["com", /^\/\*[\S\s]*?(?:\*\/|$)/, r]));
|
||||
a.regexLiterals &&
|
||||
g.push([
|
||||
"lang-regex",
|
||||
/^(?:^^\.?|[+-]|[!=]={0,2}|#|%=?|&&?=?|\(|\*=?|[+-]=|->|\/=?|::?|<<?=?|>{1,3}=?|[,;?@[{~]|\^\^?=?|\|\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/
|
||||
]);
|
||||
(j = a.types) && g.push(["typ", j]);
|
||||
a = ("" + a.keywords).replace(/^ | $/g, "");
|
||||
a.length &&
|
||||
g.push(["kwd", RegExp("^(?:" + a.replace(/[\s,]+/g, "|") + ")\\b"), r]);
|
||||
i.push(["pln", /^\s+/, r, " \r\n\t\u00a0"]);
|
||||
g.push(
|
||||
["lit", /^@[$_a-z][\w$@]*/i, r],
|
||||
["typ", /^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/, r],
|
||||
["pln", /^[$_a-z][\w$@]*/i, r],
|
||||
[
|
||||
"lit",
|
||||
/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,
|
||||
r,
|
||||
"0123456789"
|
||||
],
|
||||
["pln", /^\\[\S\s]?/, r],
|
||||
["pun", /^.[^\s\w"$'./@\\`]*/, r]
|
||||
);
|
||||
return x(i, g);
|
||||
}
|
||||
function G(a, i, g) {
|
||||
function j(a) {
|
||||
switch (a.nodeType) {
|
||||
case 1:
|
||||
if (z.test(a.className)) break;
|
||||
if ("br" === a.nodeName)
|
||||
t(a), a.parentNode && a.parentNode.removeChild(a);
|
||||
else for (a = a.firstChild; a; a = a.nextSibling) j(a);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
if (g) {
|
||||
var b = a.nodeValue,
|
||||
f = b.match(n);
|
||||
if (f) {
|
||||
var i = b.substring(0, f.index);
|
||||
a.nodeValue = i;
|
||||
(b = b.substring(f.index + f[0].length)) &&
|
||||
a.parentNode.insertBefore(k.createTextNode(b), a.nextSibling);
|
||||
t(a);
|
||||
i || a.parentNode.removeChild(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function t(a) {
|
||||
function i(a, b) {
|
||||
var d = b ? a.cloneNode(!1) : a,
|
||||
e = a.parentNode;
|
||||
if (e) {
|
||||
var e = i(e, 1),
|
||||
f = a.nextSibling;
|
||||
e.appendChild(d);
|
||||
for (var g = f; g; g = f) (f = g.nextSibling), e.appendChild(g);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
for (; !a.nextSibling; ) if (((a = a.parentNode), !a)) return;
|
||||
for (
|
||||
var a = i(a.nextSibling, 0), f;
|
||||
(f = a.parentNode) && f.nodeType === 1;
|
||||
|
||||
)
|
||||
a = f;
|
||||
b.push(a);
|
||||
}
|
||||
for (
|
||||
var z = /(?:^|\s)nocode(?:\s|$)/,
|
||||
n = /\r\n?|\n/,
|
||||
k = a.ownerDocument,
|
||||
m = k.createElement("li");
|
||||
a.firstChild;
|
||||
|
||||
)
|
||||
m.appendChild(a.firstChild);
|
||||
for (var b = [m], o = 0; o < b.length; ++o) j(b[o]);
|
||||
i === (i | 0) && b[0].setAttribute("value", i);
|
||||
var s = k.createElement("ol");
|
||||
s.className = "linenums";
|
||||
for (var i = Math.max(0, (i - 1) | 0) || 0, o = 0, q = b.length; o < q; ++o)
|
||||
(m = b[o]),
|
||||
(m.className = "L" + (o + i) % 10),
|
||||
m.firstChild || m.appendChild(k.createTextNode("\u00a0")),
|
||||
s.appendChild(m);
|
||||
a.appendChild(s);
|
||||
}
|
||||
function n(a, i) {
|
||||
for (var g = i.length; --g >= 0; ) {
|
||||
var j = i[g];
|
||||
A.hasOwnProperty(j)
|
||||
? C.console && console.warn("cannot override language handler %s", j)
|
||||
: (A[j] = a);
|
||||
}
|
||||
}
|
||||
function F(a, i) {
|
||||
if (!a || !A.hasOwnProperty(a))
|
||||
a = /^\s*</.test(i) ? "default-markup" : "default-code";
|
||||
return A[a];
|
||||
}
|
||||
function H(a) {
|
||||
var i = a.h;
|
||||
try {
|
||||
var g = P(a.c, a.i),
|
||||
j = g.a;
|
||||
a.a = j;
|
||||
a.d = g.d;
|
||||
a.e = 0;
|
||||
F(i, j)(a);
|
||||
var t = /\bMSIE\s(\d+)/.exec(navigator.userAgent),
|
||||
t = t && +t[1] <= 8,
|
||||
i = /\n/g,
|
||||
n = a.a,
|
||||
w = n.length,
|
||||
g = 0,
|
||||
k = a.d,
|
||||
m = k.length,
|
||||
j = 0,
|
||||
b = a.g,
|
||||
o = b.length,
|
||||
s = 0;
|
||||
b[o] = w;
|
||||
var q, d;
|
||||
for (d = q = 0; d < o; )
|
||||
b[d] !== b[d + 2] ? ((b[q++] = b[d++]), (b[q++] = b[d++])) : (d += 2);
|
||||
o = q;
|
||||
for (d = q = 0; d < o; ) {
|
||||
for (
|
||||
var v = b[d], f = b[d + 1], u = d + 2;
|
||||
u + 2 <= o && b[u + 1] === f;
|
||||
|
||||
)
|
||||
u += 2;
|
||||
b[q++] = v;
|
||||
b[q++] = f;
|
||||
d = u;
|
||||
}
|
||||
b.length = q;
|
||||
var c = a.c,
|
||||
h;
|
||||
if (c) (h = c.style.display), (c.style.display = "none");
|
||||
try {
|
||||
for (; j < m; ) {
|
||||
var e = k[j + 2] || w,
|
||||
p = b[s + 2] || w,
|
||||
u = Math.min(e, p),
|
||||
l = k[j + 1],
|
||||
D;
|
||||
if (l.nodeType !== 1 && (D = n.substring(g, u))) {
|
||||
t && (D = D.replace(i, "\r"));
|
||||
l.nodeValue = D;
|
||||
var y = l.ownerDocument,
|
||||
x = y.createElement("span");
|
||||
x.className = b[s + 1];
|
||||
var B = l.parentNode;
|
||||
B.replaceChild(x, l);
|
||||
x.appendChild(l);
|
||||
g < e &&
|
||||
((k[j + 1] = l = y.createTextNode(n.substring(u, e))),
|
||||
B.insertBefore(l, x.nextSibling));
|
||||
}
|
||||
g = u;
|
||||
g >= e && (j += 2);
|
||||
g >= p && (s += 2);
|
||||
}
|
||||
} finally {
|
||||
if (c) c.style.display = h;
|
||||
}
|
||||
} catch (A) {
|
||||
C.console && console.log(A && A.stack ? A.stack : A);
|
||||
}
|
||||
}
|
||||
var C = window,
|
||||
y = ["break,continue,do,else,for,if,return,while"],
|
||||
B = [
|
||||
[
|
||||
y,
|
||||
"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"
|
||||
],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"
|
||||
],
|
||||
I = [
|
||||
B,
|
||||
"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"
|
||||
],
|
||||
J = [
|
||||
B,
|
||||
"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"
|
||||
],
|
||||
K = [
|
||||
J,
|
||||
"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"
|
||||
],
|
||||
B = [
|
||||
B,
|
||||
"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"
|
||||
],
|
||||
L = [
|
||||
y,
|
||||
"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"
|
||||
],
|
||||
M = [
|
||||
y,
|
||||
"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"
|
||||
],
|
||||
y = [y, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"],
|
||||
N = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
||||
Q = /\S/,
|
||||
R = l({
|
||||
keywords: [
|
||||
I,
|
||||
K,
|
||||
B,
|
||||
"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END" +
|
||||
L,
|
||||
M,
|
||||
y
|
||||
],
|
||||
hashComments: !0,
|
||||
cStyleComments: !0,
|
||||
multiLineStrings: !0,
|
||||
regexLiterals: !0
|
||||
}),
|
||||
A = {};
|
||||
n(R, ["default-code"]);
|
||||
n(
|
||||
x(
|
||||
[],
|
||||
[
|
||||
["pln", /^[^<?]+/],
|
||||
["dec", /^<!\w[^>]*(?:>|$)/],
|
||||
["com", /^<\!--[\S\s]*?(?:--\>|$)/],
|
||||
["lang-", /^<\?([\S\s]+?)(?:\?>|$)/],
|
||||
["lang-", /^<%([\S\s]+?)(?:%>|$)/],
|
||||
["pun", /^(?:<[%?]|[%?]>)/],
|
||||
["lang-", /^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],
|
||||
["lang-js", /^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],
|
||||
["lang-css", /^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],
|
||||
["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i]
|
||||
]
|
||||
),
|
||||
["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]
|
||||
);
|
||||
n(
|
||||
x(
|
||||
[
|
||||
["pln", /^\s+/, r, " \t\r\n"],
|
||||
["atv", /^(?:"[^"]*"?|'[^']*'?)/, r, "\"'"]
|
||||
],
|
||||
[
|
||||
["tag", /^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],
|
||||
["atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
|
||||
["lang-uq.val", /^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],
|
||||
["pun", /^[/<->]+/],
|
||||
["lang-js", /^on\w+\s*=\s*"([^"]+)"/i],
|
||||
["lang-js", /^on\w+\s*=\s*'([^']+)'/i],
|
||||
["lang-js", /^on\w+\s*=\s*([^\s"'>]+)/i],
|
||||
["lang-css", /^style\s*=\s*"([^"]+)"/i],
|
||||
["lang-css", /^style\s*=\s*'([^']+)'/i],
|
||||
["lang-css", /^style\s*=\s*([^\s"'>]+)/i]
|
||||
]
|
||||
),
|
||||
["in.tag"]
|
||||
);
|
||||
n(x([], [["atv", /^[\S\s]+/]]), ["uq.val"]);
|
||||
n(l({ keywords: I, hashComments: !0, cStyleComments: !0, types: N }), [
|
||||
"c",
|
||||
"cc",
|
||||
"cpp",
|
||||
"cxx",
|
||||
"cyc",
|
||||
"m"
|
||||
]);
|
||||
n(l({ keywords: "null,true,false" }), ["json"]);
|
||||
n(
|
||||
l({
|
||||
keywords: K,
|
||||
hashComments: !0,
|
||||
cStyleComments: !0,
|
||||
verbatimStrings: !0,
|
||||
types: N
|
||||
}),
|
||||
["cs"]
|
||||
);
|
||||
n(l({ keywords: J, cStyleComments: !0 }), ["java"]);
|
||||
n(l({ keywords: y, hashComments: !0, multiLineStrings: !0 }), [
|
||||
"bsh",
|
||||
"csh",
|
||||
"sh"
|
||||
]);
|
||||
n(
|
||||
l({
|
||||
keywords: L,
|
||||
hashComments: !0,
|
||||
multiLineStrings: !0,
|
||||
tripleQuotedStrings: !0
|
||||
}),
|
||||
["cv", "py"]
|
||||
);
|
||||
n(
|
||||
l({
|
||||
keywords:
|
||||
"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",
|
||||
hashComments: !0,
|
||||
multiLineStrings: !0,
|
||||
regexLiterals: !0
|
||||
}),
|
||||
["perl", "pl", "pm"]
|
||||
);
|
||||
n(
|
||||
l({
|
||||
keywords: M,
|
||||
hashComments: !0,
|
||||
multiLineStrings: !0,
|
||||
regexLiterals: !0
|
||||
}),
|
||||
["rb"]
|
||||
);
|
||||
n(l({ keywords: B, cStyleComments: !0, regexLiterals: !0 }), ["js"]);
|
||||
n(
|
||||
l({
|
||||
keywords:
|
||||
"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",
|
||||
hashComments: 3,
|
||||
cStyleComments: !0,
|
||||
multilineStrings: !0,
|
||||
tripleQuotedStrings: !0,
|
||||
regexLiterals: !0
|
||||
}),
|
||||
["coffee"]
|
||||
);
|
||||
n(x([], [["str", /^[\S\s]+/]]), ["regex"]);
|
||||
var S = (C.PR = {
|
||||
createSimpleLexer: x,
|
||||
registerLangHandler: n,
|
||||
sourceDecorator: l,
|
||||
PR_ATTRIB_NAME: "atn",
|
||||
PR_ATTRIB_VALUE: "atv",
|
||||
PR_COMMENT: "com",
|
||||
PR_DECLARATION: "dec",
|
||||
PR_KEYWORD: "kwd",
|
||||
PR_LITERAL: "lit",
|
||||
PR_NOCODE: "nocode",
|
||||
PR_PLAIN: "pln",
|
||||
PR_PUNCTUATION: "pun",
|
||||
PR_SOURCE: "src",
|
||||
PR_STRING: "str",
|
||||
PR_TAG: "tag",
|
||||
PR_TYPE: "typ",
|
||||
prettyPrintOne: (C.prettyPrintOne = function(a, i, g) {
|
||||
var j = document.createElement("pre");
|
||||
j.innerHTML = a;
|
||||
g && G(j, g, !0);
|
||||
H({ h: i, j: g, c: j, i: 1 });
|
||||
return j.innerHTML;
|
||||
}),
|
||||
prettyPrint: (C.prettyPrint = function(a) {
|
||||
function i() {
|
||||
var u;
|
||||
for (
|
||||
var g = C.PR_SHOULD_USE_CONTINUATION ? k.now() + 250 : Infinity;
|
||||
m < j.length && k.now() < g;
|
||||
m++
|
||||
) {
|
||||
var c = j[m],
|
||||
h = c.className;
|
||||
if (s.test(h) && !q.test(h)) {
|
||||
for (var e = !1, p = c.parentNode; p; p = p.parentNode)
|
||||
if (f.test(p.tagName) && p.className && s.test(p.className)) {
|
||||
e = !0;
|
||||
break;
|
||||
}
|
||||
if (!e) {
|
||||
c.className += " prettyprinted";
|
||||
var h = h.match(o),
|
||||
n;
|
||||
if ((e = !h)) {
|
||||
for (
|
||||
var e = c, p = void 0, l = e.firstChild;
|
||||
l;
|
||||
l = l.nextSibling
|
||||
)
|
||||
var t = l.nodeType,
|
||||
p =
|
||||
t === 1
|
||||
? p
|
||||
? e
|
||||
: l
|
||||
: t === 3
|
||||
? Q.test(l.nodeValue)
|
||||
? e
|
||||
: p
|
||||
: p;
|
||||
e = (n = p === e ? void 0 : p) && v.test(n.tagName);
|
||||
}
|
||||
e && (h = n.className.match(o));
|
||||
h && (h = h[1]);
|
||||
(u = d.test(c.tagName)
|
||||
? 1
|
||||
: (e = (e = c.currentStyle)
|
||||
? e.whiteSpace
|
||||
: document.defaultView &&
|
||||
document.defaultView.getComputedStyle
|
||||
? document.defaultView
|
||||
.getComputedStyle(c, r)
|
||||
.getPropertyValue("white-space")
|
||||
: 0) && "pre" === e.substring(0, 3)),
|
||||
(e = u);
|
||||
(p = (p = c.className.match(/\blinenums\b(?::(\d+))?/))
|
||||
? p[1] && p[1].length
|
||||
? +p[1]
|
||||
: !0
|
||||
: !1) && G(c, p, e);
|
||||
b = { h: h, c: c, j: p, i: e };
|
||||
H(b);
|
||||
}
|
||||
}
|
||||
}
|
||||
m < j.length ? setTimeout(i, 250) : a && a();
|
||||
}
|
||||
for (
|
||||
var g = [
|
||||
document.getElementsByTagName("pre"),
|
||||
document.getElementsByTagName("code"),
|
||||
document.getElementsByTagName("xmp")
|
||||
],
|
||||
j = [],
|
||||
n = 0;
|
||||
n < g.length;
|
||||
++n
|
||||
)
|
||||
for (var l = 0, w = g[n].length; l < w; ++l) j.push(g[n][l]);
|
||||
var g = r,
|
||||
k = Date;
|
||||
k.now ||
|
||||
(k = {
|
||||
now: function() {
|
||||
return +new Date();
|
||||
}
|
||||
});
|
||||
var m = 0,
|
||||
b,
|
||||
o = /\blang(?:uage)?-([\w.]+)(?!\S)/,
|
||||
s = /\bprettyprint\b/,
|
||||
q = /\bprettyprinted\b/,
|
||||
d = /pre|xmp/i,
|
||||
v = /^code$/i,
|
||||
f = /^(?:pre|code|xmp)$/i;
|
||||
i();
|
||||
})
|
||||
});
|
||||
typeof define === "function" &&
|
||||
define.amd &&
|
||||
define("google-code-prettify", [], function() {
|
||||
return S;
|
||||
});
|
||||
})();
|
||||
var r=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function O(a){function i(d){var a=d.charCodeAt(0);if(a!==92)return a;var f=d.charAt(1);return(a=s[f])?a:"0"<=f&&f<="7"?parseInt(d.substring(1),8):f==="u"||f==="x"?parseInt(d.substring(2),16):d.charCodeAt(1)}function g(d){if(d<32)return(d<16?"\\x0":"\\x")+d.toString(16);d=String.fromCharCode(d);return d==="\\"||d==="-"||d==="]"||d==="^"?"\\"+d:d}function j(d){var a=d.substring(1,d.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),d=[],f=
|
||||
a[0]==="^",b=["["];f&&b.push("^");for(var f=f?1:0,c=a.length;f<c;++f){var h=a[f];if(/\\[bdsw]/i.test(h))b.push(h);else{var h=i(h),e;f+2<c&&"-"===a[f+1]?(e=i(a[f+2]),f+=2):e=h;d.push([h,e]);e<65||h>122||(e<65||h>90||d.push([Math.max(65,h)|32,Math.min(e,90)|32]),e<97||h>122||d.push([Math.max(97,h)&-33,Math.min(e,122)&-33]))}}d.sort(function(d,a){return d[0]-a[0]||a[1]-d[1]});a=[];c=[];for(f=0;f<d.length;++f)h=d[f],h[0]<=c[1]+1?c[1]=Math.max(c[1],h[1]):a.push(c=h);for(f=0;f<a.length;++f)h=a[f],b.push(g(h[0])),
|
||||
h[1]>h[0]&&(h[1]+1>h[0]&&b.push("-"),b.push(g(h[1])));b.push("]");return b.join("")}function t(d){for(var a=d.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=a.length,i=[],c=0,h=0;c<b;++c){var e=a[c];e==="("?++h:"\\"===e.charAt(0)&&(e=+e.substring(1))&&(e<=h?i[e]=-1:a[c]=g(e))}for(c=1;c<i.length;++c)-1===i[c]&&(i[c]=++z);for(h=c=0;c<b;++c)e=a[c],e==="("?(++h,i[h]||(a[c]="(?:")):"\\"===e.charAt(0)&&(e=+e.substring(1))&&e<=h&&
|
||||
(a[c]="\\"+i[e]);for(c=0;c<b;++c)"^"===a[c]&&"^"!==a[c+1]&&(a[c]="");if(d.ignoreCase&&w)for(c=0;c<b;++c)e=a[c],d=e.charAt(0),e.length>=2&&d==="["?a[c]=j(e):d!=="\\"&&(a[c]=e.replace(/[A-Za-z]/g,function(d){d=d.charCodeAt(0);return"["+String.fromCharCode(d&-33,d|32)+"]"}));return a.join("")}for(var z=0,w=!1,k=!1,m=0,b=a.length;m<b;++m){var o=a[m];if(o.ignoreCase)k=!0;else if(/[a-z]/i.test(o.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){w=!0;k=!1;break}}for(var s={b:8,t:9,n:10,v:11,
|
||||
f:12,r:13},q=[],m=0,b=a.length;m<b;++m){o=a[m];if(o.global||o.multiline)throw Error(""+o);q.push("(?:"+t(o)+")")}return RegExp(q.join("|"),k?"gi":"g")}function P(a,i){function g(a){switch(a.nodeType){case 1:if(j.test(a.className))break;for(var b=a.firstChild;b;b=b.nextSibling)g(b);b=a.nodeName.toLowerCase();if("br"===b||"li"===b)t[k]="\n",w[k<<1]=z++,w[k++<<1|1]=a;break;case 3:case 4:b=a.nodeValue,b.length&&(b=i?b.replace(/\r\n?/g,"\n"):b.replace(/[\t\n\r ]+/g," "),t[k]=b,w[k<<1]=z,z+=b.length,w[k++<<
|
||||
1|1]=a)}}var j=/(?:^|\s)nocode(?:\s|$)/,t=[],z=0,w=[],k=0;g(a);return{a:t.join("").replace(/\n$/,""),d:w}}function E(a,i,g,j){i&&(a={a:i,e:a},g(a),j.push.apply(j,a.g))}function x(a,i){function g(a){for(var k=a.e,m=[k,"pln"],b=0,o=a.a.match(t)||[],s={},q=0,d=o.length;q<d;++q){var v=o[q],f=s[v],u=void 0,c;if(typeof f==="string")c=!1;else{var h=j[v.charAt(0)];if(h)u=v.match(h[1]),f=h[0];else{for(c=0;c<z;++c)if(h=i[c],u=v.match(h[1])){f=h[0];break}u||(f="pln")}if((c=f.length>=5&&"lang-"===f.substring(0,
|
||||
5))&&!(u&&typeof u[1]==="string"))c=!1,f="src";c||(s[v]=f)}h=b;b+=v.length;if(c){c=u[1];var e=v.indexOf(c),p=e+c.length;u[2]&&(p=v.length-u[2].length,e=p-c.length);f=f.substring(5);E(k+h,v.substring(0,e),g,m);E(k+h+e,c,F(f,c),m);E(k+h+p,v.substring(p),g,m)}else m.push(k+h,f)}a.g=m}var j={},t;(function(){for(var g=a.concat(i),k=[],m={},b=0,o=g.length;b<o;++b){var s=g[b],q=s[3];if(q)for(var d=q.length;--d>=0;)j[q.charAt(d)]=s;s=s[1];q=""+s;m.hasOwnProperty(q)||(k.push(s),m[q]=r)}k.push(/[\S\s]/);t=
|
||||
O(k)})();var z=i.length;return g}function l(a){var i=[],g=[];a.tripleQuotedStrings?i.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,r,"'\""]):a.multiLineStrings?i.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,r,"'\"`"]):i.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,r,"\"'"]);a.verbatimStrings&&
|
||||
g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var j=a.hashComments;j&&(a.cStyleComments?(j>1?i.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):i.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,r,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,r])):i.push(["com",/^#[^\n\r]*/,r,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,r]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
|
||||
r]));a.regexLiterals&&g.push(["lang-regex",/^(?:^^\.?|[+-]|[!=]={0,2}|#|%=?|&&?=?|\(|\*=?|[+-]=|->|\/=?|::?|<<?=?|>{1,3}=?|[,;?@[{~]|\^\^?=?|\|\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(j=a.types)&&g.push(["typ",j]);a=(""+a.keywords).replace(/^ | $/g,"");a.length&&g.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),r]);i.push(["pln",/^\s+/,r," \r\n\t\u00a0"]);g.push(["lit",
|
||||
/^@[$_a-z][\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,r],["pln",/^[$_a-z][\w$@]*/i,r],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,r,"0123456789"],["pln",/^\\[\S\s]?/,r],["pun",/^.[^\s\w"$'./@\\`]*/,r]);return x(i,g)}function G(a,i,g){function j(a){switch(a.nodeType){case 1:if(z.test(a.className))break;if("br"===a.nodeName)t(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)j(a);break;case 3:case 4:if(g){var b=
|
||||
a.nodeValue,f=b.match(n);if(f){var i=b.substring(0,f.index);a.nodeValue=i;(b=b.substring(f.index+f[0].length))&&a.parentNode.insertBefore(k.createTextNode(b),a.nextSibling);t(a);i||a.parentNode.removeChild(a)}}}}function t(a){function i(a,b){var d=b?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=i(e,1),f=a.nextSibling;e.appendChild(d);for(var g=f;g;g=f)f=g.nextSibling,e.appendChild(g)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=i(a.nextSibling,0),f;(f=a.parentNode)&&f.nodeType===
|
||||
1;)a=f;b.push(a)}for(var z=/(?:^|\s)nocode(?:\s|$)/,n=/\r\n?|\n/,k=a.ownerDocument,m=k.createElement("li");a.firstChild;)m.appendChild(a.firstChild);for(var b=[m],o=0;o<b.length;++o)j(b[o]);i===(i|0)&&b[0].setAttribute("value",i);var s=k.createElement("ol");s.className="linenums";for(var i=Math.max(0,i-1|0)||0,o=0,q=b.length;o<q;++o)m=b[o],m.className="L"+(o+i)%10,m.firstChild||m.appendChild(k.createTextNode("\u00a0")),s.appendChild(m);a.appendChild(s)}function n(a,i){for(var g=i.length;--g>=0;){var j=
|
||||
i[g];A.hasOwnProperty(j)?C.console&&console.warn("cannot override language handler %s",j):A[j]=a}}function F(a,i){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(i)?"default-markup":"default-code";return A[a]}function H(a){var i=a.h;try{var g=P(a.c,a.i),j=g.a;a.a=j;a.d=g.d;a.e=0;F(i,j)(a);var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent),t=t&&+t[1]<=8,i=/\n/g,n=a.a,w=n.length,g=0,k=a.d,m=k.length,j=0,b=a.g,o=b.length,s=0;b[o]=w;var q,d;for(d=q=0;d<o;)b[d]!==b[d+2]?(b[q++]=b[d++],b[q++]=b[d++]):d+=2;o=q;
|
||||
for(d=q=0;d<o;){for(var v=b[d],f=b[d+1],u=d+2;u+2<=o&&b[u+1]===f;)u+=2;b[q++]=v;b[q++]=f;d=u}b.length=q;var c=a.c,h;if(c)h=c.style.display,c.style.display="none";try{for(;j<m;){var e=k[j+2]||w,p=b[s+2]||w,u=Math.min(e,p),l=k[j+1],D;if(l.nodeType!==1&&(D=n.substring(g,u))){t&&(D=D.replace(i,"\r"));l.nodeValue=D;var y=l.ownerDocument,x=y.createElement("span");x.className=b[s+1];var B=l.parentNode;B.replaceChild(x,l);x.appendChild(l);g<e&&(k[j+1]=l=y.createTextNode(n.substring(u,e)),B.insertBefore(l,
|
||||
x.nextSibling))}g=u;g>=e&&(j+=2);g>=p&&(s+=2)}}finally{if(c)c.style.display=h}}catch(A){C.console&&console.log(A&&A.stack?A.stack:A)}}var C=window,y=["break,continue,do,else,for,if,return,while"],B=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],I=[B,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],
|
||||
J=[B,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],K=[J,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],B=[B,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],
|
||||
L=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],M=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],N=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
||||
Q=/\S/,R=l({keywords:[I,K,B,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+L,M,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};n(R,["default-code"]);n(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
|
||||
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);n(x([["pln",/^\s+/,r," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,r,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
|
||||
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);n(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);n(l({keywords:I,hashComments:!0,cStyleComments:!0,types:N}),["c","cc","cpp","cxx","cyc","m"]);n(l({keywords:"null,true,false"}),["json"]);n(l({keywords:K,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:N}),
|
||||
["cs"]);n(l({keywords:J,cStyleComments:!0}),["java"]);n(l({keywords:y,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);n(l({keywords:L,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]);n(l({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);n(l({keywords:M,hashComments:!0,
|
||||
multiLineStrings:!0,regexLiterals:!0}),["rb"]);n(l({keywords:B,cStyleComments:!0,regexLiterals:!0}),["js"]);n(l({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);n(x([],[["str",/^[\S\s]+/]]),["regex"]);var S=C.PR={createSimpleLexer:x,registerLangHandler:n,sourceDecorator:l,
|
||||
PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:C.prettyPrintOne=function(a,i,g){var j=document.createElement("pre");j.innerHTML=a;g&&G(j,g,!0);H({h:i,j:g,c:j,i:1});return j.innerHTML},prettyPrint:C.prettyPrint=function(a){function i(){var u;for(var g=C.PR_SHOULD_USE_CONTINUATION?k.now()+250:Infinity;m<j.length&&
|
||||
k.now()<g;m++){var c=j[m],h=c.className;if(s.test(h)&&!q.test(h)){for(var e=!1,p=c.parentNode;p;p=p.parentNode)if(f.test(p.tagName)&&p.className&&s.test(p.className)){e=!0;break}if(!e){c.className+=" prettyprinted";var h=h.match(o),n;if(e=!h){for(var e=c,p=void 0,l=e.firstChild;l;l=l.nextSibling)var t=l.nodeType,p=t===1?p?e:l:t===3?Q.test(l.nodeValue)?e:p:p;e=(n=p===e?void 0:p)&&v.test(n.tagName)}e&&(h=n.className.match(o));h&&(h=h[1]);u=d.test(c.tagName)?1:(e=(e=c.currentStyle)?e.whiteSpace:document.defaultView&&
|
||||
document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(c,r).getPropertyValue("white-space"):0)&&"pre"===e.substring(0,3),e=u;(p=(p=c.className.match(/\blinenums\b(?::(\d+))?/))?p[1]&&p[1].length?+p[1]:!0:!1)&&G(c,p,e);b={h:h,c:c,j:p,i:e};H(b)}}}m<j.length?setTimeout(i,250):a&&a()}for(var g=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],j=[],n=0;n<g.length;++n)for(var l=0,w=g[n].length;l<w;++l)j.push(g[n][l]);var g=
|
||||
r,k=Date;k.now||(k={now:function(){return+new Date}});var m=0,b,o=/\blang(?:uage)?-([\w.]+)(?!\S)/,s=/\bprettyprint\b/,q=/\bprettyprinted\b/,d=/pre|xmp/i,v=/^code$/i,f=/^(?:pre|code|xmp)$/i;i()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return S})})();
|
||||
|
@@ -1,21 +1,21 @@
|
||||
Zepto(function($) {
|
||||
var $leftPanel = $(".left-panel");
|
||||
var $frameContainer = $(".frames-container");
|
||||
var $appFramesTab = $("#application-frames-tab");
|
||||
var $allFramesTab = $("#all-frames-tab");
|
||||
var $container = $(".details-container");
|
||||
var $activeLine = $frameContainer.find(".frame.active");
|
||||
var $activeFrame = $container.find(".frame-code.active");
|
||||
var $ajaxEditors = $(".editor-link[data-ajax]");
|
||||
var $header = $("header");
|
||||
var $leftPanel = $('.left-panel');
|
||||
var $frameContainer = $('.frames-container');
|
||||
var $appFramesTab = $('#application-frames-tab');
|
||||
var $allFramesTab = $('#all-frames-tab');
|
||||
var $container = $('.details-container');
|
||||
var $activeLine = $frameContainer.find('.frame.active');
|
||||
var $activeFrame = $container.find('.frame-code.active');
|
||||
var $ajaxEditors = $('.editor-link[data-ajax]');
|
||||
var $header = $('header');
|
||||
|
||||
$header.on("mouseenter", function() {
|
||||
if ($header.find(".exception").height() >= 145) {
|
||||
$header.addClass("header-expand");
|
||||
$header.on('mouseenter', function () {
|
||||
if ($header.find('.exception').height() >= 145) {
|
||||
$header.addClass('header-expand');
|
||||
}
|
||||
});
|
||||
$header.on("mouseleave", function() {
|
||||
$header.removeClass("header-expand");
|
||||
$header.on('mouseleave', function () {
|
||||
$header.removeClass('header-expand');
|
||||
});
|
||||
|
||||
/*
|
||||
@@ -25,19 +25,21 @@ Zepto(function($) {
|
||||
* highlight the current line
|
||||
*/
|
||||
var renderCurrentCodeblock = function(id) {
|
||||
|
||||
// remove previous codeblocks so we only render the active one
|
||||
$(".code-block").removeClass("prettyprint");
|
||||
$('.code-block').removeClass('prettyprint');
|
||||
|
||||
// pass the id in when we can for speed
|
||||
if (typeof id === "undefined" || typeof id === "object") {
|
||||
var id = /frame\-line\-([\d]*)/.exec($activeLine.attr("id"))[1];
|
||||
if (typeof(id) === 'undefined' || typeof(id) === 'object') {
|
||||
var id = /frame\-line\-([\d]*)/.exec($activeLine.attr('id'))[1];
|
||||
}
|
||||
|
||||
$("#frame-code-linenums-" + id).addClass("prettyprint");
|
||||
$("#frame-code-args-" + id).addClass("prettyprint");
|
||||
$('#frame-code-linenums-' + id).addClass('prettyprint');
|
||||
$('#frame-code-args-' + id).addClass('prettyprint');
|
||||
|
||||
prettyPrint(highlightCurrentLine);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Highlight the active and neighboring lines for the current frame
|
||||
@@ -45,86 +47,88 @@ Zepto(function($) {
|
||||
*/
|
||||
|
||||
var highlightCurrentLine = function() {
|
||||
var activeLineNumber = +$activeLine.find(".frame-line").text();
|
||||
var $lines = $activeFrame.find(".linenums li");
|
||||
var firstLine = +$lines.first().val();
|
||||
var activeLineNumber = +($activeLine.find('.frame-line').text());
|
||||
var $lines = $activeFrame.find('.linenums li');
|
||||
var firstLine = +($lines.first().val());
|
||||
|
||||
// We show more code than needed, purely for proper syntax highlighting
|
||||
// Let’s hide a big chunk of that code and then scroll the remaining block
|
||||
$activeFrame
|
||||
.find(".code-block")
|
||||
.first()
|
||||
.css({
|
||||
maxHeight: 345,
|
||||
overflow: "hidden"
|
||||
});
|
||||
$activeFrame.find('.code-block').first().css({
|
||||
maxHeight: 345,
|
||||
overflow: 'hidden',
|
||||
});
|
||||
|
||||
var $offset = $($lines[activeLineNumber - firstLine - 10]);
|
||||
if ($offset.length > 0) {
|
||||
$offset[0].scrollIntoView();
|
||||
}
|
||||
|
||||
$($lines[activeLineNumber - firstLine - 1]).addClass("current");
|
||||
$($lines[activeLineNumber - firstLine]).addClass("current active");
|
||||
$($lines[activeLineNumber - firstLine + 1]).addClass("current");
|
||||
$($lines[activeLineNumber - firstLine - 1]).addClass('current');
|
||||
$($lines[activeLineNumber - firstLine]).addClass('current active');
|
||||
$($lines[activeLineNumber - firstLine + 1]).addClass('current');
|
||||
|
||||
$container.scrollTop(0);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* click handler for loading codeblocks
|
||||
*/
|
||||
|
||||
$frameContainer.on("click", ".frame", function() {
|
||||
var $this = $(this);
|
||||
var id = /frame\-line\-([\d]*)/.exec($this.attr("id"))[1];
|
||||
var $codeFrame = $("#frame-code-" + id);
|
||||
$frameContainer.on('click', '.frame', function() {
|
||||
|
||||
var $this = $(this);
|
||||
var id = /frame\-line\-([\d]*)/.exec($this.attr('id'))[1];
|
||||
var $codeFrame = $('#frame-code-' + id);
|
||||
|
||||
if ($codeFrame) {
|
||||
$activeLine.removeClass("active");
|
||||
$activeFrame.removeClass("active");
|
||||
|
||||
$this.addClass("active");
|
||||
$codeFrame.addClass("active");
|
||||
$activeLine.removeClass('active');
|
||||
$activeFrame.removeClass('active');
|
||||
|
||||
$activeLine = $this;
|
||||
$this.addClass('active');
|
||||
$codeFrame.addClass('active');
|
||||
|
||||
$activeLine = $this;
|
||||
$activeFrame = $codeFrame;
|
||||
|
||||
renderCurrentCodeblock(id);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var clipboard = new Clipboard(".clipboard");
|
||||
var clipboard = new Clipboard('.clipboard');
|
||||
var showTooltip = function(elem, msg) {
|
||||
elem.setAttribute("class", "clipboard tooltipped tooltipped-s");
|
||||
elem.setAttribute("aria-label", msg);
|
||||
elem.setAttribute('class', 'clipboard tooltipped tooltipped-s');
|
||||
elem.setAttribute('aria-label', msg);
|
||||
};
|
||||
|
||||
clipboard.on("success", function(e) {
|
||||
e.clearSelection();
|
||||
clipboard.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
|
||||
showTooltip(e.trigger, "Copied!");
|
||||
showTooltip(e.trigger, 'Copied!');
|
||||
});
|
||||
|
||||
clipboard.on("error", function(e) {
|
||||
showTooltip(e.trigger, fallbackMessage(e.action));
|
||||
clipboard.on('error', function(e) {
|
||||
showTooltip(e.trigger, fallbackMessage(e.action));
|
||||
});
|
||||
|
||||
var btn = document.querySelector(".clipboard");
|
||||
var btn = document.querySelector('.clipboard');
|
||||
|
||||
btn.addEventListener("mouseleave", function(e) {
|
||||
e.currentTarget.setAttribute("class", "clipboard");
|
||||
e.currentTarget.removeAttribute("aria-label");
|
||||
btn.addEventListener('mouseleave', function(e) {
|
||||
e.currentTarget.setAttribute('class', 'clipboard');
|
||||
e.currentTarget.removeAttribute('aria-label');
|
||||
});
|
||||
|
||||
function fallbackMessage(action) {
|
||||
var actionMsg = "";
|
||||
var actionKey = action === "cut" ? "X" : "C";
|
||||
var actionMsg = '';
|
||||
var actionKey = (action === 'cut' ? 'X' : 'C');
|
||||
|
||||
if (/Mac/i.test(navigator.userAgent)) {
|
||||
actionMsg = "Press ⌘-" + actionKey + " to " + action;
|
||||
actionMsg = 'Press ⌘-' + actionKey + ' to ' + action;
|
||||
} else {
|
||||
actionMsg = "Press Ctrl-" + actionKey + " to " + action;
|
||||
actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;
|
||||
}
|
||||
|
||||
return actionMsg;
|
||||
@@ -144,31 +148,29 @@ Zepto(function($) {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on("keydown", function(e) {
|
||||
var applicationFrames = $frameContainer.hasClass(
|
||||
"frames-container-application"
|
||||
),
|
||||
frameClass = applicationFrames ? ".frame.frame-application" : ".frame";
|
||||
$(document).on('keydown', function(e) {
|
||||
var applicationFrames = $frameContainer.hasClass('frames-container-application'),
|
||||
frameClass = applicationFrames ? '.frame.frame-application' : '.frame';
|
||||
|
||||
if (e.ctrlKey || e.which === 74 || e.which === 75) {
|
||||
// CTRL+Arrow-UP/k and Arrow-Down/j support:
|
||||
// 1) select the next/prev element
|
||||
// 2) make sure the newly selected element is within the view-scope
|
||||
// 3) focus the (right) container, so arrow-up/down (without ctrl) scroll the details
|
||||
if (e.which === 38 /* arrow up */ || e.which === 75 /* k */) {
|
||||
$activeLine.prev(frameClass).click();
|
||||
scrollIntoView($activeLine, $leftPanel);
|
||||
$container.focus();
|
||||
e.preventDefault();
|
||||
} else if (e.which === 40 /* arrow down */ || e.which === 74 /* j */) {
|
||||
$activeLine.next(frameClass).click();
|
||||
scrollIntoView($activeLine, $leftPanel);
|
||||
$container.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
} else if (e.which == 78 /* n */) {
|
||||
if(e.ctrlKey || e.which === 74 || e.which === 75) {
|
||||
// CTRL+Arrow-UP/k and Arrow-Down/j support:
|
||||
// 1) select the next/prev element
|
||||
// 2) make sure the newly selected element is within the view-scope
|
||||
// 3) focus the (right) container, so arrow-up/down (without ctrl) scroll the details
|
||||
if (e.which === 38 /* arrow up */ || e.which === 75 /* k */) {
|
||||
$activeLine.prev(frameClass).click();
|
||||
scrollIntoView($activeLine, $leftPanel);
|
||||
$container.focus();
|
||||
e.preventDefault();
|
||||
} else if (e.which === 40 /* arrow down */ || e.which === 74 /* j */) {
|
||||
$activeLine.next(frameClass).click();
|
||||
scrollIntoView($activeLine, $leftPanel);
|
||||
$container.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
} else if (e.which == 78 /* n */) {
|
||||
if ($appFramesTab.length) {
|
||||
setActiveFramesTab($(".frames-tab:not(.frames-tab-active)"));
|
||||
setActiveFramesTab($('.frames-tab:not(.frames-tab-active)'));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -177,31 +179,31 @@ Zepto(function($) {
|
||||
renderCurrentCodeblock();
|
||||
|
||||
// Avoid to quit the page with some protocol (e.g. IntelliJ Platform REST API)
|
||||
$ajaxEditors.on("click", function(e) {
|
||||
$ajaxEditors.on('click', function(e){
|
||||
e.preventDefault();
|
||||
$.get(this.href);
|
||||
});
|
||||
|
||||
// Symfony VarDumper: Close the by default expanded objects
|
||||
$(".sf-dump-expanded")
|
||||
.removeClass("sf-dump-expanded")
|
||||
.addClass("sf-dump-compact");
|
||||
$(".sf-dump-toggle span").html("▶");
|
||||
$('.sf-dump-expanded')
|
||||
.removeClass('sf-dump-expanded')
|
||||
.addClass('sf-dump-compact');
|
||||
$('.sf-dump-toggle span').html('▶');
|
||||
|
||||
// Make the given frames-tab active
|
||||
function setActiveFramesTab($tab) {
|
||||
$tab.addClass("frames-tab-active");
|
||||
$tab.addClass('frames-tab-active');
|
||||
|
||||
if ($tab.attr("id") == "application-frames-tab") {
|
||||
$frameContainer.addClass("frames-container-application");
|
||||
$allFramesTab.removeClass("frames-tab-active");
|
||||
if ($tab.attr('id') == 'application-frames-tab') {
|
||||
$frameContainer.addClass('frames-container-application');
|
||||
$allFramesTab.removeClass('frames-tab-active');
|
||||
} else {
|
||||
$frameContainer.removeClass("frames-container-application");
|
||||
$appFramesTab.removeClass("frames-tab-active");
|
||||
$frameContainer.removeClass('frames-container-application');
|
||||
$appFramesTab.removeClass('frames-tab-active');
|
||||
}
|
||||
}
|
||||
|
||||
$("a.frames-tab").on("click", function(e) {
|
||||
$('a.frames-tab').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
setActiveFramesTab($(this));
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@@ -81,186 +81,51 @@ return [
|
||||
'Zend\\XmlRpc' => 'Laminas\\XmlRpc',
|
||||
'ZendOAuth' => 'Laminas\\OAuth',
|
||||
|
||||
'Zend\\\\AuraDi\\\\Config' => 'Laminas\\\\AuraDi\\\\Config',
|
||||
'Zend\\\\Authentication' => 'Laminas\\\\Authentication',
|
||||
'Zend\\\\Barcode' => 'Laminas\\\\Barcode',
|
||||
'Zend\\\\Cache' => 'Laminas\\\\Cache',
|
||||
'Zend\\\\Captcha' => 'Laminas\\\\Captcha',
|
||||
'Zend\\\\Code' => 'Laminas\\\\Code',
|
||||
'ZendCodingStandard\\\\Sniffs' => 'LaminasCodingStandard\\\\Sniffs',
|
||||
'ZendCodingStandard\\\\Utils' => 'LaminasCodingStandard\\\\Utils',
|
||||
'Zend\\\\ComponentInstaller' => 'Laminas\\\\ComponentInstaller',
|
||||
'Zend\\\\Config' => 'Laminas\\\\Config',
|
||||
'Zend\\\\ConfigAggregator' => 'Laminas\\\\ConfigAggregator',
|
||||
'Zend\\\\ConfigAggregatorModuleManager' => 'Laminas\\\\ConfigAggregatorModuleManager',
|
||||
'Zend\\\\ConfigAggregatorParameters' => 'Laminas\\\\ConfigAggregatorParameters',
|
||||
'Zend\\\\Console' => 'Laminas\\\\Console',
|
||||
'Zend\\\\ContainerConfigTest' => 'Laminas\\\\ContainerConfigTest',
|
||||
'Zend\\\\Crypt' => 'Laminas\\\\Crypt',
|
||||
'Zend\\\\Db' => 'Laminas\\\\Db',
|
||||
'Zend\\\\Di' => 'Laminas\\\\Di',
|
||||
'Zend\\\\Diactoros' => 'Laminas\\\\Diactoros',
|
||||
'ZendDiagnostics\\\\Check' => 'Laminas\\\\Diagnostics\\\\Check',
|
||||
'ZendDiagnostics\\\\Result' => 'Laminas\\\\Diagnostics\\\\Result',
|
||||
'ZendDiagnostics\\\\Runner' => 'Laminas\\\\Diagnostics\\\\Runner',
|
||||
'Zend\\\\Dom' => 'Laminas\\\\Dom',
|
||||
'Zend\\\\Escaper' => 'Laminas\\\\Escaper',
|
||||
'Zend\\\\EventManager' => 'Laminas\\\\EventManager',
|
||||
'Zend\\\\Feed' => 'Laminas\\\\Feed',
|
||||
'Zend\\\\File' => 'Laminas\\\\File',
|
||||
'Zend\\\\Filter' => 'Laminas\\\\Filter',
|
||||
'Zend\\\\Form' => 'Laminas\\\\Form',
|
||||
'Zend\\\\Http' => 'Laminas\\\\Http',
|
||||
'Zend\\\\HttpHandlerRunner' => 'Laminas\\\\HttpHandlerRunner',
|
||||
'Zend\\\\Hydrator' => 'Laminas\\\\Hydrator',
|
||||
'Zend\\\\I18n' => 'Laminas\\\\I18n',
|
||||
'Zend\\\\InputFilter' => 'Laminas\\\\InputFilter',
|
||||
'Zend\\\\Json' => 'Laminas\\\\Json',
|
||||
'Zend\\\\Ldap' => 'Laminas\\\\Ldap',
|
||||
'Zend\\\\Loader' => 'Laminas\\\\Loader',
|
||||
'Zend\\\\Log' => 'Laminas\\\\Log',
|
||||
'Zend\\\\Mail' => 'Laminas\\\\Mail',
|
||||
'Zend\\\\Math' => 'Laminas\\\\Math',
|
||||
'Zend\\\\Memory' => 'Laminas\\\\Memory',
|
||||
'Zend\\\\Mime' => 'Laminas\\\\Mime',
|
||||
'Zend\\\\ModuleManager' => 'Laminas\\\\ModuleManager',
|
||||
'Zend\\\\Mvc' => 'Laminas\\\\Mvc',
|
||||
'Zend\\\\Navigation' => 'Laminas\\\\Navigation',
|
||||
'Zend\\\\Paginator' => 'Laminas\\\\Paginator',
|
||||
'Zend\\\\Permissions' => 'Laminas\\\\Permissions',
|
||||
'Zend\\\\Pimple\\\\Config' => 'Laminas\\\\Pimple\\\\Config',
|
||||
'Zend\\\\ProblemDetails' => 'Mezzio\\\\ProblemDetails',
|
||||
'Zend\\\\ProgressBar' => 'Laminas\\\\ProgressBar',
|
||||
'Zend\\\\Psr7Bridge' => 'Laminas\\\\Psr7Bridge',
|
||||
'Zend\\\\Router' => 'Laminas\\\\Router',
|
||||
'Zend\\\\Serializer' => 'Laminas\\\\Serializer',
|
||||
'Zend\\\\Server' => 'Laminas\\\\Server',
|
||||
'Zend\\\\ServiceManager' => 'Laminas\\\\ServiceManager',
|
||||
'ZendService\\\\ReCaptcha' => 'Laminas\\\\ReCaptcha',
|
||||
'ZendService\\\\Twitter' => 'Laminas\\\\Twitter',
|
||||
'Zend\\\\Session' => 'Laminas\\\\Session',
|
||||
'Zend\\\\SkeletonInstaller' => 'Laminas\\\\SkeletonInstaller',
|
||||
'Zend\\\\Soap' => 'Laminas\\\\Soap',
|
||||
'Zend\\\\Stdlib' => 'Laminas\\\\Stdlib',
|
||||
'Zend\\\\Stratigility' => 'Laminas\\\\Stratigility',
|
||||
'Zend\\\\Tag' => 'Laminas\\\\Tag',
|
||||
'Zend\\\\Test' => 'Laminas\\\\Test',
|
||||
'Zend\\\\Text' => 'Laminas\\\\Text',
|
||||
'Zend\\\\Uri' => 'Laminas\\\\Uri',
|
||||
'Zend\\\\Validator' => 'Laminas\\\\Validator',
|
||||
'Zend\\\\View' => 'Laminas\\\\View',
|
||||
'Zend\\\\Xml2Json' => 'Laminas\\\\Xml2Json',
|
||||
'Zend\\\\XmlRpc' => 'Laminas\\\\XmlRpc',
|
||||
'ZendHttp' => 'LaminasHttp', // class ZendHttpClientDecorator in zend-feed
|
||||
'ZendModule' => 'LaminasModule', // class ZendModuleProvider in zend-config-aggregator-modulemanager
|
||||
'a\\Zend\\' => 'a\\Zend\\',
|
||||
'b\\Zend\\' => 'b\\Zend\\',
|
||||
'c\\Zend\\' => 'c\\Zend\\',
|
||||
'd\\Zend\\' => 'd\\Zend\\',
|
||||
'e\\Zend\\' => 'e\\Zend\\',
|
||||
'f\\Zend\\' => 'f\\Zend\\',
|
||||
'g\\Zend\\' => 'g\\Zend\\',
|
||||
'h\\Zend\\' => 'h\\Zend\\',
|
||||
'i\\Zend\\' => 'i\\Zend\\',
|
||||
'j\\Zend\\' => 'j\\Zend\\',
|
||||
'k\\Zend\\' => 'k\\Zend\\',
|
||||
'l\\Zend\\' => 'l\\Zend\\',
|
||||
'm\\Zend\\' => 'm\\Zend\\',
|
||||
'n\\Zend\\' => 'n\\Zend\\',
|
||||
'o\\Zend\\' => 'o\\Zend\\',
|
||||
'p\\Zend\\' => 'p\\Zend\\',
|
||||
'q\\Zend\\' => 'q\\Zend\\',
|
||||
'r\\Zend\\' => 'r\\Zend\\',
|
||||
's\\Zend\\' => 's\\Zend\\',
|
||||
't\\Zend\\' => 't\\Zend\\',
|
||||
'u\\Zend\\' => 'u\\Zend\\',
|
||||
'v\\Zend\\' => 'v\\Zend\\',
|
||||
'w\\Zend\\' => 'w\\Zend\\',
|
||||
'x\\Zend\\' => 'x\\Zend\\',
|
||||
'y\\Zend\\' => 'y\\Zend\\',
|
||||
'z\\Zend\\' => 'z\\Zend\\',
|
||||
'a\\ZendOAuth\\' => 'a\\ZendOAuth\\',
|
||||
'b\\ZendOAuth\\' => 'b\\ZendOAuth\\',
|
||||
'c\\ZendOAuth\\' => 'c\\ZendOAuth\\',
|
||||
'd\\ZendOAuth\\' => 'd\\ZendOAuth\\',
|
||||
'e\\ZendOAuth\\' => 'e\\ZendOAuth\\',
|
||||
'f\\ZendOAuth\\' => 'f\\ZendOAuth\\',
|
||||
'g\\ZendOAuth\\' => 'g\\ZendOAuth\\',
|
||||
'h\\ZendOAuth\\' => 'h\\ZendOAuth\\',
|
||||
'i\\ZendOAuth\\' => 'i\\ZendOAuth\\',
|
||||
'j\\ZendOAuth\\' => 'j\\ZendOAuth\\',
|
||||
'k\\ZendOAuth\\' => 'k\\ZendOAuth\\',
|
||||
'l\\ZendOAuth\\' => 'l\\ZendOAuth\\',
|
||||
'm\\ZendOAuth\\' => 'm\\ZendOAuth\\',
|
||||
'n\\ZendOAuth\\' => 'n\\ZendOAuth\\',
|
||||
'o\\ZendOAuth\\' => 'o\\ZendOAuth\\',
|
||||
'p\\ZendOAuth\\' => 'p\\ZendOAuth\\',
|
||||
'q\\ZendOAuth\\' => 'q\\ZendOAuth\\',
|
||||
'r\\ZendOAuth\\' => 'r\\ZendOAuth\\',
|
||||
's\\ZendOAuth\\' => 's\\ZendOAuth\\',
|
||||
't\\ZendOAuth\\' => 't\\ZendOAuth\\',
|
||||
'u\\ZendOAuth\\' => 'u\\ZendOAuth\\',
|
||||
'v\\ZendOAuth\\' => 'v\\ZendOAuth\\',
|
||||
'w\\ZendOAuth\\' => 'w\\ZendOAuth\\',
|
||||
'x\\ZendOAuth\\' => 'x\\ZendOAuth\\',
|
||||
'y\\ZendOAuth\\' => 'y\\ZendOAuth\\',
|
||||
'z\\ZendOAuth\\' => 'z\\ZendOAuth\\',
|
||||
'a\\ZendService\\' => 'a\\ZendService\\',
|
||||
'b\\ZendService\\' => 'b\\ZendService\\',
|
||||
'c\\ZendService\\' => 'c\\ZendService\\',
|
||||
'd\\ZendService\\' => 'd\\ZendService\\',
|
||||
'e\\ZendService\\' => 'e\\ZendService\\',
|
||||
'f\\ZendService\\' => 'f\\ZendService\\',
|
||||
'g\\ZendService\\' => 'g\\ZendService\\',
|
||||
'h\\ZendService\\' => 'h\\ZendService\\',
|
||||
'i\\ZendService\\' => 'i\\ZendService\\',
|
||||
'j\\ZendService\\' => 'j\\ZendService\\',
|
||||
'k\\ZendService\\' => 'k\\ZendService\\',
|
||||
'l\\ZendService\\' => 'l\\ZendService\\',
|
||||
'm\\ZendService\\' => 'm\\ZendService\\',
|
||||
'n\\ZendService\\' => 'n\\ZendService\\',
|
||||
'o\\ZendService\\' => 'o\\ZendService\\',
|
||||
'p\\ZendService\\' => 'p\\ZendService\\',
|
||||
'q\\ZendService\\' => 'q\\ZendService\\',
|
||||
'r\\ZendService\\' => 'r\\ZendService\\',
|
||||
's\\ZendService\\' => 's\\ZendService\\',
|
||||
't\\ZendService\\' => 't\\ZendService\\',
|
||||
'u\\ZendService\\' => 'u\\ZendService\\',
|
||||
'v\\ZendService\\' => 'v\\ZendService\\',
|
||||
'w\\ZendService\\' => 'w\\ZendService\\',
|
||||
'x\\ZendService\\' => 'x\\ZendService\\',
|
||||
'y\\ZendService\\' => 'y\\ZendService\\',
|
||||
'z\\ZendService\\' => 'z\\ZendService\\',
|
||||
'a\\ZendXml\\' => 'a\\ZendXml\\',
|
||||
'b\\ZendXml\\' => 'b\\ZendXml\\',
|
||||
'c\\ZendXml\\' => 'c\\ZendXml\\',
|
||||
'd\\ZendXml\\' => 'd\\ZendXml\\',
|
||||
'e\\ZendXml\\' => 'e\\ZendXml\\',
|
||||
'f\\ZendXml\\' => 'f\\ZendXml\\',
|
||||
'g\\ZendXml\\' => 'g\\ZendXml\\',
|
||||
'h\\ZendXml\\' => 'h\\ZendXml\\',
|
||||
'i\\ZendXml\\' => 'i\\ZendXml\\',
|
||||
'j\\ZendXml\\' => 'j\\ZendXml\\',
|
||||
'k\\ZendXml\\' => 'k\\ZendXml\\',
|
||||
'l\\ZendXml\\' => 'l\\ZendXml\\',
|
||||
'm\\ZendXml\\' => 'm\\ZendXml\\',
|
||||
'n\\ZendXml\\' => 'n\\ZendXml\\',
|
||||
'o\\ZendXml\\' => 'o\\ZendXml\\',
|
||||
'p\\ZendXml\\' => 'p\\ZendXml\\',
|
||||
'q\\ZendXml\\' => 'q\\ZendXml\\',
|
||||
'r\\ZendXml\\' => 'r\\ZendXml\\',
|
||||
's\\ZendXml\\' => 's\\ZendXml\\',
|
||||
't\\ZendXml\\' => 't\\ZendXml\\',
|
||||
'u\\ZendXml\\' => 'u\\ZendXml\\',
|
||||
'v\\ZendXml\\' => 'v\\ZendXml\\',
|
||||
'w\\ZendXml\\' => 'w\\ZendXml\\',
|
||||
'x\\ZendXml\\' => 'x\\ZendXml\\',
|
||||
'y\\ZendXml\\' => 'y\\ZendXml\\',
|
||||
'z\\ZendXml\\' => 'z\\ZendXml\\',
|
||||
// class ZendAcl in zend-expressive-authorization-acl
|
||||
'ZendAcl' => 'LaminasAcl',
|
||||
'Zend\\Expressive\\Authorization\\Acl\\ZendAcl' => 'Mezzio\\Authorization\\Acl\\LaminasAcl',
|
||||
// class ZendHttpClientDecorator in zend-feed
|
||||
'ZendHttp' => 'LaminasHttp',
|
||||
// class ZendModuleProvider in zend-config-aggregator-modulemanager
|
||||
'ZendModule' => 'LaminasModule',
|
||||
// class ZendRbac in zend-expressive-authorization-rbac
|
||||
'ZendRbac' => 'LaminasRbac',
|
||||
'Zend\\Expressive\\Authorization\\Rbac\\ZendRbac' => 'Mezzio\\Authorization\\Rbac\\LaminasRbac',
|
||||
// class ZendRouter in zend-expressive-router-zendrouter
|
||||
'ZendRouter' => 'LaminasRouter',
|
||||
'Zend\\Expressive\\Router\\ZendRouter' => 'Mezzio\\Router\\LaminasRouter',
|
||||
// class ZendViewRenderer in zend-expressive-zendviewrenderer
|
||||
'ZendViewRenderer' => 'LaminasViewRenderer',
|
||||
'Zend\\Expressive\\ZendView\\ZendViewRenderer' => 'Mezzio\\LaminasView\\LaminasViewRenderer',
|
||||
'a\\Zend' => 'a\\Zend',
|
||||
'b\\Zend' => 'b\\Zend',
|
||||
'c\\Zend' => 'c\\Zend',
|
||||
'd\\Zend' => 'd\\Zend',
|
||||
'e\\Zend' => 'e\\Zend',
|
||||
'f\\Zend' => 'f\\Zend',
|
||||
'g\\Zend' => 'g\\Zend',
|
||||
'h\\Zend' => 'h\\Zend',
|
||||
'i\\Zend' => 'i\\Zend',
|
||||
'j\\Zend' => 'j\\Zend',
|
||||
'k\\Zend' => 'k\\Zend',
|
||||
'l\\Zend' => 'l\\Zend',
|
||||
'm\\Zend' => 'm\\Zend',
|
||||
'n\\Zend' => 'n\\Zend',
|
||||
'o\\Zend' => 'o\\Zend',
|
||||
'p\\Zend' => 'p\\Zend',
|
||||
'q\\Zend' => 'q\\Zend',
|
||||
'r\\Zend' => 'r\\Zend',
|
||||
's\\Zend' => 's\\Zend',
|
||||
't\\Zend' => 't\\Zend',
|
||||
'u\\Zend' => 'u\\Zend',
|
||||
'v\\Zend' => 'v\\Zend',
|
||||
'w\\Zend' => 'w\\Zend',
|
||||
'x\\Zend' => 'x\\Zend',
|
||||
'y\\Zend' => 'y\\Zend',
|
||||
'z\\Zend' => 'z\\Zend',
|
||||
|
||||
// Expressive
|
||||
'Zend\\Expressive' => 'Mezzio',
|
||||
'Zend\\\\Expressive' => 'Mezzio',
|
||||
'ZendAuthentication' => 'LaminasAuthentication',
|
||||
'ZendAcl' => 'LaminasAcl',
|
||||
'ZendRbac' => 'LaminasRbac',
|
||||
@@ -285,49 +150,33 @@ return [
|
||||
'ZF\\Rest' => 'Laminas\\ApiTools\\Rest',
|
||||
'ZF\\Rpc' => 'Laminas\\ApiTools\\Rpc',
|
||||
'ZF\\Versioning' => 'Laminas\\ApiTools\\Versioning',
|
||||
'a\\ZF\\' => 'a\\ZF\\',
|
||||
'b\\ZF\\' => 'b\\ZF\\',
|
||||
'c\\ZF\\' => 'c\\ZF\\',
|
||||
'd\\ZF\\' => 'd\\ZF\\',
|
||||
'e\\ZF\\' => 'e\\ZF\\',
|
||||
'f\\ZF\\' => 'f\\ZF\\',
|
||||
'g\\ZF\\' => 'g\\ZF\\',
|
||||
'h\\ZF\\' => 'h\\ZF\\',
|
||||
'i\\ZF\\' => 'i\\ZF\\',
|
||||
'j\\ZF\\' => 'j\\ZF\\',
|
||||
'k\\ZF\\' => 'k\\ZF\\',
|
||||
'l\\ZF\\' => 'l\\ZF\\',
|
||||
'm\\ZF\\' => 'm\\ZF\\',
|
||||
'n\\ZF\\' => 'n\\ZF\\',
|
||||
'o\\ZF\\' => 'o\\ZF\\',
|
||||
'p\\ZF\\' => 'p\\ZF\\',
|
||||
'q\\ZF\\' => 'q\\ZF\\',
|
||||
'r\\ZF\\' => 'r\\ZF\\',
|
||||
's\\ZF\\' => 's\\ZF\\',
|
||||
't\\ZF\\' => 't\\ZF\\',
|
||||
'u\\ZF\\' => 'u\\ZF\\',
|
||||
'v\\ZF\\' => 'v\\ZF\\',
|
||||
'w\\ZF\\' => 'w\\ZF\\',
|
||||
'x\\ZF\\' => 'x\\ZF\\',
|
||||
'y\\ZF\\' => 'y\\ZF\\',
|
||||
'z\\ZF\\' => 'z\\ZF\\',
|
||||
'a\\ZF' => 'a\\ZF',
|
||||
'b\\ZF' => 'b\\ZF',
|
||||
'c\\ZF' => 'c\\ZF',
|
||||
'd\\ZF' => 'd\\ZF',
|
||||
'e\\ZF' => 'e\\ZF',
|
||||
'f\\ZF' => 'f\\ZF',
|
||||
'g\\ZF' => 'g\\ZF',
|
||||
'h\\ZF' => 'h\\ZF',
|
||||
'i\\ZF' => 'i\\ZF',
|
||||
'j\\ZF' => 'j\\ZF',
|
||||
'k\\ZF' => 'k\\ZF',
|
||||
'l\\ZF' => 'l\\ZF',
|
||||
'm\\ZF' => 'm\\ZF',
|
||||
'n\\ZF' => 'n\\ZF',
|
||||
'o\\ZF' => 'o\\ZF',
|
||||
'p\\ZF' => 'p\\ZF',
|
||||
'q\\ZF' => 'q\\ZF',
|
||||
'r\\ZF' => 'r\\ZF',
|
||||
's\\ZF' => 's\\ZF',
|
||||
't\\ZF' => 't\\ZF',
|
||||
'u\\ZF' => 'u\\ZF',
|
||||
'v\\ZF' => 'v\\ZF',
|
||||
'w\\ZF' => 'w\\ZF',
|
||||
'x\\ZF' => 'x\\ZF',
|
||||
'y\\ZF' => 'y\\ZF',
|
||||
'z\\ZF' => 'z\\ZF',
|
||||
|
||||
'ZF\\\\Apigility' => 'Laminas\\\\ApiTools',
|
||||
'ZF\\\\ApiProblem' => 'Laminas\\\\ApiTools\\\\ApiProblem',
|
||||
'ZF\\\\AssetManager' => 'Laminas\\\\ApiTools\\\\AssetManager',
|
||||
'ZF\\\\ComposerAutoloading' => 'Laminas\\\\ComposerAutoloading',
|
||||
'ZF\\\\Configuration' => 'Laminas\\\\ApiTools\\\\Configuration',
|
||||
'ZF\\\\ContentNegotiation' => 'Laminas\\\\ApiTools\\\\ContentNegotiation',
|
||||
'ZF\\\\ContentValidation' => 'Laminas\\\\ApiTools\\\\ContentValidation',
|
||||
'ZF\\\\DevelopmentMode' => 'Laminas\\\\DevelopmentMode',
|
||||
'ZF\\\\Doctrine\\\\QueryBuilder' => 'Laminas\\\\ApiTools\\\\Doctrine\\\\QueryBuilder',
|
||||
'ZF\\\\Hal' => 'Laminas\\\\ApiTools\\\\Hal',
|
||||
'ZF\\\\HttpCache' => 'Laminas\\\\ApiTools\\\\HttpCache',
|
||||
'ZF\\\\MvcAuth' => 'Laminas\\\\ApiTools\\\\MvcAuth',
|
||||
'ZF\\\\OAuth2' => 'Laminas\\\\ApiTools\\\\OAuth2',
|
||||
'ZF\\\\Rest' => 'Laminas\\\\ApiTools\\\\Rest',
|
||||
'ZF\\\\Rpc' => 'Laminas\\\\ApiTools\\\\Rpc',
|
||||
'ZF\\\\Versioning' => 'Laminas\\\\ApiTools\\\\Versioning',
|
||||
'ApigilityModuleInterface' => 'ApiToolsModuleInterface',
|
||||
'ApigilityProviderInterface' => 'ApiToolsProviderInterface',
|
||||
'ApigilityVersionController' => 'ApiToolsVersionController',
|
||||
@@ -489,8 +338,8 @@ return [
|
||||
'zend-expressive-tooling' => 'mezzio-tooling',
|
||||
|
||||
// Apigility-related
|
||||
"'zf-apigility'" => "'laminas-api-tools'",
|
||||
'"zf-apigility"' => '"laminas-api-tools"',
|
||||
"'zf-apigility'" => "'api-tools'",
|
||||
'"zf-apigility"' => '"api-tools"',
|
||||
'zf-apigility/' => 'api-tools/',
|
||||
'zf-apigility-admin' => 'api-tools-admin',
|
||||
'zf-content-negotiation' => 'api-tools-content-negotiation',
|
||||
@@ -512,4 +361,11 @@ return [
|
||||
'ZfApigilityDoctrineQueryCreateFilterManager' => 'LaminasApiToolsDoctrineQueryCreateFilterManager',
|
||||
'zf-apigility-doctrine' => 'api-tools-doctrine',
|
||||
'zf-development-mode' => 'laminas-development-mode',
|
||||
'zf-doctrine-querybuilder' => 'api-tools-doctrine-querybuilder',
|
||||
|
||||
// 3rd party Apigility packages
|
||||
'api-skeletons/zf-' => 'api-skeletons/zf-', // api-skeletons packages
|
||||
'zf-oauth2-' => 'zf-oauth2-', // api-skeletons OAuth2-related packages
|
||||
'ZF\\OAuth2\\Client' => 'ZF\\OAuth2\\Client', // api-skeletons/zf-oauth2-client
|
||||
'ZF\\OAuth2\\Doctrine' => 'ZF\\OAuth2\\Doctrine', // api-skeletons/zf-oauth2-doctrine
|
||||
];
|
||||
|
@@ -12,6 +12,18 @@ use ArrayObject;
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use RuntimeException;
|
||||
|
||||
use function array_values;
|
||||
use function class_alias;
|
||||
use function class_exists;
|
||||
use function explode;
|
||||
use function file_exists;
|
||||
use function interface_exists;
|
||||
use function spl_autoload_register;
|
||||
use function strlen;
|
||||
use function strtr;
|
||||
use function substr;
|
||||
use function trait_exists;
|
||||
|
||||
/**
|
||||
* Alias legacy Zend Framework project classes/interfaces/traits to Laminas equivalents.
|
||||
*/
|
||||
|
@@ -8,8 +8,27 @@
|
||||
|
||||
namespace Laminas\ZendFrameworkBridge;
|
||||
|
||||
use function array_intersect_key;
|
||||
use function array_key_exists;
|
||||
use function array_pop;
|
||||
use function array_push;
|
||||
use function count;
|
||||
use function in_array;
|
||||
use function is_array;
|
||||
use function is_callable;
|
||||
use function is_int;
|
||||
use function is_string;
|
||||
|
||||
class ConfigPostProcessor
|
||||
{
|
||||
/** @internal */
|
||||
const SERVICE_MANAGER_KEYS_OF_INTEREST = [
|
||||
'aliases' => true,
|
||||
'factories' => true,
|
||||
'invokables' => true,
|
||||
'services' => true,
|
||||
];
|
||||
|
||||
/** @var array String keys => string values */
|
||||
private $exactReplacements = [
|
||||
'zend-expressive' => 'mezzio',
|
||||
@@ -62,15 +81,10 @@ class ConfigPostProcessor
|
||||
: null;
|
||||
},
|
||||
|
||||
// Aliases and invokables
|
||||
function ($value, array $keys) {
|
||||
static $keysOfInterest;
|
||||
|
||||
$keysOfInterest = $keysOfInterest ?: ['aliases', 'invokables'];
|
||||
$key = array_pop($keys);
|
||||
|
||||
return in_array($key, $keysOfInterest, true) && is_array($value)
|
||||
? [$this, 'replaceDependencyAliases']
|
||||
// service- and pluginmanager handling
|
||||
function ($value) {
|
||||
return is_array($value) && array_intersect_key(self::SERVICE_MANAGER_KEYS_OF_INTEREST, $value) !== []
|
||||
? [$this, 'replaceDependencyConfiguration']
|
||||
: null;
|
||||
},
|
||||
|
||||
@@ -234,24 +248,119 @@ class ConfigPostProcessor
|
||||
return $this->exactReplacements[$value];
|
||||
}
|
||||
|
||||
private function replaceDependencyConfiguration(array $config)
|
||||
{
|
||||
$aliases = isset($config['aliases']) && is_array($config['aliases'])
|
||||
? $this->replaceDependencyAliases($config['aliases'])
|
||||
: [];
|
||||
|
||||
if ($aliases) {
|
||||
$config['aliases'] = $aliases;
|
||||
}
|
||||
|
||||
$config = $this->replaceDependencyInvokables($config);
|
||||
$config = $this->replaceDependencyFactories($config);
|
||||
$config = $this->replaceDependencyServices($config);
|
||||
|
||||
$keys = self::SERVICE_MANAGER_KEYS_OF_INTEREST;
|
||||
foreach ($config as $key => $data) {
|
||||
if (isset($keys[$key])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$config[$key] = is_array($data) ? $this->__invoke($data, [$key]) : $data;
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite dependency aliases array
|
||||
*
|
||||
* In this case, we want to keep the alias as-is, but rewrite the target.
|
||||
*
|
||||
* This same logic can be used for invokables, which are essentially just
|
||||
* an alias map.
|
||||
* We need also provide an additional alias if the alias key is a legacy class.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function replaceDependencyAliases(array $aliases)
|
||||
{
|
||||
foreach ($aliases as $alias => $target) {
|
||||
$aliases[$alias] = $this->replacements->replace($target);
|
||||
if (! is_string($alias) || ! is_string($target)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$newTarget = $this->replacements->replace($target);
|
||||
$newAlias = $this->replacements->replace($alias);
|
||||
|
||||
$notIn = [$newTarget];
|
||||
$name = $newTarget;
|
||||
while (isset($aliases[$name])) {
|
||||
$notIn[] = $aliases[$name];
|
||||
$name = $aliases[$name];
|
||||
}
|
||||
|
||||
if ($newAlias === $alias && ! in_array($alias, $notIn, true)) {
|
||||
$aliases[$alias] = $newTarget;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($aliases[$newAlias])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! in_array($newAlias, $notIn, true)) {
|
||||
$aliases[$alias] = $newAlias;
|
||||
$aliases[$newAlias] = $newTarget;
|
||||
}
|
||||
}
|
||||
|
||||
return $aliases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite dependency invokables array
|
||||
*
|
||||
* In this case, we want to keep the alias as-is, but rewrite the target.
|
||||
*
|
||||
* We need also provide an additional alias if invokable is defined with
|
||||
* an alias which is a legacy class.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function replaceDependencyInvokables(array $config)
|
||||
{
|
||||
if (empty($config['invokables']) || ! is_array($config['invokables'])) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
foreach ($config['invokables'] as $alias => $target) {
|
||||
if (! is_string($alias)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$newTarget = $this->replacements->replace($target);
|
||||
$newAlias = $this->replacements->replace($alias);
|
||||
|
||||
if ($alias === $target || isset($config['aliases'][$newAlias])) {
|
||||
$config['invokables'][$alias] = $newTarget;
|
||||
continue;
|
||||
}
|
||||
|
||||
$config['invokables'][$newAlias] = $newTarget;
|
||||
|
||||
if ($newAlias === $alias) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$config['aliases'][$alias] = $newAlias;
|
||||
|
||||
unset($config['invokables'][$alias]);
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @return mixed Returns $value verbatim.
|
||||
@@ -260,4 +369,66 @@ class ConfigPostProcessor
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
|
||||
private function replaceDependencyFactories(array $config)
|
||||
{
|
||||
if (empty($config['factories']) || ! is_array($config['factories'])) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
foreach ($config['factories'] as $service => $factory) {
|
||||
if (! is_string($service)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$replacedService = $this->replacements->replace($service);
|
||||
$factory = is_string($factory) ? $this->replacements->replace($factory) : $factory;
|
||||
$config['factories'][$replacedService] = $factory;
|
||||
|
||||
if ($replacedService === $service) {
|
||||
continue;
|
||||
}
|
||||
|
||||
unset($config['factories'][$service]);
|
||||
if (isset($config['aliases'][$service])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$config['aliases'][$service] = $replacedService;
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
private function replaceDependencyServices(array $config)
|
||||
{
|
||||
if (empty($config['services']) || ! is_array($config['services'])) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
foreach ($config['services'] as $service => $serviceInstance) {
|
||||
if (! is_string($service)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$replacedService = $this->replacements->replace($service);
|
||||
$serviceInstance = is_array($serviceInstance) ? $this->__invoke($serviceInstance) : $serviceInstance;
|
||||
|
||||
$config['services'][$replacedService] = $serviceInstance;
|
||||
|
||||
if ($service === $replacedService) {
|
||||
continue;
|
||||
}
|
||||
|
||||
unset($config['services'][$service]);
|
||||
|
||||
if (isset($config['aliases'][$service])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$config['aliases'][$service] = $replacedService;
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
|
@@ -8,6 +8,11 @@
|
||||
|
||||
namespace Laminas\ZendFrameworkBridge;
|
||||
|
||||
use function array_merge;
|
||||
use function str_replace;
|
||||
use function strpos;
|
||||
use function strtr;
|
||||
|
||||
class Replacements
|
||||
{
|
||||
/** @var string[] */
|
||||
@@ -19,6 +24,15 @@ class Replacements
|
||||
require __DIR__ . '/../config/replacements.php',
|
||||
$additionalReplacements
|
||||
);
|
||||
|
||||
// Provide multiple variants of strings containing namespace separators
|
||||
foreach ($this->replacements as $original => $replacement) {
|
||||
if (false === strpos($original, '\\')) {
|
||||
continue;
|
||||
}
|
||||
$this->replacements[str_replace('\\', '\\\\', $original)] = str_replace('\\', '\\\\', $replacement);
|
||||
$this->replacements[str_replace('\\', '\\\\\\\\', $original)] = str_replace('\\', '\\\\\\\\', $replacement);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -6,4 +6,4 @@
|
||||
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
\Laminas\ZendFrameworkBridge\Autoloader::load();
|
||||
Laminas\ZendFrameworkBridge\Autoloader::load();
|
||||
|
38
kirby/vendor/psr/log/Psr/Log/LoggerInterface.php
vendored
38
kirby/vendor/psr/log/Psr/Log/LoggerInterface.php
vendored
@@ -22,8 +22,8 @@ interface LoggerInterface
|
||||
/**
|
||||
* System is unusable.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -35,8 +35,8 @@ interface LoggerInterface
|
||||
* Example: Entire website down, database unavailable, etc. This should
|
||||
* trigger the SMS alerts and wake you up.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -47,8 +47,8 @@ interface LoggerInterface
|
||||
*
|
||||
* Example: Application component unavailable, unexpected exception.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -58,8 +58,8 @@ interface LoggerInterface
|
||||
* Runtime errors that do not require immediate action but should typically
|
||||
* be logged and monitored.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -71,8 +71,8 @@ interface LoggerInterface
|
||||
* Example: Use of deprecated APIs, poor use of an API, undesirable things
|
||||
* that are not necessarily wrong.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -81,8 +81,8 @@ interface LoggerInterface
|
||||
/**
|
||||
* Normal but significant events.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -93,8 +93,8 @@ interface LoggerInterface
|
||||
*
|
||||
* Example: User logs in, SQL logs.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -103,8 +103,8 @@ interface LoggerInterface
|
||||
/**
|
||||
* Detailed debug information.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -113,9 +113,9 @@ interface LoggerInterface
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param mixed $level
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
|
@@ -11,11 +11,13 @@
|
||||
|
||||
use Symfony\Polyfill\Mbstring as p;
|
||||
|
||||
if (!function_exists('mb_strlen')) {
|
||||
if (!defined('MB_CASE_UPPER')) {
|
||||
define('MB_CASE_UPPER', 0);
|
||||
define('MB_CASE_LOWER', 1);
|
||||
define('MB_CASE_TITLE', 2);
|
||||
}
|
||||
|
||||
if (!function_exists('mb_strlen')) {
|
||||
function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
|
||||
function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
|
||||
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
|
||||
|
Reference in New Issue
Block a user